zudoku 0.3.0-dev.53 → 0.3.0-dev.55

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 (124) hide show
  1. package/dist/lib/components/Bootstrap.js +1 -1
  2. package/dist/lib/components/Bootstrap.js.map +1 -1
  3. package/lib/AnchorLink-BaXHjhF-.js +989 -0
  4. package/lib/{AnchorLink-BCN_a_Uz.js.map → AnchorLink-BaXHjhF-.js.map} +1 -1
  5. package/lib/Combination-BfufJFkX.js +1365 -0
  6. package/lib/{Combination-B0Iu6mhJ.js.map → Combination-BfufJFkX.js.map} +1 -1
  7. package/lib/DevPortalProvider-GjdO0Xr-.js +1610 -0
  8. package/lib/{DevPortalProvider-Do9oJqme.js.map → DevPortalProvider-GjdO0Xr-.js.map} +1 -1
  9. package/lib/Markdown-B8nPVql1.js +19708 -0
  10. package/lib/Markdown-B8nPVql1.js.map +1 -0
  11. package/lib/MdxPage-Dlujuj-J.js +223 -0
  12. package/lib/{MdxPage-Bsc79cD-.js.map → MdxPage-Dlujuj-J.js.map} +1 -1
  13. package/lib/OperationList-krPgt6sE.js +8041 -0
  14. package/lib/{OperationList-K-JWBxau.js.map → OperationList-krPgt6sE.js.map} +1 -1
  15. package/lib/Playground-DOHxca0P.js +539 -0
  16. package/lib/{Playground-Czy7ha9z.js.map → Playground-DOHxca0P.js.map} +1 -1
  17. package/lib/Route-CR6TEwVC.js +13 -0
  18. package/lib/{Route-D-egsGHx.js.map → Route-CR6TEwVC.js.map} +1 -1
  19. package/lib/Select-Boi_pe3L.js +5298 -0
  20. package/lib/{Select-CcBbwJ2R.js.map → Select-Boi_pe3L.js.map} +1 -1
  21. package/lib/Spinner-oU0QJmi_.js +16 -0
  22. package/lib/{Spinner-C9_Opdev.js.map → Spinner-oU0QJmi_.js.map} +1 -1
  23. package/lib/_commonjsHelpers-BxmBWJD2.js +34 -0
  24. package/lib/_commonjsHelpers-BxmBWJD2.js.map +1 -0
  25. package/lib/assets/index-CpIig0AX.js +6341 -0
  26. package/lib/{index-pI9JkN46.js.map → assets/index-CpIig0AX.js.map} +1 -1
  27. package/lib/assets/worker-B5k2aBV9.js +18921 -0
  28. package/lib/assets/{worker-BjPv-hjP.js.map → worker-B5k2aBV9.js.map} +1 -1
  29. package/lib/context-BoN_3uxi.js +17 -0
  30. package/lib/{context-_fYfJFgk.js.map → context-BoN_3uxi.js.map} +1 -1
  31. package/lib/hook-CIuFuyBT.js +90 -0
  32. package/lib/{hook-CKqQERWo.js.map → hook-CIuFuyBT.js.map} +1 -1
  33. package/lib/index-BL1P4Gqq.js +280 -0
  34. package/lib/{index-ByHya67R.js.map → index-BL1P4Gqq.js.map} +1 -1
  35. package/lib/index-Bn03IPZt.js +6341 -0
  36. package/lib/{assets/index-BPdJm2ty.js.map → index-Bn03IPZt.js.map} +1 -1
  37. package/lib/{index-jsFBaizC.js → index-Dih8IAqw.js} +103 -83
  38. package/lib/{index-jsFBaizC.js.map → index-Dih8IAqw.js.map} +1 -1
  39. package/lib/index-FprhHF51.js +253 -0
  40. package/lib/{index-DseBZFJ-.js.map → index-FprhHF51.js.map} +1 -1
  41. package/lib/jsx-runtime-DvZ6OKMM.js +2110 -0
  42. package/lib/{jsx-runtime-CJZJivg2.js.map → jsx-runtime-DvZ6OKMM.js.map} +1 -1
  43. package/lib/mutation-DWY9x2Uc.js +250 -0
  44. package/lib/{mutation-DjbQSHzT.js.map → mutation-DWY9x2Uc.js.map} +1 -1
  45. package/lib/prism-bash.min-BtBk0onv.js +7 -0
  46. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-BtBk0onv.js.map} +1 -1
  47. package/lib/prism-csharp.min-Cv7D49bv.js +30 -0
  48. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-Cv7D49bv.js.map} +1 -1
  49. package/lib/prism-java.min-tNK-JX6x.js +7 -0
  50. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-tNK-JX6x.js.map} +1 -1
  51. package/lib/prism-json.min-Cdtv-CME.js +2 -0
  52. package/lib/{prism-json.min-B1GJqK1k.js.map → prism-json.min-Cdtv-CME.js.map} +1 -1
  53. package/lib/prism-markup-templating-iotg2sCU.js +94 -0
  54. package/lib/{prism-markup-templating-DZrrEs0A.js.map → prism-markup-templating-iotg2sCU.js.map} +1 -1
  55. package/lib/prism-objectivec.min-CY4WGixz.js +2 -0
  56. package/lib/{prism-objectivec.min-BXSWqpJJ.js.map → prism-objectivec.min-CY4WGixz.js.map} +1 -1
  57. package/lib/prism-php.min-T6sIVgED.js +11 -0
  58. package/lib/{prism-php.min-o7FpoMP_.js.map → prism-php.min-T6sIVgED.js.map} +1 -1
  59. package/lib/prism-ruby.min-B-2KAa4y.js +8 -0
  60. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-B-2KAa4y.js.map} +1 -1
  61. package/lib/router-ButO1QyY.js +4062 -0
  62. package/lib/{router-CBw2vqJE.js.map → router-ButO1QyY.js.map} +1 -1
  63. package/lib/slugify-CmS97Vy8.js +50 -0
  64. package/lib/{slugify-CiPVjteN.js.map → slugify-CmS97Vy8.js.map} +1 -1
  65. package/lib/state-CmGfNKhR.js +436 -0
  66. package/lib/{state-DKdaQzvh.js.map → state-CmGfNKhR.js.map} +1 -1
  67. package/lib/urql-DtVKPBx_.js +2567 -0
  68. package/lib/{urql-DEKdguFl.js.map → urql-DtVKPBx_.js.map} +1 -1
  69. package/lib/util-B5KX4h4M.js +55 -0
  70. package/lib/{util-_jwUlTBU.js.map → util-B5KX4h4M.js.map} +1 -1
  71. package/lib/zudoku.auth-auth0.js +24 -18
  72. package/lib/zudoku.auth-auth0.js.map +1 -1
  73. package/lib/zudoku.auth-clerk.js +43 -34
  74. package/lib/zudoku.auth-clerk.js.map +1 -1
  75. package/lib/zudoku.auth-openid.js +1121 -734
  76. package/lib/zudoku.auth-openid.js.map +1 -1
  77. package/lib/zudoku.components.js +1076 -823
  78. package/lib/zudoku.components.js.map +1 -1
  79. package/lib/zudoku.openapi-worker.js +13776 -9681
  80. package/lib/zudoku.openapi-worker.js.map +1 -1
  81. package/lib/zudoku.plugin-api-keys.js +206 -165
  82. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  83. package/lib/zudoku.plugin-markdown.js +41 -33
  84. package/lib/zudoku.plugin-markdown.js.map +1 -1
  85. package/lib/zudoku.plugin-openapi.js +6 -6
  86. package/lib/zudoku.plugin-redirect.js +10 -8
  87. package/lib/zudoku.plugin-redirect.js.map +1 -1
  88. package/package.json +1 -1
  89. package/src/lib/components/Bootstrap.tsx +1 -1
  90. package/lib/AnchorLink-BCN_a_Uz.js +0 -705
  91. package/lib/Combination-B0Iu6mhJ.js +0 -915
  92. package/lib/DevPortalProvider-Do9oJqme.js +0 -1081
  93. package/lib/Markdown-aE_XoLNs.js +0 -15030
  94. package/lib/Markdown-aE_XoLNs.js.map +0 -1
  95. package/lib/MdxPage-Bsc79cD-.js +0 -190
  96. package/lib/OperationList-K-JWBxau.js +0 -5091
  97. package/lib/Playground-Czy7ha9z.js +0 -502
  98. package/lib/Route-D-egsGHx.js +0 -13
  99. package/lib/Select-CcBbwJ2R.js +0 -3667
  100. package/lib/Spinner-C9_Opdev.js +0 -15
  101. package/lib/_commonjsHelpers-BVfed4GL.js +0 -29
  102. package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
  103. package/lib/assets/index-BPdJm2ty.js +0 -4765
  104. package/lib/assets/worker-BjPv-hjP.js +0 -14897
  105. package/lib/context-_fYfJFgk.js +0 -14
  106. package/lib/hook-CKqQERWo.js +0 -77
  107. package/lib/index-ByHya67R.js +0 -207
  108. package/lib/index-DseBZFJ-.js +0 -170
  109. package/lib/index-pI9JkN46.js +0 -4765
  110. package/lib/jsx-runtime-CJZJivg2.js +0 -1526
  111. package/lib/mutation-DjbQSHzT.js +0 -208
  112. package/lib/prism-bash.min-DadFsM4Z.js +0 -7
  113. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  114. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  115. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  116. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  117. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  118. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  119. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  120. package/lib/router-CBw2vqJE.js +0 -2973
  121. package/lib/slugify-CiPVjteN.js +0 -28
  122. package/lib/state-DKdaQzvh.js +0 -288
  123. package/lib/urql-DEKdguFl.js +0 -1592
  124. package/lib/util-_jwUlTBU.js +0 -41
@@ -1,2973 +0,0 @@
1
- /**
2
- * @remix-run/router v1.17.1
3
- *
4
- * Copyright (c) Remix Software Inc.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE.md file in the root directory of this source tree.
8
- *
9
- * @license MIT
10
- */
11
- function I() {
12
- return I = Object.assign ? Object.assign.bind() : function(e) {
13
- for (var t = 1; t < arguments.length; t++) {
14
- var r = arguments[t];
15
- for (var a in r)
16
- Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
17
- }
18
- return e;
19
- }, I.apply(this, arguments);
20
- }
21
- var V;
22
- (function(e) {
23
- e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
24
- })(V || (V = {}));
25
- const _t = "popstate";
26
- function Br(e) {
27
- e === void 0 && (e = {});
28
- let {
29
- initialEntries: t = ["/"],
30
- initialIndex: r,
31
- v5Compat: a = !1
32
- } = e, n;
33
- n = t.map((m, y) => b(m, typeof m == "string" ? null : m.state, y === 0 ? "default" : void 0));
34
- let s = u(r ?? n.length - 1), l = V.Pop, f = null;
35
- function u(m) {
36
- return Math.min(Math.max(m, 0), n.length - 1);
37
- }
38
- function v() {
39
- return n[s];
40
- }
41
- function b(m, y, g) {
42
- y === void 0 && (y = null);
43
- let P = ge(n ? v().pathname : "/", m, y, g);
44
- return de(P.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(m)), P;
45
- }
46
- function p(m) {
47
- return typeof m == "string" ? m : ue(m);
48
- }
49
- return {
50
- get index() {
51
- return s;
52
- },
53
- get action() {
54
- return l;
55
- },
56
- get location() {
57
- return v();
58
- },
59
- createHref: p,
60
- createURL(m) {
61
- return new URL(p(m), "http://localhost");
62
- },
63
- encodeLocation(m) {
64
- let y = typeof m == "string" ? ie(m) : m;
65
- return {
66
- pathname: y.pathname || "",
67
- search: y.search || "",
68
- hash: y.hash || ""
69
- };
70
- },
71
- push(m, y) {
72
- l = V.Push;
73
- let g = b(m, y);
74
- s += 1, n.splice(s, n.length, g), a && f && f({
75
- action: l,
76
- location: g,
77
- delta: 1
78
- });
79
- },
80
- replace(m, y) {
81
- l = V.Replace;
82
- let g = b(m, y);
83
- n[s] = g, a && f && f({
84
- action: l,
85
- location: g,
86
- delta: 0
87
- });
88
- },
89
- go(m) {
90
- l = V.Pop;
91
- let y = u(s + m), g = n[y];
92
- s = y, f && f({
93
- action: l,
94
- location: g,
95
- delta: m
96
- });
97
- },
98
- listen(m) {
99
- return f = m, () => {
100
- f = null;
101
- };
102
- }
103
- };
104
- }
105
- function Wr(e) {
106
- e === void 0 && (e = {});
107
- function t(a, n) {
108
- let {
109
- pathname: s,
110
- search: l,
111
- hash: f
112
- } = a.location;
113
- return ge(
114
- "",
115
- {
116
- pathname: s,
117
- search: l,
118
- hash: f
119
- },
120
- // state defaults to `null` because `window.history.state` does
121
- n.state && n.state.usr || null,
122
- n.state && n.state.key || "default"
123
- );
124
- }
125
- function r(a, n) {
126
- return typeof n == "string" ? n : ue(n);
127
- }
128
- return Gt(t, r, null, e);
129
- }
130
- function Kr(e) {
131
- e === void 0 && (e = {});
132
- function t(n, s) {
133
- let {
134
- pathname: l = "/",
135
- search: f = "",
136
- hash: u = ""
137
- } = ie(n.location.hash.substr(1));
138
- return !l.startsWith("/") && !l.startsWith(".") && (l = "/" + l), ge(
139
- "",
140
- {
141
- pathname: l,
142
- search: f,
143
- hash: u
144
- },
145
- // state defaults to `null` because `window.history.state` does
146
- s.state && s.state.usr || null,
147
- s.state && s.state.key || "default"
148
- );
149
- }
150
- function r(n, s) {
151
- let l = n.document.querySelector("base"), f = "";
152
- if (l && l.getAttribute("href")) {
153
- let u = n.location.href, v = u.indexOf("#");
154
- f = v === -1 ? u : u.slice(0, v);
155
- }
156
- return f + "#" + (typeof s == "string" ? s : ue(s));
157
- }
158
- function a(n, s) {
159
- de(n.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(s) + ")");
160
- }
161
- return Gt(t, r, a, e);
162
- }
163
- function O(e, t) {
164
- if (e === !1 || e === null || typeof e > "u")
165
- throw new Error(t);
166
- }
167
- function de(e, t) {
168
- if (!e) {
169
- typeof console < "u" && console.warn(t);
170
- try {
171
- throw new Error(t);
172
- } catch {
173
- }
174
- }
175
- }
176
- function $r() {
177
- return Math.random().toString(36).substr(2, 8);
178
- }
179
- function Ut(e, t) {
180
- return {
181
- usr: e.state,
182
- key: e.key,
183
- idx: t
184
- };
185
- }
186
- function ge(e, t, r, a) {
187
- return r === void 0 && (r = null), I({
188
- pathname: typeof e == "string" ? e : e.pathname,
189
- search: "",
190
- hash: ""
191
- }, typeof t == "string" ? ie(t) : t, {
192
- state: r,
193
- // TODO: This could be cleaned up. push/replace should probably just take
194
- // full Locations now and avoid the need to run through this flow at all
195
- // But that's a pretty big refactor to the current test suite so going to
196
- // keep as is for the time being and just let any incoming keys take precedence
197
- key: t && t.key || a || $r()
198
- });
199
- }
200
- function ue(e) {
201
- let {
202
- pathname: t = "/",
203
- search: r = "",
204
- hash: a = ""
205
- } = e;
206
- return r && r !== "?" && (t += r.charAt(0) === "?" ? r : "?" + r), a && a !== "#" && (t += a.charAt(0) === "#" ? a : "#" + a), t;
207
- }
208
- function ie(e) {
209
- let t = {};
210
- if (e) {
211
- let r = e.indexOf("#");
212
- r >= 0 && (t.hash = e.substr(r), e = e.substr(0, r));
213
- let a = e.indexOf("?");
214
- a >= 0 && (t.search = e.substr(a), e = e.substr(0, a)), e && (t.pathname = e);
215
- }
216
- return t;
217
- }
218
- function Gt(e, t, r, a) {
219
- a === void 0 && (a = {});
220
- let {
221
- window: n = document.defaultView,
222
- v5Compat: s = !1
223
- } = a, l = n.history, f = V.Pop, u = null, v = b();
224
- v == null && (v = 0, l.replaceState(I({}, l.state, {
225
- idx: v
226
- }), ""));
227
- function b() {
228
- return (l.state || {
229
- idx: null
230
- }).idx;
231
- }
232
- function p() {
233
- f = V.Pop;
234
- let P = b(), A = P == null ? null : P - v;
235
- v = P, u && u({
236
- action: f,
237
- location: g.location,
238
- delta: A
239
- });
240
- }
241
- function S(P, A) {
242
- f = V.Push;
243
- let x = ge(g.location, P, A);
244
- r && r(x, P), v = b() + 1;
245
- let _ = Ut(x, v), R = g.createHref(x);
246
- try {
247
- l.pushState(_, "", R);
248
- } catch (N) {
249
- if (N instanceof DOMException && N.name === "DataCloneError")
250
- throw N;
251
- n.location.assign(R);
252
- }
253
- s && u && u({
254
- action: f,
255
- location: g.location,
256
- delta: 1
257
- });
258
- }
259
- function m(P, A) {
260
- f = V.Replace;
261
- let x = ge(g.location, P, A);
262
- r && r(x, P), v = b();
263
- let _ = Ut(x, v), R = g.createHref(x);
264
- l.replaceState(_, "", R), s && u && u({
265
- action: f,
266
- location: g.location,
267
- delta: 0
268
- });
269
- }
270
- function y(P) {
271
- let A = n.location.origin !== "null" ? n.location.origin : n.location.href, x = typeof P == "string" ? P : ue(P);
272
- return x = x.replace(/ $/, "%20"), O(A, "No window.location.(origin|href) available to create URL for href: " + x), new URL(x, A);
273
- }
274
- let g = {
275
- get action() {
276
- return f;
277
- },
278
- get location() {
279
- return e(n, l);
280
- },
281
- listen(P) {
282
- if (u)
283
- throw new Error("A history only accepts one active listener");
284
- return n.addEventListener(_t, p), u = P, () => {
285
- n.removeEventListener(_t, p), u = null;
286
- };
287
- },
288
- createHref(P) {
289
- return t(n, P);
290
- },
291
- createURL: y,
292
- encodeLocation(P) {
293
- let A = y(P);
294
- return {
295
- pathname: A.pathname,
296
- search: A.search,
297
- hash: A.hash
298
- };
299
- },
300
- push: S,
301
- replace: m,
302
- go(P) {
303
- return l.go(P);
304
- }
305
- };
306
- return g;
307
- }
308
- var z;
309
- (function(e) {
310
- e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
311
- })(z || (z = {}));
312
- const kr = /* @__PURE__ */ new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
313
- function Vr(e) {
314
- return e.index === !0;
315
- }
316
- function Me(e, t, r, a) {
317
- return r === void 0 && (r = []), a === void 0 && (a = {}), e.map((n, s) => {
318
- let l = [...r, String(s)], f = typeof n.id == "string" ? n.id : l.join("-");
319
- if (O(n.index !== !0 || !n.children, "Cannot specify children on an index route"), O(!a[f], 'Found a route id collision on id "' + f + `". Route id's must be globally unique within Data Router usages`), Vr(n)) {
320
- let u = I({}, n, t(n), {
321
- id: f
322
- });
323
- return a[f] = u, u;
324
- } else {
325
- let u = I({}, n, t(n), {
326
- id: f,
327
- children: void 0
328
- });
329
- return a[f] = u, n.children && (u.children = Me(n.children, t, l, a)), u;
330
- }
331
- });
332
- }
333
- function me(e, t, r) {
334
- return r === void 0 && (r = "/"), at(e, t, r, !1);
335
- }
336
- function at(e, t, r, a) {
337
- let n = typeof t == "string" ? ie(t) : t, s = Ye(n.pathname || "/", r);
338
- if (s == null)
339
- return null;
340
- let l = Qt(e);
341
- Yr(l);
342
- let f = null;
343
- for (let u = 0; f == null && u < l.length; ++u) {
344
- let v = oa(s);
345
- f = ra(l[u], v, a);
346
- }
347
- return f;
348
- }
349
- function Xt(e, t) {
350
- let {
351
- route: r,
352
- pathname: a,
353
- params: n
354
- } = e;
355
- return {
356
- id: r.id,
357
- pathname: a,
358
- params: n,
359
- data: t[r.id],
360
- handle: r.handle
361
- };
362
- }
363
- function Qt(e, t, r, a) {
364
- t === void 0 && (t = []), r === void 0 && (r = []), a === void 0 && (a = "");
365
- let n = (s, l, f) => {
366
- let u = {
367
- relativePath: f === void 0 ? s.path || "" : f,
368
- caseSensitive: s.caseSensitive === !0,
369
- childrenIndex: l,
370
- route: s
371
- };
372
- u.relativePath.startsWith("/") && (O(u.relativePath.startsWith(a), 'Absolute route path "' + u.relativePath + '" nested under path ' + ('"' + a + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes."), u.relativePath = u.relativePath.slice(a.length));
373
- let v = Ne([a, u.relativePath]), b = r.concat(u);
374
- s.children && s.children.length > 0 && (O(
375
- // Our types know better, but runtime JS may not!
376
- // @ts-expect-error
377
- s.index !== !0,
378
- "Index routes must not have child routes. Please remove " + ('all child routes from route path "' + v + '".')
379
- ), Qt(s.children, t, b, v)), !(s.path == null && !s.index) && t.push({
380
- path: v,
381
- score: ea(v, s.index),
382
- routesMeta: b
383
- });
384
- };
385
- return e.forEach((s, l) => {
386
- var f;
387
- if (s.path === "" || !((f = s.path) != null && f.includes("?")))
388
- n(s, l);
389
- else
390
- for (let u of Zt(s.path))
391
- n(s, l, u);
392
- }), t;
393
- }
394
- function Zt(e) {
395
- let t = e.split("/");
396
- if (t.length === 0) return [];
397
- let [r, ...a] = t, n = r.endsWith("?"), s = r.replace(/\?$/, "");
398
- if (a.length === 0)
399
- return n ? [s, ""] : [s];
400
- let l = Zt(a.join("/")), f = [];
401
- return f.push(...l.map((u) => u === "" ? s : [s, u].join("/"))), n && f.push(...l), f.map((u) => e.startsWith("/") && u === "" ? "/" : u);
402
- }
403
- function Yr(e) {
404
- e.sort((t, r) => t.score !== r.score ? r.score - t.score : ta(t.routesMeta.map((a) => a.childrenIndex), r.routesMeta.map((a) => a.childrenIndex)));
405
- }
406
- const Jr = /^:[\w-]+$/, Gr = 3, Xr = 2, Qr = 1, Zr = 10, qr = -2, At = (e) => e === "*";
407
- function ea(e, t) {
408
- let r = e.split("/"), a = r.length;
409
- return r.some(At) && (a += qr), t && (a += Xr), r.filter((n) => !At(n)).reduce((n, s) => n + (Jr.test(s) ? Gr : s === "" ? Qr : Zr), a);
410
- }
411
- function ta(e, t) {
412
- return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
413
- // If two routes are siblings, we should try to match the earlier sibling
414
- // first. This allows people to have fine-grained control over the matching
415
- // behavior by simply putting routes with identical paths in the order they
416
- // want them tried.
417
- e[e.length - 1] - t[t.length - 1]
418
- ) : (
419
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
420
- // so they sort equally.
421
- 0
422
- );
423
- }
424
- function ra(e, t, r) {
425
- r === void 0 && (r = !1);
426
- let {
427
- routesMeta: a
428
- } = e, n = {}, s = "/", l = [];
429
- for (let f = 0; f < a.length; ++f) {
430
- let u = a[f], v = f === a.length - 1, b = s === "/" ? t : t.slice(s.length) || "/", p = ht({
431
- path: u.relativePath,
432
- caseSensitive: u.caseSensitive,
433
- end: v
434
- }, b), S = u.route;
435
- if (!p && v && r && !a[a.length - 1].route.index && (p = ht({
436
- path: u.relativePath,
437
- caseSensitive: u.caseSensitive,
438
- end: !1
439
- }, b)), !p)
440
- return null;
441
- Object.assign(n, p.params), l.push({
442
- // TODO: Can this as be avoided?
443
- params: n,
444
- pathname: Ne([s, p.pathname]),
445
- pathnameBase: ar(Ne([s, p.pathnameBase])),
446
- route: S
447
- }), p.pathnameBase !== "/" && (s = Ne([s, p.pathnameBase]));
448
- }
449
- return l;
450
- }
451
- function aa(e, t) {
452
- t === void 0 && (t = {});
453
- let r = e;
454
- r.endsWith("*") && r !== "*" && !r.endsWith("/*") && (de(!1, 'Route path "' + r + '" will be treated as if it were ' + ('"' + r.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + r.replace(/\*$/, "/*") + '".')), r = r.replace(/\*$/, "/*"));
455
- const a = r.startsWith("/") ? "/" : "", n = (l) => l == null ? "" : typeof l == "string" ? l : String(l), s = r.split(/\/+/).map((l, f, u) => {
456
- if (f === u.length - 1 && l === "*")
457
- return n(t["*"]);
458
- const b = l.match(/^:([\w-]+)(\??)$/);
459
- if (b) {
460
- const [, p, S] = b;
461
- let m = t[p];
462
- return O(S === "?" || m != null, 'Missing ":' + p + '" param'), n(m);
463
- }
464
- return l.replace(/\?$/g, "");
465
- }).filter((l) => !!l);
466
- return a + s.join("/");
467
- }
468
- function ht(e, t) {
469
- typeof e == "string" && (e = {
470
- path: e,
471
- caseSensitive: !1,
472
- end: !0
473
- });
474
- let [r, a] = na(e.path, e.caseSensitive, e.end), n = t.match(r);
475
- if (!n) return null;
476
- let s = n[0], l = s.replace(/(.)\/+$/, "$1"), f = n.slice(1);
477
- return {
478
- params: a.reduce((v, b, p) => {
479
- let {
480
- paramName: S,
481
- isOptional: m
482
- } = b;
483
- if (S === "*") {
484
- let g = f[p] || "";
485
- l = s.slice(0, s.length - g.length).replace(/(.)\/+$/, "$1");
486
- }
487
- const y = f[p];
488
- return m && !y ? v[S] = void 0 : v[S] = (y || "").replace(/%2F/g, "/"), v;
489
- }, {}),
490
- pathname: s,
491
- pathnameBase: l,
492
- pattern: e
493
- };
494
- }
495
- function na(e, t, r) {
496
- t === void 0 && (t = !1), r === void 0 && (r = !0), de(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
497
- let a = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (l, f, u) => (a.push({
498
- paramName: f,
499
- isOptional: u != null
500
- }), u ? "/?([^\\/]+)?" : "/([^\\/]+)"));
501
- return e.endsWith("*") ? (a.push({
502
- paramName: "*"
503
- }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
504
- }
505
- function oa(e) {
506
- try {
507
- return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
508
- } catch (t) {
509
- return de(!1, 'The URL path "' + e + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + t + ").")), e;
510
- }
511
- }
512
- function Ye(e, t) {
513
- if (t === "/") return e;
514
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
515
- return null;
516
- let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
517
- return a && a !== "/" ? null : e.slice(r) || "/";
518
- }
519
- function qt(e, t) {
520
- t === void 0 && (t = "/");
521
- let {
522
- pathname: r,
523
- search: a = "",
524
- hash: n = ""
525
- } = typeof e == "string" ? ie(e) : e;
526
- return {
527
- pathname: r ? r.startsWith("/") ? r : ia(r, t) : t,
528
- search: sa(a),
529
- hash: da(n)
530
- };
531
- }
532
- function ia(e, t) {
533
- let r = t.replace(/\/+$/, "").split("/");
534
- return e.split("/").forEach((n) => {
535
- n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
536
- }), r.length > 1 ? r.join("/") : "/";
537
- }
538
- function ft(e, t, r, a) {
539
- return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(a) + "]. Please separate it out to the ") + ("`to." + r + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
540
- }
541
- function er(e) {
542
- return e.filter((t, r) => r === 0 || t.route.path && t.route.path.length > 0);
543
- }
544
- function tr(e, t) {
545
- let r = er(e);
546
- return t ? r.map((a, n) => n === r.length - 1 ? a.pathname : a.pathnameBase) : r.map((a) => a.pathnameBase);
547
- }
548
- function rr(e, t, r, a) {
549
- a === void 0 && (a = !1);
550
- let n;
551
- typeof e == "string" ? n = ie(e) : (n = I({}, e), O(!n.pathname || !n.pathname.includes("?"), ft("?", "pathname", "search", n)), O(!n.pathname || !n.pathname.includes("#"), ft("#", "pathname", "hash", n)), O(!n.search || !n.search.includes("#"), ft("#", "search", "hash", n)));
552
- let s = e === "" || n.pathname === "", l = s ? "/" : n.pathname, f;
553
- if (l == null)
554
- f = r;
555
- else {
556
- let p = t.length - 1;
557
- if (!a && l.startsWith("..")) {
558
- let S = l.split("/");
559
- for (; S[0] === ".."; )
560
- S.shift(), p -= 1;
561
- n.pathname = S.join("/");
562
- }
563
- f = p >= 0 ? t[p] : "/";
564
- }
565
- let u = qt(n, f), v = l && l !== "/" && l.endsWith("/"), b = (s || l === ".") && r.endsWith("/");
566
- return !u.pathname.endsWith("/") && (v || b) && (u.pathname += "/"), u;
567
- }
568
- function la(e) {
569
- return e === "" || e.pathname === "" ? "/" : typeof e == "string" ? ie(e).pathname : e.pathname;
570
- }
571
- const Ne = (e) => e.join("/").replace(/\/\/+/g, "/"), ar = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), sa = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, da = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ua = function(t, r) {
572
- r === void 0 && (r = {});
573
- let a = typeof r == "number" ? {
574
- status: r
575
- } : r, n = new Headers(a.headers);
576
- return n.has("Content-Type") || n.set("Content-Type", "application/json; charset=utf-8"), new Response(JSON.stringify(t), I({}, a, {
577
- headers: n
578
- }));
579
- };
580
- class pt extends Error {
581
- }
582
- class nr {
583
- constructor(t, r) {
584
- this.pendingKeysSet = /* @__PURE__ */ new Set(), this.subscribers = /* @__PURE__ */ new Set(), this.deferredKeys = [], O(t && typeof t == "object" && !Array.isArray(t), "defer() only accepts plain objects");
585
- let a;
586
- this.abortPromise = new Promise((s, l) => a = l), this.controller = new AbortController();
587
- let n = () => a(new pt("Deferred data aborted"));
588
- this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", n), this.controller.signal.addEventListener("abort", n), this.data = Object.entries(t).reduce((s, l) => {
589
- let [f, u] = l;
590
- return Object.assign(s, {
591
- [f]: this.trackPromise(f, u)
592
- });
593
- }, {}), this.done && this.unlistenAbortSignal(), this.init = r;
594
- }
595
- trackPromise(t, r) {
596
- if (!(r instanceof Promise))
597
- return r;
598
- this.deferredKeys.push(t), this.pendingKeysSet.add(t);
599
- let a = Promise.race([r, this.abortPromise]).then((n) => this.onSettle(a, t, void 0, n), (n) => this.onSettle(a, t, n));
600
- return a.catch(() => {
601
- }), Object.defineProperty(a, "_tracked", {
602
- get: () => !0
603
- }), a;
604
- }
605
- onSettle(t, r, a, n) {
606
- if (this.controller.signal.aborted && a instanceof pt)
607
- return this.unlistenAbortSignal(), Object.defineProperty(t, "_error", {
608
- get: () => a
609
- }), Promise.reject(a);
610
- if (this.pendingKeysSet.delete(r), this.done && this.unlistenAbortSignal(), a === void 0 && n === void 0) {
611
- let s = new Error('Deferred data for key "' + r + '" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');
612
- return Object.defineProperty(t, "_error", {
613
- get: () => s
614
- }), this.emit(!1, r), Promise.reject(s);
615
- }
616
- return n === void 0 ? (Object.defineProperty(t, "_error", {
617
- get: () => a
618
- }), this.emit(!1, r), Promise.reject(a)) : (Object.defineProperty(t, "_data", {
619
- get: () => n
620
- }), this.emit(!1, r), n);
621
- }
622
- emit(t, r) {
623
- this.subscribers.forEach((a) => a(t, r));
624
- }
625
- subscribe(t) {
626
- return this.subscribers.add(t), () => this.subscribers.delete(t);
627
- }
628
- cancel() {
629
- this.controller.abort(), this.pendingKeysSet.forEach((t, r) => this.pendingKeysSet.delete(r)), this.emit(!0);
630
- }
631
- async resolveData(t) {
632
- let r = !1;
633
- if (!this.done) {
634
- let a = () => this.cancel();
635
- t.addEventListener("abort", a), r = await new Promise((n) => {
636
- this.subscribe((s) => {
637
- t.removeEventListener("abort", a), (s || this.done) && n(s);
638
- });
639
- });
640
- }
641
- return r;
642
- }
643
- get done() {
644
- return this.pendingKeysSet.size === 0;
645
- }
646
- get unwrappedData() {
647
- return O(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds"), Object.entries(this.data).reduce((t, r) => {
648
- let [a, n] = r;
649
- return Object.assign(t, {
650
- [a]: ca(n)
651
- });
652
- }, {});
653
- }
654
- get pendingKeys() {
655
- return Array.from(this.pendingKeysSet);
656
- }
657
- }
658
- function fa(e) {
659
- return e instanceof Promise && e._tracked === !0;
660
- }
661
- function ca(e) {
662
- if (!fa(e))
663
- return e;
664
- if (e._error)
665
- throw e._error;
666
- return e._data;
667
- }
668
- const ha = function(t, r) {
669
- r === void 0 && (r = {});
670
- let a = typeof r == "number" ? {
671
- status: r
672
- } : r;
673
- return new nr(t, a);
674
- }, or = function(t, r) {
675
- r === void 0 && (r = 302);
676
- let a = r;
677
- typeof a == "number" ? a = {
678
- status: a
679
- } : typeof a.status > "u" && (a.status = 302);
680
- let n = new Headers(a.headers);
681
- return n.set("Location", t), new Response(null, I({}, a, {
682
- headers: n
683
- }));
684
- }, pa = (e, t) => {
685
- let r = or(e, t);
686
- return r.headers.set("X-Remix-Reload-Document", "true"), r;
687
- };
688
- class vt {
689
- constructor(t, r, a, n) {
690
- n === void 0 && (n = !1), this.status = t, this.statusText = r || "", this.internal = n, a instanceof Error ? (this.data = a.toString(), this.error = a) : this.data = a;
691
- }
692
- }
693
- function ze(e) {
694
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
695
- }
696
- const ir = ["post", "put", "patch", "delete"], ma = new Set(ir), ga = ["get", ...ir], ya = new Set(ga), va = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]), wa = /* @__PURE__ */ new Set([307, 308]), nt = {
697
- state: "idle",
698
- location: void 0,
699
- formMethod: void 0,
700
- formAction: void 0,
701
- formEncType: void 0,
702
- formData: void 0,
703
- json: void 0,
704
- text: void 0
705
- }, lr = {
706
- state: "idle",
707
- data: void 0,
708
- formMethod: void 0,
709
- formAction: void 0,
710
- formEncType: void 0,
711
- formData: void 0,
712
- json: void 0,
713
- text: void 0
714
- }, Ie = {
715
- state: "unblocked",
716
- proceed: void 0,
717
- reset: void 0,
718
- location: void 0
719
- }, wt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, sr = (e) => ({
720
- hasErrorBoundary: !!e.hasErrorBoundary
721
- }), dr = "remix-router-transitions";
722
- function ba(e) {
723
- const t = e.window ? e.window : typeof window < "u" ? window : void 0, r = typeof t < "u" && typeof t.document < "u" && typeof t.document.createElement < "u", a = !r;
724
- O(e.routes.length > 0, "You must provide a non-empty routes array to createRouter");
725
- let n;
726
- if (e.mapRouteProperties)
727
- n = e.mapRouteProperties;
728
- else if (e.detectErrorBoundary) {
729
- let o = e.detectErrorBoundary;
730
- n = (i) => ({
731
- hasErrorBoundary: o(i)
732
- });
733
- } else
734
- n = sr;
735
- let s = {}, l = Me(e.routes, n, void 0, s), f, u = e.basename || "/", v = e.unstable_dataStrategy || pr, b = e.unstable_patchRoutesOnMiss, p = I({
736
- v7_fetcherPersist: !1,
737
- v7_normalizeFormMethod: !1,
738
- v7_partialHydration: !1,
739
- v7_prependBasename: !1,
740
- v7_relativeSplatPath: !1,
741
- unstable_skipActionErrorRevalidation: !1
742
- }, e.future), S = null, m = /* @__PURE__ */ new Set(), y = null, g = null, P = null, A = e.hydrationData != null, x = me(l, e.history.location, u), _ = null;
743
- if (x == null && !b) {
744
- let o = Y(404, {
745
- pathname: e.history.location.pathname
746
- }), {
747
- matches: i,
748
- route: d
749
- } = ot(l);
750
- x = i, _ = {
751
- [d.id]: o
752
- };
753
- }
754
- x && b && ut(x, l, e.history.location.pathname).active && (x = null);
755
- let R;
756
- if (!x)
757
- R = !1, x = [];
758
- else if (x.some((o) => o.route.lazy))
759
- R = !1;
760
- else if (!x.some((o) => o.route.loader))
761
- R = !0;
762
- else if (p.v7_partialHydration) {
763
- let o = e.hydrationData ? e.hydrationData.loaderData : null, i = e.hydrationData ? e.hydrationData.errors : null, d = (h) => h.route.loader ? typeof h.route.loader == "function" && h.route.loader.hydrate === !0 ? !1 : o && o[h.route.id] !== void 0 || i && i[h.route.id] !== void 0 : !0;
764
- if (i) {
765
- let h = x.findIndex((D) => i[D.route.id] !== void 0);
766
- R = x.slice(0, h + 1).every(d);
767
- } else
768
- R = x.every(d);
769
- } else
770
- R = e.hydrationData != null;
771
- let N, c = {
772
- historyAction: e.history.action,
773
- location: e.history.location,
774
- matches: x,
775
- initialized: R,
776
- navigation: nt,
777
- // Don't restore on initial updateState() if we were SSR'd
778
- restoreScrollPosition: e.hydrationData != null ? !1 : null,
779
- preventScrollReset: !1,
780
- revalidation: "idle",
781
- loaderData: e.hydrationData && e.hydrationData.loaderData || {},
782
- actionData: e.hydrationData && e.hydrationData.actionData || null,
783
- errors: e.hydrationData && e.hydrationData.errors || _,
784
- fetchers: /* @__PURE__ */ new Map(),
785
- blockers: /* @__PURE__ */ new Map()
786
- }, C = V.Pop, J = !1, F, X = !1, K = /* @__PURE__ */ new Map(), ne = null, le = !1, te = !1, je = [], Je = [], Q = /* @__PURE__ */ new Map(), Ge = 0, Be = -1, Ce = /* @__PURE__ */ new Map(), fe = /* @__PURE__ */ new Set(), Te = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Set(), Ee = /* @__PURE__ */ new Map(), Pe = /* @__PURE__ */ new Map(), Dr = /* @__PURE__ */ new Map(), it = !1;
787
- function Er() {
788
- if (S = e.history.listen((o) => {
789
- let {
790
- action: i,
791
- location: d,
792
- delta: h
793
- } = o;
794
- if (it) {
795
- it = !1;
796
- return;
797
- }
798
- de(Pe.size === 0 || h != null, "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");
799
- let D = jt({
800
- currentLocation: c.location,
801
- nextLocation: d,
802
- historyAction: i
803
- });
804
- if (D && h != null) {
805
- it = !0, e.history.go(h * -1), Qe(D, {
806
- state: "blocked",
807
- location: d,
808
- proceed() {
809
- Qe(D, {
810
- state: "proceeding",
811
- proceed: void 0,
812
- reset: void 0,
813
- location: d
814
- }), e.history.go(h);
815
- },
816
- reset() {
817
- let E = new Map(c.blockers);
818
- E.set(D, Ie), re({
819
- blockers: E
820
- });
821
- }
822
- });
823
- return;
824
- }
825
- return xe(i, d);
826
- }), r) {
827
- _a(t, K);
828
- let o = () => Ua(t, K);
829
- t.addEventListener("pagehide", o), ne = () => t.removeEventListener("pagehide", o);
830
- }
831
- return c.initialized || xe(V.Pop, c.location, {
832
- initialHydration: !0
833
- }), N;
834
- }
835
- function Pr() {
836
- S && S(), ne && ne(), m.clear(), F && F.abort(), c.fetchers.forEach((o, i) => Xe(i)), c.blockers.forEach((o, i) => Mt(i));
837
- }
838
- function xr(o) {
839
- return m.add(o), () => m.delete(o);
840
- }
841
- function re(o, i) {
842
- i === void 0 && (i = {}), c = I({}, c, o);
843
- let d = [], h = [];
844
- p.v7_fetcherPersist && c.fetchers.forEach((D, E) => {
845
- D.state === "idle" && (ce.has(E) ? h.push(E) : d.push(E));
846
- }), [...m].forEach((D) => D(c, {
847
- deletedFetchers: h,
848
- unstable_viewTransitionOpts: i.viewTransitionOpts,
849
- unstable_flushSync: i.flushSync === !0
850
- })), p.v7_fetcherPersist && (d.forEach((D) => c.fetchers.delete(D)), h.forEach((D) => Xe(D)));
851
- }
852
- function Fe(o, i, d) {
853
- var h, D;
854
- let {
855
- flushSync: E
856
- } = d === void 0 ? {} : d, j = c.actionData != null && c.navigation.formMethod != null && oe(c.navigation.formMethod) && c.navigation.state === "loading" && ((h = o.state) == null ? void 0 : h._isRedirect) !== !0, w;
857
- i.actionData ? Object.keys(i.actionData).length > 0 ? w = i.actionData : w = null : j ? w = c.actionData : w = null;
858
- let T = i.loaderData ? $t(c.loaderData, i.loaderData, i.matches || [], i.errors) : c.loaderData, L = c.blockers;
859
- L.size > 0 && (L = new Map(L), L.forEach((H, $) => L.set($, Ie)));
860
- let M = J === !0 || c.navigation.formMethod != null && oe(c.navigation.formMethod) && ((D = o.state) == null ? void 0 : D._isRedirect) !== !0;
861
- f && (l = f, f = void 0), le || C === V.Pop || (C === V.Push ? e.history.push(o, o.state) : C === V.Replace && e.history.replace(o, o.state));
862
- let W;
863
- if (C === V.Pop) {
864
- let H = K.get(c.location.pathname);
865
- H && H.has(o.pathname) ? W = {
866
- currentLocation: c.location,
867
- nextLocation: o
868
- } : K.has(o.pathname) && (W = {
869
- currentLocation: o,
870
- nextLocation: c.location
871
- });
872
- } else if (X) {
873
- let H = K.get(c.location.pathname);
874
- H ? H.add(o.pathname) : (H = /* @__PURE__ */ new Set([o.pathname]), K.set(c.location.pathname, H)), W = {
875
- currentLocation: c.location,
876
- nextLocation: o
877
- };
878
- }
879
- re(I({}, i, {
880
- actionData: w,
881
- loaderData: T,
882
- historyAction: C,
883
- location: o,
884
- initialized: !0,
885
- navigation: nt,
886
- revalidation: "idle",
887
- restoreScrollPosition: Tt(o, i.matches || c.matches),
888
- preventScrollReset: M,
889
- blockers: L
890
- }), {
891
- viewTransitionOpts: W,
892
- flushSync: E === !0
893
- }), C = V.Pop, J = !1, X = !1, le = !1, te = !1, je = [], Je = [];
894
- }
895
- async function St(o, i) {
896
- if (typeof o == "number") {
897
- e.history.go(o);
898
- return;
899
- }
900
- let d = mt(c.location, c.matches, u, p.v7_prependBasename, o, p.v7_relativeSplatPath, i == null ? void 0 : i.fromRouteId, i == null ? void 0 : i.relative), {
901
- path: h,
902
- submission: D,
903
- error: E
904
- } = It(p.v7_normalizeFormMethod, !1, d, i), j = c.location, w = ge(c.location, h, i && i.state);
905
- w = I({}, w, e.history.encodeLocation(w));
906
- let T = i && i.replace != null ? i.replace : void 0, L = V.Push;
907
- T === !0 ? L = V.Replace : T === !1 || D != null && oe(D.formMethod) && D.formAction === c.location.pathname + c.location.search && (L = V.Replace);
908
- let M = i && "preventScrollReset" in i ? i.preventScrollReset === !0 : void 0, W = (i && i.unstable_flushSync) === !0, H = jt({
909
- currentLocation: j,
910
- nextLocation: w,
911
- historyAction: L
912
- });
913
- if (H) {
914
- Qe(H, {
915
- state: "blocked",
916
- location: w,
917
- proceed() {
918
- Qe(H, {
919
- state: "proceeding",
920
- proceed: void 0,
921
- reset: void 0,
922
- location: w
923
- }), St(o, i);
924
- },
925
- reset() {
926
- let $ = new Map(c.blockers);
927
- $.set(H, Ie), re({
928
- blockers: $
929
- });
930
- }
931
- });
932
- return;
933
- }
934
- return await xe(L, w, {
935
- submission: D,
936
- // Send through the formData serialization error if we have one so we can
937
- // render at the right error boundary after we match routes
938
- pendingError: E,
939
- preventScrollReset: M,
940
- replace: i && i.replace,
941
- enableViewTransition: i && i.unstable_viewTransition,
942
- flushSync: W
943
- });
944
- }
945
- function Lr() {
946
- if (lt(), re({
947
- revalidation: "loading"
948
- }), c.navigation.state !== "submitting") {
949
- if (c.navigation.state === "idle") {
950
- xe(c.historyAction, c.location, {
951
- startUninterruptedRevalidation: !0
952
- });
953
- return;
954
- }
955
- xe(C || c.historyAction, c.navigation.location, {
956
- overrideNavigation: c.navigation
957
- });
958
- }
959
- }
960
- async function xe(o, i, d) {
961
- F && F.abort(), F = null, C = o, le = (d && d.startUninterruptedRevalidation) === !0, Ir(c.location, c.matches), J = (d && d.preventScrollReset) === !0, X = (d && d.enableViewTransition) === !0;
962
- let h = f || l, D = d && d.overrideNavigation, E = me(h, i, u), j = (d && d.flushSync) === !0, w = ut(E, h, i.pathname);
963
- if (w.active && w.matches && (E = w.matches), !E) {
964
- let {
965
- error: B,
966
- notFoundMatches: q,
967
- route: Z
968
- } = st(i.pathname);
969
- Fe(i, {
970
- matches: q,
971
- loaderData: {},
972
- errors: {
973
- [Z.id]: B
974
- }
975
- }, {
976
- flushSync: j
977
- });
978
- return;
979
- }
980
- if (c.initialized && !te && La(c.location, i) && !(d && d.submission && oe(d.submission.formMethod))) {
981
- Fe(i, {
982
- matches: E
983
- }, {
984
- flushSync: j
985
- });
986
- return;
987
- }
988
- F = new AbortController();
989
- let T = Oe(e.history, i, F.signal, d && d.submission), L;
990
- if (d && d.pendingError)
991
- L = [He(E).route.id, {
992
- type: z.error,
993
- error: d.pendingError
994
- }];
995
- else if (d && d.submission && oe(d.submission.formMethod)) {
996
- let B = await Mr(T, i, d.submission, E, w.active, {
997
- replace: d.replace,
998
- flushSync: j
999
- });
1000
- if (B.shortCircuited)
1001
- return;
1002
- if (B.pendingActionResult) {
1003
- let [q, Z] = B.pendingActionResult;
1004
- if (ee(Z) && ze(Z.error) && Z.error.status === 404) {
1005
- F = null, Fe(i, {
1006
- matches: B.matches,
1007
- loaderData: {},
1008
- errors: {
1009
- [q]: Z.error
1010
- }
1011
- });
1012
- return;
1013
- }
1014
- }
1015
- E = B.matches || E, L = B.pendingActionResult, D = ct(i, d.submission), j = !1, w.active = !1, T = Oe(e.history, T.url, T.signal);
1016
- }
1017
- let {
1018
- shortCircuited: M,
1019
- matches: W,
1020
- loaderData: H,
1021
- errors: $
1022
- } = await jr(T, i, E, w.active, D, d && d.submission, d && d.fetcherSubmission, d && d.replace, d && d.initialHydration === !0, j, L);
1023
- M || (F = null, Fe(i, I({
1024
- matches: W || E
1025
- }, kt(L), {
1026
- loaderData: H,
1027
- errors: $
1028
- })));
1029
- }
1030
- async function Mr(o, i, d, h, D, E) {
1031
- E === void 0 && (E = {}), lt();
1032
- let j = Ta(i, d);
1033
- if (re({
1034
- navigation: j
1035
- }, {
1036
- flushSync: E.flushSync === !0
1037
- }), D) {
1038
- let L = await qe(h, i.pathname, o.signal);
1039
- if (L.type === "aborted")
1040
- return {
1041
- shortCircuited: !0
1042
- };
1043
- if (L.type === "error") {
1044
- let {
1045
- error: M,
1046
- notFoundMatches: W,
1047
- route: H
1048
- } = Ze(i.pathname, L);
1049
- return {
1050
- matches: W,
1051
- pendingActionResult: [H.id, {
1052
- type: z.error,
1053
- error: M
1054
- }]
1055
- };
1056
- } else if (L.matches)
1057
- h = L.matches;
1058
- else {
1059
- let {
1060
- notFoundMatches: M,
1061
- error: W,
1062
- route: H
1063
- } = st(i.pathname);
1064
- return {
1065
- matches: M,
1066
- pendingActionResult: [H.id, {
1067
- type: z.error,
1068
- error: W
1069
- }]
1070
- };
1071
- }
1072
- }
1073
- let w, T = Le(h, i);
1074
- if (!T.route.action && !T.route.lazy)
1075
- w = {
1076
- type: z.error,
1077
- error: Y(405, {
1078
- method: o.method,
1079
- pathname: i.pathname,
1080
- routeId: T.route.id
1081
- })
1082
- };
1083
- else if (w = (await $e("action", o, [T], h))[0], o.signal.aborted)
1084
- return {
1085
- shortCircuited: !0
1086
- };
1087
- if (De(w)) {
1088
- let L;
1089
- return E && E.replace != null ? L = E.replace : L = Bt(w.response.headers.get("Location"), new URL(o.url), u) === c.location.pathname + c.location.search, await Ke(o, w, {
1090
- submission: d,
1091
- replace: L
1092
- }), {
1093
- shortCircuited: !0
1094
- };
1095
- }
1096
- if (Re(w))
1097
- throw Y(400, {
1098
- type: "defer-action"
1099
- });
1100
- if (ee(w)) {
1101
- let L = He(h, T.route.id);
1102
- return (E && E.replace) !== !0 && (C = V.Push), {
1103
- matches: h,
1104
- pendingActionResult: [L.route.id, w]
1105
- };
1106
- }
1107
- return {
1108
- matches: h,
1109
- pendingActionResult: [T.route.id, w]
1110
- };
1111
- }
1112
- async function jr(o, i, d, h, D, E, j, w, T, L, M) {
1113
- let W = D || ct(i, E), H = E || j || Jt(W), $ = !le && (!p.v7_partialHydration || !T);
1114
- if (h) {
1115
- if ($) {
1116
- let G = Rt(M);
1117
- re(I({
1118
- navigation: W
1119
- }, G !== void 0 ? {
1120
- actionData: G
1121
- } : {}), {
1122
- flushSync: L
1123
- });
1124
- }
1125
- let U = await qe(d, i.pathname, o.signal);
1126
- if (U.type === "aborted")
1127
- return {
1128
- shortCircuited: !0
1129
- };
1130
- if (U.type === "error") {
1131
- let {
1132
- error: G,
1133
- notFoundMatches: ae,
1134
- route: k
1135
- } = Ze(i.pathname, U);
1136
- return {
1137
- matches: ae,
1138
- loaderData: {},
1139
- errors: {
1140
- [k.id]: G
1141
- }
1142
- };
1143
- } else if (U.matches)
1144
- d = U.matches;
1145
- else {
1146
- let {
1147
- error: G,
1148
- notFoundMatches: ae,
1149
- route: k
1150
- } = st(i.pathname);
1151
- return {
1152
- matches: ae,
1153
- loaderData: {},
1154
- errors: {
1155
- [k.id]: G
1156
- }
1157
- };
1158
- }
1159
- }
1160
- let B = f || l, [q, Z] = Nt(e.history, c, d, H, i, p.v7_partialHydration && T === !0, p.unstable_skipActionErrorRevalidation, te, je, Je, ce, Te, fe, B, u, M);
1161
- if (dt((U) => !(d && d.some((G) => G.route.id === U)) || q && q.some((G) => G.route.id === U)), Be = ++Ge, q.length === 0 && Z.length === 0) {
1162
- let U = xt();
1163
- return Fe(i, I({
1164
- matches: d,
1165
- loaderData: {},
1166
- // Commit pending error if we're short circuiting
1167
- errors: M && ee(M[1]) ? {
1168
- [M[0]]: M[1].error
1169
- } : null
1170
- }, kt(M), U ? {
1171
- fetchers: new Map(c.fetchers)
1172
- } : {}), {
1173
- flushSync: L
1174
- }), {
1175
- shortCircuited: !0
1176
- };
1177
- }
1178
- if ($) {
1179
- let U = {};
1180
- if (!h) {
1181
- U.navigation = W;
1182
- let G = Rt(M);
1183
- G !== void 0 && (U.actionData = G);
1184
- }
1185
- Z.length > 0 && (U.fetchers = Cr(Z)), re(U, {
1186
- flushSync: L
1187
- });
1188
- }
1189
- Z.forEach((U) => {
1190
- Q.has(U.key) && ve(U.key), U.controller && Q.set(U.key, U.controller);
1191
- });
1192
- let ke = () => Z.forEach((U) => ve(U.key));
1193
- F && F.signal.addEventListener("abort", ke);
1194
- let {
1195
- loaderResults: we,
1196
- fetcherResults: _e
1197
- } = await Dt(c.matches, d, q, Z, o);
1198
- if (o.signal.aborted)
1199
- return {
1200
- shortCircuited: !0
1201
- };
1202
- F && F.signal.removeEventListener("abort", ke), Z.forEach((U) => Q.delete(U.key));
1203
- let Ue = Vt([...we, ..._e]);
1204
- if (Ue) {
1205
- if (Ue.idx >= q.length) {
1206
- let U = Z[Ue.idx - q.length].key;
1207
- fe.add(U);
1208
- }
1209
- return await Ke(o, Ue.result, {
1210
- replace: w
1211
- }), {
1212
- shortCircuited: !0
1213
- };
1214
- }
1215
- let {
1216
- loaderData: Ae,
1217
- errors: se
1218
- } = Kt(c, d, q, we, M, Z, _e, Ee);
1219
- Ee.forEach((U, G) => {
1220
- U.subscribe((ae) => {
1221
- (ae || U.done) && Ee.delete(G);
1222
- });
1223
- }), p.v7_partialHydration && T && c.errors && Object.entries(c.errors).filter((U) => {
1224
- let [G] = U;
1225
- return !q.some((ae) => ae.route.id === G);
1226
- }).forEach((U) => {
1227
- let [G, ae] = U;
1228
- se = Object.assign(se || {}, {
1229
- [G]: ae
1230
- });
1231
- });
1232
- let et = xt(), tt = Lt(Be), rt = et || tt || Z.length > 0;
1233
- return I({
1234
- matches: d,
1235
- loaderData: Ae,
1236
- errors: se
1237
- }, rt ? {
1238
- fetchers: new Map(c.fetchers)
1239
- } : {});
1240
- }
1241
- function Rt(o) {
1242
- if (o && !ee(o[1]))
1243
- return {
1244
- [o[0]]: o[1].data
1245
- };
1246
- if (c.actionData)
1247
- return Object.keys(c.actionData).length === 0 ? null : c.actionData;
1248
- }
1249
- function Cr(o) {
1250
- return o.forEach((i) => {
1251
- let d = c.fetchers.get(i.key), h = Ve(void 0, d ? d.data : void 0);
1252
- c.fetchers.set(i.key, h);
1253
- }), new Map(c.fetchers);
1254
- }
1255
- function Tr(o, i, d, h) {
1256
- if (a)
1257
- throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");
1258
- Q.has(o) && ve(o);
1259
- let D = (h && h.unstable_flushSync) === !0, E = f || l, j = mt(c.location, c.matches, u, p.v7_prependBasename, d, p.v7_relativeSplatPath, i, h == null ? void 0 : h.relative), w = me(E, j, u), T = ut(w, E, j);
1260
- if (T.active && T.matches && (w = T.matches), !w) {
1261
- he(o, i, Y(404, {
1262
- pathname: j
1263
- }), {
1264
- flushSync: D
1265
- });
1266
- return;
1267
- }
1268
- let {
1269
- path: L,
1270
- submission: M,
1271
- error: W
1272
- } = It(p.v7_normalizeFormMethod, !0, j, h);
1273
- if (W) {
1274
- he(o, i, W, {
1275
- flushSync: D
1276
- });
1277
- return;
1278
- }
1279
- let H = Le(w, L);
1280
- if (J = (h && h.preventScrollReset) === !0, M && oe(M.formMethod)) {
1281
- Fr(o, i, L, H, w, T.active, D, M);
1282
- return;
1283
- }
1284
- Te.set(o, {
1285
- routeId: i,
1286
- path: L
1287
- }), _r(o, i, L, H, w, T.active, D, M);
1288
- }
1289
- async function Fr(o, i, d, h, D, E, j, w) {
1290
- lt(), Te.delete(o);
1291
- function T(k) {
1292
- if (!k.route.action && !k.route.lazy) {
1293
- let pe = Y(405, {
1294
- method: w.formMethod,
1295
- pathname: d,
1296
- routeId: i
1297
- });
1298
- return he(o, i, pe, {
1299
- flushSync: j
1300
- }), !0;
1301
- }
1302
- return !1;
1303
- }
1304
- if (!E && T(h))
1305
- return;
1306
- let L = c.fetchers.get(o);
1307
- ye(o, Fa(w, L), {
1308
- flushSync: j
1309
- });
1310
- let M = new AbortController(), W = Oe(e.history, d, M.signal, w);
1311
- if (E) {
1312
- let k = await qe(D, d, W.signal);
1313
- if (k.type === "aborted")
1314
- return;
1315
- if (k.type === "error") {
1316
- let {
1317
- error: pe
1318
- } = Ze(d, k);
1319
- he(o, i, pe, {
1320
- flushSync: j
1321
- });
1322
- return;
1323
- } else if (k.matches) {
1324
- if (D = k.matches, h = Le(D, d), T(h))
1325
- return;
1326
- } else {
1327
- he(o, i, Y(404, {
1328
- pathname: d
1329
- }), {
1330
- flushSync: j
1331
- });
1332
- return;
1333
- }
1334
- }
1335
- Q.set(o, M);
1336
- let H = Ge, B = (await $e("action", W, [h], D))[0];
1337
- if (W.signal.aborted) {
1338
- Q.get(o) === M && Q.delete(o);
1339
- return;
1340
- }
1341
- if (p.v7_fetcherPersist && ce.has(o)) {
1342
- if (De(B) || ee(B)) {
1343
- ye(o, be(void 0));
1344
- return;
1345
- }
1346
- } else {
1347
- if (De(B))
1348
- if (Q.delete(o), Be > H) {
1349
- ye(o, be(void 0));
1350
- return;
1351
- } else
1352
- return fe.add(o), ye(o, Ve(w)), Ke(W, B, {
1353
- fetcherSubmission: w
1354
- });
1355
- if (ee(B)) {
1356
- he(o, i, B.error);
1357
- return;
1358
- }
1359
- }
1360
- if (Re(B))
1361
- throw Y(400, {
1362
- type: "defer-action"
1363
- });
1364
- let q = c.navigation.location || c.location, Z = Oe(e.history, q, M.signal), ke = f || l, we = c.navigation.state !== "idle" ? me(ke, c.navigation.location, u) : c.matches;
1365
- O(we, "Didn't find any matches after fetcher action");
1366
- let _e = ++Ge;
1367
- Ce.set(o, _e);
1368
- let Ue = Ve(w, B.data);
1369
- c.fetchers.set(o, Ue);
1370
- let [Ae, se] = Nt(e.history, c, we, w, q, !1, p.unstable_skipActionErrorRevalidation, te, je, Je, ce, Te, fe, ke, u, [h.route.id, B]);
1371
- se.filter((k) => k.key !== o).forEach((k) => {
1372
- let pe = k.key, Ft = c.fetchers.get(pe), zr = Ve(void 0, Ft ? Ft.data : void 0);
1373
- c.fetchers.set(pe, zr), Q.has(pe) && ve(pe), k.controller && Q.set(pe, k.controller);
1374
- }), re({
1375
- fetchers: new Map(c.fetchers)
1376
- });
1377
- let et = () => se.forEach((k) => ve(k.key));
1378
- M.signal.addEventListener("abort", et);
1379
- let {
1380
- loaderResults: tt,
1381
- fetcherResults: rt
1382
- } = await Dt(c.matches, we, Ae, se, Z);
1383
- if (M.signal.aborted)
1384
- return;
1385
- M.signal.removeEventListener("abort", et), Ce.delete(o), Q.delete(o), se.forEach((k) => Q.delete(k.key));
1386
- let U = Vt([...tt, ...rt]);
1387
- if (U) {
1388
- if (U.idx >= Ae.length) {
1389
- let k = se[U.idx - Ae.length].key;
1390
- fe.add(k);
1391
- }
1392
- return Ke(Z, U.result);
1393
- }
1394
- let {
1395
- loaderData: G,
1396
- errors: ae
1397
- } = Kt(c, c.matches, Ae, tt, void 0, se, rt, Ee);
1398
- if (c.fetchers.has(o)) {
1399
- let k = be(B.data);
1400
- c.fetchers.set(o, k);
1401
- }
1402
- Lt(_e), c.navigation.state === "loading" && _e > Be ? (O(C, "Expected pending action"), F && F.abort(), Fe(c.navigation.location, {
1403
- matches: we,
1404
- loaderData: G,
1405
- errors: ae,
1406
- fetchers: new Map(c.fetchers)
1407
- })) : (re({
1408
- errors: ae,
1409
- loaderData: $t(c.loaderData, G, we, ae),
1410
- fetchers: new Map(c.fetchers)
1411
- }), te = !1);
1412
- }
1413
- async function _r(o, i, d, h, D, E, j, w) {
1414
- let T = c.fetchers.get(o);
1415
- ye(o, Ve(w, T ? T.data : void 0), {
1416
- flushSync: j
1417
- });
1418
- let L = new AbortController(), M = Oe(e.history, d, L.signal);
1419
- if (E) {
1420
- let B = await qe(D, d, M.signal);
1421
- if (B.type === "aborted")
1422
- return;
1423
- if (B.type === "error") {
1424
- let {
1425
- error: q
1426
- } = Ze(d, B);
1427
- he(o, i, q, {
1428
- flushSync: j
1429
- });
1430
- return;
1431
- } else if (B.matches)
1432
- D = B.matches, h = Le(D, d);
1433
- else {
1434
- he(o, i, Y(404, {
1435
- pathname: d
1436
- }), {
1437
- flushSync: j
1438
- });
1439
- return;
1440
- }
1441
- }
1442
- Q.set(o, L);
1443
- let W = Ge, $ = (await $e("loader", M, [h], D))[0];
1444
- if (Re($) && ($ = await Rr($, M.signal, !0) || $), Q.get(o) === L && Q.delete(o), !M.signal.aborted) {
1445
- if (ce.has(o)) {
1446
- ye(o, be(void 0));
1447
- return;
1448
- }
1449
- if (De($))
1450
- if (Be > W) {
1451
- ye(o, be(void 0));
1452
- return;
1453
- } else {
1454
- fe.add(o), await Ke(M, $);
1455
- return;
1456
- }
1457
- if (ee($)) {
1458
- he(o, i, $.error);
1459
- return;
1460
- }
1461
- O(!Re($), "Unhandled fetcher deferred data"), ye(o, be($.data));
1462
- }
1463
- }
1464
- async function Ke(o, i, d) {
1465
- let {
1466
- submission: h,
1467
- fetcherSubmission: D,
1468
- replace: E
1469
- } = d === void 0 ? {} : d;
1470
- i.response.headers.has("X-Remix-Revalidate") && (te = !0);
1471
- let j = i.response.headers.get("Location");
1472
- O(j, "Expected a Location header on the redirect Response"), j = Bt(j, new URL(o.url), u);
1473
- let w = ge(c.location, j, {
1474
- _isRedirect: !0
1475
- });
1476
- if (r) {
1477
- let $ = !1;
1478
- if (i.response.headers.has("X-Remix-Reload-Document"))
1479
- $ = !0;
1480
- else if (wt.test(j)) {
1481
- const B = e.history.createURL(j);
1482
- $ = // Hard reload if it's an absolute URL to a new origin
1483
- B.origin !== t.location.origin || // Hard reload if it's an absolute URL that does not match our basename
1484
- Ye(B.pathname, u) == null;
1485
- }
1486
- if ($) {
1487
- E ? t.location.replace(j) : t.location.assign(j);
1488
- return;
1489
- }
1490
- }
1491
- F = null;
1492
- let T = E === !0 ? V.Replace : V.Push, {
1493
- formMethod: L,
1494
- formAction: M,
1495
- formEncType: W
1496
- } = c.navigation;
1497
- !h && !D && L && M && W && (h = Jt(c.navigation));
1498
- let H = h || D;
1499
- if (wa.has(i.response.status) && H && oe(H.formMethod))
1500
- await xe(T, w, {
1501
- submission: I({}, H, {
1502
- formAction: j
1503
- }),
1504
- // Preserve this flag across redirects
1505
- preventScrollReset: J
1506
- });
1507
- else {
1508
- let $ = ct(w, h);
1509
- await xe(T, w, {
1510
- overrideNavigation: $,
1511
- // Send fetcher submissions through for shouldRevalidate
1512
- fetcherSubmission: D,
1513
- // Preserve this flag across redirects
1514
- preventScrollReset: J
1515
- });
1516
- }
1517
- }
1518
- async function $e(o, i, d, h) {
1519
- try {
1520
- let D = await mr(v, o, i, d, h, s, n);
1521
- return await Promise.all(D.map((E, j) => {
1522
- if (br(E)) {
1523
- let w = E.result;
1524
- return {
1525
- type: z.redirect,
1526
- response: yr(w, i, d[j].route.id, h, u, p.v7_relativeSplatPath)
1527
- };
1528
- }
1529
- return gr(E);
1530
- }));
1531
- } catch (D) {
1532
- return d.map(() => ({
1533
- type: z.error,
1534
- error: D
1535
- }));
1536
- }
1537
- }
1538
- async function Dt(o, i, d, h, D) {
1539
- let [E, ...j] = await Promise.all([d.length ? $e("loader", D, d, i) : [], ...h.map((w) => {
1540
- if (w.matches && w.match && w.controller) {
1541
- let T = Oe(e.history, w.path, w.controller.signal);
1542
- return $e("loader", T, [w.match], w.matches).then((L) => L[0]);
1543
- } else
1544
- return Promise.resolve({
1545
- type: z.error,
1546
- error: Y(404, {
1547
- pathname: w.path
1548
- })
1549
- });
1550
- })]);
1551
- return await Promise.all([Yt(o, d, E, E.map(() => D.signal), !1, c.loaderData), Yt(o, h.map((w) => w.match), j, h.map((w) => w.controller ? w.controller.signal : null), !0)]), {
1552
- loaderResults: E,
1553
- fetcherResults: j
1554
- };
1555
- }
1556
- function lt() {
1557
- te = !0, je.push(...dt()), Te.forEach((o, i) => {
1558
- Q.has(i) && (Je.push(i), ve(i));
1559
- });
1560
- }
1561
- function ye(o, i, d) {
1562
- d === void 0 && (d = {}), c.fetchers.set(o, i), re({
1563
- fetchers: new Map(c.fetchers)
1564
- }, {
1565
- flushSync: (d && d.flushSync) === !0
1566
- });
1567
- }
1568
- function he(o, i, d, h) {
1569
- h === void 0 && (h = {});
1570
- let D = He(c.matches, i);
1571
- Xe(o), re({
1572
- errors: {
1573
- [D.route.id]: d
1574
- },
1575
- fetchers: new Map(c.fetchers)
1576
- }, {
1577
- flushSync: (h && h.flushSync) === !0
1578
- });
1579
- }
1580
- function Et(o) {
1581
- return p.v7_fetcherPersist && (We.set(o, (We.get(o) || 0) + 1), ce.has(o) && ce.delete(o)), c.fetchers.get(o) || lr;
1582
- }
1583
- function Xe(o) {
1584
- let i = c.fetchers.get(o);
1585
- Q.has(o) && !(i && i.state === "loading" && Ce.has(o)) && ve(o), Te.delete(o), Ce.delete(o), fe.delete(o), ce.delete(o), c.fetchers.delete(o);
1586
- }
1587
- function Ur(o) {
1588
- if (p.v7_fetcherPersist) {
1589
- let i = (We.get(o) || 0) - 1;
1590
- i <= 0 ? (We.delete(o), ce.add(o)) : We.set(o, i);
1591
- } else
1592
- Xe(o);
1593
- re({
1594
- fetchers: new Map(c.fetchers)
1595
- });
1596
- }
1597
- function ve(o) {
1598
- let i = Q.get(o);
1599
- O(i, "Expected fetch controller: " + o), i.abort(), Q.delete(o);
1600
- }
1601
- function Pt(o) {
1602
- for (let i of o) {
1603
- let d = Et(i), h = be(d.data);
1604
- c.fetchers.set(i, h);
1605
- }
1606
- }
1607
- function xt() {
1608
- let o = [], i = !1;
1609
- for (let d of fe) {
1610
- let h = c.fetchers.get(d);
1611
- O(h, "Expected fetcher: " + d), h.state === "loading" && (fe.delete(d), o.push(d), i = !0);
1612
- }
1613
- return Pt(o), i;
1614
- }
1615
- function Lt(o) {
1616
- let i = [];
1617
- for (let [d, h] of Ce)
1618
- if (h < o) {
1619
- let D = c.fetchers.get(d);
1620
- O(D, "Expected fetcher: " + d), D.state === "loading" && (ve(d), Ce.delete(d), i.push(d));
1621
- }
1622
- return Pt(i), i.length > 0;
1623
- }
1624
- function Ar(o, i) {
1625
- let d = c.blockers.get(o) || Ie;
1626
- return Pe.get(o) !== i && Pe.set(o, i), d;
1627
- }
1628
- function Mt(o) {
1629
- c.blockers.delete(o), Pe.delete(o);
1630
- }
1631
- function Qe(o, i) {
1632
- let d = c.blockers.get(o) || Ie;
1633
- O(d.state === "unblocked" && i.state === "blocked" || d.state === "blocked" && i.state === "blocked" || d.state === "blocked" && i.state === "proceeding" || d.state === "blocked" && i.state === "unblocked" || d.state === "proceeding" && i.state === "unblocked", "Invalid blocker state transition: " + d.state + " -> " + i.state);
1634
- let h = new Map(c.blockers);
1635
- h.set(o, i), re({
1636
- blockers: h
1637
- });
1638
- }
1639
- function jt(o) {
1640
- let {
1641
- currentLocation: i,
1642
- nextLocation: d,
1643
- historyAction: h
1644
- } = o;
1645
- if (Pe.size === 0)
1646
- return;
1647
- Pe.size > 1 && de(!1, "A router only supports one blocker at a time");
1648
- let D = Array.from(Pe.entries()), [E, j] = D[D.length - 1], w = c.blockers.get(E);
1649
- if (!(w && w.state === "proceeding") && j({
1650
- currentLocation: i,
1651
- nextLocation: d,
1652
- historyAction: h
1653
- }))
1654
- return E;
1655
- }
1656
- function st(o) {
1657
- let i = Y(404, {
1658
- pathname: o
1659
- }), d = f || l, {
1660
- matches: h,
1661
- route: D
1662
- } = ot(d);
1663
- return dt(), {
1664
- notFoundMatches: h,
1665
- route: D,
1666
- error: i
1667
- };
1668
- }
1669
- function Ze(o, i) {
1670
- let d = i.partialMatches, h = d[d.length - 1].route, D = Y(400, {
1671
- type: "route-discovery",
1672
- routeId: h.id,
1673
- pathname: o,
1674
- message: i.error != null && "message" in i.error ? i.error : String(i.error)
1675
- });
1676
- return {
1677
- notFoundMatches: d,
1678
- route: h,
1679
- error: D
1680
- };
1681
- }
1682
- function dt(o) {
1683
- let i = [];
1684
- return Ee.forEach((d, h) => {
1685
- (!o || o(h)) && (d.cancel(), i.push(h), Ee.delete(h));
1686
- }), i;
1687
- }
1688
- function Or(o, i, d) {
1689
- if (y = o, P = i, g = d || null, !A && c.navigation === nt) {
1690
- A = !0;
1691
- let h = Tt(c.location, c.matches);
1692
- h != null && re({
1693
- restoreScrollPosition: h
1694
- });
1695
- }
1696
- return () => {
1697
- y = null, P = null, g = null;
1698
- };
1699
- }
1700
- function Ct(o, i) {
1701
- return g && g(o, i.map((h) => Xt(h, c.loaderData))) || o.key;
1702
- }
1703
- function Ir(o, i) {
1704
- if (y && P) {
1705
- let d = Ct(o, i);
1706
- y[d] = P();
1707
- }
1708
- }
1709
- function Tt(o, i) {
1710
- if (y) {
1711
- let d = Ct(o, i), h = y[d];
1712
- if (typeof h == "number")
1713
- return h;
1714
- }
1715
- return null;
1716
- }
1717
- function ut(o, i, d) {
1718
- if (b)
1719
- if (o) {
1720
- let h = o[o.length - 1].route;
1721
- if (h.path && (h.path === "*" || h.path.endsWith("/*")))
1722
- return {
1723
- active: !0,
1724
- matches: at(i, d, u, !0)
1725
- };
1726
- } else
1727
- return {
1728
- active: !0,
1729
- matches: at(i, d, u, !0) || []
1730
- };
1731
- return {
1732
- active: !1,
1733
- matches: null
1734
- };
1735
- }
1736
- async function qe(o, i, d) {
1737
- let h = o, D = h.length > 0 ? h[h.length - 1].route : null;
1738
- for (; ; ) {
1739
- let E = f == null, j = f || l;
1740
- try {
1741
- await Pa(b, i, h, j, s, n, Dr, d);
1742
- } catch (M) {
1743
- return {
1744
- type: "error",
1745
- error: M,
1746
- partialMatches: h
1747
- };
1748
- } finally {
1749
- E && (l = [...l]);
1750
- }
1751
- if (d.aborted)
1752
- return {
1753
- type: "aborted"
1754
- };
1755
- let w = me(j, i, u), T = !1;
1756
- if (w) {
1757
- let M = w[w.length - 1].route;
1758
- if (M.index)
1759
- return {
1760
- type: "success",
1761
- matches: w
1762
- };
1763
- if (M.path && M.path.length > 0)
1764
- if (M.path === "*")
1765
- T = !0;
1766
- else
1767
- return {
1768
- type: "success",
1769
- matches: w
1770
- };
1771
- }
1772
- let L = at(j, i, u, !0);
1773
- if (!L || h.map((M) => M.route.id).join("-") === L.map((M) => M.route.id).join("-"))
1774
- return {
1775
- type: "success",
1776
- matches: T ? w : null
1777
- };
1778
- if (h = L, D = h[h.length - 1].route, D.path === "*")
1779
- return {
1780
- type: "success",
1781
- matches: h
1782
- };
1783
- }
1784
- }
1785
- function Nr(o) {
1786
- s = {}, f = Me(o, n, void 0, s);
1787
- }
1788
- function Hr(o, i) {
1789
- let d = f == null;
1790
- hr(o, i, f || l, s, n), d && (l = [...l], re({}));
1791
- }
1792
- return N = {
1793
- get basename() {
1794
- return u;
1795
- },
1796
- get future() {
1797
- return p;
1798
- },
1799
- get state() {
1800
- return c;
1801
- },
1802
- get routes() {
1803
- return l;
1804
- },
1805
- get window() {
1806
- return t;
1807
- },
1808
- initialize: Er,
1809
- subscribe: xr,
1810
- enableScrollRestoration: Or,
1811
- navigate: St,
1812
- fetch: Tr,
1813
- revalidate: Lr,
1814
- // Passthrough to history-aware createHref used by useHref so we get proper
1815
- // hash-aware URLs in DOM paths
1816
- createHref: (o) => e.history.createHref(o),
1817
- encodeLocation: (o) => e.history.encodeLocation(o),
1818
- getFetcher: Et,
1819
- deleteFetcher: Ur,
1820
- dispose: Pr,
1821
- getBlocker: Ar,
1822
- deleteBlocker: Mt,
1823
- patchRoutes: Hr,
1824
- _internalFetchControllers: Q,
1825
- _internalActiveDeferreds: Ee,
1826
- // TODO: Remove setRoutes, it's temporary to avoid dealing with
1827
- // updating the tree while validating the update algorithm.
1828
- _internalSetRoutes: Nr
1829
- }, N;
1830
- }
1831
- const ur = Symbol("deferred");
1832
- function Sa(e, t) {
1833
- O(e.length > 0, "You must provide a non-empty routes array to createStaticHandler");
1834
- let r = {}, a = (t ? t.basename : null) || "/", n;
1835
- if (t != null && t.mapRouteProperties)
1836
- n = t.mapRouteProperties;
1837
- else if (t != null && t.detectErrorBoundary) {
1838
- let m = t.detectErrorBoundary;
1839
- n = (y) => ({
1840
- hasErrorBoundary: m(y)
1841
- });
1842
- } else
1843
- n = sr;
1844
- let s = I({
1845
- v7_relativeSplatPath: !1,
1846
- v7_throwAbortReason: !1
1847
- }, t ? t.future : null), l = Me(e, n, void 0, r);
1848
- async function f(m, y) {
1849
- let {
1850
- requestContext: g,
1851
- skipLoaderErrorBubbling: P,
1852
- unstable_dataStrategy: A
1853
- } = y === void 0 ? {} : y, x = new URL(m.url), _ = m.method, R = ge("", ue(x), null, "default"), N = me(l, R, a);
1854
- if (!yt(_) && _ !== "HEAD") {
1855
- let C = Y(405, {
1856
- method: _
1857
- }), {
1858
- matches: J,
1859
- route: F
1860
- } = ot(l);
1861
- return {
1862
- basename: a,
1863
- location: R,
1864
- matches: J,
1865
- loaderData: {},
1866
- actionData: null,
1867
- errors: {
1868
- [F.id]: C
1869
- },
1870
- statusCode: C.status,
1871
- loaderHeaders: {},
1872
- actionHeaders: {},
1873
- activeDeferreds: null
1874
- };
1875
- } else if (!N) {
1876
- let C = Y(404, {
1877
- pathname: R.pathname
1878
- }), {
1879
- matches: J,
1880
- route: F
1881
- } = ot(l);
1882
- return {
1883
- basename: a,
1884
- location: R,
1885
- matches: J,
1886
- loaderData: {},
1887
- actionData: null,
1888
- errors: {
1889
- [F.id]: C
1890
- },
1891
- statusCode: C.status,
1892
- loaderHeaders: {},
1893
- actionHeaders: {},
1894
- activeDeferreds: null
1895
- };
1896
- }
1897
- let c = await v(m, R, N, g, A || null, P === !0, null);
1898
- return Se(c) ? c : I({
1899
- location: R,
1900
- basename: a
1901
- }, c);
1902
- }
1903
- async function u(m, y) {
1904
- let {
1905
- routeId: g,
1906
- requestContext: P,
1907
- unstable_dataStrategy: A
1908
- } = y === void 0 ? {} : y, x = new URL(m.url), _ = m.method, R = ge("", ue(x), null, "default"), N = me(l, R, a);
1909
- if (!yt(_) && _ !== "HEAD" && _ !== "OPTIONS")
1910
- throw Y(405, {
1911
- method: _
1912
- });
1913
- if (!N)
1914
- throw Y(404, {
1915
- pathname: R.pathname
1916
- });
1917
- let c = g ? N.find((X) => X.route.id === g) : Le(N, R);
1918
- if (g && !c)
1919
- throw Y(403, {
1920
- pathname: R.pathname,
1921
- routeId: g
1922
- });
1923
- if (!c)
1924
- throw Y(404, {
1925
- pathname: R.pathname
1926
- });
1927
- let C = await v(m, R, N, P, A || null, !1, c);
1928
- if (Se(C))
1929
- return C;
1930
- let J = C.errors ? Object.values(C.errors)[0] : void 0;
1931
- if (J !== void 0)
1932
- throw J;
1933
- if (C.actionData)
1934
- return Object.values(C.actionData)[0];
1935
- if (C.loaderData) {
1936
- var F;
1937
- let X = Object.values(C.loaderData)[0];
1938
- return (F = C.activeDeferreds) != null && F[c.route.id] && (X[ur] = C.activeDeferreds[c.route.id]), X;
1939
- }
1940
- }
1941
- async function v(m, y, g, P, A, x, _) {
1942
- O(m.signal, "query()/queryRoute() requests must contain an AbortController signal");
1943
- try {
1944
- if (oe(m.method.toLowerCase()))
1945
- return await b(m, g, _ || Le(g, y), P, A, x, _ != null);
1946
- let R = await p(m, g, P, A, x, _);
1947
- return Se(R) ? R : I({}, R, {
1948
- actionData: null,
1949
- actionHeaders: {}
1950
- });
1951
- } catch (R) {
1952
- if (ja(R) && Se(R.result)) {
1953
- if (R.type === z.error)
1954
- throw R.result;
1955
- return R.result;
1956
- }
1957
- if (Ca(R))
1958
- return R;
1959
- throw R;
1960
- }
1961
- }
1962
- async function b(m, y, g, P, A, x, _) {
1963
- let R;
1964
- if (!g.route.action && !g.route.lazy) {
1965
- let C = Y(405, {
1966
- method: m.method,
1967
- pathname: new URL(m.url).pathname,
1968
- routeId: g.route.id
1969
- });
1970
- if (_)
1971
- throw C;
1972
- R = {
1973
- type: z.error,
1974
- error: C
1975
- };
1976
- } else
1977
- R = (await S("action", m, [g], y, _, P, A))[0], m.signal.aborted && Ot(m, _, s);
1978
- if (De(R))
1979
- throw new Response(null, {
1980
- status: R.response.status,
1981
- headers: {
1982
- Location: R.response.headers.get("Location")
1983
- }
1984
- });
1985
- if (Re(R)) {
1986
- let C = Y(400, {
1987
- type: "defer-action"
1988
- });
1989
- if (_)
1990
- throw C;
1991
- R = {
1992
- type: z.error,
1993
- error: C
1994
- };
1995
- }
1996
- if (_) {
1997
- if (ee(R))
1998
- throw R.error;
1999
- return {
2000
- matches: [g],
2001
- loaderData: {},
2002
- actionData: {
2003
- [g.route.id]: R.data
2004
- },
2005
- errors: null,
2006
- // Note: statusCode + headers are unused here since queryRoute will
2007
- // return the raw Response or value
2008
- statusCode: 200,
2009
- loaderHeaders: {},
2010
- actionHeaders: {},
2011
- activeDeferreds: null
2012
- };
2013
- }
2014
- let N = new Request(m.url, {
2015
- headers: m.headers,
2016
- redirect: m.redirect,
2017
- signal: m.signal
2018
- });
2019
- if (ee(R)) {
2020
- let C = x ? g : He(y, g.route.id), J = await p(N, y, P, A, x, null, [C.route.id, R]);
2021
- return I({}, J, {
2022
- statusCode: ze(R.error) ? R.error.status : R.statusCode != null ? R.statusCode : 500,
2023
- actionData: null,
2024
- actionHeaders: I({}, R.headers ? {
2025
- [g.route.id]: R.headers
2026
- } : {})
2027
- });
2028
- }
2029
- let c = await p(N, y, P, A, x, null);
2030
- return I({}, c, {
2031
- actionData: {
2032
- [g.route.id]: R.data
2033
- }
2034
- }, R.statusCode ? {
2035
- statusCode: R.statusCode
2036
- } : {}, {
2037
- actionHeaders: R.headers ? {
2038
- [g.route.id]: R.headers
2039
- } : {}
2040
- });
2041
- }
2042
- async function p(m, y, g, P, A, x, _) {
2043
- let R = x != null;
2044
- if (R && !(x != null && x.route.loader) && !(x != null && x.route.lazy))
2045
- throw Y(400, {
2046
- method: m.method,
2047
- pathname: new URL(m.url).pathname,
2048
- routeId: x == null ? void 0 : x.route.id
2049
- });
2050
- let c = (x ? [x] : _ && ee(_[1]) ? fr(y, _[0]) : y).filter((K) => K.route.loader || K.route.lazy);
2051
- if (c.length === 0)
2052
- return {
2053
- matches: y,
2054
- // Add a null for all matched routes for proper revalidation on the client
2055
- loaderData: y.reduce((K, ne) => Object.assign(K, {
2056
- [ne.route.id]: null
2057
- }), {}),
2058
- errors: _ && ee(_[1]) ? {
2059
- [_[0]]: _[1].error
2060
- } : null,
2061
- statusCode: 200,
2062
- loaderHeaders: {},
2063
- activeDeferreds: null
2064
- };
2065
- let C = await S("loader", m, c, y, R, g, P);
2066
- m.signal.aborted && Ot(m, R, s);
2067
- let J = /* @__PURE__ */ new Map(), F = vr(y, c, C, _, J, A), X = new Set(c.map((K) => K.route.id));
2068
- return y.forEach((K) => {
2069
- X.has(K.route.id) || (F.loaderData[K.route.id] = null);
2070
- }), I({}, F, {
2071
- matches: y,
2072
- activeDeferreds: J.size > 0 ? Object.fromEntries(J.entries()) : null
2073
- });
2074
- }
2075
- async function S(m, y, g, P, A, x, _) {
2076
- let R = await mr(_ || pr, m, y, g, P, r, n, x);
2077
- return await Promise.all(R.map((N, c) => {
2078
- if (br(N)) {
2079
- let C = N.result;
2080
- throw yr(C, y, g[c].route.id, P, a, s.v7_relativeSplatPath);
2081
- }
2082
- if (Se(N.result) && A)
2083
- throw N;
2084
- return gr(N);
2085
- }));
2086
- }
2087
- return {
2088
- dataRoutes: l,
2089
- query: f,
2090
- queryRoute: u
2091
- };
2092
- }
2093
- function Ra(e, t, r) {
2094
- return I({}, t, {
2095
- statusCode: ze(r) ? r.status : 500,
2096
- errors: {
2097
- [t._deepestRenderedBoundaryId || e[0].id]: r
2098
- }
2099
- });
2100
- }
2101
- function Ot(e, t, r) {
2102
- if (r.v7_throwAbortReason && e.signal.reason !== void 0)
2103
- throw e.signal.reason;
2104
- let a = t ? "queryRoute" : "query";
2105
- throw new Error(a + "() call aborted: " + e.method + " " + e.url);
2106
- }
2107
- function Da(e) {
2108
- return e != null && ("formData" in e && e.formData != null || "body" in e && e.body !== void 0);
2109
- }
2110
- function mt(e, t, r, a, n, s, l, f) {
2111
- let u, v;
2112
- if (l) {
2113
- u = [];
2114
- for (let p of t)
2115
- if (u.push(p), p.route.id === l) {
2116
- v = p;
2117
- break;
2118
- }
2119
- } else
2120
- u = t, v = t[t.length - 1];
2121
- let b = rr(n || ".", tr(u, s), Ye(e.pathname, r) || e.pathname, f === "path");
2122
- return n == null && (b.search = e.search, b.hash = e.hash), (n == null || n === "" || n === ".") && v && v.route.index && !bt(b.search) && (b.search = b.search ? b.search.replace(/^\?/, "?index&") : "?index"), a && r !== "/" && (b.pathname = b.pathname === "/" ? r : Ne([r, b.pathname])), ue(b);
2123
- }
2124
- function It(e, t, r, a) {
2125
- if (!a || !Da(a))
2126
- return {
2127
- path: r
2128
- };
2129
- if (a.formMethod && !yt(a.formMethod))
2130
- return {
2131
- path: r,
2132
- error: Y(405, {
2133
- method: a.formMethod
2134
- })
2135
- };
2136
- let n = () => ({
2137
- path: r,
2138
- error: Y(400, {
2139
- type: "invalid-body"
2140
- })
2141
- }), s = a.formMethod || "get", l = e ? s.toUpperCase() : s.toLowerCase(), f = wr(r);
2142
- if (a.body !== void 0) {
2143
- if (a.formEncType === "text/plain") {
2144
- if (!oe(l))
2145
- return n();
2146
- let S = typeof a.body == "string" ? a.body : a.body instanceof FormData || a.body instanceof URLSearchParams ? (
2147
- // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
2148
- Array.from(a.body.entries()).reduce((m, y) => {
2149
- let [g, P] = y;
2150
- return "" + m + g + "=" + P + `
2151
- `;
2152
- }, "")
2153
- ) : String(a.body);
2154
- return {
2155
- path: r,
2156
- submission: {
2157
- formMethod: l,
2158
- formAction: f,
2159
- formEncType: a.formEncType,
2160
- formData: void 0,
2161
- json: void 0,
2162
- text: S
2163
- }
2164
- };
2165
- } else if (a.formEncType === "application/json") {
2166
- if (!oe(l))
2167
- return n();
2168
- try {
2169
- let S = typeof a.body == "string" ? JSON.parse(a.body) : a.body;
2170
- return {
2171
- path: r,
2172
- submission: {
2173
- formMethod: l,
2174
- formAction: f,
2175
- formEncType: a.formEncType,
2176
- formData: void 0,
2177
- json: S,
2178
- text: void 0
2179
- }
2180
- };
2181
- } catch {
2182
- return n();
2183
- }
2184
- }
2185
- }
2186
- O(typeof FormData == "function", "FormData is not available in this environment");
2187
- let u, v;
2188
- if (a.formData)
2189
- u = gt(a.formData), v = a.formData;
2190
- else if (a.body instanceof FormData)
2191
- u = gt(a.body), v = a.body;
2192
- else if (a.body instanceof URLSearchParams)
2193
- u = a.body, v = Wt(u);
2194
- else if (a.body == null)
2195
- u = new URLSearchParams(), v = new FormData();
2196
- else
2197
- try {
2198
- u = new URLSearchParams(a.body), v = Wt(u);
2199
- } catch {
2200
- return n();
2201
- }
2202
- let b = {
2203
- formMethod: l,
2204
- formAction: f,
2205
- formEncType: a && a.formEncType || "application/x-www-form-urlencoded",
2206
- formData: v,
2207
- json: void 0,
2208
- text: void 0
2209
- };
2210
- if (oe(b.formMethod))
2211
- return {
2212
- path: r,
2213
- submission: b
2214
- };
2215
- let p = ie(r);
2216
- return t && p.search && bt(p.search) && u.append("index", ""), p.search = "?" + u, {
2217
- path: ue(p),
2218
- submission: b
2219
- };
2220
- }
2221
- function fr(e, t) {
2222
- let r = e;
2223
- if (t) {
2224
- let a = e.findIndex((n) => n.route.id === t);
2225
- a >= 0 && (r = e.slice(0, a));
2226
- }
2227
- return r;
2228
- }
2229
- function Nt(e, t, r, a, n, s, l, f, u, v, b, p, S, m, y, g) {
2230
- let P = g ? ee(g[1]) ? g[1].error : g[1].data : void 0, A = e.createURL(t.location), x = e.createURL(n), _ = g && ee(g[1]) ? g[0] : void 0, R = _ ? fr(r, _) : r, N = g ? g[1].statusCode : void 0, c = l && N && N >= 400, C = R.filter((F, X) => {
2231
- let {
2232
- route: K
2233
- } = F;
2234
- if (K.lazy)
2235
- return !0;
2236
- if (K.loader == null)
2237
- return !1;
2238
- if (s)
2239
- return typeof K.loader != "function" || K.loader.hydrate ? !0 : t.loaderData[K.id] === void 0 && // Don't re-run if the loader ran and threw an error
2240
- (!t.errors || t.errors[K.id] === void 0);
2241
- if (Ea(t.loaderData, t.matches[X], F) || u.some((te) => te === F.route.id))
2242
- return !0;
2243
- let ne = t.matches[X], le = F;
2244
- return Ht(F, I({
2245
- currentUrl: A,
2246
- currentParams: ne.params,
2247
- nextUrl: x,
2248
- nextParams: le.params
2249
- }, a, {
2250
- actionResult: P,
2251
- unstable_actionStatus: N,
2252
- defaultShouldRevalidate: c ? !1 : (
2253
- // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
2254
- f || A.pathname + A.search === x.pathname + x.search || // Search params affect all loaders
2255
- A.search !== x.search || cr(ne, le)
2256
- )
2257
- }));
2258
- }), J = [];
2259
- return p.forEach((F, X) => {
2260
- if (s || !r.some((je) => je.route.id === F.routeId) || b.has(X))
2261
- return;
2262
- let K = me(m, F.path, y);
2263
- if (!K) {
2264
- J.push({
2265
- key: X,
2266
- routeId: F.routeId,
2267
- path: F.path,
2268
- matches: null,
2269
- match: null,
2270
- controller: null
2271
- });
2272
- return;
2273
- }
2274
- let ne = t.fetchers.get(X), le = Le(K, F.path), te = !1;
2275
- S.has(X) ? te = !1 : v.includes(X) ? te = !0 : ne && ne.state !== "idle" && ne.data === void 0 ? te = f : te = Ht(le, I({
2276
- currentUrl: A,
2277
- currentParams: t.matches[t.matches.length - 1].params,
2278
- nextUrl: x,
2279
- nextParams: r[r.length - 1].params
2280
- }, a, {
2281
- actionResult: P,
2282
- unstable_actionStatus: N,
2283
- defaultShouldRevalidate: c ? !1 : f
2284
- })), te && J.push({
2285
- key: X,
2286
- routeId: F.routeId,
2287
- path: F.path,
2288
- matches: K,
2289
- match: le,
2290
- controller: new AbortController()
2291
- });
2292
- }), [C, J];
2293
- }
2294
- function Ea(e, t, r) {
2295
- let a = (
2296
- // [a] -> [a, b]
2297
- !t || // [a, b] -> [a, c]
2298
- r.route.id !== t.route.id
2299
- ), n = e[r.route.id] === void 0;
2300
- return a || n;
2301
- }
2302
- function cr(e, t) {
2303
- let r = e.route.path;
2304
- return (
2305
- // param change for this match, /users/123 -> /users/456
2306
- e.pathname !== t.pathname || // splat param changed, which is not present in match.path
2307
- // e.g. /files/images/avatar.jpg -> files/finances.xls
2308
- r != null && r.endsWith("*") && e.params["*"] !== t.params["*"]
2309
- );
2310
- }
2311
- function Ht(e, t) {
2312
- if (e.route.shouldRevalidate) {
2313
- let r = e.route.shouldRevalidate(t);
2314
- if (typeof r == "boolean")
2315
- return r;
2316
- }
2317
- return t.defaultShouldRevalidate;
2318
- }
2319
- async function Pa(e, t, r, a, n, s, l, f) {
2320
- let u = [t, ...r.map((v) => v.route.id)].join("-");
2321
- try {
2322
- let v = l.get(u);
2323
- v || (v = e({
2324
- path: t,
2325
- matches: r,
2326
- patch: (b, p) => {
2327
- f.aborted || hr(b, p, a, n, s);
2328
- }
2329
- }), l.set(u, v)), v && Ma(v) && await v;
2330
- } finally {
2331
- l.delete(u);
2332
- }
2333
- }
2334
- function hr(e, t, r, a, n) {
2335
- if (e) {
2336
- var s;
2337
- let l = a[e];
2338
- O(l, "No route found to patch children into: routeId = " + e);
2339
- let f = Me(t, n, [e, "patch", String(((s = l.children) == null ? void 0 : s.length) || "0")], a);
2340
- l.children ? l.children.push(...f) : l.children = f;
2341
- } else {
2342
- let l = Me(t, n, ["patch", String(r.length || "0")], a);
2343
- r.push(...l);
2344
- }
2345
- }
2346
- async function zt(e, t, r) {
2347
- if (!e.lazy)
2348
- return;
2349
- let a = await e.lazy();
2350
- if (!e.lazy)
2351
- return;
2352
- let n = r[e.id];
2353
- O(n, "No route found in manifest");
2354
- let s = {};
2355
- for (let l in a) {
2356
- let u = n[l] !== void 0 && // This property isn't static since it should always be updated based
2357
- // on the route updates
2358
- l !== "hasErrorBoundary";
2359
- de(!u, 'Route "' + n.id + '" has a static property "' + l + '" defined but its lazy function is also returning a value for this property. ' + ('The lazy route property "' + l + '" will be ignored.')), !u && !kr.has(l) && (s[l] = a[l]);
2360
- }
2361
- Object.assign(n, s), Object.assign(n, I({}, t(n), {
2362
- lazy: void 0
2363
- }));
2364
- }
2365
- function pr(e) {
2366
- return Promise.all(e.matches.map((t) => t.resolve()));
2367
- }
2368
- async function mr(e, t, r, a, n, s, l, f) {
2369
- let u = a.reduce((p, S) => p.add(S.route.id), /* @__PURE__ */ new Set()), v = /* @__PURE__ */ new Set(), b = await e({
2370
- matches: n.map((p) => {
2371
- let S = u.has(p.route.id);
2372
- return I({}, p, {
2373
- shouldLoad: S,
2374
- resolve: (y) => (v.add(p.route.id), S ? xa(t, r, p, s, l, y, f) : Promise.resolve({
2375
- type: z.data,
2376
- result: void 0
2377
- }))
2378
- });
2379
- }),
2380
- request: r,
2381
- params: n[0].params,
2382
- context: f
2383
- });
2384
- return n.forEach((p) => O(v.has(p.route.id), '`match.resolve()` was not called for route id "' + p.route.id + '". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')), b.filter((p, S) => u.has(n[S].route.id));
2385
- }
2386
- async function xa(e, t, r, a, n, s, l) {
2387
- let f, u, v = (b) => {
2388
- let p, S = new Promise((g, P) => p = P);
2389
- u = () => p(), t.signal.addEventListener("abort", u);
2390
- let m = (g) => typeof b != "function" ? Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ('"' + e + '" [routeId: ' + r.route.id + "]"))) : b({
2391
- request: t,
2392
- params: r.params,
2393
- context: l
2394
- }, ...g !== void 0 ? [g] : []), y;
2395
- return s ? y = s((g) => m(g)) : y = (async () => {
2396
- try {
2397
- return {
2398
- type: "data",
2399
- result: await m()
2400
- };
2401
- } catch (g) {
2402
- return {
2403
- type: "error",
2404
- result: g
2405
- };
2406
- }
2407
- })(), Promise.race([y, S]);
2408
- };
2409
- try {
2410
- let b = r.route[e];
2411
- if (r.route.lazy)
2412
- if (b) {
2413
- let p, [S] = await Promise.all([
2414
- // If the handler throws, don't let it immediately bubble out,
2415
- // since we need to let the lazy() execution finish so we know if this
2416
- // route has a boundary that can handle the error
2417
- v(b).catch((m) => {
2418
- p = m;
2419
- }),
2420
- zt(r.route, n, a)
2421
- ]);
2422
- if (p !== void 0)
2423
- throw p;
2424
- f = S;
2425
- } else if (await zt(r.route, n, a), b = r.route[e], b)
2426
- f = await v(b);
2427
- else if (e === "action") {
2428
- let p = new URL(t.url), S = p.pathname + p.search;
2429
- throw Y(405, {
2430
- method: t.method,
2431
- pathname: S,
2432
- routeId: r.route.id
2433
- });
2434
- } else
2435
- return {
2436
- type: z.data,
2437
- result: void 0
2438
- };
2439
- else if (b)
2440
- f = await v(b);
2441
- else {
2442
- let p = new URL(t.url), S = p.pathname + p.search;
2443
- throw Y(404, {
2444
- pathname: S
2445
- });
2446
- }
2447
- O(f.result !== void 0, "You defined " + (e === "action" ? "an action" : "a loader") + " for route " + ('"' + r.route.id + "\" but didn't return anything from your `" + e + "` ") + "function. Please return a value or `null`.");
2448
- } catch (b) {
2449
- return {
2450
- type: z.error,
2451
- result: b
2452
- };
2453
- } finally {
2454
- u && t.signal.removeEventListener("abort", u);
2455
- }
2456
- return f;
2457
- }
2458
- async function gr(e) {
2459
- let {
2460
- result: t,
2461
- type: r,
2462
- status: a
2463
- } = e;
2464
- if (Se(t)) {
2465
- let l;
2466
- try {
2467
- let f = t.headers.get("Content-Type");
2468
- f && /\bapplication\/json\b/.test(f) ? t.body == null ? l = null : l = await t.json() : l = await t.text();
2469
- } catch (f) {
2470
- return {
2471
- type: z.error,
2472
- error: f
2473
- };
2474
- }
2475
- return r === z.error ? {
2476
- type: z.error,
2477
- error: new vt(t.status, t.statusText, l),
2478
- statusCode: t.status,
2479
- headers: t.headers
2480
- } : {
2481
- type: z.data,
2482
- data: l,
2483
- statusCode: t.status,
2484
- headers: t.headers
2485
- };
2486
- }
2487
- if (r === z.error)
2488
- return {
2489
- type: z.error,
2490
- error: t,
2491
- statusCode: ze(t) ? t.status : a
2492
- };
2493
- if (Sr(t)) {
2494
- var n, s;
2495
- return {
2496
- type: z.deferred,
2497
- deferredData: t,
2498
- statusCode: (n = t.init) == null ? void 0 : n.status,
2499
- headers: ((s = t.init) == null ? void 0 : s.headers) && new Headers(t.init.headers)
2500
- };
2501
- }
2502
- return {
2503
- type: z.data,
2504
- data: t,
2505
- statusCode: a
2506
- };
2507
- }
2508
- function yr(e, t, r, a, n, s) {
2509
- let l = e.headers.get("Location");
2510
- if (O(l, "Redirects returned/thrown from loaders/actions must have a Location header"), !wt.test(l)) {
2511
- let f = a.slice(0, a.findIndex((u) => u.route.id === r) + 1);
2512
- l = mt(new URL(t.url), f, n, !0, l, s), e.headers.set("Location", l);
2513
- }
2514
- return e;
2515
- }
2516
- function Bt(e, t, r) {
2517
- if (wt.test(e)) {
2518
- let a = e, n = a.startsWith("//") ? new URL(t.protocol + a) : new URL(a), s = Ye(n.pathname, r) != null;
2519
- if (n.origin === t.origin && s)
2520
- return n.pathname + n.search + n.hash;
2521
- }
2522
- return e;
2523
- }
2524
- function Oe(e, t, r, a) {
2525
- let n = e.createURL(wr(t)).toString(), s = {
2526
- signal: r
2527
- };
2528
- if (a && oe(a.formMethod)) {
2529
- let {
2530
- formMethod: l,
2531
- formEncType: f
2532
- } = a;
2533
- s.method = l.toUpperCase(), f === "application/json" ? (s.headers = new Headers({
2534
- "Content-Type": f
2535
- }), s.body = JSON.stringify(a.json)) : f === "text/plain" ? s.body = a.text : f === "application/x-www-form-urlencoded" && a.formData ? s.body = gt(a.formData) : s.body = a.formData;
2536
- }
2537
- return new Request(n, s);
2538
- }
2539
- function gt(e) {
2540
- let t = new URLSearchParams();
2541
- for (let [r, a] of e.entries())
2542
- t.append(r, typeof a == "string" ? a : a.name);
2543
- return t;
2544
- }
2545
- function Wt(e) {
2546
- let t = new FormData();
2547
- for (let [r, a] of e.entries())
2548
- t.append(r, a);
2549
- return t;
2550
- }
2551
- function vr(e, t, r, a, n, s) {
2552
- let l = {}, f = null, u, v = !1, b = {}, p = a && ee(a[1]) ? a[1].error : void 0;
2553
- return r.forEach((S, m) => {
2554
- let y = t[m].route.id;
2555
- if (O(!De(S), "Cannot handle redirect results in processLoaderData"), ee(S)) {
2556
- let g = S.error;
2557
- if (p !== void 0 && (g = p, p = void 0), f = f || {}, s)
2558
- f[y] = g;
2559
- else {
2560
- let P = He(e, y);
2561
- f[P.route.id] == null && (f[P.route.id] = g);
2562
- }
2563
- l[y] = void 0, v || (v = !0, u = ze(S.error) ? S.error.status : 500), S.headers && (b[y] = S.headers);
2564
- } else
2565
- Re(S) ? (n.set(y, S.deferredData), l[y] = S.deferredData.data, S.statusCode != null && S.statusCode !== 200 && !v && (u = S.statusCode), S.headers && (b[y] = S.headers)) : (l[y] = S.data, S.statusCode && S.statusCode !== 200 && !v && (u = S.statusCode), S.headers && (b[y] = S.headers));
2566
- }), p !== void 0 && a && (f = {
2567
- [a[0]]: p
2568
- }, l[a[0]] = void 0), {
2569
- loaderData: l,
2570
- errors: f,
2571
- statusCode: u || 200,
2572
- loaderHeaders: b
2573
- };
2574
- }
2575
- function Kt(e, t, r, a, n, s, l, f) {
2576
- let {
2577
- loaderData: u,
2578
- errors: v
2579
- } = vr(
2580
- t,
2581
- r,
2582
- a,
2583
- n,
2584
- f,
2585
- !1
2586
- // This method is only called client side so we always want to bubble
2587
- );
2588
- for (let b = 0; b < s.length; b++) {
2589
- let {
2590
- key: p,
2591
- match: S,
2592
- controller: m
2593
- } = s[b];
2594
- O(l !== void 0 && l[b] !== void 0, "Did not find corresponding fetcher result");
2595
- let y = l[b];
2596
- if (!(m && m.signal.aborted))
2597
- if (ee(y)) {
2598
- let g = He(e.matches, S == null ? void 0 : S.route.id);
2599
- v && v[g.route.id] || (v = I({}, v, {
2600
- [g.route.id]: y.error
2601
- })), e.fetchers.delete(p);
2602
- } else if (De(y))
2603
- O(!1, "Unhandled fetcher revalidation redirect");
2604
- else if (Re(y))
2605
- O(!1, "Unhandled fetcher deferred data");
2606
- else {
2607
- let g = be(y.data);
2608
- e.fetchers.set(p, g);
2609
- }
2610
- }
2611
- return {
2612
- loaderData: u,
2613
- errors: v
2614
- };
2615
- }
2616
- function $t(e, t, r, a) {
2617
- let n = I({}, t);
2618
- for (let s of r) {
2619
- let l = s.route.id;
2620
- if (t.hasOwnProperty(l) ? t[l] !== void 0 && (n[l] = t[l]) : e[l] !== void 0 && s.route.loader && (n[l] = e[l]), a && a.hasOwnProperty(l))
2621
- break;
2622
- }
2623
- return n;
2624
- }
2625
- function kt(e) {
2626
- return e ? ee(e[1]) ? {
2627
- // Clear out prior actionData on errors
2628
- actionData: {}
2629
- } : {
2630
- actionData: {
2631
- [e[0]]: e[1].data
2632
- }
2633
- } : {};
2634
- }
2635
- function He(e, t) {
2636
- return (t ? e.slice(0, e.findIndex((a) => a.route.id === t) + 1) : [...e]).reverse().find((a) => a.route.hasErrorBoundary === !0) || e[0];
2637
- }
2638
- function ot(e) {
2639
- let t = e.length === 1 ? e[0] : e.find((r) => r.index || !r.path || r.path === "/") || {
2640
- id: "__shim-error-route__"
2641
- };
2642
- return {
2643
- matches: [{
2644
- params: {},
2645
- pathname: "",
2646
- pathnameBase: "",
2647
- route: t
2648
- }],
2649
- route: t
2650
- };
2651
- }
2652
- function Y(e, t) {
2653
- let {
2654
- pathname: r,
2655
- routeId: a,
2656
- method: n,
2657
- type: s,
2658
- message: l
2659
- } = t === void 0 ? {} : t, f = "Unknown Server Error", u = "Unknown @remix-run/router error";
2660
- return e === 400 ? (f = "Bad Request", s === "route-discovery" ? u = 'Unable to match URL "' + r + '" - the `children()` function for ' + ("route `" + a + "` threw the following error:\n" + l) : n && r && a ? u = "You made a " + n + ' request to "' + r + '" but ' + ('did not provide a `loader` for route "' + a + '", ') + "so there is no way to handle the request." : s === "defer-action" ? u = "defer() is not supported in actions" : s === "invalid-body" && (u = "Unable to encode submission body")) : e === 403 ? (f = "Forbidden", u = 'Route "' + a + '" does not match URL "' + r + '"') : e === 404 ? (f = "Not Found", u = 'No route matches URL "' + r + '"') : e === 405 && (f = "Method Not Allowed", n && r && a ? u = "You made a " + n.toUpperCase() + ' request to "' + r + '" but ' + ('did not provide an `action` for route "' + a + '", ') + "so there is no way to handle the request." : n && (u = 'Invalid request method "' + n.toUpperCase() + '"')), new vt(e || 500, f, new Error(u), !0);
2661
- }
2662
- function Vt(e) {
2663
- for (let t = e.length - 1; t >= 0; t--) {
2664
- let r = e[t];
2665
- if (De(r))
2666
- return {
2667
- result: r,
2668
- idx: t
2669
- };
2670
- }
2671
- }
2672
- function wr(e) {
2673
- let t = typeof e == "string" ? ie(e) : e;
2674
- return ue(I({}, t, {
2675
- hash: ""
2676
- }));
2677
- }
2678
- function La(e, t) {
2679
- return e.pathname !== t.pathname || e.search !== t.search ? !1 : e.hash === "" ? t.hash !== "" : e.hash === t.hash ? !0 : t.hash !== "";
2680
- }
2681
- function Ma(e) {
2682
- return typeof e == "object" && e != null && "then" in e;
2683
- }
2684
- function ja(e) {
2685
- return e != null && typeof e == "object" && "type" in e && "result" in e && (e.type === z.data || e.type === z.error);
2686
- }
2687
- function br(e) {
2688
- return Se(e.result) && va.has(e.result.status);
2689
- }
2690
- function Re(e) {
2691
- return e.type === z.deferred;
2692
- }
2693
- function ee(e) {
2694
- return e.type === z.error;
2695
- }
2696
- function De(e) {
2697
- return (e && e.type) === z.redirect;
2698
- }
2699
- function Sr(e) {
2700
- let t = e;
2701
- return t && typeof t == "object" && typeof t.data == "object" && typeof t.subscribe == "function" && typeof t.cancel == "function" && typeof t.resolveData == "function";
2702
- }
2703
- function Se(e) {
2704
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.headers == "object" && typeof e.body < "u";
2705
- }
2706
- function Ca(e) {
2707
- if (!Se(e))
2708
- return !1;
2709
- let t = e.status, r = e.headers.get("Location");
2710
- return t >= 300 && t <= 399 && r != null;
2711
- }
2712
- function yt(e) {
2713
- return ya.has(e.toLowerCase());
2714
- }
2715
- function oe(e) {
2716
- return ma.has(e.toLowerCase());
2717
- }
2718
- async function Yt(e, t, r, a, n, s) {
2719
- for (let l = 0; l < r.length; l++) {
2720
- let f = r[l], u = t[l];
2721
- if (!u)
2722
- continue;
2723
- let v = e.find((p) => p.route.id === u.route.id), b = v != null && !cr(v, u) && (s && s[u.route.id]) !== void 0;
2724
- if (Re(f) && (n || b)) {
2725
- let p = a[l];
2726
- O(p, "Expected an AbortSignal for revalidating fetcher deferred result"), await Rr(f, p, n).then((S) => {
2727
- S && (r[l] = S || r[l]);
2728
- });
2729
- }
2730
- }
2731
- }
2732
- async function Rr(e, t, r) {
2733
- if (r === void 0 && (r = !1), !await e.deferredData.resolveData(t)) {
2734
- if (r)
2735
- try {
2736
- return {
2737
- type: z.data,
2738
- data: e.deferredData.unwrappedData
2739
- };
2740
- } catch (n) {
2741
- return {
2742
- type: z.error,
2743
- error: n
2744
- };
2745
- }
2746
- return {
2747
- type: z.data,
2748
- data: e.deferredData.data
2749
- };
2750
- }
2751
- }
2752
- function bt(e) {
2753
- return new URLSearchParams(e).getAll("index").some((t) => t === "");
2754
- }
2755
- function Le(e, t) {
2756
- let r = typeof t == "string" ? ie(t).search : t.search;
2757
- if (e[e.length - 1].route.index && bt(r || ""))
2758
- return e[e.length - 1];
2759
- let a = er(e);
2760
- return a[a.length - 1];
2761
- }
2762
- function Jt(e) {
2763
- let {
2764
- formMethod: t,
2765
- formAction: r,
2766
- formEncType: a,
2767
- text: n,
2768
- formData: s,
2769
- json: l
2770
- } = e;
2771
- if (!(!t || !r || !a)) {
2772
- if (n != null)
2773
- return {
2774
- formMethod: t,
2775
- formAction: r,
2776
- formEncType: a,
2777
- formData: void 0,
2778
- json: void 0,
2779
- text: n
2780
- };
2781
- if (s != null)
2782
- return {
2783
- formMethod: t,
2784
- formAction: r,
2785
- formEncType: a,
2786
- formData: s,
2787
- json: void 0,
2788
- text: void 0
2789
- };
2790
- if (l !== void 0)
2791
- return {
2792
- formMethod: t,
2793
- formAction: r,
2794
- formEncType: a,
2795
- formData: void 0,
2796
- json: l,
2797
- text: void 0
2798
- };
2799
- }
2800
- }
2801
- function ct(e, t) {
2802
- return t ? {
2803
- state: "loading",
2804
- location: e,
2805
- formMethod: t.formMethod,
2806
- formAction: t.formAction,
2807
- formEncType: t.formEncType,
2808
- formData: t.formData,
2809
- json: t.json,
2810
- text: t.text
2811
- } : {
2812
- state: "loading",
2813
- location: e,
2814
- formMethod: void 0,
2815
- formAction: void 0,
2816
- formEncType: void 0,
2817
- formData: void 0,
2818
- json: void 0,
2819
- text: void 0
2820
- };
2821
- }
2822
- function Ta(e, t) {
2823
- return {
2824
- state: "submitting",
2825
- location: e,
2826
- formMethod: t.formMethod,
2827
- formAction: t.formAction,
2828
- formEncType: t.formEncType,
2829
- formData: t.formData,
2830
- json: t.json,
2831
- text: t.text
2832
- };
2833
- }
2834
- function Ve(e, t) {
2835
- return e ? {
2836
- state: "loading",
2837
- formMethod: e.formMethod,
2838
- formAction: e.formAction,
2839
- formEncType: e.formEncType,
2840
- formData: e.formData,
2841
- json: e.json,
2842
- text: e.text,
2843
- data: t
2844
- } : {
2845
- state: "loading",
2846
- formMethod: void 0,
2847
- formAction: void 0,
2848
- formEncType: void 0,
2849
- formData: void 0,
2850
- json: void 0,
2851
- text: void 0,
2852
- data: t
2853
- };
2854
- }
2855
- function Fa(e, t) {
2856
- return {
2857
- state: "submitting",
2858
- formMethod: e.formMethod,
2859
- formAction: e.formAction,
2860
- formEncType: e.formEncType,
2861
- formData: e.formData,
2862
- json: e.json,
2863
- text: e.text,
2864
- data: t ? t.data : void 0
2865
- };
2866
- }
2867
- function be(e) {
2868
- return {
2869
- state: "idle",
2870
- formMethod: void 0,
2871
- formAction: void 0,
2872
- formEncType: void 0,
2873
- formData: void 0,
2874
- json: void 0,
2875
- text: void 0,
2876
- data: e
2877
- };
2878
- }
2879
- function _a(e, t) {
2880
- try {
2881
- let r = e.sessionStorage.getItem(dr);
2882
- if (r) {
2883
- let a = JSON.parse(r);
2884
- for (let [n, s] of Object.entries(a || {}))
2885
- s && Array.isArray(s) && t.set(n, new Set(s || []));
2886
- }
2887
- } catch {
2888
- }
2889
- }
2890
- function Ua(e, t) {
2891
- if (t.size > 0) {
2892
- let r = {};
2893
- for (let [a, n] of t)
2894
- r[a] = [...n];
2895
- try {
2896
- e.sessionStorage.setItem(dr, JSON.stringify(r));
2897
- } catch (a) {
2898
- de(!1, "Failed to save applied view transitions in sessionStorage (" + a + ").");
2899
- }
2900
- }
2901
- }
2902
- const Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2903
- __proto__: null,
2904
- AbortedDeferredError: pt,
2905
- get Action() {
2906
- return V;
2907
- },
2908
- IDLE_BLOCKER: Ie,
2909
- IDLE_FETCHER: lr,
2910
- IDLE_NAVIGATION: nt,
2911
- UNSAFE_DEFERRED_SYMBOL: ur,
2912
- UNSAFE_DeferredData: nr,
2913
- UNSAFE_ErrorResponseImpl: vt,
2914
- UNSAFE_convertRouteMatchToUiMatch: Xt,
2915
- UNSAFE_convertRoutesToDataRoutes: Me,
2916
- UNSAFE_getResolveToMatches: tr,
2917
- UNSAFE_invariant: O,
2918
- UNSAFE_warning: de,
2919
- createBrowserHistory: Wr,
2920
- createHashHistory: Kr,
2921
- createMemoryHistory: Br,
2922
- createPath: ue,
2923
- createRouter: ba,
2924
- createStaticHandler: Sa,
2925
- defer: ha,
2926
- generatePath: aa,
2927
- getStaticContextFromError: Ra,
2928
- getToPathname: la,
2929
- isDeferredData: Sr,
2930
- isRouteErrorResponse: ze,
2931
- joinPaths: Ne,
2932
- json: ua,
2933
- matchPath: ht,
2934
- matchRoutes: me,
2935
- normalizePathname: ar,
2936
- parsePath: ie,
2937
- redirect: or,
2938
- redirectDocument: pa,
2939
- resolvePath: qt,
2940
- resolveTo: rr,
2941
- stripBasename: Ye
2942
- }, Symbol.toStringTag, { value: "Module" }));
2943
- export {
2944
- V as A,
2945
- vt as E,
2946
- Ie as I,
2947
- O as a,
2948
- rr as b,
2949
- me as c,
2950
- Xt as d,
2951
- Br as e,
2952
- pt as f,
2953
- tr as g,
2954
- ba as h,
2955
- ze as i,
2956
- Ne as j,
2957
- ue as k,
2958
- ha as l,
2959
- ht as m,
2960
- aa as n,
2961
- ua as o,
2962
- ie as p,
2963
- or as q,
2964
- Aa as r,
2965
- Ye as s,
2966
- pa as t,
2967
- qt as u,
2968
- Wr as v,
2969
- de as w,
2970
- Kr as x,
2971
- lr as y
2972
- };
2973
- //# sourceMappingURL=router-CBw2vqJE.js.map