next-tinacms-azure 0.0.0-ed3db71-20250205054832
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/LICENSE +176 -0
- package/README.md +165 -0
- package/dist/auth.d.ts +3 -0
- package/dist/auth.js +3567 -0
- package/dist/azure-media-store.d.ts +15 -0
- package/dist/azure-tina-cloud-media-store.d.ts +28 -0
- package/dist/delivery-handlers.d.ts +11 -0
- package/dist/delivery-handlers.js +1854 -0
- package/dist/errors.d.ts +21 -0
- package/dist/handlers.d.ts +13 -0
- package/dist/handlers.js +1833 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +149 -0
- package/dist/index.mjs +146 -0
- package/dist/types.d.ts +6 -0
- package/package.json +59 -0
|
@@ -0,0 +1,1854 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
|
|
32
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
|
|
33
|
+
var require_detect_domain_locale = __commonJS({
|
|
34
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports2) {
|
|
35
|
+
"use strict";
|
|
36
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
37
|
+
value: true
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports2, "detectDomainLocale", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function() {
|
|
42
|
+
return detectDomainLocale;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
function detectDomainLocale(domainItems, hostname, detectedLocale) {
|
|
46
|
+
if (!domainItems) return;
|
|
47
|
+
if (detectedLocale) {
|
|
48
|
+
detectedLocale = detectedLocale.toLowerCase();
|
|
49
|
+
}
|
|
50
|
+
for (const item of domainItems) {
|
|
51
|
+
var _item_domain, _item_locales;
|
|
52
|
+
const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
|
|
53
|
+
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) {
|
|
54
|
+
return item;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
|
|
62
|
+
var require_remove_trailing_slash = __commonJS({
|
|
63
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports2) {
|
|
64
|
+
"use strict";
|
|
65
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
66
|
+
value: true
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports2, "removeTrailingSlash", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function() {
|
|
71
|
+
return removeTrailingSlash;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
function removeTrailingSlash(route) {
|
|
75
|
+
return route.replace(/\/$/, "") || "/";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/parse-path.js
|
|
81
|
+
var require_parse_path = __commonJS({
|
|
82
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports2) {
|
|
83
|
+
"use strict";
|
|
84
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
85
|
+
value: true
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports2, "parsePath", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function() {
|
|
90
|
+
return parsePath;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
function parsePath(path) {
|
|
94
|
+
const hashIndex = path.indexOf("#");
|
|
95
|
+
const queryIndex = path.indexOf("?");
|
|
96
|
+
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
|
|
97
|
+
if (hasQuery || hashIndex > -1) {
|
|
98
|
+
return {
|
|
99
|
+
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
|
|
100
|
+
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
|
|
101
|
+
hash: hashIndex > -1 ? path.slice(hashIndex) : ""
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
pathname: path,
|
|
106
|
+
query: "",
|
|
107
|
+
hash: ""
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
|
|
114
|
+
var require_add_path_prefix = __commonJS({
|
|
115
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports2) {
|
|
116
|
+
"use strict";
|
|
117
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
118
|
+
value: true
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports2, "addPathPrefix", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function() {
|
|
123
|
+
return addPathPrefix;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
var _parsepath = require_parse_path();
|
|
127
|
+
function addPathPrefix(path, prefix) {
|
|
128
|
+
if (!path.startsWith("/") || !prefix) {
|
|
129
|
+
return path;
|
|
130
|
+
}
|
|
131
|
+
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
132
|
+
return "" + prefix + pathname + query + hash;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js
|
|
138
|
+
var require_add_path_suffix = __commonJS({
|
|
139
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js"(exports2) {
|
|
140
|
+
"use strict";
|
|
141
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
142
|
+
value: true
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports2, "addPathSuffix", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function() {
|
|
147
|
+
return addPathSuffix;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
var _parsepath = require_parse_path();
|
|
151
|
+
function addPathSuffix(path, suffix) {
|
|
152
|
+
if (!path.startsWith("/") || !suffix) {
|
|
153
|
+
return path;
|
|
154
|
+
}
|
|
155
|
+
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
156
|
+
return "" + pathname + suffix + query + hash;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
|
|
162
|
+
var require_path_has_prefix = __commonJS({
|
|
163
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports2) {
|
|
164
|
+
"use strict";
|
|
165
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
166
|
+
value: true
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports2, "pathHasPrefix", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function() {
|
|
171
|
+
return pathHasPrefix;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
var _parsepath = require_parse_path();
|
|
175
|
+
function pathHasPrefix(path, prefix) {
|
|
176
|
+
if (typeof path !== "string") {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
const { pathname } = (0, _parsepath.parsePath)(path);
|
|
180
|
+
return pathname === prefix || pathname.startsWith(prefix + "/");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/add-locale.js
|
|
186
|
+
var require_add_locale = __commonJS({
|
|
187
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports2) {
|
|
188
|
+
"use strict";
|
|
189
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
190
|
+
value: true
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports2, "addLocale", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function() {
|
|
195
|
+
return addLocale;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
var _addpathprefix = require_add_path_prefix();
|
|
199
|
+
var _pathhasprefix = require_path_has_prefix();
|
|
200
|
+
function addLocale(path, locale, defaultLocale, ignorePrefix) {
|
|
201
|
+
if (!locale || locale === defaultLocale) return path;
|
|
202
|
+
const lower = path.toLowerCase();
|
|
203
|
+
if (!ignorePrefix) {
|
|
204
|
+
if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
|
|
205
|
+
if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase())) return path;
|
|
206
|
+
}
|
|
207
|
+
return (0, _addpathprefix.addPathPrefix)(path, "/" + locale);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js
|
|
213
|
+
var require_format_next_pathname_info = __commonJS({
|
|
214
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js"(exports2) {
|
|
215
|
+
"use strict";
|
|
216
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
217
|
+
value: true
|
|
218
|
+
});
|
|
219
|
+
Object.defineProperty(exports2, "formatNextPathnameInfo", {
|
|
220
|
+
enumerable: true,
|
|
221
|
+
get: function() {
|
|
222
|
+
return formatNextPathnameInfo;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
var _removetrailingslash = require_remove_trailing_slash();
|
|
226
|
+
var _addpathprefix = require_add_path_prefix();
|
|
227
|
+
var _addpathsuffix = require_add_path_suffix();
|
|
228
|
+
var _addlocale = require_add_locale();
|
|
229
|
+
function formatNextPathnameInfo(info) {
|
|
230
|
+
let pathname = (0, _addlocale.addLocale)(info.pathname, info.locale, info.buildId ? void 0 : info.defaultLocale, info.ignorePrefix);
|
|
231
|
+
if (info.buildId || !info.trailingSlash) {
|
|
232
|
+
pathname = (0, _removetrailingslash.removeTrailingSlash)(pathname);
|
|
233
|
+
}
|
|
234
|
+
if (info.buildId) {
|
|
235
|
+
pathname = (0, _addpathsuffix.addPathSuffix)((0, _addpathprefix.addPathPrefix)(pathname, "/_next/data/" + info.buildId), info.pathname === "/" ? "index.json" : ".json");
|
|
236
|
+
}
|
|
237
|
+
pathname = (0, _addpathprefix.addPathPrefix)(pathname, info.basePath);
|
|
238
|
+
return !info.buildId && info.trailingSlash ? !pathname.endsWith("/") ? (0, _addpathsuffix.addPathSuffix)(pathname, "/") : pathname : (0, _removetrailingslash.removeTrailingSlash)(pathname);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/get-hostname.js
|
|
244
|
+
var require_get_hostname = __commonJS({
|
|
245
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/get-hostname.js"(exports2) {
|
|
246
|
+
"use strict";
|
|
247
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
248
|
+
value: true
|
|
249
|
+
});
|
|
250
|
+
Object.defineProperty(exports2, "getHostname", {
|
|
251
|
+
enumerable: true,
|
|
252
|
+
get: function() {
|
|
253
|
+
return getHostname;
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
function getHostname(parsed, headers) {
|
|
257
|
+
let hostname;
|
|
258
|
+
if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) {
|
|
259
|
+
hostname = headers.host.toString().split(":", 1)[0];
|
|
260
|
+
} else if (parsed.hostname) {
|
|
261
|
+
hostname = parsed.hostname;
|
|
262
|
+
} else return;
|
|
263
|
+
return hostname.toLowerCase();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
|
|
269
|
+
var require_normalize_locale_path = __commonJS({
|
|
270
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports2) {
|
|
271
|
+
"use strict";
|
|
272
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
273
|
+
value: true
|
|
274
|
+
});
|
|
275
|
+
Object.defineProperty(exports2, "normalizeLocalePath", {
|
|
276
|
+
enumerable: true,
|
|
277
|
+
get: function() {
|
|
278
|
+
return normalizeLocalePath;
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
function normalizeLocalePath(pathname, locales) {
|
|
282
|
+
let detectedLocale;
|
|
283
|
+
const pathnameParts = pathname.split("/");
|
|
284
|
+
(locales || []).some((locale) => {
|
|
285
|
+
if (pathnameParts[1] && pathnameParts[1].toLowerCase() === locale.toLowerCase()) {
|
|
286
|
+
detectedLocale = locale;
|
|
287
|
+
pathnameParts.splice(1, 1);
|
|
288
|
+
pathname = pathnameParts.join("/") || "/";
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
return false;
|
|
292
|
+
});
|
|
293
|
+
return {
|
|
294
|
+
pathname,
|
|
295
|
+
detectedLocale
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js
|
|
302
|
+
var require_remove_path_prefix = __commonJS({
|
|
303
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js"(exports2) {
|
|
304
|
+
"use strict";
|
|
305
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
306
|
+
value: true
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(exports2, "removePathPrefix", {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function() {
|
|
311
|
+
return removePathPrefix;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
var _pathhasprefix = require_path_has_prefix();
|
|
315
|
+
function removePathPrefix(path, prefix) {
|
|
316
|
+
if (!(0, _pathhasprefix.pathHasPrefix)(path, prefix)) {
|
|
317
|
+
return path;
|
|
318
|
+
}
|
|
319
|
+
const withoutPrefix = path.slice(prefix.length);
|
|
320
|
+
if (withoutPrefix.startsWith("/")) {
|
|
321
|
+
return withoutPrefix;
|
|
322
|
+
}
|
|
323
|
+
return "/" + withoutPrefix;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js
|
|
329
|
+
var require_get_next_pathname_info = __commonJS({
|
|
330
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js"(exports2) {
|
|
331
|
+
"use strict";
|
|
332
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
333
|
+
value: true
|
|
334
|
+
});
|
|
335
|
+
Object.defineProperty(exports2, "getNextPathnameInfo", {
|
|
336
|
+
enumerable: true,
|
|
337
|
+
get: function() {
|
|
338
|
+
return getNextPathnameInfo;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
var _normalizelocalepath = require_normalize_locale_path();
|
|
342
|
+
var _removepathprefix = require_remove_path_prefix();
|
|
343
|
+
var _pathhasprefix = require_path_has_prefix();
|
|
344
|
+
function getNextPathnameInfo(pathname, options) {
|
|
345
|
+
var _options_nextConfig;
|
|
346
|
+
const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {};
|
|
347
|
+
const info = {
|
|
348
|
+
pathname,
|
|
349
|
+
trailingSlash: pathname !== "/" ? pathname.endsWith("/") : trailingSlash
|
|
350
|
+
};
|
|
351
|
+
if (basePath && (0, _pathhasprefix.pathHasPrefix)(info.pathname, basePath)) {
|
|
352
|
+
info.pathname = (0, _removepathprefix.removePathPrefix)(info.pathname, basePath);
|
|
353
|
+
info.basePath = basePath;
|
|
354
|
+
}
|
|
355
|
+
let pathnameNoDataPrefix = info.pathname;
|
|
356
|
+
if (info.pathname.startsWith("/_next/data/") && info.pathname.endsWith(".json")) {
|
|
357
|
+
const paths = info.pathname.replace(/^\/_next\/data\//, "").replace(/\.json$/, "").split("/");
|
|
358
|
+
const buildId = paths[0];
|
|
359
|
+
info.buildId = buildId;
|
|
360
|
+
pathnameNoDataPrefix = paths[1] !== "index" ? "/" + paths.slice(1).join("/") : "/";
|
|
361
|
+
if (options.parseData === true) {
|
|
362
|
+
info.pathname = pathnameNoDataPrefix;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (i18n) {
|
|
366
|
+
let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : (0, _normalizelocalepath.normalizeLocalePath)(info.pathname, i18n.locales);
|
|
367
|
+
info.locale = result.detectedLocale;
|
|
368
|
+
var _result_pathname;
|
|
369
|
+
info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname;
|
|
370
|
+
if (!result.detectedLocale && info.buildId) {
|
|
371
|
+
result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : (0, _normalizelocalepath.normalizeLocalePath)(pathnameNoDataPrefix, i18n.locales);
|
|
372
|
+
if (result.detectedLocale) {
|
|
373
|
+
info.locale = result.detectedLocale;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return info;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/next-url.js
|
|
383
|
+
var require_next_url = __commonJS({
|
|
384
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/next-url.js"(exports2) {
|
|
385
|
+
"use strict";
|
|
386
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
387
|
+
value: true
|
|
388
|
+
});
|
|
389
|
+
Object.defineProperty(exports2, "NextURL", {
|
|
390
|
+
enumerable: true,
|
|
391
|
+
get: function() {
|
|
392
|
+
return NextURL;
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
var _detectdomainlocale = require_detect_domain_locale();
|
|
396
|
+
var _formatnextpathnameinfo = require_format_next_pathname_info();
|
|
397
|
+
var _gethostname = require_get_hostname();
|
|
398
|
+
var _getnextpathnameinfo = require_get_next_pathname_info();
|
|
399
|
+
var REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
|
|
400
|
+
function parseURL(url, base) {
|
|
401
|
+
return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, "localhost"), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, "localhost"));
|
|
402
|
+
}
|
|
403
|
+
var Internal = Symbol("NextURLInternal");
|
|
404
|
+
var NextURL = class _NextURL {
|
|
405
|
+
constructor(input, baseOrOpts, opts) {
|
|
406
|
+
let base;
|
|
407
|
+
let options;
|
|
408
|
+
if (typeof baseOrOpts === "object" && "pathname" in baseOrOpts || typeof baseOrOpts === "string") {
|
|
409
|
+
base = baseOrOpts;
|
|
410
|
+
options = opts || {};
|
|
411
|
+
} else {
|
|
412
|
+
options = opts || baseOrOpts || {};
|
|
413
|
+
}
|
|
414
|
+
this[Internal] = {
|
|
415
|
+
url: parseURL(input, base != null ? base : options.base),
|
|
416
|
+
options,
|
|
417
|
+
basePath: ""
|
|
418
|
+
};
|
|
419
|
+
this.analyze();
|
|
420
|
+
}
|
|
421
|
+
analyze() {
|
|
422
|
+
var _a, _b;
|
|
423
|
+
var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;
|
|
424
|
+
const info = (0, _getnextpathnameinfo.getNextPathnameInfo)(this[Internal].url.pathname, {
|
|
425
|
+
nextConfig: this[Internal].options.nextConfig,
|
|
426
|
+
parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,
|
|
427
|
+
i18nProvider: this[Internal].options.i18nProvider
|
|
428
|
+
});
|
|
429
|
+
const hostname = (0, _gethostname.getHostname)(this[Internal].url, this[Internal].options.headers);
|
|
430
|
+
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);
|
|
431
|
+
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);
|
|
432
|
+
this[Internal].url.pathname = info.pathname;
|
|
433
|
+
this[Internal].defaultLocale = defaultLocale;
|
|
434
|
+
this[Internal].basePath = (_a = info.basePath) != null ? _a : "";
|
|
435
|
+
this[Internal].buildId = info.buildId;
|
|
436
|
+
this[Internal].locale = (_b = info.locale) != null ? _b : defaultLocale;
|
|
437
|
+
this[Internal].trailingSlash = info.trailingSlash;
|
|
438
|
+
}
|
|
439
|
+
formatPathname() {
|
|
440
|
+
return (0, _formatnextpathnameinfo.formatNextPathnameInfo)({
|
|
441
|
+
basePath: this[Internal].basePath,
|
|
442
|
+
buildId: this[Internal].buildId,
|
|
443
|
+
defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : void 0,
|
|
444
|
+
locale: this[Internal].locale,
|
|
445
|
+
pathname: this[Internal].url.pathname,
|
|
446
|
+
trailingSlash: this[Internal].trailingSlash
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
formatSearch() {
|
|
450
|
+
return this[Internal].url.search;
|
|
451
|
+
}
|
|
452
|
+
get buildId() {
|
|
453
|
+
return this[Internal].buildId;
|
|
454
|
+
}
|
|
455
|
+
set buildId(buildId) {
|
|
456
|
+
this[Internal].buildId = buildId;
|
|
457
|
+
}
|
|
458
|
+
get locale() {
|
|
459
|
+
var _a;
|
|
460
|
+
return (_a = this[Internal].locale) != null ? _a : "";
|
|
461
|
+
}
|
|
462
|
+
set locale(locale) {
|
|
463
|
+
var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;
|
|
464
|
+
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))) {
|
|
465
|
+
throw new TypeError(`The NextURL configuration includes no locale "${locale}"`);
|
|
466
|
+
}
|
|
467
|
+
this[Internal].locale = locale;
|
|
468
|
+
}
|
|
469
|
+
get defaultLocale() {
|
|
470
|
+
return this[Internal].defaultLocale;
|
|
471
|
+
}
|
|
472
|
+
get domainLocale() {
|
|
473
|
+
return this[Internal].domainLocale;
|
|
474
|
+
}
|
|
475
|
+
get searchParams() {
|
|
476
|
+
return this[Internal].url.searchParams;
|
|
477
|
+
}
|
|
478
|
+
get host() {
|
|
479
|
+
return this[Internal].url.host;
|
|
480
|
+
}
|
|
481
|
+
set host(value) {
|
|
482
|
+
this[Internal].url.host = value;
|
|
483
|
+
}
|
|
484
|
+
get hostname() {
|
|
485
|
+
return this[Internal].url.hostname;
|
|
486
|
+
}
|
|
487
|
+
set hostname(value) {
|
|
488
|
+
this[Internal].url.hostname = value;
|
|
489
|
+
}
|
|
490
|
+
get port() {
|
|
491
|
+
return this[Internal].url.port;
|
|
492
|
+
}
|
|
493
|
+
set port(value) {
|
|
494
|
+
this[Internal].url.port = value;
|
|
495
|
+
}
|
|
496
|
+
get protocol() {
|
|
497
|
+
return this[Internal].url.protocol;
|
|
498
|
+
}
|
|
499
|
+
set protocol(value) {
|
|
500
|
+
this[Internal].url.protocol = value;
|
|
501
|
+
}
|
|
502
|
+
get href() {
|
|
503
|
+
const pathname = this.formatPathname();
|
|
504
|
+
const search = this.formatSearch();
|
|
505
|
+
return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`;
|
|
506
|
+
}
|
|
507
|
+
set href(url) {
|
|
508
|
+
this[Internal].url = parseURL(url);
|
|
509
|
+
this.analyze();
|
|
510
|
+
}
|
|
511
|
+
get origin() {
|
|
512
|
+
return this[Internal].url.origin;
|
|
513
|
+
}
|
|
514
|
+
get pathname() {
|
|
515
|
+
return this[Internal].url.pathname;
|
|
516
|
+
}
|
|
517
|
+
set pathname(value) {
|
|
518
|
+
this[Internal].url.pathname = value;
|
|
519
|
+
}
|
|
520
|
+
get hash() {
|
|
521
|
+
return this[Internal].url.hash;
|
|
522
|
+
}
|
|
523
|
+
set hash(value) {
|
|
524
|
+
this[Internal].url.hash = value;
|
|
525
|
+
}
|
|
526
|
+
get search() {
|
|
527
|
+
return this[Internal].url.search;
|
|
528
|
+
}
|
|
529
|
+
set search(value) {
|
|
530
|
+
this[Internal].url.search = value;
|
|
531
|
+
}
|
|
532
|
+
get password() {
|
|
533
|
+
return this[Internal].url.password;
|
|
534
|
+
}
|
|
535
|
+
set password(value) {
|
|
536
|
+
this[Internal].url.password = value;
|
|
537
|
+
}
|
|
538
|
+
get username() {
|
|
539
|
+
return this[Internal].url.username;
|
|
540
|
+
}
|
|
541
|
+
set username(value) {
|
|
542
|
+
this[Internal].url.username = value;
|
|
543
|
+
}
|
|
544
|
+
get basePath() {
|
|
545
|
+
return this[Internal].basePath;
|
|
546
|
+
}
|
|
547
|
+
set basePath(value) {
|
|
548
|
+
this[Internal].basePath = value.startsWith("/") ? value : `/${value}`;
|
|
549
|
+
}
|
|
550
|
+
toString() {
|
|
551
|
+
return this.href;
|
|
552
|
+
}
|
|
553
|
+
toJSON() {
|
|
554
|
+
return this.href;
|
|
555
|
+
}
|
|
556
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
|
557
|
+
return {
|
|
558
|
+
href: this.href,
|
|
559
|
+
origin: this.origin,
|
|
560
|
+
protocol: this.protocol,
|
|
561
|
+
username: this.username,
|
|
562
|
+
password: this.password,
|
|
563
|
+
host: this.host,
|
|
564
|
+
hostname: this.hostname,
|
|
565
|
+
port: this.port,
|
|
566
|
+
pathname: this.pathname,
|
|
567
|
+
search: this.search,
|
|
568
|
+
searchParams: this.searchParams,
|
|
569
|
+
hash: this.hash
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
clone() {
|
|
573
|
+
return new _NextURL(String(this), this[Internal].options);
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/utils.js
|
|
580
|
+
var require_utils = __commonJS({
|
|
581
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/utils.js"(exports2) {
|
|
582
|
+
"use strict";
|
|
583
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
584
|
+
value: true
|
|
585
|
+
});
|
|
586
|
+
function _export(target, all) {
|
|
587
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
588
|
+
enumerable: true,
|
|
589
|
+
get: all[name]
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
_export(exports2, {
|
|
593
|
+
fromNodeOutgoingHttpHeaders: function() {
|
|
594
|
+
return fromNodeOutgoingHttpHeaders;
|
|
595
|
+
},
|
|
596
|
+
splitCookiesString: function() {
|
|
597
|
+
return splitCookiesString;
|
|
598
|
+
},
|
|
599
|
+
toNodeOutgoingHttpHeaders: function() {
|
|
600
|
+
return toNodeOutgoingHttpHeaders;
|
|
601
|
+
},
|
|
602
|
+
validateURL: function() {
|
|
603
|
+
return validateURL;
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
function fromNodeOutgoingHttpHeaders(nodeHeaders) {
|
|
607
|
+
const headers = new Headers();
|
|
608
|
+
for (let [key, value] of Object.entries(nodeHeaders)) {
|
|
609
|
+
const values = Array.isArray(value) ? value : [
|
|
610
|
+
value
|
|
611
|
+
];
|
|
612
|
+
for (let v of values) {
|
|
613
|
+
if (typeof v === "undefined") continue;
|
|
614
|
+
if (typeof v === "number") {
|
|
615
|
+
v = v.toString();
|
|
616
|
+
}
|
|
617
|
+
headers.append(key, v);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return headers;
|
|
621
|
+
}
|
|
622
|
+
function splitCookiesString(cookiesString) {
|
|
623
|
+
var cookiesStrings = [];
|
|
624
|
+
var pos = 0;
|
|
625
|
+
var start;
|
|
626
|
+
var ch;
|
|
627
|
+
var lastComma;
|
|
628
|
+
var nextStart;
|
|
629
|
+
var cookiesSeparatorFound;
|
|
630
|
+
function skipWhitespace() {
|
|
631
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
632
|
+
pos += 1;
|
|
633
|
+
}
|
|
634
|
+
return pos < cookiesString.length;
|
|
635
|
+
}
|
|
636
|
+
function notSpecialChar() {
|
|
637
|
+
ch = cookiesString.charAt(pos);
|
|
638
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
639
|
+
}
|
|
640
|
+
while (pos < cookiesString.length) {
|
|
641
|
+
start = pos;
|
|
642
|
+
cookiesSeparatorFound = false;
|
|
643
|
+
while (skipWhitespace()) {
|
|
644
|
+
ch = cookiesString.charAt(pos);
|
|
645
|
+
if (ch === ",") {
|
|
646
|
+
lastComma = pos;
|
|
647
|
+
pos += 1;
|
|
648
|
+
skipWhitespace();
|
|
649
|
+
nextStart = pos;
|
|
650
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
|
651
|
+
pos += 1;
|
|
652
|
+
}
|
|
653
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
654
|
+
cookiesSeparatorFound = true;
|
|
655
|
+
pos = nextStart;
|
|
656
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
657
|
+
start = pos;
|
|
658
|
+
} else {
|
|
659
|
+
pos = lastComma + 1;
|
|
660
|
+
}
|
|
661
|
+
} else {
|
|
662
|
+
pos += 1;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
666
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
return cookiesStrings;
|
|
670
|
+
}
|
|
671
|
+
function toNodeOutgoingHttpHeaders(headers) {
|
|
672
|
+
const nodeHeaders = {};
|
|
673
|
+
const cookies = [];
|
|
674
|
+
if (headers) {
|
|
675
|
+
for (const [key, value] of headers.entries()) {
|
|
676
|
+
if (key.toLowerCase() === "set-cookie") {
|
|
677
|
+
cookies.push(...splitCookiesString(value));
|
|
678
|
+
nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies;
|
|
679
|
+
} else {
|
|
680
|
+
nodeHeaders[key] = value;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return nodeHeaders;
|
|
685
|
+
}
|
|
686
|
+
function validateURL(url) {
|
|
687
|
+
try {
|
|
688
|
+
return String(new URL(String(url)));
|
|
689
|
+
} catch (error) {
|
|
690
|
+
throw new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {
|
|
691
|
+
cause: error
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/error.js
|
|
699
|
+
var require_error = __commonJS({
|
|
700
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/error.js"(exports2) {
|
|
701
|
+
"use strict";
|
|
702
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
703
|
+
value: true
|
|
704
|
+
});
|
|
705
|
+
function _export(target, all) {
|
|
706
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
707
|
+
enumerable: true,
|
|
708
|
+
get: all[name]
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
_export(exports2, {
|
|
712
|
+
PageSignatureError: function() {
|
|
713
|
+
return PageSignatureError;
|
|
714
|
+
},
|
|
715
|
+
RemovedPageError: function() {
|
|
716
|
+
return RemovedPageError;
|
|
717
|
+
},
|
|
718
|
+
RemovedUAError: function() {
|
|
719
|
+
return RemovedUAError;
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
var PageSignatureError = class extends Error {
|
|
723
|
+
constructor({ page }) {
|
|
724
|
+
super(`The middleware "${page}" accepts an async API directly with the form:
|
|
725
|
+
|
|
726
|
+
export function middleware(request, event) {
|
|
727
|
+
return NextResponse.redirect('/new-location')
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
|
731
|
+
`);
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
var RemovedPageError = class extends Error {
|
|
735
|
+
constructor() {
|
|
736
|
+
super(`The request.page has been deprecated in favour of \`URLPattern\`.
|
|
737
|
+
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
|
738
|
+
`);
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
var RemovedUAError = class extends Error {
|
|
742
|
+
constructor() {
|
|
743
|
+
super(`The request.ua has been removed in favour of \`userAgent\` function.
|
|
744
|
+
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
|
745
|
+
`);
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js
|
|
752
|
+
var require_cookies = __commonJS({
|
|
753
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js"(exports2, module2) {
|
|
754
|
+
"use strict";
|
|
755
|
+
var __defProp2 = Object.defineProperty;
|
|
756
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
757
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
758
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
759
|
+
var __export2 = (target, all) => {
|
|
760
|
+
for (var name in all)
|
|
761
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
762
|
+
};
|
|
763
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
764
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
765
|
+
for (let key of __getOwnPropNames2(from))
|
|
766
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
767
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
768
|
+
}
|
|
769
|
+
return to;
|
|
770
|
+
};
|
|
771
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
772
|
+
var src_exports = {};
|
|
773
|
+
__export2(src_exports, {
|
|
774
|
+
RequestCookies: () => RequestCookies,
|
|
775
|
+
ResponseCookies: () => ResponseCookies,
|
|
776
|
+
parseCookie: () => parseCookie,
|
|
777
|
+
parseSetCookie: () => parseSetCookie,
|
|
778
|
+
stringifyCookie: () => stringifyCookie
|
|
779
|
+
});
|
|
780
|
+
module2.exports = __toCommonJS2(src_exports);
|
|
781
|
+
function stringifyCookie(c) {
|
|
782
|
+
var _a;
|
|
783
|
+
const attrs = [
|
|
784
|
+
"path" in c && c.path && `Path=${c.path}`,
|
|
785
|
+
"expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`,
|
|
786
|
+
"maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`,
|
|
787
|
+
"domain" in c && c.domain && `Domain=${c.domain}`,
|
|
788
|
+
"secure" in c && c.secure && "Secure",
|
|
789
|
+
"httpOnly" in c && c.httpOnly && "HttpOnly",
|
|
790
|
+
"sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`,
|
|
791
|
+
"partitioned" in c && c.partitioned && "Partitioned",
|
|
792
|
+
"priority" in c && c.priority && `Priority=${c.priority}`
|
|
793
|
+
].filter(Boolean);
|
|
794
|
+
const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`;
|
|
795
|
+
return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`;
|
|
796
|
+
}
|
|
797
|
+
function parseCookie(cookie) {
|
|
798
|
+
const map = /* @__PURE__ */ new Map();
|
|
799
|
+
for (const pair of cookie.split(/; */)) {
|
|
800
|
+
if (!pair)
|
|
801
|
+
continue;
|
|
802
|
+
const splitAt = pair.indexOf("=");
|
|
803
|
+
if (splitAt === -1) {
|
|
804
|
+
map.set(pair, "true");
|
|
805
|
+
continue;
|
|
806
|
+
}
|
|
807
|
+
const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];
|
|
808
|
+
try {
|
|
809
|
+
map.set(key, decodeURIComponent(value != null ? value : "true"));
|
|
810
|
+
} catch {
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
return map;
|
|
814
|
+
}
|
|
815
|
+
function parseSetCookie(setCookie) {
|
|
816
|
+
if (!setCookie) {
|
|
817
|
+
return void 0;
|
|
818
|
+
}
|
|
819
|
+
const [[name, value], ...attributes] = parseCookie(setCookie);
|
|
820
|
+
const {
|
|
821
|
+
domain,
|
|
822
|
+
expires,
|
|
823
|
+
httponly,
|
|
824
|
+
maxage,
|
|
825
|
+
path,
|
|
826
|
+
samesite,
|
|
827
|
+
secure,
|
|
828
|
+
partitioned,
|
|
829
|
+
priority
|
|
830
|
+
} = Object.fromEntries(
|
|
831
|
+
attributes.map(([key, value2]) => [key.toLowerCase(), value2])
|
|
832
|
+
);
|
|
833
|
+
const cookie = {
|
|
834
|
+
name,
|
|
835
|
+
value: decodeURIComponent(value),
|
|
836
|
+
domain,
|
|
837
|
+
...expires && { expires: new Date(expires) },
|
|
838
|
+
...httponly && { httpOnly: true },
|
|
839
|
+
...typeof maxage === "string" && { maxAge: Number(maxage) },
|
|
840
|
+
path,
|
|
841
|
+
...samesite && { sameSite: parseSameSite(samesite) },
|
|
842
|
+
...secure && { secure: true },
|
|
843
|
+
...priority && { priority: parsePriority(priority) },
|
|
844
|
+
...partitioned && { partitioned: true }
|
|
845
|
+
};
|
|
846
|
+
return compact(cookie);
|
|
847
|
+
}
|
|
848
|
+
function compact(t) {
|
|
849
|
+
const newT = {};
|
|
850
|
+
for (const key in t) {
|
|
851
|
+
if (t[key]) {
|
|
852
|
+
newT[key] = t[key];
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return newT;
|
|
856
|
+
}
|
|
857
|
+
var SAME_SITE = ["strict", "lax", "none"];
|
|
858
|
+
function parseSameSite(string) {
|
|
859
|
+
string = string.toLowerCase();
|
|
860
|
+
return SAME_SITE.includes(string) ? string : void 0;
|
|
861
|
+
}
|
|
862
|
+
var PRIORITY = ["low", "medium", "high"];
|
|
863
|
+
function parsePriority(string) {
|
|
864
|
+
string = string.toLowerCase();
|
|
865
|
+
return PRIORITY.includes(string) ? string : void 0;
|
|
866
|
+
}
|
|
867
|
+
function splitCookiesString(cookiesString) {
|
|
868
|
+
if (!cookiesString)
|
|
869
|
+
return [];
|
|
870
|
+
var cookiesStrings = [];
|
|
871
|
+
var pos = 0;
|
|
872
|
+
var start;
|
|
873
|
+
var ch;
|
|
874
|
+
var lastComma;
|
|
875
|
+
var nextStart;
|
|
876
|
+
var cookiesSeparatorFound;
|
|
877
|
+
function skipWhitespace() {
|
|
878
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
879
|
+
pos += 1;
|
|
880
|
+
}
|
|
881
|
+
return pos < cookiesString.length;
|
|
882
|
+
}
|
|
883
|
+
function notSpecialChar() {
|
|
884
|
+
ch = cookiesString.charAt(pos);
|
|
885
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
886
|
+
}
|
|
887
|
+
while (pos < cookiesString.length) {
|
|
888
|
+
start = pos;
|
|
889
|
+
cookiesSeparatorFound = false;
|
|
890
|
+
while (skipWhitespace()) {
|
|
891
|
+
ch = cookiesString.charAt(pos);
|
|
892
|
+
if (ch === ",") {
|
|
893
|
+
lastComma = pos;
|
|
894
|
+
pos += 1;
|
|
895
|
+
skipWhitespace();
|
|
896
|
+
nextStart = pos;
|
|
897
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
|
898
|
+
pos += 1;
|
|
899
|
+
}
|
|
900
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
901
|
+
cookiesSeparatorFound = true;
|
|
902
|
+
pos = nextStart;
|
|
903
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
904
|
+
start = pos;
|
|
905
|
+
} else {
|
|
906
|
+
pos = lastComma + 1;
|
|
907
|
+
}
|
|
908
|
+
} else {
|
|
909
|
+
pos += 1;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
913
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return cookiesStrings;
|
|
917
|
+
}
|
|
918
|
+
var RequestCookies = class {
|
|
919
|
+
constructor(requestHeaders) {
|
|
920
|
+
this._parsed = /* @__PURE__ */ new Map();
|
|
921
|
+
this._headers = requestHeaders;
|
|
922
|
+
const header = requestHeaders.get("cookie");
|
|
923
|
+
if (header) {
|
|
924
|
+
const parsed = parseCookie(header);
|
|
925
|
+
for (const [name, value] of parsed) {
|
|
926
|
+
this._parsed.set(name, { name, value });
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
[Symbol.iterator]() {
|
|
931
|
+
return this._parsed[Symbol.iterator]();
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* The amount of cookies received from the client
|
|
935
|
+
*/
|
|
936
|
+
get size() {
|
|
937
|
+
return this._parsed.size;
|
|
938
|
+
}
|
|
939
|
+
get(...args) {
|
|
940
|
+
const name = typeof args[0] === "string" ? args[0] : args[0].name;
|
|
941
|
+
return this._parsed.get(name);
|
|
942
|
+
}
|
|
943
|
+
getAll(...args) {
|
|
944
|
+
var _a;
|
|
945
|
+
const all = Array.from(this._parsed);
|
|
946
|
+
if (!args.length) {
|
|
947
|
+
return all.map(([_, value]) => value);
|
|
948
|
+
}
|
|
949
|
+
const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
|
|
950
|
+
return all.filter(([n]) => n === name).map(([_, value]) => value);
|
|
951
|
+
}
|
|
952
|
+
has(name) {
|
|
953
|
+
return this._parsed.has(name);
|
|
954
|
+
}
|
|
955
|
+
set(...args) {
|
|
956
|
+
const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;
|
|
957
|
+
const map = this._parsed;
|
|
958
|
+
map.set(name, { name, value });
|
|
959
|
+
this._headers.set(
|
|
960
|
+
"cookie",
|
|
961
|
+
Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ")
|
|
962
|
+
);
|
|
963
|
+
return this;
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Delete the cookies matching the passed name or names in the request.
|
|
967
|
+
*/
|
|
968
|
+
delete(names) {
|
|
969
|
+
const map = this._parsed;
|
|
970
|
+
const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));
|
|
971
|
+
this._headers.set(
|
|
972
|
+
"cookie",
|
|
973
|
+
Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ")
|
|
974
|
+
);
|
|
975
|
+
return result;
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* Delete all the cookies in the cookies in the request.
|
|
979
|
+
*/
|
|
980
|
+
clear() {
|
|
981
|
+
this.delete(Array.from(this._parsed.keys()));
|
|
982
|
+
return this;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Format the cookies in the request as a string for logging
|
|
986
|
+
*/
|
|
987
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
|
988
|
+
return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
|
989
|
+
}
|
|
990
|
+
toString() {
|
|
991
|
+
return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; ");
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
var ResponseCookies = class {
|
|
995
|
+
constructor(responseHeaders) {
|
|
996
|
+
this._parsed = /* @__PURE__ */ new Map();
|
|
997
|
+
var _a, _b, _c;
|
|
998
|
+
this._headers = responseHeaders;
|
|
999
|
+
const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : [];
|
|
1000
|
+
const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);
|
|
1001
|
+
for (const cookieString of cookieStrings) {
|
|
1002
|
+
const parsed = parseSetCookie(cookieString);
|
|
1003
|
+
if (parsed)
|
|
1004
|
+
this._parsed.set(parsed.name, parsed);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.
|
|
1009
|
+
*/
|
|
1010
|
+
get(...args) {
|
|
1011
|
+
const key = typeof args[0] === "string" ? args[0] : args[0].name;
|
|
1012
|
+
return this._parsed.get(key);
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.
|
|
1016
|
+
*/
|
|
1017
|
+
getAll(...args) {
|
|
1018
|
+
var _a;
|
|
1019
|
+
const all = Array.from(this._parsed.values());
|
|
1020
|
+
if (!args.length) {
|
|
1021
|
+
return all;
|
|
1022
|
+
}
|
|
1023
|
+
const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
|
|
1024
|
+
return all.filter((c) => c.name === key);
|
|
1025
|
+
}
|
|
1026
|
+
has(name) {
|
|
1027
|
+
return this._parsed.has(name);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.
|
|
1031
|
+
*/
|
|
1032
|
+
set(...args) {
|
|
1033
|
+
const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;
|
|
1034
|
+
const map = this._parsed;
|
|
1035
|
+
map.set(name, normalizeCookie({ name, value, ...cookie }));
|
|
1036
|
+
replace(map, this._headers);
|
|
1037
|
+
return this;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
|
|
1041
|
+
*/
|
|
1042
|
+
delete(...args) {
|
|
1043
|
+
const [name, path, domain] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0].path, args[0].domain];
|
|
1044
|
+
return this.set({ name, path, domain, value: "", expires: /* @__PURE__ */ new Date(0) });
|
|
1045
|
+
}
|
|
1046
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
|
1047
|
+
return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
|
1048
|
+
}
|
|
1049
|
+
toString() {
|
|
1050
|
+
return [...this._parsed.values()].map(stringifyCookie).join("; ");
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
function replace(bag, headers) {
|
|
1054
|
+
headers.delete("set-cookie");
|
|
1055
|
+
for (const [, value] of bag) {
|
|
1056
|
+
const serialized = stringifyCookie(value);
|
|
1057
|
+
headers.append("set-cookie", serialized);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
function normalizeCookie(cookie = { name: "", value: "" }) {
|
|
1061
|
+
if (typeof cookie.expires === "number") {
|
|
1062
|
+
cookie.expires = new Date(cookie.expires);
|
|
1063
|
+
}
|
|
1064
|
+
if (cookie.maxAge) {
|
|
1065
|
+
cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);
|
|
1066
|
+
}
|
|
1067
|
+
if (cookie.path === null || cookie.path === void 0) {
|
|
1068
|
+
cookie.path = "/";
|
|
1069
|
+
}
|
|
1070
|
+
return cookie;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/cookies.js
|
|
1076
|
+
var require_cookies2 = __commonJS({
|
|
1077
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/cookies.js"(exports2) {
|
|
1078
|
+
"use strict";
|
|
1079
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1080
|
+
value: true
|
|
1081
|
+
});
|
|
1082
|
+
function _export(target, all) {
|
|
1083
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1084
|
+
enumerable: true,
|
|
1085
|
+
get: all[name]
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
_export(exports2, {
|
|
1089
|
+
RequestCookies: function() {
|
|
1090
|
+
return _cookies.RequestCookies;
|
|
1091
|
+
},
|
|
1092
|
+
ResponseCookies: function() {
|
|
1093
|
+
return _cookies.ResponseCookies;
|
|
1094
|
+
},
|
|
1095
|
+
stringifyCookie: function() {
|
|
1096
|
+
return _cookies.stringifyCookie;
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
var _cookies = require_cookies();
|
|
1100
|
+
}
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/request.js
|
|
1104
|
+
var require_request = __commonJS({
|
|
1105
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/request.js"(exports2) {
|
|
1106
|
+
"use strict";
|
|
1107
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1108
|
+
value: true
|
|
1109
|
+
});
|
|
1110
|
+
function _export(target, all) {
|
|
1111
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1112
|
+
enumerable: true,
|
|
1113
|
+
get: all[name]
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
_export(exports2, {
|
|
1117
|
+
INTERNALS: function() {
|
|
1118
|
+
return INTERNALS;
|
|
1119
|
+
},
|
|
1120
|
+
NextRequest: function() {
|
|
1121
|
+
return NextRequest;
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
var _nexturl = require_next_url();
|
|
1125
|
+
var _utils = require_utils();
|
|
1126
|
+
var _error = require_error();
|
|
1127
|
+
var _cookies = require_cookies2();
|
|
1128
|
+
var INTERNALS = Symbol("internal request");
|
|
1129
|
+
var NextRequest = class extends Request {
|
|
1130
|
+
constructor(input, init = {}) {
|
|
1131
|
+
const url = typeof input !== "string" && "url" in input ? input.url : String(input);
|
|
1132
|
+
(0, _utils.validateURL)(url);
|
|
1133
|
+
if (input instanceof Request) super(input, init);
|
|
1134
|
+
else super(url, init);
|
|
1135
|
+
const nextUrl = new _nexturl.NextURL(url, {
|
|
1136
|
+
headers: (0, _utils.toNodeOutgoingHttpHeaders)(this.headers),
|
|
1137
|
+
nextConfig: init.nextConfig
|
|
1138
|
+
});
|
|
1139
|
+
this[INTERNALS] = {
|
|
1140
|
+
cookies: new _cookies.RequestCookies(this.headers),
|
|
1141
|
+
geo: init.geo || {},
|
|
1142
|
+
ip: init.ip,
|
|
1143
|
+
nextUrl,
|
|
1144
|
+
url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString()
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
|
1148
|
+
return {
|
|
1149
|
+
cookies: this.cookies,
|
|
1150
|
+
geo: this.geo,
|
|
1151
|
+
ip: this.ip,
|
|
1152
|
+
nextUrl: this.nextUrl,
|
|
1153
|
+
url: this.url,
|
|
1154
|
+
// rest of props come from Request
|
|
1155
|
+
bodyUsed: this.bodyUsed,
|
|
1156
|
+
cache: this.cache,
|
|
1157
|
+
credentials: this.credentials,
|
|
1158
|
+
destination: this.destination,
|
|
1159
|
+
headers: Object.fromEntries(this.headers),
|
|
1160
|
+
integrity: this.integrity,
|
|
1161
|
+
keepalive: this.keepalive,
|
|
1162
|
+
method: this.method,
|
|
1163
|
+
mode: this.mode,
|
|
1164
|
+
redirect: this.redirect,
|
|
1165
|
+
referrer: this.referrer,
|
|
1166
|
+
referrerPolicy: this.referrerPolicy,
|
|
1167
|
+
signal: this.signal
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
get cookies() {
|
|
1171
|
+
return this[INTERNALS].cookies;
|
|
1172
|
+
}
|
|
1173
|
+
get geo() {
|
|
1174
|
+
return this[INTERNALS].geo;
|
|
1175
|
+
}
|
|
1176
|
+
get ip() {
|
|
1177
|
+
return this[INTERNALS].ip;
|
|
1178
|
+
}
|
|
1179
|
+
get nextUrl() {
|
|
1180
|
+
return this[INTERNALS].nextUrl;
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* @deprecated
|
|
1184
|
+
* `page` has been deprecated in favour of `URLPattern`.
|
|
1185
|
+
* Read more: https://nextjs.org/docs/messages/middleware-request-page
|
|
1186
|
+
*/
|
|
1187
|
+
get page() {
|
|
1188
|
+
throw new _error.RemovedPageError();
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* @deprecated
|
|
1192
|
+
* `ua` has been removed in favour of \`userAgent\` function.
|
|
1193
|
+
* Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
|
1194
|
+
*/
|
|
1195
|
+
get ua() {
|
|
1196
|
+
throw new _error.RemovedUAError();
|
|
1197
|
+
}
|
|
1198
|
+
get url() {
|
|
1199
|
+
return this[INTERNALS].url;
|
|
1200
|
+
}
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
|
|
1205
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js
|
|
1206
|
+
var require_reflect = __commonJS({
|
|
1207
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js"(exports2) {
|
|
1208
|
+
"use strict";
|
|
1209
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1210
|
+
value: true
|
|
1211
|
+
});
|
|
1212
|
+
Object.defineProperty(exports2, "ReflectAdapter", {
|
|
1213
|
+
enumerable: true,
|
|
1214
|
+
get: function() {
|
|
1215
|
+
return ReflectAdapter;
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
var ReflectAdapter = class {
|
|
1219
|
+
static get(target, prop, receiver) {
|
|
1220
|
+
const value = Reflect.get(target, prop, receiver);
|
|
1221
|
+
if (typeof value === "function") {
|
|
1222
|
+
return value.bind(target);
|
|
1223
|
+
}
|
|
1224
|
+
return value;
|
|
1225
|
+
}
|
|
1226
|
+
static set(target, prop, value, receiver) {
|
|
1227
|
+
return Reflect.set(target, prop, value, receiver);
|
|
1228
|
+
}
|
|
1229
|
+
static has(target, prop) {
|
|
1230
|
+
return Reflect.has(target, prop);
|
|
1231
|
+
}
|
|
1232
|
+
static deleteProperty(target, prop) {
|
|
1233
|
+
return Reflect.deleteProperty(target, prop);
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
});
|
|
1238
|
+
|
|
1239
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/response.js
|
|
1240
|
+
var require_response = __commonJS({
|
|
1241
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/response.js"(exports2) {
|
|
1242
|
+
"use strict";
|
|
1243
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1244
|
+
value: true
|
|
1245
|
+
});
|
|
1246
|
+
Object.defineProperty(exports2, "NextResponse", {
|
|
1247
|
+
enumerable: true,
|
|
1248
|
+
get: function() {
|
|
1249
|
+
return NextResponse2;
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
var _cookies = require_cookies2();
|
|
1253
|
+
var _nexturl = require_next_url();
|
|
1254
|
+
var _utils = require_utils();
|
|
1255
|
+
var _reflect = require_reflect();
|
|
1256
|
+
var _cookies1 = require_cookies2();
|
|
1257
|
+
var INTERNALS = Symbol("internal response");
|
|
1258
|
+
var REDIRECTS = /* @__PURE__ */ new Set([
|
|
1259
|
+
301,
|
|
1260
|
+
302,
|
|
1261
|
+
303,
|
|
1262
|
+
307,
|
|
1263
|
+
308
|
|
1264
|
+
]);
|
|
1265
|
+
function handleMiddlewareField(init, headers) {
|
|
1266
|
+
var _init_request;
|
|
1267
|
+
if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) {
|
|
1268
|
+
if (!(init.request.headers instanceof Headers)) {
|
|
1269
|
+
throw new Error("request.headers must be an instance of Headers");
|
|
1270
|
+
}
|
|
1271
|
+
const keys = [];
|
|
1272
|
+
for (const [key, value] of init.request.headers) {
|
|
1273
|
+
headers.set("x-middleware-request-" + key, value);
|
|
1274
|
+
keys.push(key);
|
|
1275
|
+
}
|
|
1276
|
+
headers.set("x-middleware-override-headers", keys.join(","));
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
var NextResponse2 = class _NextResponse extends Response {
|
|
1280
|
+
constructor(body, init = {}) {
|
|
1281
|
+
super(body, init);
|
|
1282
|
+
const headers = this.headers;
|
|
1283
|
+
const cookies = new _cookies1.ResponseCookies(headers);
|
|
1284
|
+
const cookiesProxy = new Proxy(cookies, {
|
|
1285
|
+
get(target, prop, receiver) {
|
|
1286
|
+
switch (prop) {
|
|
1287
|
+
case "delete":
|
|
1288
|
+
case "set": {
|
|
1289
|
+
return (...args) => {
|
|
1290
|
+
const result = Reflect.apply(target[prop], target, args);
|
|
1291
|
+
const newHeaders = new Headers(headers);
|
|
1292
|
+
if (result instanceof _cookies1.ResponseCookies) {
|
|
1293
|
+
headers.set("x-middleware-set-cookie", result.getAll().map((cookie) => (0, _cookies.stringifyCookie)(cookie)).join(","));
|
|
1294
|
+
}
|
|
1295
|
+
handleMiddlewareField(init, newHeaders);
|
|
1296
|
+
return result;
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
default:
|
|
1300
|
+
return _reflect.ReflectAdapter.get(target, prop, receiver);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1304
|
+
this[INTERNALS] = {
|
|
1305
|
+
cookies: cookiesProxy,
|
|
1306
|
+
url: init.url ? new _nexturl.NextURL(init.url, {
|
|
1307
|
+
headers: (0, _utils.toNodeOutgoingHttpHeaders)(headers),
|
|
1308
|
+
nextConfig: init.nextConfig
|
|
1309
|
+
}) : void 0
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
[Symbol.for("edge-runtime.inspect.custom")]() {
|
|
1313
|
+
return {
|
|
1314
|
+
cookies: this.cookies,
|
|
1315
|
+
url: this.url,
|
|
1316
|
+
// rest of props come from Response
|
|
1317
|
+
body: this.body,
|
|
1318
|
+
bodyUsed: this.bodyUsed,
|
|
1319
|
+
headers: Object.fromEntries(this.headers),
|
|
1320
|
+
ok: this.ok,
|
|
1321
|
+
redirected: this.redirected,
|
|
1322
|
+
status: this.status,
|
|
1323
|
+
statusText: this.statusText,
|
|
1324
|
+
type: this.type
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
get cookies() {
|
|
1328
|
+
return this[INTERNALS].cookies;
|
|
1329
|
+
}
|
|
1330
|
+
static json(body, init) {
|
|
1331
|
+
const response = Response.json(body, init);
|
|
1332
|
+
return new _NextResponse(response.body, response);
|
|
1333
|
+
}
|
|
1334
|
+
static redirect(url, init) {
|
|
1335
|
+
var _a;
|
|
1336
|
+
const status = typeof init === "number" ? init : (_a = init == null ? void 0 : init.status) != null ? _a : 307;
|
|
1337
|
+
if (!REDIRECTS.has(status)) {
|
|
1338
|
+
throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
|
|
1339
|
+
}
|
|
1340
|
+
const initObj = typeof init === "object" ? init : {};
|
|
1341
|
+
const headers = new Headers(initObj == null ? void 0 : initObj.headers);
|
|
1342
|
+
headers.set("Location", (0, _utils.validateURL)(url));
|
|
1343
|
+
return new _NextResponse(null, {
|
|
1344
|
+
...initObj,
|
|
1345
|
+
headers,
|
|
1346
|
+
status
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
static rewrite(destination, init) {
|
|
1350
|
+
const headers = new Headers(init == null ? void 0 : init.headers);
|
|
1351
|
+
headers.set("x-middleware-rewrite", (0, _utils.validateURL)(destination));
|
|
1352
|
+
handleMiddlewareField(init, headers);
|
|
1353
|
+
return new _NextResponse(null, {
|
|
1354
|
+
...init,
|
|
1355
|
+
headers
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
static next(init) {
|
|
1359
|
+
const headers = new Headers(init == null ? void 0 : init.headers);
|
|
1360
|
+
headers.set("x-middleware-next", "1");
|
|
1361
|
+
handleMiddlewareField(init, headers);
|
|
1362
|
+
return new _NextResponse(null, {
|
|
1363
|
+
...init,
|
|
1364
|
+
headers
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
});
|
|
1370
|
+
|
|
1371
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/image-response.js
|
|
1372
|
+
var require_image_response = __commonJS({
|
|
1373
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/image-response.js"(exports2) {
|
|
1374
|
+
"use strict";
|
|
1375
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1376
|
+
value: true
|
|
1377
|
+
});
|
|
1378
|
+
Object.defineProperty(exports2, "ImageResponse", {
|
|
1379
|
+
enumerable: true,
|
|
1380
|
+
get: function() {
|
|
1381
|
+
return ImageResponse;
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
function ImageResponse() {
|
|
1385
|
+
throw new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead');
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1389
|
+
|
|
1390
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/compiled/ua-parser-js/ua-parser.js
|
|
1391
|
+
var require_ua_parser = __commonJS({
|
|
1392
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/compiled/ua-parser-js/ua-parser.js"(exports2, module2) {
|
|
1393
|
+
(() => {
|
|
1394
|
+
var i = { 226: function(i2, e2) {
|
|
1395
|
+
(function(o2, a) {
|
|
1396
|
+
"use strict";
|
|
1397
|
+
var r = "1.0.35", t = "", n = "?", s = "function", b = "undefined", w = "object", l = "string", d = "major", c = "model", u = "name", p = "type", m = "vendor", f = "version", h = "architecture", v = "console", g = "mobile", k = "tablet", x = "smarttv", _ = "wearable", y = "embedded", q = 350;
|
|
1398
|
+
var T = "Amazon", S = "Apple", z = "ASUS", N = "BlackBerry", A = "Browser", C = "Chrome", E = "Edge", O = "Firefox", U = "Google", j = "Huawei", P = "LG", R = "Microsoft", M = "Motorola", B = "Opera", V = "Samsung", D = "Sharp", I = "Sony", W = "Viera", F = "Xiaomi", G = "Zebra", H = "Facebook", L = "Chromium OS", Z = "Mac OS";
|
|
1399
|
+
var extend = function(i3, e3) {
|
|
1400
|
+
var o3 = {};
|
|
1401
|
+
for (var a2 in i3) {
|
|
1402
|
+
if (e3[a2] && e3[a2].length % 2 === 0) {
|
|
1403
|
+
o3[a2] = e3[a2].concat(i3[a2]);
|
|
1404
|
+
} else {
|
|
1405
|
+
o3[a2] = i3[a2];
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
return o3;
|
|
1409
|
+
}, enumerize = function(i3) {
|
|
1410
|
+
var e3 = {};
|
|
1411
|
+
for (var o3 = 0; o3 < i3.length; o3++) {
|
|
1412
|
+
e3[i3[o3].toUpperCase()] = i3[o3];
|
|
1413
|
+
}
|
|
1414
|
+
return e3;
|
|
1415
|
+
}, has = function(i3, e3) {
|
|
1416
|
+
return typeof i3 === l ? lowerize(e3).indexOf(lowerize(i3)) !== -1 : false;
|
|
1417
|
+
}, lowerize = function(i3) {
|
|
1418
|
+
return i3.toLowerCase();
|
|
1419
|
+
}, majorize = function(i3) {
|
|
1420
|
+
return typeof i3 === l ? i3.replace(/[^\d\.]/g, t).split(".")[0] : a;
|
|
1421
|
+
}, trim = function(i3, e3) {
|
|
1422
|
+
if (typeof i3 === l) {
|
|
1423
|
+
i3 = i3.replace(/^\s\s*/, t);
|
|
1424
|
+
return typeof e3 === b ? i3 : i3.substring(0, q);
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
var rgxMapper = function(i3, e3) {
|
|
1428
|
+
var o3 = 0, r2, t2, n2, b2, l2, d2;
|
|
1429
|
+
while (o3 < e3.length && !l2) {
|
|
1430
|
+
var c2 = e3[o3], u2 = e3[o3 + 1];
|
|
1431
|
+
r2 = t2 = 0;
|
|
1432
|
+
while (r2 < c2.length && !l2) {
|
|
1433
|
+
if (!c2[r2]) {
|
|
1434
|
+
break;
|
|
1435
|
+
}
|
|
1436
|
+
l2 = c2[r2++].exec(i3);
|
|
1437
|
+
if (!!l2) {
|
|
1438
|
+
for (n2 = 0; n2 < u2.length; n2++) {
|
|
1439
|
+
d2 = l2[++t2];
|
|
1440
|
+
b2 = u2[n2];
|
|
1441
|
+
if (typeof b2 === w && b2.length > 0) {
|
|
1442
|
+
if (b2.length === 2) {
|
|
1443
|
+
if (typeof b2[1] == s) {
|
|
1444
|
+
this[b2[0]] = b2[1].call(this, d2);
|
|
1445
|
+
} else {
|
|
1446
|
+
this[b2[0]] = b2[1];
|
|
1447
|
+
}
|
|
1448
|
+
} else if (b2.length === 3) {
|
|
1449
|
+
if (typeof b2[1] === s && !(b2[1].exec && b2[1].test)) {
|
|
1450
|
+
this[b2[0]] = d2 ? b2[1].call(this, d2, b2[2]) : a;
|
|
1451
|
+
} else {
|
|
1452
|
+
this[b2[0]] = d2 ? d2.replace(b2[1], b2[2]) : a;
|
|
1453
|
+
}
|
|
1454
|
+
} else if (b2.length === 4) {
|
|
1455
|
+
this[b2[0]] = d2 ? b2[3].call(this, d2.replace(b2[1], b2[2])) : a;
|
|
1456
|
+
}
|
|
1457
|
+
} else {
|
|
1458
|
+
this[b2] = d2 ? d2 : a;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
o3 += 2;
|
|
1464
|
+
}
|
|
1465
|
+
}, strMapper = function(i3, e3) {
|
|
1466
|
+
for (var o3 in e3) {
|
|
1467
|
+
if (typeof e3[o3] === w && e3[o3].length > 0) {
|
|
1468
|
+
for (var r2 = 0; r2 < e3[o3].length; r2++) {
|
|
1469
|
+
if (has(e3[o3][r2], i3)) {
|
|
1470
|
+
return o3 === n ? a : o3;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
} else if (has(e3[o3], i3)) {
|
|
1474
|
+
return o3 === n ? a : o3;
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return i3;
|
|
1478
|
+
};
|
|
1479
|
+
var $ = { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }, X = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" };
|
|
1480
|
+
var K = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [f, [u, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [f, [u, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [u, f], [/opios[\/ ]+([\w\.]+)/i], [f, [u, B + " Mini"]], [/\bopr\/([\w\.]+)/i], [f, [u, B]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, /(ba?idubrowser)[\/ ]?([\w\.]+)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, /(heytap|ovi)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [u, f], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [f, [u, "UC" + A]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i], [f, [u, "WeChat(Win) Desktop"]], [/micromessenger\/([\w\.]+)/i], [f, [u, "WeChat"]], [/konqueror\/([\w\.]+)/i], [f, [u, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [f, [u, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [f, [u, "Yandex"]], [/(avast|avg)\/([\w\.]+)/i], [[u, /(.+)/, "$1 Secure " + A], f], [/\bfocus\/([\w\.]+)/i], [f, [u, O + " Focus"]], [/\bopt\/([\w\.]+)/i], [f, [u, B + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [f, [u, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [f, [u, "Dolphin"]], [/coast\/([\w\.]+)/i], [f, [u, B + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [f, [u, "MIUI " + A]], [/fxios\/([-\w\.]+)/i], [f, [u, O]], [/\bqihu|(qi?ho?o?|360)browser/i], [[u, "360 " + A]], [/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i], [[u, /(.+)/, "$1 " + A], f], [/(comodo_dragon)\/([\w\.]+)/i], [[u, /_/g, " "], f], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i], [u, f], [/(metasr)[\/ ]?([\w\.]+)/i, /(lbbrowser)/i, /\[(linkedin)app\]/i], [u], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[u, H], f], [/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(chromium|instagram)[\/ ]([-\w\.]+)/i], [u, f], [/\bgsa\/([\w\.]+) .*safari\//i], [f, [u, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [f, [u, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [f, [u, C + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[u, C + " WebView"], f], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [f, [u, "Android " + A]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [u, f], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [f, [u, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [f, u], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [u, [f, strMapper, $]], [/(webkit|khtml)\/([\w\.]+)/i], [u, f], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[u, "Netscape"], f], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [f, [u, O + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i, /panasonic;(viera)/i], [u, f], [/(cobalt)\/([\w\.]+)/i], [u, [f, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[h, "amd64"]], [/(ia32(?=;))/i], [[h, lowerize]], [/((?:i[346]|x)86)[;\)]/i], [[h, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[h, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[h, "armhf"]], [/windows (ce|mobile); ppc;/i], [[h, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[h, /ower/, t, lowerize]], [/(sun4\w)[;\)]/i], [[h, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[h, lowerize]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [c, [m, V], [p, k]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [c, [m, V], [p, g]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [c, [m, S], [p, g]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [c, [m, S], [p, k]], [/(macintosh);/i], [c, [m, S]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [c, [m, D], [p, g]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [c, [m, j], [p, k]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [c, [m, j], [p, g]], [/\b(poco[\w ]+)(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[c, /_/g, " "], [m, F], [p, g]], [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[c, /_/g, " "], [m, F], [p, k]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [c, [m, "OPPO"], [p, g]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [c, [m, "Vivo"], [p, g]], [/\b(rmx[12]\d{3})(?: bui|;|\))/i], [c, [m, "Realme"], [p, g]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [c, [m, M], [p, g]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [c, [m, M], [p, k]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [c, [m, P], [p, k]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [c, [m, P], [p, g]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [c, [m, "Lenovo"], [p, k]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[c, /_/g, " "], [m, "Nokia"], [p, g]], [/(pixel c)\b/i], [c, [m, U], [p, k]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [c, [m, U], [p, g]], [/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [c, [m, I], [p, g]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[c, "Xperia Tablet"], [m, I], [p, k]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [c, [m, "OnePlus"], [p, g]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [c, [m, T], [p, k]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[c, /(.+)/g, "Fire Phone $1"], [m, T], [p, g]], [/(playbook);[-\w\),; ]+(rim)/i], [c, m, [p, k]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [c, [m, N], [p, g]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [c, [m, z], [p, k]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [c, [m, z], [p, g]], [/(nexus 9)/i], [c, [m, "HTC"], [p, k]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [m, [c, /_/g, " "], [p, g]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [c, [m, "Acer"], [p, k]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [c, [m, "Meizu"], [p, g]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [m, c, [p, g]], [/(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [m, c, [p, k]], [/(surface duo)/i], [c, [m, R], [p, k]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [c, [m, "Fairphone"], [p, g]], [/(u304aa)/i], [c, [m, "AT&T"], [p, g]], [/\bsie-(\w*)/i], [c, [m, "Siemens"], [p, g]], [/\b(rct\w+) b/i], [c, [m, "RCA"], [p, k]], [/\b(venue[\d ]{2,7}) b/i], [c, [m, "Dell"], [p, k]], [/\b(q(?:mv|ta)\w+) b/i], [c, [m, "Verizon"], [p, k]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [c, [m, "Barnes & Noble"], [p, k]], [/\b(tm\d{3}\w+) b/i], [c, [m, "NuVision"], [p, k]], [/\b(k88) b/i], [c, [m, "ZTE"], [p, k]], [/\b(nx\d{3}j) b/i], [c, [m, "ZTE"], [p, g]], [/\b(gen\d{3}) b.+49h/i], [c, [m, "Swiss"], [p, g]], [/\b(zur\d{3}) b/i], [c, [m, "Swiss"], [p, k]], [/\b((zeki)?tb.*\b) b/i], [c, [m, "Zeki"], [p, k]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[m, "Dragon Touch"], c, [p, k]], [/\b(ns-?\w{0,9}) b/i], [c, [m, "Insignia"], [p, k]], [/\b((nxa|next)-?\w{0,9}) b/i], [c, [m, "NextBook"], [p, k]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[m, "Voice"], c, [p, g]], [/\b(lvtel\-)?(v1[12]) b/i], [[m, "LvTel"], c, [p, g]], [/\b(ph-1) /i], [c, [m, "Essential"], [p, g]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [c, [m, "Envizen"], [p, k]], [/\b(trio[-\w\. ]+) b/i], [c, [m, "MachSpeed"], [p, k]], [/\btu_(1491) b/i], [c, [m, "Rotor"], [p, k]], [/(shield[\w ]+) b/i], [c, [m, "Nvidia"], [p, k]], [/(sprint) (\w+)/i], [m, c, [p, g]], [/(kin\.[onetw]{3})/i], [[c, /\./g, " "], [m, R], [p, g]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [c, [m, G], [p, k]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [c, [m, G], [p, g]], [/smart-tv.+(samsung)/i], [m, [p, x]], [/hbbtv.+maple;(\d+)/i], [[c, /^/, "SmartTV"], [m, V], [p, x]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[m, P], [p, x]], [/(apple) ?tv/i], [m, [c, S + " TV"], [p, x]], [/crkey/i], [[c, C + "cast"], [m, U], [p, x]], [/droid.+aft(\w)( bui|\))/i], [c, [m, T], [p, x]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [c, [m, D], [p, x]], [/(bravia[\w ]+)( bui|\))/i], [c, [m, I], [p, x]], [/(mitv-\w{5}) bui/i], [c, [m, F], [p, x]], [/Hbbtv.*(technisat) (.*);/i], [m, c, [p, x]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[m, trim], [c, trim], [p, x]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[p, x]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [m, c, [p, v]], [/droid.+; (shield) bui/i], [c, [m, "Nvidia"], [p, v]], [/(playstation [345portablevi]+)/i], [c, [m, I], [p, v]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [c, [m, R], [p, v]], [/((pebble))app/i], [m, c, [p, _]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [c, [m, S], [p, _]], [/droid.+; (glass) \d/i], [c, [m, U], [p, _]], [/droid.+; (wt63?0{2,3})\)/i], [c, [m, G], [p, _]], [/(quest( 2| pro)?)/i], [c, [m, H], [p, _]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [m, [p, y]], [/(aeobc)\b/i], [c, [m, T], [p, y]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i], [c, [p, g]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [c, [p, k]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[p, k]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[p, g]], [/(android[-\w\. ]{0,9});.+buil/i], [c, [m, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [f, [u, E + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [f, [u, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [u, f], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [f, u]], os: [[/microsoft (windows) (vista|xp)/i], [u, f], [/(windows) nt 6\.2; (arm)/i, /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i], [u, [f, strMapper, X]], [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[u, "Windows"], [f, strMapper, X]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /ios;fbsv\/([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[f, /_/g, "."], [u, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[u, Z], [f, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [f, u], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [u, f], [/\(bb(10);/i], [f, [u, N]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [f, [u, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [f, [u, O + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [f, [u, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [f, [u, "watchOS"]], [/crkey\/([\d\.]+)/i], [f, [u, C + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[u, L], f], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [u, f], [/(sunos) ?([\w\.\d]*)/i], [[u, "Solaris"], f], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [u, f]] };
|
|
1481
|
+
var UAParser = function(i3, e3) {
|
|
1482
|
+
if (typeof i3 === w) {
|
|
1483
|
+
e3 = i3;
|
|
1484
|
+
i3 = a;
|
|
1485
|
+
}
|
|
1486
|
+
if (!(this instanceof UAParser)) {
|
|
1487
|
+
return new UAParser(i3, e3).getResult();
|
|
1488
|
+
}
|
|
1489
|
+
var r2 = typeof o2 !== b && o2.navigator ? o2.navigator : a;
|
|
1490
|
+
var n2 = i3 || (r2 && r2.userAgent ? r2.userAgent : t);
|
|
1491
|
+
var v2 = r2 && r2.userAgentData ? r2.userAgentData : a;
|
|
1492
|
+
var x2 = e3 ? extend(K, e3) : K;
|
|
1493
|
+
var _2 = r2 && r2.userAgent == n2;
|
|
1494
|
+
this.getBrowser = function() {
|
|
1495
|
+
var i4 = {};
|
|
1496
|
+
i4[u] = a;
|
|
1497
|
+
i4[f] = a;
|
|
1498
|
+
rgxMapper.call(i4, n2, x2.browser);
|
|
1499
|
+
i4[d] = majorize(i4[f]);
|
|
1500
|
+
if (_2 && r2 && r2.brave && typeof r2.brave.isBrave == s) {
|
|
1501
|
+
i4[u] = "Brave";
|
|
1502
|
+
}
|
|
1503
|
+
return i4;
|
|
1504
|
+
};
|
|
1505
|
+
this.getCPU = function() {
|
|
1506
|
+
var i4 = {};
|
|
1507
|
+
i4[h] = a;
|
|
1508
|
+
rgxMapper.call(i4, n2, x2.cpu);
|
|
1509
|
+
return i4;
|
|
1510
|
+
};
|
|
1511
|
+
this.getDevice = function() {
|
|
1512
|
+
var i4 = {};
|
|
1513
|
+
i4[m] = a;
|
|
1514
|
+
i4[c] = a;
|
|
1515
|
+
i4[p] = a;
|
|
1516
|
+
rgxMapper.call(i4, n2, x2.device);
|
|
1517
|
+
if (_2 && !i4[p] && v2 && v2.mobile) {
|
|
1518
|
+
i4[p] = g;
|
|
1519
|
+
}
|
|
1520
|
+
if (_2 && i4[c] == "Macintosh" && r2 && typeof r2.standalone !== b && r2.maxTouchPoints && r2.maxTouchPoints > 2) {
|
|
1521
|
+
i4[c] = "iPad";
|
|
1522
|
+
i4[p] = k;
|
|
1523
|
+
}
|
|
1524
|
+
return i4;
|
|
1525
|
+
};
|
|
1526
|
+
this.getEngine = function() {
|
|
1527
|
+
var i4 = {};
|
|
1528
|
+
i4[u] = a;
|
|
1529
|
+
i4[f] = a;
|
|
1530
|
+
rgxMapper.call(i4, n2, x2.engine);
|
|
1531
|
+
return i4;
|
|
1532
|
+
};
|
|
1533
|
+
this.getOS = function() {
|
|
1534
|
+
var i4 = {};
|
|
1535
|
+
i4[u] = a;
|
|
1536
|
+
i4[f] = a;
|
|
1537
|
+
rgxMapper.call(i4, n2, x2.os);
|
|
1538
|
+
if (_2 && !i4[u] && v2 && v2.platform != "Unknown") {
|
|
1539
|
+
i4[u] = v2.platform.replace(/chrome os/i, L).replace(/macos/i, Z);
|
|
1540
|
+
}
|
|
1541
|
+
return i4;
|
|
1542
|
+
};
|
|
1543
|
+
this.getResult = function() {
|
|
1544
|
+
return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() };
|
|
1545
|
+
};
|
|
1546
|
+
this.getUA = function() {
|
|
1547
|
+
return n2;
|
|
1548
|
+
};
|
|
1549
|
+
this.setUA = function(i4) {
|
|
1550
|
+
n2 = typeof i4 === l && i4.length > q ? trim(i4, q) : i4;
|
|
1551
|
+
return this;
|
|
1552
|
+
};
|
|
1553
|
+
this.setUA(n2);
|
|
1554
|
+
return this;
|
|
1555
|
+
};
|
|
1556
|
+
UAParser.VERSION = r;
|
|
1557
|
+
UAParser.BROWSER = enumerize([u, f, d]);
|
|
1558
|
+
UAParser.CPU = enumerize([h]);
|
|
1559
|
+
UAParser.DEVICE = enumerize([c, m, p, v, g, x, k, _, y]);
|
|
1560
|
+
UAParser.ENGINE = UAParser.OS = enumerize([u, f]);
|
|
1561
|
+
if (typeof e2 !== b) {
|
|
1562
|
+
if ("object" !== b && i2.exports) {
|
|
1563
|
+
e2 = i2.exports = UAParser;
|
|
1564
|
+
}
|
|
1565
|
+
e2.UAParser = UAParser;
|
|
1566
|
+
} else {
|
|
1567
|
+
if (typeof define === s && define.amd) {
|
|
1568
|
+
define(function() {
|
|
1569
|
+
return UAParser;
|
|
1570
|
+
});
|
|
1571
|
+
} else if (typeof o2 !== b) {
|
|
1572
|
+
o2.UAParser = UAParser;
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
var Q = typeof o2 !== b && (o2.jQuery || o2.Zepto);
|
|
1576
|
+
if (Q && !Q.ua) {
|
|
1577
|
+
var Y = new UAParser();
|
|
1578
|
+
Q.ua = Y.getResult();
|
|
1579
|
+
Q.ua.get = function() {
|
|
1580
|
+
return Y.getUA();
|
|
1581
|
+
};
|
|
1582
|
+
Q.ua.set = function(i3) {
|
|
1583
|
+
Y.setUA(i3);
|
|
1584
|
+
var e3 = Y.getResult();
|
|
1585
|
+
for (var o3 in e3) {
|
|
1586
|
+
Q.ua[o3] = e3[o3];
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
})(typeof window === "object" ? window : this);
|
|
1591
|
+
} };
|
|
1592
|
+
var e = {};
|
|
1593
|
+
function __nccwpck_require__(o2) {
|
|
1594
|
+
var a = e[o2];
|
|
1595
|
+
if (a !== void 0) {
|
|
1596
|
+
return a.exports;
|
|
1597
|
+
}
|
|
1598
|
+
var r = e[o2] = { exports: {} };
|
|
1599
|
+
var t = true;
|
|
1600
|
+
try {
|
|
1601
|
+
i[o2].call(r.exports, r, r.exports, __nccwpck_require__);
|
|
1602
|
+
t = false;
|
|
1603
|
+
} finally {
|
|
1604
|
+
if (t) delete e[o2];
|
|
1605
|
+
}
|
|
1606
|
+
return r.exports;
|
|
1607
|
+
}
|
|
1608
|
+
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
|
|
1609
|
+
var o = __nccwpck_require__(226);
|
|
1610
|
+
module2.exports = o;
|
|
1611
|
+
})();
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1614
|
+
|
|
1615
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/user-agent.js
|
|
1616
|
+
var require_user_agent = __commonJS({
|
|
1617
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/user-agent.js"(exports2) {
|
|
1618
|
+
"use strict";
|
|
1619
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1620
|
+
value: true
|
|
1621
|
+
});
|
|
1622
|
+
function _export(target, all) {
|
|
1623
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1624
|
+
enumerable: true,
|
|
1625
|
+
get: all[name]
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
_export(exports2, {
|
|
1629
|
+
isBot: function() {
|
|
1630
|
+
return isBot;
|
|
1631
|
+
},
|
|
1632
|
+
userAgent: function() {
|
|
1633
|
+
return userAgent;
|
|
1634
|
+
},
|
|
1635
|
+
userAgentFromString: function() {
|
|
1636
|
+
return userAgentFromString;
|
|
1637
|
+
}
|
|
1638
|
+
});
|
|
1639
|
+
var _uaparserjs = /* @__PURE__ */ _interop_require_default(require_ua_parser());
|
|
1640
|
+
function _interop_require_default(obj) {
|
|
1641
|
+
return obj && obj.__esModule ? obj : {
|
|
1642
|
+
default: obj
|
|
1643
|
+
};
|
|
1644
|
+
}
|
|
1645
|
+
function isBot(input) {
|
|
1646
|
+
return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input);
|
|
1647
|
+
}
|
|
1648
|
+
function userAgentFromString(input) {
|
|
1649
|
+
return {
|
|
1650
|
+
...(0, _uaparserjs.default)(input),
|
|
1651
|
+
isBot: input === void 0 ? false : isBot(input)
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
function userAgent({ headers }) {
|
|
1655
|
+
return userAgentFromString(headers.get("user-agent") || void 0);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
|
|
1660
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/url-pattern.js
|
|
1661
|
+
var require_url_pattern = __commonJS({
|
|
1662
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/dist/server/web/spec-extension/url-pattern.js"(exports2) {
|
|
1663
|
+
"use strict";
|
|
1664
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1665
|
+
value: true
|
|
1666
|
+
});
|
|
1667
|
+
Object.defineProperty(exports2, "URLPattern", {
|
|
1668
|
+
enumerable: true,
|
|
1669
|
+
get: function() {
|
|
1670
|
+
return GlobalURLPattern;
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
var GlobalURLPattern = (
|
|
1674
|
+
// @ts-expect-error: URLPattern is not available in Node.js
|
|
1675
|
+
typeof URLPattern === "undefined" ? void 0 : URLPattern
|
|
1676
|
+
);
|
|
1677
|
+
}
|
|
1678
|
+
});
|
|
1679
|
+
|
|
1680
|
+
// ../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/server.js
|
|
1681
|
+
var require_server = __commonJS({
|
|
1682
|
+
"../../node_modules/.pnpm/next@14.2.10_@babel+core@7.26.0_@playwright+test@1.48.2_babel-plugin-macros@3.1.0_react-dom@1_fbkcw4ulk3ham5nboqblg7go7e/node_modules/next/server.js"(exports2, module2) {
|
|
1683
|
+
var serverExports = {
|
|
1684
|
+
NextRequest: require_request().NextRequest,
|
|
1685
|
+
NextResponse: require_response().NextResponse,
|
|
1686
|
+
ImageResponse: require_image_response().ImageResponse,
|
|
1687
|
+
userAgentFromString: require_user_agent().userAgentFromString,
|
|
1688
|
+
userAgent: require_user_agent().userAgent,
|
|
1689
|
+
URLPattern: require_url_pattern().URLPattern
|
|
1690
|
+
};
|
|
1691
|
+
module2.exports = serverExports;
|
|
1692
|
+
exports2.NextRequest = serverExports.NextRequest;
|
|
1693
|
+
exports2.NextResponse = serverExports.NextResponse;
|
|
1694
|
+
exports2.ImageResponse = serverExports.ImageResponse;
|
|
1695
|
+
exports2.userAgentFromString = serverExports.userAgentFromString;
|
|
1696
|
+
exports2.userAgent = serverExports.userAgent;
|
|
1697
|
+
exports2.URLPattern = serverExports.URLPattern;
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
|
|
1701
|
+
// src/delivery-handlers.ts
|
|
1702
|
+
var delivery_handlers_exports = {};
|
|
1703
|
+
__export(delivery_handlers_exports, {
|
|
1704
|
+
createMediaDeliveryHandlers: () => createMediaDeliveryHandlers
|
|
1705
|
+
});
|
|
1706
|
+
module.exports = __toCommonJS(delivery_handlers_exports);
|
|
1707
|
+
var import_storage_blob = require("@azure/storage-blob");
|
|
1708
|
+
var import_sharp = __toESM(require("sharp"));
|
|
1709
|
+
var import_server = __toESM(require_server());
|
|
1710
|
+
var SUPPORTED_IMAGE_TYPES = [
|
|
1711
|
+
"image/jpeg",
|
|
1712
|
+
"image/png",
|
|
1713
|
+
"image/webp",
|
|
1714
|
+
"image/gif",
|
|
1715
|
+
"image/tiff"
|
|
1716
|
+
];
|
|
1717
|
+
var createMediaDeliveryHandlers = (config) => {
|
|
1718
|
+
return {
|
|
1719
|
+
async GET(req, context) {
|
|
1720
|
+
var _a, _b;
|
|
1721
|
+
try {
|
|
1722
|
+
const accountNameMatch = /AccountName=([^;]+)/.exec(
|
|
1723
|
+
config.connectionString
|
|
1724
|
+
);
|
|
1725
|
+
const accountKeyMatch = /AccountKey=([^;]+)/.exec(
|
|
1726
|
+
config.connectionString
|
|
1727
|
+
);
|
|
1728
|
+
if (!accountNameMatch || !accountKeyMatch) {
|
|
1729
|
+
throw new Error(
|
|
1730
|
+
"Invalid connection string: Missing AccountName or AccountKey."
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
const accountName = accountNameMatch[1];
|
|
1734
|
+
const accountKey = accountKeyMatch[1];
|
|
1735
|
+
const sharedKeyCredential = new import_storage_blob.StorageSharedKeyCredential(
|
|
1736
|
+
accountName,
|
|
1737
|
+
accountKey
|
|
1738
|
+
);
|
|
1739
|
+
const client = import_storage_blob.BlobServiceClient.fromConnectionString(
|
|
1740
|
+
config.connectionString
|
|
1741
|
+
);
|
|
1742
|
+
const containerClient = client.getContainerClient(config.containerName);
|
|
1743
|
+
const blobName = context.params.path.join("/");
|
|
1744
|
+
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
|
1745
|
+
const expiresOn = /* @__PURE__ */ new Date();
|
|
1746
|
+
expiresOn.setMinutes(expiresOn.getMinutes() + 1);
|
|
1747
|
+
const sasToken = (0, import_storage_blob.generateBlobSASQueryParameters)(
|
|
1748
|
+
{
|
|
1749
|
+
containerName: config.containerName,
|
|
1750
|
+
// The container name
|
|
1751
|
+
blobName,
|
|
1752
|
+
// The blob name
|
|
1753
|
+
permissions: import_storage_blob.BlobSASPermissions.parse("r"),
|
|
1754
|
+
// Read permission
|
|
1755
|
+
expiresOn
|
|
1756
|
+
// Expiration time
|
|
1757
|
+
},
|
|
1758
|
+
sharedKeyCredential
|
|
1759
|
+
).toString();
|
|
1760
|
+
const response = await fetch(`${blockBlobClient.url}?${sasToken}`);
|
|
1761
|
+
if (!response.ok) {
|
|
1762
|
+
console.error(
|
|
1763
|
+
`Failed to fetch original image: ${response.status} ${response.statusText}`
|
|
1764
|
+
);
|
|
1765
|
+
return new import_server.NextResponse(
|
|
1766
|
+
`Failed to fetch original image: ${response.status} ${response.statusText}`,
|
|
1767
|
+
{ status: response.status }
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
const contentType = response.headers.get("content-type");
|
|
1771
|
+
const isImage = SUPPORTED_IMAGE_TYPES.includes(contentType || "");
|
|
1772
|
+
if (!isImage) {
|
|
1773
|
+
console.log(`Serving non-image file: ${contentType}`);
|
|
1774
|
+
const fileBuffer = await response.arrayBuffer();
|
|
1775
|
+
const headers = new Headers(response.headers);
|
|
1776
|
+
headers.set("cache-control", "public, max-age=31536000, immutable");
|
|
1777
|
+
return new import_server.NextResponse(fileBuffer, {
|
|
1778
|
+
status: response.status,
|
|
1779
|
+
statusText: response.statusText,
|
|
1780
|
+
headers
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
const buffer = await response.arrayBuffer();
|
|
1784
|
+
const url = new URL(req.url);
|
|
1785
|
+
const width = url.searchParams.get("w");
|
|
1786
|
+
const height = url.searchParams.get("h");
|
|
1787
|
+
const quality = Number(url.searchParams.get("q") || "80");
|
|
1788
|
+
const format = url.searchParams.get("fmt") || "auto";
|
|
1789
|
+
if (width && Number.isNaN(Number(width))) {
|
|
1790
|
+
return new import_server.NextResponse("Invalid width parameter", { status: 400 });
|
|
1791
|
+
}
|
|
1792
|
+
if (height && Number.isNaN(Number(height))) {
|
|
1793
|
+
return new import_server.NextResponse("Invalid height parameter", { status: 400 });
|
|
1794
|
+
}
|
|
1795
|
+
if (Number.isNaN(quality) || quality < 1 || quality > 100) {
|
|
1796
|
+
return new import_server.NextResponse("Invalid quality parameter", { status: 400 });
|
|
1797
|
+
}
|
|
1798
|
+
let processedImage = (0, import_sharp.default)(buffer);
|
|
1799
|
+
if (width || height) {
|
|
1800
|
+
processedImage = processedImage.resize({
|
|
1801
|
+
width: width ? Number(width) : void 0,
|
|
1802
|
+
height: height ? Number(height) : void 0,
|
|
1803
|
+
fit: "inside",
|
|
1804
|
+
withoutEnlargement: true
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
let outputFormat = "jpeg";
|
|
1808
|
+
let outputContentType = "image/jpeg";
|
|
1809
|
+
if (format === "webp" || format === "auto" && ((_a = req.headers.get("accept")) == null ? void 0 : _a.includes("image/webp"))) {
|
|
1810
|
+
outputFormat = "webp";
|
|
1811
|
+
outputContentType = "image/webp";
|
|
1812
|
+
} else if (format === "avif" || format === "auto" && ((_b = req.headers.get("accept")) == null ? void 0 : _b.includes("image/avif"))) {
|
|
1813
|
+
outputFormat = "avif";
|
|
1814
|
+
outputContentType = "image/avif";
|
|
1815
|
+
}
|
|
1816
|
+
try {
|
|
1817
|
+
processedImage = processedImage[outputFormat]({ quality });
|
|
1818
|
+
const processedBuffer = await processedImage.toBuffer();
|
|
1819
|
+
const headers = new Headers(response.headers);
|
|
1820
|
+
headers.set("content-type", outputContentType);
|
|
1821
|
+
headers.set("content-length", processedBuffer.length.toString());
|
|
1822
|
+
headers.set("cache-control", "public, max-age=31536000, immutable");
|
|
1823
|
+
return new import_server.NextResponse(processedBuffer, {
|
|
1824
|
+
status: response.status,
|
|
1825
|
+
statusText: response.statusText,
|
|
1826
|
+
headers
|
|
1827
|
+
});
|
|
1828
|
+
} catch (sharpError) {
|
|
1829
|
+
console.error("Error processing image with sharp:", sharpError);
|
|
1830
|
+
console.warn("Falling back to original image");
|
|
1831
|
+
const originalBuffer = Buffer.from(buffer);
|
|
1832
|
+
const headers = new Headers(response.headers);
|
|
1833
|
+
headers.set("content-type", contentType || "application/octet-stream");
|
|
1834
|
+
headers.set("content-length", originalBuffer.length.toString());
|
|
1835
|
+
headers.set("cache-control", "public, max-age=3600");
|
|
1836
|
+
return new import_server.NextResponse(originalBuffer, {
|
|
1837
|
+
status: response.status,
|
|
1838
|
+
statusText: response.statusText,
|
|
1839
|
+
headers
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
} catch (error) {
|
|
1843
|
+
console.error("Unexpected error in image processing:", error);
|
|
1844
|
+
return new import_server.NextResponse("Unexpected error in image processing", {
|
|
1845
|
+
status: 500
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
};
|
|
1850
|
+
};
|
|
1851
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1852
|
+
0 && (module.exports = {
|
|
1853
|
+
createMediaDeliveryHandlers
|
|
1854
|
+
});
|