@konstructio/ui 0.1.0-alpha.9 → 0.1.1-alpha.2

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 (167) hide show
  1. package/dist/DatePicker.css +1 -1
  2. package/dist/{Modal-CrG0m703.js → Modal-0oht63vU.js} +32 -32
  3. package/dist/assets/icons/components/Search.js +26 -0
  4. package/dist/assets/icons/components/Warning.js +22 -0
  5. package/dist/assets/icons/components/index.js +6 -0
  6. package/dist/{chevron-down-UW8ts6wI.js → chevron-down-CVce9Mvh.js} +2 -2
  7. package/dist/components/Alert/Alert.js +23 -25
  8. package/dist/components/Alert/Alert.variants.js +1 -1
  9. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  10. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  11. package/dist/components/AlertDialog/components/index.js +1 -1
  12. package/dist/components/AlertDialog/hooks/useAlertDialog.js +7 -7
  13. package/dist/components/Autocomplete/Autocomplete.variants.js +3 -4
  14. package/dist/components/Autocomplete/components/List/List.variants.js +3 -7
  15. package/dist/components/Autocomplete/hooks/useAutocomplete.js +38 -43
  16. package/dist/components/Autocomplete/hooks/useNavigationList.js +29 -37
  17. package/dist/components/Badge/Badge.js +40 -42
  18. package/dist/components/Badge/Badge.variants.js +1 -1
  19. package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -1
  20. package/dist/components/Breadcrumb/components/Item/Item.js +22 -21
  21. package/dist/components/Breadcrumb/components/Item/Item.variants.js +1 -1
  22. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  23. package/dist/components/Button/Button.js +15 -15
  24. package/dist/components/Button/Button.variants.js +10 -77
  25. package/dist/components/Card/Card.variants.js +3 -5
  26. package/dist/components/Checkbox/Checkbox.js +48 -47
  27. package/dist/components/Checkbox/Checkbox.variants.js +3 -4
  28. package/dist/components/Command/Command.js +2 -2
  29. package/dist/components/Command/Command.variants.js +1 -1
  30. package/dist/components/Command/components/Command.js +1 -1
  31. package/dist/components/Command/components/CommandEmpty.js +1 -1
  32. package/dist/components/Command/components/CommandGroup.js +1 -1
  33. package/dist/components/Command/components/CommandInput.js +1 -1
  34. package/dist/components/Command/components/CommandItem.js +13 -13
  35. package/dist/components/Command/components/CommandList.js +1 -1
  36. package/dist/components/Command/components/CommandSeparator.js +1 -1
  37. package/dist/components/Command/components/DialogContent.js +1 -1
  38. package/dist/components/Command/components/DialogOverlay.js +1 -1
  39. package/dist/components/Datepicker/DatePicker.js +1496 -1577
  40. package/dist/components/Datepicker/DatePicker.variants.js +1 -1
  41. package/dist/components/Divider/Divider.variants.js +1 -1
  42. package/dist/components/Dropdown/Dropdown.js +28 -6
  43. package/dist/components/Dropdown/Dropdown.variants.js +43 -26
  44. package/dist/components/Dropdown/components/List/List.variants.js +1 -1
  45. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +5 -5
  46. package/dist/components/Dropdown/components/Wrapper.js +96 -86
  47. package/dist/components/Dropdown/contexts/dropdown.provider.js +12 -12
  48. package/dist/components/Dropdown/hooks/useDropdown.js +26 -30
  49. package/dist/components/Dropdown/hooks/useNavigationList.js +25 -31
  50. package/dist/components/DropdownButton/DropdownButton.js +135 -0
  51. package/dist/components/Filter/Filter.variants.js +1 -1
  52. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +47 -49
  53. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  54. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +41 -42
  55. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +30 -30
  56. package/dist/components/Filter/components/ResetButton/ResetButton.js +22 -16
  57. package/dist/components/Input/Input.js +116 -109
  58. package/dist/components/Input/Input.variants.js +18 -5
  59. package/dist/components/Loading/Loading.js +2 -2
  60. package/dist/components/Loading/Loading.variants.js +1 -2
  61. package/dist/components/Modal/Modal.js +2 -2
  62. package/dist/components/Modal/components/Body/Body.js +1 -1
  63. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  64. package/dist/components/Modal/components/Header/Header.js +1 -1
  65. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  66. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +7 -9
  67. package/dist/components/Modal/components/index.js +1 -1
  68. package/dist/components/Modal/hooks/useModal.js +16 -17
  69. package/dist/components/NumberInput/NumberInput.js +91 -91
  70. package/dist/components/NumberInput/NumberInput.variants.js +1 -1
  71. package/dist/components/PieChart/PieChart.js +5138 -0
  72. package/dist/components/ProgressBar/ProgressBar.js +58 -26
  73. package/dist/components/ProgressBar/ProgressBar.variants.js +1 -1
  74. package/dist/components/Radio/Radio.js +64 -48
  75. package/dist/components/Radio/Radio.variants.js +3 -3
  76. package/dist/components/RadioCard/RadioCard.js +26 -23
  77. package/dist/components/RadioCard/RadioCard.variants.js +1 -1
  78. package/dist/components/RadioCardGroup/RadioCardGroup.js +28 -28
  79. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +1 -1
  80. package/dist/components/RadioGroup/RadioGroup.js +37 -37
  81. package/dist/components/RadioGroup/RadioGroup.variants.js +1 -1
  82. package/dist/components/Range/Range.js +1 -1
  83. package/dist/components/Range/Range.variants.js +2 -3
  84. package/dist/components/Sidebar/Sidebar.js +4 -3
  85. package/dist/components/Sidebar/Sidebar.variants.js +1 -1
  86. package/dist/components/Sidebar/components/Footer/Footer.js +5 -4
  87. package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -1
  88. package/dist/components/Sidebar/components/Logo/Logo.js +6 -5
  89. package/dist/components/Sidebar/components/Logo/Logo.variants.js +1 -1
  90. package/dist/components/Sidebar/components/Navigation/Navigation.js +5 -4
  91. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +1 -1
  92. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +14 -13
  93. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +1 -1
  94. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +13 -12
  95. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +1 -1
  96. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +5 -6
  97. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +1 -1
  98. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -8
  99. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +1 -1
  100. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +15 -14
  101. package/dist/components/Slider/Slider.js +1 -1
  102. package/dist/components/Slider/Slider.variants.js +2 -8
  103. package/dist/components/Switch/Switch.js +54 -54
  104. package/dist/components/Switch/Switch.variants.js +2 -3
  105. package/dist/components/Table/Table.variants.js +1 -1
  106. package/dist/components/Tabs/Tabs.js +20 -16
  107. package/dist/components/Tabs/Tabs.variants.js +3 -5
  108. package/dist/components/Tabs/components/Content.js +10 -13
  109. package/dist/components/Tabs/components/List.js +9 -8
  110. package/dist/components/Tabs/components/Trigger.js +12 -16
  111. package/dist/components/Tabs/components/index.js +8 -0
  112. package/dist/components/Tag/Tag.js +1 -1
  113. package/dist/components/Tag/Tag.variants.js +1 -1
  114. package/dist/components/TagSelect/TagSelect.variants.js +1 -1
  115. package/dist/components/TagSelect/components/Item/Item.variants.js +1 -1
  116. package/dist/components/TagSelect/components/List/List.variants.js +1 -1
  117. package/dist/components/TagSelect/hooks/useTagSelect.js +14 -16
  118. package/dist/components/TextArea/TextArea.variants.js +4 -5
  119. package/dist/components/TimePicker/TimePicker.variants.js +6 -7
  120. package/dist/components/TimePicker/components/HoursList/HoursList.js +21 -26
  121. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +19 -20
  122. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +24 -25
  123. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +33 -34
  124. package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +1 -1
  125. package/dist/components/Toast/Toast.js +223 -232
  126. package/dist/components/Toast/Toast.variants.js +8 -11
  127. package/dist/components/Tooltip/Tooltip.js +1 -1
  128. package/dist/components/Tooltip/Tooltip.variants.js +7 -14
  129. package/dist/components/Tooltip/hooks/useTooltip.js +8 -9
  130. package/dist/components/Typography/Typography.js +26 -31
  131. package/dist/components/Typography/Typography.variants.js +1 -1
  132. package/dist/components/index.js +78 -66
  133. package/dist/contexts/theme.provider.js +28 -29
  134. package/dist/{createLucideIcon-ByJ0JZvK.js → createLucideIcon-BpsAkT97.js} +4 -4
  135. package/dist/index-0ioNhtNM.js +10 -0
  136. package/dist/{index-CvfCCTEO.js → index-BAraV3ai.js} +7 -7
  137. package/dist/index-BXuxPoz7.js +435 -0
  138. package/dist/index-BfXxHr_2.js +125 -0
  139. package/dist/index-C1g_chDT.js +70 -0
  140. package/dist/{index-BCGvACM9.js → index-C9T9HQaa.js} +1 -1
  141. package/dist/{index-Bc1LNrRD.js → index-CZnD2QxM.js} +1 -1
  142. package/dist/index-CrBonFvu.js +144 -0
  143. package/dist/{index-rUBNhTeF.js → index-Cvx4lqTq.js} +2 -2
  144. package/dist/{index-BNmRGtA6.js → index-D29mdTf5.js} +3 -3
  145. package/dist/{index-Dkt8F6CZ.js → index-D3xzCzcO.js} +12 -12
  146. package/dist/index-DB2XhXHn.js +431 -0
  147. package/dist/{index-B5MIi2tR.js → index-DQH6odE9.js} +2 -3
  148. package/dist/index-Oq5GlCHP.js +131 -0
  149. package/dist/{index-Cs8Lv8Wj.js → index-bwWKd82e.js} +1 -1
  150. package/dist/{index--EmNlyHx.js → index-iXyXtdgP.js} +1 -1
  151. package/dist/index.d.ts +157 -9
  152. package/dist/index.js +88 -76
  153. package/dist/package.json +41 -37
  154. package/dist/styles.css +1 -1
  155. package/dist/ui/civo-theme.css +261 -241
  156. package/dist/ui/kubefirst-theme.css +4 -4
  157. package/dist/ui/theme.css +0 -2
  158. package/dist/{useBreadcrumb-DMERrNkJ.js → useBreadcrumb-B8DnuqkR.js} +254 -261
  159. package/dist/utils/index.js +25 -26
  160. package/package.json +41 -37
  161. package/dist/index-BNU3RH-3.js +0 -133
  162. package/dist/index-BvCZBMfr.js +0 -432
  163. package/dist/index-Cq1I1cG9.js +0 -129
  164. package/dist/index-DLYwlPRZ.js +0 -440
  165. package/dist/index-DNRcvRTB.js +0 -145
  166. package/dist/index-Dm-ooN_M.js +0 -71
  167. package/dist/index-DwYXX2sM.js +0 -13
@@ -1,4 +1,4 @@
1
- import * as u from "react";
1
+ import * as i from "react";
2
2
  /**
3
3
  * react-router v7.6.0
4
4
  *
@@ -13,7 +13,7 @@ function C(e, t) {
13
13
  if (e === !1 || e === null || typeof e > "u")
14
14
  throw new Error(t);
15
15
  }
16
- function P(e, t) {
16
+ function b(e, t) {
17
17
  if (!e) {
18
18
  typeof console < "u" && console.warn(t);
19
19
  try {
@@ -49,11 +49,11 @@ function Ce(e, t, n, l) {
49
49
  let c = oe(e);
50
50
  Ee(c);
51
51
  let s = null;
52
- for (let o = 0; s == null && o < c.length; ++o) {
53
- let i = De(a);
52
+ for (let u = 0; s == null && u < c.length; ++u) {
53
+ let o = De(a);
54
54
  s = Ie(
55
- c[o],
56
- i,
55
+ c[u],
56
+ o,
57
57
  l
58
58
  );
59
59
  }
@@ -61,35 +61,34 @@ function Ce(e, t, n, l) {
61
61
  }
62
62
  function oe(e, t = [], n = [], l = "") {
63
63
  let r = (a, c, s) => {
64
- let o = {
64
+ let u = {
65
65
  relativePath: s === void 0 ? a.path || "" : s,
66
66
  caseSensitive: a.caseSensitive === !0,
67
67
  childrenIndex: c,
68
68
  route: a
69
69
  };
70
- o.relativePath.startsWith("/") && (C(
71
- o.relativePath.startsWith(l),
72
- `Absolute route path "${o.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
73
- ), o.relativePath = o.relativePath.slice(l.length));
74
- let i = b([l, o.relativePath]), f = n.concat(o);
70
+ u.relativePath.startsWith("/") && (C(
71
+ u.relativePath.startsWith(l),
72
+ `Absolute route path "${u.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
73
+ ), u.relativePath = u.relativePath.slice(l.length));
74
+ let o = R([l, u.relativePath]), f = n.concat(u);
75
75
  a.children && a.children.length > 0 && (C(
76
76
  // Our types know better, but runtime JS may not!
77
77
  // @ts-expect-error
78
78
  a.index !== !0,
79
- `Index routes must not have child routes. Please remove all child routes from route path "${i}".`
80
- ), oe(a.children, t, f, i)), !(a.path == null && !a.index) && t.push({
81
- path: i,
82
- score: $e(i, a.index),
79
+ `Index routes must not have child routes. Please remove all child routes from route path "${o}".`
80
+ ), oe(a.children, t, f, o)), !(a.path == null && !a.index) && t.push({
81
+ path: o,
82
+ score: $e(o, a.index),
83
83
  routesMeta: f
84
84
  });
85
85
  };
86
86
  return e.forEach((a, c) => {
87
- var s;
88
- if (a.path === "" || !((s = a.path) != null && s.includes("?")))
87
+ if (a.path === "" || !a.path?.includes("?"))
89
88
  r(a, c);
90
89
  else
91
- for (let o of ie(a.path))
92
- r(a, c, o);
90
+ for (let s of ie(a.path))
91
+ r(a, c, s);
93
92
  }), t;
94
93
  }
95
94
  function ie(e) {
@@ -101,10 +100,10 @@ function ie(e) {
101
100
  let c = ie(l.join("/")), s = [];
102
101
  return s.push(
103
102
  ...c.map(
104
- (o) => o === "" ? a : [a, o].join("/")
103
+ (u) => u === "" ? a : [a, u].join("/")
105
104
  )
106
105
  ), r && s.push(...c), s.map(
107
- (o) => e.startsWith("/") && o === "" ? "/" : o
106
+ (u) => e.startsWith("/") && u === "" ? "/" : u
108
107
  );
109
108
  }
110
109
  function Ee(e) {
@@ -115,11 +114,11 @@ function Ee(e) {
115
114
  )
116
115
  );
117
116
  }
118
- var Re = /^:[\w-]+$/, be = 3, Pe = 2, Le = 1, ke = 10, Se = -2, ne = (e) => e === "*";
117
+ var Re = /^:[\w-]+$/, be = 3, Pe = 2, Le = 1, Se = 10, ke = -2, ne = (e) => e === "*";
119
118
  function $e(e, t) {
120
119
  let n = e.split("/"), l = n.length;
121
- return n.some(ne) && (l += Se), t && (l += Pe), n.filter((r) => !ne(r)).reduce(
122
- (r, a) => r + (Re.test(a) ? be : a === "" ? Le : ke),
120
+ return n.some(ne) && (l += ke), t && (l += Pe), n.filter((r) => !ne(r)).reduce(
121
+ (r, a) => r + (Re.test(a) ? be : a === "" ? Le : Se),
123
122
  l
124
123
  );
125
124
  }
@@ -139,14 +138,14 @@ function Fe(e, t) {
139
138
  function Ie(e, t, n = !1) {
140
139
  let { routesMeta: l } = e, r = {}, a = "/", c = [];
141
140
  for (let s = 0; s < l.length; ++s) {
142
- let o = l[s], i = s === l.length - 1, f = a === "/" ? t : t.slice(a.length) || "/", d = H(
143
- { path: o.relativePath, caseSensitive: o.caseSensitive, end: i },
141
+ let u = l[s], o = s === l.length - 1, f = a === "/" ? t : t.slice(a.length) || "/", d = H(
142
+ { path: u.relativePath, caseSensitive: u.caseSensitive, end: o },
144
143
  f
145
- ), h = o.route;
146
- if (!d && i && n && !l[l.length - 1].route.index && (d = H(
144
+ ), m = u.route;
145
+ if (!d && o && n && !l[l.length - 1].route.index && (d = H(
147
146
  {
148
- path: o.relativePath,
149
- caseSensitive: o.caseSensitive,
147
+ path: u.relativePath,
148
+ caseSensitive: u.caseSensitive,
150
149
  end: !1
151
150
  },
152
151
  f
@@ -155,12 +154,12 @@ function Ie(e, t, n = !1) {
155
154
  Object.assign(r, d.params), c.push({
156
155
  // TODO: Can this as be avoided?
157
156
  params: r,
158
- pathname: b([a, d.pathname]),
157
+ pathname: R([a, d.pathname]),
159
158
  pathnameBase: Be(
160
- b([a, d.pathnameBase])
159
+ R([a, d.pathnameBase])
161
160
  ),
162
- route: h
163
- }), d.pathnameBase !== "/" && (a = b([a, d.pathnameBase]));
161
+ route: m
162
+ }), d.pathnameBase !== "/" && (a = R([a, d.pathnameBase]));
164
163
  }
165
164
  return c;
166
165
  }
@@ -175,13 +174,13 @@ function H(e, t) {
175
174
  let a = r[0], c = a.replace(/(.)\/+$/, "$1"), s = r.slice(1);
176
175
  return {
177
176
  params: l.reduce(
178
- (i, { paramName: f, isOptional: d }, h) => {
177
+ (o, { paramName: f, isOptional: d }, m) => {
179
178
  if (f === "*") {
180
- let y = s[h] || "";
179
+ let y = s[m] || "";
181
180
  c = a.slice(0, a.length - y.length).replace(/(.)\/+$/, "$1");
182
181
  }
183
- const g = s[h];
184
- return d && !g ? i[f] = void 0 : i[f] = (g || "").replace(/%2F/g, "/"), i;
182
+ const g = s[m];
183
+ return d && !g ? o[f] = void 0 : o[f] = (g || "").replace(/%2F/g, "/"), o;
185
184
  },
186
185
  {}
187
186
  ),
@@ -191,13 +190,13 @@ function H(e, t) {
191
190
  };
192
191
  }
193
192
  function Ne(e, t = !1, n = !0) {
194
- P(
193
+ b(
195
194
  e === "*" || !e.endsWith("*") || e.endsWith("/*"),
196
195
  `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(/\*$/, "/*")}".`
197
196
  );
198
197
  let l = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
199
198
  /\/:([\w-]+)(\?)?/g,
200
- (c, s, o) => (l.push({ paramName: s, isOptional: o != null }), o ? "/?([^\\/]+)?" : "/([^\\/]+)")
199
+ (c, s, u) => (l.push({ paramName: s, isOptional: u != null }), u ? "/?([^\\/]+)?" : "/([^\\/]+)")
201
200
  );
202
201
  return e.endsWith("*") ? (l.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), l];
203
202
  }
@@ -205,7 +204,7 @@ function De(e) {
205
204
  try {
206
205
  return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
207
206
  } catch (t) {
208
- return P(
207
+ return b(
209
208
  !1,
210
209
  `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
211
210
  ), e;
@@ -270,17 +269,17 @@ function se(e, t, n, l = !1) {
270
269
  else {
271
270
  let d = t.length - 1;
272
271
  if (!l && c.startsWith("..")) {
273
- let h = c.split("/");
274
- for (; h[0] === ".."; )
275
- h.shift(), d -= 1;
276
- r.pathname = h.join("/");
272
+ let m = c.split("/");
273
+ for (; m[0] === ".."; )
274
+ m.shift(), d -= 1;
275
+ r.pathname = m.join("/");
277
276
  }
278
277
  s = d >= 0 ? t[d] : "/";
279
278
  }
280
- let o = Te(r, s), i = c && c !== "/" && c.endsWith("/"), f = (a || c === ".") && n.endsWith("/");
281
- return !o.pathname.endsWith("/") && (i || f) && (o.pathname += "/"), o;
279
+ let u = Te(r, s), o = c && c !== "/" && c.endsWith("/"), f = (a || c === ".") && n.endsWith("/");
280
+ return !u.pathname.endsWith("/") && (o || f) && (u.pathname += "/"), u;
282
281
  }
283
- var b = (e) => e.join("/").replace(/\/\/+/g, "/"), Be = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Oe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, We = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
282
+ var R = (e) => e.join("/").replace(/\/\/+/g, "/"), Be = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Oe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, We = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
284
283
  function Ue(e) {
285
284
  return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
286
285
  }
@@ -298,35 +297,35 @@ var He = [
298
297
  ...ce
299
298
  ];
300
299
  new Set(He);
301
- var N = u.createContext(null);
300
+ var N = i.createContext(null);
302
301
  N.displayName = "DataRouter";
303
- var _ = u.createContext(null);
302
+ var _ = i.createContext(null);
304
303
  _.displayName = "DataRouterState";
305
- var fe = u.createContext({
304
+ var fe = i.createContext({
306
305
  isTransitioning: !1
307
306
  });
308
307
  fe.displayName = "ViewTransition";
309
- var _e = u.createContext(
308
+ var _e = i.createContext(
310
309
  /* @__PURE__ */ new Map()
311
310
  );
312
311
  _e.displayName = "Fetchers";
313
- var Ve = u.createContext(null);
312
+ var Ve = i.createContext(null);
314
313
  Ve.displayName = "Await";
315
- var L = u.createContext(
314
+ var P = i.createContext(
316
315
  null
317
316
  );
318
- L.displayName = "Navigation";
319
- var q = u.createContext(
317
+ P.displayName = "Navigation";
318
+ var q = i.createContext(
320
319
  null
321
320
  );
322
321
  q.displayName = "Location";
323
- var k = u.createContext({
322
+ var L = i.createContext({
324
323
  outlet: null,
325
324
  matches: [],
326
325
  isDataRoute: !1
327
326
  });
328
- k.displayName = "Route";
329
- var G = u.createContext(null);
327
+ L.displayName = "Route";
328
+ var G = i.createContext(null);
330
329
  G.displayName = "RouteError";
331
330
  function ze(e, { relative: t } = {}) {
332
331
  C(
@@ -335,26 +334,26 @@ function ze(e, { relative: t } = {}) {
335
334
  // router loaded. We can help them understand how to avoid that.
336
335
  "useHref() may be used only in the context of a <Router> component."
337
336
  );
338
- let { basename: n, navigator: l } = u.useContext(L), { hash: r, pathname: a, search: c } = M(e, { relative: t }), s = a;
339
- return n !== "/" && (s = a === "/" ? n : b([n, a])), l.createHref({ pathname: s, search: c, hash: r });
337
+ let { basename: n, navigator: l } = i.useContext(P), { hash: r, pathname: a, search: c } = M(e, { relative: t }), s = a;
338
+ return n !== "/" && (s = a === "/" ? n : R([n, a])), l.createHref({ pathname: s, search: c, hash: r });
340
339
  }
341
340
  function V() {
342
- return u.useContext(q) != null;
341
+ return i.useContext(q) != null;
343
342
  }
344
- function $() {
343
+ function k() {
345
344
  return C(
346
345
  V(),
347
346
  // TODO: This error is probably because they somehow have 2 versions of the
348
347
  // router loaded. We can help them understand how to avoid that.
349
348
  "useLocation() may be used only in the context of a <Router> component."
350
- ), u.useContext(q).location;
349
+ ), i.useContext(q).location;
351
350
  }
352
351
  var de = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
353
352
  function he(e) {
354
- u.useContext(L).static || u.useLayoutEffect(e);
353
+ i.useContext(P).static || i.useLayoutEffect(e);
355
354
  }
356
355
  function je() {
357
- let { isDataRoute: e } = u.useContext(k);
356
+ let { isDataRoute: e } = i.useContext(L);
358
357
  return e ? at() : Je();
359
358
  }
360
359
  function Je() {
@@ -364,26 +363,26 @@ function Je() {
364
363
  // router loaded. We can help them understand how to avoid that.
365
364
  "useNavigate() may be used only in the context of a <Router> component."
366
365
  );
367
- let e = u.useContext(N), { basename: t, navigator: n } = u.useContext(L), { matches: l } = u.useContext(k), { pathname: r } = $(), a = JSON.stringify(ue(l)), c = u.useRef(!1);
366
+ let e = i.useContext(N), { basename: t, navigator: n } = i.useContext(P), { matches: l } = i.useContext(L), { pathname: r } = k(), a = JSON.stringify(ue(l)), c = i.useRef(!1);
368
367
  return he(() => {
369
368
  c.current = !0;
370
- }), u.useCallback(
371
- (o, i = {}) => {
372
- if (P(c.current, de), !c.current) return;
373
- if (typeof o == "number") {
374
- n.go(o);
369
+ }), i.useCallback(
370
+ (u, o = {}) => {
371
+ if (b(c.current, de), !c.current) return;
372
+ if (typeof u == "number") {
373
+ n.go(u);
375
374
  return;
376
375
  }
377
376
  let f = se(
378
- o,
377
+ u,
379
378
  JSON.parse(a),
380
379
  r,
381
- i.relative === "path"
380
+ o.relative === "path"
382
381
  );
383
- e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : b([t, f.pathname])), (i.replace ? n.replace : n.push)(
382
+ e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : R([t, f.pathname])), (o.replace ? n.replace : n.push)(
384
383
  f,
385
- i.state,
386
- i
384
+ o.state,
385
+ o
387
386
  );
388
387
  },
389
388
  [
@@ -395,10 +394,10 @@ function Je() {
395
394
  ]
396
395
  );
397
396
  }
398
- u.createContext(null);
397
+ i.createContext(null);
399
398
  function M(e, { relative: t } = {}) {
400
- let { matches: n } = u.useContext(k), { pathname: l } = $(), r = JSON.stringify(ue(n));
401
- return u.useMemo(
399
+ let { matches: n } = i.useContext(L), { pathname: l } = k(), r = JSON.stringify(ue(n));
400
+ return i.useMemo(
402
401
  () => se(
403
402
  e,
404
403
  JSON.parse(r),
@@ -415,41 +414,41 @@ function Ke(e, t, n, l) {
415
414
  // router loaded. We can help them understand how to avoid that.
416
415
  "useRoutes() may be used only in the context of a <Router> component."
417
416
  );
418
- let { navigator: r, static: a } = u.useContext(L), { matches: c } = u.useContext(k), s = c[c.length - 1], o = s ? s.params : {}, i = s ? s.pathname : "/", f = s ? s.pathnameBase : "/", d = s && s.route;
417
+ let { navigator: r, static: a } = i.useContext(P), { matches: c } = i.useContext(L), s = c[c.length - 1], u = s ? s.params : {}, o = s ? s.pathname : "/", f = s ? s.pathnameBase : "/", d = s && s.route;
419
418
  {
420
419
  let p = d && d.path || "";
421
420
  me(
422
- i,
421
+ o,
423
422
  !d || p.endsWith("*") || p.endsWith("*?"),
424
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${i}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
423
+ `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
425
424
 
426
425
  Please change the parent <Route path="${p}"> to <Route path="${p === "/" ? "*" : `${p}/*`}">.`
427
426
  );
428
427
  }
429
- let h = $(), g;
430
- g = h;
428
+ let m = k(), g;
429
+ g = m;
431
430
  let y = g.pathname || "/", w = y;
432
431
  if (f !== "/") {
433
432
  let p = f.replace(/^\//, "").split("/");
434
433
  w = "/" + y.replace(/^\//, "").split("/").slice(p.length).join("/");
435
434
  }
436
435
  let v = !a && n && n.matches && n.matches.length > 0 ? n.matches : le(e, { pathname: w });
437
- return P(
436
+ return b(
438
437
  d || v != null,
439
438
  `No routes matched location "${g.pathname}${g.search}${g.hash}" `
440
- ), P(
439
+ ), b(
441
440
  v == null || v[v.length - 1].route.element !== void 0 || v[v.length - 1].route.Component !== void 0 || v[v.length - 1].route.lazy !== void 0,
442
441
  `Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
443
442
  ), Qe(
444
443
  v && v.map(
445
444
  (p) => Object.assign({}, p, {
446
- params: Object.assign({}, o, p.params),
447
- pathname: b([
445
+ params: Object.assign({}, u, p.params),
446
+ pathname: R([
448
447
  f,
449
448
  // Re-encode pathnames that were decoded inside matchRoutes
450
449
  r.encodeLocation ? r.encodeLocation(p.pathname).pathname : p.pathname
451
450
  ]),
452
- pathnameBase: p.pathnameBase === "/" ? f : b([
451
+ pathnameBase: p.pathnameBase === "/" ? f : R([
453
452
  f,
454
453
  // Re-encode pathnames that were decoded inside matchRoutes
455
454
  r.encodeLocation ? r.encodeLocation(p.pathnameBase).pathname : p.pathnameBase
@@ -466,9 +465,9 @@ function Ye() {
466
465
  return console.error(
467
466
  "Error handled by React Router default ErrorBoundary:",
468
467
  e
469
- ), c = /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ u.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ u.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ u.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ u.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ u.createElement("pre", { style: r }, n) : null, c);
468
+ ), c = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ i.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ i.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ i.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ i.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ i.createElement("pre", { style: r }, n) : null, c);
470
469
  }
471
- var qe = /* @__PURE__ */ u.createElement(Ye, null), Ge = class extends u.Component {
470
+ var qe = /* @__PURE__ */ i.createElement(Ye, null), Ge = class extends i.Component {
472
471
  constructor(e) {
473
472
  super(e), this.state = {
474
473
  location: e.location,
@@ -498,7 +497,7 @@ var qe = /* @__PURE__ */ u.createElement(Ye, null), Ge = class extends u.Compone
498
497
  );
499
498
  }
500
499
  render() {
501
- return this.state.error !== void 0 ? /* @__PURE__ */ u.createElement(k.Provider, { value: this.props.routeContext }, /* @__PURE__ */ u.createElement(
500
+ return this.state.error !== void 0 ? /* @__PURE__ */ i.createElement(L.Provider, { value: this.props.routeContext }, /* @__PURE__ */ i.createElement(
502
501
  G.Provider,
503
502
  {
504
503
  value: this.state.error,
@@ -508,8 +507,8 @@ var qe = /* @__PURE__ */ u.createElement(Ye, null), Ge = class extends u.Compone
508
507
  }
509
508
  };
510
509
  function Xe({ routeContext: e, match: t, children: n }) {
511
- let l = u.useContext(N);
512
- return l && l.static && l.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (l.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ u.createElement(k.Provider, { value: e }, n);
510
+ let l = i.useContext(N);
511
+ return l && l.static && l.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (l.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ i.createElement(L.Provider, { value: e }, n);
513
512
  }
514
513
  function Qe(e, t = [], n = null, l = null) {
515
514
  if (e == null) {
@@ -522,56 +521,56 @@ function Qe(e, t = [], n = null, l = null) {
522
521
  else
523
522
  return null;
524
523
  }
525
- let r = e, a = n == null ? void 0 : n.errors;
524
+ let r = e, a = n?.errors;
526
525
  if (a != null) {
527
- let o = r.findIndex(
528
- (i) => i.route.id && (a == null ? void 0 : a[i.route.id]) !== void 0
526
+ let u = r.findIndex(
527
+ (o) => o.route.id && a?.[o.route.id] !== void 0
529
528
  );
530
529
  C(
531
- o >= 0,
530
+ u >= 0,
532
531
  `Could not find a matching route for errors on route IDs: ${Object.keys(
533
532
  a
534
533
  ).join(",")}`
535
534
  ), r = r.slice(
536
535
  0,
537
- Math.min(r.length, o + 1)
536
+ Math.min(r.length, u + 1)
538
537
  );
539
538
  }
540
539
  let c = !1, s = -1;
541
540
  if (n)
542
- for (let o = 0; o < r.length; o++) {
543
- let i = r[o];
544
- if ((i.route.HydrateFallback || i.route.hydrateFallbackElement) && (s = o), i.route.id) {
545
- let { loaderData: f, errors: d } = n, h = i.route.loader && !f.hasOwnProperty(i.route.id) && (!d || d[i.route.id] === void 0);
546
- if (i.route.lazy || h) {
541
+ for (let u = 0; u < r.length; u++) {
542
+ let o = r[u];
543
+ if ((o.route.HydrateFallback || o.route.hydrateFallbackElement) && (s = u), o.route.id) {
544
+ let { loaderData: f, errors: d } = n, m = o.route.loader && !f.hasOwnProperty(o.route.id) && (!d || d[o.route.id] === void 0);
545
+ if (o.route.lazy || m) {
547
546
  c = !0, s >= 0 ? r = r.slice(0, s + 1) : r = [r[0]];
548
547
  break;
549
548
  }
550
549
  }
551
550
  }
552
- return r.reduceRight((o, i, f) => {
553
- let d, h = !1, g = null, y = null;
554
- n && (d = a && i.route.id ? a[i.route.id] : void 0, g = i.route.errorElement || qe, c && (s < 0 && f === 0 ? (me(
551
+ return r.reduceRight((u, o, f) => {
552
+ let d, m = !1, g = null, y = null;
553
+ n && (d = a && o.route.id ? a[o.route.id] : void 0, g = o.route.errorElement || qe, c && (s < 0 && f === 0 ? (me(
555
554
  "route-fallback",
556
555
  !1,
557
556
  "No `HydrateFallback` element provided to render during initial hydration"
558
- ), h = !0, y = null) : s === f && (h = !0, y = i.route.hydrateFallbackElement || null)));
557
+ ), m = !0, y = null) : s === f && (m = !0, y = o.route.hydrateFallbackElement || null)));
559
558
  let w = t.concat(r.slice(0, f + 1)), v = () => {
560
- let m;
561
- return d ? m = g : h ? m = y : i.route.Component ? m = /* @__PURE__ */ u.createElement(i.route.Component, null) : i.route.element ? m = i.route.element : m = o, /* @__PURE__ */ u.createElement(
559
+ let h;
560
+ return d ? h = g : m ? h = y : o.route.Component ? h = /* @__PURE__ */ i.createElement(o.route.Component, null) : o.route.element ? h = o.route.element : h = u, /* @__PURE__ */ i.createElement(
562
561
  Xe,
563
562
  {
564
- match: i,
563
+ match: o,
565
564
  routeContext: {
566
- outlet: o,
565
+ outlet: u,
567
566
  matches: w,
568
567
  isDataRoute: n != null
569
568
  },
570
- children: m
569
+ children: h
571
570
  }
572
571
  );
573
572
  };
574
- return n && (i.route.ErrorBoundary || i.route.errorElement || f === 0) ? /* @__PURE__ */ u.createElement(
573
+ return n && (o.route.ErrorBoundary || o.route.errorElement || f === 0) ? /* @__PURE__ */ i.createElement(
575
574
  Ge,
576
575
  {
577
576
  location: n.location,
@@ -588,15 +587,15 @@ function X(e) {
588
587
  return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
589
588
  }
590
589
  function Ze(e) {
591
- let t = u.useContext(N);
590
+ let t = i.useContext(N);
592
591
  return C(t, X(e)), t;
593
592
  }
594
593
  function et(e) {
595
- let t = u.useContext(_);
594
+ let t = i.useContext(_);
596
595
  return C(t, X(e)), t;
597
596
  }
598
597
  function tt(e) {
599
- let t = u.useContext(k);
598
+ let t = i.useContext(L);
600
599
  return C(t, X(e)), t;
601
600
  }
602
601
  function Q(e) {
@@ -613,15 +612,14 @@ function nt() {
613
612
  );
614
613
  }
615
614
  function rt() {
616
- var l;
617
- let e = u.useContext(G), t = et(
615
+ let e = i.useContext(G), t = et(
618
616
  "useRouteError"
619
617
  /* UseRouteError */
620
618
  ), n = Q(
621
619
  "useRouteError"
622
620
  /* UseRouteError */
623
621
  );
624
- return e !== void 0 ? e : (l = t.errors) == null ? void 0 : l[n];
622
+ return e !== void 0 ? e : t.errors?.[n];
625
623
  }
626
624
  function at() {
627
625
  let { router: e } = Ze(
@@ -630,21 +628,21 @@ function at() {
630
628
  ), t = Q(
631
629
  "useNavigate"
632
630
  /* UseNavigateStable */
633
- ), n = u.useRef(!1);
631
+ ), n = i.useRef(!1);
634
632
  return he(() => {
635
633
  n.current = !0;
636
- }), u.useCallback(
634
+ }), i.useCallback(
637
635
  async (r, a = {}) => {
638
- P(n.current, de), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...a }));
636
+ b(n.current, de), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...a }));
639
637
  },
640
638
  [e, t]
641
639
  );
642
640
  }
643
641
  var re = {};
644
642
  function me(e, t, n) {
645
- !t && !re[e] && (re[e] = !0, P(!1, n));
643
+ !t && !re[e] && (re[e] = !0, b(!1, n));
646
644
  }
647
- u.memo(lt);
645
+ i.memo(lt);
648
646
  function lt({
649
647
  routes: e,
650
648
  future: t,
@@ -693,7 +691,7 @@ var dt = /* @__PURE__ */ new Set([
693
691
  "text/plain"
694
692
  ]);
695
693
  function J(e) {
696
- return e != null && !dt.has(e) ? (P(
694
+ return e != null && !dt.has(e) ? (b(
697
695
  !1,
698
696
  `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${U}"`
699
697
  ), null) : e;
@@ -709,13 +707,13 @@ function ht(e, t) {
709
707
  throw new Error(
710
708
  'Cannot submit a <button> or <input type="submit"> without a <form>'
711
709
  );
712
- let o = e.getAttribute("formaction") || s.getAttribute("action");
713
- if (l = o ? S(o, t) : null, n = e.getAttribute("formmethod") || s.getAttribute("method") || W, r = J(e.getAttribute("formenctype")) || J(s.getAttribute("enctype")) || U, a = new FormData(s, e), !ft()) {
714
- let { name: i, type: f, value: d } = e;
710
+ let u = e.getAttribute("formaction") || s.getAttribute("action");
711
+ if (l = u ? S(u, t) : null, n = e.getAttribute("formmethod") || s.getAttribute("method") || W, r = J(e.getAttribute("formenctype")) || J(s.getAttribute("enctype")) || U, a = new FormData(s, e), !ft()) {
712
+ let { name: o, type: f, value: d } = e;
715
713
  if (f === "image") {
716
- let h = i ? `${i}.` : "";
717
- a.append(`${h}x`, "0"), a.append(`${h}y`, "0");
718
- } else i && a.append(i, d);
714
+ let m = o ? `${o}.` : "";
715
+ a.append(`${m}x`, "0"), a.append(`${m}y`, "0");
716
+ } else o && a.append(o, d);
719
717
  }
720
718
  } else {
721
719
  if (z(e))
@@ -768,37 +766,33 @@ async function gt(e, t, n) {
768
766
  );
769
767
  }
770
768
  function ae(e, t, n, l, r, a) {
771
- let c = (o, i) => n[i] ? o.route.id !== n[i].route.id : !0, s = (o, i) => {
772
- var f;
773
- return (
774
- // param change, /users/123 -> /users/456
775
- n[i].pathname !== o.pathname || // splat param changed, which is not present in match.path
776
- // e.g. /files/images/avatar.jpg -> files/finances.xls
777
- ((f = n[i].route.path) == null ? void 0 : f.endsWith("*")) && n[i].params["*"] !== o.params["*"]
778
- );
779
- };
769
+ let c = (u, o) => n[o] ? u.route.id !== n[o].route.id : !0, s = (u, o) => (
770
+ // param change, /users/123 -> /users/456
771
+ n[o].pathname !== u.pathname || // splat param changed, which is not present in match.path
772
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
773
+ n[o].route.path?.endsWith("*") && n[o].params["*"] !== u.params["*"]
774
+ );
780
775
  return a === "assets" ? t.filter(
781
- (o, i) => c(o, i) || s(o, i)
782
- ) : a === "data" ? t.filter((o, i) => {
783
- var d;
784
- let f = l.routes[o.route.id];
776
+ (u, o) => c(u, o) || s(u, o)
777
+ ) : a === "data" ? t.filter((u, o) => {
778
+ let f = l.routes[u.route.id];
785
779
  if (!f || !f.hasLoader)
786
780
  return !1;
787
- if (c(o, i) || s(o, i))
781
+ if (c(u, o) || s(u, o))
788
782
  return !0;
789
- if (o.route.shouldRevalidate) {
790
- let h = o.route.shouldRevalidate({
783
+ if (u.route.shouldRevalidate) {
784
+ let d = u.route.shouldRevalidate({
791
785
  currentUrl: new URL(
792
786
  r.pathname + r.search + r.hash,
793
787
  window.origin
794
788
  ),
795
- currentParams: ((d = n[0]) == null ? void 0 : d.params) || {},
789
+ currentParams: n[0]?.params || {},
796
790
  nextUrl: new URL(e, window.origin),
797
- nextParams: o.params,
791
+ nextParams: u.params,
798
792
  defaultShouldRevalidate: !0
799
793
  });
800
- if (typeof h == "boolean")
801
- return h;
794
+ if (typeof d == "boolean")
795
+ return d;
802
796
  }
803
797
  return !0;
804
798
  }) : [];
@@ -840,42 +834,42 @@ function Ct(e, t) {
840
834
  return n.pathname === "/" ? n.pathname = "_root.data" : t && S(n.pathname, t) === "/" ? n.pathname = `${t.replace(/\/$/, "")}/_root.data` : n.pathname = `${n.pathname.replace(/\/$/, "")}.data`, n;
841
835
  }
842
836
  function pe() {
843
- let e = u.useContext(N);
837
+ let e = i.useContext(N);
844
838
  return Z(
845
839
  e,
846
840
  "You must render this element inside a <DataRouterContext.Provider> element"
847
841
  ), e;
848
842
  }
849
843
  function Et() {
850
- let e = u.useContext(_);
844
+ let e = i.useContext(_);
851
845
  return Z(
852
846
  e,
853
847
  "You must render this element inside a <DataRouterStateContext.Provider> element"
854
848
  ), e;
855
849
  }
856
- var ee = u.createContext(void 0);
850
+ var ee = i.createContext(void 0);
857
851
  ee.displayName = "FrameworkContext";
858
852
  function ge() {
859
- let e = u.useContext(ee);
853
+ let e = i.useContext(ee);
860
854
  return Z(
861
855
  e,
862
856
  "You must render this element inside a <HydratedRouter> element"
863
857
  ), e;
864
858
  }
865
859
  function Rt(e, t) {
866
- let n = u.useContext(ee), [l, r] = u.useState(!1), [a, c] = u.useState(!1), { onFocus: s, onBlur: o, onMouseEnter: i, onMouseLeave: f, onTouchStart: d } = t, h = u.useRef(null);
867
- u.useEffect(() => {
860
+ let n = i.useContext(ee), [l, r] = i.useState(!1), [a, c] = i.useState(!1), { onFocus: s, onBlur: u, onMouseEnter: o, onMouseLeave: f, onTouchStart: d } = t, m = i.useRef(null);
861
+ i.useEffect(() => {
868
862
  if (e === "render" && c(!0), e === "viewport") {
869
- let w = (m) => {
870
- m.forEach((p) => {
863
+ let w = (h) => {
864
+ h.forEach((p) => {
871
865
  c(p.isIntersecting);
872
866
  });
873
867
  }, v = new IntersectionObserver(w, { threshold: 0.5 });
874
- return h.current && v.observe(h.current), () => {
868
+ return m.current && v.observe(m.current), () => {
875
869
  v.disconnect();
876
870
  };
877
871
  }
878
- }, [e]), u.useEffect(() => {
872
+ }, [e]), i.useEffect(() => {
879
873
  if (l) {
880
874
  let w = setTimeout(() => {
881
875
  c(!0);
@@ -890,17 +884,17 @@ function Rt(e, t) {
890
884
  }, y = () => {
891
885
  r(!1), c(!1);
892
886
  };
893
- return n ? e !== "intent" ? [a, h, {}] : [
887
+ return n ? e !== "intent" ? [a, m, {}] : [
894
888
  a,
895
- h,
889
+ m,
896
890
  {
897
891
  onFocus: T(s, g),
898
- onBlur: T(o, y),
899
- onMouseEnter: T(i, g),
892
+ onBlur: T(u, y),
893
+ onMouseEnter: T(o, g),
900
894
  onMouseLeave: T(f, y),
901
895
  onTouchStart: T(d, g)
902
896
  }
903
- ] : [!1, h, {}];
897
+ ] : [!1, m, {}];
904
898
  }
905
899
  function T(e, t) {
906
900
  return (n) => {
@@ -911,15 +905,15 @@ function bt({
911
905
  page: e,
912
906
  ...t
913
907
  }) {
914
- let { router: n } = pe(), l = u.useMemo(
908
+ let { router: n } = pe(), l = i.useMemo(
915
909
  () => le(n.routes, e, n.basename),
916
910
  [n.routes, e, n.basename]
917
911
  );
918
- return l ? /* @__PURE__ */ u.createElement(Lt, { page: e, matches: l, ...t }) : null;
912
+ return l ? /* @__PURE__ */ i.createElement(Lt, { page: e, matches: l, ...t }) : null;
919
913
  }
920
914
  function Pt(e) {
921
- let { manifest: t, routeModules: n } = ge(), [l, r] = u.useState([]);
922
- return u.useEffect(() => {
915
+ let { manifest: t, routeModules: n } = ge(), [l, r] = i.useState([]);
916
+ return i.useEffect(() => {
923
917
  let a = !1;
924
918
  return gt(e, t, n).then(
925
919
  (c) => {
@@ -935,61 +929,60 @@ function Lt({
935
929
  matches: t,
936
930
  ...n
937
931
  }) {
938
- let l = $(), { manifest: r, routeModules: a } = ge(), { basename: c } = pe(), { loaderData: s, matches: o } = Et(), i = u.useMemo(
932
+ let l = k(), { manifest: r, routeModules: a } = ge(), { basename: c } = pe(), { loaderData: s, matches: u } = Et(), o = i.useMemo(
939
933
  () => ae(
940
934
  e,
941
935
  t,
942
- o,
936
+ u,
943
937
  r,
944
938
  l,
945
939
  "data"
946
940
  ),
947
- [e, t, o, r, l]
948
- ), f = u.useMemo(
941
+ [e, t, u, r, l]
942
+ ), f = i.useMemo(
949
943
  () => ae(
950
944
  e,
951
945
  t,
952
- o,
946
+ u,
953
947
  r,
954
948
  l,
955
949
  "assets"
956
950
  ),
957
- [e, t, o, r, l]
958
- ), d = u.useMemo(() => {
951
+ [e, t, u, r, l]
952
+ ), d = i.useMemo(() => {
959
953
  if (e === l.pathname + l.search + l.hash)
960
954
  return [];
961
955
  let y = /* @__PURE__ */ new Set(), w = !1;
962
- if (t.forEach((m) => {
963
- var x;
964
- let p = r.routes[m.route.id];
965
- !p || !p.hasLoader || (!i.some((R) => R.route.id === m.route.id) && m.route.id in s && ((x = a[m.route.id]) != null && x.shouldRevalidate) || p.hasClientLoader ? w = !0 : y.add(m.route.id));
956
+ if (t.forEach((h) => {
957
+ let p = r.routes[h.route.id];
958
+ !p || !p.hasLoader || (!o.some((x) => x.route.id === h.route.id) && h.route.id in s && a[h.route.id]?.shouldRevalidate || p.hasClientLoader ? w = !0 : y.add(h.route.id));
966
959
  }), y.size === 0)
967
960
  return [];
968
961
  let v = Ct(e, c);
969
962
  return w && y.size > 0 && v.searchParams.set(
970
963
  "_routes",
971
- t.filter((m) => y.has(m.route.id)).map((m) => m.route.id).join(",")
964
+ t.filter((h) => y.has(h.route.id)).map((h) => h.route.id).join(",")
972
965
  ), [v.pathname + v.search];
973
966
  }, [
974
967
  c,
975
968
  s,
976
969
  l,
977
970
  r,
978
- i,
971
+ o,
979
972
  t,
980
973
  e,
981
974
  a
982
- ]), h = u.useMemo(
975
+ ]), m = i.useMemo(
983
976
  () => yt(f, r),
984
977
  [f, r]
985
978
  ), g = Pt(f);
986
- return /* @__PURE__ */ u.createElement(u.Fragment, null, d.map((y) => /* @__PURE__ */ u.createElement("link", { key: y, rel: "prefetch", as: "fetch", href: y, ...n })), h.map((y) => /* @__PURE__ */ u.createElement("link", { key: y, rel: "modulepreload", href: y, ...n })), g.map(({ key: y, link: w }) => (
979
+ return /* @__PURE__ */ i.createElement(i.Fragment, null, d.map((y) => /* @__PURE__ */ i.createElement("link", { key: y, rel: "prefetch", as: "fetch", href: y, ...n })), m.map((y) => /* @__PURE__ */ i.createElement("link", { key: y, rel: "modulepreload", href: y, ...n })), g.map(({ key: y, link: w }) => (
987
980
  // these don't spread `linkProps` because they are full link descriptors
988
981
  // already with their own props
989
- /* @__PURE__ */ u.createElement("link", { key: y, ...w })
982
+ /* @__PURE__ */ i.createElement("link", { key: y, ...w })
990
983
  )));
991
984
  }
992
- function kt(...e) {
985
+ function St(...e) {
993
986
  return (t) => {
994
987
  e.forEach((n) => {
995
988
  typeof n == "function" ? n(t) : n != null && (n.current = t);
@@ -1001,7 +994,7 @@ try {
1001
994
  ye && (window.__reactRouterVersion = "7.6.0");
1002
995
  } catch {
1003
996
  }
1004
- var ve = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, we = u.forwardRef(
997
+ var ve = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, we = i.forwardRef(
1005
998
  function({
1006
999
  onClick: t,
1007
1000
  discover: n = "render",
@@ -1010,30 +1003,30 @@ var ve = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, we = u.forwardRef(
1010
1003
  reloadDocument: a,
1011
1004
  replace: c,
1012
1005
  state: s,
1013
- target: o,
1014
- to: i,
1006
+ target: u,
1007
+ to: o,
1015
1008
  preventScrollReset: f,
1016
1009
  viewTransition: d,
1017
- ...h
1010
+ ...m
1018
1011
  }, g) {
1019
- let { basename: y } = u.useContext(L), w = typeof i == "string" && ve.test(i), v, m = !1;
1020
- if (typeof i == "string" && w && (v = i, ye))
1012
+ let { basename: y } = i.useContext(P), w = typeof o == "string" && ve.test(o), v, h = !1;
1013
+ if (typeof o == "string" && w && (v = o, ye))
1021
1014
  try {
1022
- let E = new URL(window.location.href), I = i.startsWith("//") ? new URL(E.protocol + i) : new URL(i), te = S(I.pathname, y);
1023
- I.origin === E.origin && te != null ? i = te + I.search + I.hash : m = !0;
1015
+ let E = new URL(window.location.href), I = o.startsWith("//") ? new URL(E.protocol + o) : new URL(o), te = S(I.pathname, y);
1016
+ I.origin === E.origin && te != null ? o = te + I.search + I.hash : h = !0;
1024
1017
  } catch {
1025
- P(
1018
+ b(
1026
1019
  !1,
1027
- `<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1020
+ `<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1028
1021
  );
1029
1022
  }
1030
- let p = ze(i, { relative: r }), [x, R, F] = Rt(
1023
+ let p = ze(o, { relative: r }), [x, F, $] = Rt(
1031
1024
  l,
1032
- h
1033
- ), A = It(i, {
1025
+ m
1026
+ ), A = It(o, {
1034
1027
  replace: c,
1035
1028
  state: s,
1036
- target: o,
1029
+ target: u,
1037
1030
  preventScrollReset: f,
1038
1031
  relative: r,
1039
1032
  viewTransition: d
@@ -1043,24 +1036,24 @@ var ve = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, we = u.forwardRef(
1043
1036
  }
1044
1037
  let B = (
1045
1038
  // eslint-disable-next-line jsx-a11y/anchor-has-content
1046
- /* @__PURE__ */ u.createElement(
1039
+ /* @__PURE__ */ i.createElement(
1047
1040
  "a",
1048
1041
  {
1049
- ...h,
1050
- ...F,
1042
+ ...m,
1043
+ ...$,
1051
1044
  href: v || p,
1052
- onClick: m || a ? t : D,
1053
- ref: kt(g, R),
1054
- target: o,
1045
+ onClick: h || a ? t : D,
1046
+ ref: St(g, F),
1047
+ target: u,
1055
1048
  "data-discover": !w && n === "render" ? "true" : void 0
1056
1049
  }
1057
1050
  )
1058
1051
  );
1059
- return x && !w ? /* @__PURE__ */ u.createElement(u.Fragment, null, B, /* @__PURE__ */ u.createElement(bt, { page: p })) : B;
1052
+ return x && !w ? /* @__PURE__ */ i.createElement(i.Fragment, null, B, /* @__PURE__ */ i.createElement(bt, { page: p })) : B;
1060
1053
  }
1061
1054
  );
1062
1055
  we.displayName = "Link";
1063
- var St = u.forwardRef(
1056
+ var kt = i.forwardRef(
1064
1057
  function({
1065
1058
  "aria-current": t = "page",
1066
1059
  caseSensitive: n = !1,
@@ -1069,30 +1062,30 @@ var St = u.forwardRef(
1069
1062
  style: a,
1070
1063
  to: c,
1071
1064
  viewTransition: s,
1072
- children: o,
1073
- ...i
1065
+ children: u,
1066
+ ...o
1074
1067
  }, f) {
1075
- let d = M(c, { relative: i.relative }), h = $(), g = u.useContext(_), { navigator: y, basename: w } = u.useContext(L), v = g != null && // Conditional usage is OK here because the usage of a data router is static
1068
+ let d = M(c, { relative: o.relative }), m = k(), g = i.useContext(_), { navigator: y, basename: w } = i.useContext(P), v = g != null && // Conditional usage is OK here because the usage of a data router is static
1076
1069
  // eslint-disable-next-line react-hooks/rules-of-hooks
1077
- At(d) && s === !0, m = y.encodeLocation ? y.encodeLocation(d).pathname : d.pathname, p = h.pathname, x = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null;
1078
- n || (p = p.toLowerCase(), x = x ? x.toLowerCase() : null, m = m.toLowerCase()), x && w && (x = S(x, w) || x);
1079
- const R = m !== "/" && m.endsWith("/") ? m.length - 1 : m.length;
1080
- let F = p === m || !r && p.startsWith(m) && p.charAt(R) === "/", A = x != null && (x === m || !r && x.startsWith(m) && x.charAt(m.length) === "/"), D = {
1081
- isActive: F,
1070
+ At(d) && s === !0, h = y.encodeLocation ? y.encodeLocation(d).pathname : d.pathname, p = m.pathname, x = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null;
1071
+ n || (p = p.toLowerCase(), x = x ? x.toLowerCase() : null, h = h.toLowerCase()), x && w && (x = S(x, w) || x);
1072
+ const F = h !== "/" && h.endsWith("/") ? h.length - 1 : h.length;
1073
+ let $ = p === h || !r && p.startsWith(h) && p.charAt(F) === "/", A = x != null && (x === h || !r && x.startsWith(h) && x.charAt(h.length) === "/"), D = {
1074
+ isActive: $,
1082
1075
  isPending: A,
1083
1076
  isTransitioning: v
1084
- }, B = F ? t : void 0, E;
1077
+ }, B = $ ? t : void 0, E;
1085
1078
  typeof l == "function" ? E = l(D) : E = [
1086
1079
  l,
1087
- F ? "active" : null,
1080
+ $ ? "active" : null,
1088
1081
  A ? "pending" : null,
1089
1082
  v ? "transitioning" : null
1090
1083
  ].filter(Boolean).join(" ");
1091
1084
  let I = typeof a == "function" ? a(D) : a;
1092
- return /* @__PURE__ */ u.createElement(
1085
+ return /* @__PURE__ */ i.createElement(
1093
1086
  we,
1094
1087
  {
1095
- ...i,
1088
+ ...o,
1096
1089
  "aria-current": B,
1097
1090
  className: E,
1098
1091
  ref: f,
@@ -1100,12 +1093,12 @@ var St = u.forwardRef(
1100
1093
  to: c,
1101
1094
  viewTransition: s
1102
1095
  },
1103
- typeof o == "function" ? o(D) : o
1096
+ typeof u == "function" ? u(D) : u
1104
1097
  );
1105
1098
  }
1106
1099
  );
1107
- St.displayName = "NavLink";
1108
- var $t = u.forwardRef(
1100
+ kt.displayName = "NavLink";
1101
+ var $t = i.forwardRef(
1109
1102
  ({
1110
1103
  discover: e = "render",
1111
1104
  fetcherKey: t,
@@ -1115,36 +1108,36 @@ var $t = u.forwardRef(
1115
1108
  state: a,
1116
1109
  method: c = W,
1117
1110
  action: s,
1118
- onSubmit: o,
1119
- relative: i,
1111
+ onSubmit: u,
1112
+ relative: o,
1120
1113
  preventScrollReset: f,
1121
1114
  viewTransition: d,
1122
- ...h
1115
+ ...m
1123
1116
  }, g) => {
1124
- let y = Tt(), w = Mt(s, { relative: i }), v = c.toLowerCase() === "get" ? "get" : "post", m = typeof s == "string" && ve.test(s), p = (x) => {
1125
- if (o && o(x), x.defaultPrevented) return;
1117
+ let y = Tt(), w = Mt(s, { relative: o }), v = c.toLowerCase() === "get" ? "get" : "post", h = typeof s == "string" && ve.test(s), p = (x) => {
1118
+ if (u && u(x), x.defaultPrevented) return;
1126
1119
  x.preventDefault();
1127
- let R = x.nativeEvent.submitter, F = (R == null ? void 0 : R.getAttribute("formmethod")) || c;
1128
- y(R || x.currentTarget, {
1120
+ let F = x.nativeEvent.submitter, $ = F?.getAttribute("formmethod") || c;
1121
+ y(F || x.currentTarget, {
1129
1122
  fetcherKey: t,
1130
- method: F,
1123
+ method: $,
1131
1124
  navigate: n,
1132
1125
  replace: r,
1133
1126
  state: a,
1134
- relative: i,
1127
+ relative: o,
1135
1128
  preventScrollReset: f,
1136
1129
  viewTransition: d
1137
1130
  });
1138
1131
  };
1139
- return /* @__PURE__ */ u.createElement(
1132
+ return /* @__PURE__ */ i.createElement(
1140
1133
  "form",
1141
1134
  {
1142
1135
  ref: g,
1143
1136
  method: v,
1144
1137
  action: w,
1145
- onSubmit: l ? o : p,
1146
- ...h,
1147
- "data-discover": !m && e === "render" ? "true" : void 0
1138
+ onSubmit: l ? u : p,
1139
+ ...m,
1140
+ "data-discover": !h && e === "render" ? "true" : void 0
1148
1141
  }
1149
1142
  );
1150
1143
  }
@@ -1154,7 +1147,7 @@ function Ft(e) {
1154
1147
  return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1155
1148
  }
1156
1149
  function xe(e) {
1157
- let t = u.useContext(N);
1150
+ let t = i.useContext(N);
1158
1151
  return C(t, Ft(e)), t;
1159
1152
  }
1160
1153
  function It(e, {
@@ -1165,12 +1158,12 @@ function It(e, {
1165
1158
  relative: a,
1166
1159
  viewTransition: c
1167
1160
  } = {}) {
1168
- let s = je(), o = $(), i = M(e, { relative: a });
1169
- return u.useCallback(
1161
+ let s = je(), u = k(), o = M(e, { relative: a });
1162
+ return i.useCallback(
1170
1163
  (f) => {
1171
1164
  if (ct(f, t)) {
1172
1165
  f.preventDefault();
1173
- let d = n !== void 0 ? n : K(o) === K(i);
1166
+ let d = n !== void 0 ? n : K(u) === K(o);
1174
1167
  s(e, {
1175
1168
  replace: d,
1176
1169
  state: l,
@@ -1181,9 +1174,9 @@ function It(e, {
1181
1174
  }
1182
1175
  },
1183
1176
  [
1184
- o,
1177
+ u,
1185
1178
  s,
1186
- i,
1179
+ o,
1187
1180
  n,
1188
1181
  l,
1189
1182
  t,
@@ -1199,10 +1192,10 @@ function Tt() {
1199
1192
  let { router: e } = xe(
1200
1193
  "useSubmit"
1201
1194
  /* UseSubmit */
1202
- ), { basename: t } = u.useContext(L), n = nt();
1203
- return u.useCallback(
1195
+ ), { basename: t } = i.useContext(P), n = nt();
1196
+ return i.useCallback(
1204
1197
  async (l, r = {}) => {
1205
- let { action: a, method: c, encType: s, formData: o, body: i } = ht(
1198
+ let { action: a, method: c, encType: s, formData: u, body: o } = ht(
1206
1199
  l,
1207
1200
  t
1208
1201
  );
@@ -1210,8 +1203,8 @@ function Tt() {
1210
1203
  let f = r.fetcherKey || Dt();
1211
1204
  await e.fetch(f, n, r.action || a, {
1212
1205
  preventScrollReset: r.preventScrollReset,
1213
- formData: o,
1214
- body: i,
1206
+ formData: u,
1207
+ body: o,
1215
1208
  formMethod: r.method || c,
1216
1209
  formEncType: r.encType || s,
1217
1210
  flushSync: r.flushSync
@@ -1219,8 +1212,8 @@ function Tt() {
1219
1212
  } else
1220
1213
  await e.navigate(r.action || a, {
1221
1214
  preventScrollReset: r.preventScrollReset,
1222
- formData: o,
1223
- body: i,
1215
+ formData: u,
1216
+ body: o,
1224
1217
  formMethod: r.method || c,
1225
1218
  formEncType: r.encType || s,
1226
1219
  replace: r.replace,
@@ -1234,22 +1227,22 @@ function Tt() {
1234
1227
  );
1235
1228
  }
1236
1229
  function Mt(e, { relative: t } = {}) {
1237
- let { basename: n } = u.useContext(L), l = u.useContext(k);
1230
+ let { basename: n } = i.useContext(P), l = i.useContext(L);
1238
1231
  C(l, "useFormAction must be used inside a RouteContext");
1239
- let [r] = l.matches.slice(-1), a = { ...M(e || ".", { relative: t }) }, c = $();
1232
+ let [r] = l.matches.slice(-1), a = { ...M(e || ".", { relative: t }) }, c = k();
1240
1233
  if (e == null) {
1241
1234
  a.search = c.search;
1242
- let s = new URLSearchParams(a.search), o = s.getAll("index");
1243
- if (o.some((f) => f === "")) {
1244
- s.delete("index"), o.filter((d) => d).forEach((d) => s.append("index", d));
1235
+ let s = new URLSearchParams(a.search), u = s.getAll("index");
1236
+ if (u.some((f) => f === "")) {
1237
+ s.delete("index"), u.filter((d) => d).forEach((d) => s.append("index", d));
1245
1238
  let f = s.toString();
1246
1239
  a.search = f ? `?${f}` : "";
1247
1240
  }
1248
1241
  }
1249
- return (!e || e === ".") && r.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : b([n, a.pathname])), K(a);
1242
+ return (!e || e === ".") && r.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : R([n, a.pathname])), K(a);
1250
1243
  }
1251
1244
  function At(e, t = {}) {
1252
- let n = u.useContext(fe);
1245
+ let n = i.useContext(fe);
1253
1246
  C(
1254
1247
  n != null,
1255
1248
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
@@ -1265,7 +1258,7 @@ function At(e, t = {}) {
1265
1258
  }
1266
1259
  const Bt = () => {
1267
1260
  try {
1268
- return $(), {
1261
+ return k(), {
1269
1262
  isInsideRouter: !0
1270
1263
  };
1271
1264
  } catch {