next-recomponents 2.0.9 → 2.0.11

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.mjs CHANGED
@@ -1,3 +1,3490 @@
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) {
132
+ for (var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
133
+ searchParamsList[_key - 1] = arguments[_key];
134
+ }
135
+ for (const searchParams of searchParamsList) {
136
+ for (const key of searchParams.keys()) {
137
+ target.delete(key);
138
+ }
139
+ for (const [key, value] of searchParams.entries()) {
140
+ target.append(key, value);
141
+ }
142
+ }
143
+ return target;
144
+ }
145
+ }
146
+ });
147
+
148
+ // ../../node_modules/next/dist/shared/lib/router/utils/format-url.js
149
+ var require_format_url = __commonJS({
150
+ "../../node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports) {
151
+ "use strict";
152
+ Object.defineProperty(exports, "__esModule", {
153
+ value: true
154
+ });
155
+ function _export(target, all) {
156
+ for (var name in all) Object.defineProperty(target, name, {
157
+ enumerable: true,
158
+ get: all[name]
159
+ });
160
+ }
161
+ _export(exports, {
162
+ formatUrl: function() {
163
+ return formatUrl;
164
+ },
165
+ formatWithValidation: function() {
166
+ return formatWithValidation;
167
+ },
168
+ urlObjectKeys: function() {
169
+ return urlObjectKeys;
170
+ }
171
+ });
172
+ var _interop_require_wildcard = require_interop_require_wildcard();
173
+ var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring());
174
+ var slashedProtocols = /https?|ftp|gopher|file/;
175
+ function formatUrl(urlObj) {
176
+ let { auth, hostname } = urlObj;
177
+ let protocol = urlObj.protocol || "";
178
+ let pathname = urlObj.pathname || "";
179
+ let hash = urlObj.hash || "";
180
+ let query = urlObj.query || "";
181
+ let host = false;
182
+ auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
183
+ if (urlObj.host) {
184
+ host = auth + urlObj.host;
185
+ } else if (hostname) {
186
+ host = auth + (~hostname.indexOf(":") ? "[" + hostname + "]" : hostname);
187
+ if (urlObj.port) {
188
+ host += ":" + urlObj.port;
189
+ }
190
+ }
191
+ if (query && typeof query === "object") {
192
+ query = String(_querystring.urlQueryToSearchParams(query));
193
+ }
194
+ let search = urlObj.search || query && "?" + query || "";
195
+ if (protocol && !protocol.endsWith(":")) protocol += ":";
196
+ if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
197
+ host = "//" + (host || "");
198
+ if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
199
+ } else if (!host) {
200
+ host = "";
201
+ }
202
+ if (hash && hash[0] !== "#") hash = "#" + hash;
203
+ if (search && search[0] !== "?") search = "?" + search;
204
+ pathname = pathname.replace(/[?#]/g, encodeURIComponent);
205
+ search = search.replace("#", "%23");
206
+ return "" + protocol + host + pathname + search + hash;
207
+ }
208
+ var urlObjectKeys = [
209
+ "auth",
210
+ "hash",
211
+ "host",
212
+ "hostname",
213
+ "href",
214
+ "path",
215
+ "pathname",
216
+ "port",
217
+ "protocol",
218
+ "query",
219
+ "search",
220
+ "slashes"
221
+ ];
222
+ function formatWithValidation(url) {
223
+ if (process.env.NODE_ENV === "development") {
224
+ if (url !== null && typeof url === "object") {
225
+ Object.keys(url).forEach((key) => {
226
+ if (!urlObjectKeys.includes(key)) {
227
+ console.warn("Unknown key passed via urlObject into url.format: " + key);
228
+ }
229
+ });
230
+ }
231
+ }
232
+ return formatUrl(url);
233
+ }
234
+ }
235
+ });
236
+
237
+ // ../../node_modules/next/dist/shared/lib/router/utils/omit.js
238
+ var require_omit = __commonJS({
239
+ "../../node_modules/next/dist/shared/lib/router/utils/omit.js"(exports) {
240
+ "use strict";
241
+ Object.defineProperty(exports, "__esModule", {
242
+ value: true
243
+ });
244
+ Object.defineProperty(exports, "omit", {
245
+ enumerable: true,
246
+ get: function() {
247
+ return omit;
248
+ }
249
+ });
250
+ function omit(object, keys2) {
251
+ const omitted = {};
252
+ Object.keys(object).forEach((key) => {
253
+ if (!keys2.includes(key)) {
254
+ omitted[key] = object[key];
255
+ }
256
+ });
257
+ return omitted;
258
+ }
259
+ }
260
+ });
261
+
262
+ // ../../node_modules/next/dist/shared/lib/utils.js
263
+ var require_utils = __commonJS({
264
+ "../../node_modules/next/dist/shared/lib/utils.js"(exports) {
265
+ "use strict";
266
+ Object.defineProperty(exports, "__esModule", {
267
+ value: true
268
+ });
269
+ function _export(target, all) {
270
+ for (var name in all) Object.defineProperty(target, name, {
271
+ enumerable: true,
272
+ get: all[name]
273
+ });
274
+ }
275
+ _export(exports, {
276
+ DecodeError: function() {
277
+ return DecodeError;
278
+ },
279
+ MiddlewareNotFoundError: function() {
280
+ return MiddlewareNotFoundError;
281
+ },
282
+ MissingStaticPage: function() {
283
+ return MissingStaticPage;
284
+ },
285
+ NormalizeError: function() {
286
+ return NormalizeError;
287
+ },
288
+ PageNotFoundError: function() {
289
+ return PageNotFoundError;
290
+ },
291
+ SP: function() {
292
+ return SP;
293
+ },
294
+ ST: function() {
295
+ return ST;
296
+ },
297
+ WEB_VITALS: function() {
298
+ return WEB_VITALS;
299
+ },
300
+ execOnce: function() {
301
+ return execOnce;
302
+ },
303
+ getDisplayName: function() {
304
+ return getDisplayName;
305
+ },
306
+ getLocationOrigin: function() {
307
+ return getLocationOrigin;
308
+ },
309
+ getURL: function() {
310
+ return getURL;
311
+ },
312
+ isAbsoluteUrl: function() {
313
+ return isAbsoluteUrl;
314
+ },
315
+ isResSent: function() {
316
+ return isResSent;
317
+ },
318
+ loadGetInitialProps: function() {
319
+ return loadGetInitialProps;
320
+ },
321
+ normalizeRepeatedSlashes: function() {
322
+ return normalizeRepeatedSlashes;
323
+ },
324
+ stringifyError: function() {
325
+ return stringifyError;
326
+ }
327
+ });
328
+ var WEB_VITALS = [
329
+ "CLS",
330
+ "FCP",
331
+ "FID",
332
+ "INP",
333
+ "LCP",
334
+ "TTFB"
335
+ ];
336
+ function execOnce(fn) {
337
+ let used = false;
338
+ let result;
339
+ return function() {
340
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
341
+ args[_key] = arguments[_key];
342
+ }
343
+ if (!used) {
344
+ used = true;
345
+ result = fn(...args);
346
+ }
347
+ return result;
348
+ };
349
+ }
350
+ var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
351
+ var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
352
+ function getLocationOrigin() {
353
+ const { protocol, hostname, port } = window.location;
354
+ return protocol + "//" + hostname + (port ? ":" + port : "");
355
+ }
356
+ function getURL() {
357
+ const { href } = window.location;
358
+ const origin = getLocationOrigin();
359
+ return href.substring(origin.length);
360
+ }
361
+ function getDisplayName(Component) {
362
+ return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
363
+ }
364
+ function isResSent(res) {
365
+ return res.finished || res.headersSent;
366
+ }
367
+ function normalizeRepeatedSlashes(url) {
368
+ const urlParts = url.split("?");
369
+ const urlNoQuery = urlParts[0];
370
+ return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? "?" + urlParts.slice(1).join("?") : "");
371
+ }
372
+ async function loadGetInitialProps(App, ctx) {
373
+ if (process.env.NODE_ENV !== "production") {
374
+ var _App_prototype;
375
+ if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) {
376
+ 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.';
377
+ throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
378
+ value: "E394",
379
+ enumerable: false,
380
+ configurable: true
381
+ });
382
+ }
383
+ }
384
+ const res = ctx.res || ctx.ctx && ctx.ctx.res;
385
+ if (!App.getInitialProps) {
386
+ if (ctx.ctx && ctx.Component) {
387
+ return {
388
+ pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
389
+ };
390
+ }
391
+ return {};
392
+ }
393
+ const props = await App.getInitialProps(ctx);
394
+ if (res && isResSent(res)) {
395
+ return props;
396
+ }
397
+ if (!props) {
398
+ const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.';
399
+ throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
400
+ value: "E394",
401
+ enumerable: false,
402
+ configurable: true
403
+ });
404
+ }
405
+ if (process.env.NODE_ENV !== "production") {
406
+ if (Object.keys(props).length === 0 && !ctx.ctx) {
407
+ 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");
408
+ }
409
+ }
410
+ return props;
411
+ }
412
+ var SP = typeof performance !== "undefined";
413
+ var ST = SP && [
414
+ "mark",
415
+ "measure",
416
+ "getEntriesByName"
417
+ ].every((method) => typeof performance[method] === "function");
418
+ var DecodeError = class extends Error {
419
+ };
420
+ var NormalizeError = class extends Error {
421
+ };
422
+ var PageNotFoundError = class extends Error {
423
+ constructor(page) {
424
+ super();
425
+ this.code = "ENOENT";
426
+ this.name = "PageNotFoundError";
427
+ this.message = "Cannot find module for page: " + page;
428
+ }
429
+ };
430
+ var MissingStaticPage = class extends Error {
431
+ constructor(page, message) {
432
+ super();
433
+ this.message = "Failed to load static file for page: " + page + " " + message;
434
+ }
435
+ };
436
+ var MiddlewareNotFoundError = class extends Error {
437
+ constructor() {
438
+ super();
439
+ this.code = "ENOENT";
440
+ this.message = "Cannot find the middleware module";
441
+ }
442
+ };
443
+ function stringifyError(error) {
444
+ return JSON.stringify({
445
+ message: error.message,
446
+ stack: error.stack
447
+ });
448
+ }
449
+ }
450
+ });
451
+
452
+ // ../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
453
+ var require_remove_trailing_slash = __commonJS({
454
+ "../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports) {
455
+ "use strict";
456
+ Object.defineProperty(exports, "__esModule", {
457
+ value: true
458
+ });
459
+ Object.defineProperty(exports, "removeTrailingSlash", {
460
+ enumerable: true,
461
+ get: function() {
462
+ return removeTrailingSlash;
463
+ }
464
+ });
465
+ function removeTrailingSlash(route) {
466
+ return route.replace(/\/$/, "") || "/";
467
+ }
468
+ }
469
+ });
470
+
471
+ // ../../node_modules/next/dist/shared/lib/router/utils/parse-path.js
472
+ var require_parse_path = __commonJS({
473
+ "../../node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports) {
474
+ "use strict";
475
+ Object.defineProperty(exports, "__esModule", {
476
+ value: true
477
+ });
478
+ Object.defineProperty(exports, "parsePath", {
479
+ enumerable: true,
480
+ get: function() {
481
+ return parsePath;
482
+ }
483
+ });
484
+ function parsePath(path) {
485
+ const hashIndex = path.indexOf("#");
486
+ const queryIndex = path.indexOf("?");
487
+ const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
488
+ if (hasQuery || hashIndex > -1) {
489
+ return {
490
+ pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
491
+ query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
492
+ hash: hashIndex > -1 ? path.slice(hashIndex) : ""
493
+ };
494
+ }
495
+ return {
496
+ pathname: path,
497
+ query: "",
498
+ hash: ""
499
+ };
500
+ }
501
+ }
502
+ });
503
+
504
+ // ../../node_modules/next/dist/client/normalize-trailing-slash.js
505
+ var require_normalize_trailing_slash = __commonJS({
506
+ "../../node_modules/next/dist/client/normalize-trailing-slash.js"(exports, module) {
507
+ "use strict";
508
+ Object.defineProperty(exports, "__esModule", {
509
+ value: true
510
+ });
511
+ Object.defineProperty(exports, "normalizePathTrailingSlash", {
512
+ enumerable: true,
513
+ get: function() {
514
+ return normalizePathTrailingSlash;
515
+ }
516
+ });
517
+ var _removetrailingslash = require_remove_trailing_slash();
518
+ var _parsepath = require_parse_path();
519
+ var normalizePathTrailingSlash = (path) => {
520
+ if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
521
+ return path;
522
+ }
523
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
524
+ if (process.env.__NEXT_TRAILING_SLASH) {
525
+ if (/\.[^/]+\/?$/.test(pathname)) {
526
+ return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
527
+ } else if (pathname.endsWith("/")) {
528
+ return "" + pathname + query + hash;
529
+ } else {
530
+ return pathname + "/" + query + hash;
531
+ }
532
+ }
533
+ return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
534
+ };
535
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
536
+ Object.defineProperty(exports.default, "__esModule", { value: true });
537
+ Object.assign(exports.default, exports);
538
+ module.exports = exports.default;
539
+ }
540
+ }
541
+ });
542
+
543
+ // ../../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
544
+ var require_path_has_prefix = __commonJS({
545
+ "../../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports) {
546
+ "use strict";
547
+ Object.defineProperty(exports, "__esModule", {
548
+ value: true
549
+ });
550
+ Object.defineProperty(exports, "pathHasPrefix", {
551
+ enumerable: true,
552
+ get: function() {
553
+ return pathHasPrefix;
554
+ }
555
+ });
556
+ var _parsepath = require_parse_path();
557
+ function pathHasPrefix(path, prefix) {
558
+ if (typeof path !== "string") {
559
+ return false;
560
+ }
561
+ const { pathname } = (0, _parsepath.parsePath)(path);
562
+ return pathname === prefix || pathname.startsWith(prefix + "/");
563
+ }
564
+ }
565
+ });
566
+
567
+ // ../../node_modules/next/dist/client/has-base-path.js
568
+ var require_has_base_path = __commonJS({
569
+ "../../node_modules/next/dist/client/has-base-path.js"(exports, module) {
570
+ "use strict";
571
+ Object.defineProperty(exports, "__esModule", {
572
+ value: true
573
+ });
574
+ Object.defineProperty(exports, "hasBasePath", {
575
+ enumerable: true,
576
+ get: function() {
577
+ return hasBasePath;
578
+ }
579
+ });
580
+ var _pathhasprefix = require_path_has_prefix();
581
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
582
+ function hasBasePath(path) {
583
+ return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
584
+ }
585
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
586
+ Object.defineProperty(exports.default, "__esModule", { value: true });
587
+ Object.assign(exports.default, exports);
588
+ module.exports = exports.default;
589
+ }
590
+ }
591
+ });
592
+
593
+ // ../../node_modules/next/dist/shared/lib/router/utils/is-local-url.js
594
+ var require_is_local_url = __commonJS({
595
+ "../../node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports) {
596
+ "use strict";
597
+ Object.defineProperty(exports, "__esModule", {
598
+ value: true
599
+ });
600
+ Object.defineProperty(exports, "isLocalURL", {
601
+ enumerable: true,
602
+ get: function() {
603
+ return isLocalURL;
604
+ }
605
+ });
606
+ var _utils = require_utils();
607
+ var _hasbasepath = require_has_base_path();
608
+ function isLocalURL(url) {
609
+ if (!(0, _utils.isAbsoluteUrl)(url)) return true;
610
+ try {
611
+ const locationOrigin = (0, _utils.getLocationOrigin)();
612
+ const resolved = new URL(url, locationOrigin);
613
+ return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
614
+ } catch (_) {
615
+ return false;
616
+ }
617
+ }
618
+ }
619
+ });
620
+
621
+ // ../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
622
+ var require_sorted_routes = __commonJS({
623
+ "../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports) {
624
+ "use strict";
625
+ Object.defineProperty(exports, "__esModule", {
626
+ value: true
627
+ });
628
+ function _export(target, all) {
629
+ for (var name in all) Object.defineProperty(target, name, {
630
+ enumerable: true,
631
+ get: all[name]
632
+ });
633
+ }
634
+ _export(exports, {
635
+ getSortedRouteObjects: function() {
636
+ return getSortedRouteObjects;
637
+ },
638
+ getSortedRoutes: function() {
639
+ return getSortedRoutes;
640
+ }
641
+ });
642
+ var UrlNode = class _UrlNode {
643
+ insert(urlPath) {
644
+ this._insert(urlPath.split("/").filter(Boolean), [], false);
645
+ }
646
+ smoosh() {
647
+ return this._smoosh();
648
+ }
649
+ _smoosh(prefix) {
650
+ if (prefix === void 0) prefix = "/";
651
+ const childrenPaths = [
652
+ ...this.children.keys()
653
+ ].sort();
654
+ if (this.slugName !== null) {
655
+ childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
656
+ }
657
+ if (this.restSlugName !== null) {
658
+ childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
659
+ }
660
+ if (this.optionalRestSlugName !== null) {
661
+ childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
662
+ }
663
+ const routes = childrenPaths.map((c) => this.children.get(c)._smoosh("" + prefix + c + "/")).reduce((prev, curr) => [
664
+ ...prev,
665
+ ...curr
666
+ ], []);
667
+ if (this.slugName !== null) {
668
+ routes.push(...this.children.get("[]")._smoosh(prefix + "[" + this.slugName + "]/"));
669
+ }
670
+ if (!this.placeholder) {
671
+ const r = prefix === "/" ? "/" : prefix.slice(0, -1);
672
+ if (this.optionalRestSlugName != null) {
673
+ 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", {
674
+ value: "E458",
675
+ enumerable: false,
676
+ configurable: true
677
+ });
678
+ }
679
+ routes.unshift(r);
680
+ }
681
+ if (this.restSlugName !== null) {
682
+ routes.push(...this.children.get("[...]")._smoosh(prefix + "[..." + this.restSlugName + "]/"));
683
+ }
684
+ if (this.optionalRestSlugName !== null) {
685
+ routes.push(...this.children.get("[[...]]")._smoosh(prefix + "[[..." + this.optionalRestSlugName + "]]/"));
686
+ }
687
+ return routes;
688
+ }
689
+ _insert(urlPaths, slugNames, isCatchAll) {
690
+ if (urlPaths.length === 0) {
691
+ this.placeholder = false;
692
+ return;
693
+ }
694
+ if (isCatchAll) {
695
+ throw Object.defineProperty(new Error("Catch-all must be the last part of the URL."), "__NEXT_ERROR_CODE", {
696
+ value: "E392",
697
+ enumerable: false,
698
+ configurable: true
699
+ });
700
+ }
701
+ let nextSegment = urlPaths[0];
702
+ if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
703
+ let handleSlug = function(previousSlug, nextSlug) {
704
+ if (previousSlug !== null) {
705
+ if (previousSlug !== nextSlug) {
706
+ throw Object.defineProperty(new Error("You cannot use different slug names for the same dynamic path ('" + previousSlug + "' !== '" + nextSlug + "')."), "__NEXT_ERROR_CODE", {
707
+ value: "E337",
708
+ enumerable: false,
709
+ configurable: true
710
+ });
711
+ }
712
+ }
713
+ slugNames.forEach((slug) => {
714
+ if (slug === nextSlug) {
715
+ throw Object.defineProperty(new Error('You cannot have the same slug name "' + nextSlug + '" repeat within a single dynamic path'), "__NEXT_ERROR_CODE", {
716
+ value: "E247",
717
+ enumerable: false,
718
+ configurable: true
719
+ });
720
+ }
721
+ if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
722
+ 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", {
723
+ value: "E499",
724
+ enumerable: false,
725
+ configurable: true
726
+ });
727
+ }
728
+ });
729
+ slugNames.push(nextSlug);
730
+ };
731
+ let segmentName = nextSegment.slice(1, -1);
732
+ let isOptional = false;
733
+ if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
734
+ segmentName = segmentName.slice(1, -1);
735
+ isOptional = true;
736
+ }
737
+ if (segmentName.startsWith("\u2026")) {
738
+ throw Object.defineProperty(new Error("Detected a three-dot character ('\u2026') at ('" + segmentName + "'). Did you mean ('...')?"), "__NEXT_ERROR_CODE", {
739
+ value: "E147",
740
+ enumerable: false,
741
+ configurable: true
742
+ });
743
+ }
744
+ if (segmentName.startsWith("...")) {
745
+ segmentName = segmentName.substring(3);
746
+ isCatchAll = true;
747
+ }
748
+ if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
749
+ throw Object.defineProperty(new Error("Segment names may not start or end with extra brackets ('" + segmentName + "')."), "__NEXT_ERROR_CODE", {
750
+ value: "E421",
751
+ enumerable: false,
752
+ configurable: true
753
+ });
754
+ }
755
+ if (segmentName.startsWith(".")) {
756
+ throw Object.defineProperty(new Error("Segment names may not start with erroneous periods ('" + segmentName + "')."), "__NEXT_ERROR_CODE", {
757
+ value: "E288",
758
+ enumerable: false,
759
+ configurable: true
760
+ });
761
+ }
762
+ if (isCatchAll) {
763
+ if (isOptional) {
764
+ if (this.restSlugName != null) {
765
+ 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", {
766
+ value: "E299",
767
+ enumerable: false,
768
+ configurable: true
769
+ });
770
+ }
771
+ handleSlug(this.optionalRestSlugName, segmentName);
772
+ this.optionalRestSlugName = segmentName;
773
+ nextSegment = "[[...]]";
774
+ } else {
775
+ if (this.optionalRestSlugName != null) {
776
+ 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", {
777
+ value: "E300",
778
+ enumerable: false,
779
+ configurable: true
780
+ });
781
+ }
782
+ handleSlug(this.restSlugName, segmentName);
783
+ this.restSlugName = segmentName;
784
+ nextSegment = "[...]";
785
+ }
786
+ } else {
787
+ if (isOptional) {
788
+ throw Object.defineProperty(new Error('Optional route parameters are not yet supported ("' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", {
789
+ value: "E435",
790
+ enumerable: false,
791
+ configurable: true
792
+ });
793
+ }
794
+ handleSlug(this.slugName, segmentName);
795
+ this.slugName = segmentName;
796
+ nextSegment = "[]";
797
+ }
798
+ }
799
+ if (!this.children.has(nextSegment)) {
800
+ this.children.set(nextSegment, new _UrlNode());
801
+ }
802
+ this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
803
+ }
804
+ constructor() {
805
+ this.placeholder = true;
806
+ this.children = /* @__PURE__ */ new Map();
807
+ this.slugName = null;
808
+ this.restSlugName = null;
809
+ this.optionalRestSlugName = null;
810
+ }
811
+ };
812
+ function getSortedRoutes(normalizedPages) {
813
+ const root = new UrlNode();
814
+ normalizedPages.forEach((pagePath) => root.insert(pagePath));
815
+ return root.smoosh();
816
+ }
817
+ function getSortedRouteObjects(objects, getter) {
818
+ const indexes = {};
819
+ const pathnames = [];
820
+ for (let i = 0; i < objects.length; i++) {
821
+ const pathname = getter(objects[i]);
822
+ indexes[pathname] = i;
823
+ pathnames[i] = pathname;
824
+ }
825
+ const sorted = getSortedRoutes(pathnames);
826
+ return sorted.map((pathname) => objects[indexes[pathname]]);
827
+ }
828
+ }
829
+ });
830
+
831
+ // ../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
832
+ var require_ensure_leading_slash = __commonJS({
833
+ "../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports) {
834
+ "use strict";
835
+ Object.defineProperty(exports, "__esModule", {
836
+ value: true
837
+ });
838
+ Object.defineProperty(exports, "ensureLeadingSlash", {
839
+ enumerable: true,
840
+ get: function() {
841
+ return ensureLeadingSlash;
842
+ }
843
+ });
844
+ function ensureLeadingSlash(path) {
845
+ return path.startsWith("/") ? path : "/" + path;
846
+ }
847
+ }
848
+ });
849
+
850
+ // ../../node_modules/next/dist/shared/lib/segment.js
851
+ var require_segment = __commonJS({
852
+ "../../node_modules/next/dist/shared/lib/segment.js"(exports) {
853
+ "use strict";
854
+ Object.defineProperty(exports, "__esModule", {
855
+ value: true
856
+ });
857
+ function _export(target, all) {
858
+ for (var name in all) Object.defineProperty(target, name, {
859
+ enumerable: true,
860
+ get: all[name]
861
+ });
862
+ }
863
+ _export(exports, {
864
+ DEFAULT_SEGMENT_KEY: function() {
865
+ return DEFAULT_SEGMENT_KEY;
866
+ },
867
+ PAGE_SEGMENT_KEY: function() {
868
+ return PAGE_SEGMENT_KEY;
869
+ },
870
+ addSearchParamsIfPageSegment: function() {
871
+ return addSearchParamsIfPageSegment;
872
+ },
873
+ isGroupSegment: function() {
874
+ return isGroupSegment;
875
+ },
876
+ isParallelRouteSegment: function() {
877
+ return isParallelRouteSegment;
878
+ }
879
+ });
880
+ function isGroupSegment(segment) {
881
+ return segment[0] === "(" && segment.endsWith(")");
882
+ }
883
+ function isParallelRouteSegment(segment) {
884
+ return segment.startsWith("@") && segment !== "@children";
885
+ }
886
+ function addSearchParamsIfPageSegment(segment, searchParams) {
887
+ const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
888
+ if (isPageSegment) {
889
+ const stringifiedQuery = JSON.stringify(searchParams);
890
+ return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
891
+ }
892
+ return segment;
893
+ }
894
+ var PAGE_SEGMENT_KEY = "__PAGE__";
895
+ var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
896
+ }
897
+ });
898
+
899
+ // ../../node_modules/next/dist/shared/lib/router/utils/app-paths.js
900
+ var require_app_paths = __commonJS({
901
+ "../../node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports) {
902
+ "use strict";
903
+ Object.defineProperty(exports, "__esModule", {
904
+ value: true
905
+ });
906
+ function _export(target, all) {
907
+ for (var name in all) Object.defineProperty(target, name, {
908
+ enumerable: true,
909
+ get: all[name]
910
+ });
911
+ }
912
+ _export(exports, {
913
+ normalizeAppPath: function() {
914
+ return normalizeAppPath;
915
+ },
916
+ normalizeRscURL: function() {
917
+ return normalizeRscURL;
918
+ }
919
+ });
920
+ var _ensureleadingslash = require_ensure_leading_slash();
921
+ var _segment = require_segment();
922
+ function normalizeAppPath(route) {
923
+ return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
924
+ if (!segment) {
925
+ return pathname;
926
+ }
927
+ if ((0, _segment.isGroupSegment)(segment)) {
928
+ return pathname;
929
+ }
930
+ if (segment[0] === "@") {
931
+ return pathname;
932
+ }
933
+ if ((segment === "page" || segment === "route") && index === segments.length - 1) {
934
+ return pathname;
935
+ }
936
+ return pathname + "/" + segment;
937
+ }, ""));
938
+ }
939
+ function normalizeRscURL(url) {
940
+ return url.replace(
941
+ /\.rsc($|\?)/,
942
+ // $1 ensures `?` is preserved
943
+ "$1"
944
+ );
945
+ }
946
+ }
947
+ });
948
+
949
+ // ../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js
950
+ var require_interception_routes = __commonJS({
951
+ "../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports) {
952
+ "use strict";
953
+ Object.defineProperty(exports, "__esModule", {
954
+ value: true
955
+ });
956
+ function _export(target, all) {
957
+ for (var name in all) Object.defineProperty(target, name, {
958
+ enumerable: true,
959
+ get: all[name]
960
+ });
961
+ }
962
+ _export(exports, {
963
+ INTERCEPTION_ROUTE_MARKERS: function() {
964
+ return INTERCEPTION_ROUTE_MARKERS;
965
+ },
966
+ extractInterceptionRouteInformation: function() {
967
+ return extractInterceptionRouteInformation;
968
+ },
969
+ isInterceptionRouteAppPath: function() {
970
+ return isInterceptionRouteAppPath;
971
+ }
972
+ });
973
+ var _apppaths = require_app_paths();
974
+ var INTERCEPTION_ROUTE_MARKERS = [
975
+ "(..)(..)",
976
+ "(.)",
977
+ "(..)",
978
+ "(...)"
979
+ ];
980
+ function isInterceptionRouteAppPath(path) {
981
+ return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
982
+ }
983
+ function extractInterceptionRouteInformation(path) {
984
+ let interceptingRoute, marker, interceptedRoute;
985
+ for (const segment of path.split("/")) {
986
+ marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
987
+ if (marker) {
988
+ ;
989
+ [interceptingRoute, interceptedRoute] = path.split(marker, 2);
990
+ break;
991
+ }
992
+ }
993
+ if (!interceptingRoute || !marker || !interceptedRoute) {
994
+ throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"), "__NEXT_ERROR_CODE", {
995
+ value: "E269",
996
+ enumerable: false,
997
+ configurable: true
998
+ });
999
+ }
1000
+ interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
1001
+ switch (marker) {
1002
+ case "(.)":
1003
+ if (interceptingRoute === "/") {
1004
+ interceptedRoute = "/" + interceptedRoute;
1005
+ } else {
1006
+ interceptedRoute = interceptingRoute + "/" + interceptedRoute;
1007
+ }
1008
+ break;
1009
+ case "(..)":
1010
+ if (interceptingRoute === "/") {
1011
+ throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..) marker at the root level, use (.) instead."), "__NEXT_ERROR_CODE", {
1012
+ value: "E207",
1013
+ enumerable: false,
1014
+ configurable: true
1015
+ });
1016
+ }
1017
+ interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
1018
+ break;
1019
+ case "(...)":
1020
+ interceptedRoute = "/" + interceptedRoute;
1021
+ break;
1022
+ case "(..)(..)":
1023
+ const splitInterceptingRoute = interceptingRoute.split("/");
1024
+ if (splitInterceptingRoute.length <= 2) {
1025
+ throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..)(..) marker at the root level or one level up."), "__NEXT_ERROR_CODE", {
1026
+ value: "E486",
1027
+ enumerable: false,
1028
+ configurable: true
1029
+ });
1030
+ }
1031
+ interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
1032
+ break;
1033
+ default:
1034
+ throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
1035
+ value: "E112",
1036
+ enumerable: false,
1037
+ configurable: true
1038
+ });
1039
+ }
1040
+ return {
1041
+ interceptingRoute,
1042
+ interceptedRoute
1043
+ };
1044
+ }
1045
+ }
1046
+ });
1047
+
1048
+ // ../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
1049
+ var require_is_dynamic = __commonJS({
1050
+ "../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports) {
1051
+ "use strict";
1052
+ Object.defineProperty(exports, "__esModule", {
1053
+ value: true
1054
+ });
1055
+ Object.defineProperty(exports, "isDynamicRoute", {
1056
+ enumerable: true,
1057
+ get: function() {
1058
+ return isDynamicRoute;
1059
+ }
1060
+ });
1061
+ var _interceptionroutes = require_interception_routes();
1062
+ var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
1063
+ var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
1064
+ function isDynamicRoute(route, strict) {
1065
+ if (strict === void 0) strict = true;
1066
+ if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
1067
+ route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
1068
+ }
1069
+ if (strict) {
1070
+ return TEST_STRICT_ROUTE.test(route);
1071
+ }
1072
+ return TEST_ROUTE.test(route);
1073
+ }
1074
+ }
1075
+ });
1076
+
1077
+ // ../../node_modules/next/dist/shared/lib/router/utils/index.js
1078
+ var require_utils2 = __commonJS({
1079
+ "../../node_modules/next/dist/shared/lib/router/utils/index.js"(exports) {
1080
+ "use strict";
1081
+ Object.defineProperty(exports, "__esModule", {
1082
+ value: true
1083
+ });
1084
+ function _export(target, all) {
1085
+ for (var name in all) Object.defineProperty(target, name, {
1086
+ enumerable: true,
1087
+ get: all[name]
1088
+ });
1089
+ }
1090
+ _export(exports, {
1091
+ getSortedRouteObjects: function() {
1092
+ return _sortedroutes.getSortedRouteObjects;
1093
+ },
1094
+ getSortedRoutes: function() {
1095
+ return _sortedroutes.getSortedRoutes;
1096
+ },
1097
+ isDynamicRoute: function() {
1098
+ return _isdynamic.isDynamicRoute;
1099
+ }
1100
+ });
1101
+ var _sortedroutes = require_sorted_routes();
1102
+ var _isdynamic = require_is_dynamic();
1103
+ }
1104
+ });
1105
+
1106
+ // ../../node_modules/next/dist/compiled/path-to-regexp/index.js
1107
+ var require_path_to_regexp = __commonJS({
1108
+ "../../node_modules/next/dist/compiled/path-to-regexp/index.js"(exports, module) {
1109
+ "use strict";
1110
+ (() => {
1111
+ "use strict";
1112
+ if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
1113
+ var e = {};
1114
+ (() => {
1115
+ var n = e;
1116
+ Object.defineProperty(n, "__esModule", { value: true });
1117
+ n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = void 0;
1118
+ function lexer(e2) {
1119
+ var n2 = [];
1120
+ var r = 0;
1121
+ while (r < e2.length) {
1122
+ var t = e2[r];
1123
+ if (t === "*" || t === "+" || t === "?") {
1124
+ n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
1125
+ continue;
1126
+ }
1127
+ if (t === "\\") {
1128
+ n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
1129
+ continue;
1130
+ }
1131
+ if (t === "{") {
1132
+ n2.push({ type: "OPEN", index: r, value: e2[r++] });
1133
+ continue;
1134
+ }
1135
+ if (t === "}") {
1136
+ n2.push({ type: "CLOSE", index: r, value: e2[r++] });
1137
+ continue;
1138
+ }
1139
+ if (t === ":") {
1140
+ var a = "";
1141
+ var i = r + 1;
1142
+ while (i < e2.length) {
1143
+ var o = e2.charCodeAt(i);
1144
+ if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
1145
+ a += e2[i++];
1146
+ continue;
1147
+ }
1148
+ break;
1149
+ }
1150
+ if (!a) throw new TypeError("Missing parameter name at ".concat(r));
1151
+ n2.push({ type: "NAME", index: r, value: a });
1152
+ r = i;
1153
+ continue;
1154
+ }
1155
+ if (t === "(") {
1156
+ var c = 1;
1157
+ var f = "";
1158
+ var i = r + 1;
1159
+ if (e2[i] === "?") {
1160
+ throw new TypeError('Pattern cannot start with "?" at '.concat(i));
1161
+ }
1162
+ while (i < e2.length) {
1163
+ if (e2[i] === "\\") {
1164
+ f += e2[i++] + e2[i++];
1165
+ continue;
1166
+ }
1167
+ if (e2[i] === ")") {
1168
+ c--;
1169
+ if (c === 0) {
1170
+ i++;
1171
+ break;
1172
+ }
1173
+ } else if (e2[i] === "(") {
1174
+ c++;
1175
+ if (e2[i + 1] !== "?") {
1176
+ throw new TypeError("Capturing groups are not allowed at ".concat(i));
1177
+ }
1178
+ }
1179
+ f += e2[i++];
1180
+ }
1181
+ if (c) throw new TypeError("Unbalanced pattern at ".concat(r));
1182
+ if (!f) throw new TypeError("Missing pattern at ".concat(r));
1183
+ n2.push({ type: "PATTERN", index: r, value: f });
1184
+ r = i;
1185
+ continue;
1186
+ }
1187
+ n2.push({ type: "CHAR", index: r, value: e2[r++] });
1188
+ }
1189
+ n2.push({ type: "END", index: r, value: "" });
1190
+ return n2;
1191
+ }
1192
+ function parse(e2, n2) {
1193
+ if (n2 === void 0) {
1194
+ n2 = {};
1195
+ }
1196
+ var r = lexer(e2);
1197
+ var t = n2.prefixes, a = t === void 0 ? "./" : t, i = n2.delimiter, o = i === void 0 ? "/#?" : i;
1198
+ var c = [];
1199
+ var f = 0;
1200
+ var u = 0;
1201
+ var p = "";
1202
+ var tryConsume = function(e3) {
1203
+ if (u < r.length && r[u].type === e3) return r[u++].value;
1204
+ };
1205
+ var mustConsume = function(e3) {
1206
+ var n3 = tryConsume(e3);
1207
+ if (n3 !== void 0) return n3;
1208
+ var t2 = r[u], a2 = t2.type, i2 = t2.index;
1209
+ throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
1210
+ };
1211
+ var consumeText = function() {
1212
+ var e3 = "";
1213
+ var n3;
1214
+ while (n3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
1215
+ e3 += n3;
1216
+ }
1217
+ return e3;
1218
+ };
1219
+ var isSafe = function(e3) {
1220
+ for (var n3 = 0, r2 = o; n3 < r2.length; n3++) {
1221
+ var t2 = r2[n3];
1222
+ if (e3.indexOf(t2) > -1) return true;
1223
+ }
1224
+ return false;
1225
+ };
1226
+ var safePattern = function(e3) {
1227
+ var n3 = c[c.length - 1];
1228
+ var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
1229
+ if (n3 && !r2) {
1230
+ throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
1231
+ }
1232
+ if (!r2 || isSafe(r2)) return "[^".concat(escapeString(o), "]+?");
1233
+ return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
1234
+ };
1235
+ while (u < r.length) {
1236
+ var v = tryConsume("CHAR");
1237
+ var s = tryConsume("NAME");
1238
+ var d = tryConsume("PATTERN");
1239
+ if (s || d) {
1240
+ var g = v || "";
1241
+ if (a.indexOf(g) === -1) {
1242
+ p += g;
1243
+ g = "";
1244
+ }
1245
+ if (p) {
1246
+ c.push(p);
1247
+ p = "";
1248
+ }
1249
+ c.push({ name: s || f++, prefix: g, suffix: "", pattern: d || safePattern(g), modifier: tryConsume("MODIFIER") || "" });
1250
+ continue;
1251
+ }
1252
+ var x = v || tryConsume("ESCAPED_CHAR");
1253
+ if (x) {
1254
+ p += x;
1255
+ continue;
1256
+ }
1257
+ if (p) {
1258
+ c.push(p);
1259
+ p = "";
1260
+ }
1261
+ var h = tryConsume("OPEN");
1262
+ if (h) {
1263
+ var g = consumeText();
1264
+ var l = tryConsume("NAME") || "";
1265
+ var m = tryConsume("PATTERN") || "";
1266
+ var T = consumeText();
1267
+ mustConsume("CLOSE");
1268
+ c.push({ name: l || (m ? f++ : ""), pattern: l && !m ? safePattern(g) : m, prefix: g, suffix: T, modifier: tryConsume("MODIFIER") || "" });
1269
+ continue;
1270
+ }
1271
+ mustConsume("END");
1272
+ }
1273
+ return c;
1274
+ }
1275
+ n.parse = parse;
1276
+ function compile(e2, n2) {
1277
+ return tokensToFunction(parse(e2, n2), n2);
1278
+ }
1279
+ n.compile = compile;
1280
+ function tokensToFunction(e2, n2) {
1281
+ if (n2 === void 0) {
1282
+ n2 = {};
1283
+ }
1284
+ var r = flags(n2);
1285
+ var t = n2.encode, a = t === void 0 ? function(e3) {
1286
+ return e3;
1287
+ } : t, i = n2.validate, o = i === void 0 ? true : i;
1288
+ var c = e2.map(function(e3) {
1289
+ if (typeof e3 === "object") {
1290
+ return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
1291
+ }
1292
+ });
1293
+ return function(n3) {
1294
+ var r2 = "";
1295
+ for (var t2 = 0; t2 < e2.length; t2++) {
1296
+ var i2 = e2[t2];
1297
+ if (typeof i2 === "string") {
1298
+ r2 += i2;
1299
+ continue;
1300
+ }
1301
+ var f = n3 ? n3[i2.name] : void 0;
1302
+ var u = i2.modifier === "?" || i2.modifier === "*";
1303
+ var p = i2.modifier === "*" || i2.modifier === "+";
1304
+ if (Array.isArray(f)) {
1305
+ if (!p) {
1306
+ throw new TypeError('Expected "'.concat(i2.name, '" to not repeat, but got an array'));
1307
+ }
1308
+ if (f.length === 0) {
1309
+ if (u) continue;
1310
+ throw new TypeError('Expected "'.concat(i2.name, '" to not be empty'));
1311
+ }
1312
+ for (var v = 0; v < f.length; v++) {
1313
+ var s = a(f[v], i2);
1314
+ if (o && !c[t2].test(s)) {
1315
+ throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1316
+ }
1317
+ r2 += i2.prefix + s + i2.suffix;
1318
+ }
1319
+ continue;
1320
+ }
1321
+ if (typeof f === "string" || typeof f === "number") {
1322
+ var s = a(String(f), i2);
1323
+ if (o && !c[t2].test(s)) {
1324
+ throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1325
+ }
1326
+ r2 += i2.prefix + s + i2.suffix;
1327
+ continue;
1328
+ }
1329
+ if (u) continue;
1330
+ var d = p ? "an array" : "a string";
1331
+ throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
1332
+ }
1333
+ return r2;
1334
+ };
1335
+ }
1336
+ n.tokensToFunction = tokensToFunction;
1337
+ function match(e2, n2) {
1338
+ var r = [];
1339
+ var t = pathToRegexp(e2, r, n2);
1340
+ return regexpToFunction(t, r, n2);
1341
+ }
1342
+ n.match = match;
1343
+ function regexpToFunction(e2, n2, r) {
1344
+ if (r === void 0) {
1345
+ r = {};
1346
+ }
1347
+ var t = r.decode, a = t === void 0 ? function(e3) {
1348
+ return e3;
1349
+ } : t;
1350
+ return function(r2) {
1351
+ var t2 = e2.exec(r2);
1352
+ if (!t2) return false;
1353
+ var i = t2[0], o = t2.index;
1354
+ var c = /* @__PURE__ */ Object.create(null);
1355
+ var _loop_1 = function(e3) {
1356
+ if (t2[e3] === void 0) return "continue";
1357
+ var r3 = n2[e3 - 1];
1358
+ if (r3.modifier === "*" || r3.modifier === "+") {
1359
+ c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map(function(e4) {
1360
+ return a(e4, r3);
1361
+ });
1362
+ } else {
1363
+ c[r3.name] = a(t2[e3], r3);
1364
+ }
1365
+ };
1366
+ for (var f = 1; f < t2.length; f++) {
1367
+ _loop_1(f);
1368
+ }
1369
+ return { path: i, index: o, params: c };
1370
+ };
1371
+ }
1372
+ n.regexpToFunction = regexpToFunction;
1373
+ function escapeString(e2) {
1374
+ return e2.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
1375
+ }
1376
+ function flags(e2) {
1377
+ return e2 && e2.sensitive ? "" : "i";
1378
+ }
1379
+ function regexpToRegexp(e2, n2) {
1380
+ if (!n2) return e2;
1381
+ var r = /\((?:\?<(.*?)>)?(?!\?)/g;
1382
+ var t = 0;
1383
+ var a = r.exec(e2.source);
1384
+ while (a) {
1385
+ n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
1386
+ a = r.exec(e2.source);
1387
+ }
1388
+ return e2;
1389
+ }
1390
+ function arrayToRegexp(e2, n2, r) {
1391
+ var t = e2.map(function(e3) {
1392
+ return pathToRegexp(e3, n2, r).source;
1393
+ });
1394
+ return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
1395
+ }
1396
+ function stringToRegexp(e2, n2, r) {
1397
+ return tokensToRegexp(parse(e2, r), n2, r);
1398
+ }
1399
+ function tokensToRegexp(e2, n2, r) {
1400
+ if (r === void 0) {
1401
+ r = {};
1402
+ }
1403
+ 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) {
1404
+ return e3;
1405
+ } : u, v = r.delimiter, s = v === void 0 ? "/#?" : v, d = r.endsWith, g = d === void 0 ? "" : d;
1406
+ var x = "[".concat(escapeString(g), "]|$");
1407
+ var h = "[".concat(escapeString(s), "]");
1408
+ var l = o ? "^" : "";
1409
+ for (var m = 0, T = e2; m < T.length; m++) {
1410
+ var E = T[m];
1411
+ if (typeof E === "string") {
1412
+ l += escapeString(p(E));
1413
+ } else {
1414
+ var w = escapeString(p(E.prefix));
1415
+ var y = escapeString(p(E.suffix));
1416
+ if (E.pattern) {
1417
+ if (n2) n2.push(E);
1418
+ if (w || y) {
1419
+ if (E.modifier === "+" || E.modifier === "*") {
1420
+ var R = E.modifier === "*" ? "?" : "";
1421
+ l += "(?:".concat(w, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R);
1422
+ } else {
1423
+ l += "(?:".concat(w, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
1424
+ }
1425
+ } else {
1426
+ if (E.modifier === "+" || E.modifier === "*") {
1427
+ throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
1428
+ }
1429
+ l += "(".concat(E.pattern, ")").concat(E.modifier);
1430
+ }
1431
+ } else {
1432
+ l += "(?:".concat(w).concat(y, ")").concat(E.modifier);
1433
+ }
1434
+ }
1435
+ }
1436
+ if (f) {
1437
+ if (!a) l += "".concat(h, "?");
1438
+ l += !r.endsWith ? "$" : "(?=".concat(x, ")");
1439
+ } else {
1440
+ var A = e2[e2.length - 1];
1441
+ var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
1442
+ if (!a) {
1443
+ l += "(?:".concat(h, "(?=").concat(x, "))?");
1444
+ }
1445
+ if (!_) {
1446
+ l += "(?=".concat(h, "|").concat(x, ")");
1447
+ }
1448
+ }
1449
+ return new RegExp(l, flags(r));
1450
+ }
1451
+ n.tokensToRegexp = tokensToRegexp;
1452
+ function pathToRegexp(e2, n2, r) {
1453
+ if (e2 instanceof RegExp) return regexpToRegexp(e2, n2);
1454
+ if (Array.isArray(e2)) return arrayToRegexp(e2, n2, r);
1455
+ return stringToRegexp(e2, n2, r);
1456
+ }
1457
+ n.pathToRegexp = pathToRegexp;
1458
+ })();
1459
+ module.exports = e;
1460
+ })();
1461
+ }
1462
+ });
1463
+
1464
+ // ../../node_modules/next/dist/lib/route-pattern-normalizer.js
1465
+ var require_route_pattern_normalizer = __commonJS({
1466
+ "../../node_modules/next/dist/lib/route-pattern-normalizer.js"(exports) {
1467
+ "use strict";
1468
+ Object.defineProperty(exports, "__esModule", {
1469
+ value: true
1470
+ });
1471
+ function _export(target, all) {
1472
+ for (var name in all) Object.defineProperty(target, name, {
1473
+ enumerable: true,
1474
+ get: all[name]
1475
+ });
1476
+ }
1477
+ _export(exports, {
1478
+ hasAdjacentParameterIssues: function() {
1479
+ return hasAdjacentParameterIssues;
1480
+ },
1481
+ normalizeAdjacentParameters: function() {
1482
+ return normalizeAdjacentParameters;
1483
+ },
1484
+ normalizeTokensForRegexp: function() {
1485
+ return normalizeTokensForRegexp;
1486
+ },
1487
+ stripParameterSeparators: function() {
1488
+ return stripParameterSeparators;
1489
+ }
1490
+ });
1491
+ var PARAM_SEPARATOR = "_NEXTSEP_";
1492
+ function hasAdjacentParameterIssues(route) {
1493
+ if (typeof route !== "string") return false;
1494
+ if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
1495
+ return true;
1496
+ }
1497
+ if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
1498
+ return true;
1499
+ }
1500
+ return false;
1501
+ }
1502
+ function normalizeAdjacentParameters(route) {
1503
+ let normalized = route;
1504
+ normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
1505
+ normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
1506
+ return normalized;
1507
+ }
1508
+ function normalizeTokensForRegexp(tokens) {
1509
+ return tokens.map((token) => {
1510
+ if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
1511
+ "modifier" in token && // Only repeating modifiers (* or +) cause the validation error
1512
+ // Other modifiers like '?' (optional) are fine
1513
+ (token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
1514
+ "prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
1515
+ // This is what causes the validation error in path-to-regexp
1516
+ token.prefix === "" && token.suffix === "") {
1517
+ return {
1518
+ ...token,
1519
+ prefix: "/"
1520
+ };
1521
+ }
1522
+ return token;
1523
+ });
1524
+ }
1525
+ function stripParameterSeparators(params) {
1526
+ const cleaned = {};
1527
+ for (const [key, value] of Object.entries(params)) {
1528
+ if (typeof value === "string") {
1529
+ cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
1530
+ } else if (Array.isArray(value)) {
1531
+ cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
1532
+ } else {
1533
+ cleaned[key] = value;
1534
+ }
1535
+ }
1536
+ return cleaned;
1537
+ }
1538
+ }
1539
+ });
1540
+
1541
+ // ../../node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
1542
+ var require_route_match_utils = __commonJS({
1543
+ "../../node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports) {
1544
+ "use strict";
1545
+ Object.defineProperty(exports, "__esModule", {
1546
+ value: true
1547
+ });
1548
+ function _export(target, all) {
1549
+ for (var name in all) Object.defineProperty(target, name, {
1550
+ enumerable: true,
1551
+ get: all[name]
1552
+ });
1553
+ }
1554
+ _export(exports, {
1555
+ safeCompile: function() {
1556
+ return safeCompile;
1557
+ },
1558
+ safePathToRegexp: function() {
1559
+ return safePathToRegexp;
1560
+ },
1561
+ safeRegexpToFunction: function() {
1562
+ return safeRegexpToFunction;
1563
+ },
1564
+ safeRouteMatcher: function() {
1565
+ return safeRouteMatcher;
1566
+ }
1567
+ });
1568
+ var _pathtoregexp = require_path_to_regexp();
1569
+ var _routepatternnormalizer = require_route_pattern_normalizer();
1570
+ function safePathToRegexp(route, keys2, options) {
1571
+ if (typeof route !== "string") {
1572
+ return (0, _pathtoregexp.pathToRegexp)(route, keys2, options);
1573
+ }
1574
+ const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1575
+ const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1576
+ try {
1577
+ return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys2, options);
1578
+ } catch (error) {
1579
+ if (!needsNormalization) {
1580
+ try {
1581
+ const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1582
+ return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys2, options);
1583
+ } catch (retryError) {
1584
+ throw error;
1585
+ }
1586
+ }
1587
+ throw error;
1588
+ }
1589
+ }
1590
+ function safeCompile(route, options) {
1591
+ const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1592
+ const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1593
+ try {
1594
+ return (0, _pathtoregexp.compile)(routeToUse, options);
1595
+ } catch (error) {
1596
+ if (!needsNormalization) {
1597
+ try {
1598
+ const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1599
+ return (0, _pathtoregexp.compile)(normalizedRoute, options);
1600
+ } catch (retryError) {
1601
+ throw error;
1602
+ }
1603
+ }
1604
+ throw error;
1605
+ }
1606
+ }
1607
+ function safeRegexpToFunction(regexp, keys2) {
1608
+ const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys2 || []);
1609
+ return (pathname) => {
1610
+ const result = originalMatcher(pathname);
1611
+ if (!result) return false;
1612
+ return {
1613
+ ...result,
1614
+ params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
1615
+ };
1616
+ };
1617
+ }
1618
+ function safeRouteMatcher(matcherFn) {
1619
+ return (pathname) => {
1620
+ const result = matcherFn(pathname);
1621
+ if (!result) return false;
1622
+ return (0, _routepatternnormalizer.stripParameterSeparators)(result);
1623
+ };
1624
+ }
1625
+ }
1626
+ });
1627
+
1628
+ // ../../node_modules/next/dist/shared/lib/router/utils/route-matcher.js
1629
+ var require_route_matcher = __commonJS({
1630
+ "../../node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports) {
1631
+ "use strict";
1632
+ Object.defineProperty(exports, "__esModule", {
1633
+ value: true
1634
+ });
1635
+ Object.defineProperty(exports, "getRouteMatcher", {
1636
+ enumerable: true,
1637
+ get: function() {
1638
+ return getRouteMatcher;
1639
+ }
1640
+ });
1641
+ var _utils = require_utils();
1642
+ var _routematchutils = require_route_match_utils();
1643
+ function getRouteMatcher(param) {
1644
+ let { re, groups } = param;
1645
+ const rawMatcher = (pathname) => {
1646
+ const routeMatch = re.exec(pathname);
1647
+ if (!routeMatch) return false;
1648
+ const decode = (param2) => {
1649
+ try {
1650
+ return decodeURIComponent(param2);
1651
+ } catch (e) {
1652
+ throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
1653
+ value: "E528",
1654
+ enumerable: false,
1655
+ configurable: true
1656
+ });
1657
+ }
1658
+ };
1659
+ const params = {};
1660
+ for (const [key, group] of Object.entries(groups)) {
1661
+ const match = routeMatch[group.pos];
1662
+ if (match !== void 0) {
1663
+ if (group.repeat) {
1664
+ params[key] = match.split("/").map((entry) => decode(entry));
1665
+ } else {
1666
+ params[key] = decode(match);
1667
+ }
1668
+ }
1669
+ }
1670
+ return params;
1671
+ };
1672
+ return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
1673
+ }
1674
+ }
1675
+ });
1676
+
1677
+ // ../../node_modules/next/dist/lib/constants.js
1678
+ var require_constants = __commonJS({
1679
+ "../../node_modules/next/dist/lib/constants.js"(exports) {
1680
+ "use strict";
1681
+ Object.defineProperty(exports, "__esModule", {
1682
+ value: true
1683
+ });
1684
+ function _export(target, all) {
1685
+ for (var name in all) Object.defineProperty(target, name, {
1686
+ enumerable: true,
1687
+ get: all[name]
1688
+ });
1689
+ }
1690
+ _export(exports, {
1691
+ ACTION_SUFFIX: function() {
1692
+ return ACTION_SUFFIX;
1693
+ },
1694
+ APP_DIR_ALIAS: function() {
1695
+ return APP_DIR_ALIAS;
1696
+ },
1697
+ CACHE_ONE_YEAR: function() {
1698
+ return CACHE_ONE_YEAR;
1699
+ },
1700
+ DOT_NEXT_ALIAS: function() {
1701
+ return DOT_NEXT_ALIAS;
1702
+ },
1703
+ ESLINT_DEFAULT_DIRS: function() {
1704
+ return ESLINT_DEFAULT_DIRS;
1705
+ },
1706
+ GSP_NO_RETURNED_VALUE: function() {
1707
+ return GSP_NO_RETURNED_VALUE;
1708
+ },
1709
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
1710
+ return GSSP_COMPONENT_MEMBER_ERROR;
1711
+ },
1712
+ GSSP_NO_RETURNED_VALUE: function() {
1713
+ return GSSP_NO_RETURNED_VALUE;
1714
+ },
1715
+ HTML_CONTENT_TYPE_HEADER: function() {
1716
+ return HTML_CONTENT_TYPE_HEADER;
1717
+ },
1718
+ INFINITE_CACHE: function() {
1719
+ return INFINITE_CACHE;
1720
+ },
1721
+ INSTRUMENTATION_HOOK_FILENAME: function() {
1722
+ return INSTRUMENTATION_HOOK_FILENAME;
1723
+ },
1724
+ JSON_CONTENT_TYPE_HEADER: function() {
1725
+ return JSON_CONTENT_TYPE_HEADER;
1726
+ },
1727
+ MATCHED_PATH_HEADER: function() {
1728
+ return MATCHED_PATH_HEADER;
1729
+ },
1730
+ MIDDLEWARE_FILENAME: function() {
1731
+ return MIDDLEWARE_FILENAME;
1732
+ },
1733
+ MIDDLEWARE_LOCATION_REGEXP: function() {
1734
+ return MIDDLEWARE_LOCATION_REGEXP;
1735
+ },
1736
+ NEXT_BODY_SUFFIX: function() {
1737
+ return NEXT_BODY_SUFFIX;
1738
+ },
1739
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
1740
+ return NEXT_CACHE_IMPLICIT_TAG_ID;
1741
+ },
1742
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
1743
+ return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
1744
+ },
1745
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
1746
+ return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
1747
+ },
1748
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
1749
+ return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
1750
+ },
1751
+ NEXT_CACHE_TAGS_HEADER: function() {
1752
+ return NEXT_CACHE_TAGS_HEADER;
1753
+ },
1754
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
1755
+ return NEXT_CACHE_TAG_MAX_ITEMS;
1756
+ },
1757
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
1758
+ return NEXT_CACHE_TAG_MAX_LENGTH;
1759
+ },
1760
+ NEXT_DATA_SUFFIX: function() {
1761
+ return NEXT_DATA_SUFFIX;
1762
+ },
1763
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
1764
+ return NEXT_INTERCEPTION_MARKER_PREFIX;
1765
+ },
1766
+ NEXT_META_SUFFIX: function() {
1767
+ return NEXT_META_SUFFIX;
1768
+ },
1769
+ NEXT_QUERY_PARAM_PREFIX: function() {
1770
+ return NEXT_QUERY_PARAM_PREFIX;
1771
+ },
1772
+ NEXT_RESUME_HEADER: function() {
1773
+ return NEXT_RESUME_HEADER;
1774
+ },
1775
+ NON_STANDARD_NODE_ENV: function() {
1776
+ return NON_STANDARD_NODE_ENV;
1777
+ },
1778
+ PAGES_DIR_ALIAS: function() {
1779
+ return PAGES_DIR_ALIAS;
1780
+ },
1781
+ PRERENDER_REVALIDATE_HEADER: function() {
1782
+ return PRERENDER_REVALIDATE_HEADER;
1783
+ },
1784
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
1785
+ return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
1786
+ },
1787
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
1788
+ return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
1789
+ },
1790
+ ROOT_DIR_ALIAS: function() {
1791
+ return ROOT_DIR_ALIAS;
1792
+ },
1793
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
1794
+ return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
1795
+ },
1796
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
1797
+ return RSC_ACTION_ENCRYPTION_ALIAS;
1798
+ },
1799
+ RSC_ACTION_PROXY_ALIAS: function() {
1800
+ return RSC_ACTION_PROXY_ALIAS;
1801
+ },
1802
+ RSC_ACTION_VALIDATE_ALIAS: function() {
1803
+ return RSC_ACTION_VALIDATE_ALIAS;
1804
+ },
1805
+ RSC_CACHE_WRAPPER_ALIAS: function() {
1806
+ return RSC_CACHE_WRAPPER_ALIAS;
1807
+ },
1808
+ RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
1809
+ return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
1810
+ },
1811
+ RSC_MOD_REF_PROXY_ALIAS: function() {
1812
+ return RSC_MOD_REF_PROXY_ALIAS;
1813
+ },
1814
+ RSC_PREFETCH_SUFFIX: function() {
1815
+ return RSC_PREFETCH_SUFFIX;
1816
+ },
1817
+ RSC_SEGMENTS_DIR_SUFFIX: function() {
1818
+ return RSC_SEGMENTS_DIR_SUFFIX;
1819
+ },
1820
+ RSC_SEGMENT_SUFFIX: function() {
1821
+ return RSC_SEGMENT_SUFFIX;
1822
+ },
1823
+ RSC_SUFFIX: function() {
1824
+ return RSC_SUFFIX;
1825
+ },
1826
+ SERVER_PROPS_EXPORT_ERROR: function() {
1827
+ return SERVER_PROPS_EXPORT_ERROR;
1828
+ },
1829
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
1830
+ return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
1831
+ },
1832
+ SERVER_PROPS_SSG_CONFLICT: function() {
1833
+ return SERVER_PROPS_SSG_CONFLICT;
1834
+ },
1835
+ SERVER_RUNTIME: function() {
1836
+ return SERVER_RUNTIME;
1837
+ },
1838
+ SSG_FALLBACK_EXPORT_ERROR: function() {
1839
+ return SSG_FALLBACK_EXPORT_ERROR;
1840
+ },
1841
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
1842
+ return SSG_GET_INITIAL_PROPS_CONFLICT;
1843
+ },
1844
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
1845
+ return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
1846
+ },
1847
+ TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
1848
+ return TEXT_PLAIN_CONTENT_TYPE_HEADER;
1849
+ },
1850
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
1851
+ return UNSTABLE_REVALIDATE_RENAME_ERROR;
1852
+ },
1853
+ WEBPACK_LAYERS: function() {
1854
+ return WEBPACK_LAYERS;
1855
+ },
1856
+ WEBPACK_RESOURCE_QUERIES: function() {
1857
+ return WEBPACK_RESOURCE_QUERIES;
1858
+ }
1859
+ });
1860
+ var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
1861
+ var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
1862
+ var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
1863
+ var NEXT_QUERY_PARAM_PREFIX = "nxtP";
1864
+ var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
1865
+ var MATCHED_PATH_HEADER = "x-matched-path";
1866
+ var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
1867
+ var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
1868
+ var RSC_PREFETCH_SUFFIX = ".prefetch.rsc";
1869
+ var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
1870
+ var RSC_SEGMENT_SUFFIX = ".segment.rsc";
1871
+ var RSC_SUFFIX = ".rsc";
1872
+ var ACTION_SUFFIX = ".action";
1873
+ var NEXT_DATA_SUFFIX = ".json";
1874
+ var NEXT_META_SUFFIX = ".meta";
1875
+ var NEXT_BODY_SUFFIX = ".body";
1876
+ var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
1877
+ var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
1878
+ var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
1879
+ var NEXT_RESUME_HEADER = "next-resume";
1880
+ var NEXT_CACHE_TAG_MAX_ITEMS = 128;
1881
+ var NEXT_CACHE_TAG_MAX_LENGTH = 256;
1882
+ var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
1883
+ var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
1884
+ var CACHE_ONE_YEAR = 31536e3;
1885
+ var INFINITE_CACHE = 4294967294;
1886
+ var MIDDLEWARE_FILENAME = "middleware";
1887
+ var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
1888
+ var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
1889
+ var PAGES_DIR_ALIAS = "private-next-pages";
1890
+ var DOT_NEXT_ALIAS = "private-dot-next";
1891
+ var ROOT_DIR_ALIAS = "private-next-root-dir";
1892
+ var APP_DIR_ALIAS = "private-next-app-dir";
1893
+ var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
1894
+ var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
1895
+ var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
1896
+ var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
1897
+ var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
1898
+ var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
1899
+ var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
1900
+ 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`;
1901
+ var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
1902
+ var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
1903
+ var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
1904
+ var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
1905
+ var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
1906
+ var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
1907
+ var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
1908
+ var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
1909
+ 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`;
1910
+ 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`;
1911
+ 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`;
1912
+ var ESLINT_DEFAULT_DIRS = [
1913
+ "app",
1914
+ "pages",
1915
+ "components",
1916
+ "lib",
1917
+ "src"
1918
+ ];
1919
+ var SERVER_RUNTIME = {
1920
+ edge: "edge",
1921
+ experimentalEdge: "experimental-edge",
1922
+ nodejs: "nodejs"
1923
+ };
1924
+ var WEBPACK_LAYERS_NAMES = {
1925
+ /**
1926
+ * The layer for the shared code between the client and server bundles.
1927
+ */
1928
+ shared: "shared",
1929
+ /**
1930
+ * The layer for server-only runtime and picking up `react-server` export conditions.
1931
+ * Including app router RSC pages and app router custom routes and metadata routes.
1932
+ */
1933
+ reactServerComponents: "rsc",
1934
+ /**
1935
+ * Server Side Rendering layer for app (ssr).
1936
+ */
1937
+ serverSideRendering: "ssr",
1938
+ /**
1939
+ * The browser client bundle layer for actions.
1940
+ */
1941
+ actionBrowser: "action-browser",
1942
+ /**
1943
+ * The Node.js bundle layer for the API routes.
1944
+ */
1945
+ apiNode: "api-node",
1946
+ /**
1947
+ * The Edge Lite bundle layer for the API routes.
1948
+ */
1949
+ apiEdge: "api-edge",
1950
+ /**
1951
+ * The layer for the middleware code.
1952
+ */
1953
+ middleware: "middleware",
1954
+ /**
1955
+ * The layer for the instrumentation hooks.
1956
+ */
1957
+ instrument: "instrument",
1958
+ /**
1959
+ * The layer for assets on the edge.
1960
+ */
1961
+ edgeAsset: "edge-asset",
1962
+ /**
1963
+ * The browser client bundle layer for App directory.
1964
+ */
1965
+ appPagesBrowser: "app-pages-browser",
1966
+ /**
1967
+ * The browser client bundle layer for Pages directory.
1968
+ */
1969
+ pagesDirBrowser: "pages-dir-browser",
1970
+ /**
1971
+ * The Edge Lite bundle layer for Pages directory.
1972
+ */
1973
+ pagesDirEdge: "pages-dir-edge",
1974
+ /**
1975
+ * The Node.js bundle layer for Pages directory.
1976
+ */
1977
+ pagesDirNode: "pages-dir-node"
1978
+ };
1979
+ var WEBPACK_LAYERS = {
1980
+ ...WEBPACK_LAYERS_NAMES,
1981
+ GROUP: {
1982
+ builtinReact: [
1983
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1984
+ WEBPACK_LAYERS_NAMES.actionBrowser
1985
+ ],
1986
+ serverOnly: [
1987
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1988
+ WEBPACK_LAYERS_NAMES.actionBrowser,
1989
+ WEBPACK_LAYERS_NAMES.instrument,
1990
+ WEBPACK_LAYERS_NAMES.middleware
1991
+ ],
1992
+ neutralTarget: [
1993
+ // pages api
1994
+ WEBPACK_LAYERS_NAMES.apiNode,
1995
+ WEBPACK_LAYERS_NAMES.apiEdge
1996
+ ],
1997
+ clientOnly: [
1998
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
1999
+ WEBPACK_LAYERS_NAMES.appPagesBrowser
2000
+ ],
2001
+ bundled: [
2002
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2003
+ WEBPACK_LAYERS_NAMES.actionBrowser,
2004
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2005
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
2006
+ WEBPACK_LAYERS_NAMES.shared,
2007
+ WEBPACK_LAYERS_NAMES.instrument,
2008
+ WEBPACK_LAYERS_NAMES.middleware
2009
+ ],
2010
+ appPages: [
2011
+ // app router pages and layouts
2012
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2013
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2014
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
2015
+ WEBPACK_LAYERS_NAMES.actionBrowser
2016
+ ]
2017
+ }
2018
+ };
2019
+ var WEBPACK_RESOURCE_QUERIES = {
2020
+ edgeSSREntry: "__next_edge_ssr_entry__",
2021
+ metadata: "__next_metadata__",
2022
+ metadataRoute: "__next_metadata_route__",
2023
+ metadataImageMeta: "__next_metadata_image_meta__"
2024
+ };
2025
+ }
2026
+ });
2027
+
2028
+ // ../../node_modules/next/dist/shared/lib/escape-regexp.js
2029
+ var require_escape_regexp = __commonJS({
2030
+ "../../node_modules/next/dist/shared/lib/escape-regexp.js"(exports) {
2031
+ "use strict";
2032
+ Object.defineProperty(exports, "__esModule", {
2033
+ value: true
2034
+ });
2035
+ Object.defineProperty(exports, "escapeStringRegexp", {
2036
+ enumerable: true,
2037
+ get: function() {
2038
+ return escapeStringRegexp;
2039
+ }
2040
+ });
2041
+ var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
2042
+ var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
2043
+ function escapeStringRegexp(str) {
2044
+ if (reHasRegExp.test(str)) {
2045
+ return str.replace(reReplaceRegExp, "\\$&");
2046
+ }
2047
+ return str;
2048
+ }
2049
+ }
2050
+ });
2051
+
2052
+ // ../../node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
2053
+ var require_get_dynamic_param = __commonJS({
2054
+ "../../node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports) {
2055
+ "use strict";
2056
+ Object.defineProperty(exports, "__esModule", {
2057
+ value: true
2058
+ });
2059
+ function _export(target, all) {
2060
+ for (var name in all) Object.defineProperty(target, name, {
2061
+ enumerable: true,
2062
+ get: all[name]
2063
+ });
2064
+ }
2065
+ _export(exports, {
2066
+ PARAMETER_PATTERN: function() {
2067
+ return PARAMETER_PATTERN;
2068
+ },
2069
+ getDynamicParam: function() {
2070
+ return getDynamicParam;
2071
+ },
2072
+ parseMatchedParameter: function() {
2073
+ return parseMatchedParameter;
2074
+ },
2075
+ parseParameter: function() {
2076
+ return parseParameter;
2077
+ }
2078
+ });
2079
+ function getDynamicParam(params, segmentKey, dynamicParamType, pagePath, fallbackRouteParams) {
2080
+ let value = params[segmentKey];
2081
+ if (fallbackRouteParams && fallbackRouteParams.has(segmentKey)) {
2082
+ value = fallbackRouteParams.get(segmentKey);
2083
+ } else if (Array.isArray(value)) {
2084
+ value = value.map((i) => encodeURIComponent(i));
2085
+ } else if (typeof value === "string") {
2086
+ value = encodeURIComponent(value);
2087
+ }
2088
+ if (!value) {
2089
+ const isCatchall = dynamicParamType === "c";
2090
+ const isOptionalCatchall = dynamicParamType === "oc";
2091
+ if (isCatchall || isOptionalCatchall) {
2092
+ if (isOptionalCatchall) {
2093
+ return {
2094
+ param: segmentKey,
2095
+ value: null,
2096
+ type: dynamicParamType,
2097
+ treeSegment: [
2098
+ segmentKey,
2099
+ "",
2100
+ dynamicParamType
2101
+ ]
2102
+ };
2103
+ }
2104
+ value = pagePath.split("/").slice(1).flatMap((pathSegment) => {
2105
+ const param = parseParameter(pathSegment);
2106
+ var _params_param_key;
2107
+ return (_params_param_key = params[param.key]) != null ? _params_param_key : param.key;
2108
+ });
2109
+ return {
2110
+ param: segmentKey,
2111
+ value,
2112
+ type: dynamicParamType,
2113
+ // This value always has to be a string.
2114
+ treeSegment: [
2115
+ segmentKey,
2116
+ value.join("/"),
2117
+ dynamicParamType
2118
+ ]
2119
+ };
2120
+ }
2121
+ }
2122
+ return {
2123
+ param: segmentKey,
2124
+ // The value that is passed to user code.
2125
+ value,
2126
+ // The value that is rendered in the router tree.
2127
+ treeSegment: [
2128
+ segmentKey,
2129
+ Array.isArray(value) ? value.join("/") : value,
2130
+ dynamicParamType
2131
+ ],
2132
+ type: dynamicParamType
2133
+ };
2134
+ }
2135
+ var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
2136
+ function parseParameter(param) {
2137
+ const match = param.match(PARAMETER_PATTERN);
2138
+ if (!match) {
2139
+ return parseMatchedParameter(param);
2140
+ }
2141
+ return parseMatchedParameter(match[2]);
2142
+ }
2143
+ function parseMatchedParameter(param) {
2144
+ const optional = param.startsWith("[") && param.endsWith("]");
2145
+ if (optional) {
2146
+ param = param.slice(1, -1);
2147
+ }
2148
+ const repeat = param.startsWith("...");
2149
+ if (repeat) {
2150
+ param = param.slice(3);
2151
+ }
2152
+ return {
2153
+ key: param,
2154
+ repeat,
2155
+ optional
2156
+ };
2157
+ }
2158
+ }
2159
+ });
2160
+
2161
+ // ../../node_modules/next/dist/shared/lib/router/utils/route-regex.js
2162
+ var require_route_regex = __commonJS({
2163
+ "../../node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports) {
2164
+ "use strict";
2165
+ Object.defineProperty(exports, "__esModule", {
2166
+ value: true
2167
+ });
2168
+ function _export(target, all) {
2169
+ for (var name in all) Object.defineProperty(target, name, {
2170
+ enumerable: true,
2171
+ get: all[name]
2172
+ });
2173
+ }
2174
+ _export(exports, {
2175
+ getNamedMiddlewareRegex: function() {
2176
+ return getNamedMiddlewareRegex;
2177
+ },
2178
+ getNamedRouteRegex: function() {
2179
+ return getNamedRouteRegex;
2180
+ },
2181
+ getRouteRegex: function() {
2182
+ return getRouteRegex;
2183
+ }
2184
+ });
2185
+ var _constants = require_constants();
2186
+ var _interceptionroutes = require_interception_routes();
2187
+ var _escaperegexp = require_escape_regexp();
2188
+ var _removetrailingslash = require_remove_trailing_slash();
2189
+ var _getdynamicparam = require_get_dynamic_param();
2190
+ function getParametrizedRoute(route, includeSuffix, includePrefix) {
2191
+ const groups = {};
2192
+ let groupIndex = 1;
2193
+ const segments = [];
2194
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2195
+ const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
2196
+ const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2197
+ if (markerMatch && paramMatches && paramMatches[2]) {
2198
+ const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2199
+ groups[key] = {
2200
+ pos: groupIndex++,
2201
+ repeat,
2202
+ optional
2203
+ };
2204
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(markerMatch) + "([^/]+?)");
2205
+ } else if (paramMatches && paramMatches[2]) {
2206
+ const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2207
+ groups[key] = {
2208
+ pos: groupIndex++,
2209
+ repeat,
2210
+ optional
2211
+ };
2212
+ if (includePrefix && paramMatches[1]) {
2213
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
2214
+ }
2215
+ let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
2216
+ if (includePrefix && paramMatches[1]) {
2217
+ s = s.substring(1);
2218
+ }
2219
+ segments.push(s);
2220
+ } else {
2221
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
2222
+ }
2223
+ if (includeSuffix && paramMatches && paramMatches[3]) {
2224
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2225
+ }
2226
+ }
2227
+ return {
2228
+ parameterizedRoute: segments.join(""),
2229
+ groups
2230
+ };
2231
+ }
2232
+ function getRouteRegex(normalizedRoute, param) {
2233
+ let { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = param === void 0 ? {} : param;
2234
+ const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
2235
+ let re = parameterizedRoute;
2236
+ if (!excludeOptionalTrailingSlash) {
2237
+ re += "(?:/)?";
2238
+ }
2239
+ return {
2240
+ re: new RegExp("^" + re + "$"),
2241
+ groups
2242
+ };
2243
+ }
2244
+ function buildGetSafeRouteKey() {
2245
+ let i = 0;
2246
+ return () => {
2247
+ let routeKey = "";
2248
+ let j = ++i;
2249
+ while (j > 0) {
2250
+ routeKey += String.fromCharCode(97 + (j - 1) % 26);
2251
+ j = Math.floor((j - 1) / 26);
2252
+ }
2253
+ return routeKey;
2254
+ };
2255
+ }
2256
+ function getSafeKeyFromSegment(param) {
2257
+ let { interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys } = param;
2258
+ const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
2259
+ let cleanedKey = key.replace(/\W/g, "");
2260
+ if (keyPrefix) {
2261
+ cleanedKey = "" + keyPrefix + cleanedKey;
2262
+ }
2263
+ let invalidKey = false;
2264
+ if (cleanedKey.length === 0 || cleanedKey.length > 30) {
2265
+ invalidKey = true;
2266
+ }
2267
+ if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
2268
+ invalidKey = true;
2269
+ }
2270
+ if (invalidKey) {
2271
+ cleanedKey = getSafeRouteKey();
2272
+ }
2273
+ const duplicateKey = cleanedKey in routeKeys;
2274
+ if (keyPrefix) {
2275
+ routeKeys[cleanedKey] = "" + keyPrefix + key;
2276
+ } else {
2277
+ routeKeys[cleanedKey] = key;
2278
+ }
2279
+ const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
2280
+ let pattern;
2281
+ if (duplicateKey && backreferenceDuplicateKeys) {
2282
+ pattern = "\\k<" + cleanedKey + ">";
2283
+ } else if (repeat) {
2284
+ pattern = "(?<" + cleanedKey + ">.+?)";
2285
+ } else {
2286
+ pattern = "(?<" + cleanedKey + ">[^/]+?)";
2287
+ }
2288
+ return optional ? "(?:/" + interceptionPrefix + pattern + ")?" : "/" + interceptionPrefix + pattern;
2289
+ }
2290
+ function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys) {
2291
+ const getSafeRouteKey = buildGetSafeRouteKey();
2292
+ const routeKeys = {};
2293
+ const segments = [];
2294
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2295
+ const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
2296
+ const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2297
+ if (hasInterceptionMarker && paramMatches && paramMatches[2]) {
2298
+ segments.push(getSafeKeyFromSegment({
2299
+ getSafeRouteKey,
2300
+ interceptionMarker: paramMatches[1],
2301
+ segment: paramMatches[2],
2302
+ routeKeys,
2303
+ keyPrefix: prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0,
2304
+ backreferenceDuplicateKeys
2305
+ }));
2306
+ } else if (paramMatches && paramMatches[2]) {
2307
+ if (includePrefix && paramMatches[1]) {
2308
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
2309
+ }
2310
+ let s = getSafeKeyFromSegment({
2311
+ getSafeRouteKey,
2312
+ segment: paramMatches[2],
2313
+ routeKeys,
2314
+ keyPrefix: prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0,
2315
+ backreferenceDuplicateKeys
2316
+ });
2317
+ if (includePrefix && paramMatches[1]) {
2318
+ s = s.substring(1);
2319
+ }
2320
+ segments.push(s);
2321
+ } else {
2322
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
2323
+ }
2324
+ if (includeSuffix && paramMatches && paramMatches[3]) {
2325
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2326
+ }
2327
+ }
2328
+ return {
2329
+ namedParameterizedRoute: segments.join(""),
2330
+ routeKeys
2331
+ };
2332
+ }
2333
+ function getNamedRouteRegex(normalizedRoute, options) {
2334
+ var _options_includeSuffix, _options_includePrefix, _options_backreferenceDuplicateKeys;
2335
+ const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, (_options_includeSuffix = options.includeSuffix) != null ? _options_includeSuffix : false, (_options_includePrefix = options.includePrefix) != null ? _options_includePrefix : false, (_options_backreferenceDuplicateKeys = options.backreferenceDuplicateKeys) != null ? _options_backreferenceDuplicateKeys : false);
2336
+ let namedRegex = result.namedParameterizedRoute;
2337
+ if (!options.excludeOptionalTrailingSlash) {
2338
+ namedRegex += "(?:/)?";
2339
+ }
2340
+ return {
2341
+ ...getRouteRegex(normalizedRoute, options),
2342
+ namedRegex: "^" + namedRegex + "$",
2343
+ routeKeys: result.routeKeys
2344
+ };
2345
+ }
2346
+ function getNamedMiddlewareRegex(normalizedRoute, options) {
2347
+ const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
2348
+ const { catchAll = true } = options;
2349
+ if (parameterizedRoute === "/") {
2350
+ let catchAllRegex = catchAll ? ".*" : "";
2351
+ return {
2352
+ namedRegex: "^/" + catchAllRegex + "$"
2353
+ };
2354
+ }
2355
+ const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false);
2356
+ let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
2357
+ return {
2358
+ namedRegex: "^" + namedParameterizedRoute + catchAllGroupedRegex + "$"
2359
+ };
2360
+ }
2361
+ }
2362
+ });
2363
+
2364
+ // ../../node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
2365
+ var require_interpolate_as = __commonJS({
2366
+ "../../node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports) {
2367
+ "use strict";
2368
+ Object.defineProperty(exports, "__esModule", {
2369
+ value: true
2370
+ });
2371
+ Object.defineProperty(exports, "interpolateAs", {
2372
+ enumerable: true,
2373
+ get: function() {
2374
+ return interpolateAs;
2375
+ }
2376
+ });
2377
+ var _routematcher = require_route_matcher();
2378
+ var _routeregex = require_route_regex();
2379
+ function interpolateAs(route, asPathname, query) {
2380
+ let interpolatedRoute = "";
2381
+ const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
2382
+ const dynamicGroups = dynamicRegex.groups;
2383
+ const dynamicMatches = (
2384
+ // Try to match the dynamic route against the asPath
2385
+ (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
2386
+ // TODO: should this take priority; also need to change in the router.
2387
+ query
2388
+ );
2389
+ interpolatedRoute = route;
2390
+ const params = Object.keys(dynamicGroups);
2391
+ if (!params.every((param) => {
2392
+ let value = dynamicMatches[param] || "";
2393
+ const { repeat, optional } = dynamicGroups[param];
2394
+ let replaced = "[" + (repeat ? "..." : "") + param + "]";
2395
+ if (optional) {
2396
+ replaced = (!value ? "/" : "") + "[" + replaced + "]";
2397
+ }
2398
+ if (repeat && !Array.isArray(value)) value = [
2399
+ value
2400
+ ];
2401
+ return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
2402
+ (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
2403
+ // these values should be fully encoded instead of just
2404
+ // path delimiter escaped since they are being inserted
2405
+ // into the URL and we expect URL encoded segments
2406
+ // when parsing dynamic route params
2407
+ (segment) => encodeURIComponent(segment)
2408
+ ).join("/") : encodeURIComponent(value)) || "/");
2409
+ })) {
2410
+ interpolatedRoute = "";
2411
+ }
2412
+ return {
2413
+ params,
2414
+ result: interpolatedRoute
2415
+ };
2416
+ }
2417
+ }
2418
+ });
2419
+
2420
+ // ../../node_modules/next/dist/client/resolve-href.js
2421
+ var require_resolve_href = __commonJS({
2422
+ "../../node_modules/next/dist/client/resolve-href.js"(exports, module) {
2423
+ "use strict";
2424
+ Object.defineProperty(exports, "__esModule", {
2425
+ value: true
2426
+ });
2427
+ Object.defineProperty(exports, "resolveHref", {
2428
+ enumerable: true,
2429
+ get: function() {
2430
+ return resolveHref;
2431
+ }
2432
+ });
2433
+ var _querystring = require_querystring();
2434
+ var _formaturl = require_format_url();
2435
+ var _omit = require_omit();
2436
+ var _utils = require_utils();
2437
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2438
+ var _islocalurl = require_is_local_url();
2439
+ var _utils1 = require_utils2();
2440
+ var _interpolateas = require_interpolate_as();
2441
+ var _routeregex = require_route_regex();
2442
+ var _routematcher = require_route_matcher();
2443
+ function resolveHref(router, href, resolveAs) {
2444
+ let base;
2445
+ let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
2446
+ const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
2447
+ const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
2448
+ const urlParts = urlAsStringNoProto.split("?", 1);
2449
+ if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
2450
+ console.error("Invalid href '" + urlAsString + "' passed to next/router in page: '" + router.pathname + "'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");
2451
+ const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
2452
+ urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
2453
+ }
2454
+ if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
2455
+ return resolveAs ? [
2456
+ urlAsString
2457
+ ] : urlAsString;
2458
+ }
2459
+ try {
2460
+ let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
2461
+ if (urlAsString.startsWith("?")) {
2462
+ baseBase = router.asPath;
2463
+ if ((0, _utils1.isDynamicRoute)(router.pathname)) {
2464
+ baseBase = router.pathname;
2465
+ const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
2466
+ const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
2467
+ if (!match) {
2468
+ baseBase = router.asPath;
2469
+ }
2470
+ }
2471
+ }
2472
+ base = new URL(baseBase, "http://n");
2473
+ } catch (_) {
2474
+ base = new URL("/", "http://n");
2475
+ }
2476
+ try {
2477
+ const finalUrl = new URL(urlAsString, base);
2478
+ finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
2479
+ let interpolatedAs = "";
2480
+ if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
2481
+ const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
2482
+ const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
2483
+ if (result) {
2484
+ interpolatedAs = (0, _formaturl.formatWithValidation)({
2485
+ pathname: result,
2486
+ hash: finalUrl.hash,
2487
+ query: (0, _omit.omit)(query, params)
2488
+ });
2489
+ }
2490
+ }
2491
+ const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
2492
+ return resolveAs ? [
2493
+ resolvedHref,
2494
+ interpolatedAs || resolvedHref
2495
+ ] : resolvedHref;
2496
+ } catch (_) {
2497
+ return resolveAs ? [
2498
+ urlAsString
2499
+ ] : urlAsString;
2500
+ }
2501
+ }
2502
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2503
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2504
+ Object.assign(exports.default, exports);
2505
+ module.exports = exports.default;
2506
+ }
2507
+ }
2508
+ });
2509
+
2510
+ // ../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
2511
+ var require_add_path_prefix = __commonJS({
2512
+ "../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports) {
2513
+ "use strict";
2514
+ Object.defineProperty(exports, "__esModule", {
2515
+ value: true
2516
+ });
2517
+ Object.defineProperty(exports, "addPathPrefix", {
2518
+ enumerable: true,
2519
+ get: function() {
2520
+ return addPathPrefix;
2521
+ }
2522
+ });
2523
+ var _parsepath = require_parse_path();
2524
+ function addPathPrefix(path, prefix) {
2525
+ if (!path.startsWith("/") || !prefix) {
2526
+ return path;
2527
+ }
2528
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
2529
+ return "" + prefix + pathname + query + hash;
2530
+ }
2531
+ }
2532
+ });
2533
+
2534
+ // ../../node_modules/next/dist/shared/lib/router/utils/add-locale.js
2535
+ var require_add_locale = __commonJS({
2536
+ "../../node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports) {
2537
+ "use strict";
2538
+ Object.defineProperty(exports, "__esModule", {
2539
+ value: true
2540
+ });
2541
+ Object.defineProperty(exports, "addLocale", {
2542
+ enumerable: true,
2543
+ get: function() {
2544
+ return addLocale;
2545
+ }
2546
+ });
2547
+ var _addpathprefix = require_add_path_prefix();
2548
+ var _pathhasprefix = require_path_has_prefix();
2549
+ function addLocale(path, locale, defaultLocale, ignorePrefix) {
2550
+ if (!locale || locale === defaultLocale) return path;
2551
+ const lower = path.toLowerCase();
2552
+ if (!ignorePrefix) {
2553
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
2554
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase())) return path;
2555
+ }
2556
+ return (0, _addpathprefix.addPathPrefix)(path, "/" + locale);
2557
+ }
2558
+ }
2559
+ });
2560
+
2561
+ // ../../node_modules/next/dist/client/add-locale.js
2562
+ var require_add_locale2 = __commonJS({
2563
+ "../../node_modules/next/dist/client/add-locale.js"(exports, module) {
2564
+ "use strict";
2565
+ Object.defineProperty(exports, "__esModule", {
2566
+ value: true
2567
+ });
2568
+ Object.defineProperty(exports, "addLocale", {
2569
+ enumerable: true,
2570
+ get: function() {
2571
+ return addLocale;
2572
+ }
2573
+ });
2574
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2575
+ var addLocale = function(path) {
2576
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2577
+ args[_key - 1] = arguments[_key];
2578
+ }
2579
+ if (process.env.__NEXT_I18N_SUPPORT) {
2580
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
2581
+ }
2582
+ return path;
2583
+ };
2584
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2585
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2586
+ Object.assign(exports.default, exports);
2587
+ module.exports = exports.default;
2588
+ }
2589
+ }
2590
+ });
2591
+
2592
+ // ../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs
2593
+ var require_interop_require_default = __commonJS({
2594
+ "../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports) {
2595
+ "use strict";
2596
+ function _interop_require_default(obj) {
2597
+ return obj && obj.__esModule ? obj : { default: obj };
2598
+ }
2599
+ exports._ = _interop_require_default;
2600
+ }
2601
+ });
2602
+
2603
+ // ../../node_modules/next/dist/shared/lib/router-context.shared-runtime.js
2604
+ var require_router_context_shared_runtime = __commonJS({
2605
+ "../../node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports) {
2606
+ "use strict";
2607
+ Object.defineProperty(exports, "__esModule", {
2608
+ value: true
2609
+ });
2610
+ Object.defineProperty(exports, "RouterContext", {
2611
+ enumerable: true,
2612
+ get: function() {
2613
+ return RouterContext;
2614
+ }
2615
+ });
2616
+ var _interop_require_default = require_interop_require_default();
2617
+ var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
2618
+ var RouterContext = _react.default.createContext(null);
2619
+ if (process.env.NODE_ENV !== "production") {
2620
+ RouterContext.displayName = "RouterContext";
2621
+ }
2622
+ }
2623
+ });
2624
+
2625
+ // ../../node_modules/next/dist/client/request-idle-callback.js
2626
+ var require_request_idle_callback = __commonJS({
2627
+ "../../node_modules/next/dist/client/request-idle-callback.js"(exports, module) {
2628
+ "use strict";
2629
+ Object.defineProperty(exports, "__esModule", {
2630
+ value: true
2631
+ });
2632
+ function _export(target, all) {
2633
+ for (var name in all) Object.defineProperty(target, name, {
2634
+ enumerable: true,
2635
+ get: all[name]
2636
+ });
2637
+ }
2638
+ _export(exports, {
2639
+ cancelIdleCallback: function() {
2640
+ return cancelIdleCallback;
2641
+ },
2642
+ requestIdleCallback: function() {
2643
+ return requestIdleCallback;
2644
+ }
2645
+ });
2646
+ var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
2647
+ let start = Date.now();
2648
+ return self.setTimeout(function() {
2649
+ cb({
2650
+ didTimeout: false,
2651
+ timeRemaining: function() {
2652
+ return Math.max(0, 50 - (Date.now() - start));
2653
+ }
2654
+ });
2655
+ }, 1);
2656
+ };
2657
+ var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
2658
+ return clearTimeout(id);
2659
+ };
2660
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2661
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2662
+ Object.assign(exports.default, exports);
2663
+ module.exports = exports.default;
2664
+ }
2665
+ }
2666
+ });
2667
+
2668
+ // ../../node_modules/next/dist/client/use-intersection.js
2669
+ var require_use_intersection = __commonJS({
2670
+ "../../node_modules/next/dist/client/use-intersection.js"(exports, module) {
2671
+ "use strict";
2672
+ Object.defineProperty(exports, "__esModule", {
2673
+ value: true
2674
+ });
2675
+ Object.defineProperty(exports, "useIntersection", {
2676
+ enumerable: true,
2677
+ get: function() {
2678
+ return useIntersection;
2679
+ }
2680
+ });
2681
+ var _react = __require("react");
2682
+ var _requestidlecallback = require_request_idle_callback();
2683
+ var hasIntersectionObserver = typeof IntersectionObserver === "function";
2684
+ var observers = /* @__PURE__ */ new Map();
2685
+ var idList = [];
2686
+ function createObserver(options) {
2687
+ const id = {
2688
+ root: options.root || null,
2689
+ margin: options.rootMargin || ""
2690
+ };
2691
+ const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
2692
+ let instance;
2693
+ if (existing) {
2694
+ instance = observers.get(existing);
2695
+ if (instance) {
2696
+ return instance;
2697
+ }
2698
+ }
2699
+ const elements = /* @__PURE__ */ new Map();
2700
+ const observer = new IntersectionObserver((entries) => {
2701
+ entries.forEach((entry) => {
2702
+ const callback = elements.get(entry.target);
2703
+ const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
2704
+ if (callback && isVisible) {
2705
+ callback(isVisible);
2706
+ }
2707
+ });
2708
+ }, options);
2709
+ instance = {
2710
+ id,
2711
+ observer,
2712
+ elements
2713
+ };
2714
+ idList.push(id);
2715
+ observers.set(id, instance);
2716
+ return instance;
2717
+ }
2718
+ function observe(element, callback, options) {
2719
+ const { id, observer, elements } = createObserver(options);
2720
+ elements.set(element, callback);
2721
+ observer.observe(element);
2722
+ return function unobserve() {
2723
+ elements.delete(element);
2724
+ observer.unobserve(element);
2725
+ if (elements.size === 0) {
2726
+ observer.disconnect();
2727
+ observers.delete(id);
2728
+ const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
2729
+ if (index > -1) {
2730
+ idList.splice(index, 1);
2731
+ }
2732
+ }
2733
+ };
2734
+ }
2735
+ function useIntersection(param) {
2736
+ let { rootRef, rootMargin, disabled } = param;
2737
+ const isDisabled = disabled || !hasIntersectionObserver;
2738
+ const [visible, setVisible] = (0, _react.useState)(false);
2739
+ const elementRef = (0, _react.useRef)(null);
2740
+ const setElement = (0, _react.useCallback)((element) => {
2741
+ elementRef.current = element;
2742
+ }, []);
2743
+ (0, _react.useEffect)(() => {
2744
+ if (hasIntersectionObserver) {
2745
+ if (isDisabled || visible) return;
2746
+ const element = elementRef.current;
2747
+ if (element && element.tagName) {
2748
+ const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
2749
+ root: rootRef == null ? void 0 : rootRef.current,
2750
+ rootMargin
2751
+ });
2752
+ return unobserve;
2753
+ }
2754
+ } else {
2755
+ if (!visible) {
2756
+ const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
2757
+ return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
2758
+ }
2759
+ }
2760
+ }, [
2761
+ isDisabled,
2762
+ rootMargin,
2763
+ rootRef,
2764
+ visible,
2765
+ elementRef.current
2766
+ ]);
2767
+ const resetVisible = (0, _react.useCallback)(() => {
2768
+ setVisible(false);
2769
+ }, []);
2770
+ return [
2771
+ setElement,
2772
+ visible,
2773
+ resetVisible
2774
+ ];
2775
+ }
2776
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2777
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2778
+ Object.assign(exports.default, exports);
2779
+ module.exports = exports.default;
2780
+ }
2781
+ }
2782
+ });
2783
+
2784
+ // ../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
2785
+ var require_normalize_locale_path = __commonJS({
2786
+ "../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports) {
2787
+ "use strict";
2788
+ Object.defineProperty(exports, "__esModule", {
2789
+ value: true
2790
+ });
2791
+ Object.defineProperty(exports, "normalizeLocalePath", {
2792
+ enumerable: true,
2793
+ get: function() {
2794
+ return normalizeLocalePath;
2795
+ }
2796
+ });
2797
+ var cache = /* @__PURE__ */ new WeakMap();
2798
+ function normalizeLocalePath(pathname, locales) {
2799
+ if (!locales) return {
2800
+ pathname
2801
+ };
2802
+ let lowercasedLocales = cache.get(locales);
2803
+ if (!lowercasedLocales) {
2804
+ lowercasedLocales = locales.map((locale) => locale.toLowerCase());
2805
+ cache.set(locales, lowercasedLocales);
2806
+ }
2807
+ let detectedLocale;
2808
+ const segments = pathname.split("/", 2);
2809
+ if (!segments[1]) return {
2810
+ pathname
2811
+ };
2812
+ const segment = segments[1].toLowerCase();
2813
+ const index = lowercasedLocales.indexOf(segment);
2814
+ if (index < 0) return {
2815
+ pathname
2816
+ };
2817
+ detectedLocale = locales[index];
2818
+ pathname = pathname.slice(detectedLocale.length + 1) || "/";
2819
+ return {
2820
+ pathname,
2821
+ detectedLocale
2822
+ };
2823
+ }
2824
+ }
2825
+ });
2826
+
2827
+ // ../../node_modules/next/dist/client/normalize-locale-path.js
2828
+ var require_normalize_locale_path2 = __commonJS({
2829
+ "../../node_modules/next/dist/client/normalize-locale-path.js"(exports, module) {
2830
+ "use strict";
2831
+ Object.defineProperty(exports, "__esModule", {
2832
+ value: true
2833
+ });
2834
+ Object.defineProperty(exports, "normalizeLocalePath", {
2835
+ enumerable: true,
2836
+ get: function() {
2837
+ return normalizeLocalePath;
2838
+ }
2839
+ });
2840
+ var normalizeLocalePath = (pathname, locales) => {
2841
+ if (process.env.__NEXT_I18N_SUPPORT) {
2842
+ return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
2843
+ }
2844
+ return {
2845
+ pathname,
2846
+ detectedLocale: void 0
2847
+ };
2848
+ };
2849
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2850
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2851
+ Object.assign(exports.default, exports);
2852
+ module.exports = exports.default;
2853
+ }
2854
+ }
2855
+ });
2856
+
2857
+ // ../../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
2858
+ var require_detect_domain_locale = __commonJS({
2859
+ "../../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports) {
2860
+ "use strict";
2861
+ Object.defineProperty(exports, "__esModule", {
2862
+ value: true
2863
+ });
2864
+ Object.defineProperty(exports, "detectDomainLocale", {
2865
+ enumerable: true,
2866
+ get: function() {
2867
+ return detectDomainLocale;
2868
+ }
2869
+ });
2870
+ function detectDomainLocale(domainItems, hostname, detectedLocale) {
2871
+ if (!domainItems) return;
2872
+ if (detectedLocale) {
2873
+ detectedLocale = detectedLocale.toLowerCase();
2874
+ }
2875
+ for (const item of domainItems) {
2876
+ var _item_domain, _item_locales;
2877
+ const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
2878
+ if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) {
2879
+ return item;
2880
+ }
2881
+ }
2882
+ }
2883
+ }
2884
+ });
2885
+
2886
+ // ../../node_modules/next/dist/client/detect-domain-locale.js
2887
+ var require_detect_domain_locale2 = __commonJS({
2888
+ "../../node_modules/next/dist/client/detect-domain-locale.js"(exports, module) {
2889
+ "use strict";
2890
+ Object.defineProperty(exports, "__esModule", {
2891
+ value: true
2892
+ });
2893
+ Object.defineProperty(exports, "detectDomainLocale", {
2894
+ enumerable: true,
2895
+ get: function() {
2896
+ return detectDomainLocale;
2897
+ }
2898
+ });
2899
+ var detectDomainLocale = function() {
2900
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2901
+ args[_key] = arguments[_key];
2902
+ }
2903
+ if (process.env.__NEXT_I18N_SUPPORT) {
2904
+ return require_detect_domain_locale().detectDomainLocale(...args);
2905
+ }
2906
+ };
2907
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2908
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2909
+ Object.assign(exports.default, exports);
2910
+ module.exports = exports.default;
2911
+ }
2912
+ }
2913
+ });
2914
+
2915
+ // ../../node_modules/next/dist/client/get-domain-locale.js
2916
+ var require_get_domain_locale = __commonJS({
2917
+ "../../node_modules/next/dist/client/get-domain-locale.js"(exports, module) {
2918
+ "use strict";
2919
+ Object.defineProperty(exports, "__esModule", {
2920
+ value: true
2921
+ });
2922
+ Object.defineProperty(exports, "getDomainLocale", {
2923
+ enumerable: true,
2924
+ get: function() {
2925
+ return getDomainLocale;
2926
+ }
2927
+ });
2928
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2929
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2930
+ function getDomainLocale(path, locale, locales, domainLocales) {
2931
+ if (process.env.__NEXT_I18N_SUPPORT) {
2932
+ const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
2933
+ const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
2934
+ const target = locale || normalizeLocalePath(path, locales).detectedLocale;
2935
+ const domain = detectDomainLocale(domainLocales, void 0, target);
2936
+ if (domain) {
2937
+ const proto = "http" + (domain.http ? "" : "s") + "://";
2938
+ const finalLocale = target === domain.defaultLocale ? "" : "/" + target;
2939
+ return "" + proto + domain.domain + (0, _normalizetrailingslash.normalizePathTrailingSlash)("" + basePath + finalLocale + path);
2940
+ }
2941
+ return false;
2942
+ } else {
2943
+ return false;
2944
+ }
2945
+ }
2946
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2947
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2948
+ Object.assign(exports.default, exports);
2949
+ module.exports = exports.default;
2950
+ }
2951
+ }
2952
+ });
2953
+
2954
+ // ../../node_modules/next/dist/client/add-base-path.js
2955
+ var require_add_base_path = __commonJS({
2956
+ "../../node_modules/next/dist/client/add-base-path.js"(exports, module) {
2957
+ "use strict";
2958
+ Object.defineProperty(exports, "__esModule", {
2959
+ value: true
2960
+ });
2961
+ Object.defineProperty(exports, "addBasePath", {
2962
+ enumerable: true,
2963
+ get: function() {
2964
+ return addBasePath;
2965
+ }
2966
+ });
2967
+ var _addpathprefix = require_add_path_prefix();
2968
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2969
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2970
+ function addBasePath(path, required) {
2971
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
2972
+ }
2973
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2974
+ Object.defineProperty(exports.default, "__esModule", { value: true });
2975
+ Object.assign(exports.default, exports);
2976
+ module.exports = exports.default;
2977
+ }
2978
+ }
2979
+ });
2980
+
2981
+ // ../../node_modules/next/dist/client/use-merged-ref.js
2982
+ var require_use_merged_ref = __commonJS({
2983
+ "../../node_modules/next/dist/client/use-merged-ref.js"(exports, module) {
2984
+ "use strict";
2985
+ Object.defineProperty(exports, "__esModule", {
2986
+ value: true
2987
+ });
2988
+ Object.defineProperty(exports, "useMergedRef", {
2989
+ enumerable: true,
2990
+ get: function() {
2991
+ return useMergedRef;
2992
+ }
2993
+ });
2994
+ var _react = __require("react");
2995
+ function useMergedRef(refA, refB) {
2996
+ const cleanupA = (0, _react.useRef)(null);
2997
+ const cleanupB = (0, _react.useRef)(null);
2998
+ return (0, _react.useCallback)((current) => {
2999
+ if (current === null) {
3000
+ const cleanupFnA = cleanupA.current;
3001
+ if (cleanupFnA) {
3002
+ cleanupA.current = null;
3003
+ cleanupFnA();
3004
+ }
3005
+ const cleanupFnB = cleanupB.current;
3006
+ if (cleanupFnB) {
3007
+ cleanupB.current = null;
3008
+ cleanupFnB();
3009
+ }
3010
+ } else {
3011
+ if (refA) {
3012
+ cleanupA.current = applyRef(refA, current);
3013
+ }
3014
+ if (refB) {
3015
+ cleanupB.current = applyRef(refB, current);
3016
+ }
3017
+ }
3018
+ }, [
3019
+ refA,
3020
+ refB
3021
+ ]);
3022
+ }
3023
+ function applyRef(refA, current) {
3024
+ if (typeof refA === "function") {
3025
+ const cleanup = refA(current);
3026
+ if (typeof cleanup === "function") {
3027
+ return cleanup;
3028
+ } else {
3029
+ return () => refA(null);
3030
+ }
3031
+ } else {
3032
+ refA.current = current;
3033
+ return () => {
3034
+ refA.current = null;
3035
+ };
3036
+ }
3037
+ }
3038
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
3039
+ Object.defineProperty(exports.default, "__esModule", { value: true });
3040
+ Object.assign(exports.default, exports);
3041
+ module.exports = exports.default;
3042
+ }
3043
+ }
3044
+ });
3045
+
3046
+ // ../../node_modules/next/dist/shared/lib/utils/error-once.js
3047
+ var require_error_once = __commonJS({
3048
+ "../../node_modules/next/dist/shared/lib/utils/error-once.js"(exports) {
3049
+ "use strict";
3050
+ Object.defineProperty(exports, "__esModule", {
3051
+ value: true
3052
+ });
3053
+ Object.defineProperty(exports, "errorOnce", {
3054
+ enumerable: true,
3055
+ get: function() {
3056
+ return errorOnce;
3057
+ }
3058
+ });
3059
+ var errorOnce = (_) => {
3060
+ };
3061
+ if (process.env.NODE_ENV !== "production") {
3062
+ const errors = /* @__PURE__ */ new Set();
3063
+ errorOnce = (msg) => {
3064
+ if (!errors.has(msg)) {
3065
+ console.error(msg);
3066
+ }
3067
+ errors.add(msg);
3068
+ };
3069
+ }
3070
+ }
3071
+ });
3072
+
3073
+ // ../../node_modules/next/dist/client/link.js
3074
+ var require_link = __commonJS({
3075
+ "../../node_modules/next/dist/client/link.js"(exports, module) {
3076
+ "use strict";
3077
+ "use client";
3078
+ Object.defineProperty(exports, "__esModule", {
3079
+ value: true
3080
+ });
3081
+ function _export(target, all) {
3082
+ for (var name in all) Object.defineProperty(target, name, {
3083
+ enumerable: true,
3084
+ get: all[name]
3085
+ });
3086
+ }
3087
+ _export(exports, {
3088
+ default: function() {
3089
+ return _default;
3090
+ },
3091
+ useLinkStatus: function() {
3092
+ return useLinkStatus;
3093
+ }
3094
+ });
3095
+ var _interop_require_wildcard = require_interop_require_wildcard();
3096
+ var _jsxruntime = __require("react/jsx-runtime");
3097
+ var _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
3098
+ var _resolvehref = require_resolve_href();
3099
+ var _islocalurl = require_is_local_url();
3100
+ var _formaturl = require_format_url();
3101
+ var _utils = require_utils();
3102
+ var _addlocale = require_add_locale2();
3103
+ var _routercontextsharedruntime = require_router_context_shared_runtime();
3104
+ var _useintersection = require_use_intersection();
3105
+ var _getdomainlocale = require_get_domain_locale();
3106
+ var _addbasepath = require_add_base_path();
3107
+ var _usemergedref = require_use_merged_ref();
3108
+ var _erroronce = require_error_once();
3109
+ var prefetched = /* @__PURE__ */ new Set();
3110
+ function prefetch(router, href, as, options) {
3111
+ if (typeof window === "undefined") {
3112
+ return;
3113
+ }
3114
+ if (!(0, _islocalurl.isLocalURL)(href)) {
3115
+ return;
3116
+ }
3117
+ if (!options.bypassPrefetchedCheck) {
3118
+ const locale = (
3119
+ // Let the link's locale prop override the default router locale.
3120
+ typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
3121
+ );
3122
+ const prefetchedKey = href + "%" + as + "%" + locale;
3123
+ if (prefetched.has(prefetchedKey)) {
3124
+ return;
3125
+ }
3126
+ prefetched.add(prefetchedKey);
3127
+ }
3128
+ router.prefetch(href, as, options).catch((err) => {
3129
+ if (process.env.NODE_ENV !== "production") {
3130
+ throw err;
3131
+ }
3132
+ });
3133
+ }
3134
+ function isModifiedEvent(event) {
3135
+ const eventTarget = event.currentTarget;
3136
+ const target = eventTarget.getAttribute("target");
3137
+ return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
3138
+ event.nativeEvent && event.nativeEvent.which === 2;
3139
+ }
3140
+ function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
3141
+ const { nodeName } = e.currentTarget;
3142
+ const isAnchorNodeName = nodeName.toUpperCase() === "A";
3143
+ if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
3144
+ return;
3145
+ }
3146
+ if (!(0, _islocalurl.isLocalURL)(href)) {
3147
+ if (replace) {
3148
+ e.preventDefault();
3149
+ location.replace(href);
3150
+ }
3151
+ return;
3152
+ }
3153
+ e.preventDefault();
3154
+ const navigate = () => {
3155
+ if (onNavigate) {
3156
+ let isDefaultPrevented = false;
3157
+ onNavigate({
3158
+ preventDefault: () => {
3159
+ isDefaultPrevented = true;
3160
+ }
3161
+ });
3162
+ if (isDefaultPrevented) {
3163
+ return;
3164
+ }
3165
+ }
3166
+ const routerScroll = scroll != null ? scroll : true;
3167
+ if ("beforePopState" in router) {
3168
+ router[replace ? "replace" : "push"](href, as, {
3169
+ shallow,
3170
+ locale,
3171
+ scroll: routerScroll
3172
+ });
3173
+ } else {
3174
+ router[replace ? "replace" : "push"](as || href, {
3175
+ scroll: routerScroll
3176
+ });
3177
+ }
3178
+ };
3179
+ navigate();
3180
+ }
3181
+ function formatStringOrUrl(urlObjOrString) {
3182
+ if (typeof urlObjOrString === "string") {
3183
+ return urlObjOrString;
3184
+ }
3185
+ return (0, _formaturl.formatUrl)(urlObjOrString);
3186
+ }
3187
+ var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
3188
+ let children;
3189
+ 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;
3190
+ children = childrenProp;
3191
+ if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
3192
+ children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3193
+ children
3194
+ });
3195
+ }
3196
+ const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
3197
+ const prefetchEnabled = prefetchProp !== false;
3198
+ if (process.env.NODE_ENV !== "production") {
3199
+ let createPropError = function(args) {
3200
+ 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", {
3201
+ value: "E319",
3202
+ enumerable: false,
3203
+ configurable: true
3204
+ });
3205
+ };
3206
+ const requiredPropsGuard = {
3207
+ href: true
3208
+ };
3209
+ const requiredProps = Object.keys(requiredPropsGuard);
3210
+ requiredProps.forEach((key) => {
3211
+ if (key === "href") {
3212
+ if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
3213
+ throw createPropError({
3214
+ key,
3215
+ expected: "`string` or `object`",
3216
+ actual: props[key] === null ? "null" : typeof props[key]
3217
+ });
3218
+ }
3219
+ } else {
3220
+ const _ = key;
3221
+ }
3222
+ });
3223
+ const optionalPropsGuard = {
3224
+ as: true,
3225
+ replace: true,
3226
+ scroll: true,
3227
+ shallow: true,
3228
+ passHref: true,
3229
+ prefetch: true,
3230
+ locale: true,
3231
+ onClick: true,
3232
+ onMouseEnter: true,
3233
+ onTouchStart: true,
3234
+ legacyBehavior: true,
3235
+ onNavigate: true
3236
+ };
3237
+ const optionalProps = Object.keys(optionalPropsGuard);
3238
+ optionalProps.forEach((key) => {
3239
+ const valType = typeof props[key];
3240
+ if (key === "as") {
3241
+ if (props[key] && valType !== "string" && valType !== "object") {
3242
+ throw createPropError({
3243
+ key,
3244
+ expected: "`string` or `object`",
3245
+ actual: valType
3246
+ });
3247
+ }
3248
+ } else if (key === "locale") {
3249
+ if (props[key] && valType !== "string") {
3250
+ throw createPropError({
3251
+ key,
3252
+ expected: "`string`",
3253
+ actual: valType
3254
+ });
3255
+ }
3256
+ } else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
3257
+ if (props[key] && valType !== "function") {
3258
+ throw createPropError({
3259
+ key,
3260
+ expected: "`function`",
3261
+ actual: valType
3262
+ });
3263
+ }
3264
+ } else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
3265
+ if (props[key] != null && valType !== "boolean") {
3266
+ throw createPropError({
3267
+ key,
3268
+ expected: "`boolean`",
3269
+ actual: valType
3270
+ });
3271
+ }
3272
+ } else if (key === "prefetch") {
3273
+ if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
3274
+ throw createPropError({
3275
+ key,
3276
+ expected: '`boolean | "auto"`',
3277
+ actual: valType
3278
+ });
3279
+ }
3280
+ } else {
3281
+ const _ = key;
3282
+ }
3283
+ });
3284
+ }
3285
+ const { href, as } = _react.default.useMemo(() => {
3286
+ if (!router) {
3287
+ const resolvedHref2 = formatStringOrUrl(hrefProp);
3288
+ return {
3289
+ href: resolvedHref2,
3290
+ as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
3291
+ };
3292
+ }
3293
+ const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
3294
+ return {
3295
+ href: resolvedHref,
3296
+ as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
3297
+ };
3298
+ }, [
3299
+ router,
3300
+ hrefProp,
3301
+ asProp
3302
+ ]);
3303
+ const previousHref = _react.default.useRef(href);
3304
+ const previousAs = _react.default.useRef(as);
3305
+ let child;
3306
+ if (legacyBehavior) {
3307
+ if (process.env.NODE_ENV === "development") {
3308
+ if (onClick) {
3309
+ 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');
3310
+ }
3311
+ if (onMouseEnterProp) {
3312
+ 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');
3313
+ }
3314
+ try {
3315
+ child = _react.default.Children.only(children);
3316
+ } catch (err) {
3317
+ if (!children) {
3318
+ 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", {
3319
+ value: "E320",
3320
+ enumerable: false,
3321
+ configurable: true
3322
+ });
3323
+ }
3324
+ 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", {
3325
+ value: "E266",
3326
+ enumerable: false,
3327
+ configurable: true
3328
+ });
3329
+ }
3330
+ } else {
3331
+ child = _react.default.Children.only(children);
3332
+ }
3333
+ } else {
3334
+ if (process.env.NODE_ENV === "development") {
3335
+ if ((children == null ? void 0 : children.type) === "a") {
3336
+ 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", {
3337
+ value: "E209",
3338
+ enumerable: false,
3339
+ configurable: true
3340
+ });
3341
+ }
3342
+ }
3343
+ }
3344
+ const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
3345
+ const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
3346
+ rootMargin: "200px"
3347
+ });
3348
+ const setIntersectionWithResetRef = _react.default.useCallback((el) => {
3349
+ if (previousAs.current !== as || previousHref.current !== href) {
3350
+ resetVisible();
3351
+ previousAs.current = as;
3352
+ previousHref.current = href;
3353
+ }
3354
+ setIntersectionRef(el);
3355
+ }, [
3356
+ as,
3357
+ href,
3358
+ resetVisible,
3359
+ setIntersectionRef
3360
+ ]);
3361
+ const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
3362
+ _react.default.useEffect(() => {
3363
+ if (process.env.NODE_ENV !== "production") {
3364
+ return;
3365
+ }
3366
+ if (!router) {
3367
+ return;
3368
+ }
3369
+ if (!isVisible || !prefetchEnabled) {
3370
+ return;
3371
+ }
3372
+ prefetch(router, href, as, {
3373
+ locale
3374
+ });
3375
+ }, [
3376
+ as,
3377
+ href,
3378
+ isVisible,
3379
+ locale,
3380
+ prefetchEnabled,
3381
+ router == null ? void 0 : router.locale,
3382
+ router
3383
+ ]);
3384
+ const childProps = {
3385
+ ref: setRef,
3386
+ onClick(e) {
3387
+ if (process.env.NODE_ENV !== "production") {
3388
+ if (!e) {
3389
+ throw Object.defineProperty(new Error('Component rendered inside next/link has to pass click event to "onClick" prop.'), "__NEXT_ERROR_CODE", {
3390
+ value: "E312",
3391
+ enumerable: false,
3392
+ configurable: true
3393
+ });
3394
+ }
3395
+ }
3396
+ if (!legacyBehavior && typeof onClick === "function") {
3397
+ onClick(e);
3398
+ }
3399
+ if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
3400
+ child.props.onClick(e);
3401
+ }
3402
+ if (!router) {
3403
+ return;
3404
+ }
3405
+ if (e.defaultPrevented) {
3406
+ return;
3407
+ }
3408
+ linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
3409
+ },
3410
+ onMouseEnter(e) {
3411
+ if (!legacyBehavior && typeof onMouseEnterProp === "function") {
3412
+ onMouseEnterProp(e);
3413
+ }
3414
+ if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
3415
+ child.props.onMouseEnter(e);
3416
+ }
3417
+ if (!router) {
3418
+ return;
3419
+ }
3420
+ prefetch(router, href, as, {
3421
+ locale,
3422
+ priority: true,
3423
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3424
+ bypassPrefetchedCheck: true
3425
+ });
3426
+ },
3427
+ onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
3428
+ if (!legacyBehavior && typeof onTouchStartProp === "function") {
3429
+ onTouchStartProp(e);
3430
+ }
3431
+ if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
3432
+ child.props.onTouchStart(e);
3433
+ }
3434
+ if (!router) {
3435
+ return;
3436
+ }
3437
+ prefetch(router, href, as, {
3438
+ locale,
3439
+ priority: true,
3440
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3441
+ bypassPrefetchedCheck: true
3442
+ });
3443
+ }
3444
+ };
3445
+ if ((0, _utils.isAbsoluteUrl)(as)) {
3446
+ childProps.href = as;
3447
+ } else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
3448
+ const curLocale = typeof locale !== "undefined" ? locale : router == null ? void 0 : router.locale;
3449
+ const localeDomain = (router == null ? void 0 : router.isLocaleDomain) && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router == null ? void 0 : router.locales, router == null ? void 0 : router.domainLocales);
3450
+ childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router == null ? void 0 : router.defaultLocale));
3451
+ }
3452
+ if (legacyBehavior) {
3453
+ if (process.env.NODE_ENV === "development") {
3454
+ (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");
3455
+ }
3456
+ return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
3457
+ }
3458
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3459
+ ...restProps,
3460
+ ...childProps,
3461
+ children
3462
+ });
3463
+ });
3464
+ var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
3465
+ // We do not support link status in the Pages Router, so we always return false
3466
+ pending: false
3467
+ });
3468
+ var useLinkStatus = () => {
3469
+ return (0, _react.useContext)(LinkStatusContext);
3470
+ };
3471
+ var _default = Link2;
3472
+ if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
3473
+ Object.defineProperty(exports.default, "__esModule", { value: true });
3474
+ Object.assign(exports.default, exports);
3475
+ module.exports = exports.default;
3476
+ }
3477
+ }
3478
+ });
3479
+
3480
+ // ../../node_modules/next/link.js
3481
+ var require_link2 = __commonJS({
3482
+ "../../node_modules/next/link.js"(exports, module) {
3483
+ "use strict";
3484
+ module.exports = require_link();
3485
+ }
3486
+ });
3487
+
1
3488
  // src/button/colors.tsx
2
3489
  var catColor = {
3
3490
  white: "bg-white text-black",
@@ -144,7 +3631,7 @@ function ArrowDownIcon() {
144
3631
  }
145
3632
 
146
3633
  // src/container/index.tsx
147
- import Link from "next/link";
3634
+ var import_link = __toESM(require_link2());
148
3635
  import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
149
3636
  function Container({
150
3637
  children,
@@ -170,7 +3657,7 @@ function Container({
170
3657
  }
171
3658
  }, []);
172
3659
  return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col h-screen", children: [
173
- /* @__PURE__ */ jsxs2("header", { className: "z-40", children: [
3660
+ /* @__PURE__ */ jsxs2("header", { className: "", children: [
174
3661
  /* @__PURE__ */ jsxs2("div", { className: "bg-blue-600 text-white p-4 flex justify-between items-center shadow-md", children: [
175
3662
  /* @__PURE__ */ jsx3(
176
3663
  "button",
@@ -194,7 +3681,7 @@ function Container({
194
3681
  ...navItems
195
3682
  ].map((li, k) => {
196
3683
  return li && /* @__PURE__ */ jsxs2(
197
- Link,
3684
+ import_link.default,
198
3685
  {
199
3686
  href: li.location,
200
3687
  className: "flex gap-1 p-1 items-center",
@@ -238,7 +3725,7 @@ function Container({
238
3725
  const letra = `${itemMenu == null ? void 0 : itemMenu.name}`.split("")[0];
239
3726
  const icon = /* @__PURE__ */ jsx3(Fragment, { children: (itemMenu == null ? void 0 : itemMenu.icon) || /* @__PURE__ */ jsx3("span", { className: "px-1 border shadow rounded", children: letra }) });
240
3727
  return /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsxs2(
241
- Link,
3728
+ import_link.default,
242
3729
  {
243
3730
  href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
244
3731
  children: [
@@ -33282,78 +36769,344 @@ function Select({
33282
36769
  }
33283
36770
 
33284
36771
  // src/modal/index.tsx
33285
- import React6, { useState as useState8 } from "react";
36772
+ import React6, { cloneElement as cloneElement2 } from "react";
33286
36773
 
33287
- // src/modal/close.tsx
33288
- import { jsx as jsx11 } from "react/jsx-runtime";
33289
- function CloseIcon2() {
33290
- return /* @__PURE__ */ jsx11(
33291
- "svg",
36774
+ // src/pop/index.tsx
36775
+ import { useState as useState8, useCallback } from "react";
36776
+
36777
+ // src/pop/actions.tsx
36778
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
36779
+ function PopupActions({
36780
+ type,
36781
+ confirm,
36782
+ focusRing,
36783
+ onConfirm,
36784
+ onCancel
36785
+ }) {
36786
+ const showCancel = type === "confirm" || type === "prompt";
36787
+ return /* @__PURE__ */ jsxs8("div", { className: "flex gap-2 px-6 py-4 justify-end", children: [
36788
+ showCancel && /* @__PURE__ */ jsx11(
36789
+ "button",
36790
+ {
36791
+ onClick: onCancel,
36792
+ className: "px-4 py-2 rounded-lg text-sm font-medium bg-white border border-gray-200 text-gray-600 hover:bg-gray-50 transition",
36793
+ children: "Cancelar"
36794
+ }
36795
+ ),
36796
+ /* @__PURE__ */ jsx11(
36797
+ "button",
36798
+ {
36799
+ onClick: onConfirm,
36800
+ className: `px-5 py-2 rounded-lg text-sm font-semibold text-white ${confirm} transition focus:outline-none focus:ring-2 ${focusRing}`,
36801
+ children: "Aceptar"
36802
+ }
36803
+ )
36804
+ ] });
36805
+ }
36806
+
36807
+ // src/pop/color.tsx
36808
+ var COLOR_CONFIG = {
36809
+ primary: {
36810
+ bg: "from-blue-50 to-indigo-50",
36811
+ iconBg: "bg-blue-100",
36812
+ iconText: "text-blue-600",
36813
+ border: "border-blue-200",
36814
+ confirm: "bg-blue-600 hover:bg-blue-700",
36815
+ focusRing: "focus:ring-blue-300",
36816
+ label: "\u2139"
36817
+ },
36818
+ info: {
36819
+ bg: "from-sky-50 to-cyan-50",
36820
+ iconBg: "bg-sky-100",
36821
+ iconText: "text-sky-600",
36822
+ border: "border-sky-200",
36823
+ confirm: "bg-sky-600 hover:bg-sky-700",
36824
+ focusRing: "focus:ring-sky-300",
36825
+ label: "\u2139"
36826
+ },
36827
+ success: {
36828
+ bg: "from-emerald-50 to-green-50",
36829
+ iconBg: "bg-emerald-100",
36830
+ iconText: "text-emerald-600",
36831
+ border: "border-emerald-200",
36832
+ confirm: "bg-emerald-600 hover:bg-emerald-700",
36833
+ focusRing: "focus:ring-emerald-300",
36834
+ label: "\u2713"
36835
+ },
36836
+ warning: {
36837
+ bg: "from-amber-50 to-yellow-50",
36838
+ iconBg: "bg-amber-100",
36839
+ iconText: "text-amber-600",
36840
+ border: "border-amber-200",
36841
+ confirm: "bg-amber-500 hover:bg-amber-600",
36842
+ focusRing: "focus:ring-amber-300",
36843
+ label: "\u26A0"
36844
+ },
36845
+ danger: {
36846
+ bg: "from-red-50 to-rose-50",
36847
+ iconBg: "bg-red-100",
36848
+ iconText: "text-red-600",
36849
+ border: "border-red-200",
36850
+ confirm: "bg-red-600 hover:bg-red-700",
36851
+ focusRing: "focus:ring-red-300",
36852
+ label: "\u2715"
36853
+ },
36854
+ secondary: {
36855
+ bg: "from-slate-50 to-gray-50",
36856
+ iconBg: "bg-slate-100",
36857
+ iconText: "text-slate-600",
36858
+ border: "border-slate-200",
36859
+ confirm: "bg-slate-700 hover:bg-slate-800",
36860
+ focusRing: "focus:ring-slate-300",
36861
+ label: "\u25CE"
36862
+ },
36863
+ white: {
36864
+ bg: "from-gray-50 to-white",
36865
+ iconBg: "bg-gray-100",
36866
+ iconText: "text-gray-500",
36867
+ border: "border-gray-200",
36868
+ confirm: "bg-gray-700 hover:bg-gray-800",
36869
+ focusRing: "focus:ring-gray-300",
36870
+ label: "\u25CE"
36871
+ }
36872
+ };
36873
+
36874
+ // src/pop/icon.tsx
36875
+ import { jsx as jsx12 } from "react/jsx-runtime";
36876
+ function PopupIcon({ label, iconBg, iconText }) {
36877
+ return /* @__PURE__ */ jsx12(
36878
+ "div",
33292
36879
  {
33293
- stroke: "currentColor",
33294
- fill: "currentColor",
33295
- strokeWidth: "0",
33296
- viewBox: "0 0 512 512",
33297
- height: "20px",
33298
- width: "20px",
33299
- xmlns: "http://www.w3.org/2000/svg",
33300
- children: /* @__PURE__ */ jsx11("path", { d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64-64 64L169.37 320l64-64-64-64L192 169.37l64 64 64-64L342.63 192l-64 64z" })
36880
+ className: `w-12 h-12 rounded-full ${iconBg} flex items-center justify-center`,
36881
+ children: /* @__PURE__ */ jsx12("span", { className: `text-xl font-bold ${iconText}`, children: label })
33301
36882
  }
33302
36883
  );
33303
36884
  }
33304
36885
 
33305
- // src/modal/index.tsx
33306
- import { Dialog as Dialog2 } from "@mui/material";
33307
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
33308
- function Modal({ button, children, ref, title = "" }) {
33309
- const [open, setOpen] = useState8(false);
33310
- function show() {
33311
- setOpen(true);
33312
- }
33313
- function hide() {
33314
- setOpen(false);
33315
- }
33316
- return /* @__PURE__ */ jsxs8(Fragment2, { children: [
33317
- React6.Children.map(button, (child) => {
33318
- if (React6.isValidElement(child)) {
33319
- const { type, props } = child;
33320
- return React6.createElement(type, {
33321
- ...props,
33322
- onClick: (e) => {
33323
- var _a, _b;
33324
- show();
33325
- (_b = (_a = child.props) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a, e);
36886
+ // src/pop/input.tsx
36887
+ import { jsx as jsx13 } from "react/jsx-runtime";
36888
+ function PromptInput({
36889
+ value,
36890
+ border,
36891
+ focusRing,
36892
+ onChange,
36893
+ onEnter
36894
+ }) {
36895
+ return /* @__PURE__ */ jsx13("div", { className: "px-8 pb-2", children: /* @__PURE__ */ jsx13(
36896
+ "input",
36897
+ {
36898
+ autoFocus: true,
36899
+ type: "text",
36900
+ value,
36901
+ onChange: (e) => onChange(e.target.value),
36902
+ onKeyDown: (e) => e.key === "Enter" && onEnter(),
36903
+ className: `
36904
+ w-full px-3 py-2 rounded-lg border ${border} bg-white
36905
+ text-sm text-gray-800 outline-none
36906
+ focus:ring-2 ${focusRing} transition
36907
+ `,
36908
+ placeholder: "Escribe aqu\xED..."
36909
+ }
36910
+ ) });
36911
+ }
36912
+
36913
+ // src/pop/overlay.tsx
36914
+ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
36915
+ function PopupOverlay({
36916
+ popup,
36917
+ onClose,
36918
+ onInputChange
36919
+ }) {
36920
+ const c = COLOR_CONFIG[popup.color];
36921
+ const resolvedMessage = typeof popup.message === "function" ? popup.message() : popup.message;
36922
+ return /* @__PURE__ */ jsxs9(
36923
+ "div",
36924
+ {
36925
+ className: "fixed inset-0 flex items-center justify-center z-[1000] ",
36926
+ style: { background: "rgba(15,23,42,0.45)", backdropFilter: "blur(2px)" },
36927
+ onClick: (e) => {
36928
+ var _a;
36929
+ if (e.target === e.currentTarget) {
36930
+ onClose(false);
36931
+ (_a = popup.onCancel) == null ? void 0 : _a.call(popup);
36932
+ }
36933
+ },
36934
+ children: [
36935
+ /* @__PURE__ */ jsx14("style", { children: `
36936
+ @keyframes fadeInScale {
36937
+ from { opacity: 0; transform: scale(0.93) translateY(8px); }
36938
+ to { opacity: 1; transform: scale(1) translateY(0); }
36939
+ }
36940
+ ` }),
36941
+ /* @__PURE__ */ jsxs9(
36942
+ "div",
36943
+ {
36944
+ className: `bg-gradient-to-br ${c.bg} border ${c.border} ${popup.full == true ? " w-full h-screen m-20 " : " max-w-sm "} rounded-2xl shadow-2xl mx-4`,
36945
+ style: { animation: "fadeInScale 0.18s ease-out" },
36946
+ children: [
36947
+ /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-center gap-3 px-8 pt-8 pb-5 text-center ", children: [
36948
+ (popup == null ? void 0 : popup.icons) == true && /* @__PURE__ */ jsx14(
36949
+ PopupIcon,
36950
+ {
36951
+ label: c.label,
36952
+ iconBg: c.iconBg,
36953
+ iconText: c.iconText
36954
+ }
36955
+ ),
36956
+ /* @__PURE__ */ jsx14("div", { className: "w-full flex justify-end", children: /* @__PURE__ */ jsx14(Button, { color: "danger", onClick: (e) => onClose(false), children: "X" }) }),
36957
+ /* @__PURE__ */ jsx14(
36958
+ "div",
36959
+ {
36960
+ className: "text-gray-800 text-[15px] font-medium leading-snug ",
36961
+ children: resolvedMessage
36962
+ }
36963
+ )
36964
+ ] }),
36965
+ popup.type === "prompt" && /* @__PURE__ */ jsx14(
36966
+ PromptInput,
36967
+ {
36968
+ value: popup.inputValue,
36969
+ border: c.border,
36970
+ focusRing: c.focusRing,
36971
+ onChange: onInputChange,
36972
+ onEnter: () => onClose(true, popup.inputValue)
36973
+ }
36974
+ ),
36975
+ /* @__PURE__ */ jsx14("div", { className: `border-t ${c.border} mt-4` }),
36976
+ popup.type !== "modal" && /* @__PURE__ */ jsx14(
36977
+ PopupActions,
36978
+ {
36979
+ type: popup.type,
36980
+ confirm: c.confirm,
36981
+ focusRing: c.focusRing,
36982
+ onConfirm: () => onClose(true, popup.inputValue),
36983
+ onCancel: () => onClose(false)
36984
+ }
36985
+ )
36986
+ ]
33326
36987
  }
33327
- });
36988
+ )
36989
+ ]
36990
+ }
36991
+ );
36992
+ }
36993
+
36994
+ // src/pop/index.tsx
36995
+ import { jsx as jsx15 } from "react/jsx-runtime";
36996
+ var INITIAL_STATE = {
36997
+ type: "alert",
36998
+ message: "",
36999
+ visible: false,
37000
+ inputValue: "",
37001
+ color: "primary",
37002
+ icons: true,
37003
+ full: false
37004
+ };
37005
+ function usePopup() {
37006
+ const [popup, setPopup] = useState8(INITIAL_STATE);
37007
+ const open = useCallback(
37008
+ (partial) => {
37009
+ setPopup({ ...partial, visible: true, inputValue: "" });
37010
+ },
37011
+ []
37012
+ );
37013
+ const close = useCallback((confirmed, value) => {
37014
+ setPopup((prev) => {
37015
+ var _a, _b;
37016
+ if (confirmed) (_a = prev.onConfirm) == null ? void 0 : _a.call(prev, value);
37017
+ else (_b = prev.onCancel) == null ? void 0 : _b.call(prev);
37018
+ return { ...prev, visible: false, inputValue: "" };
37019
+ });
37020
+ }, []);
37021
+ const alert2 = useCallback(
37022
+ (message, color = "primary") => new Promise(
37023
+ (resolve) => open({
37024
+ type: "alert",
37025
+ message,
37026
+ color,
37027
+ onConfirm: () => resolve(),
37028
+ onCancel: () => resolve()
37029
+ })
37030
+ ),
37031
+ [open]
37032
+ );
37033
+ const modal = useCallback(
37034
+ (message, color = "primary", icons = true, full = false) => new Promise(
37035
+ (resolve) => open({
37036
+ type: "modal",
37037
+ message,
37038
+ color,
37039
+ onConfirm: () => resolve(),
37040
+ onCancel: () => resolve(),
37041
+ icons,
37042
+ full
37043
+ })
37044
+ ),
37045
+ [open]
37046
+ );
37047
+ const confirm = useCallback(
37048
+ (message, color = "primary") => new Promise(
37049
+ (resolve) => open({
37050
+ type: "confirm",
37051
+ message,
37052
+ color,
37053
+ onConfirm: () => resolve(true),
37054
+ onCancel: () => resolve(false)
37055
+ })
37056
+ ),
37057
+ [open]
37058
+ );
37059
+ const prompt = useCallback(
37060
+ (message, color = "primary") => new Promise(
37061
+ (resolve) => open({
37062
+ type: "prompt",
37063
+ message,
37064
+ color,
37065
+ onConfirm: (value) => resolve(value != null ? value : ""),
37066
+ onCancel: () => resolve(null)
37067
+ })
37068
+ ),
37069
+ [open]
37070
+ );
37071
+ const PopupComponent = popup.visible ? /* @__PURE__ */ jsx15(
37072
+ PopupOverlay,
37073
+ {
37074
+ popup,
37075
+ onClose: close,
37076
+ onInputChange: (v) => setPopup((prev) => ({ ...prev, inputValue: v }))
37077
+ }
37078
+ ) : null;
37079
+ return { alert: alert2, confirm, prompt, modal, PopupComponent, close };
37080
+ }
37081
+
37082
+ // src/modal/index.tsx
37083
+ import { Fragment as Fragment2, jsxs as jsxs10 } from "react/jsx-runtime";
37084
+ function Modal({
37085
+ button,
37086
+ children,
37087
+ color = "primary"
37088
+ }) {
37089
+ const pop = usePopup();
37090
+ return /* @__PURE__ */ jsxs10(Fragment2, { children: [
37091
+ cloneElement2(button, {
37092
+ onClick: async (e) => {
37093
+ await pop.modal(
37094
+ React6.cloneElement(children, { hide: () => pop.close(false) }),
37095
+ color,
37096
+ false,
37097
+ true
37098
+ );
33328
37099
  }
33329
- return child;
33330
37100
  }),
33331
- /* @__PURE__ */ jsx12(Dialog2, { open, onClose: hide, fullWidth: true, maxWidth: "xl", children: /* @__PURE__ */ jsxs8("div", { className: "m-auto p-5", children: [
33332
- /* @__PURE__ */ jsx12(
33333
- "button",
33334
- {
33335
- onClick: hide,
33336
- className: "absolute top-0 right-0 text-red-500 ",
33337
- children: /* @__PURE__ */ jsx12(CloseIcon2, {})
33338
- }
33339
- ),
33340
- /* @__PURE__ */ jsx12("div", { className: "font-bold text-xl", children: title }),
33341
- /* @__PURE__ */ jsx12("div", { className: "flex flex-col gap-3 pt-6", children: React6.Children.map(children, (child) => {
33342
- if (React6.isValidElement(child)) {
33343
- const { type, props } = child;
33344
- return React6.createElement(type, { ...props, hide });
33345
- }
33346
- return child;
33347
- }) })
33348
- ] }) })
37101
+ pop.PopupComponent
33349
37102
  ] });
33350
37103
  }
33351
37104
 
33352
37105
  // src/pre/index.tsx
33353
- import { jsx as jsx13 } from "react/jsx-runtime";
37106
+ import { jsx as jsx16 } from "react/jsx-runtime";
33354
37107
  var Pre = ({ data }) => {
33355
37108
  const formatted = JSON.stringify(data, null, 2);
33356
- return /* @__PURE__ */ jsx13(
37109
+ return /* @__PURE__ */ jsx16(
33357
37110
  "pre",
33358
37111
  {
33359
37112
  style: {
@@ -33404,9 +37157,9 @@ import {
33404
37157
  import DatePicker from "react-datepicker";
33405
37158
 
33406
37159
  // src/calendar/calendar.icon.tsx
33407
- import { jsx as jsx14 } from "react/jsx-runtime";
37160
+ import { jsx as jsx17 } from "react/jsx-runtime";
33408
37161
  function CalendarIcon() {
33409
- return /* @__PURE__ */ jsx14(
37162
+ return /* @__PURE__ */ jsx17(
33410
37163
  "svg",
33411
37164
  {
33412
37165
  stroke: "currentColor",
@@ -33416,14 +37169,14 @@ function CalendarIcon() {
33416
37169
  height: "20px",
33417
37170
  width: "20px",
33418
37171
  xmlns: "http://www.w3.org/2000/svg",
33419
- children: /* @__PURE__ */ jsx14("path", { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" })
37172
+ children: /* @__PURE__ */ jsx17("path", { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" })
33420
37173
  }
33421
37174
  );
33422
37175
  }
33423
37176
 
33424
37177
  // src/calendar/index.tsx
33425
- import { Dialog as Dialog3 } from "@mui/material";
33426
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
37178
+ import { Dialog as Dialog2 } from "@mui/material";
37179
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
33427
37180
  function MyCalendar({
33428
37181
  enabledDates,
33429
37182
  onChange,
@@ -33454,20 +37207,20 @@ function MyCalendar({
33454
37207
  if (!(enabledDates == null ? void 0 : enabledDates.length)) {
33455
37208
  return null;
33456
37209
  }
33457
- return /* @__PURE__ */ jsxs9("div", { className: "relative", children: [
33458
- /* @__PURE__ */ jsxs9("label", { className: "flex flex-col gap-1", children: [
33459
- /* @__PURE__ */ jsxs9("div", { className: "font-bold", children: [
37210
+ return /* @__PURE__ */ jsxs11("div", { className: "relative", children: [
37211
+ /* @__PURE__ */ jsxs11("label", { className: "flex flex-col gap-1", children: [
37212
+ /* @__PURE__ */ jsxs11("div", { className: "font-bold", children: [
33460
37213
  label,
33461
37214
  " ",
33462
- (otherProps == null ? void 0 : otherProps.required) && /* @__PURE__ */ jsx15("span", { className: "text-red-500", children: "*" })
37215
+ (otherProps == null ? void 0 : otherProps.required) && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
33463
37216
  ] }),
33464
- /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsxs9(
37217
+ /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs11(
33465
37218
  "div",
33466
37219
  {
33467
37220
  className: "cursor-pointer flex items-center justify-center",
33468
37221
  onClick: (e) => setOpen(true),
33469
37222
  children: [
33470
- /* @__PURE__ */ jsx15(
37223
+ /* @__PURE__ */ jsx18(
33471
37224
  "input",
33472
37225
  {
33473
37226
  ...otherProps,
@@ -33482,13 +37235,13 @@ function MyCalendar({
33482
37235
  readOnly: true
33483
37236
  }
33484
37237
  ),
33485
- /* @__PURE__ */ jsx15("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx15(CalendarIcon, {}) })
37238
+ /* @__PURE__ */ jsx18("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx18(CalendarIcon, {}) })
33486
37239
  ]
33487
37240
  }
33488
37241
  ) })
33489
37242
  ] }),
33490
- /* @__PURE__ */ jsxs9(Dialog3, { open, children: [
33491
- /* @__PURE__ */ jsx15("div", { className: "flex justify-end p-5 font-bold", children: /* @__PURE__ */ jsx15(
37243
+ /* @__PURE__ */ jsxs11(Dialog2, { open, children: [
37244
+ /* @__PURE__ */ jsx18("div", { className: "flex justify-end p-5 font-bold", children: /* @__PURE__ */ jsx18(
33492
37245
  "button",
33493
37246
  {
33494
37247
  className: " border-lg w-[20px] bg-red-500 text-white shadow rounded",
@@ -33496,7 +37249,7 @@ function MyCalendar({
33496
37249
  children: "x"
33497
37250
  }
33498
37251
  ) }),
33499
- /* @__PURE__ */ jsx15("div", { className: " w-[300px] flex items-start justify-center h-[300px] p-5", children: /* @__PURE__ */ jsx15(
37252
+ /* @__PURE__ */ jsx18("div", { className: " w-[300px] flex items-start justify-center h-[300px] p-5", children: /* @__PURE__ */ jsx18(
33500
37253
  DatePicker,
33501
37254
  {
33502
37255
  inline: true,
@@ -33510,9 +37263,9 @@ function MyCalendar({
33510
37263
  }
33511
37264
 
33512
37265
  // src/doc-viewer/icon.tsx
33513
- import { jsx as jsx16 } from "react/jsx-runtime";
37266
+ import { jsx as jsx19 } from "react/jsx-runtime";
33514
37267
  function Icon() {
33515
- return /* @__PURE__ */ jsx16(
37268
+ return /* @__PURE__ */ jsx19(
33516
37269
  "svg",
33517
37270
  {
33518
37271
  stroke: "currentColor",
@@ -33522,13 +37275,13 @@ function Icon() {
33522
37275
  height: "200px",
33523
37276
  width: "200px",
33524
37277
  xmlns: "http://www.w3.org/2000/svg",
33525
- children: /* @__PURE__ */ jsx16("path", { d: "M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v88a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM108,130a50,50,0,0,0-46.66,32H60a34,34,0,0,0,0,68h48a50,50,0,0,0,0-100Zm0,88H60a22,22,0,0,1-1.65-43.94c-.06.47-.1.93-.15,1.4a6,6,0,1,0,12,1.08A38.57,38.57,0,0,1,71.3,170a5.71,5.71,0,0,0,.24-.86A38,38,0,1,1,108,218Z" })
37278
+ children: /* @__PURE__ */ jsx19("path", { d: "M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v88a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM108,130a50,50,0,0,0-46.66,32H60a34,34,0,0,0,0,68h48a50,50,0,0,0,0-100Zm0,88H60a22,22,0,0,1-1.65-43.94c-.06.47-.1.93-.15,1.4a6,6,0,1,0,12,1.08A38.57,38.57,0,0,1,71.3,170a5.71,5.71,0,0,0,.24-.86A38,38,0,1,1,108,218Z" })
33526
37279
  }
33527
37280
  );
33528
37281
  }
33529
37282
 
33530
37283
  // src/doc-viewer/index.tsx
33531
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
37284
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
33532
37285
  function DocumentViewer({ item }) {
33533
37286
  const { url, name, contentType, width = "100%", height = "100%" } = item;
33534
37287
  const isImage = contentType.startsWith("image/");
@@ -33537,10 +37290,10 @@ function DocumentViewer({ item }) {
33537
37290
  const viewerUrl = isGoogleDocCompatible ? `https://docs.google.com/gview?url=${encodeURIComponent(
33538
37291
  url
33539
37292
  )}&embedded=true` : url;
33540
- return /* @__PURE__ */ jsxs10("div", { className: "border shadow rounded p-2 h-[100%]", children: [
33541
- /* @__PURE__ */ jsxs10("div", { className: "mb-1 flex justify-between ", children: [
33542
- /* @__PURE__ */ jsx17("h3", { className: "font-bold", children: name }),
33543
- /* @__PURE__ */ jsx17(
37293
+ return /* @__PURE__ */ jsxs12("div", { className: "border shadow rounded p-2 h-[100%]", children: [
37294
+ /* @__PURE__ */ jsxs12("div", { className: "mb-1 flex justify-between ", children: [
37295
+ /* @__PURE__ */ jsx20("h3", { className: "font-bold", children: name }),
37296
+ /* @__PURE__ */ jsx20(
33544
37297
  "a",
33545
37298
  {
33546
37299
  href: url,
@@ -33552,7 +37305,7 @@ function DocumentViewer({ item }) {
33552
37305
  }
33553
37306
  )
33554
37307
  ] }),
33555
- isImage ? /* @__PURE__ */ jsx17(
37308
+ isImage ? /* @__PURE__ */ jsx20(
33556
37309
  "img",
33557
37310
  {
33558
37311
  src: url,
@@ -33565,7 +37318,7 @@ function DocumentViewer({ item }) {
33565
37318
  display: "block"
33566
37319
  }
33567
37320
  }
33568
- ) : isGoogleDocCompatible ? /* @__PURE__ */ jsx17(
37321
+ ) : isGoogleDocCompatible ? /* @__PURE__ */ jsx20(
33569
37322
  "iframe",
33570
37323
  {
33571
37324
  title: name,
@@ -33573,7 +37326,7 @@ function DocumentViewer({ item }) {
33573
37326
  style: { width, height, border: "none" },
33574
37327
  allowFullScreen: true
33575
37328
  }
33576
- ) : /* @__PURE__ */ jsx17(
37329
+ ) : /* @__PURE__ */ jsx20(
33577
37330
  "div",
33578
37331
  {
33579
37332
  style: {
@@ -33583,7 +37336,7 @@ function DocumentViewer({ item }) {
33583
37336
  objectFit: "cover",
33584
37337
  display: "block"
33585
37338
  },
33586
- children: /* @__PURE__ */ jsx17(Icon, {})
37339
+ children: /* @__PURE__ */ jsx20(Icon, {})
33587
37340
  }
33588
37341
  )
33589
37342
  ] });
@@ -33594,7 +37347,7 @@ import React9, {
33594
37347
  useEffect as useEffect8,
33595
37348
  useMemo as useMemo6,
33596
37349
  useReducer as useReducer2,
33597
- useRef as useRef6,
37350
+ useRef as useRef5,
33598
37351
  useState as useState12
33599
37352
  } from "react";
33600
37353
 
@@ -33602,9 +37355,9 @@ import React9, {
33602
37355
  import { useEffect as useEffect7, useMemo as useMemo4, useState as useState10 } from "react";
33603
37356
 
33604
37357
  // src/table3/filters.tsx
33605
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
37358
+ import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
33606
37359
  function FilterOffIcon() {
33607
- return /* @__PURE__ */ jsx18(
37360
+ return /* @__PURE__ */ jsx21(
33608
37361
  "svg",
33609
37362
  {
33610
37363
  stroke: "currentColor",
@@ -33614,12 +37367,12 @@ function FilterOffIcon() {
33614
37367
  height: "20px",
33615
37368
  width: "20px",
33616
37369
  xmlns: "http://www.w3.org/2000/svg",
33617
- children: /* @__PURE__ */ jsx18("path", { d: "M6.92893 0.514648L21.0711 14.6568L19.6569 16.071L15.834 12.2486L14 14.9999V21.9999H10V14.9999L4 5.99993H3V3.99993L7.585 3.99965L5.51472 1.92886L6.92893 0.514648ZM21 3.99993V5.99993H20L18.085 8.87193L13.213 3.99993H21Z" })
37370
+ children: /* @__PURE__ */ jsx21("path", { d: "M6.92893 0.514648L21.0711 14.6568L19.6569 16.071L15.834 12.2486L14 14.9999V21.9999H10V14.9999L4 5.99993H3V3.99993L7.585 3.99965L5.51472 1.92886L6.92893 0.514648ZM21 3.99993V5.99993H20L18.085 8.87193L13.213 3.99993H21Z" })
33618
37371
  }
33619
37372
  );
33620
37373
  }
33621
37374
  function OrderDesc() {
33622
- return /* @__PURE__ */ jsx18(
37375
+ return /* @__PURE__ */ jsx21(
33623
37376
  "svg",
33624
37377
  {
33625
37378
  stroke: "currentColor",
@@ -33629,12 +37382,12 @@ function OrderDesc() {
33629
37382
  height: "20px",
33630
37383
  width: "20px",
33631
37384
  xmlns: "http://www.w3.org/2000/svg",
33632
- children: /* @__PURE__ */ jsx18("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm112-128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z" })
37385
+ children: /* @__PURE__ */ jsx21("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm112-128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z" })
33633
37386
  }
33634
37387
  );
33635
37388
  }
33636
37389
  function OrderAsc() {
33637
- return /* @__PURE__ */ jsx18(
37390
+ return /* @__PURE__ */ jsx21(
33638
37391
  "svg",
33639
37392
  {
33640
37393
  stroke: "currentColor",
@@ -33644,12 +37397,12 @@ function OrderAsc() {
33644
37397
  height: "20px",
33645
37398
  width: "20px",
33646
37399
  xmlns: "http://www.w3.org/2000/svg",
33647
- children: /* @__PURE__ */ jsx18("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm240-64H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 446.37V464a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 321.63V304a16 16 0 0 0-16-16zm31.06-85.38l-59.27-160A16 16 0 0 0 372.72 32h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 224h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 224H432a16 16 0 0 0 15.06-21.38zM335.61 144L352 96l16.39 48z" })
37400
+ children: /* @__PURE__ */ jsx21("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm240-64H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 446.37V464a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 321.63V304a16 16 0 0 0-16-16zm31.06-85.38l-59.27-160A16 16 0 0 0 372.72 32h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 224h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 224H432a16 16 0 0 0 15.06-21.38zM335.61 144L352 96l16.39 48z" })
33648
37401
  }
33649
37402
  );
33650
37403
  }
33651
37404
  function EditIcon2() {
33652
- return /* @__PURE__ */ jsx18(
37405
+ return /* @__PURE__ */ jsx21(
33653
37406
  "svg",
33654
37407
  {
33655
37408
  stroke: "currentColor",
@@ -33659,12 +37412,12 @@ function EditIcon2() {
33659
37412
  height: "20px",
33660
37413
  width: "20px",
33661
37414
  xmlns: "http://www.w3.org/2000/svg",
33662
- children: /* @__PURE__ */ jsx18("path", { d: "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z" })
37415
+ children: /* @__PURE__ */ jsx21("path", { d: "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z" })
33663
37416
  }
33664
37417
  );
33665
37418
  }
33666
37419
  function SaveIcon() {
33667
- return /* @__PURE__ */ jsxs11(
37420
+ return /* @__PURE__ */ jsxs13(
33668
37421
  "svg",
33669
37422
  {
33670
37423
  stroke: "currentColor",
@@ -33675,14 +37428,14 @@ function SaveIcon() {
33675
37428
  width: "20px",
33676
37429
  xmlns: "http://www.w3.org/2000/svg",
33677
37430
  children: [
33678
- /* @__PURE__ */ jsx18("path", { d: "M272 64h-16c-4.4 0-8 3.6-8 8v72c0 4.4 7.6 8 12 8h12c4.4 0 8-3.6 8-8V72c0-4.4-3.6-8-8-8z" }),
33679
- /* @__PURE__ */ jsx18("path", { d: "M433.9 130.1L382 78.2c-9-9-21.3-14.2-34.1-14.2h-28c-8.8 0-16 7.3-16 16.2v80c0 8.8-7.2 16-16 16H160c-8.8 0-16-7.2-16-16v-80c0-8.8-7.2-16.2-16-16.2H96c-17.6 0-32 14.4-32 32v320c0 17.6 14.4 32 32 32h320c17.6 0 32-14.4 32-32V164c0-12.7-5.1-24.9-14.1-33.9zM322 400.1c0 8.8-8 16-17.8 16H143.8c-9.8 0-17.8-7.2-17.8-16v-96c0-8.8 8-16 17.8-16h160.4c9.8 0 17.8 7.2 17.8 16v96z" })
37431
+ /* @__PURE__ */ jsx21("path", { d: "M272 64h-16c-4.4 0-8 3.6-8 8v72c0 4.4 7.6 8 12 8h12c4.4 0 8-3.6 8-8V72c0-4.4-3.6-8-8-8z" }),
37432
+ /* @__PURE__ */ jsx21("path", { d: "M433.9 130.1L382 78.2c-9-9-21.3-14.2-34.1-14.2h-28c-8.8 0-16 7.3-16 16.2v80c0 8.8-7.2 16-16 16H160c-8.8 0-16-7.2-16-16v-80c0-8.8-7.2-16.2-16-16.2H96c-17.6 0-32 14.4-32 32v320c0 17.6 14.4 32 32 32h320c17.6 0 32-14.4 32-32V164c0-12.7-5.1-24.9-14.1-33.9zM322 400.1c0 8.8-8 16-17.8 16H143.8c-9.8 0-17.8-7.2-17.8-16v-96c0-8.8 8-16 17.8-16h160.4c9.8 0 17.8 7.2 17.8 16v96z" })
33680
37433
  ]
33681
37434
  }
33682
37435
  );
33683
37436
  }
33684
37437
  function ExcelIcon() {
33685
- return /* @__PURE__ */ jsx18(
37438
+ return /* @__PURE__ */ jsx21(
33686
37439
  "svg",
33687
37440
  {
33688
37441
  stroke: "currentColor",
@@ -33692,13 +37445,13 @@ function ExcelIcon() {
33692
37445
  height: "20px",
33693
37446
  width: "20px",
33694
37447
  xmlns: "http://www.w3.org/2000/svg",
33695
- children: /* @__PURE__ */ jsx18("path", { d: "M2.85858 2.87732L15.4293 1.0815C15.7027 1.04245 15.9559 1.2324 15.995 1.50577C15.9983 1.52919 16 1.55282 16 1.57648V22.4235C16 22.6996 15.7761 22.9235 15.5 22.9235C15.4763 22.9235 15.4527 22.9218 15.4293 22.9184L2.85858 21.1226C2.36593 21.0522 2 20.6303 2 20.1327V3.86727C2 3.36962 2.36593 2.9477 2.85858 2.87732ZM17 2.99997H21C21.5523 2.99997 22 3.44769 22 3.99997V20C22 20.5523 21.5523 21 21 21H17V2.99997ZM10.2 12L13 7.99997H10.6L9 10.2857L7.39999 7.99997H5L7.8 12L5 16H7.39999L9 13.7143L10.6 16H13L10.2 12Z" })
37448
+ children: /* @__PURE__ */ jsx21("path", { d: "M2.85858 2.87732L15.4293 1.0815C15.7027 1.04245 15.9559 1.2324 15.995 1.50577C15.9983 1.52919 16 1.55282 16 1.57648V22.4235C16 22.6996 15.7761 22.9235 15.5 22.9235C15.4763 22.9235 15.4527 22.9218 15.4293 22.9184L2.85858 21.1226C2.36593 21.0522 2 20.6303 2 20.1327V3.86727C2 3.36962 2.36593 2.9477 2.85858 2.87732ZM17 2.99997H21C21.5523 2.99997 22 3.44769 22 3.99997V20C22 20.5523 21.5523 21 21 21H17V2.99997ZM10.2 12L13 7.99997H10.6L9 10.2857L7.39999 7.99997H5L7.8 12L5 16H7.39999L9 13.7143L10.6 16H13L10.2 12Z" })
33696
37449
  }
33697
37450
  );
33698
37451
  }
33699
37452
 
33700
37453
  // src/table3/filter.tsx
33701
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
37454
+ import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
33702
37455
  function Filter({
33703
37456
  h,
33704
37457
  objectData,
@@ -33759,8 +37512,8 @@ function Filter({
33759
37512
  setSelected(news);
33760
37513
  }
33761
37514
  }, [data]);
33762
- return /* @__PURE__ */ jsxs12("th", { className: "cursor-pointer", children: [
33763
- /* @__PURE__ */ jsx19("div", { className: "relative", children: visible && /* @__PURE__ */ jsx19(
37515
+ return /* @__PURE__ */ jsxs14("th", { className: "cursor-pointer", children: [
37516
+ /* @__PURE__ */ jsx22("div", { className: "relative", children: visible && /* @__PURE__ */ jsx22(
33764
37517
  "div",
33765
37518
  {
33766
37519
  className: " w-full h-screen top-0 left-0 fixed ",
@@ -33768,8 +37521,8 @@ function Filter({
33768
37521
  onClick: (e) => setVisible(!visible)
33769
37522
  }
33770
37523
  ) }),
33771
- /* @__PURE__ */ jsxs12("div", { className: "relative w-full justify-center flex", children: [
33772
- /* @__PURE__ */ jsxs12(
37524
+ /* @__PURE__ */ jsxs14("div", { className: "relative w-full justify-center flex", children: [
37525
+ /* @__PURE__ */ jsxs14(
33773
37526
  "div",
33774
37527
  {
33775
37528
  style: (colSizes == null ? void 0 : colSizes[h]) ? {
@@ -33781,19 +37534,19 @@ function Filter({
33781
37534
  onClick: (e) => setVisible(!visible),
33782
37535
  children: [
33783
37536
  sort && //
33784
- Object.keys(sort)[0] == h && ((sort == null ? void 0 : sort[h]) == "asc" ? /* @__PURE__ */ jsx19("div", { className: "text-green-300", children: /* @__PURE__ */ jsx19(OrderAsc, {}) }) : (sort == null ? void 0 : sort[h]) == "desc" && /* @__PURE__ */ jsx19("div", { className: "text-green-300", children: /* @__PURE__ */ jsx19(OrderDesc, {}) })),
33785
- /* @__PURE__ */ jsx19("div", { children: h }),
33786
- selected.length < items.length && /* @__PURE__ */ jsx19("div", { className: "text-red-500 ", children: /* @__PURE__ */ jsx19(FilterOffIcon, {}) })
37537
+ Object.keys(sort)[0] == h && ((sort == null ? void 0 : sort[h]) == "asc" ? /* @__PURE__ */ jsx22("div", { className: "text-green-300", children: /* @__PURE__ */ jsx22(OrderAsc, {}) }) : (sort == null ? void 0 : sort[h]) == "desc" && /* @__PURE__ */ jsx22("div", { className: "text-green-300", children: /* @__PURE__ */ jsx22(OrderDesc, {}) })),
37538
+ /* @__PURE__ */ jsx22("div", { children: h }),
37539
+ selected.length < items.length && /* @__PURE__ */ jsx22("div", { className: "text-red-500 ", children: /* @__PURE__ */ jsx22(FilterOffIcon, {}) })
33787
37540
  ]
33788
37541
  }
33789
37542
  ),
33790
- visible && /* @__PURE__ */ jsx19(
37543
+ visible && /* @__PURE__ */ jsx22(
33791
37544
  "div",
33792
37545
  {
33793
37546
  className: "border shadow rounded bg-white p-1 absolute left-0 text-black",
33794
37547
  style: { zIndex: 9999 },
33795
- children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-1 w-[300px] min-w-[300px] resize-x overflow-auto", children: [
33796
- /* @__PURE__ */ jsxs12(
37548
+ children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-1 w-[300px] min-w-[300px] resize-x overflow-auto", children: [
37549
+ /* @__PURE__ */ jsxs14(
33797
37550
  "div",
33798
37551
  {
33799
37552
  onClick: (e) => {
@@ -33810,12 +37563,12 @@ function Filter({
33810
37563
  },
33811
37564
  className: "flex items-center gap-2 border p-1 hover:bg-blue-100",
33812
37565
  children: [
33813
- /* @__PURE__ */ jsx19(OrderAsc, {}),
37566
+ /* @__PURE__ */ jsx22(OrderAsc, {}),
33814
37567
  " Ordenar de la A a la Z"
33815
37568
  ]
33816
37569
  }
33817
37570
  ),
33818
- /* @__PURE__ */ jsxs12(
37571
+ /* @__PURE__ */ jsxs14(
33819
37572
  "div",
33820
37573
  {
33821
37574
  onClick: (e) => {
@@ -33832,12 +37585,12 @@ function Filter({
33832
37585
  },
33833
37586
  className: "flex items-center gap-2 border p-1 hover:bg-blue-100",
33834
37587
  children: [
33835
- /* @__PURE__ */ jsx19(OrderDesc, {}),
37588
+ /* @__PURE__ */ jsx22(OrderDesc, {}),
33836
37589
  "Ordenar de la Z a la A"
33837
37590
  ]
33838
37591
  }
33839
37592
  ),
33840
- selected.length < items.length && /* @__PURE__ */ jsxs12(
37593
+ selected.length < items.length && /* @__PURE__ */ jsxs14(
33841
37594
  "div",
33842
37595
  {
33843
37596
  className: "p-1 flex items-center justify-between px-2 bg-red-200 border shadow rounded",
@@ -33846,11 +37599,11 @@ function Filter({
33846
37599
  },
33847
37600
  children: [
33848
37601
  "Borrar Filtro",
33849
- /* @__PURE__ */ jsx19("div", { className: "text-white ", children: /* @__PURE__ */ jsx19(FilterOffIcon, {}) })
37602
+ /* @__PURE__ */ jsx22("div", { className: "text-white ", children: /* @__PURE__ */ jsx22(FilterOffIcon, {}) })
33850
37603
  ]
33851
37604
  }
33852
37605
  ),
33853
- /* @__PURE__ */ jsx19("div", { className: "", children: /* @__PURE__ */ jsx19(
37606
+ /* @__PURE__ */ jsx22("div", { className: "", children: /* @__PURE__ */ jsx22(
33854
37607
  "input",
33855
37608
  {
33856
37609
  className: "border shadow rounded p-2 w-full",
@@ -33869,8 +37622,8 @@ function Filter({
33869
37622
  }
33870
37623
  }
33871
37624
  ) }),
33872
- /* @__PURE__ */ jsx19("div", { children: /* @__PURE__ */ jsxs12("label", { className: "flex gap-1 cursor-pointer px-1", children: [
33873
- /* @__PURE__ */ jsx19(
37625
+ /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsxs14("label", { className: "flex gap-1 cursor-pointer px-1", children: [
37626
+ /* @__PURE__ */ jsx22(
33874
37627
  "input",
33875
37628
  {
33876
37629
  type: "checkbox",
@@ -33886,9 +37639,9 @@ function Filter({
33886
37639
  ),
33887
37640
  "(Seleccionar Todo)"
33888
37641
  ] }) }),
33889
- /* @__PURE__ */ jsx19("div", { className: "overflow-auto flex gap-1 flex-col p-1 border shadow rounded h-[300px]", children: itemsFiltered.map((item) => {
33890
- return /* @__PURE__ */ jsx19("div", { className: "hover:bg-gray-100 ", children: /* @__PURE__ */ jsxs12("label", { className: "flex gap-1 cursor-pointer truncate", children: [
33891
- /* @__PURE__ */ jsx19(
37642
+ /* @__PURE__ */ jsx22("div", { className: "overflow-auto flex gap-1 flex-col p-1 border shadow rounded h-[300px]", children: itemsFiltered.map((item) => {
37643
+ return /* @__PURE__ */ jsx22("div", { className: "hover:bg-gray-100 ", children: /* @__PURE__ */ jsxs14("label", { className: "flex gap-1 cursor-pointer truncate", children: [
37644
+ /* @__PURE__ */ jsx22(
33892
37645
  "input",
33893
37646
  {
33894
37647
  type: "checkbox",
@@ -33909,8 +37662,8 @@ function Filter({
33909
37662
  item || "(Vacias)"
33910
37663
  ] }) }, item);
33911
37664
  }) }),
33912
- /* @__PURE__ */ jsxs12("div", { className: "flex justify-between px-1", children: [
33913
- /* @__PURE__ */ jsx19(
37665
+ /* @__PURE__ */ jsxs14("div", { className: "flex justify-between px-1", children: [
37666
+ /* @__PURE__ */ jsx22(
33914
37667
  "button",
33915
37668
  {
33916
37669
  className: "p-1 shadow rounded border bg-red-500 text-white",
@@ -33921,7 +37674,7 @@ function Filter({
33921
37674
  children: "Cancelar"
33922
37675
  }
33923
37676
  ),
33924
- /* @__PURE__ */ jsx19(
37677
+ /* @__PURE__ */ jsx22(
33925
37678
  "button",
33926
37679
  {
33927
37680
  className: "p-1 shadow rounded border bg-blue-500 text-white",
@@ -33940,7 +37693,7 @@ function Filter({
33940
37693
  }
33941
37694
 
33942
37695
  // src/table3/head.tsx
33943
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
37696
+ import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
33944
37697
  function TableHead({
33945
37698
  headers,
33946
37699
  selectItems,
@@ -33955,9 +37708,9 @@ function TableHead({
33955
37708
  sort,
33956
37709
  setSort
33957
37710
  }) {
33958
- return /* @__PURE__ */ jsx20("thead", { children: /* @__PURE__ */ jsxs13("tr", { className: "bg-blue-500 text-white font-bold", children: [
33959
- modal && /* @__PURE__ */ jsx20("th", { children: "-" }),
33960
- selectItems && /* @__PURE__ */ jsx20("th", { children: /* @__PURE__ */ jsx20(
37711
+ return /* @__PURE__ */ jsx23("thead", { children: /* @__PURE__ */ jsxs15("tr", { className: "bg-blue-500 text-white font-bold", children: [
37712
+ modal && /* @__PURE__ */ jsx23("th", { children: "-" }),
37713
+ selectItems && /* @__PURE__ */ jsx23("th", { children: /* @__PURE__ */ jsx23(
33961
37714
  "input",
33962
37715
  {
33963
37716
  className: "m-2",
@@ -33985,7 +37738,7 @@ function TableHead({
33985
37738
  ) }),
33986
37739
  Object.values(headers).map((h) => {
33987
37740
  if (h.startsWith("_")) return null;
33988
- return /* @__PURE__ */ jsx20(
37741
+ return /* @__PURE__ */ jsx23(
33989
37742
  Filter,
33990
37743
  {
33991
37744
  objectData,
@@ -34008,7 +37761,7 @@ import { useState as useState11 } from "react";
34008
37761
 
34009
37762
  // src/table3/tr.tsx
34010
37763
  import React7 from "react";
34011
- import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
37764
+ import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
34012
37765
  function TR({
34013
37766
  handlers,
34014
37767
  setObjectData,
@@ -34028,7 +37781,7 @@ function TR({
34028
37781
  symbols
34029
37782
  }) {
34030
37783
  const color = selected == index ? "bg-blue-600 text-white hover:bg-blue-800" : index % 2 == 0 ? "bg-white" : "bg-blue-50";
34031
- return /* @__PURE__ */ jsxs14(
37784
+ return /* @__PURE__ */ jsxs16(
34032
37785
  "tr",
34033
37786
  {
34034
37787
  className: ` hover:bg-blue-100 ${color} cursor-pointer`,
@@ -34036,7 +37789,7 @@ function TR({
34036
37789
  setSelected(selected == index ? -1 : index);
34037
37790
  },
34038
37791
  children: [
34039
- modal && /* @__PURE__ */ jsx21("th", { className: "border", children: /* @__PURE__ */ jsx21(
37792
+ modal && /* @__PURE__ */ jsx24("th", { className: "border", children: /* @__PURE__ */ jsx24(
34040
37793
  "button",
34041
37794
  {
34042
37795
  className: "p-1 border shadow-rounded bg-blue-500 rounded text-white",
@@ -34045,10 +37798,10 @@ function TR({
34045
37798
  (_a = modalRef.current) == null ? void 0 : _a.showModal();
34046
37799
  setDialogRow(row);
34047
37800
  },
34048
- children: /* @__PURE__ */ jsx21(EditIcon2, {})
37801
+ children: /* @__PURE__ */ jsx24(EditIcon2, {})
34049
37802
  }
34050
37803
  ) }),
34051
- selectItems && /* @__PURE__ */ jsx21("th", { className: "border", children: /* @__PURE__ */ jsx21(
37804
+ selectItems && /* @__PURE__ */ jsx24("th", { className: "border", children: /* @__PURE__ */ jsx24(
34052
37805
  "input",
34053
37806
  {
34054
37807
  type: "checkbox",
@@ -34116,13 +37869,13 @@ function TR({
34116
37869
  return acc;
34117
37870
  }, {})
34118
37871
  });
34119
- return /* @__PURE__ */ jsx21("td", { className: `text-black `, children: cloned }, h);
37872
+ return /* @__PURE__ */ jsx24("td", { className: `text-black `, children: cloned }, h);
34120
37873
  }
34121
- return symbols && (symbols == null ? void 0 : symbols[h]) ? /* @__PURE__ */ jsx21("td", { className: `text-center border max-w-[${colSize}px] `, children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1 w-full", children: [
37874
+ return symbols && (symbols == null ? void 0 : symbols[h]) ? /* @__PURE__ */ jsx24("td", { className: `text-center border max-w-[${colSize}px] `, children: /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1 w-full", children: [
34122
37875
  symbols[h],
34123
37876
  " ",
34124
37877
  row[h]
34125
- ] }) }, h) : /* @__PURE__ */ jsx21("td", { className: `text-center border max-w-[${colSize}px]`, children: row[h] }, h);
37878
+ ] }) }, h) : /* @__PURE__ */ jsx24("td", { className: `text-center border max-w-[${colSize}px]`, children: row[h] }, h);
34126
37879
  })
34127
37880
  ]
34128
37881
  },
@@ -34131,7 +37884,7 @@ function TR({
34131
37884
  }
34132
37885
 
34133
37886
  // src/table3/body.tsx
34134
- import { jsx as jsx22 } from "react/jsx-runtime";
37887
+ import { jsx as jsx25 } from "react/jsx-runtime";
34135
37888
  function TableBody({
34136
37889
  objectData,
34137
37890
  setObjectData,
@@ -34175,7 +37928,7 @@ function TableBody({
34175
37928
  return key >= start && key < end;
34176
37929
  }).map(([id, k], index) => {
34177
37930
  const row = objectData[id];
34178
- return /* @__PURE__ */ jsx22(
37931
+ return /* @__PURE__ */ jsx25(
34179
37932
  TR,
34180
37933
  {
34181
37934
  ...{
@@ -34200,11 +37953,11 @@ function TableBody({
34200
37953
  id
34201
37954
  );
34202
37955
  });
34203
- return /* @__PURE__ */ jsx22("tbody", { children: sorted });
37956
+ return /* @__PURE__ */ jsx25("tbody", { children: sorted });
34204
37957
  }
34205
37958
 
34206
37959
  // src/table3/panel.tsx
34207
- import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
37960
+ import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
34208
37961
  function Panel({
34209
37962
  page,
34210
37963
  setPage,
@@ -34215,9 +37968,9 @@ function Panel({
34215
37968
  maxItems
34216
37969
  }) {
34217
37970
  const excel = useExcel();
34218
- return /* @__PURE__ */ jsxs15("div", { className: "flex gap-2 bg-gray-100 items-center", children: [
34219
- /* @__PURE__ */ jsxs15("div", { className: "flex gap-1 ", children: [
34220
- onSave && /* @__PURE__ */ jsxs15(
37971
+ return /* @__PURE__ */ jsxs17("div", { className: "flex gap-2 bg-gray-100 items-center", children: [
37972
+ /* @__PURE__ */ jsxs17("div", { className: "flex gap-1 ", children: [
37973
+ onSave && /* @__PURE__ */ jsxs17(
34221
37974
  "button",
34222
37975
  {
34223
37976
  className: "p-2 border shadow rounded bg-blue-500 text-white flex items-center gap-1 text-md",
@@ -34226,12 +37979,12 @@ function Panel({
34226
37979
  },
34227
37980
  children: [
34228
37981
  " ",
34229
- /* @__PURE__ */ jsx23(SaveIcon, {}),
37982
+ /* @__PURE__ */ jsx26(SaveIcon, {}),
34230
37983
  "Guardar"
34231
37984
  ]
34232
37985
  }
34233
37986
  ),
34234
- exportName && /* @__PURE__ */ jsxs15(
37987
+ exportName && /* @__PURE__ */ jsxs17(
34235
37988
  "button",
34236
37989
  {
34237
37990
  className: "p-2 border shadow rounded bg-green-800 text-white flex items-center gap-1 text-md",
@@ -34245,22 +37998,22 @@ function Panel({
34245
37998
  );
34246
37999
  },
34247
38000
  children: [
34248
- /* @__PURE__ */ jsx23(ExcelIcon, {}),
38001
+ /* @__PURE__ */ jsx26(ExcelIcon, {}),
34249
38002
  "Exportar"
34250
38003
  ]
34251
38004
  }
34252
38005
  )
34253
38006
  ] }),
34254
- maxItems !== Infinity && /* @__PURE__ */ jsxs15("div", { className: "flex gap-2 items-center text-2xl", children: [
34255
- /* @__PURE__ */ jsx23("button", { onClick: () => setPage(1), disabled: page === 1, children: "\u23EE" }),
34256
- /* @__PURE__ */ jsx23("button", { onClick: () => setPage(page - 1), disabled: page === 1, children: "\u25C0" }),
34257
- /* @__PURE__ */ jsxs15("span", { className: "text-sm", children: [
38007
+ maxItems !== Infinity && /* @__PURE__ */ jsxs17("div", { className: "flex gap-2 items-center text-2xl", children: [
38008
+ /* @__PURE__ */ jsx26("button", { onClick: () => setPage(1), disabled: page === 1, children: "\u23EE" }),
38009
+ /* @__PURE__ */ jsx26("button", { onClick: () => setPage(page - 1), disabled: page === 1, children: "\u25C0" }),
38010
+ /* @__PURE__ */ jsxs17("span", { className: "text-sm", children: [
34258
38011
  "P\xE1gina ",
34259
38012
  page,
34260
38013
  " / ",
34261
38014
  totalPages
34262
38015
  ] }),
34263
- /* @__PURE__ */ jsx23(
38016
+ /* @__PURE__ */ jsx26(
34264
38017
  "button",
34265
38018
  {
34266
38019
  onClick: () => setPage(page + 1),
@@ -34268,7 +38021,7 @@ function Panel({
34268
38021
  children: "\u25B6"
34269
38022
  }
34270
38023
  ),
34271
- /* @__PURE__ */ jsx23(
38024
+ /* @__PURE__ */ jsx26(
34272
38025
  "button",
34273
38026
  {
34274
38027
  onClick: () => setPage(totalPages),
@@ -34281,7 +38034,7 @@ function Panel({
34281
38034
  }
34282
38035
 
34283
38036
  // src/table3/footer.tsx
34284
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
38037
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
34285
38038
  function TableFooter({
34286
38039
  objectData,
34287
38040
  headers,
@@ -34306,28 +38059,28 @@ function TableFooter({
34306
38059
  return null;
34307
38060
  }
34308
38061
  }
34309
- return footer && /* @__PURE__ */ jsx24("tfoot", { children: /* @__PURE__ */ jsxs16("tr", { className: "bg-blue-500 text-white", children: [
34310
- selectItems && /* @__PURE__ */ jsx24("th", {}),
34311
- modal && /* @__PURE__ */ jsx24("th", {}),
38062
+ return footer && /* @__PURE__ */ jsx27("tfoot", { children: /* @__PURE__ */ jsxs18("tr", { className: "bg-blue-500 text-white", children: [
38063
+ selectItems && /* @__PURE__ */ jsx27("th", {}),
38064
+ modal && /* @__PURE__ */ jsx27("th", {}),
34312
38065
  headers.map((header) => {
34313
38066
  if (header.startsWith("_")) {
34314
38067
  return null;
34315
38068
  } else if (footer == null ? void 0 : footer[header]) {
34316
- return symbols && (symbols == null ? void 0 : symbols[header]) ? /* @__PURE__ */ jsxs16("th", { className: "flex items-center gap-1", children: [
38069
+ return symbols && (symbols == null ? void 0 : symbols[header]) ? /* @__PURE__ */ jsxs18("th", { className: "flex items-center gap-1", children: [
34317
38070
  symbols[header],
34318
38071
  " ",
34319
38072
  operacion(footer[header], header)
34320
- ] }, header) : /* @__PURE__ */ jsx24("th", { children: operacion(footer[header], header) }, header);
38073
+ ] }, header) : /* @__PURE__ */ jsx27("th", { children: operacion(footer[header], header) }, header);
34321
38074
  }
34322
- return /* @__PURE__ */ jsx24("th", {}, header);
38075
+ return /* @__PURE__ */ jsx27("th", {}, header);
34323
38076
  })
34324
38077
  ] }) });
34325
38078
  }
34326
38079
 
34327
38080
  // src/table3/dialog.tsx
34328
38081
  import React8, { useMemo as useMemo5 } from "react";
34329
- import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
34330
- function Dialog4({
38082
+ import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
38083
+ function Dialog3({
34331
38084
  modalRef,
34332
38085
  children,
34333
38086
  dialogRow,
@@ -34354,15 +38107,15 @@ function Dialog4({
34354
38107
  }
34355
38108
  return null;
34356
38109
  }, [dialogRow, children]);
34357
- return /* @__PURE__ */ jsxs17(
38110
+ return /* @__PURE__ */ jsxs19(
34358
38111
  "dialog",
34359
38112
  {
34360
38113
  ref: modalRef,
34361
38114
  className: "p-6 rounded-xl shadow-2xl backdrop:bg-black/50 w-[100%] h-screen",
34362
38115
  children: [
34363
- /* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center mb-4", children: [
34364
- /* @__PURE__ */ jsx25("div", {}),
34365
- /* @__PURE__ */ jsx25(
38116
+ /* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center mb-4", children: [
38117
+ /* @__PURE__ */ jsx28("div", {}),
38118
+ /* @__PURE__ */ jsx28(
34366
38119
  "button",
34367
38120
  {
34368
38121
  onClick: () => {
@@ -34374,15 +38127,15 @@ function Dialog4({
34374
38127
  }
34375
38128
  )
34376
38129
  ] }),
34377
- /* @__PURE__ */ jsx25("div", { className: "text-gray-700", children: clonedModal })
38130
+ /* @__PURE__ */ jsx28("div", { className: "text-gray-700", children: clonedModal })
34378
38131
  ]
34379
38132
  }
34380
38133
  );
34381
38134
  }
34382
- var dialog_default = Dialog4;
38135
+ var dialog_default = Dialog3;
34383
38136
 
34384
38137
  // src/table3/index.tsx
34385
- import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
38138
+ import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
34386
38139
  function Table3({
34387
38140
  data,
34388
38141
  selectItems,
@@ -34458,7 +38211,7 @@ function Table3({
34458
38211
  return maxItems ? Math.ceil(Object.keys(objectData).length / maxItems) : 1;
34459
38212
  }, [objectData, maxItems]);
34460
38213
  const [sort, setSort] = useState12(sortBy);
34461
- const modalRef = useRef6(null);
38214
+ const modalRef = useRef5(null);
34462
38215
  const [dialogRow, setDialogRow] = useState12({});
34463
38216
  const context = {
34464
38217
  objectData,
@@ -34494,8 +38247,8 @@ function Table3({
34494
38247
  }, [objectData]);
34495
38248
  const style = (props == null ? void 0 : props.style) ? { ...props.style, tableLayout: "fixed" } : { tableLayout: "fixed" };
34496
38249
  if (!objectData) return null;
34497
- return /* @__PURE__ */ jsxs18("div", { className: "border shadow rounded m-1 p-1 bg-white", children: [
34498
- modal && /* @__PURE__ */ jsx26(
38250
+ return /* @__PURE__ */ jsxs20("div", { className: "border shadow rounded m-1 p-1 bg-white", children: [
38251
+ modal && /* @__PURE__ */ jsx29(
34499
38252
  dialog_default,
34500
38253
  {
34501
38254
  modalRef,
@@ -34505,223 +38258,15 @@ function Table3({
34505
38258
  children: modal
34506
38259
  }
34507
38260
  ),
34508
- header && /* @__PURE__ */ jsx26("div", { className: "font-bold text-2xl py-5 px-2 bg-blue-50", children: header }),
34509
- /* @__PURE__ */ jsx26(Panel, { ...context }),
34510
- /* @__PURE__ */ jsxs18("table", { ...props, style, children: [
34511
- /* @__PURE__ */ jsx26(TableHead, { ...context }),
34512
- /* @__PURE__ */ jsx26(TableBody, { ...context }),
34513
- /* @__PURE__ */ jsx26(TableFooter, { ...context })
38261
+ header && /* @__PURE__ */ jsx29("div", { className: "font-bold text-2xl py-5 px-2 bg-blue-50", children: header }),
38262
+ /* @__PURE__ */ jsx29(Panel, { ...context }),
38263
+ /* @__PURE__ */ jsxs20("table", { ...props, style, children: [
38264
+ /* @__PURE__ */ jsx29(TableHead, { ...context }),
38265
+ /* @__PURE__ */ jsx29(TableBody, { ...context }),
38266
+ /* @__PURE__ */ jsx29(TableFooter, { ...context })
34514
38267
  ] })
34515
38268
  ] });
34516
38269
  }
34517
-
34518
- // src/pop/index.tsx
34519
- import { React as React10 } from "next/dist/server/route-modules/app-page/vendored/rsc/entrypoints";
34520
- import { useState as useState13 } from "react";
34521
- import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
34522
- var COLOR_CONFIG = {
34523
- primary: {
34524
- bg: "from-blue-50 to-indigo-50",
34525
- iconBg: "bg-blue-100",
34526
- iconText: "text-blue-600",
34527
- border: "border-blue-200",
34528
- confirm: "bg-blue-600 hover:bg-blue-700 focus:ring-blue-300",
34529
- label: "\u2139"
34530
- },
34531
- info: {
34532
- bg: "from-sky-50 to-cyan-50",
34533
- iconBg: "bg-sky-100",
34534
- iconText: "text-sky-600",
34535
- border: "border-sky-200",
34536
- confirm: "bg-sky-600 hover:bg-sky-700 focus:ring-sky-300",
34537
- label: "\u2139"
34538
- },
34539
- success: {
34540
- bg: "from-emerald-50 to-green-50",
34541
- iconBg: "bg-emerald-100",
34542
- iconText: "text-emerald-600",
34543
- border: "border-emerald-200",
34544
- confirm: "bg-emerald-600 hover:bg-emerald-700 focus:ring-emerald-300",
34545
- label: "\u2713"
34546
- },
34547
- warning: {
34548
- bg: "from-amber-50 to-yellow-50",
34549
- iconBg: "bg-amber-100",
34550
- iconText: "text-amber-600",
34551
- border: "border-amber-200",
34552
- confirm: "bg-amber-500 hover:bg-amber-600 focus:ring-amber-300",
34553
- label: "\u26A0"
34554
- },
34555
- danger: {
34556
- bg: "from-red-50 to-rose-50",
34557
- iconBg: "bg-red-100",
34558
- iconText: "text-red-600",
34559
- border: "border-red-200",
34560
- confirm: "bg-red-600 hover:bg-red-700 focus:ring-red-300",
34561
- label: "\u2715"
34562
- },
34563
- secondary: {
34564
- bg: "from-slate-50 to-gray-50",
34565
- iconBg: "bg-slate-100",
34566
- iconText: "text-slate-600",
34567
- border: "border-slate-200",
34568
- confirm: "bg-slate-700 hover:bg-slate-800 focus:ring-slate-300",
34569
- label: "\u25CE"
34570
- },
34571
- white: {
34572
- bg: "from-gray-50 to-white",
34573
- iconBg: "bg-gray-100",
34574
- iconText: "text-gray-500",
34575
- border: "border-gray-200",
34576
- confirm: "bg-gray-700 hover:bg-gray-800 focus:ring-gray-300",
34577
- label: "\u25CE"
34578
- }
34579
- };
34580
- function usePopup() {
34581
- const [popup, setPopup] = useState13({
34582
- type: "alert",
34583
- message: "",
34584
- visible: false,
34585
- inputValue: "",
34586
- color: "primary"
34587
- });
34588
- function alert2(message, color = "primary") {
34589
- return new Promise((resolve) => {
34590
- setPopup({
34591
- type: "alert",
34592
- message,
34593
- visible: true,
34594
- inputValue: "",
34595
- onConfirm: () => resolve(),
34596
- color
34597
- });
34598
- });
34599
- }
34600
- function modal(content, color = "primary") {
34601
- return new Promise((resolve) => {
34602
- setPopup({
34603
- type: "modal",
34604
- message: content,
34605
- visible: true,
34606
- inputValue: "",
34607
- onConfirm: () => resolve(),
34608
- color
34609
- });
34610
- });
34611
- }
34612
- function confirm(message, color = "primary") {
34613
- return new Promise((resolve) => {
34614
- setPopup({
34615
- type: "confirm",
34616
- message,
34617
- visible: true,
34618
- inputValue: "",
34619
- onConfirm: () => resolve(true),
34620
- onCancel: () => resolve(false),
34621
- color
34622
- });
34623
- });
34624
- }
34625
- function prompt(message, color = "primary") {
34626
- return new Promise((resolve) => {
34627
- setPopup({
34628
- type: "prompt",
34629
- message,
34630
- visible: true,
34631
- inputValue: "",
34632
- onConfirm: (value) => resolve(value != null ? value : ""),
34633
- onCancel: () => resolve(null),
34634
- color
34635
- });
34636
- });
34637
- }
34638
- function close(confirmed, value) {
34639
- setPopup((prev) => {
34640
- var _a, _b;
34641
- if (confirmed) (_a = prev.onConfirm) == null ? void 0 : _a.call(prev, value);
34642
- else (_b = prev.onCancel) == null ? void 0 : _b.call(prev);
34643
- return { ...prev, visible: false, inputValue: "" };
34644
- });
34645
- }
34646
- const c = COLOR_CONFIG[popup.color];
34647
- const PopupComponent = popup.visible ? /* @__PURE__ */ jsx27(
34648
- "div",
34649
- {
34650
- className: "fixed inset-0 flex items-center justify-center z-[1000]",
34651
- style: { background: "rgba(15,23,42,0.45)", backdropFilter: "blur(2px)" },
34652
- onClick: (e) => e.target === e.currentTarget && close(false),
34653
- children: /* @__PURE__ */ jsxs19(
34654
- "div",
34655
- {
34656
- className: `
34657
- bg-gradient-to-br ${c.bg} border ${c.border}
34658
- rounded-2xl shadow-2xl w-full max-w-sm mx-4
34659
- animate-[fadeInScale_0.18s_ease-out]
34660
- `,
34661
- style: { animation: "fadeInScale 0.18s ease-out" },
34662
- children: [
34663
- /* @__PURE__ */ jsx27("style", { children: `
34664
- @keyframes fadeInScale {
34665
- from { opacity: 0; transform: scale(0.93) translateY(8px); }
34666
- to { opacity: 1; transform: scale(1) translateY(0); }
34667
- }
34668
- ` }),
34669
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-3 px-8 pt-8 pb-5 text-center", children: [
34670
- /* @__PURE__ */ jsx27(
34671
- "div",
34672
- {
34673
- className: `w-12 h-12 rounded-full ${c.iconBg} flex items-center justify-center`,
34674
- children: /* @__PURE__ */ jsx27("span", { className: `text-xl font-bold ${c.iconText}`, children: c.label })
34675
- }
34676
- ),
34677
- /* @__PURE__ */ jsx27("p", { className: "text-gray-800 text-[15px] font-medium leading-snug", children: popup.type == "modal" && React10.isValidElement(popup.message) ? React10.cloneElement(popup.message, { hide: close }) : popup.message })
34678
- ] }),
34679
- popup.type === "prompt" && /* @__PURE__ */ jsx27("div", { className: "px-8 pb-2", children: /* @__PURE__ */ jsx27(
34680
- "input",
34681
- {
34682
- autoFocus: true,
34683
- type: "text",
34684
- value: popup.inputValue,
34685
- onChange: (e) => setPopup((prev) => ({ ...prev, inputValue: e.target.value })),
34686
- onKeyDown: (e) => e.key === "Enter" && close(true, popup.inputValue),
34687
- className: `
34688
- w-full px-3 py-2 rounded-lg border ${c.border} bg-white
34689
- text-sm text-gray-800 outline-none
34690
- focus:ring-2 ${c.confirm.includes("blue") ? "focus:ring-blue-200" : "focus:ring-gray-200"}
34691
- transition
34692
- `,
34693
- placeholder: "Escribe aqu\xED..."
34694
- }
34695
- ) }),
34696
- /* @__PURE__ */ jsx27("div", { className: `border-t ${c.border} mx-0 mt-4` }),
34697
- popup.type != "modal" && /* @__PURE__ */ jsxs19("div", { className: "flex gap-2 px-6 py-4 justify-end", children: [
34698
- (popup.type === "confirm" || popup.type === "prompt") && /* @__PURE__ */ jsx27(
34699
- "button",
34700
- {
34701
- onClick: () => close(false),
34702
- className: "\r\n px-4 py-2 rounded-lg text-sm font-medium\r\n bg-white border border-gray-200 text-gray-600\r\n hover:bg-gray-50 transition\r\n ",
34703
- children: "Cancelar"
34704
- }
34705
- ),
34706
- /* @__PURE__ */ jsx27(
34707
- "button",
34708
- {
34709
- onClick: () => close(true, popup.inputValue),
34710
- className: `
34711
- px-5 py-2 rounded-lg text-sm font-semibold text-white
34712
- ${c.confirm} transition focus:outline-none focus:ring-2
34713
- `,
34714
- children: "Aceptar"
34715
- }
34716
- )
34717
- ] })
34718
- ]
34719
- }
34720
- )
34721
- }
34722
- ) : null;
34723
- return { alert: alert2, confirm, prompt, PopupComponent, modal };
34724
- }
34725
38270
  export {
34726
38271
  Alert,
34727
38272
  Button,