zudoku 0.3.0-dev.30 → 0.3.0-dev.32

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