(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([typeof document === "object" ? document.currentScript : undefined, {
"[project]/node_modules/next/dist/client/app-bootstrap.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/**
* Before starting the Next.js runtime and requiring any module, we need to make
* sure the following scripts are executed in the correct order:
* - Polyfills
* - next/script with `beforeInteractive` strategy
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "appBootstrap", {
enumerable: true,
get: function() {
return appBootstrap;
}
});
const version = "15.3.3";
window.next = {
version,
appDir: true
};
function loadScriptsInSequence(scripts, hydrate) {
if (!scripts || !scripts.length) {
return hydrate();
}
return scripts.reduce((promise, param)=>{
let [src, props] = param;
return promise.then(()=>{
return new Promise((resolve, reject)=>{
const el = document.createElement('script');
if (props) {
for(const key in props){
if (key !== 'children') {
el.setAttribute(key, props[key]);
}
}
}
if (src) {
el.src = src;
el.onload = ()=>resolve();
el.onerror = reject;
} else if (props) {
el.innerHTML = props.children;
setTimeout(resolve);
}
document.head.appendChild(el);
});
});
}, Promise.resolve()).catch((err)=>{
console.error(err);
// Still try to hydrate even if there's an error.
}).then(()=>{
hydrate();
});
}
function appBootstrap(hydrate) {
loadScriptsInSequence(self.__next_s, ()=>{
// If the static shell is being debugged, skip hydration if the
// `__nextppronly` query is present. This is only enabled when the
// environment variable `__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING` is
// set to `1`. Otherwise the following is optimized out.
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
hydrate();
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-bootstrap.js.map
}}),
"[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
HTTPAccessErrorStatus: null,
HTTP_ERROR_FALLBACK_ERROR_CODE: null,
getAccessFallbackErrorTypeByStatus: null,
getAccessFallbackHTTPStatus: null,
isHTTPAccessFallbackError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
HTTPAccessErrorStatus: function() {
return HTTPAccessErrorStatus;
},
HTTP_ERROR_FALLBACK_ERROR_CODE: function() {
return HTTP_ERROR_FALLBACK_ERROR_CODE;
},
getAccessFallbackErrorTypeByStatus: function() {
return getAccessFallbackErrorTypeByStatus;
},
getAccessFallbackHTTPStatus: function() {
return getAccessFallbackHTTPStatus;
},
isHTTPAccessFallbackError: function() {
return isHTTPAccessFallbackError;
}
});
const HTTPAccessErrorStatus = {
NOT_FOUND: 404,
FORBIDDEN: 403,
UNAUTHORIZED: 401
};
const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus));
const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK';
function isHTTPAccessFallbackError(error) {
if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') {
return false;
}
const [prefix, httpStatus] = error.digest.split(';');
return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus));
}
function getAccessFallbackHTTPStatus(error) {
const httpStatus = error.digest.split(';')[1];
return Number(httpStatus);
}
function getAccessFallbackErrorTypeByStatus(status) {
switch(status){
case 401:
return 'unauthorized';
case 403:
return 'forbidden';
case 404:
return 'not-found';
default:
return;
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=http-access-fallback.js.map
}}),
"[project]/node_modules/next/dist/client/components/redirect-status-code.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RedirectStatusCode", {
enumerable: true,
get: function() {
return RedirectStatusCode;
}
});
var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) {
RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther";
RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect";
RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect";
return RedirectStatusCode;
}({});
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=redirect-status-code.js.map
}}),
"[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
REDIRECT_ERROR_CODE: null,
RedirectType: null,
isRedirectError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
REDIRECT_ERROR_CODE: function() {
return REDIRECT_ERROR_CODE;
},
RedirectType: function() {
return RedirectType;
},
isRedirectError: function() {
return isRedirectError;
}
});
const _redirectstatuscode = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-status-code.js [app-client] (ecmascript)");
const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT';
var RedirectType = /*#__PURE__*/ function(RedirectType) {
RedirectType["push"] = "push";
RedirectType["replace"] = "replace";
return RedirectType;
}({});
function isRedirectError(error) {
if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') {
return false;
}
const digest = error.digest.split(';');
const [errorCode, type] = digest;
const destination = digest.slice(2, -2).join(';');
const status = digest.at(-2);
const statusCode = Number(status);
return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in _redirectstatuscode.RedirectStatusCode;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=redirect-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isNextRouterError", {
enumerable: true,
get: function() {
return isNextRouterError;
}
});
const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-client] (ecmascript)");
const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)");
function isNextRouterError(error) {
return (0, _redirecterror.isRedirectError)(error) || (0, _httpaccessfallback.isHTTPAccessFallbackError)(error);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=is-next-router-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/is-hydration-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
NEXTJS_HYDRATION_ERROR_LINK: null,
REACT_HYDRATION_ERROR_LINK: null,
getDefaultHydrationErrorMessage: null,
getHydrationErrorStackInfo: null,
isHydrationError: null,
isReactHydrationErrorMessage: null,
testReactHydrationWarning: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
NEXTJS_HYDRATION_ERROR_LINK: function() {
return NEXTJS_HYDRATION_ERROR_LINK;
},
REACT_HYDRATION_ERROR_LINK: function() {
return REACT_HYDRATION_ERROR_LINK;
},
getDefaultHydrationErrorMessage: function() {
return getDefaultHydrationErrorMessage;
},
getHydrationErrorStackInfo: function() {
return getHydrationErrorStackInfo;
},
isHydrationError: function() {
return isHydrationError;
},
isReactHydrationErrorMessage: function() {
return isReactHydrationErrorMessage;
},
testReactHydrationWarning: function() {
return testReactHydrationWarning;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [app-client] (ecmascript)"));
const hydrationErrorRegex = /hydration failed|while hydrating|content does not match|did not match|HTML didn't match|text didn't match/i;
const reactUnifiedMismatchWarning = "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:";
const reactHydrationStartMessages = [
reactUnifiedMismatchWarning,
"Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:"
];
const REACT_HYDRATION_ERROR_LINK = 'https://react.dev/link/hydration-mismatch';
const NEXTJS_HYDRATION_ERROR_LINK = 'https://nextjs.org/docs/messages/react-hydration-error';
const getDefaultHydrationErrorMessage = ()=>{
return reactUnifiedMismatchWarning;
};
function isHydrationError(error) {
return (0, _iserror.default)(error) && hydrationErrorRegex.test(error.message);
}
function isReactHydrationErrorMessage(msg) {
return reactHydrationStartMessages.some((prefix)=>msg.startsWith(prefix));
}
const hydrationWarningRegexes = [
/^In HTML, (.+?) cannot be a child of <(.+?)>\.(.*)\nThis will cause a hydration error\.(.*)/,
/^In HTML, (.+?) cannot be a descendant of <(.+?)>\.\nThis will cause a hydration error\.(.*)/,
/^In HTML, text nodes cannot be a child of <(.+?)>\.\nThis will cause a hydration error\./,
/^In HTML, whitespace text nodes cannot be a child of <(.+?)>\. Make sure you don't have any extra whitespace between tags on each line of your source code\.\nThis will cause a hydration error\./,
/^Expected server HTML to contain a matching <(.+?)> in <(.+?)>\.(.*)/,
/^Did not expect server HTML to contain a <(.+?)> in <(.+?)>\.(.*)/,
/^Expected server HTML to contain a matching text node for "(.+?)" in <(.+?)>\.(.*)/,
/^Did not expect server HTML to contain the text node "(.+?)" in <(.+?)>\.(.*)/,
/^Text content did not match\. Server: "(.+?)" Client: "(.+?)"(.*)/
];
function testReactHydrationWarning(msg) {
if (typeof msg !== 'string' || !msg) return false;
// React 18 has the `Warning: ` prefix.
// React 19 does not.
if (msg.startsWith('Warning: ')) {
msg = msg.slice('Warning: '.length);
}
return hydrationWarningRegexes.some((regex)=>regex.test(msg));
}
function getHydrationErrorStackInfo(rawMessage) {
rawMessage = rawMessage.replace(/^Error: /, '');
rawMessage = rawMessage.replace('Warning: ', '');
const isReactHydrationWarning = testReactHydrationWarning(rawMessage);
if (!isReactHydrationErrorMessage(rawMessage) && !isReactHydrationWarning) {
return {
message: null,
stack: rawMessage,
diff: ''
};
}
if (isReactHydrationWarning) {
const [message, diffLog] = rawMessage.split('\n\n');
return {
message: message.trim(),
stack: '',
diff: (diffLog || '').trim()
};
}
const firstLineBreak = rawMessage.indexOf('\n');
rawMessage = rawMessage.slice(firstLineBreak + 1).trim();
const [message, trailing] = rawMessage.split("" + REACT_HYDRATION_ERROR_LINK);
const trimmedMessage = message.trim();
// React built-in hydration diff starts with a newline, checking if length is > 1
if (trailing && trailing.length > 1) {
const stacks = [];
const diffs = [];
trailing.split('\n').forEach((line)=>{
if (line.trim() === '') return;
if (line.trim().startsWith('at ')) {
stacks.push(line);
} else {
diffs.push(line);
}
});
return {
message: trimmedMessage,
diff: diffs.join('\n'),
stack: stacks.join('\n')
};
} else {
return {
message: trimmedMessage,
stack: trailing
};
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=is-hydration-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/hydration-error-info.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getHydrationWarningType: null,
getReactHydrationDiffSegments: null,
hydrationErrorState: null,
storeHydrationErrorStateFromConsoleArgs: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getHydrationWarningType: function() {
return getHydrationWarningType;
},
getReactHydrationDiffSegments: function() {
return getReactHydrationDiffSegments;
},
hydrationErrorState: function() {
return hydrationErrorState;
},
storeHydrationErrorStateFromConsoleArgs: function() {
return storeHydrationErrorStateFromConsoleArgs;
}
});
const _ishydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-hydration-error.js [app-client] (ecmascript)");
const hydrationErrorState = {};
// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference
const htmlTagsWarnings = new Set([
'Warning: In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s',
'Warning: In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s',
'Warning: In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.',
"Warning: In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.",
'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s',
'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s'
]);
const textAndTagsMismatchWarnings = new Set([
'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s',
'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s'
]);
const getHydrationWarningType = (message)=>{
if (typeof message !== 'string') {
// TODO: Doesn't make sense to treat no message as a hydration error message.
// We should bail out somewhere earlier.
return 'text';
}
const normalizedMessage = message.startsWith('Warning: ') ? message : "Warning: " + message;
if (isHtmlTagsWarning(normalizedMessage)) return 'tag';
if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag';
return 'text';
};
const isHtmlTagsWarning = (message)=>htmlTagsWarnings.has(message);
const isTextInTagsMismatchWarning = (msg)=>textAndTagsMismatchWarnings.has(msg);
const getReactHydrationDiffSegments = (msg)=>{
if (msg) {
const { message, diff } = (0, _ishydrationerror.getHydrationErrorStackInfo)(msg);
if (message) return [
message,
diff
];
}
return undefined;
};
function storeHydrationErrorStateFromConsoleArgs() {
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
args[_key] = arguments[_key];
}
let [msg, firstContent, secondContent, ...rest] = args;
if ((0, _ishydrationerror.testReactHydrationWarning)(msg)) {
// Some hydration warnings has 4 arguments, some has 3, fallback to the last argument
// when the 3rd argument is not the component stack but an empty string
const isReact18 = msg.startsWith('Warning: ');
// For some warnings, there's only 1 argument for template.
// The second argument is the diff or component stack.
if (args.length === 3) {
secondContent = '';
}
const warning = [
// remove the last %s from the message
msg,
firstContent,
secondContent
];
const lastArg = (rest[rest.length - 1] || '').trim();
if (!isReact18) {
hydrationErrorState.reactOutputComponentDiff = lastArg;
} else {
hydrationErrorState.reactOutputComponentDiff = generateHydrationDiffReact18(msg, firstContent, secondContent, lastArg);
}
hydrationErrorState.warning = warning;
hydrationErrorState.serverContent = firstContent;
hydrationErrorState.clientContent = secondContent;
}
}
/*
* Some hydration errors in React 18 does not have the diff in the error message.
* Instead it has the error stack trace which is component stack that we can leverage.
* Will parse the diff from the error stack trace
* e.g.
* Warning: Expected server HTML to contain a matching
in
.
* at div
* at p
* at div
* at div
* at Page
* output:
*
*
*
* >
*
*/ function generateHydrationDiffReact18(message, firstContent, secondContent, lastArg) {
const componentStack = lastArg;
let firstIndex = -1;
let secondIndex = -1;
const hydrationWarningType = getHydrationWarningType(message);
// at div\n at Foo\n at Bar (....)\n -> [div, Foo]
const components = componentStack.split('\n') // .reverse()
.map((line, index)=>{
// `
at ()` -> `at ()`
line = line.trim();
// extract `at ` to `<>`
// e.g. ` at Foo` -> ``
const [, component, location] = /at (\w+)( \((.*)\))?/.exec(line) || [];
// If there's no location then it's user-land stack frame
if (!location) {
if (component === firstContent && firstIndex === -1) {
firstIndex = index;
} else if (component === secondContent && secondIndex === -1) {
secondIndex = index;
}
}
return location ? '' : component;
}).filter(Boolean).reverse();
let diff = '';
for(let i = 0; i < components.length; i++){
const component = components[i];
const matchFirstContent = hydrationWarningType === 'tag' && i === components.length - firstIndex - 1;
const matchSecondContent = hydrationWarningType === 'tag' && i === components.length - secondIndex - 1;
if (matchFirstContent || matchSecondContent) {
const spaces = ' '.repeat(Math.max(i * 2 - 2, 0) + 2);
diff += "> " + spaces + "<" + component + ">\n";
} else {
const spaces = ' '.repeat(i * 2 + 2);
diff += spaces + "<" + component + ">\n";
}
}
if (hydrationWarningType === 'text') {
const spaces = ' '.repeat(components.length * 2);
diff += "+ " + spaces + '"' + firstContent + '"\n';
diff += "- " + spaces + '"' + secondContent + '"\n';
} else if (hydrationWarningType === 'text-in-tag') {
const spaces = ' '.repeat(components.length * 2);
diff += "> " + spaces + "<" + secondContent + ">\n";
diff += "> " + spaces + '"' + firstContent + '"\n';
}
return diff;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=hydration-error-info.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/attach-hydration-error-state.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "attachHydrationErrorState", {
enumerable: true,
get: function() {
return attachHydrationErrorState;
}
});
const _ishydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-hydration-error.js [app-client] (ecmascript)");
const _hydrationerrorinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/hydration-error-info.js [app-client] (ecmascript)");
function attachHydrationErrorState(error) {
let parsedHydrationErrorState = {};
const isHydrationWarning = (0, _ishydrationerror.testReactHydrationWarning)(error.message);
const isHydrationRuntimeError = (0, _ishydrationerror.isHydrationError)(error);
// If it's not hydration warnings or errors, skip
if (!(isHydrationRuntimeError || isHydrationWarning)) {
return;
}
const reactHydrationDiffSegments = (0, _hydrationerrorinfo.getReactHydrationDiffSegments)(error.message);
// If the reactHydrationDiffSegments exists
// and the diff (reactHydrationDiffSegments[1]) exists
// e.g. the hydration diff log error.
if (reactHydrationDiffSegments) {
const diff = reactHydrationDiffSegments[1];
parsedHydrationErrorState = {
...error.details,
..._hydrationerrorinfo.hydrationErrorState,
// If diff is present in error, we don't need to pick up the console logged warning.
// - if hydration error has diff, and is not hydration diff log, then it's a normal hydration error.
// - if hydration error no diff, then leverage the one from the hydration diff log.
warning: (diff && !isHydrationWarning ? null : _hydrationerrorinfo.hydrationErrorState.warning) || [
(0, _ishydrationerror.getDefaultHydrationErrorMessage)(),
'',
''
],
// When it's hydration diff log, do not show notes section.
// This condition is only for the 1st squashed error.
notes: isHydrationWarning ? '' : reactHydrationDiffSegments[0],
reactOutputComponentDiff: diff
};
// Cache the `reactOutputComponentDiff` into hydrationErrorState.
// This is only required for now when we still squashed the hydration diff log into hydration error.
// Once the all error is logged to dev overlay in order, this will go away.
if (!_hydrationerrorinfo.hydrationErrorState.reactOutputComponentDiff && diff) {
_hydrationerrorinfo.hydrationErrorState.reactOutputComponentDiff = diff;
}
// If it's hydration runtime error that doesn't contain the diff, combine the diff from the cached hydration diff.
if (!diff && isHydrationRuntimeError && _hydrationerrorinfo.hydrationErrorState.reactOutputComponentDiff) {
parsedHydrationErrorState.reactOutputComponentDiff = _hydrationerrorinfo.hydrationErrorState.reactOutputComponentDiff;
}
} else {
// Normal runtime error, where it doesn't contain the hydration diff.
// If there's any extra information in the error message to display,
// append it to the error message details property
if (_hydrationerrorinfo.hydrationErrorState.warning) {
// The patched console.error found hydration errors logged by React
// Append the logged warning to the error message
parsedHydrationErrorState = {
...error.details,
// It contains the warning, component stack, server and client tag names
..._hydrationerrorinfo.hydrationErrorState
};
}
// Consume the cached hydration diff.
// This is only required for now when we still squashed the hydration diff log into hydration error.
// Once the all error is logged to dev overlay in order, this will go away.
if (_hydrationerrorinfo.hydrationErrorState.reactOutputComponentDiff) {
parsedHydrationErrorState.reactOutputComponentDiff = _hydrationerrorinfo.hydrationErrorState.reactOutputComponentDiff;
}
}
// If it's a hydration error, store the hydration error state into the error object
;
error.details = parsedHydrationErrorState;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=attach-hydration-error-state.js.map
}}),
"[project]/node_modules/next/dist/client/lib/console.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
formatConsoleArgs: null,
parseConsoleArgs: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatConsoleArgs: function() {
return formatConsoleArgs;
},
parseConsoleArgs: function() {
return parseConsoleArgs;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [app-client] (ecmascript)"));
function formatObject(arg, depth) {
switch(typeof arg){
case 'object':
if (arg === null) {
return 'null';
} else if (Array.isArray(arg)) {
let result = '[';
if (depth < 1) {
for(let i = 0; i < arg.length; i++){
if (result !== '[') {
result += ',';
}
if (Object.prototype.hasOwnProperty.call(arg, i)) {
result += formatObject(arg[i], depth + 1);
}
}
} else {
result += arg.length > 0 ? '...' : '';
}
result += ']';
return result;
} else if (arg instanceof Error) {
return arg + '';
} else {
const keys = Object.keys(arg);
let result = '{';
if (depth < 1) {
for(let i = 0; i < keys.length; i++){
const key = keys[i];
const desc = Object.getOwnPropertyDescriptor(arg, 'key');
if (desc && !desc.get && !desc.set) {
const jsonKey = JSON.stringify(key);
if (jsonKey !== '"' + key + '"') {
result += jsonKey + ': ';
} else {
result += key + ': ';
}
result += formatObject(desc.value, depth + 1);
}
}
} else {
result += keys.length > 0 ? '...' : '';
}
result += '}';
return result;
}
case 'string':
return JSON.stringify(arg);
default:
return String(arg);
}
}
function formatConsoleArgs(args) {
let message;
let idx;
if (typeof args[0] === 'string') {
message = args[0];
idx = 1;
} else {
message = '';
idx = 0;
}
let result = '';
let startQuote = false;
for(let i = 0; i < message.length; ++i){
const char = message[i];
if (char !== '%' || i === message.length - 1 || idx >= args.length) {
result += char;
continue;
}
const code = message[++i];
switch(code){
case 'c':
{
// TODO: We should colorize with HTML instead of turning into a string.
// Ignore for now.
result = startQuote ? "" + result + "]" : "[" + result;
startQuote = !startQuote;
idx++;
break;
}
case 'O':
case 'o':
{
result += formatObject(args[idx++], 0);
break;
}
case 'd':
case 'i':
{
result += parseInt(args[idx++], 10);
break;
}
case 'f':
{
result += parseFloat(args[idx++]);
break;
}
case 's':
{
result += String(args[idx++]);
break;
}
default:
result += '%' + code;
}
}
for(; idx < args.length; idx++){
result += (idx > 0 ? ' ' : '') + formatObject(args[idx], 0);
}
return result;
}
function parseConsoleArgs(args) {
// See
// https://github.com/facebook/react/blob/65a56d0e99261481c721334a3ec4561d173594cd/packages/react-devtools-shared/src/backend/flight/renderer.js#L88-L93
//
// Logs replayed from the server look like this:
// [
// "%c%s%c %o\n\n%s\n\n%s\n",
// "background: #e6e6e6; ...",
// " Server ", // can also be e.g. " Prerender "
// "",
// Error,
// "The above error occurred in the component.",
// ...
// ]
if (args.length > 3 && typeof args[0] === 'string' && args[0].startsWith('%c%s%c ') && typeof args[1] === 'string' && typeof args[2] === 'string' && typeof args[3] === 'string') {
const environmentName = args[2];
const maybeError = args[4];
return {
environmentName: environmentName.trim(),
error: (0, _iserror.default)(maybeError) ? maybeError : null
};
}
return {
environmentName: null,
error: null
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=console.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/console-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// To distinguish from React error.digest, we use a different symbol here to determine if the error is from console.error or unhandled promise rejection.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
createConsoleError: null,
getConsoleErrorType: null,
isConsoleError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
createConsoleError: function() {
return createConsoleError;
},
getConsoleErrorType: function() {
return getConsoleErrorType;
},
isConsoleError: function() {
return isConsoleError;
}
});
const digestSym = Symbol.for('next.console.error.digest');
const consoleTypeSym = Symbol.for('next.console.error.type');
function createConsoleError(message, environmentName) {
const error = typeof message === 'string' ? Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
}) : message;
error[digestSym] = 'NEXT_CONSOLE_ERROR';
error[consoleTypeSym] = typeof message === 'string' ? 'string' : 'error';
if (environmentName && !error.environmentName) {
error.environmentName = environmentName;
}
return error;
}
const isConsoleError = (error)=>{
return error && error[digestSym] === 'NEXT_CONSOLE_ERROR';
};
const getConsoleErrorType = (error)=>{
return error[consoleTypeSym];
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=console-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/enqueue-client-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// Dedupe the two consecutive errors: If the previous one is same as current one, ignore the current one.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "enqueueConsecutiveDedupedError", {
enumerable: true,
get: function() {
return enqueueConsecutiveDedupedError;
}
});
function enqueueConsecutiveDedupedError(queue, error) {
const previousError = queue[queue.length - 1];
// Compare the error stack to dedupe the consecutive errors
if (previousError && previousError.stack === error.stack) {
return;
}
queue.push(error);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=enqueue-client-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/stitched-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getReactStitchedError", {
enumerable: true,
get: function() {
return getReactStitchedError;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [app-client] (ecmascript)"));
const _errortelemetryutils = __turbopack_context__.r("[project]/node_modules/next/dist/lib/error-telemetry-utils.js [app-client] (ecmascript)");
const REACT_ERROR_STACK_BOTTOM_FRAME = 'react-stack-bottom-frame';
const REACT_ERROR_STACK_BOTTOM_FRAME_REGEX = new RegExp("(at " + REACT_ERROR_STACK_BOTTOM_FRAME + " )|(" + REACT_ERROR_STACK_BOTTOM_FRAME + "\\@)");
function getReactStitchedError(err) {
const isErrorInstance = (0, _iserror.default)(err);
const originStack = isErrorInstance ? err.stack || '' : '';
const originMessage = isErrorInstance ? err.message : '';
const stackLines = originStack.split('\n');
const indexOfSplit = stackLines.findIndex((line)=>REACT_ERROR_STACK_BOTTOM_FRAME_REGEX.test(line));
const isOriginalReactError = indexOfSplit >= 0 // has the react-stack-bottom-frame
;
let newStack = isOriginalReactError ? stackLines.slice(0, indexOfSplit).join('\n') : originStack;
const newError = Object.defineProperty(new Error(originMessage), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
// Copy all enumerable properties, e.g. digest
Object.assign(newError, err);
(0, _errortelemetryutils.copyNextErrorCode)(err, newError);
newError.stack = newStack;
// Avoid duplicate overriding stack frames
appendOwnerStack(newError);
return newError;
}
function appendOwnerStack(error) {
if (!_react.default.captureOwnerStack) {
return;
}
let stack = error.stack || '';
// This module is only bundled in development mode so this is safe.
const ownerStack = _react.default.captureOwnerStack();
// Avoid duplicate overriding stack frames
if (ownerStack && stack.endsWith(ownerStack) === false) {
stack += ownerStack;
// Override stack
error.stack = stack;
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=stitched-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/use-error-handler.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
handleClientError: null,
handleConsoleError: null,
handleGlobalErrors: null,
useErrorHandler: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
handleClientError: function() {
return handleClientError;
},
handleConsoleError: function() {
return handleConsoleError;
},
handleGlobalErrors: function() {
return handleGlobalErrors;
},
useErrorHandler: function() {
return useErrorHandler;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _attachhydrationerrorstate = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/attach-hydration-error-state.js [app-client] (ecmascript)");
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
const _hydrationerrorinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/hydration-error-info.js [app-client] (ecmascript)");
const _console = __turbopack_context__.r("[project]/node_modules/next/dist/client/lib/console.js [app-client] (ecmascript)");
const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [app-client] (ecmascript)"));
const _consoleerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/console-error.js [app-client] (ecmascript)");
const _enqueueclienterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/enqueue-client-error.js [app-client] (ecmascript)");
const _stitchederror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/stitched-error.js [app-client] (ecmascript)");
const queueMicroTask = globalThis.queueMicrotask || ((cb)=>Promise.resolve().then(cb));
const errorQueue = [];
const errorHandlers = [];
const rejectionQueue = [];
const rejectionHandlers = [];
function handleConsoleError(originError, consoleErrorArgs) {
let error;
const { environmentName } = (0, _console.parseConsoleArgs)(consoleErrorArgs);
if ((0, _iserror.default)(originError)) {
error = (0, _consoleerror.createConsoleError)(originError, environmentName);
} else {
error = (0, _consoleerror.createConsoleError)((0, _console.formatConsoleArgs)(consoleErrorArgs), environmentName);
}
error = (0, _stitchederror.getReactStitchedError)(error);
(0, _hydrationerrorinfo.storeHydrationErrorStateFromConsoleArgs)(...consoleErrorArgs);
(0, _attachhydrationerrorstate.attachHydrationErrorState)(error);
(0, _enqueueclienterror.enqueueConsecutiveDedupedError)(errorQueue, error);
for (const handler of errorHandlers){
// Delayed the error being passed to React Dev Overlay,
// avoid the state being synchronously updated in the component.
queueMicroTask(()=>{
handler(error);
});
}
}
function handleClientError(originError) {
let error;
if ((0, _iserror.default)(originError)) {
error = originError;
} else {
// If it's not an error, format the args into an error
const formattedErrorMessage = originError + '';
error = Object.defineProperty(new Error(formattedErrorMessage), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
error = (0, _stitchederror.getReactStitchedError)(error);
(0, _attachhydrationerrorstate.attachHydrationErrorState)(error);
(0, _enqueueclienterror.enqueueConsecutiveDedupedError)(errorQueue, error);
for (const handler of errorHandlers){
// Delayed the error being passed to React Dev Overlay,
// avoid the state being synchronously updated in the component.
queueMicroTask(()=>{
handler(error);
});
}
}
function useErrorHandler(handleOnUnhandledError, handleOnUnhandledRejection) {
(0, _react.useEffect)(()=>{
// Handle queued errors.
errorQueue.forEach(handleOnUnhandledError);
rejectionQueue.forEach(handleOnUnhandledRejection);
// Listen to new errors.
errorHandlers.push(handleOnUnhandledError);
rejectionHandlers.push(handleOnUnhandledRejection);
return ()=>{
// Remove listeners.
errorHandlers.splice(errorHandlers.indexOf(handleOnUnhandledError), 1);
rejectionHandlers.splice(rejectionHandlers.indexOf(handleOnUnhandledRejection), 1);
// Reset error queues.
errorQueue.splice(0, errorQueue.length);
rejectionQueue.splice(0, rejectionQueue.length);
};
}, [
handleOnUnhandledError,
handleOnUnhandledRejection
]);
}
function onUnhandledError(event) {
if ((0, _isnextroutererror.isNextRouterError)(event.error)) {
event.preventDefault();
return false;
}
// When there's an error property present, we log the error to error overlay.
// Otherwise we don't do anything as it's not logging in the console either.
if (event.error) {
handleClientError(event.error);
}
}
function onUnhandledRejection(ev) {
const reason = ev == null ? void 0 : ev.reason;
if ((0, _isnextroutererror.isNextRouterError)(reason)) {
ev.preventDefault();
return;
}
let error = reason;
if (error && !(0, _iserror.default)(error)) {
error = Object.defineProperty(new Error(error + ''), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
rejectionQueue.push(error);
for (const handler of rejectionHandlers){
handler(error);
}
}
function handleGlobalErrors() {
if (typeof window !== 'undefined') {
try {
// Increase the number of stack frames on the client
Error.stackTraceLimit = 50;
} catch (e) {}
window.addEventListener('error', onUnhandledError);
window.addEventListener('unhandledrejection', onUnhandledRejection);
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-error-handler.js.map
}}),
"[project]/node_modules/next/dist/client/components/globals/intercept-console-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
originConsoleError: null,
patchConsoleError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
originConsoleError: function() {
return originConsoleError;
},
patchConsoleError: function() {
return patchConsoleError;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [app-client] (ecmascript)"));
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
const _useerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/use-error-handler.js [app-client] (ecmascript)");
const _console = __turbopack_context__.r("[project]/node_modules/next/dist/client/lib/console.js [app-client] (ecmascript)");
const originConsoleError = globalThis.console.error;
function patchConsoleError() {
// Ensure it's only patched once
if (typeof window === 'undefined') {
return;
}
window.console.error = function error() {
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
args[_key] = arguments[_key];
}
let maybeError;
if ("TURBOPACK compile-time truthy", 1) {
const { error: replayedError } = (0, _console.parseConsoleArgs)(args);
if (replayedError) {
maybeError = replayedError;
} else if ((0, _iserror.default)(args[0])) {
maybeError = args[0];
} else {
// See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78
maybeError = args[1];
}
} else {
"TURBOPACK unreachable";
}
if (!(0, _isnextroutererror.isNextRouterError)(maybeError)) {
if ("TURBOPACK compile-time truthy", 1) {
(0, _useerrorhandler.handleConsoleError)(// but if we pass the error directly, `handleClientError` will ignore it
maybeError, args);
}
originConsoleError.apply(window.console, args);
}
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=intercept-console-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/globals/patch-console.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _interceptconsoleerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/globals/intercept-console-error.js [app-client] (ecmascript)");
(0, _interceptconsoleerror.patchConsoleError)();
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=patch-console.js.map
}}),
"[project]/node_modules/next/dist/client/components/globals/handle-global-errors.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _useerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/use-error-handler.js [app-client] (ecmascript)");
(0, _useerrorhandler.handleGlobalErrors)();
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=handle-global-errors.js.map
}}),
"[project]/node_modules/next/dist/client/react-client-callbacks/report-global-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "reportGlobalError", {
enumerable: true,
get: function() {
return reportGlobalError;
}
});
const reportGlobalError = typeof reportError === 'function' ? reportError : (error)=>{
// TODO: Dispatch error event
globalThis.console.error(error);
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=report-global-error.js.map
}}),
"[project]/node_modules/next/dist/client/react-client-callbacks/on-recoverable-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// This module can be shared between both pages router and app router
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "onRecoverableError", {
enumerable: true,
get: function() {
return onRecoverableError;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-client] (ecmascript)");
const _reportglobalerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/react-client-callbacks/report-global-error.js [app-client] (ecmascript)");
const _stitchederror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/stitched-error.js [app-client] (ecmascript)");
const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [app-client] (ecmascript)"));
const onRecoverableError = (error, errorInfo)=>{
// x-ref: https://github.com/facebook/react/pull/28736
const cause = (0, _iserror.default)(error) && 'cause' in error ? error.cause : error;
const stitchedError = (0, _stitchederror.getReactStitchedError)(cause);
// In development mode, pass along the component stack to the error
if (("TURBOPACK compile-time value", "development") === 'development' && errorInfo.componentStack) {
;
stitchedError._componentStack = errorInfo.componentStack;
}
// Skip certain custom errors which are not expected to be reported on client
if ((0, _bailouttocsr.isBailoutToCSRError)(cause)) return;
(0, _reportglobalerror.reportGlobalError)(stitchedError);
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=on-recoverable-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/navigation-untracked.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useUntrackedPathname", {
enumerable: true,
get: function() {
return useUntrackedPathname;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _hooksclientcontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js [app-client] (ecmascript)");
/**
* This checks to see if the current render has any unknown route parameters.
* It's used to trigger a different render path in the error boundary.
*
* @returns true if there are any unknown route parameters, false otherwise
*/ function hasFallbackRouteParams() {
if (typeof window === 'undefined') {
// AsyncLocalStorage should not be included in the client bundle.
const { workAsyncStorage } = __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/work-async-storage.external.js [app-client] (ecmascript)");
const workStore = workAsyncStorage.getStore();
if (!workStore) return false;
const { fallbackRouteParams } = workStore;
if (!fallbackRouteParams || fallbackRouteParams.size === 0) return false;
return true;
}
return false;
}
function useUntrackedPathname() {
// If there are any unknown route parameters we would typically throw
// an error, but this internal method allows us to return a null value instead
// for components that do not propagate the pathname to the static shell (like
// the error boundary).
if (hasFallbackRouteParams()) {
return null;
}
// This shouldn't cause any issues related to conditional rendering because
// the environment will be consistent for the render.
// eslint-disable-next-line react-hooks/rules-of-hooks
return (0, _react.useContext)(_hooksclientcontextsharedruntime.PathnameContext);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=navigation-untracked.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createHrefFromUrl", {
enumerable: true,
get: function() {
return createHrefFromUrl;
}
});
function createHrefFromUrl(url, includeHash) {
if (includeHash === void 0) includeHash = true;
return url.pathname + url.search + (includeHash ? url.hash : '');
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=create-href-from-url.js.map
}}),
"[project]/node_modules/next/dist/client/components/nav-failure-handler.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
handleHardNavError: null,
useNavFailureHandler: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
handleHardNavError: function() {
return handleHardNavError;
},
useNavFailureHandler: function() {
return useNavFailureHandler;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
function handleHardNavError(error) {
if (error && typeof window !== 'undefined' && window.next.__pendingUrl && (0, _createhreffromurl.createHrefFromUrl)(new URL(window.location.href)) !== (0, _createhreffromurl.createHrefFromUrl)(window.next.__pendingUrl)) {
console.error("Error occurred during navigation, falling back to hard navigation", error);
window.location.href = window.next.__pendingUrl.toString();
return true;
}
return false;
}
function useNavFailureHandler() {
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=nav-failure-handler.js.map
}}),
"[project]/node_modules/next/dist/client/components/error-boundary.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorBoundary: null,
ErrorBoundaryHandler: null,
GlobalError: null,
default: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorBoundary: function() {
return ErrorBoundary;
},
ErrorBoundaryHandler: function() {
return ErrorBoundaryHandler;
},
GlobalError: function() {
return GlobalError;
},
// Exported so that the import signature in the loaders can be identical to user
// supplied custom global error signatures.
default: function() {
return _default;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _navigationuntracked = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation-untracked.js [app-client] (ecmascript)");
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
const _navfailurehandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/nav-failure-handler.js [app-client] (ecmascript)");
const workAsyncStorage = typeof window === 'undefined' ? __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/work-async-storage.external.js [app-client] (ecmascript)").workAsyncStorage : undefined;
const styles = {
error: {
// https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52
fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
height: '100vh',
textAlign: 'center',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center'
},
text: {
fontSize: '14px',
fontWeight: 400,
lineHeight: '28px',
margin: '0 8px'
}
};
// if we are revalidating we want to re-throw the error so the
// function crashes so we can maintain our previous cache
// instead of caching the error page
function HandleISRError(param) {
let { error } = param;
if (workAsyncStorage) {
const store = workAsyncStorage.getStore();
if ((store == null ? void 0 : store.isRevalidate) || (store == null ? void 0 : store.isStaticGeneration)) {
console.error(error);
throw error;
}
}
return null;
}
class ErrorBoundaryHandler extends _react.default.Component {
static getDerivedStateFromError(error) {
if ((0, _isnextroutererror.isNextRouterError)(error)) {
// Re-throw if an expected internal Next.js router error occurs
// this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment)
throw error;
}
return {
error
};
}
static getDerivedStateFromProps(props, state) {
const { error } = state;
// if we encounter an error while
// a navigation is pending we shouldn't render
// the error boundary and instead should fallback
// to a hard navigation to attempt recovering
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
/**
* Handles reset of the error boundary when a navigation happens.
* Ensures the error boundary does not stay enabled when navigating to a new page.
* Approach of setState in render is safe as it checks the previous pathname and then overrides
* it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders
*/ if (props.pathname !== state.previousPathname && state.error) {
return {
error: null,
previousPathname: props.pathname
};
}
return {
error: state.error,
previousPathname: props.pathname
};
}
// Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.
render() {
if (this.state.error) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(HandleISRError, {
error: this.state.error
}),
this.props.errorStyles,
this.props.errorScripts,
/*#__PURE__*/ (0, _jsxruntime.jsx)(this.props.errorComponent, {
error: this.state.error,
reset: this.reset
})
]
});
}
return this.props.children;
}
constructor(props){
super(props), this.reset = ()=>{
this.setState({
error: null
});
};
this.state = {
error: null,
previousPathname: this.props.pathname
};
}
}
function GlobalError(param) {
let { error } = param;
const digest = error == null ? void 0 : error.digest;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", {
id: "__next_error__",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("head", {}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("body", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(HandleISRError, {
error: error
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
style: styles.error,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("h2", {
style: styles.text,
children: [
"Application error: a ",
digest ? 'server' : 'client',
"-side exception has occurred while loading ",
window.location.hostname,
" (see the",
' ',
digest ? 'server logs' : 'browser console',
" for more information)."
]
}),
digest ? /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
style: styles.text,
children: "Digest: " + digest
}) : null
]
})
})
]
})
]
});
}
const _default = GlobalError;
function ErrorBoundary(param) {
let { errorComponent, errorStyles, errorScripts, children } = param;
// When we're rendering the missing params shell, this will return null. This
// is because we won't be rendering any not found boundaries or error
// boundaries for the missing params shell. When this runs on the client
// (where these errors can occur), we will get the correct pathname.
const pathname = (0, _navigationuntracked.useUntrackedPathname)();
if (errorComponent) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ErrorBoundaryHandler, {
pathname: pathname,
errorComponent: errorComponent,
errorStyles: errorStyles,
errorScripts: errorScripts,
children: children
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
children: children
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-boundary.js.map
}}),
"[project]/node_modules/next/dist/client/components/errors/runtime-error-handler.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RuntimeErrorHandler", {
enumerable: true,
get: function() {
return RuntimeErrorHandler;
}
});
const RuntimeErrorHandler = {
hadRuntimeError: false
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=runtime-error-handler.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/app/app-dev-overlay-error-boundary.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AppDevOverlayErrorBoundary", {
enumerable: true,
get: function() {
return AppDevOverlayErrorBoundary;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _runtimeerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/runtime-error-handler.js [app-client] (ecmascript)");
const _errorboundary = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/error-boundary.js [app-client] (ecmascript)");
function ErroredHtml(param) {
let { globalError: [GlobalError, globalErrorStyles], error } = param;
if (!error) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("head", {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("body", {})
]
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_errorboundary.ErrorBoundary, {
errorComponent: _errorboundary.GlobalError,
children: [
globalErrorStyles,
/*#__PURE__*/ (0, _jsxruntime.jsx)(GlobalError, {
error: error
})
]
});
}
class AppDevOverlayErrorBoundary extends _react.PureComponent {
static getDerivedStateFromError(error) {
if (!error.stack) {
return {
isReactError: false,
reactError: null
};
}
_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError = true;
return {
isReactError: true,
reactError: error
};
}
componentDidCatch() {
this.props.onError(this.state.isReactError);
}
render() {
const { children, globalError } = this.props;
const { isReactError, reactError } = this.state;
const fallback = /*#__PURE__*/ (0, _jsxruntime.jsx)(ErroredHtml, {
globalError: globalError,
error: reactError
});
return isReactError ? fallback : children;
}
constructor(...args){
super(...args), this.state = {
isReactError: false,
reactError: null
};
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-dev-overlay-error-boundary.js.map
}}),
"[project]/node_modules/next/dist/client/react-client-callbacks/error-boundary-callbacks.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// This file is only used in app router due to the specific error state handling.
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
onCaughtError: null,
onUncaughtError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
onCaughtError: function() {
return onCaughtError;
},
onUncaughtError: function() {
return onUncaughtError;
}
});
const _stitchederror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/stitched-error.js [app-client] (ecmascript)");
const _useerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/use-error-handler.js [app-client] (ecmascript)");
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-client] (ecmascript)");
const _reportglobalerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/react-client-callbacks/report-global-error.js [app-client] (ecmascript)");
const _interceptconsoleerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/globals/intercept-console-error.js [app-client] (ecmascript)");
const _errorboundary = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/error-boundary.js [app-client] (ecmascript)");
function onCaughtError(err, errorInfo) {
var _errorInfo_errorBoundary;
const errorBoundaryComponent = (_errorInfo_errorBoundary = errorInfo.errorBoundary) == null ? void 0 : _errorInfo_errorBoundary.constructor;
let isImplicitErrorBoundary;
if ("TURBOPACK compile-time truthy", 1) {
const { AppDevOverlayErrorBoundary } = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/app/app-dev-overlay-error-boundary.js [app-client] (ecmascript)");
isImplicitErrorBoundary = errorBoundaryComponent === AppDevOverlayErrorBoundary;
}
isImplicitErrorBoundary = isImplicitErrorBoundary || errorBoundaryComponent === _errorboundary.ErrorBoundaryHandler && errorInfo.errorBoundary.props.errorComponent === _errorboundary.GlobalError;
if (isImplicitErrorBoundary) {
// We don't consider errors caught unless they're caught by an explicit error
// boundary. The built-in ones are considered implicit.
// This mimics how the same app would behave without Next.js.
return onUncaughtError(err, errorInfo);
}
// Skip certain custom errors which are not expected to be reported on client
if ((0, _bailouttocsr.isBailoutToCSRError)(err) || (0, _isnextroutererror.isNextRouterError)(err)) return;
if ("TURBOPACK compile-time truthy", 1) {
var _errorInfo_componentStack;
const errorBoundaryName = (errorBoundaryComponent == null ? void 0 : errorBoundaryComponent.displayName) || (errorBoundaryComponent == null ? void 0 : errorBoundaryComponent.name) || 'Unknown';
const componentThatErroredFrame = errorInfo == null ? void 0 : (_errorInfo_componentStack = errorInfo.componentStack) == null ? void 0 : _errorInfo_componentStack.split('\n')[1];
var // example 1: at Page (http://localhost:3000/_next/static/chunks/pages/index.js?ts=1631600000000:2:1)
// example 2: Page@http://localhost:3000/_next/static/chunks/pages/index.js?ts=1631600000000:2:1
_componentThatErroredFrame_match;
// Match chrome or safari stack trace
const matches = (_componentThatErroredFrame_match = componentThatErroredFrame == null ? void 0 : componentThatErroredFrame.match(/\s+at (\w+)\s+|(\w+)@/)) != null ? _componentThatErroredFrame_match : [];
const componentThatErroredName = matches[1] || matches[2] || 'Unknown';
// Create error location with errored component and error boundary, to match the behavior of default React onCaughtError handler.
const errorBoundaryMessage = "It was handled by the <" + errorBoundaryName + "> error boundary.";
const componentErrorMessage = ("TURBOPACK compile-time truthy", 1) ? "The above error occurred in the <" + componentThatErroredName + "> component." : ("TURBOPACK unreachable", undefined);
const errorLocation = componentErrorMessage + " " + errorBoundaryMessage;
const stitchedError = (0, _stitchederror.getReactStitchedError)(err);
// TODO: change to passing down errorInfo later
// In development mode, pass along the component stack to the error
if (errorInfo.componentStack) {
;
stitchedError._componentStack = errorInfo.componentStack;
}
// Log and report the error with location but without modifying the error stack
(0, _interceptconsoleerror.originConsoleError)('%o\n\n%s', err, errorLocation);
(0, _useerrorhandler.handleClientError)(stitchedError);
} else {
"TURBOPACK unreachable";
}
}
function onUncaughtError(err, errorInfo) {
// Skip certain custom errors which are not expected to be reported on client
if ((0, _bailouttocsr.isBailoutToCSRError)(err) || (0, _isnextroutererror.isNextRouterError)(err)) return;
if ("TURBOPACK compile-time truthy", 1) {
const stitchedError = (0, _stitchederror.getReactStitchedError)(err);
// TODO: change to passing down errorInfo later
// In development mode, pass along the component stack to the error
if (errorInfo.componentStack) {
;
stitchedError._componentStack = errorInfo.componentStack;
}
// TODO: Add an adendum to the overlay telling people about custom error boundaries.
(0, _reportglobalerror.reportGlobalError)(stitchedError);
} else {
"TURBOPACK unreachable";
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-boundary-callbacks.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ACTION_HMR_REFRESH: null,
ACTION_NAVIGATE: null,
ACTION_PREFETCH: null,
ACTION_REFRESH: null,
ACTION_RESTORE: null,
ACTION_SERVER_ACTION: null,
ACTION_SERVER_PATCH: null,
PrefetchCacheEntryStatus: null,
PrefetchKind: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ACTION_HMR_REFRESH: function() {
return ACTION_HMR_REFRESH;
},
ACTION_NAVIGATE: function() {
return ACTION_NAVIGATE;
},
ACTION_PREFETCH: function() {
return ACTION_PREFETCH;
},
ACTION_REFRESH: function() {
return ACTION_REFRESH;
},
ACTION_RESTORE: function() {
return ACTION_RESTORE;
},
ACTION_SERVER_ACTION: function() {
return ACTION_SERVER_ACTION;
},
ACTION_SERVER_PATCH: function() {
return ACTION_SERVER_PATCH;
},
PrefetchCacheEntryStatus: function() {
return PrefetchCacheEntryStatus;
},
PrefetchKind: function() {
return PrefetchKind;
}
});
const ACTION_REFRESH = 'refresh';
const ACTION_NAVIGATE = 'navigate';
const ACTION_RESTORE = 'restore';
const ACTION_SERVER_PATCH = 'server-patch';
const ACTION_PREFETCH = 'prefetch';
const ACTION_HMR_REFRESH = 'hmr-refresh';
const ACTION_SERVER_ACTION = 'server-action';
var PrefetchKind = /*#__PURE__*/ function(PrefetchKind) {
PrefetchKind["AUTO"] = "auto";
PrefetchKind["FULL"] = "full";
PrefetchKind["TEMPORARY"] = "temporary";
return PrefetchKind;
}({});
var PrefetchCacheEntryStatus = /*#__PURE__*/ function(PrefetchCacheEntryStatus) {
PrefetchCacheEntryStatus["fresh"] = "fresh";
PrefetchCacheEntryStatus["reusable"] = "reusable";
PrefetchCacheEntryStatus["expired"] = "expired";
PrefetchCacheEntryStatus["stale"] = "stale";
return PrefetchCacheEntryStatus;
}({});
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=router-reducer-types.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/dev-indicator/dev-render-indicator.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/*
* Singleton store to track whether the app is currently being rendered
* Used by the dev tools indicator to show render status
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
devRenderIndicator: null,
useIsDevRendering: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
devRenderIndicator: function() {
return devRenderIndicator;
},
useIsDevRendering: function() {
return useIsDevRendering;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
let isVisible = false;
let listeners = [];
const subscribe = (listener)=>{
listeners.push(listener);
return ()=>{
listeners = listeners.filter((l)=>l !== listener);
};
};
const getSnapshot = ()=>isVisible;
const show = ()=>{
isVisible = true;
listeners.forEach((listener)=>listener());
};
const hide = ()=>{
isVisible = false;
listeners.forEach((listener)=>listener());
};
function useIsDevRendering() {
return (0, _react.useSyncExternalStore)(subscribe, getSnapshot);
}
const devRenderIndicator = {
show,
hide
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dev-render-indicator.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/dev-indicator/use-sync-dev-render-indicator.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useSyncDevRenderIndicator", {
enumerable: true,
get: function() {
return useSyncDevRenderIndicator;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _devrenderindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/dev-indicator/dev-render-indicator.js [app-client] (ecmascript)");
const useSyncDevRenderIndicator = ()=>{
const [isPending, startTransition] = (0, _react.useTransition)();
(0, _react.useEffect)(()=>{
if (isPending) {
_devrenderindicator.devRenderIndicator.show();
} else {
_devrenderindicator.devRenderIndicator.hide();
}
}, [
isPending
]);
return startTransition;
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-sync-dev-render-indicator.js.map
}}),
"[project]/node_modules/next/dist/client/components/use-action-queue.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
dispatchAppRouterAction: null,
useActionQueue: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dispatchAppRouterAction: function() {
return dispatchAppRouterAction;
},
useActionQueue: function() {
return useActionQueue;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _isthenable = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/is-thenable.js [app-client] (ecmascript)");
// The app router state lives outside of React, so we can import the dispatch
// method directly wherever we need it, rather than passing it around via props
// or context.
let dispatch = null;
function dispatchAppRouterAction(action) {
if (dispatch === null) {
throw Object.defineProperty(new Error('Internal Next.js error: Router action dispatched before initialization.'), "__NEXT_ERROR_CODE", {
value: "E668",
enumerable: false,
configurable: true
});
}
dispatch(action);
}
function useActionQueue(actionQueue) {
const [state, setState] = _react.default.useState(actionQueue.state);
// Because of a known issue that requires to decode Flight streams inside the
// render phase, we have to be a bit clever and assign the dispatch method to
// a module-level variable upon initialization. The useState hook in this
// module only exists to synchronize state that lives outside of React.
// Ideally, what we'd do instead is pass the state as a prop to root.render;
// this is conceptually how we're modeling the app router state, despite the
// weird implementation details.
if ("TURBOPACK compile-time truthy", 1) {
const useSyncDevRenderIndicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/dev-indicator/use-sync-dev-render-indicator.js [app-client] (ecmascript)").useSyncDevRenderIndicator;
// eslint-disable-next-line react-hooks/rules-of-hooks
const syncDevRenderIndicator = useSyncDevRenderIndicator();
dispatch = (action)=>{
syncDevRenderIndicator(()=>{
actionQueue.dispatch(action, setState);
});
};
} else {
"TURBOPACK unreachable";
}
return (0, _isthenable.isThenable)(state) ? (0, _react.use)(state) : state;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-action-queue.js.map
}}),
"[project]/node_modules/next/dist/client/app-call-server.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "callServer", {
enumerable: true,
get: function() {
return callServer;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _useactionqueue = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/use-action-queue.js [app-client] (ecmascript)");
async function callServer(actionId, actionArgs) {
return new Promise((resolve, reject)=>{
(0, _react.startTransition)(()=>{
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_SERVER_ACTION,
actionId,
actionArgs,
resolve,
reject
});
});
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-call-server.js.map
}}),
"[project]/node_modules/next/dist/client/app-find-source-map-url.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "findSourceMapURL", {
enumerable: true,
get: function() {
return findSourceMapURL;
}
});
const basePath = ("TURBOPACK compile-time value", "") || '';
const pathname = "" + basePath + "/__nextjs_source-map";
const findSourceMapURL = ("TURBOPACK compile-time truthy", 1) ? function findSourceMapURL(filename) {
if (filename === '') {
return null;
}
if (filename.startsWith(document.location.origin) && filename.includes('/_next/static')) {
// This is a request for a client chunk. This can only happen when
// using Turbopack. In this case, since we control how those source
// maps are generated, we can safely assume that the sourceMappingURL
// is relative to the filename, with an added `.map` extension. The
// browser can just request this file, and it gets served through the
// normal dev server, without the need to route this through
// the `/__nextjs_source-map` dev middleware.
return "" + filename + ".map";
}
const url = new URL(pathname, document.location.origin);
url.searchParams.set('filename', filename);
return url.href;
} : ("TURBOPACK unreachable", undefined);
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-find-source-map-url.js.map
}}),
"[project]/node_modules/next/dist/client/components/app-router-headers.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ACTION_HEADER: null,
FLIGHT_HEADERS: null,
NEXT_DID_POSTPONE_HEADER: null,
NEXT_HMR_REFRESH_HASH_COOKIE: null,
NEXT_HMR_REFRESH_HEADER: null,
NEXT_IS_PRERENDER_HEADER: null,
NEXT_REWRITTEN_PATH_HEADER: null,
NEXT_REWRITTEN_QUERY_HEADER: null,
NEXT_ROUTER_PREFETCH_HEADER: null,
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: null,
NEXT_ROUTER_STALE_TIME_HEADER: null,
NEXT_ROUTER_STATE_TREE_HEADER: null,
NEXT_RSC_UNION_QUERY: null,
NEXT_URL: null,
RSC_CONTENT_TYPE_HEADER: null,
RSC_HEADER: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ACTION_HEADER: function() {
return ACTION_HEADER;
},
FLIGHT_HEADERS: function() {
return FLIGHT_HEADERS;
},
NEXT_DID_POSTPONE_HEADER: function() {
return NEXT_DID_POSTPONE_HEADER;
},
NEXT_HMR_REFRESH_HASH_COOKIE: function() {
return NEXT_HMR_REFRESH_HASH_COOKIE;
},
NEXT_HMR_REFRESH_HEADER: function() {
return NEXT_HMR_REFRESH_HEADER;
},
NEXT_IS_PRERENDER_HEADER: function() {
return NEXT_IS_PRERENDER_HEADER;
},
NEXT_REWRITTEN_PATH_HEADER: function() {
return NEXT_REWRITTEN_PATH_HEADER;
},
NEXT_REWRITTEN_QUERY_HEADER: function() {
return NEXT_REWRITTEN_QUERY_HEADER;
},
NEXT_ROUTER_PREFETCH_HEADER: function() {
return NEXT_ROUTER_PREFETCH_HEADER;
},
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: function() {
return NEXT_ROUTER_SEGMENT_PREFETCH_HEADER;
},
NEXT_ROUTER_STALE_TIME_HEADER: function() {
return NEXT_ROUTER_STALE_TIME_HEADER;
},
NEXT_ROUTER_STATE_TREE_HEADER: function() {
return NEXT_ROUTER_STATE_TREE_HEADER;
},
NEXT_RSC_UNION_QUERY: function() {
return NEXT_RSC_UNION_QUERY;
},
NEXT_URL: function() {
return NEXT_URL;
},
RSC_CONTENT_TYPE_HEADER: function() {
return RSC_CONTENT_TYPE_HEADER;
},
RSC_HEADER: function() {
return RSC_HEADER;
}
});
const RSC_HEADER = 'RSC';
const ACTION_HEADER = 'Next-Action';
const NEXT_ROUTER_STATE_TREE_HEADER = 'Next-Router-State-Tree';
const NEXT_ROUTER_PREFETCH_HEADER = 'Next-Router-Prefetch';
const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'Next-Router-Segment-Prefetch';
const NEXT_HMR_REFRESH_HEADER = 'Next-HMR-Refresh';
const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
const NEXT_URL = 'Next-Url';
const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
const FLIGHT_HEADERS = [
RSC_HEADER,
NEXT_ROUTER_STATE_TREE_HEADER,
NEXT_ROUTER_PREFETCH_HEADER,
NEXT_HMR_REFRESH_HEADER,
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER
];
const NEXT_RSC_UNION_QUERY = '_rsc';
const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time';
const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed';
const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';
const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';
const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-router-headers.js.map
}}),
"[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getFlightDataPartsFromPath: null,
getNextFlightSegmentPath: null,
normalizeFlightData: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getFlightDataPartsFromPath: function() {
return getFlightDataPartsFromPath;
},
getNextFlightSegmentPath: function() {
return getNextFlightSegmentPath;
},
normalizeFlightData: function() {
return normalizeFlightData;
}
});
function getFlightDataPartsFromPath(flightDataPath) {
// Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial].
const flightDataPathLength = 4;
// tree, seedData, and head are *always* the last three items in the `FlightDataPath`.
const [tree, seedData, head, isHeadPartial] = flightDataPath.slice(-flightDataPathLength);
// The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present.
const segmentPath = flightDataPath.slice(0, -flightDataPathLength);
var _segmentPath_;
return {
// TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment ("")
// to the start of the segment path in some places which makes it hard to use solely the segment path.
// Look for "// TODO-APP: remove ''" in the codebase.
pathToSegment: segmentPath.slice(0, -1),
segmentPath,
// if the `FlightDataPath` corresponds with the root, there'll be no segment path,
// in which case we default to ''.
segment: (_segmentPath_ = segmentPath[segmentPath.length - 1]) != null ? _segmentPath_ : '',
tree,
seedData,
head,
isHeadPartial,
isRootRender: flightDataPath.length === flightDataPathLength
};
}
function getNextFlightSegmentPath(flightSegmentPath) {
// Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items
// to get the next segment path.
return flightSegmentPath.slice(2);
}
function normalizeFlightData(flightData) {
// FlightData can be a string when the server didn't respond with a proper flight response,
// or when a redirect happens, to signal to the client that it needs to perform an MPA navigation.
if (typeof flightData === 'string') {
return flightData;
}
return flightData.map(getFlightDataPartsFromPath);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=flight-data-helpers.js.map
}}),
"[project]/node_modules/next/dist/client/app-build-id.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// This gets assigned as a side-effect during app initialization. Because it
// represents the build used to create the JS bundle, it should never change
// after being set, so we store it in a global variable.
//
// When performing RSC requests, if the incoming data has a different build ID,
// we perform an MPA navigation/refresh to load the updated build and ensure
// that the client and server in sync.
// Starts as an empty string. In practice, because setAppBuildId is called
// during initialization before hydration starts, this will always get
// reassigned to the actual build ID before it's ever needed by a navigation.
// If for some reasons it didn't, due to a bug or race condition, then on
// navigation the build comparision would fail and trigger an MPA navigation.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getAppBuildId: null,
setAppBuildId: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getAppBuildId: function() {
return getAppBuildId;
},
setAppBuildId: function() {
return setAppBuildId;
}
});
let globalBuildId = '';
function setAppBuildId(buildId) {
globalBuildId = buildId;
}
function getAppBuildId() {
return globalBuildId;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-build-id.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "setCacheBustingSearchParam", {
enumerable: true,
get: function() {
return setCacheBustingSearchParam;
}
});
const _hash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/hash.js [app-client] (ecmascript)");
const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-client] (ecmascript)");
const setCacheBustingSearchParam = (url, headers)=>{
const uniqueCacheKey = (0, _hash.hexHash)([
headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] || '0',
headers[_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER] || '0',
headers[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER],
headers[_approuterheaders.NEXT_URL]
].join(','));
/**
* Note that we intentionally do not use `url.searchParams.set` here:
*
* const url = new URL('https://example.com/search?q=custom%20spacing');
* url.searchParams.set('_rsc', 'abc123');
* console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123
* ^ <--- this is causing confusion
* This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but
* we want to preserve the %20 as %20 if that's what the user passed in, hence the custom
* logic below.
*/ const existingSearch = url.search;
const rawQuery = existingSearch.startsWith('?') ? existingSearch.slice(1) : existingSearch;
const pairs = rawQuery.split('&').filter(Boolean);
pairs.push(_approuterheaders.NEXT_RSC_UNION_QUERY + "=" + uniqueCacheKey);
url.search = pairs.length ? "?" + pairs.join('&') : '';
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=set-cache-busting-search-param.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
createFetch: null,
createFromNextReadableStream: null,
fetchServerResponse: null,
urlToUrlWithoutFlightMarker: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
createFetch: function() {
return createFetch;
},
createFromNextReadableStream: function() {
return createFromNextReadableStream;
},
fetchServerResponse: function() {
return fetchServerResponse;
},
urlToUrlWithoutFlightMarker: function() {
return urlToUrlWithoutFlightMarker;
}
});
const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-client] (ecmascript)");
const _appcallserver = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-call-server.js [app-client] (ecmascript)");
const _appfindsourcemapurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-find-source-map-url.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
const _appbuildid = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-build-id.js [app-client] (ecmascript)");
const _setcachebustingsearchparam = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js [app-client] (ecmascript)");
// @ts-ignore
// eslint-disable-next-line import/no-extraneous-dependencies
// import { createFromReadableStream } from 'react-server-dom-webpack/client'
const { createFromReadableStream } = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react-server-dom-turbopack/client.js [app-client] (ecmascript)");
function urlToUrlWithoutFlightMarker(url) {
const urlWithoutFlightParameters = new URL(url, location.origin);
urlWithoutFlightParameters.searchParams.delete(_approuterheaders.NEXT_RSC_UNION_QUERY);
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return urlWithoutFlightParameters;
}
function doMpaNavigation(url) {
return {
flightData: urlToUrlWithoutFlightMarker(url).toString(),
canonicalUrl: undefined,
couldBeIntercepted: false,
prerendered: false,
postponed: false,
staleTime: -1
};
}
let abortController = new AbortController();
if (typeof window !== 'undefined') {
// Abort any in-flight requests when the page is unloaded, e.g. due to
// reloading the page or performing hard navigations. This allows us to ignore
// what would otherwise be a thrown TypeError when the browser cancels the
// requests.
window.addEventListener('pagehide', ()=>{
abortController.abort();
});
// Use a fresh AbortController instance on pageshow, e.g. when navigating back
// and the JavaScript execution context is restored by the browser.
window.addEventListener('pageshow', ()=>{
abortController = new AbortController();
});
}
async function fetchServerResponse(url, options) {
const { flightRouterState, nextUrl, prefetchKind } = options;
const headers = {
// Enable flight response
[_approuterheaders.RSC_HEADER]: '1',
// Provide the current router state
[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER]: encodeURIComponent(JSON.stringify(flightRouterState))
};
/**
* Three cases:
* - `prefetchKind` is `undefined`, it means it's a normal navigation, so we want to prefetch the page data fully
* - `prefetchKind` is `full` - we want to prefetch the whole page so same as above
* - `prefetchKind` is `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully
*/ if (prefetchKind === _routerreducertypes.PrefetchKind.AUTO) {
headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] = '1';
}
if (("TURBOPACK compile-time value", "development") === 'development' && options.isHmrRefresh) {
headers[_approuterheaders.NEXT_HMR_REFRESH_HEADER] = '1';
}
if (nextUrl) {
headers[_approuterheaders.NEXT_URL] = nextUrl;
}
try {
var _res_headers_get;
// When creating a "temporary" prefetch (the "on-demand" prefetch that gets created on navigation, if one doesn't exist)
// we send the request with a "high" priority as it's in response to a user interaction that could be blocking a transition.
// Otherwise, all other prefetches are sent with a "low" priority.
// We use "auto" for in all other cases to match the existing default, as this function is shared outside of prefetching.
const fetchPriority = prefetchKind ? prefetchKind === _routerreducertypes.PrefetchKind.TEMPORARY ? 'high' : 'low' : 'auto';
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
const res = await createFetch(url, headers, fetchPriority, abortController.signal);
const responseUrl = urlToUrlWithoutFlightMarker(res.url);
const canonicalUrl = res.redirected ? responseUrl : undefined;
const contentType = res.headers.get('content-type') || '';
const interception = !!((_res_headers_get = res.headers.get('vary')) == null ? void 0 : _res_headers_get.includes(_approuterheaders.NEXT_URL));
const postponed = !!res.headers.get(_approuterheaders.NEXT_DID_POSTPONE_HEADER);
const staleTimeHeaderSeconds = res.headers.get(_approuterheaders.NEXT_ROUTER_STALE_TIME_HEADER);
const staleTime = staleTimeHeaderSeconds !== null ? parseInt(staleTimeHeaderSeconds, 10) * 1000 : -1;
let isFlightResponse = contentType.startsWith(_approuterheaders.RSC_CONTENT_TYPE_HEADER);
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
// If fetch returns something different than flight response handle it like a mpa navigation
// If the fetch was not 200, we also handle it like a mpa navigation
if (!isFlightResponse || !res.ok || !res.body) {
// in case the original URL came with a hash, preserve it before redirecting to the new URL
if (url.hash) {
responseUrl.hash = url.hash;
}
return doMpaNavigation(responseUrl.toString());
}
// We may navigate to a page that requires a different Webpack runtime.
// In prod, every page will have the same Webpack runtime.
// In dev, the Webpack runtime is minimal for each page.
// We need to ensure the Webpack runtime is updated before executing client-side JS of the new page.
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
// Handle the `fetch` readable stream that can be unwrapped by `React.use`.
const flightStream = postponed ? createUnclosingPrefetchStream(res.body) : res.body;
const response = await createFromNextReadableStream(flightStream);
if ((0, _appbuildid.getAppBuildId)() !== response.b) {
return doMpaNavigation(res.url);
}
return {
flightData: (0, _flightdatahelpers.normalizeFlightData)(response.f),
canonicalUrl: canonicalUrl,
couldBeIntercepted: interception,
prerendered: response.S,
postponed,
staleTime
};
} catch (err) {
if (!abortController.signal.aborted) {
console.error("Failed to fetch RSC payload for " + url + ". Falling back to browser navigation.", err);
}
// If fetch fails handle it like a mpa navigation
// TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response.
// See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction.
return {
flightData: url.toString(),
canonicalUrl: undefined,
couldBeIntercepted: false,
prerendered: false,
postponed: false,
staleTime: -1
};
}
}
function createFetch(url, headers, fetchPriority, signal) {
const fetchUrl = new URL(url);
// TODO: In output: "export" mode, the headers do nothing. Omit them (and the
// cache busting search param) from the request so they're
// maximally cacheable.
(0, _setcachebustingsearchparam.setCacheBustingSearchParam)(fetchUrl, headers);
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return fetch(fetchUrl, {
// Backwards compat for older browsers. `same-origin` is the default in modern browsers.
credentials: 'same-origin',
headers,
priority: fetchPriority || undefined,
signal
});
}
function createFromNextReadableStream(flightStream) {
return createFromReadableStream(flightStream, {
callServer: _appcallserver.callServer,
findSourceMapURL: _appfindsourcemapurl.findSourceMapURL
});
}
function createUnclosingPrefetchStream(originalFlightStream) {
// When PPR is enabled, prefetch streams may contain references that never
// resolve, because that's how we encode dynamic data access. In the decoded
// object returned by the Flight client, these are reified into hanging
// promises that suspend during render, which is effectively what we want.
// The UI resolves when it switches to the dynamic data stream
// (via useDeferredValue(dynamic, static)).
//
// However, the Flight implementation currently errors if the server closes
// the response before all the references are resolved. As a cheat to work
// around this, we wrap the original stream in a new stream that never closes,
// and therefore doesn't error.
const reader = originalFlightStream.getReader();
return new ReadableStream({
async pull (controller) {
while(true){
const { done, value } = await reader.read();
if (!done) {
// Pass to the target stream and keep consuming the Flight response
// from the server.
controller.enqueue(value);
continue;
}
// The server stream has closed. Exit, but intentionally do not close
// the target stream.
return;
}
}
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=fetch-server-response.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createRouterCacheKey", {
enumerable: true,
get: function() {
return createRouterCacheKey;
}
});
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
function createRouterCacheKey(segment, withoutSearchParameters) {
if (withoutSearchParameters === void 0) withoutSearchParameters = false;
// if the segment is an array, it means it's a dynamic segment
// for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.
if (Array.isArray(segment)) {
return segment[0] + "|" + segment[1] + "|" + segment[2];
}
// Page segments might have search parameters, ie __PAGE__?foo=bar
// When `withoutSearchParameters` is true, we only want to return the page segment
if (withoutSearchParameters && segment.startsWith(_segment.PAGE_SEGMENT_KEY)) {
return _segment.PAGE_SEGMENT_KEY;
}
return segment;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=create-router-cache-key.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "invalidateCacheBelowFlightSegmentPath", {
enumerable: true,
get: function() {
return invalidateCacheBelowFlightSegmentPath;
}
});
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
function invalidateCacheBelowFlightSegmentPath(newCache, existingCache, flightSegmentPath) {
const isLastEntry = flightSegmentPath.length <= 2;
const [parallelRouteKey, segment] = flightSegmentPath;
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);
const existingChildSegmentMap = existingCache.parallelRoutes.get(parallelRouteKey);
if (!existingChildSegmentMap) {
// Bailout because the existing cache does not have the path to the leaf node
// Will trigger lazy fetch in layout-router because of missing segment
return;
}
let childSegmentMap = newCache.parallelRoutes.get(parallelRouteKey);
if (!childSegmentMap || childSegmentMap === existingChildSegmentMap) {
childSegmentMap = new Map(existingChildSegmentMap);
newCache.parallelRoutes.set(parallelRouteKey, childSegmentMap);
}
// In case of last entry don't copy further down.
if (isLastEntry) {
childSegmentMap.delete(cacheKey);
return;
}
const existingChildCacheNode = existingChildSegmentMap.get(cacheKey);
let childCacheNode = childSegmentMap.get(cacheKey);
if (!childCacheNode || !existingChildCacheNode) {
// Bailout because the existing cache does not have the path to the leaf node
// Will trigger lazy fetch in layout-router because of missing segment
return;
}
if (childCacheNode === existingChildCacheNode) {
childCacheNode = {
lazyData: childCacheNode.lazyData,
rsc: childCacheNode.rsc,
prefetchRsc: childCacheNode.prefetchRsc,
head: childCacheNode.head,
prefetchHead: childCacheNode.prefetchHead,
parallelRoutes: new Map(childCacheNode.parallelRoutes)
};
childSegmentMap.set(cacheKey, childCacheNode);
}
invalidateCacheBelowFlightSegmentPath(childCacheNode, existingChildCacheNode, (0, _flightdatahelpers.getNextFlightSegmentPath)(flightSegmentPath));
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=invalidate-cache-below-flight-segmentpath.js.map
}}),
"[project]/node_modules/next/dist/client/components/match-segments.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "matchSegment", {
enumerable: true,
get: function() {
return matchSegment;
}
});
const matchSegment = (existingSegment, segment)=>{
// segment is either Array or string
if (typeof existingSegment === 'string') {
if (typeof segment === 'string') {
// Common case: segment is just a string
return existingSegment === segment;
}
return false;
}
if (typeof segment === 'string') {
return false;
}
return existingSegment[0] === segment[0] && existingSegment[1] === segment[1];
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=match-segments.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "fillLazyItemsTillLeafWithHead", {
enumerable: true,
get: function() {
return fillLazyItemsTillLeafWithHead;
}
});
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
function fillLazyItemsTillLeafWithHead(navigatedAt, newCache, existingCache, routerState, cacheNodeSeedData, head, prefetchEntry) {
const isLastSegment = Object.keys(routerState[1]).length === 0;
if (isLastSegment) {
newCache.head = head;
return;
}
// Remove segment that we got data for so that it is filled in during rendering of rsc.
for(const key in routerState[1]){
const parallelRouteState = routerState[1][key];
const segmentForParallelRoute = parallelRouteState[0];
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segmentForParallelRoute);
// TODO: We should traverse the cacheNodeSeedData tree instead of the router
// state tree. Ideally, they would always be the same shape, but because of
// the loading.js pattern, cacheNodeSeedData sometimes only represents a
// partial tree. That's why this node is sometimes null. Once PPR lands,
// loading.js will no longer have special behavior and we can traverse the
// data tree instead.
//
// We should also consider merging the router state tree and the data tree
// in the response format, so that we don't have to send the keys twice.
// Then the client can convert them into separate representations.
const parallelSeedData = cacheNodeSeedData !== null && cacheNodeSeedData[2][key] !== undefined ? cacheNodeSeedData[2][key] : null;
if (existingCache) {
const existingParallelRoutesCacheNode = existingCache.parallelRoutes.get(key);
if (existingParallelRoutesCacheNode) {
const hasReusablePrefetch = (prefetchEntry == null ? void 0 : prefetchEntry.kind) === 'auto' && prefetchEntry.status === _routerreducertypes.PrefetchCacheEntryStatus.reusable;
let parallelRouteCacheNode = new Map(existingParallelRoutesCacheNode);
const existingCacheNode = parallelRouteCacheNode.get(cacheKey);
let newCacheNode;
if (parallelSeedData !== null) {
// New data was sent from the server.
const seedNode = parallelSeedData[1];
const loading = parallelSeedData[3];
newCacheNode = {
lazyData: null,
rsc: seedNode,
// This is a PPR-only field. When PPR is enabled, we shouldn't hit
// this path during a navigation, but until PPR is fully implemented
// yet it's possible the existing node does have a non-null
// `prefetchRsc`. As an incremental step, we'll just de-opt to the
// old behavior — no PPR value.
prefetchRsc: null,
head: null,
prefetchHead: null,
loading,
parallelRoutes: new Map(existingCacheNode == null ? void 0 : existingCacheNode.parallelRoutes),
navigatedAt
};
} else if (hasReusablePrefetch && existingCacheNode) {
// No new data was sent from the server, but the existing cache node
// was prefetched, so we should reuse that.
newCacheNode = {
lazyData: existingCacheNode.lazyData,
rsc: existingCacheNode.rsc,
// This is a PPR-only field. Unlike the previous branch, since we're
// just cloning the existing cache node, we might as well keep the
// PPR value, if it exists.
prefetchRsc: existingCacheNode.prefetchRsc,
head: existingCacheNode.head,
prefetchHead: existingCacheNode.prefetchHead,
parallelRoutes: new Map(existingCacheNode.parallelRoutes),
loading: existingCacheNode.loading
};
} else {
// No data available for this node. This will trigger a lazy fetch
// during render.
newCacheNode = {
lazyData: null,
rsc: null,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(existingCacheNode == null ? void 0 : existingCacheNode.parallelRoutes),
loading: null,
navigatedAt
};
}
// Overrides the cache key with the new cache node.
parallelRouteCacheNode.set(cacheKey, newCacheNode);
// Traverse deeper to apply the head / fill lazy items till the head.
fillLazyItemsTillLeafWithHead(navigatedAt, newCacheNode, existingCacheNode, parallelRouteState, parallelSeedData ? parallelSeedData : null, head, prefetchEntry);
newCache.parallelRoutes.set(key, parallelRouteCacheNode);
continue;
}
}
let newCacheNode;
if (parallelSeedData !== null) {
// New data was sent from the server.
const seedNode = parallelSeedData[1];
const loading = parallelSeedData[3];
newCacheNode = {
lazyData: null,
rsc: seedNode,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading,
navigatedAt
};
} else {
// No data available for this node. This will trigger a lazy fetch
// during render.
newCacheNode = {
lazyData: null,
rsc: null,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading: null,
navigatedAt
};
}
const existingParallelRoutes = newCache.parallelRoutes.get(key);
if (existingParallelRoutes) {
existingParallelRoutes.set(cacheKey, newCacheNode);
} else {
newCache.parallelRoutes.set(key, new Map([
[
cacheKey,
newCacheNode
]
]));
}
fillLazyItemsTillLeafWithHead(navigatedAt, newCacheNode, undefined, parallelRouteState, parallelSeedData, head, prefetchEntry);
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=fill-lazy-items-till-leaf-with-head.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "invalidateCacheByRouterState", {
enumerable: true,
get: function() {
return invalidateCacheByRouterState;
}
});
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
function invalidateCacheByRouterState(newCache, existingCache, routerState) {
// Remove segment that we got data for so that it is filled in during rendering of rsc.
for(const key in routerState[1]){
const segmentForParallelRoute = routerState[1][key][0];
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segmentForParallelRoute);
const existingParallelRoutesCacheNode = existingCache.parallelRoutes.get(key);
if (existingParallelRoutesCacheNode) {
let parallelRouteCacheNode = new Map(existingParallelRoutesCacheNode);
parallelRouteCacheNode.delete(cacheKey);
newCache.parallelRoutes.set(key, parallelRouteCacheNode);
}
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=invalidate-cache-by-router-state.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
fillCacheWithNewSubTreeData: null,
fillCacheWithNewSubTreeDataButOnlyLoading: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
fillCacheWithNewSubTreeData: function() {
return fillCacheWithNewSubTreeData;
},
fillCacheWithNewSubTreeDataButOnlyLoading: function() {
return fillCacheWithNewSubTreeDataButOnlyLoading;
}
});
const _invalidatecachebyrouterstate = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js [app-client] (ecmascript)");
const _filllazyitemstillleafwithhead = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js [app-client] (ecmascript)");
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
/**
* Common logic for filling cache with new sub tree data.
*/ function fillCacheHelper(navigatedAt, newCache, existingCache, flightData, prefetchEntry, fillLazyItems) {
const { segmentPath, seedData: cacheNodeSeedData, tree: treePatch, head } = flightData;
let newCacheNode = newCache;
let existingCacheNode = existingCache;
for(let i = 0; i < segmentPath.length; i += 2){
const parallelRouteKey = segmentPath[i];
const segment = segmentPath[i + 1];
// segmentPath is a repeating tuple of parallelRouteKey and segment
// we know we've hit the last entry we've reached our final pair
const isLastEntry = i === segmentPath.length - 2;
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);
const existingChildSegmentMap = existingCacheNode.parallelRoutes.get(parallelRouteKey);
if (!existingChildSegmentMap) {
continue;
}
let childSegmentMap = newCacheNode.parallelRoutes.get(parallelRouteKey);
if (!childSegmentMap || childSegmentMap === existingChildSegmentMap) {
childSegmentMap = new Map(existingChildSegmentMap);
newCacheNode.parallelRoutes.set(parallelRouteKey, childSegmentMap);
}
const existingChildCacheNode = existingChildSegmentMap.get(cacheKey);
let childCacheNode = childSegmentMap.get(cacheKey);
if (isLastEntry) {
if (cacheNodeSeedData && (!childCacheNode || !childCacheNode.lazyData || childCacheNode === existingChildCacheNode)) {
const incomingSegment = cacheNodeSeedData[0];
const rsc = cacheNodeSeedData[1];
const loading = cacheNodeSeedData[3];
childCacheNode = {
lazyData: null,
// When `fillLazyItems` is false, we only want to fill the RSC data for the layout,
// not the page segment.
rsc: fillLazyItems || incomingSegment !== _segment.PAGE_SEGMENT_KEY ? rsc : null,
prefetchRsc: null,
head: null,
prefetchHead: null,
loading,
parallelRoutes: fillLazyItems && existingChildCacheNode ? new Map(existingChildCacheNode.parallelRoutes) : new Map(),
navigatedAt
};
if (existingChildCacheNode && fillLazyItems) {
(0, _invalidatecachebyrouterstate.invalidateCacheByRouterState)(childCacheNode, existingChildCacheNode, treePatch);
}
if (fillLazyItems) {
(0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(navigatedAt, childCacheNode, existingChildCacheNode, treePatch, cacheNodeSeedData, head, prefetchEntry);
}
childSegmentMap.set(cacheKey, childCacheNode);
}
continue;
}
if (!childCacheNode || !existingChildCacheNode) {
continue;
}
if (childCacheNode === existingChildCacheNode) {
childCacheNode = {
lazyData: childCacheNode.lazyData,
rsc: childCacheNode.rsc,
prefetchRsc: childCacheNode.prefetchRsc,
head: childCacheNode.head,
prefetchHead: childCacheNode.prefetchHead,
parallelRoutes: new Map(childCacheNode.parallelRoutes),
loading: childCacheNode.loading
};
childSegmentMap.set(cacheKey, childCacheNode);
}
// Move deeper into the cache nodes
newCacheNode = childCacheNode;
existingCacheNode = existingChildCacheNode;
}
}
function fillCacheWithNewSubTreeData(navigatedAt, newCache, existingCache, flightData, prefetchEntry) {
fillCacheHelper(navigatedAt, newCache, existingCache, flightData, prefetchEntry, true);
}
function fillCacheWithNewSubTreeDataButOnlyLoading(navigatedAt, newCache, existingCache, flightData, prefetchEntry) {
fillCacheHelper(navigatedAt, newCache, existingCache, flightData, prefetchEntry, false);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=fill-cache-with-new-subtree-data.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "applyFlightData", {
enumerable: true,
get: function() {
return applyFlightData;
}
});
const _filllazyitemstillleafwithhead = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js [app-client] (ecmascript)");
const _fillcachewithnewsubtreedata = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js [app-client] (ecmascript)");
function applyFlightData(navigatedAt, existingCache, cache, flightData, prefetchEntry) {
// The one before last item is the router state tree patch
const { tree: treePatch, seedData, head, isRootRender } = flightData;
// Handles case where prefetch only returns the router tree patch without rendered components.
if (seedData === null) {
return false;
}
if (isRootRender) {
const rsc = seedData[1];
const loading = seedData[3];
cache.loading = loading;
cache.rsc = rsc;
// This is a PPR-only field. When PPR is enabled, we shouldn't hit
// this path during a navigation, but until PPR is fully implemented
// yet it's possible the existing node does have a non-null
// `prefetchRsc`. As an incremental step, we'll just de-opt to the
// old behavior — no PPR value.
cache.prefetchRsc = null;
(0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(navigatedAt, cache, existingCache, treePatch, seedData, head, prefetchEntry);
} else {
// Copy rsc for the root node of the cache.
cache.rsc = existingCache.rsc;
// This is a PPR-only field. Unlike the previous branch, since we're
// just cloning the existing cache node, we might as well keep the
// PPR value, if it exists.
cache.prefetchRsc = existingCache.prefetchRsc;
cache.parallelRoutes = new Map(existingCache.parallelRoutes);
cache.loading = existingCache.loading;
// Create a copy of the existing cache with the rsc applied.
(0, _fillcachewithnewsubtreedata.fillCacheWithNewSubTreeData)(navigatedAt, cache, existingCache, flightData, prefetchEntry);
}
return true;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=apply-flight-data.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
addRefreshMarkerToActiveParallelSegments: null,
refreshInactiveParallelSegments: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
addRefreshMarkerToActiveParallelSegments: function() {
return addRefreshMarkerToActiveParallelSegments;
},
refreshInactiveParallelSegments: function() {
return refreshInactiveParallelSegments;
}
});
const _applyflightdata = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js [app-client] (ecmascript)");
const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-client] (ecmascript)");
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
async function refreshInactiveParallelSegments(options) {
const fetchedSegments = new Set();
await refreshInactiveParallelSegmentsImpl({
...options,
rootTree: options.updatedTree,
fetchedSegments
});
}
async function refreshInactiveParallelSegmentsImpl(param) {
let { navigatedAt, state, updatedTree, updatedCache, includeNextUrl, fetchedSegments, rootTree = updatedTree, canonicalUrl } = param;
const [, parallelRoutes, refetchPath, refetchMarker] = updatedTree;
const fetchPromises = [];
if (refetchPath && refetchPath !== canonicalUrl && refetchMarker === 'refresh' && // it's possible for the tree to contain multiple segments that contain data at the same URL
// we keep track of them so we can dedupe the requests
!fetchedSegments.has(refetchPath)) {
fetchedSegments.add(refetchPath) // Mark this URL as fetched
;
// Eagerly kick off the fetch for the refetch path & the parallel routes. This should be fine to do as they each operate
// independently on their own cache nodes, and `applyFlightData` will copy anything it doesn't care about from the existing cache.
const fetchPromise = (0, _fetchserverresponse.fetchServerResponse)(new URL(refetchPath, location.origin), {
// refetch from the root of the updated tree, otherwise it will be scoped to the current segment
// and might not contain the data we need to patch in interception route data (such as dynamic params from a previous segment)
flightRouterState: [
rootTree[0],
rootTree[1],
rootTree[2],
'refetch'
],
nextUrl: includeNextUrl ? state.nextUrl : null
}).then((param)=>{
let { flightData } = param;
if (typeof flightData !== 'string') {
for (const flightDataPath of flightData){
// we only pass the new cache as this function is called after clearing the router cache
// and filling in the new page data from the server. Meaning the existing cache is actually the cache that's
// just been created & has been written to, but hasn't been "committed" yet.
(0, _applyflightdata.applyFlightData)(navigatedAt, updatedCache, updatedCache, flightDataPath);
}
} else {
// When flightData is a string, it suggests that the server response should have triggered an MPA navigation
// I'm not 100% sure of this decision, but it seems unlikely that we'd want to introduce a redirect side effect
// when refreshing on-screen data, so handling this has been ommitted.
}
});
fetchPromises.push(fetchPromise);
}
for(const key in parallelRoutes){
const parallelFetchPromise = refreshInactiveParallelSegmentsImpl({
navigatedAt,
state,
updatedTree: parallelRoutes[key],
updatedCache,
includeNextUrl,
fetchedSegments,
rootTree,
canonicalUrl
});
fetchPromises.push(parallelFetchPromise);
}
await Promise.all(fetchPromises);
}
function addRefreshMarkerToActiveParallelSegments(tree, path) {
const [segment, parallelRoutes, , refetchMarker] = tree;
// a page segment might also contain concatenated search params, so we do a partial match on the key
if (segment.includes(_segment.PAGE_SEGMENT_KEY) && refetchMarker !== 'refresh') {
tree[2] = path;
tree[3] = 'refresh';
}
for(const key in parallelRoutes){
addRefreshMarkerToActiveParallelSegments(parallelRoutes[key], path);
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=refetch-inactive-parallel-segments.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "applyRouterStatePatchToTree", {
enumerable: true,
get: function() {
return applyRouterStatePatchToTree;
}
});
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-client] (ecmascript)");
const _refetchinactiveparallelsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js [app-client] (ecmascript)");
/**
* Deep merge of the two router states. Parallel route keys are preserved if the patch doesn't have them.
*/ function applyPatch(initialTree, patchTree) {
const [initialSegment, initialParallelRoutes] = initialTree;
const [patchSegment, patchParallelRoutes] = patchTree;
// if the applied patch segment is __DEFAULT__ then it can be ignored in favor of the initial tree
// this is because the __DEFAULT__ segment is used as a placeholder on navigation
if (patchSegment === _segment.DEFAULT_SEGMENT_KEY && initialSegment !== _segment.DEFAULT_SEGMENT_KEY) {
return initialTree;
}
if ((0, _matchsegments.matchSegment)(initialSegment, patchSegment)) {
const newParallelRoutes = {};
for(const key in initialParallelRoutes){
const isInPatchTreeParallelRoutes = typeof patchParallelRoutes[key] !== 'undefined';
if (isInPatchTreeParallelRoutes) {
newParallelRoutes[key] = applyPatch(initialParallelRoutes[key], patchParallelRoutes[key]);
} else {
newParallelRoutes[key] = initialParallelRoutes[key];
}
}
for(const key in patchParallelRoutes){
if (newParallelRoutes[key]) {
continue;
}
newParallelRoutes[key] = patchParallelRoutes[key];
}
const tree = [
initialSegment,
newParallelRoutes
];
// Copy over the existing tree
if (initialTree[2]) {
tree[2] = initialTree[2];
}
if (initialTree[3]) {
tree[3] = initialTree[3];
}
if (initialTree[4]) {
tree[4] = initialTree[4];
}
return tree;
}
return patchTree;
}
function applyRouterStatePatchToTree(flightSegmentPath, flightRouterState, treePatch, path) {
const [segment, parallelRoutes, url, refetch, isRootLayout] = flightRouterState;
// Root refresh
if (flightSegmentPath.length === 1) {
const tree = applyPatch(flightRouterState, treePatch);
(0, _refetchinactiveparallelsegments.addRefreshMarkerToActiveParallelSegments)(tree, path);
return tree;
}
const [currentSegment, parallelRouteKey] = flightSegmentPath;
// Tree path returned from the server should always match up with the current tree in the browser
if (!(0, _matchsegments.matchSegment)(currentSegment, segment)) {
return null;
}
const lastSegment = flightSegmentPath.length === 2;
let parallelRoutePatch;
if (lastSegment) {
parallelRoutePatch = applyPatch(parallelRoutes[parallelRouteKey], treePatch);
} else {
parallelRoutePatch = applyRouterStatePatchToTree((0, _flightdatahelpers.getNextFlightSegmentPath)(flightSegmentPath), parallelRoutes[parallelRouteKey], treePatch, path);
if (parallelRoutePatch === null) {
return null;
}
}
const tree = [
flightSegmentPath[0],
{
...parallelRoutes,
[parallelRouteKey]: parallelRoutePatch
},
url,
refetch
];
// Current segment is the root layout
if (isRootLayout) {
tree[4] = true;
}
(0, _refetchinactiveparallelsegments.addRefreshMarkerToActiveParallelSegments)(tree, path);
return tree;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=apply-router-state-patch-to-tree.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "shouldHardNavigate", {
enumerable: true,
get: function() {
return shouldHardNavigate;
}
});
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-client] (ecmascript)");
function shouldHardNavigate(flightSegmentPath, flightRouterState) {
const [segment, parallelRoutes] = flightRouterState;
// TODO-APP: Check if `as` can be replaced.
const [currentSegment, parallelRouteKey] = flightSegmentPath;
// Check if current segment matches the existing segment.
if (!(0, _matchsegments.matchSegment)(currentSegment, segment)) {
// If dynamic parameter in tree doesn't match up with segment path a hard navigation is triggered.
if (Array.isArray(currentSegment)) {
return true;
}
// If the existing segment did not match soft navigation is triggered.
return false;
}
const lastSegment = flightSegmentPath.length <= 2;
if (lastSegment) {
return false;
}
return shouldHardNavigate((0, _flightdatahelpers.getNextFlightSegmentPath)(flightSegmentPath), parallelRoutes[parallelRouteKey]);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=should-hard-navigate.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isNavigatingToNewRootLayout", {
enumerable: true,
get: function() {
return isNavigatingToNewRootLayout;
}
});
function isNavigatingToNewRootLayout(currentTree, nextTree) {
// Compare segments
const currentTreeSegment = currentTree[0];
const nextTreeSegment = nextTree[0];
// If any segment is different before we find the root layout, the root layout has changed.
// E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js
// First segment is 'same' for both, keep looking. (group1) changed to (group2) before the root layout was found, it must have changed.
if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) {
// Compare dynamic param name and type but ignore the value, different values would not affect the current root layout
// /[name] - /slug1 and /slug2, both values (slug1 & slug2) still has the same layout /[name]/layout.js
if (currentTreeSegment[0] !== nextTreeSegment[0] || currentTreeSegment[2] !== nextTreeSegment[2]) {
return true;
}
} else if (currentTreeSegment !== nextTreeSegment) {
return true;
}
// Current tree root layout found
if (currentTree[4]) {
// If the next tree doesn't have the root layout flag, it must have changed.
return !nextTree[4];
}
// Current tree didn't have its root layout here, must have changed.
if (nextTree[4]) {
return true;
}
// We can't assume it's `parallelRoutes.children` here in case the root layout is `app/@something/layout.js`
// But it's not possible to be more than one parallelRoutes before the root layout is found
// TODO-APP: change to traverse all parallel routes
const currentTreeChild = Object.values(currentTree[1])[0];
const nextTreeChild = Object.values(nextTree[1])[0];
if (!currentTreeChild || !nextTreeChild) return true;
return isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=is-navigating-to-new-root-layout.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
computeChangedPath: null,
extractPathFromFlightRouterState: null,
getSelectedParams: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
computeChangedPath: function() {
return computeChangedPath;
},
extractPathFromFlightRouterState: function() {
return extractPathFromFlightRouterState;
},
getSelectedParams: function() {
return getSelectedParams;
}
});
const _interceptionroutes = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/interception-routes.js [app-client] (ecmascript)");
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-client] (ecmascript)");
const removeLeadingSlash = (segment)=>{
return segment[0] === '/' ? segment.slice(1) : segment;
};
const segmentToPathname = (segment)=>{
if (typeof segment === 'string') {
// 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page
// if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense.
if (segment === 'children') return '';
return segment;
}
return segment[1];
};
function normalizeSegments(segments) {
return segments.reduce((acc, segment)=>{
segment = removeLeadingSlash(segment);
if (segment === '' || (0, _segment.isGroupSegment)(segment)) {
return acc;
}
return acc + "/" + segment;
}, '') || '/';
}
function extractPathFromFlightRouterState(flightRouterState) {
const segment = Array.isArray(flightRouterState[0]) ? flightRouterState[0][1] : flightRouterState[0];
if (segment === _segment.DEFAULT_SEGMENT_KEY || _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>segment.startsWith(m))) return undefined;
if (segment.startsWith(_segment.PAGE_SEGMENT_KEY)) return '';
const segments = [
segmentToPathname(segment)
];
var _flightRouterState_;
const parallelRoutes = (_flightRouterState_ = flightRouterState[1]) != null ? _flightRouterState_ : {};
const childrenPath = parallelRoutes.children ? extractPathFromFlightRouterState(parallelRoutes.children) : undefined;
if (childrenPath !== undefined) {
segments.push(childrenPath);
} else {
for (const [key, value] of Object.entries(parallelRoutes)){
if (key === 'children') continue;
const childPath = extractPathFromFlightRouterState(value);
if (childPath !== undefined) {
segments.push(childPath);
}
}
}
return normalizeSegments(segments);
}
function computeChangedPathImpl(treeA, treeB) {
const [segmentA, parallelRoutesA] = treeA;
const [segmentB, parallelRoutesB] = treeB;
const normalizedSegmentA = segmentToPathname(segmentA);
const normalizedSegmentB = segmentToPathname(segmentB);
if (_interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m))) {
return '';
}
if (!(0, _matchsegments.matchSegment)(segmentA, segmentB)) {
var _extractPathFromFlightRouterState;
// once we find where the tree changed, we compute the rest of the path by traversing the tree
return (_extractPathFromFlightRouterState = extractPathFromFlightRouterState(treeB)) != null ? _extractPathFromFlightRouterState : '';
}
for(const parallelRouterKey in parallelRoutesA){
if (parallelRoutesB[parallelRouterKey]) {
const changedPath = computeChangedPathImpl(parallelRoutesA[parallelRouterKey], parallelRoutesB[parallelRouterKey]);
if (changedPath !== null) {
return segmentToPathname(segmentB) + "/" + changedPath;
}
}
}
return null;
}
function computeChangedPath(treeA, treeB) {
const changedPath = computeChangedPathImpl(treeA, treeB);
if (changedPath == null || changedPath === '/') {
return changedPath;
}
// lightweight normalization to remove route groups
return normalizeSegments(changedPath.split('/'));
}
function getSelectedParams(currentTree, params) {
if (params === void 0) params = {};
const parallelRoutes = currentTree[1];
for (const parallelRoute of Object.values(parallelRoutes)){
const segment = parallelRoute[0];
const isDynamicParameter = Array.isArray(segment);
const segmentValue = isDynamicParameter ? segment[1] : segment;
if (!segmentValue || segmentValue.startsWith(_segment.PAGE_SEGMENT_KEY)) continue;
// Ensure catchAll and optional catchall are turned into an array
const isCatchAll = isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc');
if (isCatchAll) {
params[segment[0]] = segment[1].split('/');
} else if (isDynamicParameter) {
params[segment[0]] = segment[1];
}
params = getSelectedParams(parallelRoute, params);
}
return params;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=compute-changed-path.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "handleMutable", {
enumerable: true,
get: function() {
return handleMutable;
}
});
const _computechangedpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-client] (ecmascript)");
function isNotUndefined(value) {
return typeof value !== 'undefined';
}
function handleMutable(state, mutable) {
var _mutable_shouldScroll;
// shouldScroll is true by default, can override to false.
const shouldScroll = (_mutable_shouldScroll = mutable.shouldScroll) != null ? _mutable_shouldScroll : true;
let nextUrl = state.nextUrl;
if (isNotUndefined(mutable.patchedTree)) {
// If we received a patched tree, we need to compute the changed path.
const changedPath = (0, _computechangedpath.computeChangedPath)(state.tree, mutable.patchedTree);
if (changedPath) {
// If the tree changed, we need to update the nextUrl
nextUrl = changedPath;
} else if (!nextUrl) {
// if the tree ends up being the same (ie, no changed path), and we don't have a nextUrl, then we should use the canonicalUrl
nextUrl = state.canonicalUrl;
}
// otherwise this will be a no-op and continue to use the existing nextUrl
}
var _mutable_scrollableSegments;
return {
// Set href.
canonicalUrl: isNotUndefined(mutable.canonicalUrl) ? mutable.canonicalUrl === state.canonicalUrl ? state.canonicalUrl : mutable.canonicalUrl : state.canonicalUrl,
pushRef: {
pendingPush: isNotUndefined(mutable.pendingPush) ? mutable.pendingPush : state.pushRef.pendingPush,
mpaNavigation: isNotUndefined(mutable.mpaNavigation) ? mutable.mpaNavigation : state.pushRef.mpaNavigation,
preserveCustomHistoryState: isNotUndefined(mutable.preserveCustomHistoryState) ? mutable.preserveCustomHistoryState : state.pushRef.preserveCustomHistoryState
},
// All navigation requires scroll and focus management to trigger.
focusAndScrollRef: {
apply: shouldScroll ? isNotUndefined(mutable == null ? void 0 : mutable.scrollableSegments) ? true : state.focusAndScrollRef.apply : false,
onlyHashChange: mutable.onlyHashChange || false,
hashFragment: shouldScroll ? mutable.hashFragment && mutable.hashFragment !== '' ? decodeURIComponent(mutable.hashFragment.slice(1)) : state.focusAndScrollRef.hashFragment : null,
segmentPaths: shouldScroll ? (_mutable_scrollableSegments = mutable == null ? void 0 : mutable.scrollableSegments) != null ? _mutable_scrollableSegments : state.focusAndScrollRef.segmentPaths : []
},
// Apply cache.
cache: mutable.cache ? mutable.cache : state.cache,
prefetchCache: mutable.prefetchCache ? mutable.prefetchCache : state.prefetchCache,
// Apply patched router state.
tree: isNotUndefined(mutable.patchedTree) ? mutable.patchedTree : state.tree,
nextUrl
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=handle-mutable.js.map
}}),
"[project]/node_modules/next/dist/client/components/promise-queue.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/*
This is a simple promise queue that allows you to limit the number of concurrent promises
that are running at any given time. It's used to limit the number of concurrent
prefetch requests that are being made to the server but could be used for other
things as well.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PromiseQueue", {
enumerable: true,
get: function() {
return PromiseQueue;
}
});
const _class_private_field_loose_base = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs [app-client] (ecmascript)");
const _class_private_field_loose_key = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs [app-client] (ecmascript)");
var _maxConcurrency = /*#__PURE__*/ _class_private_field_loose_key._("_maxConcurrency"), _runningCount = /*#__PURE__*/ _class_private_field_loose_key._("_runningCount"), _queue = /*#__PURE__*/ _class_private_field_loose_key._("_queue"), _processNext = /*#__PURE__*/ _class_private_field_loose_key._("_processNext");
class PromiseQueue {
enqueue(promiseFn) {
let taskResolve;
let taskReject;
const taskPromise = new Promise((resolve, reject)=>{
taskResolve = resolve;
taskReject = reject;
});
const task = async ()=>{
try {
_class_private_field_loose_base._(this, _runningCount)[_runningCount]++;
const result = await promiseFn();
taskResolve(result);
} catch (error) {
taskReject(error);
} finally{
_class_private_field_loose_base._(this, _runningCount)[_runningCount]--;
_class_private_field_loose_base._(this, _processNext)[_processNext]();
}
};
const enqueueResult = {
promiseFn: taskPromise,
task
};
// wonder if we should take a LIFO approach here
_class_private_field_loose_base._(this, _queue)[_queue].push(enqueueResult);
_class_private_field_loose_base._(this, _processNext)[_processNext]();
return taskPromise;
}
bump(promiseFn) {
const index = _class_private_field_loose_base._(this, _queue)[_queue].findIndex((item)=>item.promiseFn === promiseFn);
if (index > -1) {
const bumpedItem = _class_private_field_loose_base._(this, _queue)[_queue].splice(index, 1)[0];
_class_private_field_loose_base._(this, _queue)[_queue].unshift(bumpedItem);
_class_private_field_loose_base._(this, _processNext)[_processNext](true);
}
}
constructor(maxConcurrency = 5){
Object.defineProperty(this, _processNext, {
value: processNext
});
Object.defineProperty(this, _maxConcurrency, {
writable: true,
value: void 0
});
Object.defineProperty(this, _runningCount, {
writable: true,
value: void 0
});
Object.defineProperty(this, _queue, {
writable: true,
value: void 0
});
_class_private_field_loose_base._(this, _maxConcurrency)[_maxConcurrency] = maxConcurrency;
_class_private_field_loose_base._(this, _runningCount)[_runningCount] = 0;
_class_private_field_loose_base._(this, _queue)[_queue] = [];
}
}
function processNext(forced) {
if (forced === void 0) forced = false;
if ((_class_private_field_loose_base._(this, _runningCount)[_runningCount] < _class_private_field_loose_base._(this, _maxConcurrency)[_maxConcurrency] || forced) && _class_private_field_loose_base._(this, _queue)[_queue].length > 0) {
var _class_private_field_loose_base__queue_shift;
(_class_private_field_loose_base__queue_shift = _class_private_field_loose_base._(this, _queue)[_queue].shift()) == null ? void 0 : _class_private_field_loose_base__queue_shift.task();
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=promise-queue.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DYNAMIC_STALETIME_MS: null,
STATIC_STALETIME_MS: null,
createSeededPrefetchCacheEntry: null,
getOrCreatePrefetchCacheEntry: null,
prunePrefetchCache: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DYNAMIC_STALETIME_MS: function() {
return DYNAMIC_STALETIME_MS;
},
STATIC_STALETIME_MS: function() {
return STATIC_STALETIME_MS;
},
createSeededPrefetchCacheEntry: function() {
return createSeededPrefetchCacheEntry;
},
getOrCreatePrefetchCacheEntry: function() {
return getOrCreatePrefetchCacheEntry;
},
prunePrefetchCache: function() {
return prunePrefetchCache;
}
});
const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _prefetchreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js [app-client] (ecmascript)");
const INTERCEPTION_CACHE_KEY_MARKER = '%';
/**
* Creates a cache key for the router prefetch cache
*
* @param url - The URL being navigated to
* @param nextUrl - an internal URL, primarily used for handling rewrites. Defaults to '/'.
* @return The generated prefetch cache key.
*/ function createPrefetchCacheKeyImpl(url, includeSearchParams, prefix) {
// Initially we only use the pathname as the cache key. We don't want to include
// search params so that multiple URLs with the same search parameter can re-use
// loading states.
let pathnameFromUrl = url.pathname;
// RSC responses can differ based on search params, specifically in the case where we aren't
// returning a partial response (ie with `PrefetchKind.AUTO`).
// In the auto case, since loading.js & layout.js won't have access to search params,
// we can safely re-use that cache entry. But for full prefetches, we should not
// re-use the cache entry as the response may differ.
if (includeSearchParams) {
// if we have a full prefetch, we can include the search param in the key,
// as we'll be getting back a full response. The server might have read the search
// params when generating the full response.
pathnameFromUrl += url.search;
}
if (prefix) {
return "" + prefix + INTERCEPTION_CACHE_KEY_MARKER + pathnameFromUrl;
}
return pathnameFromUrl;
}
function createPrefetchCacheKey(url, kind, nextUrl) {
return createPrefetchCacheKeyImpl(url, kind === _routerreducertypes.PrefetchKind.FULL, nextUrl);
}
function getExistingCacheEntry(url, kind, nextUrl, prefetchCache, allowAliasing) {
if (kind === void 0) kind = _routerreducertypes.PrefetchKind.TEMPORARY;
// We first check if there's a more specific interception route prefetch entry
// This is because when we detect a prefetch that corresponds with an interception route, we prefix it with nextUrl (see `createPrefetchCacheKey`)
// to avoid conflicts with other pages that may have the same URL but render different things depending on the `Next-URL` header.
for (const maybeNextUrl of [
nextUrl,
null
]){
const cacheKeyWithParams = createPrefetchCacheKeyImpl(url, true, maybeNextUrl);
const cacheKeyWithoutParams = createPrefetchCacheKeyImpl(url, false, maybeNextUrl);
// First, we check if we have a cache entry that exactly matches the URL
const cacheKeyToUse = url.search ? cacheKeyWithParams : cacheKeyWithoutParams;
const existingEntry = prefetchCache.get(cacheKeyToUse);
if (existingEntry && allowAliasing) {
// We know we're returning an aliased entry when the pathname matches but the search params don't,
const isAliased = existingEntry.url.pathname === url.pathname && existingEntry.url.search !== url.search;
if (isAliased) {
return {
...existingEntry,
aliased: true
};
}
return existingEntry;
}
// If the request contains search params, and we're not doing a full prefetch, we can return the
// param-less entry if it exists.
// This is technically covered by the check at the bottom of this function, which iterates over cache entries,
// but lets us arrive there quicker in the param-full case.
const entryWithoutParams = prefetchCache.get(cacheKeyWithoutParams);
if (("TURBOPACK compile-time value", "development") !== 'development' && allowAliasing && url.search && kind !== _routerreducertypes.PrefetchKind.FULL && entryWithoutParams && // We shouldn't return the aliased entry if it was relocated to a new cache key.
// Since it's rewritten, it could respond with a completely different loading state.
!entryWithoutParams.key.includes(INTERCEPTION_CACHE_KEY_MARKER)) {
"TURBOPACK unreachable";
}
}
// If we've gotten to this point, we didn't find a specific cache entry that matched
// the request URL.
// We attempt a partial match by checking if there's a cache entry with the same pathname.
// Regardless of what we find, since it doesn't correspond with the requested URL, we'll mark it "aliased".
// This will signal to the router that it should only apply the loading state on the prefetched data.
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return undefined;
}
function getOrCreatePrefetchCacheEntry(param) {
let { url, nextUrl, tree, prefetchCache, kind, allowAliasing = true } = param;
const existingCacheEntry = getExistingCacheEntry(url, kind, nextUrl, prefetchCache, allowAliasing);
if (existingCacheEntry) {
// Grab the latest status of the cache entry and update it
existingCacheEntry.status = getPrefetchEntryCacheStatus(existingCacheEntry);
// when `kind` is provided, an explicit prefetch was requested.
// if the requested prefetch is "full" and the current cache entry wasn't, we want to re-prefetch with the new intent
const switchedToFullPrefetch = existingCacheEntry.kind !== _routerreducertypes.PrefetchKind.FULL && kind === _routerreducertypes.PrefetchKind.FULL;
if (switchedToFullPrefetch) {
// If we switched to a full prefetch, validate that the existing cache entry contained partial data.
// It's possible that the cache entry was seeded with full data but has a cache type of "auto" (ie when cache entries
// are seeded but without a prefetch intent)
existingCacheEntry.data.then((prefetchResponse)=>{
const isFullPrefetch = Array.isArray(prefetchResponse.flightData) && prefetchResponse.flightData.some((flightData)=>{
// If we started rendering from the root and we returned RSC data (seedData), we already had a full prefetch.
return flightData.isRootRender && flightData.seedData !== null;
});
if (!isFullPrefetch) {
return createLazyPrefetchEntry({
tree,
url,
nextUrl,
prefetchCache,
// If we didn't get an explicit prefetch kind, we want to set a temporary kind
// rather than assuming the same intent as the previous entry, to be consistent with how we
// lazily create prefetch entries when intent is left unspecified.
kind: kind != null ? kind : _routerreducertypes.PrefetchKind.TEMPORARY
});
}
});
}
// If the existing cache entry was marked as temporary, it means it was lazily created when attempting to get an entry,
// where we didn't have the prefetch intent. Now that we have the intent (in `kind`), we want to update the entry to the more accurate kind.
if (kind && existingCacheEntry.kind === _routerreducertypes.PrefetchKind.TEMPORARY) {
existingCacheEntry.kind = kind;
}
// We've determined that the existing entry we found is still valid, so we return it.
return existingCacheEntry;
}
// If we didn't return an entry, create a new one.
return createLazyPrefetchEntry({
tree,
url,
nextUrl,
prefetchCache,
kind: kind || _routerreducertypes.PrefetchKind.TEMPORARY
});
}
/*
* Used to take an existing cache entry and prefix it with the nextUrl, if it exists.
* This ensures that we don't have conflicting cache entries for the same URL (as is the case with route interception).
*/ function prefixExistingPrefetchCacheEntry(param) {
let { url, nextUrl, prefetchCache, existingCacheKey } = param;
const existingCacheEntry = prefetchCache.get(existingCacheKey);
if (!existingCacheEntry) {
// no-op -- there wasn't an entry to move
return;
}
const newCacheKey = createPrefetchCacheKey(url, existingCacheEntry.kind, nextUrl);
prefetchCache.set(newCacheKey, {
...existingCacheEntry,
key: newCacheKey
});
prefetchCache.delete(existingCacheKey);
return newCacheKey;
}
function createSeededPrefetchCacheEntry(param) {
let { nextUrl, tree, prefetchCache, url, data, kind } = param;
// The initial cache entry technically includes full data, but it isn't explicitly prefetched -- we just seed the
// prefetch cache so that we can skip an extra prefetch request later, since we already have the data.
// if the prefetch corresponds with an interception route, we use the nextUrl to prefix the cache key
const prefetchCacheKey = data.couldBeIntercepted ? createPrefetchCacheKey(url, kind, nextUrl) : createPrefetchCacheKey(url, kind);
const prefetchEntry = {
treeAtTimeOfPrefetch: tree,
data: Promise.resolve(data),
kind,
prefetchTime: Date.now(),
lastUsedTime: Date.now(),
staleTime: -1,
key: prefetchCacheKey,
status: _routerreducertypes.PrefetchCacheEntryStatus.fresh,
url
};
prefetchCache.set(prefetchCacheKey, prefetchEntry);
return prefetchEntry;
}
/**
* Creates a prefetch entry entry and enqueues a fetch request to retrieve the data.
*/ function createLazyPrefetchEntry(param) {
let { url, kind, tree, nextUrl, prefetchCache } = param;
const prefetchCacheKey = createPrefetchCacheKey(url, kind);
// initiates the fetch request for the prefetch and attaches a listener
// to the promise to update the prefetch cache entry when the promise resolves (if necessary)
const data = _prefetchreducer.prefetchQueue.enqueue(()=>(0, _fetchserverresponse.fetchServerResponse)(url, {
flightRouterState: tree,
nextUrl,
prefetchKind: kind
}).then((prefetchResponse)=>{
// TODO: `fetchServerResponse` should be more tighly coupled to these prefetch cache operations
// to avoid drift between this cache key prefixing logic
// (which is currently directly influenced by the server response)
let newCacheKey;
if (prefetchResponse.couldBeIntercepted) {
// Determine if we need to prefix the cache key with the nextUrl
newCacheKey = prefixExistingPrefetchCacheEntry({
url,
existingCacheKey: prefetchCacheKey,
nextUrl,
prefetchCache
});
}
// If the prefetch was a cache hit, we want to update the existing cache entry to reflect that it was a full prefetch.
// This is because we know that a static response will contain the full RSC payload, and can be updated to respect the `static`
// staleTime.
if (prefetchResponse.prerendered) {
const existingCacheEntry = prefetchCache.get(newCacheKey != null ? newCacheKey : prefetchCacheKey);
if (existingCacheEntry) {
existingCacheEntry.kind = _routerreducertypes.PrefetchKind.FULL;
if (prefetchResponse.staleTime !== -1) {
// This is the stale time that was collected by the server during
// static generation. Use this in place of the default stale time.
existingCacheEntry.staleTime = prefetchResponse.staleTime;
}
}
}
return prefetchResponse;
}));
const prefetchEntry = {
treeAtTimeOfPrefetch: tree,
data,
kind,
prefetchTime: Date.now(),
lastUsedTime: null,
staleTime: -1,
key: prefetchCacheKey,
status: _routerreducertypes.PrefetchCacheEntryStatus.fresh,
url
};
prefetchCache.set(prefetchCacheKey, prefetchEntry);
return prefetchEntry;
}
function prunePrefetchCache(prefetchCache) {
for (const [href, prefetchCacheEntry] of prefetchCache){
if (getPrefetchEntryCacheStatus(prefetchCacheEntry) === _routerreducertypes.PrefetchCacheEntryStatus.expired) {
prefetchCache.delete(href);
}
}
}
const DYNAMIC_STALETIME_MS = Number(("TURBOPACK compile-time value", "0")) * 1000;
const STATIC_STALETIME_MS = Number(("TURBOPACK compile-time value", "300")) * 1000;
function getPrefetchEntryCacheStatus(param) {
let { kind, prefetchTime, lastUsedTime, staleTime } = param;
if (staleTime !== -1) {
// `staleTime` is the value sent by the server during static generation.
// When this is available, it takes precedence over any of the heuristics
// that follow.
//
// TODO: When PPR is enabled, the server will *always* return a stale time
// when prefetching. We should never use a prefetch entry that hasn't yet
// received data from the server. So the only two cases should be 1) we use
// the server-generated stale time 2) the unresolved entry is discarded.
return Date.now() < prefetchTime + staleTime ? _routerreducertypes.PrefetchCacheEntryStatus.fresh : _routerreducertypes.PrefetchCacheEntryStatus.stale;
}
// We will re-use the cache entry data for up to the `dynamic` staletime window.
if (Date.now() < (lastUsedTime != null ? lastUsedTime : prefetchTime) + DYNAMIC_STALETIME_MS) {
return lastUsedTime ? _routerreducertypes.PrefetchCacheEntryStatus.reusable : _routerreducertypes.PrefetchCacheEntryStatus.fresh;
}
// For "auto" prefetching, we'll re-use only the loading boundary for up to `static` staletime window.
// A stale entry will only re-use the `loading` boundary, not the full data.
// This will trigger a "lazy fetch" for the full data.
if (kind === _routerreducertypes.PrefetchKind.AUTO) {
if (Date.now() < prefetchTime + STATIC_STALETIME_MS) {
return _routerreducertypes.PrefetchCacheEntryStatus.stale;
}
}
// for "full" prefetching, we'll re-use the cache entry data for up to `static` staletime window.
if (kind === _routerreducertypes.PrefetchKind.FULL) {
if (Date.now() < prefetchTime + STATIC_STALETIME_MS) {
return _routerreducertypes.PrefetchCacheEntryStatus.reusable;
}
}
return _routerreducertypes.PrefetchCacheEntryStatus.expired;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=prefetch-cache-utils.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
prefetchQueue: null,
prefetchReducer: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
prefetchQueue: function() {
return prefetchQueue;
},
prefetchReducer: function() {
return prefetchReducer;
}
});
const _promisequeue = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/promise-queue.js [app-client] (ecmascript)");
const _prefetchcacheutils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js [app-client] (ecmascript)");
const prefetchQueue = new _promisequeue.PromiseQueue(5);
const prefetchReducer = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : prefetchReducerImpl;
function identityReducerWhenSegmentCacheIsEnabled(state) {
// Unlike the old implementation, the Segment Cache doesn't store its data in
// the router reducer state.
//
// This shouldn't be reachable because we wrap the prefetch API in a check,
// too, which prevents the action from being dispatched. But it's here for
// clarity + code elimination.
return state;
}
function prefetchReducerImpl(state, action) {
// let's prune the prefetch cache before we do anything else
(0, _prefetchcacheutils.prunePrefetchCache)(state.prefetchCache);
const { url } = action;
(0, _prefetchcacheutils.getOrCreatePrefetchCacheEntry)({
url,
nextUrl: state.nextUrl,
prefetchCache: state.prefetchCache,
kind: action.kind,
tree: state.tree,
allowAliasing: true
});
return state;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=prefetch-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/normalize-trailing-slash.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizePathTrailingSlash", {
enumerable: true,
get: function() {
return normalizePathTrailingSlash;
}
});
const _removetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [app-client] (ecmascript)");
const _parsepath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [app-client] (ecmascript)");
const normalizePathTrailingSlash = (path)=>{
if (!path.startsWith('/') || __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].env.__NEXT_MANUAL_TRAILING_SLASH) {
return path;
}
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=normalize-trailing-slash.js.map
}}),
"[project]/node_modules/next/dist/client/add-base-path.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "addBasePath", {
enumerable: true,
get: function() {
return addBasePath;
}
});
const _addpathprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js [app-client] (ecmascript)");
const _normalizetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/client/normalize-trailing-slash.js [app-client] (ecmascript)");
const basePath = ("TURBOPACK compile-time value", "") || '';
function addBasePath(path, required) {
return (0, _normalizetrailingslash.normalizePathTrailingSlash)(("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : (0, _addpathprefix.addPathPrefix)(path, basePath));
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=add-base-path.js.map
}}),
"[project]/node_modules/next/dist/client/components/app-router-announcer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AppRouterAnnouncer", {
enumerable: true,
get: function() {
return AppRouterAnnouncer;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _reactdom = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react-dom/index.js [app-client] (ecmascript)");
const ANNOUNCER_TYPE = 'next-route-announcer';
const ANNOUNCER_ID = '__next-route-announcer__';
function getAnnouncerNode() {
var _existingAnnouncer_shadowRoot;
const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0];
if (existingAnnouncer == null ? void 0 : (_existingAnnouncer_shadowRoot = existingAnnouncer.shadowRoot) == null ? void 0 : _existingAnnouncer_shadowRoot.childNodes[0]) {
return existingAnnouncer.shadowRoot.childNodes[0];
} else {
const container = document.createElement(ANNOUNCER_TYPE);
container.style.cssText = 'position:absolute';
const announcer = document.createElement('div');
announcer.ariaLive = 'assertive';
announcer.id = ANNOUNCER_ID;
announcer.role = 'alert';
announcer.style.cssText = 'position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal';
// Use shadow DOM here to avoid any potential CSS bleed
const shadow = container.attachShadow({
mode: 'open'
});
shadow.appendChild(announcer);
document.body.appendChild(container);
return announcer;
}
}
function AppRouterAnnouncer(param) {
let { tree } = param;
const [portalNode, setPortalNode] = (0, _react.useState)(null);
(0, _react.useEffect)(()=>{
const announcer = getAnnouncerNode();
setPortalNode(announcer);
return ()=>{
const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0];
if (container == null ? void 0 : container.isConnected) {
document.body.removeChild(container);
}
};
}, []);
const [routeAnnouncement, setRouteAnnouncement] = (0, _react.useState)('');
const previousTitle = (0, _react.useRef)(undefined);
(0, _react.useEffect)(()=>{
let currentTitle = '';
if (document.title) {
currentTitle = document.title;
} else {
const pageHeader = document.querySelector('h1');
if (pageHeader) {
currentTitle = pageHeader.innerText || pageHeader.textContent || '';
}
}
// Only announce the title change, but not for the first load because screen
// readers do that automatically.
if (previousTitle.current !== undefined && previousTitle.current !== currentTitle) {
setRouteAnnouncement(currentTitle);
}
previousTitle.current = currentTitle;
}, [
tree
]);
return portalNode ? /*#__PURE__*/ (0, _reactdom.createPortal)(routeAnnouncement, portalNode) : null;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-router-announcer.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getSegmentValue", {
enumerable: true,
get: function() {
return getSegmentValue;
}
});
function getSegmentValue(segment) {
return Array.isArray(segment) ? segment[1] : segment;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=get-segment-value.js.map
}}),
"[project]/node_modules/next/dist/client/components/redirect.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getRedirectError: null,
getRedirectStatusCodeFromError: null,
getRedirectTypeFromError: null,
getURLFromRedirectError: null,
permanentRedirect: null,
redirect: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getRedirectError: function() {
return getRedirectError;
},
getRedirectStatusCodeFromError: function() {
return getRedirectStatusCodeFromError;
},
getRedirectTypeFromError: function() {
return getRedirectTypeFromError;
},
getURLFromRedirectError: function() {
return getURLFromRedirectError;
},
permanentRedirect: function() {
return permanentRedirect;
},
redirect: function() {
return redirect;
}
});
const _redirectstatuscode = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-status-code.js [app-client] (ecmascript)");
const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)");
const actionAsyncStorage = typeof window === 'undefined' ? __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/action-async-storage.external.js [app-client] (ecmascript)").actionAsyncStorage : undefined;
function getRedirectError(url, type, statusCode) {
if (statusCode === void 0) statusCode = _redirectstatuscode.RedirectStatusCode.TemporaryRedirect;
const error = Object.defineProperty(new Error(_redirecterror.REDIRECT_ERROR_CODE), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
error.digest = _redirecterror.REDIRECT_ERROR_CODE + ";" + type + ";" + url + ";" + statusCode + ";";
return error;
}
function redirect(/** The URL to redirect to */ url, type) {
var _actionAsyncStorage_getStore;
type != null ? type : type = (actionAsyncStorage == null ? void 0 : (_actionAsyncStorage_getStore = actionAsyncStorage.getStore()) == null ? void 0 : _actionAsyncStorage_getStore.isAction) ? _redirecterror.RedirectType.push : _redirecterror.RedirectType.replace;
throw getRedirectError(url, type, _redirectstatuscode.RedirectStatusCode.TemporaryRedirect);
}
function permanentRedirect(/** The URL to redirect to */ url, type) {
if (type === void 0) type = _redirecterror.RedirectType.replace;
throw getRedirectError(url, type, _redirectstatuscode.RedirectStatusCode.PermanentRedirect);
}
function getURLFromRedirectError(error) {
if (!(0, _redirecterror.isRedirectError)(error)) return null;
// Slices off the beginning of the digest that contains the code and the
// separating ';'.
return error.digest.split(';').slice(2, -2).join(';');
}
function getRedirectTypeFromError(error) {
if (!(0, _redirecterror.isRedirectError)(error)) {
throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", {
value: "E260",
enumerable: false,
configurable: true
});
}
return error.digest.split(';', 2)[1];
}
function getRedirectStatusCodeFromError(error) {
if (!(0, _redirecterror.isRedirectError)(error)) {
throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", {
value: "E260",
enumerable: false,
configurable: true
});
}
return Number(error.digest.split(';').at(-2));
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=redirect.js.map
}}),
"[project]/node_modules/next/dist/client/components/not-found.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "notFound", {
enumerable: true,
get: function() {
return notFound;
}
});
const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-client] (ecmascript)");
/**
* This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)
* within a route segment as well as inject a tag.
*
* `notFound()` can be used in
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
*
* - In a Server Component, this will insert a `` meta tag and set the status code to 404.
* - In a Route Handler or Server Action, it will serve a 404 to the caller.
*
* Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)
*/ const DIGEST = "" + _httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE + ";404";
function notFound() {
// eslint-disable-next-line no-throw-literal
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
error.digest = DIGEST;
throw error;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=not-found.js.map
}}),
"[project]/node_modules/next/dist/client/components/forbidden.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "forbidden", {
enumerable: true,
get: function() {
return forbidden;
}
});
const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-client] (ecmascript)");
// TODO: Add `forbidden` docs
/**
* @experimental
* This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)
* within a route segment as well as inject a tag.
*
* `forbidden()` can be used in
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
*
* Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)
*/ const DIGEST = "" + _httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE + ";403";
function forbidden() {
if ("TURBOPACK compile-time truthy", 1) {
throw Object.defineProperty(new Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."), "__NEXT_ERROR_CODE", {
value: "E488",
enumerable: false,
configurable: true
});
}
// eslint-disable-next-line no-throw-literal
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
error.digest = DIGEST;
throw error;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=forbidden.js.map
}}),
"[project]/node_modules/next/dist/client/components/unauthorized.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "unauthorized", {
enumerable: true,
get: function() {
return unauthorized;
}
});
const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-client] (ecmascript)");
// TODO: Add `unauthorized` docs
/**
* @experimental
* This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized)
* within a route segment as well as inject a tag.
*
* `unauthorized()` can be used in
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
*
*
* Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized)
*/ const DIGEST = "" + _httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE + ";401";
function unauthorized() {
if ("TURBOPACK compile-time truthy", 1) {
throw Object.defineProperty(new Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."), "__NEXT_ERROR_CODE", {
value: "E411",
enumerable: false,
configurable: true
});
}
// eslint-disable-next-line no-throw-literal
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
error.digest = DIGEST;
throw error;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=unauthorized.js.map
}}),
"[project]/node_modules/next/dist/client/components/unstable-rethrow.browser.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "unstable_rethrow", {
enumerable: true,
get: function() {
return unstable_rethrow;
}
});
const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-client] (ecmascript)");
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
function unstable_rethrow(error) {
if ((0, _isnextroutererror.isNextRouterError)(error) || (0, _bailouttocsr.isBailoutToCSRError)(error)) {
throw error;
}
if (error instanceof Error && 'cause' in error) {
unstable_rethrow(error.cause);
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=unstable-rethrow.browser.js.map
}}),
"[project]/node_modules/next/dist/client/components/hooks-server-context.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DynamicServerError: null,
isDynamicServerError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DynamicServerError: function() {
return DynamicServerError;
},
isDynamicServerError: function() {
return isDynamicServerError;
}
});
const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE';
class DynamicServerError extends Error {
constructor(description){
super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE;
}
}
function isDynamicServerError(err) {
if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') {
return false;
}
return err.digest === DYNAMIC_ERROR_CODE;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=hooks-server-context.js.map
}}),
"[project]/node_modules/next/dist/client/components/static-generation-bailout.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
StaticGenBailoutError: null,
isStaticGenBailoutError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
StaticGenBailoutError: function() {
return StaticGenBailoutError;
},
isStaticGenBailoutError: function() {
return isStaticGenBailoutError;
}
});
const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT';
class StaticGenBailoutError extends Error {
constructor(...args){
super(...args), this.code = NEXT_STATIC_GEN_BAILOUT;
}
}
function isStaticGenBailoutError(error) {
if (typeof error !== 'object' || error === null || !('code' in error)) {
return false;
}
return error.code === NEXT_STATIC_GEN_BAILOUT;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=static-generation-bailout.js.map
}}),
"[project]/node_modules/next/dist/client/components/unstable-rethrow.server.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "unstable_rethrow", {
enumerable: true,
get: function() {
return unstable_rethrow;
}
});
const _dynamicrenderingutils = __turbopack_context__.r("[project]/node_modules/next/dist/server/dynamic-rendering-utils.js [app-client] (ecmascript)");
const _ispostpone = __turbopack_context__.r("[project]/node_modules/next/dist/server/lib/router-utils/is-postpone.js [app-client] (ecmascript)");
const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-client] (ecmascript)");
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
const _dynamicrendering = __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/dynamic-rendering.js [app-client] (ecmascript)");
const _hooksservercontext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/hooks-server-context.js [app-client] (ecmascript)");
function unstable_rethrow(error) {
if ((0, _isnextroutererror.isNextRouterError)(error) || (0, _bailouttocsr.isBailoutToCSRError)(error) || (0, _hooksservercontext.isDynamicServerError)(error) || (0, _dynamicrendering.isDynamicPostpone)(error) || (0, _ispostpone.isPostpone)(error) || (0, _dynamicrenderingutils.isHangingPromiseRejectionError)(error)) {
throw error;
}
if (error instanceof Error && 'cause' in error) {
unstable_rethrow(error.cause);
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=unstable-rethrow.server.js.map
}}),
"[project]/node_modules/next/dist/client/components/unstable-rethrow.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/**
* This function should be used to rethrow internal Next.js errors so that they can be handled by the framework.
* When wrapping an API that uses errors to interrupt control flow, you should use this function before you do any error handling.
* This function will rethrow the error if it is a Next.js error so it can be handled, otherwise it will do nothing.
*
* Read more: [Next.js Docs: `unstable_rethrow`](https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow)
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "unstable_rethrow", {
enumerable: true,
get: function() {
return unstable_rethrow;
}
});
const unstable_rethrow = typeof window === 'undefined' ? __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unstable-rethrow.server.js [app-client] (ecmascript)").unstable_rethrow : __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unstable-rethrow.browser.js [app-client] (ecmascript)").unstable_rethrow;
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=unstable-rethrow.js.map
}}),
"[project]/node_modules/next/dist/client/components/navigation.react-server.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/** @internal */ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ReadonlyURLSearchParams: null,
RedirectType: null,
forbidden: null,
notFound: null,
permanentRedirect: null,
redirect: null,
unauthorized: null,
unstable_rethrow: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ReadonlyURLSearchParams: function() {
return ReadonlyURLSearchParams;
},
RedirectType: function() {
return _redirecterror.RedirectType;
},
forbidden: function() {
return _forbidden.forbidden;
},
notFound: function() {
return _notfound.notFound;
},
permanentRedirect: function() {
return _redirect.permanentRedirect;
},
redirect: function() {
return _redirect.redirect;
},
unauthorized: function() {
return _unauthorized.unauthorized;
},
unstable_rethrow: function() {
return _unstablerethrow.unstable_rethrow;
}
});
const _redirect = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect.js [app-client] (ecmascript)");
const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)");
const _notfound = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/not-found.js [app-client] (ecmascript)");
const _forbidden = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/forbidden.js [app-client] (ecmascript)");
const _unauthorized = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unauthorized.js [app-client] (ecmascript)");
const _unstablerethrow = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unstable-rethrow.js [app-client] (ecmascript)");
class ReadonlyURLSearchParamsError extends Error {
constructor(){
super('Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams');
}
}
class ReadonlyURLSearchParams extends URLSearchParams {
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ append() {
throw new ReadonlyURLSearchParamsError();
}
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ delete() {
throw new ReadonlyURLSearchParamsError();
}
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ set() {
throw new ReadonlyURLSearchParamsError();
}
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ sort() {
throw new ReadonlyURLSearchParamsError();
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=navigation.react-server.js.map
}}),
"[project]/node_modules/next/dist/client/components/bailout-to-client-rendering.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "bailoutToClientRendering", {
enumerable: true,
get: function() {
return bailoutToClientRendering;
}
});
const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-client] (ecmascript)");
const _workasyncstorageexternal = __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/work-async-storage.external.js [app-client] (ecmascript)");
function bailoutToClientRendering(reason) {
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
if (workStore == null ? void 0 : workStore.forceStatic) return;
if (workStore == null ? void 0 : workStore.isStaticGeneration) throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(reason), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=bailout-to-client-rendering.js.map
}}),
"[project]/node_modules/next/dist/client/components/navigation.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ReadonlyURLSearchParams: null,
RedirectType: null,
ServerInsertedHTMLContext: null,
forbidden: null,
notFound: null,
permanentRedirect: null,
redirect: null,
unauthorized: null,
unstable_rethrow: null,
useParams: null,
usePathname: null,
useRouter: null,
useSearchParams: null,
useSelectedLayoutSegment: null,
useSelectedLayoutSegments: null,
useServerInsertedHTML: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ReadonlyURLSearchParams: function() {
return _navigationreactserver.ReadonlyURLSearchParams;
},
RedirectType: function() {
return _navigationreactserver.RedirectType;
},
ServerInsertedHTMLContext: function() {
return _serverinsertedhtmlsharedruntime.ServerInsertedHTMLContext;
},
forbidden: function() {
return _navigationreactserver.forbidden;
},
notFound: function() {
return _navigationreactserver.notFound;
},
permanentRedirect: function() {
return _navigationreactserver.permanentRedirect;
},
redirect: function() {
return _navigationreactserver.redirect;
},
unauthorized: function() {
return _navigationreactserver.unauthorized;
},
unstable_rethrow: function() {
return _navigationreactserver.unstable_rethrow;
},
useParams: function() {
return useParams;
},
usePathname: function() {
return usePathname;
},
useRouter: function() {
return useRouter;
},
useSearchParams: function() {
return useSearchParams;
},
useSelectedLayoutSegment: function() {
return useSelectedLayoutSegment;
},
useSelectedLayoutSegments: function() {
return useSelectedLayoutSegments;
},
useServerInsertedHTML: function() {
return _serverinsertedhtmlsharedruntime.useServerInsertedHTML;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js [app-client] (ecmascript)");
const _hooksclientcontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js [app-client] (ecmascript)");
const _getsegmentvalue = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js [app-client] (ecmascript)");
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
const _navigationreactserver = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation.react-server.js [app-client] (ecmascript)");
const _serverinsertedhtmlsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js [app-client] (ecmascript)");
const useDynamicRouteParams = typeof window === 'undefined' ? __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/dynamic-rendering.js [app-client] (ecmascript)").useDynamicRouteParams : undefined;
function useSearchParams() {
const searchParams = (0, _react.useContext)(_hooksclientcontextsharedruntime.SearchParamsContext);
// In the case where this is `null`, the compat types added in
// `next-env.d.ts` will add a new overload that changes the return type to
// include `null`.
const readonlySearchParams = (0, _react.useMemo)(()=>{
if (!searchParams) {
// When the router is not ready in pages, we won't have the search params
// available.
return null;
}
return new _navigationreactserver.ReadonlyURLSearchParams(searchParams);
}, [
searchParams
]);
if (typeof window === 'undefined') {
// AsyncLocalStorage should not be included in the client bundle.
const { bailoutToClientRendering } = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/bailout-to-client-rendering.js [app-client] (ecmascript)");
// TODO-APP: handle dynamic = 'force-static' here and on the client
bailoutToClientRendering('useSearchParams()');
}
return readonlySearchParams;
}
function usePathname() {
useDynamicRouteParams == null ? void 0 : useDynamicRouteParams('usePathname()');
// In the case where this is `null`, the compat types added in `next-env.d.ts`
// will add a new overload that changes the return type to include `null`.
return (0, _react.useContext)(_hooksclientcontextsharedruntime.PathnameContext);
}
function useRouter() {
const router = (0, _react.useContext)(_approutercontextsharedruntime.AppRouterContext);
if (router === null) {
throw Object.defineProperty(new Error('invariant expected app router to be mounted'), "__NEXT_ERROR_CODE", {
value: "E238",
enumerable: false,
configurable: true
});
}
return router;
}
function useParams() {
useDynamicRouteParams == null ? void 0 : useDynamicRouteParams('useParams()');
return (0, _react.useContext)(_hooksclientcontextsharedruntime.PathParamsContext);
}
/** Get the canonical parameters from the current level to the leaf node. */ // Client components API
function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first, segmentPath) {
if (first === void 0) first = true;
if (segmentPath === void 0) segmentPath = [];
let node;
if (first) {
// Use the provided parallel route key on the first parallel route
node = tree[1][parallelRouteKey];
} else {
// After first parallel route prefer children, if there's no children pick the first parallel route.
const parallelRoutes = tree[1];
var _parallelRoutes_children;
node = (_parallelRoutes_children = parallelRoutes.children) != null ? _parallelRoutes_children : Object.values(parallelRoutes)[0];
}
if (!node) return segmentPath;
const segment = node[0];
let segmentValue = (0, _getsegmentvalue.getSegmentValue)(segment);
if (!segmentValue || segmentValue.startsWith(_segment.PAGE_SEGMENT_KEY)) {
return segmentPath;
}
segmentPath.push(segmentValue);
return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
}
function useSelectedLayoutSegments(parallelRouteKey) {
if (parallelRouteKey === void 0) parallelRouteKey = 'children';
useDynamicRouteParams == null ? void 0 : useDynamicRouteParams('useSelectedLayoutSegments()');
const context = (0, _react.useContext)(_approutercontextsharedruntime.LayoutRouterContext);
// @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts
if (!context) return null;
return getSelectedLayoutSegmentPath(context.parentTree, parallelRouteKey);
}
function useSelectedLayoutSegment(parallelRouteKey) {
if (parallelRouteKey === void 0) parallelRouteKey = 'children';
useDynamicRouteParams == null ? void 0 : useDynamicRouteParams('useSelectedLayoutSegment()');
const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey);
if (!selectedLayoutSegments || selectedLayoutSegments.length === 0) {
return null;
}
const selectedLayoutSegment = parallelRouteKey === 'children' ? selectedLayoutSegments[0] : selectedLayoutSegments[selectedLayoutSegments.length - 1];
// if the default slot is showing, we return null since it's not technically "selected" (it's a fallback)
// and returning an internal value like `__DEFAULT__` would be confusing.
return selectedLayoutSegment === _segment.DEFAULT_SEGMENT_KEY ? null : selectedLayoutSegment;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=navigation.js.map
}}),
"[project]/node_modules/next/dist/client/components/redirect-boundary.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
RedirectBoundary: null,
RedirectErrorBoundary: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
RedirectBoundary: function() {
return RedirectBoundary;
},
RedirectErrorBoundary: function() {
return RedirectErrorBoundary;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _navigation = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation.js [app-client] (ecmascript)");
const _redirect = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect.js [app-client] (ecmascript)");
const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)");
function HandleRedirect(param) {
let { redirect, reset, redirectType } = param;
const router = (0, _navigation.useRouter)();
(0, _react.useEffect)(()=>{
_react.default.startTransition(()=>{
if (redirectType === _redirecterror.RedirectType.push) {
router.push(redirect, {});
} else {
router.replace(redirect, {});
}
reset();
});
}, [
redirect,
redirectType,
reset,
router
]);
return null;
}
class RedirectErrorBoundary extends _react.default.Component {
static getDerivedStateFromError(error) {
if ((0, _redirecterror.isRedirectError)(error)) {
const url = (0, _redirect.getURLFromRedirectError)(error);
const redirectType = (0, _redirect.getRedirectTypeFromError)(error);
return {
redirect: url,
redirectType
};
}
// Re-throw if error is not for redirect
throw error;
}
// Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.
render() {
const { redirect, redirectType } = this.state;
if (redirect !== null && redirectType !== null) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(HandleRedirect, {
redirect: redirect,
redirectType: redirectType,
reset: ()=>this.setState({
redirect: null
})
});
}
return this.props.children;
}
constructor(props){
super(props);
this.state = {
redirect: null,
redirectType: null
};
}
}
function RedirectBoundary(param) {
let { children } = param;
const router = (0, _navigation.useRouter)();
return /*#__PURE__*/ (0, _jsxruntime.jsx)(RedirectErrorBoundary, {
router: router,
children: children
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=redirect-boundary.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "findHeadInCache", {
enumerable: true,
get: function() {
return findHeadInCache;
}
});
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
function findHeadInCache(cache, parallelRoutes) {
return findHeadInCacheImpl(cache, parallelRoutes, '');
}
function findHeadInCacheImpl(cache, parallelRoutes, keyPrefix) {
const isLastItem = Object.keys(parallelRoutes).length === 0;
if (isLastItem) {
// Returns the entire Cache Node of the segment whose head we will render.
return [
cache,
keyPrefix
];
}
// First try the 'children' parallel route if it exists
// when starting from the "root", this corresponds with the main page component
if (parallelRoutes.children) {
const [segment, childParallelRoutes] = parallelRoutes.children;
const childSegmentMap = cache.parallelRoutes.get('children');
if (childSegmentMap) {
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);
const cacheNode = childSegmentMap.get(cacheKey);
if (cacheNode) {
const item = findHeadInCacheImpl(cacheNode, childParallelRoutes, keyPrefix + '/' + cacheKey);
if (item) return item;
}
}
}
// if we didn't find metadata in the page slot, check the other parallel routes
for(const key in parallelRoutes){
if (key === 'children') continue; // already checked above
const [segment, childParallelRoutes] = parallelRoutes[key];
const childSegmentMap = cache.parallelRoutes.get(key);
if (!childSegmentMap) {
continue;
}
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);
const cacheNode = childSegmentMap.get(cacheKey);
if (!cacheNode) {
continue;
}
const item = findHeadInCacheImpl(cacheNode, childParallelRoutes, keyPrefix + '/' + cacheKey);
if (item) {
return item;
}
}
return null;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=find-head-in-cache.js.map
}}),
"[project]/node_modules/next/dist/client/components/unresolved-thenable.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/**
* Create a "Thenable" that does not resolve. This is used to suspend indefinitely when data is not available yet.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "unresolvedThenable", {
enumerable: true,
get: function() {
return unresolvedThenable;
}
});
const unresolvedThenable = {
then: ()=>{}
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=unresolved-thenable.js.map
}}),
"[project]/node_modules/next/dist/client/has-base-path.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hasBasePath", {
enumerable: true,
get: function() {
return hasBasePath;
}
});
const _pathhasprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js [app-client] (ecmascript)");
const basePath = ("TURBOPACK compile-time value", "") || '';
function hasBasePath(path) {
return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=has-base-path.js.map
}}),
"[project]/node_modules/next/dist/client/remove-base-path.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "removeBasePath", {
enumerable: true,
get: function() {
return removeBasePath;
}
});
const _hasbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/has-base-path.js [app-client] (ecmascript)");
const basePath = ("TURBOPACK compile-time value", "") || '';
function removeBasePath(path) {
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
// Can't trim the basePath if it has zero length!
if (basePath.length === 0) return path;
path = path.slice(basePath.length);
if (!path.startsWith('/')) path = "/" + path;
return path;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=remove-base-path.js.map
}}),
"[project]/node_modules/next/dist/client/components/segment-cache.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/**
* Entry point to the Segment Cache implementation.
*
* All code related to the Segment Cache lives `segment-cache-impl` directory.
* Callers access it through this indirection.
*
* This is to ensure the code is dead code eliminated from the bundle if the
* flag is disabled.
*
* TODO: This is super tedious. Since experimental flags are an essential part
* of our workflow, we should establish a better pattern for dead code
* elimination. Ideally it would be done at the bundler level, like how React's
* build process works. In the React repo, you don't even need to add any extra
* configuration per experiment — if the code is not reachable, it gets stripped
* from the build automatically by Rollup. Or, shorter term, we could stub out
* experimental modules at build time by updating the build config, i.e. a more
* automated version of what I'm doing manually in this file.
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
NavigationResultTag: null,
PrefetchPriority: null,
cancelPrefetchTask: null,
createCacheKey: null,
getCurrentCacheVersion: null,
navigate: null,
prefetch: null,
reschedulePrefetchTask: null,
revalidateEntireCache: null,
schedulePrefetchTask: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
NavigationResultTag: function() {
return NavigationResultTag;
},
PrefetchPriority: function() {
return PrefetchPriority;
},
cancelPrefetchTask: function() {
return cancelPrefetchTask;
},
createCacheKey: function() {
return createCacheKey;
},
getCurrentCacheVersion: function() {
return getCurrentCacheVersion;
},
navigate: function() {
return navigate;
},
prefetch: function() {
return prefetch;
},
reschedulePrefetchTask: function() {
return reschedulePrefetchTask;
},
revalidateEntireCache: function() {
return revalidateEntireCache;
},
schedulePrefetchTask: function() {
return schedulePrefetchTask;
}
});
const notEnabled = ()=>{
throw Object.defineProperty(new Error('Segment Cache experiment is not enabled. This is a bug in Next.js.'), "__NEXT_ERROR_CODE", {
value: "E654",
enumerable: false,
configurable: true
});
};
const prefetch = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const navigate = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const revalidateEntireCache = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const getCurrentCacheVersion = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const schedulePrefetchTask = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const cancelPrefetchTask = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const reschedulePrefetchTask = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
const createCacheKey = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : notEnabled;
var NavigationResultTag = /*#__PURE__*/ function(NavigationResultTag) {
NavigationResultTag[NavigationResultTag["MPA"] = 0] = "MPA";
NavigationResultTag[NavigationResultTag["Success"] = 1] = "Success";
NavigationResultTag[NavigationResultTag["NoOp"] = 2] = "NoOp";
NavigationResultTag[NavigationResultTag["Async"] = 3] = "Async";
return NavigationResultTag;
}({});
var PrefetchPriority = /*#__PURE__*/ function(PrefetchPriority) {
/**
* Assigned to any visible link that was hovered/touched at some point. This
* is not removed on mouse exit, because a link that was momentarily
* hovered is more likely to to be interacted with than one that was not.
*/ PrefetchPriority[PrefetchPriority["Intent"] = 2] = "Intent";
/**
* The default priority for prefetch tasks.
*/ PrefetchPriority[PrefetchPriority["Default"] = 1] = "Default";
/**
* Assigned to tasks when they spawn non-blocking background work, like
* revalidating a partially cached entry to see if more data is available.
*/ PrefetchPriority[PrefetchPriority["Background"] = 0] = "Background";
return PrefetchPriority;
}({});
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=segment-cache.js.map
}}),
"[project]/node_modules/next/dist/client/components/links.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
IDLE_LINK_STATUS: null,
PENDING_LINK_STATUS: null,
mountFormInstance: null,
mountLinkInstance: null,
onLinkVisibilityChanged: null,
onNavigationIntent: null,
pingVisibleLinks: null,
setLinkForCurrentNavigation: null,
unmountLinkForCurrentNavigation: null,
unmountPrefetchableInstance: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
IDLE_LINK_STATUS: function() {
return IDLE_LINK_STATUS;
},
PENDING_LINK_STATUS: function() {
return PENDING_LINK_STATUS;
},
mountFormInstance: function() {
return mountFormInstance;
},
mountLinkInstance: function() {
return mountLinkInstance;
},
onLinkVisibilityChanged: function() {
return onLinkVisibilityChanged;
},
onNavigationIntent: function() {
return onNavigationIntent;
},
pingVisibleLinks: function() {
return pingVisibleLinks;
},
setLinkForCurrentNavigation: function() {
return setLinkForCurrentNavigation;
},
unmountLinkForCurrentNavigation: function() {
return unmountLinkForCurrentNavigation;
},
unmountPrefetchableInstance: function() {
return unmountPrefetchableInstance;
}
});
const _approuterinstance = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-instance.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _segmentcache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
// Tracks the most recently navigated link instance. When null, indicates
// the current navigation was not initiated by a link click.
let linkForMostRecentNavigation = null;
const PENDING_LINK_STATUS = {
pending: true
};
const IDLE_LINK_STATUS = {
pending: false
};
function setLinkForCurrentNavigation(link) {
(0, _react.startTransition)(()=>{
linkForMostRecentNavigation == null ? void 0 : linkForMostRecentNavigation.setOptimisticLinkStatus(IDLE_LINK_STATUS);
link == null ? void 0 : link.setOptimisticLinkStatus(PENDING_LINK_STATUS);
linkForMostRecentNavigation = link;
});
}
function unmountLinkForCurrentNavigation(link) {
if (linkForMostRecentNavigation === link) {
linkForMostRecentNavigation = null;
}
}
// Use a WeakMap to associate a Link instance with its DOM element. This is
// used by the IntersectionObserver to track the link's visibility.
const prefetchable = typeof WeakMap === 'function' ? new WeakMap() : new Map();
// A Set of the currently visible links. We re-prefetch visible links after a
// cache invalidation, or when the current URL changes. It's a separate data
// structure from the WeakMap above because only the visible links need to
// be enumerated.
const prefetchableAndVisible = new Set();
// A single IntersectionObserver instance shared by all components.
const observer = typeof IntersectionObserver === 'function' ? new IntersectionObserver(handleIntersect, {
rootMargin: '200px'
}) : null;
function observeVisibility(element, instance) {
const existingInstance = prefetchable.get(element);
if (existingInstance !== undefined) {
// This shouldn't happen because each component should have its own
// anchor tag instance, but it's defensive coding to avoid a memory leak in
// case there's a logical error somewhere else.
unmountPrefetchableInstance(element);
}
// Only track prefetchable links that have a valid prefetch URL
prefetchable.set(element, instance);
if (observer !== null) {
observer.observe(element);
}
}
function coercePrefetchableUrl(href) {
try {
return (0, _approuter.createPrefetchURL)(href);
} catch (e) {
// createPrefetchURL sometimes throws an error if an invalid URL is
// provided, though I'm not sure if it's actually necessary.
// TODO: Consider removing the throw from the inner function, or change it
// to reportError. Or maybe the error isn't even necessary for automatic
// prefetches, just navigations.
const reportErrorFn = typeof reportError === 'function' ? reportError : console.error;
reportErrorFn("Cannot prefetch '" + href + "' because it cannot be converted to a URL.");
return null;
}
}
function mountLinkInstance(element, href, router, kind, prefetchEnabled, setOptimisticLinkStatus) {
if (prefetchEnabled) {
const prefetchURL = coercePrefetchableUrl(href);
if (prefetchURL !== null) {
const instance = {
router,
kind,
isVisible: false,
wasHoveredOrTouched: false,
prefetchTask: null,
cacheVersion: -1,
prefetchHref: prefetchURL.href,
setOptimisticLinkStatus
};
// We only observe the link's visibility if it's prefetchable. For
// example, this excludes links to external URLs.
observeVisibility(element, instance);
return instance;
}
}
// If the link is not prefetchable, we still create an instance so we can
// track its optimistic state (i.e. useLinkStatus).
const instance = {
router,
kind,
isVisible: false,
wasHoveredOrTouched: false,
prefetchTask: null,
cacheVersion: -1,
prefetchHref: null,
setOptimisticLinkStatus
};
return instance;
}
function mountFormInstance(element, href, router, kind) {
const prefetchURL = coercePrefetchableUrl(href);
if (prefetchURL === null) {
// This href is not prefetchable, so we don't track it.
// TODO: We currently observe/unobserve a form every time its href changes.
// For Links, this isn't a big deal because the href doesn't usually change,
// but for forms it's extremely common. We should optimize this.
return;
}
const instance = {
router,
kind,
isVisible: false,
wasHoveredOrTouched: false,
prefetchTask: null,
cacheVersion: -1,
prefetchHref: prefetchURL.href,
setOptimisticLinkStatus: null
};
observeVisibility(element, instance);
}
function unmountPrefetchableInstance(element) {
const instance = prefetchable.get(element);
if (instance !== undefined) {
prefetchable.delete(element);
prefetchableAndVisible.delete(instance);
const prefetchTask = instance.prefetchTask;
if (prefetchTask !== null) {
(0, _segmentcache.cancelPrefetchTask)(prefetchTask);
}
}
if (observer !== null) {
observer.unobserve(element);
}
}
function handleIntersect(entries) {
for (const entry of entries){
// Some extremely old browsers or polyfills don't reliably support
// isIntersecting so we check intersectionRatio instead. (Do we care? Not
// really. But whatever this is fine.)
const isVisible = entry.intersectionRatio > 0;
onLinkVisibilityChanged(entry.target, isVisible);
}
}
function onLinkVisibilityChanged(element, isVisible) {
if ("TURBOPACK compile-time truthy", 1) {
// Prefetching on viewport is disabled in development for performance
// reasons, because it requires compiling the target page.
// TODO: Investigate re-enabling this.
return;
}
"TURBOPACK unreachable";
const instance = undefined;
}
function onNavigationIntent(element, unstable_upgradeToDynamicPrefetch) {
const instance = prefetchable.get(element);
if (instance === undefined) {
return;
}
// Prefetch the link on hover/touchstart.
if (instance !== undefined) {
instance.wasHoveredOrTouched = true;
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
rescheduleLinkPrefetch(instance);
}
}
function rescheduleLinkPrefetch(instance) {
const existingPrefetchTask = instance.prefetchTask;
if (!instance.isVisible) {
// Cancel any in-progress prefetch task. (If it already finished then this
// is a no-op.)
if (existingPrefetchTask !== null) {
(0, _segmentcache.cancelPrefetchTask)(existingPrefetchTask);
}
// We don't need to reset the prefetchTask to null upon cancellation; an
// old task object can be rescheduled with reschedulePrefetchTask. This is a
// micro-optimization but also makes the code simpler (don't need to
// worry about whether an old task object is stale).
return;
}
if ("TURBOPACK compile-time truthy", 1) {
// The old prefetch implementation does not have different priority levels.
// Just schedule a new prefetch task.
prefetchWithOldCacheImplementation(instance);
return;
}
"TURBOPACK unreachable";
// In the Segment Cache implementation, we assign a higher priority level to
// links that were at one point hovered or touched. Since the queue is last-
// in-first-out, the highest priority Link is whichever one was hovered last.
//
// We also increase the relative priority of links whenever they re-enter the
// viewport, as if they were being scheduled for the first time.
const priority = undefined;
const appRouterState = undefined;
}
function pingVisibleLinks(nextUrl, tree) {
// For each currently visible link, cancel the existing prefetch task (if it
// exists) and schedule a new one. This is effectively the same as if all the
// visible links left and then re-entered the viewport.
//
// This is called when the Next-Url or the base tree changes, since those
// may affect the result of a prefetch task. It's also called after a
// cache invalidation.
const currentCacheVersion = (0, _segmentcache.getCurrentCacheVersion)();
for (const instance of prefetchableAndVisible){
const task = instance.prefetchTask;
if (task !== null && instance.cacheVersion === currentCacheVersion && task.key.nextUrl === nextUrl && task.treeAtTimeOfPrefetch === tree) {
continue;
}
// Something changed. Cancel the existing prefetch task and schedule a
// new one.
if (task !== null) {
(0, _segmentcache.cancelPrefetchTask)(task);
}
const cacheKey = (0, _segmentcache.createCacheKey)(instance.prefetchHref, nextUrl);
const priority = instance.wasHoveredOrTouched ? _segmentcache.PrefetchPriority.Intent : _segmentcache.PrefetchPriority.Default;
instance.prefetchTask = (0, _segmentcache.schedulePrefetchTask)(cacheKey, tree, instance.kind === _routerreducertypes.PrefetchKind.FULL, priority);
instance.cacheVersion = (0, _segmentcache.getCurrentCacheVersion)();
}
}
function prefetchWithOldCacheImplementation(instance) {
// This is the path used when the Segment Cache is not enabled.
if (typeof window === 'undefined') {
return;
}
const doPrefetch = async ()=>{
// note that `appRouter.prefetch()` is currently sync,
// so we have to wrap this call in an async function to be able to catch() errors below.
return instance.router.prefetch(instance.prefetchHref, {
kind: instance.kind
});
};
// Prefetch the page if asked (only in the client)
// We need to handle a prefetch error here since we may be
// loading with priority which can reject but we don't
// want to force navigation since this is only a prefetch
doPrefetch().catch((err)=>{
if (("TURBOPACK compile-time value", "development") !== 'production') {
// rethrow to show invalid URL errors
throw err;
}
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=links.js.map
}}),
"[project]/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HTTPAccessFallbackBoundary", {
enumerable: true,
get: function() {
return HTTPAccessFallbackBoundary;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _navigationuntracked = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation-untracked.js [app-client] (ecmascript)");
const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-client] (ecmascript)");
const _warnonce = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils/warn-once.js [app-client] (ecmascript)");
const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js [app-client] (ecmascript)");
class HTTPAccessFallbackErrorBoundary extends _react.default.Component {
componentDidCatch() {
if (("TURBOPACK compile-time value", "development") === 'development' && this.props.missingSlots && this.props.missingSlots.size > 0 && // A missing children slot is the typical not-found case, so no need to warn
!this.props.missingSlots.has('children')) {
let warningMessage = 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\n\n';
const formattedSlots = Array.from(this.props.missingSlots).sort((a, b)=>a.localeCompare(b)).map((slot)=>"@" + slot).join(', ');
warningMessage += 'Missing slots: ' + formattedSlots;
(0, _warnonce.warnOnce)(warningMessage);
}
}
static getDerivedStateFromError(error) {
if ((0, _httpaccessfallback.isHTTPAccessFallbackError)(error)) {
const httpStatus = (0, _httpaccessfallback.getAccessFallbackHTTPStatus)(error);
return {
triggeredStatus: httpStatus
};
}
// Re-throw if error is not for 404
throw error;
}
static getDerivedStateFromProps(props, state) {
/**
* Handles reset of the error boundary when a navigation happens.
* Ensures the error boundary does not stay enabled when navigating to a new page.
* Approach of setState in render is safe as it checks the previous pathname and then overrides
* it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders
*/ if (props.pathname !== state.previousPathname && state.triggeredStatus) {
return {
triggeredStatus: undefined,
previousPathname: props.pathname
};
}
return {
triggeredStatus: state.triggeredStatus,
previousPathname: props.pathname
};
}
render() {
const { notFound, forbidden, unauthorized, children } = this.props;
const { triggeredStatus } = this.state;
const errorComponents = {
[_httpaccessfallback.HTTPAccessErrorStatus.NOT_FOUND]: notFound,
[_httpaccessfallback.HTTPAccessErrorStatus.FORBIDDEN]: forbidden,
[_httpaccessfallback.HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized
};
if (triggeredStatus) {
const isNotFound = triggeredStatus === _httpaccessfallback.HTTPAccessErrorStatus.NOT_FOUND && notFound;
const isForbidden = triggeredStatus === _httpaccessfallback.HTTPAccessErrorStatus.FORBIDDEN && forbidden;
const isUnauthorized = triggeredStatus === _httpaccessfallback.HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized;
// If there's no matched boundary in this layer, keep throwing the error by rendering the children
if (!(isNotFound || isForbidden || isUnauthorized)) {
return children;
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
name: "robots",
content: "noindex"
}),
("TURBOPACK compile-time value", "development") === 'development' && /*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
name: "boundary-next-error",
content: (0, _httpaccessfallback.getAccessFallbackErrorTypeByStatus)(triggeredStatus)
}),
errorComponents[triggeredStatus]
]
});
}
return children;
}
constructor(props){
super(props);
this.state = {
triggeredStatus: undefined,
previousPathname: props.pathname
};
}
}
function HTTPAccessFallbackBoundary(param) {
let { notFound, forbidden, unauthorized, children } = param;
// When we're rendering the missing params shell, this will return null. This
// is because we won't be rendering any not found boundaries or error
// boundaries for the missing params shell. When this runs on the client
// (where these error can occur), we will get the correct pathname.
const pathname = (0, _navigationuntracked.useUntrackedPathname)();
const missingSlots = (0, _react.useContext)(_approutercontextsharedruntime.MissingSlotContext);
const hasErrorFallback = !!(notFound || forbidden || unauthorized);
if (hasErrorFallback) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(HTTPAccessFallbackErrorBoundary, {
pathname: pathname,
notFound: notFound,
forbidden: forbidden,
unauthorized: unauthorized,
missingSlots: missingSlots,
children: children
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
children: children
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-boundary.js.map
}}),
"[project]/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DevRootHTTPAccessFallbackBoundary: null,
bailOnRootNotFound: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DevRootHTTPAccessFallbackBoundary: function() {
return DevRootHTTPAccessFallbackBoundary;
},
bailOnRootNotFound: function() {
return bailOnRootNotFound;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _errorboundary = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js [app-client] (ecmascript)");
function bailOnRootNotFound() {
throw Object.defineProperty(new Error('notFound() is not allowed to use in root layout'), "__NEXT_ERROR_CODE", {
value: "E192",
enumerable: false,
configurable: true
});
}
function NotAllowedRootHTTPFallbackError() {
bailOnRootNotFound();
return null;
}
function DevRootHTTPAccessFallbackBoundary(param) {
let { children } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.HTTPAccessFallbackBoundary, {
notFound: /*#__PURE__*/ (0, _jsxruntime.jsx)(NotAllowedRootHTTPFallbackError, {}),
children: children
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dev-root-http-access-fallback-boundary.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/format-webpack-messages.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/**
MIT License
Copyright (c) 2015-present, Facebook, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return formatWebpackMessages;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _stripansi = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/strip-ansi/index.js [app-client] (ecmascript)"));
// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js
// It's been edited to remove chalk and CRA-specific logic
const friendlySyntaxErrorLabel = 'Syntax error:';
const WEBPACK_BREAKING_CHANGE_POLYFILLS = '\n\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.';
function isLikelyASyntaxError(message) {
return (0, _stripansi.default)(message).includes(friendlySyntaxErrorLabel);
}
let hadMissingSassError = false;
// Cleans up webpack error messages.
function formatMessage(message, verbose, importTraceNote) {
// TODO: Replace this once webpack 5 is stable
if (typeof message === 'object' && message.message) {
const filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\.js/.test(trace.originName));
let body = message.message;
const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS);
if (breakingChangeIndex >= 0) {
body = body.slice(0, breakingChangeIndex);
}
message = (message.moduleName ? (0, _stripansi.default)(message.moduleName) + '\n' : '') + (message.file ? (0, _stripansi.default)(message.file) + '\n' : '') + body + (message.details && verbose ? '\n' + message.details : '') + (filteredModuleTrace && filteredModuleTrace.length ? (importTraceNote || '\n\nImport trace for requested module:') + filteredModuleTrace.map((trace)=>"\n" + trace.moduleName).join('') : '') + (message.stack && verbose ? '\n' + message.stack : '');
}
let lines = message.split('\n');
// Strip Webpack-added headers off errors/warnings
// https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
lines = lines.filter((line)=>!/Module [A-z ]+\(from/.test(line));
// Transform parsing error into syntax error
// TODO: move this to our ESLint formatter?
lines = lines.map((line)=>{
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(line);
if (!parsingError) {
return line;
}
const [, errorLine, errorColumn, errorMessage] = parsingError;
return friendlySyntaxErrorLabel + " " + errorMessage + " (" + errorLine + ":" + errorColumn + ")";
});
message = lines.join('\n');
// Smoosh syntax errors (commonly found in CSS)
message = message.replace(/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g, "" + friendlySyntaxErrorLabel + " $3 ($1:$2)\n");
// Clean up export errors
message = message.replace(/^.*export '(.+?)' was not found in '(.+?)'.*$/gm, "Attempted import error: '$1' is not exported from '$2'.");
message = message.replace(/^.*export 'default' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, "Attempted import error: '$2' does not contain a default export (imported as '$1').");
message = message.replace(/^.*export '(.+?)' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, "Attempted import error: '$1' is not exported from '$3' (imported as '$2').");
lines = message.split('\n');
// Remove leading newline
if (lines.length > 2 && lines[1].trim() === '') {
lines.splice(1, 1);
}
// Cleans up verbose "module not found" messages for files and packages.
if (lines[1] && lines[1].startsWith('Module not found: ')) {
lines = [
lines[0],
lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'),
...lines.slice(2)
];
}
// Add helpful message for users trying to use Sass for the first time
if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {
// ./file.module.scss (<>) => ./file.module.scss
const firstLine = lines[0].split('!');
lines[0] = firstLine[firstLine.length - 1];
lines[1] = "To use Next.js' built-in Sass support, you first need to install `sass`.\n";
lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\n';
lines[1] += '\nLearn more: https://nextjs.org/docs/messages/install-sass';
// dispose of unhelpful stack trace
lines = lines.slice(0, 2);
hadMissingSassError = true;
} else if (hadMissingSassError && message.match(/(sass-loader|resolve-url-loader: CSS error)/)) {
// dispose of unhelpful stack trace following missing sass module
lines = [];
}
if (!verbose) {
message = lines.join('\n');
// Internal stacks are generally useless so we strip them... with the
// exception of stacks containing `webpack:` because they're normally
// from user code generated by Webpack. For more information see
// https://github.com/facebook/create-react-app/pull/1050
message = message.replace(/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm, '') // at ... ...:x:y
;
message = message.replace(/^\s*at\s(\n|$)/gm, '') // at
;
message = message.replace(/File was processed with these loaders:\n(.+[\\/](next[\\/]dist[\\/].+|@next[\\/]react-refresh-utils[\\/]loader)\.js\n)*You may need an additional loader to handle the result of these loaders.\n/g, '');
lines = message.split('\n');
}
// Remove duplicated newlines
lines = lines.filter((line, index, arr)=>index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim());
// Reassemble the message
message = lines.join('\n');
return message.trim();
}
function formatWebpackMessages(json, verbose) {
const formattedErrors = json.errors.map((message)=>{
const isUnknownNextFontError = message.message.includes('An error occurred in `next/font`.');
return formatMessage(message, isUnknownNextFontError || verbose);
});
const formattedWarnings = json.warnings.map((message)=>{
return formatMessage(message, verbose);
});
// Reorder errors to put the most relevant ones first.
let reactServerComponentsError = -1;
for(let i = 0; i < formattedErrors.length; i++){
const error = formattedErrors[i];
if (error.includes('ReactServerComponentsError')) {
reactServerComponentsError = i;
break;
}
}
// Move the reactServerComponentsError to the top if it exists
if (reactServerComponentsError !== -1) {
const error = formattedErrors.splice(reactServerComponentsError, 1);
formattedErrors.unshift(error[0]);
}
const result = {
...json,
errors: formattedErrors,
warnings: formattedWarnings
};
if (!verbose && result.errors.some(isLikelyASyntaxError)) {
// If there are any syntax errors, show just them.
result.errors = result.errors.filter(isLikelyASyntaxError);
result.warnings = [];
}
return result;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=format-webpack-messages.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ACTION_BEFORE_REFRESH: null,
ACTION_BUILD_ERROR: null,
ACTION_BUILD_OK: null,
ACTION_DEBUG_INFO: null,
ACTION_DEV_INDICATOR: null,
ACTION_REFRESH: null,
ACTION_STATIC_INDICATOR: null,
ACTION_UNHANDLED_ERROR: null,
ACTION_UNHANDLED_REJECTION: null,
ACTION_VERSION_INFO: null,
INITIAL_OVERLAY_STATE: null,
REACT_REFRESH_FULL_RELOAD: null,
REACT_REFRESH_FULL_RELOAD_FROM_ERROR: null,
STORAGE_KEY_POSITION: null,
STORAGE_KEY_SCALE: null,
STORAGE_KEY_THEME: null,
reportInvalidHmrMessage: null,
useErrorOverlayReducer: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ACTION_BEFORE_REFRESH: function() {
return ACTION_BEFORE_REFRESH;
},
ACTION_BUILD_ERROR: function() {
return ACTION_BUILD_ERROR;
},
ACTION_BUILD_OK: function() {
return ACTION_BUILD_OK;
},
ACTION_DEBUG_INFO: function() {
return ACTION_DEBUG_INFO;
},
ACTION_DEV_INDICATOR: function() {
return ACTION_DEV_INDICATOR;
},
ACTION_REFRESH: function() {
return ACTION_REFRESH;
},
ACTION_STATIC_INDICATOR: function() {
return ACTION_STATIC_INDICATOR;
},
ACTION_UNHANDLED_ERROR: function() {
return ACTION_UNHANDLED_ERROR;
},
ACTION_UNHANDLED_REJECTION: function() {
return ACTION_UNHANDLED_REJECTION;
},
ACTION_VERSION_INFO: function() {
return ACTION_VERSION_INFO;
},
INITIAL_OVERLAY_STATE: function() {
return INITIAL_OVERLAY_STATE;
},
REACT_REFRESH_FULL_RELOAD: function() {
return REACT_REFRESH_FULL_RELOAD;
},
REACT_REFRESH_FULL_RELOAD_FROM_ERROR: function() {
return REACT_REFRESH_FULL_RELOAD_FROM_ERROR;
},
STORAGE_KEY_POSITION: function() {
return STORAGE_KEY_POSITION;
},
STORAGE_KEY_SCALE: function() {
return STORAGE_KEY_SCALE;
},
STORAGE_KEY_THEME: function() {
return STORAGE_KEY_THEME;
},
reportInvalidHmrMessage: function() {
return reportInvalidHmrMessage;
},
useErrorOverlayReducer: function() {
return useErrorOverlayReducer;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
var _process_env___NEXT_DEV_INDICATOR;
const ACTION_STATIC_INDICATOR = 'static-indicator';
const ACTION_BUILD_OK = 'build-ok';
const ACTION_BUILD_ERROR = 'build-error';
const ACTION_BEFORE_REFRESH = 'before-fast-refresh';
const ACTION_REFRESH = 'fast-refresh';
const ACTION_VERSION_INFO = 'version-info';
const ACTION_UNHANDLED_ERROR = 'unhandled-error';
const ACTION_UNHANDLED_REJECTION = 'unhandled-rejection';
const ACTION_DEBUG_INFO = 'debug-info';
const ACTION_DEV_INDICATOR = 'dev-indicator';
const STORAGE_KEY_THEME = '__nextjs-dev-tools-theme';
const STORAGE_KEY_POSITION = '__nextjs-dev-tools-position';
const STORAGE_KEY_SCALE = '__nextjs-dev-tools-scale';
function pushErrorFilterDuplicates(errors, err) {
return [
...errors.filter((e)=>{
// Filter out duplicate errors
return e.event.reason.stack !== err.event.reason.stack;
}),
err
];
}
const shouldDisableDevIndicator = ((_process_env___NEXT_DEV_INDICATOR = ("TURBOPACK compile-time value", true)) == null ? void 0 : _process_env___NEXT_DEV_INDICATOR.toString()) === 'false';
const INITIAL_OVERLAY_STATE = {
nextId: 1,
buildError: null,
errors: [],
notFound: false,
staticIndicator: false,
/*
This is set to `true` when we can reliably know
whether the indicator is in disabled state or not.
Otherwise the surface would flicker because the disabled flag loads from the config.
*/ showIndicator: false,
disableDevIndicator: false,
refreshState: {
type: 'idle'
},
versionInfo: {
installed: '0.0.0',
staleness: 'unknown'
},
debugInfo: {
devtoolsFrontendUrl: undefined
}
};
function getInitialState(routerType) {
return {
...INITIAL_OVERLAY_STATE,
routerType
};
}
function useErrorOverlayReducer(routerType) {
return (0, _react.useReducer)((state, action)=>{
switch(action.type){
case ACTION_DEBUG_INFO:
{
return {
...state,
debugInfo: action.debugInfo
};
}
case ACTION_STATIC_INDICATOR:
{
return {
...state,
staticIndicator: action.staticIndicator
};
}
case ACTION_BUILD_OK:
{
return {
...state,
buildError: null
};
}
case ACTION_BUILD_ERROR:
{
return {
...state,
buildError: action.message
};
}
case ACTION_BEFORE_REFRESH:
{
return {
...state,
refreshState: {
type: 'pending',
errors: []
}
};
}
case ACTION_REFRESH:
{
return {
...state,
buildError: null,
errors: // and UNHANDLED_REJECTION events might be dispatched between the
// BEFORE_REFRESH and the REFRESH event. We want to keep those errors
// around until the next refresh. Otherwise we run into a race
// condition where those errors would be cleared on refresh completion
// before they can be displayed.
state.refreshState.type === 'pending' ? state.refreshState.errors : [],
refreshState: {
type: 'idle'
}
};
}
case ACTION_UNHANDLED_ERROR:
case ACTION_UNHANDLED_REJECTION:
{
switch(state.refreshState.type){
case 'idle':
{
return {
...state,
nextId: state.nextId + 1,
errors: pushErrorFilterDuplicates(state.errors, {
id: state.nextId,
event: action
})
};
}
case 'pending':
{
return {
...state,
nextId: state.nextId + 1,
refreshState: {
...state.refreshState,
errors: pushErrorFilterDuplicates(state.refreshState.errors, {
id: state.nextId,
event: action
})
}
};
}
default:
return state;
}
}
case ACTION_VERSION_INFO:
{
return {
...state,
versionInfo: action.versionInfo
};
}
case ACTION_DEV_INDICATOR:
{
return {
...state,
showIndicator: true,
disableDevIndicator: shouldDisableDevIndicator || !!action.devIndicator.disabledUntil
};
}
default:
{
return state;
}
}
}, getInitialState(routerType));
}
const REACT_REFRESH_FULL_RELOAD = '[Fast Refresh] performing full reload\n\n' + "Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\n" + 'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\n' + 'Consider migrating the non-React component export to a separate file and importing it into both files.\n\n' + 'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\n' + 'Fast Refresh requires at least one parent function component in your React tree.';
const REACT_REFRESH_FULL_RELOAD_FROM_ERROR = '[Fast Refresh] performing full reload because your application had an unrecoverable error';
function reportInvalidHmrMessage(message, err) {
console.warn('[HMR] Invalid message: ' + JSON.stringify(message) + '\n' + (err instanceof Error && (err == null ? void 0 : err.stack) || ''));
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=shared.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/parse-stack.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseStack", {
enumerable: true,
get: function() {
return parseStack;
}
});
const _stacktraceparser = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js [app-client] (ecmascript)");
const _ishydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-hydration-error.js [app-client] (ecmascript)");
const regexNextStatic = /\/_next(\/static\/.+)/;
function parseStack(stack) {
if (!stack) return [];
const messageAndStack = stack.replace(/^Error: /, '');
if ((0, _ishydrationerror.isReactHydrationErrorMessage)(messageAndStack)) {
const { stack: parsedStack } = (0, _ishydrationerror.getHydrationErrorStackInfo)(messageAndStack);
if (parsedStack) {
stack = parsedStack;
}
}
// throw away eval information that stacktrace-parser doesn't support
// adapted from https://github.com/stacktracejs/error-stack-parser/blob/9f33c224b5d7b607755eb277f9d51fcdb7287e24/error-stack-parser.js#L59C33-L59C62
stack = stack.split('\n').map((line)=>{
if (line.includes('(eval ')) {
line = line.replace(/eval code/g, 'eval').replace(/\(eval at [^()]* \(/, '(file://').replace(/\),.*$/g, ')');
}
return line;
}).join('\n');
const frames = (0, _stacktraceparser.parse)(stack);
return frames.map((frame)=>{
try {
const url = new URL(frame.file);
const res = regexNextStatic.exec(url.pathname);
if (res) {
var _process_env___NEXT_DIST_DIR_replace, _process_env___NEXT_DIST_DIR;
const distDir = (_process_env___NEXT_DIST_DIR = ("TURBOPACK compile-time value", "/home/user/studio/.next")) == null ? void 0 : (_process_env___NEXT_DIST_DIR_replace = _process_env___NEXT_DIST_DIR.replace(/\\/g, '/')) == null ? void 0 : _process_env___NEXT_DIST_DIR_replace.replace(/\/$/, '');
if (distDir) {
frame.file = 'file://' + distDir.concat(res.pop()) + url.search;
}
}
} catch (e) {}
return frame;
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=parse-stack.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "css", {
enumerable: true,
get: function() {
return css;
}
});
function css(strings) {
for(var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
keys[_key - 1] = arguments[_key];
}
const lastIndex = strings.length - 1;
const str = strings.slice(0, lastIndex).reduce((p, s, i)=>p + s + keys[i], '') + strings[lastIndex];
return str // Remove comments
.replace(/\/\*[\s\S]*?\*\//g, '') // Remove whitespace, tabs, and newlines
.replace(/\s+/g, ' ') // Remove spaces before and after semicolons, and spaces after commas
.replace(/\s*([:;,{}])\s*/g, '$1') // Remove extra semicolons
.replace(/;+}/g, '}') // Trim leading and trailing whitespaces
.trim();
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=css.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/font/font-styles.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "FontStyles", {
enumerable: true,
get: function() {
return FontStyles;
}
});
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n /* latin-ext */\n @font-face {\n font-family: '__nextjs-Geist';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-latin-ext.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,\n U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,\n U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: '__nextjs-Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-mono-latin-ext.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,\n U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,\n U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: '__nextjs-Geist';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-latin.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,\n U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,\n U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin */\n @font-face {\n font-family: '__nextjs-Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-mono-latin.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,\n U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,\n U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n "
]);
_templateObject = function() {
return data;
};
return data;
}
const FontStyles = ()=>{
(0, _react.useInsertionEffect)(()=>{
const style = document.createElement('style');
style.textContent = (0, _css.css)(_templateObject());
document.head.appendChild(style);
return ()=>{
document.head.removeChild(style);
};
}, []);
return null;
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=font-styles.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/shadow-portal.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ShadowPortal", {
enumerable: true,
get: function() {
return ShadowPortal;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _reactdom = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react-dom/index.js [app-client] (ecmascript)");
const _shared = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)");
function ShadowPortal(param) {
let { children } = param;
let portalNode = _react.useRef(null);
let shadowNode = _react.useRef(null);
let [, forceUpdate] = _react.useState();
// Don't use useLayoutEffect here, as it will cause warnings during SSR in React 18.
// Don't use useSyncExternalStore as an SSR gate unless you verified it doesn't
// downgrade a Transition of the initial root render to a sync render or
// we can assure the root render is not a Transition.
_react.useEffect({
"ShadowPortal.useEffect": ()=>{
const ownerDocument = document;
portalNode.current = ownerDocument.createElement('nextjs-portal');
// load default color preference from localstorage
if (typeof localStorage !== 'undefined') {
const theme = localStorage.getItem(_shared.STORAGE_KEY_THEME);
if (theme === 'dark') {
portalNode.current.classList.add('dark');
portalNode.current.classList.remove('light');
} else if (theme === 'light') {
portalNode.current.classList.remove('dark');
portalNode.current.classList.add('light');
}
}
shadowNode.current = portalNode.current.attachShadow({
mode: 'open'
});
ownerDocument.body.appendChild(portalNode.current);
forceUpdate({});
return ({
"ShadowPortal.useEffect": ()=>{
if (portalNode.current && portalNode.current.ownerDocument) {
portalNode.current.ownerDocument.body.removeChild(portalNode.current);
}
}
})["ShadowPortal.useEffect"];
}
}["ShadowPortal.useEffect"], []);
return shadowNode.current ? /*#__PURE__*/ (0, _reactdom.createPortal)(children, shadowNode.current) : null;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=shadow-portal.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/base.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Base", {
enumerable: true,
get: function() {
return Base;
}
});
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n :host {\n /* \n * Although the style applied to the shadow host is isolated,\n * the element that attached the shadow host (i.e. \"nextjs-portal\")\n * is still affected by the parent's style (e.g. \"body\"). This may\n * occur style conflicts like \"display: flex\", with other children\n * elements therefore give the shadow host an absolute position.\n */\n position: absolute;\n\n --color-font: #757575;\n --color-backdrop: rgba(250, 250, 250, 0.8);\n --color-border-shadow: rgba(0, 0, 0, 0.145);\n\n --color-title-color: #1f1f1f;\n --color-stack-notes: #777;\n\n --color-accents-1: #808080;\n --color-accents-2: #222222;\n --color-accents-3: #404040;\n\n --font-stack-monospace: '__nextjs-Geist Mono', 'Geist Mono',\n 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n --font-stack-sans: '__nextjs-Geist', 'Geist', -apple-system,\n 'Source Sans Pro', sans-serif;\n\n font-family: var(--font-stack-sans);\n font-variant-ligatures: none;\n\n /* TODO: Remove replaced ones. */\n --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),\n 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),\n 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --shadow-none: 0 0 #0000;\n\n --shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.04);\n --shadow-menu: 0px 1px 1px rgba(0, 0, 0, 0.02),\n 0px 4px 8px -4px rgba(0, 0, 0, 0.04),\n 0px 16px 24px -8px rgba(0, 0, 0, 0.06);\n\n --focus-color: var(--color-blue-800);\n --focus-ring: 2px solid var(--focus-color);\n\n --timing-swift: cubic-bezier(0.23, 0.88, 0.26, 0.92);\n --timing-overlay: cubic-bezier(0.175, 0.885, 0.32, 1.1);\n\n --rounded-none: 0px;\n --rounded-sm: 2px;\n --rounded-md: 4px;\n --rounded-md-2: 6px;\n --rounded-lg: 8px;\n --rounded-xl: 12px;\n --rounded-2xl: 16px;\n --rounded-3xl: 24px;\n --rounded-4xl: 32px;\n --rounded-full: 9999px;\n\n /* \n This value gets set from the Dev Tools preferences,\n and we use the following --size-* variables to \n scale the relevant elements.\n\n The reason why we don't rely on rem values is because\n if an app sets their root font size to something tiny, \n it feels unexpected to have the app root size leak \n into a Next.js surface.\n\n https://github.com/vercel/next.js/discussions/76812\n */\n --nextjs-dev-tools-scale: ",
";\n --size-1: calc(1px / var(--nextjs-dev-tools-scale));\n --size-2: calc(2px / var(--nextjs-dev-tools-scale));\n --size-3: calc(3px / var(--nextjs-dev-tools-scale));\n --size-4: calc(4px / var(--nextjs-dev-tools-scale));\n --size-5: calc(5px / var(--nextjs-dev-tools-scale));\n --size-6: calc(6px / var(--nextjs-dev-tools-scale));\n --size-7: calc(7px / var(--nextjs-dev-tools-scale));\n --size-8: calc(8px / var(--nextjs-dev-tools-scale));\n --size-9: calc(9px / var(--nextjs-dev-tools-scale));\n --size-10: calc(10px / var(--nextjs-dev-tools-scale));\n --size-11: calc(11px / var(--nextjs-dev-tools-scale));\n --size-12: calc(12px / var(--nextjs-dev-tools-scale));\n --size-13: calc(13px / var(--nextjs-dev-tools-scale));\n --size-14: calc(14px / var(--nextjs-dev-tools-scale));\n --size-15: calc(15px / var(--nextjs-dev-tools-scale));\n --size-16: calc(16px / var(--nextjs-dev-tools-scale));\n --size-17: calc(17px / var(--nextjs-dev-tools-scale));\n --size-18: calc(18px / var(--nextjs-dev-tools-scale));\n --size-20: calc(20px / var(--nextjs-dev-tools-scale));\n --size-22: calc(22px / var(--nextjs-dev-tools-scale));\n --size-24: calc(24px / var(--nextjs-dev-tools-scale));\n --size-26: calc(26px / var(--nextjs-dev-tools-scale));\n --size-28: calc(28px / var(--nextjs-dev-tools-scale));\n --size-30: calc(30px / var(--nextjs-dev-tools-scale));\n --size-32: calc(32px / var(--nextjs-dev-tools-scale));\n --size-34: calc(34px / var(--nextjs-dev-tools-scale));\n --size-36: calc(36px / var(--nextjs-dev-tools-scale));\n --size-38: calc(38px / var(--nextjs-dev-tools-scale));\n --size-40: calc(40px / var(--nextjs-dev-tools-scale));\n --size-42: calc(42px / var(--nextjs-dev-tools-scale));\n --size-44: calc(44px / var(--nextjs-dev-tools-scale));\n --size-46: calc(46px / var(--nextjs-dev-tools-scale));\n --size-48: calc(48px / var(--nextjs-dev-tools-scale));\n\n @media print {\n display: none;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-bottom: 8px;\n font-weight: 500;\n line-height: 1.5;\n }\n\n a {\n color: var(--color-blue-900);\n &:hover {\n color: var(--color-blue-900);\n }\n &:focus {\n outline: var(--focus-ring);\n }\n }\n "
]);
_templateObject = function() {
return data;
};
return data;
}
function Base(param) {
let { scale = 1 } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
children: (0, _css.css)(_templateObject(), String(scale))
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=base.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hot-linked-text/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HotlinkedText", {
enumerable: true,
get: function() {
return HotlinkedText;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _magicidentifier = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/magic-identifier.js [app-client] (ecmascript)");
const linkRegex = /https?:\/\/[^\s/$.?#].[^\s)'"]*/i;
const splitRegexp = new RegExp("(" + _magicidentifier.MAGIC_IDENTIFIER_REGEX.source + "|\\s+)");
const HotlinkedText = function HotlinkedText(props) {
const { text, matcher } = props;
const wordsAndWhitespaces = text.split(splitRegexp);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
children: wordsAndWhitespaces.map((word, index)=>{
if (linkRegex.test(word)) {
const link = linkRegex.exec(word);
const href = link[0];
// If link matcher is present but the link doesn't match, don't turn it into a link
if (typeof matcher === 'function' && !matcher(href)) {
return word;
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.default.Fragment, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
href: href,
target: "_blank",
rel: "noreferrer noopener",
children: word
})
}, "link-" + index);
}
try {
const decodedWord = (0, _magicidentifier.decodeMagicIdentifier)(word);
if (decodedWord !== word) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("i", {
children: [
'{',
decodedWord,
'}'
]
}, "ident-" + index);
}
} catch (e) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("i", {
children: [
'{',
word,
" (decoding failed: ",
'' + e,
")",
'}'
]
}, "ident-" + index);
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.default.Fragment, {
children: word
}, "text-" + index);
})
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/webpack-module-path.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
formatFrameSourceFile: null,
isWebpackInternalResource: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatFrameSourceFile: function() {
return formatFrameSourceFile;
},
isWebpackInternalResource: function() {
return isWebpackInternalResource;
}
});
const replacementRegExes = [
/^webpack-internal:\/\/\/(\([\w-]+\)\/)?/,
/^(webpack:\/\/\/|webpack:\/\/(_N_E\/)?)(\([\w-]+\)\/)?/
];
function isWebpackInternalResource(file) {
for (const regex of replacementRegExes){
if (regex.test(file)) return true;
file = file.replace(regex, '');
}
return false;
}
function formatFrameSourceFile(file) {
for (const regex of replacementRegExes){
file = file.replace(regex, '');
}
return file;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=webpack-module-path.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/stack-frame.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getFrameSource: null,
getOriginalStackFrames: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getFrameSource: function() {
return getFrameSource;
},
getOriginalStackFrames: function() {
return getOriginalStackFrames;
}
});
const _webpackmodulepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/webpack-module-path.js [app-client] (ecmascript)");
function getOriginalStackFrame(source, response) {
var _source_file;
async function _getOriginalStackFrame() {
var _body_originalStackFrame;
if (response.status === 'rejected') {
throw Object.defineProperty(new Error(response.reason), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
const body = response.value;
return {
error: false,
reason: null,
external: false,
sourceStackFrame: source,
originalStackFrame: body.originalStackFrame,
originalCodeFrame: body.originalCodeFrame || null,
ignored: ((_body_originalStackFrame = body.originalStackFrame) == null ? void 0 : _body_originalStackFrame.ignored) || false
};
}
// TODO: merge this section into ignoredList handling
if (source.file === 'file://' || ((_source_file = source.file) == null ? void 0 : _source_file.match(/https?:\/\//))) {
return Promise.resolve({
error: false,
reason: null,
external: true,
sourceStackFrame: source,
originalStackFrame: null,
originalCodeFrame: null,
ignored: true
});
}
return _getOriginalStackFrame().catch((err)=>{
var _err_message, _ref;
return {
error: true,
reason: (_ref = (_err_message = err == null ? void 0 : err.message) != null ? _err_message : err == null ? void 0 : err.toString()) != null ? _ref : 'Unknown Error',
external: false,
sourceStackFrame: source,
originalStackFrame: null,
originalCodeFrame: null,
ignored: false
};
});
}
async function getOriginalStackFrames(frames, type, isAppDir) {
const req = {
frames,
isServer: type === 'server',
isEdgeServer: type === 'edge-server',
isAppDirectory: isAppDir
};
let res = undefined;
let reason = undefined;
try {
res = await fetch('/__nextjs_original-stack-frames', {
method: 'POST',
body: JSON.stringify(req)
});
} catch (e) {
reason = e + '';
}
// When fails to fetch the original stack frames, we reject here to be
// caught at `_getOriginalStackFrame()` and return the stack frames so
// that the error overlay can render.
if (res && res.ok && res.status !== 204) {
const data = await res.json();
return Promise.all(frames.map((frame, index)=>getOriginalStackFrame(frame, data[index])));
} else {
if (res) {
reason = await res.text();
}
}
return Promise.all(frames.map((frame)=>getOriginalStackFrame(frame, {
status: 'rejected',
reason: "Failed to fetch the original stack frames " + (reason ? ": " + reason : '')
})));
}
function getFrameSource(frame) {
if (!frame.file) return '';
const isWebpackFrame = (0, _webpackmodulepath.isWebpackInternalResource)(frame.file);
let str = '';
// Skip URL parsing for webpack internal file paths.
if (isWebpackFrame) {
str = (0, _webpackmodulepath.formatFrameSourceFile)(frame.file);
} else {
try {
var _globalThis_location;
const u = new URL(frame.file);
let parsedPath = '';
// Strip the origin for same-origin scripts.
if (((_globalThis_location = globalThis.location) == null ? void 0 : _globalThis_location.origin) !== u.origin) {
// URLs can be valid without an `origin`, so long as they have a
// `protocol`. However, `origin` is preferred.
if (u.origin === 'null') {
parsedPath += u.protocol;
} else {
parsedPath += u.origin;
}
}
// Strip query string information as it's typically too verbose to be
// meaningful.
parsedPath += u.pathname;
str = (0, _webpackmodulepath.formatFrameSourceFile)(parsedPath);
} catch (e) {
str = (0, _webpackmodulepath.formatFrameSourceFile)(frame.file);
}
}
if (!(0, _webpackmodulepath.isWebpackInternalResource)(frame.file) && frame.lineNumber != null) {
if (str) {
if (frame.column != null) {
str += " (" + frame.lineNumber + ":" + frame.column + ")";
} else {
str += " (" + frame.lineNumber + ")";
}
}
}
return str;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=stack-frame.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/use-open-in-editor.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useOpenInEditor", {
enumerable: true,
get: function() {
return useOpenInEditor;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function useOpenInEditor(param) {
let { file, lineNumber, column } = param === void 0 ? {} : param;
const openInEditor = (0, _react.useCallback)(()=>{
if (file == null || lineNumber == null || column == null) return;
const params = new URLSearchParams();
params.append('file', file);
params.append('lineNumber', String(lineNumber));
params.append('column', String(column));
self.fetch((("TURBOPACK compile-time value", "") || '') + "/__nextjs_launch-editor?" + params.toString()).then(()=>{}, (cause)=>{
console.error('Failed to open file "' + file + " (" + lineNumber + ":" + column + ')" in your editor. Cause:', cause);
});
}, [
file,
lineNumber,
column
]);
return openInEditor;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-open-in-editor.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/external.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ExternalIcon: null,
SourceMappingErrorIcon: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ExternalIcon: function() {
return ExternalIcon;
},
SourceMappingErrorIcon: function() {
return SourceMappingErrorIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function ExternalIcon(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
fill: "currentColor",
d: "M11.5 9.75V11.25C11.5 11.3881 11.3881 11.5 11.25 11.5H4.75C4.61193 11.5 4.5 11.3881 4.5 11.25L4.5 4.75C4.5 4.61193 4.61193 4.5 4.75 4.5H6.25H7V3H6.25H4.75C3.7835 3 3 3.7835 3 4.75V11.25C3 12.2165 3.7835 13 4.75 13H11.25C12.2165 13 13 12.2165 13 11.25V9.75V9H11.5V9.75ZM8.5 3H9.25H12.2495C12.6637 3 12.9995 3.33579 12.9995 3.75V6.75V7.5H11.4995V6.75V5.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L10.4388 4.5H9.25H8.5V3Z"
})
});
}
function SourceMappingErrorIcon(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
height: "16",
strokeLinejoin: "round",
viewBox: "-4 -4 24 24",
width: "16",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M8.55846 2H7.44148L1.88975 13.5H14.1102L8.55846 2ZM9.90929 1.34788C9.65902 0.829456 9.13413 0.5 8.55846 0.5H7.44148C6.86581 0.5 6.34092 0.829454 6.09065 1.34787L0.192608 13.5653C-0.127943 14.2293 0.355835 15 1.09316 15H14.9068C15.6441 15 16.1279 14.2293 15.8073 13.5653L9.90929 1.34788ZM8.74997 4.75V5.5V8V8.75H7.24997V8V5.5V4.75H8.74997ZM7.99997 12C8.55226 12 8.99997 11.5523 8.99997 11C8.99997 10.4477 8.55226 10 7.99997 10C7.44769 10 6.99997 10.4477 6.99997 11C6.99997 11.5523 7.44769 12 7.99997 12Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=external.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/file.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "FileIcon", {
enumerable: true,
get: function() {
return FileIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function FileIcon(param) {
let { lang } = param;
if (!lang) return /*#__PURE__*/ (0, _jsxruntime.jsx)(File, {});
switch(lang.toLowerCase()){
case 'jsx':
case 'tsx':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(React, {});
case 'ts':
case 'typescript':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Ts, {});
case 'javascript':
case 'js':
case 'mjs':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Js, {});
case 'json':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Json, {});
default:
return /*#__PURE__*/ (0, _jsxruntime.jsx)(File, {});
}
}
function Json() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
clipRule: "evenodd",
fillRule: "evenodd",
height: "16",
viewBox: "0 0 1321.45 1333.33",
width: "16",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M221.37 618.44h757.94V405.15H755.14c-23.5 0-56.32-12.74-71.82-28.24-15.5-15.5-25-43.47-25-66.97V82.89H88.39c-1.99 0-3.49 1-4.49 2-1.5 1-2 2.5-2 4.5v1155.04c0 1.5 1 3.5 2 4.5 1 1.49 3 1.99 4.49 1.99H972.8c2 0 1.89-.99 2.89-1.99 1.5-1 3.61-3 3.61-4.5v-121.09H221.36c-44.96 0-82-36.9-82-81.99V700.44c0-45.1 36.9-82 82-82zm126.51 117.47h75.24v146.61c0 30.79-2.44 54.23-7.33 70.31-4.92 16.03-14.8 29.67-29.65 40.85-14.86 11.12-33.91 16.72-57.05 16.72-24.53 0-43.51-3.71-56.94-11.06-13.5-7.36-23.89-18.1-31.23-32.3-7.35-14.14-11.69-31.67-12.99-52.53l71.5-10.81c.11 11.81 1.07 20.61 2.81 26.33 1.76 5.78 4.75 10.37 9 13.95 2.87 2.33 6.94 3.46 12.25 3.46 8.4 0 14.58-3.46 18.53-10.37 3.9-6.92 5.87-18.6 5.87-35V735.92zm112.77 180.67l71.17-4.97c1.54 12.81 4.69 22.62 9.44 29.28 7.74 10.88 18.74 16.34 33.09 16.34 10.68 0 18.93-2.76 24.68-8.36 5.81-5.58 8.7-12.07 8.7-19.41 0-6.97-2.71-13.26-8.2-18.79-5.47-5.53-18.23-10.68-38.28-15.65-32.89-8.17-56.27-19.1-70.26-32.74-14.12-13.57-21.18-30.92-21.18-52.03 0-13.83 3.61-26.89 10.85-39.21 7.22-12.38 18.07-22.06 32.59-29.09 14.52-7.04 34.4-10.56 59.65-10.56 31 0 54.62 6.41 70.88 19.29 16.28 12.81 25.92 33.24 29.04 61.27l-70.5 4.65c-1.87-12.25-5.81-21.17-11.81-26.7-6.05-5.6-14.35-8.36-24.9-8.36-8.71 0-15.31 2.07-19.73 6.16-4.4 4.09-6.59 9.12-6.59 15.02 0 4.27 1.81 8.11 5.37 11.57 3.45 3.59 11.8 6.85 25.02 9.93 32.75 7.86 56.2 15.84 70.31 23.87 14.18 8.05 24.52 17.98 30.96 29.92 6.44 11.88 9.66 25.2 9.66 39.96 0 17.29-4.3 33.24-12.88 47.89-8.63 14.58-20.61 25.7-36.08 33.24-15.41 7.54-34.85 11.31-58.33 11.31-41.24 0-69.81-8.86-85.68-26.52-15.88-17.65-24.85-40.09-26.96-67.3zm248.74-45.5c0-44.05 11.02-78.36 33.09-102.87 22.09-24.57 52.82-36.82 92.24-36.82 40.38 0 71.5 12.07 93.34 36.13 21.86 24.13 32.77 57.94 32.77 101.37 0 31.54-4.75 57.36-14.3 77.54-9.54 20.18-23.37 35.89-41.4 47.13-18.07 11.24-40.55 16.84-67.48 16.84-27.33 0-49.99-4.83-67.94-14.52-17.92-9.74-32.49-25.07-43.62-46.06-11.13-20.92-16.72-47.19-16.72-78.74zm74.89.19c0 27.21 4.57 46.81 13.68 58.68 9.13 11.88 21.57 17.85 37.26 17.85 16.1 0 28.65-5.84 37.45-17.47 8.87-11.68 13.28-32.54 13.28-62.77 0-25.39-4.63-43.92-13.84-55.61-9.26-11.76-21.75-17.6-37.56-17.6-15.13 0-27.34 5.97-36.49 17.85-9.21 11.88-13.78 31.61-13.78 59.07zm209.08-135.36h69.99l90.98 149.05V735.91h70.83v269.96h-70.83l-90.48-148.24v148.24h-70.49V735.91zm67.71-117.47h178.37c45.1 0 82 37.04 82 82v340.91c0 44.96-37.03 81.99-82 81.99h-178.37v147c0 17.5-6.99 32.99-18.5 44.5-11.5 11.49-27 18.5-44.5 18.5H62.97c-17.5 0-32.99-7-44.5-18.5-11.49-11.5-18.5-27-18.5-44.5V63.49c0-17.5 7-33 18.5-44.5S45.97.49 62.97.49H700.1c1.5-.5 3-.5 4.5-.5 7 0 14 3 19 7.49h1c1 .5 1.5 1 2.5 2l325.46 329.47c5.5 5.5 9.5 13 9.5 21.5 0 2.5-.5 4.5-1 7v250.98zM732.61 303.47V96.99l232.48 235.47H761.6c-7.99 0-14.99-3.5-20.5-8.49-4.99-5-8.49-12.5-8.49-20.5z",
fill: "currentColor"
})
});
}
function Js() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
height: "16",
viewBox: "0 0 50 50",
width: "16",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M 43.335938 4 L 6.667969 4 C 5.195313 4 4 5.195313 4 6.667969 L 4 43.332031 C 4 44.804688 5.195313 46 6.667969 46 L 43.332031 46 C 44.804688 46 46 44.804688 46 43.335938 L 46 6.667969 C 46 5.195313 44.804688 4 43.335938 4 Z M 27 36.183594 C 27 40.179688 24.65625 42 21.234375 42 C 18.140625 42 15.910156 39.925781 15 38 L 18.144531 36.097656 C 18.75 37.171875 19.671875 38 21 38 C 22.269531 38 23 37.503906 23 35.574219 L 23 23 L 27 23 Z M 35.675781 42 C 32.132813 42 30.121094 40.214844 29 38 L 32 36 C 32.816406 37.335938 33.707031 38.613281 35.589844 38.613281 C 37.171875 38.613281 38 37.824219 38 36.730469 C 38 35.425781 37.140625 34.960938 35.402344 34.199219 L 34.449219 33.789063 C 31.695313 32.617188 29.863281 31.148438 29.863281 28.039063 C 29.863281 25.179688 32.046875 23 35.453125 23 C 37.878906 23 39.621094 23.84375 40.878906 26.054688 L 37.910156 27.964844 C 37.253906 26.789063 36.550781 26.328125 35.453125 26.328125 C 34.335938 26.328125 33.628906 27.039063 33.628906 27.964844 C 33.628906 29.109375 34.335938 29.570313 35.972656 30.28125 L 36.925781 30.691406 C 40.171875 32.078125 42 33.496094 42 36.683594 C 42 40.117188 39.300781 42 35.675781 42 Z",
fill: "currentColor"
})
});
}
function Ts() {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
fill: "none",
height: "14",
viewBox: "0 0 512 512",
width: "14",
xmlns: "http://www.w3.org/2000/svg",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
fill: "currentColor",
height: "512",
rx: "50",
width: "512"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
fill: "currentColor",
height: "512",
rx: "50",
width: "512"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
clipRule: "evenodd",
d: "m316.939 407.424v50.061c8.138 4.172 17.763 7.3 28.875 9.386s22.823 3.129 35.135 3.129c11.999 0 23.397-1.147 34.196-3.442 10.799-2.294 20.268-6.075 28.406-11.342 8.138-5.266 14.581-12.15 19.328-20.65s7.121-19.007 7.121-31.522c0-9.074-1.356-17.026-4.069-23.857s-6.625-12.906-11.738-18.225c-5.112-5.319-11.242-10.091-18.389-14.315s-15.207-8.213-24.18-11.967c-6.573-2.712-12.468-5.345-17.685-7.9-5.217-2.556-9.651-5.163-13.303-7.822-3.652-2.66-6.469-5.476-8.451-8.448-1.982-2.973-2.974-6.336-2.974-10.091 0-3.441.887-6.544 2.661-9.308s4.278-5.136 7.512-7.118c3.235-1.981 7.199-3.52 11.894-4.615 4.696-1.095 9.912-1.642 15.651-1.642 4.173 0 8.581.313 13.224.938 4.643.626 9.312 1.591 14.008 2.894 4.695 1.304 9.259 2.947 13.694 4.928 4.434 1.982 8.529 4.276 12.285 6.884v-46.776c-7.616-2.92-15.937-5.084-24.962-6.492s-19.381-2.112-31.066-2.112c-11.895 0-23.163 1.278-33.805 3.833s-20.006 6.544-28.093 11.967c-8.086 5.424-14.476 12.333-19.171 20.729-4.695 8.395-7.043 18.433-7.043 30.114 0 14.914 4.304 27.638 12.912 38.172 8.607 10.533 21.675 19.45 39.204 26.751 6.886 2.816 13.303 5.579 19.25 8.291s11.086 5.528 15.415 8.448c4.33 2.92 7.747 6.101 10.252 9.543 2.504 3.441 3.756 7.352 3.756 11.733 0 3.233-.783 6.231-2.348 8.995s-3.939 5.162-7.121 7.196-7.147 3.624-11.894 4.771c-4.748 1.148-10.303 1.721-16.668 1.721-10.851 0-21.597-1.903-32.24-5.71-10.642-3.806-20.502-9.516-29.579-17.13zm-84.159-123.342h64.22v-41.082h-179v41.082h63.906v182.918h50.874z",
fill: "var(--color-background-100)",
fillRule: "evenodd"
})
]
});
}
function File() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "17",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M14.5 7v7a2.5 2.5 0 0 1-2.5 2.5H4A2.5 2.5 0 0 1 1.5 14V.5h7.586a1 1 0 0 1 .707.293l4.414 4.414a1 1 0 0 1 .293.707V7zM13 7v7a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2h5v5h5zM9.5 2.621V5.5h2.879L9.5 2.621z",
fill: "currentColor"
})
});
}
function React() {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
height: "16",
strokeLinejoin: "round",
viewBox: "0 0 16 16",
width: "16",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
clipPath: "url(#file_react_clip0_872_3183)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M4.5 1.93782C4.70129 1.82161 4.99472 1.7858 5.41315 1.91053C5.83298 2.03567 6.33139 2.31073 6.87627 2.73948C7.01136 2.84578 7.14803 2.96052 7.28573 3.08331C6.86217 3.53446 6.44239 4.04358 6.03752 4.60092C5.35243 4.67288 4.70164 4.78186 4.09916 4.92309C4.06167 4.74244 4.03064 4.56671 4.00612 4.39656C3.90725 3.71031 3.91825 3.14114 4.01979 2.71499C4.12099 2.29025 4.29871 2.05404 4.5 1.93782ZM7.49466 1.95361C7.66225 2.08548 7.83092 2.22804 7.99999 2.38067C8.16906 2.22804 8.33773 2.08548 8.50532 1.95361C9.10921 1.47842 9.71982 1.12549 10.3012 0.952202C10.8839 0.778496 11.4838 0.7738 12 1.0718C12.5161 1.3698 12.812 1.89169 12.953 2.48322C13.0936 3.07333 13.0932 3.77858 12.9836 4.53917C12.9532 4.75024 12.9141 4.9676 12.8665 5.19034C13.0832 5.26044 13.291 5.33524 13.489 5.41444C14.2025 5.69983 14.8134 6.05217 15.2542 6.46899C15.696 6.8868 16 7.404 16 8C16 8.596 15.696 9.11319 15.2542 9.53101C14.8134 9.94783 14.2025 10.3002 13.489 10.5856C13.291 10.6648 13.0832 10.7396 12.8665 10.8097C12.9141 11.0324 12.9532 11.2498 12.9837 11.4608C13.0932 12.2214 13.0936 12.9267 12.953 13.5168C12.812 14.1083 12.5161 14.6302 12 14.9282C11.4839 15.2262 10.8839 15.2215 10.3012 15.0478C9.71984 14.8745 9.10923 14.5216 8.50534 14.0464C8.33775 13.9145 8.16906 13.7719 7.99999 13.6193C7.83091 13.7719 7.66223 13.9145 7.49464 14.0464C6.89075 14.5216 6.28014 14.8745 5.69879 15.0478C5.11605 15.2215 4.51613 15.2262 3.99998 14.9282C3.48383 14.6302 3.18794 14.1083 3.047 13.5168C2.9064 12.9267 2.90674 12.2214 3.01632 11.4608C3.04673 11.2498 3.08586 11.0324 3.13351 10.8097C2.91679 10.7395 2.709 10.6648 2.511 10.5856C1.79752 10.3002 1.18658 9.94783 0.745833 9.53101C0.304028 9.11319 0 8.596 0 8C0 7.404 0.304028 6.8868 0.745833 6.46899C1.18658 6.05217 1.79752 5.69983 2.511 5.41444C2.709 5.33524 2.9168 5.26044 3.13352 5.19034C3.08587 4.9676 3.04675 4.75024 3.01634 4.53917C2.90676 3.77858 2.90642 3.07332 3.04702 2.48321C3.18796 1.89169 3.48385 1.3698 4 1.0718C4.51615 0.773798 5.11607 0.778495 5.69881 0.952201C6.28016 1.12549 6.89077 1.47841 7.49466 1.95361ZM7.36747 4.51025C7.57735 4.25194 7.78881 4.00927 7.99999 3.78356C8.21117 4.00927 8.42263 4.25194 8.63251 4.51025C8.42369 4.50346 8.21274 4.5 8 4.5C7.78725 4.5 7.5763 4.50345 7.36747 4.51025ZM8.71425 3.08331C9.13781 3.53447 9.55759 4.04358 9.96246 4.60092C10.6475 4.67288 11.2983 4.78186 11.9008 4.92309C11.9383 4.74244 11.9693 4.56671 11.9939 4.39657C12.0927 3.71031 12.0817 3.14114 11.9802 2.71499C11.879 2.29025 11.7013 2.05404 11.5 1.93782C11.2987 1.82161 11.0053 1.7858 10.5868 1.91053C10.167 2.03568 9.66859 2.31073 9.12371 2.73948C8.98862 2.84578 8.85196 2.96052 8.71425 3.08331ZM8 5.5C8.48433 5.5 8.95638 5.51885 9.41188 5.55456C9.67056 5.93118 9.9229 6.33056 10.1651 6.75C10.4072 7.16944 10.6269 7.58766 10.8237 7.99998C10.6269 8.41232 10.4072 8.83055 10.165 9.25C9.92288 9.66944 9.67053 10.0688 9.41185 10.4454C8.95636 10.4812 8.48432 10.5 8 10.5C7.51567 10.5 7.04363 10.4812 6.58813 10.4454C6.32945 10.0688 6.0771 9.66944 5.83494 9.25C5.59277 8.83055 5.37306 8.41232 5.17624 7.99998C5.37306 7.58765 5.59275 7.16944 5.83492 6.75C6.07708 6.33056 6.32942 5.93118 6.5881 5.55456C7.04361 5.51884 7.51566 5.5 8 5.5ZM11.0311 6.25C11.1375 6.43423 11.2399 6.61864 11.3385 6.80287C11.4572 6.49197 11.5616 6.18752 11.6515 5.89178C11.3505 5.82175 11.0346 5.75996 10.706 5.70736C10.8163 5.8848 10.9247 6.06576 11.0311 6.25ZM11.0311 9.75C11.1374 9.56576 11.2399 9.38133 11.3385 9.19709C11.4572 9.50801 11.5617 9.81246 11.6515 10.1082C11.3505 10.1782 11.0346 10.24 10.7059 10.2926C10.8162 10.1152 10.9247 9.93424 11.0311 9.75ZM11.9249 7.99998C12.2051 8.62927 12.4362 9.24738 12.6151 9.83977C12.7903 9.78191 12.958 9.72092 13.1176 9.65708C13.7614 9.39958 14.2488 9.10547 14.5671 8.80446C14.8843 8.50445 15 8.23243 15 8C15 7.76757 14.8843 7.49555 14.5671 7.19554C14.2488 6.89453 13.7614 6.60042 13.1176 6.34292C12.958 6.27907 12.7903 6.21808 12.6151 6.16022C12.4362 6.7526 12.2051 7.37069 11.9249 7.99998ZM9.96244 11.3991C10.6475 11.3271 11.2983 11.2181 11.9008 11.0769C11.9383 11.2576 11.9694 11.4333 11.9939 11.6034C12.0928 12.2897 12.0817 12.8589 11.9802 13.285C11.879 13.7098 11.7013 13.946 11.5 14.0622C11.2987 14.1784 11.0053 14.2142 10.5868 14.0895C10.167 13.9643 9.66861 13.6893 9.12373 13.2605C8.98863 13.1542 8.85196 13.0395 8.71424 12.9167C9.1378 12.4655 9.55758 11.9564 9.96244 11.3991ZM8.63249 11.4898C8.42262 11.7481 8.21116 11.9907 7.99999 12.2164C7.78881 11.9907 7.57737 11.7481 7.36749 11.4897C7.57631 11.4965 7.78726 11.5 8 11.5C8.21273 11.5 8.42367 11.4965 8.63249 11.4898ZM4.96891 9.75C5.07528 9.93424 5.18375 10.1152 5.29404 10.2926C4.9654 10.24 4.64951 10.1782 4.34844 10.1082C4.43833 9.81246 4.54276 9.508 4.66152 9.19708C4.76005 9.38133 4.86254 9.56575 4.96891 9.75ZM6.03754 11.3991C5.35244 11.3271 4.70163 11.2181 4.09914 11.0769C4.06165 11.2576 4.03062 11.4333 4.0061 11.6034C3.90723 12.2897 3.91823 12.8589 4.01977 13.285C4.12097 13.7098 4.29869 13.946 4.49998 14.0622C4.70127 14.1784 4.9947 14.2142 5.41313 14.0895C5.83296 13.9643 6.33137 13.6893 6.87625 13.2605C7.01135 13.1542 7.14802 13.0395 7.28573 12.9167C6.86217 12.4655 6.4424 11.9564 6.03754 11.3991ZM4.07507 7.99998C3.79484 8.62927 3.56381 9.24737 3.38489 9.83977C3.20969 9.78191 3.042 9.72092 2.88239 9.65708C2.23864 9.39958 1.75123 9.10547 1.43294 8.80446C1.11571 8.50445 1 8.23243 1 8C1 7.76757 1.11571 7.49555 1.43294 7.19554C1.75123 6.89453 2.23864 6.60042 2.88239 6.34292C3.042 6.27907 3.2097 6.21808 3.3849 6.16022C3.56383 6.75261 3.79484 7.37069 4.07507 7.99998ZM4.66152 6.80287C4.54277 6.49197 4.43835 6.18752 4.34846 5.89178C4.64952 5.82175 4.96539 5.75996 5.29402 5.70736C5.18373 5.8848 5.07526 6.06576 4.96889 6.25C4.86253 6.43423 4.76005 6.61864 4.66152 6.80287ZM9.25 8C9.25 8.69036 8.69036 9.25 8 9.25C7.30964 9.25 6.75 8.69036 6.75 8C6.75 7.30965 7.30964 6.75 8 6.75C8.69036 6.75 9.25 7.30965 9.25 8Z",
fill: "currentColor"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("defs", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("clipPath", {
id: "file_react_clip0_872_3183",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
width: "16",
height: "16",
fill: "white"
})
})
})
]
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=file.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/code-frame/parse-code-frame.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
formatCodeFrame: null,
groupCodeFrameLines: null,
parseLineNumberFromCodeFrameLine: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatCodeFrame: function() {
return formatCodeFrame;
},
groupCodeFrameLines: function() {
return groupCodeFrameLines;
},
parseLineNumberFromCodeFrameLine: function() {
return parseLineNumberFromCodeFrameLine;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _anser = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/anser/index.js [app-client] (ecmascript)"));
const _stripansi = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/strip-ansi/index.js [app-client] (ecmascript)"));
function formatCodeFrame(codeFrame) {
const lines = codeFrame.split(/\r?\n/g);
// Find the minimum length of leading spaces after `|` in the code frame
const miniLeadingSpacesLength = lines.map((line)=>/^>? +\d+ +\| [ ]+/.exec((0, _stripansi.default)(line)) === null ? null : /^>? +\d+ +\| ( *)/.exec((0, _stripansi.default)(line))).filter(Boolean).map((v)=>v.pop()).reduce((c, n)=>isNaN(c) ? n.length : Math.min(c, n.length), NaN);
// When the minimum length of leading spaces is greater than 1, remove them
// from the code frame to help the indentation looks better when there's a lot leading spaces.
if (miniLeadingSpacesLength > 1) {
return lines.map((line, a)=>~(a = line.indexOf('|')) ? line.substring(0, a) + line.substring(a).replace("^\\ {" + miniLeadingSpacesLength + "}", '') : line).join('\n');
}
return lines.join('\n');
}
function groupCodeFrameLines(formattedFrame) {
// Map the decoded lines to a format that can be rendered
const decoded = _anser.default.ansiToJson(formattedFrame, {
json: true,
use_classes: true,
remove_empty: true
});
const lines = [];
let line = [];
for (const token of decoded){
if (token.content === '\n') {
lines.push(line);
line = [];
} else {
line.push(token);
}
}
if (line.length > 0) {
lines.push(line);
}
return lines;
}
function parseLineNumberFromCodeFrameLine(line, stackFrame) {
var _line_, _line_1, _stackFrame_lineNumber;
let lineNumberToken;
let lineNumber;
// parse line number from line first 2 tokens
// e.g. ` > 1 | const foo = 'bar'` => `1`, first token is `1 |`
// e.g. ` 2 | const foo = 'bar'` => `2`. first 2 tokens are ' ' and ' 2 |'
// console.log('line', line)
if (((_line_ = line[0]) == null ? void 0 : _line_.content) === '>' || ((_line_1 = line[0]) == null ? void 0 : _line_1.content) === ' ') {
var _lineNumberToken_content_replace, _lineNumberToken_content;
lineNumberToken = line[1];
lineNumber = lineNumberToken == null ? void 0 : (_lineNumberToken_content = lineNumberToken.content) == null ? void 0 : (_lineNumberToken_content_replace = _lineNumberToken_content.replace('|', '')) == null ? void 0 : _lineNumberToken_content_replace.trim();
}
// When the line number is possibly undefined, it can be just the non-source code line
// e.g. the ^ sign can also take a line, we skip rendering line number for it
return {
lineNumber,
isErroredLine: lineNumber === ((_stackFrame_lineNumber = stackFrame.lineNumber) == null ? void 0 : _stackFrame_lineNumber.toString())
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=parse-code-frame.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/code-frame/code-frame.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
CODE_FRAME_STYLES: null,
CodeFrame: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CODE_FRAME_STYLES: function() {
return CODE_FRAME_STYLES;
},
CodeFrame: function() {
return CodeFrame;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _hotlinkedtext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hot-linked-text/index.js [app-client] (ecmascript)");
const _stackframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/stack-frame.js [app-client] (ecmascript)");
const _useopenineditor = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/use-open-in-editor.js [app-client] (ecmascript)");
const _external = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/external.js [app-client] (ecmascript)");
const _file = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/file.js [app-client] (ecmascript)");
const _parsecodeframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/code-frame/parse-code-frame.js [app-client] (ecmascript)");
function CodeFrame(param) {
let { stackFrame, codeFrame } = param;
var _stackFrame_file;
const formattedFrame = (0, _react.useMemo)(()=>(0, _parsecodeframe.formatCodeFrame)(codeFrame), [
codeFrame
]);
const decodedLines = (0, _react.useMemo)(()=>(0, _parsecodeframe.groupCodeFrameLines)(formattedFrame), [
formattedFrame
]);
const open = (0, _useopenineditor.useOpenInEditor)({
file: stackFrame.file,
lineNumber: stackFrame.lineNumber,
column: stackFrame.column
});
const fileExtension = stackFrame == null ? void 0 : (_stackFrame_file = stackFrame.file) == null ? void 0 : _stackFrame_file.split('.').pop();
// TODO: make the caret absolute
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-codeframe": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "code-frame-header",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "code-frame-link",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "code-frame-icon",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_file.FileIcon, {
lang: fileExtension
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
"data-text": true,
children: [
(0, _stackframe.getFrameSource)(stackFrame),
" @",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: stackFrame.methodName
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
"aria-label": "Open in editor",
"data-with-open-in-editor-link-source-file": true,
onClick: open,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "code-frame-icon",
"data-icon": "right",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_external.ExternalIcon, {
width: 16,
height: 16
})
})
})
]
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("pre", {
className: "code-frame-pre",
children: decodedLines.map((line, lineIndex)=>{
const { lineNumber, isErroredLine } = (0, _parsecodeframe.parseLineNumberFromCodeFrameLine)(line, stackFrame);
const lineNumberProps = {};
if (lineNumber) {
lineNumberProps['data-nextjs-codeframe-line'] = lineNumber;
}
if (isErroredLine) {
lineNumberProps['data-nextjs-codeframe-line--errored'] = true;
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
...lineNumberProps,
children: line.map((entry, entryIndex)=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
style: {
color: entry.fg ? "var(--color-" + entry.fg + ")" : undefined,
...entry.decoration === 'bold' ? // above 600, hence a temporary fix is to use 500 for bold.
{
fontWeight: 500
} : entry.decoration === 'italic' ? {
fontStyle: 'italic'
} : undefined
},
children: entry.content
}, "frame-" + entryIndex))
}, "line-" + lineIndex);
})
})
]
});
}
const CODE_FRAME_STYLES = '\n [data-nextjs-codeframe] {\n --code-frame-padding: 12px;\n --code-frame-line-height: var(--size-16);\n background-color: var(--color-background-200);\n overflow: hidden;\n color: var(--color-gray-1000);\n text-overflow: ellipsis;\n border: 1px solid var(--color-gray-400);\n border-radius: 8px;\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: var(--code-frame-line-height);\n margin: 8px 0;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n\n .code-frame-link,\n .code-frame-pre {\n padding: var(--code-frame-padding);\n }\n\n .code-frame-link svg {\n flex-shrink: 0;\n }\n\n .code-frame-link [data-text] {\n display: inline-flex;\n text-align: left;\n margin: auto 6px;\n }\n\n .code-frame-header {\n width: 100%;\n transition: background 100ms ease-out;\n border-radius: 8px 8px 0 0;\n border-bottom: 1px solid var(--color-gray-400);\n }\n\n [data-with-open-in-editor-link-source-file] {\n padding: 4px;\n margin: -4px 0 -4px auto;\n border-radius: var(--rounded-full);\n margin-left: auto;\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n [data-nextjs-codeframe]::selection,\n [data-nextjs-codeframe] *::selection {\n background-color: var(--color-ansi-selection);\n }\n\n [data-nextjs-codeframe] *:not(a) {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-codeframe-line][data-nextjs-codeframe-line--errored="true"] {\n position: relative;\n isolation: isolate;\n\n > span { \n position: relative;\n z-index: 1;\n }\n\n &::after {\n content: "";\n width: calc(100% + var(--code-frame-padding) * 2);\n height: var(--code-frame-line-height);\n left: calc(-1 * var(--code-frame-padding));\n background: var(--color-red-200);\n box-shadow: 2px 0 0 0 var(--color-red-900) inset;\n position: absolute;\n }\n }\n\n\n [data-nextjs-codeframe] > * {\n margin: 0;\n }\n\n .code-frame-link {\n display: flex;\n margin: 0;\n outline: 0;\n }\n .code-frame-link [data-icon=\'right\'] {\n margin-left: auto;\n }\n\n [data-nextjs-codeframe] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n\n [data-nextjs-codeframe] svg {\n color: var(--color-gray-900);\n }\n';
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=code-frame.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-on-click-outside.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useOnClickOutside", {
enumerable: true,
get: function() {
return useOnClickOutside;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
function useOnClickOutside(el, cssSelectorsToExclude, handler) {
_react.useEffect({
"useOnClickOutside.useEffect": ()=>{
if (el == null || handler == null) {
return;
}
const listener = {
"useOnClickOutside.useEffect.listener": (e)=>{
// Do nothing if clicking ref's element or descendent elements
if (!el || el.contains(e.target)) {
return;
}
if (cssSelectorsToExclude.some({
"useOnClickOutside.useEffect.listener": (cssSelector)=>e.target.closest(cssSelector)
}["useOnClickOutside.useEffect.listener"])) {
return;
}
handler(e);
}
}["useOnClickOutside.useEffect.listener"];
const root = el.getRootNode();
root.addEventListener('mouseup', listener);
root.addEventListener('touchend', listener, {
passive: false
});
return ({
"useOnClickOutside.useEffect": function() {
root.removeEventListener('mouseup', listener);
root.removeEventListener('touchend', listener);
}
})["useOnClickOutside.useEffect"];
}
}["useOnClickOutside.useEffect"], [
handler,
el,
cssSelectorsToExclude
]);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-on-click-outside.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-measure-height.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useMeasureHeight", {
enumerable: true,
get: function() {
return useMeasureHeight;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function useMeasureHeight(ref) {
const [pristine, setPristine] = (0, _react.useState)(true);
const [height, setHeight] = (0, _react.useState)(0);
(0, _react.useEffect)(()=>{
const el = ref.current;
if (!el) {
return;
}
const observer = new ResizeObserver(()=>{
const { height: h } = el.getBoundingClientRect();
setHeight((prevHeight)=>{
if (prevHeight !== 0) {
setPristine(false);
}
return h;
});
});
observer.observe(el);
return ()=>{
observer.disconnect();
setPristine(true);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return [
height,
pristine
];
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-measure-height.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Dialog", {
enumerable: true,
get: function() {
return Dialog;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _useonclickoutside = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-on-click-outside.js [app-client] (ecmascript)");
const _usemeasureheight = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-measure-height.js [app-client] (ecmascript)");
const CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE = [
'[data-next-mark]',
'[data-issues-open]',
'#nextjs-dev-tools-menu',
'[data-nextjs-error-overlay-nav]',
'[data-info-popover]'
];
const Dialog = function Dialog(param) {
let { children, type, className, onClose, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, dialogResizerRef, ...props } = param;
const dialogRef = _react.useRef(null);
const [role, setRole] = _react.useState(typeof document !== 'undefined' && document.hasFocus() ? 'dialog' : undefined);
const ref = _react.useRef(null);
const [height, pristine] = (0, _usemeasureheight.useMeasureHeight)(ref);
(0, _useonclickoutside.useOnClickOutside)(dialogRef.current, CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE, (e)=>{
e.preventDefault();
return onClose == null ? void 0 : onClose();
});
_react.useEffect({
"Dialog.useEffect": ()=>{
if (dialogRef.current == null) {
return;
}
function handleFocus() {
// safari will force itself as the active application when a background page triggers any sort of autofocus
// this is a workaround to only set the dialog role if the document has focus
setRole(document.hasFocus() ? 'dialog' : undefined);
}
window.addEventListener('focus', handleFocus);
window.addEventListener('blur', handleFocus);
return ({
"Dialog.useEffect": ()=>{
window.removeEventListener('focus', handleFocus);
window.removeEventListener('blur', handleFocus);
}
})["Dialog.useEffect"];
}
}["Dialog.useEffect"], []);
_react.useEffect({
"Dialog.useEffect": ()=>{
const dialog = dialogRef.current;
const root = dialog == null ? void 0 : dialog.getRootNode();
const initialActiveElement = root instanceof ShadowRoot ? root == null ? void 0 : root.activeElement : null;
// Trap focus within the dialog
dialog == null ? void 0 : dialog.focus();
return ({
"Dialog.useEffect": ()=>{
// Blur first to avoid getting stuck, in case `activeElement` is missing
dialog == null ? void 0 : dialog.blur();
// Restore focus to the previously active element
initialActiveElement == null ? void 0 : initialActiveElement.focus();
}
})["Dialog.useEffect"];
}
}["Dialog.useEffect"], []);
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
ref: dialogRef,
tabIndex: -1,
"data-nextjs-dialog": true,
role: role,
"aria-labelledby": ariaLabelledBy,
"aria-describedby": ariaDescribedBy,
"aria-modal": "true",
className: className,
onKeyDown: (e)=>{
if (e.key === 'Escape') {
onClose == null ? void 0 : onClose();
}
},
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
ref: dialogResizerRef,
"data-nextjs-dialog-sizer": true,
// [x] Don't animate on initial load
// [x] No duplicate elements
// [x] Responds to content growth
style: {
height,
transition: pristine ? undefined : 'height 250ms var(--timing-swift)'
},
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
ref: ref,
children: children
})
})
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dialog.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-body.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogBody", {
enumerable: true,
get: function() {
return DialogBody;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const DialogBody = function DialogBody(param) {
let { children, className } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-nextjs-dialog-body": true,
className: className,
children: children
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dialog-body.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-content.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogContent", {
enumerable: true,
get: function() {
return DialogContent;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const DialogContent = function DialogContent(param) {
let { children, className } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-nextjs-dialog-content": true,
className: className,
children: children
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dialog-content.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-header.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DialogHeader", {
enumerable: true,
get: function() {
return DialogHeader;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const DialogHeader = function DialogHeader(param) {
let { children, className } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-nextjs-dialog-header": true,
className: className,
children: children
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dialog-header.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/styles.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "styles", {
enumerable: true,
get: function() {
return styles;
}
});
const styles = "\n [data-nextjs-dialog-root] {\n --next-dialog-radius: var(--rounded-xl);\n --next-dialog-max-width: 960px;\n --next-dialog-row-padding: 16px;\n --next-dialog-padding-x: 12px;\n --next-dialog-notch-height: 42px;\n --next-dialog-border-width: 1px;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n max-height: calc(100% - 56px);\n max-width: var(--next-dialog-max-width);\n margin-right: auto;\n margin-left: auto;\n scale: 0.98;\n opacity: 0;\n transition-property: scale, opacity;\n transition-duration: var(--transition-duration);\n transition-timing-function: var(--timing-overlay);\n\n &[data-rendered='true'] {\n opacity: 1;\n scale: 1;\n }\n\n [data-nextjs-scroll-fader][data-side=\"top\"] {\n left: 1px;\n top: calc(var(--next-dialog-notch-height) + var(--next-dialog-border-width));\n width: calc(100% - var(--next-dialog-padding-x));\n opacity: 0;\n }\n }\n\n [data-nextjs-dialog] {\n outline: 0;\n }\n\n [data-nextjs-dialog], [data-nextjs-dialog] * {\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n border-radius: 0 0 1rem 1rem;\n margin-bottom: 1rem;\n }\n\n &::-webkit-scrollbar-button {\n display: none;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 0 0 1rem 1rem;\n background-color: var(--color-background-100);\n }\n \n &::-webkit-scrollbar-thumb {\n border-radius: 1rem;\n background-color: var(--color-gray-500);\n }\n }\n\n /* Place overflow: hidden on this so we can break out from [data-nextjs-dialog] */\n [data-nextjs-dialog-sizer] {\n overflow: hidden;\n border-radius: inherit;\n }\n\n [data-nextjs-dialog-backdrop] {\n opacity: 0;\n transition: opacity var(--transition-duration) var(--timing-overlay);\n }\n\n [data-nextjs-dialog-overlay][data-rendered='true']\n [data-nextjs-dialog-backdrop] {\n opacity: 1;\n }\n\n [data-nextjs-dialog-content] {\n border: none;\n margin: 0;\n display: flex;\n flex-direction: column;\n position: relative;\n padding: 16px var(--next-dialog-padding-x);\n }\n\n [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {\n flex-shrink: 0;\n margin-bottom: 8px;\n }\n\n [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {\n position: relative;\n flex: 1 1 auto;\n }\n\n @media (max-height: 812px) {\n [data-nextjs-dialog-overlay] {\n max-height: calc(100% - 15px);\n }\n }\n\n @media (min-width: 576px) {\n [data-nextjs-dialog-root] {\n --next-dialog-max-width: 540px;\n }\n }\n\n @media (min-width: 768px) {\n [data-nextjs-dialog-root] {\n --next-dialog-max-width: 720px;\n }\n }\n\n @media (min-width: 992px) {\n [data-nextjs-dialog-root] {\n --next-dialog-max-width: 960px;\n }\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=styles.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
Dialog: null,
DialogBody: null,
DialogContent: null,
DialogHeader: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Dialog: function() {
return _dialog.Dialog;
},
DialogBody: function() {
return _dialogbody.DialogBody;
},
DialogContent: function() {
return _dialogcontent.DialogContent;
},
DialogHeader: function() {
return _dialogheader.DialogHeader;
},
styles: function() {
return _styles.styles;
}
});
const _dialog = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog.js [app-client] (ecmascript)");
const _dialogbody = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-body.js [app-client] (ecmascript)");
const _dialogcontent = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-content.js [app-client] (ecmascript)");
const _dialogheader = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-header.js [app-client] (ecmascript)");
const _styles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/styles.js [app-client] (ecmascript)");
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/cx.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/**
* Merge multiple args to a single string with spaces. Useful for merging class names.
* @example
* cx('foo', 'bar') // 'foo bar'
* cx('foo', null, 'bar', undefined, 'baz', false) // 'foo bar baz'
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "cx", {
enumerable: true,
get: function() {
return cx;
}
});
function cx() {
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
args[_key] = arguments[_key];
}
return args.filter(Boolean).join(' ');
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=cx.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/copy-button/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
COPY_BUTTON_STYLES: null,
CopyButton: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
COPY_BUTTON_STYLES: function() {
return COPY_BUTTON_STYLES;
},
CopyButton: function() {
return CopyButton;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _cx = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/cx.js [app-client] (ecmascript)");
function useCopyLegacy(content) {
// This would be simpler with useActionState but we need to support React 18 here.
// React 18 also doesn't have async transitions.
const [copyState, dispatch] = _react.useReducer({
"useCopyLegacy.useReducer": (state, action)=>{
if (action.type === 'reset') {
return {
state: 'initial'
};
}
if (action.type === 'copied') {
return {
state: 'success'
};
}
if (action.type === 'copying') {
return {
state: 'pending'
};
}
if (action.type === 'error') {
return {
state: 'error',
error: action.error
};
}
return state;
}
}["useCopyLegacy.useReducer"], {
state: 'initial'
});
function copy() {
if (isPending) {
return;
}
if (!navigator.clipboard) {
dispatch({
type: 'error',
error: Object.defineProperty(new Error('Copy to clipboard is not supported in this browser'), "__NEXT_ERROR_CODE", {
value: "E376",
enumerable: false,
configurable: true
})
});
} else {
dispatch({
type: 'copying'
});
navigator.clipboard.writeText(content).then(()=>{
dispatch({
type: 'copied'
});
}, (error)=>{
dispatch({
type: 'error',
error
});
});
}
}
const reset = _react.useCallback({
"useCopyLegacy.useCallback[reset]": ()=>{
dispatch({
type: 'reset'
});
}
}["useCopyLegacy.useCallback[reset]"], []);
const isPending = copyState.state === 'pending';
return [
copyState,
copy,
reset,
isPending
];
}
function useCopyModern(content) {
const [copyState, dispatch, isPending] = _react.useActionState({
"useCopyModern.useActionState": (state, action)=>{
if (action === 'reset') {
return {
state: 'initial'
};
}
if (action === 'copy') {
if (!navigator.clipboard) {
return {
state: 'error',
error: Object.defineProperty(new Error('Copy to clipboard is not supported in this browser'), "__NEXT_ERROR_CODE", {
value: "E376",
enumerable: false,
configurable: true
})
};
}
return navigator.clipboard.writeText(content).then({
"useCopyModern.useActionState": ()=>{
return {
state: 'success'
};
}
}["useCopyModern.useActionState"], {
"useCopyModern.useActionState": (error)=>{
return {
state: 'error',
error
};
}
}["useCopyModern.useActionState"]);
}
return state;
}
}["useCopyModern.useActionState"], {
state: 'initial'
});
function copy() {
_react.startTransition(()=>{
dispatch('copy');
});
}
const reset = _react.useCallback({
"useCopyModern.useCallback[reset]": ()=>{
dispatch('reset');
}
}["useCopyModern.useCallback[reset]"], [
// TODO: `dispatch` from `useActionState` is not reactive.
// Remove from dependencies once https://github.com/facebook/react/pull/29665 is released.
dispatch
]);
return [
copyState,
copy,
reset,
isPending
];
}
const useCopy = typeof _react.useActionState === 'function' ? useCopyModern : useCopyLegacy;
function CopyButton(param) {
let { actionLabel, successLabel, content, icon, disabled, ...props } = param;
const [copyState, copy, reset, isPending] = useCopy(content);
const error = copyState.state === 'error' ? copyState.error : null;
_react.useEffect({
"CopyButton.useEffect": ()=>{
if (error !== null) {
// Additional console.error to get the stack.
console.error(error);
}
}
}["CopyButton.useEffect"], [
error
]);
_react.useEffect({
"CopyButton.useEffect": ()=>{
if (copyState.state === 'success') {
const timeoutId = setTimeout({
"CopyButton.useEffect.timeoutId": ()=>{
reset();
}
}["CopyButton.useEffect.timeoutId"], 2000);
return ({
"CopyButton.useEffect": ()=>{
clearTimeout(timeoutId);
}
})["CopyButton.useEffect"];
}
}
}["CopyButton.useEffect"], [
isPending,
copyState.state,
reset
]);
const isDisabled = isPending || disabled;
const label = copyState.state === 'success' ? successLabel : actionLabel;
// Assign default icon
const renderedIcon = copyState.state === 'success' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(CopySuccessIcon, {}) : icon || /*#__PURE__*/ (0, _jsxruntime.jsx)(CopyIcon, {
width: 14,
height: 14,
className: "error-overlay-toolbar-button-icon"
});
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
...props,
type: "button",
title: label,
"aria-label": label,
"aria-disabled": isDisabled,
disabled: isDisabled,
"data-nextjs-copy-button": true,
className: (0, _cx.cx)(props.className, 'nextjs-data-copy-button', "nextjs-data-copy-button--" + copyState.state),
onClick: ()=>{
if (!isDisabled) {
copy();
}
},
children: [
renderedIcon,
copyState.state === 'error' ? " " + copyState.error : null
]
});
}
function CopyIcon(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "14",
height: "14",
viewBox: "0 0 14 14",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M2.406.438c-.845 0-1.531.685-1.531 1.53v6.563c0 .846.686 1.531 1.531 1.531H3.937V8.75H2.406a.219.219 0 0 1-.219-.219V1.97c0-.121.098-.219.22-.219h4.812c.12 0 .218.098.218.219v.656H8.75v-.656c0-.846-.686-1.532-1.531-1.532H2.406zm4.375 3.5c-.845 0-1.531.685-1.531 1.53v6.563c0 .846.686 1.531 1.531 1.531h4.813c.845 0 1.531-.685 1.531-1.53V5.468c0-.846-.686-1.532-1.531-1.532H6.78zm-.218 1.53c0-.12.097-.218.218-.218h4.813c.12 0 .219.098.219.219v6.562c0 .121-.098.219-.22.219H6.782a.219.219 0 0 1-.218-.219V5.47z",
fill: "currentColor"
})
});
}
function CopySuccessIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
height: "16",
xlinkTitle: "copied",
viewBox: "0 0 16 16",
width: "16",
stroke: "currentColor",
fill: "currentColor",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"
})
});
}
const COPY_BUTTON_STYLES = "\n .nextjs-data-copy-button {\n color: inherit;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n .nextjs-data-copy-button--initial:hover {\n cursor: pointer;\n }\n .nextjs-data-copy-button--error,\n .nextjs-data-copy-button--error:hover {\n color: var(--color-ansi-red);\n }\n .nextjs-data-copy-button--success {\n color: var(--color-ansi-green);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "NodejsInspectorButton", {
enumerable: true,
get: function() {
return NodejsInspectorButton;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _copybutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/copy-button/index.js [app-client] (ecmascript)");
// Inline this helper to avoid widely used across the codebase,
// as for this feature the Chrome detector doesn't need to be super accurate.
function isChrome() {
if (typeof window === 'undefined') return false;
const isChromium = 'chrome' in window && window.chrome;
const vendorName = window.navigator.vendor;
return isChromium !== null && isChromium !== undefined && vendorName === 'Google Inc.';
}
const isChromeBrowser = isChrome();
function NodeJsIcon(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
width: "14",
height: "14",
viewBox: "0 0 14 14",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("mask", {
id: "nodejs_icon_mask_a",
style: {
maskType: 'luminance'
},
maskUnits: "userSpaceOnUse",
x: "0",
y: "0",
width: "14",
height: "14",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M6.67.089 1.205 3.256a.663.663 0 0 0-.33.573v6.339c0 .237.126.455.33.574l5.466 3.17a.66.66 0 0 0 .66 0l5.465-3.17a.664.664 0 0 0 .329-.574V3.829a.663.663 0 0 0-.33-.573L7.33.089a.663.663 0 0 0-.661 0",
fill: "#fff"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
mask: "url(#nodejs_icon_mask_a)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M18.648 2.717 3.248-4.86-4.648 11.31l15.4 7.58 7.896-16.174z",
fill: "url(#nodejs_icon_linear_gradient_b)"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("mask", {
id: "nodejs_icon_mask_c",
style: {
maskType: 'luminance'
},
maskUnits: "userSpaceOnUse",
x: "1",
y: "0",
width: "12",
height: "14",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1.01 10.57a.663.663 0 0 0 .195.17l4.688 2.72.781.45a.66.66 0 0 0 .51.063l5.764-10.597a.653.653 0 0 0-.153-.122L9.216 1.18 7.325.087a.688.688 0 0 0-.171-.07L1.01 10.57z",
fill: "#fff"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
mask: "url(#nodejs_icon_mask_c)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M-5.647 4.958 5.226 19.734l14.38-10.667L8.734-5.71-5.647 4.958z",
fill: "url(#nodejs_icon_linear_gradient_d)"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("g", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("mask", {
id: "nodejs_icon_mask_e",
style: {
maskType: 'luminance'
},
maskUnits: "userSpaceOnUse",
x: "1",
y: "0",
width: "13",
height: "14",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M6.934.004A.665.665 0 0 0 6.67.09L1.22 3.247l5.877 10.746a.655.655 0 0 0 .235-.08l5.465-3.17a.665.665 0 0 0 .319-.453L7.126.015a.684.684 0 0 0-.189-.01",
fill: "#fff"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
mask: "url(#nodejs_icon_mask_e)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1.22.002v13.992h11.894V.002H1.22z",
fill: "url(#nodejs_icon_linear_gradient_f)"
})
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("defs", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "nodejs_icon_linear_gradient_b",
x1: "10.943",
y1: "-1.084",
x2: "2.997",
y2: "15.062",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".3",
stopColor: "#3E863D"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".5",
stopColor: "#55934F"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".8",
stopColor: "#5AAD45"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "nodejs_icon_linear_gradient_d",
x1: "-.145",
y1: "12.431",
x2: "14.277",
y2: "1.818",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".57",
stopColor: "#3E863D"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".72",
stopColor: "#619857"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: "1",
stopColor: "#76AC64"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "nodejs_icon_linear_gradient_f",
x1: "1.225",
y1: "6.998",
x2: "13.116",
y2: "6.998",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".16",
stopColor: "#6BBF47"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".38",
stopColor: "#79B461"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".47",
stopColor: "#75AC64"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".7",
stopColor: "#659E5A"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".9",
stopColor: "#3E863D"
})
]
})
]
})
]
});
}
function NodeJsDisabledIcon(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
width: "14",
height: "14",
viewBox: "0 0 14 14",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("mask", {
id: "nodejs_icon_mask_a",
style: {
maskType: 'luminance'
},
maskUnits: "userSpaceOnUse",
x: "0",
y: "0",
width: "14",
height: "14",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M6.67.089 1.205 3.256a.663.663 0 0 0-.33.573v6.339c0 .237.126.455.33.574l5.466 3.17a.66.66 0 0 0 .66 0l5.465-3.17a.664.664 0 0 0 .329-.574V3.829a.663.663 0 0 0-.33-.573L7.33.089a.663.663 0 0 0-.661 0",
fill: "#fff"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
mask: "url(#nodejs_icon_mask_a)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M18.648 2.717 3.248-4.86-4.646 11.31l15.399 7.58 7.896-16.174z",
fill: "url(#nodejs_icon_linear_gradient_b)"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("mask", {
id: "nodejs_icon_mask_c",
style: {
maskType: 'luminance'
},
maskUnits: "userSpaceOnUse",
x: "1",
y: "0",
width: "12",
height: "15",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1.01 10.571a.66.66 0 0 0 .195.172l4.688 2.718.781.451a.66.66 0 0 0 .51.063l5.764-10.597a.653.653 0 0 0-.153-.122L9.216 1.181 7.325.09a.688.688 0 0 0-.171-.07L1.01 10.572z",
fill: "#fff"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
mask: "url(#nodejs_icon_mask_c)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M-5.647 4.96 5.226 19.736 19.606 9.07 8.734-5.707-5.647 4.96z",
fill: "url(#nodejs_icon_linear_gradient_d)"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("g", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("mask", {
id: "nodejs_icon_mask_e",
style: {
maskType: 'luminance'
},
maskUnits: "userSpaceOnUse",
x: "1",
y: "0",
width: "13",
height: "14",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M6.935.003a.665.665 0 0 0-.264.085l-5.45 3.158 5.877 10.747a.653.653 0 0 0 .235-.082l5.465-3.17a.665.665 0 0 0 .319-.452L7.127.014a.684.684 0 0 0-.189-.01",
fill: "#fff"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
mask: "url(#nodejs_icon_mask_e)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1.222.001v13.992h11.893V0H1.222z",
fill: "url(#nodejs_icon_linear_gradient_f)"
})
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("defs", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "nodejs_icon_linear_gradient_b",
x1: "10.944",
y1: "-1.084",
x2: "2.997",
y2: "15.062",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".3",
stopColor: "#676767"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".5",
stopColor: "#858585"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".8",
stopColor: "#989A98"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "nodejs_icon_linear_gradient_d",
x1: "-.145",
y1: "12.433",
x2: "14.277",
y2: "1.819",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".57",
stopColor: "#747474"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".72",
stopColor: "#707070"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: "1",
stopColor: "#929292"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "nodejs_icon_linear_gradient_f",
x1: "1.226",
y1: "6.997",
x2: "13.117",
y2: "6.997",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".16",
stopColor: "#878787"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".38",
stopColor: "#A9A9A9"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".47",
stopColor: "#A5A5A5"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".7",
stopColor: "#8F8F8F"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: ".9",
stopColor: "#626262"
})
]
})
]
})
]
});
}
const label = 'Learn more about enabling Node.js inspector for server code with Chrome DevTools';
function NodejsInspectorButton(param) {
let { devtoolsFrontendUrl } = param;
const content = devtoolsFrontendUrl || '';
const disabled = !content || !isChromeBrowser;
if (disabled) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
title: label,
"aria-label": label,
className: "nodejs-inspector-button",
href: "https://nextjs.org/docs/app/building-your-application/configuring/debugging#server-side-code",
target: "_blank",
rel: "noopener noreferrer",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(NodeJsDisabledIcon, {
className: "error-overlay-toolbar-button-icon",
width: 14,
height: 14
})
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_copybutton.CopyButton, {
"data-nextjs-data-runtime-error-copy-devtools-url": true,
className: "nodejs-inspector-button",
actionLabel: 'Copy Chrome DevTools URL',
successLabel: "Copied",
content: content,
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(NodeJsIcon, {
className: "error-overlay-toolbar-button-icon",
width: 14,
height: 14
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=nodejs-inspector-button.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CopyStackTraceButton", {
enumerable: true,
get: function() {
return CopyStackTraceButton;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _copybutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/copy-button/index.js [app-client] (ecmascript)");
function CopyStackTraceButton(param) {
let { error } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_copybutton.CopyButton, {
"data-nextjs-data-runtime-error-copy-stack": true,
className: "copy-stack-trace-button",
actionLabel: "Copy Stack Trace",
successLabel: "Stack Trace Copied",
content: error.stack || '',
disabled: !error.stack
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=copy-stack-trace-button.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/parse-url-from-text.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseUrlFromText", {
enumerable: true,
get: function() {
return parseUrlFromText;
}
});
function parseUrlFromText(text, matcherFunc) {
const linkRegex = /https?:\/\/[^\s/$.?#].[^\s)'"]*/gi;
const links = Array.from(text.matchAll(linkRegex), (match)=>match[0]);
if (matcherFunc) {
return links.filter((link)=>matcherFunc(link));
}
return links;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=parse-url-from-text.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DocsLinkButton", {
enumerable: true,
get: function() {
return DocsLinkButton;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _ishydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-hydration-error.js [app-client] (ecmascript)");
const _parseurlfromtext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/parse-url-from-text.js [app-client] (ecmascript)");
const docsURLAllowlist = [
'https://nextjs.org',
'https://react.dev'
];
function docsLinkMatcher(text) {
return docsURLAllowlist.some((url)=>text.startsWith(url));
}
function getDocsURLFromErrorMessage(text) {
const urls = (0, _parseurlfromtext.parseUrlFromText)(text, docsLinkMatcher);
if (urls.length === 0) {
return null;
}
const href = urls[0];
// Replace react hydration error link with nextjs hydration error link
if (href === _ishydrationerror.REACT_HYDRATION_ERROR_LINK) {
return _ishydrationerror.NEXTJS_HYDRATION_ERROR_LINK;
}
return href;
}
function DocsLinkButton(param) {
let { errorMessage } = param;
const docsURL = getDocsURLFromErrorMessage(errorMessage);
if (!docsURL) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
title: "No related documentation found",
"aria-label": "No related documentation found",
className: "docs-link-button",
disabled: true,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(DocsIcon, {
className: "error-overlay-toolbar-button-icon",
width: 14,
height: 14
})
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
title: "Go to related documentation",
"aria-label": "Go to related documentation",
className: "docs-link-button",
href: docsURL,
target: "_blank",
rel: "noopener noreferrer",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(DocsIcon, {
className: "error-overlay-toolbar-button-icon",
width: 14,
height: 14
})
});
}
function DocsIcon(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "14",
height: "14",
viewBox: "0 0 14 14",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M0 .875h4.375C5.448.875 6.401 1.39 7 2.187A3.276 3.276 0 0 1 9.625.875H14v11.156H9.4c-.522 0-1.023.208-1.392.577l-.544.543h-.928l-.544-.543c-.369-.37-.87-.577-1.392-.577H0V.875zm6.344 3.281a1.969 1.969 0 0 0-1.969-1.968H1.312v8.53H4.6c.622 0 1.225.177 1.744.502V4.156zm1.312 7.064V4.156c0-1.087.882-1.968 1.969-1.968h3.063v8.53H9.4c-.622 0-1.225.177-1.744.502z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=docs-link-button.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayToolbar: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayToolbar: function() {
return ErrorOverlayToolbar;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _nodejsinspectorbutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.js [app-client] (ecmascript)");
const _copystacktracebutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.js [app-client] (ecmascript)");
const _docslinkbutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.js [app-client] (ecmascript)");
function ErrorOverlayToolbar(param) {
let { error, debugInfo } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
className: "error-overlay-toolbar",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_copystacktracebutton.CopyStackTraceButton, {
error: error
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_docslinkbutton.DocsLinkButton, {
errorMessage: error.message
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_nodejsinspectorbutton.NodejsInspectorButton, {
devtoolsFrontendUrl: debugInfo == null ? void 0 : debugInfo.devtoolsFrontendUrl
})
]
});
}
const styles = "\n .error-overlay-toolbar {\n display: flex;\n gap: 6px;\n }\n\n .nodejs-inspector-button,\n .copy-stack-trace-button,\n .docs-link-button {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-28);\n height: var(--size-28);\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-alpha-400);\n box-shadow: var(--shadow-small);\n border-radius: var(--rounded-full);\n\n svg {\n width: var(--size-14);\n height: var(--size-14);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:not(:disabled):hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:not(:disabled):active {\n background: var(--color-gray-alpha-200);\n }\n\n &:disabled {\n background-color: var(--color-gray-100);\n cursor: not-allowed;\n }\n }\n\n .error-overlay-toolbar-button-icon {\n color: var(--color-gray-900);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-overlay-toolbar.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/thumbs/thumbs-up.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ThumbsUp", {
enumerable: true,
get: function() {
return ThumbsUp;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function ThumbsUp(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: "thumbs-up-icon",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
id: "thumb-up-16",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
id: "Union",
fillRule: "evenodd",
clipRule: "evenodd",
d: "M6.89531 2.23959C6.72984 2.1214 6.5 2.23968 6.5 2.44303V5.24989C6.5 6.21639 5.7165 6.99989 4.75 6.99989H2.5V13.4999H12.1884C12.762 13.4999 13.262 13.1095 13.4011 12.5531L14.4011 8.55306C14.5984 7.76412 14.0017 6.99989 13.1884 6.99989H9.25H8.5V6.24989V3.51446C8.5 3.43372 8.46101 3.35795 8.39531 3.31102L6.89531 2.23959ZM5 2.44303C5 1.01963 6.6089 0.191656 7.76717 1.01899L9.26717 2.09042C9.72706 2.41892 10 2.94929 10 3.51446V5.49989H13.1884C14.9775 5.49989 16.2903 7.18121 15.8563 8.91686L14.8563 12.9169C14.5503 14.1411 13.4503 14.9999 12.1884 14.9999H1.75H1V14.2499V6.24989V5.49989H1.75H4.75C4.88807 5.49989 5 5.38796 5 5.24989V2.44303Z",
fill: "currentColor"
})
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=thumbs-up.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/thumbs/thumbs-down.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ThumbsDown", {
enumerable: true,
get: function() {
return ThumbsDown;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function ThumbsDown(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: "thumbs-down-icon",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M5.89531 12.7603C5.72984 12.8785 5.5 12.7602 5.5 12.5569V9.75C5.5 8.7835 4.7165 8 3.75 8H1.5V1.5H11.1884C11.762 1.5 12.262 1.89037 12.4011 2.44683L13.4011 6.44683C13.5984 7.23576 13.0017 8 12.1884 8H8.25H7.5V8.75V11.4854C7.5 11.5662 7.46101 11.6419 7.39531 11.6889L5.89531 12.7603ZM4 12.5569C4 13.9803 5.6089 14.8082 6.76717 13.9809L8.26717 12.9095C8.72706 12.581 9 12.0506 9 11.4854V9.5H12.1884C13.9775 9.5 15.2903 7.81868 14.8563 6.08303L13.8563 2.08303C13.5503 0.858816 12.4503 0 11.1884 0H0.75H0V0.75V8.75V9.5H0.75H3.75C3.88807 9.5 4 9.61193 4 9.75V12.5569Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=thumbs-down.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-footer/error-feedback/error-feedback.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorFeedback: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorFeedback: function() {
return ErrorFeedback;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _thumbsup = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/thumbs/thumbs-up.js [app-client] (ecmascript)");
const _thumbsdown = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/thumbs/thumbs-down.js [app-client] (ecmascript)");
const _cx = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/cx.js [app-client] (ecmascript)");
function ErrorFeedback(param) {
let { errorCode, className } = param;
const [votedMap, setVotedMap] = (0, _react.useState)({});
const voted = votedMap[errorCode];
const hasVoted = voted !== undefined;
const disabled = ("TURBOPACK compile-time value", false);
const handleFeedback = (0, _react.useCallback)(async (wasHelpful)=>{
// Optimistically set feedback state without loading/error states to keep implementation simple
setVotedMap((prev)=>({
...prev,
[errorCode]: wasHelpful
}));
try {
const response = await fetch((("TURBOPACK compile-time value", "") || '') + "/__nextjs_error_feedback?" + new URLSearchParams({
errorCode,
wasHelpful: wasHelpful.toString()
}));
if (!response.ok) {
// Handle non-2xx HTTP responses here if needed
console.error('Failed to record feedback on the server.');
}
} catch (error) {
console.error('Failed to record feedback:', error);
}
}, [
errorCode
]);
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: (0, _cx.cx)('error-feedback', className),
role: "region",
"aria-label": "Error feedback",
children: hasVoted ? /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "error-feedback-thanks",
role: "status",
"aria-live": "polite",
children: "Thanks for your feedback!"
}) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
href: "https://nextjs.org/telemetry#error-feedback",
rel: "noopener noreferrer",
target: "_blank",
children: "Was this helpful?"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
"aria-disabled": ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : undefined,
"aria-label": "Mark as helpful",
onClick: ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : ()=>handleFeedback(true),
className: (0, _cx.cx)('feedback-button', voted === true && 'voted'),
title: ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : undefined,
type: "button",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_thumbsup.ThumbsUp, {
"aria-hidden": "true"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
"aria-disabled": ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : undefined,
"aria-label": "Mark as not helpful",
onClick: ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : ()=>handleFeedback(false),
className: (0, _cx.cx)('feedback-button', voted === false && 'voted'),
title: ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : undefined,
type: "button",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_thumbsdown.ThumbsDown, {
"aria-hidden": "true",
// Optical alignment
style: {
translate: '1px 1px'
}
})
})
]
})
});
}
const styles = "\n .error-feedback {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: nowrap;\n color: var(--color-gray-900);\n }\n\n .error-feedback-thanks {\n height: var(--size-24);\n display: flex;\n align-items: center;\n padding-right: 4px; /* To match the 4px inner padding of the thumbs up and down icons */\n }\n\n .feedback-button {\n background: none;\n border: none;\n border-radius: var(--rounded-md);\n width: var(--size-24);\n height: var(--size-24);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:active {\n background: var(--color-gray-alpha-200);\n }\n }\n\n .feedback-button[aria-disabled='true'] {\n opacity: 0.7;\n cursor: not-allowed;\n }\n\n .feedback-button.voted {\n background: var(--color-gray-alpha-200);\n }\n\n .thumbs-up-icon,\n .thumbs-down-icon {\n color: var(--color-gray-900);\n width: var(--size-16);\n height: var(--size-16);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-feedback.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-footer/error-overlay-footer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayFooter: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayFooter: function() {
return ErrorOverlayFooter;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _errorfeedback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-footer/error-feedback/error-feedback.js [app-client] (ecmascript)");
function ErrorOverlayFooter(param) {
let { errorCode, footerMessage } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("footer", {
className: "error-overlay-footer",
children: [
footerMessage ? /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "error-overlay-footer-message",
children: footerMessage
}) : null,
errorCode ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfeedback.ErrorFeedback, {
className: "error-feedback",
errorCode: errorCode
}) : null
]
});
}
const styles = "\n .error-overlay-footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n gap: 8px;\n padding: 12px;\n background: var(--color-background-200);\n border-top: 1px solid var(--color-gray-400);\n }\n\n .error-feedback {\n margin-left: auto;\n\n p {\n font-size: var(--size-14);\n font-weight: 500;\n margin: 0;\n }\n }\n\n .error-overlay-footer-message {\n color: var(--color-gray-900);\n margin: 0;\n font-size: var(--size-14);\n font-weight: 400;\n line-height: var(--size-20);\n }\n\n " + _errorfeedback.styles + "\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-overlay-footer.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorMessage: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorMessage: function() {
return ErrorMessage;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function ErrorMessage(param) {
let { errorMessage } = param;
const [isExpanded, setIsExpanded] = (0, _react.useState)(false);
const [shouldTruncate, setShouldTruncate] = (0, _react.useState)(false);
const messageRef = (0, _react.useRef)(null);
(0, _react.useLayoutEffect)(()=>{
if (messageRef.current) {
setShouldTruncate(messageRef.current.scrollHeight > 200);
}
}, [
errorMessage
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "nextjs__container_errors_wrapper",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
ref: messageRef,
id: "nextjs__container_errors_desc",
className: "nextjs__container_errors_desc " + (shouldTruncate && !isExpanded ? 'truncated' : ''),
children: errorMessage
}),
shouldTruncate && !isExpanded && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "nextjs__container_errors_gradient_overlay"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
onClick: ()=>setIsExpanded(true),
className: "nextjs__container_errors_expand_button",
"aria-expanded": isExpanded,
"aria-controls": "nextjs__container_errors_desc",
children: "Show More"
})
]
})
]
});
}
const styles = "\n .nextjs__container_errors_wrapper {\n position: relative;\n }\n\n .nextjs__container_errors_desc {\n margin: 0;\n margin-left: 4px;\n color: var(--color-red-900);\n font-weight: 500;\n font-size: var(--size-16);\n letter-spacing: -0.32px;\n line-height: var(--size-24);\n overflow-wrap: break-word;\n white-space: pre-wrap;\n }\n\n .nextjs__container_errors_desc.truncated {\n max-height: 200px;\n overflow: hidden;\n }\n\n .nextjs__container_errors_gradient_overlay {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 85px;\n background: linear-gradient(\n 180deg,\n rgba(250, 250, 250, 0) 0%,\n var(--color-background-100) 100%\n );\n }\n\n .nextjs__container_errors_expand_button {\n position: absolute;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n padding: 6px 8px;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-alpha-400);\n border-radius: 999px;\n box-shadow:\n 0px 2px 2px var(--color-gray-alpha-100),\n 0px 8px 8px -8px var(--color-gray-alpha-100);\n font-size: var(--size-13);\n cursor: pointer;\n color: var(--color-gray-900);\n font-weight: 500;\n transition: background-color 0.2s ease;\n }\n\n .nextjs__container_errors_expand_button:hover {\n background: var(--color-gray-100);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-message.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorTypeLabel: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorTypeLabel: function() {
return ErrorTypeLabel;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function ErrorTypeLabel(param) {
let { errorType } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
id: "nextjs__container_errors_label",
className: "nextjs__container_errors_label",
children: errorType
});
}
const styles = "\n .nextjs__container_errors_label {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-red-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-red-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-type-label.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/left-arrow.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "LeftArrow", {
enumerable: true,
get: function() {
return LeftArrow;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function LeftArrow(param) {
let { title, className } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
"aria-label": title,
className: className,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M9.24996 12.0608L8.71963 11.5304L5.89641 8.70722C5.50588 8.3167 5.50588 7.68353 5.89641 7.29301L8.71963 4.46978L9.24996 3.93945L10.3106 5.00011L9.78029 5.53044L7.31062 8.00011L9.78029 10.4698L10.3106 11.0001L9.24996 12.0608Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=left-arrow.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/right-arrow.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RightArrow", {
enumerable: true,
get: function() {
return RightArrow;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function RightArrow(param) {
let { title, className } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: className,
"aria-label": title,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M6.75011 3.93945L7.28044 4.46978L10.1037 7.29301C10.4942 7.68353 10.4942 8.3167 10.1037 8.70722L7.28044 11.5304L6.75011 12.0608L5.68945 11.0001L6.21978 10.4698L8.68945 8.00011L6.21978 5.53044L5.68945 5.00011L6.75011 3.93945Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=right-arrow.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayPagination: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayPagination: function() {
return ErrorOverlayPagination;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _leftarrow = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/left-arrow.js [app-client] (ecmascript)");
const _rightarrow = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/right-arrow.js [app-client] (ecmascript)");
function ErrorOverlayPagination(param) {
let { runtimeErrors, activeIdx, onActiveIndexChange } = param;
const handlePrevious = (0, _react.useCallback)(()=>(0, _react.startTransition)(()=>{
if (activeIdx > 0) {
onActiveIndexChange(Math.max(0, activeIdx - 1));
}
}), [
activeIdx,
onActiveIndexChange
]);
const handleNext = (0, _react.useCallback)(()=>(0, _react.startTransition)(()=>{
if (activeIdx < runtimeErrors.length - 1) {
onActiveIndexChange(Math.max(0, Math.min(runtimeErrors.length - 1, activeIdx + 1)));
}
}), [
activeIdx,
runtimeErrors.length,
onActiveIndexChange
]);
const buttonLeft = (0, _react.useRef)(null);
const buttonRight = (0, _react.useRef)(null);
const [nav, setNav] = (0, _react.useState)(null);
const onNav = (0, _react.useCallback)((el)=>{
setNav(el);
}, []);
(0, _react.useEffect)(()=>{
if (nav == null) {
return;
}
const root = nav.getRootNode();
const d = self.document;
function handler(e) {
if (e.key === 'ArrowLeft') {
e.preventDefault();
e.stopPropagation();
handlePrevious && handlePrevious();
} else if (e.key === 'ArrowRight') {
e.preventDefault();
e.stopPropagation();
handleNext && handleNext();
}
}
root.addEventListener('keydown', handler);
if (root !== d) {
d.addEventListener('keydown', handler);
}
return function() {
root.removeEventListener('keydown', handler);
if (root !== d) {
d.removeEventListener('keydown', handler);
}
};
}, [
nav,
handleNext,
handlePrevious
]);
// Unlock focus for browsers like Firefox, that break all user focus if the
// currently focused item becomes disabled.
(0, _react.useEffect)(()=>{
if (nav == null) {
return;
}
const root = nav.getRootNode();
// Always true, but we do this for TypeScript:
if (root instanceof ShadowRoot) {
const a = root.activeElement;
if (activeIdx === 0) {
if (buttonLeft.current && a === buttonLeft.current) {
buttonLeft.current.blur();
}
} else if (activeIdx === runtimeErrors.length - 1) {
if (buttonRight.current && a === buttonRight.current) {
buttonRight.current.blur();
}
}
}
}, [
nav,
activeIdx,
runtimeErrors.length
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("nav", {
className: "error-overlay-pagination dialog-exclude-closing-from-outside-click",
ref: onNav,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
ref: buttonLeft,
type: "button",
disabled: activeIdx === 0,
"aria-disabled": activeIdx === 0,
onClick: handlePrevious,
"data-nextjs-dialog-error-previous": true,
className: "error-overlay-pagination-button",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_leftarrow.LeftArrow, {
title: "previous",
className: "error-overlay-pagination-button-icon"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-pagination-count",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
"data-nextjs-dialog-error-index": activeIdx,
children: [
activeIdx + 1,
"/"
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-dialog-header-total-count": true,
children: runtimeErrors.length || 1
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
ref: buttonRight,
type: "button",
// If no errors or the last error is active, disable the button.
disabled: activeIdx >= runtimeErrors.length - 1,
"aria-disabled": activeIdx >= runtimeErrors.length - 1,
onClick: handleNext,
"data-nextjs-dialog-error-next": true,
className: "error-overlay-pagination-button",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_rightarrow.RightArrow, {
title: "next",
className: "error-overlay-pagination-button-icon"
})
})
]
});
}
const styles = "\n .error-overlay-pagination {\n -webkit-font-smoothing: antialiased;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n width: fit-content;\n }\n\n .error-overlay-pagination-count {\n color: var(--color-gray-900);\n text-align: center;\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-16);\n font-variant-numeric: tabular-nums;\n }\n\n .error-overlay-pagination-button {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-24);\n height: var(--size-24);\n background: var(--color-gray-300);\n flex-shrink: 0;\n\n border: none;\n border-radius: var(--rounded-full);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n }\n\n &:not(:disabled):active {\n background: var(--color-gray-500);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .error-overlay-pagination-button-icon {\n color: var(--color-gray-1000);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-overlay-pagination.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
VersionStalenessInfo: null,
getStaleness: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
VersionStalenessInfo: function() {
return VersionStalenessInfo;
},
getStaleness: function() {
return getStaleness;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _cx = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/cx.js [app-client] (ecmascript)");
function VersionStalenessInfo(param) {
let { versionInfo, bundlerName } = param;
const { staleness } = versionInfo;
let { text, indicatorClass, title } = getStaleness(versionInfo);
const isTurbopack = bundlerName === 'Turbopack';
const shouldBeLink = staleness.startsWith('stale');
if (shouldBeLink) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("a", {
className: "nextjs-container-build-error-version-status dialog-exclude-closing-from-outside-click",
target: "_blank",
rel: "noopener noreferrer",
href: "https://nextjs.org/docs/messages/version-staleness",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(Eclipse, {
className: (0, _cx.cx)('version-staleness-indicator', indicatorClass)
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-version-checker": true,
title: title,
children: text
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: (0, _cx.cx)(isTurbopack && 'turbopack-text'),
children: bundlerName
})
]
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
className: "nextjs-container-build-error-version-status dialog-exclude-closing-from-outside-click",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(Eclipse, {
className: (0, _cx.cx)('version-staleness-indicator', indicatorClass)
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-version-checker": true,
title: title,
children: text
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: (0, _cx.cx)(isTurbopack && 'turbopack-text'),
children: bundlerName
})
]
});
}
function getStaleness(param) {
let { installed, staleness, expected } = param;
let text = '';
let title = '';
let indicatorClass = '';
const versionLabel = "Next.js " + installed;
switch(staleness){
case 'newer-than-npm':
case 'fresh':
text = versionLabel;
title = "Latest available version is detected (" + installed + ").";
indicatorClass = 'fresh';
break;
case 'stale-patch':
case 'stale-minor':
text = "" + versionLabel + " (stale)";
title = "There is a newer version (" + expected + ") available, upgrade recommended! ";
indicatorClass = 'stale';
break;
case 'stale-major':
{
text = "" + versionLabel + " (outdated)";
title = "An outdated version detected (latest is " + expected + "), upgrade is highly recommended!";
indicatorClass = 'outdated';
break;
}
case 'stale-prerelease':
{
text = "" + versionLabel + " (stale)";
title = "There is a newer canary version (" + expected + ") available, please upgrade! ";
indicatorClass = 'stale';
break;
}
case 'unknown':
text = "" + versionLabel + " (unknown)";
title = 'No Next.js version data was found.';
indicatorClass = 'unknown';
break;
default:
break;
}
return {
text,
indicatorClass,
title
};
}
const styles = "\n .nextjs-container-build-error-version-status {\n -webkit-font-smoothing: antialiased;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n\n height: var(--size-26);\n padding: 6px 8px 6px 6px;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-alpha-400);\n box-shadow: var(--shadow-small);\n border-radius: var(--rounded-full);\n\n color: var(--color-gray-900);\n font-size: var(--size-12);\n font-weight: 500;\n line-height: var(--size-16);\n }\n\n a.nextjs-container-build-error-version-status {\n text-decoration: none;\n color: var(--color-gray-900);\n\n &:hover {\n background: var(--color-gray-100);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n }\n\n .version-staleness-indicator.fresh {\n fill: var(--color-green-800);\n stroke: var(--color-green-300);\n }\n .version-staleness-indicator.stale {\n fill: var(--color-amber-800);\n stroke: var(--color-amber-300);\n }\n .version-staleness-indicator.outdated {\n fill: var(--color-red-800);\n stroke: var(--color-red-300);\n }\n .version-staleness-indicator.unknown {\n fill: var(--color-gray-800);\n stroke: var(--color-gray-300);\n }\n\n .nextjs-container-build-error-version-status > .turbopack-text {\n background: linear-gradient(\n to right,\n var(--color-turbopack-text-red) 0%,\n var(--color-turbopack-text-blue) 100%\n );\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n";
function Eclipse(param) {
let { className } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "14",
height: "14",
viewBox: "0 0 14 14",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("circle", {
className: className,
cx: "7",
cy: "7",
r: "5.5",
strokeWidth: "3"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=version-staleness-info.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayNav: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayNav: function() {
return ErrorOverlayNav;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _erroroverlaypagination = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.js [app-client] (ecmascript)");
const _versionstalenessinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.js [app-client] (ecmascript)");
function ErrorOverlayNav(param) {
let { runtimeErrors, activeIdx, setActiveIndex, versionInfo } = param;
const bundlerName = ("TURBOPACK compile-time value", "Turbopack") || 'Webpack';
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-error-overlay-nav": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(Notch, {
side: "left",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlaypagination.ErrorOverlayPagination, {
runtimeErrors: runtimeErrors != null ? runtimeErrors : [],
activeIdx: activeIdx != null ? activeIdx : 0,
onActiveIndexChange: setActiveIndex != null ? setActiveIndex : ()=>{}
})
}),
versionInfo && /*#__PURE__*/ (0, _jsxruntime.jsx)(Notch, {
side: "right",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_versionstalenessinfo.VersionStalenessInfo, {
versionInfo: versionInfo,
bundlerName: bundlerName
})
})
]
});
}
const styles = "\n [data-nextjs-error-overlay-nav] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n width: 100%;\n\n position: relative;\n z-index: 2;\n outline: none;\n translate: 1px 1px;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-notch {\n --stroke-color: var(--color-gray-400);\n --background-color: var(--color-background-100);\n\n translate: -1px 0;\n width: auto;\n height: var(--next-dialog-notch-height);\n padding: 12px;\n background: var(--background-color);\n border: 1px solid var(--stroke-color);\n border-bottom: none;\n position: relative;\n\n &[data-side='left'] {\n padding-right: 0;\n border-radius: var(--rounded-xl) 0 0 0;\n\n .error-overlay-notch-tail {\n right: -54px;\n }\n\n > *:not(.error-overlay-notch-tail) {\n margin-right: -10px;\n }\n }\n\n &[data-side='right'] {\n padding-left: 0;\n border-radius: 0 var(--rounded-xl) 0 0;\n\n .error-overlay-notch-tail {\n left: -54px;\n transform: rotateY(180deg);\n }\n\n > *:not(.error-overlay-notch-tail) {\n margin-left: -12px;\n }\n }\n\n .error-overlay-notch-tail {\n position: absolute;\n top: -1px;\n pointer-events: none;\n z-index: -1;\n height: calc(100% + 1px);\n }\n }\n }\n";
function Notch(param) {
let { children, side = 'left' } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-notch",
"data-side": side,
children: [
children,
/*#__PURE__*/ (0, _jsxruntime.jsx)(Tail, {})
]
});
}
function Tail() {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
width: "60",
height: "42",
viewBox: "0 0 60 42",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: "error-overlay-notch-tail",
preserveAspectRatio: "none",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("mask", {
id: "error_overlay_nav_mask0_2667_14687",
style: {
maskType: 'alpha'
},
maskUnits: "userSpaceOnUse",
x: "0",
y: "-1",
width: "60",
height: "43",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("mask", {
id: "error_overlay_nav_path_1_outside_1_2667_14687",
maskUnits: "userSpaceOnUse",
x: "0",
y: "-1",
width: "60",
height: "43",
fill: "black",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
fill: "white",
y: "-1",
width: "60",
height: "43"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1 0L8.0783 0C15.772 0 22.7836 4.41324 26.111 11.3501L34.8889 29.6498C38.2164 36.5868 45.228 41 52.9217 41H60H1L1 0Z"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1 0L8.0783 0C15.772 0 22.7836 4.41324 26.111 11.3501L34.8889 29.6498C38.2164 36.5868 45.228 41 52.9217 41H60H1L1 0Z",
fill: "white"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M1 0V-1H0V0L1 0ZM1 41H0V42H1V41ZM34.8889 29.6498L33.9873 30.0823L34.8889 29.6498ZM26.111 11.3501L27.0127 10.9177L26.111 11.3501ZM1 1H8.0783V-1H1V1ZM60 40H1V42H60V40ZM2 41V0L0 0L0 41H2ZM25.2094 11.7826L33.9873 30.0823L35.7906 29.2174L27.0127 10.9177L25.2094 11.7826ZM52.9217 42H60V40H52.9217V42ZM33.9873 30.0823C37.4811 37.3661 44.8433 42 52.9217 42V40C45.6127 40 38.9517 35.8074 35.7906 29.2174L33.9873 30.0823ZM8.0783 1C15.3873 1 22.0483 5.19257 25.2094 11.7826L27.0127 10.9177C23.5188 3.6339 16.1567 -1 8.0783 -1V1Z",
fill: "black",
mask: "url(#error_overlay_nav_path_1_outside_1_2667_14687)"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("g", {
mask: "url(#error_overlay_nav_mask0_2667_14687)",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("mask", {
id: "error_overlay_nav_path_3_outside_2_2667_14687",
maskUnits: "userSpaceOnUse",
x: "-1",
y: "0.0244141",
width: "60",
height: "43",
fill: "black",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
fill: "white",
x: "-1",
y: "0.0244141",
width: "60",
height: "43"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M0 1.02441H7.0783C14.772 1.02441 21.7836 5.43765 25.111 12.3746L33.8889 30.6743C37.2164 37.6112 44.228 42.0244 51.9217 42.0244H59H0L0 1.02441Z"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M0 1.02441H7.0783C14.772 1.02441 21.7836 5.43765 25.111 12.3746L33.8889 30.6743C37.2164 37.6112 44.228 42.0244 51.9217 42.0244H59H0L0 1.02441Z",
fill: "var(--background-color)"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M0 1.02441L0 0.0244141H-1V1.02441H0ZM0 42.0244H-1V43.0244H0L0 42.0244ZM33.8889 30.6743L32.9873 31.1068L33.8889 30.6743ZM25.111 12.3746L26.0127 11.9421L25.111 12.3746ZM0 2.02441H7.0783V0.0244141H0L0 2.02441ZM59 41.0244H0L0 43.0244H59V41.0244ZM1 42.0244L1 1.02441H-1L-1 42.0244H1ZM24.2094 12.8071L32.9873 31.1068L34.7906 30.2418L26.0127 11.9421L24.2094 12.8071ZM51.9217 43.0244H59V41.0244H51.9217V43.0244ZM32.9873 31.1068C36.4811 38.3905 43.8433 43.0244 51.9217 43.0244V41.0244C44.6127 41.0244 37.9517 36.8318 34.7906 30.2418L32.9873 31.1068ZM7.0783 2.02441C14.3873 2.02441 21.0483 6.21699 24.2094 12.8071L26.0127 11.9421C22.5188 4.65831 15.1567 0.0244141 7.0783 0.0244141V2.02441Z",
fill: "var(--stroke-color)",
mask: "url(#error_overlay_nav_path_3_outside_2_2667_14687)"
})
]
})
]
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-overlay-nav.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DIALOG_STYLES: null,
ErrorOverlayDialog: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DIALOG_STYLES: function() {
return DIALOG_STYLES;
},
ErrorOverlayDialog: function() {
return ErrorOverlayDialog;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _dialog = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog.js [app-client] (ecmascript)");
function ErrorOverlayDialog(param) {
let { children, onClose, footer, ...props } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-dialog-container",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_dialog.Dialog, {
type: "error",
"aria-labelledby": "nextjs__container_errors_label",
"aria-describedby": "nextjs__container_errors_desc",
className: "error-overlay-dialog-scroll",
onClose: onClose,
...props,
children: children
}),
footer
]
});
}
const DIALOG_STYLES = "\n .error-overlay-dialog-container {\n -webkit-font-smoothing: antialiased;\n display: flex;\n flex-direction: column;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: var(--next-dialog-border-width) solid var(--color-gray-400);\n border-radius: 0 0 var(--next-dialog-radius) var(--next-dialog-radius);\n box-shadow: var(--shadow-menu);\n position: relative;\n overflow: hidden;\n }\n\n .error-overlay-dialog-scroll {\n overflow-y: auto;\n height: 100%;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dialog.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dialog/header.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DIALOG_HEADER_STYLES: null,
ErrorOverlayDialogHeader: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DIALOG_HEADER_STYLES: function() {
return DIALOG_HEADER_STYLES;
},
ErrorOverlayDialogHeader: function() {
return ErrorOverlayDialogHeader;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _dialogheader = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/dialog-header.js [app-client] (ecmascript)");
function ErrorOverlayDialogHeader(param) {
let { children } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_dialogheader.DialogHeader, {
className: "nextjs-container-errors-header",
children: children
});
}
const DIALOG_HEADER_STYLES = "\n .nextjs-container-errors-header {\n position: relative;\n }\n .nextjs-container-errors-header > h1 {\n font-size: var(--size-20);\n line-height: var(--size-24);\n font-weight: bold;\n margin: calc(16px * 1.5) 0;\n color: var(--color-title-h1);\n }\n .nextjs-container-errors-header small {\n font-size: var(--size-14);\n color: var(--color-accents-1);\n margin-left: 16px;\n }\n .nextjs-container-errors-header small > span {\n font-family: var(--font-stack-monospace);\n }\n .nextjs-container-errors-header > div > small {\n margin: 0;\n margin-top: 4px;\n }\n .nextjs-container-errors-header > p > a {\n color: inherit;\n font-weight: bold;\n }\n .nextjs-container-errors-header\n > .nextjs-container-build-error-version-status {\n position: absolute;\n top: 16px;\n right: 16px;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=header.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dialog/body.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DIALOG_BODY_STYLES: null,
ErrorOverlayDialogBody: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DIALOG_BODY_STYLES: function() {
return DIALOG_BODY_STYLES;
},
ErrorOverlayDialogBody: function() {
return ErrorOverlayDialogBody;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _dialog = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/index.js [app-client] (ecmascript)");
function ErrorOverlayDialogBody(param) {
let { children } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_dialog.DialogBody, {
className: "nextjs-container-errors-body",
children: children
});
}
const DIALOG_BODY_STYLES = "";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=body.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
CALL_STACK_FRAME_STYLES: null,
CallStackFrame: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CALL_STACK_FRAME_STYLES: function() {
return CALL_STACK_FRAME_STYLES;
},
CallStackFrame: function() {
return CallStackFrame;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _hotlinkedtext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hot-linked-text/index.js [app-client] (ecmascript)");
const _external = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/external.js [app-client] (ecmascript)");
const _stackframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/stack-frame.js [app-client] (ecmascript)");
const _useopenineditor = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/use-open-in-editor.js [app-client] (ecmascript)");
const CallStackFrame = function CallStackFrame(param) {
let { frame } = param;
var _frame_originalStackFrame;
// TODO: ability to expand resolved frames
const f = (_frame_originalStackFrame = frame.originalStackFrame) != null ? _frame_originalStackFrame : frame.sourceStackFrame;
const hasSource = Boolean(frame.originalCodeFrame);
const open = (0, _useopenineditor.useOpenInEditor)(hasSource ? {
file: f.file,
lineNumber: f.lineNumber,
column: f.column
} : undefined);
// Format method to strip out the webpack layer prefix.
// e.g. (app-pages-browser)/./app/page.tsx -> ./app/page.tsx
const formattedMethod = f.methodName.replace(/^\([\w-]+\)\//, '');
// Formatted file source could be empty. e.g. will be formatted to empty string,
// we'll skip rendering the frame in this case.
const fileSource = (0, _stackframe.getFrameSource)(f);
if (!fileSource) {
return null;
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-call-stack-frame": true,
"data-nextjs-call-stack-frame-no-source": !hasSource,
"data-nextjs-call-stack-frame-ignored": frame.ignored,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "call-stack-frame-method-name",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: formattedMethod
}),
hasSource && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
onClick: open,
className: "open-in-editor-button",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_external.ExternalIcon, {
width: 16,
height: 16
})
}),
frame.error ? /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
className: "source-mapping-error-button",
onClick: ()=>console.error(frame.reason),
title: "Sourcemapping failed. Click to log cause of error.",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_external.SourceMappingErrorIcon, {
width: 16,
height: 16
})
}) : null
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "call-stack-frame-file-source",
"data-has-source": hasSource,
children: fileSource
})
]
});
};
const CALL_STACK_FRAME_STYLES = '\n [data-nextjs-call-stack-frame-no-source] {\n padding: 6px 8px;\n margin-bottom: 4px;\n\n border-radius: var(--rounded-lg);\n }\n\n [data-nextjs-call-stack-frame-no-source]:last-child {\n margin-bottom: 0;\n }\n\n [data-nextjs-call-stack-frame-ignored="true"] {\n opacity: 0.6;\n }\n\n [data-nextjs-call-stack-frame] {\n user-select: text;\n display: block;\n box-sizing: border-box;\n\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n\n padding: 6px 8px;\n\n border-radius: var(--rounded-lg);\n }\n\n .call-stack-frame-method-name {\n display: flex;\n align-items: center;\n gap: 4px;\n\n margin-bottom: 4px;\n font-family: var(--font-stack-monospace);\n\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n\n svg {\n width: var(--size-16px);\n height: var(--size-16px);\n }\n }\n\n .open-in-editor-button, .source-mapping-error-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n padding: 4px;\n color: var(--color-font);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .call-stack-frame-file-source {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n }\n';
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=call-stack-frame.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
CALL_STACK_STYLES: null,
CallStack: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CALL_STACK_STYLES: function() {
return CALL_STACK_STYLES;
},
CallStack: function() {
return CallStack;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _callstackframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js [app-client] (ecmascript)");
function CallStack(param) {
let { frames, dialogResizerRef } = param;
const initialDialogHeight = (0, _react.useRef)(NaN);
const [isIgnoreListOpen, setIsIgnoreListOpen] = (0, _react.useState)(false);
const ignoredFramesTally = (0, _react.useMemo)(()=>{
return frames.reduce((tally, frame)=>tally + (frame.ignored ? 1 : 0), 0);
}, [
frames
]);
function onToggleIgnoreList() {
const dialog = dialogResizerRef == null ? void 0 : dialogResizerRef.current;
if (!dialog) {
return;
}
const { height: currentHeight } = dialog == null ? void 0 : dialog.getBoundingClientRect();
if (!initialDialogHeight.current) {
initialDialogHeight.current = currentHeight;
}
if (isIgnoreListOpen) {
function onTransitionEnd() {
dialog.removeEventListener('transitionend', onTransitionEnd);
setIsIgnoreListOpen(false);
}
dialog.style.height = "" + initialDialogHeight.current + "px";
dialog.addEventListener('transitionend', onTransitionEnd);
} else {
setIsIgnoreListOpen(true);
}
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-call-stack-container",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-call-stack-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "error-overlay-call-stack-title",
children: [
"Call Stack",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "error-overlay-call-stack-count",
children: frames.length
})
]
}),
ignoredFramesTally > 0 && /*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
"data-expand-ignore-button": isIgnoreListOpen,
className: "error-overlay-call-stack-ignored-list-toggle-button",
onClick: onToggleIgnoreList,
children: [
(isIgnoreListOpen ? 'Hide' : 'Show') + " " + ignoredFramesTally + " ignore-listed frame(s)",
/*#__PURE__*/ (0, _jsxruntime.jsx)(ChevronUpDown, {})
]
})
]
}),
frames.map((frame, frameIndex)=>{
return !frame.ignored || isIgnoreListOpen ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_callstackframe.CallStackFrame, {
frame: frame
}, frameIndex) : null;
})
]
});
}
function ChevronUpDown() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M8.70722 2.39641C8.3167 2.00588 7.68353 2.00588 7.29301 2.39641L4.46978 5.21963L3.93945 5.74996L5.00011 6.81062L5.53044 6.28029L8.00011 3.81062L10.4698 6.28029L11.0001 6.81062L12.0608 5.74996L11.5304 5.21963L8.70722 2.39641ZM5.53044 9.71963L5.00011 9.1893L3.93945 10.25L4.46978 10.7803L7.29301 13.6035C7.68353 13.994 8.3167 13.994 8.70722 13.6035L11.5304 10.7803L12.0608 10.25L11.0001 9.1893L10.4698 9.71963L8.00011 12.1893L5.53044 9.71963Z",
fill: "currentColor"
})
});
}
const CALL_STACK_STYLES = "\n .error-overlay-call-stack-container {\n position: relative;\n margin-top: 8px;\n }\n\n .error-overlay-call-stack-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n min-height: var(--size-28);\n padding: 8px 8px 12px 4px;\n width: 100%;\n }\n\n .error-overlay-call-stack-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n\n margin: 0;\n\n color: var(--color-gray-1000);\n font-size: var(--size-16);\n font-weight: 500;\n }\n\n .error-overlay-call-stack-count {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-20);\n height: var(--size-20);\n gap: 4px;\n\n color: var(--color-gray-1000);\n text-align: center;\n font-size: var(--size-11);\n font-weight: 500;\n line-height: var(--size-16);\n\n border-radius: var(--rounded-full);\n background: var(--color-gray-300);\n }\n\n .error-overlay-call-stack-ignored-list-toggle-button {\n all: unset;\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n border-radius: 6px;\n padding: 4px 6px;\n margin-right: -6px;\n transition: background 150ms ease;\n\n &:hover {\n background: var(--color-gray-100);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=call-stack.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/body-locker.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
lock: null,
unlock: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
lock: function() {
return lock;
},
unlock: function() {
return unlock;
}
});
let previousBodyPaddingRight;
let previousBodyOverflowSetting;
let activeLocks = 0;
function lock() {
setTimeout(()=>{
if (activeLocks++ > 0) {
return;
}
const scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
if (scrollBarGap > 0) {
previousBodyPaddingRight = document.body.style.paddingRight;
document.body.style.paddingRight = "" + scrollBarGap + "px";
}
previousBodyOverflowSetting = document.body.style.overflow;
document.body.style.overflow = 'hidden';
});
}
function unlock() {
setTimeout(()=>{
if (activeLocks === 0 || --activeLocks !== 0) {
return;
}
if (previousBodyPaddingRight !== undefined) {
document.body.style.paddingRight = previousBodyPaddingRight;
previousBodyPaddingRight = undefined;
}
if (previousBodyOverflowSetting !== undefined) {
document.body.style.overflow = previousBodyOverflowSetting;
previousBodyOverflowSetting = undefined;
}
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=body-locker.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/overlay.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Overlay", {
enumerable: true,
get: function() {
return Overlay;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _bodylocker = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/body-locker.js [app-client] (ecmascript)");
const Overlay = function Overlay(param) {
let { className, children, fixed, ...props } = param;
_react.useEffect({
"Overlay.useEffect": ()=>{
(0, _bodylocker.lock)();
return ({
"Overlay.useEffect": ()=>{
(0, _bodylocker.unlock)();
}
})["Overlay.useEffect"];
}
}["Overlay.useEffect"], []);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-dialog-overlay": true,
className: className,
...props,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-nextjs-dialog-backdrop": true,
"data-nextjs-dialog-backdrop-fixed": fixed ? true : undefined
}),
children
]
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=overlay.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/overlay/overlay.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayOverlay: null,
OVERLAY_STYLES: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayOverlay: function() {
return ErrorOverlayOverlay;
},
OVERLAY_STYLES: function() {
return OVERLAY_STYLES;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _overlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/overlay.js [app-client] (ecmascript)");
function ErrorOverlayOverlay(param) {
let { children, ...props } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_overlay.Overlay, {
...props,
children: children
});
}
const OVERLAY_STYLES = "\n [data-nextjs-dialog-overlay] {\n padding: initial;\n top: 10vh;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=overlay.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayBottomStack: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayBottomStack: function() {
return ErrorOverlayBottomStack;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function ErrorOverlayBottomStack(param) {
let { errorCount, activeIdx } = param;
// If there are more than 2 errors to navigate, the stack count should remain at 2.
const stackCount = Math.min(errorCount - activeIdx - 1, 2);
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"aria-hidden": true,
className: "error-overlay-bottom-stack",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-bottom-stack-stack",
"data-stack-count": stackCount,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "error-overlay-bottom-stack-layer error-overlay-bottom-stack-layer-1",
children: "1"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "error-overlay-bottom-stack-layer error-overlay-bottom-stack-layer-2",
children: "2"
})
]
})
});
}
const styles = "\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n overflow: hidden;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ENVIRONMENT_NAME_LABEL_STYLES: null,
EnvironmentNameLabel: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ENVIRONMENT_NAME_LABEL_STYLES: function() {
return ENVIRONMENT_NAME_LABEL_STYLES;
},
EnvironmentNameLabel: function() {
return EnvironmentNameLabel;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function EnvironmentNameLabel(param) {
let { environmentName } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-environment-name-label": true,
children: environmentName
});
}
const ENVIRONMENT_NAME_LABEL_STYLES = "\n [data-nextjs-environment-name-label] {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-gray-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-gray-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=environment-name-label.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/utils.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
MENU_CURVE: null,
MENU_DURATION_MS: null,
useClickOutside: null,
useFocusTrap: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
MENU_CURVE: function() {
return MENU_CURVE;
},
MENU_DURATION_MS: function() {
return MENU_DURATION_MS;
},
useClickOutside: function() {
return useClickOutside;
},
useFocusTrap: function() {
return useFocusTrap;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function useFocusTrap(rootRef, triggerRef, active, onOpenFocus) {
(0, _react.useEffect)(()=>{
let rootNode = null;
function onTab(e) {
if (e.key !== 'Tab' || rootNode === null) {
return;
}
const [firstFocusableNode, lastFocusableNode] = getFocusableNodes(rootNode);
const activeElement = getActiveElement(rootNode);
if (e.shiftKey) {
if (activeElement === firstFocusableNode) {
lastFocusableNode == null ? void 0 : lastFocusableNode.focus();
e.preventDefault();
}
} else {
if (activeElement === lastFocusableNode) {
firstFocusableNode == null ? void 0 : firstFocusableNode.focus();
e.preventDefault();
}
}
}
const id = setTimeout(()=>{
// Grab this on next tick to ensure the content is mounted
rootNode = rootRef.current;
if (active) {
if (onOpenFocus) {
onOpenFocus();
} else {
rootNode == null ? void 0 : rootNode.focus();
}
rootNode == null ? void 0 : rootNode.addEventListener('keydown', onTab);
} else {
const activeElement = getActiveElement(rootNode);
// Only restore focus if the focus was previously on the content.
// This avoids us accidentally focusing on mount when the
// user could want to interact with their own app instead.
if (triggerRef && (rootNode == null ? void 0 : rootNode.contains(activeElement))) {
var _triggerRef_current;
(_triggerRef_current = triggerRef.current) == null ? void 0 : _triggerRef_current.focus();
}
}
});
return ()=>{
clearTimeout(id);
rootNode == null ? void 0 : rootNode.removeEventListener('keydown', onTab);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
active
]);
}
function getActiveElement(node) {
const root = node == null ? void 0 : node.getRootNode();
return root instanceof ShadowRoot ? root == null ? void 0 : root.activeElement : null;
}
function getFocusableNodes(node) {
const focusableElements = node.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
if (!focusableElements) return [];
return [
focusableElements[0],
focusableElements[focusableElements.length - 1]
];
}
function useClickOutside(rootRef, triggerRef, active, close) {
(0, _react.useEffect)(()=>{
if (!active) {
return;
}
function handleClickOutside(event) {
var _rootRef_current, _triggerRef_current;
if (!(((_rootRef_current = rootRef.current) == null ? void 0 : _rootRef_current.getBoundingClientRect()) ? event.clientX >= rootRef.current.getBoundingClientRect().left && event.clientX <= rootRef.current.getBoundingClientRect().right && event.clientY >= rootRef.current.getBoundingClientRect().top && event.clientY <= rootRef.current.getBoundingClientRect().bottom : false) && !(((_triggerRef_current = triggerRef.current) == null ? void 0 : _triggerRef_current.getBoundingClientRect()) ? event.clientX >= triggerRef.current.getBoundingClientRect().left && event.clientX <= triggerRef.current.getBoundingClientRect().right && event.clientY >= triggerRef.current.getBoundingClientRect().top && event.clientY <= triggerRef.current.getBoundingClientRect().bottom : false)) {
close();
}
}
function handleKeyDown(event) {
if (event.key === 'Escape') {
close();
}
}
document.addEventListener('mousedown', handleClickOutside);
document.addEventListener('keydown', handleKeyDown);
return ()=>{
document.removeEventListener('mousedown', handleClickOutside);
document.removeEventListener('keydown', handleKeyDown);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
active
]);
}
const MENU_DURATION_MS = 200;
const MENU_CURVE = 'cubic-bezier(0.175, 0.885, 0.32, 1.1)';
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=utils.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/fader/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
FADER_STYLES: null,
Fader: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
FADER_STYLES: function() {
return FADER_STYLES;
},
Fader: function() {
return Fader;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const Fader = /*#__PURE__*/ (0, _react.forwardRef)(function Fader(param, ref) {
let { stop, blur, side, style, height } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
ref: ref,
"aria-hidden": true,
"data-nextjs-scroll-fader": true,
className: "nextjs-scroll-fader",
"data-side": side,
style: {
'--stop': stop,
'--blur': blur,
'--height': "" + height + "px",
...style
}
});
});
const FADER_STYLES = '\n .nextjs-scroll-fader {\n --blur: 1px;\n --stop: 25%;\n --height: 150px;\n --color-bg: var(--color-background-100);\n position: absolute;\n pointer-events: none;\n user-select: none;\n width: 100%;\n height: var(--height);\n left: 0;\n backdrop-filter: blur(var(--blur));\n\n &[data-side="top"] {\n top: 0;\n background: linear-gradient(to top, transparent, var(--color-bg));\n mask-image: linear-gradient(to bottom, var(--color-bg) var(--stop), transparent);\n }\n }\n\n';
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ErrorOverlayLayout: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ErrorOverlayLayout: function() {
return ErrorOverlayLayout;
},
styles: function() {
return styles;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _dialog = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/index.js [app-client] (ecmascript)");
const _erroroverlaytoolbar = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.js [app-client] (ecmascript)");
const _erroroverlayfooter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-footer/error-overlay-footer.js [app-client] (ecmascript)");
const _errormessage = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.js [app-client] (ecmascript)");
const _errortypelabel = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.js [app-client] (ecmascript)");
const _erroroverlaynav = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.js [app-client] (ecmascript)");
const _dialog1 = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js [app-client] (ecmascript)");
const _header = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dialog/header.js [app-client] (ecmascript)");
const _body = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dialog/body.js [app-client] (ecmascript)");
const _callstack = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js [app-client] (ecmascript)");
const _overlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/overlay/overlay.js [app-client] (ecmascript)");
const _erroroverlaybottomstack = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js [app-client] (ecmascript)");
const _environmentnamelabel = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.js [app-client] (ecmascript)");
const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/utils.js [app-client] (ecmascript)");
const _fader = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/fader/index.js [app-client] (ecmascript)");
function ErrorOverlayLayout(param) {
let { errorMessage, errorType, children, errorCode, error, debugInfo, isBuildError, onClose, versionInfo, runtimeErrors, activeIdx, setActiveIndex, footerMessage, isTurbopack, dialogResizerRef, // If it's not being passed, we should just render the component as it is being
// used without the context of a parent component that controls its state (e.g. Storybook).
rendered = true, transitionDurationMs } = param;
const animationProps = {
'data-rendered': rendered,
style: {
'--transition-duration': "" + transitionDurationMs + "ms"
}
};
const faderRef = _react.useRef(null);
const hasFooter = Boolean(footerMessage || errorCode);
const dialogRef = _react.useRef(null);
(0, _utils.useFocusTrap)(dialogRef, null, rendered);
function onScroll(e) {
if (faderRef.current) {
const opacity = clamp(e.currentTarget.scrollTop / 17, [
0,
1
]);
faderRef.current.style.opacity = String(opacity);
}
}
var _runtimeErrors_length;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_overlay.ErrorOverlayOverlay, {
fixed: isBuildError,
...animationProps,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-dialog-root": true,
ref: dialogRef,
...animationProps,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlaynav.ErrorOverlayNav, {
runtimeErrors: runtimeErrors,
activeIdx: activeIdx,
setActiveIndex: setActiveIndex,
versionInfo: versionInfo,
isTurbopack: isTurbopack
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_dialog1.ErrorOverlayDialog, {
onClose: onClose,
dialogResizerRef: dialogResizerRef,
"data-has-footer": hasFooter,
onScroll: onScroll,
footer: hasFooter && /*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlayfooter.ErrorOverlayFooter, {
footerMessage: footerMessage,
errorCode: errorCode
}),
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_dialog.DialogContent, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_header.ErrorOverlayDialogHeader, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "nextjs__container_errors__error_title",
// allow assertion in tests before error rating is implemented
"data-nextjs-error-code": errorCode,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
"data-nextjs-error-label-group": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_errortypelabel.ErrorTypeLabel, {
errorType: errorType
}),
error.environmentName && /*#__PURE__*/ (0, _jsxruntime.jsx)(_environmentnamelabel.EnvironmentNameLabel, {
environmentName: error.environmentName
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlaytoolbar.ErrorOverlayToolbar, {
error: error,
debugInfo: debugInfo
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_errormessage.ErrorMessage, {
errorMessage: errorMessage
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_body.ErrorOverlayDialogBody, {
children: children
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlaybottomstack.ErrorOverlayBottomStack, {
errorCount: (_runtimeErrors_length = runtimeErrors == null ? void 0 : runtimeErrors.length) != null ? _runtimeErrors_length : 0,
activeIdx: activeIdx != null ? activeIdx : 0
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_fader.Fader, {
ref: faderRef,
side: "top",
stop: "50%",
blur: "4px",
height: 48
})
]
})
});
}
function clamp(value, param) {
let [min, max] = param;
return Math.min(Math.max(value, min), max);
}
const styles = "\n " + _overlay.OVERLAY_STYLES + "\n " + _dialog1.DIALOG_STYLES + "\n " + _header.DIALOG_HEADER_STYLES + "\n " + _body.DIALOG_BODY_STYLES + "\n\n " + _erroroverlaynav.styles + "\n " + _errortypelabel.styles + "\n " + _errormessage.styles + "\n " + _erroroverlaytoolbar.styles + "\n " + _callstack.CALL_STACK_STYLES + "\n\n [data-nextjs-error-label-group] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-overlay-layout.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/styles.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "styles", {
enumerable: true,
get: function() {
return styles;
}
});
const styles = "\n [data-nextjs-dialog-overlay] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 9000;\n\n display: flex;\n align-content: center;\n align-items: center;\n flex-direction: column;\n padding: 10vh 15px 0;\n }\n\n @media (max-height: 812px) {\n [data-nextjs-dialog-overlay] {\n padding: 15px 15px 0;\n }\n }\n\n [data-nextjs-dialog-backdrop] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--color-backdrop);\n backdrop-filter: blur(10px);\n pointer-events: all;\n z-index: -1;\n }\n\n [data-nextjs-dialog-backdrop-fixed] {\n cursor: not-allowed;\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=styles.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/editor-link.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
EDITOR_LINK_STYLES: null,
EditorLink: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
EDITOR_LINK_STYLES: function() {
return EDITOR_LINK_STYLES;
},
EditorLink: function() {
return EditorLink;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _useopenineditor = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/use-open-in-editor.js [app-client] (ecmascript)");
function EditorLink(param) {
let { file, location } = param;
var _location_line, _location_column;
const open = (0, _useopenineditor.useOpenInEditor)({
file,
lineNumber: (_location_line = location == null ? void 0 : location.line) != null ? _location_line : 1,
column: (_location_column = location == null ? void 0 : location.column) != null ? _location_column : 0
});
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-with-open-in-editor-link": true,
"data-with-open-in-editor-link-import-trace": true,
tabIndex: 10,
role: 'link',
onClick: open,
title: 'Click to open in your editor',
children: [
file,
location ? ":" + location.line + ":" + location.column : null,
/*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("polyline", {
points: "15 3 21 3 21 9"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("line", {
x1: "10",
y1: "14",
x2: "21",
y2: "3"
})
]
})
]
});
}
const EDITOR_LINK_STYLES = "\n [data-with-open-in-editor-link] svg {\n width: auto;\n height: var(--size-14);\n margin-left: 8px;\n }\n [data-with-open-in-editor-link] {\n cursor: pointer;\n }\n [data-with-open-in-editor-link]:hover {\n text-decoration: underline dotted;\n }\n [data-with-open-in-editor-link-import-trace] {\n margin-left: 16px;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=editor-link.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/terminal.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
TERMINAL_STYLES: null,
Terminal: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
TERMINAL_STYLES: function() {
return TERMINAL_STYLES;
},
Terminal: function() {
return Terminal;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _anser = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/anser/index.js [app-client] (ecmascript)"));
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _hotlinkedtext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hot-linked-text/index.js [app-client] (ecmascript)");
const _editorlink = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/editor-link.js [app-client] (ecmascript)");
const _external = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/external.js [app-client] (ecmascript)");
const _stackframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/stack-frame.js [app-client] (ecmascript)");
const _useopenineditor = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/use-open-in-editor.js [app-client] (ecmascript)");
const _file = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/file.js [app-client] (ecmascript)");
function getFile(lines) {
const contentFileName = lines.shift();
if (!contentFileName) return null;
const [fileName, line, column] = contentFileName.split(':', 3);
const parsedLine = Number(line);
const parsedColumn = Number(column);
const hasLocation = !Number.isNaN(parsedLine) && !Number.isNaN(parsedColumn);
return {
fileName: hasLocation ? fileName : contentFileName,
location: hasLocation ? {
line: parsedLine,
column: parsedColumn
} : undefined
};
}
function getImportTraceFiles(lines) {
if (lines.some((line)=>/ReactServerComponentsError:/.test(line)) || lines.some((line)=>/Import trace for requested module:/.test(line))) {
// Grab the lines at the end containing the files
const files = [];
while(/.+\..+/.test(lines[lines.length - 1]) && !lines[lines.length - 1].includes(':')){
const file = lines.pop().trim();
files.unshift(file);
}
return files;
}
return [];
}
function getEditorLinks(content) {
const lines = content.split('\n');
const file = getFile(lines);
const importTraceFiles = getImportTraceFiles(lines);
return {
file,
source: lines.join('\n'),
importTraceFiles
};
}
const Terminal = function Terminal(param) {
let { content } = param;
var _file_location, _file_location1, _file_location2, _file_location3, _stackFrame_file;
const { file, source, importTraceFiles } = _react.useMemo({
"Terminal.useMemo": ()=>getEditorLinks(content)
}["Terminal.useMemo"], [
content
]);
const decoded = _react.useMemo({
"Terminal.useMemo[decoded]": ()=>{
return _anser.default.ansiToJson(source, {
json: true,
use_classes: true,
remove_empty: true
});
}
}["Terminal.useMemo[decoded]"], [
source
]);
var _file_location_line, _file_location_column;
const open = (0, _useopenineditor.useOpenInEditor)({
file: file == null ? void 0 : file.fileName,
lineNumber: (_file_location_line = file == null ? void 0 : (_file_location = file.location) == null ? void 0 : _file_location.line) != null ? _file_location_line : 1,
column: (_file_location_column = file == null ? void 0 : (_file_location1 = file.location) == null ? void 0 : _file_location1.column) != null ? _file_location_column : 0
});
var _file_fileName, _file_location_line1, _file_location_column1;
const stackFrame = {
file: (_file_fileName = file == null ? void 0 : file.fileName) != null ? _file_fileName : null,
methodName: '',
arguments: [],
lineNumber: (_file_location_line1 = file == null ? void 0 : (_file_location2 = file.location) == null ? void 0 : _file_location2.line) != null ? _file_location_line1 : null,
column: (_file_location_column1 = file == null ? void 0 : (_file_location3 = file.location) == null ? void 0 : _file_location3.column) != null ? _file_location_column1 : null
};
const fileExtension = stackFrame == null ? void 0 : (_stackFrame_file = stackFrame.file) == null ? void 0 : _stackFrame_file.split('.').pop();
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-codeframe": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "code-frame-header",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "code-frame-link",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "code-frame-icon",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_file.FileIcon, {
lang: fileExtension
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-text": true,
children: (0, _stackframe.getFrameSource)(stackFrame)
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
"aria-label": "Open in editor",
"data-with-open-in-editor-link-source-file": true,
onClick: open,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "code-frame-icon",
"data-icon": "right",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_external.ExternalIcon, {
width: 16,
height: 16
})
})
})
]
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("pre", {
className: "code-frame-pre",
children: [
decoded.map((entry, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
style: {
color: entry.fg ? "var(--color-" + entry.fg + ")" : undefined,
...entry.decoration === 'bold' ? // above 600, hence a temporary fix is to use 500 for bold.
{
fontWeight: 500
} : entry.decoration === 'italic' ? {
fontStyle: 'italic'
} : undefined
},
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: entry.content
})
}, "terminal-entry-" + index)),
importTraceFiles.map((importTraceFile)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_editorlink.EditorLink, {
isSourceFile: false,
file: importTraceFile
}, importTraceFile))
]
})
]
});
};
const TERMINAL_STYLES = "\n [data-nextjs-terminal]::selection,\n [data-nextjs-terminal] *::selection {\n background-color: var(--color-ansi-selection);\n }\n\n [data-nextjs-terminal] * {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-terminal] > div > p {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n margin: 0;\n }\n [data-nextjs-terminal] > div > p:hover {\n text-decoration: underline dotted;\n }\n [data-nextjs-terminal] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=terminal.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/styles.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "styles", {
enumerable: true,
get: function() {
return styles;
}
});
const styles = "\n .nextjs-toast {\n position: fixed;\n bottom: 16px;\n left: 16px;\n max-width: 420px;\n z-index: 9000;\n box-shadow: 0px 16px 32px\n rgba(0, 0, 0, 0.25);\n }\n\n @media (max-width: 440px) {\n .nextjs-toast {\n max-width: 90vw;\n left: 5vw;\n }\n }\n\n .nextjs-toast-errors-parent {\n padding: 16px;\n border-radius: var(--rounded-4xl);\n font-weight: 500;\n color: var(--color-ansi-bright-white);\n background-color: var(--color-ansi-red);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=styles.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/toast.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Toast", {
enumerable: true,
get: function() {
return Toast;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _cx = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/cx.js [app-client] (ecmascript)");
const Toast = function Toast(param) {
let { onClick, children, className, ...props } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
...props,
onClick: (e)=>{
if (!e.target.closest('a')) {
e.preventDefault();
}
return onClick == null ? void 0 : onClick();
},
className: (0, _cx.cx)('nextjs-toast', className),
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-nextjs-toast-wrapper": true,
children: children
})
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=toast.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
Toast: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Toast: function() {
return _toast.Toast;
},
styles: function() {
return _styles.styles;
}
});
const _styles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/styles.js [app-client] (ecmascript)");
const _toast = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/toast.js [app-client] (ecmascript)");
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Terminal", {
enumerable: true,
get: function() {
return _terminal.Terminal;
}
});
const _terminal = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/terminal.js [app-client] (ecmascript)");
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/build-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
BuildError: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
BuildError: function() {
return BuildError;
},
styles: function() {
return styles;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _stripansi = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/strip-ansi/index.js [app-client] (ecmascript)"));
const _terminal = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/index.js [app-client] (ecmascript)");
const _erroroverlaylayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js [app-client] (ecmascript)");
const getErrorTextFromBuildErrorMessage = (multiLineMessage)=>{
const lines = multiLineMessage.split('\n');
// The multi-line build error message looks like:
// ::
//
//
// e.g.
// ./path/to/file.js:1:1
// SyntaxError: ...
// > 1 | con st foo =
// ...
return (0, _stripansi.default)(lines[1] || '');
};
const BuildError = function BuildError(param) {
let { message, ...props } = param;
const noop = (0, _react.useCallback)(()=>{}, []);
const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
const formattedMessage = (0, _react.useMemo)(()=>getErrorTextFromBuildErrorMessage(message) || 'Failed to compile', [
message
]);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlaylayout.ErrorOverlayLayout, {
errorType: "Build Error",
errorMessage: formattedMessage,
onClose: noop,
error: error,
footerMessage: "This error occurred during the build process and can only be dismissed by fixing the error.",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_terminal.Terminal, {
content: message
})
});
};
const styles = "";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=build-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Overlay", {
enumerable: true,
get: function() {
return _overlay.Overlay;
}
});
const _overlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/overlay.js [app-client] (ecmascript)");
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/collapse-icon.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CollapseIcon", {
enumerable: true,
get: function() {
return CollapseIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function CollapseIcon(param) {
let { collapsed } = param === void 0 ? {} : param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
"data-nextjs-call-stack-chevron-icon": true,
"data-collapsed": collapsed,
width: "16",
height: "16",
fill: "none",
...typeof collapsed === 'boolean' ? {
style: {
transform: collapsed ? undefined : 'rotate(90deg)'
}
} : {},
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
style: {
fill: 'var(--color-font)'
},
fillRule: "evenodd",
d: "m6.75 3.94.53.53 2.824 2.823a1 1 0 0 1 0 1.414L7.28 11.53l-.53.53L5.69 11l.53-.53L8.69 8 6.22 5.53 5.69 5l1.06-1.06Z",
clipRule: "evenodd"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=collapse-icon.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hydration-diff/diff-view.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PseudoHtmlDiff", {
enumerable: true,
get: function() {
return PseudoHtmlDiff;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _collapseicon = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/collapse-icon.js [app-client] (ecmascript)");
function PseudoHtmlDiff(param) {
let { firstContent, secondContent, hydrationMismatchType, reactOutputComponentDiff, ...props } = param;
const [isDiffCollapsed, toggleCollapseHtml] = (0, _react.useState)(true);
const htmlComponents = (0, _react.useMemo)(()=>{
const componentStacks = [];
const reactComponentDiffLines = reactOutputComponentDiff.split('\n');
reactComponentDiffLines.forEach((line, index)=>{
const isDiffLine = line[0] === '+' || line[0] === '-';
const isHighlightedLine = line[0] === '>';
const hasSign = isDiffLine || isHighlightedLine;
const sign = hasSign ? line[0] : '';
const signIndex = hasSign ? line.indexOf(sign) : -1;
const [prefix, suffix] = hasSign ? [
line.slice(0, signIndex),
line.slice(signIndex + 1)
] : [
line,
''
];
if (isDiffLine) {
componentStacks.push(/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html-line": true,
"data-nextjs-container-errors-pseudo-html--diff": sign === '+' ? 'add' : 'remove',
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
children: [
prefix,
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html-line-sign": true,
children: sign
}),
suffix,
'\n'
]
})
}, 'comp-diff' + index));
} else {
// In general, if it's not collapsed, show the whole diff
componentStacks.push(/*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
"data-nextjs-container-errors-pseudo-html-line": true,
...isHighlightedLine ? {
'data-nextjs-container-errors-pseudo-html--diff': 'error'
} : undefined,
children: [
prefix,
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html-line-sign": true,
children: sign
}),
suffix,
'\n'
]
}, 'comp-diff' + index));
}
});
return componentStacks;
}, [
reactOutputComponentDiff
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-container-errors-pseudo-html": true,
"data-nextjs-container-errors-pseudo-html-collapse": isDiffCollapsed,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
tabIndex: 10,
"data-nextjs-container-errors-pseudo-html-collapse-button": true,
onClick: ()=>toggleCollapseHtml(!isDiffCollapsed),
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_collapseicon.CollapseIcon, {
collapsed: isDiffCollapsed
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("pre", {
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
children: htmlComponents
})
})
]
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=diff-view.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
PSEUDO_HTML_DIFF_STYLES: null,
PseudoHtmlDiff: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
PSEUDO_HTML_DIFF_STYLES: function() {
return PSEUDO_HTML_DIFF_STYLES;
},
PseudoHtmlDiff: function() {
return _diffview.PseudoHtmlDiff;
}
});
const _diffview = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hydration-diff/diff-view.js [app-client] (ecmascript)");
const PSEUDO_HTML_DIFF_STYLES = "\n [data-nextjs-container-errors-pseudo-html] {\n padding: 8px 0;\n margin: 8px 0;\n border: 1px solid var(--color-gray-400);\n background: var(--color-background-200);\n color: var(--color-syntax-constant);\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: 1.33em; /* 16px in 12px font size */\n border-radius: var(--rounded-md-2);\n }\n [data-nextjs-container-errors-pseudo-html-line] {\n display: inline-block;\n width: 100%;\n padding-left: 40px;\n line-height: calc(5 / 3);\n }\n [data-nextjs-container-errors-pseudo-html--diff='error'] {\n background: var(--color-amber-100);\n box-shadow: 2px 0 0 0 var(--color-amber-900) inset;\n font-weight: bold;\n }\n [data-nextjs-container-errors-pseudo-html-collapse-button] {\n all: unset;\n margin-left: 12px;\n &:focus {\n outline: none;\n }\n }\n [data-nextjs-container-errors-pseudo-html--diff='add'] {\n background: var(--color-green-300);\n }\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='add']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-green-900);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove'] {\n background: var(--color-red-300);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-red-900);\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='error']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-amber-900);\n }\n \n [data-nextjs-container-errors-pseudo-html--hint] {\n display: inline-block;\n font-size: 0;\n height: 0;\n }\n [data-nextjs-container-errors-pseudo-html--tag-adjacent='false'] {\n color: var(--color-accents-1);\n }\n .nextjs__container_errors__component-stack {\n margin: 0;\n }\n [data-nextjs-container-errors-pseudo-html-collapse='true']\n .nextjs__container_errors__component-stack\n code {\n max-height: 120px;\n mask-image: linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 10%);\n padding-bottom: 40px;\n }\n .nextjs__container_errors__component-stack code {\n display: block;\n width: 100%;\n white-space: pre-wrap;\n scroll-snap-type: y mandatory;\n overflow-y: hidden;\n }\n [data-nextjs-container-errors-pseudo-html--diff] {\n scroll-snap-align: center;\n }\n .error-overlay-hydration-error-diff-plus-icon {\n color: var(--color-green-900);\n }\n .error-overlay-hydration-error-diff-minus-icon {\n color: var(--color-red-900);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=component-stack-pseudo-html.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/get-error-by-type.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getErrorByType: null,
useFrames: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getErrorByType: function() {
return getErrorByType;
},
useFrames: function() {
return useFrames;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _shared = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)");
const _stackframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/stack-frame.js [app-client] (ecmascript)");
const _errorsource = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/error-source.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const useFrames = (error)=>{
if ('use' in _react.default) {
const frames = error.frames;
if (typeof frames !== 'function') {
throw Object.defineProperty(new Error('Invariant: frames must be a function when the React version has React.use. This is a bug in Next.js.'), "__NEXT_ERROR_CODE", {
value: "E636",
enumerable: false,
configurable: true
});
}
return _react.default.use(frames());
} else {
if (!Array.isArray(error.frames)) {
throw Object.defineProperty(new Error('Invariant: frames must be an array when the React version does not have React.use. This is a bug in Next.js.'), "__NEXT_ERROR_CODE", {
value: "E637",
enumerable: false,
configurable: true
});
}
return error.frames;
}
};
async function getErrorByType(ev, isAppDir) {
const { id, event } = ev;
switch(event.type){
case _shared.ACTION_UNHANDLED_ERROR:
case _shared.ACTION_UNHANDLED_REJECTION:
{
const baseError = {
id,
runtime: true,
error: event.reason
};
if ('use' in _react.default) {
const readyRuntimeError = {
...baseError,
// createMemoizedPromise dedups calls to getOriginalStackFrames
frames: createMemoizedPromise(async ()=>{
return await (0, _stackframe.getOriginalStackFrames)(event.frames, (0, _errorsource.getErrorSource)(event.reason), isAppDir);
})
};
if (event.type === _shared.ACTION_UNHANDLED_ERROR) {
readyRuntimeError.componentStackFrames = event.componentStackFrames;
}
return readyRuntimeError;
} else {
const readyRuntimeError = {
...baseError,
// createMemoizedPromise dedups calls to getOriginalStackFrames
frames: await (0, _stackframe.getOriginalStackFrames)(event.frames, (0, _errorsource.getErrorSource)(event.reason), isAppDir)
};
if (event.type === _shared.ACTION_UNHANDLED_ERROR) {
readyRuntimeError.componentStackFrames = event.componentStackFrames;
}
return readyRuntimeError;
}
}
default:
{
break;
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _ = event;
throw Object.defineProperty(new Error('type system invariant violation'), "__NEXT_ERROR_CODE", {
value: "E335",
enumerable: false,
configurable: true
});
}
function createMemoizedPromise(promiseFactory) {
const cachedPromise = promiseFactory();
return function() {
return cachedPromise;
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=get-error-by-type.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
RuntimeError: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
RuntimeError: function() {
return RuntimeError;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _codeframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/code-frame/code-frame.js [app-client] (ecmascript)");
const _callstack = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js [app-client] (ecmascript)");
const _componentstackpseudohtml = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.js [app-client] (ecmascript)");
const _geterrorbytype = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/get-error-by-type.js [app-client] (ecmascript)");
function RuntimeError(param) {
let { error, dialogResizerRef } = param;
const frames = (0, _geterrorbytype.useFrames)(error);
const firstFrame = (0, _react.useMemo)(()=>{
const firstFirstPartyFrameIndex = frames.findIndex((entry)=>!entry.ignored && Boolean(entry.originalCodeFrame) && Boolean(entry.originalStackFrame));
var _frames_firstFirstPartyFrameIndex;
return (_frames_firstFirstPartyFrameIndex = frames[firstFirstPartyFrameIndex]) != null ? _frames_firstFirstPartyFrameIndex : null;
}, [
frames
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
firstFrame && /*#__PURE__*/ (0, _jsxruntime.jsx)(_codeframe.CodeFrame, {
stackFrame: firstFrame.originalStackFrame,
codeFrame: firstFrame.originalCodeFrame
}),
frames.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_callstack.CallStack, {
dialogResizerRef: dialogResizerRef,
frames: frames
})
]
});
}
const styles = "\n " + _componentstackpseudohtml.PSEUDO_HTML_DIFF_STYLES + "\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=index.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/errors.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
Errors: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Errors: function() {
return Errors;
},
styles: function() {
return styles;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _overlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/index.js [app-client] (ecmascript)");
const _runtimeerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/index.js [app-client] (ecmascript)");
const _errorsource = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/error-source.js [app-client] (ecmascript)");
const _hotlinkedtext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/hot-linked-text/index.js [app-client] (ecmascript)");
const _componentstackpseudohtml = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.js [app-client] (ecmascript)");
const _hydrationerrorinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/hydration-error-info.js [app-client] (ecmascript)");
const _consoleerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/console-error.js [app-client] (ecmascript)");
const _errortelemetryutils = __turbopack_context__.r("[project]/node_modules/next/dist/lib/error-telemetry-utils.js [app-client] (ecmascript)");
const _erroroverlaylayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js [app-client] (ecmascript)");
const _ishydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-hydration-error.js [app-client] (ecmascript)");
function isNextjsLink(text) {
return text.startsWith('https://nextjs.org');
}
function ErrorDescription(param) {
let { error, hydrationWarning } = param;
const unhandledErrorType = (0, _consoleerror.isConsoleError)(error) ? (0, _consoleerror.getConsoleErrorType)(error) : null;
const isConsoleErrorStringMessage = unhandledErrorType === 'string';
// If the error is:
// - hydration warning
// - captured console error or unhandled rejection
// skip displaying the error name
const title = isConsoleErrorStringMessage || hydrationWarning ? '' : error.name + ': ';
const environmentName = 'environmentName' in error ? error.environmentName : '';
const envPrefix = environmentName ? "[ " + environmentName + " ] " : '';
// The environment name will be displayed as a label, so remove it
// from the message (e.g. "[ Server ] hello world" -> "hello world").
let message = error.message;
if (message.startsWith(envPrefix)) {
message = message.slice(envPrefix.length);
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
title,
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: hydrationWarning || message,
matcher: isNextjsLink
})
]
});
}
function getErrorType(error) {
if ((0, _consoleerror.isConsoleError)(error)) {
return 'Console Error';
}
return 'Runtime Error';
}
function Errors(param) {
let { runtimeErrors, debugInfo, onClose, ...props } = param;
var _activeError_componentStackFrames;
const dialogResizerRef = (0, _react.useRef)(null);
(0, _react.useEffect)(()=>{
// Close the error overlay when pressing escape
function handleKeyDown(event) {
if (event.key === 'Escape') {
onClose();
}
}
document.addEventListener('keydown', handleKeyDown);
return ()=>document.removeEventListener('keydown', handleKeyDown);
}, [
onClose
]);
const isLoading = (0, _react.useMemo)(()=>{
return runtimeErrors.length < 1;
}, [
runtimeErrors.length
]);
const [activeIdx, setActiveIndex] = (0, _react.useState)(0);
const activeError = (0, _react.useMemo)(()=>{
var _runtimeErrors_activeIdx;
return (_runtimeErrors_activeIdx = runtimeErrors[activeIdx]) != null ? _runtimeErrors_activeIdx : null;
}, [
activeIdx,
runtimeErrors
]);
if (isLoading) {
// TODO: better loading state
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_overlay.Overlay, {});
}
if (!activeError) {
return null;
}
const error = activeError.error;
const isServerError = [
'server',
'edge-server'
].includes((0, _errorsource.getErrorSource)(error) || '');
const errorType = getErrorType(error);
const errorDetails = error.details || {};
const notes = errorDetails.notes || '';
const [warningTemplate, serverContent, clientContent] = errorDetails.warning || [
null,
'',
''
];
const hydrationErrorType = (0, _hydrationerrorinfo.getHydrationWarningType)(warningTemplate);
const hydrationWarning = warningTemplate ? warningTemplate.replace('%s', serverContent).replace('%s', clientContent).replace('%s', '') // remove the %s for stack
.replace(/%s$/, '') // If there's still a %s at the end, remove it
.replace(/^Warning: /, '').replace(/^Error: /, '') : null;
const errorCode = (0, _errortelemetryutils.extractNextErrorCode)(error);
const footerMessage = isServerError ? 'This error happened while generating the page. Any console logs will be displayed in the terminal window.' : undefined;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_erroroverlaylayout.ErrorOverlayLayout, {
errorCode: errorCode,
errorType: errorType,
errorMessage: /*#__PURE__*/ (0, _jsxruntime.jsx)(ErrorDescription, {
error: error,
hydrationWarning: hydrationWarning
}),
onClose: isServerError ? undefined : onClose,
debugInfo: debugInfo,
error: error,
runtimeErrors: runtimeErrors,
activeIdx: activeIdx,
setActiveIndex: setActiveIndex,
footerMessage: footerMessage,
dialogResizerRef: dialogResizerRef,
...props,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "error-overlay-notes-container",
children: [
notes ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
id: "nextjs__container_errors__notes",
className: "nextjs__container_errors__notes",
children: notes
})
}) : null,
hydrationWarning ? /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
id: "nextjs__container_errors__link",
className: "nextjs__container_errors__link",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: "See more info here: " + _ishydrationerror.NEXTJS_HYDRATION_ERROR_LINK
})
}) : null
]
}),
hydrationWarning && (((_activeError_componentStackFrames = activeError.componentStackFrames) == null ? void 0 : _activeError_componentStackFrames.length) || !!errorDetails.reactOutputComponentDiff) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_componentstackpseudohtml.PseudoHtmlDiff, {
className: "nextjs__container_errors__component-stack",
hydrationMismatchType: hydrationErrorType,
firstContent: serverContent,
secondContent: clientContent,
reactOutputComponentDiff: errorDetails.reactOutputComponentDiff || ''
}) : null,
/*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {
fallback: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-nextjs-error-suspended": true
}),
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_runtimeerror.RuntimeError, {
error: activeError,
dialogResizerRef: dialogResizerRef
}, activeError.id.toString())
})
]
});
}
const styles = "\n .nextjs-error-with-static {\n bottom: calc(16px * 4.5);\n }\n p.nextjs__container_errors__link {\n font-size: var(--size-14);\n }\n p.nextjs__container_errors__notes {\n color: var(--color-stack-notes);\n font-size: var(--size-14);\n line-height: 1.5;\n }\n .nextjs-container-errors-body > h2:not(:first-child) {\n margin-top: calc(16px + 8px);\n }\n .nextjs-container-errors-body > h2 {\n color: var(--color-title-color);\n margin-bottom: 8px;\n font-size: var(--size-20);\n }\n .nextjs-toast-errors-parent {\n cursor: pointer;\n transition: transform 0.2s ease;\n }\n .nextjs-toast-errors-parent:hover {\n transform: scale(1.1);\n }\n .nextjs-toast-errors {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n .nextjs-toast-errors > svg {\n margin-right: 8px;\n }\n .nextjs-toast-hide-button {\n margin-left: 24px;\n border: none;\n background: none;\n color: var(--color-ansi-bright-white);\n padding: 0;\n transition: opacity 0.25s ease;\n opacity: 0.7;\n }\n .nextjs-toast-hide-button:hover {\n opacity: 1;\n }\n .nextjs__container_errors_inspect_copy_button {\n cursor: pointer;\n background: none;\n border: none;\n color: var(--color-ansi-bright-white);\n font-size: var(--size-24);\n padding: 0;\n margin: 0;\n margin-left: 8px;\n transition: opacity 0.25s ease;\n }\n .nextjs__container_errors__error_title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 14px;\n }\n .error-overlay-notes-container {\n margin: 8px 2px;\n }\n .error-overlay-notes-container p {\n white-space: pre-wrap;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=errors.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/merge-refs.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, /**
* A function that merges React refs into one.
* Supports both functions and ref objects created using createRef() and useRef().
*
* Usage:
* ```tsx
*
* ```
*
* @param {(React.Ref | undefined)[]} inputRefs Array of refs
* @returns {React.Ref | React.RefCallback} Merged refs
*/ "default", {
enumerable: true,
get: function() {
return mergeRefs;
}
});
function mergeRefs() {
for(var _len = arguments.length, inputRefs = new Array(_len), _key = 0; _key < _len; _key++){
inputRefs[_key] = arguments[_key];
}
const filteredInputRefs = inputRefs.filter(Boolean);
if (filteredInputRefs.length <= 1) {
const firstRef = filteredInputRefs[0];
return firstRef || null;
}
return function mergedRefs(ref) {
for (const inputRef of filteredInputRefs){
if (typeof inputRef === 'function') {
inputRef(ref);
} else if (inputRef) {
;
inputRef.current = ref;
}
}
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=merge-refs.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/use-minimum-loading-time-multiple.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useMinimumLoadingTimeMultiple", {
enumerable: true,
get: function() {
return useMinimumLoadingTimeMultiple;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function useMinimumLoadingTimeMultiple(isLoadingTrigger, interval) {
if (interval === void 0) interval = 750;
const [isLoading, setIsLoading] = (0, _react.useState)(false);
const loadStartTimeRef = (0, _react.useRef)(null);
const timeoutIdRef = (0, _react.useRef)(null);
(0, _react.useEffect)(()=>{
// Clear any pending timeout to avoid overlap
if (timeoutIdRef.current) {
clearTimeout(timeoutIdRef.current);
timeoutIdRef.current = null;
}
if (isLoadingTrigger) {
// If we enter "loading" state, record start time if not already
if (loadStartTimeRef.current === null) {
loadStartTimeRef.current = Date.now();
}
setIsLoading(true);
} else {
// If we're exiting the "loading" state:
if (loadStartTimeRef.current === null) {
// No start time was recorded, so just stop loading immediately
setIsLoading(false);
} else {
// How long we've been "loading"
const timeDiff = Date.now() - loadStartTimeRef.current;
// Next multiple of `interval` after `timeDiff`
const nextMultiple = interval * Math.ceil(timeDiff / interval);
// Remaining time needed to reach that multiple
const remainingTime = nextMultiple - timeDiff;
if (remainingTime > 0) {
// If not yet at that multiple, schedule the final step
timeoutIdRef.current = setTimeout(()=>{
setIsLoading(false);
loadStartTimeRef.current = null;
}, remainingTime);
} else {
// We're already past the multiple boundary
setIsLoading(false);
loadStartTimeRef.current = null;
}
}
}
// Cleanup when effect is about to re-run or component unmounts
return ()=>{
if (timeoutIdRef.current) {
clearTimeout(timeoutIdRef.current);
}
};
}, [
isLoadingTrigger,
interval
]);
return isLoading;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-minimum-loading-time-multiple.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
Cross: null,
NextLogo: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Cross: function() {
return Cross;
},
NextLogo: function() {
return NextLogo;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
const _mergerefs = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/utils/merge-refs.js [app-client] (ecmascript)"));
const _useminimumloadingtimemultiple = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/use-minimum-loading-time-multiple.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n [data-next-badge-root] {\n --timing: cubic-bezier(0.23, 0.88, 0.26, 0.92);\n --duration-long: 250ms;\n --color-outer-border: #171717;\n --color-inner-border: hsla(0, 0%, 100%, 0.14);\n --color-hover-alpha-subtle: hsla(0, 0%, 100%, 0.13);\n --color-hover-alpha-error: hsla(0, 0%, 100%, 0.2);\n --color-hover-alpha-error-2: hsla(0, 0%, 100%, 0.25);\n --mark-size: calc(var(--size) - var(--size-2) * 2);\n\n --focus-color: var(--color-blue-800);\n --focus-ring: 2px solid var(--focus-color);\n\n &:has([data-next-badge][data-error='true']) {\n --focus-color: #fff;\n }\n }\n\n [data-disabled-icon] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: 4px;\n }\n\n [data-next-badge] {\n -webkit-font-smoothing: antialiased;\n width: var(--size);\n height: var(--size);\n display: flex;\n align-items: center;\n position: relative;\n background: rgba(0, 0, 0, 0.8);\n box-shadow:\n 0 0 0 1px var(--color-outer-border),\n inset 0 0 0 1px var(--color-inner-border),\n 0px 16px 32px -8px rgba(0, 0, 0, 0.24);\n backdrop-filter: blur(48px);\n border-radius: var(--rounded-full);\n user-select: none;\n cursor: pointer;\n scale: 1;\n overflow: hidden;\n will-change: scale, box-shadow, width, background;\n transition:\n scale var(--duration-short) var(--timing),\n width var(--duration-long) var(--timing),\n box-shadow var(--duration-long) var(--timing),\n background var(--duration-short) ease;\n\n &:active[data-error='false'] {\n scale: 0.95;\n }\n\n &[data-animate='true']:not(:hover) {\n scale: 1.02;\n }\n\n &[data-error='false']:has([data-next-mark]:focus-visible) {\n outline: var(--focus-ring);\n outline-offset: 3px;\n }\n\n &[data-error='true'] {\n background: #ca2a30;\n --color-inner-border: #e5484d;\n\n [data-next-mark] {\n background: var(--color-hover-alpha-error);\n outline-offset: 0px;\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -1px;\n }\n\n &:hover {\n background: var(--color-hover-alpha-error-2);\n }\n }\n }\n\n &[data-error-expanded='false'][data-error='true'] ~ [data-dot] {\n scale: 1;\n }\n\n > div {\n display: flex;\n }\n }\n\n [data-issues-collapse]:focus-visible {\n outline: var(--focus-ring);\n }\n\n [data-issues]:has([data-issues-open]:focus-visible) {\n outline: var(--focus-ring);\n outline-offset: -1px;\n }\n\n [data-dot] {\n content: '';\n width: var(--size-8);\n height: var(--size-8);\n background: #fff;\n box-shadow: 0 0 0 1px var(--color-outer-border);\n border-radius: 50%;\n position: absolute;\n top: 2px;\n right: 0px;\n scale: 0;\n pointer-events: none;\n transition: scale 200ms var(--timing);\n transition-delay: var(--duration-short);\n }\n\n [data-issues] {\n --padding-left: 8px;\n display: flex;\n gap: 2px;\n align-items: center;\n padding-left: 8px;\n padding-right: 8px;\n height: var(--size-32);\n margin: 0 2px;\n border-radius: var(--rounded-full);\n transition: background var(--duration-short) ease;\n\n &:has([data-issues-open]:hover) {\n background: var(--color-hover-alpha-error);\n }\n\n &:has([data-issues-collapse]) {\n padding-right: calc(var(--padding-left) / 2);\n }\n\n [data-cross] {\n translate: 0px -1px;\n }\n }\n\n [data-issues-open] {\n font-size: var(--size-13);\n color: white;\n width: fit-content;\n height: 100%;\n display: flex;\n gap: 2px;\n align-items: center;\n margin: 0;\n line-height: var(--size-36);\n font-weight: 500;\n z-index: 2;\n white-space: nowrap;\n\n &:focus-visible {\n outline: 0;\n }\n }\n\n [data-issues-collapse] {\n width: var(--size-24);\n height: var(--size-24);\n border-radius: var(--rounded-full);\n transition: background var(--duration-short) ease;\n\n &:hover {\n background: var(--color-hover-alpha-error);\n }\n }\n\n [data-cross] {\n color: #fff;\n width: var(--size-12);\n height: var(--size-12);\n }\n\n [data-next-mark] {\n width: var(--mark-size);\n height: var(--mark-size);\n margin-left: 2px;\n display: flex;\n align-items: center;\n border-radius: var(--rounded-full);\n transition: background var(--duration-long) var(--timing);\n\n &:focus-visible {\n outline: 0;\n }\n\n &:hover {\n background: var(--color-hover-alpha-subtle);\n }\n\n svg {\n flex-shrink: 0;\n width: var(--size-40);\n height: var(--size-40);\n }\n }\n\n [data-issues-count-animation] {\n display: grid;\n place-items: center center;\n font-variant-numeric: tabular-nums;\n\n &[data-animate='false'] {\n [data-issues-count-exit],\n [data-issues-count-enter] {\n animation-duration: 0ms;\n }\n }\n\n > * {\n grid-area: 1 / 1;\n }\n\n [data-issues-count-exit] {\n animation: fadeOut 300ms var(--timing) forwards;\n }\n\n [data-issues-count-enter] {\n animation: fadeIn 300ms var(--timing) forwards;\n }\n }\n\n [data-issues-count-plural] {\n display: inline-block;\n &[data-animate='true'] {\n animation: fadeIn 300ms var(--timing) forwards;\n }\n }\n\n .path0 {\n animation: draw0 1.5s ease-in-out infinite;\n }\n\n .path1 {\n animation: draw1 1.5s ease-out infinite;\n animation-delay: 0.3s;\n }\n\n .paused {\n stroke-dashoffset: 0;\n }\n\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n filter: blur(2px);\n transform: translateY(8px);\n }\n 100% {\n opacity: 1;\n filter: blur(0px);\n transform: translateY(0);\n }\n }\n\n @keyframes fadeOut {\n 0% {\n opacity: 1;\n filter: blur(0px);\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n transform: translateY(-12px);\n filter: blur(2px);\n }\n }\n\n @keyframes draw0 {\n 0%,\n 25% {\n stroke-dashoffset: -29.6;\n }\n 25%,\n 50% {\n stroke-dashoffset: 0;\n }\n 50%,\n 75% {\n stroke-dashoffset: 0;\n }\n 75%,\n 100% {\n stroke-dashoffset: 29.6;\n }\n }\n\n @keyframes draw1 {\n 0%,\n 20% {\n stroke-dashoffset: -11.6;\n }\n 20%,\n 50% {\n stroke-dashoffset: 0;\n }\n 50%,\n 75% {\n stroke-dashoffset: 0;\n }\n 75%,\n 100% {\n stroke-dashoffset: 11.6;\n }\n }\n\n @media (prefers-reduced-motion) {\n [data-issues-count-exit],\n [data-issues-count-enter],\n [data-issues-count-plural] {\n animation-duration: 0ms !important;\n }\n }\n "
]);
_templateObject = function() {
return data;
};
return data;
}
const SHORT_DURATION_MS = 150;
const NextLogo = /*#__PURE__*/ (0, _react.forwardRef)(function NextLogo(param, propRef) {
let { disabled, issueCount, isDevBuilding, isDevRendering, isBuildError, onTriggerClick, toggleErrorOverlay, scale = 1, ...props } = param;
const SIZE = 36 / scale;
const hasError = issueCount > 0;
const [isErrorExpanded, setIsErrorExpanded] = (0, _react.useState)(hasError);
const [dismissed, setDismissed] = (0, _react.useState)(false);
const newErrorDetected = useUpdateAnimation(issueCount, SHORT_DURATION_MS);
const triggerRef = (0, _react.useRef)(null);
const ref = (0, _react.useRef)(null);
const [measuredWidth, pristine] = useMeasureWidth(ref);
const isLoading = (0, _useminimumloadingtimemultiple.useMinimumLoadingTimeMultiple)(isDevBuilding || isDevRendering);
const isExpanded = isErrorExpanded || disabled;
const style = (0, _react.useMemo)(()=>{
let width = SIZE;
// Animates the badge, if expanded
if (measuredWidth > SIZE) width = measuredWidth;
// No animations on page load, assume the intrinsic width immediately
if (pristine && hasError) width = 'auto';
// Default state, collapsed
return {
width
};
}, [
measuredWidth,
pristine,
hasError,
SIZE
]);
(0, _react.useEffect)(()=>{
setIsErrorExpanded(hasError);
}, [
hasError
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-next-badge-root": true,
style: {
'--size': "" + SIZE + "px",
'--duration-short': "" + SHORT_DURATION_MS + "ms",
// if the indicator is disabled, hide the badge
// also allow the "disabled" state be dismissed, as long as there are no build errors
display: disabled && (!hasError || dismissed) ? 'none' : 'block'
},
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
children: (0, _css.css)(_templateObject())
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-next-badge": true,
"data-error": hasError,
"data-error-expanded": isExpanded,
"data-animate": newErrorDetected,
style: style,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
ref: ref,
children: [
!disabled && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
ref: (0, _mergerefs.default)(triggerRef, propRef),
"data-next-mark": true,
"data-next-mark-loading": isLoading,
onClick: onTriggerClick,
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(NextMark, {
isLoading: isLoading,
isDevBuilding: isDevBuilding
})
}),
isExpanded && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-issues": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
"data-issues-open": true,
"aria-label": "Open issues overlay",
onClick: toggleErrorOverlay,
children: [
disabled && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-disabled-icon": true,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Warning, {})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(AnimateCount, {
animate: newErrorDetected,
"data-issues-count-animation": true,
children: issueCount
}, issueCount),
' ',
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
children: [
"Issue",
issueCount > 1 && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"aria-hidden": true,
"data-issues-count-plural": true,
// This only needs to animate once the count changes from 1 -> 2,
// otherwise it should stay static between re-renders.
"data-animate": newErrorDetected && issueCount === 2,
children: "s"
})
]
})
]
}),
!isBuildError && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
"data-issues-collapse": true,
"aria-label": "Collapse issues badge",
onClick: ()=>{
var _triggerRef_current;
if (disabled) {
setDismissed(true);
} else {
setIsErrorExpanded(false);
}
(_triggerRef_current = triggerRef.current) == null ? void 0 : _triggerRef_current.focus();
},
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Cross, {
"data-cross": true
})
})
]
})
]
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"aria-hidden": true,
"data-dot": true
})
]
});
});
function AnimateCount(param) {
let { children: count, animate = true, ...props } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
...props,
"data-animate": animate,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"aria-hidden": true,
"data-issues-count-exit": true,
children: count - 1
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
"data-issues-count": true,
"data-issues-count-enter": true,
children: count
})
]
});
}
function useMeasureWidth(ref) {
const [width, setWidth] = (0, _react.useState)(0);
const [pristine, setPristine] = (0, _react.useState)(true);
(0, _react.useEffect)(()=>{
const el = ref.current;
if (!el) {
return;
}
const observer = new ResizeObserver(()=>{
const { width: w } = el.getBoundingClientRect();
setWidth((prevWidth)=>{
if (prevWidth !== 0) {
setPristine(false);
}
return w;
});
});
observer.observe(el);
return ()=>observer.disconnect();
}, [
ref
]);
return [
width,
pristine
];
}
function useUpdateAnimation(issueCount, animationDurationMs) {
if (animationDurationMs === void 0) animationDurationMs = 0;
const lastUpdatedTimeStamp = (0, _react.useRef)(null);
const [animate, setAnimate] = (0, _react.useState)(false);
(0, _react.useEffect)(()=>{
if (issueCount > 0) {
const deltaMs = lastUpdatedTimeStamp.current ? Date.now() - lastUpdatedTimeStamp.current : -1;
lastUpdatedTimeStamp.current = Date.now();
// We don't animate if `issueCount` changes too quickly
if (deltaMs <= animationDurationMs) {
return;
}
setAnimate(true);
// It is important to use a CSS transitioned state, not a CSS keyframed animation
// because if the issue count increases faster than the animation duration, it
// will abruptly stop and not transition smoothly back to its original state.
const timeoutId = window.setTimeout(()=>{
setAnimate(false);
}, animationDurationMs);
return ()=>{
clearTimeout(timeoutId);
};
}
}, [
issueCount,
animationDurationMs
]);
return animate;
}
function NextMark(param) {
let { isLoading, isDevBuilding } = param;
const strokeColor = isDevBuilding ? 'rgba(255,255,255,0.7)' : 'white';
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
width: "40",
height: "40",
viewBox: "0 0 40 40",
fill: "none",
"data-next-mark-loading": isLoading,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("g", {
transform: "translate(8.5, 13)",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
className: isLoading ? 'path0' : 'paused',
d: "M13.3 15.2 L2.34 1 V12.6",
fill: "none",
stroke: "url(#next_logo_paint0_linear_1357_10853)",
strokeWidth: "1.86",
mask: "url(#next_logo_mask0)",
strokeDasharray: "29.6",
strokeDashoffset: "29.6"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
className: isLoading ? 'path1' : 'paused',
d: "M11.825 1.5 V13.1",
strokeWidth: "1.86",
stroke: "url(#next_logo_paint1_linear_1357_10853)",
strokeDasharray: "11.6",
strokeDashoffset: "11.6"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("defs", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "next_logo_paint0_linear_1357_10853",
x1: "9.95555",
y1: "11.1226",
x2: "15.4778",
y2: "17.9671",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
stopColor: strokeColor
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: "0.604072",
stopColor: strokeColor,
stopOpacity: "0"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: "1",
stopColor: strokeColor,
stopOpacity: "0"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("linearGradient", {
id: "next_logo_paint1_linear_1357_10853",
x1: "11.8222",
y1: "1.40039",
x2: "11.791",
y2: "9.62542",
gradientUnits: "userSpaceOnUse",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
stopColor: strokeColor
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("stop", {
offset: "1",
stopColor: strokeColor,
stopOpacity: "0"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("mask", {
id: "next_logo_mask0",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
width: "100%",
height: "100%",
fill: "white"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("rect", {
width: "5",
height: "1.5",
fill: "black"
})
]
})
]
})
]
});
}
function Warning() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "12",
height: "12",
viewBox: "0 0 12 12",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M3.98071 1.125L1.125 3.98071L1.125 8.01929L3.98071 10.875H8.01929L10.875 8.01929V3.98071L8.01929 1.125H3.98071ZM3.82538 0C3.62647 0 3.4357 0.0790176 3.29505 0.21967L0.21967 3.29505C0.0790176 3.4357 0 3.62647 0 3.82538V8.17462C0 8.37353 0.0790178 8.5643 0.21967 8.70495L3.29505 11.7803C3.4357 11.921 3.62647 12 3.82538 12H8.17462C8.37353 12 8.5643 11.921 8.70495 11.7803L11.7803 8.70495C11.921 8.5643 12 8.37353 12 8.17462V3.82538C12 3.62647 11.921 3.4357 11.7803 3.29505L8.70495 0.21967C8.5643 0.0790177 8.37353 0 8.17462 0H3.82538ZM6.5625 2.8125V3.375V6V6.5625H5.4375V6V3.375V2.8125H6.5625ZM6 9C6.41421 9 6.75 8.66421 6.75 8.25C6.75 7.83579 6.41421 7.5 6 7.5C5.58579 7.5 5.25 7.83579 5.25 8.25C5.25 8.66421 5.58579 9 6 9Z",
fill: "#EAEAEA"
})
});
}
function Cross(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "12",
height: "12",
viewBox: "0 0 14 14",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M3.08889 11.8384L2.62486 12.3024L1.69678 11.3744L2.16082 10.9103L6.07178 6.99937L2.16082 3.08841L1.69678 2.62437L2.62486 1.69629L3.08889 2.16033L6.99986 6.07129L10.9108 2.16033L11.3749 1.69629L12.3029 2.62437L11.8389 3.08841L7.92793 6.99937L11.8389 10.9103L12.3029 11.3744L11.3749 12.3024L10.9108 11.8384L6.99986 7.92744L3.08889 11.8384Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=next-logo.js.map
}}),
"[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/dev-build-indicator.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "devBuildIndicator", {
enumerable: true,
get: function() {
return devBuildIndicator;
}
});
const _initialize = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/initialize.js [app-client] (ecmascript)");
const NOOP = ()=>{};
const devBuildIndicator = {
/** Shows build indicator when Next.js is compiling. Requires initialize() first. */ show: NOOP,
/** Hides build indicator when Next.js finishes compiling. Requires initialize() first. */ hide: NOOP,
/** Sets up the build indicator UI component. Call this before using show/hide. */ initialize: _initialize.initialize
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dev-build-indicator.js.map
}}),
"[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/initialize.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
/*
* Singleton store to track whether the app is currently being built
* Used by the dev tools indicator of the new overlay to show build status
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
initialize: null,
useIsDevBuilding: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
initialize: function() {
return initialize;
},
useIsDevBuilding: function() {
return useIsDevBuilding;
}
});
const _devbuildindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/dev-build-indicator.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
let isVisible = false;
let listeners = [];
const subscribe = (listener)=>{
listeners.push(listener);
return ()=>{
listeners = listeners.filter((l)=>l !== listener);
};
};
const getSnapshot = ()=>isVisible;
function useIsDevBuilding() {
return (0, _react.useSyncExternalStore)(subscribe, getSnapshot);
}
function initialize() {
_devbuildindicator.devBuildIndicator.show = ()=>{
isVisible = true;
listeners.forEach((listener)=>listener());
};
_devbuildindicator.devBuildIndicator.hide = ()=>{
isVisible = false;
listeners.forEach((listener)=>listener());
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=initialize.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-delayed-render.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDelayedRender", {
enumerable: true,
get: function() {
return useDelayedRender;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
function useDelayedRender(active, options) {
if (active === void 0) active = false;
if (options === void 0) options = {};
const [mounted, setMounted] = (0, _react.useState)(active);
const [rendered, setRendered] = (0, _react.useState)(false);
const renderTimerRef = (0, _react.useRef)(null);
const unmountTimerRef = (0, _react.useRef)(null);
const clearTimers = (0, _react.useCallback)(()=>{
if (renderTimerRef.current !== null) {
window.clearTimeout(renderTimerRef.current);
renderTimerRef.current = null;
}
if (unmountTimerRef.current !== null) {
window.clearTimeout(unmountTimerRef.current);
unmountTimerRef.current = null;
}
}, []);
(0, _react.useEffect)(()=>{
const { enterDelay = 1, exitDelay = 0 } = options;
clearTimers();
if (active) {
setMounted(true);
if (enterDelay <= 0) {
setRendered(true);
} else {
renderTimerRef.current = window.setTimeout(()=>{
setRendered(true);
}, enterDelay);
}
} else {
setRendered(false);
if (exitDelay <= 0) {
setMounted(false);
} else {
unmountTimerRef.current = window.setTimeout(()=>{
setMounted(false);
}, exitDelay);
}
}
return clearTimers;
}, [
active,
options,
clearTimers
]);
return {
mounted,
rendered
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-delayed-render.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEV_TOOLS_INFO_STYLES: null,
DevToolsInfo: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEV_TOOLS_INFO_STYLES: function() {
return DEV_TOOLS_INFO_STYLES;
},
DevToolsInfo: function() {
return DevToolsInfo;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/utils.js [app-client] (ecmascript)");
const _usedelayedrender = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-delayed-render.js [app-client] (ecmascript)");
function DevToolsInfo(param) {
let { title, children, learnMoreLink, isOpen, triggerRef, close, ...props } = param;
const ref = (0, _react.useRef)(null);
const closeButtonRef = (0, _react.useRef)(null);
const { mounted, rendered } = (0, _usedelayedrender.useDelayedRender)(isOpen, {
// Intentionally no fade in, makes the UI feel more immediate
enterDelay: 0,
// Graceful fade out to confirm that the UI did not break
exitDelay: _utils.MENU_DURATION_MS
});
(0, _utils.useFocusTrap)(ref, triggerRef, isOpen, ()=>{
var _closeButtonRef_current;
(_closeButtonRef_current = closeButtonRef.current) == null ? void 0 : _closeButtonRef_current.focus();
});
(0, _utils.useClickOutside)(ref, triggerRef, isOpen, close);
if (!mounted) {
return null;
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
tabIndex: -1,
role: "dialog",
ref: ref,
"data-info-popover": true,
...props,
"data-rendered": rendered,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-container",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
className: "dev-tools-info-title",
children: title
}),
children,
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-button-container",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
ref: closeButtonRef,
className: "dev-tools-info-close-button",
onClick: close,
children: "Close"
}),
learnMoreLink && /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
className: "dev-tools-info-learn-more-button",
href: learnMoreLink,
target: "_blank",
rel: "noreferrer noopener",
children: "Learn More"
})
]
})
]
})
});
}
const DEV_TOOLS_INFO_STYLES = "\n [data-info-popover] {\n -webkit-font-smoothing: antialiased;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-alpha-400);\n background-clip: padding-box;\n box-shadow: var(--shadow-menu);\n border-radius: var(--rounded-xl);\n position: absolute;\n font-family: var(--font-stack-sans);\n z-index: 1000;\n overflow: hidden;\n opacity: 0;\n outline: 0;\n min-width: 350px;\n transition: opacity var(--animate-out-duration-ms)\n var(--animate-out-timing-function);\n\n &[data-rendered='true'] {\n opacity: 1;\n scale: 1;\n }\n\n button:focus-visible {\n outline: var(--focus-ring);\n }\n }\n\n .dev-tools-info-container {\n padding: 12px;\n }\n\n .dev-tools-info-title {\n padding: 8px 6px;\n color: var(--color-gray-1000);\n font-size: var(--size-16);\n font-weight: 600;\n line-height: var(--size-20);\n margin: 0;\n }\n\n .dev-tools-info-article {\n padding: 8px 6px;\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n line-height: var(--size-20);\n margin: 0;\n }\n .dev-tools-info-paragraph {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n .dev-tools-info-button-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 6px;\n }\n\n .dev-tools-info-close-button {\n padding: 0 8px;\n height: var(--size-28);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n transition: background var(--duration-short) ease;\n color: var(--color-gray-1000);\n border-radius: var(--rounded-md-2);\n border: 1px solid var(--color-gray-alpha-400);\n background: var(--color-background-200);\n }\n\n .dev-tools-info-close-button:hover {\n background: var(--color-gray-400);\n }\n\n .dev-tools-info-learn-more-button {\n align-content: center;\n padding: 0 8px;\n height: var(--size-28);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n transition: background var(--duration-short) ease;\n color: var(--color-background-100);\n border-radius: var(--rounded-md-2);\n background: var(--color-gray-1000);\n }\n\n .dev-tools-info-learn-more-button:hover {\n text-decoration: none;\n color: var(--color-background-100);\n opacity: 0.9;\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dev-tools-info.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES: null,
TurbopackInfo: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES: function() {
return DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES;
},
TurbopackInfo: function() {
return TurbopackInfo;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _devtoolsinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js [app-client] (ecmascript)");
const _copybutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/copy-button/index.js [app-client] (ecmascript)");
function TurbopackInfo(props) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_devtoolsinfo.DevToolsInfo, {
title: "Turbopack",
learnMoreLink: "https://nextjs.org/docs/app/api-reference/turbopack",
...props,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("article", {
className: "dev-tools-info-article",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-paragraph",
children: [
"Turbopack is an incremental bundler optimized for JavaScript and TypeScript, written in Rust, and built into Next.js. Turbopack can be used in Next.js in both the",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: "pages"
}),
" and",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: "app"
}),
" directories for faster local development."
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-paragraph",
children: [
"To enable Turbopack, use the",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: "--turbopack"
}),
" flag when running the Next.js development server."
]
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-info-code-block-container",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-code-block",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_copybutton.CopyButton, {
actionLabel: "Copy Next.js Turbopack Command",
successLabel: "Next.js Turbopack Command Copied",
content: '--turbopack',
className: "dev-tools-info-copy-button"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("pre", {
className: "dev-tools-info-code-block-pre",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("code", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-info-code-block-line",
children: ' '
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-info-code-block-line",
children: '{'
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-code-block-line",
children: [
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-key",
children: '"scripts"'
}),
": ",
'{'
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-code-block-line dev-tools-info-highlight",
children: [
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-key",
children: '"dev"'
}),
":",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-value",
children: '"next dev --turbopack"'
}),
","
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-code-block-line",
children: [
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-key",
children: '"build"'
}),
":",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-value",
children: '"next build"'
}),
","
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-code-block-line",
children: [
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-key",
children: '"start"'
}),
":",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-value",
children: '"next start"'
}),
","
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-info-code-block-line",
children: [
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-key",
children: '"lint"'
}),
":",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-info-code-block-json-value",
children: '"next lint"'
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-info-code-block-line",
children: ' }'
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-info-code-block-line",
children: '}'
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-info-code-block-line",
children: ' '
})
]
})
})
]
})
})
]
});
}
const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = "\n .dev-tools-info-code {\n background: var(--color-gray-400);\n color: var(--color-gray-1000);\n font-family: var(--font-stack-monospace);\n padding: 2px 4px;\n margin: 0;\n font-size: var(--size-13);\n white-space: break-spaces;\n border-radius: var(--rounded-md-2);\n }\n\n .dev-tools-info-code-block-container {\n padding: 6px;\n }\n\n .dev-tools-info-code-block {\n position: relative;\n background: var(--color-background-200);\n border: 1px solid var(--color-gray-alpha-400);\n border-radius: var(--rounded-md-2);\n min-width: 326px;\n }\n\n .dev-tools-info-code-block-pre {\n margin: 0;\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n }\n\n .dev-tools-info-copy-button {\n position: absolute;\n\n display: flex;\n justify-content: center;\n align-items: center;\n right: 8px;\n top: 8px;\n padding: 4px;\n height: var(--size-24);\n width: var(--size-24);\n border-radius: var(--rounded-md-2);\n border: 1px solid var(--color-gray-alpha-400);\n background: var(--color-background-100);\n }\n\n .dev-tools-info-code-block-line {\n display: block;\n line-height: 1.5;\n padding: 0 16px;\n }\n\n .dev-tools-info-code-block-line.dev-tools-info-highlight {\n border-left: 2px solid var(--color-blue-900);\n background: var(--color-blue-400);\n }\n\n .dev-tools-info-code-block-json-key {\n color: var(--color-syntax-keyword);\n }\n\n .dev-tools-info-code-block-json-value {\n color: var(--color-syntax-link);\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=turbopack-info.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/route-info.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEV_TOOLS_INFO_ROUTE_INFO_STYLES: null,
RouteInfo: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEV_TOOLS_INFO_ROUTE_INFO_STYLES: function() {
return DEV_TOOLS_INFO_ROUTE_INFO_STYLES;
},
RouteInfo: function() {
return RouteInfo;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _devtoolsinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js [app-client] (ecmascript)");
function StaticRouteContent(param) {
let { routerType } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("article", {
className: "dev-tools-info-article",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-paragraph",
children: [
"The path",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: window.location.pathname
}),
' ',
'is marked as "static" since it will be prerendered during the build time.'
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-paragraph",
children: [
"With Static Rendering, routes are rendered at build time, or in the background after",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
className: "dev-tools-info-link",
href: routerType === 'pages' ? 'https://nextjs.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration' : "https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration",
target: "_blank",
rel: "noopener noreferrer",
children: "data revalidation"
}),
"."
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "dev-tools-info-paragraph",
children: "Static rendering is useful when a route has data that is not personalized to the user and can be known at build time, such as a static blog post or a product page."
})
]
});
}
function DynamicRouteContent(param) {
let { routerType } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("article", {
className: "dev-tools-info-article",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-paragraph",
children: [
"The path",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: window.location.pathname
}),
' ',
'is marked as "dynamic" since it will be rendered for each user at',
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("strong", {
children: "request time"
}),
"."
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "dev-tools-info-paragraph",
children: "Dynamic rendering is useful when a route has data that is personalized to the user or has information that can only be known at request time, such as cookies or the URL's search params."
}),
routerType === 'pages' ? /*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-pagraph",
children: [
"Exporting the",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
className: "dev-tools-info-link",
href: "https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props",
target: "_blank",
rel: "noopener noreferrer",
children: "getServerSideProps"
}),
' ',
"function will opt the route into dynamic rendering. This function will be called by the server on every request."
]
}) : /*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "dev-tools-info-paragraph",
children: [
"During rendering, if a",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
className: "dev-tools-info-link",
href: "https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-apis",
target: "_blank",
rel: "noopener noreferrer",
children: "Dynamic API"
}),
' ',
"or a",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
className: "dev-tools-info-link",
href: "https://nextjs.org/docs/app/api-reference/functions/fetch",
target: "_blank",
rel: "noopener noreferrer",
children: "fetch"
}),
' ',
"option of",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: "{ cache: 'no-store' }"
}),
' ',
"is discovered, Next.js will switch to dynamically rendering the whole route."
]
})
]
});
}
const learnMoreLink = {
pages: {
static: 'https://nextjs.org/docs/pages/building-your-application/rendering/static-site-generation',
dynamic: 'https://nextjs.org/docs/pages/building-your-application/rendering/server-side-rendering'
},
app: {
static: 'https://nextjs.org/docs/app/building-your-application/rendering/server-components#static-rendering-default',
dynamic: 'https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-rendering'
}
};
function RouteInfo(param) {
let { routeType, routerType, ...props } = param;
const isStaticRoute = routeType === 'Static';
const learnMore = isStaticRoute ? learnMoreLink[routerType].static : learnMoreLink[routerType].dynamic;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_devtoolsinfo.DevToolsInfo, {
title: "" + routeType + " Route",
learnMoreLink: learnMore,
...props,
children: isStaticRoute ? /*#__PURE__*/ (0, _jsxruntime.jsx)(StaticRouteContent, {
routerType: routerType
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(DynamicRouteContent, {
routerType: routerType
})
});
}
const DEV_TOOLS_INFO_ROUTE_INFO_STYLES = "";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=route-info.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/gear-icon.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return GearIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function GearIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
viewBox: "0 0 20 20",
fill: "none",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fill: "currentColor",
fillRule: "evenodd",
d: "m9.7 3.736.045-.236h.51l.044.236a2.024 2.024 0 0 0 1.334 1.536c.19.066.375.143.554.23.618.301 1.398.29 2.03-.143l.199-.136.36.361-.135.199a2.024 2.024 0 0 0-.143 2.03c.087.179.164.364.23.554.224.65.783 1.192 1.536 1.334l.236.044v.51l-.236.044a2.024 2.024 0 0 0-1.536 1.334 4.95 4.95 0 0 1-.23.554 2.024 2.024 0 0 0 .143 2.03l.136.199-.361.36-.199-.135a2.024 2.024 0 0 0-2.03-.143c-.179.087-.364.164-.554.23a2.024 2.024 0 0 0-1.334 1.536l-.044.236h-.51l-.044-.236a2.024 2.024 0 0 0-1.334-1.536 4.952 4.952 0 0 1-.554-.23 2.024 2.024 0 0 0-2.03.143l-.199.136-.36-.361.135-.199a2.024 2.024 0 0 0 .143-2.03 4.958 4.958 0 0 1-.23-.554 2.024 2.024 0 0 0-1.536-1.334l-.236-.044v-.51l.236-.044a2.024 2.024 0 0 0 1.536-1.334 4.96 4.96 0 0 1 .23-.554 2.024 2.024 0 0 0-.143-2.03l-.136-.199.361-.36.199.135a2.024 2.024 0 0 0 2.03.143c.179-.087.364-.164.554-.23a2.024 2.024 0 0 0 1.334-1.536ZM8.5 2h3l.274 1.46c.034.185.17.333.348.394.248.086.49.186.722.3.17.082.37.074.526-.033l1.226-.839 2.122 2.122-.84 1.226a.524.524 0 0 0-.032.526c.114.233.214.474.3.722.061.177.21.314.394.348L18 8.5v3l-1.46.274a.524.524 0 0 0-.394.348 6.47 6.47 0 0 1-.3.722.524.524 0 0 0 .033.526l.839 1.226-2.122 2.122-1.226-.84a.524.524 0 0 0-.526-.032 6.477 6.477 0 0 1-.722.3.524.524 0 0 0-.348.394L11.5 18h-3l-.274-1.46a.524.524 0 0 0-.348-.394 6.477 6.477 0 0 1-.722-.3.524.524 0 0 0-.526.033l-1.226.839-2.122-2.122.84-1.226a.524.524 0 0 0 .032-.526 6.453 6.453 0 0 1-.3-.722.524.524 0 0 0-.394-.348L2 11.5v-3l1.46-.274a.524.524 0 0 0 .394-.348c.086-.248.186-.49.3-.722a.524.524 0 0 0-.033-.526l-.839-1.226 2.122-2.122 1.226.84a.524.524 0 0 0 .526.032 6.46 6.46 0 0 1 .722-.3.524.524 0 0 0 .348-.394L8.5 2Zm3 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm1.5 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",
clipRule: "evenodd"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=gear-icon.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/eye-icon.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return EyeIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function EyeIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
fill: "none",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fill: "currentColor",
fillRule: "evenodd",
d: "m.191 2.063.56.498 13.5 12 .561.498.997-1.121-.56-.498-1.81-1.608 2.88-3.342v-.98l-3.204-3.72C10.645.923 6.365.686 3.594 3.08L1.748 1.44 1.188.94.19 2.063ZM14.761 8l-2.442 2.836-1.65-1.466a3.001 3.001 0 0 0-4.342-3.86l-1.6-1.422a5.253 5.253 0 0 1 7.251.682L14.76 8ZM7.526 6.576l1.942 1.727a1.499 1.499 0 0 0-1.942-1.727Zm-7.845.935 1.722-2 1.137.979L1.24 8l2.782 3.23A5.25 5.25 0 0 0 9.9 12.703l.54 1.4a6.751 6.751 0 0 1-7.555-1.892L-.318 8.49v-.98Z",
clipRule: "evenodd"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=eye-icon.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/light-icon.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return LightIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function LightIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "20",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("g", {
clipPath: "url(#light_icon_clip_path)",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fill: "currentColor",
fillRule: "evenodd",
d: "M8.75.75V0h-1.5v2h1.5V.75ZM3.26 4.32l-.53-.53-.354-.353-.53-.53 1.06-1.061.53.53.354.354.53.53-1.06 1.06Zm8.42-1.06.53-.53.353-.354.53-.53 1.061 1.06-.53.53-.354.354-.53.53-1.06-1.06ZM8 11.25a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5Zm0 1.5a4.75 4.75 0 1 0 0-9.5 4.75 4.75 0 0 0 0 9.5Zm6-5.5h2v1.5h-2v-1.5Zm-13.25 0H0v1.5h2v-1.5H.75Zm1.62 5.32-.53.53 1.06 1.06.53-.53.354-.353.53-.53-1.06-1.061-.53.53-.354.354Zm10.2 1.06.53.53 1.06-1.06-.53-.53-.354-.354-.53-.53-1.06 1.06.53.53.353.354ZM8.75 14v2h-1.5v-2h1.5Z",
clipRule: "evenodd"
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("defs", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("clipPath", {
id: "light_icon_clip_path",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fill: "currentColor",
d: "M0 0h16v16H0z"
})
})
})
]
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=light-icon.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/dark-icon.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return DarkIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function DarkIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
"data-testid": "geist-icon",
height: "16",
strokeLinejoin: "round",
viewBox: "0 0 16 16",
width: "16",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M1.5 8.00005C1.5 5.53089 2.99198 3.40932 5.12349 2.48889C4.88136 3.19858 4.75 3.95936 4.75 4.7501C4.75 8.61609 7.88401 11.7501 11.75 11.7501C11.8995 11.7501 12.048 11.7454 12.1953 11.7361C11.0955 13.1164 9.40047 14.0001 7.5 14.0001C4.18629 14.0001 1.5 11.3138 1.5 8.00005ZM6.41706 0.577759C2.78784 1.1031 0 4.22536 0 8.00005C0 12.1422 3.35786 15.5001 7.5 15.5001C10.5798 15.5001 13.2244 13.6438 14.3792 10.9921L13.4588 9.9797C12.9218 10.155 12.3478 10.2501 11.75 10.2501C8.71243 10.2501 6.25 7.78767 6.25 4.7501C6.25 3.63431 6.58146 2.59823 7.15111 1.73217L6.41706 0.577759ZM13.25 1V1.75V2.75L14.25 2.75H15V4.25H14.25H13.25V5.25V6H11.75V5.25V4.25H10.75L10 4.25V2.75H10.75L11.75 2.75V1.75V1H13.25Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dark-icon.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/system-icon.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return SystemIcon;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
function SystemIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
strokeLinejoin: "round",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fill: "currentColor",
fillRule: "evenodd",
d: "M0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8.5a1 1 0 0 1-1 1H8.75v3h1.75V16h-5v-1.5h1.75v-3H1a1 1 0 0 1-1-1V2Zm1.5.5V10h13V2.5h-13Z",
clipRule: "evenodd"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=system-icon.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/preferences.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
NEXT_DEV_TOOLS_SCALE: null,
getInitialPosition: null,
getInitialTheme: null,
useDevToolsScale: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
NEXT_DEV_TOOLS_SCALE: function() {
return NEXT_DEV_TOOLS_SCALE;
},
getInitialPosition: function() {
return getInitialPosition;
},
getInitialTheme: function() {
return getInitialTheme;
},
useDevToolsScale: function() {
return useDevToolsScale;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _shared = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)");
const INDICATOR_POSITION = ("TURBOPACK compile-time value", "bottom-left") || 'bottom-left';
function getInitialPosition() {
if (typeof localStorage !== 'undefined' && localStorage.getItem(_shared.STORAGE_KEY_POSITION)) {
return localStorage.getItem(_shared.STORAGE_KEY_POSITION);
}
return INDICATOR_POSITION;
}
//////////////////////////////////////////////////////////////////////////////////////
const BASE_SIZE = 16;
const NEXT_DEV_TOOLS_SCALE = {
Small: BASE_SIZE / 14,
Medium: BASE_SIZE / 16,
Large: BASE_SIZE / 18
};
function getInitialScale() {
if (typeof localStorage !== 'undefined' && localStorage.getItem(_shared.STORAGE_KEY_SCALE)) {
return Number(localStorage.getItem(_shared.STORAGE_KEY_SCALE));
}
return NEXT_DEV_TOOLS_SCALE.Medium;
}
function useDevToolsScale() {
const [scale, setScale] = (0, _react.useState)(getInitialScale());
function set(value) {
setScale(value);
localStorage.setItem(_shared.STORAGE_KEY_SCALE, String(value));
}
return [
scale,
set
];
}
function getInitialTheme() {
if (typeof localStorage === 'undefined') {
return 'system';
}
const theme = localStorage.getItem(_shared.STORAGE_KEY_THEME);
return theme === 'dark' || theme === 'light' ? theme : 'system';
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=preferences.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/user-preferences.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEV_TOOLS_INFO_USER_PREFERENCES_STYLES: null,
UserPreferences: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEV_TOOLS_INFO_USER_PREFERENCES_STYLES: function() {
return DEV_TOOLS_INFO_USER_PREFERENCES_STYLES;
},
UserPreferences: function() {
return UserPreferences;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
const _eyeicon = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/eye-icon.js [app-client] (ecmascript)"));
const _shared = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)");
const _lighticon = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/light-icon.js [app-client] (ecmascript)"));
const _darkicon = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/dark-icon.js [app-client] (ecmascript)"));
const _systemicon = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/system-icon.js [app-client] (ecmascript)"));
const _devtoolsinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js [app-client] (ecmascript)");
const _preferences = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/preferences.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n .preferences-container {\n padding: 8px 6px;\n width: 100%;\n }\n\n @media (min-width: 576px) {\n .preferences-container {\n width: 480px;\n }\n }\n\n .preference-section:first-child {\n padding-top: 0;\n }\n\n .preference-section {\n padding: 12px 0;\n border-bottom: 1px solid var(--color-gray-400);\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 24px;\n }\n\n .preference-section:last-child {\n border-bottom: none;\n }\n\n .preference-header {\n margin-bottom: 0;\n flex: 1;\n }\n\n .preference-header label {\n font-size: var(--size-14);\n font-weight: 500;\n color: var(--color-gray-1000);\n margin: 0;\n }\n\n .preference-description {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n margin: 0;\n }\n\n .select-button,\n .action-button {\n display: flex;\n align-items: center;\n gap: 8px;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-lg);\n font-weight: 400;\n font-size: var(--size-14);\n color: var(--color-gray-1000);\n padding: 6px 8px;\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .select-button {\n &:focus-within {\n outline: var(--focus-ring);\n }\n\n select {\n all: unset;\n }\n }\n\n :global(.icon) {\n width: 18px;\n height: 18px;\n color: #666;\n }\n"
]);
_templateObject = function() {
return data;
};
return data;
}
function UserPreferences(param) {
let { setPosition, position, hide, scale, setScale, ...props } = param;
// derive initial theme from system preference
const [theme, setTheme] = (0, _react.useState)((0, _preferences.getInitialTheme)());
const handleThemeChange = (e)=>{
const portal = document.querySelector('nextjs-portal');
if (!portal) return;
setTheme(e.target.value);
if (e.target.value === 'system') {
portal.classList.remove('dark');
portal.classList.remove('light');
localStorage.removeItem(_shared.STORAGE_KEY_THEME);
return;
}
if (e.target.value === 'dark') {
portal.classList.add('dark');
portal.classList.remove('light');
localStorage.setItem(_shared.STORAGE_KEY_THEME, 'dark');
} else {
portal.classList.remove('dark');
portal.classList.add('light');
localStorage.setItem(_shared.STORAGE_KEY_THEME, 'light');
}
};
function handlePositionChange(e) {
setPosition(e.target.value);
localStorage.setItem(_shared.STORAGE_KEY_POSITION, e.target.value);
}
function handleSizeChange(param) {
let { target } = param;
const value = Number(target.value);
setScale(value);
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_devtoolsinfo.DevToolsInfo, {
title: "Preferences",
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preferences-container",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-section",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
htmlFor: "theme",
children: "Theme"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "preference-description",
children: "Select your theme preference."
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)(Select, {
id: "theme",
name: "theme",
prefix: /*#__PURE__*/ (0, _jsxruntime.jsx)(ThemeIcon, {
theme: theme
}),
value: theme,
onChange: handleThemeChange,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "system",
children: "System"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "light",
children: "Light"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "dark",
children: "Dark"
})
]
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-section",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
htmlFor: "position",
children: "Position"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "preference-description",
children: "Adjust the placement of your dev tools."
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)(Select, {
id: "position",
name: "position",
value: position,
onChange: handlePositionChange,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "bottom-left",
children: "Bottom Left"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "bottom-right",
children: "Bottom Right"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "top-left",
children: "Top Left"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: "top-right",
children: "Top Right"
})
]
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-section",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
htmlFor: "size",
children: "Size"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "preference-description",
children: "Adjust the size of your dev tools."
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(Select, {
id: "size",
name: "size",
value: scale,
onChange: handleSizeChange,
children: Object.entries(_preferences.NEXT_DEV_TOOLS_SCALE).map((param)=>{
let [key, value] = param;
return /*#__PURE__*/ (0, _jsxruntime.jsx)("option", {
value: value,
children: key
}, key);
})
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-section",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
id: "hide-dev-tools",
children: "Hide Dev Tools for this session"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
className: "preference-description",
children: "Hide Dev Tools until you restart your dev server, or 1 day."
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "preference-control",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
"aria-describedby": "hide-dev-tools",
name: "hide-dev-tools",
"data-hide-dev-tools": true,
className: "action-button",
onClick: hide,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_eyeicon.default, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
children: "Hide"
})
]
})
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "preference-section",
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "preference-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
children: "Disable Dev Tools for this project"
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
className: "preference-description",
children: [
"To disable this UI completely, set",
' ',
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: "devIndicators: false"
}),
' ',
"in your ",
/*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
className: "dev-tools-info-code",
children: "next.config"
}),
' ',
"file."
]
})
]
})
})
]
})
});
}
function Select(param) {
let { children, prefix, ...props } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "select-button",
children: [
prefix,
/*#__PURE__*/ (0, _jsxruntime.jsx)("select", {
...props,
children: children
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(ChevronDownIcon, {})
]
});
}
function ThemeIcon(param) {
let { theme } = param;
switch(theme){
case 'system':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_systemicon.default, {});
case 'dark':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_darkicon.default, {});
case 'light':
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_lighticon.default, {});
default:
return null;
}
}
const DEV_TOOLS_INFO_USER_PREFERENCES_STYLES = (0, _css.css)(_templateObject());
function ChevronDownIcon() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
"aria-hidden": true,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M14.0607 5.49999L13.5303 6.03032L8.7071 10.8535C8.31658 11.2441 7.68341 11.2441 7.29289 10.8535L2.46966 6.03032L1.93933 5.49999L2.99999 4.43933L3.53032 4.96966L7.99999 9.43933L12.4697 4.96966L13 4.43933L14.0607 5.49999Z",
fill: "currentColor"
})
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=user-preferences.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEV_TOOLS_INDICATOR_STYLES: null,
DevToolsIndicator: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEV_TOOLS_INDICATOR_STYLES: function() {
return DEV_TOOLS_INDICATOR_STYLES;
},
DevToolsIndicator: function() {
return DevToolsIndicator;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _toast = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/index.js [app-client] (ecmascript)");
const _nextlogo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.js [app-client] (ecmascript)");
const _initialize = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/initialize.js [app-client] (ecmascript)");
const _devrenderindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/dev-indicator/dev-render-indicator.js [app-client] (ecmascript)");
const _usedelayedrender = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-delayed-render.js [app-client] (ecmascript)");
const _turbopackinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js [app-client] (ecmascript)");
const _routeinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/route-info.js [app-client] (ecmascript)");
const _gearicon = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/icons/gear-icon.js [app-client] (ecmascript)"));
const _userpreferences = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/user-preferences.js [app-client] (ecmascript)");
const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/utils.js [app-client] (ecmascript)");
const _preferences = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/preferences.js [app-client] (ecmascript)");
function DevToolsIndicator(param) {
let { state, errorCount, isBuildError, setIsErrorOverlayOpen, ...props } = param;
const [isDevToolsIndicatorVisible, setIsDevToolsIndicatorVisible] = (0, _react.useState)(true);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(DevToolsPopover, {
routerType: state.routerType,
semver: state.versionInfo.installed,
issueCount: errorCount,
isStaticRoute: state.staticIndicator,
hide: ()=>{
setIsDevToolsIndicatorVisible(false);
fetch('/__nextjs_disable_dev_indicator', {
method: 'POST'
});
},
setIsErrorOverlayOpen: setIsErrorOverlayOpen,
isTurbopack: !!("TURBOPACK compile-time value", true),
disabled: state.disableDevIndicator || !isDevToolsIndicatorVisible,
isBuildError: isBuildError,
...props
});
}
const Context = /*#__PURE__*/ (0, _react.createContext)({});
const OVERLAYS = {
Root: 'root',
Turbo: 'turbo',
Route: 'route',
Preferences: 'preferences'
};
function DevToolsPopover(param) {
let { routerType, disabled, issueCount, isStaticRoute, isTurbopack, isBuildError, hide, setIsErrorOverlayOpen, scale, setScale } = param;
const menuRef = (0, _react.useRef)(null);
const triggerRef = (0, _react.useRef)(null);
const [open, setOpen] = (0, _react.useState)(null);
const [position, setPosition] = (0, _react.useState)((0, _preferences.getInitialPosition)());
const [selectedIndex, setSelectedIndex] = (0, _react.useState)(-1);
const isMenuOpen = open === OVERLAYS.Root;
const isTurbopackInfoOpen = open === OVERLAYS.Turbo;
const isRouteInfoOpen = open === OVERLAYS.Route;
const isPreferencesOpen = open === OVERLAYS.Preferences;
const { mounted: menuMounted, rendered: menuRendered } = (0, _usedelayedrender.useDelayedRender)(isMenuOpen, {
// Intentionally no fade in, makes the UI feel more immediate
enterDelay: 0,
// Graceful fade out to confirm that the UI did not break
exitDelay: _utils.MENU_DURATION_MS
});
// Features to make the menu accessible
(0, _utils.useFocusTrap)(menuRef, triggerRef, isMenuOpen);
(0, _utils.useClickOutside)(menuRef, triggerRef, isMenuOpen, closeMenu);
(0, _react.useEffect)(()=>{
if (open === null) {
// Avoid flashing selected state
const id = setTimeout(()=>{
setSelectedIndex(-1);
}, _utils.MENU_DURATION_MS);
return ()=>clearTimeout(id);
}
}, [
open
]);
function select(index) {
var _menuRef_current;
if (index === 'first') {
setTimeout(()=>{
var _menuRef_current;
const all = (_menuRef_current = menuRef.current) == null ? void 0 : _menuRef_current.querySelectorAll('[role="menuitem"]');
if (all) {
const firstIndex = all[0].getAttribute('data-index');
select(Number(firstIndex));
}
});
return;
}
if (index === 'last') {
setTimeout(()=>{
var _menuRef_current;
const all = (_menuRef_current = menuRef.current) == null ? void 0 : _menuRef_current.querySelectorAll('[role="menuitem"]');
if (all) {
const lastIndex = all.length - 1;
select(lastIndex);
}
});
return;
}
const el = (_menuRef_current = menuRef.current) == null ? void 0 : _menuRef_current.querySelector('[data-index="' + index + '"]');
if (el) {
setSelectedIndex(index);
el == null ? void 0 : el.focus();
}
}
function onMenuKeydown(e) {
e.preventDefault();
switch(e.key){
case 'ArrowDown':
const next = selectedIndex + 1;
select(next);
break;
case 'ArrowUp':
const prev = selectedIndex - 1;
select(prev);
break;
case 'Home':
select('first');
break;
case 'End':
select('last');
break;
default:
break;
}
}
function openErrorOverlay() {
setOpen(null);
if (issueCount > 0) {
setIsErrorOverlayOpen(true);
}
}
function toggleErrorOverlay() {
setIsErrorOverlayOpen((prev)=>!prev);
}
function openRootMenu() {
setOpen((prevOpen)=>{
if (prevOpen === null) select('first');
return OVERLAYS.Root;
});
}
function onTriggerClick() {
if (open === OVERLAYS.Root) {
setOpen(null);
} else {
openRootMenu();
setTimeout(()=>{
select('first');
});
}
}
function closeMenu() {
// Only close when we were on `Root`,
// otherwise it will close other overlays
setOpen((prevOpen)=>{
if (prevOpen === OVERLAYS.Root) {
return null;
}
return prevOpen;
});
}
function handleHideDevtools() {
setOpen(null);
hide();
}
const [vertical, horizontal] = position.split('-', 2);
const popover = {
[vertical]: 'calc(100% + 8px)',
[horizontal]: 0
};
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_toast.Toast, {
"data-nextjs-toast": true,
style: {
'--animate-out-duration-ms': "" + _utils.MENU_DURATION_MS + "ms",
'--animate-out-timing-function': _utils.MENU_CURVE,
boxShadow: 'none',
zIndex: 2147483647,
// Reset the toast component's default positions.
bottom: 'initial',
left: 'initial',
[vertical]: '20px',
[horizontal]: '20px'
},
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_nextlogo.NextLogo, {
ref: triggerRef,
"aria-haspopup": "menu",
"aria-expanded": isMenuOpen,
"aria-controls": "nextjs-dev-tools-menu",
"aria-label": "" + (isMenuOpen ? 'Close' : 'Open') + " Next.js Dev Tools",
"data-nextjs-dev-tools-button": true,
disabled: disabled,
issueCount: issueCount,
onTriggerClick: onTriggerClick,
toggleErrorOverlay: toggleErrorOverlay,
isDevBuilding: (0, _initialize.useIsDevBuilding)(),
isDevRendering: (0, _devrenderindicator.useIsDevRendering)(),
isBuildError: isBuildError,
scale: scale
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_routeinfo.RouteInfo, {
isOpen: isRouteInfoOpen,
close: openRootMenu,
triggerRef: triggerRef,
style: popover,
routerType: routerType,
routeType: isStaticRoute ? 'Static' : 'Dynamic'
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_turbopackinfo.TurbopackInfo, {
isOpen: isTurbopackInfoOpen,
close: openRootMenu,
triggerRef: triggerRef,
style: popover
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_userpreferences.UserPreferences, {
isOpen: isPreferencesOpen,
close: openRootMenu,
triggerRef: triggerRef,
style: popover,
hide: handleHideDevtools,
setPosition: setPosition,
position: position,
scale: scale,
setScale: setScale
}),
menuMounted && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
ref: menuRef,
id: "nextjs-dev-tools-menu",
role: "menu",
dir: "ltr",
"aria-orientation": "vertical",
"aria-label": "Next.js Dev Tools Items",
tabIndex: -1,
className: "dev-tools-indicator-menu",
onKeyDown: onMenuKeydown,
"data-rendered": menuRendered,
style: popover,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(Context.Provider, {
value: {
closeMenu,
selectedIndex,
setSelectedIndex
},
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-indicator-inner",
children: [
issueCount > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(MenuItem, {
title: issueCount + " " + (issueCount === 1 ? 'issue' : 'issues') + " found. Click to view details in the dev overlay.",
index: 0,
label: "Issues",
value: /*#__PURE__*/ (0, _jsxruntime.jsx)(IssueCount, {
children: issueCount
}),
onClick: openErrorOverlay
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(MenuItem, {
title: "Current route is " + (isStaticRoute ? 'static' : 'dynamic') + ".",
label: "Route",
index: 1,
value: isStaticRoute ? 'Static' : 'Dynamic',
onClick: ()=>setOpen(OVERLAYS.Route),
"data-nextjs-route-type": isStaticRoute ? 'static' : 'dynamic'
}),
isTurbopack ? /*#__PURE__*/ (0, _jsxruntime.jsx)(MenuItem, {
title: "Turbopack is enabled.",
label: "Turbopack",
value: "Enabled"
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(MenuItem, {
index: 2,
title: "Learn about Turbopack and how to enable it in your application.",
label: "Try Turbopack",
value: /*#__PURE__*/ (0, _jsxruntime.jsx)(ChevronRight, {}),
onClick: ()=>setOpen(OVERLAYS.Turbo)
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
className: "dev-tools-indicator-footer",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(MenuItem, {
"data-preferences": true,
label: "Preferences",
value: /*#__PURE__*/ (0, _jsxruntime.jsx)(_gearicon.default, {}),
onClick: ()=>setOpen(OVERLAYS.Preferences),
index: isTurbopack ? 2 : 3
})
})
]
})
})
]
});
}
function ChevronRight() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
fill: "#666",
fillRule: "evenodd",
clipRule: "evenodd",
d: "M5.50011 1.93945L6.03044 2.46978L10.8537 7.293C11.2442 7.68353 11.2442 8.31669 10.8537 8.70722L6.03044 13.5304L5.50011 14.0608L4.43945 13.0001L4.96978 12.4698L9.43945 8.00011L4.96978 3.53044L4.43945 3.00011L5.50011 1.93945Z"
})
});
}
function MenuItem(param) {
let { index, label, value, onClick, href, ...props } = param;
const isInteractive = typeof onClick === 'function' || typeof href === 'string';
const { closeMenu, selectedIndex, setSelectedIndex } = (0, _react.useContext)(Context);
const selected = selectedIndex === index;
function click() {
if (isInteractive) {
onClick == null ? void 0 : onClick();
closeMenu();
if (href) {
window.open(href, '_blank', 'noopener, noreferrer');
}
}
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "dev-tools-indicator-item",
"data-index": index,
"data-selected": selected,
onClick: click,
// Needs `onMouseMove` instead of enter to work together
// with keyboard and mouse input
onMouseMove: ()=>{
if (isInteractive && index !== undefined && selectedIndex !== index) {
setSelectedIndex(index);
}
},
onMouseLeave: ()=>setSelectedIndex(-1),
onKeyDown: (e)=>{
if (e.key === 'Enter' || e.key === ' ') {
click();
}
},
role: isInteractive ? 'menuitem' : undefined,
tabIndex: selected ? 0 : -1,
...props,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-indicator-label",
children: label
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-indicator-value",
children: value
})
]
});
}
function IssueCount(param) {
let { children } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
className: "dev-tools-indicator-issue-count",
"data-has-issues": children > 0,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
className: "dev-tools-indicator-issue-count-indicator"
}),
children
]
});
}
const DEV_TOOLS_INDICATOR_STYLES = "\n .dev-tools-indicator-menu {\n -webkit-font-smoothing: antialiased;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-alpha-400);\n background-clip: padding-box;\n box-shadow: var(--shadow-menu);\n border-radius: var(--rounded-xl);\n position: absolute;\n font-family: var(--font-stack-sans);\n z-index: 1000;\n overflow: hidden;\n opacity: 0;\n outline: 0;\n min-width: 248px;\n transition: opacity var(--animate-out-duration-ms)\n var(--animate-out-timing-function);\n\n &[data-rendered='true'] {\n opacity: 1;\n scale: 1;\n }\n }\n\n .dev-tools-indicator-inner {\n padding: 6px;\n width: 100%;\n }\n\n .dev-tools-indicator-item {\n display: flex;\n align-items: center;\n padding: 8px 6px;\n height: var(--size-36);\n border-radius: 6px;\n text-decoration: none !important;\n user-select: none;\n white-space: nowrap;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: 0;\n }\n }\n\n .dev-tools-indicator-footer {\n background: var(--color-background-200);\n padding: 6px;\n border-top: 1px solid var(--color-gray-400);\n width: 100%;\n }\n\n .dev-tools-indicator-item[data-selected='true'] {\n cursor: pointer;\n background-color: var(--color-gray-200);\n }\n\n .dev-tools-indicator-label {\n font-size: var(--size-14);\n line-height: var(--size-20);\n color: var(--color-gray-1000);\n }\n\n .dev-tools-indicator-value {\n font-size: var(--size-14);\n line-height: var(--size-20);\n color: var(--color-gray-900);\n margin-left: auto;\n }\n\n .dev-tools-indicator-issue-count {\n --color-primary: var(--color-gray-800);\n --color-secondary: var(--color-gray-100);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 8px;\n min-width: var(--size-40);\n height: var(--size-24);\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-alpha-400);\n background-clip: padding-box;\n box-shadow: var(--shadow-small);\n padding: 2px;\n color: var(--color-gray-1000);\n border-radius: 128px;\n font-weight: 500;\n font-size: var(--size-13);\n font-variant-numeric: tabular-nums;\n\n &[data-has-issues='true'] {\n --color-primary: var(--color-red-800);\n --color-secondary: var(--color-red-100);\n }\n\n .dev-tools-indicator-issue-count-indicator {\n width: var(--size-8);\n height: var(--size-8);\n background: var(--color-primary);\n box-shadow: 0 0 0 2px var(--color-secondary);\n border-radius: 50%;\n }\n }\n\n .dev-tools-indicator-shortcut {\n display: flex;\n gap: 4px;\n\n kbd {\n width: var(--size-20);\n height: var(--size-20);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--rounded-md);\n border: 1px solid var(--color-gray-400);\n font-family: var(--font-stack-sans);\n background: var(--color-background-100);\n color: var(--color-gray-1000);\n text-align: center;\n font-size: var(--size-12);\n line-height: var(--size-16);\n }\n }\n";
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dev-tools-indicator.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/component-styles.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ComponentStyles", {
enumerable: true,
get: function() {
return ComponentStyles;
}
});
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _codeframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/code-frame/code-frame.js [app-client] (ecmascript)");
const _dialog = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/dialog/index.js [app-client] (ecmascript)");
const _erroroverlaylayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js [app-client] (ecmascript)");
const _erroroverlaybottomstack = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js [app-client] (ecmascript)");
const _erroroverlaypagination = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.js [app-client] (ecmascript)");
const _styles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/overlay/styles.js [app-client] (ecmascript)");
const _erroroverlayfooter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-footer/error-overlay-footer.js [app-client] (ecmascript)");
const _terminal = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/terminal.js [app-client] (ecmascript)");
const _toast = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/toast/index.js [app-client] (ecmascript)");
const _versionstalenessinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.js [app-client] (ecmascript)");
const _builderror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/build-error.js [app-client] (ecmascript)");
const _errors = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/errors.js [app-client] (ecmascript)");
const _runtimeerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/index.js [app-client] (ecmascript)");
const _copybutton = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/copy-button/index.js [app-client] (ecmascript)");
const _callstackframe = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js [app-client] (ecmascript)");
const _devtoolsindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
const _editorlink = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/terminal/editor-link.js [app-client] (ecmascript)");
const _environmentnamelabel = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.js [app-client] (ecmascript)");
const _devtoolsinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js [app-client] (ecmascript)");
const _turbopackinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js [app-client] (ecmascript)");
const _routeinfo = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/route-info.js [app-client] (ecmascript)");
const _userpreferences = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/user-preferences.js [app-client] (ecmascript)");
const _fader = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/fader/index.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n ",
"\n "
]);
_templateObject = function() {
return data;
};
return data;
}
function ComponentStyles() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
children: (0, _css.css)(_templateObject(), _copybutton.COPY_BUTTON_STYLES, _callstackframe.CALL_STACK_FRAME_STYLES, _environmentnamelabel.ENVIRONMENT_NAME_LABEL_STYLES, _styles.styles, _toast.styles, _dialog.styles, _erroroverlaylayout.styles, _erroroverlayfooter.styles, _erroroverlaybottomstack.styles, _erroroverlaypagination.styles, _codeframe.CODE_FRAME_STYLES, _terminal.TERMINAL_STYLES, _editorlink.EDITOR_LINK_STYLES, _builderror.styles, _errors.styles, _runtimeerror.styles, _versionstalenessinfo.styles, _devtoolsindicator.DEV_TOOLS_INDICATOR_STYLES, _devtoolsinfo.DEV_TOOLS_INFO_STYLES, _turbopackinfo.DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES, _routeinfo.DEV_TOOLS_INFO_ROUTE_INFO_STYLES, _userpreferences.DEV_TOOLS_INFO_USER_PREFERENCES_STYLES, _fader.FADER_STYLES)
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=component-styles.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/css-reset.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CssReset", {
enumerable: true,
get: function() {
return CssReset;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n :host {\n all: initial;\n\n /* the direction property is not reset by 'all' */\n direction: ltr;\n }\n\n /*!\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\n */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n\n article,\n aside,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n main,\n nav,\n section {\n display: block;\n }\n\n :host {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n font-size: 16px;\n font-weight: 400;\n line-height: 1.5;\n color: var(--color-font);\n text-align: left;\n }\n\n :host:not(button) {\n background-color: #fff;\n }\n\n [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0 !important;\n }\n\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n margin-bottom: 8px;\n }\n\n p {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n abbr[title],\n abbr[data-original-title] {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n cursor: help;\n border-bottom: 0;\n -webkit-text-decoration-skip-ink: none;\n text-decoration-skip-ink: none;\n }\n\n address {\n margin-bottom: 16px;\n font-style: normal;\n line-height: inherit;\n }\n\n ol,\n ul,\n dl {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-bottom: 0;\n }\n\n dt {\n font-weight: 700;\n }\n\n dd {\n margin-bottom: 8px;\n margin-left: 0;\n }\n\n blockquote {\n margin: 0 0 16px;\n }\n\n b,\n strong {\n font-weight: bolder;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n a {\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n }\n\n a:hover {\n color: #0056b3;\n text-decoration: underline;\n }\n\n a:not([href]) {\n color: inherit;\n text-decoration: none;\n }\n\n a:not([href]):hover {\n color: inherit;\n text-decoration: none;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n font-size: 1em;\n }\n\n pre {\n margin-top: 0;\n margin-bottom: 16px;\n overflow: auto;\n }\n\n figure {\n margin: 0 0 16px;\n }\n\n img {\n vertical-align: middle;\n border-style: none;\n }\n\n svg {\n overflow: hidden;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n caption {\n padding-top: 12px;\n padding-bottom: 12px;\n color: #6c757d;\n text-align: left;\n caption-side: bottom;\n }\n\n th {\n text-align: inherit;\n }\n\n label {\n display: inline-block;\n margin-bottom: 8px;\n }\n\n button {\n border-radius: 0;\n border: 0;\n padding: 0;\n margin: 0;\n background: none;\n appearance: none;\n -webkit-appearance: none;\n }\n\n button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n button:focus:not(:focus-visible) {\n outline: none;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n select {\n word-wrap: normal;\n }\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n -webkit-appearance: button;\n }\n\n button:not(:disabled),\n [type='button']:not(:disabled),\n [type='reset']:not(:disabled),\n [type='submit']:not(:disabled) {\n cursor: pointer;\n }\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n\n input[type='radio'],\n input[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n }\n\n input[type='date'],\n input[type='time'],\n input[type='datetime-local'],\n input[type='month'] {\n -webkit-appearance: listbox;\n }\n\n textarea {\n overflow: auto;\n resize: vertical;\n }\n\n fieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n }\n\n legend {\n display: block;\n width: 100%;\n max-width: 100%;\n padding: 0;\n margin-bottom: 8px;\n font-size: 24px;\n line-height: inherit;\n color: inherit;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n [type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n }\n\n [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n }\n\n output {\n display: inline-block;\n }\n\n summary {\n display: list-item;\n cursor: pointer;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n "
]);
_templateObject = function() {
return data;
};
return data;
}
function CssReset() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
children: (0, _css.css)(_templateObject())
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=css-reset.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/colors.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Colors", {
enumerable: true,
get: function() {
return Colors;
}
});
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
'\n :host {\n /* \n * CAUTION: THIS IS A WORKAROUND!\n * For now, we use @babel/code-frame to parse the code frame which does not support option to change the color.\n * x-ref: https://github.com/babel/babel/blob/efa52324ff835b794c48080f14877b6caf32cd15/packages/babel-code-frame/src/defs.ts#L40-L54\n * So, we do a workaround mapping to change the color matching the theme.\n *\n * For example, in @babel/code-frame, the "keyword" is mapped to ANSI "cyan".\n * We want the "keyword" to use the "syntax-keyword" color in the theme.\n * So, we map the "cyan" to the "syntax-keyword" in the theme.\n */\n /* cyan: keyword */\n --color-ansi-cyan: var(--color-syntax-keyword);\n /* yellow: capitalized, jsxIdentifier, punctuation */\n --color-ansi-yellow: var(--color-syntax-function);\n /* magenta: number, regex */\n --color-ansi-magenta: var(--color-syntax-keyword);\n /* green: string */\n --color-ansi-green: var(--color-syntax-string);\n /* gray (bright black): comment, gutter */\n --color-ansi-bright-black: var(--color-syntax-comment);\n\n /* Ansi - Temporary */\n --color-ansi-selection: var(--color-gray-alpha-300);\n --color-ansi-bg: var(--color-background-200);\n --color-ansi-fg: var(--color-gray-1000);\n\n --color-ansi-white: var(--color-gray-700);\n --color-ansi-black: var(--color-gray-200);\n --color-ansi-blue: var(--color-blue-700);\n --color-ansi-red: var(--color-red-700);\n --color-ansi-bright-white: var(--color-gray-1000);\n --color-ansi-bright-blue: var(--color-blue-800);\n --color-ansi-bright-cyan: var(--color-blue-800);\n --color-ansi-bright-green: var(--color-green-800);\n --color-ansi-bright-magenta: var(--color-blue-800);\n --color-ansi-bright-red: var(--color-red-800);\n --color-ansi-bright-yellow: var(--color-amber-900);\n\n /* Background Light */\n --color-background-100: #ffffff;\n --color-background-200: #fafafa;\n\n /* Syntax Light */\n --color-syntax-comment: #545454;\n --color-syntax-constant: #171717;\n --color-syntax-function: #0054ad;\n --color-syntax-keyword: #a51850;\n --color-syntax-link: #066056;\n --color-syntax-parameter: #8f3e00;\n --color-syntax-punctuation: #171717;\n --color-syntax-string: #036157;\n --color-syntax-string-expression: #066056;\n\n /* Gray Scale Light */\n --color-gray-100: #f2f2f2;\n --color-gray-200: #ebebeb;\n --color-gray-300: #e6e6e6;\n --color-gray-400: #eaeaea;\n --color-gray-500: #c9c9c9;\n --color-gray-600: #a8a8a8;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #666666;\n --color-gray-1000: #171717;\n\n /* Gray Alpha Scale Light */\n --color-gray-alpha-100: rgba(0, 0, 0, 0.05);\n --color-gray-alpha-200: rgba(0, 0, 0, 0.081);\n --color-gray-alpha-300: rgba(0, 0, 0, 0.1);\n --color-gray-alpha-400: rgba(0, 0, 0, 0.08);\n --color-gray-alpha-500: rgba(0, 0, 0, 0.21);\n --color-gray-alpha-600: rgba(0, 0, 0, 0.34);\n --color-gray-alpha-700: rgba(0, 0, 0, 0.44);\n --color-gray-alpha-800: rgba(0, 0, 0, 0.51);\n --color-gray-alpha-900: rgba(0, 0, 0, 0.605);\n --color-gray-alpha-1000: rgba(0, 0, 0, 0.91);\n\n /* Blue Scale Light */\n --color-blue-100: #f0f7ff;\n --color-blue-200: #edf6ff;\n --color-blue-300: #e1f0ff;\n --color-blue-400: #cde7ff;\n --color-blue-500: #99ceff;\n --color-blue-600: #52aeff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #0067d6;\n --color-blue-1000: #0025ad;\n\n /* Red Scale Light */\n --color-red-100: #fff0f0;\n --color-red-200: #ffebeb;\n --color-red-300: #ffe5e5;\n --color-red-400: #fdd8d8;\n --color-red-500: #f8baba;\n --color-red-600: #f87274;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ca2a30;\n --color-red-1000: #381316;\n\n /* Amber Scale Light */\n --color-amber-100: #fff6e5;\n --color-amber-200: #fff4d5;\n --color-amber-300: #fef0cd;\n --color-amber-400: #ffddbf;\n --color-amber-500: #ffc96b;\n --color-amber-600: #f5b047;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #a35200;\n --color-amber-1000: #4e2009;\n\n /* Green Scale Light */\n --color-green-100: #effbef;\n --color-green-200: #eafaea;\n --color-green-300: #dcf6dc;\n --color-green-400: #c8f1c9;\n --color-green-500: #99e59f;\n --color-green-600: #6cda76;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #297c3b;\n --color-green-1000: #18311e;\n\n /* Turbopack Light - Temporary */\n --color-turbopack-text-red: #ff1e56;\n --color-turbopack-text-blue: #0096ff;\n --color-turbopack-border-red: #f0adbe;\n --color-turbopack-border-blue: #adccea;\n --color-turbopack-background-red: #fff7f9;\n --color-turbopack-background-blue: #f6fbff;\n }\n '
]);
_templateObject = function() {
return data;
};
return data;
}
function Colors() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
children: (0, _css.css)(_templateObject())
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=colors.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay/error-overlay.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ErrorOverlay", {
enumerable: true,
get: function() {
return ErrorOverlay;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _builderror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/build-error.js [app-client] (ecmascript)");
const _errors = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/errors.js [app-client] (ecmascript)");
const _usedelayedrender = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/hooks/use-delayed-render.js [app-client] (ecmascript)");
const transitionDurationMs = 200;
function ErrorOverlay(param) {
let { state, runtimeErrors, isErrorOverlayOpen, setIsErrorOverlayOpen } = param;
const isTurbopack = !!("TURBOPACK compile-time value", true);
// This hook lets us do an exit animation before unmounting the component
const { mounted, rendered } = (0, _usedelayedrender.useDelayedRender)(isErrorOverlayOpen, {
exitDelay: transitionDurationMs
});
const commonProps = {
rendered,
transitionDurationMs,
isTurbopack,
versionInfo: state.versionInfo
};
if (state.buildError !== null) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_builderror.BuildError, {
...commonProps,
message: state.buildError,
// This is not a runtime error, forcedly display error overlay
rendered: true
});
}
// No Runtime Errors.
if (!runtimeErrors.length) {
// Workaround React quirk that triggers "Switch to client-side rendering" if
// we return no Suspense boundary here.
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {});
}
if (!mounted) {
// Workaround React quirk that triggers "Switch to client-side rendering" if
// we return no Suspense boundary here.
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errors.Errors, {
...commonProps,
debugInfo: state.debugInfo,
runtimeErrors: runtimeErrors,
onClose: ()=>{
setIsErrorOverlayOpen(false);
}
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=error-overlay.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/render-error.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RenderError", {
enumerable: true,
get: function() {
return RenderError;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _shared = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)");
const _geterrorbytype = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/get-error-by-type.js [app-client] (ecmascript)");
function getErrorSignature(ev) {
const { event } = ev;
// eslint-disable-next-line default-case -- TypeScript checks this
switch(event.type){
case _shared.ACTION_UNHANDLED_ERROR:
case _shared.ACTION_UNHANDLED_REJECTION:
{
return event.reason.name + "::" + event.reason.message + "::" + event.reason.stack;
}
}
}
const RenderError = (props)=>{
const { state } = props;
const isBuildError = !!state.buildError;
if (isBuildError) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(RenderBuildError, {
...props
});
} else {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(RenderRuntimeError, {
...props
});
}
};
const RenderRuntimeError = (param)=>{
let { children, state, isAppDir } = param;
const { errors } = state;
const [lookups, setLookups] = (0, _react.useState)({});
const [runtimeErrors, nextError] = (0, _react.useMemo)(()=>{
let ready = [];
let next = null;
// Ensure errors are displayed in the order they occurred in:
for(let idx = 0; idx < errors.length; ++idx){
const e = errors[idx];
const { id } = e;
if (id in lookups) {
ready.push(lookups[id]);
continue;
}
// Check for duplicate errors
if (idx > 0) {
const prev = errors[idx - 1];
if (getErrorSignature(prev) === getErrorSignature(e)) {
continue;
}
}
next = e;
break;
}
return [
ready,
next
];
}, [
errors,
lookups
]);
(0, _react.useEffect)(()=>{
if (nextError == null) {
return;
}
let mounted = true;
(0, _geterrorbytype.getErrorByType)(nextError, isAppDir).then((resolved)=>{
if (mounted) {
// We don't care if the desired error changed while we were resolving,
// thus we're not tracking it using a ref. Once the work has been done,
// we'll store it.
setLookups((m)=>({
...m,
[resolved.id]: resolved
}));
}
});
return ()=>{
mounted = false;
};
}, [
nextError,
isAppDir
]);
const totalErrorCount = errors.filter((err, idx)=>{
const prev = errors[idx - 1];
// Check for duplicates
if (idx > 0) return getErrorSignature(prev) !== getErrorSignature(err);
return true;
}).length;
return children({
runtimeErrors,
totalErrorCount
});
};
const RenderBuildError = (param)=>{
let { children } = param;
return children({
runtimeErrors: [],
// Build errors and missing root layout tags persist until fixed,
// so we can set a fixed error count of 1
totalErrorCount: 1
});
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=render-error.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/dark-theme.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DarkTheme", {
enumerable: true,
get: function() {
return DarkTheme;
}
});
const _tagged_template_literal_loose = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _css = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/css.js [app-client] (ecmascript)");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n :host(.dark) {\n ",
"\n ",
"\n }\n\n @media (prefers-color-scheme: dark) {\n :host(:not(.light)) {\n ",
"\n ",
"\n }\n }\n "
]);
_templateObject = function() {
return data;
};
return data;
}
const colors = "\n /* Background Dark */\n --color-background-100: #0a0a0a;\n --color-background-200: #000000;\n\n /* Syntax Dark */\n --color-syntax-comment: #a0a0a0;\n --color-syntax-constant: #ededed;\n --color-syntax-function: #52a9ff;\n --color-syntax-keyword: #f76e99;\n --color-syntax-link: #0ac5b2;\n --color-syntax-parameter: #f1a10d;\n --color-syntax-punctuation: #ededed;\n --color-syntax-string: #0ac5b2;\n --color-syntax-string-expression: #0ac5b2;\n\n /* Gray Scale Dark */\n --color-gray-100: #1a1a1a;\n --color-gray-200: #1f1f1f;\n --color-gray-300: #292929;\n --color-gray-400: #2e2e2e;\n --color-gray-500: #454545;\n --color-gray-600: #878787;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #a0a0a0;\n --color-gray-1000: #ededed;\n\n /* Gray Alpha Scale Dark */\n --color-gray-alpha-100: rgba(255, 255, 255, 0.066);\n --color-gray-alpha-200: rgba(255, 255, 255, 0.087);\n --color-gray-alpha-300: rgba(255, 255, 255, 0.125);\n --color-gray-alpha-400: rgba(255, 255, 255, 0.145);\n --color-gray-alpha-500: rgba(255, 255, 255, 0.239);\n --color-gray-alpha-600: rgba(255, 255, 255, 0.506);\n --color-gray-alpha-700: rgba(255, 255, 255, 0.54);\n --color-gray-alpha-800: rgba(255, 255, 255, 0.47);\n --color-gray-alpha-900: rgba(255, 255, 255, 0.61);\n --color-gray-alpha-1000: rgba(255, 255, 255, 0.923);\n\n /* Blue Scale Dark */\n --color-blue-100: #0f1b2d;\n --color-blue-200: #10243e;\n --color-blue-300: #0f3058;\n --color-blue-400: #0d3868;\n --color-blue-500: #0a4481;\n --color-blue-600: #0091ff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #52a9ff;\n --color-blue-1000: #eaf6ff;\n\n /* Red Scale Dark */\n --color-red-100: #2a1314;\n --color-red-200: #3d1719;\n --color-red-300: #551a1e;\n --color-red-400: #671e22;\n --color-red-500: #822025;\n --color-red-600: #e5484d;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ff6369;\n --color-red-1000: #ffecee;\n\n /* Amber Scale Dark */\n --color-amber-100: #271700;\n --color-amber-200: #341c00;\n --color-amber-300: #4a2900;\n --color-amber-400: #573300;\n --color-amber-500: #693f05;\n --color-amber-600: #e79c13;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #f1a10d;\n --color-amber-1000: #fef3dd;\n\n /* Green Scale Dark */\n --color-green-100: #0b2211;\n --color-green-200: #0f2c17;\n --color-green-300: #11351b;\n --color-green-400: #0c461b;\n --color-green-500: #126427;\n --color-green-600: #1a9338;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #63c174;\n --color-green-1000: #e5fbeb;\n\n /* Turbopack Dark - Temporary */\n --color-turbopack-text-red: #ff6d92;\n --color-turbopack-text-blue: #45b2ff;\n --color-turbopack-border-red: #6e293b;\n --color-turbopack-border-blue: #284f80;\n --color-turbopack-background-red: #250d12;\n --color-turbopack-background-blue: #0a1723;\n";
const base = "\n --color-font: white;\n --color-backdrop: rgba(0, 0, 0, 0.8);\n --color-border-shadow: rgba(255, 255, 255, 0.145);\n\n --color-title-color: #fafafa;\n --color-stack-notes: #a9a9a9;\n";
function DarkTheme() {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
children: (0, _css.css)(_templateObject(), base, colors, base, colors)
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dark-theme.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/dev-overlay.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DevOverlay", {
enumerable: true,
get: function() {
return DevOverlay;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _shadowportal = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/shadow-portal.js [app-client] (ecmascript)");
const _base = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/base.js [app-client] (ecmascript)");
const _componentstyles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/component-styles.js [app-client] (ecmascript)");
const _cssreset = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/css-reset.js [app-client] (ecmascript)");
const _colors = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/colors.js [app-client] (ecmascript)");
const _erroroverlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay/error-overlay.js [app-client] (ecmascript)");
const _devtoolsindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js [app-client] (ecmascript)");
const _rendererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/container/runtime-error/render-error.js [app-client] (ecmascript)");
const _darktheme = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/styles/dark-theme.js [app-client] (ecmascript)");
const _preferences = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-info/preferences.js [app-client] (ecmascript)");
function DevOverlay(param) {
let { state, isErrorOverlayOpen, setIsErrorOverlayOpen } = param;
const [scale, setScale] = (0, _preferences.useDevToolsScale)();
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_shadowportal.ShadowPortal, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_cssreset.CssReset, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_base.Base, {
scale: scale
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_colors.Colors, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_componentstyles.ComponentStyles, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_darktheme.DarkTheme, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_rendererror.RenderError, {
state: state,
isAppDir: true,
children: (param)=>{
let { runtimeErrors, totalErrorCount } = param;
const isBuildError = state.buildError !== null;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
state.showIndicator && /*#__PURE__*/ (0, _jsxruntime.jsx)(_devtoolsindicator.DevToolsIndicator, {
scale: scale,
setScale: setScale,
state: state,
errorCount: totalErrorCount,
isBuildError: isBuildError,
setIsErrorOverlayOpen: setIsErrorOverlayOpen
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_erroroverlay.ErrorOverlay, {
state: state,
runtimeErrors: runtimeErrors,
isErrorOverlayOpen: isErrorOverlayOpen,
setIsErrorOverlayOpen: setIsErrorOverlayOpen
})
]
});
}
})
]
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=dev-overlay.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/app/app-dev-overlay.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AppDevOverlay", {
enumerable: true,
get: function() {
return AppDevOverlay;
}
});
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _appdevoverlayerrorboundary = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/app/app-dev-overlay-error-boundary.js [app-client] (ecmascript)");
const _fontstyles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/font/font-styles.js [app-client] (ecmascript)");
const _devoverlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/ui/dev-overlay.js [app-client] (ecmascript)");
const _useerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/use-error-handler.js [app-client] (ecmascript)");
const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-client] (ecmascript)");
const _constants = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/errors/constants.js [app-client] (ecmascript)");
function readSsrError() {
if (typeof document === 'undefined') {
return null;
}
const ssrErrorTemplateTag = document.querySelector('template[data-next-error-message]');
if (ssrErrorTemplateTag) {
const message = ssrErrorTemplateTag.getAttribute('data-next-error-message');
const stack = ssrErrorTemplateTag.getAttribute('data-next-error-stack');
const digest = ssrErrorTemplateTag.getAttribute('data-next-error-digest');
const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
if (digest) {
;
error.digest = digest;
}
// Skip Next.js SSR'd internal errors that which will be handled by the error boundaries.
if ((0, _isnextroutererror.isNextRouterError)(error)) {
return null;
}
error.stack = stack || '';
return error;
}
return null;
}
// Needs to be in the same error boundary as the shell.
// If it commits, we know we recovered from an SSR error.
// If it doesn't commit, we errored again and React will take care of error reporting.
function ReplaySsrOnlyErrors(param) {
let { onBlockingError } = param;
if ("TURBOPACK compile-time truthy", 1) {
// Need to read during render. The attributes will be gone after commit.
const ssrError = readSsrError();
// eslint-disable-next-line react-hooks/rules-of-hooks
(0, _react.useEffect)(()=>{
if (ssrError !== null) {
// TODO(veil): Produces wrong Owner Stack
// TODO(veil): Mark as recoverable error
// TODO(veil): console.error
(0, _useerrorhandler.handleClientError)(ssrError);
// If it's missing root tags, we can't recover, make it blocking.
if (ssrError.digest === _constants.MISSING_ROOT_TAGS_ERROR) {
onBlockingError();
}
}
}, [
ssrError,
onBlockingError
]);
}
return null;
}
function AppDevOverlay(param) {
let { state, globalError, children } = param;
const [isErrorOverlayOpen, setIsErrorOverlayOpen] = (0, _react.useState)(false);
const openOverlay = (0, _react.useCallback)(()=>{
setIsErrorOverlayOpen(true);
}, []);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_appdevoverlayerrorboundary.AppDevOverlayErrorBoundary, {
globalError: globalError,
onError: setIsErrorOverlayOpen,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(ReplaySsrOnlyErrors, {
onBlockingError: openOverlay
}),
children
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_fontstyles.FontStyles, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_devoverlay.DevOverlay, {
state: state,
isErrorOverlayOpen: isErrorOverlayOpen,
setIsErrorOverlayOpen: setIsErrorOverlayOpen
})
]
})
]
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-dev-overlay.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/get-socket-url.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getSocketUrl", {
enumerable: true,
get: function() {
return getSocketUrl;
}
});
const _normalizedassetprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/normalized-asset-prefix.js [app-client] (ecmascript)");
function getSocketProtocol(assetPrefix) {
let protocol = window.location.protocol;
try {
// assetPrefix is a url
protocol = new URL(assetPrefix).protocol;
} catch (e) {}
return protocol === 'http:' ? 'ws:' : 'wss:';
}
function getSocketUrl(assetPrefix) {
const prefix = (0, _normalizedassetprefix.normalizedAssetPrefix)(assetPrefix);
const protocol = getSocketProtocol(assetPrefix || '');
if (URL.canParse(prefix)) {
// since normalized asset prefix is ensured to be a URL format,
// we can safely replace the protocol
return prefix.replace(/^http/, 'ws');
}
const { hostname, port } = window.location;
return protocol + "//" + hostname + (port ? ":" + port : '') + prefix;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=get-socket-url.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/use-websocket.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
useSendMessage: null,
useTurbopack: null,
useWebsocket: null,
useWebsocketPing: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
useSendMessage: function() {
return useSendMessage;
},
useTurbopack: function() {
return useTurbopack;
},
useWebsocket: function() {
return useWebsocket;
},
useWebsocketPing: function() {
return useWebsocketPing;
}
});
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js [app-client] (ecmascript)");
const _getsocketurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/get-socket-url.js [app-client] (ecmascript)");
function useWebsocket(assetPrefix) {
const webSocketRef = (0, _react.useRef)(undefined);
(0, _react.useEffect)(()=>{
if (webSocketRef.current) {
return;
}
const url = (0, _getsocketurl.getSocketUrl)(assetPrefix);
webSocketRef.current = new window.WebSocket("" + url + "/_next/webpack-hmr");
}, [
assetPrefix
]);
return webSocketRef;
}
function useSendMessage(webSocketRef) {
const sendMessage = (0, _react.useCallback)((data)=>{
const socket = webSocketRef.current;
if (!socket || socket.readyState !== socket.OPEN) {
return;
}
return socket.send(data);
}, [
webSocketRef
]);
return sendMessage;
}
function useTurbopack(sendMessage, onUpdateError) {
const turbopackState = (0, _react.useRef)({
init: false,
// Until the dynamic import resolves, queue any turbopack messages which will be replayed.
queue: [],
callback: undefined
});
const processTurbopackMessage = (0, _react.useCallback)((msg)=>{
const { callback, queue } = turbopackState.current;
if (callback) {
callback(msg);
} else {
queue.push(msg);
}
}, []);
(0, _react.useEffect)(()=>{
const { current: initCurrent } = turbopackState;
// TODO(WEB-1589): only install if `process.turbopack` set.
if (initCurrent.init) {
return;
}
initCurrent.init = true;
__turbopack_context__.r("[turbopack]/browser/dev/hmr-client/hmr-client.ts [app-client] (ecmascript, async loader)")(__turbopack_context__.i).then((param)=>{
let { connect } = param;
const { current } = turbopackState;
connect({
addMessageListener (cb) {
current.callback = cb;
// Replay all Turbopack messages before we were able to establish the HMR client.
for (const msg of current.queue){
cb(msg);
}
current.queue = undefined;
},
sendMessage,
onUpdateError
});
});
}, [
sendMessage,
onUpdateError
]);
return processTurbopackMessage;
}
function useWebsocketPing(websocketRef) {
const sendMessage = useSendMessage(websocketRef);
const { tree } = (0, _react.useContext)(_approutercontextsharedruntime.GlobalLayoutRouterContext);
(0, _react.useEffect)(()=>{
// Never send pings when using Turbopack as it's not used.
// Pings were originally used to keep track of active routes in on-demand-entries with webpack.
if ("TURBOPACK compile-time truthy", 1) {
return;
}
"TURBOPACK unreachable";
// Taken from on-demand-entries-client.js
const interval = undefined;
}, [
tree,
sendMessage
]);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=use-websocket.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/parse-component-stack.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseComponentStack", {
enumerable: true,
get: function() {
return parseComponentStack;
}
});
var LocationType = /*#__PURE__*/ function(LocationType) {
LocationType["FILE"] = "file";
LocationType["WEBPACK_INTERNAL"] = "webpack-internal";
LocationType["HTTP"] = "http";
LocationType["PROTOCOL_RELATIVE"] = "protocol-relative";
LocationType["UNKNOWN"] = "unknown";
return LocationType;
}(LocationType || {});
/**
* Get the type of frame line based on the location
*/ function getLocationType(location) {
if (location.startsWith('file://')) {
return "file";
}
if (location.includes('webpack-internal://')) {
return "webpack-internal";
}
if (location.startsWith('http://') || location.startsWith('https://')) {
return "http";
}
if (location.startsWith('//')) {
return "protocol-relative";
}
return "unknown";
}
function parseStackFrameLocation(location) {
const locationType = getLocationType(location);
const modulePath = location == null ? void 0 : location.replace(/^(webpack-internal:\/\/\/|file:\/\/)(\(.*\)\/)?/, '');
var _modulePath_match;
const [, file, lineNumber, column] = (_modulePath_match = modulePath == null ? void 0 : modulePath.match(/^(.+):(\d+):(\d+)/)) != null ? _modulePath_match : [];
switch(locationType){
case "file":
case "webpack-internal":
return {
canOpenInEditor: true,
file,
lineNumber: lineNumber ? Number(lineNumber) : undefined,
column: column ? Number(column) : undefined
};
// When the location is a URL we only show the file
// TODO: Resolve http(s) URLs through sourcemaps
case "http":
case "protocol-relative":
case "unknown":
default:
{
return {
canOpenInEditor: false
};
}
}
}
function parseComponentStack(componentStack) {
const componentStackFrames = [];
for (const line of componentStack.trim().split('\n')){
// TODO: support safari stack trace
// Get component and file from the component stack line
const match = /at ([^ ]+)( \((.*)\))?/.exec(line);
if (match == null ? void 0 : match[1]) {
const component = match[1];
const location = match[3];
if (!location) {
componentStackFrames.push({
canOpenInEditor: false,
component
});
continue;
}
// Stop parsing the component stack if we reach a Next.js component
if (location == null ? void 0 : location.includes('next/dist')) {
break;
}
const frameLocation = parseStackFrameLocation(location);
componentStackFrames.push({
component,
...frameLocation
});
}
}
return componentStackFrames;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=parse-component-stack.js.map
}}),
"[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/handle-dev-build-indicator-hmr-events.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "handleDevBuildIndicatorHmrEvents", {
enumerable: true,
get: function() {
return handleDevBuildIndicatorHmrEvents;
}
});
const _hotreloadertypes = __turbopack_context__.r("[project]/node_modules/next/dist/server/dev/hot-reloader-types.js [app-client] (ecmascript)");
const _devbuildindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/dev-build-indicator.js [app-client] (ecmascript)");
const handleDevBuildIndicatorHmrEvents = (obj)=>{
try {
if (!('action' in obj)) {
return;
}
// eslint-disable-next-line default-case
switch(obj.action){
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILDING:
_devbuildindicator.devBuildIndicator.show();
break;
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT:
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SYNC:
_devbuildindicator.devBuildIndicator.hide();
break;
}
} catch (e) {}
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=handle-dev-build-indicator-hmr-events.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/report-hmr-latency.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, /**
* Logs information about a completed HMR to the console, the server (via a
* `client-hmr-latency` event), and to `self.__NEXT_HMR_LATENCY_CB` (a debugging
* hook).
*
* @param hasUpdate Set this to `false` to avoid reporting the HMR event via a
* `client-hmr-latency` event or to `self.__NEXT_HMR_LATENCY_CB`. Used by
* turbopack when we must report a message to the browser console (because we
* already logged a "rebuilding" message), but it's not a real HMR, so we
* don't want to impact our telemetry.
*/ "default", {
enumerable: true,
get: function() {
return reportHmrLatency;
}
});
function reportHmrLatency(sendMessage, updatedModules, startMsSinceEpoch, endMsSinceEpoch, hasUpdate) {
if (hasUpdate === void 0) hasUpdate = true;
const latencyMs = endMsSinceEpoch - startMsSinceEpoch;
console.log("[Fast Refresh] done in " + latencyMs + "ms");
if (!hasUpdate) {
return;
}
sendMessage(JSON.stringify({
event: 'client-hmr-latency',
id: window.__nextDevClientId,
startTime: startMsSinceEpoch,
endTime: endMsSinceEpoch,
page: window.location.pathname,
updatedModules,
// Whether the page (tab) was hidden at the time the event occurred.
// This can impact the accuracy of the event's timing.
isPageHidden: document.visibilityState === 'hidden'
}));
if (self.__NEXT_HMR_LATENCY_CB) {
self.__NEXT_HMR_LATENCY_CB(latencyMs);
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=report-hmr-latency.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/turbopack-hot-reloader-common.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "TurbopackHmr", {
enumerable: true,
get: function() {
return TurbopackHmr;
}
});
const _class_private_field_loose_base = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs [app-client] (ecmascript)");
const _class_private_field_loose_key = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs [app-client] (ecmascript)");
// How long to wait before reporting the HMR start, used to suppress irrelevant
// `BUILDING` events. Does not impact reported latency.
const TURBOPACK_HMR_START_DELAY_MS = 100;
var _updatedModules = /*#__PURE__*/ _class_private_field_loose_key._("_updatedModules"), _startMsSinceEpoch = /*#__PURE__*/ _class_private_field_loose_key._("_startMsSinceEpoch"), _lastUpdateMsSinceEpoch = /*#__PURE__*/ _class_private_field_loose_key._("_lastUpdateMsSinceEpoch"), _deferredReportHmrStartId = /*#__PURE__*/ _class_private_field_loose_key._("_deferredReportHmrStartId"), // as it reports *any* compilation, including fully no-op/cached compilations
// and those unrelated to HMR. Fixing this would require significant
// architectural changes.
//
// Work around this by deferring any "rebuilding" message by 100ms. If we get
// a BUILT event within that threshold and nothing has changed, just suppress
// the message entirely.
_runDeferredReportHmrStart = /*#__PURE__*/ _class_private_field_loose_key._("_runDeferredReportHmrStart"), _cancelDeferredReportHmrStart = /*#__PURE__*/ _class_private_field_loose_key._("_cancelDeferredReportHmrStart"), /** Helper for other `onEvent` methods. */ _onUpdate = /*#__PURE__*/ _class_private_field_loose_key._("_onUpdate");
class TurbopackHmr {
onBuilding() {
_class_private_field_loose_base._(this, _lastUpdateMsSinceEpoch)[_lastUpdateMsSinceEpoch] = undefined;
_class_private_field_loose_base._(this, _cancelDeferredReportHmrStart)[_cancelDeferredReportHmrStart]();
_class_private_field_loose_base._(this, _startMsSinceEpoch)[_startMsSinceEpoch] = Date.now();
// report the HMR start after a short delay
_class_private_field_loose_base._(this, _deferredReportHmrStartId)[_deferredReportHmrStartId] = setTimeout(()=>_class_private_field_loose_base._(this, _runDeferredReportHmrStart)[_runDeferredReportHmrStart](), self.__NEXT_HMR_TURBOPACK_REPORT_NOISY_NOOP_EVENTS ? 0 : TURBOPACK_HMR_START_DELAY_MS);
}
onTurbopackMessage(msg) {
_class_private_field_loose_base._(this, _onUpdate)[_onUpdate]();
const updatedModules = extractModulesFromTurbopackMessage(msg.data);
for (const module1 of updatedModules){
_class_private_field_loose_base._(this, _updatedModules)[_updatedModules].add(module1);
}
}
onServerComponentChanges() {
_class_private_field_loose_base._(this, _onUpdate)[_onUpdate]();
}
onReloadPage() {
_class_private_field_loose_base._(this, _onUpdate)[_onUpdate]();
}
onPageAddRemove() {
_class_private_field_loose_base._(this, _onUpdate)[_onUpdate]();
}
/**
* @returns `null` if the caller should ignore the update entirely. Returns an
* object with `hasUpdates: false` if the caller should report the end of
* the HMR in the browser console, but the HMR was a no-op.
*/ onBuilt() {
// Check that we got *any* `TurbopackMessageAction`, even if
// `updatedModules` is empty (not everything gets recorded there).
//
// There's also a case where `onBuilt` gets called before `onBuilding`,
// which can happen during initial page load. Ignore that too!
const hasUpdates = _class_private_field_loose_base._(this, _lastUpdateMsSinceEpoch)[_lastUpdateMsSinceEpoch] != null && _class_private_field_loose_base._(this, _startMsSinceEpoch)[_startMsSinceEpoch] != null;
if (!hasUpdates && _class_private_field_loose_base._(this, _deferredReportHmrStartId)[_deferredReportHmrStartId] != null) {
// suppress the update entirely
_class_private_field_loose_base._(this, _cancelDeferredReportHmrStart)[_cancelDeferredReportHmrStart]();
return null;
}
_class_private_field_loose_base._(this, _runDeferredReportHmrStart)[_runDeferredReportHmrStart]();
var _class_private_field_loose_base__lastUpdateMsSinceEpoch;
const result = {
hasUpdates,
updatedModules: _class_private_field_loose_base._(this, _updatedModules)[_updatedModules],
startMsSinceEpoch: _class_private_field_loose_base._(this, _startMsSinceEpoch)[_startMsSinceEpoch],
endMsSinceEpoch: (_class_private_field_loose_base__lastUpdateMsSinceEpoch = _class_private_field_loose_base._(this, _lastUpdateMsSinceEpoch)[_lastUpdateMsSinceEpoch]) != null ? _class_private_field_loose_base__lastUpdateMsSinceEpoch : Date.now()
};
_class_private_field_loose_base._(this, _updatedModules)[_updatedModules] = new Set();
return result;
}
constructor(){
Object.defineProperty(this, _runDeferredReportHmrStart, {
value: runDeferredReportHmrStart
});
Object.defineProperty(this, _cancelDeferredReportHmrStart, {
value: cancelDeferredReportHmrStart
});
Object.defineProperty(this, _onUpdate, {
value: onUpdate
});
Object.defineProperty(this, _updatedModules, {
writable: true,
value: void 0
});
Object.defineProperty(this, _startMsSinceEpoch, {
writable: true,
value: void 0
});
Object.defineProperty(this, _lastUpdateMsSinceEpoch, {
writable: true,
value: void 0
});
Object.defineProperty(this, _deferredReportHmrStartId, {
writable: true,
value: void 0
});
_class_private_field_loose_base._(this, _updatedModules)[_updatedModules] = new Set();
}
}
function runDeferredReportHmrStart() {
if (_class_private_field_loose_base._(this, _deferredReportHmrStartId)[_deferredReportHmrStartId] != null) {
console.log('[Fast Refresh] rebuilding');
_class_private_field_loose_base._(this, _cancelDeferredReportHmrStart)[_cancelDeferredReportHmrStart]();
}
}
function cancelDeferredReportHmrStart() {
clearTimeout(_class_private_field_loose_base._(this, _deferredReportHmrStartId)[_deferredReportHmrStartId]);
_class_private_field_loose_base._(this, _deferredReportHmrStartId)[_deferredReportHmrStartId] = undefined;
}
function onUpdate() {
_class_private_field_loose_base._(this, _runDeferredReportHmrStart)[_runDeferredReportHmrStart]();
_class_private_field_loose_base._(this, _lastUpdateMsSinceEpoch)[_lastUpdateMsSinceEpoch] = Date.now();
}
function extractModulesFromTurbopackMessage(data) {
const updatedModules = new Set();
const updates = Array.isArray(data) ? data : [
data
];
for (const update of updates){
// TODO this won't capture changes to CSS since they don't result in a "merged" update
if (update.type !== 'partial' || update.instruction.type !== 'ChunkListUpdate' || update.instruction.merged === undefined) {
continue;
}
for (const mergedUpdate of update.instruction.merged){
for (const name of Object.keys(mergedUpdate.entries)){
const res = /(.*)\s+\[.*/.exec(name);
if (res === null) {
console.error('[Turbopack HMR] Expected module to match pattern: ' + name);
continue;
}
updatedModules.add(res[1]);
}
}
}
return updatedModules;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=turbopack-hot-reloader-common.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
///
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
default: null,
waitForWebpackRuntimeHotUpdate: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: function() {
return HotReload;
},
waitForWebpackRuntimeHotUpdate: function() {
return waitForWebpackRuntimeHotUpdate;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _stripansi = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/strip-ansi/index.js [app-client] (ecmascript)"));
const _formatwebpackmessages = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/format-webpack-messages.js [app-client] (ecmascript)"));
const _navigation = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation.js [app-client] (ecmascript)");
const _shared = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/shared.js [app-client] (ecmascript)");
const _parsestack = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/parse-stack.js [app-client] (ecmascript)");
const _appdevoverlay = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/app/app-dev-overlay.js [app-client] (ecmascript)");
const _useerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/use-error-handler.js [app-client] (ecmascript)");
const _runtimeerrorhandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/runtime-error-handler.js [app-client] (ecmascript)");
const _usewebsocket = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/use-websocket.js [app-client] (ecmascript)");
const _parsecomponentstack = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/parse-component-stack.js [app-client] (ecmascript)");
const _hotreloadertypes = __turbopack_context__.r("[project]/node_modules/next/dist/server/dev/hot-reloader-types.js [app-client] (ecmascript)");
const _navigationuntracked = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation-untracked.js [app-client] (ecmascript)");
const _stitchederror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/errors/stitched-error.js [app-client] (ecmascript)");
const _handledevbuildindicatorhmrevents = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/handle-dev-build-indicator-hmr-events.js [app-client] (ecmascript)");
const _reporthmrlatency = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/report-hmr-latency.js [app-client] (ecmascript)"));
const _turbopackhotreloadercommon = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/turbopack-hot-reloader-common.js [app-client] (ecmascript)");
const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-client] (ecmascript)");
let mostRecentCompilationHash = null;
let __nextDevClientId = Math.round(Math.random() * 100 + Date.now());
let reloading = false;
let webpackStartMsSinceEpoch = null;
const turbopackHmr = ("TURBOPACK compile-time truthy", 1) ? new _turbopackhotreloadercommon.TurbopackHmr() : ("TURBOPACK unreachable", undefined);
let pendingHotUpdateWebpack = Promise.resolve();
let resolvePendingHotUpdateWebpack = ()=>{};
function setPendingHotUpdateWebpack() {
pendingHotUpdateWebpack = new Promise((resolve)=>{
resolvePendingHotUpdateWebpack = ()=>{
resolve();
};
});
}
function waitForWebpackRuntimeHotUpdate() {
return pendingHotUpdateWebpack;
}
// There is a newer version of the code available.
function handleAvailableHash(hash) {
// Update last known compilation hash.
mostRecentCompilationHash = hash;
}
/**
* Is there a newer version of this code available?
* For webpack: Check if the hash changed compared to __webpack_hash__
* For Turbopack: Always true because it doesn't have __webpack_hash__
*/ function isUpdateAvailable() {
if ("TURBOPACK compile-time truthy", 1) {
return true;
}
"TURBOPACK unreachable";
}
// Webpack disallows updates in other states.
function canApplyUpdates() {
return module.hot.status() === 'idle';
}
function afterApplyUpdates(fn) {
if (canApplyUpdates()) {
fn();
} else {
function handler(status) {
if (status === 'idle') {
module.hot.removeStatusHandler(handler);
fn();
}
}
module.hot.addStatusHandler(handler);
}
}
function performFullReload(err, sendMessage) {
const stackTrace = err && (err.stack && err.stack.split('\n').slice(0, 5).join('\n') || err.message || err + '');
sendMessage(JSON.stringify({
event: 'client-full-reload',
stackTrace,
hadRuntimeError: !!_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError,
dependencyChain: err ? err.dependencyChain : undefined
}));
if (reloading) return;
reloading = true;
window.location.reload();
}
// Attempt to update code on the fly, fall back to a hard reload.
function tryApplyUpdatesWebpack(sendMessage, dispatcher) {
if (!isUpdateAvailable() || !canApplyUpdates()) {
resolvePendingHotUpdateWebpack();
dispatcher.onBuildOk();
(0, _reporthmrlatency.default)(sendMessage, [], webpackStartMsSinceEpoch, Date.now());
return;
}
function handleApplyUpdates(err, updatedModules) {
if (err || _runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError || updatedModules == null) {
if (err) {
console.warn(_shared.REACT_REFRESH_FULL_RELOAD);
} else if (_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError) {
console.warn(_shared.REACT_REFRESH_FULL_RELOAD_FROM_ERROR);
}
performFullReload(err, sendMessage);
return;
}
dispatcher.onBuildOk();
if (isUpdateAvailable()) {
// While we were updating, there was a new update! Do it again.
tryApplyUpdatesWebpack(sendMessage, dispatcher);
return;
}
dispatcher.onRefresh();
resolvePendingHotUpdateWebpack();
(0, _reporthmrlatency.default)(sendMessage, updatedModules, webpackStartMsSinceEpoch, Date.now());
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
}
// https://webpack.js.org/api/hot-module-replacement/#check
module.hot.check(/* autoApply */ false).then((updatedModules)=>{
if (updatedModules == null) {
return null;
}
// We should always handle an update, even if updatedModules is empty (but
// non-null) for any reason. That's what webpack would normally do:
// https://github.com/webpack/webpack/blob/3aa6b6bc3a64/lib/hmr/HotModuleReplacement.runtime.js#L296-L298
dispatcher.onBeforeRefresh();
// https://webpack.js.org/api/hot-module-replacement/#apply
return module.hot.apply();
}).then((updatedModules)=>{
handleApplyUpdates(null, updatedModules);
}, (err)=>{
handleApplyUpdates(err, null);
});
}
/** Handles messages from the server for the App Router. */ function processMessage(obj, sendMessage, processTurbopackMessage, router, dispatcher, appIsrManifestRef, pathnameRef) {
if (!('action' in obj)) {
return;
}
function handleErrors(errors) {
// "Massage" webpack messages.
const formatted = (0, _formatwebpackmessages.default)({
errors: errors,
warnings: []
});
// Only show the first error.
dispatcher.onBuildError(formatted.errors[0]);
// Also log them to the console.
for(let i = 0; i < formatted.errors.length; i++){
console.error((0, _stripansi.default)(formatted.errors[i]));
}
// Do not attempt to reload now.
// We will reload on next success instead.
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
}
function handleHotUpdate() {
if ("TURBOPACK compile-time truthy", 1) {
const hmrUpdate = turbopackHmr.onBuilt();
if (hmrUpdate != null) {
(0, _reporthmrlatency.default)(sendMessage, [
...hmrUpdate.updatedModules
], hmrUpdate.startMsSinceEpoch, hmrUpdate.endMsSinceEpoch, hmrUpdate.hasUpdates);
}
dispatcher.onBuildOk();
} else {
"TURBOPACK unreachable";
}
}
switch(obj.action){
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.ISR_MANIFEST:
{
if ("TURBOPACK compile-time truthy", 1) {
if (appIsrManifestRef) {
appIsrManifestRef.current = obj.data;
// handle initial status on receiving manifest
// navigation is handled in useEffect for pathname changes
// as we'll receive the updated manifest before usePathname
// triggers for new value
if (pathnameRef.current in obj.data) {
dispatcher.onStaticIndicator(true);
} else {
dispatcher.onStaticIndicator(false);
}
}
}
break;
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILDING:
{
if ("TURBOPACK compile-time truthy", 1) {
turbopackHmr.onBuilding();
} else {
"TURBOPACK unreachable";
}
break;
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT:
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SYNC:
{
if (obj.hash) {
handleAvailableHash(obj.hash);
}
const { errors, warnings } = obj;
// Is undefined when it's a 'built' event
if ('versionInfo' in obj) dispatcher.onVersionInfo(obj.versionInfo);
if ('debug' in obj && obj.debug) dispatcher.onDebugInfo(obj.debug);
if ('devIndicator' in obj) dispatcher.onDevIndicator(obj.devIndicator);
const hasErrors = Boolean(errors && errors.length);
// Compilation with errors (e.g. syntax error or missing modules).
if (hasErrors) {
sendMessage(JSON.stringify({
event: 'client-error',
errorCount: errors.length,
clientId: __nextDevClientId
}));
handleErrors(errors);
return;
}
const hasWarnings = Boolean(warnings && warnings.length);
if (hasWarnings) {
sendMessage(JSON.stringify({
event: 'client-warning',
warningCount: warnings.length,
clientId: __nextDevClientId
}));
// Print warnings to the console.
const formattedMessages = (0, _formatwebpackmessages.default)({
warnings: warnings,
errors: []
});
for(let i = 0; i < formattedMessages.warnings.length; i++){
if (i === 5) {
console.warn('There were more warnings in other files.\n' + 'You can find a complete log in the terminal.');
break;
}
console.warn((0, _stripansi.default)(formattedMessages.warnings[i]));
}
// No early return here as we need to apply modules in the same way between warnings only and compiles without warnings
}
sendMessage(JSON.stringify({
event: 'client-success',
clientId: __nextDevClientId
}));
if (obj.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT) {
handleHotUpdate();
}
return;
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_CONNECTED:
{
processTurbopackMessage({
type: _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_CONNECTED,
data: {
sessionId: obj.data.sessionId
}
});
break;
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_MESSAGE:
{
turbopackHmr.onTurbopackMessage(obj);
dispatcher.onBeforeRefresh();
processTurbopackMessage({
type: _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_MESSAGE,
data: obj.data
});
if (_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError) {
console.warn(_shared.REACT_REFRESH_FULL_RELOAD_FROM_ERROR);
performFullReload(null, sendMessage);
}
dispatcher.onRefresh();
break;
}
// TODO-APP: make server component change more granular
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES:
{
turbopackHmr == null ? void 0 : turbopackHmr.onServerComponentChanges();
sendMessage(JSON.stringify({
event: 'server-component-reload-page',
clientId: __nextDevClientId,
hash: obj.hash
}));
// Store the latest hash in a session cookie so that it's sent back to the
// server with any subsequent requests.
document.cookie = _approuterheaders.NEXT_HMR_REFRESH_HASH_COOKIE + "=" + obj.hash;
if (_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError) {
if (reloading) return;
reloading = true;
return window.location.reload();
}
(0, _react.startTransition)(()=>{
router.hmrRefresh();
dispatcher.onRefresh();
});
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return;
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE:
{
turbopackHmr == null ? void 0 : turbopackHmr.onReloadPage();
sendMessage(JSON.stringify({
event: 'client-reload-page',
clientId: __nextDevClientId
}));
if (reloading) return;
reloading = true;
return window.location.reload();
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.ADDED_PAGE:
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.REMOVED_PAGE:
{
turbopackHmr == null ? void 0 : turbopackHmr.onPageAddRemove();
// TODO-APP: potentially only refresh if the currently viewed page was added/removed.
return router.hmrRefresh();
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ERROR:
{
const { errorJSON } = obj;
if (errorJSON) {
const { message, stack } = JSON.parse(errorJSON);
const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
error.stack = stack;
handleErrors([
error
]);
}
return;
}
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE:
{
return;
}
default:
{}
}
}
function HotReload(param) {
let { assetPrefix, children, globalError } = param;
const [state, dispatch] = (0, _shared.useErrorOverlayReducer)('app');
const dispatcher = (0, _react.useMemo)(()=>{
return {
onBuildOk () {
dispatch({
type: _shared.ACTION_BUILD_OK
});
},
onBuildError (message) {
dispatch({
type: _shared.ACTION_BUILD_ERROR,
message
});
},
onBeforeRefresh () {
dispatch({
type: _shared.ACTION_BEFORE_REFRESH
});
},
onRefresh () {
dispatch({
type: _shared.ACTION_REFRESH
});
},
onVersionInfo (versionInfo) {
dispatch({
type: _shared.ACTION_VERSION_INFO,
versionInfo
});
},
onStaticIndicator (status) {
dispatch({
type: _shared.ACTION_STATIC_INDICATOR,
staticIndicator: status
});
},
onDebugInfo (debugInfo) {
dispatch({
type: _shared.ACTION_DEBUG_INFO,
debugInfo
});
},
onDevIndicator (devIndicator) {
dispatch({
type: _shared.ACTION_DEV_INDICATOR,
devIndicator
});
}
};
}, [
dispatch
]);
const handleOnUnhandledError = (0, _react.useCallback)((error)=>{
// Component stack is added to the error in use-error-handler in case there was a hydration error
const componentStackTrace = error._componentStack;
dispatch({
type: _shared.ACTION_UNHANDLED_ERROR,
reason: error,
frames: (0, _parsestack.parseStack)(error.stack || ''),
componentStackFrames: typeof componentStackTrace === 'string' ? (0, _parsecomponentstack.parseComponentStack)(componentStackTrace) : undefined
});
}, [
dispatch
]);
const handleOnUnhandledRejection = (0, _react.useCallback)((reason)=>{
const stitchedError = (0, _stitchederror.getReactStitchedError)(reason);
dispatch({
type: _shared.ACTION_UNHANDLED_REJECTION,
reason: stitchedError,
frames: (0, _parsestack.parseStack)(stitchedError.stack || '')
});
}, [
dispatch
]);
(0, _useerrorhandler.useErrorHandler)(handleOnUnhandledError, handleOnUnhandledRejection);
const webSocketRef = (0, _usewebsocket.useWebsocket)(assetPrefix);
(0, _usewebsocket.useWebsocketPing)(webSocketRef);
const sendMessage = (0, _usewebsocket.useSendMessage)(webSocketRef);
const processTurbopackMessage = (0, _usewebsocket.useTurbopack)(sendMessage, (err)=>performFullReload(err, sendMessage));
const router = (0, _navigation.useRouter)();
// We don't want access of the pathname for the dev tools to trigger a dynamic
// access (as the dev overlay will never be present in production).
const pathname = (0, _navigationuntracked.useUntrackedPathname)();
const appIsrManifestRef = (0, _react.useRef)({});
const pathnameRef = (0, _react.useRef)(pathname);
if ("TURBOPACK compile-time truthy", 1) {
// this conditional is only for dead-code elimination which
// isn't a runtime conditional only build-time so ignore hooks rule
// eslint-disable-next-line react-hooks/rules-of-hooks
(0, _react.useEffect)(()=>{
pathnameRef.current = pathname;
const appIsrManifest = appIsrManifestRef.current;
if (appIsrManifest) {
if (pathname && pathname in appIsrManifest) {
try {
dispatcher.onStaticIndicator(true);
} catch (reason) {
let message = '';
if (reason instanceof DOMException) {
var _reason_stack;
// Most likely a SecurityError, because of an unavailable localStorage
message = (_reason_stack = reason.stack) != null ? _reason_stack : reason.message;
} else if (reason instanceof Error) {
var _reason_stack1;
message = 'Error: ' + reason.message + '\n' + ((_reason_stack1 = reason.stack) != null ? _reason_stack1 : '');
} else {
message = 'Unexpected Exception: ' + reason;
}
console.warn('[HMR] ' + message);
}
} else {
dispatcher.onStaticIndicator(false);
}
}
}, [
pathname,
dispatcher
]);
}
(0, _react.useEffect)(()=>{
const websocket = webSocketRef.current;
if (!websocket) return;
const handler = (event)=>{
try {
const obj = JSON.parse(event.data);
(0, _handledevbuildindicatorhmrevents.handleDevBuildIndicatorHmrEvents)(obj);
processMessage(obj, sendMessage, processTurbopackMessage, router, dispatcher, appIsrManifestRef, pathnameRef);
} catch (err) {
(0, _shared.reportInvalidHmrMessage)(event, err);
}
};
websocket.addEventListener('message', handler);
return ()=>websocket.removeEventListener('message', handler);
}, [
sendMessage,
router,
webSocketRef,
dispatcher,
processTurbopackMessage,
appIsrManifestRef
]);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_appdevoverlay.AppDevOverlay, {
state: state,
globalError: globalError,
children: children
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=hot-reloader-client.js.map
}}),
"[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
createEmptyCacheNode: null,
createPrefetchURL: null,
default: null,
isExternalURL: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
createEmptyCacheNode: function() {
return createEmptyCacheNode;
},
createPrefetchURL: function() {
return createPrefetchURL;
},
default: function() {
return AppRouter;
},
isExternalURL: function() {
return isExternalURL;
}
});
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _hooksclientcontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js [app-client] (ecmascript)");
const _useactionqueue = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/use-action-queue.js [app-client] (ecmascript)");
const _errorboundary = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/error-boundary.js [app-client] (ecmascript)"));
const _isbot = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/is-bot.js [app-client] (ecmascript)");
const _addbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-base-path.js [app-client] (ecmascript)");
const _approuterannouncer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-announcer.js [app-client] (ecmascript)");
const _redirectboundary = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-boundary.js [app-client] (ecmascript)");
const _findheadincache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js [app-client] (ecmascript)");
const _unresolvedthenable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unresolved-thenable.js [app-client] (ecmascript)");
const _removebasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/remove-base-path.js [app-client] (ecmascript)");
const _hasbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/has-base-path.js [app-client] (ecmascript)");
const _computechangedpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-client] (ecmascript)");
const _navfailurehandler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/nav-failure-handler.js [app-client] (ecmascript)");
const _approuterinstance = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-instance.js [app-client] (ecmascript)");
const _redirect = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect.js [app-client] (ecmascript)");
const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)");
const _links = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/links.js [app-client] (ecmascript)");
const globalMutable = {};
function isExternalURL(url) {
return url.origin !== window.location.origin;
}
function createPrefetchURL(href) {
// Don't prefetch for bots as they don't navigate.
if ((0, _isbot.isBot)(window.navigator.userAgent)) {
return null;
}
let url;
try {
url = new URL((0, _addbasepath.addBasePath)(href), window.location.href);
} catch (_) {
// TODO: Does this need to throw or can we just console.error instead? Does
// anyone rely on this throwing? (Seems unlikely.)
throw Object.defineProperty(new Error("Cannot prefetch '" + href + "' because it cannot be converted to a URL."), "__NEXT_ERROR_CODE", {
value: "E234",
enumerable: false,
configurable: true
});
}
// Don't prefetch during development (improves compilation performance)
if ("TURBOPACK compile-time truthy", 1) {
return null;
}
"TURBOPACK unreachable";
}
function HistoryUpdater(param) {
let { appRouterState } = param;
(0, _react.useInsertionEffect)(()=>{
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
const { tree, pushRef, canonicalUrl } = appRouterState;
const historyState = {
...pushRef.preserveCustomHistoryState ? window.history.state : {},
// Identifier is shortened intentionally.
// __NA is used to identify if the history entry can be handled by the app-router.
// __N is used to identify if the history entry can be handled by the old router.
__NA: true,
__PRIVATE_NEXTJS_INTERNALS_TREE: tree
};
if (pushRef.pendingPush && // Skip pushing an additional history entry if the canonicalUrl is the same as the current url.
// This mirrors the browser behavior for normal navigation.
(0, _createhreffromurl.createHrefFromUrl)(new URL(window.location.href)) !== canonicalUrl) {
// This intentionally mutates React state, pushRef is overwritten to ensure additional push/replace calls do not trigger an additional history entry.
pushRef.pendingPush = false;
window.history.pushState(historyState, '', canonicalUrl);
} else {
window.history.replaceState(historyState, '', canonicalUrl);
}
}, [
appRouterState
]);
(0, _react.useEffect)(()=>{
// The Next-Url and the base tree may affect the result of a prefetch
// task. Re-prefetch all visible links with the updated values. In most
// cases, this will not result in any new network requests, only if
// the prefetch result actually varies on one of these inputs.
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
}, [
appRouterState.nextUrl,
appRouterState.tree
]);
return null;
}
function createEmptyCacheNode() {
return {
lazyData: null,
rsc: null,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading: null,
navigatedAt: -1
};
}
function copyNextJsInternalHistoryState(data) {
if (data == null) data = {};
const currentState = window.history.state;
const __NA = currentState == null ? void 0 : currentState.__NA;
if (__NA) {
data.__NA = __NA;
}
const __PRIVATE_NEXTJS_INTERNALS_TREE = currentState == null ? void 0 : currentState.__PRIVATE_NEXTJS_INTERNALS_TREE;
if (__PRIVATE_NEXTJS_INTERNALS_TREE) {
data.__PRIVATE_NEXTJS_INTERNALS_TREE = __PRIVATE_NEXTJS_INTERNALS_TREE;
}
return data;
}
function Head(param) {
let { headCacheNode } = param;
// If this segment has a `prefetchHead`, it's the statically prefetched data.
// We should use that on initial render instead of `head`. Then we'll switch
// to `head` when the dynamic response streams in.
const head = headCacheNode !== null ? headCacheNode.head : null;
const prefetchHead = headCacheNode !== null ? headCacheNode.prefetchHead : null;
// If no prefetch data is available, then we go straight to rendering `head`.
const resolvedPrefetchRsc = prefetchHead !== null ? prefetchHead : head;
// We use `useDeferredValue` to handle switching between the prefetched and
// final values. The second argument is returned on initial render, then it
// re-renders with the first argument.
return (0, _react.useDeferredValue)(head, resolvedPrefetchRsc);
}
/**
* The global router that wraps the application components.
*/ function Router(param) {
let { actionQueue, assetPrefix, globalError } = param;
const state = (0, _useactionqueue.useActionQueue)(actionQueue);
const { canonicalUrl } = state;
// Add memoized pathname/query for useSearchParams and usePathname.
const { searchParams, pathname } = (0, _react.useMemo)(()=>{
const url = new URL(canonicalUrl, typeof window === 'undefined' ? 'http://n' : window.location.href);
return {
// This is turned into a readonly class in `useSearchParams`
searchParams: url.searchParams,
pathname: (0, _hasbasepath.hasBasePath)(url.pathname) ? (0, _removebasepath.removeBasePath)(url.pathname) : url.pathname
};
}, [
canonicalUrl
]);
if ("TURBOPACK compile-time truthy", 1) {
// eslint-disable-next-line react-hooks/rules-of-hooks
const { cache, prefetchCache, tree } = state;
// This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes
// eslint-disable-next-line react-hooks/rules-of-hooks
(0, _react.useEffect)(()=>{
// Add `window.nd` for debugging purposes.
// This is not meant for use in applications as concurrent rendering will affect the cache/tree/router.
// @ts-ignore this is for debugging
window.nd = {
router: _approuterinstance.publicAppRouterInstance,
cache,
prefetchCache,
tree
};
}, [
cache,
prefetchCache,
tree
]);
}
(0, _react.useEffect)(()=>{
// If the app is restored from bfcache, it's possible that
// pushRef.mpaNavigation is true, which would mean that any re-render of this component
// would trigger the mpa navigation logic again from the lines below.
// This will restore the router to the initial state in the event that the app is restored from bfcache.
function handlePageShow(event) {
var _window_history_state;
if (!event.persisted || !((_window_history_state = window.history.state) == null ? void 0 : _window_history_state.__PRIVATE_NEXTJS_INTERNALS_TREE)) {
return;
}
// Clear the pendingMpaPath value so that a subsequent MPA navigation to the same URL can be triggered.
// This is necessary because if the browser restored from bfcache, the pendingMpaPath would still be set to the value
// of the last MPA navigation.
globalMutable.pendingMpaPath = undefined;
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_RESTORE,
url: new URL(window.location.href),
tree: window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE
});
}
window.addEventListener('pageshow', handlePageShow);
return ()=>{
window.removeEventListener('pageshow', handlePageShow);
};
}, []);
(0, _react.useEffect)(()=>{
// Ensure that any redirect errors that bubble up outside of the RedirectBoundary
// are caught and handled by the router.
function handleUnhandledRedirect(event) {
const error = 'reason' in event ? event.reason : event.error;
if ((0, _redirecterror.isRedirectError)(error)) {
event.preventDefault();
const url = (0, _redirect.getURLFromRedirectError)(error);
const redirectType = (0, _redirect.getRedirectTypeFromError)(error);
// TODO: This should access the router methods directly, rather than
// go through the public interface.
if (redirectType === _redirecterror.RedirectType.push) {
_approuterinstance.publicAppRouterInstance.push(url, {});
} else {
_approuterinstance.publicAppRouterInstance.replace(url, {});
}
}
}
window.addEventListener('error', handleUnhandledRedirect);
window.addEventListener('unhandledrejection', handleUnhandledRedirect);
return ()=>{
window.removeEventListener('error', handleUnhandledRedirect);
window.removeEventListener('unhandledrejection', handleUnhandledRedirect);
};
}, []);
// When mpaNavigation flag is set do a hard navigation to the new url.
// Infinitely suspend because we don't actually want to rerender any child
// components with the new URL and any entangled state updates shouldn't
// commit either (eg: useTransition isPending should stay true until the page
// unloads).
//
// This is a side effect in render. Don't try this at home, kids. It's
// probably safe because we know this is a singleton component and it's never
// in . At least I hope so. (It will run twice in dev strict mode,
// but that's... fine?)
const { pushRef } = state;
if (pushRef.mpaNavigation) {
// if there's a re-render, we don't want to trigger another redirect if one is already in flight to the same URL
if (globalMutable.pendingMpaPath !== canonicalUrl) {
const location = window.location;
if (pushRef.pendingPush) {
location.assign(canonicalUrl);
} else {
location.replace(canonicalUrl);
}
globalMutable.pendingMpaPath = canonicalUrl;
}
// TODO-APP: Should we listen to navigateerror here to catch failed
// navigations somehow? And should we call window.stop() if a SPA navigation
// should interrupt an MPA one?
(0, _react.use)(_unresolvedthenable.unresolvedThenable);
}
(0, _react.useEffect)(()=>{
const originalPushState = window.history.pushState.bind(window.history);
const originalReplaceState = window.history.replaceState.bind(window.history);
// Ensure the canonical URL in the Next.js Router is updated when the URL is changed so that `usePathname` and `useSearchParams` hold the pushed values.
const applyUrlFromHistoryPushReplace = (url)=>{
var _window_history_state;
const href = window.location.href;
const tree = (_window_history_state = window.history.state) == null ? void 0 : _window_history_state.__PRIVATE_NEXTJS_INTERNALS_TREE;
(0, _react.startTransition)(()=>{
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_RESTORE,
url: new URL(url != null ? url : href, href),
tree
});
});
};
/**
* Patch pushState to ensure external changes to the history are reflected in the Next.js Router.
* Ensures Next.js internal history state is copied to the new history entry.
* Ensures usePathname and useSearchParams hold the newly provided url.
*/ window.history.pushState = function pushState(data, _unused, url) {
// Avoid a loop when Next.js internals trigger pushState/replaceState
if ((data == null ? void 0 : data.__NA) || (data == null ? void 0 : data._N)) {
return originalPushState(data, _unused, url);
}
data = copyNextJsInternalHistoryState(data);
if (url) {
applyUrlFromHistoryPushReplace(url);
}
return originalPushState(data, _unused, url);
};
/**
* Patch replaceState to ensure external changes to the history are reflected in the Next.js Router.
* Ensures Next.js internal history state is copied to the new history entry.
* Ensures usePathname and useSearchParams hold the newly provided url.
*/ window.history.replaceState = function replaceState(data, _unused, url) {
// Avoid a loop when Next.js internals trigger pushState/replaceState
if ((data == null ? void 0 : data.__NA) || (data == null ? void 0 : data._N)) {
return originalReplaceState(data, _unused, url);
}
data = copyNextJsInternalHistoryState(data);
if (url) {
applyUrlFromHistoryPushReplace(url);
}
return originalReplaceState(data, _unused, url);
};
/**
* Handle popstate event, this is used to handle back/forward in the browser.
* By default dispatches ACTION_RESTORE, however if the history entry was not pushed/replaced by app-router it will reload the page.
* That case can happen when the old router injected the history entry.
*/ const onPopState = (event)=>{
if (!event.state) {
// TODO-APP: this case only happens when pushState/replaceState was called outside of Next.js. It should probably reload the page in this case.
return;
}
// This case happens when the history entry was pushed by the `pages` router.
if (!event.state.__NA) {
window.location.reload();
return;
}
// TODO-APP: Ideally the back button should not use startTransition as it should apply the updates synchronously
// Without startTransition works if the cache is there for this path
(0, _react.startTransition)(()=>{
(0, _approuterinstance.dispatchTraverseAction)(window.location.href, event.state.__PRIVATE_NEXTJS_INTERNALS_TREE);
});
};
// Register popstate event to call onPopstate.
window.addEventListener('popstate', onPopState);
return ()=>{
window.history.pushState = originalPushState;
window.history.replaceState = originalReplaceState;
window.removeEventListener('popstate', onPopState);
};
}, []);
const { cache, tree, nextUrl, focusAndScrollRef } = state;
const matchingHead = (0, _react.useMemo)(()=>{
return (0, _findheadincache.findHeadInCache)(cache, tree[1]);
}, [
cache,
tree
]);
// Add memoized pathParams for useParams.
const pathParams = (0, _react.useMemo)(()=>{
return (0, _computechangedpath.getSelectedParams)(tree);
}, [
tree
]);
const layoutRouterContext = (0, _react.useMemo)(()=>{
return {
parentTree: tree,
parentCacheNode: cache,
parentSegmentPath: null,
// Root node always has `url`
// Provided in AppTreeContext to ensure it can be overwritten in layout-router
url: canonicalUrl
};
}, [
tree,
cache,
canonicalUrl
]);
const globalLayoutRouterContext = (0, _react.useMemo)(()=>{
return {
tree,
focusAndScrollRef,
nextUrl
};
}, [
tree,
focusAndScrollRef,
nextUrl
]);
let head;
if (matchingHead !== null) {
// The head is wrapped in an extra component so we can use
// `useDeferredValue` to swap between the prefetched and final versions of
// the head. (This is what LayoutRouter does for segment data, too.)
//
// The `key` is used to remount the component whenever the head moves to
// a different segment.
const [headCacheNode, headKey] = matchingHead;
head = /*#__PURE__*/ (0, _jsxruntime.jsx)(Head, {
headCacheNode: headCacheNode
}, headKey);
} else {
head = null;
}
let content = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_redirectboundary.RedirectBoundary, {
children: [
head,
cache.rsc,
/*#__PURE__*/ (0, _jsxruntime.jsx)(_approuterannouncer.AppRouterAnnouncer, {
tree: tree
})
]
});
if ("TURBOPACK compile-time truthy", 1) {
// In development, we apply few error boundaries and hot-reloader:
// - DevRootHTTPAccessFallbackBoundary: avoid using navigation API like notFound() in root layout
// - HotReloader:
// - hot-reload the app when the code changes
// - render dev overlay
// - catch runtime errors and display global-error when necessary
if (typeof window !== 'undefined') {
const { DevRootHTTPAccessFallbackBoundary } = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js [app-client] (ecmascript)");
content = /*#__PURE__*/ (0, _jsxruntime.jsx)(DevRootHTTPAccessFallbackBoundary, {
children: content
});
}
const HotReloader = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js [app-client] (ecmascript)").default;
content = /*#__PURE__*/ (0, _jsxruntime.jsx)(HotReloader, {
assetPrefix: assetPrefix,
globalError: globalError,
children: content
});
} else {
"TURBOPACK unreachable";
}
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(HistoryUpdater, {
appRouterState: state
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(RuntimeStyles, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.PathParamsContext.Provider, {
value: pathParams,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.PathnameContext.Provider, {
value: pathname,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.SearchParamsContext.Provider, {
value: searchParams,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.GlobalLayoutRouterContext.Provider, {
value: globalLayoutRouterContext,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.AppRouterContext.Provider, {
value: _approuterinstance.publicAppRouterInstance,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.LayoutRouterContext.Provider, {
value: layoutRouterContext,
children: content
})
})
})
})
})
})
]
});
}
function AppRouter(param) {
let { actionQueue, globalErrorComponentAndStyles: [globalErrorComponent, globalErrorStyles], assetPrefix } = param;
(0, _navfailurehandler.useNavFailureHandler)();
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.ErrorBoundary, {
// At the very top level, use the default GlobalError component as the final fallback.
// When the app router itself fails, which means the framework itself fails, we show the default error.
errorComponent: _errorboundary.default,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Router, {
actionQueue: actionQueue,
assetPrefix: assetPrefix,
globalError: [
globalErrorComponent,
globalErrorStyles
]
})
});
}
const runtimeStyles = new Set();
let runtimeStyleChanged = new Set();
globalThis._N_E_STYLE_LOAD = function(href) {
let len = runtimeStyles.size;
runtimeStyles.add(href);
if (runtimeStyles.size !== len) {
runtimeStyleChanged.forEach((cb)=>cb());
}
// TODO figure out how to get a promise here
// But maybe it's not necessary as react would block rendering until it's loaded
return Promise.resolve();
};
function RuntimeStyles() {
const [, forceUpdate] = _react.default.useState(0);
const renderedStylesSize = runtimeStyles.size;
(0, _react.useEffect)(()=>{
const changed = ()=>forceUpdate((c)=>c + 1);
runtimeStyleChanged.add(changed);
if (renderedStylesSize !== runtimeStyles.size) {
changed();
}
return ()=>{
runtimeStyleChanged.delete(changed);
};
}, [
renderedStylesSize,
forceUpdate
]);
const dplId = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : '';
return [
...runtimeStyles
].map((href, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
rel: "stylesheet",
href: "" + href + dplId,
// @ts-ignore
precedence: "next"
}, i));
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-router.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
abortTask: null,
listenForDynamicRequest: null,
startPPRNavigation: null,
updateCacheNodeOnPopstateRestoration: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
abortTask: function() {
return abortTask;
},
listenForDynamicRequest: function() {
return listenForDynamicRequest;
},
startPPRNavigation: function() {
return startPPRNavigation;
},
updateCacheNodeOnPopstateRestoration: function() {
return updateCacheNodeOnPopstateRestoration;
}
});
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-client] (ecmascript)");
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)");
const _prefetchcacheutils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js [app-client] (ecmascript)");
const MPA_NAVIGATION_TASK = {
route: null,
node: null,
dynamicRequestTree: null,
children: null
};
function startPPRNavigation(navigatedAt, oldCacheNode, oldRouterState, newRouterState, prefetchData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, scrollableSegmentsResult) {
const segmentPath = [];
return updateCacheNodeOnNavigation(navigatedAt, oldCacheNode, oldRouterState, newRouterState, false, prefetchData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, segmentPath, scrollableSegmentsResult);
}
function updateCacheNodeOnNavigation(navigatedAt, oldCacheNode, oldRouterState, newRouterState, didFindRootLayout, prefetchData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, segmentPath, scrollableSegmentsResult) {
// Diff the old and new trees to reuse the shared layouts.
const oldRouterStateChildren = oldRouterState[1];
const newRouterStateChildren = newRouterState[1];
const prefetchDataChildren = prefetchData !== null ? prefetchData[2] : null;
if (!didFindRootLayout) {
// We're currently traversing the part of the tree that was also part of
// the previous route. If we discover a root layout, then we don't need to
// trigger an MPA navigation. See beginRenderingNewRouteTree for context.
const isRootLayout = newRouterState[4] === true;
if (isRootLayout) {
// Found a matching root layout.
didFindRootLayout = true;
}
}
const oldParallelRoutes = oldCacheNode.parallelRoutes;
// Clone the current set of segment children, even if they aren't active in
// the new tree.
// TODO: We currently retain all the inactive segments indefinitely, until
// there's an explicit refresh, or a parent layout is lazily refreshed. We
// rely on this for popstate navigations, which update the Router State Tree
// but do not eagerly perform a data fetch, because they expect the segment
// data to already be in the Cache Node tree. For highly static sites that
// are mostly read-only, this may happen only rarely, causing memory to
// leak. We should figure out a better model for the lifetime of inactive
// segments, so we can maintain instant back/forward navigations without
// leaking memory indefinitely.
const prefetchParallelRoutes = new Map(oldParallelRoutes);
// As we diff the trees, we may sometimes modify (copy-on-write, not mutate)
// the Route Tree that was returned by the server — for example, in the case
// of default parallel routes, we preserve the currently active segment. To
// avoid mutating the original tree, we clone the router state children along
// the return path.
let patchedRouterStateChildren = {};
let taskChildren = null;
// Most navigations require a request to fetch additional data from the
// server, either because the data was not already prefetched, or because the
// target route contains dynamic data that cannot be prefetched.
//
// However, if the target route is fully static, and it's already completely
// loaded into the segment cache, then we can skip the server request.
//
// This starts off as `false`, and is set to `true` if any of the child
// routes requires a dynamic request.
let needsDynamicRequest = false;
// As we traverse the children, we'll construct a FlightRouterState that can
// be sent to the server to request the dynamic data. If it turns out that
// nothing in the subtree is dynamic (i.e. needsDynamicRequest is false at the
// end), then this will be discarded.
// TODO: We can probably optimize the format of this data structure to only
// include paths that are dynamic. Instead of reusing the
// FlightRouterState type.
let dynamicRequestTreeChildren = {};
for(let parallelRouteKey in newRouterStateChildren){
const newRouterStateChild = newRouterStateChildren[parallelRouteKey];
const oldRouterStateChild = oldRouterStateChildren[parallelRouteKey];
const oldSegmentMapChild = oldParallelRoutes.get(parallelRouteKey);
const prefetchDataChild = prefetchDataChildren !== null ? prefetchDataChildren[parallelRouteKey] : null;
const newSegmentChild = newRouterStateChild[0];
const newSegmentPathChild = segmentPath.concat([
parallelRouteKey,
newSegmentChild
]);
const newSegmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(newSegmentChild);
const oldSegmentChild = oldRouterStateChild !== undefined ? oldRouterStateChild[0] : undefined;
const oldCacheNodeChild = oldSegmentMapChild !== undefined ? oldSegmentMapChild.get(newSegmentKeyChild) : undefined;
let taskChild;
if (newSegmentChild === _segment.DEFAULT_SEGMENT_KEY) {
// This is another kind of leaf segment — a default route.
//
// Default routes have special behavior. When there's no matching segment
// for a parallel route, Next.js preserves the currently active segment
// during a client navigation — but not for initial render. The server
// leaves it to the client to account for this. So we need to handle
// it here.
if (oldRouterStateChild !== undefined) {
// Reuse the existing Router State for this segment. We spawn a "task"
// just to keep track of the updated router state; unlike most, it's
// already fulfilled and won't be affected by the dynamic response.
taskChild = spawnReusedTask(oldRouterStateChild);
} else {
// There's no currently active segment. Switch to the "create" path.
taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult);
}
} else if (isSamePageNavigation && // Check if this is a page segment.
// TODO: We're not consistent about how we do this check. Some places
// check if the segment starts with PAGE_SEGMENT_KEY, but most seem to
// check if there any any children, which is why I'm doing it here. We
// should probably encode an empty children set as `null` though. Either
// way, we should update all the checks to be consistent.
Object.keys(newRouterStateChild[1]).length === 0) {
// We special case navigations to the exact same URL as the current
// location. It's a common UI pattern for apps to refresh when you click a
// link to the current page. So when this happens, we refresh the dynamic
// data in the page segments.
//
// Note that this does not apply if the any part of the hash or search
// query has changed. This might feel a bit weird but it makes more sense
// when you consider that the way to trigger this behavior is to click
// the same link multiple times.
//
// TODO: We should probably refresh the *entire* route when this case
// occurs, not just the page segments. Essentially treating it the same as
// a refresh() triggered by an action, which is the more explicit way of
// modeling the UI pattern described above.
//
// Also note that this only refreshes the dynamic data, not static/
// cached data. If the page segment is fully static and prefetched, the
// request is skipped. (This is also how refresh() works.)
taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult);
} else if (oldRouterStateChild !== undefined && oldSegmentChild !== undefined && (0, _matchsegments.matchSegment)(newSegmentChild, oldSegmentChild)) {
if (oldCacheNodeChild !== undefined && oldRouterStateChild !== undefined) {
// This segment exists in both the old and new trees. Recursively update
// the children.
taskChild = updateCacheNodeOnNavigation(navigatedAt, oldCacheNodeChild, oldRouterStateChild, newRouterStateChild, didFindRootLayout, prefetchDataChild, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, newSegmentPathChild, scrollableSegmentsResult);
} else {
// There's no existing Cache Node for this segment. Switch to the
// "create" path.
taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult);
}
} else {
// This is a new tree. Switch to the "create" path.
taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult);
}
if (taskChild !== null) {
// Recursively propagate up the child tasks.
if (taskChild.route === null) {
// One of the child tasks discovered a change to the root layout.
// Immediately unwind from this recursive traversal.
return MPA_NAVIGATION_TASK;
}
if (taskChildren === null) {
taskChildren = new Map();
}
taskChildren.set(parallelRouteKey, taskChild);
const newCacheNodeChild = taskChild.node;
if (newCacheNodeChild !== null) {
const newSegmentMapChild = new Map(oldSegmentMapChild);
newSegmentMapChild.set(newSegmentKeyChild, newCacheNodeChild);
prefetchParallelRoutes.set(parallelRouteKey, newSegmentMapChild);
}
// The child tree's route state may be different from the prefetched
// route sent by the server. We need to clone it as we traverse back up
// the tree.
const taskChildRoute = taskChild.route;
patchedRouterStateChildren[parallelRouteKey] = taskChildRoute;
const dynamicRequestTreeChild = taskChild.dynamicRequestTree;
if (dynamicRequestTreeChild !== null) {
// Something in the child tree is dynamic.
needsDynamicRequest = true;
dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild;
} else {
dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute;
}
} else {
// The child didn't change. We can use the prefetched router state.
patchedRouterStateChildren[parallelRouteKey] = newRouterStateChild;
dynamicRequestTreeChildren[parallelRouteKey] = newRouterStateChild;
}
}
if (taskChildren === null) {
// No new tasks were spawned.
return null;
}
const newCacheNode = {
lazyData: null,
rsc: oldCacheNode.rsc,
// We intentionally aren't updating the prefetchRsc field, since this node
// is already part of the current tree, because it would be weird for
// prefetch data to be newer than the final data. It probably won't ever be
// observable anyway, but it could happen if the segment is unmounted then
// mounted again, because LayoutRouter will momentarily switch to rendering
// prefetchRsc, via useDeferredValue.
prefetchRsc: oldCacheNode.prefetchRsc,
head: oldCacheNode.head,
prefetchHead: oldCacheNode.prefetchHead,
loading: oldCacheNode.loading,
// Everything is cloned except for the children, which we computed above.
parallelRoutes: prefetchParallelRoutes,
navigatedAt
};
return {
// Return a cloned copy of the router state with updated children.
route: patchRouterStateWithNewChildren(newRouterState, patchedRouterStateChildren),
node: newCacheNode,
dynamicRequestTree: needsDynamicRequest ? patchRouterStateWithNewChildren(newRouterState, dynamicRequestTreeChildren) : null,
children: taskChildren
};
}
function beginRenderingNewRouteTree(navigatedAt, oldRouterState, newRouterState, existingCacheNode, didFindRootLayout, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) {
if (!didFindRootLayout) {
// The route tree changed before we reached a layout. (The highest-level
// layout in a route tree is referred to as the "root" layout.) This could
// mean that we're navigating between two different root layouts. When this
// happens, we perform a full-page (MPA-style) navigation.
//
// However, the algorithm for deciding where to start rendering a route
// (i.e. the one performed in order to reach this function) is stricter
// than the one used to detect a change in the root layout. So just because
// we're re-rendering a segment outside of the root layout does not mean we
// should trigger a full-page navigation.
//
// Specifically, we handle dynamic parameters differently: two segments are
// considered the same even if their parameter values are different.
//
// Refer to isNavigatingToNewRootLayout for details.
//
// Note that we only have to perform this extra traversal if we didn't
// already discover a root layout in the part of the tree that is unchanged.
// In the common case, this branch is skipped completely.
if (oldRouterState === undefined || (0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(oldRouterState, newRouterState)) {
// The root layout changed. Perform a full-page navigation.
return MPA_NAVIGATION_TASK;
}
}
return createCacheNodeOnNavigation(navigatedAt, newRouterState, existingCacheNode, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult);
}
function createCacheNodeOnNavigation(navigatedAt, routerState, existingCacheNode, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) {
// Same traversal as updateCacheNodeNavigation, but we switch to this path
// once we reach the part of the tree that was not in the previous route. We
// don't need to diff against the old tree, we just need to create a new one.
// The head is assigned to every leaf segment delivered by the server. Based
// on corresponding logic in fill-lazy-items-till-leaf-with-head.ts
const routerStateChildren = routerState[1];
const isLeafSegment = Object.keys(routerStateChildren).length === 0;
// Even we're rendering inside the "new" part of the target tree, we may have
// a locally cached segment that we can reuse. This may come from either 1)
// the CacheNode tree, which lives in React state and is populated by previous
// navigations; or 2) the prefetch cache, which is a separate cache that is
// populated by prefetches.
let rsc;
let loading;
let head;
let cacheNodeNavigatedAt;
if (existingCacheNode !== undefined && // DYNAMIC_STALETIME_MS defaults to 0, but it can be increased using
// the experimental.staleTimes.dynamic config. When set, we'll avoid
// refetching dynamic data if it was fetched within the given threshold.
existingCacheNode.navigatedAt + _prefetchcacheutils.DYNAMIC_STALETIME_MS > navigatedAt) {
// We have an existing CacheNode for this segment, and it's not stale. We
// should reuse it rather than request a new one.
rsc = existingCacheNode.rsc;
loading = existingCacheNode.loading;
head = existingCacheNode.head;
// Don't update the navigatedAt timestamp, since we're reusing stale data.
cacheNodeNavigatedAt = existingCacheNode.navigatedAt;
} else if (prefetchData !== null) {
// There's no existing CacheNode for this segment, but we do have prefetch
// data. If the prefetch data is fully static (i.e. does not contain any
// dynamic holes), we don't need to request it from the server.
rsc = prefetchData[1];
loading = prefetchData[3];
head = isLeafSegment ? possiblyPartialPrefetchHead : null;
// Even though we're accessing the data from the prefetch cache, this is
// conceptually a new segment, not a reused one. So we should update the
// navigatedAt timestamp.
cacheNodeNavigatedAt = navigatedAt;
const isPrefetchRscPartial = prefetchData[4];
if (isPrefetchRscPartial || // Check if the head is partial (only relevant if this is a leaf segment)
isPrefetchHeadPartial && isLeafSegment) {
// We only have partial data from this segment. Like missing segments, we
// must request the full data from the server.
return spawnPendingTask(navigatedAt, routerState, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult);
} else {
// The prefetch data is fully static, so we can omit it from the
// navigation request.
}
} else {
// There's no prefetch for this segment. Everything from this point will be
// requested from the server, even if there are static children below it.
// Create a terminal task node that will later be fulfilled by
// server response.
return spawnPendingTask(navigatedAt, routerState, null, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult);
}
// We already have a full segment we can render, so we don't need to request a
// new one from the server. Keep traversing down the tree until we reach
// something that requires a dynamic request.
const prefetchDataChildren = prefetchData !== null ? prefetchData[2] : null;
const taskChildren = new Map();
const existingCacheNodeChildren = existingCacheNode !== undefined ? existingCacheNode.parallelRoutes : null;
const cacheNodeChildren = new Map(existingCacheNodeChildren);
let dynamicRequestTreeChildren = {};
let needsDynamicRequest = false;
if (isLeafSegment) {
// The segment path of every leaf segment (i.e. page) is collected into
// a result array. This is used by the LayoutRouter to scroll to ensure that
// new pages are visible after a navigation.
// TODO: We should use a string to represent the segment path instead of
// an array. We already use a string representation for the path when
// accessing the Segment Cache, so we can use the same one.
scrollableSegmentsResult.push(segmentPath);
} else {
for(let parallelRouteKey in routerStateChildren){
const routerStateChild = routerStateChildren[parallelRouteKey];
const prefetchDataChild = prefetchDataChildren !== null ? prefetchDataChildren[parallelRouteKey] : null;
const existingSegmentMapChild = existingCacheNodeChildren !== null ? existingCacheNodeChildren.get(parallelRouteKey) : undefined;
const segmentChild = routerStateChild[0];
const segmentPathChild = segmentPath.concat([
parallelRouteKey,
segmentChild
]);
const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild);
const existingCacheNodeChild = existingSegmentMapChild !== undefined ? existingSegmentMapChild.get(segmentKeyChild) : undefined;
const taskChild = createCacheNodeOnNavigation(navigatedAt, routerStateChild, existingCacheNodeChild, prefetchDataChild, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPathChild, scrollableSegmentsResult);
taskChildren.set(parallelRouteKey, taskChild);
const dynamicRequestTreeChild = taskChild.dynamicRequestTree;
if (dynamicRequestTreeChild !== null) {
// Something in the child tree is dynamic.
needsDynamicRequest = true;
dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild;
} else {
dynamicRequestTreeChildren[parallelRouteKey] = routerStateChild;
}
const newCacheNodeChild = taskChild.node;
if (newCacheNodeChild !== null) {
const newSegmentMapChild = new Map();
newSegmentMapChild.set(segmentKeyChild, newCacheNodeChild);
cacheNodeChildren.set(parallelRouteKey, newSegmentMapChild);
}
}
}
return {
// Since we're inside a new route tree, unlike the
// `updateCacheNodeOnNavigation` path, the router state on the children
// tasks is always the same as the router state we pass in. So we don't need
// to clone/modify it.
route: routerState,
node: {
lazyData: null,
// Since this segment is already full, we don't need to use the
// `prefetchRsc` field.
rsc,
prefetchRsc: null,
head,
prefetchHead: null,
loading,
parallelRoutes: cacheNodeChildren,
navigatedAt: cacheNodeNavigatedAt
},
dynamicRequestTree: needsDynamicRequest ? patchRouterStateWithNewChildren(routerState, dynamicRequestTreeChildren) : null,
children: taskChildren
};
}
function patchRouterStateWithNewChildren(baseRouterState, newChildren) {
const clone = [
baseRouterState[0],
newChildren
];
// Based on equivalent logic in apply-router-state-patch-to-tree, but should
// confirm whether we need to copy all of these fields. Not sure the server
// ever sends, e.g. the refetch marker.
if (2 in baseRouterState) {
clone[2] = baseRouterState[2];
}
if (3 in baseRouterState) {
clone[3] = baseRouterState[3];
}
if (4 in baseRouterState) {
clone[4] = baseRouterState[4];
}
return clone;
}
function spawnPendingTask(navigatedAt, routerState, prefetchData, prefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) {
// Create a task that will later be fulfilled by data from the server.
// Clone the prefetched route tree and the `refetch` marker to it. We'll send
// this to the server so it knows where to start rendering.
const dynamicRequestTree = patchRouterStateWithNewChildren(routerState, routerState[1]);
dynamicRequestTree[3] = 'refetch';
const newTask = {
route: routerState,
// Corresponds to the part of the route that will be rendered on the server.
node: createPendingCacheNode(navigatedAt, routerState, prefetchData, prefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult),
// Because this is non-null, and it gets propagated up through the parent
// tasks, the root task will know that it needs to perform a server request.
dynamicRequestTree,
children: null
};
return newTask;
}
function spawnReusedTask(reusedRouterState) {
// Create a task that reuses an existing segment, e.g. when reusing
// the current active segment in place of a default route.
return {
route: reusedRouterState,
node: null,
dynamicRequestTree: null,
children: null
};
}
function listenForDynamicRequest(task, responsePromise) {
responsePromise.then((param)=>{
let { flightData } = param;
if (typeof flightData === 'string') {
// Happens when navigating to page in `pages` from `app`. We shouldn't
// get here because should have already handled this during
// the prefetch.
return;
}
for (const normalizedFlightData of flightData){
const { segmentPath, tree: serverRouterState, seedData: dynamicData, head: dynamicHead } = normalizedFlightData;
if (!dynamicData) {
continue;
}
writeDynamicDataIntoPendingTask(task, segmentPath, serverRouterState, dynamicData, dynamicHead);
}
// Now that we've exhausted all the data we received from the server, if
// there are any remaining pending tasks in the tree, abort them now.
// If there's any missing data, it will trigger a lazy fetch.
abortTask(task, null);
}, (error)=>{
// This will trigger an error during render
abortTask(task, error);
});
}
function writeDynamicDataIntoPendingTask(rootTask, segmentPath, serverRouterState, dynamicData, dynamicHead) {
// The data sent by the server represents only a subtree of the app. We need
// to find the part of the task tree that matches the server response, and
// fulfill it using the dynamic data.
//
// segmentPath represents the parent path of subtree. It's a repeating pattern
// of parallel route key and segment:
//
// [string, Segment, string, Segment, string, Segment, ...]
//
// Iterate through the path and finish any tasks that match this payload.
let task = rootTask;
for(let i = 0; i < segmentPath.length; i += 2){
const parallelRouteKey = segmentPath[i];
const segment = segmentPath[i + 1];
const taskChildren = task.children;
if (taskChildren !== null) {
const taskChild = taskChildren.get(parallelRouteKey);
if (taskChild !== undefined) {
const taskSegment = taskChild.route[0];
if ((0, _matchsegments.matchSegment)(segment, taskSegment)) {
// Found a match for this task. Keep traversing down the task tree.
task = taskChild;
continue;
}
}
}
// We didn't find a child task that matches the server data. Exit. We won't
// abort the task, though, because a different FlightDataPath may be able to
// fulfill it (see loop in listenForDynamicRequest). We only abort tasks
// once we've run out of data.
return;
}
finishTaskUsingDynamicDataPayload(task, serverRouterState, dynamicData, dynamicHead);
}
function finishTaskUsingDynamicDataPayload(task, serverRouterState, dynamicData, dynamicHead) {
if (task.dynamicRequestTree === null) {
// Everything in this subtree is already complete. Bail out.
return;
}
// dynamicData may represent a larger subtree than the task. Before we can
// finish the task, we need to line them up.
const taskChildren = task.children;
const taskNode = task.node;
if (taskChildren === null) {
// We've reached the leaf node of the pending task. The server data tree
// lines up the pending Cache Node tree. We can now switch to the
// normal algorithm.
if (taskNode !== null) {
finishPendingCacheNode(taskNode, task.route, serverRouterState, dynamicData, dynamicHead);
// Set this to null to indicate that this task is now complete.
task.dynamicRequestTree = null;
}
return;
}
// The server returned more data than we need to finish the task. Skip over
// the extra segments until we reach the leaf task node.
const serverChildren = serverRouterState[1];
const dynamicDataChildren = dynamicData[2];
for(const parallelRouteKey in serverRouterState){
const serverRouterStateChild = serverChildren[parallelRouteKey];
const dynamicDataChild = dynamicDataChildren[parallelRouteKey];
const taskChild = taskChildren.get(parallelRouteKey);
if (taskChild !== undefined) {
const taskSegment = taskChild.route[0];
if ((0, _matchsegments.matchSegment)(serverRouterStateChild[0], taskSegment) && dynamicDataChild !== null && dynamicDataChild !== undefined) {
// Found a match for this task. Keep traversing down the task tree.
return finishTaskUsingDynamicDataPayload(taskChild, serverRouterStateChild, dynamicDataChild, dynamicHead);
}
}
// We didn't find a child task that matches the server data. We won't abort
// the task, though, because a different FlightDataPath may be able to
// fulfill it (see loop in listenForDynamicRequest). We only abort tasks
// once we've run out of data.
}
}
function createPendingCacheNode(navigatedAt, routerState, prefetchData, prefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) {
const routerStateChildren = routerState[1];
const prefetchDataChildren = prefetchData !== null ? prefetchData[2] : null;
const parallelRoutes = new Map();
for(let parallelRouteKey in routerStateChildren){
const routerStateChild = routerStateChildren[parallelRouteKey];
const prefetchDataChild = prefetchDataChildren !== null ? prefetchDataChildren[parallelRouteKey] : null;
const segmentChild = routerStateChild[0];
const segmentPathChild = segmentPath.concat([
parallelRouteKey,
segmentChild
]);
const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild);
const newCacheNodeChild = createPendingCacheNode(navigatedAt, routerStateChild, prefetchDataChild === undefined ? null : prefetchDataChild, prefetchHead, isPrefetchHeadPartial, segmentPathChild, scrollableSegmentsResult);
const newSegmentMapChild = new Map();
newSegmentMapChild.set(segmentKeyChild, newCacheNodeChild);
parallelRoutes.set(parallelRouteKey, newSegmentMapChild);
}
// The head is assigned to every leaf segment delivered by the server. Based
// on corresponding logic in fill-lazy-items-till-leaf-with-head.ts
const isLeafSegment = parallelRoutes.size === 0;
if (isLeafSegment) {
// The segment path of every leaf segment (i.e. page) is collected into
// a result array. This is used by the LayoutRouter to scroll to ensure that
// new pages are visible after a navigation.
// TODO: We should use a string to represent the segment path instead of
// an array. We already use a string representation for the path when
// accessing the Segment Cache, so we can use the same one.
scrollableSegmentsResult.push(segmentPath);
}
const maybePrefetchRsc = prefetchData !== null ? prefetchData[1] : null;
const maybePrefetchLoading = prefetchData !== null ? prefetchData[3] : null;
return {
lazyData: null,
parallelRoutes: parallelRoutes,
prefetchRsc: maybePrefetchRsc !== undefined ? maybePrefetchRsc : null,
prefetchHead: isLeafSegment ? prefetchHead : [
null,
null
],
// TODO: Technically, a loading boundary could contain dynamic data. We must
// have separate `loading` and `prefetchLoading` fields to handle this, like
// we do for the segment data and head.
loading: maybePrefetchLoading !== undefined ? maybePrefetchLoading : null,
// Create a deferred promise. This will be fulfilled once the dynamic
// response is received from the server.
rsc: createDeferredRsc(),
head: isLeafSegment ? createDeferredRsc() : null,
navigatedAt
};
}
function finishPendingCacheNode(cacheNode, taskState, serverState, dynamicData, dynamicHead) {
// Writes a dynamic response into an existing Cache Node tree. This does _not_
// create a new tree, it updates the existing tree in-place. So it must follow
// the Suspense rules of cache safety — it can resolve pending promises, but
// it cannot overwrite existing data. It can add segments to the tree (because
// a missing segment will cause the layout router to suspend).
// but it cannot delete them.
//
// We must resolve every promise in the tree, or else it will suspend
// indefinitely. If we did not receive data for a segment, we will resolve its
// data promise to `null` to trigger a lazy fetch during render.
const taskStateChildren = taskState[1];
const serverStateChildren = serverState[1];
const dataChildren = dynamicData[2];
// The router state that we traverse the tree with (taskState) is the same one
// that we used to construct the pending Cache Node tree. That way we're sure
// to resolve all the pending promises.
const parallelRoutes = cacheNode.parallelRoutes;
for(let parallelRouteKey in taskStateChildren){
const taskStateChild = taskStateChildren[parallelRouteKey];
const serverStateChild = serverStateChildren[parallelRouteKey];
const dataChild = dataChildren[parallelRouteKey];
const segmentMapChild = parallelRoutes.get(parallelRouteKey);
const taskSegmentChild = taskStateChild[0];
const taskSegmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(taskSegmentChild);
const cacheNodeChild = segmentMapChild !== undefined ? segmentMapChild.get(taskSegmentKeyChild) : undefined;
if (cacheNodeChild !== undefined) {
if (serverStateChild !== undefined && (0, _matchsegments.matchSegment)(taskSegmentChild, serverStateChild[0])) {
if (dataChild !== undefined && dataChild !== null) {
// This is the happy path. Recursively update all the children.
finishPendingCacheNode(cacheNodeChild, taskStateChild, serverStateChild, dataChild, dynamicHead);
} else {
// The server never returned data for this segment. Trigger a lazy
// fetch during render. This shouldn't happen because the Route Tree
// and the Seed Data tree sent by the server should always be the same
// shape when part of the same server response.
abortPendingCacheNode(taskStateChild, cacheNodeChild, null);
}
} else {
// The server never returned data for this segment. Trigger a lazy
// fetch during render.
abortPendingCacheNode(taskStateChild, cacheNodeChild, null);
}
} else {
// The server response matches what was expected to receive, but there's
// no matching Cache Node in the task tree. This is a bug in the
// implementation because we should have created a node for every
// segment in the tree that's associated with this task.
}
}
// Use the dynamic data from the server to fulfill the deferred RSC promise
// on the Cache Node.
const rsc = cacheNode.rsc;
const dynamicSegmentData = dynamicData[1];
if (rsc === null) {
// This is a lazy cache node. We can overwrite it. This is only safe
// because we know that the LayoutRouter suspends if `rsc` is `null`.
cacheNode.rsc = dynamicSegmentData;
} else if (isDeferredRsc(rsc)) {
// This is a deferred RSC promise. We can fulfill it with the data we just
// received from the server. If it was already resolved by a different
// navigation, then this does nothing because we can't overwrite data.
rsc.resolve(dynamicSegmentData);
} else {
// This is not a deferred RSC promise, nor is it empty, so it must have
// been populated by a different navigation. We must not overwrite it.
}
// Check if this is a leaf segment. If so, it will have a `head` property with
// a pending promise that needs to be resolved with the dynamic head from
// the server.
const head = cacheNode.head;
if (isDeferredRsc(head)) {
head.resolve(dynamicHead);
}
}
function abortTask(task, error) {
const cacheNode = task.node;
if (cacheNode === null) {
// This indicates the task is already complete.
return;
}
const taskChildren = task.children;
if (taskChildren === null) {
// Reached the leaf task node. This is the root of a pending cache
// node tree.
abortPendingCacheNode(task.route, cacheNode, error);
} else {
// This is an intermediate task node. Keep traversing until we reach a
// task node with no children. That will be the root of the cache node tree
// that needs to be resolved.
for (const taskChild of taskChildren.values()){
abortTask(taskChild, error);
}
}
// Set this to null to indicate that this task is now complete.
task.dynamicRequestTree = null;
}
function abortPendingCacheNode(routerState, cacheNode, error) {
// For every pending segment in the tree, resolve its `rsc` promise to `null`
// to trigger a lazy fetch during render.
//
// Or, if an error object is provided, it will error instead.
const routerStateChildren = routerState[1];
const parallelRoutes = cacheNode.parallelRoutes;
for(let parallelRouteKey in routerStateChildren){
const routerStateChild = routerStateChildren[parallelRouteKey];
const segmentMapChild = parallelRoutes.get(parallelRouteKey);
if (segmentMapChild === undefined) {
continue;
}
const segmentChild = routerStateChild[0];
const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild);
const cacheNodeChild = segmentMapChild.get(segmentKeyChild);
if (cacheNodeChild !== undefined) {
abortPendingCacheNode(routerStateChild, cacheNodeChild, error);
} else {
// This shouldn't happen because we're traversing the same tree that was
// used to construct the cache nodes in the first place.
}
}
const rsc = cacheNode.rsc;
if (isDeferredRsc(rsc)) {
if (error === null) {
// This will trigger a lazy fetch during render.
rsc.resolve(null);
} else {
// This will trigger an error during rendering.
rsc.reject(error);
}
}
// Check if this is a leaf segment. If so, it will have a `head` property with
// a pending promise that needs to be resolved. If an error was provided, we
// will not resolve it with an error, since this is rendered at the root of
// the app. We want the segment to error, not the entire app.
const head = cacheNode.head;
if (isDeferredRsc(head)) {
head.resolve(null);
}
}
function updateCacheNodeOnPopstateRestoration(oldCacheNode, routerState) {
// A popstate navigation reads data from the local cache. It does not issue
// new network requests (unless the cache entries have been evicted). So, we
// update the cache to drop the prefetch data for any segment whose dynamic
// data was already received. This prevents an unnecessary flash back to PPR
// state during a back/forward navigation.
//
// This function clones the entire cache node tree and sets the `prefetchRsc`
// field to `null` to prevent it from being rendered. We can't mutate the node
// in place because this is a concurrent data structure.
const routerStateChildren = routerState[1];
const oldParallelRoutes = oldCacheNode.parallelRoutes;
const newParallelRoutes = new Map(oldParallelRoutes);
for(let parallelRouteKey in routerStateChildren){
const routerStateChild = routerStateChildren[parallelRouteKey];
const segmentChild = routerStateChild[0];
const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild);
const oldSegmentMapChild = oldParallelRoutes.get(parallelRouteKey);
if (oldSegmentMapChild !== undefined) {
const oldCacheNodeChild = oldSegmentMapChild.get(segmentKeyChild);
if (oldCacheNodeChild !== undefined) {
const newCacheNodeChild = updateCacheNodeOnPopstateRestoration(oldCacheNodeChild, routerStateChild);
const newSegmentMapChild = new Map(oldSegmentMapChild);
newSegmentMapChild.set(segmentKeyChild, newCacheNodeChild);
newParallelRoutes.set(parallelRouteKey, newSegmentMapChild);
}
}
}
// Only show prefetched data if the dynamic data is still pending.
//
// Tehnically, what we're actually checking is whether the dynamic network
// response was received. But since it's a streaming response, this does not
// mean that all the dynamic data has fully streamed in. It just means that
// _some_ of the dynamic data was received. But as a heuristic, we assume that
// the rest dynamic data will stream in quickly, so it's still better to skip
// the prefetch state.
const rsc = oldCacheNode.rsc;
const shouldUsePrefetch = isDeferredRsc(rsc) && rsc.status === 'pending';
return {
lazyData: null,
rsc,
head: oldCacheNode.head,
prefetchHead: shouldUsePrefetch ? oldCacheNode.prefetchHead : [
null,
null
],
prefetchRsc: shouldUsePrefetch ? oldCacheNode.prefetchRsc : null,
loading: oldCacheNode.loading,
// These are the cloned children we computed above
parallelRoutes: newParallelRoutes,
navigatedAt: oldCacheNode.navigatedAt
};
}
const DEFERRED = Symbol();
// This type exists to distinguish a DeferredRsc from a Flight promise. It's a
// compromise to avoid adding an extra field on every Cache Node, which would be
// awkward because the pre-PPR parts of codebase would need to account for it,
// too. We can remove it once type Cache Node type is more settled.
function isDeferredRsc(value) {
return value && value.tag === DEFERRED;
}
function createDeferredRsc() {
let resolve;
let reject;
const pendingRsc = new Promise((res, rej)=>{
resolve = res;
reject = rej;
});
pendingRsc.status = 'pending';
pendingRsc.resolve = (value)=>{
if (pendingRsc.status === 'pending') {
const fulfilledRsc = pendingRsc;
fulfilledRsc.status = 'fulfilled';
fulfilledRsc.value = value;
resolve(value);
}
};
pendingRsc.reject = (error)=>{
if (pendingRsc.status === 'pending') {
const rejectedRsc = pendingRsc;
rejectedRsc.status = 'rejected';
rejectedRsc.reason = error;
reject(error);
}
};
pendingRsc.tag = DEFERRED;
return pendingRsc;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=ppr-navigations.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/clear-cache-node-data-for-segment-path.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "clearCacheNodeDataForSegmentPath", {
enumerable: true,
get: function() {
return clearCacheNodeDataForSegmentPath;
}
});
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
function clearCacheNodeDataForSegmentPath(newCache, existingCache, flightSegmentPath) {
const isLastEntry = flightSegmentPath.length <= 2;
const [parallelRouteKey, segment] = flightSegmentPath;
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);
const existingChildSegmentMap = existingCache.parallelRoutes.get(parallelRouteKey);
let childSegmentMap = newCache.parallelRoutes.get(parallelRouteKey);
if (!childSegmentMap || childSegmentMap === existingChildSegmentMap) {
childSegmentMap = new Map(existingChildSegmentMap);
newCache.parallelRoutes.set(parallelRouteKey, childSegmentMap);
}
const existingChildCacheNode = existingChildSegmentMap == null ? void 0 : existingChildSegmentMap.get(cacheKey);
let childCacheNode = childSegmentMap.get(cacheKey);
// In case of last segment start off the fetch at this level and don't copy further down.
if (isLastEntry) {
if (!childCacheNode || !childCacheNode.lazyData || childCacheNode === existingChildCacheNode) {
childSegmentMap.set(cacheKey, {
lazyData: null,
rsc: null,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading: null,
navigatedAt: -1
});
}
return;
}
if (!childCacheNode || !existingChildCacheNode) {
// Start fetch in the place where the existing cache doesn't have the data yet.
if (!childCacheNode) {
childSegmentMap.set(cacheKey, {
lazyData: null,
rsc: null,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading: null,
navigatedAt: -1
});
}
return;
}
if (childCacheNode === existingChildCacheNode) {
childCacheNode = {
lazyData: childCacheNode.lazyData,
rsc: childCacheNode.rsc,
prefetchRsc: childCacheNode.prefetchRsc,
head: childCacheNode.head,
prefetchHead: childCacheNode.prefetchHead,
parallelRoutes: new Map(childCacheNode.parallelRoutes),
loading: childCacheNode.loading
};
childSegmentMap.set(cacheKey, childCacheNode);
}
return clearCacheNodeDataForSegmentPath(childCacheNode, existingChildCacheNode, (0, _flightdatahelpers.getNextFlightSegmentPath)(flightSegmentPath));
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=clear-cache-node-data-for-segment-path.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/aliased-prefetch-navigations.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
addSearchParamsToPageSegments: null,
handleAliasedPrefetchEntry: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
addSearchParamsToPageSegments: function() {
return addSearchParamsToPageSegments;
},
handleAliasedPrefetchEntry: function() {
return handleAliasedPrefetchEntry;
}
});
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _applyrouterstatepatchtotree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-client] (ecmascript)");
const _fillcachewithnewsubtreedata = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js [app-client] (ecmascript)");
const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)");
function handleAliasedPrefetchEntry(navigatedAt, state, flightData, url, mutable) {
let currentTree = state.tree;
let currentCache = state.cache;
const href = (0, _createhreffromurl.createHrefFromUrl)(url);
let applied;
if (typeof flightData === 'string') {
return false;
}
for (const normalizedFlightData of flightData){
// If the segment doesn't have a loading component, we don't need to do anything.
if (!hasLoadingComponentInSeedData(normalizedFlightData.seedData)) {
continue;
}
let treePatch = normalizedFlightData.tree;
// Segments are keyed by searchParams (e.g. __PAGE__?{"foo":"bar"}). We might return a less specific, param-less entry,
// so we ensure that the final tree contains the correct searchParams (reflected in the URL) are provided in the updated FlightRouterState tree.
// We only do this on the first read, as otherwise we'd be overwriting the searchParams that may have already been set
treePatch = addSearchParamsToPageSegments(treePatch, Object.fromEntries(url.searchParams));
const { seedData, isRootRender, pathToSegment } = normalizedFlightData;
// TODO-APP: remove ''
const flightSegmentPathWithLeadingEmpty = [
'',
...pathToSegment
];
// Segments are keyed by searchParams (e.g. __PAGE__?{"foo":"bar"}). We might return a less specific, param-less entry,
// so we ensure that the final tree contains the correct searchParams (reflected in the URL) are provided in the updated FlightRouterState tree.
// We only do this on the first read, as otherwise we'd be overwriting the searchParams that may have already been set
treePatch = addSearchParamsToPageSegments(treePatch, Object.fromEntries(url.searchParams));
let newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)(flightSegmentPathWithLeadingEmpty, currentTree, treePatch, href);
const newCache = (0, _approuter.createEmptyCacheNode)();
// The prefetch cache entry was aliased -- this signals that we only fill in the cache with the
// loading state and not the actual parallel route seed data.
if (isRootRender && seedData) {
// Fill in the cache with the new loading / rsc data
const rsc = seedData[1];
const loading = seedData[3];
newCache.loading = loading;
newCache.rsc = rsc;
// Construct a new tree and apply the aliased loading state for each parallel route
fillNewTreeWithOnlyLoadingSegments(navigatedAt, newCache, currentCache, treePatch, seedData);
} else {
// Copy rsc for the root node of the cache.
newCache.rsc = currentCache.rsc;
newCache.prefetchRsc = currentCache.prefetchRsc;
newCache.loading = currentCache.loading;
newCache.parallelRoutes = new Map(currentCache.parallelRoutes);
// copy the loading state only into the leaf node (the part that changed)
(0, _fillcachewithnewsubtreedata.fillCacheWithNewSubTreeDataButOnlyLoading)(navigatedAt, newCache, currentCache, normalizedFlightData);
}
// If we don't have an updated tree, there's no reason to update the cache, as the tree
// dictates what cache nodes to render.
if (newTree) {
currentTree = newTree;
currentCache = newCache;
applied = true;
}
}
if (!applied) {
return false;
}
mutable.patchedTree = currentTree;
mutable.cache = currentCache;
mutable.canonicalUrl = href;
mutable.hashFragment = url.hash;
return (0, _handlemutable.handleMutable)(state, mutable);
}
function hasLoadingComponentInSeedData(seedData) {
if (!seedData) return false;
const parallelRoutes = seedData[2];
const loading = seedData[3];
if (loading) {
return true;
}
for(const key in parallelRoutes){
if (hasLoadingComponentInSeedData(parallelRoutes[key])) {
return true;
}
}
return false;
}
function fillNewTreeWithOnlyLoadingSegments(navigatedAt, newCache, existingCache, routerState, cacheNodeSeedData) {
const isLastSegment = Object.keys(routerState[1]).length === 0;
if (isLastSegment) {
return;
}
for(const key in routerState[1]){
const parallelRouteState = routerState[1][key];
const segmentForParallelRoute = parallelRouteState[0];
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segmentForParallelRoute);
const parallelSeedData = cacheNodeSeedData !== null && cacheNodeSeedData[2][key] !== undefined ? cacheNodeSeedData[2][key] : null;
let newCacheNode;
if (parallelSeedData !== null) {
// New data was sent from the server.
const rsc = parallelSeedData[1];
const loading = parallelSeedData[3];
newCacheNode = {
lazyData: null,
// copy the layout but null the page segment as that's not meant to be used
rsc: segmentForParallelRoute.includes(_segment.PAGE_SEGMENT_KEY) ? null : rsc,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading,
navigatedAt
};
} else {
// No data available for this node. This will trigger a lazy fetch
// during render.
newCacheNode = {
lazyData: null,
rsc: null,
prefetchRsc: null,
head: null,
prefetchHead: null,
parallelRoutes: new Map(),
loading: null,
navigatedAt: -1
};
}
const existingParallelRoutes = newCache.parallelRoutes.get(key);
if (existingParallelRoutes) {
existingParallelRoutes.set(cacheKey, newCacheNode);
} else {
newCache.parallelRoutes.set(key, new Map([
[
cacheKey,
newCacheNode
]
]));
}
fillNewTreeWithOnlyLoadingSegments(navigatedAt, newCacheNode, existingCache, parallelRouteState, parallelSeedData);
}
}
function addSearchParamsToPageSegments(flightRouterState, searchParams) {
const [segment, parallelRoutes, ...rest] = flightRouterState;
// If it's a page segment, modify the segment by adding search params
if (segment.includes(_segment.PAGE_SEGMENT_KEY)) {
const newSegment = (0, _segment.addSearchParamsIfPageSegment)(segment, searchParams);
return [
newSegment,
parallelRoutes,
...rest
];
}
// Otherwise, recurse through the parallel routes and return a new tree
const updatedParallelRoutes = {};
for (const [key, parallelRoute] of Object.entries(parallelRoutes)){
updatedParallelRoutes[key] = addSearchParamsToPageSegments(parallelRoute, searchParams);
}
return [
segment,
updatedParallelRoutes,
...rest
];
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=aliased-prefetch-navigations.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
handleExternalUrl: null,
navigateReducer: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
handleExternalUrl: function() {
return handleExternalUrl;
},
navigateReducer: function() {
return navigateReducer;
}
});
const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _invalidatecachebelowflightsegmentpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js [app-client] (ecmascript)");
const _applyrouterstatepatchtotree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)");
const _shouldhardnavigate = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js [app-client] (ecmascript)");
const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)");
const _applyflightdata = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js [app-client] (ecmascript)");
const _prefetchreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-client] (ecmascript)");
const _pprnavigations = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js [app-client] (ecmascript)");
const _prefetchcacheutils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js [app-client] (ecmascript)");
const _clearcachenodedataforsegmentpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/clear-cache-node-data-for-segment-path.js [app-client] (ecmascript)");
const _aliasedprefetchnavigations = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/aliased-prefetch-navigations.js [app-client] (ecmascript)");
const _segmentcache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache.js [app-client] (ecmascript)");
function handleExternalUrl(state, mutable, url, pendingPush) {
mutable.mpaNavigation = true;
mutable.canonicalUrl = url;
mutable.pendingPush = pendingPush;
mutable.scrollableSegments = undefined;
return (0, _handlemutable.handleMutable)(state, mutable);
}
function generateSegmentsFromPatch(flightRouterPatch) {
const segments = [];
const [segment, parallelRoutes] = flightRouterPatch;
if (Object.keys(parallelRoutes).length === 0) {
return [
[
segment
]
];
}
for (const [parallelRouteKey, parallelRoute] of Object.entries(parallelRoutes)){
for (const childSegment of generateSegmentsFromPatch(parallelRoute)){
// If the segment is empty, it means we are at the root of the tree
if (segment === '') {
segments.push([
parallelRouteKey,
...childSegment
]);
} else {
segments.push([
segment,
parallelRouteKey,
...childSegment
]);
}
}
}
return segments;
}
function triggerLazyFetchForLeafSegments(newCache, currentCache, flightSegmentPath, treePatch) {
let appliedPatch = false;
newCache.rsc = currentCache.rsc;
newCache.prefetchRsc = currentCache.prefetchRsc;
newCache.loading = currentCache.loading;
newCache.parallelRoutes = new Map(currentCache.parallelRoutes);
const segmentPathsToFill = generateSegmentsFromPatch(treePatch).map((segment)=>[
...flightSegmentPath,
...segment
]);
for (const segmentPaths of segmentPathsToFill){
(0, _clearcachenodedataforsegmentpath.clearCacheNodeDataForSegmentPath)(newCache, currentCache, segmentPaths);
appliedPatch = true;
}
return appliedPatch;
}
function handleNavigationResult(url, state, mutable, pendingPush, result) {
switch(result.tag){
case _segmentcache.NavigationResultTag.MPA:
{
// Perform an MPA navigation.
const newUrl = result.data;
return handleExternalUrl(state, mutable, newUrl, pendingPush);
}
case _segmentcache.NavigationResultTag.NoOp:
{
// The server responded with no change to the current page. However, if
// the URL changed, we still need to update that.
const newCanonicalUrl = result.data.canonicalUrl;
mutable.canonicalUrl = newCanonicalUrl;
// Check if the only thing that changed was the hash fragment.
const oldUrl = new URL(state.canonicalUrl, url);
const onlyHashChange = // navigations are always same-origin.
url.pathname === oldUrl.pathname && url.search === oldUrl.search && url.hash !== oldUrl.hash;
if (onlyHashChange) {
// The only updated part of the URL is the hash.
mutable.onlyHashChange = true;
mutable.shouldScroll = result.data.shouldScroll;
mutable.hashFragment = url.hash;
// Setting this to an empty array triggers a scroll for all new and
// updated segments. See `ScrollAndFocusHandler` for more details.
mutable.scrollableSegments = [];
}
return (0, _handlemutable.handleMutable)(state, mutable);
}
case _segmentcache.NavigationResultTag.Success:
{
// Received a new result.
mutable.cache = result.data.cacheNode;
mutable.patchedTree = result.data.flightRouterState;
mutable.canonicalUrl = result.data.canonicalUrl;
mutable.scrollableSegments = result.data.scrollableSegments;
mutable.shouldScroll = result.data.shouldScroll;
mutable.hashFragment = result.data.hash;
return (0, _handlemutable.handleMutable)(state, mutable);
}
case _segmentcache.NavigationResultTag.Async:
{
return result.data.then((asyncResult)=>handleNavigationResult(url, state, mutable, pendingPush, asyncResult), // TODO: This matches the current behavior but we need to do something
// better here if the network fails.
()=>{
return state;
});
}
default:
{
result;
return state;
}
}
}
function navigateReducer(state, action) {
const { url, isExternalUrl, navigateType, shouldScroll, allowAliasing } = action;
const mutable = {};
const { hash } = url;
const href = (0, _createhreffromurl.createHrefFromUrl)(url);
const pendingPush = navigateType === 'push';
// we want to prune the prefetch cache on every navigation to avoid it growing too large
(0, _prefetchcacheutils.prunePrefetchCache)(state.prefetchCache);
mutable.preserveCustomHistoryState = false;
mutable.pendingPush = pendingPush;
if (isExternalUrl) {
return handleExternalUrl(state, mutable, url.toString(), pendingPush);
}
// Handles case where `` tag is present,
// which will trigger an MPA navigation.
if (document.getElementById('__next-page-redirect')) {
return handleExternalUrl(state, mutable, href, pendingPush);
}
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
const prefetchValues = (0, _prefetchcacheutils.getOrCreatePrefetchCacheEntry)({
url,
nextUrl: state.nextUrl,
tree: state.tree,
prefetchCache: state.prefetchCache,
allowAliasing
});
const { treeAtTimeOfPrefetch, data } = prefetchValues;
_prefetchreducer.prefetchQueue.bump(data);
return data.then((param)=>{
let { flightData, canonicalUrl: canonicalUrlOverride, postponed } = param;
const navigatedAt = Date.now();
let isFirstRead = false;
// we only want to mark this once
if (!prefetchValues.lastUsedTime) {
// important: we should only mark the cache node as dirty after we unsuspend from the call above
prefetchValues.lastUsedTime = navigatedAt;
isFirstRead = true;
}
if (prefetchValues.aliased) {
const result = (0, _aliasedprefetchnavigations.handleAliasedPrefetchEntry)(navigatedAt, state, flightData, url, mutable);
// We didn't return new router state because we didn't apply the aliased entry for some reason.
// We'll re-invoke the navigation handler but ensure that we don't attempt to use the aliased entry. This
// will create an on-demand prefetch entry.
if (result === false) {
return navigateReducer(state, {
...action,
allowAliasing: false
});
}
return result;
}
// Handle case when navigating to page in `pages` from `app`
if (typeof flightData === 'string') {
return handleExternalUrl(state, mutable, flightData, pendingPush);
}
const updatedCanonicalUrl = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : href;
const onlyHashChange = !!hash && state.canonicalUrl.split('#', 1)[0] === updatedCanonicalUrl.split('#', 1)[0];
// If only the hash has changed, the server hasn't sent us any new data. We can just update
// the mutable properties responsible for URL and scroll handling and return early.
if (onlyHashChange) {
mutable.onlyHashChange = true;
mutable.canonicalUrl = updatedCanonicalUrl;
mutable.shouldScroll = shouldScroll;
mutable.hashFragment = hash;
mutable.scrollableSegments = [];
return (0, _handlemutable.handleMutable)(state, mutable);
}
let currentTree = state.tree;
let currentCache = state.cache;
let scrollableSegments = [];
for (const normalizedFlightData of flightData){
const { pathToSegment: flightSegmentPath, seedData, head, isHeadPartial, isRootRender } = normalizedFlightData;
let treePatch = normalizedFlightData.tree;
// TODO-APP: remove ''
const flightSegmentPathWithLeadingEmpty = [
'',
...flightSegmentPath
];
// Create new tree based on the flightSegmentPath and router state patch
let newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)(flightSegmentPathWithLeadingEmpty, currentTree, treePatch, href);
// If the tree patch can't be applied to the current tree then we use the tree at time of prefetch
// TODO-APP: This should instead fill in the missing pieces in `currentTree` with the data from `treeAtTimeOfPrefetch`, then apply the patch.
if (newTree === null) {
newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)(flightSegmentPathWithLeadingEmpty, treeAtTimeOfPrefetch, treePatch, href);
}
if (newTree !== null) {
if (// will send back a static response that's rendered from
// the root. If for some reason it doesn't, we fall back to the
// non-PPR implementation.
// TODO: We should get rid of the else branch and do all navigations
// via startPPRNavigation. The current structure is just
// an incremental step.
seedData && isRootRender && postponed) {
const task = (0, _pprnavigations.startPPRNavigation)(navigatedAt, currentCache, currentTree, treePatch, seedData, head, isHeadPartial, false, scrollableSegments);
if (task !== null) {
if (task.route === null) {
// Detected a change to the root layout. Perform an full-
// page navigation.
return handleExternalUrl(state, mutable, href, pendingPush);
}
// Use the tree computed by startPPRNavigation instead
// of the one computed by applyRouterStatePatchToTree.
// TODO: We should remove applyRouterStatePatchToTree
// from the PPR path entirely.
const patchedRouterState = task.route;
newTree = patchedRouterState;
const newCache = task.node;
if (newCache !== null) {
// We've created a new Cache Node tree that contains a prefetched
// version of the next page. This can be rendered instantly.
mutable.cache = newCache;
}
const dynamicRequestTree = task.dynamicRequestTree;
if (dynamicRequestTree !== null) {
// The prefetched tree has dynamic holes in it. We initiate a
// dynamic request to fill them in.
//
// Do not block on the result. We'll immediately render the Cache
// Node tree and suspend on the dynamic parts. When the request
// comes in, we'll fill in missing data and ping React to
// re-render. Unlike the lazy fetching model in the non-PPR
// implementation, this is modeled as a single React update +
// streaming, rather than multiple top-level updates. (However,
// even in the new model, we'll still need to sometimes update the
// root multiple times per navigation, like if the server sends us
// a different response than we expected. For now, we revert back
// to the lazy fetching mechanism in that case.)
const dynamicRequest = (0, _fetchserverresponse.fetchServerResponse)(url, {
flightRouterState: dynamicRequestTree,
nextUrl: state.nextUrl
});
(0, _pprnavigations.listenForDynamicRequest)(task, dynamicRequest);
// We store the dynamic request on the `lazyData` property of the CacheNode
// because we're not going to await the dynamic request here. Since we're not blocking
// on the dynamic request, `layout-router` will
// task.node.lazyData = dynamicRequest
} else {
// The prefetched tree does not contain dynamic holes — it's
// fully static. We can skip the dynamic request.
}
} else {
// Nothing changed, so reuse the old cache.
// TODO: What if the head changed but not any of the segment data?
// Is that possible? If so, we should clone the whole tree and
// update the head.
newTree = treePatch;
}
} else {
// The static response does not include any dynamic holes, so
// there's no need to do a second request.
// TODO: As an incremental step this just reverts back to the
// non-PPR implementation. We can simplify this branch further,
// given that PPR prefetches are always static and return the whole
// tree. Or in the meantime we could factor it out into a
// separate function.
if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {
return handleExternalUrl(state, mutable, href, pendingPush);
}
const cache = (0, _approuter.createEmptyCacheNode)();
let applied = false;
if (prefetchValues.status === _routerreducertypes.PrefetchCacheEntryStatus.stale && !isFirstRead) {
// When we have a stale prefetch entry, we only want to re-use the loading state of the route we're navigating to, to support instant loading navigations
// this will trigger a lazy fetch for the actual page data by nulling the `rsc` and `prefetchRsc` values for page data,
// while copying over the `loading` for the segment that contains the page data.
// We only do this on subsequent reads, as otherwise there'd be no loading data to re-use.
// We skip this branch if only the hash fragment has changed, as we don't want to trigger a lazy fetch in that case
applied = triggerLazyFetchForLeafSegments(cache, currentCache, flightSegmentPath, treePatch);
// since we re-used the stale cache's loading state & refreshed the data,
// update the `lastUsedTime` so that it can continue to be re-used for the next 30s
prefetchValues.lastUsedTime = navigatedAt;
} else {
applied = (0, _applyflightdata.applyFlightData)(navigatedAt, currentCache, cache, normalizedFlightData, prefetchValues);
}
const hardNavigate = (0, _shouldhardnavigate.shouldHardNavigate)(flightSegmentPathWithLeadingEmpty, currentTree);
if (hardNavigate) {
// Copy rsc for the root node of the cache.
cache.rsc = currentCache.rsc;
cache.prefetchRsc = currentCache.prefetchRsc;
(0, _invalidatecachebelowflightsegmentpath.invalidateCacheBelowFlightSegmentPath)(cache, currentCache, flightSegmentPath);
// Ensure the existing cache value is used when the cache was not invalidated.
mutable.cache = cache;
} else if (applied) {
mutable.cache = cache;
// If we applied the cache, we update the "current cache" value so any other
// segments in the FlightDataPath will be able to reference the updated cache.
currentCache = cache;
}
for (const subSegment of generateSegmentsFromPatch(treePatch)){
const scrollableSegmentPath = [
...flightSegmentPath,
...subSegment
];
// Filter out the __DEFAULT__ paths as they shouldn't be scrolled to in this case.
if (scrollableSegmentPath[scrollableSegmentPath.length - 1] !== _segment.DEFAULT_SEGMENT_KEY) {
scrollableSegments.push(scrollableSegmentPath);
}
}
}
currentTree = newTree;
}
}
mutable.patchedTree = currentTree;
mutable.canonicalUrl = updatedCanonicalUrl;
mutable.scrollableSegments = scrollableSegments;
mutable.hashFragment = hash;
mutable.shouldScroll = shouldScroll;
return (0, _handlemutable.handleMutable)(state, mutable);
}, ()=>state);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=navigate-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "serverPatchReducer", {
enumerable: true,
get: function() {
return serverPatchReducer;
}
});
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _applyrouterstatepatchtotree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)");
const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)");
const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)");
const _applyflightdata = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js [app-client] (ecmascript)");
const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
function serverPatchReducer(state, action) {
const { serverResponse: { flightData, canonicalUrl: canonicalUrlOverride }, navigatedAt } = action;
const mutable = {};
mutable.preserveCustomHistoryState = false;
// Handle case when navigating to page in `pages` from `app`
if (typeof flightData === 'string') {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);
}
let currentTree = state.tree;
let currentCache = state.cache;
for (const normalizedFlightData of flightData){
const { segmentPath: flightSegmentPath, tree: treePatch } = normalizedFlightData;
const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([
'',
...flightSegmentPath
], currentTree, treePatch, state.canonicalUrl);
// `applyRouterStatePatchToTree` returns `null` when it determined that the server response is not applicable to the current tree.
// In other words, the server responded with a tree that doesn't match what the client is currently rendering.
// This can happen if the server patch action took longer to resolve than a subsequent navigation which would have changed the tree.
// Previously this case triggered an MPA navigation but it should be safe to simply discard the server response rather than forcing
// the entire page to reload.
if (newTree === null) {
return state;
}
if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, state.canonicalUrl, state.pushRef.pendingPush);
}
const canonicalUrlOverrideHref = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : undefined;
if (canonicalUrlOverrideHref) {
mutable.canonicalUrl = canonicalUrlOverrideHref;
}
const cache = (0, _approuter.createEmptyCacheNode)();
(0, _applyflightdata.applyFlightData)(navigatedAt, currentCache, cache, normalizedFlightData);
mutable.patchedTree = newTree;
mutable.cache = cache;
currentCache = cache;
currentTree = newTree;
}
return (0, _handlemutable.handleMutable)(state, mutable);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=server-patch-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "restoreReducer", {
enumerable: true,
get: function() {
return restoreReducer;
}
});
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _computechangedpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-client] (ecmascript)");
const _pprnavigations = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js [app-client] (ecmascript)");
function restoreReducer(state, action) {
const { url, tree } = action;
const href = (0, _createhreffromurl.createHrefFromUrl)(url);
// This action is used to restore the router state from the history state.
// However, it's possible that the history state no longer contains the `FlightRouterState`.
// We will copy over the internal state on pushState/replaceState events, but if a history entry
// occurred before hydration, or if the user navigated to a hash using a regular anchor link,
// the history state will not contain the `FlightRouterState`.
// In this case, we'll continue to use the existing tree so the router doesn't get into an invalid state.
const treeToRestore = tree || state.tree;
const oldCache = state.cache;
const newCache = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : oldCache;
var _extractPathFromFlightRouterState;
return {
// Set canonical url
canonicalUrl: href,
pushRef: {
pendingPush: false,
mpaNavigation: false,
// Ensures that the custom history state that was set is preserved when applying this update.
preserveCustomHistoryState: true
},
focusAndScrollRef: state.focusAndScrollRef,
cache: newCache,
prefetchCache: state.prefetchCache,
// Restore provided tree
tree: treeToRestore,
nextUrl: (_extractPathFromFlightRouterState = (0, _computechangedpath.extractPathFromFlightRouterState)(treeToRestore)) != null ? _extractPathFromFlightRouterState : url.pathname
};
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=restore-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "handleSegmentMismatch", {
enumerable: true,
get: function() {
return handleSegmentMismatch;
}
});
const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)");
function handleSegmentMismatch(state, action, treePatch) {
if ("TURBOPACK compile-time truthy", 1) {
console.warn('Performing hard navigation because your application experienced an unrecoverable error. If this keeps occurring, please file a Next.js issue.\n\n' + 'Reason: Segment mismatch\n' + ("Last Action: " + action.type + "\n\n") + ("Current Tree: " + JSON.stringify(state.tree) + "\n\n") + ("Tree Patch Payload: " + JSON.stringify(treePatch)));
}
return (0, _navigatereducer.handleExternalUrl)(state, {}, state.canonicalUrl, true);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=handle-segment-mismatch.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hasInterceptionRouteInCurrentTree", {
enumerable: true,
get: function() {
return hasInterceptionRouteInCurrentTree;
}
});
const _interceptionroutes = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/interception-routes.js [app-client] (ecmascript)");
function hasInterceptionRouteInCurrentTree(param) {
let [segment, parallelRoutes] = param;
// If we have a dynamic segment, it's marked as an interception route by the presence of the `i` suffix.
if (Array.isArray(segment) && (segment[2] === 'di' || segment[2] === 'ci')) {
return true;
}
// If segment is not an array, apply the existing string-based check
if (typeof segment === 'string' && (0, _interceptionroutes.isInterceptionRouteAppPath)(segment)) {
return true;
}
// Iterate through parallelRoutes if they exist
if (parallelRoutes) {
for(const key in parallelRoutes){
if (hasInterceptionRouteInCurrentTree(parallelRoutes[key])) {
return true;
}
}
}
return false;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=has-interception-route-in-current-tree.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "refreshReducer", {
enumerable: true,
get: function() {
return refreshReducer;
}
});
const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _applyrouterstatepatchtotree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)");
const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)");
const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)");
const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)");
const _filllazyitemstillleafwithhead = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _handlesegmentmismatch = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js [app-client] (ecmascript)");
const _hasinterceptionrouteincurrenttree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js [app-client] (ecmascript)");
const _refetchinactiveparallelsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js [app-client] (ecmascript)");
const _segmentcache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache.js [app-client] (ecmascript)");
function refreshReducer(state, action) {
const { origin } = action;
const mutable = {};
const href = state.canonicalUrl;
let currentTree = state.tree;
mutable.preserveCustomHistoryState = false;
const cache = (0, _approuter.createEmptyCacheNode)();
// If the current tree was intercepted, the nextUrl should be included in the request.
// This is to ensure that the refresh request doesn't get intercepted, accidentally triggering the interception route.
const includeNextUrl = (0, _hasinterceptionrouteincurrenttree.hasInterceptionRouteInCurrentTree)(state.tree);
// TODO-APP: verify that `href` is not an external url.
// Fetch data from the root of the tree.
cache.lazyData = (0, _fetchserverresponse.fetchServerResponse)(new URL(href, origin), {
flightRouterState: [
currentTree[0],
currentTree[1],
currentTree[2],
'refetch'
],
nextUrl: includeNextUrl ? state.nextUrl : null
});
const navigatedAt = Date.now();
return cache.lazyData.then(async (param)=>{
let { flightData, canonicalUrl: canonicalUrlOverride } = param;
// Handle case when navigating to page in `pages` from `app`
if (typeof flightData === 'string') {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);
}
// Remove cache.lazyData as it has been resolved at this point.
cache.lazyData = null;
for (const normalizedFlightData of flightData){
const { tree: treePatch, seedData: cacheNodeSeedData, head, isRootRender } = normalizedFlightData;
if (!isRootRender) {
// TODO-APP: handle this case better
console.log('REFRESH FAILED');
return state;
}
const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([
''
], currentTree, treePatch, state.canonicalUrl);
if (newTree === null) {
return (0, _handlesegmentmismatch.handleSegmentMismatch)(state, action, treePatch);
}
if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, href, state.pushRef.pendingPush);
}
const canonicalUrlOverrideHref = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : undefined;
if (canonicalUrlOverride) {
mutable.canonicalUrl = canonicalUrlOverrideHref;
}
// Handles case where prefetch only returns the router tree patch without rendered components.
if (cacheNodeSeedData !== null) {
const rsc = cacheNodeSeedData[1];
const loading = cacheNodeSeedData[3];
cache.rsc = rsc;
cache.prefetchRsc = null;
cache.loading = loading;
(0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(navigatedAt, cache, undefined, treePatch, cacheNodeSeedData, head, undefined);
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
} else {
mutable.prefetchCache = new Map();
}
}
await (0, _refetchinactiveparallelsegments.refreshInactiveParallelSegments)({
navigatedAt,
state,
updatedTree: newTree,
updatedCache: cache,
includeNextUrl,
canonicalUrl: mutable.canonicalUrl || state.canonicalUrl
});
mutable.cache = cache;
mutable.patchedTree = newTree;
currentTree = newTree;
}
return (0, _handlemutable.handleMutable)(state, mutable);
}, ()=>state);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=refresh-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hmrRefreshReducer", {
enumerable: true,
get: function() {
return hmrRefreshReducer;
}
});
const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _applyrouterstatepatchtotree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)");
const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)");
const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)");
const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)");
const _applyflightdata = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _handlesegmentmismatch = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js [app-client] (ecmascript)");
const _hasinterceptionrouteincurrenttree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js [app-client] (ecmascript)");
// A version of refresh reducer that keeps the cache around instead of wiping all of it.
function hmrRefreshReducerImpl(state, action) {
const { origin } = action;
const mutable = {};
const href = state.canonicalUrl;
mutable.preserveCustomHistoryState = false;
const cache = (0, _approuter.createEmptyCacheNode)();
// If the current tree was intercepted, the nextUrl should be included in the request.
// This is to ensure that the refresh request doesn't get intercepted, accidentally triggering the interception route.
const includeNextUrl = (0, _hasinterceptionrouteincurrenttree.hasInterceptionRouteInCurrentTree)(state.tree);
// TODO-APP: verify that `href` is not an external url.
// Fetch data from the root of the tree.
const navigatedAt = Date.now();
cache.lazyData = (0, _fetchserverresponse.fetchServerResponse)(new URL(href, origin), {
flightRouterState: [
state.tree[0],
state.tree[1],
state.tree[2],
'refetch'
],
nextUrl: includeNextUrl ? state.nextUrl : null,
isHmrRefresh: true
});
return cache.lazyData.then((param)=>{
let { flightData, canonicalUrl: canonicalUrlOverride } = param;
// Handle case when navigating to page in `pages` from `app`
if (typeof flightData === 'string') {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);
}
// Remove cache.lazyData as it has been resolved at this point.
cache.lazyData = null;
let currentTree = state.tree;
let currentCache = state.cache;
for (const normalizedFlightData of flightData){
const { tree: treePatch, isRootRender } = normalizedFlightData;
if (!isRootRender) {
// TODO-APP: handle this case better
console.log('REFRESH FAILED');
return state;
}
const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([
''
], currentTree, treePatch, state.canonicalUrl);
if (newTree === null) {
return (0, _handlesegmentmismatch.handleSegmentMismatch)(state, action, treePatch);
}
if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, href, state.pushRef.pendingPush);
}
const canonicalUrlOverrideHref = canonicalUrlOverride ? (0, _createhreffromurl.createHrefFromUrl)(canonicalUrlOverride) : undefined;
if (canonicalUrlOverride) {
mutable.canonicalUrl = canonicalUrlOverrideHref;
}
const applied = (0, _applyflightdata.applyFlightData)(navigatedAt, currentCache, cache, normalizedFlightData);
if (applied) {
mutable.cache = cache;
currentCache = cache;
}
mutable.patchedTree = newTree;
mutable.canonicalUrl = href;
currentTree = newTree;
}
return (0, _handlemutable.handleMutable)(state, mutable);
}, ()=>state);
}
function hmrRefreshReducerNoop(state, _action) {
return state;
}
const hmrRefreshReducer = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : hmrRefreshReducerImpl;
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=hmr-refresh-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/assign-location.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "assignLocation", {
enumerable: true,
get: function() {
return assignLocation;
}
});
const _addbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-base-path.js [app-client] (ecmascript)");
function assignLocation(location, url) {
if (location.startsWith('.')) {
const urlBase = url.origin + url.pathname;
return new URL(// new URL('./relative', 'https://example.com/subdir').href -> 'https://example.com/relative'
// new URL('./relative', 'https://example.com/subdir/').href -> 'https://example.com/subdir/relative'
(urlBase.endsWith('/') ? urlBase : urlBase + '/') + location);
}
return new URL((0, _addbasepath.addBasePath)(location), url.href);
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=assign-location.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "serverActionReducer", {
enumerable: true,
get: function() {
return serverActionReducer;
}
});
const _appcallserver = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-call-server.js [app-client] (ecmascript)");
const _appfindsourcemapurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-find-source-map-url.js [app-client] (ecmascript)");
const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _assignlocation = __turbopack_context__.r("[project]/node_modules/next/dist/client/assign-location.js [app-client] (ecmascript)");
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)");
const _applyrouterstatepatchtotree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js [app-client] (ecmascript)");
const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-client] (ecmascript)");
const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-client] (ecmascript)");
const _filllazyitemstillleafwithhead = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _hasinterceptionrouteincurrenttree = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js [app-client] (ecmascript)");
const _handlesegmentmismatch = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js [app-client] (ecmascript)");
const _refetchinactiveparallelsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js [app-client] (ecmascript)");
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
const _redirect = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect.js [app-client] (ecmascript)");
const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-client] (ecmascript)");
const _prefetchcacheutils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js [app-client] (ecmascript)");
const _removebasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/remove-base-path.js [app-client] (ecmascript)");
const _hasbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/has-base-path.js [app-client] (ecmascript)");
const _serverreferenceinfo = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/server-reference-info.js [app-client] (ecmascript)");
const _segmentcache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache.js [app-client] (ecmascript)");
// // eslint-disable-next-line import/no-extraneous-dependencies
// import { createFromFetch } from 'react-server-dom-webpack/client'
// // eslint-disable-next-line import/no-extraneous-dependencies
// import { encodeReply } from 'react-server-dom-webpack/client'
const { createFromFetch, createTemporaryReferenceSet, encodeReply } = ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react-server-dom-turbopack/client.js [app-client] (ecmascript)");
async function fetchServerAction(state, nextUrl, param) {
let { actionId, actionArgs } = param;
const temporaryReferences = createTemporaryReferenceSet();
const info = (0, _serverreferenceinfo.extractInfoFromServerReferenceId)(actionId);
// TODO: Currently, we're only omitting unused args for the experimental "use
// cache" functions. Once the server reference info byte feature is stable, we
// should apply this to server actions as well.
const usedArgs = info.type === 'use-cache' ? (0, _serverreferenceinfo.omitUnusedArgs)(actionArgs, info) : actionArgs;
const body = await encodeReply(usedArgs, {
temporaryReferences
});
const res = await fetch('', {
method: 'POST',
headers: {
Accept: _approuterheaders.RSC_CONTENT_TYPE_HEADER,
[_approuterheaders.ACTION_HEADER]: actionId,
[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER]: encodeURIComponent(JSON.stringify(state.tree)),
...("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : {},
...nextUrl ? {
[_approuterheaders.NEXT_URL]: nextUrl
} : {}
},
body
});
const redirectHeader = res.headers.get('x-action-redirect');
const [location, _redirectType] = (redirectHeader == null ? void 0 : redirectHeader.split(';')) || [];
let redirectType;
switch(_redirectType){
case 'push':
redirectType = _redirecterror.RedirectType.push;
break;
case 'replace':
redirectType = _redirecterror.RedirectType.replace;
break;
default:
redirectType = undefined;
}
const isPrerender = !!res.headers.get(_approuterheaders.NEXT_IS_PRERENDER_HEADER);
let revalidatedParts;
try {
const revalidatedHeader = JSON.parse(res.headers.get('x-action-revalidated') || '[[],0,0]');
revalidatedParts = {
paths: revalidatedHeader[0] || [],
tag: !!revalidatedHeader[1],
cookie: revalidatedHeader[2]
};
} catch (e) {
revalidatedParts = {
paths: [],
tag: false,
cookie: false
};
}
const redirectLocation = location ? (0, _assignlocation.assignLocation)(location, new URL(state.canonicalUrl, window.location.href)) : undefined;
const contentType = res.headers.get('content-type');
if (contentType == null ? void 0 : contentType.startsWith(_approuterheaders.RSC_CONTENT_TYPE_HEADER)) {
const response = await createFromFetch(Promise.resolve(res), {
callServer: _appcallserver.callServer,
findSourceMapURL: _appfindsourcemapurl.findSourceMapURL,
temporaryReferences
});
if (location) {
// if it was a redirection, then result is just a regular RSC payload
return {
actionFlightData: (0, _flightdatahelpers.normalizeFlightData)(response.f),
redirectLocation,
redirectType,
revalidatedParts,
isPrerender
};
}
return {
actionResult: response.a,
actionFlightData: (0, _flightdatahelpers.normalizeFlightData)(response.f),
redirectLocation,
redirectType,
revalidatedParts,
isPrerender
};
}
// Handle invalid server action responses
if (res.status >= 400) {
// The server can respond with a text/plain error message, but we'll fallback to something generic
// if there isn't one.
const error = contentType === 'text/plain' ? await res.text() : 'An unexpected response was received from the server.';
throw Object.defineProperty(new Error(error), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
return {
redirectLocation,
redirectType,
revalidatedParts,
isPrerender
};
}
function serverActionReducer(state, action) {
const { resolve, reject } = action;
const mutable = {};
let currentTree = state.tree;
mutable.preserveCustomHistoryState = false;
// only pass along the `nextUrl` param (used for interception routes) if the current route was intercepted.
// If the route has been intercepted, the action should be as well.
// Otherwise the server action might be intercepted with the wrong action id
// (ie, one that corresponds with the intercepted route)
const nextUrl = state.nextUrl && (0, _hasinterceptionrouteincurrenttree.hasInterceptionRouteInCurrentTree)(state.tree) ? state.nextUrl : null;
const navigatedAt = Date.now();
return fetchServerAction(state, nextUrl, action).then(async (param)=>{
let { actionResult, actionFlightData: flightData, redirectLocation, redirectType, isPrerender, revalidatedParts } = param;
let redirectHref;
// honor the redirect type instead of defaulting to push in case of server actions.
if (redirectLocation) {
if (redirectType === _redirecterror.RedirectType.replace) {
state.pushRef.pendingPush = false;
mutable.pendingPush = false;
} else {
state.pushRef.pendingPush = true;
mutable.pendingPush = true;
}
redirectHref = (0, _createhreffromurl.createHrefFromUrl)(redirectLocation, false);
mutable.canonicalUrl = redirectHref;
}
if (!flightData) {
resolve(actionResult);
// If there is a redirect but no flight data we need to do a mpaNavigation.
if (redirectLocation) {
return (0, _navigatereducer.handleExternalUrl)(state, mutable, redirectLocation.href, state.pushRef.pendingPush);
}
return state;
}
if (typeof flightData === 'string') {
// Handle case when navigating to page in `pages` from `app`
resolve(actionResult);
return (0, _navigatereducer.handleExternalUrl)(state, mutable, flightData, state.pushRef.pendingPush);
}
const actionRevalidated = revalidatedParts.paths.length > 0 || revalidatedParts.tag || revalidatedParts.cookie;
for (const normalizedFlightData of flightData){
const { tree: treePatch, seedData: cacheNodeSeedData, head, isRootRender } = normalizedFlightData;
if (!isRootRender) {
// TODO-APP: handle this case better
console.log('SERVER ACTION APPLY FAILED');
resolve(actionResult);
return state;
}
// Given the path can only have two items the items are only the router state and rsc for the root.
const newTree = (0, _applyrouterstatepatchtotree.applyRouterStatePatchToTree)([
''
], currentTree, treePatch, redirectHref ? redirectHref : state.canonicalUrl);
if (newTree === null) {
resolve(actionResult);
return (0, _handlesegmentmismatch.handleSegmentMismatch)(state, action, treePatch);
}
if ((0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(currentTree, newTree)) {
resolve(actionResult);
return (0, _navigatereducer.handleExternalUrl)(state, mutable, redirectHref || state.canonicalUrl, state.pushRef.pendingPush);
}
// The server sent back RSC data for the server action, so we need to apply it to the cache.
if (cacheNodeSeedData !== null) {
const rsc = cacheNodeSeedData[1];
const cache = (0, _approuter.createEmptyCacheNode)();
cache.rsc = rsc;
cache.prefetchRsc = null;
cache.loading = cacheNodeSeedData[3];
(0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(navigatedAt, cache, undefined, treePatch, cacheNodeSeedData, head, undefined);
mutable.cache = cache;
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
} else {
mutable.prefetchCache = new Map();
}
if (actionRevalidated) {
await (0, _refetchinactiveparallelsegments.refreshInactiveParallelSegments)({
navigatedAt,
state,
updatedTree: newTree,
updatedCache: cache,
includeNextUrl: Boolean(nextUrl),
canonicalUrl: mutable.canonicalUrl || state.canonicalUrl
});
}
}
mutable.patchedTree = newTree;
currentTree = newTree;
}
if (redirectLocation && redirectHref) {
if (!("TURBOPACK compile-time value", false) && !actionRevalidated) {
// Because the RedirectBoundary will trigger a navigation, we need to seed the prefetch cache
// with the FlightData that we got from the server action for the target page, so that it's
// available when the page is navigated to and doesn't need to be re-fetched.
// We only do this if the server action didn't revalidate any data, as in that case the
// client cache will be cleared and the data will be re-fetched anyway.
// NOTE: We don't do this in the Segment Cache implementation.
// Dynamic data should never be placed into the cache, unless it's
// "converted" to static data using . What we
// do instead is re-prefetch links and forms whenever the cache is
// invalidated.
(0, _prefetchcacheutils.createSeededPrefetchCacheEntry)({
url: redirectLocation,
data: {
flightData,
canonicalUrl: undefined,
couldBeIntercepted: false,
prerendered: false,
postponed: false,
// TODO: We should be able to set this if the server action
// returned a fully static response.
staleTime: -1
},
tree: state.tree,
prefetchCache: state.prefetchCache,
nextUrl: state.nextUrl,
kind: isPrerender ? _routerreducertypes.PrefetchKind.FULL : _routerreducertypes.PrefetchKind.AUTO
});
mutable.prefetchCache = state.prefetchCache;
}
// If the action triggered a redirect, the action promise will be rejected with
// a redirect so that it's handled by RedirectBoundary as we won't have a valid
// action result to resolve the promise with. This will effectively reset the state of
// the component that called the action as the error boundary will remount the tree.
// The status code doesn't matter here as the action handler will have already sent
// a response with the correct status code.
reject((0, _redirect.getRedirectError)((0, _hasbasepath.hasBasePath)(redirectHref) ? (0, _removebasepath.removeBasePath)(redirectHref) : redirectHref, redirectType || _redirecterror.RedirectType.push));
} else {
resolve(actionResult);
}
return (0, _handlemutable.handleMutable)(state, mutable);
}, (e)=>{
// When the server action is rejected we don't update the state and instead call the reject handler of the promise.
reject(e);
return state;
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=server-action-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/router-reducer.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "reducer", {
enumerable: true,
get: function() {
return reducer;
}
});
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-client] (ecmascript)");
const _serverpatchreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js [app-client] (ecmascript)");
const _restorereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js [app-client] (ecmascript)");
const _refreshreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js [app-client] (ecmascript)");
const _prefetchreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js [app-client] (ecmascript)");
const _hmrrefreshreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js [app-client] (ecmascript)");
const _serveractionreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js [app-client] (ecmascript)");
/**
* Reducer that handles the app-router state updates.
*/ function clientReducer(state, action) {
switch(action.type){
case _routerreducertypes.ACTION_NAVIGATE:
{
return (0, _navigatereducer.navigateReducer)(state, action);
}
case _routerreducertypes.ACTION_SERVER_PATCH:
{
return (0, _serverpatchreducer.serverPatchReducer)(state, action);
}
case _routerreducertypes.ACTION_RESTORE:
{
return (0, _restorereducer.restoreReducer)(state, action);
}
case _routerreducertypes.ACTION_REFRESH:
{
return (0, _refreshreducer.refreshReducer)(state, action);
}
case _routerreducertypes.ACTION_HMR_REFRESH:
{
return (0, _hmrrefreshreducer.hmrRefreshReducer)(state, action);
}
case _routerreducertypes.ACTION_PREFETCH:
{
return (0, _prefetchreducer.prefetchReducer)(state, action);
}
case _routerreducertypes.ACTION_SERVER_ACTION:
{
return (0, _serveractionreducer.serverActionReducer)(state, action);
}
// This case should never be hit as dispatch is strongly typed.
default:
throw Object.defineProperty(new Error('Unknown action'), "__NEXT_ERROR_CODE", {
value: "E295",
enumerable: false,
configurable: true
});
}
}
function serverReducer(state, _action) {
return state;
}
const reducer = typeof window === 'undefined' ? serverReducer : clientReducer;
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=router-reducer.js.map
}}),
"[project]/node_modules/next/dist/client/components/app-router-instance.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
createMutableActionQueue: null,
dispatchNavigateAction: null,
dispatchTraverseAction: null,
getCurrentAppRouterState: null,
publicAppRouterInstance: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
createMutableActionQueue: function() {
return createMutableActionQueue;
},
dispatchNavigateAction: function() {
return dispatchNavigateAction;
},
dispatchTraverseAction: function() {
return dispatchTraverseAction;
},
getCurrentAppRouterState: function() {
return getCurrentAppRouterState;
},
publicAppRouterInstance: function() {
return publicAppRouterInstance;
}
});
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _routerreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer.js [app-client] (ecmascript)");
const _react = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
const _isthenable = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/is-thenable.js [app-client] (ecmascript)");
const _segmentcache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache.js [app-client] (ecmascript)");
const _useactionqueue = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/use-action-queue.js [app-client] (ecmascript)");
const _addbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-base-path.js [app-client] (ecmascript)");
const _approuter = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)");
const _prefetchreducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js [app-client] (ecmascript)");
const _links = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/links.js [app-client] (ecmascript)");
function runRemainingActions(actionQueue, setState) {
if (actionQueue.pending !== null) {
actionQueue.pending = actionQueue.pending.next;
if (actionQueue.pending !== null) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
runAction({
actionQueue,
action: actionQueue.pending,
setState
});
} else {
// No more actions are pending, check if a refresh is needed
if (actionQueue.needsRefresh) {
actionQueue.needsRefresh = false;
actionQueue.dispatch({
type: _routerreducertypes.ACTION_REFRESH,
origin: window.location.origin
}, setState);
}
}
}
}
async function runAction(param) {
let { actionQueue, action, setState } = param;
const prevState = actionQueue.state;
actionQueue.pending = action;
const payload = action.payload;
const actionResult = actionQueue.action(prevState, payload);
function handleResult(nextState) {
// if we discarded this action, the state should also be discarded
if (action.discarded) {
return;
}
actionQueue.state = nextState;
runRemainingActions(actionQueue, setState);
action.resolve(nextState);
}
// if the action is a promise, set up a callback to resolve it
if ((0, _isthenable.isThenable)(actionResult)) {
actionResult.then(handleResult, (err)=>{
runRemainingActions(actionQueue, setState);
action.reject(err);
});
} else {
handleResult(actionResult);
}
}
function dispatchAction(actionQueue, payload, setState) {
let resolvers = {
resolve: setState,
reject: ()=>{}
};
// most of the action types are async with the exception of restore
// it's important that restore is handled quickly since it's fired on the popstate event
// and we don't want to add any delay on a back/forward nav
// this only creates a promise for the async actions
if (payload.type !== _routerreducertypes.ACTION_RESTORE) {
// Create the promise and assign the resolvers to the object.
const deferredPromise = new Promise((resolve, reject)=>{
resolvers = {
resolve,
reject
};
});
(0, _react.startTransition)(()=>{
// we immediately notify React of the pending promise -- the resolver is attached to the action node
// and will be called when the associated action promise resolves
setState(deferredPromise);
});
}
const newAction = {
payload,
next: null,
resolve: resolvers.resolve,
reject: resolvers.reject
};
// Check if the queue is empty
if (actionQueue.pending === null) {
// The queue is empty, so add the action and start it immediately
// Mark this action as the last in the queue
actionQueue.last = newAction;
runAction({
actionQueue,
action: newAction,
setState
});
} else if (payload.type === _routerreducertypes.ACTION_NAVIGATE || payload.type === _routerreducertypes.ACTION_RESTORE) {
// Navigations (including back/forward) take priority over any pending actions.
// Mark the pending action as discarded (so the state is never applied) and start the navigation action immediately.
actionQueue.pending.discarded = true;
// The rest of the current queue should still execute after this navigation.
// (Note that it can't contain any earlier navigations, because we always put those into `actionQueue.pending` by calling `runAction`)
newAction.next = actionQueue.pending.next;
// if the pending action was a server action, mark the queue as needing a refresh once events are processed
if (actionQueue.pending.payload.type === _routerreducertypes.ACTION_SERVER_ACTION) {
actionQueue.needsRefresh = true;
}
runAction({
actionQueue,
action: newAction,
setState
});
} else {
// The queue is not empty, so add the action to the end of the queue
// It will be started by runRemainingActions after the previous action finishes
if (actionQueue.last !== null) {
actionQueue.last.next = newAction;
}
actionQueue.last = newAction;
}
}
let globalActionQueue = null;
function createMutableActionQueue(initialState, instrumentationHooks) {
const actionQueue = {
state: initialState,
dispatch: (payload, setState)=>dispatchAction(actionQueue, payload, setState),
action: async (state, action)=>{
const result = (0, _routerreducer.reducer)(state, action);
return result;
},
pending: null,
last: null,
onRouterTransitionStart: instrumentationHooks !== null && typeof instrumentationHooks.onRouterTransitionStart === 'function' ? instrumentationHooks.onRouterTransitionStart : null
};
if (typeof window !== 'undefined') {
// The action queue is lazily created on hydration, but after that point
// it doesn't change. So we can store it in a global rather than pass
// it around everywhere via props/context.
if (globalActionQueue !== null) {
throw Object.defineProperty(new Error('Internal Next.js Error: createMutableActionQueue was called more ' + 'than once'), "__NEXT_ERROR_CODE", {
value: "E624",
enumerable: false,
configurable: true
});
}
globalActionQueue = actionQueue;
}
return actionQueue;
}
function getCurrentAppRouterState() {
return globalActionQueue !== null ? globalActionQueue.state : null;
}
function getAppRouterActionQueue() {
if (globalActionQueue === null) {
throw Object.defineProperty(new Error('Internal Next.js error: Router action dispatched before initialization.'), "__NEXT_ERROR_CODE", {
value: "E668",
enumerable: false,
configurable: true
});
}
return globalActionQueue;
}
function getProfilingHookForOnNavigationStart() {
if (globalActionQueue !== null) {
return globalActionQueue.onRouterTransitionStart;
}
return null;
}
function dispatchNavigateAction(href, navigateType, shouldScroll, linkInstanceRef) {
// TODO: This stuff could just go into the reducer. Leaving as-is for now
// since we're about to rewrite all the router reducer stuff anyway.
const url = new URL((0, _addbasepath.addBasePath)(href), location.href);
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
(0, _links.setLinkForCurrentNavigation)(linkInstanceRef);
const onRouterTransitionStart = getProfilingHookForOnNavigationStart();
if (onRouterTransitionStart !== null) {
onRouterTransitionStart(href, navigateType);
}
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_NAVIGATE,
url,
isExternalUrl: (0, _approuter.isExternalURL)(url),
locationSearch: location.search,
shouldScroll,
navigateType,
allowAliasing: true
});
}
function dispatchTraverseAction(href, tree) {
const onRouterTransitionStart = getProfilingHookForOnNavigationStart();
if (onRouterTransitionStart !== null) {
onRouterTransitionStart(href, 'traverse');
}
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_RESTORE,
url: new URL(href),
tree
});
}
const publicAppRouterInstance = {
back: ()=>window.history.back(),
forward: ()=>window.history.forward(),
prefetch: ("TURBOPACK compile-time falsy", 0) ? ("TURBOPACK unreachable", undefined) : (href, options)=>{
// Use the old prefetch implementation.
const actionQueue = getAppRouterActionQueue();
const url = (0, _approuter.createPrefetchURL)(href);
if (url !== null) {
var _options_kind;
// The prefetch reducer doesn't actually update any state or
// trigger a rerender. It just writes to a mutable cache. So we
// shouldn't bother calling setState/dispatch; we can just re-run
// the reducer directly using the current state.
// TODO: Refactor this away from a "reducer" so it's
// less confusing.
(0, _prefetchreducer.prefetchReducer)(actionQueue.state, {
type: _routerreducertypes.ACTION_PREFETCH,
url,
kind: (_options_kind = options == null ? void 0 : options.kind) != null ? _options_kind : _routerreducertypes.PrefetchKind.FULL
});
}
},
replace: (href, options)=>{
(0, _react.startTransition)(()=>{
var _options_scroll;
dispatchNavigateAction(href, 'replace', (_options_scroll = options == null ? void 0 : options.scroll) != null ? _options_scroll : true, null);
});
},
push: (href, options)=>{
(0, _react.startTransition)(()=>{
var _options_scroll;
dispatchNavigateAction(href, 'push', (_options_scroll = options == null ? void 0 : options.scroll) != null ? _options_scroll : true, null);
});
},
refresh: ()=>{
(0, _react.startTransition)(()=>{
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_REFRESH,
origin: window.location.origin
});
});
},
hmrRefresh: ()=>{
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
} else {
(0, _react.startTransition)(()=>{
(0, _useactionqueue.dispatchAppRouterAction)({
type: _routerreducertypes.ACTION_HMR_REFRESH,
origin: window.location.origin
});
});
}
}
};
// Exists for debugging purposes. Don't use in application code.
if (typeof window !== 'undefined' && window.next) {
window.next.router = publicAppRouterInstance;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-router-instance.js.map
}}),
"[project]/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createInitialRouterState", {
enumerable: true,
get: function() {
return createInitialRouterState;
}
});
const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-client] (ecmascript)");
const _filllazyitemstillleafwithhead = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js [app-client] (ecmascript)");
const _computechangedpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-client] (ecmascript)");
const _prefetchcacheutils = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js [app-client] (ecmascript)");
const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-client] (ecmascript)");
const _refetchinactiveparallelsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js [app-client] (ecmascript)");
const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-client] (ecmascript)");
function createInitialRouterState(param) {
let { navigatedAt, initialFlightData, initialCanonicalUrlParts, initialParallelRoutes, location, couldBeIntercepted, postponed, prerendered } = param;
// When initialized on the server, the canonical URL is provided as an array of parts.
// This is to ensure that when the RSC payload streamed to the client, crawlers don't interpret it
// as a URL that should be crawled.
const initialCanonicalUrl = initialCanonicalUrlParts.join('/');
const normalizedFlightData = (0, _flightdatahelpers.getFlightDataPartsFromPath)(initialFlightData[0]);
const { tree: initialTree, seedData: initialSeedData, head: initialHead } = normalizedFlightData;
// For the SSR render, seed data should always be available (we only send back a `null` response
// in the case of a `loading` segment, pre-PPR.)
const rsc = initialSeedData == null ? void 0 : initialSeedData[1];
var _initialSeedData_;
const loading = (_initialSeedData_ = initialSeedData == null ? void 0 : initialSeedData[3]) != null ? _initialSeedData_ : null;
const cache = {
lazyData: null,
rsc,
prefetchRsc: null,
head: null,
prefetchHead: null,
// The cache gets seeded during the first render. `initialParallelRoutes` ensures the cache from the first render is there during the second render.
parallelRoutes: initialParallelRoutes,
loading,
navigatedAt
};
const canonicalUrl = // This is safe to do as canonicalUrl can't be rendered, it's only used to control the history updates in the useEffect further down in this file.
location ? (0, _createhreffromurl.createHrefFromUrl)(location) : initialCanonicalUrl;
(0, _refetchinactiveparallelsegments.addRefreshMarkerToActiveParallelSegments)(initialTree, canonicalUrl);
const prefetchCache = new Map();
// When the cache hasn't been seeded yet we fill the cache with the head.
if (initialParallelRoutes === null || initialParallelRoutes.size === 0) {
(0, _filllazyitemstillleafwithhead.fillLazyItemsTillLeafWithHead)(navigatedAt, cache, undefined, initialTree, initialSeedData, initialHead, undefined);
}
var _ref;
const initialState = {
tree: initialTree,
cache,
prefetchCache,
pushRef: {
pendingPush: false,
mpaNavigation: false,
// First render needs to preserve the previous window.history.state
// to avoid it being overwritten on navigation back/forward with MPA Navigation.
preserveCustomHistoryState: true
},
focusAndScrollRef: {
apply: false,
onlyHashChange: false,
hashFragment: null,
segmentPaths: []
},
canonicalUrl,
nextUrl: (_ref = (0, _computechangedpath.extractPathFromFlightRouterState)(initialTree) || (location == null ? void 0 : location.pathname)) != null ? _ref : null
};
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return initialState;
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=create-initial-router-state.js.map
}}),
"[project]/node_modules/next/dist/client/components/react-dev-overlay/app/client-entry.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createRootLevelDevOverlayElement", {
enumerable: true,
get: function() {
return createRootLevelDevOverlayElement;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _getsocketurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/utils/get-socket-url.js [app-client] (ecmascript)");
const _hotreloadertypes = __turbopack_context__.r("[project]/node_modules/next/dist/server/dev/hot-reloader-types.js [app-client] (ecmascript)");
const _errorboundary = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/error-boundary.js [app-client] (ecmascript)"));
const _appdevoverlayerrorboundary = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/app/app-dev-overlay-error-boundary.js [app-client] (ecmascript)");
const noop = ()=>{};
function createRootLevelDevOverlayElement(reactEl) {
const socketUrl = (0, _getsocketurl.getSocketUrl)(("TURBOPACK compile-time value", "") || '');
const socket = new window.WebSocket("" + socketUrl + "/_next/webpack-hmr");
// add minimal "hot reload" support for RSC errors
const handler = (event)=>{
let obj;
try {
obj = JSON.parse(event.data);
} catch (e) {}
if (!obj || !('action' in obj)) {
return;
}
if (obj.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES) {
window.location.reload();
}
};
socket.addEventListener('message', handler);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_appdevoverlayerrorboundary.AppDevOverlayErrorBoundary, {
globalError: [
_errorboundary.default,
null
],
onError: noop,
children: reactEl
});
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=client-entry.js.map
}}),
"[project]/node_modules/next/dist/client/app-link-gc.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "linkGc", {
enumerable: true,
get: function() {
return linkGc;
}
});
function linkGc() {
// TODO-APP: Remove this logic when Float has GC built-in in development.
if ("TURBOPACK compile-time truthy", 1) {
const callback = (mutationList)=>{
for (const mutation of mutationList){
if (mutation.type === 'childList') {
for (const node of mutation.addedNodes){
if ('tagName' in node && node.tagName === 'LINK') {
var _link_dataset_precedence;
const link = node;
if ((_link_dataset_precedence = link.dataset.precedence) == null ? void 0 : _link_dataset_precedence.startsWith('next')) {
const href = link.getAttribute('href');
if (href) {
const [resource, version] = href.split('?v=', 2);
if (version) {
const currentOrigin = window.location.origin;
const allLinks = [
...document.querySelectorAll('link[href^="' + resource + '"]'),
// It's possible that the resource is a full URL or only pathname,
// so we need to remove the alternative href as well.
...document.querySelectorAll('link[href^="' + (resource.startsWith(currentOrigin) ? resource.slice(currentOrigin.length) : currentOrigin + resource) + '"]')
];
for (const otherLink of allLinks){
var _otherLink_dataset_precedence;
if ((_otherLink_dataset_precedence = otherLink.dataset.precedence) == null ? void 0 : _otherLink_dataset_precedence.startsWith('next')) {
const otherHref = otherLink.getAttribute('href');
if (otherHref) {
const [, otherVersion] = otherHref.split('?v=', 2);
if (!otherVersion || +otherVersion < +version) {
// Delay the removal of the stylesheet to avoid FOUC
// caused by `@font-face` rules, as they seem to be
// a couple of ticks delayed between the old and new
// styles being swapped even if the font is cached.
setTimeout(()=>{
otherLink.remove();
}, 5);
const preloadLink = document.querySelector('link[rel="preload"][as="style"][href="' + otherHref + '"]');
if (preloadLink) {
preloadLink.remove();
}
}
}
}
}
}
}
}
}
}
}
}
};
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
observer.observe(document.head, {
childList: true
});
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-link-gc.js.map
}}),
"[project]/node_modules/next/dist/client/app-index.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// imports polyfill from `@next/polyfill-module` after build.
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hydrate", {
enumerable: true,
get: function() {
return hydrate;
}
});
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-client] (ecmascript)");
const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-client] (ecmascript)");
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
__turbopack_context__.r("[project]/node_modules/next/dist/build/polyfills/polyfill-module.js [app-client] (ecmascript)");
__turbopack_context__.r("[project]/node_modules/next/dist/client/components/globals/patch-console.js [app-client] (ecmascript)");
__turbopack_context__.r("[project]/node_modules/next/dist/client/components/globals/handle-global-errors.js [app-client] (ecmascript)");
const _client = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react-dom/client.js [app-client] (ecmascript)"));
const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)"));
const _client1 = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/react-server-dom-turbopack/client.js [app-client] (ecmascript)");
const _headmanagercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js [app-client] (ecmascript)");
const _onrecoverableerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/react-client-callbacks/on-recoverable-error.js [app-client] (ecmascript)");
const _errorboundarycallbacks = __turbopack_context__.r("[project]/node_modules/next/dist/client/react-client-callbacks/error-boundary-callbacks.js [app-client] (ecmascript)");
const _appcallserver = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-call-server.js [app-client] (ecmascript)");
const _appfindsourcemapurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-find-source-map-url.js [app-client] (ecmascript)");
const _approuterinstance = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-instance.js [app-client] (ecmascript)");
const _approuter = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router.js [app-client] (ecmascript)"));
const _createinitialrouterstate = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js [app-client] (ecmascript)");
const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js [app-client] (ecmascript)");
const _appbuildid = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-build-id.js [app-client] (ecmascript)");
///
const appElement = document;
const encoder = new TextEncoder();
let initialServerDataBuffer = undefined;
let initialServerDataWriter = undefined;
let initialServerDataLoaded = false;
let initialServerDataFlushed = false;
let initialFormStateData = null;
function nextServerDataCallback(seg) {
if (seg[0] === 0) {
initialServerDataBuffer = [];
} else if (seg[0] === 1) {
if (!initialServerDataBuffer) throw Object.defineProperty(new Error('Unexpected server data: missing bootstrap script.'), "__NEXT_ERROR_CODE", {
value: "E18",
enumerable: false,
configurable: true
});
if (initialServerDataWriter) {
initialServerDataWriter.enqueue(encoder.encode(seg[1]));
} else {
initialServerDataBuffer.push(seg[1]);
}
} else if (seg[0] === 2) {
initialFormStateData = seg[1];
} else if (seg[0] === 3) {
if (!initialServerDataBuffer) throw Object.defineProperty(new Error('Unexpected server data: missing bootstrap script.'), "__NEXT_ERROR_CODE", {
value: "E18",
enumerable: false,
configurable: true
});
// Decode the base64 string back to binary data.
const binaryString = atob(seg[1]);
const decodedChunk = new Uint8Array(binaryString.length);
for(var i = 0; i < binaryString.length; i++){
decodedChunk[i] = binaryString.charCodeAt(i);
}
if (initialServerDataWriter) {
initialServerDataWriter.enqueue(decodedChunk);
} else {
initialServerDataBuffer.push(decodedChunk);
}
}
}
function isStreamErrorOrUnfinished(ctr) {
// If `desiredSize` is null, it means the stream is closed or errored. If it is lower than 0, the stream is still unfinished.
return ctr.desiredSize === null || ctr.desiredSize < 0;
}
// There might be race conditions between `nextServerDataRegisterWriter` and
// `DOMContentLoaded`. The former will be called when React starts to hydrate
// the root, the latter will be called when the DOM is fully loaded.
// For streaming, the former is called first due to partial hydration.
// For non-streaming, the latter can be called first.
// Hence, we use two variables `initialServerDataLoaded` and
// `initialServerDataFlushed` to make sure the writer will be closed and
// `initialServerDataBuffer` will be cleared in the right time.
function nextServerDataRegisterWriter(ctr) {
if (initialServerDataBuffer) {
initialServerDataBuffer.forEach((val)=>{
ctr.enqueue(typeof val === 'string' ? encoder.encode(val) : val);
});
if (initialServerDataLoaded && !initialServerDataFlushed) {
if (isStreamErrorOrUnfinished(ctr)) {
ctr.error(Object.defineProperty(new Error('The connection to the page was unexpectedly closed, possibly due to the stop button being clicked, loss of Wi-Fi, or an unstable internet connection.'), "__NEXT_ERROR_CODE", {
value: "E117",
enumerable: false,
configurable: true
}));
} else {
ctr.close();
}
initialServerDataFlushed = true;
initialServerDataBuffer = undefined;
}
}
initialServerDataWriter = ctr;
}
// When `DOMContentLoaded`, we can close all pending writers to finish hydration.
const DOMContentLoaded = function() {
if (initialServerDataWriter && !initialServerDataFlushed) {
initialServerDataWriter.close();
initialServerDataFlushed = true;
initialServerDataBuffer = undefined;
}
initialServerDataLoaded = true;
};
// It's possible that the DOM is already loaded.
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);
} else {
// Delayed in marco task to ensure it's executed later than hydration
setTimeout(DOMContentLoaded);
}
const nextServerDataLoadingGlobal = self.__next_f = self.__next_f || [];
nextServerDataLoadingGlobal.forEach(nextServerDataCallback);
nextServerDataLoadingGlobal.push = nextServerDataCallback;
const readable = new ReadableStream({
start (controller) {
nextServerDataRegisterWriter(controller);
}
});
const initialServerResponse = (0, _client1.createFromReadableStream)(readable, {
callServer: _appcallserver.callServer,
findSourceMapURL: _appfindsourcemapurl.findSourceMapURL
});
function ServerRoot(param) {
let { pendingActionQueue } = param;
const initialRSCPayload = (0, _react.use)(initialServerResponse);
const actionQueue = (0, _react.use)(pendingActionQueue);
const router = /*#__PURE__*/ (0, _jsxruntime.jsx)(_approuter.default, {
actionQueue: actionQueue,
globalErrorComponentAndStyles: initialRSCPayload.G,
assetPrefix: initialRSCPayload.p
});
if (("TURBOPACK compile-time value", "development") === 'development' && initialRSCPayload.m) {
// We provide missing slot information in a context provider only during development
// as we log some additional information about the missing slots in the console.
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.MissingSlotContext, {
value: initialRSCPayload.m,
children: router
});
}
return router;
}
const StrictModeIfEnabled = ("TURBOPACK compile-time truthy", 1) ? _react.default.StrictMode : ("TURBOPACK unreachable", undefined);
function Root(param) {
let { children } = param;
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
return children;
}
const reactRootOptions = {
onRecoverableError: _onrecoverableerror.onRecoverableError,
onCaughtError: _errorboundarycallbacks.onCaughtError,
onUncaughtError: _errorboundarycallbacks.onUncaughtError
};
function hydrate(instrumentationHooks) {
// React overrides `.then` and doesn't return a new promise chain,
// so we wrap the action queue in a promise to ensure that its value
// is defined when the promise resolves.
// https://github.com/facebook/react/blob/163365a07872337e04826c4f501565d43dbd2fd4/packages/react-client/src/ReactFlightClient.js#L189-L190
const pendingActionQueue = new Promise((resolve, reject)=>{
initialServerResponse.then((initialRSCPayload)=>{
// setAppBuildId should be called only once, during JS initialization
// and before any components have hydrated.
(0, _appbuildid.setAppBuildId)(initialRSCPayload.b);
const initialTimestamp = Date.now();
resolve((0, _approuterinstance.createMutableActionQueue)((0, _createinitialrouterstate.createInitialRouterState)({
navigatedAt: initialTimestamp,
initialFlightData: initialRSCPayload.f,
initialCanonicalUrlParts: initialRSCPayload.c,
initialParallelRoutes: new Map(),
location: window.location,
couldBeIntercepted: initialRSCPayload.i,
postponed: initialRSCPayload.s,
prerendered: initialRSCPayload.S
}), instrumentationHooks));
}, (err)=>reject(err));
});
const reactEl = /*#__PURE__*/ (0, _jsxruntime.jsx)(StrictModeIfEnabled, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_headmanagercontextsharedruntime.HeadManagerContext.Provider, {
value: {
appDir: true
},
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(ServerRoot, {
pendingActionQueue: pendingActionQueue
})
})
})
});
if (document.documentElement.id === '__next_error__') {
let element = reactEl;
// Server rendering failed, fall back to client-side rendering
if ("TURBOPACK compile-time truthy", 1) {
const { createRootLevelDevOverlayElement } = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/react-dev-overlay/app/client-entry.js [app-client] (ecmascript)");
// Note this won't cause hydration mismatch because we are doing CSR w/o hydration
element = createRootLevelDevOverlayElement(element);
}
_client.default.createRoot(appElement, reactRootOptions).render(element);
} else {
_react.default.startTransition(()=>{
_client.default.hydrateRoot(appElement, reactEl, {
...reactRootOptions,
formState: initialFormStateData
});
});
}
// TODO-APP: Remove this logic when Float has GC built-in in development.
if ("TURBOPACK compile-time truthy", 1) {
const { linkGc } = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-link-gc.js [app-client] (ecmascript)");
linkGc();
}
}
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-index.js.map
}}),
"[project]/node_modules/next/dist/client/dev/dev-build-indicator/initialize-for-app-router.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "initializeDevBuildIndicatorForAppRouter", {
enumerable: true,
get: function() {
return initializeDevBuildIndicatorForAppRouter;
}
});
const _devbuildindicator = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/internal/dev-build-indicator.js [app-client] (ecmascript)");
const initializeDevBuildIndicatorForAppRouter = ()=>{
if ("TURBOPACK compile-time falsy", 0) {
"TURBOPACK unreachable";
}
_devbuildindicator.devBuildIndicator.initialize();
};
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=initialize-for-app-router.js.map
}}),
"[project]/node_modules/next/dist/client/app-next-turbopack.js [app-client] (ecmascript)": (function(__turbopack_context__) {
var { g: global, __dirname, m: module, e: exports } = __turbopack_context__;
{
// TODO-APP: hydration warning
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [app-client] (ecmascript)");
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _appbootstrap = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-bootstrap.js [app-client] (ecmascript)");
window.next.version += '-turbo';
self.__webpack_hash__ = '';
const instrumentationHooks = __turbopack_context__.r("[project]/node_modules/next/dist/lib/require-instrumentation-client.js [app-client] (ecmascript)");
(0, _appbootstrap.appBootstrap)(()=>{
const { hydrate } = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-index.js [app-client] (ecmascript)");
hydrate(instrumentationHooks);
if ("TURBOPACK compile-time truthy", 1) {
const { initializeDevBuildIndicatorForAppRouter } = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/dev-build-indicator/initialize-for-app-router.js [app-client] (ecmascript)");
initializeDevBuildIndicatorForAppRouter();
}
});
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', {
value: true
});
Object.assign(exports.default, exports);
module.exports = exports.default;
} //# sourceMappingURL=app-next-turbopack.js.map
}}),
}]);
//# sourceMappingURL=node_modules_next_dist_client_8f19e6fb._.js.map