UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

1,397 lines (1,376 loc) 105 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs var require_interop_require_wildcard = __commonJS({ "node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports2) { "use strict"; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop2) { return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interop_require_wildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) return obj; if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) return cache.get(obj); var newObj = { __proto__: null }; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); else newObj[key] = obj[key]; } } newObj.default = obj; if (cache) cache.set(obj, newObj); return newObj; } exports2._ = _interop_require_wildcard; } }); // node_modules/next/dist/shared/lib/router/utils/querystring.js var require_querystring = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { assign: function() { return assign; }, searchParamsToUrlQuery: function() { return searchParamsToUrlQuery; }, urlQueryToSearchParams: function() { return urlQueryToSearchParams; } }); function searchParamsToUrlQuery(searchParams) { const query = {}; for (const [key, value] of searchParams.entries()) { const existing = query[key]; if (typeof existing === "undefined") { query[key] = value; } else if (Array.isArray(existing)) { existing.push(value); } else { query[key] = [ existing, value ]; } } return query; } function stringifyUrlQueryParam(param) { if (typeof param === "string") { return param; } if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") { return String(param); } else { return ""; } } function urlQueryToSearchParams(query) { const searchParams = new URLSearchParams(); for (const [key, value] of Object.entries(query)) { if (Array.isArray(value)) { for (const item of value) { searchParams.append(key, stringifyUrlQueryParam(item)); } } else { searchParams.set(key, stringifyUrlQueryParam(value)); } } return searchParams; } function assign(target) { for (var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { searchParamsList[_key - 1] = arguments[_key]; } for (const searchParams of searchParamsList) { for (const key of searchParams.keys()) { target.delete(key); } for (const [key, value] of searchParams.entries()) { target.append(key, value); } } return target; } } }); // node_modules/next/dist/shared/lib/router/utils/format-url.js var require_format_url = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { formatUrl: function() { return formatUrl; }, formatWithValidation: function() { return formatWithValidation; }, urlObjectKeys: function() { return urlObjectKeys; } }); var _interop_require_wildcard = require_interop_require_wildcard(); var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring()); var slashedProtocols = /https?|ftp|gopher|file/; function formatUrl(urlObj) { let { auth, hostname } = urlObj; let protocol = urlObj.protocol || ""; let pathname = urlObj.pathname || ""; let hash = urlObj.hash || ""; let query = urlObj.query || ""; let host = false; auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : ""; if (urlObj.host) { host = auth + urlObj.host; } else if (hostname) { host = auth + (~hostname.indexOf(":") ? "[" + hostname + "]" : hostname); if (urlObj.port) { host += ":" + urlObj.port; } } if (query && typeof query === "object") { query = String(_querystring.urlQueryToSearchParams(query)); } let search = urlObj.search || query && "?" + query || ""; if (protocol && !protocol.endsWith(":")) protocol += ":"; if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) { host = "//" + (host || ""); if (pathname && pathname[0] !== "/") pathname = "/" + pathname; } else if (!host) { host = ""; } if (hash && hash[0] !== "#") hash = "#" + hash; if (search && search[0] !== "?") search = "?" + search; pathname = pathname.replace(/[?#]/g, encodeURIComponent); search = search.replace("#", "%23"); return "" + protocol + host + pathname + search + hash; } var urlObjectKeys = [ "auth", "hash", "host", "hostname", "href", "path", "pathname", "port", "protocol", "query", "search", "slashes" ]; function formatWithValidation(url) { if (process.env.NODE_ENV === "development") { if (url !== null && typeof url === "object") { Object.keys(url).forEach((key) => { if (!urlObjectKeys.includes(key)) { console.warn("Unknown key passed via urlObject into url.format: " + key); } }); } } return formatUrl(url); } } }); // node_modules/next/dist/shared/lib/router/utils/omit.js var require_omit = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/omit.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "omit", { enumerable: true, get: function() { return omit; } }); function omit(object, keys) { const omitted = {}; Object.keys(object).forEach((key) => { if (!keys.includes(key)) { omitted[key] = object[key]; } }); return omitted; } } }); // node_modules/next/dist/shared/lib/utils.js var require_utils = __commonJS({ "node_modules/next/dist/shared/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { DecodeError: function() { return DecodeError; }, MiddlewareNotFoundError: function() { return MiddlewareNotFoundError; }, MissingStaticPage: function() { return MissingStaticPage; }, NormalizeError: function() { return NormalizeError; }, PageNotFoundError: function() { return PageNotFoundError; }, SP: function() { return SP; }, ST: function() { return ST; }, WEB_VITALS: function() { return WEB_VITALS; }, execOnce: function() { return execOnce; }, getDisplayName: function() { return getDisplayName; }, getLocationOrigin: function() { return getLocationOrigin; }, getURL: function() { return getURL; }, isAbsoluteUrl: function() { return isAbsoluteUrl; }, isResSent: function() { return isResSent; }, loadGetInitialProps: function() { return loadGetInitialProps; }, normalizeRepeatedSlashes: function() { return normalizeRepeatedSlashes; }, stringifyError: function() { return stringifyError; } }); var WEB_VITALS = [ "CLS", "FCP", "FID", "INP", "LCP", "TTFB" ]; function execOnce(fn) { let used = false; let result; return function() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (!used) { used = true; result = fn(...args); } return result; }; } var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/; var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url); function getLocationOrigin() { const { protocol, hostname, port } = window.location; return protocol + "//" + hostname + (port ? ":" + port : ""); } function getURL() { const { href } = window.location; const origin = getLocationOrigin(); return href.substring(origin.length); } function getDisplayName(Component) { return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown"; } function isResSent(res) { return res.finished || res.headersSent; } function normalizeRepeatedSlashes(url) { const urlParts = url.split("?"); const urlNoQuery = urlParts[0]; return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? "?" + urlParts.slice(1).join("?") : ""); } async function loadGetInitialProps(App, ctx) { if (process.env.NODE_ENV !== "production") { var _App_prototype; if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) { const message = '"' + getDisplayName(App) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.'; throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } const res = ctx.res || ctx.ctx && ctx.ctx.res; if (!App.getInitialProps) { if (ctx.ctx && ctx.Component) { return { pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx) }; } return {}; } const props = await App.getInitialProps(ctx); if (res && isResSent(res)) { return props; } if (!props) { const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.'; throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } if (process.env.NODE_ENV !== "production") { if (Object.keys(props).length === 0 && !ctx.ctx) { console.warn("" + getDisplayName(App) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"); } } return props; } var SP = typeof performance !== "undefined"; var ST = SP && [ "mark", "measure", "getEntriesByName" ].every((method) => typeof performance[method] === "function"); var DecodeError = class extends Error { }; var NormalizeError = class extends Error { }; var PageNotFoundError = class extends Error { constructor(page) { super(); this.code = "ENOENT"; this.name = "PageNotFoundError"; this.message = "Cannot find module for page: " + page; } }; var MissingStaticPage = class extends Error { constructor(page, message) { super(); this.message = "Failed to load static file for page: " + page + " " + message; } }; var MiddlewareNotFoundError = class extends Error { constructor() { super(); this.code = "ENOENT"; this.message = "Cannot find the middleware module"; } }; function stringifyError(error) { return JSON.stringify({ message: error.message, stack: error.stack }); } } }); // node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js var require_remove_trailing_slash = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "removeTrailingSlash", { enumerable: true, get: function() { return removeTrailingSlash; } }); function removeTrailingSlash(route) { return route.replace(/\/$/, "") || "/"; } } }); // node_modules/next/dist/shared/lib/router/utils/parse-path.js var require_parse_path = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "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/next/dist/client/normalize-trailing-slash.js var require_normalize_trailing_slash = __commonJS({ "node_modules/next/dist/client/normalize-trailing-slash.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "normalizePathTrailingSlash", { enumerable: true, get: function() { return normalizePathTrailingSlash; } }); var _removetrailingslash = require_remove_trailing_slash(); var _parsepath = require_parse_path(); var normalizePathTrailingSlash = (path) => { if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) { return path; } const { pathname, query, hash } = (0, _parsepath.parsePath)(path); if (process.env.__NEXT_TRAILING_SLASH) { if (/\.[^/]+\/?$/.test(pathname)) { return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash; } else if (pathname.endsWith("/")) { return "" + pathname + query + hash; } else { return pathname + "/" + query + hash; } } return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash; }; if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") { Object.defineProperty(exports2.default, "__esModule", { value: true }); Object.assign(exports2.default, exports2); module2.exports = exports2.default; } } }); // node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js var require_path_has_prefix = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "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/next/dist/client/has-base-path.js var require_has_base_path = __commonJS({ "node_modules/next/dist/client/has-base-path.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "hasBasePath", { enumerable: true, get: function() { return hasBasePath; } }); var _pathhasprefix = require_path_has_prefix(); var basePath = process.env.__NEXT_ROUTER_BASEPATH || ""; function hasBasePath(path) { return (0, _pathhasprefix.pathHasPrefix)(path, basePath); } if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") { Object.defineProperty(exports2.default, "__esModule", { value: true }); Object.assign(exports2.default, exports2); module2.exports = exports2.default; } } }); // node_modules/next/dist/shared/lib/router/utils/is-local-url.js var require_is_local_url = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "isLocalURL", { enumerable: true, get: function() { return isLocalURL; } }); var _utils = require_utils(); var _hasbasepath = require_has_base_path(); function isLocalURL(url) { if (!(0, _utils.isAbsoluteUrl)(url)) return true; try { const locationOrigin = (0, _utils.getLocationOrigin)(); const resolved = new URL(url, locationOrigin); return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname); } catch (_) { return false; } } } }); // node_modules/next/dist/shared/lib/router/utils/sorted-routes.js var require_sorted_routes = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { getSortedRouteObjects: function() { return getSortedRouteObjects; }, getSortedRoutes: function() { return getSortedRoutes; } }); var UrlNode = class _UrlNode { insert(urlPath) { this._insert(urlPath.split("/").filter(Boolean), [], false); } smoosh() { return this._smoosh(); } _smoosh(prefix) { if (prefix === void 0) prefix = "/"; const childrenPaths = [ ...this.children.keys() ].sort(); if (this.slugName !== null) { childrenPaths.splice(childrenPaths.indexOf("[]"), 1); } if (this.restSlugName !== null) { childrenPaths.splice(childrenPaths.indexOf("[...]"), 1); } if (this.optionalRestSlugName !== null) { childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1); } const routes = childrenPaths.map((c) => this.children.get(c)._smoosh("" + prefix + c + "/")).reduce((prev, curr) => [ ...prev, ...curr ], []); if (this.slugName !== null) { routes.push(...this.children.get("[]")._smoosh(prefix + "[" + this.slugName + "]/")); } if (!this.placeholder) { const r = prefix === "/" ? "/" : prefix.slice(0, -1); if (this.optionalRestSlugName != null) { throw Object.defineProperty(new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + r + '" and "' + r + "[[..." + this.optionalRestSlugName + ']]").'), "__NEXT_ERROR_CODE", { value: "E458", enumerable: false, configurable: true }); } routes.unshift(r); } if (this.restSlugName !== null) { routes.push(...this.children.get("[...]")._smoosh(prefix + "[..." + this.restSlugName + "]/")); } if (this.optionalRestSlugName !== null) { routes.push(...this.children.get("[[...]]")._smoosh(prefix + "[[..." + this.optionalRestSlugName + "]]/")); } return routes; } _insert(urlPaths, slugNames, isCatchAll) { if (urlPaths.length === 0) { this.placeholder = false; return; } if (isCatchAll) { throw Object.defineProperty(new Error("Catch-all must be the last part of the URL."), "__NEXT_ERROR_CODE", { value: "E392", enumerable: false, configurable: true }); } let nextSegment = urlPaths[0]; if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) { let handleSlug = function(previousSlug, nextSlug) { if (previousSlug !== null) { if (previousSlug !== nextSlug) { throw Object.defineProperty(new Error("You cannot use different slug names for the same dynamic path ('" + previousSlug + "' !== '" + nextSlug + "')."), "__NEXT_ERROR_CODE", { value: "E337", enumerable: false, configurable: true }); } } slugNames.forEach((slug) => { if (slug === nextSlug) { throw Object.defineProperty(new Error('You cannot have the same slug name "' + nextSlug + '" repeat within a single dynamic path'), "__NEXT_ERROR_CODE", { value: "E247", enumerable: false, configurable: true }); } if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) { throw Object.defineProperty(new Error('You cannot have the slug names "' + slug + '" and "' + nextSlug + '" differ only by non-word symbols within a single dynamic path'), "__NEXT_ERROR_CODE", { value: "E499", enumerable: false, configurable: true }); } }); slugNames.push(nextSlug); }; let segmentName = nextSegment.slice(1, -1); let isOptional = false; if (segmentName.startsWith("[") && segmentName.endsWith("]")) { segmentName = segmentName.slice(1, -1); isOptional = true; } if (segmentName.startsWith("\u2026")) { throw Object.defineProperty(new Error("Detected a three-dot character ('\u2026') at ('" + segmentName + "'). Did you mean ('...')?"), "__NEXT_ERROR_CODE", { value: "E147", enumerable: false, configurable: true }); } if (segmentName.startsWith("...")) { segmentName = segmentName.substring(3); isCatchAll = true; } if (segmentName.startsWith("[") || segmentName.endsWith("]")) { throw Object.defineProperty(new Error("Segment names may not start or end with extra brackets ('" + segmentName + "')."), "__NEXT_ERROR_CODE", { value: "E421", enumerable: false, configurable: true }); } if (segmentName.startsWith(".")) { throw Object.defineProperty(new Error("Segment names may not start with erroneous periods ('" + segmentName + "')."), "__NEXT_ERROR_CODE", { value: "E288", enumerable: false, configurable: true }); } if (isCatchAll) { if (isOptional) { if (this.restSlugName != null) { throw Object.defineProperty(new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + urlPaths[0] + '" ).'), "__NEXT_ERROR_CODE", { value: "E299", enumerable: false, configurable: true }); } handleSlug(this.optionalRestSlugName, segmentName); this.optionalRestSlugName = segmentName; nextSegment = "[[...]]"; } else { if (this.optionalRestSlugName != null) { throw Object.defineProperty(new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", { value: "E300", enumerable: false, configurable: true }); } handleSlug(this.restSlugName, segmentName); this.restSlugName = segmentName; nextSegment = "[...]"; } } else { if (isOptional) { throw Object.defineProperty(new Error('Optional route parameters are not yet supported ("' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", { value: "E435", enumerable: false, configurable: true }); } handleSlug(this.slugName, segmentName); this.slugName = segmentName; nextSegment = "[]"; } } if (!this.children.has(nextSegment)) { this.children.set(nextSegment, new _UrlNode()); } this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll); } constructor() { this.placeholder = true; this.children = /* @__PURE__ */ new Map(); this.slugName = null; this.restSlugName = null; this.optionalRestSlugName = null; } }; function getSortedRoutes(normalizedPages) { const root = new UrlNode(); normalizedPages.forEach((pagePath) => root.insert(pagePath)); return root.smoosh(); } function getSortedRouteObjects(objects, getter) { const indexes = {}; const pathnames = []; for (let i = 0; i < objects.length; i++) { const pathname = getter(objects[i]); indexes[pathname] = i; pathnames[i] = pathname; } const sorted = getSortedRoutes(pathnames); return sorted.map((pathname) => objects[indexes[pathname]]); } } }); // node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js var require_ensure_leading_slash = __commonJS({ "node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "ensureLeadingSlash", { enumerable: true, get: function() { return ensureLeadingSlash; } }); function ensureLeadingSlash(path) { return path.startsWith("/") ? path : "/" + path; } } }); // node_modules/next/dist/shared/lib/segment.js var require_segment = __commonJS({ "node_modules/next/dist/shared/lib/segment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { DEFAULT_SEGMENT_KEY: function() { return DEFAULT_SEGMENT_KEY; }, PAGE_SEGMENT_KEY: function() { return PAGE_SEGMENT_KEY; }, addSearchParamsIfPageSegment: function() { return addSearchParamsIfPageSegment; }, isGroupSegment: function() { return isGroupSegment; }, isParallelRouteSegment: function() { return isParallelRouteSegment; } }); function isGroupSegment(segment) { return segment[0] === "(" && segment.endsWith(")"); } function isParallelRouteSegment(segment) { return segment.startsWith("@") && segment !== "@children"; } function addSearchParamsIfPageSegment(segment, searchParams) { const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); if (isPageSegment) { const stringifiedQuery = JSON.stringify(searchParams); return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY; } return segment; } var PAGE_SEGMENT_KEY = "__PAGE__"; var DEFAULT_SEGMENT_KEY = "__DEFAULT__"; } }); // node_modules/next/dist/shared/lib/router/utils/app-paths.js var require_app_paths = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { normalizeAppPath: function() { return normalizeAppPath; }, normalizeRscURL: function() { return normalizeRscURL; } }); var _ensureleadingslash = require_ensure_leading_slash(); var _segment = require_segment(); function normalizeAppPath(route) { return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => { if (!segment) { return pathname; } if ((0, _segment.isGroupSegment)(segment)) { return pathname; } if (segment[0] === "@") { return pathname; } if ((segment === "page" || segment === "route") && index === segments.length - 1) { return pathname; } return pathname + "/" + segment; }, "")); } function normalizeRscURL(url) { return url.replace( /\.rsc($|\?)/, // $1 ensures `?` is preserved "$1" ); } } }); // node_modules/next/dist/shared/lib/router/utils/interception-routes.js var require_interception_routes = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { INTERCEPTION_ROUTE_MARKERS: function() { return INTERCEPTION_ROUTE_MARKERS; }, extractInterceptionRouteInformation: function() { return extractInterceptionRouteInformation; }, isInterceptionRouteAppPath: function() { return isInterceptionRouteAppPath; } }); var _apppaths = require_app_paths(); var INTERCEPTION_ROUTE_MARKERS = [ "(..)(..)", "(.)", "(..)", "(...)" ]; function isInterceptionRouteAppPath(path) { return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0; } function extractInterceptionRouteInformation(path) { let interceptingRoute, marker, interceptedRoute; for (const segment of path.split("/")) { marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m)); if (marker) { ; [interceptingRoute, interceptedRoute] = path.split(marker, 2); break; } } if (!interceptingRoute || !marker || !interceptedRoute) { throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"), "__NEXT_ERROR_CODE", { value: "E269", enumerable: false, configurable: true }); } interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute); switch (marker) { case "(.)": if (interceptingRoute === "/") { interceptedRoute = "/" + interceptedRoute; } else { interceptedRoute = interceptingRoute + "/" + interceptedRoute; } break; case "(..)": if (interceptingRoute === "/") { throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..) marker at the root level, use (.) instead."), "__NEXT_ERROR_CODE", { value: "E207", enumerable: false, configurable: true }); } interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/"); break; case "(...)": interceptedRoute = "/" + interceptedRoute; break; case "(..)(..)": const splitInterceptingRoute = interceptingRoute.split("/"); if (splitInterceptingRoute.length <= 2) { throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..)(..) marker at the root level or one level up."), "__NEXT_ERROR_CODE", { value: "E486", enumerable: false, configurable: true }); } interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/"); break; default: throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", { value: "E112", enumerable: false, configurable: true }); } return { interceptingRoute, interceptedRoute }; } } }); // node_modules/next/dist/shared/lib/router/utils/is-dynamic.js var require_is_dynamic = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "isDynamicRoute", { enumerable: true, get: function() { return isDynamicRoute; } }); var _interceptionroutes = require_interception_routes(); var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/; var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/; function isDynamicRoute(route, strict) { if (strict === void 0) strict = true; if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) { route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute; } if (strict) { return TEST_STRICT_ROUTE.test(route); } return TEST_ROUTE.test(route); } } }); // node_modules/next/dist/shared/lib/router/utils/index.js var require_utils2 = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { getSortedRouteObjects: function() { return _sortedroutes.getSortedRouteObjects; }, getSortedRoutes: function() { return _sortedroutes.getSortedRoutes; }, isDynamicRoute: function() { return _isdynamic.isDynamicRoute; } }); var _sortedroutes = require_sorted_routes(); var _isdynamic = require_is_dynamic(); } }); // node_modules/next/dist/shared/lib/router/utils/route-matcher.js var require_route_matcher = __commonJS({ "node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "getRouteMatcher", { enumerable: true, get: function() { return getRouteMatcher; } }); var _utils = require_utils(); function getRouteMatcher(param) { let { re, groups } = param; return (pathname) => { const routeMatch = re.exec(pathname); if (!routeMatch) return false; const decode = (param2) => { try { return decodeURIComponent(param2); } catch (e) { throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", { value: "E528", enumerable: false, configurable: true }); } }; const params = {}; for (const [key, group] of Object.entries(groups)) { const match = routeMatch[group.pos]; if (match !== void 0) { if (group.repeat) { params[key] = match.split("/").map((entry) => decode(entry)); } else { params[key] = decode(match); } } } return params; }; } } }); // node_modules/next/dist/lib/constants.js var require_constants = __commonJS({ "node_modules/next/dist/lib/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function _export(target, all) { for (var name in all) Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports2, { 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_ALIAS; }, RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() { return RSC_ACTION_CLIENT_WRAPPER_ALIAS; }, RSC_ACTION_ENCRYPTION_ALIAS: function() { return RSC_ACTION_ENCRYPTION_ALIAS; }, RSC_ACTION_PROXY_ALIAS: function() { return RSC_ACTION_PROXY_ALIAS; }, RSC_ACTION_VALIDATE_ALIAS: function() { return RSC_ACTION_VALIDATE_ALIAS; }, RSC_CACHE_WRAPPER_ALIAS: function() { return RSC_CACHE_WRAPPER_ALIAS; }, RSC_MOD_REF_PROXY_ALIAS: function() { return RSC_MOD_REF_PROXY_ALIAS; }, RSC_PREFETCH_SUFFIX: function() { return RSC_PREFETCH_SUFFIX; }, RSC_SEGMENTS_DIR_SUFFIX: function() { return RSC_SEGMENTS_DIR_SUFFIX; }, RSC_SEGMENT_SUFFIX: function() { return RSC_SEGMENT_SUFFIX; }, RSC_SUFFIX: function() { return RSC_SUFFIX; }, SERVER_PROPS_EXPORT_ERROR: function() { return SERVER_PROPS_EXPORT_ERROR; }, SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() { return SERVER_PROPS_GET_INIT_PROPS_CONFLICT; }, SERVER_PROPS_SSG_CONFLICT: function() { return SERVER_PROPS_SSG_CONFLICT; }, SERVER_RUNTIME: function() { return SERVER_RUNTIME; }, SSG_FALLBACK_EXPORT_ERROR: function() { return SSG_FALLBACK_EXPORT_ERROR; }, SSG_GET_INITIAL_PROPS_CONFLICT: function() { return SSG_GET_INITIAL_PROPS_CONFLICT; }, STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() { return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR; }, UNSTABLE_REVALIDATE_RENAME_ERROR: function() { return UNSTABLE_REVALIDATE_RENAME_ERROR; }, WEBPACK_LAYERS: function() { return WEBPACK_LAYERS; }, WEBPACK_RESOURCE_QUERIES: function() { return WEBPACK_RESOURCE_QUERIES; } }); var NEXT_QUERY_PARAM_PREFIX = "nxtP"; var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI"; var MATCHED_PATH_HEADER = "x-matched-path"; var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate"; var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated"; var RSC_PREFETCH_SUFFIX = ".prefetch.rsc"; var RSC_SEGMENTS_DIR_SUFFIX = ".segments"; var RSC_SEGMENT_SUFFIX = ".segment.rsc"; var RSC_SUFFIX = ".rsc"; var ACTION_SUFFIX = ".action"; var NEXT_DATA_SUFFIX = ".json"; var NEXT_META_SUFFIX = ".meta"; var NEXT_BODY_SUFFIX = ".body"; var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags"; var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags"; var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token"; var NEXT_RESUME_HEADER = "next-resume"; var NEXT_CACHE_TAG_MAX_ITEMS = 128; var NEXT_CACHE_TAG_MAX_LENGTH = 256; var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_"; var CACHE_ONE_YEAR = 31536e3; var INFINITE_CACHE = 4294967294; var MIDDLEWARE_FILENAME = "middleware"; var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; var INSTRUMENTATION_HOOK_FILENAME = "instrumentation"; var PAGES_DIR_ALIAS = "private-next-pages"; var DOT_NEXT_ALIAS = "private-dot-next"; var ROOT_DIR_ALIAS = "private-next-root-dir"; var APP_DIR_ALIAS = "private-next-app-dir"; var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy"; var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate"; var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference"; var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper"; var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption"; var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper"; var PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`; var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?"; var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?"; var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead."; var GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; var NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; var SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; var ESLINT_DEFAULT_DIRS = [ "app", "pages", "components", "lib", "src" ]; var SERVER_RUNTIME = { edge: "edge", experimentalEdge: "experimental-edge", nodejs: "nodejs" }; var WEBPACK_LAYERS_NAMES = { /** * The layer for the shared code between the client and server bundles. */ shared: "shared", /** * The layer for server-only runtime and picking up `react-server` export conditions. * Including app router RSC pages and app router custom routes and metadata routes. */ reactServerComponents: "rsc", /** * Server Side Rendering layer for app (ssr). */ serverSideRendering: "ssr",