@helpwave/hightide 0.1.3 → 0.1.5

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.
Files changed (66) hide show
  1. package/dist/coloring/shading.cjs +2855 -24
  2. package/dist/coloring/shading.cjs.map +1 -1
  3. package/dist/coloring/shading.js +2893 -33
  4. package/dist/coloring/shading.js.map +1 -1
  5. package/dist/components/branding/HelpwaveBadge.cjs +2 -3
  6. package/dist/components/branding/HelpwaveBadge.cjs.map +1 -1
  7. package/dist/components/branding/HelpwaveBadge.js +2 -3
  8. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  9. package/dist/components/date/DatePicker.cjs +30 -9
  10. package/dist/components/date/DatePicker.cjs.map +1 -1
  11. package/dist/components/date/DatePicker.js +37 -16
  12. package/dist/components/date/DatePicker.js.map +1 -1
  13. package/dist/components/date/YearMonthPicker.cjs +30 -9
  14. package/dist/components/date/YearMonthPicker.cjs.map +1 -1
  15. package/dist/components/date/YearMonthPicker.js +36 -15
  16. package/dist/components/date/YearMonthPicker.js.map +1 -1
  17. package/dist/components/icons-and-geometry/Avatar.cjs +1 -2
  18. package/dist/components/icons-and-geometry/Avatar.cjs.map +1 -1
  19. package/dist/components/icons-and-geometry/Avatar.js +1 -2
  20. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  21. package/dist/components/icons-and-geometry/Tag.cjs +5 -18
  22. package/dist/components/icons-and-geometry/Tag.cjs.map +1 -1
  23. package/dist/components/icons-and-geometry/Tag.d.cts +5 -3
  24. package/dist/components/icons-and-geometry/Tag.d.ts +5 -3
  25. package/dist/components/icons-and-geometry/Tag.js +5 -8
  26. package/dist/components/icons-and-geometry/Tag.js.map +1 -1
  27. package/dist/components/layout-and-navigation/BreadCrumb.cjs +2813 -1
  28. package/dist/components/layout-and-navigation/BreadCrumb.cjs.map +1 -1
  29. package/dist/components/layout-and-navigation/BreadCrumb.js +2843 -2
  30. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  31. package/dist/components/layout-and-navigation/Expandable.cjs +37 -9
  32. package/dist/components/layout-and-navigation/Expandable.cjs.map +1 -1
  33. package/dist/components/layout-and-navigation/Expandable.d.cts +20 -3
  34. package/dist/components/layout-and-navigation/Expandable.d.ts +20 -3
  35. package/dist/components/layout-and-navigation/Expandable.js +36 -9
  36. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  37. package/dist/components/layout-and-navigation/FAQSection.cjs +34 -8
  38. package/dist/components/layout-and-navigation/FAQSection.cjs.map +1 -1
  39. package/dist/components/layout-and-navigation/FAQSection.d.cts +1 -1
  40. package/dist/components/layout-and-navigation/FAQSection.d.ts +1 -1
  41. package/dist/components/layout-and-navigation/FAQSection.js +35 -9
  42. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  43. package/dist/components/layout-and-navigation/StepperBar.cjs +47 -19
  44. package/dist/components/layout-and-navigation/StepperBar.cjs.map +1 -1
  45. package/dist/components/layout-and-navigation/StepperBar.d.cts +10 -7
  46. package/dist/components/layout-and-navigation/StepperBar.d.ts +10 -7
  47. package/dist/components/layout-and-navigation/StepperBar.js +45 -18
  48. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  49. package/dist/components/layout-and-navigation/Tile.cjs +4 -24
  50. package/dist/components/layout-and-navigation/Tile.cjs.map +1 -1
  51. package/dist/components/layout-and-navigation/Tile.d.cts +1 -5
  52. package/dist/components/layout-and-navigation/Tile.d.ts +1 -5
  53. package/dist/components/layout-and-navigation/Tile.js +3 -22
  54. package/dist/components/layout-and-navigation/Tile.js.map +1 -1
  55. package/dist/components/user-action/DateAndTimePicker.cjs +30 -9
  56. package/dist/components/user-action/DateAndTimePicker.cjs.map +1 -1
  57. package/dist/components/user-action/DateAndTimePicker.js +36 -15
  58. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  59. package/dist/css/globals.css +0 -32
  60. package/dist/index.cjs +2956 -117
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +3 -4
  63. package/dist/index.d.ts +3 -4
  64. package/dist/index.js +2991 -124
  65. package/dist/index.js.map +1 -1
  66. package/package.json +1 -2
package/dist/index.cjs CHANGED
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
8
11
  var __export = (target, all) => {
9
12
  for (var name in all)
10
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,17 +18,2826 @@ var __copyProps = (to, from, except, desc) => {
15
18
  if (!__hasOwnProp.call(to, key) && key !== except)
16
19
  __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
20
  }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
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"(exports2) {
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
+ exports2._ = _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"(exports2) {
70
+ "use strict";
71
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
151
+ "use strict";
152
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
240
+ "use strict";
241
+ Object.defineProperty(exports2, "__esModule", {
242
+ value: true
243
+ });
244
+ Object.defineProperty(exports2, "omit", {
245
+ enumerable: true,
246
+ get: function() {
247
+ return omit;
248
+ }
249
+ });
250
+ function omit(object, keys) {
251
+ const omitted = {};
252
+ Object.keys(object).forEach((key) => {
253
+ if (!keys.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"(exports2) {
265
+ "use strict";
266
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
455
+ "use strict";
456
+ Object.defineProperty(exports2, "__esModule", {
457
+ value: true
458
+ });
459
+ Object.defineProperty(exports2, "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"(exports2) {
474
+ "use strict";
475
+ Object.defineProperty(exports2, "__esModule", {
476
+ value: true
477
+ });
478
+ Object.defineProperty(exports2, "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"(exports2, module2) {
507
+ "use strict";
508
+ Object.defineProperty(exports2, "__esModule", {
509
+ value: true
510
+ });
511
+ Object.defineProperty(exports2, "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 exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
536
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
537
+ Object.assign(exports2.default, exports2);
538
+ module2.exports = exports2.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"(exports2) {
546
+ "use strict";
547
+ Object.defineProperty(exports2, "__esModule", {
548
+ value: true
549
+ });
550
+ Object.defineProperty(exports2, "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"(exports2, module2) {
570
+ "use strict";
571
+ Object.defineProperty(exports2, "__esModule", {
572
+ value: true
573
+ });
574
+ Object.defineProperty(exports2, "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 exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
586
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
587
+ Object.assign(exports2.default, exports2);
588
+ module2.exports = exports2.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"(exports2) {
596
+ "use strict";
597
+ Object.defineProperty(exports2, "__esModule", {
598
+ value: true
599
+ });
600
+ Object.defineProperty(exports2, "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"(exports2) {
624
+ "use strict";
625
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
834
+ "use strict";
835
+ Object.defineProperty(exports2, "__esModule", {
836
+ value: true
837
+ });
838
+ Object.defineProperty(exports2, "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"(exports2) {
853
+ "use strict";
854
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
902
+ "use strict";
903
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
952
+ "use strict";
953
+ Object.defineProperty(exports2, "__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(exports2, {
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"(exports2) {
1051
+ "use strict";
1052
+ Object.defineProperty(exports2, "__esModule", {
1053
+ value: true
1054
+ });
1055
+ Object.defineProperty(exports2, "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"(exports2) {
1080
+ "use strict";
1081
+ Object.defineProperty(exports2, "__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(exports2, {
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/shared/lib/router/utils/route-matcher.js
1107
+ var require_route_matcher = __commonJS({
1108
+ "node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports2) {
1109
+ "use strict";
1110
+ Object.defineProperty(exports2, "__esModule", {
1111
+ value: true
1112
+ });
1113
+ Object.defineProperty(exports2, "getRouteMatcher", {
1114
+ enumerable: true,
1115
+ get: function() {
1116
+ return getRouteMatcher;
1117
+ }
1118
+ });
1119
+ var _utils = require_utils();
1120
+ function getRouteMatcher(param) {
1121
+ let { re, groups } = param;
1122
+ return (pathname) => {
1123
+ const routeMatch = re.exec(pathname);
1124
+ if (!routeMatch) return false;
1125
+ const decode = (param2) => {
1126
+ try {
1127
+ return decodeURIComponent(param2);
1128
+ } catch (e) {
1129
+ throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
1130
+ value: "E528",
1131
+ enumerable: false,
1132
+ configurable: true
1133
+ });
1134
+ }
1135
+ };
1136
+ const params = {};
1137
+ for (const [key, group] of Object.entries(groups)) {
1138
+ const match = routeMatch[group.pos];
1139
+ if (match !== void 0) {
1140
+ if (group.repeat) {
1141
+ params[key] = match.split("/").map((entry) => decode(entry));
1142
+ } else {
1143
+ params[key] = decode(match);
1144
+ }
1145
+ }
1146
+ }
1147
+ return params;
1148
+ };
1149
+ }
1150
+ }
1151
+ });
1152
+
1153
+ // node_modules/next/dist/lib/constants.js
1154
+ var require_constants = __commonJS({
1155
+ "node_modules/next/dist/lib/constants.js"(exports2) {
1156
+ "use strict";
1157
+ Object.defineProperty(exports2, "__esModule", {
1158
+ value: true
1159
+ });
1160
+ function _export(target, all) {
1161
+ for (var name in all) Object.defineProperty(target, name, {
1162
+ enumerable: true,
1163
+ get: all[name]
1164
+ });
1165
+ }
1166
+ _export(exports2, {
1167
+ ACTION_SUFFIX: function() {
1168
+ return ACTION_SUFFIX;
1169
+ },
1170
+ APP_DIR_ALIAS: function() {
1171
+ return APP_DIR_ALIAS;
1172
+ },
1173
+ CACHE_ONE_YEAR: function() {
1174
+ return CACHE_ONE_YEAR;
1175
+ },
1176
+ DOT_NEXT_ALIAS: function() {
1177
+ return DOT_NEXT_ALIAS;
1178
+ },
1179
+ ESLINT_DEFAULT_DIRS: function() {
1180
+ return ESLINT_DEFAULT_DIRS;
1181
+ },
1182
+ GSP_NO_RETURNED_VALUE: function() {
1183
+ return GSP_NO_RETURNED_VALUE;
1184
+ },
1185
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
1186
+ return GSSP_COMPONENT_MEMBER_ERROR;
1187
+ },
1188
+ GSSP_NO_RETURNED_VALUE: function() {
1189
+ return GSSP_NO_RETURNED_VALUE;
1190
+ },
1191
+ INFINITE_CACHE: function() {
1192
+ return INFINITE_CACHE;
1193
+ },
1194
+ INSTRUMENTATION_HOOK_FILENAME: function() {
1195
+ return INSTRUMENTATION_HOOK_FILENAME;
1196
+ },
1197
+ MATCHED_PATH_HEADER: function() {
1198
+ return MATCHED_PATH_HEADER;
1199
+ },
1200
+ MIDDLEWARE_FILENAME: function() {
1201
+ return MIDDLEWARE_FILENAME;
1202
+ },
1203
+ MIDDLEWARE_LOCATION_REGEXP: function() {
1204
+ return MIDDLEWARE_LOCATION_REGEXP;
1205
+ },
1206
+ NEXT_BODY_SUFFIX: function() {
1207
+ return NEXT_BODY_SUFFIX;
1208
+ },
1209
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
1210
+ return NEXT_CACHE_IMPLICIT_TAG_ID;
1211
+ },
1212
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
1213
+ return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
1214
+ },
1215
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
1216
+ return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
1217
+ },
1218
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
1219
+ return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
1220
+ },
1221
+ NEXT_CACHE_TAGS_HEADER: function() {
1222
+ return NEXT_CACHE_TAGS_HEADER;
1223
+ },
1224
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
1225
+ return NEXT_CACHE_TAG_MAX_ITEMS;
1226
+ },
1227
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
1228
+ return NEXT_CACHE_TAG_MAX_LENGTH;
1229
+ },
1230
+ NEXT_DATA_SUFFIX: function() {
1231
+ return NEXT_DATA_SUFFIX;
1232
+ },
1233
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
1234
+ return NEXT_INTERCEPTION_MARKER_PREFIX;
1235
+ },
1236
+ NEXT_META_SUFFIX: function() {
1237
+ return NEXT_META_SUFFIX;
1238
+ },
1239
+ NEXT_QUERY_PARAM_PREFIX: function() {
1240
+ return NEXT_QUERY_PARAM_PREFIX;
1241
+ },
1242
+ NEXT_RESUME_HEADER: function() {
1243
+ return NEXT_RESUME_HEADER;
1244
+ },
1245
+ NON_STANDARD_NODE_ENV: function() {
1246
+ return NON_STANDARD_NODE_ENV;
1247
+ },
1248
+ PAGES_DIR_ALIAS: function() {
1249
+ return PAGES_DIR_ALIAS;
1250
+ },
1251
+ PRERENDER_REVALIDATE_HEADER: function() {
1252
+ return PRERENDER_REVALIDATE_HEADER;
1253
+ },
1254
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
1255
+ return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
1256
+ },
1257
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
1258
+ return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
1259
+ },
1260
+ ROOT_DIR_ALIAS: function() {
1261
+ return ROOT_DIR_ALIAS;
1262
+ },
1263
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
1264
+ return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
1265
+ },
1266
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
1267
+ return RSC_ACTION_ENCRYPTION_ALIAS;
1268
+ },
1269
+ RSC_ACTION_PROXY_ALIAS: function() {
1270
+ return RSC_ACTION_PROXY_ALIAS;
1271
+ },
1272
+ RSC_ACTION_VALIDATE_ALIAS: function() {
1273
+ return RSC_ACTION_VALIDATE_ALIAS;
1274
+ },
1275
+ RSC_CACHE_WRAPPER_ALIAS: function() {
1276
+ return RSC_CACHE_WRAPPER_ALIAS;
1277
+ },
1278
+ RSC_MOD_REF_PROXY_ALIAS: function() {
1279
+ return RSC_MOD_REF_PROXY_ALIAS;
1280
+ },
1281
+ RSC_PREFETCH_SUFFIX: function() {
1282
+ return RSC_PREFETCH_SUFFIX;
1283
+ },
1284
+ RSC_SEGMENTS_DIR_SUFFIX: function() {
1285
+ return RSC_SEGMENTS_DIR_SUFFIX;
1286
+ },
1287
+ RSC_SEGMENT_SUFFIX: function() {
1288
+ return RSC_SEGMENT_SUFFIX;
1289
+ },
1290
+ RSC_SUFFIX: function() {
1291
+ return RSC_SUFFIX;
1292
+ },
1293
+ SERVER_PROPS_EXPORT_ERROR: function() {
1294
+ return SERVER_PROPS_EXPORT_ERROR;
1295
+ },
1296
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
1297
+ return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
1298
+ },
1299
+ SERVER_PROPS_SSG_CONFLICT: function() {
1300
+ return SERVER_PROPS_SSG_CONFLICT;
1301
+ },
1302
+ SERVER_RUNTIME: function() {
1303
+ return SERVER_RUNTIME;
1304
+ },
1305
+ SSG_FALLBACK_EXPORT_ERROR: function() {
1306
+ return SSG_FALLBACK_EXPORT_ERROR;
1307
+ },
1308
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
1309
+ return SSG_GET_INITIAL_PROPS_CONFLICT;
1310
+ },
1311
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
1312
+ return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
1313
+ },
1314
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
1315
+ return UNSTABLE_REVALIDATE_RENAME_ERROR;
1316
+ },
1317
+ WEBPACK_LAYERS: function() {
1318
+ return WEBPACK_LAYERS;
1319
+ },
1320
+ WEBPACK_RESOURCE_QUERIES: function() {
1321
+ return WEBPACK_RESOURCE_QUERIES;
1322
+ }
1323
+ });
1324
+ var NEXT_QUERY_PARAM_PREFIX = "nxtP";
1325
+ var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
1326
+ var MATCHED_PATH_HEADER = "x-matched-path";
1327
+ var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
1328
+ var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
1329
+ var RSC_PREFETCH_SUFFIX = ".prefetch.rsc";
1330
+ var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
1331
+ var RSC_SEGMENT_SUFFIX = ".segment.rsc";
1332
+ var RSC_SUFFIX = ".rsc";
1333
+ var ACTION_SUFFIX = ".action";
1334
+ var NEXT_DATA_SUFFIX = ".json";
1335
+ var NEXT_META_SUFFIX = ".meta";
1336
+ var NEXT_BODY_SUFFIX = ".body";
1337
+ var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
1338
+ var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
1339
+ var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
1340
+ var NEXT_RESUME_HEADER = "next-resume";
1341
+ var NEXT_CACHE_TAG_MAX_ITEMS = 128;
1342
+ var NEXT_CACHE_TAG_MAX_LENGTH = 256;
1343
+ var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
1344
+ var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
1345
+ var CACHE_ONE_YEAR = 31536e3;
1346
+ var INFINITE_CACHE = 4294967294;
1347
+ var MIDDLEWARE_FILENAME = "middleware";
1348
+ var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
1349
+ var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
1350
+ var PAGES_DIR_ALIAS = "private-next-pages";
1351
+ var DOT_NEXT_ALIAS = "private-dot-next";
1352
+ var ROOT_DIR_ALIAS = "private-next-root-dir";
1353
+ var APP_DIR_ALIAS = "private-next-app-dir";
1354
+ var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
1355
+ var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
1356
+ var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
1357
+ var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
1358
+ var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
1359
+ var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
1360
+ 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`;
1361
+ var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
1362
+ var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
1363
+ var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
1364
+ var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
1365
+ var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
1366
+ var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
1367
+ var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
1368
+ var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
1369
+ 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`;
1370
+ 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`;
1371
+ 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`;
1372
+ var ESLINT_DEFAULT_DIRS = [
1373
+ "app",
1374
+ "pages",
1375
+ "components",
1376
+ "lib",
1377
+ "src"
1378
+ ];
1379
+ var SERVER_RUNTIME = {
1380
+ edge: "edge",
1381
+ experimentalEdge: "experimental-edge",
1382
+ nodejs: "nodejs"
1383
+ };
1384
+ var WEBPACK_LAYERS_NAMES = {
1385
+ /**
1386
+ * The layer for the shared code between the client and server bundles.
1387
+ */
1388
+ shared: "shared",
1389
+ /**
1390
+ * The layer for server-only runtime and picking up `react-server` export conditions.
1391
+ * Including app router RSC pages and app router custom routes and metadata routes.
1392
+ */
1393
+ reactServerComponents: "rsc",
1394
+ /**
1395
+ * Server Side Rendering layer for app (ssr).
1396
+ */
1397
+ serverSideRendering: "ssr",
1398
+ /**
1399
+ * The browser client bundle layer for actions.
1400
+ */
1401
+ actionBrowser: "action-browser",
1402
+ /**
1403
+ * The Node.js bundle layer for the API routes.
1404
+ */
1405
+ apiNode: "api-node",
1406
+ /**
1407
+ * The Edge Lite bundle layer for the API routes.
1408
+ */
1409
+ apiEdge: "api-edge",
1410
+ /**
1411
+ * The layer for the middleware code.
1412
+ */
1413
+ middleware: "middleware",
1414
+ /**
1415
+ * The layer for the instrumentation hooks.
1416
+ */
1417
+ instrument: "instrument",
1418
+ /**
1419
+ * The layer for assets on the edge.
1420
+ */
1421
+ edgeAsset: "edge-asset",
1422
+ /**
1423
+ * The browser client bundle layer for App directory.
1424
+ */
1425
+ appPagesBrowser: "app-pages-browser",
1426
+ /**
1427
+ * The browser client bundle layer for Pages directory.
1428
+ */
1429
+ pagesDirBrowser: "pages-dir-browser",
1430
+ /**
1431
+ * The Edge Lite bundle layer for Pages directory.
1432
+ */
1433
+ pagesDirEdge: "pages-dir-edge",
1434
+ /**
1435
+ * The Node.js bundle layer for Pages directory.
1436
+ */
1437
+ pagesDirNode: "pages-dir-node"
1438
+ };
1439
+ var WEBPACK_LAYERS = {
1440
+ ...WEBPACK_LAYERS_NAMES,
1441
+ GROUP: {
1442
+ builtinReact: [
1443
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1444
+ WEBPACK_LAYERS_NAMES.actionBrowser
1445
+ ],
1446
+ serverOnly: [
1447
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1448
+ WEBPACK_LAYERS_NAMES.actionBrowser,
1449
+ WEBPACK_LAYERS_NAMES.instrument,
1450
+ WEBPACK_LAYERS_NAMES.middleware
1451
+ ],
1452
+ neutralTarget: [
1453
+ // pages api
1454
+ WEBPACK_LAYERS_NAMES.apiNode,
1455
+ WEBPACK_LAYERS_NAMES.apiEdge
1456
+ ],
1457
+ clientOnly: [
1458
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
1459
+ WEBPACK_LAYERS_NAMES.appPagesBrowser
1460
+ ],
1461
+ bundled: [
1462
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1463
+ WEBPACK_LAYERS_NAMES.actionBrowser,
1464
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
1465
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
1466
+ WEBPACK_LAYERS_NAMES.shared,
1467
+ WEBPACK_LAYERS_NAMES.instrument,
1468
+ WEBPACK_LAYERS_NAMES.middleware
1469
+ ],
1470
+ appPages: [
1471
+ // app router pages and layouts
1472
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1473
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
1474
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
1475
+ WEBPACK_LAYERS_NAMES.actionBrowser
1476
+ ]
1477
+ }
1478
+ };
1479
+ var WEBPACK_RESOURCE_QUERIES = {
1480
+ edgeSSREntry: "__next_edge_ssr_entry__",
1481
+ metadata: "__next_metadata__",
1482
+ metadataRoute: "__next_metadata_route__",
1483
+ metadataImageMeta: "__next_metadata_image_meta__"
1484
+ };
1485
+ }
1486
+ });
1487
+
1488
+ // node_modules/next/dist/shared/lib/escape-regexp.js
1489
+ var require_escape_regexp = __commonJS({
1490
+ "node_modules/next/dist/shared/lib/escape-regexp.js"(exports2) {
1491
+ "use strict";
1492
+ Object.defineProperty(exports2, "__esModule", {
1493
+ value: true
1494
+ });
1495
+ Object.defineProperty(exports2, "escapeStringRegexp", {
1496
+ enumerable: true,
1497
+ get: function() {
1498
+ return escapeStringRegexp;
1499
+ }
1500
+ });
1501
+ var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
1502
+ var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
1503
+ function escapeStringRegexp(str) {
1504
+ if (reHasRegExp.test(str)) {
1505
+ return str.replace(reReplaceRegExp, "\\$&");
1506
+ }
1507
+ return str;
1508
+ }
1509
+ }
1510
+ });
1511
+
1512
+ // node_modules/next/dist/shared/lib/router/utils/route-regex.js
1513
+ var require_route_regex = __commonJS({
1514
+ "node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports2) {
1515
+ "use strict";
1516
+ Object.defineProperty(exports2, "__esModule", {
1517
+ value: true
1518
+ });
1519
+ function _export(target, all) {
1520
+ for (var name in all) Object.defineProperty(target, name, {
1521
+ enumerable: true,
1522
+ get: all[name]
1523
+ });
1524
+ }
1525
+ _export(exports2, {
1526
+ getNamedMiddlewareRegex: function() {
1527
+ return getNamedMiddlewareRegex;
1528
+ },
1529
+ getNamedRouteRegex: function() {
1530
+ return getNamedRouteRegex;
1531
+ },
1532
+ getRouteRegex: function() {
1533
+ return getRouteRegex;
1534
+ },
1535
+ parseParameter: function() {
1536
+ return parseParameter;
1537
+ }
1538
+ });
1539
+ var _constants = require_constants();
1540
+ var _interceptionroutes = require_interception_routes();
1541
+ var _escaperegexp = require_escape_regexp();
1542
+ var _removetrailingslash = require_remove_trailing_slash();
1543
+ var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
1544
+ function parseParameter(param) {
1545
+ const match = param.match(PARAMETER_PATTERN);
1546
+ if (!match) {
1547
+ return parseMatchedParameter(param);
1548
+ }
1549
+ return parseMatchedParameter(match[2]);
1550
+ }
1551
+ function parseMatchedParameter(param) {
1552
+ const optional = param.startsWith("[") && param.endsWith("]");
1553
+ if (optional) {
1554
+ param = param.slice(1, -1);
1555
+ }
1556
+ const repeat = param.startsWith("...");
1557
+ if (repeat) {
1558
+ param = param.slice(3);
1559
+ }
1560
+ return {
1561
+ key: param,
1562
+ repeat,
1563
+ optional
1564
+ };
1565
+ }
1566
+ function getParametrizedRoute(route, includeSuffix, includePrefix) {
1567
+ const groups = {};
1568
+ let groupIndex = 1;
1569
+ const segments = [];
1570
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
1571
+ const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
1572
+ const paramMatches = segment.match(PARAMETER_PATTERN);
1573
+ if (markerMatch && paramMatches && paramMatches[2]) {
1574
+ const { key, optional, repeat } = parseMatchedParameter(paramMatches[2]);
1575
+ groups[key] = {
1576
+ pos: groupIndex++,
1577
+ repeat,
1578
+ optional
1579
+ };
1580
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(markerMatch) + "([^/]+?)");
1581
+ } else if (paramMatches && paramMatches[2]) {
1582
+ const { key, repeat, optional } = parseMatchedParameter(paramMatches[2]);
1583
+ groups[key] = {
1584
+ pos: groupIndex++,
1585
+ repeat,
1586
+ optional
1587
+ };
1588
+ if (includePrefix && paramMatches[1]) {
1589
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
1590
+ }
1591
+ let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
1592
+ if (includePrefix && paramMatches[1]) {
1593
+ s = s.substring(1);
1594
+ }
1595
+ segments.push(s);
1596
+ } else {
1597
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
1598
+ }
1599
+ if (includeSuffix && paramMatches && paramMatches[3]) {
1600
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
1601
+ }
1602
+ }
1603
+ return {
1604
+ parameterizedRoute: segments.join(""),
1605
+ groups
1606
+ };
1607
+ }
1608
+ function getRouteRegex(normalizedRoute, param) {
1609
+ let { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = param === void 0 ? {} : param;
1610
+ const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
1611
+ let re = parameterizedRoute;
1612
+ if (!excludeOptionalTrailingSlash) {
1613
+ re += "(?:/)?";
1614
+ }
1615
+ return {
1616
+ re: new RegExp("^" + re + "$"),
1617
+ groups
1618
+ };
1619
+ }
1620
+ function buildGetSafeRouteKey() {
1621
+ let i = 0;
1622
+ return () => {
1623
+ let routeKey = "";
1624
+ let j = ++i;
1625
+ while (j > 0) {
1626
+ routeKey += String.fromCharCode(97 + (j - 1) % 26);
1627
+ j = Math.floor((j - 1) / 26);
1628
+ }
1629
+ return routeKey;
1630
+ };
1631
+ }
1632
+ function getSafeKeyFromSegment(param) {
1633
+ let { interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys } = param;
1634
+ const { key, optional, repeat } = parseMatchedParameter(segment);
1635
+ let cleanedKey = key.replace(/\W/g, "");
1636
+ if (keyPrefix) {
1637
+ cleanedKey = "" + keyPrefix + cleanedKey;
1638
+ }
1639
+ let invalidKey = false;
1640
+ if (cleanedKey.length === 0 || cleanedKey.length > 30) {
1641
+ invalidKey = true;
1642
+ }
1643
+ if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
1644
+ invalidKey = true;
1645
+ }
1646
+ if (invalidKey) {
1647
+ cleanedKey = getSafeRouteKey();
1648
+ }
1649
+ const duplicateKey = cleanedKey in routeKeys;
1650
+ if (keyPrefix) {
1651
+ routeKeys[cleanedKey] = "" + keyPrefix + key;
1652
+ } else {
1653
+ routeKeys[cleanedKey] = key;
1654
+ }
1655
+ const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
1656
+ let pattern;
1657
+ if (duplicateKey && backreferenceDuplicateKeys) {
1658
+ pattern = "\\k<" + cleanedKey + ">";
1659
+ } else if (repeat) {
1660
+ pattern = "(?<" + cleanedKey + ">.+?)";
1661
+ } else {
1662
+ pattern = "(?<" + cleanedKey + ">[^/]+?)";
1663
+ }
1664
+ return optional ? "(?:/" + interceptionPrefix + pattern + ")?" : "/" + interceptionPrefix + pattern;
1665
+ }
1666
+ function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys) {
1667
+ const getSafeRouteKey = buildGetSafeRouteKey();
1668
+ const routeKeys = {};
1669
+ const segments = [];
1670
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
1671
+ const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
1672
+ const paramMatches = segment.match(PARAMETER_PATTERN);
1673
+ if (hasInterceptionMarker && paramMatches && paramMatches[2]) {
1674
+ segments.push(getSafeKeyFromSegment({
1675
+ getSafeRouteKey,
1676
+ interceptionMarker: paramMatches[1],
1677
+ segment: paramMatches[2],
1678
+ routeKeys,
1679
+ keyPrefix: prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0,
1680
+ backreferenceDuplicateKeys
1681
+ }));
1682
+ } else if (paramMatches && paramMatches[2]) {
1683
+ if (includePrefix && paramMatches[1]) {
1684
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
1685
+ }
1686
+ let s = getSafeKeyFromSegment({
1687
+ getSafeRouteKey,
1688
+ segment: paramMatches[2],
1689
+ routeKeys,
1690
+ keyPrefix: prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0,
1691
+ backreferenceDuplicateKeys
1692
+ });
1693
+ if (includePrefix && paramMatches[1]) {
1694
+ s = s.substring(1);
1695
+ }
1696
+ segments.push(s);
1697
+ } else {
1698
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
1699
+ }
1700
+ if (includeSuffix && paramMatches && paramMatches[3]) {
1701
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
1702
+ }
1703
+ }
1704
+ return {
1705
+ namedParameterizedRoute: segments.join(""),
1706
+ routeKeys
1707
+ };
1708
+ }
1709
+ function getNamedRouteRegex(normalizedRoute, options) {
1710
+ var _options_includeSuffix, _options_includePrefix, _options_backreferenceDuplicateKeys;
1711
+ 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);
1712
+ let namedRegex = result.namedParameterizedRoute;
1713
+ if (!options.excludeOptionalTrailingSlash) {
1714
+ namedRegex += "(?:/)?";
1715
+ }
1716
+ return {
1717
+ ...getRouteRegex(normalizedRoute, options),
1718
+ namedRegex: "^" + namedRegex + "$",
1719
+ routeKeys: result.routeKeys
1720
+ };
1721
+ }
1722
+ function getNamedMiddlewareRegex(normalizedRoute, options) {
1723
+ const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
1724
+ const { catchAll = true } = options;
1725
+ if (parameterizedRoute === "/") {
1726
+ let catchAllRegex = catchAll ? ".*" : "";
1727
+ return {
1728
+ namedRegex: "^/" + catchAllRegex + "$"
1729
+ };
1730
+ }
1731
+ const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false);
1732
+ let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
1733
+ return {
1734
+ namedRegex: "^" + namedParameterizedRoute + catchAllGroupedRegex + "$"
1735
+ };
1736
+ }
1737
+ }
1738
+ });
1739
+
1740
+ // node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
1741
+ var require_interpolate_as = __commonJS({
1742
+ "node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports2) {
1743
+ "use strict";
1744
+ Object.defineProperty(exports2, "__esModule", {
1745
+ value: true
1746
+ });
1747
+ Object.defineProperty(exports2, "interpolateAs", {
1748
+ enumerable: true,
1749
+ get: function() {
1750
+ return interpolateAs;
1751
+ }
1752
+ });
1753
+ var _routematcher = require_route_matcher();
1754
+ var _routeregex = require_route_regex();
1755
+ function interpolateAs(route, asPathname, query) {
1756
+ let interpolatedRoute = "";
1757
+ const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
1758
+ const dynamicGroups = dynamicRegex.groups;
1759
+ const dynamicMatches = (
1760
+ // Try to match the dynamic route against the asPath
1761
+ (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
1762
+ // TODO: should this take priority; also need to change in the router.
1763
+ query
1764
+ );
1765
+ interpolatedRoute = route;
1766
+ const params = Object.keys(dynamicGroups);
1767
+ if (!params.every((param) => {
1768
+ let value = dynamicMatches[param] || "";
1769
+ const { repeat, optional } = dynamicGroups[param];
1770
+ let replaced = "[" + (repeat ? "..." : "") + param + "]";
1771
+ if (optional) {
1772
+ replaced = (!value ? "/" : "") + "[" + replaced + "]";
1773
+ }
1774
+ if (repeat && !Array.isArray(value)) value = [
1775
+ value
1776
+ ];
1777
+ return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
1778
+ (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
1779
+ // these values should be fully encoded instead of just
1780
+ // path delimiter escaped since they are being inserted
1781
+ // into the URL and we expect URL encoded segments
1782
+ // when parsing dynamic route params
1783
+ (segment) => encodeURIComponent(segment)
1784
+ ).join("/") : encodeURIComponent(value)) || "/");
1785
+ })) {
1786
+ interpolatedRoute = "";
1787
+ }
1788
+ return {
1789
+ params,
1790
+ result: interpolatedRoute
1791
+ };
1792
+ }
1793
+ }
1794
+ });
1795
+
1796
+ // node_modules/next/dist/client/resolve-href.js
1797
+ var require_resolve_href = __commonJS({
1798
+ "node_modules/next/dist/client/resolve-href.js"(exports2, module2) {
1799
+ "use strict";
1800
+ Object.defineProperty(exports2, "__esModule", {
1801
+ value: true
1802
+ });
1803
+ Object.defineProperty(exports2, "resolveHref", {
1804
+ enumerable: true,
1805
+ get: function() {
1806
+ return resolveHref;
1807
+ }
1808
+ });
1809
+ var _querystring = require_querystring();
1810
+ var _formaturl = require_format_url();
1811
+ var _omit = require_omit();
1812
+ var _utils = require_utils();
1813
+ var _normalizetrailingslash = require_normalize_trailing_slash();
1814
+ var _islocalurl = require_is_local_url();
1815
+ var _utils1 = require_utils2();
1816
+ var _interpolateas = require_interpolate_as();
1817
+ function resolveHref(router, href, resolveAs) {
1818
+ let base;
1819
+ let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
1820
+ const urlProtoMatch = urlAsString.match(/^[a-zA-Z]{1,}:\/\//);
1821
+ const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
1822
+ const urlParts = urlAsStringNoProto.split("?", 1);
1823
+ if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
1824
+ console.error("Invalid href '" + urlAsString + "' passed to next/router in page: '" + router.pathname + "'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");
1825
+ const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
1826
+ urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
1827
+ }
1828
+ if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
1829
+ return resolveAs ? [
1830
+ urlAsString
1831
+ ] : urlAsString;
1832
+ }
1833
+ try {
1834
+ base = new URL(urlAsString.startsWith("#") ? router.asPath : router.pathname, "http://n");
1835
+ } catch (_) {
1836
+ base = new URL("/", "http://n");
1837
+ }
1838
+ try {
1839
+ const finalUrl = new URL(urlAsString, base);
1840
+ finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
1841
+ let interpolatedAs = "";
1842
+ if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
1843
+ const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
1844
+ const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
1845
+ if (result) {
1846
+ interpolatedAs = (0, _formaturl.formatWithValidation)({
1847
+ pathname: result,
1848
+ hash: finalUrl.hash,
1849
+ query: (0, _omit.omit)(query, params)
1850
+ });
1851
+ }
1852
+ }
1853
+ const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
1854
+ return resolveAs ? [
1855
+ resolvedHref,
1856
+ interpolatedAs || resolvedHref
1857
+ ] : resolvedHref;
1858
+ } catch (_) {
1859
+ return resolveAs ? [
1860
+ urlAsString
1861
+ ] : urlAsString;
1862
+ }
1863
+ }
1864
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
1865
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
1866
+ Object.assign(exports2.default, exports2);
1867
+ module2.exports = exports2.default;
1868
+ }
1869
+ }
1870
+ });
1871
+
1872
+ // node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
1873
+ var require_add_path_prefix = __commonJS({
1874
+ "node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports2) {
1875
+ "use strict";
1876
+ Object.defineProperty(exports2, "__esModule", {
1877
+ value: true
1878
+ });
1879
+ Object.defineProperty(exports2, "addPathPrefix", {
1880
+ enumerable: true,
1881
+ get: function() {
1882
+ return addPathPrefix;
1883
+ }
1884
+ });
1885
+ var _parsepath = require_parse_path();
1886
+ function addPathPrefix(path, prefix) {
1887
+ if (!path.startsWith("/") || !prefix) {
1888
+ return path;
1889
+ }
1890
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
1891
+ return "" + prefix + pathname + query + hash;
1892
+ }
1893
+ }
1894
+ });
1895
+
1896
+ // node_modules/next/dist/shared/lib/router/utils/add-locale.js
1897
+ var require_add_locale = __commonJS({
1898
+ "node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports2) {
1899
+ "use strict";
1900
+ Object.defineProperty(exports2, "__esModule", {
1901
+ value: true
1902
+ });
1903
+ Object.defineProperty(exports2, "addLocale", {
1904
+ enumerable: true,
1905
+ get: function() {
1906
+ return addLocale;
1907
+ }
1908
+ });
1909
+ var _addpathprefix = require_add_path_prefix();
1910
+ var _pathhasprefix = require_path_has_prefix();
1911
+ function addLocale(path, locale, defaultLocale, ignorePrefix) {
1912
+ if (!locale || locale === defaultLocale) return path;
1913
+ const lower = path.toLowerCase();
1914
+ if (!ignorePrefix) {
1915
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
1916
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase())) return path;
1917
+ }
1918
+ return (0, _addpathprefix.addPathPrefix)(path, "/" + locale);
1919
+ }
1920
+ }
1921
+ });
1922
+
1923
+ // node_modules/next/dist/client/add-locale.js
1924
+ var require_add_locale2 = __commonJS({
1925
+ "node_modules/next/dist/client/add-locale.js"(exports2, module2) {
1926
+ "use strict";
1927
+ Object.defineProperty(exports2, "__esModule", {
1928
+ value: true
1929
+ });
1930
+ Object.defineProperty(exports2, "addLocale", {
1931
+ enumerable: true,
1932
+ get: function() {
1933
+ return addLocale;
1934
+ }
1935
+ });
1936
+ var _normalizetrailingslash = require_normalize_trailing_slash();
1937
+ var addLocale = function(path) {
1938
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1939
+ args[_key - 1] = arguments[_key];
1940
+ }
1941
+ if (process.env.__NEXT_I18N_SUPPORT) {
1942
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
1943
+ }
1944
+ return path;
1945
+ };
1946
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
1947
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
1948
+ Object.assign(exports2.default, exports2);
1949
+ module2.exports = exports2.default;
1950
+ }
1951
+ }
1952
+ });
1953
+
1954
+ // node_modules/@swc/helpers/cjs/_interop_require_default.cjs
1955
+ var require_interop_require_default = __commonJS({
1956
+ "node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
1957
+ "use strict";
1958
+ function _interop_require_default(obj) {
1959
+ return obj && obj.__esModule ? obj : { default: obj };
1960
+ }
1961
+ exports2._ = _interop_require_default;
1962
+ }
1963
+ });
1964
+
1965
+ // node_modules/next/dist/shared/lib/router-context.shared-runtime.js
1966
+ var require_router_context_shared_runtime = __commonJS({
1967
+ "node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports2) {
1968
+ "use strict";
1969
+ Object.defineProperty(exports2, "__esModule", {
1970
+ value: true
1971
+ });
1972
+ Object.defineProperty(exports2, "RouterContext", {
1973
+ enumerable: true,
1974
+ get: function() {
1975
+ return RouterContext;
1976
+ }
1977
+ });
1978
+ var _interop_require_default = require_interop_require_default();
1979
+ var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
1980
+ var RouterContext = _react.default.createContext(null);
1981
+ if (process.env.NODE_ENV !== "production") {
1982
+ RouterContext.displayName = "RouterContext";
1983
+ }
1984
+ }
1985
+ });
1986
+
1987
+ // node_modules/next/dist/client/request-idle-callback.js
1988
+ var require_request_idle_callback = __commonJS({
1989
+ "node_modules/next/dist/client/request-idle-callback.js"(exports2, module2) {
1990
+ "use strict";
1991
+ Object.defineProperty(exports2, "__esModule", {
1992
+ value: true
1993
+ });
1994
+ function _export(target, all) {
1995
+ for (var name in all) Object.defineProperty(target, name, {
1996
+ enumerable: true,
1997
+ get: all[name]
1998
+ });
1999
+ }
2000
+ _export(exports2, {
2001
+ cancelIdleCallback: function() {
2002
+ return cancelIdleCallback;
2003
+ },
2004
+ requestIdleCallback: function() {
2005
+ return requestIdleCallback;
2006
+ }
2007
+ });
2008
+ var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
2009
+ let start = Date.now();
2010
+ return self.setTimeout(function() {
2011
+ cb({
2012
+ didTimeout: false,
2013
+ timeRemaining: function() {
2014
+ return Math.max(0, 50 - (Date.now() - start));
2015
+ }
2016
+ });
2017
+ }, 1);
2018
+ };
2019
+ var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
2020
+ return clearTimeout(id);
2021
+ };
2022
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2023
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2024
+ Object.assign(exports2.default, exports2);
2025
+ module2.exports = exports2.default;
2026
+ }
2027
+ }
2028
+ });
2029
+
2030
+ // node_modules/next/dist/client/use-intersection.js
2031
+ var require_use_intersection = __commonJS({
2032
+ "node_modules/next/dist/client/use-intersection.js"(exports2, module2) {
2033
+ "use strict";
2034
+ Object.defineProperty(exports2, "__esModule", {
2035
+ value: true
2036
+ });
2037
+ Object.defineProperty(exports2, "useIntersection", {
2038
+ enumerable: true,
2039
+ get: function() {
2040
+ return useIntersection;
2041
+ }
2042
+ });
2043
+ var _react = require("react");
2044
+ var _requestidlecallback = require_request_idle_callback();
2045
+ var hasIntersectionObserver = typeof IntersectionObserver === "function";
2046
+ var observers = /* @__PURE__ */ new Map();
2047
+ var idList = [];
2048
+ function createObserver(options) {
2049
+ const id = {
2050
+ root: options.root || null,
2051
+ margin: options.rootMargin || ""
2052
+ };
2053
+ const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
2054
+ let instance;
2055
+ if (existing) {
2056
+ instance = observers.get(existing);
2057
+ if (instance) {
2058
+ return instance;
2059
+ }
2060
+ }
2061
+ const elements = /* @__PURE__ */ new Map();
2062
+ const observer = new IntersectionObserver((entries) => {
2063
+ entries.forEach((entry) => {
2064
+ const callback = elements.get(entry.target);
2065
+ const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
2066
+ if (callback && isVisible) {
2067
+ callback(isVisible);
2068
+ }
2069
+ });
2070
+ }, options);
2071
+ instance = {
2072
+ id,
2073
+ observer,
2074
+ elements
2075
+ };
2076
+ idList.push(id);
2077
+ observers.set(id, instance);
2078
+ return instance;
2079
+ }
2080
+ function observe(element, callback, options) {
2081
+ const { id, observer, elements } = createObserver(options);
2082
+ elements.set(element, callback);
2083
+ observer.observe(element);
2084
+ return function unobserve() {
2085
+ elements.delete(element);
2086
+ observer.unobserve(element);
2087
+ if (elements.size === 0) {
2088
+ observer.disconnect();
2089
+ observers.delete(id);
2090
+ const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
2091
+ if (index > -1) {
2092
+ idList.splice(index, 1);
2093
+ }
2094
+ }
2095
+ };
2096
+ }
2097
+ function useIntersection(param) {
2098
+ let { rootRef, rootMargin, disabled } = param;
2099
+ const isDisabled = disabled || !hasIntersectionObserver;
2100
+ const [visible, setVisible] = (0, _react.useState)(false);
2101
+ const elementRef = (0, _react.useRef)(null);
2102
+ const setElement = (0, _react.useCallback)((element) => {
2103
+ elementRef.current = element;
2104
+ }, []);
2105
+ (0, _react.useEffect)(() => {
2106
+ if (hasIntersectionObserver) {
2107
+ if (isDisabled || visible) return;
2108
+ const element = elementRef.current;
2109
+ if (element && element.tagName) {
2110
+ const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
2111
+ root: rootRef == null ? void 0 : rootRef.current,
2112
+ rootMargin
2113
+ });
2114
+ return unobserve;
2115
+ }
2116
+ } else {
2117
+ if (!visible) {
2118
+ const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
2119
+ return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
2120
+ }
2121
+ }
2122
+ }, [
2123
+ isDisabled,
2124
+ rootMargin,
2125
+ rootRef,
2126
+ visible,
2127
+ elementRef.current
2128
+ ]);
2129
+ const resetVisible = (0, _react.useCallback)(() => {
2130
+ setVisible(false);
2131
+ }, []);
2132
+ return [
2133
+ setElement,
2134
+ visible,
2135
+ resetVisible
2136
+ ];
2137
+ }
2138
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2139
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2140
+ Object.assign(exports2.default, exports2);
2141
+ module2.exports = exports2.default;
2142
+ }
2143
+ }
2144
+ });
2145
+
2146
+ // node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
2147
+ var require_normalize_locale_path = __commonJS({
2148
+ "node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports2) {
2149
+ "use strict";
2150
+ Object.defineProperty(exports2, "__esModule", {
2151
+ value: true
2152
+ });
2153
+ Object.defineProperty(exports2, "normalizeLocalePath", {
2154
+ enumerable: true,
2155
+ get: function() {
2156
+ return normalizeLocalePath;
2157
+ }
2158
+ });
2159
+ var cache = /* @__PURE__ */ new WeakMap();
2160
+ function normalizeLocalePath(pathname, locales) {
2161
+ if (!locales) return {
2162
+ pathname
2163
+ };
2164
+ let lowercasedLocales = cache.get(locales);
2165
+ if (!lowercasedLocales) {
2166
+ lowercasedLocales = locales.map((locale) => locale.toLowerCase());
2167
+ cache.set(locales, lowercasedLocales);
2168
+ }
2169
+ let detectedLocale;
2170
+ const segments = pathname.split("/", 2);
2171
+ if (!segments[1]) return {
2172
+ pathname
2173
+ };
2174
+ const segment = segments[1].toLowerCase();
2175
+ const index = lowercasedLocales.indexOf(segment);
2176
+ if (index < 0) return {
2177
+ pathname
2178
+ };
2179
+ detectedLocale = locales[index];
2180
+ pathname = pathname.slice(detectedLocale.length + 1) || "/";
2181
+ return {
2182
+ pathname,
2183
+ detectedLocale
2184
+ };
2185
+ }
2186
+ }
2187
+ });
2188
+
2189
+ // node_modules/next/dist/client/normalize-locale-path.js
2190
+ var require_normalize_locale_path2 = __commonJS({
2191
+ "node_modules/next/dist/client/normalize-locale-path.js"(exports2, module2) {
2192
+ "use strict";
2193
+ Object.defineProperty(exports2, "__esModule", {
2194
+ value: true
2195
+ });
2196
+ Object.defineProperty(exports2, "normalizeLocalePath", {
2197
+ enumerable: true,
2198
+ get: function() {
2199
+ return normalizeLocalePath;
2200
+ }
2201
+ });
2202
+ var normalizeLocalePath = (pathname, locales) => {
2203
+ if (process.env.__NEXT_I18N_SUPPORT) {
2204
+ return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
2205
+ }
2206
+ return {
2207
+ pathname,
2208
+ detectedLocale: void 0
2209
+ };
2210
+ };
2211
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2212
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2213
+ Object.assign(exports2.default, exports2);
2214
+ module2.exports = exports2.default;
2215
+ }
2216
+ }
2217
+ });
2218
+
2219
+ // node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
2220
+ var require_detect_domain_locale = __commonJS({
2221
+ "node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports2) {
2222
+ "use strict";
2223
+ Object.defineProperty(exports2, "__esModule", {
2224
+ value: true
2225
+ });
2226
+ Object.defineProperty(exports2, "detectDomainLocale", {
2227
+ enumerable: true,
2228
+ get: function() {
2229
+ return detectDomainLocale;
2230
+ }
2231
+ });
2232
+ function detectDomainLocale(domainItems, hostname, detectedLocale) {
2233
+ if (!domainItems) return;
2234
+ if (detectedLocale) {
2235
+ detectedLocale = detectedLocale.toLowerCase();
2236
+ }
2237
+ for (const item of domainItems) {
2238
+ var _item_domain, _item_locales;
2239
+ const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
2240
+ if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) {
2241
+ return item;
2242
+ }
2243
+ }
2244
+ }
2245
+ }
2246
+ });
2247
+
2248
+ // node_modules/next/dist/client/detect-domain-locale.js
2249
+ var require_detect_domain_locale2 = __commonJS({
2250
+ "node_modules/next/dist/client/detect-domain-locale.js"(exports2, module2) {
2251
+ "use strict";
2252
+ Object.defineProperty(exports2, "__esModule", {
2253
+ value: true
2254
+ });
2255
+ Object.defineProperty(exports2, "detectDomainLocale", {
2256
+ enumerable: true,
2257
+ get: function() {
2258
+ return detectDomainLocale;
2259
+ }
2260
+ });
2261
+ var detectDomainLocale = function() {
2262
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2263
+ args[_key] = arguments[_key];
2264
+ }
2265
+ if (process.env.__NEXT_I18N_SUPPORT) {
2266
+ return require_detect_domain_locale().detectDomainLocale(...args);
2267
+ }
2268
+ };
2269
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2270
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2271
+ Object.assign(exports2.default, exports2);
2272
+ module2.exports = exports2.default;
2273
+ }
2274
+ }
2275
+ });
2276
+
2277
+ // node_modules/next/dist/client/get-domain-locale.js
2278
+ var require_get_domain_locale = __commonJS({
2279
+ "node_modules/next/dist/client/get-domain-locale.js"(exports2, module2) {
2280
+ "use strict";
2281
+ Object.defineProperty(exports2, "__esModule", {
2282
+ value: true
2283
+ });
2284
+ Object.defineProperty(exports2, "getDomainLocale", {
2285
+ enumerable: true,
2286
+ get: function() {
2287
+ return getDomainLocale;
2288
+ }
2289
+ });
2290
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2291
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2292
+ function getDomainLocale(path, locale, locales, domainLocales) {
2293
+ if (process.env.__NEXT_I18N_SUPPORT) {
2294
+ const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
2295
+ const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
2296
+ const target = locale || normalizeLocalePath(path, locales).detectedLocale;
2297
+ const domain = detectDomainLocale(domainLocales, void 0, target);
2298
+ if (domain) {
2299
+ const proto = "http" + (domain.http ? "" : "s") + "://";
2300
+ const finalLocale = target === domain.defaultLocale ? "" : "/" + target;
2301
+ return "" + proto + domain.domain + (0, _normalizetrailingslash.normalizePathTrailingSlash)("" + basePath + finalLocale + path);
2302
+ }
2303
+ return false;
2304
+ } else {
2305
+ return false;
2306
+ }
2307
+ }
2308
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2309
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2310
+ Object.assign(exports2.default, exports2);
2311
+ module2.exports = exports2.default;
2312
+ }
2313
+ }
2314
+ });
2315
+
2316
+ // node_modules/next/dist/client/add-base-path.js
2317
+ var require_add_base_path = __commonJS({
2318
+ "node_modules/next/dist/client/add-base-path.js"(exports2, module2) {
2319
+ "use strict";
2320
+ Object.defineProperty(exports2, "__esModule", {
2321
+ value: true
2322
+ });
2323
+ Object.defineProperty(exports2, "addBasePath", {
2324
+ enumerable: true,
2325
+ get: function() {
2326
+ return addBasePath;
2327
+ }
2328
+ });
2329
+ var _addpathprefix = require_add_path_prefix();
2330
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2331
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2332
+ function addBasePath(path, required) {
2333
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
2334
+ }
2335
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2336
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2337
+ Object.assign(exports2.default, exports2);
2338
+ module2.exports = exports2.default;
2339
+ }
2340
+ }
2341
+ });
2342
+
2343
+ // node_modules/next/dist/client/use-merged-ref.js
2344
+ var require_use_merged_ref = __commonJS({
2345
+ "node_modules/next/dist/client/use-merged-ref.js"(exports2, module2) {
2346
+ "use strict";
2347
+ Object.defineProperty(exports2, "__esModule", {
2348
+ value: true
2349
+ });
2350
+ Object.defineProperty(exports2, "useMergedRef", {
2351
+ enumerable: true,
2352
+ get: function() {
2353
+ return useMergedRef;
2354
+ }
2355
+ });
2356
+ var _react = require("react");
2357
+ function useMergedRef(refA, refB) {
2358
+ const cleanupA = (0, _react.useRef)(null);
2359
+ const cleanupB = (0, _react.useRef)(null);
2360
+ return (0, _react.useCallback)((current) => {
2361
+ if (current === null) {
2362
+ const cleanupFnA = cleanupA.current;
2363
+ if (cleanupFnA) {
2364
+ cleanupA.current = null;
2365
+ cleanupFnA();
2366
+ }
2367
+ const cleanupFnB = cleanupB.current;
2368
+ if (cleanupFnB) {
2369
+ cleanupB.current = null;
2370
+ cleanupFnB();
2371
+ }
2372
+ } else {
2373
+ if (refA) {
2374
+ cleanupA.current = applyRef(refA, current);
2375
+ }
2376
+ if (refB) {
2377
+ cleanupB.current = applyRef(refB, current);
2378
+ }
2379
+ }
2380
+ }, [
2381
+ refA,
2382
+ refB
2383
+ ]);
2384
+ }
2385
+ function applyRef(refA, current) {
2386
+ if (typeof refA === "function") {
2387
+ const cleanup = refA(current);
2388
+ if (typeof cleanup === "function") {
2389
+ return cleanup;
2390
+ } else {
2391
+ return () => refA(null);
2392
+ }
2393
+ } else {
2394
+ refA.current = current;
2395
+ return () => {
2396
+ refA.current = null;
2397
+ };
2398
+ }
2399
+ }
2400
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2401
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2402
+ Object.assign(exports2.default, exports2);
2403
+ module2.exports = exports2.default;
2404
+ }
2405
+ }
2406
+ });
2407
+
2408
+ // node_modules/next/dist/shared/lib/utils/error-once.js
2409
+ var require_error_once = __commonJS({
2410
+ "node_modules/next/dist/shared/lib/utils/error-once.js"(exports2) {
2411
+ "use strict";
2412
+ Object.defineProperty(exports2, "__esModule", {
2413
+ value: true
2414
+ });
2415
+ Object.defineProperty(exports2, "errorOnce", {
2416
+ enumerable: true,
2417
+ get: function() {
2418
+ return errorOnce;
2419
+ }
2420
+ });
2421
+ var errorOnce = (_) => {
2422
+ };
2423
+ if (process.env.NODE_ENV !== "production") {
2424
+ const errors = /* @__PURE__ */ new Set();
2425
+ errorOnce = (msg) => {
2426
+ if (!errors.has(msg)) {
2427
+ console.error(msg);
2428
+ }
2429
+ errors.add(msg);
2430
+ };
2431
+ }
2432
+ }
2433
+ });
2434
+
2435
+ // node_modules/next/dist/client/link.js
2436
+ var require_link = __commonJS({
2437
+ "node_modules/next/dist/client/link.js"(exports2, module2) {
2438
+ "use strict";
2439
+ "use client";
2440
+ Object.defineProperty(exports2, "__esModule", {
2441
+ value: true
2442
+ });
2443
+ function _export(target, all) {
2444
+ for (var name in all) Object.defineProperty(target, name, {
2445
+ enumerable: true,
2446
+ get: all[name]
2447
+ });
2448
+ }
2449
+ _export(exports2, {
2450
+ default: function() {
2451
+ return _default;
2452
+ },
2453
+ useLinkStatus: function() {
2454
+ return useLinkStatus;
2455
+ }
2456
+ });
2457
+ var _interop_require_wildcard = require_interop_require_wildcard();
2458
+ var _jsxruntime = require("react/jsx-runtime");
2459
+ var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
2460
+ var _resolvehref = require_resolve_href();
2461
+ var _islocalurl = require_is_local_url();
2462
+ var _formaturl = require_format_url();
2463
+ var _utils = require_utils();
2464
+ var _addlocale = require_add_locale2();
2465
+ var _routercontextsharedruntime = require_router_context_shared_runtime();
2466
+ var _useintersection = require_use_intersection();
2467
+ var _getdomainlocale = require_get_domain_locale();
2468
+ var _addbasepath = require_add_base_path();
2469
+ var _usemergedref = require_use_merged_ref();
2470
+ var _erroronce = require_error_once();
2471
+ var prefetched = /* @__PURE__ */ new Set();
2472
+ function prefetch(router, href, as, options) {
2473
+ if (typeof window === "undefined") {
2474
+ return;
2475
+ }
2476
+ if (!(0, _islocalurl.isLocalURL)(href)) {
2477
+ return;
2478
+ }
2479
+ if (!options.bypassPrefetchedCheck) {
2480
+ const locale = (
2481
+ // Let the link's locale prop override the default router locale.
2482
+ typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
2483
+ );
2484
+ const prefetchedKey = href + "%" + as + "%" + locale;
2485
+ if (prefetched.has(prefetchedKey)) {
2486
+ return;
2487
+ }
2488
+ prefetched.add(prefetchedKey);
2489
+ }
2490
+ router.prefetch(href, as, options).catch((err) => {
2491
+ if (process.env.NODE_ENV !== "production") {
2492
+ throw err;
2493
+ }
2494
+ });
2495
+ }
2496
+ function isModifiedEvent(event) {
2497
+ const eventTarget = event.currentTarget;
2498
+ const target = eventTarget.getAttribute("target");
2499
+ return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
2500
+ event.nativeEvent && event.nativeEvent.which === 2;
2501
+ }
2502
+ function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
2503
+ const { nodeName } = e.currentTarget;
2504
+ const isAnchorNodeName = nodeName.toUpperCase() === "A";
2505
+ if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
2506
+ return;
2507
+ }
2508
+ if (!(0, _islocalurl.isLocalURL)(href)) {
2509
+ if (replace) {
2510
+ e.preventDefault();
2511
+ location.replace(href);
2512
+ }
2513
+ return;
2514
+ }
2515
+ e.preventDefault();
2516
+ const navigate = () => {
2517
+ if (onNavigate) {
2518
+ let isDefaultPrevented = false;
2519
+ onNavigate({
2520
+ preventDefault: () => {
2521
+ isDefaultPrevented = true;
2522
+ }
2523
+ });
2524
+ if (isDefaultPrevented) {
2525
+ return;
2526
+ }
2527
+ }
2528
+ const routerScroll = scroll != null ? scroll : true;
2529
+ if ("beforePopState" in router) {
2530
+ router[replace ? "replace" : "push"](href, as, {
2531
+ shallow,
2532
+ locale,
2533
+ scroll: routerScroll
2534
+ });
2535
+ } else {
2536
+ router[replace ? "replace" : "push"](as || href, {
2537
+ scroll: routerScroll
2538
+ });
2539
+ }
2540
+ };
2541
+ navigate();
2542
+ }
2543
+ function formatStringOrUrl(urlObjOrString) {
2544
+ if (typeof urlObjOrString === "string") {
2545
+ return urlObjOrString;
2546
+ }
2547
+ return (0, _formaturl.formatUrl)(urlObjOrString);
2548
+ }
2549
+ var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
2550
+ let children;
2551
+ 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;
2552
+ children = childrenProp;
2553
+ if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
2554
+ children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
2555
+ children
2556
+ });
2557
+ }
2558
+ const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
2559
+ const prefetchEnabled = prefetchProp !== false;
2560
+ if (process.env.NODE_ENV !== "production") {
2561
+ let createPropError = function(args) {
2562
+ 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", {
2563
+ value: "E319",
2564
+ enumerable: false,
2565
+ configurable: true
2566
+ });
2567
+ };
2568
+ const requiredPropsGuard = {
2569
+ href: true
2570
+ };
2571
+ const requiredProps = Object.keys(requiredPropsGuard);
2572
+ requiredProps.forEach((key) => {
2573
+ if (key === "href") {
2574
+ if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
2575
+ throw createPropError({
2576
+ key,
2577
+ expected: "`string` or `object`",
2578
+ actual: props[key] === null ? "null" : typeof props[key]
2579
+ });
2580
+ }
2581
+ } else {
2582
+ const _ = key;
2583
+ }
2584
+ });
2585
+ const optionalPropsGuard = {
2586
+ as: true,
2587
+ replace: true,
2588
+ scroll: true,
2589
+ shallow: true,
2590
+ passHref: true,
2591
+ prefetch: true,
2592
+ locale: true,
2593
+ onClick: true,
2594
+ onMouseEnter: true,
2595
+ onTouchStart: true,
2596
+ legacyBehavior: true,
2597
+ onNavigate: true
2598
+ };
2599
+ const optionalProps = Object.keys(optionalPropsGuard);
2600
+ optionalProps.forEach((key) => {
2601
+ const valType = typeof props[key];
2602
+ if (key === "as") {
2603
+ if (props[key] && valType !== "string" && valType !== "object") {
2604
+ throw createPropError({
2605
+ key,
2606
+ expected: "`string` or `object`",
2607
+ actual: valType
2608
+ });
2609
+ }
2610
+ } else if (key === "locale") {
2611
+ if (props[key] && valType !== "string") {
2612
+ throw createPropError({
2613
+ key,
2614
+ expected: "`string`",
2615
+ actual: valType
2616
+ });
2617
+ }
2618
+ } else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
2619
+ if (props[key] && valType !== "function") {
2620
+ throw createPropError({
2621
+ key,
2622
+ expected: "`function`",
2623
+ actual: valType
2624
+ });
2625
+ }
2626
+ } else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "prefetch" || key === "legacyBehavior") {
2627
+ if (props[key] != null && valType !== "boolean") {
2628
+ throw createPropError({
2629
+ key,
2630
+ expected: "`boolean`",
2631
+ actual: valType
2632
+ });
2633
+ }
2634
+ } else {
2635
+ const _ = key;
2636
+ }
2637
+ });
2638
+ }
2639
+ const { href, as } = _react.default.useMemo(() => {
2640
+ if (!router) {
2641
+ const resolvedHref2 = formatStringOrUrl(hrefProp);
2642
+ return {
2643
+ href: resolvedHref2,
2644
+ as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
2645
+ };
2646
+ }
2647
+ const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
2648
+ return {
2649
+ href: resolvedHref,
2650
+ as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
2651
+ };
2652
+ }, [
2653
+ router,
2654
+ hrefProp,
2655
+ asProp
2656
+ ]);
2657
+ const previousHref = _react.default.useRef(href);
2658
+ const previousAs = _react.default.useRef(as);
2659
+ let child;
2660
+ if (legacyBehavior) {
2661
+ if (process.env.NODE_ENV === "development") {
2662
+ if (onClick) {
2663
+ 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');
2664
+ }
2665
+ if (onMouseEnterProp) {
2666
+ 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');
2667
+ }
2668
+ try {
2669
+ child = _react.default.Children.only(children);
2670
+ } catch (err) {
2671
+ if (!children) {
2672
+ 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", {
2673
+ value: "E320",
2674
+ enumerable: false,
2675
+ configurable: true
2676
+ });
2677
+ }
2678
+ 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", {
2679
+ value: "E266",
2680
+ enumerable: false,
2681
+ configurable: true
2682
+ });
2683
+ }
2684
+ } else {
2685
+ child = _react.default.Children.only(children);
2686
+ }
2687
+ } else {
2688
+ if (process.env.NODE_ENV === "development") {
2689
+ if ((children == null ? void 0 : children.type) === "a") {
2690
+ 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", {
2691
+ value: "E209",
2692
+ enumerable: false,
2693
+ configurable: true
2694
+ });
2695
+ }
2696
+ }
2697
+ }
2698
+ const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
2699
+ const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
2700
+ rootMargin: "200px"
2701
+ });
2702
+ const setIntersectionWithResetRef = _react.default.useCallback((el) => {
2703
+ if (previousAs.current !== as || previousHref.current !== href) {
2704
+ resetVisible();
2705
+ previousAs.current = as;
2706
+ previousHref.current = href;
2707
+ }
2708
+ setIntersectionRef(el);
2709
+ }, [
2710
+ as,
2711
+ href,
2712
+ resetVisible,
2713
+ setIntersectionRef
2714
+ ]);
2715
+ const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
2716
+ _react.default.useEffect(() => {
2717
+ if (process.env.NODE_ENV !== "production") {
2718
+ return;
2719
+ }
2720
+ if (!router) {
2721
+ return;
2722
+ }
2723
+ if (!isVisible || !prefetchEnabled) {
2724
+ return;
2725
+ }
2726
+ prefetch(router, href, as, {
2727
+ locale
2728
+ });
2729
+ }, [
2730
+ as,
2731
+ href,
2732
+ isVisible,
2733
+ locale,
2734
+ prefetchEnabled,
2735
+ router == null ? void 0 : router.locale,
2736
+ router
2737
+ ]);
2738
+ const childProps = {
2739
+ ref: setRef,
2740
+ onClick(e) {
2741
+ if (process.env.NODE_ENV !== "production") {
2742
+ if (!e) {
2743
+ throw Object.defineProperty(new Error('Component rendered inside next/link has to pass click event to "onClick" prop.'), "__NEXT_ERROR_CODE", {
2744
+ value: "E312",
2745
+ enumerable: false,
2746
+ configurable: true
2747
+ });
2748
+ }
2749
+ }
2750
+ if (!legacyBehavior && typeof onClick === "function") {
2751
+ onClick(e);
2752
+ }
2753
+ if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
2754
+ child.props.onClick(e);
2755
+ }
2756
+ if (!router) {
2757
+ return;
2758
+ }
2759
+ if (e.defaultPrevented) {
2760
+ return;
2761
+ }
2762
+ linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
2763
+ },
2764
+ onMouseEnter(e) {
2765
+ if (!legacyBehavior && typeof onMouseEnterProp === "function") {
2766
+ onMouseEnterProp(e);
2767
+ }
2768
+ if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
2769
+ child.props.onMouseEnter(e);
2770
+ }
2771
+ if (!router) {
2772
+ return;
2773
+ }
2774
+ prefetch(router, href, as, {
2775
+ locale,
2776
+ priority: true,
2777
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
2778
+ bypassPrefetchedCheck: true
2779
+ });
2780
+ },
2781
+ onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
2782
+ if (!legacyBehavior && typeof onTouchStartProp === "function") {
2783
+ onTouchStartProp(e);
2784
+ }
2785
+ if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
2786
+ child.props.onTouchStart(e);
2787
+ }
2788
+ if (!router) {
2789
+ return;
2790
+ }
2791
+ prefetch(router, href, as, {
2792
+ locale,
2793
+ priority: true,
2794
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
2795
+ bypassPrefetchedCheck: true
2796
+ });
2797
+ }
2798
+ };
2799
+ if ((0, _utils.isAbsoluteUrl)(as)) {
2800
+ childProps.href = as;
2801
+ } else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
2802
+ const curLocale = typeof locale !== "undefined" ? locale : router == null ? void 0 : router.locale;
2803
+ 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);
2804
+ childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router == null ? void 0 : router.defaultLocale));
2805
+ }
2806
+ if (legacyBehavior) {
2807
+ if (process.env.NODE_ENV === "development") {
2808
+ (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");
2809
+ }
2810
+ return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
2811
+ }
2812
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
2813
+ ...restProps,
2814
+ ...childProps,
2815
+ children
2816
+ });
2817
+ });
2818
+ var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
2819
+ // We do not support link status in the Pages Router, so we always return false
2820
+ pending: false
2821
+ });
2822
+ var useLinkStatus = () => {
2823
+ return (0, _react.useContext)(LinkStatusContext);
2824
+ };
2825
+ var _default = Link2;
2826
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2827
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2828
+ Object.assign(exports2.default, exports2);
2829
+ module2.exports = exports2.default;
2830
+ }
2831
+ }
2832
+ });
2833
+
2834
+ // node_modules/next/link.js
2835
+ var require_link2 = __commonJS({
2836
+ "node_modules/next/link.js"(exports2, module2) {
2837
+ "use strict";
2838
+ module2.exports = require_link();
2839
+ }
2840
+ });
29
2841
 
30
2842
  // src/index.ts
31
2843
  var index_exports = {};
@@ -59,6 +2871,7 @@ __export(index_exports, {
59
2871
  EaseFunctions: () => EaseFunctions,
60
2872
  ErrorComponent: () => ErrorComponent,
61
2873
  Expandable: () => Expandable,
2874
+ ExpandableUncontrolled: () => ExpandableUncontrolled,
62
2875
  FAQSection: () => FAQSection,
63
2876
  FormInput: () => FormInput,
64
2877
  Helpwave: () => Helpwave,
@@ -107,6 +2920,7 @@ __export(index_exports, {
107
2920
  SolidButton: () => SolidButton,
108
2921
  SortButton: () => SortButton,
109
2922
  StepperBar: () => StepperBar,
2923
+ StepperBarUncontrolled: () => StepperBarUncontrolled,
110
2924
  Table: () => Table,
111
2925
  TagIcon: () => TagIcon,
112
2926
  TextButton: () => TextButton,
@@ -119,7 +2933,6 @@ __export(index_exports, {
119
2933
  ThemeProvider: () => ThemeProvider,
120
2934
  ThemeUtil: () => ThemeUtil,
121
2935
  Tile: () => Tile,
122
- TileWithImage: () => TileWithImage,
123
2936
  TimeDisplay: () => TimeDisplay,
124
2937
  TimePicker: () => TimePicker,
125
2938
  TimePickerUncontrolled: () => TimePickerUncontrolled,
@@ -224,7 +3037,6 @@ var shadingColorValues = [0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 55
224
3037
  var import_clsx3 = __toESM(require("clsx"), 1);
225
3038
 
226
3039
  // src/components/layout-and-navigation/Tile.tsx
227
- var import_image = __toESM(require("next/image"), 1);
228
3040
  var import_clsx = __toESM(require("clsx"), 1);
229
3041
  var import_jsx_runtime = require("react/jsx-runtime");
230
3042
  var Tile = ({
@@ -236,30 +3048,13 @@ var Tile = ({
236
3048
  }) => {
237
3049
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_clsx.default)("row gap-x-4 w-full items-center", className), children: [
238
3050
  prefix,
239
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "col w-full", children: [
240
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(title.className), children: title.value }),
3051
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "col gap-y-0 w-full", children: [
3052
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: (0, import_clsx.default)(title.className ?? "textstyle-title-normal"), children: title.value }),
241
3053
  !!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(description.className ?? "textstyle-description"), children: description.value })
242
3054
  ] }),
243
3055
  suffix
244
3056
  ] });
245
3057
  };
246
- var TileWithImage = ({
247
- url,
248
- imageLocation = "prefix",
249
- imageSize = { width: 24, height: 24 },
250
- imageClassName = "",
251
- ...tileProps
252
- }) => {
253
- const image = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: url, alt: "", ...imageSize, className: (0, import_clsx.default)(imageClassName) });
254
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
255
- Tile,
256
- {
257
- ...tileProps,
258
- prefix: imageLocation === "prefix" ? image : void 0,
259
- suffix: imageLocation === "suffix" ? image : void 0
260
- }
261
- );
262
- };
263
3058
 
264
3059
  // src/components/icons-and-geometry/Helpwave.tsx
265
3060
  var import_clsx2 = require("clsx");
@@ -975,24 +3770,24 @@ var import_lucide_react = require("lucide-react");
975
3770
  var import_clsx5 = __toESM(require("clsx"), 1);
976
3771
  var import_jsx_runtime6 = require("react/jsx-runtime");
977
3772
  var DefaultIcon = (expanded) => expanded ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.ChevronUp, { size: 16, className: "min-w-[16px]" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.ChevronDown, { size: 16, className: "min-w-[16px]" });
978
- var Expandable = (0, import_react3.forwardRef)(({
3773
+ var Expandable = (0, import_react3.forwardRef)(function Expandable2({
979
3774
  children,
980
3775
  label,
981
3776
  icon,
982
- initialExpansion = false,
3777
+ isExpanded = false,
3778
+ onChange = noop,
983
3779
  clickOnlyOnHeader = true,
984
3780
  disabled = false,
985
3781
  className = "",
986
3782
  headerClassName = ""
987
- }, ref) => {
988
- const [isExpanded, setIsExpanded] = (0, import_react3.useState)(initialExpansion);
3783
+ }, ref) {
989
3784
  icon ??= DefaultIcon;
990
3785
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
991
3786
  "div",
992
3787
  {
993
3788
  ref,
994
3789
  className: (0, import_clsx5.default)("col gap-y-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
995
- onClick: () => !clickOnlyOnHeader && !disabled && setIsExpanded(!isExpanded),
3790
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
996
3791
  children: [
997
3792
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
998
3793
  "div",
@@ -1006,7 +3801,7 @@ var Expandable = (0, import_react3.forwardRef)(({
1006
3801
  },
1007
3802
  headerClassName
1008
3803
  ),
1009
- onClick: () => clickOnlyOnHeader && !disabled && setIsExpanded(!isExpanded),
3804
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
1010
3805
  children: [
1011
3806
  label,
1012
3807
  icon(isExpanded)
@@ -1018,7 +3813,28 @@ var Expandable = (0, import_react3.forwardRef)(({
1018
3813
  }
1019
3814
  );
1020
3815
  });
1021
- Expandable.displayName = "Expandable";
3816
+ var ExpandableUncontrolled = (0, import_react3.forwardRef)(function ExpandableUncontrolled2({
3817
+ isExpanded,
3818
+ onChange = noop,
3819
+ ...props
3820
+ }, ref) {
3821
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react3.useState)(isExpanded);
3822
+ (0, import_react3.useEffect)(() => {
3823
+ setUsedIsExpanded(isExpanded);
3824
+ }, [isExpanded]);
3825
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3826
+ Expandable,
3827
+ {
3828
+ ...props,
3829
+ ref,
3830
+ isExpanded: usedIsExpanded,
3831
+ onChange: (value) => {
3832
+ onChange(value);
3833
+ setUsedIsExpanded(value);
3834
+ }
3835
+ }
3836
+ );
3837
+ });
1022
3838
 
1023
3839
  // src/components/date/YearMonthPicker.tsx
1024
3840
  var import_jsx_runtime7 = require("react/jsx-runtime");
@@ -1052,11 +3868,11 @@ var YearMonthPicker = ({
1052
3868
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_clsx6.default)("col select-none", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_custom_scrollbars_2.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "col gap-y-1 mr-3", children: years.map((year) => {
1053
3869
  const selectedYear = displayedYearMonth.getFullYear() === year;
1054
3870
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1055
- Expandable,
3871
+ ExpandableUncontrolled,
1056
3872
  {
1057
3873
  ref: (displayedYearMonth.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()) === year ? ref : void 0,
1058
3874
  label: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: (0, import_clsx6.default)({ "text-primary font-bold": selectedYear }), children: year }),
1059
- initialExpansion: showValueOpen && selectedYear,
3875
+ isExpanded: showValueOpen && selectedYear,
1060
3876
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "col gap-y-1 px-2 pb-2", children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "row", children: monthList.map((month) => {
1061
3877
  const monthIndex = monthsList.indexOf(month);
1062
3878
  const newDate = new Date(year, monthIndex);
@@ -1905,7 +4721,6 @@ var ConfirmDialog = ({
1905
4721
  };
1906
4722
 
1907
4723
  // src/components/icons-and-geometry/Avatar.tsx
1908
- var import_image2 = __toESM(require("next/image"), 1);
1909
4724
  var import_clsx13 = __toESM(require("clsx"), 1);
1910
4725
  var import_jsx_runtime15 = require("react/jsx-runtime");
1911
4726
  var avtarSizeList = ["tiny", "small", "medium", "large"];
@@ -1934,7 +4749,7 @@ var Avatar = ({ avatarUrl, alt, size = "medium", className = "" }) => {
1934
4749
  return (
1935
4750
  // TODO transparent or white background later
1936
4751
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_clsx13.default)(`rounded-full bg-primary`, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1937
- import_image2.default,
4752
+ "img",
1938
4753
  {
1939
4754
  className: "rounded-full border border-gray-200",
1940
4755
  style,
@@ -2269,20 +5084,17 @@ var RadialRings = ({
2269
5084
  };
2270
5085
 
2271
5086
  // src/components/icons-and-geometry/Tag.tsx
2272
- var import_image3 = __toESM(require("next/image"), 1);
2273
5087
  var import_jsx_runtime18 = require("react/jsx-runtime");
2274
5088
  var TagIcon = ({
2275
5089
  className,
2276
- width = 16,
2277
- height = 16,
2278
- ...props
5090
+ size = 16
2279
5091
  }) => {
2280
5092
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2281
- import_image3.default,
5093
+ "img",
2282
5094
  {
2283
- ...props,
2284
- width,
2285
- height,
5095
+ style: { width: `${size}px`, height: `${size}px`, minWidth: `${size}px`, minHeight: `${size}px` },
5096
+ width: size,
5097
+ height: size,
2286
5098
  alt: "",
2287
5099
  src: "https://cdn.helpwave.de/icons/label.png",
2288
5100
  className
@@ -2291,7 +5103,7 @@ var TagIcon = ({
2291
5103
  };
2292
5104
 
2293
5105
  // src/components/layout-and-navigation/BreadCrumb.tsx
2294
- var import_link = __toESM(require("next/link"), 1);
5106
+ var import_link = __toESM(require_link2(), 1);
2295
5107
  var import_clsx16 = __toESM(require("clsx"), 1);
2296
5108
  var import_jsx_runtime19 = require("react/jsx-runtime");
2297
5109
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
@@ -3056,7 +5868,7 @@ var FAQSection = ({
3056
5868
  }) => {
3057
5869
  const chevronSize = 28;
3058
5870
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "col gap-y-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3059
- Expandable,
5871
+ ExpandableUncontrolled,
3060
5872
  {
3061
5873
  ...restProps,
3062
5874
  label: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { id, className: "textstyle-title-md", children: title }),
@@ -3347,6 +6159,7 @@ var SearchableList = ({
3347
6159
  // src/components/layout-and-navigation/StepperBar.tsx
3348
6160
  var import_lucide_react8 = require("lucide-react");
3349
6161
  var import_clsx25 = __toESM(require("clsx"), 1);
6162
+ var import_react15 = require("react");
3350
6163
  var import_jsx_runtime29 = require("react/jsx-runtime");
3351
6164
  var defaultStepperBarTranslation = {
3352
6165
  en: {
@@ -3360,32 +6173,39 @@ var defaultStepperBarTranslation = {
3360
6173
  confirm: "Erstellen"
3361
6174
  }
3362
6175
  };
6176
+ var defaultState = {
6177
+ currentStep: 0,
6178
+ seenSteps: /* @__PURE__ */ new Set([0])
6179
+ };
3363
6180
  var StepperBar = ({
3364
6181
  overwriteTranslation,
3365
- stepper,
6182
+ state,
6183
+ numberOfSteps,
6184
+ disabledSteps = /* @__PURE__ */ new Set(),
3366
6185
  onChange,
3367
6186
  onFinish,
6187
+ finishText,
3368
6188
  showDots = true,
3369
6189
  className = ""
3370
6190
  }) => {
3371
6191
  const translation = useTranslation(defaultStepperBarTranslation, overwriteTranslation);
3372
- const dots = range(0, stepper.lastStep);
3373
- const { step, seenSteps, lastStep } = stepper;
6192
+ const dots = range(0, numberOfSteps);
6193
+ const { currentStep, seenSteps } = state ?? defaultState;
3374
6194
  const update = (newStep) => {
3375
6195
  seenSteps.add(newStep);
3376
- onChange({ step: newStep, seenSteps, lastStep });
6196
+ onChange({ currentStep: newStep, seenSteps });
3377
6197
  };
3378
6198
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3379
6199
  "div",
3380
6200
  {
3381
- className: (0, import_clsx25.default)("sticky row p-2 border-2 justify-between rounded-lg shadow-lg", className),
6201
+ className: (0, import_clsx25.default)("row justify-between", className),
3382
6202
  children: [
3383
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6203
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3384
6204
  SolidButton,
3385
6205
  {
3386
- disabled: step === 0,
6206
+ disabled: currentStep === 0 || disabledSteps.has(currentStep),
3387
6207
  onClick: () => {
3388
- update(step - 1);
6208
+ update(currentStep - 1);
3389
6209
  },
3390
6210
  className: "row gap-x-1 items-center justify-center",
3391
6211
  children: [
@@ -3403,39 +6223,40 @@ var StepperBar = ({
3403
6223
  className: (0, import_clsx25.default)(
3404
6224
  "rounded-full w-4 h-4",
3405
6225
  {
3406
- "bg-primary hover:brightness-75": index === step && seen,
3407
- "bg-primary/40 hover:bg-primary": index !== step && seen,
3408
- "bg-gray-200 outline-transparent": !seen
6226
+ "bg-primary hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
6227
+ "bg-primary/40 hover:bg-primary": index !== currentStep && seen && !disabledSteps.has(currentStep),
6228
+ "bg-gray-200 outline-transparent": !seen || disabledSteps.has(currentStep)
3409
6229
  },
3410
6230
  {
3411
6231
  "cursor-pointer": seen,
3412
- "cursor-not-allowed": !seen
6232
+ "cursor-not-allowed": !seen || disabledSteps.has(currentStep)
3413
6233
  }
3414
6234
  )
3415
6235
  },
3416
6236
  index
3417
6237
  );
3418
6238
  }) }),
3419
- step !== lastStep && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6239
+ currentStep !== numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3420
6240
  SolidButton,
3421
6241
  {
3422
- onClick: () => update(step + 1),
6242
+ onClick: () => update(currentStep + 1),
3423
6243
  className: "row gap-x-1 items-center justify-center",
6244
+ disabled: disabledSteps.has(currentStep),
3424
6245
  children: [
3425
6246
  translation.next,
3426
6247
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.ChevronRight, { size: 14 })
3427
6248
  ]
3428
6249
  }
3429
6250
  ) }),
3430
- step === lastStep && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6251
+ currentStep === numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3431
6252
  SolidButton,
3432
6253
  {
3433
- disabled: false,
6254
+ disabled: disabledSteps.has(currentStep),
3434
6255
  onClick: onFinish,
3435
6256
  className: "row gap-x-1 items-center justify-center",
3436
6257
  children: [
3437
6258
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.Check, { size: 14 }),
3438
- translation.confirm
6259
+ finishText ?? translation.confirm
3439
6260
  ]
3440
6261
  }
3441
6262
  ) })
@@ -3443,13 +6264,30 @@ var StepperBar = ({
3443
6264
  }
3444
6265
  );
3445
6266
  };
6267
+ var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
6268
+ const [usedState, setUsedState] = (0, import_react15.useState)(state ?? defaultState);
6269
+ (0, import_react15.useEffect)(() => {
6270
+ setUsedState(state ?? defaultState);
6271
+ }, [state]);
6272
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6273
+ StepperBar,
6274
+ {
6275
+ ...props,
6276
+ state: usedState,
6277
+ onChange: (newState) => {
6278
+ setUsedState(newState);
6279
+ onChange(newState);
6280
+ }
6281
+ }
6282
+ );
6283
+ };
3446
6284
 
3447
6285
  // src/components/layout-and-navigation/Table.tsx
3448
- var import_react16 = require("react");
6286
+ var import_react17 = require("react");
3449
6287
  var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
3450
6288
 
3451
6289
  // src/components/user-action/Checkbox.tsx
3452
- var import_react15 = require("react");
6290
+ var import_react16 = require("react");
3453
6291
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
3454
6292
  var import_lucide_react9 = require("lucide-react");
3455
6293
  var import_clsx26 = __toESM(require("clsx"), 1);
@@ -3526,7 +6364,7 @@ var CheckboxUncontrolled = ({
3526
6364
  defaultValue = false,
3527
6365
  ...props
3528
6366
  }) => {
3529
- const [checked, setChecked] = (0, import_react15.useState)(defaultValue);
6367
+ const [checked, setChecked] = (0, import_react16.useState)(defaultValue);
3530
6368
  const handleChange = (checked2) => {
3531
6369
  if (onChangeTristate) {
3532
6370
  onChangeTristate(checked2);
@@ -3701,8 +6539,8 @@ var Table = ({
3701
6539
  const headerPaddingHead = "pb-2";
3702
6540
  const headerPaddingBody = "pt-2";
3703
6541
  const cellPadding = "py-1 px-2";
3704
- const [scrollbarsAutoHeightMin, setScrollbarsAutoHeightMin] = (0, import_react16.useState)(0);
3705
- const tableRef = (0, import_react16.useRef)(null);
6542
+ const [scrollbarsAutoHeightMin, setScrollbarsAutoHeightMin] = (0, import_react17.useState)(0);
6543
+ const tableRef = (0, import_react17.useRef)(null);
3706
6544
  const calculateHeight = () => {
3707
6545
  if (tableRef.current) {
3708
6546
  const tableHeight = tableRef.current.offsetHeight;
@@ -3710,7 +6548,7 @@ var Table = ({
3710
6548
  setScrollbarsAutoHeightMin(tableHeight + offset);
3711
6549
  }
3712
6550
  };
3713
- (0, import_react16.useEffect)(() => {
6551
+ (0, import_react17.useEffect)(() => {
3714
6552
  calculateHeight();
3715
6553
  const handleResize = () => {
3716
6554
  calculateHeight();
@@ -3916,7 +6754,7 @@ var ErrorComponent = ({
3916
6754
  };
3917
6755
 
3918
6756
  // src/components/loading-states/LoadingAndErrorComponent.tsx
3919
- var import_react17 = require("react");
6757
+ var import_react18 = require("react");
3920
6758
 
3921
6759
  // src/components/loading-states/LoadingAnimation.tsx
3922
6760
  var import_clsx30 = __toESM(require("clsx"), 1);
@@ -3951,8 +6789,8 @@ var LoadingAndErrorComponent = ({
3951
6789
  loadingProps,
3952
6790
  minimumLoadingDuration
3953
6791
  }) => {
3954
- const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react17.useState)(false);
3955
- const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react17.useState)(false);
6792
+ const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react18.useState)(false);
6793
+ const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react18.useState)(false);
3956
6794
  if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
3957
6795
  setIsInMinimumLoading(true);
3958
6796
  setTimeout(() => {
@@ -4168,9 +7006,9 @@ var InputModal = ({
4168
7006
  };
4169
7007
 
4170
7008
  // src/components/user-action/Select.tsx
4171
- var import_react18 = require("@headlessui/react");
7009
+ var import_react19 = require("@headlessui/react");
4172
7010
  var import_lucide_react12 = require("lucide-react");
4173
- var import_react19 = require("react");
7011
+ var import_react20 = require("react");
4174
7012
  var import_clsx33 = __toESM(require("clsx"), 1);
4175
7013
  var import_jsx_runtime42 = require("react/jsx-runtime");
4176
7014
  var Select = ({
@@ -4199,9 +7037,9 @@ var Select = ({
4199
7037
  const borderColor = "border-menu-border";
4200
7038
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: (0, import_clsx33.default)(className), children: [
4201
7039
  label && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx33.default)("mb-1", label.className) }),
4202
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.Menu, { as: "div", className: "relative text-menu-text", children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
7040
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react19.Menu, { as: "div", className: "relative text-menu-text", children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
4203
7041
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4204
- import_react18.Menu.Button,
7042
+ import_react19.Menu.Button,
4205
7043
  {
4206
7044
  className: (0, import_clsx33.default)(
4207
7045
  "inline-flex w-full justify-between items-center rounded-t-lg border-2 px-4 py-2 font-medium bg-menu-background text-menu-text",
@@ -4221,7 +7059,7 @@ var Select = ({
4221
7059
  }
4222
7060
  ),
4223
7061
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4224
- import_react18.Menu.Items,
7062
+ import_react19.Menu.Items,
4225
7063
  {
4226
7064
  className: "absolute w-full z-10 rounded-b-lg bg-menu-background text-menu-text shadow-lg max-h-[500px] overflow-y-auto",
4227
7065
  children: [
@@ -4235,7 +7073,7 @@ var Select = ({
4235
7073
  },
4236
7074
  `additionalItems${index}`
4237
7075
  )),
4238
- filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.Menu.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7076
+ filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react19.Menu.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4239
7077
  "div",
4240
7078
  {
4241
7079
  className: (0, import_clsx33.default)(
@@ -4271,8 +7109,8 @@ var SelectUncontrolled = ({
4271
7109
  hintText,
4272
7110
  ...props
4273
7111
  }) => {
4274
- const [selected, setSelected] = (0, import_react19.useState)(value);
4275
- (0, import_react19.useEffect)(() => {
7112
+ const [selected, setSelected] = (0, import_react20.useState)(value);
7113
+ (0, import_react20.useEffect)(() => {
4276
7114
  if (options.find((options2) => options2.value === value)) {
4277
7115
  setSelected(value);
4278
7116
  }
@@ -4297,7 +7135,7 @@ var SearchableSelect = ({
4297
7135
  searchMapping,
4298
7136
  ...selectProps
4299
7137
  }) => {
4300
- const [search, setSearch] = (0, import_react19.useState)("");
7138
+ const [search, setSearch] = (0, import_react20.useState)("");
4301
7139
  const filteredOptions = MultiSearchWithMapping(search, options, searchMapping);
4302
7140
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4303
7141
  Select,
@@ -4364,7 +7202,7 @@ var LanguageModal = ({
4364
7202
  };
4365
7203
 
4366
7204
  // src/theming/useTheme.tsx
4367
- var import_react20 = require("react");
7205
+ var import_react21 = require("react");
4368
7206
  var import_jsx_runtime44 = require("react/jsx-runtime");
4369
7207
  var themes = ["light", "dark"];
4370
7208
  var defaultThemeTypeTranslation = {
@@ -4381,24 +7219,24 @@ var ThemeUtil = {
4381
7219
  themes,
4382
7220
  translation: defaultThemeTypeTranslation
4383
7221
  };
4384
- var ThemeContext = (0, import_react20.createContext)({
7222
+ var ThemeContext = (0, import_react21.createContext)({
4385
7223
  theme: "light",
4386
7224
  setTheme: noop
4387
7225
  });
4388
7226
  var ThemeProvider = ({ children, initialTheme = "light" }) => {
4389
- const [theme, setTheme] = (0, import_react20.useState)(initialTheme);
4390
- (0, import_react20.useEffect)(() => {
7227
+ const [theme, setTheme] = (0, import_react21.useState)(initialTheme);
7228
+ (0, import_react21.useEffect)(() => {
4391
7229
  if (theme !== initialTheme) {
4392
7230
  console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
4393
7231
  setTheme(initialTheme);
4394
7232
  }
4395
7233
  }, [initialTheme]);
4396
- (0, import_react20.useEffect)(() => {
7234
+ (0, import_react21.useEffect)(() => {
4397
7235
  document.documentElement.setAttribute("data-theme", theme);
4398
7236
  }, [theme]);
4399
7237
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
4400
7238
  };
4401
- var useTheme = () => (0, import_react20.useContext)(ThemeContext);
7239
+ var useTheme = () => (0, import_react21.useContext)(ThemeContext);
4402
7240
 
4403
7241
  // src/components/modals/ThemeModal.tsx
4404
7242
  var import_jsx_runtime45 = require("react/jsx-runtime");
@@ -4612,18 +7450,18 @@ var import_lucide_react17 = require("lucide-react");
4612
7450
  var import_clsx38 = __toESM(require("clsx"), 1);
4613
7451
 
4614
7452
  // src/components/user-action/MultiSelect.tsx
4615
- var import_react23 = require("react");
7453
+ var import_react24 = require("react");
4616
7454
  var import_lucide_react16 = require("lucide-react");
4617
7455
  var import_clsx37 = __toESM(require("clsx"), 1);
4618
7456
 
4619
7457
  // src/components/user-action/Menu.tsx
4620
- var import_react22 = require("react");
7458
+ var import_react23 = require("react");
4621
7459
  var import_clsx36 = __toESM(require("clsx"), 1);
4622
7460
 
4623
7461
  // src/hooks/useOutsideClick.ts
4624
- var import_react21 = require("react");
7462
+ var import_react22 = require("react");
4625
7463
  var useOutsideClick = (refs, handler) => {
4626
- (0, import_react21.useEffect)(() => {
7464
+ (0, import_react22.useEffect)(() => {
4627
7465
  const listener = (event) => {
4628
7466
  if (event.target === null) return;
4629
7467
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -4666,8 +7504,8 @@ var Menu2 = ({
4666
7504
  menuClassName = ""
4667
7505
  }) => {
4668
7506
  const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
4669
- const triggerRef = (0, import_react22.useRef)(null);
4670
- const menuRef = (0, import_react22.useRef)(null);
7507
+ const triggerRef = (0, import_react23.useRef)(null);
7508
+ const menuRef = (0, import_react23.useRef)(null);
4671
7509
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
4672
7510
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4673
7511
  "div",
@@ -4723,7 +7561,7 @@ var MultiSelect = ({
4723
7561
  triggerClassName = ""
4724
7562
  }) => {
4725
7563
  const translation = useTranslation(defaultMultiSelectTranslation, overwriteTranslation);
4726
- const [searchText, setSearchText] = (0, import_react23.useState)(search?.initialSearch ?? "");
7564
+ const [searchText, setSearchText] = (0, import_react24.useState)(search?.initialSearch ?? "");
4727
7565
  let filteredOptions = options;
4728
7566
  const enableSearch = !!search;
4729
7567
  if (enableSearch && !!searchText) {
@@ -5006,7 +7844,7 @@ var import_lucide_react20 = require("lucide-react");
5006
7844
  var import_clsx42 = __toESM(require("clsx"), 1);
5007
7845
 
5008
7846
  // src/components/user-action/Textarea.tsx
5009
- var import_react24 = require("react");
7847
+ var import_react25 = require("react");
5010
7848
  var import_clsx41 = __toESM(require("clsx"), 1);
5011
7849
  var import_jsx_runtime54 = require("react/jsx-runtime");
5012
7850
  var Textarea = ({
@@ -5023,7 +7861,7 @@ var Textarea = ({
5023
7861
  className,
5024
7862
  ...props
5025
7863
  }) => {
5026
- const [hasFocus, setHasFocus] = (0, import_react24.useState)(false);
7864
+ const [hasFocus, setHasFocus] = (0, import_react25.useState)(false);
5027
7865
  const { restartTimer, clearUpdateTimer } = useSaveDelay(() => void 0, 3e3);
5028
7866
  const onEditCompletedWrapper = (text) => {
5029
7867
  onEditCompleted(text);
@@ -5084,8 +7922,8 @@ var TextareaUncontrolled = ({
5084
7922
  onChangeText = noop,
5085
7923
  ...props
5086
7924
  }) => {
5087
- const [text, setText] = (0, import_react24.useState)(value);
5088
- (0, import_react24.useEffect)(() => {
7925
+ const [text, setText] = (0, import_react25.useState)(value);
7926
+ (0, import_react25.useEffect)(() => {
5089
7927
  setText(value);
5090
7928
  }, [value]);
5091
7929
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
@@ -5270,7 +8108,7 @@ var DateTimePicker = ({
5270
8108
  };
5271
8109
 
5272
8110
  // src/components/user-action/ScrollPicker.tsx
5273
- var import_react25 = require("react");
8111
+ var import_react26 = require("react");
5274
8112
  var import_clsx44 = __toESM(require("clsx"), 1);
5275
8113
  var import_jsx_runtime57 = require("react/jsx-runtime");
5276
8114
  var up = 1;
@@ -5291,7 +8129,7 @@ var ScrollPicker = ({
5291
8129
  transition,
5292
8130
  items,
5293
8131
  lastTimeStamp
5294
- }, setAnimation] = (0, import_react25.useState)({
8132
+ }, setAnimation] = (0, import_react26.useState)({
5295
8133
  targetIndex: selectedIndex,
5296
8134
  currentIndex: disabled ? selectedIndex : 0,
5297
8135
  velocity: 0,
@@ -5307,7 +8145,7 @@ var ScrollPicker = ({
5307
8145
  const itemHeight = 40;
5308
8146
  const distance = 8;
5309
8147
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
5310
- const getDirection = (0, import_react25.useCallback)((targetIndex, currentIndex2, transition2, length) => {
8148
+ const getDirection = (0, import_react26.useCallback)((targetIndex, currentIndex2, transition2, length) => {
5311
8149
  if (targetIndex === currentIndex2) {
5312
8150
  return transition2 > 0 ? up : down;
5313
8151
  }
@@ -5317,7 +8155,7 @@ var ScrollPicker = ({
5317
8155
  }
5318
8156
  return distanceForward >= length / 2 ? down : up;
5319
8157
  }, []);
5320
- const animate = (0, import_react25.useCallback)((timestamp, startTime) => {
8158
+ const animate = (0, import_react26.useCallback)((timestamp, startTime) => {
5321
8159
  setAnimation((prevState) => {
5322
8160
  const {
5323
8161
  targetIndex,
@@ -5390,7 +8228,7 @@ var ScrollPicker = ({
5390
8228
  };
5391
8229
  });
5392
8230
  }, [disabled, getDirection, onChange]);
5393
- (0, import_react25.useEffect)(() => {
8231
+ (0, import_react26.useEffect)(() => {
5394
8232
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
5395
8233
  });
5396
8234
  const opacity = (transition2, index, itemsCount) => {
@@ -5467,7 +8305,7 @@ var ScrollPicker = ({
5467
8305
  };
5468
8306
 
5469
8307
  // src/components/user-action/ToggleableInput.tsx
5470
- var import_react26 = require("react");
8308
+ var import_react27 = require("react");
5471
8309
  var import_lucide_react21 = require("lucide-react");
5472
8310
  var import_clsx45 = __toESM(require("clsx"), 1);
5473
8311
  var import_jsx_runtime58 = require("react/jsx-runtime");
@@ -5484,14 +8322,14 @@ var ToggleableInput = ({
5484
8322
  onBlur,
5485
8323
  ...restProps
5486
8324
  }) => {
5487
- const [isEditing, setIsEditing] = (0, import_react26.useState)(initialState !== "display");
8325
+ const [isEditing, setIsEditing] = (0, import_react27.useState)(initialState !== "display");
5488
8326
  const { restartTimer, clearUpdateTimer } = useSaveDelay(() => void 0, 3e3);
5489
- const ref = (0, import_react26.useRef)(null);
8327
+ const ref = (0, import_react27.useRef)(null);
5490
8328
  const onEditCompletedWrapper = (text) => {
5491
8329
  onEditCompleted(text);
5492
8330
  clearUpdateTimer();
5493
8331
  };
5494
- (0, import_react26.useEffect)(() => {
8332
+ (0, import_react27.useEffect)(() => {
5495
8333
  if (isEditing) {
5496
8334
  ref.current?.focus();
5497
8335
  }
@@ -5556,8 +8394,8 @@ var ToggleableInputUncontrolled = ({
5556
8394
  onChangeText = noop,
5557
8395
  ...restProps
5558
8396
  }) => {
5559
- const [value, setValue] = (0, import_react26.useState)(initialValue);
5560
- (0, import_react26.useEffect)(() => {
8397
+ const [value, setValue] = (0, import_react27.useState)(initialValue);
8398
+ (0, import_react27.useEffect)(() => {
5561
8399
  setValue(initialValue);
5562
8400
  }, [initialValue]);
5563
8401
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
@@ -5642,6 +8480,7 @@ var filterNews = (localizedNews, requiredKeys) => {
5642
8480
  EaseFunctions,
5643
8481
  ErrorComponent,
5644
8482
  Expandable,
8483
+ ExpandableUncontrolled,
5645
8484
  FAQSection,
5646
8485
  FormInput,
5647
8486
  Helpwave,
@@ -5690,6 +8529,7 @@ var filterNews = (localizedNews, requiredKeys) => {
5690
8529
  SolidButton,
5691
8530
  SortButton,
5692
8531
  StepperBar,
8532
+ StepperBarUncontrolled,
5693
8533
  Table,
5694
8534
  TagIcon,
5695
8535
  TextButton,
@@ -5702,7 +8542,6 @@ var filterNews = (localizedNews, requiredKeys) => {
5702
8542
  ThemeProvider,
5703
8543
  ThemeUtil,
5704
8544
  Tile,
5705
- TileWithImage,
5706
8545
  TimeDisplay,
5707
8546
  TimePicker,
5708
8547
  TimePickerUncontrolled,