flowlink-auth 2.7.6 → 2.7.8
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/dist/index.js +3957 -527
- package/package.json +1 -1
- package/src/SignUp.jsx +205 -113
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3767 @@
|
|
|
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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
13
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
32
|
+
|
|
33
|
+
// node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
|
|
34
|
+
var require_interop_require_wildcard = __commonJS({
|
|
35
|
+
"node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports) {
|
|
36
|
+
"use strict";
|
|
37
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
38
|
+
if (typeof WeakMap !== "function") return null;
|
|
39
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
40
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
41
|
+
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
42
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
43
|
+
})(nodeInterop);
|
|
44
|
+
}
|
|
45
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
46
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
47
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
48
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
49
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
50
|
+
var newObj = { __proto__: null };
|
|
51
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
52
|
+
for (var key in obj) {
|
|
53
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
54
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
55
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
56
|
+
else newObj[key] = obj[key];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
newObj.default = obj;
|
|
60
|
+
if (cache) cache.set(obj, newObj);
|
|
61
|
+
return newObj;
|
|
62
|
+
}
|
|
63
|
+
exports._ = _interop_require_wildcard;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// node_modules/next/dist/shared/lib/router/utils/querystring.js
|
|
68
|
+
var require_querystring = __commonJS({
|
|
69
|
+
"node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports) {
|
|
70
|
+
"use strict";
|
|
71
|
+
Object.defineProperty(exports, "__esModule", {
|
|
72
|
+
value: true
|
|
73
|
+
});
|
|
74
|
+
function _export(target, all) {
|
|
75
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: all[name]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
_export(exports, {
|
|
81
|
+
assign: function() {
|
|
82
|
+
return assign;
|
|
83
|
+
},
|
|
84
|
+
searchParamsToUrlQuery: function() {
|
|
85
|
+
return searchParamsToUrlQuery;
|
|
86
|
+
},
|
|
87
|
+
urlQueryToSearchParams: function() {
|
|
88
|
+
return urlQueryToSearchParams;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
function searchParamsToUrlQuery(searchParams) {
|
|
92
|
+
const query = {};
|
|
93
|
+
for (const [key, value] of searchParams.entries()) {
|
|
94
|
+
const existing = query[key];
|
|
95
|
+
if (typeof existing === "undefined") {
|
|
96
|
+
query[key] = value;
|
|
97
|
+
} else if (Array.isArray(existing)) {
|
|
98
|
+
existing.push(value);
|
|
99
|
+
} else {
|
|
100
|
+
query[key] = [
|
|
101
|
+
existing,
|
|
102
|
+
value
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return query;
|
|
107
|
+
}
|
|
108
|
+
function stringifyUrlQueryParam(param) {
|
|
109
|
+
if (typeof param === "string") {
|
|
110
|
+
return param;
|
|
111
|
+
}
|
|
112
|
+
if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
|
|
113
|
+
return String(param);
|
|
114
|
+
} else {
|
|
115
|
+
return "";
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function urlQueryToSearchParams(query) {
|
|
119
|
+
const searchParams = new URLSearchParams();
|
|
120
|
+
for (const [key, value] of Object.entries(query)) {
|
|
121
|
+
if (Array.isArray(value)) {
|
|
122
|
+
for (const item of value) {
|
|
123
|
+
searchParams.append(key, stringifyUrlQueryParam(item));
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
searchParams.set(key, stringifyUrlQueryParam(value));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return searchParams;
|
|
130
|
+
}
|
|
131
|
+
function assign(target, ...searchParamsList) {
|
|
132
|
+
for (const searchParams of searchParamsList) {
|
|
133
|
+
for (const key of searchParams.keys()) {
|
|
134
|
+
target.delete(key);
|
|
135
|
+
}
|
|
136
|
+
for (const [key, value] of searchParams.entries()) {
|
|
137
|
+
target.append(key, value);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return target;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// node_modules/next/dist/shared/lib/router/utils/format-url.js
|
|
146
|
+
var require_format_url = __commonJS({
|
|
147
|
+
"node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports) {
|
|
148
|
+
"use strict";
|
|
149
|
+
Object.defineProperty(exports, "__esModule", {
|
|
150
|
+
value: true
|
|
151
|
+
});
|
|
152
|
+
function _export(target, all) {
|
|
153
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: all[name]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
_export(exports, {
|
|
159
|
+
formatUrl: function() {
|
|
160
|
+
return formatUrl;
|
|
161
|
+
},
|
|
162
|
+
formatWithValidation: function() {
|
|
163
|
+
return formatWithValidation;
|
|
164
|
+
},
|
|
165
|
+
urlObjectKeys: function() {
|
|
166
|
+
return urlObjectKeys;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
var _interop_require_wildcard = require_interop_require_wildcard();
|
|
170
|
+
var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring());
|
|
171
|
+
var slashedProtocols = /https?|ftp|gopher|file/;
|
|
172
|
+
function formatUrl(urlObj) {
|
|
173
|
+
let { auth, hostname } = urlObj;
|
|
174
|
+
let protocol = urlObj.protocol || "";
|
|
175
|
+
let pathname = urlObj.pathname || "";
|
|
176
|
+
let hash = urlObj.hash || "";
|
|
177
|
+
let query = urlObj.query || "";
|
|
178
|
+
let host = false;
|
|
179
|
+
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
|
|
180
|
+
if (urlObj.host) {
|
|
181
|
+
host = auth + urlObj.host;
|
|
182
|
+
} else if (hostname) {
|
|
183
|
+
host = auth + (~hostname.indexOf(":") ? `[${hostname}]` : hostname);
|
|
184
|
+
if (urlObj.port) {
|
|
185
|
+
host += ":" + urlObj.port;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (query && typeof query === "object") {
|
|
189
|
+
query = String(_querystring.urlQueryToSearchParams(query));
|
|
190
|
+
}
|
|
191
|
+
let search = urlObj.search || query && `?${query}` || "";
|
|
192
|
+
if (protocol && !protocol.endsWith(":")) protocol += ":";
|
|
193
|
+
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
|
|
194
|
+
host = "//" + (host || "");
|
|
195
|
+
if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
|
|
196
|
+
} else if (!host) {
|
|
197
|
+
host = "";
|
|
198
|
+
}
|
|
199
|
+
if (hash && hash[0] !== "#") hash = "#" + hash;
|
|
200
|
+
if (search && search[0] !== "?") search = "?" + search;
|
|
201
|
+
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
|
|
202
|
+
search = search.replace("#", "%23");
|
|
203
|
+
return `${protocol}${host}${pathname}${search}${hash}`;
|
|
204
|
+
}
|
|
205
|
+
var urlObjectKeys = [
|
|
206
|
+
"auth",
|
|
207
|
+
"hash",
|
|
208
|
+
"host",
|
|
209
|
+
"hostname",
|
|
210
|
+
"href",
|
|
211
|
+
"path",
|
|
212
|
+
"pathname",
|
|
213
|
+
"port",
|
|
214
|
+
"protocol",
|
|
215
|
+
"query",
|
|
216
|
+
"search",
|
|
217
|
+
"slashes"
|
|
218
|
+
];
|
|
219
|
+
function formatWithValidation(url) {
|
|
220
|
+
if (true) {
|
|
221
|
+
if (url !== null && typeof url === "object") {
|
|
222
|
+
Object.keys(url).forEach((key) => {
|
|
223
|
+
if (!urlObjectKeys.includes(key)) {
|
|
224
|
+
console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return formatUrl(url);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
// node_modules/next/dist/shared/lib/router/utils/omit.js
|
|
235
|
+
var require_omit = __commonJS({
|
|
236
|
+
"node_modules/next/dist/shared/lib/router/utils/omit.js"(exports) {
|
|
237
|
+
"use strict";
|
|
238
|
+
Object.defineProperty(exports, "__esModule", {
|
|
239
|
+
value: true
|
|
240
|
+
});
|
|
241
|
+
Object.defineProperty(exports, "omit", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function() {
|
|
244
|
+
return omit;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
function omit(object, keys) {
|
|
248
|
+
const omitted = {};
|
|
249
|
+
Object.keys(object).forEach((key) => {
|
|
250
|
+
if (!keys.includes(key)) {
|
|
251
|
+
omitted[key] = object[key];
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
return omitted;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// node_modules/next/dist/shared/lib/utils.js
|
|
260
|
+
var require_utils = __commonJS({
|
|
261
|
+
"node_modules/next/dist/shared/lib/utils.js"(exports) {
|
|
262
|
+
"use strict";
|
|
263
|
+
Object.defineProperty(exports, "__esModule", {
|
|
264
|
+
value: true
|
|
265
|
+
});
|
|
266
|
+
function _export(target, all) {
|
|
267
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
268
|
+
enumerable: true,
|
|
269
|
+
get: all[name]
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
_export(exports, {
|
|
273
|
+
DecodeError: function() {
|
|
274
|
+
return DecodeError;
|
|
275
|
+
},
|
|
276
|
+
MiddlewareNotFoundError: function() {
|
|
277
|
+
return MiddlewareNotFoundError;
|
|
278
|
+
},
|
|
279
|
+
MissingStaticPage: function() {
|
|
280
|
+
return MissingStaticPage;
|
|
281
|
+
},
|
|
282
|
+
NormalizeError: function() {
|
|
283
|
+
return NormalizeError;
|
|
284
|
+
},
|
|
285
|
+
PageNotFoundError: function() {
|
|
286
|
+
return PageNotFoundError;
|
|
287
|
+
},
|
|
288
|
+
SP: function() {
|
|
289
|
+
return SP;
|
|
290
|
+
},
|
|
291
|
+
ST: function() {
|
|
292
|
+
return ST;
|
|
293
|
+
},
|
|
294
|
+
WEB_VITALS: function() {
|
|
295
|
+
return WEB_VITALS;
|
|
296
|
+
},
|
|
297
|
+
execOnce: function() {
|
|
298
|
+
return execOnce;
|
|
299
|
+
},
|
|
300
|
+
getDisplayName: function() {
|
|
301
|
+
return getDisplayName;
|
|
302
|
+
},
|
|
303
|
+
getLocationOrigin: function() {
|
|
304
|
+
return getLocationOrigin;
|
|
305
|
+
},
|
|
306
|
+
getURL: function() {
|
|
307
|
+
return getURL;
|
|
308
|
+
},
|
|
309
|
+
isAbsoluteUrl: function() {
|
|
310
|
+
return isAbsoluteUrl;
|
|
311
|
+
},
|
|
312
|
+
isResSent: function() {
|
|
313
|
+
return isResSent;
|
|
314
|
+
},
|
|
315
|
+
loadGetInitialProps: function() {
|
|
316
|
+
return loadGetInitialProps;
|
|
317
|
+
},
|
|
318
|
+
normalizeRepeatedSlashes: function() {
|
|
319
|
+
return normalizeRepeatedSlashes;
|
|
320
|
+
},
|
|
321
|
+
stringifyError: function() {
|
|
322
|
+
return stringifyError;
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
var WEB_VITALS = [
|
|
326
|
+
"CLS",
|
|
327
|
+
"FCP",
|
|
328
|
+
"FID",
|
|
329
|
+
"INP",
|
|
330
|
+
"LCP",
|
|
331
|
+
"TTFB"
|
|
332
|
+
];
|
|
333
|
+
function execOnce(fn) {
|
|
334
|
+
let used = false;
|
|
335
|
+
let result;
|
|
336
|
+
return (...args) => {
|
|
337
|
+
if (!used) {
|
|
338
|
+
used = true;
|
|
339
|
+
result = fn(...args);
|
|
340
|
+
}
|
|
341
|
+
return result;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
|
345
|
+
var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
|
|
346
|
+
function getLocationOrigin() {
|
|
347
|
+
const { protocol, hostname, port } = window.location;
|
|
348
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}`;
|
|
349
|
+
}
|
|
350
|
+
function getURL() {
|
|
351
|
+
const { href } = window.location;
|
|
352
|
+
const origin = getLocationOrigin();
|
|
353
|
+
return href.substring(origin.length);
|
|
354
|
+
}
|
|
355
|
+
function getDisplayName(Component) {
|
|
356
|
+
return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
|
|
357
|
+
}
|
|
358
|
+
function isResSent(res) {
|
|
359
|
+
return res.finished || res.headersSent;
|
|
360
|
+
}
|
|
361
|
+
function normalizeRepeatedSlashes(url) {
|
|
362
|
+
const urlParts = url.split("?");
|
|
363
|
+
const urlNoQuery = urlParts[0];
|
|
364
|
+
return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? `?${urlParts.slice(1).join("?")}` : "");
|
|
365
|
+
}
|
|
366
|
+
async function loadGetInitialProps(App, ctx) {
|
|
367
|
+
if (true) {
|
|
368
|
+
if (App.prototype?.getInitialProps) {
|
|
369
|
+
const message = `"${getDisplayName(App)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;
|
|
370
|
+
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
371
|
+
value: "E394",
|
|
372
|
+
enumerable: false,
|
|
373
|
+
configurable: true
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
const res = ctx.res || ctx.ctx && ctx.ctx.res;
|
|
378
|
+
if (!App.getInitialProps) {
|
|
379
|
+
if (ctx.ctx && ctx.Component) {
|
|
380
|
+
return {
|
|
381
|
+
pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
return {};
|
|
385
|
+
}
|
|
386
|
+
const props = await App.getInitialProps(ctx);
|
|
387
|
+
if (res && isResSent(res)) {
|
|
388
|
+
return props;
|
|
389
|
+
}
|
|
390
|
+
if (!props) {
|
|
391
|
+
const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
|
|
392
|
+
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
393
|
+
value: "E394",
|
|
394
|
+
enumerable: false,
|
|
395
|
+
configurable: true
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
if (true) {
|
|
399
|
+
if (Object.keys(props).length === 0 && !ctx.ctx) {
|
|
400
|
+
console.warn(`${getDisplayName(App)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return props;
|
|
404
|
+
}
|
|
405
|
+
var SP = typeof performance !== "undefined";
|
|
406
|
+
var ST = SP && [
|
|
407
|
+
"mark",
|
|
408
|
+
"measure",
|
|
409
|
+
"getEntriesByName"
|
|
410
|
+
].every((method) => typeof performance[method] === "function");
|
|
411
|
+
var DecodeError = class extends Error {
|
|
412
|
+
};
|
|
413
|
+
var NormalizeError = class extends Error {
|
|
414
|
+
};
|
|
415
|
+
var PageNotFoundError = class extends Error {
|
|
416
|
+
constructor(page) {
|
|
417
|
+
super();
|
|
418
|
+
this.code = "ENOENT";
|
|
419
|
+
this.name = "PageNotFoundError";
|
|
420
|
+
this.message = `Cannot find module for page: ${page}`;
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
var MissingStaticPage = class extends Error {
|
|
424
|
+
constructor(page, message) {
|
|
425
|
+
super();
|
|
426
|
+
this.message = `Failed to load static file for page: ${page} ${message}`;
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
var MiddlewareNotFoundError = class extends Error {
|
|
430
|
+
constructor() {
|
|
431
|
+
super();
|
|
432
|
+
this.code = "ENOENT";
|
|
433
|
+
this.message = `Cannot find the middleware module`;
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
function stringifyError(error) {
|
|
437
|
+
return JSON.stringify({
|
|
438
|
+
message: error.message,
|
|
439
|
+
stack: error.stack
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
// node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
|
|
446
|
+
var require_remove_trailing_slash = __commonJS({
|
|
447
|
+
"node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports) {
|
|
448
|
+
"use strict";
|
|
449
|
+
Object.defineProperty(exports, "__esModule", {
|
|
450
|
+
value: true
|
|
451
|
+
});
|
|
452
|
+
Object.defineProperty(exports, "removeTrailingSlash", {
|
|
453
|
+
enumerable: true,
|
|
454
|
+
get: function() {
|
|
455
|
+
return removeTrailingSlash;
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
function removeTrailingSlash(route) {
|
|
459
|
+
return route.replace(/\/$/, "") || "/";
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
// node_modules/next/dist/shared/lib/router/utils/parse-path.js
|
|
465
|
+
var require_parse_path = __commonJS({
|
|
466
|
+
"node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports) {
|
|
467
|
+
"use strict";
|
|
468
|
+
Object.defineProperty(exports, "__esModule", {
|
|
469
|
+
value: true
|
|
470
|
+
});
|
|
471
|
+
Object.defineProperty(exports, "parsePath", {
|
|
472
|
+
enumerable: true,
|
|
473
|
+
get: function() {
|
|
474
|
+
return parsePath;
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
function parsePath(path) {
|
|
478
|
+
const hashIndex = path.indexOf("#");
|
|
479
|
+
const queryIndex = path.indexOf("?");
|
|
480
|
+
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
|
|
481
|
+
if (hasQuery || hashIndex > -1) {
|
|
482
|
+
return {
|
|
483
|
+
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
|
|
484
|
+
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
|
|
485
|
+
hash: hashIndex > -1 ? path.slice(hashIndex) : ""
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
return {
|
|
489
|
+
pathname: path,
|
|
490
|
+
query: "",
|
|
491
|
+
hash: ""
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
// node_modules/next/dist/client/normalize-trailing-slash.js
|
|
498
|
+
var require_normalize_trailing_slash = __commonJS({
|
|
499
|
+
"node_modules/next/dist/client/normalize-trailing-slash.js"(exports, module) {
|
|
500
|
+
"use strict";
|
|
501
|
+
Object.defineProperty(exports, "__esModule", {
|
|
502
|
+
value: true
|
|
503
|
+
});
|
|
504
|
+
Object.defineProperty(exports, "normalizePathTrailingSlash", {
|
|
505
|
+
enumerable: true,
|
|
506
|
+
get: function() {
|
|
507
|
+
return normalizePathTrailingSlash;
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
var _removetrailingslash = require_remove_trailing_slash();
|
|
511
|
+
var _parsepath = require_parse_path();
|
|
512
|
+
var normalizePathTrailingSlash = (path) => {
|
|
513
|
+
if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
|
|
514
|
+
return path;
|
|
515
|
+
}
|
|
516
|
+
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
517
|
+
if (process.env.__NEXT_TRAILING_SLASH) {
|
|
518
|
+
if (/\.[^/]+\/?$/.test(pathname)) {
|
|
519
|
+
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
520
|
+
} else if (pathname.endsWith("/")) {
|
|
521
|
+
return `${pathname}${query}${hash}`;
|
|
522
|
+
} else {
|
|
523
|
+
return `${pathname}/${query}${hash}`;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
527
|
+
};
|
|
528
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
529
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
530
|
+
Object.assign(exports.default, exports);
|
|
531
|
+
module.exports = exports.default;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
// node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
|
|
537
|
+
var require_path_has_prefix = __commonJS({
|
|
538
|
+
"node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports) {
|
|
539
|
+
"use strict";
|
|
540
|
+
Object.defineProperty(exports, "__esModule", {
|
|
541
|
+
value: true
|
|
542
|
+
});
|
|
543
|
+
Object.defineProperty(exports, "pathHasPrefix", {
|
|
544
|
+
enumerable: true,
|
|
545
|
+
get: function() {
|
|
546
|
+
return pathHasPrefix;
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
var _parsepath = require_parse_path();
|
|
550
|
+
function pathHasPrefix(path, prefix) {
|
|
551
|
+
if (typeof path !== "string") {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
const { pathname } = (0, _parsepath.parsePath)(path);
|
|
555
|
+
return pathname === prefix || pathname.startsWith(prefix + "/");
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// node_modules/next/dist/client/has-base-path.js
|
|
561
|
+
var require_has_base_path = __commonJS({
|
|
562
|
+
"node_modules/next/dist/client/has-base-path.js"(exports, module) {
|
|
563
|
+
"use strict";
|
|
564
|
+
Object.defineProperty(exports, "__esModule", {
|
|
565
|
+
value: true
|
|
566
|
+
});
|
|
567
|
+
Object.defineProperty(exports, "hasBasePath", {
|
|
568
|
+
enumerable: true,
|
|
569
|
+
get: function() {
|
|
570
|
+
return hasBasePath;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
var _pathhasprefix = require_path_has_prefix();
|
|
574
|
+
var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
575
|
+
function hasBasePath(path) {
|
|
576
|
+
return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
|
|
577
|
+
}
|
|
578
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
579
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
580
|
+
Object.assign(exports.default, exports);
|
|
581
|
+
module.exports = exports.default;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
// node_modules/next/dist/shared/lib/router/utils/is-local-url.js
|
|
587
|
+
var require_is_local_url = __commonJS({
|
|
588
|
+
"node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports) {
|
|
589
|
+
"use strict";
|
|
590
|
+
Object.defineProperty(exports, "__esModule", {
|
|
591
|
+
value: true
|
|
592
|
+
});
|
|
593
|
+
Object.defineProperty(exports, "isLocalURL", {
|
|
594
|
+
enumerable: true,
|
|
595
|
+
get: function() {
|
|
596
|
+
return isLocalURL;
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
var _utils = require_utils();
|
|
600
|
+
var _hasbasepath = require_has_base_path();
|
|
601
|
+
function isLocalURL(url) {
|
|
602
|
+
if (!(0, _utils.isAbsoluteUrl)(url)) return true;
|
|
603
|
+
try {
|
|
604
|
+
const locationOrigin = (0, _utils.getLocationOrigin)();
|
|
605
|
+
const resolved = new URL(url, locationOrigin);
|
|
606
|
+
return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
|
|
607
|
+
} catch (_) {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
// node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
|
|
615
|
+
var require_sorted_routes = __commonJS({
|
|
616
|
+
"node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports) {
|
|
617
|
+
"use strict";
|
|
618
|
+
Object.defineProperty(exports, "__esModule", {
|
|
619
|
+
value: true
|
|
620
|
+
});
|
|
621
|
+
function _export(target, all) {
|
|
622
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
623
|
+
enumerable: true,
|
|
624
|
+
get: all[name]
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
_export(exports, {
|
|
628
|
+
getSortedRouteObjects: function() {
|
|
629
|
+
return getSortedRouteObjects;
|
|
630
|
+
},
|
|
631
|
+
getSortedRoutes: function() {
|
|
632
|
+
return getSortedRoutes;
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
var UrlNode = class _UrlNode {
|
|
636
|
+
insert(urlPath) {
|
|
637
|
+
this._insert(urlPath.split("/").filter(Boolean), [], false);
|
|
638
|
+
}
|
|
639
|
+
smoosh() {
|
|
640
|
+
return this._smoosh();
|
|
641
|
+
}
|
|
642
|
+
_smoosh(prefix = "/") {
|
|
643
|
+
const childrenPaths = [
|
|
644
|
+
...this.children.keys()
|
|
645
|
+
].sort();
|
|
646
|
+
if (this.slugName !== null) {
|
|
647
|
+
childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
|
|
648
|
+
}
|
|
649
|
+
if (this.restSlugName !== null) {
|
|
650
|
+
childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
|
|
651
|
+
}
|
|
652
|
+
if (this.optionalRestSlugName !== null) {
|
|
653
|
+
childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
|
|
654
|
+
}
|
|
655
|
+
const routes = childrenPaths.map((c) => this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr) => [
|
|
656
|
+
...prev,
|
|
657
|
+
...curr
|
|
658
|
+
], []);
|
|
659
|
+
if (this.slugName !== null) {
|
|
660
|
+
routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
|
|
661
|
+
}
|
|
662
|
+
if (!this.placeholder) {
|
|
663
|
+
const r = prefix === "/" ? "/" : prefix.slice(0, -1);
|
|
664
|
+
if (this.optionalRestSlugName != null) {
|
|
665
|
+
throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
|
|
666
|
+
value: "E458",
|
|
667
|
+
enumerable: false,
|
|
668
|
+
configurable: true
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
routes.unshift(r);
|
|
672
|
+
}
|
|
673
|
+
if (this.restSlugName !== null) {
|
|
674
|
+
routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
|
|
675
|
+
}
|
|
676
|
+
if (this.optionalRestSlugName !== null) {
|
|
677
|
+
routes.push(...this.children.get("[[...]]")._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
|
|
678
|
+
}
|
|
679
|
+
return routes;
|
|
680
|
+
}
|
|
681
|
+
_insert(urlPaths, slugNames, isCatchAll) {
|
|
682
|
+
if (urlPaths.length === 0) {
|
|
683
|
+
this.placeholder = false;
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
if (isCatchAll) {
|
|
687
|
+
throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL.`), "__NEXT_ERROR_CODE", {
|
|
688
|
+
value: "E392",
|
|
689
|
+
enumerable: false,
|
|
690
|
+
configurable: true
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
let nextSegment = urlPaths[0];
|
|
694
|
+
if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
|
|
695
|
+
let handleSlug = function(previousSlug, nextSlug) {
|
|
696
|
+
if (previousSlug !== null) {
|
|
697
|
+
if (previousSlug !== nextSlug) {
|
|
698
|
+
throw Object.defineProperty(new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`), "__NEXT_ERROR_CODE", {
|
|
699
|
+
value: "E337",
|
|
700
|
+
enumerable: false,
|
|
701
|
+
configurable: true
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
slugNames.forEach((slug) => {
|
|
706
|
+
if (slug === nextSlug) {
|
|
707
|
+
throw Object.defineProperty(new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`), "__NEXT_ERROR_CODE", {
|
|
708
|
+
value: "E247",
|
|
709
|
+
enumerable: false,
|
|
710
|
+
configurable: true
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
|
|
714
|
+
throw Object.defineProperty(new Error(`You cannot have the slug names "${slug}" and "${nextSlug}" differ only by non-word symbols within a single dynamic path`), "__NEXT_ERROR_CODE", {
|
|
715
|
+
value: "E499",
|
|
716
|
+
enumerable: false,
|
|
717
|
+
configurable: true
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
slugNames.push(nextSlug);
|
|
722
|
+
};
|
|
723
|
+
let segmentName = nextSegment.slice(1, -1);
|
|
724
|
+
let isOptional = false;
|
|
725
|
+
if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
|
|
726
|
+
segmentName = segmentName.slice(1, -1);
|
|
727
|
+
isOptional = true;
|
|
728
|
+
}
|
|
729
|
+
if (segmentName.startsWith("\u2026")) {
|
|
730
|
+
throw Object.defineProperty(new Error(`Detected a three-dot character ('\u2026') at ('${segmentName}'). Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
|
|
731
|
+
value: "E147",
|
|
732
|
+
enumerable: false,
|
|
733
|
+
configurable: true
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
if (segmentName.startsWith("...")) {
|
|
737
|
+
segmentName = segmentName.substring(3);
|
|
738
|
+
isCatchAll = true;
|
|
739
|
+
}
|
|
740
|
+
if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
|
|
741
|
+
throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`), "__NEXT_ERROR_CODE", {
|
|
742
|
+
value: "E421",
|
|
743
|
+
enumerable: false,
|
|
744
|
+
configurable: true
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
if (segmentName.startsWith(".")) {
|
|
748
|
+
throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${segmentName}').`), "__NEXT_ERROR_CODE", {
|
|
749
|
+
value: "E288",
|
|
750
|
+
enumerable: false,
|
|
751
|
+
configurable: true
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
if (isCatchAll) {
|
|
755
|
+
if (isOptional) {
|
|
756
|
+
if (this.restSlugName != null) {
|
|
757
|
+
throw Object.defineProperty(new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`), "__NEXT_ERROR_CODE", {
|
|
758
|
+
value: "E299",
|
|
759
|
+
enumerable: false,
|
|
760
|
+
configurable: true
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
handleSlug(this.optionalRestSlugName, segmentName);
|
|
764
|
+
this.optionalRestSlugName = segmentName;
|
|
765
|
+
nextSegment = "[[...]]";
|
|
766
|
+
} else {
|
|
767
|
+
if (this.optionalRestSlugName != null) {
|
|
768
|
+
throw Object.defineProperty(new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
|
|
769
|
+
value: "E300",
|
|
770
|
+
enumerable: false,
|
|
771
|
+
configurable: true
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
handleSlug(this.restSlugName, segmentName);
|
|
775
|
+
this.restSlugName = segmentName;
|
|
776
|
+
nextSegment = "[...]";
|
|
777
|
+
}
|
|
778
|
+
} else {
|
|
779
|
+
if (isOptional) {
|
|
780
|
+
throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
|
|
781
|
+
value: "E435",
|
|
782
|
+
enumerable: false,
|
|
783
|
+
configurable: true
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
handleSlug(this.slugName, segmentName);
|
|
787
|
+
this.slugName = segmentName;
|
|
788
|
+
nextSegment = "[]";
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
if (!this.children.has(nextSegment)) {
|
|
792
|
+
this.children.set(nextSegment, new _UrlNode());
|
|
793
|
+
}
|
|
794
|
+
this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
|
|
795
|
+
}
|
|
796
|
+
constructor() {
|
|
797
|
+
this.placeholder = true;
|
|
798
|
+
this.children = /* @__PURE__ */ new Map();
|
|
799
|
+
this.slugName = null;
|
|
800
|
+
this.restSlugName = null;
|
|
801
|
+
this.optionalRestSlugName = null;
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
function getSortedRoutes(normalizedPages) {
|
|
805
|
+
const root = new UrlNode();
|
|
806
|
+
normalizedPages.forEach((pagePath) => root.insert(pagePath));
|
|
807
|
+
return root.smoosh();
|
|
808
|
+
}
|
|
809
|
+
function getSortedRouteObjects(objects, getter) {
|
|
810
|
+
const indexes = {};
|
|
811
|
+
const pathnames = [];
|
|
812
|
+
for (let i = 0; i < objects.length; i++) {
|
|
813
|
+
const pathname = getter(objects[i]);
|
|
814
|
+
indexes[pathname] = i;
|
|
815
|
+
pathnames[i] = pathname;
|
|
816
|
+
}
|
|
817
|
+
const sorted = getSortedRoutes(pathnames);
|
|
818
|
+
return sorted.map((pathname) => objects[indexes[pathname]]);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
// node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
|
|
824
|
+
var require_ensure_leading_slash = __commonJS({
|
|
825
|
+
"node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports) {
|
|
826
|
+
"use strict";
|
|
827
|
+
Object.defineProperty(exports, "__esModule", {
|
|
828
|
+
value: true
|
|
829
|
+
});
|
|
830
|
+
Object.defineProperty(exports, "ensureLeadingSlash", {
|
|
831
|
+
enumerable: true,
|
|
832
|
+
get: function() {
|
|
833
|
+
return ensureLeadingSlash;
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
function ensureLeadingSlash(path) {
|
|
837
|
+
return path.startsWith("/") ? path : `/${path}`;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
// node_modules/next/dist/shared/lib/segment.js
|
|
843
|
+
var require_segment = __commonJS({
|
|
844
|
+
"node_modules/next/dist/shared/lib/segment.js"(exports) {
|
|
845
|
+
"use strict";
|
|
846
|
+
Object.defineProperty(exports, "__esModule", {
|
|
847
|
+
value: true
|
|
848
|
+
});
|
|
849
|
+
function _export(target, all) {
|
|
850
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
851
|
+
enumerable: true,
|
|
852
|
+
get: all[name]
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
_export(exports, {
|
|
856
|
+
DEFAULT_SEGMENT_KEY: function() {
|
|
857
|
+
return DEFAULT_SEGMENT_KEY;
|
|
858
|
+
},
|
|
859
|
+
PAGE_SEGMENT_KEY: function() {
|
|
860
|
+
return PAGE_SEGMENT_KEY;
|
|
861
|
+
},
|
|
862
|
+
addSearchParamsIfPageSegment: function() {
|
|
863
|
+
return addSearchParamsIfPageSegment;
|
|
864
|
+
},
|
|
865
|
+
computeSelectedLayoutSegment: function() {
|
|
866
|
+
return computeSelectedLayoutSegment;
|
|
867
|
+
},
|
|
868
|
+
getSegmentValue: function() {
|
|
869
|
+
return getSegmentValue;
|
|
870
|
+
},
|
|
871
|
+
getSelectedLayoutSegmentPath: function() {
|
|
872
|
+
return getSelectedLayoutSegmentPath;
|
|
873
|
+
},
|
|
874
|
+
isGroupSegment: function() {
|
|
875
|
+
return isGroupSegment;
|
|
876
|
+
},
|
|
877
|
+
isParallelRouteSegment: function() {
|
|
878
|
+
return isParallelRouteSegment;
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
function getSegmentValue(segment) {
|
|
882
|
+
return Array.isArray(segment) ? segment[1] : segment;
|
|
883
|
+
}
|
|
884
|
+
function isGroupSegment(segment) {
|
|
885
|
+
return segment[0] === "(" && segment.endsWith(")");
|
|
886
|
+
}
|
|
887
|
+
function isParallelRouteSegment(segment) {
|
|
888
|
+
return segment.startsWith("@") && segment !== "@children";
|
|
889
|
+
}
|
|
890
|
+
function addSearchParamsIfPageSegment(segment, searchParams) {
|
|
891
|
+
const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
|
|
892
|
+
if (isPageSegment) {
|
|
893
|
+
const stringifiedQuery = JSON.stringify(searchParams);
|
|
894
|
+
return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
|
|
895
|
+
}
|
|
896
|
+
return segment;
|
|
897
|
+
}
|
|
898
|
+
function computeSelectedLayoutSegment(segments, parallelRouteKey) {
|
|
899
|
+
if (!segments || segments.length === 0) {
|
|
900
|
+
return null;
|
|
901
|
+
}
|
|
902
|
+
const rawSegment = parallelRouteKey === "children" ? segments[0] : segments[segments.length - 1];
|
|
903
|
+
return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
|
|
904
|
+
}
|
|
905
|
+
function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
|
|
906
|
+
let node;
|
|
907
|
+
if (first) {
|
|
908
|
+
node = tree[1][parallelRouteKey];
|
|
909
|
+
} else {
|
|
910
|
+
const parallelRoutes = tree[1];
|
|
911
|
+
node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
|
|
912
|
+
}
|
|
913
|
+
if (!node) return segmentPath;
|
|
914
|
+
const segment = node[0];
|
|
915
|
+
let segmentValue = getSegmentValue(segment);
|
|
916
|
+
if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
|
|
917
|
+
return segmentPath;
|
|
918
|
+
}
|
|
919
|
+
segmentPath.push(segmentValue);
|
|
920
|
+
return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
|
|
921
|
+
}
|
|
922
|
+
var PAGE_SEGMENT_KEY = "__PAGE__";
|
|
923
|
+
var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
|
|
927
|
+
// node_modules/next/dist/shared/lib/router/utils/app-paths.js
|
|
928
|
+
var require_app_paths = __commonJS({
|
|
929
|
+
"node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports) {
|
|
930
|
+
"use strict";
|
|
931
|
+
Object.defineProperty(exports, "__esModule", {
|
|
932
|
+
value: true
|
|
933
|
+
});
|
|
934
|
+
function _export(target, all) {
|
|
935
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
936
|
+
enumerable: true,
|
|
937
|
+
get: all[name]
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
_export(exports, {
|
|
941
|
+
normalizeAppPath: function() {
|
|
942
|
+
return normalizeAppPath;
|
|
943
|
+
},
|
|
944
|
+
normalizeRscURL: function() {
|
|
945
|
+
return normalizeRscURL;
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
var _ensureleadingslash = require_ensure_leading_slash();
|
|
949
|
+
var _segment = require_segment();
|
|
950
|
+
function normalizeAppPath(route) {
|
|
951
|
+
return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
|
|
952
|
+
if (!segment) {
|
|
953
|
+
return pathname;
|
|
954
|
+
}
|
|
955
|
+
if ((0, _segment.isGroupSegment)(segment)) {
|
|
956
|
+
return pathname;
|
|
957
|
+
}
|
|
958
|
+
if (segment[0] === "@") {
|
|
959
|
+
return pathname;
|
|
960
|
+
}
|
|
961
|
+
if ((segment === "page" || segment === "route") && index === segments.length - 1) {
|
|
962
|
+
return pathname;
|
|
963
|
+
}
|
|
964
|
+
return `${pathname}/${segment}`;
|
|
965
|
+
}, ""));
|
|
966
|
+
}
|
|
967
|
+
function normalizeRscURL(url) {
|
|
968
|
+
return url.replace(
|
|
969
|
+
/\.rsc($|\?)/,
|
|
970
|
+
// $1 ensures `?` is preserved
|
|
971
|
+
"$1"
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
// node_modules/next/dist/shared/lib/router/utils/interception-routes.js
|
|
978
|
+
var require_interception_routes = __commonJS({
|
|
979
|
+
"node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports) {
|
|
980
|
+
"use strict";
|
|
981
|
+
Object.defineProperty(exports, "__esModule", {
|
|
982
|
+
value: true
|
|
983
|
+
});
|
|
984
|
+
function _export(target, all) {
|
|
985
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
986
|
+
enumerable: true,
|
|
987
|
+
get: all[name]
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
_export(exports, {
|
|
991
|
+
INTERCEPTION_ROUTE_MARKERS: function() {
|
|
992
|
+
return INTERCEPTION_ROUTE_MARKERS;
|
|
993
|
+
},
|
|
994
|
+
extractInterceptionRouteInformation: function() {
|
|
995
|
+
return extractInterceptionRouteInformation;
|
|
996
|
+
},
|
|
997
|
+
isInterceptionRouteAppPath: function() {
|
|
998
|
+
return isInterceptionRouteAppPath;
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
var _apppaths = require_app_paths();
|
|
1002
|
+
var INTERCEPTION_ROUTE_MARKERS = [
|
|
1003
|
+
"(..)(..)",
|
|
1004
|
+
"(.)",
|
|
1005
|
+
"(..)",
|
|
1006
|
+
"(...)"
|
|
1007
|
+
];
|
|
1008
|
+
function isInterceptionRouteAppPath(path) {
|
|
1009
|
+
return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
|
|
1010
|
+
}
|
|
1011
|
+
function extractInterceptionRouteInformation(path) {
|
|
1012
|
+
let interceptingRoute;
|
|
1013
|
+
let marker;
|
|
1014
|
+
let interceptedRoute;
|
|
1015
|
+
for (const segment of path.split("/")) {
|
|
1016
|
+
marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
|
|
1017
|
+
if (marker) {
|
|
1018
|
+
;
|
|
1019
|
+
[interceptingRoute, interceptedRoute] = path.split(marker, 2);
|
|
1020
|
+
break;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
if (!interceptingRoute || !marker || !interceptedRoute) {
|
|
1024
|
+
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`), "__NEXT_ERROR_CODE", {
|
|
1025
|
+
value: "E269",
|
|
1026
|
+
enumerable: false,
|
|
1027
|
+
configurable: true
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
|
|
1031
|
+
switch (marker) {
|
|
1032
|
+
case "(.)":
|
|
1033
|
+
if (interceptingRoute === "/") {
|
|
1034
|
+
interceptedRoute = `/${interceptedRoute}`;
|
|
1035
|
+
} else {
|
|
1036
|
+
interceptedRoute = interceptingRoute + "/" + interceptedRoute;
|
|
1037
|
+
}
|
|
1038
|
+
break;
|
|
1039
|
+
case "(..)":
|
|
1040
|
+
if (interceptingRoute === "/") {
|
|
1041
|
+
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`), "__NEXT_ERROR_CODE", {
|
|
1042
|
+
value: "E207",
|
|
1043
|
+
enumerable: false,
|
|
1044
|
+
configurable: true
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
|
|
1048
|
+
break;
|
|
1049
|
+
case "(...)":
|
|
1050
|
+
interceptedRoute = "/" + interceptedRoute;
|
|
1051
|
+
break;
|
|
1052
|
+
case "(..)(..)":
|
|
1053
|
+
const splitInterceptingRoute = interceptingRoute.split("/");
|
|
1054
|
+
if (splitInterceptingRoute.length <= 2) {
|
|
1055
|
+
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`), "__NEXT_ERROR_CODE", {
|
|
1056
|
+
value: "E486",
|
|
1057
|
+
enumerable: false,
|
|
1058
|
+
configurable: true
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
|
|
1062
|
+
break;
|
|
1063
|
+
default:
|
|
1064
|
+
throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
|
|
1065
|
+
value: "E112",
|
|
1066
|
+
enumerable: false,
|
|
1067
|
+
configurable: true
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
return {
|
|
1071
|
+
interceptingRoute,
|
|
1072
|
+
interceptedRoute
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
// node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
|
|
1079
|
+
var require_is_dynamic = __commonJS({
|
|
1080
|
+
"node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports) {
|
|
1081
|
+
"use strict";
|
|
1082
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1083
|
+
value: true
|
|
1084
|
+
});
|
|
1085
|
+
Object.defineProperty(exports, "isDynamicRoute", {
|
|
1086
|
+
enumerable: true,
|
|
1087
|
+
get: function() {
|
|
1088
|
+
return isDynamicRoute;
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
var _interceptionroutes = require_interception_routes();
|
|
1092
|
+
var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
|
|
1093
|
+
var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
|
|
1094
|
+
function isDynamicRoute(route, strict = true) {
|
|
1095
|
+
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
|
|
1096
|
+
route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
|
|
1097
|
+
}
|
|
1098
|
+
if (strict) {
|
|
1099
|
+
return TEST_STRICT_ROUTE.test(route);
|
|
1100
|
+
}
|
|
1101
|
+
return TEST_ROUTE.test(route);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
|
|
1106
|
+
// node_modules/next/dist/shared/lib/router/utils/index.js
|
|
1107
|
+
var require_utils2 = __commonJS({
|
|
1108
|
+
"node_modules/next/dist/shared/lib/router/utils/index.js"(exports) {
|
|
1109
|
+
"use strict";
|
|
1110
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1111
|
+
value: true
|
|
1112
|
+
});
|
|
1113
|
+
function _export(target, all) {
|
|
1114
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1115
|
+
enumerable: true,
|
|
1116
|
+
get: all[name]
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
_export(exports, {
|
|
1120
|
+
getSortedRouteObjects: function() {
|
|
1121
|
+
return _sortedroutes.getSortedRouteObjects;
|
|
1122
|
+
},
|
|
1123
|
+
getSortedRoutes: function() {
|
|
1124
|
+
return _sortedroutes.getSortedRoutes;
|
|
1125
|
+
},
|
|
1126
|
+
isDynamicRoute: function() {
|
|
1127
|
+
return _isdynamic.isDynamicRoute;
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
var _sortedroutes = require_sorted_routes();
|
|
1131
|
+
var _isdynamic = require_is_dynamic();
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
|
|
1135
|
+
// node_modules/next/dist/compiled/path-to-regexp/index.js
|
|
1136
|
+
var require_path_to_regexp = __commonJS({
|
|
1137
|
+
"node_modules/next/dist/compiled/path-to-regexp/index.js"(exports, module) {
|
|
1138
|
+
(() => {
|
|
1139
|
+
"use strict";
|
|
1140
|
+
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
|
|
1141
|
+
var e = {};
|
|
1142
|
+
(() => {
|
|
1143
|
+
var n = e;
|
|
1144
|
+
Object.defineProperty(n, "__esModule", { value: true });
|
|
1145
|
+
n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = void 0;
|
|
1146
|
+
function lexer(e2) {
|
|
1147
|
+
var n2 = [];
|
|
1148
|
+
var r = 0;
|
|
1149
|
+
while (r < e2.length) {
|
|
1150
|
+
var t = e2[r];
|
|
1151
|
+
if (t === "*" || t === "+" || t === "?") {
|
|
1152
|
+
n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
|
|
1153
|
+
continue;
|
|
1154
|
+
}
|
|
1155
|
+
if (t === "\\") {
|
|
1156
|
+
n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
|
|
1157
|
+
continue;
|
|
1158
|
+
}
|
|
1159
|
+
if (t === "{") {
|
|
1160
|
+
n2.push({ type: "OPEN", index: r, value: e2[r++] });
|
|
1161
|
+
continue;
|
|
1162
|
+
}
|
|
1163
|
+
if (t === "}") {
|
|
1164
|
+
n2.push({ type: "CLOSE", index: r, value: e2[r++] });
|
|
1165
|
+
continue;
|
|
1166
|
+
}
|
|
1167
|
+
if (t === ":") {
|
|
1168
|
+
var a = "";
|
|
1169
|
+
var i = r + 1;
|
|
1170
|
+
while (i < e2.length) {
|
|
1171
|
+
var o = e2.charCodeAt(i);
|
|
1172
|
+
if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
|
|
1173
|
+
a += e2[i++];
|
|
1174
|
+
continue;
|
|
1175
|
+
}
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
if (!a) throw new TypeError("Missing parameter name at ".concat(r));
|
|
1179
|
+
n2.push({ type: "NAME", index: r, value: a });
|
|
1180
|
+
r = i;
|
|
1181
|
+
continue;
|
|
1182
|
+
}
|
|
1183
|
+
if (t === "(") {
|
|
1184
|
+
var c = 1;
|
|
1185
|
+
var f = "";
|
|
1186
|
+
var i = r + 1;
|
|
1187
|
+
if (e2[i] === "?") {
|
|
1188
|
+
throw new TypeError('Pattern cannot start with "?" at '.concat(i));
|
|
1189
|
+
}
|
|
1190
|
+
while (i < e2.length) {
|
|
1191
|
+
if (e2[i] === "\\") {
|
|
1192
|
+
f += e2[i++] + e2[i++];
|
|
1193
|
+
continue;
|
|
1194
|
+
}
|
|
1195
|
+
if (e2[i] === ")") {
|
|
1196
|
+
c--;
|
|
1197
|
+
if (c === 0) {
|
|
1198
|
+
i++;
|
|
1199
|
+
break;
|
|
1200
|
+
}
|
|
1201
|
+
} else if (e2[i] === "(") {
|
|
1202
|
+
c++;
|
|
1203
|
+
if (e2[i + 1] !== "?") {
|
|
1204
|
+
throw new TypeError("Capturing groups are not allowed at ".concat(i));
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
f += e2[i++];
|
|
1208
|
+
}
|
|
1209
|
+
if (c) throw new TypeError("Unbalanced pattern at ".concat(r));
|
|
1210
|
+
if (!f) throw new TypeError("Missing pattern at ".concat(r));
|
|
1211
|
+
n2.push({ type: "PATTERN", index: r, value: f });
|
|
1212
|
+
r = i;
|
|
1213
|
+
continue;
|
|
1214
|
+
}
|
|
1215
|
+
n2.push({ type: "CHAR", index: r, value: e2[r++] });
|
|
1216
|
+
}
|
|
1217
|
+
n2.push({ type: "END", index: r, value: "" });
|
|
1218
|
+
return n2;
|
|
1219
|
+
}
|
|
1220
|
+
function parse(e2, n2) {
|
|
1221
|
+
if (n2 === void 0) {
|
|
1222
|
+
n2 = {};
|
|
1223
|
+
}
|
|
1224
|
+
var r = lexer(e2);
|
|
1225
|
+
var t = n2.prefixes, a = t === void 0 ? "./" : t, i = n2.delimiter, o = i === void 0 ? "/#?" : i;
|
|
1226
|
+
var c = [];
|
|
1227
|
+
var f = 0;
|
|
1228
|
+
var u = 0;
|
|
1229
|
+
var p = "";
|
|
1230
|
+
var tryConsume = function(e3) {
|
|
1231
|
+
if (u < r.length && r[u].type === e3) return r[u++].value;
|
|
1232
|
+
};
|
|
1233
|
+
var mustConsume = function(e3) {
|
|
1234
|
+
var n3 = tryConsume(e3);
|
|
1235
|
+
if (n3 !== void 0) return n3;
|
|
1236
|
+
var t2 = r[u], a2 = t2.type, i2 = t2.index;
|
|
1237
|
+
throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
|
|
1238
|
+
};
|
|
1239
|
+
var consumeText = function() {
|
|
1240
|
+
var e3 = "";
|
|
1241
|
+
var n3;
|
|
1242
|
+
while (n3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
|
|
1243
|
+
e3 += n3;
|
|
1244
|
+
}
|
|
1245
|
+
return e3;
|
|
1246
|
+
};
|
|
1247
|
+
var isSafe = function(e3) {
|
|
1248
|
+
for (var n3 = 0, r2 = o; n3 < r2.length; n3++) {
|
|
1249
|
+
var t2 = r2[n3];
|
|
1250
|
+
if (e3.indexOf(t2) > -1) return true;
|
|
1251
|
+
}
|
|
1252
|
+
return false;
|
|
1253
|
+
};
|
|
1254
|
+
var safePattern = function(e3) {
|
|
1255
|
+
var n3 = c[c.length - 1];
|
|
1256
|
+
var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
|
|
1257
|
+
if (n3 && !r2) {
|
|
1258
|
+
throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
|
|
1259
|
+
}
|
|
1260
|
+
if (!r2 || isSafe(r2)) return "[^".concat(escapeString(o), "]+?");
|
|
1261
|
+
return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
|
|
1262
|
+
};
|
|
1263
|
+
while (u < r.length) {
|
|
1264
|
+
var v = tryConsume("CHAR");
|
|
1265
|
+
var s = tryConsume("NAME");
|
|
1266
|
+
var d = tryConsume("PATTERN");
|
|
1267
|
+
if (s || d) {
|
|
1268
|
+
var g = v || "";
|
|
1269
|
+
if (a.indexOf(g) === -1) {
|
|
1270
|
+
p += g;
|
|
1271
|
+
g = "";
|
|
1272
|
+
}
|
|
1273
|
+
if (p) {
|
|
1274
|
+
c.push(p);
|
|
1275
|
+
p = "";
|
|
1276
|
+
}
|
|
1277
|
+
c.push({ name: s || f++, prefix: g, suffix: "", pattern: d || safePattern(g), modifier: tryConsume("MODIFIER") || "" });
|
|
1278
|
+
continue;
|
|
1279
|
+
}
|
|
1280
|
+
var x = v || tryConsume("ESCAPED_CHAR");
|
|
1281
|
+
if (x) {
|
|
1282
|
+
p += x;
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
if (p) {
|
|
1286
|
+
c.push(p);
|
|
1287
|
+
p = "";
|
|
1288
|
+
}
|
|
1289
|
+
var h = tryConsume("OPEN");
|
|
1290
|
+
if (h) {
|
|
1291
|
+
var g = consumeText();
|
|
1292
|
+
var l = tryConsume("NAME") || "";
|
|
1293
|
+
var m = tryConsume("PATTERN") || "";
|
|
1294
|
+
var T = consumeText();
|
|
1295
|
+
mustConsume("CLOSE");
|
|
1296
|
+
c.push({ name: l || (m ? f++ : ""), pattern: l && !m ? safePattern(g) : m, prefix: g, suffix: T, modifier: tryConsume("MODIFIER") || "" });
|
|
1297
|
+
continue;
|
|
1298
|
+
}
|
|
1299
|
+
mustConsume("END");
|
|
1300
|
+
}
|
|
1301
|
+
return c;
|
|
1302
|
+
}
|
|
1303
|
+
n.parse = parse;
|
|
1304
|
+
function compile(e2, n2) {
|
|
1305
|
+
return tokensToFunction(parse(e2, n2), n2);
|
|
1306
|
+
}
|
|
1307
|
+
n.compile = compile;
|
|
1308
|
+
function tokensToFunction(e2, n2) {
|
|
1309
|
+
if (n2 === void 0) {
|
|
1310
|
+
n2 = {};
|
|
1311
|
+
}
|
|
1312
|
+
var r = flags(n2);
|
|
1313
|
+
var t = n2.encode, a = t === void 0 ? function(e3) {
|
|
1314
|
+
return e3;
|
|
1315
|
+
} : t, i = n2.validate, o = i === void 0 ? true : i;
|
|
1316
|
+
var c = e2.map((function(e3) {
|
|
1317
|
+
if (typeof e3 === "object") {
|
|
1318
|
+
return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
|
|
1319
|
+
}
|
|
1320
|
+
}));
|
|
1321
|
+
return function(n3) {
|
|
1322
|
+
var r2 = "";
|
|
1323
|
+
for (var t2 = 0; t2 < e2.length; t2++) {
|
|
1324
|
+
var i2 = e2[t2];
|
|
1325
|
+
if (typeof i2 === "string") {
|
|
1326
|
+
r2 += i2;
|
|
1327
|
+
continue;
|
|
1328
|
+
}
|
|
1329
|
+
var f = n3 ? n3[i2.name] : void 0;
|
|
1330
|
+
var u = i2.modifier === "?" || i2.modifier === "*";
|
|
1331
|
+
var p = i2.modifier === "*" || i2.modifier === "+";
|
|
1332
|
+
if (Array.isArray(f)) {
|
|
1333
|
+
if (!p) {
|
|
1334
|
+
throw new TypeError('Expected "'.concat(i2.name, '" to not repeat, but got an array'));
|
|
1335
|
+
}
|
|
1336
|
+
if (f.length === 0) {
|
|
1337
|
+
if (u) continue;
|
|
1338
|
+
throw new TypeError('Expected "'.concat(i2.name, '" to not be empty'));
|
|
1339
|
+
}
|
|
1340
|
+
for (var v = 0; v < f.length; v++) {
|
|
1341
|
+
var s = a(f[v], i2);
|
|
1342
|
+
if (o && !c[t2].test(s)) {
|
|
1343
|
+
throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
|
|
1344
|
+
}
|
|
1345
|
+
r2 += i2.prefix + s + i2.suffix;
|
|
1346
|
+
}
|
|
1347
|
+
continue;
|
|
1348
|
+
}
|
|
1349
|
+
if (typeof f === "string" || typeof f === "number") {
|
|
1350
|
+
var s = a(String(f), i2);
|
|
1351
|
+
if (o && !c[t2].test(s)) {
|
|
1352
|
+
throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
|
|
1353
|
+
}
|
|
1354
|
+
r2 += i2.prefix + s + i2.suffix;
|
|
1355
|
+
continue;
|
|
1356
|
+
}
|
|
1357
|
+
if (u) continue;
|
|
1358
|
+
var d = p ? "an array" : "a string";
|
|
1359
|
+
throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
|
|
1360
|
+
}
|
|
1361
|
+
return r2;
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
|
+
n.tokensToFunction = tokensToFunction;
|
|
1365
|
+
function match(e2, n2) {
|
|
1366
|
+
var r = [];
|
|
1367
|
+
var t = pathToRegexp(e2, r, n2);
|
|
1368
|
+
return regexpToFunction(t, r, n2);
|
|
1369
|
+
}
|
|
1370
|
+
n.match = match;
|
|
1371
|
+
function regexpToFunction(e2, n2, r) {
|
|
1372
|
+
if (r === void 0) {
|
|
1373
|
+
r = {};
|
|
1374
|
+
}
|
|
1375
|
+
var t = r.decode, a = t === void 0 ? function(e3) {
|
|
1376
|
+
return e3;
|
|
1377
|
+
} : t;
|
|
1378
|
+
return function(r2) {
|
|
1379
|
+
var t2 = e2.exec(r2);
|
|
1380
|
+
if (!t2) return false;
|
|
1381
|
+
var i = t2[0], o = t2.index;
|
|
1382
|
+
var c = /* @__PURE__ */ Object.create(null);
|
|
1383
|
+
var _loop_1 = function(e3) {
|
|
1384
|
+
if (t2[e3] === void 0) return "continue";
|
|
1385
|
+
var r3 = n2[e3 - 1];
|
|
1386
|
+
if (r3.modifier === "*" || r3.modifier === "+") {
|
|
1387
|
+
c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map((function(e4) {
|
|
1388
|
+
return a(e4, r3);
|
|
1389
|
+
}));
|
|
1390
|
+
} else {
|
|
1391
|
+
c[r3.name] = a(t2[e3], r3);
|
|
1392
|
+
}
|
|
1393
|
+
};
|
|
1394
|
+
for (var f = 1; f < t2.length; f++) {
|
|
1395
|
+
_loop_1(f);
|
|
1396
|
+
}
|
|
1397
|
+
return { path: i, index: o, params: c };
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
n.regexpToFunction = regexpToFunction;
|
|
1401
|
+
function escapeString(e2) {
|
|
1402
|
+
return e2.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
1403
|
+
}
|
|
1404
|
+
function flags(e2) {
|
|
1405
|
+
return e2 && e2.sensitive ? "" : "i";
|
|
1406
|
+
}
|
|
1407
|
+
function regexpToRegexp(e2, n2) {
|
|
1408
|
+
if (!n2) return e2;
|
|
1409
|
+
var r = /\((?:\?<(.*?)>)?(?!\?)/g;
|
|
1410
|
+
var t = 0;
|
|
1411
|
+
var a = r.exec(e2.source);
|
|
1412
|
+
while (a) {
|
|
1413
|
+
n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
|
|
1414
|
+
a = r.exec(e2.source);
|
|
1415
|
+
}
|
|
1416
|
+
return e2;
|
|
1417
|
+
}
|
|
1418
|
+
function arrayToRegexp(e2, n2, r) {
|
|
1419
|
+
var t = e2.map((function(e3) {
|
|
1420
|
+
return pathToRegexp(e3, n2, r).source;
|
|
1421
|
+
}));
|
|
1422
|
+
return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
|
|
1423
|
+
}
|
|
1424
|
+
function stringToRegexp(e2, n2, r) {
|
|
1425
|
+
return tokensToRegexp(parse(e2, r), n2, r);
|
|
1426
|
+
}
|
|
1427
|
+
function tokensToRegexp(e2, n2, r) {
|
|
1428
|
+
if (r === void 0) {
|
|
1429
|
+
r = {};
|
|
1430
|
+
}
|
|
1431
|
+
var t = r.strict, a = t === void 0 ? false : t, i = r.start, o = i === void 0 ? true : i, c = r.end, f = c === void 0 ? true : c, u = r.encode, p = u === void 0 ? function(e3) {
|
|
1432
|
+
return e3;
|
|
1433
|
+
} : u, v = r.delimiter, s = v === void 0 ? "/#?" : v, d = r.endsWith, g = d === void 0 ? "" : d;
|
|
1434
|
+
var x = "[".concat(escapeString(g), "]|$");
|
|
1435
|
+
var h = "[".concat(escapeString(s), "]");
|
|
1436
|
+
var l = o ? "^" : "";
|
|
1437
|
+
for (var m = 0, T = e2; m < T.length; m++) {
|
|
1438
|
+
var E = T[m];
|
|
1439
|
+
if (typeof E === "string") {
|
|
1440
|
+
l += escapeString(p(E));
|
|
1441
|
+
} else {
|
|
1442
|
+
var w = escapeString(p(E.prefix));
|
|
1443
|
+
var y = escapeString(p(E.suffix));
|
|
1444
|
+
if (E.pattern) {
|
|
1445
|
+
if (n2) n2.push(E);
|
|
1446
|
+
if (w || y) {
|
|
1447
|
+
if (E.modifier === "+" || E.modifier === "*") {
|
|
1448
|
+
var R = E.modifier === "*" ? "?" : "";
|
|
1449
|
+
l += "(?:".concat(w, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R);
|
|
1450
|
+
} else {
|
|
1451
|
+
l += "(?:".concat(w, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
|
|
1452
|
+
}
|
|
1453
|
+
} else {
|
|
1454
|
+
if (E.modifier === "+" || E.modifier === "*") {
|
|
1455
|
+
throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
|
|
1456
|
+
}
|
|
1457
|
+
l += "(".concat(E.pattern, ")").concat(E.modifier);
|
|
1458
|
+
}
|
|
1459
|
+
} else {
|
|
1460
|
+
l += "(?:".concat(w).concat(y, ")").concat(E.modifier);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
if (f) {
|
|
1465
|
+
if (!a) l += "".concat(h, "?");
|
|
1466
|
+
l += !r.endsWith ? "$" : "(?=".concat(x, ")");
|
|
1467
|
+
} else {
|
|
1468
|
+
var A = e2[e2.length - 1];
|
|
1469
|
+
var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
|
|
1470
|
+
if (!a) {
|
|
1471
|
+
l += "(?:".concat(h, "(?=").concat(x, "))?");
|
|
1472
|
+
}
|
|
1473
|
+
if (!_) {
|
|
1474
|
+
l += "(?=".concat(h, "|").concat(x, ")");
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return new RegExp(l, flags(r));
|
|
1478
|
+
}
|
|
1479
|
+
n.tokensToRegexp = tokensToRegexp;
|
|
1480
|
+
function pathToRegexp(e2, n2, r) {
|
|
1481
|
+
if (e2 instanceof RegExp) return regexpToRegexp(e2, n2);
|
|
1482
|
+
if (Array.isArray(e2)) return arrayToRegexp(e2, n2, r);
|
|
1483
|
+
return stringToRegexp(e2, n2, r);
|
|
1484
|
+
}
|
|
1485
|
+
n.pathToRegexp = pathToRegexp;
|
|
1486
|
+
})();
|
|
1487
|
+
module.exports = e;
|
|
1488
|
+
})();
|
|
1489
|
+
}
|
|
1490
|
+
});
|
|
1491
|
+
|
|
1492
|
+
// node_modules/next/dist/lib/route-pattern-normalizer.js
|
|
1493
|
+
var require_route_pattern_normalizer = __commonJS({
|
|
1494
|
+
"node_modules/next/dist/lib/route-pattern-normalizer.js"(exports) {
|
|
1495
|
+
"use strict";
|
|
1496
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1497
|
+
value: true
|
|
1498
|
+
});
|
|
1499
|
+
function _export(target, all) {
|
|
1500
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1501
|
+
enumerable: true,
|
|
1502
|
+
get: all[name]
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
_export(exports, {
|
|
1506
|
+
PARAM_SEPARATOR: function() {
|
|
1507
|
+
return PARAM_SEPARATOR;
|
|
1508
|
+
},
|
|
1509
|
+
hasAdjacentParameterIssues: function() {
|
|
1510
|
+
return hasAdjacentParameterIssues;
|
|
1511
|
+
},
|
|
1512
|
+
normalizeAdjacentParameters: function() {
|
|
1513
|
+
return normalizeAdjacentParameters;
|
|
1514
|
+
},
|
|
1515
|
+
normalizeTokensForRegexp: function() {
|
|
1516
|
+
return normalizeTokensForRegexp;
|
|
1517
|
+
},
|
|
1518
|
+
stripNormalizedSeparators: function() {
|
|
1519
|
+
return stripNormalizedSeparators;
|
|
1520
|
+
},
|
|
1521
|
+
stripParameterSeparators: function() {
|
|
1522
|
+
return stripParameterSeparators;
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
var PARAM_SEPARATOR = "_NEXTSEP_";
|
|
1526
|
+
function hasAdjacentParameterIssues(route) {
|
|
1527
|
+
if (typeof route !== "string") return false;
|
|
1528
|
+
if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
|
|
1529
|
+
return true;
|
|
1530
|
+
}
|
|
1531
|
+
if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
|
|
1532
|
+
return true;
|
|
1533
|
+
}
|
|
1534
|
+
return false;
|
|
1535
|
+
}
|
|
1536
|
+
function normalizeAdjacentParameters(route) {
|
|
1537
|
+
let normalized = route;
|
|
1538
|
+
normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
|
|
1539
|
+
normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
|
|
1540
|
+
return normalized;
|
|
1541
|
+
}
|
|
1542
|
+
function normalizeTokensForRegexp(tokens) {
|
|
1543
|
+
return tokens.map((token) => {
|
|
1544
|
+
if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
|
|
1545
|
+
"modifier" in token && // Only repeating modifiers (* or +) cause the validation error
|
|
1546
|
+
// Other modifiers like '?' (optional) are fine
|
|
1547
|
+
(token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
|
|
1548
|
+
"prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
|
|
1549
|
+
// This is what causes the validation error in path-to-regexp
|
|
1550
|
+
token.prefix === "" && token.suffix === "") {
|
|
1551
|
+
return {
|
|
1552
|
+
...token,
|
|
1553
|
+
prefix: "/"
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
return token;
|
|
1557
|
+
});
|
|
1558
|
+
}
|
|
1559
|
+
function stripNormalizedSeparators(pathname) {
|
|
1560
|
+
return pathname.replace(new RegExp(`\\)${PARAM_SEPARATOR}`, "g"), ")");
|
|
1561
|
+
}
|
|
1562
|
+
function stripParameterSeparators(params) {
|
|
1563
|
+
const cleaned = {};
|
|
1564
|
+
for (const [key, value] of Object.entries(params)) {
|
|
1565
|
+
if (typeof value === "string") {
|
|
1566
|
+
cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
|
|
1567
|
+
} else if (Array.isArray(value)) {
|
|
1568
|
+
cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
|
|
1569
|
+
} else {
|
|
1570
|
+
cleaned[key] = value;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
return cleaned;
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
|
|
1578
|
+
// node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
|
|
1579
|
+
var require_route_match_utils = __commonJS({
|
|
1580
|
+
"node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports) {
|
|
1581
|
+
"use strict";
|
|
1582
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1583
|
+
value: true
|
|
1584
|
+
});
|
|
1585
|
+
function _export(target, all) {
|
|
1586
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1587
|
+
enumerable: true,
|
|
1588
|
+
get: all[name]
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
_export(exports, {
|
|
1592
|
+
safeCompile: function() {
|
|
1593
|
+
return safeCompile;
|
|
1594
|
+
},
|
|
1595
|
+
safePathToRegexp: function() {
|
|
1596
|
+
return safePathToRegexp;
|
|
1597
|
+
},
|
|
1598
|
+
safeRegexpToFunction: function() {
|
|
1599
|
+
return safeRegexpToFunction;
|
|
1600
|
+
},
|
|
1601
|
+
safeRouteMatcher: function() {
|
|
1602
|
+
return safeRouteMatcher;
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
var _pathtoregexp = require_path_to_regexp();
|
|
1606
|
+
var _routepatternnormalizer = require_route_pattern_normalizer();
|
|
1607
|
+
function safePathToRegexp(route, keys, options) {
|
|
1608
|
+
if (typeof route !== "string") {
|
|
1609
|
+
return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
|
|
1610
|
+
}
|
|
1611
|
+
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
|
|
1612
|
+
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
|
|
1613
|
+
try {
|
|
1614
|
+
return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
|
|
1615
|
+
} catch (error) {
|
|
1616
|
+
if (!needsNormalization) {
|
|
1617
|
+
try {
|
|
1618
|
+
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
|
|
1619
|
+
return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
|
|
1620
|
+
} catch (retryError) {
|
|
1621
|
+
throw error;
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
throw error;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
function safeCompile(route, options) {
|
|
1628
|
+
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
|
|
1629
|
+
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
|
|
1630
|
+
try {
|
|
1631
|
+
const compiler = (0, _pathtoregexp.compile)(routeToUse, options);
|
|
1632
|
+
if (needsNormalization) {
|
|
1633
|
+
return (params) => {
|
|
1634
|
+
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
|
|
1635
|
+
};
|
|
1636
|
+
}
|
|
1637
|
+
return compiler;
|
|
1638
|
+
} catch (error) {
|
|
1639
|
+
if (!needsNormalization) {
|
|
1640
|
+
try {
|
|
1641
|
+
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
|
|
1642
|
+
const compiler = (0, _pathtoregexp.compile)(normalizedRoute, options);
|
|
1643
|
+
return (params) => {
|
|
1644
|
+
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
|
|
1645
|
+
};
|
|
1646
|
+
} catch (retryError) {
|
|
1647
|
+
throw error;
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
throw error;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
function safeRegexpToFunction(regexp, keys) {
|
|
1654
|
+
const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
|
|
1655
|
+
return (pathname) => {
|
|
1656
|
+
const result = originalMatcher(pathname);
|
|
1657
|
+
if (!result) return false;
|
|
1658
|
+
return {
|
|
1659
|
+
...result,
|
|
1660
|
+
params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
function safeRouteMatcher(matcherFn) {
|
|
1665
|
+
return (pathname) => {
|
|
1666
|
+
const result = matcherFn(pathname);
|
|
1667
|
+
if (!result) return false;
|
|
1668
|
+
return (0, _routepatternnormalizer.stripParameterSeparators)(result);
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1674
|
+
// node_modules/next/dist/shared/lib/router/utils/route-matcher.js
|
|
1675
|
+
var require_route_matcher = __commonJS({
|
|
1676
|
+
"node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports) {
|
|
1677
|
+
"use strict";
|
|
1678
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1679
|
+
value: true
|
|
1680
|
+
});
|
|
1681
|
+
Object.defineProperty(exports, "getRouteMatcher", {
|
|
1682
|
+
enumerable: true,
|
|
1683
|
+
get: function() {
|
|
1684
|
+
return getRouteMatcher;
|
|
1685
|
+
}
|
|
1686
|
+
});
|
|
1687
|
+
var _utils = require_utils();
|
|
1688
|
+
var _routematchutils = require_route_match_utils();
|
|
1689
|
+
function getRouteMatcher({ re, groups }) {
|
|
1690
|
+
const rawMatcher = (pathname) => {
|
|
1691
|
+
const routeMatch = re.exec(pathname);
|
|
1692
|
+
if (!routeMatch) return false;
|
|
1693
|
+
const decode = (param) => {
|
|
1694
|
+
try {
|
|
1695
|
+
return decodeURIComponent(param);
|
|
1696
|
+
} catch {
|
|
1697
|
+
throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
|
|
1698
|
+
value: "E528",
|
|
1699
|
+
enumerable: false,
|
|
1700
|
+
configurable: true
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
const params = {};
|
|
1705
|
+
for (const [key, group] of Object.entries(groups)) {
|
|
1706
|
+
const match = routeMatch[group.pos];
|
|
1707
|
+
if (match !== void 0) {
|
|
1708
|
+
if (group.repeat) {
|
|
1709
|
+
params[key] = match.split("/").map((entry) => decode(entry));
|
|
1710
|
+
} else {
|
|
1711
|
+
params[key] = decode(match);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
return params;
|
|
1716
|
+
};
|
|
1717
|
+
return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
});
|
|
1721
|
+
|
|
1722
|
+
// node_modules/next/dist/lib/constants.js
|
|
1723
|
+
var require_constants = __commonJS({
|
|
1724
|
+
"node_modules/next/dist/lib/constants.js"(exports) {
|
|
1725
|
+
"use strict";
|
|
1726
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1727
|
+
value: true
|
|
1728
|
+
});
|
|
1729
|
+
function _export(target, all) {
|
|
1730
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
1731
|
+
enumerable: true,
|
|
1732
|
+
get: all[name]
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
_export(exports, {
|
|
1736
|
+
ACTION_SUFFIX: function() {
|
|
1737
|
+
return ACTION_SUFFIX;
|
|
1738
|
+
},
|
|
1739
|
+
APP_DIR_ALIAS: function() {
|
|
1740
|
+
return APP_DIR_ALIAS;
|
|
1741
|
+
},
|
|
1742
|
+
CACHE_ONE_YEAR: function() {
|
|
1743
|
+
return CACHE_ONE_YEAR;
|
|
1744
|
+
},
|
|
1745
|
+
DOT_NEXT_ALIAS: function() {
|
|
1746
|
+
return DOT_NEXT_ALIAS;
|
|
1747
|
+
},
|
|
1748
|
+
ESLINT_DEFAULT_DIRS: function() {
|
|
1749
|
+
return ESLINT_DEFAULT_DIRS;
|
|
1750
|
+
},
|
|
1751
|
+
GSP_NO_RETURNED_VALUE: function() {
|
|
1752
|
+
return GSP_NO_RETURNED_VALUE;
|
|
1753
|
+
},
|
|
1754
|
+
GSSP_COMPONENT_MEMBER_ERROR: function() {
|
|
1755
|
+
return GSSP_COMPONENT_MEMBER_ERROR;
|
|
1756
|
+
},
|
|
1757
|
+
GSSP_NO_RETURNED_VALUE: function() {
|
|
1758
|
+
return GSSP_NO_RETURNED_VALUE;
|
|
1759
|
+
},
|
|
1760
|
+
HTML_CONTENT_TYPE_HEADER: function() {
|
|
1761
|
+
return HTML_CONTENT_TYPE_HEADER;
|
|
1762
|
+
},
|
|
1763
|
+
INFINITE_CACHE: function() {
|
|
1764
|
+
return INFINITE_CACHE;
|
|
1765
|
+
},
|
|
1766
|
+
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
1767
|
+
return INSTRUMENTATION_HOOK_FILENAME;
|
|
1768
|
+
},
|
|
1769
|
+
JSON_CONTENT_TYPE_HEADER: function() {
|
|
1770
|
+
return JSON_CONTENT_TYPE_HEADER;
|
|
1771
|
+
},
|
|
1772
|
+
MATCHED_PATH_HEADER: function() {
|
|
1773
|
+
return MATCHED_PATH_HEADER;
|
|
1774
|
+
},
|
|
1775
|
+
MIDDLEWARE_FILENAME: function() {
|
|
1776
|
+
return MIDDLEWARE_FILENAME;
|
|
1777
|
+
},
|
|
1778
|
+
MIDDLEWARE_LOCATION_REGEXP: function() {
|
|
1779
|
+
return MIDDLEWARE_LOCATION_REGEXP;
|
|
1780
|
+
},
|
|
1781
|
+
NEXT_BODY_SUFFIX: function() {
|
|
1782
|
+
return NEXT_BODY_SUFFIX;
|
|
1783
|
+
},
|
|
1784
|
+
NEXT_CACHE_IMPLICIT_TAG_ID: function() {
|
|
1785
|
+
return NEXT_CACHE_IMPLICIT_TAG_ID;
|
|
1786
|
+
},
|
|
1787
|
+
NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
|
|
1788
|
+
return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
|
|
1789
|
+
},
|
|
1790
|
+
NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
|
|
1791
|
+
return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
|
|
1792
|
+
},
|
|
1793
|
+
NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
|
|
1794
|
+
return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
|
|
1795
|
+
},
|
|
1796
|
+
NEXT_CACHE_TAGS_HEADER: function() {
|
|
1797
|
+
return NEXT_CACHE_TAGS_HEADER;
|
|
1798
|
+
},
|
|
1799
|
+
NEXT_CACHE_TAG_MAX_ITEMS: function() {
|
|
1800
|
+
return NEXT_CACHE_TAG_MAX_ITEMS;
|
|
1801
|
+
},
|
|
1802
|
+
NEXT_CACHE_TAG_MAX_LENGTH: function() {
|
|
1803
|
+
return NEXT_CACHE_TAG_MAX_LENGTH;
|
|
1804
|
+
},
|
|
1805
|
+
NEXT_DATA_SUFFIX: function() {
|
|
1806
|
+
return NEXT_DATA_SUFFIX;
|
|
1807
|
+
},
|
|
1808
|
+
NEXT_INTERCEPTION_MARKER_PREFIX: function() {
|
|
1809
|
+
return NEXT_INTERCEPTION_MARKER_PREFIX;
|
|
1810
|
+
},
|
|
1811
|
+
NEXT_META_SUFFIX: function() {
|
|
1812
|
+
return NEXT_META_SUFFIX;
|
|
1813
|
+
},
|
|
1814
|
+
NEXT_QUERY_PARAM_PREFIX: function() {
|
|
1815
|
+
return NEXT_QUERY_PARAM_PREFIX;
|
|
1816
|
+
},
|
|
1817
|
+
NEXT_RESUME_HEADER: function() {
|
|
1818
|
+
return NEXT_RESUME_HEADER;
|
|
1819
|
+
},
|
|
1820
|
+
NON_STANDARD_NODE_ENV: function() {
|
|
1821
|
+
return NON_STANDARD_NODE_ENV;
|
|
1822
|
+
},
|
|
1823
|
+
PAGES_DIR_ALIAS: function() {
|
|
1824
|
+
return PAGES_DIR_ALIAS;
|
|
1825
|
+
},
|
|
1826
|
+
PRERENDER_REVALIDATE_HEADER: function() {
|
|
1827
|
+
return PRERENDER_REVALIDATE_HEADER;
|
|
1828
|
+
},
|
|
1829
|
+
PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
|
|
1830
|
+
return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
|
|
1831
|
+
},
|
|
1832
|
+
PROXY_FILENAME: function() {
|
|
1833
|
+
return PROXY_FILENAME;
|
|
1834
|
+
},
|
|
1835
|
+
PROXY_LOCATION_REGEXP: function() {
|
|
1836
|
+
return PROXY_LOCATION_REGEXP;
|
|
1837
|
+
},
|
|
1838
|
+
PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
|
|
1839
|
+
return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
|
|
1840
|
+
},
|
|
1841
|
+
ROOT_DIR_ALIAS: function() {
|
|
1842
|
+
return ROOT_DIR_ALIAS;
|
|
1843
|
+
},
|
|
1844
|
+
RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
|
|
1845
|
+
return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
|
|
1846
|
+
},
|
|
1847
|
+
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
1848
|
+
return RSC_ACTION_ENCRYPTION_ALIAS;
|
|
1849
|
+
},
|
|
1850
|
+
RSC_ACTION_PROXY_ALIAS: function() {
|
|
1851
|
+
return RSC_ACTION_PROXY_ALIAS;
|
|
1852
|
+
},
|
|
1853
|
+
RSC_ACTION_VALIDATE_ALIAS: function() {
|
|
1854
|
+
return RSC_ACTION_VALIDATE_ALIAS;
|
|
1855
|
+
},
|
|
1856
|
+
RSC_CACHE_WRAPPER_ALIAS: function() {
|
|
1857
|
+
return RSC_CACHE_WRAPPER_ALIAS;
|
|
1858
|
+
},
|
|
1859
|
+
RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
|
|
1860
|
+
return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
|
|
1861
|
+
},
|
|
1862
|
+
RSC_MOD_REF_PROXY_ALIAS: function() {
|
|
1863
|
+
return RSC_MOD_REF_PROXY_ALIAS;
|
|
1864
|
+
},
|
|
1865
|
+
RSC_PREFETCH_SUFFIX: function() {
|
|
1866
|
+
return RSC_PREFETCH_SUFFIX;
|
|
1867
|
+
},
|
|
1868
|
+
RSC_SEGMENTS_DIR_SUFFIX: function() {
|
|
1869
|
+
return RSC_SEGMENTS_DIR_SUFFIX;
|
|
1870
|
+
},
|
|
1871
|
+
RSC_SEGMENT_SUFFIX: function() {
|
|
1872
|
+
return RSC_SEGMENT_SUFFIX;
|
|
1873
|
+
},
|
|
1874
|
+
RSC_SUFFIX: function() {
|
|
1875
|
+
return RSC_SUFFIX;
|
|
1876
|
+
},
|
|
1877
|
+
SERVER_PROPS_EXPORT_ERROR: function() {
|
|
1878
|
+
return SERVER_PROPS_EXPORT_ERROR;
|
|
1879
|
+
},
|
|
1880
|
+
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
|
|
1881
|
+
return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
|
|
1882
|
+
},
|
|
1883
|
+
SERVER_PROPS_SSG_CONFLICT: function() {
|
|
1884
|
+
return SERVER_PROPS_SSG_CONFLICT;
|
|
1885
|
+
},
|
|
1886
|
+
SERVER_RUNTIME: function() {
|
|
1887
|
+
return SERVER_RUNTIME;
|
|
1888
|
+
},
|
|
1889
|
+
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
1890
|
+
return SSG_FALLBACK_EXPORT_ERROR;
|
|
1891
|
+
},
|
|
1892
|
+
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
1893
|
+
return SSG_GET_INITIAL_PROPS_CONFLICT;
|
|
1894
|
+
},
|
|
1895
|
+
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
|
|
1896
|
+
return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
|
|
1897
|
+
},
|
|
1898
|
+
TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
|
|
1899
|
+
return TEXT_PLAIN_CONTENT_TYPE_HEADER;
|
|
1900
|
+
},
|
|
1901
|
+
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
|
|
1902
|
+
return UNSTABLE_REVALIDATE_RENAME_ERROR;
|
|
1903
|
+
},
|
|
1904
|
+
WEBPACK_LAYERS: function() {
|
|
1905
|
+
return WEBPACK_LAYERS;
|
|
1906
|
+
},
|
|
1907
|
+
WEBPACK_RESOURCE_QUERIES: function() {
|
|
1908
|
+
return WEBPACK_RESOURCE_QUERIES;
|
|
1909
|
+
},
|
|
1910
|
+
WEB_SOCKET_MAX_RECONNECTIONS: function() {
|
|
1911
|
+
return WEB_SOCKET_MAX_RECONNECTIONS;
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1914
|
+
var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
|
|
1915
|
+
var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
|
|
1916
|
+
var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
|
|
1917
|
+
var NEXT_QUERY_PARAM_PREFIX = "nxtP";
|
|
1918
|
+
var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
|
|
1919
|
+
var MATCHED_PATH_HEADER = "x-matched-path";
|
|
1920
|
+
var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
|
|
1921
|
+
var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
|
|
1922
|
+
var RSC_PREFETCH_SUFFIX = ".prefetch.rsc";
|
|
1923
|
+
var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
|
|
1924
|
+
var RSC_SEGMENT_SUFFIX = ".segment.rsc";
|
|
1925
|
+
var RSC_SUFFIX = ".rsc";
|
|
1926
|
+
var ACTION_SUFFIX = ".action";
|
|
1927
|
+
var NEXT_DATA_SUFFIX = ".json";
|
|
1928
|
+
var NEXT_META_SUFFIX = ".meta";
|
|
1929
|
+
var NEXT_BODY_SUFFIX = ".body";
|
|
1930
|
+
var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
|
|
1931
|
+
var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
|
|
1932
|
+
var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
|
|
1933
|
+
var NEXT_RESUME_HEADER = "next-resume";
|
|
1934
|
+
var NEXT_CACHE_TAG_MAX_ITEMS = 128;
|
|
1935
|
+
var NEXT_CACHE_TAG_MAX_LENGTH = 256;
|
|
1936
|
+
var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
|
|
1937
|
+
var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
|
|
1938
|
+
var CACHE_ONE_YEAR = 31536e3;
|
|
1939
|
+
var INFINITE_CACHE = 4294967294;
|
|
1940
|
+
var MIDDLEWARE_FILENAME = "middleware";
|
|
1941
|
+
var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
|
|
1942
|
+
var PROXY_FILENAME = "proxy";
|
|
1943
|
+
var PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;
|
|
1944
|
+
var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
|
|
1945
|
+
var PAGES_DIR_ALIAS = "private-next-pages";
|
|
1946
|
+
var DOT_NEXT_ALIAS = "private-dot-next";
|
|
1947
|
+
var ROOT_DIR_ALIAS = "private-next-root-dir";
|
|
1948
|
+
var APP_DIR_ALIAS = "private-next-app-dir";
|
|
1949
|
+
var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
|
|
1950
|
+
var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
|
|
1951
|
+
var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
|
|
1952
|
+
var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
|
|
1953
|
+
var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
|
|
1954
|
+
var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
|
|
1955
|
+
var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
|
|
1956
|
+
var PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;
|
|
1957
|
+
var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
|
|
1958
|
+
var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
|
|
1959
|
+
var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
|
|
1960
|
+
var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
|
|
1961
|
+
var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
|
|
1962
|
+
var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
|
|
1963
|
+
var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
|
|
1964
|
+
var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
|
|
1965
|
+
var GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;
|
|
1966
|
+
var NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;
|
|
1967
|
+
var SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;
|
|
1968
|
+
var ESLINT_DEFAULT_DIRS = [
|
|
1969
|
+
"app",
|
|
1970
|
+
"pages",
|
|
1971
|
+
"components",
|
|
1972
|
+
"lib",
|
|
1973
|
+
"src"
|
|
1974
|
+
];
|
|
1975
|
+
var SERVER_RUNTIME = {
|
|
1976
|
+
edge: "edge",
|
|
1977
|
+
experimentalEdge: "experimental-edge",
|
|
1978
|
+
nodejs: "nodejs"
|
|
1979
|
+
};
|
|
1980
|
+
var WEB_SOCKET_MAX_RECONNECTIONS = 12;
|
|
1981
|
+
var WEBPACK_LAYERS_NAMES = {
|
|
1982
|
+
/**
|
|
1983
|
+
* The layer for the shared code between the client and server bundles.
|
|
1984
|
+
*/
|
|
1985
|
+
shared: "shared",
|
|
1986
|
+
/**
|
|
1987
|
+
* The layer for server-only runtime and picking up `react-server` export conditions.
|
|
1988
|
+
* Including app router RSC pages and app router custom routes and metadata routes.
|
|
1989
|
+
*/
|
|
1990
|
+
reactServerComponents: "rsc",
|
|
1991
|
+
/**
|
|
1992
|
+
* Server Side Rendering layer for app (ssr).
|
|
1993
|
+
*/
|
|
1994
|
+
serverSideRendering: "ssr",
|
|
1995
|
+
/**
|
|
1996
|
+
* The browser client bundle layer for actions.
|
|
1997
|
+
*/
|
|
1998
|
+
actionBrowser: "action-browser",
|
|
1999
|
+
/**
|
|
2000
|
+
* The Node.js bundle layer for the API routes.
|
|
2001
|
+
*/
|
|
2002
|
+
apiNode: "api-node",
|
|
2003
|
+
/**
|
|
2004
|
+
* The Edge Lite bundle layer for the API routes.
|
|
2005
|
+
*/
|
|
2006
|
+
apiEdge: "api-edge",
|
|
2007
|
+
/**
|
|
2008
|
+
* The layer for the middleware code.
|
|
2009
|
+
*/
|
|
2010
|
+
middleware: "middleware",
|
|
2011
|
+
/**
|
|
2012
|
+
* The layer for the instrumentation hooks.
|
|
2013
|
+
*/
|
|
2014
|
+
instrument: "instrument",
|
|
2015
|
+
/**
|
|
2016
|
+
* The layer for assets on the edge.
|
|
2017
|
+
*/
|
|
2018
|
+
edgeAsset: "edge-asset",
|
|
2019
|
+
/**
|
|
2020
|
+
* The browser client bundle layer for App directory.
|
|
2021
|
+
*/
|
|
2022
|
+
appPagesBrowser: "app-pages-browser",
|
|
2023
|
+
/**
|
|
2024
|
+
* The browser client bundle layer for Pages directory.
|
|
2025
|
+
*/
|
|
2026
|
+
pagesDirBrowser: "pages-dir-browser",
|
|
2027
|
+
/**
|
|
2028
|
+
* The Edge Lite bundle layer for Pages directory.
|
|
2029
|
+
*/
|
|
2030
|
+
pagesDirEdge: "pages-dir-edge",
|
|
2031
|
+
/**
|
|
2032
|
+
* The Node.js bundle layer for Pages directory.
|
|
2033
|
+
*/
|
|
2034
|
+
pagesDirNode: "pages-dir-node"
|
|
2035
|
+
};
|
|
2036
|
+
var WEBPACK_LAYERS = {
|
|
2037
|
+
...WEBPACK_LAYERS_NAMES,
|
|
2038
|
+
GROUP: {
|
|
2039
|
+
builtinReact: [
|
|
2040
|
+
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2041
|
+
WEBPACK_LAYERS_NAMES.actionBrowser
|
|
2042
|
+
],
|
|
2043
|
+
serverOnly: [
|
|
2044
|
+
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2045
|
+
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
2046
|
+
WEBPACK_LAYERS_NAMES.instrument,
|
|
2047
|
+
WEBPACK_LAYERS_NAMES.middleware
|
|
2048
|
+
],
|
|
2049
|
+
neutralTarget: [
|
|
2050
|
+
// pages api
|
|
2051
|
+
WEBPACK_LAYERS_NAMES.apiNode,
|
|
2052
|
+
WEBPACK_LAYERS_NAMES.apiEdge
|
|
2053
|
+
],
|
|
2054
|
+
clientOnly: [
|
|
2055
|
+
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
2056
|
+
WEBPACK_LAYERS_NAMES.appPagesBrowser
|
|
2057
|
+
],
|
|
2058
|
+
bundled: [
|
|
2059
|
+
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2060
|
+
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
2061
|
+
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
2062
|
+
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
2063
|
+
WEBPACK_LAYERS_NAMES.shared,
|
|
2064
|
+
WEBPACK_LAYERS_NAMES.instrument,
|
|
2065
|
+
WEBPACK_LAYERS_NAMES.middleware
|
|
2066
|
+
],
|
|
2067
|
+
appPages: [
|
|
2068
|
+
// app router pages and layouts
|
|
2069
|
+
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2070
|
+
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
2071
|
+
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
2072
|
+
WEBPACK_LAYERS_NAMES.actionBrowser
|
|
2073
|
+
]
|
|
2074
|
+
}
|
|
2075
|
+
};
|
|
2076
|
+
var WEBPACK_RESOURCE_QUERIES = {
|
|
2077
|
+
edgeSSREntry: "__next_edge_ssr_entry__",
|
|
2078
|
+
metadata: "__next_metadata__",
|
|
2079
|
+
metadataRoute: "__next_metadata_route__",
|
|
2080
|
+
metadataImageMeta: "__next_metadata_image_meta__"
|
|
2081
|
+
};
|
|
2082
|
+
}
|
|
2083
|
+
});
|
|
2084
|
+
|
|
2085
|
+
// node_modules/next/dist/shared/lib/escape-regexp.js
|
|
2086
|
+
var require_escape_regexp = __commonJS({
|
|
2087
|
+
"node_modules/next/dist/shared/lib/escape-regexp.js"(exports) {
|
|
2088
|
+
"use strict";
|
|
2089
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2090
|
+
value: true
|
|
2091
|
+
});
|
|
2092
|
+
Object.defineProperty(exports, "escapeStringRegexp", {
|
|
2093
|
+
enumerable: true,
|
|
2094
|
+
get: function() {
|
|
2095
|
+
return escapeStringRegexp;
|
|
2096
|
+
}
|
|
2097
|
+
});
|
|
2098
|
+
var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
|
|
2099
|
+
var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
|
|
2100
|
+
function escapeStringRegexp(str) {
|
|
2101
|
+
if (reHasRegExp.test(str)) {
|
|
2102
|
+
return str.replace(reReplaceRegExp, "\\$&");
|
|
2103
|
+
}
|
|
2104
|
+
return str;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
});
|
|
2108
|
+
|
|
2109
|
+
// node_modules/next/dist/shared/lib/invariant-error.js
|
|
2110
|
+
var require_invariant_error = __commonJS({
|
|
2111
|
+
"node_modules/next/dist/shared/lib/invariant-error.js"(exports) {
|
|
2112
|
+
"use strict";
|
|
2113
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2114
|
+
value: true
|
|
2115
|
+
});
|
|
2116
|
+
Object.defineProperty(exports, "InvariantError", {
|
|
2117
|
+
enumerable: true,
|
|
2118
|
+
get: function() {
|
|
2119
|
+
return InvariantError;
|
|
2120
|
+
}
|
|
2121
|
+
});
|
|
2122
|
+
var InvariantError = class extends Error {
|
|
2123
|
+
constructor(message, options) {
|
|
2124
|
+
super(`Invariant: ${message.endsWith(".") ? message : message + "."} This is a bug in Next.js.`, options);
|
|
2125
|
+
this.name = "InvariantError";
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
|
|
2131
|
+
// node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js
|
|
2132
|
+
var require_parse_loader_tree = __commonJS({
|
|
2133
|
+
"node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js"(exports) {
|
|
2134
|
+
"use strict";
|
|
2135
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2136
|
+
value: true
|
|
2137
|
+
});
|
|
2138
|
+
Object.defineProperty(exports, "parseLoaderTree", {
|
|
2139
|
+
enumerable: true,
|
|
2140
|
+
get: function() {
|
|
2141
|
+
return parseLoaderTree;
|
|
2142
|
+
}
|
|
2143
|
+
});
|
|
2144
|
+
var _segment = require_segment();
|
|
2145
|
+
function parseLoaderTree(tree) {
|
|
2146
|
+
const [segment, parallelRoutes, modules] = tree;
|
|
2147
|
+
const { layout, template } = modules;
|
|
2148
|
+
let { page } = modules;
|
|
2149
|
+
page = segment === _segment.DEFAULT_SEGMENT_KEY ? modules.defaultPage : page;
|
|
2150
|
+
const conventionPath = layout?.[1] || template?.[1] || page?.[1];
|
|
2151
|
+
return {
|
|
2152
|
+
page,
|
|
2153
|
+
segment,
|
|
2154
|
+
modules,
|
|
2155
|
+
/* it can be either layout / template / page */
|
|
2156
|
+
conventionPath,
|
|
2157
|
+
parallelRoutes
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
});
|
|
2162
|
+
|
|
2163
|
+
// node_modules/next/dist/shared/lib/router/utils/get-segment-param.js
|
|
2164
|
+
var require_get_segment_param = __commonJS({
|
|
2165
|
+
"node_modules/next/dist/shared/lib/router/utils/get-segment-param.js"(exports) {
|
|
2166
|
+
"use strict";
|
|
2167
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2168
|
+
value: true
|
|
2169
|
+
});
|
|
2170
|
+
function _export(target, all) {
|
|
2171
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2172
|
+
enumerable: true,
|
|
2173
|
+
get: all[name]
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
_export(exports, {
|
|
2177
|
+
getParamProperties: function() {
|
|
2178
|
+
return getParamProperties;
|
|
2179
|
+
},
|
|
2180
|
+
getSegmentParam: function() {
|
|
2181
|
+
return getSegmentParam;
|
|
2182
|
+
},
|
|
2183
|
+
isCatchAll: function() {
|
|
2184
|
+
return isCatchAll;
|
|
2185
|
+
}
|
|
2186
|
+
});
|
|
2187
|
+
var _interceptionroutes = require_interception_routes();
|
|
2188
|
+
function getSegmentParam(segment) {
|
|
2189
|
+
const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker) => segment.startsWith(marker));
|
|
2190
|
+
if (interceptionMarker) {
|
|
2191
|
+
segment = segment.slice(interceptionMarker.length);
|
|
2192
|
+
}
|
|
2193
|
+
if (segment.startsWith("[[...") && segment.endsWith("]]")) {
|
|
2194
|
+
return {
|
|
2195
|
+
// TODO-APP: Optional catchall does not currently work with parallel routes,
|
|
2196
|
+
// so for now aren't handling a potential interception marker.
|
|
2197
|
+
type: "optional-catchall",
|
|
2198
|
+
param: segment.slice(5, -2)
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
if (segment.startsWith("[...") && segment.endsWith("]")) {
|
|
2202
|
+
return {
|
|
2203
|
+
type: interceptionMarker ? `catchall-intercepted-${interceptionMarker}` : "catchall",
|
|
2204
|
+
param: segment.slice(4, -1)
|
|
2205
|
+
};
|
|
2206
|
+
}
|
|
2207
|
+
if (segment.startsWith("[") && segment.endsWith("]")) {
|
|
2208
|
+
return {
|
|
2209
|
+
type: interceptionMarker ? `dynamic-intercepted-${interceptionMarker}` : "dynamic",
|
|
2210
|
+
param: segment.slice(1, -1)
|
|
2211
|
+
};
|
|
2212
|
+
}
|
|
2213
|
+
return null;
|
|
2214
|
+
}
|
|
2215
|
+
function isCatchAll(type) {
|
|
2216
|
+
return type === "catchall" || type === "catchall-intercepted-(..)(..)" || type === "catchall-intercepted-(.)" || type === "catchall-intercepted-(..)" || type === "catchall-intercepted-(...)" || type === "optional-catchall";
|
|
2217
|
+
}
|
|
2218
|
+
function getParamProperties(paramType) {
|
|
2219
|
+
let repeat = false;
|
|
2220
|
+
let optional = false;
|
|
2221
|
+
switch (paramType) {
|
|
2222
|
+
case "catchall":
|
|
2223
|
+
case "catchall-intercepted-(..)(..)":
|
|
2224
|
+
case "catchall-intercepted-(.)":
|
|
2225
|
+
case "catchall-intercepted-(..)":
|
|
2226
|
+
case "catchall-intercepted-(...)":
|
|
2227
|
+
repeat = true;
|
|
2228
|
+
break;
|
|
2229
|
+
case "optional-catchall":
|
|
2230
|
+
repeat = true;
|
|
2231
|
+
optional = true;
|
|
2232
|
+
break;
|
|
2233
|
+
case "dynamic":
|
|
2234
|
+
case "dynamic-intercepted-(..)(..)":
|
|
2235
|
+
case "dynamic-intercepted-(.)":
|
|
2236
|
+
case "dynamic-intercepted-(..)":
|
|
2237
|
+
case "dynamic-intercepted-(...)":
|
|
2238
|
+
break;
|
|
2239
|
+
default:
|
|
2240
|
+
paramType;
|
|
2241
|
+
}
|
|
2242
|
+
return {
|
|
2243
|
+
repeat,
|
|
2244
|
+
optional
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
});
|
|
2249
|
+
|
|
2250
|
+
// node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
|
|
2251
|
+
var require_get_dynamic_param = __commonJS({
|
|
2252
|
+
"node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports) {
|
|
2253
|
+
"use strict";
|
|
2254
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2255
|
+
value: true
|
|
2256
|
+
});
|
|
2257
|
+
function _export(target, all) {
|
|
2258
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2259
|
+
enumerable: true,
|
|
2260
|
+
get: all[name]
|
|
2261
|
+
});
|
|
2262
|
+
}
|
|
2263
|
+
_export(exports, {
|
|
2264
|
+
PARAMETER_PATTERN: function() {
|
|
2265
|
+
return PARAMETER_PATTERN;
|
|
2266
|
+
},
|
|
2267
|
+
getDynamicParam: function() {
|
|
2268
|
+
return getDynamicParam;
|
|
2269
|
+
},
|
|
2270
|
+
interpolateParallelRouteParams: function() {
|
|
2271
|
+
return interpolateParallelRouteParams;
|
|
2272
|
+
},
|
|
2273
|
+
parseMatchedParameter: function() {
|
|
2274
|
+
return parseMatchedParameter;
|
|
2275
|
+
},
|
|
2276
|
+
parseParameter: function() {
|
|
2277
|
+
return parseParameter;
|
|
2278
|
+
}
|
|
2279
|
+
});
|
|
2280
|
+
var _invarianterror = require_invariant_error();
|
|
2281
|
+
var _parseloadertree = require_parse_loader_tree();
|
|
2282
|
+
var _getsegmentparam = require_get_segment_param();
|
|
2283
|
+
function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
|
|
2284
|
+
let value = interpolatedParams[segmentKey];
|
|
2285
|
+
if (fallbackRouteParams?.has(segmentKey)) {
|
|
2286
|
+
const [searchValue] = fallbackRouteParams.get(segmentKey);
|
|
2287
|
+
value = searchValue;
|
|
2288
|
+
} else if (Array.isArray(value)) {
|
|
2289
|
+
value = value.map((i) => encodeURIComponent(i));
|
|
2290
|
+
} else if (typeof value === "string") {
|
|
2291
|
+
value = encodeURIComponent(value);
|
|
2292
|
+
}
|
|
2293
|
+
return value;
|
|
2294
|
+
}
|
|
2295
|
+
function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
|
|
2296
|
+
const interpolated = structuredClone(params);
|
|
2297
|
+
const stack = [
|
|
2298
|
+
{
|
|
2299
|
+
tree: loaderTree,
|
|
2300
|
+
depth: 0
|
|
2301
|
+
}
|
|
2302
|
+
];
|
|
2303
|
+
const pathSegments = pagePath.split("/").slice(1);
|
|
2304
|
+
while (stack.length > 0) {
|
|
2305
|
+
const { tree, depth } = stack.pop();
|
|
2306
|
+
const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
|
|
2307
|
+
const segmentParam = (0, _getsegmentparam.getSegmentParam)(segment);
|
|
2308
|
+
if (segmentParam && !interpolated.hasOwnProperty(segmentParam.param) && // If the param is in the fallback route params, we don't need to
|
|
2309
|
+
// interpolate it because it's already marked as being unknown.
|
|
2310
|
+
!fallbackRouteParams?.has(segmentParam.param)) {
|
|
2311
|
+
switch (segmentParam.type) {
|
|
2312
|
+
case "catchall":
|
|
2313
|
+
case "optional-catchall":
|
|
2314
|
+
case "catchall-intercepted-(..)(..)":
|
|
2315
|
+
case "catchall-intercepted-(.)":
|
|
2316
|
+
case "catchall-intercepted-(..)":
|
|
2317
|
+
case "catchall-intercepted-(...)":
|
|
2318
|
+
const remainingSegments = pathSegments.slice(depth);
|
|
2319
|
+
const processedSegments = remainingSegments.flatMap((pathSegment) => {
|
|
2320
|
+
const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
|
|
2321
|
+
return param ? interpolated[param.param] : pathSegment;
|
|
2322
|
+
}).filter((s) => s !== void 0);
|
|
2323
|
+
if (processedSegments.length > 0) {
|
|
2324
|
+
interpolated[segmentParam.param] = processedSegments;
|
|
2325
|
+
}
|
|
2326
|
+
break;
|
|
2327
|
+
case "dynamic":
|
|
2328
|
+
case "dynamic-intercepted-(..)(..)":
|
|
2329
|
+
case "dynamic-intercepted-(.)":
|
|
2330
|
+
case "dynamic-intercepted-(..)":
|
|
2331
|
+
case "dynamic-intercepted-(...)":
|
|
2332
|
+
if (depth < pathSegments.length) {
|
|
2333
|
+
const pathSegment = pathSegments[depth];
|
|
2334
|
+
const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
|
|
2335
|
+
interpolated[segmentParam.param] = param ? interpolated[param.param] : pathSegment;
|
|
2336
|
+
}
|
|
2337
|
+
break;
|
|
2338
|
+
default:
|
|
2339
|
+
segmentParam.type;
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
let nextDepth = depth;
|
|
2343
|
+
const isRouteGroup = segment.startsWith("(") && segment.endsWith(")");
|
|
2344
|
+
if (!isRouteGroup && segment !== "") {
|
|
2345
|
+
nextDepth++;
|
|
2346
|
+
}
|
|
2347
|
+
for (const route of Object.values(parallelRoutes)) {
|
|
2348
|
+
stack.push({
|
|
2349
|
+
tree: route,
|
|
2350
|
+
depth: nextDepth
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
return interpolated;
|
|
2355
|
+
}
|
|
2356
|
+
function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams) {
|
|
2357
|
+
let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
|
|
2358
|
+
if (!value || value.length === 0) {
|
|
2359
|
+
if (dynamicParamType === "oc") {
|
|
2360
|
+
return {
|
|
2361
|
+
param: segmentKey,
|
|
2362
|
+
value: null,
|
|
2363
|
+
type: dynamicParamType,
|
|
2364
|
+
treeSegment: [
|
|
2365
|
+
segmentKey,
|
|
2366
|
+
"",
|
|
2367
|
+
dynamicParamType
|
|
2368
|
+
]
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
|
|
2372
|
+
value: "E864",
|
|
2373
|
+
enumerable: false,
|
|
2374
|
+
configurable: true
|
|
2375
|
+
});
|
|
2376
|
+
}
|
|
2377
|
+
return {
|
|
2378
|
+
param: segmentKey,
|
|
2379
|
+
// The value that is passed to user code.
|
|
2380
|
+
value,
|
|
2381
|
+
// The value that is rendered in the router tree.
|
|
2382
|
+
treeSegment: [
|
|
2383
|
+
segmentKey,
|
|
2384
|
+
Array.isArray(value) ? value.join("/") : value,
|
|
2385
|
+
dynamicParamType
|
|
2386
|
+
],
|
|
2387
|
+
type: dynamicParamType
|
|
2388
|
+
};
|
|
2389
|
+
}
|
|
2390
|
+
var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
|
|
2391
|
+
function parseParameter(param) {
|
|
2392
|
+
const match = param.match(PARAMETER_PATTERN);
|
|
2393
|
+
if (!match) {
|
|
2394
|
+
return parseMatchedParameter(param);
|
|
2395
|
+
}
|
|
2396
|
+
return parseMatchedParameter(match[2]);
|
|
2397
|
+
}
|
|
2398
|
+
function parseMatchedParameter(param) {
|
|
2399
|
+
const optional = param.startsWith("[") && param.endsWith("]");
|
|
2400
|
+
if (optional) {
|
|
2401
|
+
param = param.slice(1, -1);
|
|
2402
|
+
}
|
|
2403
|
+
const repeat = param.startsWith("...");
|
|
2404
|
+
if (repeat) {
|
|
2405
|
+
param = param.slice(3);
|
|
2406
|
+
}
|
|
2407
|
+
return {
|
|
2408
|
+
key: param,
|
|
2409
|
+
repeat,
|
|
2410
|
+
optional
|
|
2411
|
+
};
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
});
|
|
2415
|
+
|
|
2416
|
+
// node_modules/next/dist/shared/lib/router/utils/route-regex.js
|
|
2417
|
+
var require_route_regex = __commonJS({
|
|
2418
|
+
"node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports) {
|
|
2419
|
+
"use strict";
|
|
2420
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2421
|
+
value: true
|
|
2422
|
+
});
|
|
2423
|
+
function _export(target, all) {
|
|
2424
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2425
|
+
enumerable: true,
|
|
2426
|
+
get: all[name]
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
_export(exports, {
|
|
2430
|
+
getNamedMiddlewareRegex: function() {
|
|
2431
|
+
return getNamedMiddlewareRegex;
|
|
2432
|
+
},
|
|
2433
|
+
getNamedRouteRegex: function() {
|
|
2434
|
+
return getNamedRouteRegex;
|
|
2435
|
+
},
|
|
2436
|
+
getRouteRegex: function() {
|
|
2437
|
+
return getRouteRegex;
|
|
2438
|
+
}
|
|
2439
|
+
});
|
|
2440
|
+
var _constants = require_constants();
|
|
2441
|
+
var _interceptionroutes = require_interception_routes();
|
|
2442
|
+
var _escaperegexp = require_escape_regexp();
|
|
2443
|
+
var _removetrailingslash = require_remove_trailing_slash();
|
|
2444
|
+
var _getdynamicparam = require_get_dynamic_param();
|
|
2445
|
+
function getParametrizedRoute(route, includeSuffix, includePrefix) {
|
|
2446
|
+
const groups = {};
|
|
2447
|
+
let groupIndex = 1;
|
|
2448
|
+
const segments = [];
|
|
2449
|
+
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
|
|
2450
|
+
const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
|
|
2451
|
+
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
|
|
2452
|
+
if (markerMatch && paramMatches && paramMatches[2]) {
|
|
2453
|
+
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
|
|
2454
|
+
groups[key] = {
|
|
2455
|
+
pos: groupIndex++,
|
|
2456
|
+
repeat,
|
|
2457
|
+
optional
|
|
2458
|
+
};
|
|
2459
|
+
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
|
|
2460
|
+
} else if (paramMatches && paramMatches[2]) {
|
|
2461
|
+
const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
|
|
2462
|
+
groups[key] = {
|
|
2463
|
+
pos: groupIndex++,
|
|
2464
|
+
repeat,
|
|
2465
|
+
optional
|
|
2466
|
+
};
|
|
2467
|
+
if (includePrefix && paramMatches[1]) {
|
|
2468
|
+
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
|
|
2469
|
+
}
|
|
2470
|
+
let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
|
|
2471
|
+
if (includePrefix && paramMatches[1]) {
|
|
2472
|
+
s = s.substring(1);
|
|
2473
|
+
}
|
|
2474
|
+
segments.push(s);
|
|
2475
|
+
} else {
|
|
2476
|
+
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
|
|
2477
|
+
}
|
|
2478
|
+
if (includeSuffix && paramMatches && paramMatches[3]) {
|
|
2479
|
+
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
return {
|
|
2483
|
+
parameterizedRoute: segments.join(""),
|
|
2484
|
+
groups
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
function getRouteRegex(normalizedRoute, { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = {}) {
|
|
2488
|
+
const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
|
|
2489
|
+
let re = parameterizedRoute;
|
|
2490
|
+
if (!excludeOptionalTrailingSlash) {
|
|
2491
|
+
re += "(?:/)?";
|
|
2492
|
+
}
|
|
2493
|
+
return {
|
|
2494
|
+
re: new RegExp(`^${re}$`),
|
|
2495
|
+
groups
|
|
2496
|
+
};
|
|
2497
|
+
}
|
|
2498
|
+
function buildGetSafeRouteKey() {
|
|
2499
|
+
let i = 0;
|
|
2500
|
+
return () => {
|
|
2501
|
+
let routeKey = "";
|
|
2502
|
+
let j = ++i;
|
|
2503
|
+
while (j > 0) {
|
|
2504
|
+
routeKey += String.fromCharCode(97 + (j - 1) % 26);
|
|
2505
|
+
j = Math.floor((j - 1) / 26);
|
|
2506
|
+
}
|
|
2507
|
+
return routeKey;
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2510
|
+
function getSafeKeyFromSegment({ interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys }) {
|
|
2511
|
+
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
|
|
2512
|
+
let cleanedKey = key.replace(/\W/g, "");
|
|
2513
|
+
if (keyPrefix) {
|
|
2514
|
+
cleanedKey = `${keyPrefix}${cleanedKey}`;
|
|
2515
|
+
}
|
|
2516
|
+
let invalidKey = false;
|
|
2517
|
+
if (cleanedKey.length === 0 || cleanedKey.length > 30) {
|
|
2518
|
+
invalidKey = true;
|
|
2519
|
+
}
|
|
2520
|
+
if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
|
|
2521
|
+
invalidKey = true;
|
|
2522
|
+
}
|
|
2523
|
+
if (invalidKey) {
|
|
2524
|
+
cleanedKey = getSafeRouteKey();
|
|
2525
|
+
}
|
|
2526
|
+
const duplicateKey = cleanedKey in routeKeys;
|
|
2527
|
+
if (keyPrefix) {
|
|
2528
|
+
routeKeys[cleanedKey] = `${keyPrefix}${key}`;
|
|
2529
|
+
} else {
|
|
2530
|
+
routeKeys[cleanedKey] = key;
|
|
2531
|
+
}
|
|
2532
|
+
const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
|
|
2533
|
+
let pattern;
|
|
2534
|
+
if (duplicateKey && backreferenceDuplicateKeys) {
|
|
2535
|
+
pattern = `\\k<${cleanedKey}>`;
|
|
2536
|
+
} else if (repeat) {
|
|
2537
|
+
pattern = `(?<${cleanedKey}>.+?)`;
|
|
2538
|
+
} else {
|
|
2539
|
+
pattern = `(?<${cleanedKey}>[^/]+?)`;
|
|
2540
|
+
}
|
|
2541
|
+
return {
|
|
2542
|
+
key,
|
|
2543
|
+
pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
|
|
2544
|
+
cleanedKey,
|
|
2545
|
+
optional,
|
|
2546
|
+
repeat
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
|
|
2550
|
+
names: {},
|
|
2551
|
+
intercepted: {}
|
|
2552
|
+
}) {
|
|
2553
|
+
const getSafeRouteKey = buildGetSafeRouteKey();
|
|
2554
|
+
const routeKeys = {};
|
|
2555
|
+
const segments = [];
|
|
2556
|
+
const inverseParts = [];
|
|
2557
|
+
reference = structuredClone(reference);
|
|
2558
|
+
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
|
|
2559
|
+
const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
|
|
2560
|
+
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
|
|
2561
|
+
const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : void 0;
|
|
2562
|
+
let keyPrefix;
|
|
2563
|
+
if (interceptionMarker && paramMatches?.[2]) {
|
|
2564
|
+
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
|
|
2565
|
+
reference.intercepted[paramMatches[2]] = interceptionMarker;
|
|
2566
|
+
} else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
|
|
2567
|
+
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
|
|
2568
|
+
} else {
|
|
2569
|
+
keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0;
|
|
2570
|
+
}
|
|
2571
|
+
if (interceptionMarker && paramMatches && paramMatches[2]) {
|
|
2572
|
+
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
|
|
2573
|
+
getSafeRouteKey,
|
|
2574
|
+
interceptionMarker,
|
|
2575
|
+
segment: paramMatches[2],
|
|
2576
|
+
routeKeys,
|
|
2577
|
+
keyPrefix,
|
|
2578
|
+
backreferenceDuplicateKeys
|
|
2579
|
+
});
|
|
2580
|
+
segments.push(pattern);
|
|
2581
|
+
inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
|
|
2582
|
+
reference.names[key] ??= cleanedKey;
|
|
2583
|
+
} else if (paramMatches && paramMatches[2]) {
|
|
2584
|
+
if (includePrefix && paramMatches[1]) {
|
|
2585
|
+
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
|
|
2586
|
+
inverseParts.push(`/${paramMatches[1]}`);
|
|
2587
|
+
}
|
|
2588
|
+
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
|
|
2589
|
+
getSafeRouteKey,
|
|
2590
|
+
segment: paramMatches[2],
|
|
2591
|
+
routeKeys,
|
|
2592
|
+
keyPrefix,
|
|
2593
|
+
backreferenceDuplicateKeys
|
|
2594
|
+
});
|
|
2595
|
+
let s = pattern;
|
|
2596
|
+
if (includePrefix && paramMatches[1]) {
|
|
2597
|
+
s = s.substring(1);
|
|
2598
|
+
}
|
|
2599
|
+
segments.push(s);
|
|
2600
|
+
inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
|
|
2601
|
+
reference.names[key] ??= cleanedKey;
|
|
2602
|
+
} else {
|
|
2603
|
+
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
|
|
2604
|
+
inverseParts.push(`/${segment}`);
|
|
2605
|
+
}
|
|
2606
|
+
if (includeSuffix && paramMatches && paramMatches[3]) {
|
|
2607
|
+
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
|
|
2608
|
+
inverseParts.push(paramMatches[3]);
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
return {
|
|
2612
|
+
namedParameterizedRoute: segments.join(""),
|
|
2613
|
+
routeKeys,
|
|
2614
|
+
pathToRegexpPattern: inverseParts.join(""),
|
|
2615
|
+
reference
|
|
2616
|
+
};
|
|
2617
|
+
}
|
|
2618
|
+
function getNamedRouteRegex(normalizedRoute, options) {
|
|
2619
|
+
const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
|
|
2620
|
+
let namedRegex = result.namedParameterizedRoute;
|
|
2621
|
+
if (!options.excludeOptionalTrailingSlash) {
|
|
2622
|
+
namedRegex += "(?:/)?";
|
|
2623
|
+
}
|
|
2624
|
+
return {
|
|
2625
|
+
...getRouteRegex(normalizedRoute, options),
|
|
2626
|
+
namedRegex: `^${namedRegex}$`,
|
|
2627
|
+
routeKeys: result.routeKeys,
|
|
2628
|
+
pathToRegexpPattern: result.pathToRegexpPattern,
|
|
2629
|
+
reference: result.reference
|
|
2630
|
+
};
|
|
2631
|
+
}
|
|
2632
|
+
function getNamedMiddlewareRegex(normalizedRoute, options) {
|
|
2633
|
+
const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
|
|
2634
|
+
const { catchAll = true } = options;
|
|
2635
|
+
if (parameterizedRoute === "/") {
|
|
2636
|
+
let catchAllRegex = catchAll ? ".*" : "";
|
|
2637
|
+
return {
|
|
2638
|
+
namedRegex: `^/${catchAllRegex}$`
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, void 0);
|
|
2642
|
+
let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
|
|
2643
|
+
return {
|
|
2644
|
+
namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
|
|
2645
|
+
};
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
});
|
|
2649
|
+
|
|
2650
|
+
// node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
|
|
2651
|
+
var require_interpolate_as = __commonJS({
|
|
2652
|
+
"node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports) {
|
|
2653
|
+
"use strict";
|
|
2654
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2655
|
+
value: true
|
|
2656
|
+
});
|
|
2657
|
+
Object.defineProperty(exports, "interpolateAs", {
|
|
2658
|
+
enumerable: true,
|
|
2659
|
+
get: function() {
|
|
2660
|
+
return interpolateAs;
|
|
2661
|
+
}
|
|
2662
|
+
});
|
|
2663
|
+
var _routematcher = require_route_matcher();
|
|
2664
|
+
var _routeregex = require_route_regex();
|
|
2665
|
+
function interpolateAs(route, asPathname, query) {
|
|
2666
|
+
let interpolatedRoute = "";
|
|
2667
|
+
const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
|
|
2668
|
+
const dynamicGroups = dynamicRegex.groups;
|
|
2669
|
+
const dynamicMatches = (
|
|
2670
|
+
// Try to match the dynamic route against the asPath
|
|
2671
|
+
(asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
|
|
2672
|
+
// TODO: should this take priority; also need to change in the router.
|
|
2673
|
+
query
|
|
2674
|
+
);
|
|
2675
|
+
interpolatedRoute = route;
|
|
2676
|
+
const params = Object.keys(dynamicGroups);
|
|
2677
|
+
if (!params.every((param) => {
|
|
2678
|
+
let value = dynamicMatches[param] || "";
|
|
2679
|
+
const { repeat, optional } = dynamicGroups[param];
|
|
2680
|
+
let replaced = `[${repeat ? "..." : ""}${param}]`;
|
|
2681
|
+
if (optional) {
|
|
2682
|
+
replaced = `${!value ? "/" : ""}[${replaced}]`;
|
|
2683
|
+
}
|
|
2684
|
+
if (repeat && !Array.isArray(value)) value = [
|
|
2685
|
+
value
|
|
2686
|
+
];
|
|
2687
|
+
return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
|
|
2688
|
+
(interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
|
|
2689
|
+
// these values should be fully encoded instead of just
|
|
2690
|
+
// path delimiter escaped since they are being inserted
|
|
2691
|
+
// into the URL and we expect URL encoded segments
|
|
2692
|
+
// when parsing dynamic route params
|
|
2693
|
+
(segment) => encodeURIComponent(segment)
|
|
2694
|
+
).join("/") : encodeURIComponent(value)) || "/");
|
|
2695
|
+
})) {
|
|
2696
|
+
interpolatedRoute = "";
|
|
2697
|
+
}
|
|
2698
|
+
return {
|
|
2699
|
+
params,
|
|
2700
|
+
result: interpolatedRoute
|
|
2701
|
+
};
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
});
|
|
2705
|
+
|
|
2706
|
+
// node_modules/next/dist/client/resolve-href.js
|
|
2707
|
+
var require_resolve_href = __commonJS({
|
|
2708
|
+
"node_modules/next/dist/client/resolve-href.js"(exports, module) {
|
|
2709
|
+
"use strict";
|
|
2710
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2711
|
+
value: true
|
|
2712
|
+
});
|
|
2713
|
+
Object.defineProperty(exports, "resolveHref", {
|
|
2714
|
+
enumerable: true,
|
|
2715
|
+
get: function() {
|
|
2716
|
+
return resolveHref;
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
var _querystring = require_querystring();
|
|
2720
|
+
var _formaturl = require_format_url();
|
|
2721
|
+
var _omit = require_omit();
|
|
2722
|
+
var _utils = require_utils();
|
|
2723
|
+
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
2724
|
+
var _islocalurl = require_is_local_url();
|
|
2725
|
+
var _utils1 = require_utils2();
|
|
2726
|
+
var _interpolateas = require_interpolate_as();
|
|
2727
|
+
var _routeregex = require_route_regex();
|
|
2728
|
+
var _routematcher = require_route_matcher();
|
|
2729
|
+
function resolveHref(router, href, resolveAs) {
|
|
2730
|
+
let base;
|
|
2731
|
+
let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
|
|
2732
|
+
const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
|
|
2733
|
+
const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
|
|
2734
|
+
const urlParts = urlAsStringNoProto.split("?", 1);
|
|
2735
|
+
if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
|
|
2736
|
+
console.error(`Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.`);
|
|
2737
|
+
const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
|
|
2738
|
+
urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
|
|
2739
|
+
}
|
|
2740
|
+
if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
|
|
2741
|
+
return resolveAs ? [
|
|
2742
|
+
urlAsString
|
|
2743
|
+
] : urlAsString;
|
|
2744
|
+
}
|
|
2745
|
+
try {
|
|
2746
|
+
let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
|
|
2747
|
+
if (urlAsString.startsWith("?")) {
|
|
2748
|
+
baseBase = router.asPath;
|
|
2749
|
+
if ((0, _utils1.isDynamicRoute)(router.pathname)) {
|
|
2750
|
+
baseBase = router.pathname;
|
|
2751
|
+
const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
|
|
2752
|
+
const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
|
|
2753
|
+
if (!match) {
|
|
2754
|
+
baseBase = router.asPath;
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
base = new URL(baseBase, "http://n");
|
|
2759
|
+
} catch (_) {
|
|
2760
|
+
base = new URL("/", "http://n");
|
|
2761
|
+
}
|
|
2762
|
+
try {
|
|
2763
|
+
const finalUrl = new URL(urlAsString, base);
|
|
2764
|
+
finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
|
|
2765
|
+
let interpolatedAs = "";
|
|
2766
|
+
if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
|
|
2767
|
+
const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
|
|
2768
|
+
const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
|
|
2769
|
+
if (result) {
|
|
2770
|
+
interpolatedAs = (0, _formaturl.formatWithValidation)({
|
|
2771
|
+
pathname: result,
|
|
2772
|
+
hash: finalUrl.hash,
|
|
2773
|
+
query: (0, _omit.omit)(query, params)
|
|
2774
|
+
});
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
|
|
2778
|
+
return resolveAs ? [
|
|
2779
|
+
resolvedHref,
|
|
2780
|
+
interpolatedAs || resolvedHref
|
|
2781
|
+
] : resolvedHref;
|
|
2782
|
+
} catch (_) {
|
|
2783
|
+
return resolveAs ? [
|
|
2784
|
+
urlAsString
|
|
2785
|
+
] : urlAsString;
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2789
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2790
|
+
Object.assign(exports.default, exports);
|
|
2791
|
+
module.exports = exports.default;
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
});
|
|
2795
|
+
|
|
2796
|
+
// node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
|
|
2797
|
+
var require_add_path_prefix = __commonJS({
|
|
2798
|
+
"node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports) {
|
|
2799
|
+
"use strict";
|
|
2800
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2801
|
+
value: true
|
|
2802
|
+
});
|
|
2803
|
+
Object.defineProperty(exports, "addPathPrefix", {
|
|
2804
|
+
enumerable: true,
|
|
2805
|
+
get: function() {
|
|
2806
|
+
return addPathPrefix;
|
|
2807
|
+
}
|
|
2808
|
+
});
|
|
2809
|
+
var _parsepath = require_parse_path();
|
|
2810
|
+
function addPathPrefix(path, prefix) {
|
|
2811
|
+
if (!path.startsWith("/") || !prefix) {
|
|
2812
|
+
return path;
|
|
2813
|
+
}
|
|
2814
|
+
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
2815
|
+
return `${prefix}${pathname}${query}${hash}`;
|
|
2816
|
+
}
|
|
2817
|
+
}
|
|
2818
|
+
});
|
|
2819
|
+
|
|
2820
|
+
// node_modules/next/dist/shared/lib/router/utils/add-locale.js
|
|
2821
|
+
var require_add_locale = __commonJS({
|
|
2822
|
+
"node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports) {
|
|
2823
|
+
"use strict";
|
|
2824
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2825
|
+
value: true
|
|
2826
|
+
});
|
|
2827
|
+
Object.defineProperty(exports, "addLocale", {
|
|
2828
|
+
enumerable: true,
|
|
2829
|
+
get: function() {
|
|
2830
|
+
return addLocale;
|
|
2831
|
+
}
|
|
2832
|
+
});
|
|
2833
|
+
var _addpathprefix = require_add_path_prefix();
|
|
2834
|
+
var _pathhasprefix = require_path_has_prefix();
|
|
2835
|
+
function addLocale(path, locale, defaultLocale, ignorePrefix) {
|
|
2836
|
+
if (!locale || locale === defaultLocale) return path;
|
|
2837
|
+
const lower = path.toLowerCase();
|
|
2838
|
+
if (!ignorePrefix) {
|
|
2839
|
+
if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
|
|
2840
|
+
if ((0, _pathhasprefix.pathHasPrefix)(lower, `/${locale.toLowerCase()}`)) return path;
|
|
2841
|
+
}
|
|
2842
|
+
return (0, _addpathprefix.addPathPrefix)(path, `/${locale}`);
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
});
|
|
2846
|
+
|
|
2847
|
+
// node_modules/next/dist/client/add-locale.js
|
|
2848
|
+
var require_add_locale2 = __commonJS({
|
|
2849
|
+
"node_modules/next/dist/client/add-locale.js"(exports, module) {
|
|
2850
|
+
"use strict";
|
|
2851
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2852
|
+
value: true
|
|
2853
|
+
});
|
|
2854
|
+
Object.defineProperty(exports, "addLocale", {
|
|
2855
|
+
enumerable: true,
|
|
2856
|
+
get: function() {
|
|
2857
|
+
return addLocale;
|
|
2858
|
+
}
|
|
2859
|
+
});
|
|
2860
|
+
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
2861
|
+
var addLocale = (path, ...args) => {
|
|
2862
|
+
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
2863
|
+
return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
|
|
2864
|
+
}
|
|
2865
|
+
return path;
|
|
2866
|
+
};
|
|
2867
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2868
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2869
|
+
Object.assign(exports.default, exports);
|
|
2870
|
+
module.exports = exports.default;
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
});
|
|
2874
|
+
|
|
2875
|
+
// node_modules/@swc/helpers/cjs/_interop_require_default.cjs
|
|
2876
|
+
var require_interop_require_default = __commonJS({
|
|
2877
|
+
"node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports) {
|
|
2878
|
+
"use strict";
|
|
2879
|
+
function _interop_require_default(obj) {
|
|
2880
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
2881
|
+
}
|
|
2882
|
+
exports._ = _interop_require_default;
|
|
2883
|
+
}
|
|
2884
|
+
});
|
|
2885
|
+
|
|
2886
|
+
// node_modules/next/dist/shared/lib/router-context.shared-runtime.js
|
|
2887
|
+
var require_router_context_shared_runtime = __commonJS({
|
|
2888
|
+
"node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports) {
|
|
2889
|
+
"use strict";
|
|
2890
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2891
|
+
value: true
|
|
2892
|
+
});
|
|
2893
|
+
Object.defineProperty(exports, "RouterContext", {
|
|
2894
|
+
enumerable: true,
|
|
2895
|
+
get: function() {
|
|
2896
|
+
return RouterContext;
|
|
2897
|
+
}
|
|
2898
|
+
});
|
|
2899
|
+
var _interop_require_default = require_interop_require_default();
|
|
2900
|
+
var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
|
|
2901
|
+
var RouterContext = _react.default.createContext(null);
|
|
2902
|
+
if (true) {
|
|
2903
|
+
RouterContext.displayName = "RouterContext";
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
});
|
|
2907
|
+
|
|
2908
|
+
// node_modules/next/dist/client/request-idle-callback.js
|
|
2909
|
+
var require_request_idle_callback = __commonJS({
|
|
2910
|
+
"node_modules/next/dist/client/request-idle-callback.js"(exports, module) {
|
|
2911
|
+
"use strict";
|
|
2912
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2913
|
+
value: true
|
|
2914
|
+
});
|
|
2915
|
+
function _export(target, all) {
|
|
2916
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2917
|
+
enumerable: true,
|
|
2918
|
+
get: all[name]
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
_export(exports, {
|
|
2922
|
+
cancelIdleCallback: function() {
|
|
2923
|
+
return cancelIdleCallback;
|
|
2924
|
+
},
|
|
2925
|
+
requestIdleCallback: function() {
|
|
2926
|
+
return requestIdleCallback;
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
|
|
2930
|
+
let start = Date.now();
|
|
2931
|
+
return self.setTimeout(function() {
|
|
2932
|
+
cb({
|
|
2933
|
+
didTimeout: false,
|
|
2934
|
+
timeRemaining: function() {
|
|
2935
|
+
return Math.max(0, 50 - (Date.now() - start));
|
|
2936
|
+
}
|
|
2937
|
+
});
|
|
2938
|
+
}, 1);
|
|
2939
|
+
};
|
|
2940
|
+
var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
|
|
2941
|
+
return clearTimeout(id);
|
|
2942
|
+
};
|
|
2943
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2944
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2945
|
+
Object.assign(exports.default, exports);
|
|
2946
|
+
module.exports = exports.default;
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
});
|
|
2950
|
+
|
|
2951
|
+
// node_modules/next/dist/client/use-intersection.js
|
|
2952
|
+
var require_use_intersection = __commonJS({
|
|
2953
|
+
"node_modules/next/dist/client/use-intersection.js"(exports, module) {
|
|
2954
|
+
"use strict";
|
|
2955
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2956
|
+
value: true
|
|
2957
|
+
});
|
|
2958
|
+
Object.defineProperty(exports, "useIntersection", {
|
|
2959
|
+
enumerable: true,
|
|
2960
|
+
get: function() {
|
|
2961
|
+
return useIntersection;
|
|
2962
|
+
}
|
|
2963
|
+
});
|
|
2964
|
+
var _react = __require("react");
|
|
2965
|
+
var _requestidlecallback = require_request_idle_callback();
|
|
2966
|
+
var hasIntersectionObserver = typeof IntersectionObserver === "function";
|
|
2967
|
+
var observers = /* @__PURE__ */ new Map();
|
|
2968
|
+
var idList = [];
|
|
2969
|
+
function createObserver(options) {
|
|
2970
|
+
const id = {
|
|
2971
|
+
root: options.root || null,
|
|
2972
|
+
margin: options.rootMargin || ""
|
|
2973
|
+
};
|
|
2974
|
+
const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
|
|
2975
|
+
let instance;
|
|
2976
|
+
if (existing) {
|
|
2977
|
+
instance = observers.get(existing);
|
|
2978
|
+
if (instance) {
|
|
2979
|
+
return instance;
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
const elements = /* @__PURE__ */ new Map();
|
|
2983
|
+
const observer = new IntersectionObserver((entries) => {
|
|
2984
|
+
entries.forEach((entry) => {
|
|
2985
|
+
const callback = elements.get(entry.target);
|
|
2986
|
+
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
2987
|
+
if (callback && isVisible) {
|
|
2988
|
+
callback(isVisible);
|
|
2989
|
+
}
|
|
2990
|
+
});
|
|
2991
|
+
}, options);
|
|
2992
|
+
instance = {
|
|
2993
|
+
id,
|
|
2994
|
+
observer,
|
|
2995
|
+
elements
|
|
2996
|
+
};
|
|
2997
|
+
idList.push(id);
|
|
2998
|
+
observers.set(id, instance);
|
|
2999
|
+
return instance;
|
|
3000
|
+
}
|
|
3001
|
+
function observe(element, callback, options) {
|
|
3002
|
+
const { id, observer, elements } = createObserver(options);
|
|
3003
|
+
elements.set(element, callback);
|
|
3004
|
+
observer.observe(element);
|
|
3005
|
+
return function unobserve() {
|
|
3006
|
+
elements.delete(element);
|
|
3007
|
+
observer.unobserve(element);
|
|
3008
|
+
if (elements.size === 0) {
|
|
3009
|
+
observer.disconnect();
|
|
3010
|
+
observers.delete(id);
|
|
3011
|
+
const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
|
|
3012
|
+
if (index > -1) {
|
|
3013
|
+
idList.splice(index, 1);
|
|
3014
|
+
}
|
|
3015
|
+
}
|
|
3016
|
+
};
|
|
3017
|
+
}
|
|
3018
|
+
function useIntersection({ rootRef, rootMargin, disabled }) {
|
|
3019
|
+
const isDisabled = disabled || !hasIntersectionObserver;
|
|
3020
|
+
const [visible, setVisible] = (0, _react.useState)(false);
|
|
3021
|
+
const elementRef = (0, _react.useRef)(null);
|
|
3022
|
+
const setElement = (0, _react.useCallback)((element) => {
|
|
3023
|
+
elementRef.current = element;
|
|
3024
|
+
}, []);
|
|
3025
|
+
(0, _react.useEffect)(() => {
|
|
3026
|
+
if (hasIntersectionObserver) {
|
|
3027
|
+
if (isDisabled || visible) return;
|
|
3028
|
+
const element = elementRef.current;
|
|
3029
|
+
if (element && element.tagName) {
|
|
3030
|
+
const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
|
|
3031
|
+
root: rootRef?.current,
|
|
3032
|
+
rootMargin
|
|
3033
|
+
});
|
|
3034
|
+
return unobserve;
|
|
3035
|
+
}
|
|
3036
|
+
} else {
|
|
3037
|
+
if (!visible) {
|
|
3038
|
+
const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
|
|
3039
|
+
return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
}, [
|
|
3043
|
+
isDisabled,
|
|
3044
|
+
rootMargin,
|
|
3045
|
+
rootRef,
|
|
3046
|
+
visible,
|
|
3047
|
+
elementRef.current
|
|
3048
|
+
]);
|
|
3049
|
+
const resetVisible = (0, _react.useCallback)(() => {
|
|
3050
|
+
setVisible(false);
|
|
3051
|
+
}, []);
|
|
3052
|
+
return [
|
|
3053
|
+
setElement,
|
|
3054
|
+
visible,
|
|
3055
|
+
resetVisible
|
|
3056
|
+
];
|
|
3057
|
+
}
|
|
3058
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3059
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3060
|
+
Object.assign(exports.default, exports);
|
|
3061
|
+
module.exports = exports.default;
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
});
|
|
3065
|
+
|
|
3066
|
+
// node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
|
|
3067
|
+
var require_normalize_locale_path = __commonJS({
|
|
3068
|
+
"node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports) {
|
|
3069
|
+
"use strict";
|
|
3070
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3071
|
+
value: true
|
|
3072
|
+
});
|
|
3073
|
+
Object.defineProperty(exports, "normalizeLocalePath", {
|
|
3074
|
+
enumerable: true,
|
|
3075
|
+
get: function() {
|
|
3076
|
+
return normalizeLocalePath;
|
|
3077
|
+
}
|
|
3078
|
+
});
|
|
3079
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
3080
|
+
function normalizeLocalePath(pathname, locales) {
|
|
3081
|
+
if (!locales) return {
|
|
3082
|
+
pathname
|
|
3083
|
+
};
|
|
3084
|
+
let lowercasedLocales = cache.get(locales);
|
|
3085
|
+
if (!lowercasedLocales) {
|
|
3086
|
+
lowercasedLocales = locales.map((locale) => locale.toLowerCase());
|
|
3087
|
+
cache.set(locales, lowercasedLocales);
|
|
3088
|
+
}
|
|
3089
|
+
let detectedLocale;
|
|
3090
|
+
const segments = pathname.split("/", 2);
|
|
3091
|
+
if (!segments[1]) return {
|
|
3092
|
+
pathname
|
|
3093
|
+
};
|
|
3094
|
+
const segment = segments[1].toLowerCase();
|
|
3095
|
+
const index = lowercasedLocales.indexOf(segment);
|
|
3096
|
+
if (index < 0) return {
|
|
3097
|
+
pathname
|
|
3098
|
+
};
|
|
3099
|
+
detectedLocale = locales[index];
|
|
3100
|
+
pathname = pathname.slice(detectedLocale.length + 1) || "/";
|
|
3101
|
+
return {
|
|
3102
|
+
pathname,
|
|
3103
|
+
detectedLocale
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
});
|
|
3108
|
+
|
|
3109
|
+
// node_modules/next/dist/client/normalize-locale-path.js
|
|
3110
|
+
var require_normalize_locale_path2 = __commonJS({
|
|
3111
|
+
"node_modules/next/dist/client/normalize-locale-path.js"(exports, module) {
|
|
3112
|
+
"use strict";
|
|
3113
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3114
|
+
value: true
|
|
3115
|
+
});
|
|
3116
|
+
Object.defineProperty(exports, "normalizeLocalePath", {
|
|
3117
|
+
enumerable: true,
|
|
3118
|
+
get: function() {
|
|
3119
|
+
return normalizeLocalePath;
|
|
3120
|
+
}
|
|
3121
|
+
});
|
|
3122
|
+
var normalizeLocalePath = (pathname, locales) => {
|
|
3123
|
+
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3124
|
+
return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
|
|
3125
|
+
}
|
|
3126
|
+
return {
|
|
3127
|
+
pathname,
|
|
3128
|
+
detectedLocale: void 0
|
|
3129
|
+
};
|
|
3130
|
+
};
|
|
3131
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3132
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3133
|
+
Object.assign(exports.default, exports);
|
|
3134
|
+
module.exports = exports.default;
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
});
|
|
3138
|
+
|
|
3139
|
+
// node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
|
|
3140
|
+
var require_detect_domain_locale = __commonJS({
|
|
3141
|
+
"node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports) {
|
|
3142
|
+
"use strict";
|
|
3143
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3144
|
+
value: true
|
|
3145
|
+
});
|
|
3146
|
+
Object.defineProperty(exports, "detectDomainLocale", {
|
|
3147
|
+
enumerable: true,
|
|
3148
|
+
get: function() {
|
|
3149
|
+
return detectDomainLocale;
|
|
3150
|
+
}
|
|
3151
|
+
});
|
|
3152
|
+
function detectDomainLocale(domainItems, hostname, detectedLocale) {
|
|
3153
|
+
if (!domainItems) return;
|
|
3154
|
+
if (detectedLocale) {
|
|
3155
|
+
detectedLocale = detectedLocale.toLowerCase();
|
|
3156
|
+
}
|
|
3157
|
+
for (const item of domainItems) {
|
|
3158
|
+
const domainHostname = item.domain?.split(":", 1)[0].toLowerCase();
|
|
3159
|
+
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)) {
|
|
3160
|
+
return item;
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
});
|
|
3166
|
+
|
|
3167
|
+
// node_modules/next/dist/client/detect-domain-locale.js
|
|
3168
|
+
var require_detect_domain_locale2 = __commonJS({
|
|
3169
|
+
"node_modules/next/dist/client/detect-domain-locale.js"(exports, module) {
|
|
3170
|
+
"use strict";
|
|
3171
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3172
|
+
value: true
|
|
3173
|
+
});
|
|
3174
|
+
Object.defineProperty(exports, "detectDomainLocale", {
|
|
3175
|
+
enumerable: true,
|
|
3176
|
+
get: function() {
|
|
3177
|
+
return detectDomainLocale;
|
|
3178
|
+
}
|
|
3179
|
+
});
|
|
3180
|
+
var detectDomainLocale = (...args) => {
|
|
3181
|
+
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3182
|
+
return require_detect_domain_locale().detectDomainLocale(...args);
|
|
3183
|
+
}
|
|
3184
|
+
};
|
|
3185
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3186
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3187
|
+
Object.assign(exports.default, exports);
|
|
3188
|
+
module.exports = exports.default;
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
});
|
|
3192
|
+
|
|
3193
|
+
// node_modules/next/dist/client/get-domain-locale.js
|
|
3194
|
+
var require_get_domain_locale = __commonJS({
|
|
3195
|
+
"node_modules/next/dist/client/get-domain-locale.js"(exports, module) {
|
|
3196
|
+
"use strict";
|
|
3197
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3198
|
+
value: true
|
|
3199
|
+
});
|
|
3200
|
+
Object.defineProperty(exports, "getDomainLocale", {
|
|
3201
|
+
enumerable: true,
|
|
3202
|
+
get: function() {
|
|
3203
|
+
return getDomainLocale;
|
|
3204
|
+
}
|
|
3205
|
+
});
|
|
3206
|
+
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
3207
|
+
var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
3208
|
+
function getDomainLocale(path, locale, locales, domainLocales) {
|
|
3209
|
+
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3210
|
+
const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
|
|
3211
|
+
const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
|
|
3212
|
+
const target = locale || normalizeLocalePath(path, locales).detectedLocale;
|
|
3213
|
+
const domain = detectDomainLocale(domainLocales, void 0, target);
|
|
3214
|
+
if (domain) {
|
|
3215
|
+
const proto = `http${domain.http ? "" : "s"}://`;
|
|
3216
|
+
const finalLocale = target === domain.defaultLocale ? "" : `/${target}`;
|
|
3217
|
+
return `${proto}${domain.domain}${(0, _normalizetrailingslash.normalizePathTrailingSlash)(`${basePath}${finalLocale}${path}`)}`;
|
|
3218
|
+
}
|
|
3219
|
+
return false;
|
|
3220
|
+
} else {
|
|
3221
|
+
return false;
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3225
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3226
|
+
Object.assign(exports.default, exports);
|
|
3227
|
+
module.exports = exports.default;
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
});
|
|
3231
|
+
|
|
3232
|
+
// node_modules/next/dist/client/add-base-path.js
|
|
3233
|
+
var require_add_base_path = __commonJS({
|
|
3234
|
+
"node_modules/next/dist/client/add-base-path.js"(exports, module) {
|
|
3235
|
+
"use strict";
|
|
3236
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3237
|
+
value: true
|
|
3238
|
+
});
|
|
3239
|
+
Object.defineProperty(exports, "addBasePath", {
|
|
3240
|
+
enumerable: true,
|
|
3241
|
+
get: function() {
|
|
3242
|
+
return addBasePath;
|
|
3243
|
+
}
|
|
3244
|
+
});
|
|
3245
|
+
var _addpathprefix = require_add_path_prefix();
|
|
3246
|
+
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
3247
|
+
var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
3248
|
+
function addBasePath(path, required) {
|
|
3249
|
+
return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
|
|
3250
|
+
}
|
|
3251
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3252
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3253
|
+
Object.assign(exports.default, exports);
|
|
3254
|
+
module.exports = exports.default;
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
});
|
|
3258
|
+
|
|
3259
|
+
// node_modules/next/dist/client/use-merged-ref.js
|
|
3260
|
+
var require_use_merged_ref = __commonJS({
|
|
3261
|
+
"node_modules/next/dist/client/use-merged-ref.js"(exports, module) {
|
|
3262
|
+
"use strict";
|
|
3263
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3264
|
+
value: true
|
|
3265
|
+
});
|
|
3266
|
+
Object.defineProperty(exports, "useMergedRef", {
|
|
3267
|
+
enumerable: true,
|
|
3268
|
+
get: function() {
|
|
3269
|
+
return useMergedRef;
|
|
3270
|
+
}
|
|
3271
|
+
});
|
|
3272
|
+
var _react = __require("react");
|
|
3273
|
+
function useMergedRef(refA, refB) {
|
|
3274
|
+
const cleanupA = (0, _react.useRef)(null);
|
|
3275
|
+
const cleanupB = (0, _react.useRef)(null);
|
|
3276
|
+
return (0, _react.useCallback)((current) => {
|
|
3277
|
+
if (current === null) {
|
|
3278
|
+
const cleanupFnA = cleanupA.current;
|
|
3279
|
+
if (cleanupFnA) {
|
|
3280
|
+
cleanupA.current = null;
|
|
3281
|
+
cleanupFnA();
|
|
3282
|
+
}
|
|
3283
|
+
const cleanupFnB = cleanupB.current;
|
|
3284
|
+
if (cleanupFnB) {
|
|
3285
|
+
cleanupB.current = null;
|
|
3286
|
+
cleanupFnB();
|
|
3287
|
+
}
|
|
3288
|
+
} else {
|
|
3289
|
+
if (refA) {
|
|
3290
|
+
cleanupA.current = applyRef(refA, current);
|
|
3291
|
+
}
|
|
3292
|
+
if (refB) {
|
|
3293
|
+
cleanupB.current = applyRef(refB, current);
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
}, [
|
|
3297
|
+
refA,
|
|
3298
|
+
refB
|
|
3299
|
+
]);
|
|
3300
|
+
}
|
|
3301
|
+
function applyRef(refA, current) {
|
|
3302
|
+
if (typeof refA === "function") {
|
|
3303
|
+
const cleanup = refA(current);
|
|
3304
|
+
if (typeof cleanup === "function") {
|
|
3305
|
+
return cleanup;
|
|
3306
|
+
} else {
|
|
3307
|
+
return () => refA(null);
|
|
3308
|
+
}
|
|
3309
|
+
} else {
|
|
3310
|
+
refA.current = current;
|
|
3311
|
+
return () => {
|
|
3312
|
+
refA.current = null;
|
|
3313
|
+
};
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3317
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3318
|
+
Object.assign(exports.default, exports);
|
|
3319
|
+
module.exports = exports.default;
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
});
|
|
3323
|
+
|
|
3324
|
+
// node_modules/next/dist/shared/lib/utils/error-once.js
|
|
3325
|
+
var require_error_once = __commonJS({
|
|
3326
|
+
"node_modules/next/dist/shared/lib/utils/error-once.js"(exports) {
|
|
3327
|
+
"use strict";
|
|
3328
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3329
|
+
value: true
|
|
3330
|
+
});
|
|
3331
|
+
Object.defineProperty(exports, "errorOnce", {
|
|
3332
|
+
enumerable: true,
|
|
3333
|
+
get: function() {
|
|
3334
|
+
return errorOnce;
|
|
3335
|
+
}
|
|
3336
|
+
});
|
|
3337
|
+
var errorOnce = (_) => {
|
|
3338
|
+
};
|
|
3339
|
+
if (true) {
|
|
3340
|
+
const errors = /* @__PURE__ */ new Set();
|
|
3341
|
+
errorOnce = (msg) => {
|
|
3342
|
+
if (!errors.has(msg)) {
|
|
3343
|
+
console.error(msg);
|
|
3344
|
+
}
|
|
3345
|
+
errors.add(msg);
|
|
3346
|
+
};
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
});
|
|
3350
|
+
|
|
3351
|
+
// node_modules/next/dist/client/link.js
|
|
3352
|
+
var require_link = __commonJS({
|
|
3353
|
+
"node_modules/next/dist/client/link.js"(exports, module) {
|
|
3354
|
+
"use client";
|
|
3355
|
+
"use strict";
|
|
3356
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3357
|
+
value: true
|
|
3358
|
+
});
|
|
3359
|
+
function _export(target, all) {
|
|
3360
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
3361
|
+
enumerable: true,
|
|
3362
|
+
get: all[name]
|
|
3363
|
+
});
|
|
3364
|
+
}
|
|
3365
|
+
_export(exports, {
|
|
3366
|
+
default: function() {
|
|
3367
|
+
return _default;
|
|
3368
|
+
},
|
|
3369
|
+
useLinkStatus: function() {
|
|
3370
|
+
return useLinkStatus;
|
|
3371
|
+
}
|
|
3372
|
+
});
|
|
3373
|
+
var _interop_require_wildcard = require_interop_require_wildcard();
|
|
3374
|
+
var _jsxruntime = __require("react/jsx-runtime");
|
|
3375
|
+
var _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
|
|
3376
|
+
var _resolvehref = require_resolve_href();
|
|
3377
|
+
var _islocalurl = require_is_local_url();
|
|
3378
|
+
var _formaturl = require_format_url();
|
|
3379
|
+
var _utils = require_utils();
|
|
3380
|
+
var _addlocale = require_add_locale2();
|
|
3381
|
+
var _routercontextsharedruntime = require_router_context_shared_runtime();
|
|
3382
|
+
var _useintersection = require_use_intersection();
|
|
3383
|
+
var _getdomainlocale = require_get_domain_locale();
|
|
3384
|
+
var _addbasepath = require_add_base_path();
|
|
3385
|
+
var _usemergedref = require_use_merged_ref();
|
|
3386
|
+
var _erroronce = require_error_once();
|
|
3387
|
+
var prefetched = /* @__PURE__ */ new Set();
|
|
3388
|
+
function prefetch(router, href, as, options) {
|
|
3389
|
+
if (typeof window === "undefined") {
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
3392
|
+
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
3393
|
+
return;
|
|
3394
|
+
}
|
|
3395
|
+
if (!options.bypassPrefetchedCheck) {
|
|
3396
|
+
const locale = (
|
|
3397
|
+
// Let the link's locale prop override the default router locale.
|
|
3398
|
+
typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
|
|
3399
|
+
);
|
|
3400
|
+
const prefetchedKey = href + "%" + as + "%" + locale;
|
|
3401
|
+
if (prefetched.has(prefetchedKey)) {
|
|
3402
|
+
return;
|
|
3403
|
+
}
|
|
3404
|
+
prefetched.add(prefetchedKey);
|
|
3405
|
+
}
|
|
3406
|
+
router.prefetch(href, as, options).catch((err) => {
|
|
3407
|
+
if (true) {
|
|
3408
|
+
throw err;
|
|
3409
|
+
}
|
|
3410
|
+
});
|
|
3411
|
+
}
|
|
3412
|
+
function isModifiedEvent(event) {
|
|
3413
|
+
const eventTarget = event.currentTarget;
|
|
3414
|
+
const target = eventTarget.getAttribute("target");
|
|
3415
|
+
return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
|
|
3416
|
+
event.nativeEvent && event.nativeEvent.which === 2;
|
|
3417
|
+
}
|
|
3418
|
+
function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
|
|
3419
|
+
const { nodeName } = e.currentTarget;
|
|
3420
|
+
const isAnchorNodeName = nodeName.toUpperCase() === "A";
|
|
3421
|
+
if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
|
|
3422
|
+
return;
|
|
3423
|
+
}
|
|
3424
|
+
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
3425
|
+
if (replace) {
|
|
3426
|
+
e.preventDefault();
|
|
3427
|
+
location.replace(href);
|
|
3428
|
+
}
|
|
3429
|
+
return;
|
|
3430
|
+
}
|
|
3431
|
+
e.preventDefault();
|
|
3432
|
+
const navigate = () => {
|
|
3433
|
+
if (onNavigate) {
|
|
3434
|
+
let isDefaultPrevented = false;
|
|
3435
|
+
onNavigate({
|
|
3436
|
+
preventDefault: () => {
|
|
3437
|
+
isDefaultPrevented = true;
|
|
3438
|
+
}
|
|
3439
|
+
});
|
|
3440
|
+
if (isDefaultPrevented) {
|
|
3441
|
+
return;
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
const routerScroll = scroll ?? true;
|
|
3445
|
+
if ("beforePopState" in router) {
|
|
3446
|
+
router[replace ? "replace" : "push"](href, as, {
|
|
3447
|
+
shallow,
|
|
3448
|
+
locale,
|
|
3449
|
+
scroll: routerScroll
|
|
3450
|
+
});
|
|
3451
|
+
} else {
|
|
3452
|
+
router[replace ? "replace" : "push"](as || href, {
|
|
3453
|
+
scroll: routerScroll
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3456
|
+
};
|
|
3457
|
+
navigate();
|
|
3458
|
+
}
|
|
3459
|
+
function formatStringOrUrl(urlObjOrString) {
|
|
3460
|
+
if (typeof urlObjOrString === "string") {
|
|
3461
|
+
return urlObjOrString;
|
|
3462
|
+
}
|
|
3463
|
+
return (0, _formaturl.formatUrl)(urlObjOrString);
|
|
3464
|
+
}
|
|
3465
|
+
var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
|
|
3466
|
+
let children;
|
|
3467
|
+
const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
|
|
3468
|
+
children = childrenProp;
|
|
3469
|
+
if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
|
|
3470
|
+
children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
|
|
3471
|
+
children
|
|
3472
|
+
});
|
|
3473
|
+
}
|
|
3474
|
+
const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
|
|
3475
|
+
const prefetchEnabled = prefetchProp !== false;
|
|
3476
|
+
if (true) {
|
|
3477
|
+
let createPropError = function(args) {
|
|
3478
|
+
return Object.defineProperty(new Error(`Failed prop type: The prop \`${args.key}\` expects a ${args.expected} in \`<Link>\`, but got \`${args.actual}\` instead.` + (typeof window !== "undefined" ? "\nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
|
|
3479
|
+
value: "E319",
|
|
3480
|
+
enumerable: false,
|
|
3481
|
+
configurable: true
|
|
3482
|
+
});
|
|
3483
|
+
};
|
|
3484
|
+
const requiredPropsGuard = {
|
|
3485
|
+
href: true
|
|
3486
|
+
};
|
|
3487
|
+
const requiredProps = Object.keys(requiredPropsGuard);
|
|
3488
|
+
requiredProps.forEach((key) => {
|
|
3489
|
+
if (key === "href") {
|
|
3490
|
+
if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
|
|
3491
|
+
throw createPropError({
|
|
3492
|
+
key,
|
|
3493
|
+
expected: "`string` or `object`",
|
|
3494
|
+
actual: props[key] === null ? "null" : typeof props[key]
|
|
3495
|
+
});
|
|
3496
|
+
}
|
|
3497
|
+
} else {
|
|
3498
|
+
const _ = key;
|
|
3499
|
+
}
|
|
3500
|
+
});
|
|
3501
|
+
const optionalPropsGuard = {
|
|
3502
|
+
as: true,
|
|
3503
|
+
replace: true,
|
|
3504
|
+
scroll: true,
|
|
3505
|
+
shallow: true,
|
|
3506
|
+
passHref: true,
|
|
3507
|
+
prefetch: true,
|
|
3508
|
+
locale: true,
|
|
3509
|
+
onClick: true,
|
|
3510
|
+
onMouseEnter: true,
|
|
3511
|
+
onTouchStart: true,
|
|
3512
|
+
legacyBehavior: true,
|
|
3513
|
+
onNavigate: true
|
|
3514
|
+
};
|
|
3515
|
+
const optionalProps = Object.keys(optionalPropsGuard);
|
|
3516
|
+
optionalProps.forEach((key) => {
|
|
3517
|
+
const valType = typeof props[key];
|
|
3518
|
+
if (key === "as") {
|
|
3519
|
+
if (props[key] && valType !== "string" && valType !== "object") {
|
|
3520
|
+
throw createPropError({
|
|
3521
|
+
key,
|
|
3522
|
+
expected: "`string` or `object`",
|
|
3523
|
+
actual: valType
|
|
3524
|
+
});
|
|
3525
|
+
}
|
|
3526
|
+
} else if (key === "locale") {
|
|
3527
|
+
if (props[key] && valType !== "string") {
|
|
3528
|
+
throw createPropError({
|
|
3529
|
+
key,
|
|
3530
|
+
expected: "`string`",
|
|
3531
|
+
actual: valType
|
|
3532
|
+
});
|
|
3533
|
+
}
|
|
3534
|
+
} else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
|
|
3535
|
+
if (props[key] && valType !== "function") {
|
|
3536
|
+
throw createPropError({
|
|
3537
|
+
key,
|
|
3538
|
+
expected: "`function`",
|
|
3539
|
+
actual: valType
|
|
3540
|
+
});
|
|
3541
|
+
}
|
|
3542
|
+
} else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
|
|
3543
|
+
if (props[key] != null && valType !== "boolean") {
|
|
3544
|
+
throw createPropError({
|
|
3545
|
+
key,
|
|
3546
|
+
expected: "`boolean`",
|
|
3547
|
+
actual: valType
|
|
3548
|
+
});
|
|
3549
|
+
}
|
|
3550
|
+
} else if (key === "prefetch") {
|
|
3551
|
+
if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
|
|
3552
|
+
throw createPropError({
|
|
3553
|
+
key,
|
|
3554
|
+
expected: '`boolean | "auto"`',
|
|
3555
|
+
actual: valType
|
|
3556
|
+
});
|
|
3557
|
+
}
|
|
3558
|
+
} else {
|
|
3559
|
+
const _ = key;
|
|
3560
|
+
}
|
|
3561
|
+
});
|
|
3562
|
+
}
|
|
3563
|
+
const { href, as } = _react.default.useMemo(() => {
|
|
3564
|
+
if (!router) {
|
|
3565
|
+
const resolvedHref2 = formatStringOrUrl(hrefProp);
|
|
3566
|
+
return {
|
|
3567
|
+
href: resolvedHref2,
|
|
3568
|
+
as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3571
|
+
const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
|
|
3572
|
+
return {
|
|
3573
|
+
href: resolvedHref,
|
|
3574
|
+
as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
|
|
3575
|
+
};
|
|
3576
|
+
}, [
|
|
3577
|
+
router,
|
|
3578
|
+
hrefProp,
|
|
3579
|
+
asProp
|
|
3580
|
+
]);
|
|
3581
|
+
const previousHref = _react.default.useRef(href);
|
|
3582
|
+
const previousAs = _react.default.useRef(as);
|
|
3583
|
+
let child;
|
|
3584
|
+
if (legacyBehavior) {
|
|
3585
|
+
if (true) {
|
|
3586
|
+
if (onClick) {
|
|
3587
|
+
console.warn(`"onClick" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link`);
|
|
3588
|
+
}
|
|
3589
|
+
if (onMouseEnterProp) {
|
|
3590
|
+
console.warn(`"onMouseEnter" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);
|
|
3591
|
+
}
|
|
3592
|
+
try {
|
|
3593
|
+
child = _react.default.Children.only(children);
|
|
3594
|
+
} catch (err) {
|
|
3595
|
+
if (!children) {
|
|
3596
|
+
throw Object.defineProperty(new Error(`No children were passed to <Link> with \`href\` of \`${hrefProp}\` but one child is required https://nextjs.org/docs/messages/link-no-children`), "__NEXT_ERROR_CODE", {
|
|
3597
|
+
value: "E320",
|
|
3598
|
+
enumerable: false,
|
|
3599
|
+
configurable: true
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
throw Object.defineProperty(new Error(`Multiple children were passed to <Link> with \`href\` of \`${hrefProp}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (typeof window !== "undefined" ? " \nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
|
|
3603
|
+
value: "E266",
|
|
3604
|
+
enumerable: false,
|
|
3605
|
+
configurable: true
|
|
3606
|
+
});
|
|
3607
|
+
}
|
|
3608
|
+
} else {
|
|
3609
|
+
child = _react.default.Children.only(children);
|
|
3610
|
+
}
|
|
3611
|
+
} else {
|
|
3612
|
+
if (true) {
|
|
3613
|
+
if (children?.type === "a") {
|
|
3614
|
+
throw Object.defineProperty(new Error("Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor"), "__NEXT_ERROR_CODE", {
|
|
3615
|
+
value: "E209",
|
|
3616
|
+
enumerable: false,
|
|
3617
|
+
configurable: true
|
|
3618
|
+
});
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
|
|
3623
|
+
const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
|
|
3624
|
+
rootMargin: "200px"
|
|
3625
|
+
});
|
|
3626
|
+
const setIntersectionWithResetRef = _react.default.useCallback((el) => {
|
|
3627
|
+
if (previousAs.current !== as || previousHref.current !== href) {
|
|
3628
|
+
resetVisible();
|
|
3629
|
+
previousAs.current = as;
|
|
3630
|
+
previousHref.current = href;
|
|
3631
|
+
}
|
|
3632
|
+
setIntersectionRef(el);
|
|
3633
|
+
}, [
|
|
3634
|
+
as,
|
|
3635
|
+
href,
|
|
3636
|
+
resetVisible,
|
|
3637
|
+
setIntersectionRef
|
|
3638
|
+
]);
|
|
3639
|
+
const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
|
|
3640
|
+
_react.default.useEffect(() => {
|
|
3641
|
+
if (true) {
|
|
3642
|
+
return;
|
|
3643
|
+
}
|
|
3644
|
+
if (!router) {
|
|
3645
|
+
return;
|
|
3646
|
+
}
|
|
3647
|
+
if (!isVisible || !prefetchEnabled) {
|
|
3648
|
+
return;
|
|
3649
|
+
}
|
|
3650
|
+
prefetch(router, href, as, {
|
|
3651
|
+
locale
|
|
3652
|
+
});
|
|
3653
|
+
}, [
|
|
3654
|
+
as,
|
|
3655
|
+
href,
|
|
3656
|
+
isVisible,
|
|
3657
|
+
locale,
|
|
3658
|
+
prefetchEnabled,
|
|
3659
|
+
router?.locale,
|
|
3660
|
+
router
|
|
3661
|
+
]);
|
|
3662
|
+
const childProps = {
|
|
3663
|
+
ref: setRef,
|
|
3664
|
+
onClick(e) {
|
|
3665
|
+
if (true) {
|
|
3666
|
+
if (!e) {
|
|
3667
|
+
throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
|
|
3668
|
+
value: "E312",
|
|
3669
|
+
enumerable: false,
|
|
3670
|
+
configurable: true
|
|
3671
|
+
});
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
if (!legacyBehavior && typeof onClick === "function") {
|
|
3675
|
+
onClick(e);
|
|
3676
|
+
}
|
|
3677
|
+
if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
|
|
3678
|
+
child.props.onClick(e);
|
|
3679
|
+
}
|
|
3680
|
+
if (!router) {
|
|
3681
|
+
return;
|
|
3682
|
+
}
|
|
3683
|
+
if (e.defaultPrevented) {
|
|
3684
|
+
return;
|
|
3685
|
+
}
|
|
3686
|
+
linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
|
|
3687
|
+
},
|
|
3688
|
+
onMouseEnter(e) {
|
|
3689
|
+
if (!legacyBehavior && typeof onMouseEnterProp === "function") {
|
|
3690
|
+
onMouseEnterProp(e);
|
|
3691
|
+
}
|
|
3692
|
+
if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
|
|
3693
|
+
child.props.onMouseEnter(e);
|
|
3694
|
+
}
|
|
3695
|
+
if (!router) {
|
|
3696
|
+
return;
|
|
3697
|
+
}
|
|
3698
|
+
prefetch(router, href, as, {
|
|
3699
|
+
locale,
|
|
3700
|
+
priority: true,
|
|
3701
|
+
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
3702
|
+
bypassPrefetchedCheck: true
|
|
3703
|
+
});
|
|
3704
|
+
},
|
|
3705
|
+
onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
|
|
3706
|
+
if (!legacyBehavior && typeof onTouchStartProp === "function") {
|
|
3707
|
+
onTouchStartProp(e);
|
|
3708
|
+
}
|
|
3709
|
+
if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
|
|
3710
|
+
child.props.onTouchStart(e);
|
|
3711
|
+
}
|
|
3712
|
+
if (!router) {
|
|
3713
|
+
return;
|
|
3714
|
+
}
|
|
3715
|
+
prefetch(router, href, as, {
|
|
3716
|
+
locale,
|
|
3717
|
+
priority: true,
|
|
3718
|
+
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
3719
|
+
bypassPrefetchedCheck: true
|
|
3720
|
+
});
|
|
3721
|
+
}
|
|
3722
|
+
};
|
|
3723
|
+
if ((0, _utils.isAbsoluteUrl)(as)) {
|
|
3724
|
+
childProps.href = as;
|
|
3725
|
+
} else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
|
|
3726
|
+
const curLocale = typeof locale !== "undefined" ? locale : router?.locale;
|
|
3727
|
+
const localeDomain = router?.isLocaleDomain && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router?.locales, router?.domainLocales);
|
|
3728
|
+
childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
|
|
3729
|
+
}
|
|
3730
|
+
if (legacyBehavior) {
|
|
3731
|
+
if (true) {
|
|
3732
|
+
(0, _erroronce.errorOnce)("`legacyBehavior` is deprecated and will be removed in a future release. A codemod is available to upgrade your components:\n\nnpx @next/codemod@latest new-link .\n\nLearn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components");
|
|
3733
|
+
}
|
|
3734
|
+
return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
|
|
3735
|
+
}
|
|
3736
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
|
|
3737
|
+
...restProps,
|
|
3738
|
+
...childProps,
|
|
3739
|
+
children
|
|
3740
|
+
});
|
|
3741
|
+
});
|
|
3742
|
+
var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
|
|
3743
|
+
// We do not support link status in the Pages Router, so we always return false
|
|
3744
|
+
pending: false
|
|
3745
|
+
});
|
|
3746
|
+
var useLinkStatus = () => {
|
|
3747
|
+
return (0, _react.useContext)(LinkStatusContext);
|
|
3748
|
+
};
|
|
3749
|
+
var _default = Link2;
|
|
3750
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3751
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3752
|
+
Object.assign(exports.default, exports);
|
|
3753
|
+
module.exports = exports.default;
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
});
|
|
3757
|
+
|
|
3758
|
+
// node_modules/next/link.js
|
|
3759
|
+
var require_link2 = __commonJS({
|
|
3760
|
+
"node_modules/next/link.js"(exports, module) {
|
|
3761
|
+
module.exports = require_link();
|
|
3762
|
+
}
|
|
3763
|
+
});
|
|
3764
|
+
|
|
1
3765
|
// src/provider.js
|
|
2
3766
|
import React, { createContext, useContext, useEffect, useState, useCallback, useRef } from "react";
|
|
3
3767
|
|
|
@@ -249,9 +4013,9 @@ function SignIn({ onSuccess } = {}) {
|
|
|
249
4013
|
},
|
|
250
4014
|
body: JSON.stringify({ email, password })
|
|
251
4015
|
});
|
|
252
|
-
const
|
|
4016
|
+
const ct = res.headers.get("content-type") || "";
|
|
253
4017
|
let data = {};
|
|
254
|
-
if (
|
|
4018
|
+
if (ct.includes("application/json")) data = await res.json();
|
|
255
4019
|
else {
|
|
256
4020
|
const text = await res.text();
|
|
257
4021
|
throw new Error(`Unexpected response (status ${res.status}): ${text.slice(0, 200)}`);
|
|
@@ -359,440 +4123,9 @@ var errorBox = { marginTop: 10, color: "#ffb4b4", fontSize: 13 };
|
|
|
359
4123
|
var successBox = { marginTop: 10, color: "#bef264", fontSize: 13 };
|
|
360
4124
|
|
|
361
4125
|
// src/SignUp.jsx
|
|
4126
|
+
var import_link = __toESM(require_link2(), 1);
|
|
362
4127
|
import React3, { useState as useState3, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
363
|
-
|
|
364
|
-
// ../node_modules/react-toastify/dist/index.mjs
|
|
365
|
-
import { isValidElement as $t } from "react";
|
|
366
|
-
import ut, { useEffect as Rt, useLayoutEffect as Bt, useRef as zt } from "react";
|
|
367
|
-
import { cloneElement as Ft, isValidElement as Ut } from "react";
|
|
368
|
-
import ot from "react";
|
|
369
|
-
import et from "react";
|
|
370
|
-
|
|
371
|
-
// ../node_modules/clsx/dist/clsx.mjs
|
|
372
|
-
function r(e) {
|
|
373
|
-
var t, f, n = "";
|
|
374
|
-
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
375
|
-
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
376
|
-
var o = e.length;
|
|
377
|
-
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
378
|
-
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
379
|
-
return n;
|
|
380
|
-
}
|
|
381
|
-
function clsx() {
|
|
382
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
383
|
-
return n;
|
|
384
|
-
}
|
|
385
|
-
var clsx_default = clsx;
|
|
386
|
-
|
|
387
|
-
// ../node_modules/react-toastify/dist/index.mjs
|
|
388
|
-
import ct, { useEffect as yo, useRef as To, useState as go } from "react";
|
|
389
|
-
import { useRef as Kt, useSyncExternalStore as Yt } from "react";
|
|
390
|
-
import { useEffect as Zt, useRef as St, useState as kt } from "react";
|
|
391
|
-
import { useEffect as Jt, useLayoutEffect as to } from "react";
|
|
392
|
-
import q, { cloneElement as co, isValidElement as fo } from "react";
|
|
393
|
-
import O, { cloneElement as oo, isValidElement as eo } from "react";
|
|
394
|
-
function Mt(t) {
|
|
395
|
-
if (!t || typeof document == "undefined") return;
|
|
396
|
-
let o = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
|
|
397
|
-
e.type = "text/css", o.firstChild ? o.insertBefore(e, o.firstChild) : o.appendChild(e), e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
398
|
-
}
|
|
399
|
-
Mt(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
400
|
-
`);
|
|
401
|
-
var L = (t) => typeof t == "number" && !isNaN(t);
|
|
402
|
-
var N = (t) => typeof t == "string";
|
|
403
|
-
var P = (t) => typeof t == "function";
|
|
404
|
-
var mt = (t) => N(t) || L(t);
|
|
405
|
-
var B = (t) => N(t) || P(t) ? t : null;
|
|
406
|
-
var pt = (t, o) => t === false || L(t) && t > 0 ? t : o;
|
|
407
|
-
var z = (t) => $t(t) || N(t) || P(t) || L(t);
|
|
408
|
-
function Z(t, o, e = 300) {
|
|
409
|
-
let { scrollHeight: r2, style: s } = t;
|
|
410
|
-
requestAnimationFrame(() => {
|
|
411
|
-
s.minHeight = "initial", s.height = r2 + "px", s.transition = `all ${e}ms`, requestAnimationFrame(() => {
|
|
412
|
-
s.height = "0", s.padding = "0", s.margin = "0", setTimeout(o, e);
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
function $({ enter: t, exit: o, appendPosition: e = false, collapse: r2 = true, collapseDuration: s = 300 }) {
|
|
417
|
-
return function({ children: a, position: d, preventExitTransition: c, done: T, nodeRef: g, isIn: v, playToast: x }) {
|
|
418
|
-
let C = e ? `${t}--${d}` : t, S = e ? `${o}--${d}` : o, E = zt(0);
|
|
419
|
-
return Bt(() => {
|
|
420
|
-
let f = g.current, p = C.split(" "), b = (n) => {
|
|
421
|
-
n.target === g.current && (x(), f.removeEventListener("animationend", b), f.removeEventListener("animationcancel", b), E.current === 0 && n.type !== "animationcancel" && f.classList.remove(...p));
|
|
422
|
-
};
|
|
423
|
-
(() => {
|
|
424
|
-
f.classList.add(...p), f.addEventListener("animationend", b), f.addEventListener("animationcancel", b);
|
|
425
|
-
})();
|
|
426
|
-
}, []), Rt(() => {
|
|
427
|
-
let f = g.current, p = () => {
|
|
428
|
-
f.removeEventListener("animationend", p), r2 ? Z(f, T, s) : T();
|
|
429
|
-
};
|
|
430
|
-
v || (c ? p() : (() => {
|
|
431
|
-
E.current = 1, f.className += ` ${S}`, f.addEventListener("animationend", p);
|
|
432
|
-
})());
|
|
433
|
-
}, [v]), ut.createElement(ut.Fragment, null, a);
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
function J(t, o) {
|
|
437
|
-
return { content: tt(t.content, t.props), containerId: t.props.containerId, id: t.props.toastId, theme: t.props.theme, type: t.props.type, data: t.props.data || {}, isLoading: t.props.isLoading, icon: t.props.icon, reason: t.removalReason, status: o };
|
|
438
|
-
}
|
|
439
|
-
function tt(t, o, e = false) {
|
|
440
|
-
return Ut(t) && !N(t.type) ? Ft(t, { closeToast: o.closeToast, toastProps: o, data: o.data, isPaused: e }) : P(t) ? t({ closeToast: o.closeToast, toastProps: o, data: o.data, isPaused: e }) : t;
|
|
441
|
-
}
|
|
442
|
-
function yt({ closeToast: t, theme: o, ariaLabel: e = "close" }) {
|
|
443
|
-
return ot.createElement("button", { className: `Toastify__close-button Toastify__close-button--${o}`, type: "button", onClick: (r2) => {
|
|
444
|
-
r2.stopPropagation(), t(true);
|
|
445
|
-
}, "aria-label": e }, ot.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, ot.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
|
|
446
|
-
}
|
|
447
|
-
function gt({ delay: t, isRunning: o, closeToast: e, type: r2 = "default", hide: s, className: l, controlledProgress: a, progress: d, rtl: c, isIn: T, theme: g }) {
|
|
448
|
-
let v = s || a && d === 0, x = { animationDuration: `${t}ms`, animationPlayState: o ? "running" : "paused" };
|
|
449
|
-
a && (x.transform = `scaleX(${d})`);
|
|
450
|
-
let C = clsx_default("Toastify__progress-bar", a ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${g}`, `Toastify__progress-bar--${r2}`, { ["Toastify__progress-bar--rtl"]: c }), S = P(l) ? l({ rtl: c, type: r2, defaultClassName: C }) : clsx_default(C, l), E = { [a && d >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: a && d < 1 ? null : () => {
|
|
451
|
-
T && e();
|
|
452
|
-
} };
|
|
453
|
-
return et.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": v }, et.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r2}` }), et.createElement("div", { role: "progressbar", "aria-hidden": v ? "true" : "false", "aria-label": "notification timer", className: S, style: x, ...E }));
|
|
454
|
-
}
|
|
455
|
-
var Xt = 1;
|
|
456
|
-
var at = () => `${Xt++}`;
|
|
457
|
-
function _t(t, o, e) {
|
|
458
|
-
let r2 = 1, s = 0, l = [], a = [], d = o, c = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Set(), g = (i) => (T.add(i), () => T.delete(i)), v = () => {
|
|
459
|
-
a = Array.from(c.values()), T.forEach((i) => i());
|
|
460
|
-
}, x = ({ containerId: i, toastId: n, updateId: u }) => {
|
|
461
|
-
let h = i ? i !== t : t !== 1, m = c.has(n) && u == null;
|
|
462
|
-
return h || m;
|
|
463
|
-
}, C = (i, n) => {
|
|
464
|
-
c.forEach((u) => {
|
|
465
|
-
var h;
|
|
466
|
-
(n == null || n === u.props.toastId) && ((h = u.toggle) == null || h.call(u, i));
|
|
467
|
-
});
|
|
468
|
-
}, S = (i) => {
|
|
469
|
-
var n, u;
|
|
470
|
-
(u = (n = i.props) == null ? void 0 : n.onClose) == null || u.call(n, i.removalReason), i.isActive = false;
|
|
471
|
-
}, E = (i) => {
|
|
472
|
-
if (i == null) c.forEach(S);
|
|
473
|
-
else {
|
|
474
|
-
let n = c.get(i);
|
|
475
|
-
n && S(n);
|
|
476
|
-
}
|
|
477
|
-
v();
|
|
478
|
-
}, f = () => {
|
|
479
|
-
s -= l.length, l = [];
|
|
480
|
-
}, p = (i) => {
|
|
481
|
-
var m, _;
|
|
482
|
-
let { toastId: n, updateId: u } = i.props, h = u == null;
|
|
483
|
-
i.staleId && c.delete(i.staleId), i.isActive = true, c.set(n, i), v(), e(J(i, h ? "added" : "updated")), h && ((_ = (m = i.props).onOpen) == null || _.call(m));
|
|
484
|
-
};
|
|
485
|
-
return { id: t, props: d, observe: g, toggle: C, removeToast: E, toasts: c, clearQueue: f, buildToast: (i, n) => {
|
|
486
|
-
if (x(n)) return;
|
|
487
|
-
let { toastId: u, updateId: h, data: m, staleId: _, delay: k } = n, M = h == null;
|
|
488
|
-
M && s++;
|
|
489
|
-
let A = { ...d, style: d.toastStyle, key: r2++, ...Object.fromEntries(Object.entries(n).filter(([D, Y]) => Y != null)), toastId: u, updateId: h, data: m, isIn: false, className: B(n.className || d.toastClassName), progressClassName: B(n.progressClassName || d.progressClassName), autoClose: n.isLoading ? false : pt(n.autoClose, d.autoClose), closeToast(D) {
|
|
490
|
-
c.get(u).removalReason = D, E(u);
|
|
491
|
-
}, deleteToast() {
|
|
492
|
-
let D = c.get(u);
|
|
493
|
-
if (D != null) {
|
|
494
|
-
if (e(J(D, "removed")), c.delete(u), s--, s < 0 && (s = 0), l.length > 0) {
|
|
495
|
-
p(l.shift());
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
v();
|
|
499
|
-
}
|
|
500
|
-
} };
|
|
501
|
-
A.closeButton = d.closeButton, n.closeButton === false || z(n.closeButton) ? A.closeButton = n.closeButton : n.closeButton === true && (A.closeButton = z(d.closeButton) ? d.closeButton : true);
|
|
502
|
-
let R = { content: i, props: A, staleId: _ };
|
|
503
|
-
d.limit && d.limit > 0 && s > d.limit && M ? l.push(R) : L(k) ? setTimeout(() => {
|
|
504
|
-
p(R);
|
|
505
|
-
}, k) : p(R);
|
|
506
|
-
}, setProps(i) {
|
|
507
|
-
d = i;
|
|
508
|
-
}, setToggle: (i, n) => {
|
|
509
|
-
let u = c.get(i);
|
|
510
|
-
u && (u.toggle = n);
|
|
511
|
-
}, isToastActive: (i) => {
|
|
512
|
-
var n;
|
|
513
|
-
return (n = c.get(i)) == null ? void 0 : n.isActive;
|
|
514
|
-
}, getSnapshot: () => a };
|
|
515
|
-
}
|
|
516
|
-
var I = /* @__PURE__ */ new Map();
|
|
517
|
-
var F = [];
|
|
518
|
-
var st = /* @__PURE__ */ new Set();
|
|
519
|
-
var Vt = (t) => st.forEach((o) => o(t));
|
|
520
|
-
var bt = () => I.size > 0;
|
|
521
|
-
function Qt() {
|
|
522
|
-
F.forEach((t) => nt(t.content, t.options)), F = [];
|
|
523
|
-
}
|
|
524
|
-
var vt = (t, { containerId: o }) => {
|
|
525
|
-
var e;
|
|
526
|
-
return (e = I.get(o || 1)) == null ? void 0 : e.toasts.get(t);
|
|
527
|
-
};
|
|
528
|
-
function X(t, o) {
|
|
529
|
-
var r2;
|
|
530
|
-
if (o) return !!((r2 = I.get(o)) != null && r2.isToastActive(t));
|
|
531
|
-
let e = false;
|
|
532
|
-
return I.forEach((s) => {
|
|
533
|
-
s.isToastActive(t) && (e = true);
|
|
534
|
-
}), e;
|
|
535
|
-
}
|
|
536
|
-
function ht(t) {
|
|
537
|
-
if (!bt()) {
|
|
538
|
-
F = F.filter((o) => t != null && o.options.toastId !== t);
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
|
-
if (t == null || mt(t)) I.forEach((o) => {
|
|
542
|
-
o.removeToast(t);
|
|
543
|
-
});
|
|
544
|
-
else if (t && ("containerId" in t || "id" in t)) {
|
|
545
|
-
let o = I.get(t.containerId);
|
|
546
|
-
o ? o.removeToast(t.id) : I.forEach((e) => {
|
|
547
|
-
e.removeToast(t.id);
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
var Ct = (t = {}) => {
|
|
552
|
-
I.forEach((o) => {
|
|
553
|
-
o.props.limit && (!t.containerId || o.id === t.containerId) && o.clearQueue();
|
|
554
|
-
});
|
|
555
|
-
};
|
|
556
|
-
function nt(t, o) {
|
|
557
|
-
z(t) && (bt() || F.push({ content: t, options: o }), I.forEach((e) => {
|
|
558
|
-
e.buildToast(t, o);
|
|
559
|
-
}));
|
|
560
|
-
}
|
|
561
|
-
function xt(t) {
|
|
562
|
-
var o;
|
|
563
|
-
(o = I.get(t.containerId || 1)) == null || o.setToggle(t.id, t.fn);
|
|
564
|
-
}
|
|
565
|
-
function rt(t, o) {
|
|
566
|
-
I.forEach((e) => {
|
|
567
|
-
(o == null || !(o != null && o.containerId) || (o == null ? void 0 : o.containerId) === e.id) && e.toggle(t, o == null ? void 0 : o.id);
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
function Et(t) {
|
|
571
|
-
let o = t.containerId || 1;
|
|
572
|
-
return { subscribe(e) {
|
|
573
|
-
let r2 = _t(o, t, Vt);
|
|
574
|
-
I.set(o, r2);
|
|
575
|
-
let s = r2.observe(e);
|
|
576
|
-
return Qt(), () => {
|
|
577
|
-
s(), I.delete(o);
|
|
578
|
-
};
|
|
579
|
-
}, setProps(e) {
|
|
580
|
-
var r2;
|
|
581
|
-
(r2 = I.get(o)) == null || r2.setProps(e);
|
|
582
|
-
}, getSnapshot() {
|
|
583
|
-
var e;
|
|
584
|
-
return (e = I.get(o)) == null ? void 0 : e.getSnapshot();
|
|
585
|
-
} };
|
|
586
|
-
}
|
|
587
|
-
function Pt(t) {
|
|
588
|
-
return st.add(t), () => {
|
|
589
|
-
st.delete(t);
|
|
590
|
-
};
|
|
591
|
-
}
|
|
592
|
-
function Wt(t) {
|
|
593
|
-
return t && (N(t.toastId) || L(t.toastId)) ? t.toastId : at();
|
|
594
|
-
}
|
|
595
|
-
function U(t, o) {
|
|
596
|
-
return nt(t, o), o.toastId;
|
|
597
|
-
}
|
|
598
|
-
function V(t, o) {
|
|
599
|
-
return { ...o, type: o && o.type || t, toastId: Wt(o) };
|
|
600
|
-
}
|
|
601
|
-
function Q(t) {
|
|
602
|
-
return (o, e) => U(o, V(t, e));
|
|
603
|
-
}
|
|
604
|
-
function y(t, o) {
|
|
605
|
-
return U(t, V("default", o));
|
|
606
|
-
}
|
|
607
|
-
y.loading = (t, o) => U(t, V("default", { isLoading: true, autoClose: false, closeOnClick: false, closeButton: false, draggable: false, ...o }));
|
|
608
|
-
function Gt(t, { pending: o, error: e, success: r2 }, s) {
|
|
609
|
-
let l;
|
|
610
|
-
o && (l = N(o) ? y.loading(o, s) : y.loading(o.render, { ...s, ...o }));
|
|
611
|
-
let a = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, d = (T, g, v) => {
|
|
612
|
-
if (g == null) {
|
|
613
|
-
y.dismiss(l);
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
let x = { type: T, ...a, ...s, data: v }, C = N(g) ? { render: g } : g;
|
|
617
|
-
return l ? y.update(l, { ...x, ...C }) : y(C.render, { ...x, ...C }), v;
|
|
618
|
-
}, c = P(t) ? t() : t;
|
|
619
|
-
return c.then((T) => d("success", r2, T)).catch((T) => d("error", e, T)), c;
|
|
620
|
-
}
|
|
621
|
-
y.promise = Gt;
|
|
622
|
-
y.success = Q("success");
|
|
623
|
-
y.info = Q("info");
|
|
624
|
-
y.error = Q("error");
|
|
625
|
-
y.warning = Q("warning");
|
|
626
|
-
y.warn = y.warning;
|
|
627
|
-
y.dark = (t, o) => U(t, V("default", { theme: "dark", ...o }));
|
|
628
|
-
function qt(t) {
|
|
629
|
-
ht(t);
|
|
630
|
-
}
|
|
631
|
-
y.dismiss = qt;
|
|
632
|
-
y.clearWaitingQueue = Ct;
|
|
633
|
-
y.isActive = X;
|
|
634
|
-
y.update = (t, o = {}) => {
|
|
635
|
-
let e = vt(t, o);
|
|
636
|
-
if (e) {
|
|
637
|
-
let { props: r2, content: s } = e, l = { delay: 100, ...r2, ...o, toastId: o.toastId || t, updateId: at() };
|
|
638
|
-
l.toastId !== t && (l.staleId = t);
|
|
639
|
-
let a = l.render || s;
|
|
640
|
-
delete l.render, U(a, l);
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
y.done = (t) => {
|
|
644
|
-
y.update(t, { progress: 1 });
|
|
645
|
-
};
|
|
646
|
-
y.onChange = Pt;
|
|
647
|
-
y.play = (t) => rt(true, t);
|
|
648
|
-
y.pause = (t) => rt(false, t);
|
|
649
|
-
function It(t) {
|
|
650
|
-
var a;
|
|
651
|
-
let { subscribe: o, getSnapshot: e, setProps: r2 } = Kt(Et(t)).current;
|
|
652
|
-
r2(t);
|
|
653
|
-
let s = (a = Yt(o, e, e)) == null ? void 0 : a.slice();
|
|
654
|
-
function l(d) {
|
|
655
|
-
if (!s) return [];
|
|
656
|
-
let c = /* @__PURE__ */ new Map();
|
|
657
|
-
return t.newestOnTop && s.reverse(), s.forEach((T) => {
|
|
658
|
-
let { position: g } = T.props;
|
|
659
|
-
c.has(g) || c.set(g, []), c.get(g).push(T);
|
|
660
|
-
}), Array.from(c, (T) => d(T[0], T[1]));
|
|
661
|
-
}
|
|
662
|
-
return { getToastToRender: l, isToastActive: X, count: s == null ? void 0 : s.length };
|
|
663
|
-
}
|
|
664
|
-
function At(t) {
|
|
665
|
-
let [o, e] = kt(false), [r2, s] = kt(false), l = St(null), a = St({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: true, canDrag: false, didMove: false }).current, { autoClose: d, pauseOnHover: c, closeToast: T, onClick: g, closeOnClick: v } = t;
|
|
666
|
-
xt({ id: t.toastId, containerId: t.containerId, fn: e }), Zt(() => {
|
|
667
|
-
if (t.pauseOnFocusLoss) return x(), () => {
|
|
668
|
-
C();
|
|
669
|
-
};
|
|
670
|
-
}, [t.pauseOnFocusLoss]);
|
|
671
|
-
function x() {
|
|
672
|
-
document.hasFocus() || p(), window.addEventListener("focus", f), window.addEventListener("blur", p);
|
|
673
|
-
}
|
|
674
|
-
function C() {
|
|
675
|
-
window.removeEventListener("focus", f), window.removeEventListener("blur", p);
|
|
676
|
-
}
|
|
677
|
-
function S(m) {
|
|
678
|
-
if (t.draggable === true || t.draggable === m.pointerType) {
|
|
679
|
-
b();
|
|
680
|
-
let _ = l.current;
|
|
681
|
-
a.canCloseOnClick = true, a.canDrag = true, _.style.transition = "none", t.draggableDirection === "x" ? (a.start = m.clientX, a.removalDistance = _.offsetWidth * (t.draggablePercent / 100)) : (a.start = m.clientY, a.removalDistance = _.offsetHeight * (t.draggablePercent === 80 ? t.draggablePercent * 1.5 : t.draggablePercent) / 100);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
function E(m) {
|
|
685
|
-
let { top: _, bottom: k, left: M, right: A } = l.current.getBoundingClientRect();
|
|
686
|
-
m.nativeEvent.type !== "touchend" && t.pauseOnHover && m.clientX >= M && m.clientX <= A && m.clientY >= _ && m.clientY <= k ? p() : f();
|
|
687
|
-
}
|
|
688
|
-
function f() {
|
|
689
|
-
e(true);
|
|
690
|
-
}
|
|
691
|
-
function p() {
|
|
692
|
-
e(false);
|
|
693
|
-
}
|
|
694
|
-
function b() {
|
|
695
|
-
a.didMove = false, document.addEventListener("pointermove", n), document.addEventListener("pointerup", u);
|
|
696
|
-
}
|
|
697
|
-
function i() {
|
|
698
|
-
document.removeEventListener("pointermove", n), document.removeEventListener("pointerup", u);
|
|
699
|
-
}
|
|
700
|
-
function n(m) {
|
|
701
|
-
let _ = l.current;
|
|
702
|
-
if (a.canDrag && _) {
|
|
703
|
-
a.didMove = true, o && p(), t.draggableDirection === "x" ? a.delta = m.clientX - a.start : a.delta = m.clientY - a.start, a.start !== m.clientX && (a.canCloseOnClick = false);
|
|
704
|
-
let k = t.draggableDirection === "x" ? `${a.delta}px, var(--y)` : `0, calc(${a.delta}px + var(--y))`;
|
|
705
|
-
_.style.transform = `translate3d(${k},0)`, _.style.opacity = `${1 - Math.abs(a.delta / a.removalDistance)}`;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
function u() {
|
|
709
|
-
i();
|
|
710
|
-
let m = l.current;
|
|
711
|
-
if (a.canDrag && a.didMove && m) {
|
|
712
|
-
if (a.canDrag = false, Math.abs(a.delta) > a.removalDistance) {
|
|
713
|
-
s(true), t.closeToast(true), t.collapseAll();
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
|
-
m.style.transition = "transform 0.2s, opacity 0.2s", m.style.removeProperty("transform"), m.style.removeProperty("opacity");
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
let h = { onPointerDown: S, onPointerUp: E };
|
|
720
|
-
return d && c && (h.onMouseEnter = p, t.stacked || (h.onMouseLeave = f)), v && (h.onClick = (m) => {
|
|
721
|
-
g && g(m), a.canCloseOnClick && T(true);
|
|
722
|
-
}), { playToast: f, pauseToast: p, isRunning: o, preventExitTransition: r2, toastRef: l, eventHandlers: h };
|
|
723
|
-
}
|
|
724
|
-
var Ot = typeof window != "undefined" ? to : Jt;
|
|
725
|
-
var G = ({ theme: t, type: o, isLoading: e, ...r2 }) => O.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: t === "colored" ? "currentColor" : `var(--toastify-icon-color-${o})`, ...r2 });
|
|
726
|
-
function ao(t) {
|
|
727
|
-
return O.createElement(G, { ...t }, O.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
|
|
728
|
-
}
|
|
729
|
-
function so(t) {
|
|
730
|
-
return O.createElement(G, { ...t }, O.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
|
|
731
|
-
}
|
|
732
|
-
function no(t) {
|
|
733
|
-
return O.createElement(G, { ...t }, O.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
|
|
734
|
-
}
|
|
735
|
-
function ro(t) {
|
|
736
|
-
return O.createElement(G, { ...t }, O.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
|
|
737
|
-
}
|
|
738
|
-
function io() {
|
|
739
|
-
return O.createElement("div", { className: "Toastify__spinner" });
|
|
740
|
-
}
|
|
741
|
-
var W = { info: so, warning: ao, success: no, error: ro, spinner: io };
|
|
742
|
-
var lo = (t) => t in W;
|
|
743
|
-
function Nt({ theme: t, type: o, isLoading: e, icon: r2 }) {
|
|
744
|
-
let s = null, l = { theme: t, type: o };
|
|
745
|
-
return r2 === false || (P(r2) ? s = r2({ ...l, isLoading: e }) : eo(r2) ? s = oo(r2, l) : e ? s = W.spinner() : lo(o) && (s = W[o](l))), s;
|
|
746
|
-
}
|
|
747
|
-
var wt = (t) => {
|
|
748
|
-
let { isRunning: o, preventExitTransition: e, toastRef: r2, eventHandlers: s, playToast: l } = At(t), { closeButton: a, children: d, autoClose: c, onClick: T, type: g, hideProgressBar: v, closeToast: x, transition: C, position: S, className: E, style: f, progressClassName: p, updateId: b, role: i, progress: n, rtl: u, toastId: h, deleteToast: m, isIn: _, isLoading: k, closeOnClick: M, theme: A, ariaLabel: R } = t, D = clsx_default("Toastify__toast", `Toastify__toast-theme--${A}`, `Toastify__toast--${g}`, { ["Toastify__toast--rtl"]: u }, { ["Toastify__toast--close-on-click"]: M }), Y = P(E) ? E({ rtl: u, position: S, type: g, defaultClassName: D }) : clsx_default(D, E), ft = Nt(t), dt = !!n || !c, j = { closeToast: x, type: g, theme: A }, H = null;
|
|
749
|
-
return a === false || (P(a) ? H = a(j) : fo(a) ? H = co(a, j) : H = yt(j)), q.createElement(C, { isIn: _, done: m, position: S, preventExitTransition: e, nodeRef: r2, playToast: l }, q.createElement("div", { id: h, tabIndex: 0, onClick: T, "data-in": _, className: Y, ...s, style: f, ref: r2, ..._ && { role: i, "aria-label": R } }, ft != null && q.createElement("div", { className: clsx_default("Toastify__toast-icon", { ["Toastify--animate-icon Toastify__zoom-enter"]: !k }) }, ft), tt(d, t, !o), H, !t.customProgressBar && q.createElement(gt, { ...b && !dt ? { key: `p-${b}` } : {}, rtl: u, theme: A, delay: c, isRunning: o, isIn: _, closeToast: x, hide: v, type: g, className: p, controlledProgress: dt, progress: n || 0 })));
|
|
750
|
-
};
|
|
751
|
-
var K = (t, o = false) => ({ enter: `Toastify--animate Toastify__${t}-enter`, exit: `Toastify--animate Toastify__${t}-exit`, appendPosition: o });
|
|
752
|
-
var lt = $(K("bounce", true));
|
|
753
|
-
var mo = $(K("slide", true));
|
|
754
|
-
var po = $(K("zoom"));
|
|
755
|
-
var uo = $(K("flip"));
|
|
756
|
-
var _o = { position: "top-right", transition: lt, autoClose: 5e3, closeButton: true, pauseOnHover: true, pauseOnFocusLoss: true, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light", "aria-label": "Notifications Alt+T", hotKeys: (t) => t.altKey && t.code === "KeyT" };
|
|
757
|
-
function Lt(t) {
|
|
758
|
-
let o = { ..._o, ...t }, e = t.stacked, [r2, s] = go(true), l = To(null), { getToastToRender: a, isToastActive: d, count: c } = It(o), { className: T, style: g, rtl: v, containerId: x, hotKeys: C } = o;
|
|
759
|
-
function S(f) {
|
|
760
|
-
let p = clsx_default("Toastify__toast-container", `Toastify__toast-container--${f}`, { ["Toastify__toast-container--rtl"]: v });
|
|
761
|
-
return P(T) ? T({ position: f, rtl: v, defaultClassName: p }) : clsx_default(p, B(T));
|
|
762
|
-
}
|
|
763
|
-
function E() {
|
|
764
|
-
e && (s(true), y.play());
|
|
765
|
-
}
|
|
766
|
-
return Ot(() => {
|
|
767
|
-
var f;
|
|
768
|
-
if (e) {
|
|
769
|
-
let p = l.current.querySelectorAll('[data-in="true"]'), b = 12, i = (f = o.position) == null ? void 0 : f.includes("top"), n = 0, u = 0;
|
|
770
|
-
Array.from(p).reverse().forEach((h, m) => {
|
|
771
|
-
let _ = h;
|
|
772
|
-
_.classList.add("Toastify__toast--stacked"), m > 0 && (_.dataset.collapsed = `${r2}`), _.dataset.pos || (_.dataset.pos = i ? "top" : "bot");
|
|
773
|
-
let k = n * (r2 ? 0.2 : 1) + (r2 ? 0 : b * m);
|
|
774
|
-
_.style.setProperty("--y", `${i ? k : k * -1}px`), _.style.setProperty("--g", `${b}`), _.style.setProperty("--s", `${1 - (r2 ? u : 0)}`), n += _.offsetHeight, u += 0.025;
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
}, [r2, c, e]), yo(() => {
|
|
778
|
-
function f(p) {
|
|
779
|
-
var i;
|
|
780
|
-
let b = l.current;
|
|
781
|
-
C(p) && ((i = b.querySelector('[tabIndex="0"]')) == null || i.focus(), s(false), y.pause()), p.key === "Escape" && (document.activeElement === b || b != null && b.contains(document.activeElement)) && (s(true), y.play());
|
|
782
|
-
}
|
|
783
|
-
return document.addEventListener("keydown", f), () => {
|
|
784
|
-
document.removeEventListener("keydown", f);
|
|
785
|
-
};
|
|
786
|
-
}, [C]), ct.createElement("section", { ref: l, className: "Toastify", id: x, onMouseEnter: () => {
|
|
787
|
-
e && (s(false), y.pause());
|
|
788
|
-
}, onMouseLeave: E, "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text", "aria-label": o["aria-label"] }, a((f, p) => {
|
|
789
|
-
let b = p.length ? { ...g } : { ...g, pointerEvents: "none" };
|
|
790
|
-
return ct.createElement("div", { tabIndex: -1, className: S(f), "data-stacked": e, style: b, key: `c-${f}` }, p.map(({ content: i, props: n }) => ct.createElement(wt, { ...n, stacked: e, collapseAll: E, isIn: d(n.toastId, n.containerId), key: `t-${n.key}` }, i)));
|
|
791
|
-
}));
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
// src/SignUp.jsx
|
|
795
|
-
function SignUp() {
|
|
4128
|
+
function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
796
4129
|
const {
|
|
797
4130
|
publishableKey,
|
|
798
4131
|
baseUrl,
|
|
@@ -802,18 +4135,42 @@ function SignUp() {
|
|
|
802
4135
|
loadingUser,
|
|
803
4136
|
fetchMe,
|
|
804
4137
|
setUser
|
|
805
|
-
} = useAuth();
|
|
4138
|
+
} = (typeof useAuth === "function" ? useAuth() : {}) || {};
|
|
806
4139
|
const [name, setName] = useState3("");
|
|
807
4140
|
const [email, setEmail] = useState3("");
|
|
808
4141
|
const [password, setPassword] = useState3("");
|
|
809
4142
|
const [loading, setLoading] = useState3(false);
|
|
810
|
-
const [
|
|
4143
|
+
const [loadingOauth, setLoadingOauth] = useState3({ google: false, github: false });
|
|
811
4144
|
const redirectTimer = useRef2(null);
|
|
4145
|
+
const toastId = useRef2(0);
|
|
4146
|
+
const [toasts, setToasts] = useState3([]);
|
|
812
4147
|
useEffect2(() => {
|
|
813
4148
|
return () => {
|
|
814
4149
|
if (redirectTimer.current) clearTimeout(redirectTimer.current);
|
|
4150
|
+
toasts.forEach((t) => clearTimeout(t._timer));
|
|
815
4151
|
};
|
|
816
4152
|
}, []);
|
|
4153
|
+
function showToast(type, message, ms = 5e3) {
|
|
4154
|
+
const id = ++toastId.current;
|
|
4155
|
+
const created = Date.now();
|
|
4156
|
+
const t = { id, type, message, created, _timer: null };
|
|
4157
|
+
setToasts((prev) => {
|
|
4158
|
+
const next = [t, ...prev].slice(0, 6);
|
|
4159
|
+
return next;
|
|
4160
|
+
});
|
|
4161
|
+
const timer = setTimeout(() => {
|
|
4162
|
+
setToasts((prev) => prev.filter((x) => x.id !== id));
|
|
4163
|
+
}, ms);
|
|
4164
|
+
t._timer = timer;
|
|
4165
|
+
}
|
|
4166
|
+
function removeToast(id) {
|
|
4167
|
+
setToasts((prev) => {
|
|
4168
|
+
prev.forEach((t) => {
|
|
4169
|
+
if (t.id === id) clearTimeout(t._timer);
|
|
4170
|
+
});
|
|
4171
|
+
return prev.filter((x) => x.id !== id);
|
|
4172
|
+
});
|
|
4173
|
+
}
|
|
817
4174
|
if (loadingUser) return null;
|
|
818
4175
|
if (user && redirect) {
|
|
819
4176
|
if (typeof redirectTo === "function") redirectTo(redirect);
|
|
@@ -823,8 +4180,22 @@ function SignUp() {
|
|
|
823
4180
|
async function submit(e) {
|
|
824
4181
|
e.preventDefault();
|
|
825
4182
|
if (loading) return;
|
|
826
|
-
setMessage(null);
|
|
827
4183
|
setLoading(true);
|
|
4184
|
+
if (!name.trim()) {
|
|
4185
|
+
showToast("error", "Please enter your name.");
|
|
4186
|
+
setLoading(false);
|
|
4187
|
+
return;
|
|
4188
|
+
}
|
|
4189
|
+
if (!email.includes("@")) {
|
|
4190
|
+
showToast("error", "Please enter a valid email address.");
|
|
4191
|
+
setLoading(false);
|
|
4192
|
+
return;
|
|
4193
|
+
}
|
|
4194
|
+
if (password.length < 8) {
|
|
4195
|
+
showToast("error", "Password must be at least 8 characters.");
|
|
4196
|
+
setLoading(false);
|
|
4197
|
+
return;
|
|
4198
|
+
}
|
|
828
4199
|
const url = `${(baseUrl || "").replace(/\/+$/, "")}/api/sdk/signup`;
|
|
829
4200
|
try {
|
|
830
4201
|
const res = await fetch(url, {
|
|
@@ -834,7 +4205,7 @@ function SignUp() {
|
|
|
834
4205
|
"Content-Type": "application/json",
|
|
835
4206
|
"x-publishable-key": publishableKey || ""
|
|
836
4207
|
},
|
|
837
|
-
body: JSON.stringify({ name, email, password })
|
|
4208
|
+
body: JSON.stringify({ name: name.trim(), email: email.trim(), password })
|
|
838
4209
|
});
|
|
839
4210
|
const data = await res.json().catch(async () => {
|
|
840
4211
|
const text = await res.text().catch(() => "");
|
|
@@ -846,51 +4217,44 @@ function SignUp() {
|
|
|
846
4217
|
}
|
|
847
4218
|
if (data.user && typeof setUser === "function") setUser(data.user);
|
|
848
4219
|
if (typeof fetchMe === "function") await fetchMe();
|
|
849
|
-
|
|
850
|
-
y.success("Account created. Redirecting\u2026");
|
|
4220
|
+
showToast("success", "Account created. Redirecting\u2026");
|
|
851
4221
|
if (redirect) {
|
|
852
4222
|
redirectTimer.current = setTimeout(() => {
|
|
853
4223
|
if (typeof redirectTo === "function") redirectTo(redirect);
|
|
854
4224
|
else if (typeof window !== "undefined") window.location.assign(redirect);
|
|
855
|
-
},
|
|
4225
|
+
}, 450);
|
|
856
4226
|
}
|
|
857
4227
|
} catch (err) {
|
|
858
4228
|
const text = err?.message ?? "Network error";
|
|
859
|
-
|
|
4229
|
+
showToast("error", text);
|
|
860
4230
|
console.error("Signup error:", err);
|
|
861
4231
|
} finally {
|
|
862
4232
|
setLoading(false);
|
|
863
4233
|
}
|
|
864
4234
|
}
|
|
865
4235
|
async function startOAuthFlow(provider) {
|
|
866
|
-
if (loading) return;
|
|
867
|
-
|
|
4236
|
+
if (loading || loadingOauth[provider]) return;
|
|
4237
|
+
setLoadingOauth((prev) => ({ ...prev, [provider]: true }));
|
|
868
4238
|
try {
|
|
869
4239
|
const rid = typeof crypto !== "undefined" && typeof crypto.randomUUID === "function" ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
870
|
-
const callbackUrl = encodeURIComponent(`${window.location.origin}/signup`);
|
|
871
|
-
const sdkBase = baseUrl || window.location.origin.replace(/\/+$/, "");
|
|
4240
|
+
const callbackUrl = encodeURIComponent(`${typeof window !== "undefined" ? window.location.origin : ""}/signup`);
|
|
4241
|
+
const sdkBase = baseUrl || (typeof window !== "undefined" ? window.location.origin.replace(/\/+$/, "") : "");
|
|
872
4242
|
const startUrl = `${sdkBase}/sdk/auth/start?rid=${rid}&source=${encodeURIComponent(provider)}&callbackUrl=${callbackUrl}`;
|
|
873
4243
|
if (!publishableKey) {
|
|
874
|
-
throw new Error("Missing publishable key (client side).
|
|
4244
|
+
throw new Error("Missing publishable key (client side).");
|
|
875
4245
|
}
|
|
876
4246
|
const res = await fetch(startUrl, {
|
|
877
4247
|
method: "GET",
|
|
878
|
-
headers: {
|
|
879
|
-
"x-publishable-key": publishableKey
|
|
880
|
-
}
|
|
4248
|
+
headers: { "x-publishable-key": publishableKey }
|
|
881
4249
|
});
|
|
882
4250
|
const data = await res.json().catch(() => null);
|
|
883
|
-
if (!res.ok) {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
if (!data?.oauthUrl) {
|
|
887
|
-
throw new Error("SDK start did not return oauthUrl");
|
|
888
|
-
}
|
|
889
|
-
window.location.href = data.oauthUrl;
|
|
4251
|
+
if (!res.ok) throw new Error(data?.error || `OAuth start failed (${res.status})`);
|
|
4252
|
+
if (!data?.oauthUrl) throw new Error("SDK start did not return oauthUrl");
|
|
4253
|
+
if (typeof window !== "undefined") window.location.href = data.oauthUrl;
|
|
890
4254
|
} catch (err) {
|
|
4255
|
+
showToast("error", err?.message || "OAuth start failed");
|
|
891
4256
|
console.error("OAuth start error:", err);
|
|
892
|
-
|
|
893
|
-
setLoading(false);
|
|
4257
|
+
setLoadingOauth((prev) => ({ ...prev, [provider]: false }));
|
|
894
4258
|
}
|
|
895
4259
|
}
|
|
896
4260
|
const handleGoogle = (e) => {
|
|
@@ -901,28 +4265,48 @@ function SignUp() {
|
|
|
901
4265
|
if (e && typeof e.preventDefault === "function") e.preventDefault();
|
|
902
4266
|
startOAuthFlow("github");
|
|
903
4267
|
};
|
|
904
|
-
return /* @__PURE__ */ React3.createElement("div", { style:
|
|
4268
|
+
return /* @__PURE__ */ React3.createElement("div", { style: overlay2 }, /* @__PURE__ */ React3.createElement("div", { style: toastContainer }, toasts.map((t) => /* @__PURE__ */ React3.createElement(
|
|
4269
|
+
"div",
|
|
4270
|
+
{
|
|
4271
|
+
key: t.id,
|
|
4272
|
+
role: "status",
|
|
4273
|
+
"aria-live": "polite",
|
|
4274
|
+
style: {
|
|
4275
|
+
...toastBase,
|
|
4276
|
+
...t.type === "error" ? toastError : t.type === "success" ? toastSuccess : toastInfo
|
|
4277
|
+
},
|
|
4278
|
+
onMouseEnter: () => {
|
|
4279
|
+
clearTimeout(t._timer);
|
|
4280
|
+
},
|
|
4281
|
+
onMouseLeave: () => {
|
|
4282
|
+
const timer = setTimeout(() => removeToast(t.id), 3e3);
|
|
4283
|
+
setToasts((prev) => prev.map((x) => x.id === t.id ? { ...x, _timer: timer } : x));
|
|
4284
|
+
}
|
|
4285
|
+
},
|
|
4286
|
+
/* @__PURE__ */ React3.createElement("div", { style: { flex: 1 } }, t.message),
|
|
4287
|
+
/* @__PURE__ */ React3.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: toastCloseBtn }, "\u2715")
|
|
4288
|
+
))), /* @__PURE__ */ React3.createElement("div", { style: modal2 }, /* @__PURE__ */ React3.createElement("div", { style: modalInner }, /* @__PURE__ */ React3.createElement("header", { style: header }, /* @__PURE__ */ React3.createElement("div", { style: brandRow }, /* @__PURE__ */ React3.createElement("div", { style: logo }, /* @__PURE__ */ React3.createElement("div", { style: logoCircle, "aria-hidden": true })), /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement("h1", { style: title2 }, "Sign up to ", agency?.name || "App"), /* @__PURE__ */ React3.createElement("div", { style: subtitle2 }, "Welcome! Create your account.")))), /* @__PURE__ */ React3.createElement("section", { style: oauthSection }, /* @__PURE__ */ React3.createElement(
|
|
905
4289
|
"button",
|
|
906
4290
|
{
|
|
907
4291
|
onClick: handleGoogle,
|
|
908
4292
|
type: "button",
|
|
909
4293
|
style: { ...oauthButton, ...oauthGoogle },
|
|
910
|
-
disabled: loading,
|
|
911
|
-
"aria-disabled": loading
|
|
4294
|
+
disabled: loading || loadingOauth.google,
|
|
4295
|
+
"aria-disabled": loading || loadingOauth.google
|
|
912
4296
|
},
|
|
913
4297
|
/* @__PURE__ */ React3.createElement("svg", { width: 18, style: { marginRight: 10 }, viewBox: "-3 0 262 262", xmlns: "http://www.w3.org/2000/svg", fill: "#000000", "aria-hidden": true }, /* @__PURE__ */ React3.createElement("path", { d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027", fill: "#4285F4" }), /* @__PURE__ */ React3.createElement("path", { d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1", fill: "#34A853" }), /* @__PURE__ */ React3.createElement("path", { d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782", fill: "#FBBC05" }), /* @__PURE__ */ React3.createElement("path", { d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251", fill: "#EB4335" })),
|
|
914
|
-
/* @__PURE__ */ React3.createElement("span", null,
|
|
4298
|
+
/* @__PURE__ */ React3.createElement("span", null, loadingOauth.google ? "Loading..." : "Continue with Google")
|
|
915
4299
|
), /* @__PURE__ */ React3.createElement(
|
|
916
4300
|
"button",
|
|
917
4301
|
{
|
|
918
4302
|
onClick: handleGithub,
|
|
919
4303
|
type: "button",
|
|
920
4304
|
style: { ...oauthButton, ...oauthGithub },
|
|
921
|
-
disabled: loading,
|
|
922
|
-
"aria-disabled": loading
|
|
4305
|
+
disabled: loading || loadingOauth.github,
|
|
4306
|
+
"aria-disabled": loading || loadingOauth.github
|
|
923
4307
|
},
|
|
924
4308
|
/* @__PURE__ */ React3.createElement("svg", { width: 18, style: { marginRight: 10 }, xmlns: "http://www.w3.org/2000/svg", fill: "white", viewBox: "0 0 20 20", "aria-hidden": true }, /* @__PURE__ */ React3.createElement("path", { fillRule: "evenodd", d: "M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z", clipRule: "evenodd" })),
|
|
925
|
-
/* @__PURE__ */ React3.createElement("span", null,
|
|
4309
|
+
/* @__PURE__ */ React3.createElement("span", null, loadingOauth.github ? "Loading..." : "Continue with GitHub")
|
|
926
4310
|
)), /* @__PURE__ */ React3.createElement("div", { style: dividerRow }, /* @__PURE__ */ React3.createElement("div", { style: line }), /* @__PURE__ */ React3.createElement("div", { style: orText }, "or"), /* @__PURE__ */ React3.createElement("div", { style: line })), /* @__PURE__ */ React3.createElement("form", { onSubmit: submit, style: form }, /* @__PURE__ */ React3.createElement("label", { style: label2, htmlFor: "name" }, /* @__PURE__ */ React3.createElement("span", { style: labelText }, "Name"), /* @__PURE__ */ React3.createElement(
|
|
927
4311
|
"input",
|
|
928
4312
|
{
|
|
@@ -967,78 +4351,78 @@ function SignUp() {
|
|
|
967
4351
|
"aria-disabled": loading
|
|
968
4352
|
},
|
|
969
4353
|
loading ? "Signing up..." : "Sign Up"
|
|
970
|
-
))), /* @__PURE__ */ React3.createElement("div", { style:
|
|
4354
|
+
))), /* @__PURE__ */ React3.createElement("div", { style: modalFooter }, /* @__PURE__ */ React3.createElement("div", { style: belowRow }, /* @__PURE__ */ React3.createElement("span", { style: muted }, "Already have an account? "), /* @__PURE__ */ React3.createElement(import_link.default, { href: "/sign-in", style: link }, "Sign in")), /* @__PURE__ */ React3.createElement("div", { style: dividerThin }), /* @__PURE__ */ React3.createElement("div", { style: secured }, /* @__PURE__ */ React3.createElement("div", { style: securedText }, "Secured by auth")))));
|
|
971
4355
|
}
|
|
972
|
-
var
|
|
4356
|
+
var overlay2 = {
|
|
973
4357
|
position: "fixed",
|
|
974
4358
|
inset: 0,
|
|
975
4359
|
display: "flex",
|
|
976
4360
|
alignItems: "center",
|
|
977
4361
|
justifyContent: "center",
|
|
978
|
-
padding:
|
|
979
|
-
background: "linear-gradient(
|
|
980
|
-
|
|
4362
|
+
padding: 20,
|
|
4363
|
+
background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
|
|
4364
|
+
backdropFilter: "blur(6px)",
|
|
981
4365
|
minHeight: "100vh",
|
|
982
4366
|
zIndex: 9999
|
|
983
4367
|
};
|
|
984
|
-
var
|
|
4368
|
+
var modal2 = {
|
|
985
4369
|
width: "100%",
|
|
986
|
-
maxWidth:
|
|
987
|
-
borderRadius:
|
|
988
|
-
background: "linear-gradient(180deg, rgba(15,19,
|
|
989
|
-
|
|
990
|
-
|
|
4370
|
+
maxWidth: 560,
|
|
4371
|
+
borderRadius: 14,
|
|
4372
|
+
background: "linear-gradient(180deg, rgba(15,19,24,0.6), rgba(10,12,16,0.6))",
|
|
4373
|
+
// translucent neutral so background peeks through
|
|
4374
|
+
border: "1px solid rgba(99,102,106,0.12)",
|
|
4375
|
+
// slightly stronger neutral border
|
|
4376
|
+
boxShadow: "0 20px 50px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02)",
|
|
991
4377
|
overflow: "hidden",
|
|
992
4378
|
display: "flex",
|
|
993
4379
|
flexDirection: "column",
|
|
994
|
-
|
|
4380
|
+
transform: "translateY(-6px)"
|
|
995
4381
|
};
|
|
996
|
-
var
|
|
997
|
-
padding:
|
|
4382
|
+
var modalInner = {
|
|
4383
|
+
padding: 18,
|
|
998
4384
|
display: "flex",
|
|
999
4385
|
flexDirection: "column",
|
|
1000
|
-
gap:
|
|
4386
|
+
gap: 12
|
|
1001
4387
|
};
|
|
1002
|
-
var
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
gap: 8
|
|
4388
|
+
var header = {
|
|
4389
|
+
paddingBottom: 6,
|
|
4390
|
+
borderBottom: "1px solid rgba(148,163,184,0.04)"
|
|
1006
4391
|
};
|
|
1007
4392
|
var brandRow = {
|
|
1008
4393
|
display: "flex",
|
|
1009
4394
|
alignItems: "center",
|
|
1010
4395
|
gap: 12
|
|
1011
4396
|
};
|
|
1012
|
-
var
|
|
4397
|
+
var logo = {
|
|
4398
|
+
width: 44,
|
|
4399
|
+
height: 44,
|
|
4400
|
+
display: "flex",
|
|
4401
|
+
alignItems: "center",
|
|
4402
|
+
justifyContent: "center"
|
|
4403
|
+
};
|
|
4404
|
+
var logoCircle = {
|
|
1013
4405
|
width: 36,
|
|
1014
4406
|
height: 36,
|
|
1015
4407
|
borderRadius: 999,
|
|
1016
|
-
background: "linear-gradient(135deg,#
|
|
4408
|
+
background: "linear-gradient(135deg,#2f3438,#11151a)",
|
|
4409
|
+
boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
|
|
1017
4410
|
};
|
|
1018
|
-
var
|
|
4411
|
+
var title2 = {
|
|
1019
4412
|
margin: 0,
|
|
1020
|
-
fontSize:
|
|
4413
|
+
fontSize: 18,
|
|
1021
4414
|
fontWeight: 600,
|
|
1022
|
-
color: "#
|
|
1023
|
-
};
|
|
1024
|
-
var brandSub = {
|
|
1025
|
-
display: "flex",
|
|
1026
|
-
flexDirection: "column",
|
|
1027
|
-
gap: 4
|
|
1028
|
-
};
|
|
1029
|
-
var brandLead = {
|
|
1030
|
-
fontSize: 15,
|
|
1031
|
-
color: "rgba(255,255,255,0.95)"
|
|
4415
|
+
color: "#e6e6e6"
|
|
1032
4416
|
};
|
|
1033
|
-
var
|
|
4417
|
+
var subtitle2 = {
|
|
1034
4418
|
fontSize: 13,
|
|
1035
|
-
color: "rgba(
|
|
1036
|
-
marginTop:
|
|
4419
|
+
color: "rgba(230,230,230,0.72)",
|
|
4420
|
+
marginTop: 4
|
|
1037
4421
|
};
|
|
1038
|
-
var
|
|
4422
|
+
var oauthSection = {
|
|
4423
|
+
marginTop: 8,
|
|
1039
4424
|
display: "flex",
|
|
1040
|
-
gap:
|
|
1041
|
-
marginTop: 8
|
|
4425
|
+
gap: 8
|
|
1042
4426
|
};
|
|
1043
4427
|
var oauthButton = {
|
|
1044
4428
|
flex: 1,
|
|
@@ -1051,21 +4435,22 @@ var oauthButton = {
|
|
|
1051
4435
|
fontSize: 14,
|
|
1052
4436
|
cursor: "pointer",
|
|
1053
4437
|
userSelect: "none",
|
|
1054
|
-
gap: 8
|
|
4438
|
+
gap: 8,
|
|
4439
|
+
minHeight: 40
|
|
1055
4440
|
};
|
|
1056
4441
|
var oauthGoogle = {
|
|
1057
|
-
background: "rgba(255,255,255,0.
|
|
4442
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))",
|
|
1058
4443
|
color: "#fff"
|
|
1059
4444
|
};
|
|
1060
4445
|
var oauthGithub = {
|
|
1061
|
-
background: "rgba(255,255,255,0.
|
|
4446
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))",
|
|
1062
4447
|
color: "#fff"
|
|
1063
4448
|
};
|
|
1064
4449
|
var dividerRow = {
|
|
1065
4450
|
display: "flex",
|
|
1066
4451
|
alignItems: "center",
|
|
1067
|
-
gap:
|
|
1068
|
-
marginTop:
|
|
4452
|
+
gap: 10,
|
|
4453
|
+
marginTop: 12
|
|
1069
4454
|
};
|
|
1070
4455
|
var line = {
|
|
1071
4456
|
flex: 1,
|
|
@@ -1074,13 +4459,13 @@ var line = {
|
|
|
1074
4459
|
};
|
|
1075
4460
|
var orText = {
|
|
1076
4461
|
fontSize: 13,
|
|
1077
|
-
color: "rgba(
|
|
4462
|
+
color: "rgba(230,230,230,0.65)",
|
|
1078
4463
|
padding: "0 8px"
|
|
1079
4464
|
};
|
|
1080
4465
|
var form = {
|
|
1081
4466
|
display: "flex",
|
|
1082
4467
|
flexDirection: "column",
|
|
1083
|
-
gap:
|
|
4468
|
+
gap: 10,
|
|
1084
4469
|
marginTop: 6
|
|
1085
4470
|
};
|
|
1086
4471
|
var label2 = {
|
|
@@ -1090,25 +4475,26 @@ var label2 = {
|
|
|
1090
4475
|
};
|
|
1091
4476
|
var labelText = {
|
|
1092
4477
|
fontSize: 13,
|
|
1093
|
-
color: "rgba(
|
|
4478
|
+
color: "rgba(230,230,230,0.68)"
|
|
1094
4479
|
};
|
|
1095
4480
|
var input2 = {
|
|
1096
4481
|
width: "100%",
|
|
1097
4482
|
padding: "10px 12px",
|
|
1098
4483
|
borderRadius: 10,
|
|
1099
|
-
background: "rgba(
|
|
1100
|
-
color: "#
|
|
1101
|
-
border: "1px solid rgba(148,163,184,0.
|
|
4484
|
+
background: "rgba(255,255,255,0.02)",
|
|
4485
|
+
color: "#e6e6e6",
|
|
4486
|
+
border: "1px solid rgba(148,163,184,0.10)",
|
|
1102
4487
|
fontSize: 14,
|
|
1103
4488
|
outline: "none",
|
|
1104
|
-
boxSizing: "border-box"
|
|
4489
|
+
boxSizing: "border-box",
|
|
4490
|
+
transition: "box-shadow 120ms, border-color 120ms"
|
|
1105
4491
|
};
|
|
1106
4492
|
var submitButton = {
|
|
1107
4493
|
marginTop: 6,
|
|
1108
4494
|
width: "100%",
|
|
1109
4495
|
padding: "10px 12px",
|
|
1110
4496
|
borderRadius: 10,
|
|
1111
|
-
background: "linear-gradient(180deg,#
|
|
4497
|
+
background: "linear-gradient(180deg,#475569,#94a3b8)",
|
|
1112
4498
|
border: "none",
|
|
1113
4499
|
color: "#fff",
|
|
1114
4500
|
fontWeight: 600,
|
|
@@ -1116,14 +4502,15 @@ var submitButton = {
|
|
|
1116
4502
|
fontSize: 15,
|
|
1117
4503
|
display: "inline-flex",
|
|
1118
4504
|
alignItems: "center",
|
|
1119
|
-
justifyContent: "center"
|
|
4505
|
+
justifyContent: "center",
|
|
4506
|
+
minHeight: 44
|
|
1120
4507
|
};
|
|
1121
|
-
var
|
|
1122
|
-
padding: "12px
|
|
4508
|
+
var modalFooter = {
|
|
4509
|
+
padding: "12px 18px 18px 18px",
|
|
1123
4510
|
borderTop: "1px solid rgba(148,163,184,0.03)",
|
|
1124
4511
|
display: "flex",
|
|
1125
4512
|
flexDirection: "column",
|
|
1126
|
-
gap:
|
|
4513
|
+
gap: 8
|
|
1127
4514
|
};
|
|
1128
4515
|
var belowRow = {
|
|
1129
4516
|
textAlign: "center",
|
|
@@ -1133,17 +4520,17 @@ var belowRow = {
|
|
|
1133
4520
|
alignItems: "center"
|
|
1134
4521
|
};
|
|
1135
4522
|
var muted = {
|
|
1136
|
-
color: "rgba(
|
|
4523
|
+
color: "rgba(230,230,230,0.66)",
|
|
1137
4524
|
fontSize: 13
|
|
1138
4525
|
};
|
|
1139
4526
|
var link = {
|
|
1140
|
-
color: "#
|
|
4527
|
+
color: "#9fb0d9",
|
|
1141
4528
|
textDecoration: "none",
|
|
1142
4529
|
fontWeight: 600
|
|
1143
4530
|
};
|
|
1144
4531
|
var dividerThin = {
|
|
1145
4532
|
height: 1,
|
|
1146
|
-
background: "rgba(148,163,184,0.
|
|
4533
|
+
background: "rgba(148,163,184,0.04)",
|
|
1147
4534
|
marginTop: 6,
|
|
1148
4535
|
marginBottom: 6
|
|
1149
4536
|
};
|
|
@@ -1151,10 +4538,53 @@ var secured = {
|
|
|
1151
4538
|
textAlign: "center"
|
|
1152
4539
|
};
|
|
1153
4540
|
var securedText = {
|
|
1154
|
-
color: "rgba(
|
|
4541
|
+
color: "rgba(230,230,230,0.9)",
|
|
1155
4542
|
fontSize: 13,
|
|
1156
4543
|
fontWeight: 600
|
|
1157
4544
|
};
|
|
4545
|
+
var toastContainer = {
|
|
4546
|
+
position: "fixed",
|
|
4547
|
+
top: 18,
|
|
4548
|
+
right: 18,
|
|
4549
|
+
width: 360,
|
|
4550
|
+
maxWidth: "calc(100% - 36px)",
|
|
4551
|
+
display: "flex",
|
|
4552
|
+
flexDirection: "column",
|
|
4553
|
+
gap: 10,
|
|
4554
|
+
zIndex: 6e4
|
|
4555
|
+
};
|
|
4556
|
+
var toastBase = {
|
|
4557
|
+
display: "flex",
|
|
4558
|
+
gap: 10,
|
|
4559
|
+
alignItems: "center",
|
|
4560
|
+
padding: "10px 12px",
|
|
4561
|
+
borderRadius: 10,
|
|
4562
|
+
boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
|
|
4563
|
+
color: "#fff",
|
|
4564
|
+
fontSize: 13,
|
|
4565
|
+
minWidth: 120
|
|
4566
|
+
};
|
|
4567
|
+
var toastError = {
|
|
4568
|
+
background: "#000000",
|
|
4569
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
4570
|
+
};
|
|
4571
|
+
var toastSuccess = {
|
|
4572
|
+
background: "#000000",
|
|
4573
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
4574
|
+
};
|
|
4575
|
+
var toastInfo = {
|
|
4576
|
+
background: "#000000",
|
|
4577
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
4578
|
+
};
|
|
4579
|
+
var toastCloseBtn = {
|
|
4580
|
+
marginLeft: 8,
|
|
4581
|
+
background: "transparent",
|
|
4582
|
+
border: "none",
|
|
4583
|
+
color: "rgba(255,255,255,0.7)",
|
|
4584
|
+
cursor: "pointer",
|
|
4585
|
+
fontSize: 14,
|
|
4586
|
+
lineHeight: 1
|
|
4587
|
+
};
|
|
1158
4588
|
export {
|
|
1159
4589
|
provider_default as FlowlinkAuthProvider,
|
|
1160
4590
|
SignIn,
|