@lssm/lib.design-system 1.41.0 → 1.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -7
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +0 -14
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +0 -35
- package/dist/node_modules/next/dist/client/add-base-path.js +0 -30
- package/dist/node_modules/next/dist/client/add-locale.js +0 -29
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -26
- package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -41
- package/dist/node_modules/next/dist/client/has-base-path.js +0 -28
- package/dist/node_modules/next/dist/client/link.js +0 -311
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -30
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -34
- package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -44
- package/dist/node_modules/next/dist/client/resolve-href.js +0 -86
- package/dist/node_modules/next/dist/client/use-intersection.js +0 -104
- package/dist/node_modules/next/dist/client/use-merged-ref.js +0 -56
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -372
- package/dist/node_modules/next/dist/lib/constants.js +0 -316
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +0 -69
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -22
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -30
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -41
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -78
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +0 -151
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +0 -77
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -92
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -41
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -26
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -36
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -56
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -26
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +0 -94
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -203
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -167
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -20
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -80
- package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/utils.js +0 -172
- package/dist/node_modules/next/link.js +0 -12
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require__interop_require_wildcard } from "../../../../../../@swc/helpers/cjs/_interop_require_wildcard.js";
|
|
3
|
-
import { require_querystring } from "./querystring.js";
|
|
4
|
-
|
|
5
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/format-url.js
|
|
6
|
-
var require_format_url = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
function _export(target, all) {
|
|
9
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: all[name]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
_export(exports, {
|
|
15
|
-
formatUrl: function() {
|
|
16
|
-
return formatUrl;
|
|
17
|
-
},
|
|
18
|
-
formatWithValidation: function() {
|
|
19
|
-
return formatWithValidation;
|
|
20
|
-
},
|
|
21
|
-
urlObjectKeys: function() {
|
|
22
|
-
return urlObjectKeys;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _querystring = /* @__PURE__ */ require__interop_require_wildcard()._(require_querystring());
|
|
26
|
-
const slashedProtocols = /https?|ftp|gopher|file/;
|
|
27
|
-
function formatUrl(urlObj) {
|
|
28
|
-
let { auth, hostname } = urlObj;
|
|
29
|
-
let protocol = urlObj.protocol || "";
|
|
30
|
-
let pathname = urlObj.pathname || "";
|
|
31
|
-
let hash = urlObj.hash || "";
|
|
32
|
-
let query = urlObj.query || "";
|
|
33
|
-
let host = false;
|
|
34
|
-
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
|
|
35
|
-
if (urlObj.host) host = auth + urlObj.host;
|
|
36
|
-
else if (hostname) {
|
|
37
|
-
host = auth + (~hostname.indexOf(":") ? `[${hostname}]` : hostname);
|
|
38
|
-
if (urlObj.port) host += ":" + urlObj.port;
|
|
39
|
-
}
|
|
40
|
-
if (query && typeof query === "object") query = String(_querystring.urlQueryToSearchParams(query));
|
|
41
|
-
let search = urlObj.search || query && `?${query}` || "";
|
|
42
|
-
if (protocol && !protocol.endsWith(":")) protocol += ":";
|
|
43
|
-
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
|
|
44
|
-
host = "//" + (host || "");
|
|
45
|
-
if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
|
|
46
|
-
} else if (!host) host = "";
|
|
47
|
-
if (hash && hash[0] !== "#") hash = "#" + hash;
|
|
48
|
-
if (search && search[0] !== "?") search = "?" + search;
|
|
49
|
-
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
|
|
50
|
-
search = search.replace("#", "%23");
|
|
51
|
-
return `${protocol}${host}${pathname}${search}${hash}`;
|
|
52
|
-
}
|
|
53
|
-
const urlObjectKeys = [
|
|
54
|
-
"auth",
|
|
55
|
-
"hash",
|
|
56
|
-
"host",
|
|
57
|
-
"hostname",
|
|
58
|
-
"href",
|
|
59
|
-
"path",
|
|
60
|
-
"pathname",
|
|
61
|
-
"port",
|
|
62
|
-
"protocol",
|
|
63
|
-
"query",
|
|
64
|
-
"search",
|
|
65
|
-
"slashes"
|
|
66
|
-
];
|
|
67
|
-
function formatWithValidation(url) {
|
|
68
|
-
if (url !== null && typeof url === "object") Object.keys(url).forEach((key) => {
|
|
69
|
-
if (!urlObjectKeys.includes(key)) console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
|
|
70
|
-
});
|
|
71
|
-
return formatUrl(url);
|
|
72
|
-
}
|
|
73
|
-
}));
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
export default require_format_url();
|
|
77
|
-
|
|
78
|
-
export { require_format_url };
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_invariant_error } from "../../invariant-error.js";
|
|
3
|
-
import { require_parse_loader_tree } from "./parse-loader-tree.js";
|
|
4
|
-
import { require_get_segment_param } from "./get-segment-param.js";
|
|
5
|
-
|
|
6
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
|
|
7
|
-
var require_get_dynamic_param = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
function _export(target, all) {
|
|
10
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: all[name]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
_export(exports, {
|
|
16
|
-
PARAMETER_PATTERN: function() {
|
|
17
|
-
return PARAMETER_PATTERN;
|
|
18
|
-
},
|
|
19
|
-
getDynamicParam: function() {
|
|
20
|
-
return getDynamicParam;
|
|
21
|
-
},
|
|
22
|
-
interpolateParallelRouteParams: function() {
|
|
23
|
-
return interpolateParallelRouteParams;
|
|
24
|
-
},
|
|
25
|
-
parseMatchedParameter: function() {
|
|
26
|
-
return parseMatchedParameter;
|
|
27
|
-
},
|
|
28
|
-
parseParameter: function() {
|
|
29
|
-
return parseParameter;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const _invarianterror = require_invariant_error();
|
|
33
|
-
const _parseloadertree = require_parse_loader_tree();
|
|
34
|
-
const _getsegmentparam = require_get_segment_param();
|
|
35
|
-
/**
|
|
36
|
-
* Gets the value of a param from the params object. This correctly handles the
|
|
37
|
-
* case where the param is a fallback route param and encodes the resulting
|
|
38
|
-
* value.
|
|
39
|
-
*
|
|
40
|
-
* @param interpolatedParams - The params object.
|
|
41
|
-
* @param segmentKey - The key of the segment.
|
|
42
|
-
* @param fallbackRouteParams - The fallback route params.
|
|
43
|
-
* @returns The value of the param.
|
|
44
|
-
*/ function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
|
|
45
|
-
let value = interpolatedParams[segmentKey];
|
|
46
|
-
if (fallbackRouteParams?.has(segmentKey)) {
|
|
47
|
-
const [searchValue] = fallbackRouteParams.get(segmentKey);
|
|
48
|
-
value = searchValue;
|
|
49
|
-
} else if (Array.isArray(value)) value = value.map((i) => encodeURIComponent(i));
|
|
50
|
-
else if (typeof value === "string") value = encodeURIComponent(value);
|
|
51
|
-
return value;
|
|
52
|
-
}
|
|
53
|
-
function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
|
|
54
|
-
const interpolated = structuredClone(params);
|
|
55
|
-
const stack = [{
|
|
56
|
-
tree: loaderTree,
|
|
57
|
-
depth: 0
|
|
58
|
-
}];
|
|
59
|
-
const pathSegments = pagePath.split("/").slice(1);
|
|
60
|
-
while (stack.length > 0) {
|
|
61
|
-
const { tree, depth } = stack.pop();
|
|
62
|
-
const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
|
|
63
|
-
const segmentParam = (0, _getsegmentparam.getSegmentParam)(segment);
|
|
64
|
-
if (segmentParam && !interpolated.hasOwnProperty(segmentParam.param) && !fallbackRouteParams?.has(segmentParam.param)) switch (segmentParam.type) {
|
|
65
|
-
case "catchall":
|
|
66
|
-
case "optional-catchall":
|
|
67
|
-
case "catchall-intercepted-(..)(..)":
|
|
68
|
-
case "catchall-intercepted-(.)":
|
|
69
|
-
case "catchall-intercepted-(..)":
|
|
70
|
-
case "catchall-intercepted-(...)":
|
|
71
|
-
const processedSegments = pathSegments.slice(depth).flatMap((pathSegment) => {
|
|
72
|
-
const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
|
|
73
|
-
return param ? interpolated[param.param] : pathSegment;
|
|
74
|
-
}).filter((s) => s !== void 0);
|
|
75
|
-
if (processedSegments.length > 0) interpolated[segmentParam.param] = processedSegments;
|
|
76
|
-
break;
|
|
77
|
-
case "dynamic":
|
|
78
|
-
case "dynamic-intercepted-(..)(..)":
|
|
79
|
-
case "dynamic-intercepted-(.)":
|
|
80
|
-
case "dynamic-intercepted-(..)":
|
|
81
|
-
case "dynamic-intercepted-(...)":
|
|
82
|
-
if (depth < pathSegments.length) {
|
|
83
|
-
const pathSegment = pathSegments[depth];
|
|
84
|
-
const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
|
|
85
|
-
interpolated[segmentParam.param] = param ? interpolated[param.param] : pathSegment;
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
default: segmentParam.type;
|
|
89
|
-
}
|
|
90
|
-
let nextDepth = depth;
|
|
91
|
-
if (!(segment.startsWith("(") && segment.endsWith(")")) && segment !== "") nextDepth++;
|
|
92
|
-
for (const route of Object.values(parallelRoutes)) stack.push({
|
|
93
|
-
tree: route,
|
|
94
|
-
depth: nextDepth
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return interpolated;
|
|
98
|
-
}
|
|
99
|
-
function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams) {
|
|
100
|
-
let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
|
|
101
|
-
if (!value || value.length === 0) {
|
|
102
|
-
if (dynamicParamType === "oc") return {
|
|
103
|
-
param: segmentKey,
|
|
104
|
-
value: null,
|
|
105
|
-
type: dynamicParamType,
|
|
106
|
-
treeSegment: [
|
|
107
|
-
segmentKey,
|
|
108
|
-
"",
|
|
109
|
-
dynamicParamType
|
|
110
|
-
]
|
|
111
|
-
};
|
|
112
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
|
|
113
|
-
value: "E864",
|
|
114
|
-
enumerable: false,
|
|
115
|
-
configurable: true
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
param: segmentKey,
|
|
120
|
-
value,
|
|
121
|
-
treeSegment: [
|
|
122
|
-
segmentKey,
|
|
123
|
-
Array.isArray(value) ? value.join("/") : value,
|
|
124
|
-
dynamicParamType
|
|
125
|
-
],
|
|
126
|
-
type: dynamicParamType
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
const PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
|
|
130
|
-
function parseParameter(param) {
|
|
131
|
-
const match = param.match(PARAMETER_PATTERN);
|
|
132
|
-
if (!match) return parseMatchedParameter(param);
|
|
133
|
-
return parseMatchedParameter(match[2]);
|
|
134
|
-
}
|
|
135
|
-
function parseMatchedParameter(param) {
|
|
136
|
-
const optional = param.startsWith("[") && param.endsWith("]");
|
|
137
|
-
if (optional) param = param.slice(1, -1);
|
|
138
|
-
const repeat = param.startsWith("...");
|
|
139
|
-
if (repeat) param = param.slice(3);
|
|
140
|
-
return {
|
|
141
|
-
key: param,
|
|
142
|
-
repeat,
|
|
143
|
-
optional
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}));
|
|
147
|
-
|
|
148
|
-
//#endregion
|
|
149
|
-
export default require_get_dynamic_param();
|
|
150
|
-
|
|
151
|
-
export { require_get_dynamic_param };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_interception_routes } from "./interception-routes.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/get-segment-param.js
|
|
5
|
-
var require_get_segment_param = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
function _export(target, all) {
|
|
8
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: all[name]
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
_export(exports, {
|
|
14
|
-
getParamProperties: function() {
|
|
15
|
-
return getParamProperties;
|
|
16
|
-
},
|
|
17
|
-
getSegmentParam: function() {
|
|
18
|
-
return getSegmentParam;
|
|
19
|
-
},
|
|
20
|
-
isCatchAll: function() {
|
|
21
|
-
return isCatchAll;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const _interceptionroutes = require_interception_routes();
|
|
25
|
-
function getSegmentParam(segment) {
|
|
26
|
-
const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker) => segment.startsWith(marker));
|
|
27
|
-
if (interceptionMarker) segment = segment.slice(interceptionMarker.length);
|
|
28
|
-
if (segment.startsWith("[[...") && segment.endsWith("]]")) return {
|
|
29
|
-
type: "optional-catchall",
|
|
30
|
-
param: segment.slice(5, -2)
|
|
31
|
-
};
|
|
32
|
-
if (segment.startsWith("[...") && segment.endsWith("]")) return {
|
|
33
|
-
type: interceptionMarker ? `catchall-intercepted-${interceptionMarker}` : "catchall",
|
|
34
|
-
param: segment.slice(4, -1)
|
|
35
|
-
};
|
|
36
|
-
if (segment.startsWith("[") && segment.endsWith("]")) return {
|
|
37
|
-
type: interceptionMarker ? `dynamic-intercepted-${interceptionMarker}` : "dynamic",
|
|
38
|
-
param: segment.slice(1, -1)
|
|
39
|
-
};
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
function isCatchAll(type) {
|
|
43
|
-
return type === "catchall" || type === "catchall-intercepted-(..)(..)" || type === "catchall-intercepted-(.)" || type === "catchall-intercepted-(..)" || type === "catchall-intercepted-(...)" || type === "optional-catchall";
|
|
44
|
-
}
|
|
45
|
-
function getParamProperties(paramType) {
|
|
46
|
-
let repeat = false;
|
|
47
|
-
let optional = false;
|
|
48
|
-
switch (paramType) {
|
|
49
|
-
case "catchall":
|
|
50
|
-
case "catchall-intercepted-(..)(..)":
|
|
51
|
-
case "catchall-intercepted-(.)":
|
|
52
|
-
case "catchall-intercepted-(..)":
|
|
53
|
-
case "catchall-intercepted-(...)":
|
|
54
|
-
repeat = true;
|
|
55
|
-
break;
|
|
56
|
-
case "optional-catchall":
|
|
57
|
-
repeat = true;
|
|
58
|
-
optional = true;
|
|
59
|
-
break;
|
|
60
|
-
case "dynamic":
|
|
61
|
-
case "dynamic-intercepted-(..)(..)":
|
|
62
|
-
case "dynamic-intercepted-(.)":
|
|
63
|
-
case "dynamic-intercepted-(..)":
|
|
64
|
-
case "dynamic-intercepted-(...)": break;
|
|
65
|
-
default:
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
repeat,
|
|
69
|
-
optional
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}));
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
export default require_get_segment_param();
|
|
76
|
-
|
|
77
|
-
export { require_get_segment_param };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_sorted_routes } from "./sorted-routes.js";
|
|
3
|
-
import { require_is_dynamic } from "./is-dynamic.js";
|
|
4
|
-
|
|
5
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/index.js
|
|
6
|
-
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
function _export(target, all) {
|
|
9
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: all[name]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
_export(exports, {
|
|
15
|
-
getSortedRouteObjects: function() {
|
|
16
|
-
return _sortedroutes.getSortedRouteObjects;
|
|
17
|
-
},
|
|
18
|
-
getSortedRoutes: function() {
|
|
19
|
-
return _sortedroutes.getSortedRoutes;
|
|
20
|
-
},
|
|
21
|
-
isDynamicRoute: function() {
|
|
22
|
-
return _isdynamic.isDynamicRoute;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _sortedroutes = require_sorted_routes();
|
|
26
|
-
const _isdynamic = require_is_dynamic();
|
|
27
|
-
}));
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export default require_utils();
|
|
31
|
-
|
|
32
|
-
export { require_utils };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_app_paths } from "./app-paths.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js
|
|
5
|
-
var require_interception_routes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
function _export(target, all) {
|
|
8
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: all[name]
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
_export(exports, {
|
|
14
|
-
INTERCEPTION_ROUTE_MARKERS: function() {
|
|
15
|
-
return INTERCEPTION_ROUTE_MARKERS;
|
|
16
|
-
},
|
|
17
|
-
extractInterceptionRouteInformation: function() {
|
|
18
|
-
return extractInterceptionRouteInformation;
|
|
19
|
-
},
|
|
20
|
-
isInterceptionRouteAppPath: function() {
|
|
21
|
-
return isInterceptionRouteAppPath;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const _apppaths = require_app_paths();
|
|
25
|
-
const INTERCEPTION_ROUTE_MARKERS = [
|
|
26
|
-
"(..)(..)",
|
|
27
|
-
"(.)",
|
|
28
|
-
"(..)",
|
|
29
|
-
"(...)"
|
|
30
|
-
];
|
|
31
|
-
function isInterceptionRouteAppPath(path) {
|
|
32
|
-
return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
|
|
33
|
-
}
|
|
34
|
-
function extractInterceptionRouteInformation(path) {
|
|
35
|
-
let interceptingRoute;
|
|
36
|
-
let marker;
|
|
37
|
-
let interceptedRoute;
|
|
38
|
-
for (const segment of path.split("/")) {
|
|
39
|
-
marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
|
|
40
|
-
if (marker) {
|
|
41
|
-
[interceptingRoute, interceptedRoute] = path.split(marker, 2);
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (!interceptingRoute || !marker || !interceptedRoute) throw Object.defineProperty(/* @__PURE__ */ new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`), "__NEXT_ERROR_CODE", {
|
|
46
|
-
value: "E269",
|
|
47
|
-
enumerable: false,
|
|
48
|
-
configurable: true
|
|
49
|
-
});
|
|
50
|
-
interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
|
|
51
|
-
switch (marker) {
|
|
52
|
-
case "(.)":
|
|
53
|
-
if (interceptingRoute === "/") interceptedRoute = `/${interceptedRoute}`;
|
|
54
|
-
else interceptedRoute = interceptingRoute + "/" + interceptedRoute;
|
|
55
|
-
break;
|
|
56
|
-
case "(..)":
|
|
57
|
-
if (interceptingRoute === "/") throw Object.defineProperty(/* @__PURE__ */ new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`), "__NEXT_ERROR_CODE", {
|
|
58
|
-
value: "E207",
|
|
59
|
-
enumerable: false,
|
|
60
|
-
configurable: true
|
|
61
|
-
});
|
|
62
|
-
interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
|
|
63
|
-
break;
|
|
64
|
-
case "(...)":
|
|
65
|
-
interceptedRoute = "/" + interceptedRoute;
|
|
66
|
-
break;
|
|
67
|
-
case "(..)(..)":
|
|
68
|
-
const splitInterceptingRoute = interceptingRoute.split("/");
|
|
69
|
-
if (splitInterceptingRoute.length <= 2) throw Object.defineProperty(/* @__PURE__ */ new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`), "__NEXT_ERROR_CODE", {
|
|
70
|
-
value: "E486",
|
|
71
|
-
enumerable: false,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
|
|
75
|
-
break;
|
|
76
|
-
default: throw Object.defineProperty(/* @__PURE__ */ new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
|
|
77
|
-
value: "E112",
|
|
78
|
-
enumerable: false,
|
|
79
|
-
configurable: true
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
interceptingRoute,
|
|
84
|
-
interceptedRoute
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}));
|
|
88
|
-
|
|
89
|
-
//#endregion
|
|
90
|
-
export default require_interception_routes();
|
|
91
|
-
|
|
92
|
-
export { require_interception_routes };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_route_matcher } from "./route-matcher.js";
|
|
3
|
-
import { require_route_regex } from "./route-regex.js";
|
|
4
|
-
|
|
5
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
|
|
6
|
-
var require_interpolate_as = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
Object.defineProperty(exports, "interpolateAs", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return interpolateAs;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _routematcher = require_route_matcher();
|
|
15
|
-
const _routeregex = require_route_regex();
|
|
16
|
-
function interpolateAs(route, asPathname, query) {
|
|
17
|
-
let interpolatedRoute = "";
|
|
18
|
-
const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
|
|
19
|
-
const dynamicGroups = dynamicRegex.groups;
|
|
20
|
-
const dynamicMatches = (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || query;
|
|
21
|
-
interpolatedRoute = route;
|
|
22
|
-
const params = Object.keys(dynamicGroups);
|
|
23
|
-
if (!params.every((param) => {
|
|
24
|
-
let value = dynamicMatches[param] || "";
|
|
25
|
-
const { repeat, optional } = dynamicGroups[param];
|
|
26
|
-
let replaced = `[${repeat ? "..." : ""}${param}]`;
|
|
27
|
-
if (optional) replaced = `${!value ? "/" : ""}[${replaced}]`;
|
|
28
|
-
if (repeat && !Array.isArray(value)) value = [value];
|
|
29
|
-
return (optional || param in dynamicMatches) && (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map((segment) => encodeURIComponent(segment)).join("/") : encodeURIComponent(value)) || "/");
|
|
30
|
-
})) interpolatedRoute = "";
|
|
31
|
-
return {
|
|
32
|
-
params,
|
|
33
|
-
result: interpolatedRoute
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
export default require_interpolate_as();
|
|
40
|
-
|
|
41
|
-
export { require_interpolate_as };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_interception_routes } from "./interception-routes.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
|
|
5
|
-
var require_is_dynamic = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
Object.defineProperty(exports, "isDynamicRoute", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function() {
|
|
10
|
-
return isDynamicRoute;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const _interceptionroutes = require_interception_routes();
|
|
14
|
-
const TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
|
|
15
|
-
const TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
|
|
16
|
-
function isDynamicRoute(route, strict = true) {
|
|
17
|
-
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
|
|
18
|
-
if (strict) return TEST_STRICT_ROUTE.test(route);
|
|
19
|
-
return TEST_ROUTE.test(route);
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
export default require_is_dynamic();
|
|
25
|
-
|
|
26
|
-
export { require_is_dynamic };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_utils } from "../../utils.js";
|
|
3
|
-
import { require_has_base_path } from "../../../../client/has-base-path.js";
|
|
4
|
-
|
|
5
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/is-local-url.js
|
|
6
|
-
var require_is_local_url = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
Object.defineProperty(exports, "isLocalURL", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return isLocalURL;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _utils = require_utils();
|
|
15
|
-
const _hasbasepath = require_has_base_path();
|
|
16
|
-
function isLocalURL(url) {
|
|
17
|
-
if (!(0, _utils.isAbsoluteUrl)(url)) return true;
|
|
18
|
-
try {
|
|
19
|
-
const locationOrigin = (0, _utils.getLocationOrigin)();
|
|
20
|
-
const resolved = new URL(url, locationOrigin);
|
|
21
|
-
return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
|
|
22
|
-
} catch (_) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export default require_is_local_url();
|
|
30
|
-
|
|
31
|
-
export { require_is_local_url };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
|
|
3
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/omit.js
|
|
4
|
-
var require_omit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
Object.defineProperty(exports, "omit", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return omit;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
function omit(object, keys) {
|
|
13
|
-
const omitted = {};
|
|
14
|
-
Object.keys(object).forEach((key) => {
|
|
15
|
-
if (!keys.includes(key)) omitted[key] = object[key];
|
|
16
|
-
});
|
|
17
|
-
return omitted;
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export default require_omit();
|
|
23
|
-
|
|
24
|
-
export { require_omit };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_segment } from "../../segment.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js
|
|
5
|
-
var require_parse_loader_tree = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
Object.defineProperty(exports, "parseLoaderTree", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function() {
|
|
10
|
-
return parseLoaderTree;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const _segment = require_segment();
|
|
14
|
-
function parseLoaderTree(tree) {
|
|
15
|
-
const [segment, parallelRoutes, modules] = tree;
|
|
16
|
-
const { layout, template } = modules;
|
|
17
|
-
let { page } = modules;
|
|
18
|
-
page = segment === _segment.DEFAULT_SEGMENT_KEY ? modules.defaultPage : page;
|
|
19
|
-
const conventionPath = layout?.[1] || template?.[1] || page?.[1];
|
|
20
|
-
return {
|
|
21
|
-
page,
|
|
22
|
-
segment,
|
|
23
|
-
modules,
|
|
24
|
-
conventionPath,
|
|
25
|
-
parallelRoutes
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export default require_parse_loader_tree();
|
|
32
|
-
|
|
33
|
-
export { require_parse_loader_tree };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
|
|
3
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/parse-path.js
|
|
4
|
-
/**
|
|
5
|
-
* Given a path this function will find the pathname, query and hash and return
|
|
6
|
-
* them. This is useful to parse full paths on the client side.
|
|
7
|
-
* @param path A path to parse e.g. /foo/bar?id=1#hash
|
|
8
|
-
*/ var require_parse_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
Object.defineProperty(exports, "parsePath", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function() {
|
|
13
|
-
return parsePath;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
function parsePath(path) {
|
|
17
|
-
const hashIndex = path.indexOf("#");
|
|
18
|
-
const queryIndex = path.indexOf("?");
|
|
19
|
-
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
|
|
20
|
-
if (hasQuery || hashIndex > -1) return {
|
|
21
|
-
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
|
|
22
|
-
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
|
|
23
|
-
hash: hashIndex > -1 ? path.slice(hashIndex) : ""
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
pathname: path,
|
|
27
|
-
query: "",
|
|
28
|
-
hash: ""
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}));
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export default require_parse_path();
|
|
35
|
-
|
|
36
|
-
export { require_parse_path };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_parse_path } from "./parse-path.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
|
|
5
|
-
var require_path_has_prefix = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
Object.defineProperty(exports, "pathHasPrefix", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function() {
|
|
10
|
-
return pathHasPrefix;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const _parsepath = require_parse_path();
|
|
14
|
-
function pathHasPrefix(path, prefix) {
|
|
15
|
-
if (typeof path !== "string") return false;
|
|
16
|
-
const { pathname } = (0, _parsepath.parsePath)(path);
|
|
17
|
-
return pathname === prefix || pathname.startsWith(prefix + "/");
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export default require_path_has_prefix();
|
|
23
|
-
|
|
24
|
-
export { require_path_has_prefix };
|