UNPKG

@preprio/prepr-nextjs

Version:

Next.js package for Prepr CMS preview functionality with advanced debugging and visual editing capabilities

1,237 lines (1,215 loc) 184 kB
import { __commonJS, __spreadProps, __spreadValues, __require, __async, __toESM } from './chunk-26CXDAG7.mjs'; // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/headers.js var require_headers = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/headers.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var headers_exports = {}; __export2(headers_exports, { CITY_HEADER_NAME: () => CITY_HEADER_NAME, COUNTRY_HEADER_NAME: () => COUNTRY_HEADER_NAME, EMOJI_FLAG_UNICODE_STARTING_POSITION: () => EMOJI_FLAG_UNICODE_STARTING_POSITION, IP_HEADER_NAME: () => IP_HEADER_NAME, LATITUDE_HEADER_NAME: () => LATITUDE_HEADER_NAME, LONGITUDE_HEADER_NAME: () => LONGITUDE_HEADER_NAME, POSTAL_CODE_HEADER_NAME: () => POSTAL_CODE_HEADER_NAME, REGION_HEADER_NAME: () => REGION_HEADER_NAME, REQUEST_ID_HEADER_NAME: () => REQUEST_ID_HEADER_NAME, geolocation: () => geolocation2, ipAddress: () => ipAddress3 }); module.exports = __toCommonJS(headers_exports); var CITY_HEADER_NAME = "x-vercel-ip-city"; var COUNTRY_HEADER_NAME = "x-vercel-ip-country"; var IP_HEADER_NAME = "x-real-ip"; var LATITUDE_HEADER_NAME = "x-vercel-ip-latitude"; var LONGITUDE_HEADER_NAME = "x-vercel-ip-longitude"; var REGION_HEADER_NAME = "x-vercel-ip-country-region"; var POSTAL_CODE_HEADER_NAME = "x-vercel-ip-postal-code"; var REQUEST_ID_HEADER_NAME = "x-vercel-id"; var EMOJI_FLAG_UNICODE_STARTING_POSITION = 127397; function getHeader(headers, key) { var _a; return (_a = headers.get(key)) != null ? _a : void 0; } function getHeaderWithDecode(request, key) { const header = getHeader(request.headers, key); return header ? decodeURIComponent(header) : void 0; } function getFlag(countryCode) { const regex = new RegExp("^[A-Z]{2}$").test(countryCode); if (!countryCode || !regex) return void 0; return String.fromCodePoint( ...countryCode.split("").map((char) => EMOJI_FLAG_UNICODE_STARTING_POSITION + char.charCodeAt(0)) ); } function ipAddress3(input) { const headers = "headers" in input ? input.headers : input; return getHeader(headers, IP_HEADER_NAME); } function getRegionFromRequestId(requestId) { if (!requestId) { return "dev1"; } return requestId.split(":")[0]; } function geolocation2(request) { return { // city name may be encoded to support multi-byte characters city: getHeaderWithDecode(request, CITY_HEADER_NAME), country: getHeader(request.headers, COUNTRY_HEADER_NAME), flag: getFlag(getHeader(request.headers, COUNTRY_HEADER_NAME)), countryRegion: getHeader(request.headers, REGION_HEADER_NAME), region: getRegionFromRequestId( getHeader(request.headers, REQUEST_ID_HEADER_NAME) ), latitude: getHeader(request.headers, LATITUDE_HEADER_NAME), longitude: getHeader(request.headers, LONGITUDE_HEADER_NAME), postalCode: getHeader(request.headers, POSTAL_CODE_HEADER_NAME) }; } } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/get-env.js var require_get_env = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/get-env.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var get_env_exports = {}; __export2(get_env_exports, { getEnv: () => getEnv2 }); module.exports = __toCommonJS(get_env_exports); var getEnv2 = (env = process.env) => ({ /** * An indicator to show that System Environment Variables have been exposed to your project's Deployments. * @example "1" */ VERCEL: get(env, "VERCEL"), /** * An indicator that the code is running in a Continuous Integration environment. * @example "1" */ CI: get(env, "CI"), /** * The Environment that the app is deployed and running on. * @example "production" */ VERCEL_ENV: get(env, "VERCEL_ENV"), /** * The domain name of the generated deployment URL. The value does not include the protocol scheme https://. * NOTE: This Variable cannot be used in conjunction with Standard Deployment Protection. * @example "*.vercel.app" */ VERCEL_URL: get(env, "VERCEL_URL"), /** * The domain name of the generated Git branch URL. The value does not include the protocol scheme https://. * @example "*-git-*.vercel.app" */ VERCEL_BRANCH_URL: get(env, "VERCEL_BRANCH_URL"), /** * A production domain name of the project. This is useful to reliably generate links that point to production such as OG-image URLs. * The value does not include the protocol scheme https://. * @example "myproject.vercel.app" */ VERCEL_PROJECT_PRODUCTION_URL: get(env, "VERCEL_PROJECT_PRODUCTION_URL"), /** * The ID of the Region where the app is running. * * Possible values: * - arn1 (Stockholm, Sweden) * - bom1 (Mumbai, India) * - cdg1 (Paris, France) * - cle1 (Cleveland, USA) * - cpt1 (Cape Town, South Africa) * - dub1 (Dublin, Ireland) * - fra1 (Frankfurt, Germany) * - gru1 (São Paulo, Brazil) * - hkg1 (Hong Kong) * - hnd1 (Tokyo, Japan) * - iad1 (Washington, D.C., USA) * - icn1 (Seoul, South Korea) * - kix1 (Osaka, Japan) * - lhr1 (London, United Kingdom) * - pdx1 (Portland, USA) * - sfo1 (San Francisco, USA) * - sin1 (Singapore) * - syd1 (Sydney, Australia) * - dev1 (Development Region) * * @example "iad1" */ VERCEL_REGION: get(env, "VERCEL_REGION"), /** * The unique identifier for the deployment, which can be used to implement Skew Protection. * @example "dpl_7Gw5ZMBpQA8h9GF832KGp7nwbuh3" */ VERCEL_DEPLOYMENT_ID: get(env, "VERCEL_DEPLOYMENT_ID"), /** * When Skew Protection is enabled in Project Settings, this value is set to 1. * @example "1" */ VERCEL_SKEW_PROTECTION_ENABLED: get(env, "VERCEL_SKEW_PROTECTION_ENABLED"), /** * The Protection Bypass for Automation value, if the secret has been generated in the project's Deployment Protection settings. */ VERCEL_AUTOMATION_BYPASS_SECRET: get(env, "VERCEL_AUTOMATION_BYPASS_SECRET"), /** * The Git Provider the deployment is triggered from. * @example "github" */ VERCEL_GIT_PROVIDER: get(env, "VERCEL_GIT_PROVIDER"), /** * The origin repository the deployment is triggered from. * @example "my-site" */ VERCEL_GIT_REPO_SLUG: get(env, "VERCEL_GIT_REPO_SLUG"), /** * The account that owns the repository the deployment is triggered from. * @example "acme" */ VERCEL_GIT_REPO_OWNER: get(env, "VERCEL_GIT_REPO_OWNER"), /** * The ID of the repository the deployment is triggered from. * @example "117716146" */ VERCEL_GIT_REPO_ID: get(env, "VERCEL_GIT_REPO_ID"), /** * The git branch of the commit the deployment was triggered by. * @example "improve-about-page" */ VERCEL_GIT_COMMIT_REF: get(env, "VERCEL_GIT_COMMIT_REF"), /** * The git SHA of the commit the deployment was triggered by. * @example "fa1eade47b73733d6312d5abfad33ce9e4068081" */ VERCEL_GIT_COMMIT_SHA: get(env, "VERCEL_GIT_COMMIT_SHA"), /** * The message attached to the commit the deployment was triggered by. * @example "Update about page" */ VERCEL_GIT_COMMIT_MESSAGE: get(env, "VERCEL_GIT_COMMIT_MESSAGE"), /** * The username attached to the author of the commit that the project was deployed by. * @example "johndoe" */ VERCEL_GIT_COMMIT_AUTHOR_LOGIN: get(env, "VERCEL_GIT_COMMIT_AUTHOR_LOGIN"), /** * The name attached to the author of the commit that the project was deployed by. * @example "John Doe" */ VERCEL_GIT_COMMIT_AUTHOR_NAME: get(env, "VERCEL_GIT_COMMIT_AUTHOR_NAME"), /** * The git SHA of the last successful deployment for the project and branch. * NOTE: This Variable is only exposed when an Ignored Build Step is provided. * @example "fa1eade47b73733d6312d5abfad33ce9e4068080" */ VERCEL_GIT_PREVIOUS_SHA: get(env, "VERCEL_GIT_PREVIOUS_SHA"), /** * The pull request id the deployment was triggered by. If a deployment is created on a branch before a pull request is made, this value will be an empty string. * @example "23" */ VERCEL_GIT_PULL_REQUEST_ID: get(env, "VERCEL_GIT_PULL_REQUEST_ID") }); var get = (env, key) => { const value = env[key]; return value === "" ? void 0 : value; }; } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/get-context.js var require_get_context = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/get-context.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var get_context_exports = {}; __export2(get_context_exports, { SYMBOL_FOR_REQ_CONTEXT: () => SYMBOL_FOR_REQ_CONTEXT, getContext: () => getContext }); module.exports = __toCommonJS(get_context_exports); var SYMBOL_FOR_REQ_CONTEXT = Symbol.for("@vercel/request-context"); function getContext() { var _a, _b, _c; const fromSymbol = globalThis; return (_c = (_b = (_a = fromSymbol[SYMBOL_FOR_REQ_CONTEXT]) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a)) != null ? _c : {}; } } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/wait-until.js var require_wait_until = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/wait-until.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var wait_until_exports = {}; __export2(wait_until_exports, { waitUntil: () => waitUntil2 }); module.exports = __toCommonJS(wait_until_exports); var import_get_context = require_get_context(); var waitUntil2 = (promise) => { var _a, _b; if (promise === null || typeof promise !== "object" || typeof promise.then !== "function") { throw new TypeError( `waitUntil can only be called with a Promise, got ${typeof promise}` ); } return (_b = (_a = (0, import_get_context.getContext)()).waitUntil) == null ? void 0 : _b.call(_a, promise); }; } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/middleware.js var require_middleware = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/middleware.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var middleware_exports = {}; __export2(middleware_exports, { next: () => next2, rewrite: () => rewrite2 }); module.exports = __toCommonJS(middleware_exports); function handleMiddlewareField(init, headers) { var _a; if ((_a = init == null ? void 0 : init.request) == null ? void 0 : _a.headers) { if (!(init.request.headers instanceof Headers)) { throw new Error("request.headers must be an instance of Headers"); } const keys = []; for (const [key, value] of init.request.headers) { headers.set("x-middleware-request-" + key, value); keys.push(key); } headers.set("x-middleware-override-headers", keys.join(",")); } } function rewrite2(destination, init) { var _a; const headers = new Headers((_a = init == null ? void 0 : init.headers) != null ? _a : {}); headers.set("x-middleware-rewrite", String(destination)); handleMiddlewareField(init, headers); return new Response(null, __spreadProps(__spreadValues({}, init), { headers })); } function next2(init) { var _a; const headers = new Headers((_a = init == null ? void 0 : init.headers) != null ? _a : {}); headers.set("x-middleware-next", "1"); handleMiddlewareField(init, headers); return new Response(null, __spreadProps(__spreadValues({}, init), { headers })); } } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/cache/in-memory-cache.js var require_in_memory_cache = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/cache/in-memory-cache.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var in_memory_cache_exports = {}; __export2(in_memory_cache_exports, { InMemoryCache: () => InMemoryCache }); module.exports = __toCommonJS(in_memory_cache_exports); var InMemoryCache = class { constructor() { this.cache = {}; } get(key, options) { return __async(this, null, function* () { const entry = this.cache[key]; if (entry) { if (entry.ttl && entry.lastModified + entry.ttl * 1e3 < Date.now()) { yield this.delete(key); return null; } if (options == null ? void 0 : options.tags) { for (const tag of options.tags) { entry.tags.add(tag); } } return entry.value; } return null; }); } set(key, value, options) { return __async(this, null, function* () { this.cache[key] = { value, lastModified: Date.now(), ttl: options == null ? void 0 : options.ttl, tags: new Set((options == null ? void 0 : options.tags) || []) }; }); } delete(key) { return __async(this, null, function* () { delete this.cache[key]; }); } expireTag(tag) { return __async(this, null, function* () { const tags = Array.isArray(tag) ? tag : [tag]; for (const key in this.cache) { if (Object.prototype.hasOwnProperty.call(this.cache, key)) { const entry = this.cache[key]; if (tags.some((t) => entry.tags.has(t))) { delete this.cache[key]; } } } }); } }; } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/cache/index.js var require_cache = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/cache/index.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var cache_exports = {}; __export2(cache_exports, { getCache: () => getCache2 }); module.exports = __toCommonJS(cache_exports); var import_get_context = require_get_context(); var import_in_memory_cache = require_in_memory_cache(); var defaultKeyHashFunction = (key) => { let hash = 5381; for (let i = 0; i < key.length; i++) { hash = hash * 33 ^ key.charCodeAt(i); } return (hash >>> 0).toString(16); }; var defaultNamespaceSeparator = "$"; var inMemoryCacheInstance = null; var getCache2 = (cacheOptions) => { const resolveCache = () => { const ctxCache = (0, import_get_context.getContext)().cache; if (ctxCache) return ctxCache; if (!inMemoryCacheInstance) { inMemoryCacheInstance = new import_in_memory_cache.InMemoryCache(); console.warn( "Runtime Cache unavailable in this environment. Falling back to in-memory cache." ); } return inMemoryCacheInstance; }; const hashFunction = (cacheOptions == null ? void 0 : cacheOptions.keyHashFunction) || defaultKeyHashFunction; const makeKey = (key) => { let prefix = ""; if (cacheOptions == null ? void 0 : cacheOptions.namespace) { const namespaceSeparator = cacheOptions.namespaceSeparator || defaultNamespaceSeparator; prefix = `${cacheOptions.namespace}${namespaceSeparator}`; } return `${prefix}${hashFunction(key)}`; }; return { get: (key, options) => { return resolveCache().get(makeKey(key), options); }, set: (key, value, options) => { return resolveCache().set(makeKey(key), value, options); }, delete: (key) => { return resolveCache().delete(makeKey(key)); }, expireTag: (tag) => { return resolveCache().expireTag(tag); } }; }; } }); // node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/index.js var require_functions = __commonJS({ "node_modules/.pnpm/@vercel+functions@2.2.2/node_modules/@vercel/functions/index.js"(exports, module) { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { geolocation: () => import_headers.geolocation, getCache: () => import_cache.getCache, getEnv: () => import_get_env.getEnv, ipAddress: () => import_headers.ipAddress, next: () => import_middleware.next, rewrite: () => import_middleware.rewrite, waitUntil: () => import_wait_until.waitUntil }); module.exports = __toCommonJS(src_exports); var import_headers = require_headers(); var import_get_env = require_get_env(); var import_wait_until = require_wait_until(); var import_middleware = require_middleware(); var import_cache = require_cache(); } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js var require_detect_domain_locale = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "detectDomainLocale", { enumerable: true, get: function() { return detectDomainLocale; } }); function detectDomainLocale(domainItems, hostname, detectedLocale) { if (!domainItems) return; if (detectedLocale) { detectedLocale = detectedLocale.toLowerCase(); } for (const item of domainItems) { var _item_domain, _item_locales; const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase(); if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) { return item; } } } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js var require_remove_trailing_slash = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "removeTrailingSlash", { enumerable: true, get: function() { return removeTrailingSlash; } }); function removeTrailingSlash(route) { return route.replace(/\/$/, "") || "/"; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/parse-path.js var require_parse_path = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "parsePath", { enumerable: true, get: function() { return parsePath; } }); function parsePath(path) { const hashIndex = path.indexOf("#"); const queryIndex = path.indexOf("?"); const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); if (hasQuery || hashIndex > -1) { return { pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "", hash: hashIndex > -1 ? path.slice(hashIndex) : "" }; } return { pathname: path, query: "", hash: "" }; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js var require_add_path_prefix = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addPathPrefix", { enumerable: true, get: function() { return addPathPrefix; } }); var _parsepath = require_parse_path(); function addPathPrefix(path, prefix) { if (!path.startsWith("/") || !prefix) { return path; } const { pathname, query, hash } = (0, _parsepath.parsePath)(path); return "" + prefix + pathname + query + hash; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js var require_add_path_suffix = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addPathSuffix", { enumerable: true, get: function() { return addPathSuffix; } }); var _parsepath = require_parse_path(); function addPathSuffix(path, suffix) { if (!path.startsWith("/") || !suffix) { return path; } const { pathname, query, hash } = (0, _parsepath.parsePath)(path); return "" + pathname + suffix + query + hash; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js var require_path_has_prefix = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "pathHasPrefix", { enumerable: true, get: function() { return pathHasPrefix; } }); var _parsepath = require_parse_path(); function pathHasPrefix(path, prefix) { if (typeof path !== "string") { return false; } const { pathname } = (0, _parsepath.parsePath)(path); return pathname === prefix || pathname.startsWith(prefix + "/"); } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/add-locale.js var require_add_locale = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addLocale", { enumerable: true, get: function() { return addLocale; } }); var _addpathprefix = require_add_path_prefix(); var _pathhasprefix = require_path_has_prefix(); function addLocale(path, locale, defaultLocale, ignorePrefix) { if (!locale || locale === defaultLocale) return path; const lower = path.toLowerCase(); if (!ignorePrefix) { if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path; if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase())) return path; } return (0, _addpathprefix.addPathPrefix)(path, "/" + locale); } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js var require_format_next_pathname_info = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "formatNextPathnameInfo", { enumerable: true, get: function() { return formatNextPathnameInfo; } }); var _removetrailingslash = require_remove_trailing_slash(); var _addpathprefix = require_add_path_prefix(); var _addpathsuffix = require_add_path_suffix(); var _addlocale = require_add_locale(); function formatNextPathnameInfo(info) { let pathname = (0, _addlocale.addLocale)(info.pathname, info.locale, info.buildId ? void 0 : info.defaultLocale, info.ignorePrefix); if (info.buildId || !info.trailingSlash) { pathname = (0, _removetrailingslash.removeTrailingSlash)(pathname); } if (info.buildId) { pathname = (0, _addpathsuffix.addPathSuffix)((0, _addpathprefix.addPathPrefix)(pathname, "/_next/data/" + info.buildId), info.pathname === "/" ? "index.json" : ".json"); } pathname = (0, _addpathprefix.addPathPrefix)(pathname, info.basePath); return !info.buildId && info.trailingSlash ? !pathname.endsWith("/") ? (0, _addpathsuffix.addPathSuffix)(pathname, "/") : pathname : (0, _removetrailingslash.removeTrailingSlash)(pathname); } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/get-hostname.js var require_get_hostname = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/get-hostname.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "getHostname", { enumerable: true, get: function() { return getHostname; } }); function getHostname(parsed, headers) { let hostname; if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { hostname = headers.host.toString().split(":", 1)[0]; } else if (parsed.hostname) { hostname = parsed.hostname; } else return; return hostname.toLowerCase(); } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js var require_normalize_locale_path = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "normalizeLocalePath", { enumerable: true, get: function() { return normalizeLocalePath; } }); var cache = /* @__PURE__ */ new WeakMap(); function normalizeLocalePath(pathname, locales) { if (!locales) return { pathname }; let lowercasedLocales = cache.get(locales); if (!lowercasedLocales) { lowercasedLocales = locales.map((locale) => locale.toLowerCase()); cache.set(locales, lowercasedLocales); } let detectedLocale; const segments = pathname.split("/", 2); if (!segments[1]) return { pathname }; const segment = segments[1].toLowerCase(); const index = lowercasedLocales.indexOf(segment); if (index < 0) return { pathname }; detectedLocale = locales[index]; pathname = pathname.slice(detectedLocale.length + 1) || "/"; return { pathname, detectedLocale }; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js var require_remove_path_prefix = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "removePathPrefix", { enumerable: true, get: function() { return removePathPrefix; } }); var _pathhasprefix = require_path_has_prefix(); function removePathPrefix(path, prefix) { if (!(0, _pathhasprefix.pathHasPrefix)(path, prefix)) { return path; } const withoutPrefix = path.slice(prefix.length); if (withoutPrefix.startsWith("/")) { return withoutPrefix; } return "/" + withoutPrefix; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js var require_get_next_pathname_info = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "getNextPathnameInfo", { enumerable: true, get: function() { return getNextPathnameInfo; } }); var _normalizelocalepath = require_normalize_locale_path(); var _removepathprefix = require_remove_path_prefix(); var _pathhasprefix = require_path_has_prefix(); function getNextPathnameInfo(pathname, options) { var _options_nextConfig; const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; const info = { pathname, trailingSlash: pathname !== "/" ? pathname.endsWith("/") : trailingSlash }; if (basePath && (0, _pathhasprefix.pathHasPrefix)(info.pathname, basePath)) { info.pathname = (0, _removepathprefix.removePathPrefix)(info.pathname, basePath); info.basePath = basePath; } let pathnameNoDataPrefix = info.pathname; if (info.pathname.startsWith("/_next/data/") && info.pathname.endsWith(".json")) { const paths = info.pathname.replace(/^\/_next\/data\//, "").replace(/\.json$/, "").split("/"); const buildId = paths[0]; info.buildId = buildId; pathnameNoDataPrefix = paths[1] !== "index" ? "/" + paths.slice(1).join("/") : "/"; if (options.parseData === true) { info.pathname = pathnameNoDataPrefix; } } if (i18n) { let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : (0, _normalizelocalepath.normalizeLocalePath)(info.pathname, i18n.locales); info.locale = result.detectedLocale; var _result_pathname; info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; if (!result.detectedLocale && info.buildId) { result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : (0, _normalizelocalepath.normalizeLocalePath)(pathnameNoDataPrefix, i18n.locales); if (result.detectedLocale) { info.locale = result.detectedLocale; } } } return info; } } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/web/next-url.js var require_next_url = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/server/web/next-url.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "NextURL", { enumerable: true, get: function() { return NextURL; } }); var _detectdomainlocale = require_detect_domain_locale(); var _formatnextpathnameinfo = require_format_next_pathname_info(); var _gethostname = require_get_hostname(); var _getnextpathnameinfo = require_get_next_pathname_info(); var REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, "localhost"), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, "localhost")); } var Internal = Symbol("NextURLInternal"); var NextURL = class _NextURL { constructor(input, baseOrOpts, opts) { let base; let options; if (typeof baseOrOpts === "object" && "pathname" in baseOrOpts || typeof baseOrOpts === "string") { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base != null ? base : options.base), options, basePath: "" }; this.analyze(); } analyze() { var _a, _b; var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = (0, _getnextpathnameinfo.getNextPathnameInfo)(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = (0, _gethostname.getHostname)(this[Internal].url, this[Internal].options.headers); this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : (0, _detectdomainlocale.detectDomainLocale)((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = (_a = info.basePath) != null ? _a : ""; this[Internal].buildId = info.buildId; this[Internal].locale = (_b = info.locale) != null ? _b : defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return (0, _formatnextpathnameinfo.formatNextPathnameInfo)({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : void 0, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { var _a; return (_a = this[Internal].locale) != null ? _a : ""; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith("/") ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for("edge-runtime.inspect.custom")]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new _NextURL(String(this), this[Internal].options); } }; } }); // node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/lib/constants.js var require_constants = __commonJS({ "node_modules/.pnpm/next@15.3.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/lib/constants.js"(exports) { Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { ACTION_SUFFIX: function() { return ACTION_SUFFIX; }, APP_DIR_ALIAS: function() { return APP_DIR_ALIAS; }, CACHE_ONE_YEAR: function() { return CACHE_ONE_YEAR; }, DOT_NEXT_ALIAS: function() { return DOT_NEXT_ALIAS; }, ESLINT_DEFAULT_DIRS: function() { return ESLINT_DEFAULT_DIRS; }, GSP_NO_RETURNED_VALUE: function() { return GSP_NO_RETURNED_VALUE; }, GSSP_COMPONENT_MEMBER_ERROR: function() { return GSSP_COMPONENT_MEMBER_ERROR; }, GSSP_NO_RETURNED_VALUE: function() { return GSSP_NO_RETURNED_VALUE; }, INFINITE_CACHE: function() { return INFINITE_CACHE; }, INSTRUMENTATION_HOOK_FILENAME: function() { return INSTRUMENTATION_HOOK_FILENAME; }, MATCHED_PATH_HEADER: function() { return MATCHED_PATH_HEADER; }, MIDDLEWARE_FILENAME: function() { return MIDDLEWARE_FILENAME; }, MIDDLEWARE_LOCATION_REGEXP: function() { return MIDDLEWARE_LOCATION_REGEXP; }, NEXT_BODY_SUFFIX: function() { return NEXT_BODY_SUFFIX; }, NEXT_CACHE_IMPLICIT_TAG_ID: function() { return NEXT_CACHE_IMPLICIT_TAG_ID; }, NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() { return NEXT_CACHE_REVALIDATED_TAGS_HEADER; }, NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() { return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER; }, NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() { return NEXT_CACHE_SOFT_TAG_MAX_LENGTH; }, NEXT_CACHE_TAGS_HEADER: function() { return NEXT_CACHE_TAGS_HEADER; }, NEXT_CACHE_TAG_MAX_ITEMS: function() { return NEXT_CACHE_TAG_MAX_ITEMS; }, NEXT_CACHE_TAG_MAX_LENGTH: function() { return NEXT_CACHE_TAG_MAX_LENGTH; }, NEXT_DATA_SUFFIX: function() { return NEXT_DATA_SUFFIX; }, NEXT_INTERCEPTION_MARKER_PREFIX: function() { return NEXT_INTERCEPTION_MARKER_PREFIX; }, NEXT_META_SUFFIX: function() { return NEXT_META_SUFFIX; }, NEXT_QUERY_PARAM_PREFIX: function() { return NEXT_QUERY_PARAM_PREFIX; }, NEXT_RESUME_HEADER: function() { return NEXT_RESUME_HEADER; }, NON_STANDARD_NODE_ENV: function() { return NON_STANDARD_NODE_ENV; }, PAGES_DIR_ALIAS: function() { return PAGES_DIR_ALIAS; }, PRERENDER_REVALIDATE_HEADER: function() { return PRERENDER_REVALIDATE_HEADER; }, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() { return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER; }, PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() { return PUBLIC_DIR_MIDDLEWARE_CONFLICT; }, ROOT_DIR_ALIAS: function() { return ROOT_DIR_A