@coffre/ui 0.1.10 → 0.1.12

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 (172) hide show
  1. package/dist/client/_coffre/assets/account-CyJDFhek.js +2 -0
  2. package/dist/client/_coffre/assets/account-DHSs5h2f.js +1 -0
  3. package/dist/client/_coffre/assets/affordances-BQD5B421.js +1 -0
  4. package/dist/client/_coffre/assets/audit-Bcyp_dU1.js +2 -0
  5. package/dist/client/_coffre/assets/audit-rMy9mU9Q.js +1 -0
  6. package/dist/client/_coffre/assets/auth.device-DuvaComb.js +1 -0
  7. package/dist/client/_coffre/assets/auth.device-yBt_sLZW.js +2 -0
  8. package/dist/client/_coffre/assets/directory-C4BMGC7-.js +1 -0
  9. package/dist/client/_coffre/assets/dist-BNkBTkxj.js +1 -0
  10. package/dist/client/_coffre/assets/globals-BJkzu6T5.css +1 -0
  11. package/dist/client/_coffre/assets/grants-CyDW25eX.js +1 -0
  12. package/dist/client/_coffre/assets/icons-BRl8DlXW.js +1 -0
  13. package/dist/client/_coffre/assets/index-CA1mtrIx.js +12 -0
  14. package/dist/client/_coffre/assets/link-CqlAJWBd.js +1 -0
  15. package/dist/client/_coffre/assets/login-B73b6bsJ.js +1 -0
  16. package/dist/client/_coffre/assets/login-BO1KAGPU.js +2 -0
  17. package/dist/client/_coffre/assets/offboarding--5vSKNHv.js +1 -0
  18. package/dist/client/_coffre/assets/page-Dngv8FMr.js +1 -0
  19. package/dist/client/_coffre/assets/preload-helper-DBha3tys.js +1 -0
  20. package/dist/client/_coffre/assets/principal-page-C4qDD-d8.js +1 -0
  21. package/dist/client/_coffre/assets/projects._project._environment-eBKxOZ0_.js +2 -0
  22. package/dist/client/_coffre/assets/projects._project._environment-or_AX6o5.js +3 -0
  23. package/dist/client/_coffre/assets/projects._project.index-DHdXfEh-.js +2 -0
  24. package/dist/client/_coffre/assets/projects._project.index-iynQgenH.js +1 -0
  25. package/dist/client/_coffre/assets/projects.index-CGW8mRil.js +1 -0
  26. package/dist/client/_coffre/assets/row-state-BlarvG7E.js +1 -0
  27. package/dist/client/_coffre/assets/settings-D-7RJIDf.js +1 -0
  28. package/dist/client/_coffre/assets/suspense-q_eJaZ18.js +1 -0
  29. package/dist/client/_coffre/assets/tokens._token-0u7midqA.js +2 -0
  30. package/dist/client/_coffre/assets/tokens._token-C53NqScg.js +1 -0
  31. package/dist/client/_coffre/assets/tokens.index-DBZTLnbi.js +1 -0
  32. package/dist/client/_coffre/assets/ui-BPWFJNz7.js +46 -0
  33. package/dist/client/_coffre/assets/unregistered-CLhgtwUt.js +1 -0
  34. package/dist/client/_coffre/assets/use-action-LULgF26O.js +1 -0
  35. package/dist/client/_coffre/assets/use-change-Bd6NZJj9.js +1 -0
  36. package/dist/client/_coffre/assets/use-shell-Dx92Huhb.js +1 -0
  37. package/dist/client/_coffre/assets/useQuery-BIIZz1CB.js +1 -0
  38. package/dist/client/_coffre/assets/useSuspenseQuery-tP9HFZ8w.js +1 -0
  39. package/dist/client/_coffre/assets/users._user-BXtaL8Ee.js +2 -0
  40. package/dist/client/_coffre/assets/users._user-CNYVkXaY.js +1 -0
  41. package/dist/client/_coffre/assets/users.index-Cs9tibIv.js +1 -0
  42. package/dist/server/.vite/manifest.json +342 -246
  43. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-T9tMsCwo.js +162 -0
  44. package/dist/server/_coffre/assets/{account-CUQYGCYh.js → account-BUhhOS5-.js} +150 -117
  45. package/dist/server/_coffre/assets/{account-DMlUoBxQ.js → account-B_h55GCs.js} +10 -24
  46. package/dist/server/_coffre/assets/{affordances-BNaXjMOb.js → affordances-CKANXDTG.js} +2 -22
  47. package/dist/server/_coffre/assets/{async-local-storage-C0cwgkEr.js → async-local-storage-C10uQtMM.js} +3 -2
  48. package/dist/server/_coffre/assets/{audit-CCdSLmvK.js → audit-B8Ck358-.js} +46 -16
  49. package/dist/server/_coffre/assets/audit-DFsXfeAQ.js +31 -0
  50. package/dist/server/_coffre/assets/{auth.device-BoFM1jcf.js → auth.device-BXf_JjT7.js} +5 -5
  51. package/dist/server/_coffre/assets/{auth.device-C05u5ROO.js → auth.device-cqjWACvB.js} +7 -5
  52. package/dist/server/_coffre/assets/{directory-GsnYkse0.js → directory-C9SfNgpM.js} +87 -112
  53. package/dist/server/_coffre/assets/{use-action-DwEmf58L.js → dist-CnnV3t2g.js} +3 -48
  54. package/dist/server/_coffre/assets/globals-BJkzu6T5.css +1 -0
  55. package/dist/server/_coffre/assets/grants--315KmXu.js +158 -0
  56. package/dist/server/_coffre/assets/{page-BdnhpwvH.js → icons-CWsTEfpn.js} +125 -436
  57. package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +480 -0
  58. package/dist/server/_coffre/assets/link-42ZWdjzZ.js +422 -0
  59. package/dist/server/_coffre/assets/{login-DUtCQju5.js → login-CQSkYW_D.js} +7 -5
  60. package/dist/server/_coffre/assets/{login-B2njIq_o.js → login-LBpXXfsQ.js} +2 -2
  61. package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +56 -0
  62. package/dist/server/_coffre/assets/{offboarding-8yMa7ViM.js → offboarding-CykelNis.js} +11 -79
  63. package/dist/server/_coffre/assets/page-BGeDoQO5.js +3531 -0
  64. package/dist/server/_coffre/assets/{principal-page-B8zPcS2b.js → principal-page-CRdoAQOq.js} +51 -42
  65. package/dist/server/_coffre/assets/{projects._project._environment-DdIOc7wx.js → projects._project._environment-BXU1Mee5.js} +4 -11
  66. package/dist/server/_coffre/assets/{projects._project._environment-BZ5Z80V8.js → projects._project._environment-BrDqn8kW.js} +129 -748
  67. package/dist/server/_coffre/assets/{projects._project.index-CuEAUwGn.js → projects._project.index-CAxBU4tY.js} +134 -96
  68. package/dist/server/_coffre/assets/{projects._project.index-DvbcU1kh.js → projects._project.index-CYyUVTCl.js} +5 -4
  69. package/dist/server/_coffre/assets/{projects.index-5HI0wOuG.js → projects.index-D6ZoDE_0.js} +57 -55
  70. package/dist/server/_coffre/assets/{react-dom-qCTiwGGR.js → react-dom-bBoJXlK2.js} +417 -51
  71. package/dist/server/_coffre/assets/{router-CQDoql8s.js → router-Bu2qtyqw.js} +376 -92
  72. package/dist/server/_coffre/assets/row-state-CAItu3n_.js +117 -0
  73. package/dist/server/_coffre/assets/{settings-BVz78wjP.js → settings-ByeF6hBa.js} +8 -6
  74. package/dist/server/_coffre/assets/suspense-beD01bb8.js +602 -0
  75. package/dist/server/_coffre/assets/tokens._token-CM01QPCq.js +10 -0
  76. package/dist/server/_coffre/assets/{tokens._token-CWs3Mtki.js → tokens._token-D2E4P3Qc.js} +97 -79
  77. package/dist/server/_coffre/assets/{tokens.index-Ck0LN7aC.js → tokens.index-Cmrgn3mU.js} +9 -6
  78. package/dist/server/_coffre/assets/{ui-D_slKpSF.js → ui-DvlGkmaH.js} +7 -836
  79. package/dist/server/_coffre/assets/{unregistered-Z17da4Rc.js → unregistered-DSArejP9.js} +5 -3
  80. package/dist/server/_coffre/assets/use-action-C2wz34kq.js +47 -0
  81. package/dist/server/_coffre/assets/use-change-CJpGSNIq.js +1212 -0
  82. package/dist/server/_coffre/assets/use-shell-C3iYcyP1.js +462 -0
  83. package/dist/server/_coffre/assets/useQuery-ChxaQ4Cb.js +8 -0
  84. package/dist/server/_coffre/assets/{useStore-DWGPqzXR.js → useRouter-CaUSUNsw.js} +1 -420
  85. package/dist/server/_coffre/assets/useSuspenseQuery-BjAmlGZl.js +117 -0
  86. package/dist/server/_coffre/assets/users._user-BVeR9fZP.js +10 -0
  87. package/dist/server/_coffre/assets/{users._user-CMwj-VI9.js → users._user-Cih2Etf4.js} +4 -5
  88. package/dist/server/_coffre/assets/{users.index-fWHv6A30.js → users.index-Bo2_a95G.js} +9 -6
  89. package/dist/server/index.js +6 -5
  90. package/package.json +5 -3
  91. package/src/components/directory.tsx +75 -104
  92. package/src/components/grants.tsx +60 -112
  93. package/src/components/icons.tsx +0 -34
  94. package/src/components/offboarding.tsx +1 -52
  95. package/src/components/principal-page.tsx +54 -67
  96. package/src/components/principal-picker.tsx +7 -16
  97. package/src/components/row-state.tsx +95 -0
  98. package/src/components/service-tokens.tsx +75 -64
  99. package/src/components/shell.tsx +1 -1
  100. package/src/lib/announce.ts +36 -0
  101. package/src/lib/changes.ts +498 -0
  102. package/src/lib/coffre.ts +1 -1
  103. package/src/lib/optimistic.ts +233 -0
  104. package/src/lib/queries.ts +385 -0
  105. package/src/lib/use-action.ts +20 -15
  106. package/src/lib/use-change.ts +42 -0
  107. package/src/lib/use-shell.ts +17 -0
  108. package/src/router.tsx +17 -9
  109. package/src/routes/__root.tsx +8 -38
  110. package/src/routes/account.tsx +163 -154
  111. package/src/routes/audit.tsx +51 -72
  112. package/src/routes/auth.device.tsx +4 -2
  113. package/src/routes/login.tsx +3 -2
  114. package/src/routes/projects.$project.$environment.tsx +223 -238
  115. package/src/routes/projects.$project.index.tsx +136 -118
  116. package/src/routes/projects.index.tsx +117 -145
  117. package/src/routes/settings.tsx +7 -7
  118. package/src/routes/tokens.$token.tsx +14 -17
  119. package/src/routes/tokens.index.tsx +8 -4
  120. package/src/routes/unregistered.tsx +3 -2
  121. package/src/routes/users.$user.tsx +4 -4
  122. package/src/routes/users.index.tsx +8 -4
  123. package/src/shared/models.ts +1 -5
  124. package/src/styles/globals.css +80 -50
  125. package/dist/client/_coffre/assets/account-B48wuSF8.js +0 -1
  126. package/dist/client/_coffre/assets/account-BkNyIDT7.js +0 -2
  127. package/dist/client/_coffre/assets/affordances-CmoY-8Xf.js +0 -1
  128. package/dist/client/_coffre/assets/audit-BvwKYb-5.js +0 -2
  129. package/dist/client/_coffre/assets/audit-D02H-zxS.js +0 -1
  130. package/dist/client/_coffre/assets/auth.device-BP5FY0K1.js +0 -1
  131. package/dist/client/_coffre/assets/auth.device-DYOONgFF.js +0 -2
  132. package/dist/client/_coffre/assets/coffre-BBp7cKVa.js +0 -1
  133. package/dist/client/_coffre/assets/directory-Bu0EIxqI.js +0 -1
  134. package/dist/client/_coffre/assets/globals-Bh2x1gBM.css +0 -1
  135. package/dist/client/_coffre/assets/grants-DavcwofW.js +0 -1
  136. package/dist/client/_coffre/assets/index-CDPlq5rM.js +0 -12
  137. package/dist/client/_coffre/assets/login-C-wTm_t1.js +0 -2
  138. package/dist/client/_coffre/assets/login-CLLv1om9.js +0 -1
  139. package/dist/client/_coffre/assets/offboarding-DWsE2FSa.js +0 -1
  140. package/dist/client/_coffre/assets/page-DbSS7pYH.js +0 -1
  141. package/dist/client/_coffre/assets/preload-helper-DduCCcmc.js +0 -46
  142. package/dist/client/_coffre/assets/principal-page-Bp_iwuSd.js +0 -1
  143. package/dist/client/_coffre/assets/projects._project._environment-BMeX_B8l.js +0 -2
  144. package/dist/client/_coffre/assets/projects._project._environment-CT0A-hIU.js +0 -3
  145. package/dist/client/_coffre/assets/projects._project.index-C_xYOGLT.js +0 -2
  146. package/dist/client/_coffre/assets/projects._project.index-Chcf-cUd.js +0 -1
  147. package/dist/client/_coffre/assets/projects.index-CfOtb1X5.js +0 -2
  148. package/dist/client/_coffre/assets/projects.index-DSjOhLDh.js +0 -1
  149. package/dist/client/_coffre/assets/settings-BC9cUJNK.js +0 -1
  150. package/dist/client/_coffre/assets/settings-Bkj_E21y.js +0 -2
  151. package/dist/client/_coffre/assets/tokens._token-BA0KqvaW.js +0 -1
  152. package/dist/client/_coffre/assets/tokens._token-Dh9jLOkm.js +0 -2
  153. package/dist/client/_coffre/assets/tokens.index-BgAMWkHT.js +0 -2
  154. package/dist/client/_coffre/assets/tokens.index-CHueIAv1.js +0 -1
  155. package/dist/client/_coffre/assets/unregistered-D5go1AfR.js +0 -1
  156. package/dist/client/_coffre/assets/use-action-l__xZDYY.js +0 -1
  157. package/dist/client/_coffre/assets/users._user-Dwqa0gv5.js +0 -1
  158. package/dist/client/_coffre/assets/users._user-xJAb3T6Y.js +0 -2
  159. package/dist/client/_coffre/assets/users.index-BJoF-L37.js +0 -2
  160. package/dist/client/_coffre/assets/users.index-YUjtbTGy.js +0 -1
  161. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-BKg2AlPu.js +0 -133
  162. package/dist/server/_coffre/assets/audit-CThXn2v7.js +0 -74
  163. package/dist/server/_coffre/assets/coffre-C2ANsTAz.js +0 -281
  164. package/dist/server/_coffre/assets/globals-Bh2x1gBM.css +0 -1
  165. package/dist/server/_coffre/assets/grants-B6k4Fu9z.js +0 -243
  166. package/dist/server/_coffre/assets/projects.index-uiomWX_l.js +0 -54
  167. package/dist/server/_coffre/assets/settings-4oRyDizv.js +0 -18
  168. package/dist/server/_coffre/assets/tokens._token-CF_deAwq.js +0 -18
  169. package/dist/server/_coffre/assets/tokens.index-DF_07KEe.js +0 -10
  170. package/dist/server/_coffre/assets/users._user-DUzwkSKT.js +0 -10
  171. package/dist/server/_coffre/assets/users.index-BbuweTwH.js +0 -10
  172. package/src/components/syncs.tsx +0 -581
@@ -1,4 +1,4 @@
1
- import { C as require_react, E as __toESM, b as last, o as require_jsx_runtime, s as invariant, w as __commonJSMin } from "./useStore-DWGPqzXR.js";
1
+ import { a as __commonJSMin, i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
2
2
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.170.18_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/utils.js
3
3
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
4
4
  /**
@@ -83,6 +83,267 @@ function useForwardedRef(ref) {
83
83
  return innerRef;
84
84
  }
85
85
  //#endregion
86
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/utils.js
87
+ /**
88
+ * Return the last element of an array.
89
+ * Intended for non-empty arrays used within router internals.
90
+ */
91
+ function last(arr) {
92
+ return arr[arr.length - 1];
93
+ }
94
+ function isFunction(d) {
95
+ return typeof d === "function";
96
+ }
97
+ /**
98
+ * Apply a value-or-updater to a previous value.
99
+ * Accepts either a literal value or a function of the previous value.
100
+ */
101
+ function functionalUpdate(updater, previous) {
102
+ if (isFunction(updater)) return updater(previous);
103
+ return updater;
104
+ }
105
+ var hasOwn = Object.prototype.hasOwnProperty;
106
+ function hasKeys(obj) {
107
+ for (const key in obj) if (hasOwn.call(obj, key)) return true;
108
+ return false;
109
+ }
110
+ var createNull = () => Object.create(null);
111
+ var nullReplaceEqualDeep = (prev, next) => replaceEqualDeep(prev, next, createNull);
112
+ /**
113
+ * This function returns `prev` if `_next` is deeply equal.
114
+ * If not, it will replace any deeply equal children of `b` with those of `a`.
115
+ * This can be used for structural sharing between immutable JSON values for example.
116
+ * Do not use this with signals
117
+ */
118
+ function replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {
119
+ return _next;
120
+ }
121
+ function isPlainObject(o) {
122
+ if (!hasObjectPrototype(o)) return false;
123
+ const ctor = o.constructor;
124
+ if (typeof ctor === "undefined") return true;
125
+ const prot = ctor.prototype;
126
+ if (!hasObjectPrototype(prot)) return false;
127
+ if (!prot.hasOwnProperty("isPrototypeOf")) return false;
128
+ return true;
129
+ }
130
+ function hasObjectPrototype(o) {
131
+ return Object.prototype.toString.call(o) === "[object Object]";
132
+ }
133
+ /**
134
+ * Perform a deep equality check with options for partial comparison and
135
+ * ignoring `undefined` values. Optimized for router state comparisons.
136
+ */
137
+ function deepEqual(a, b, opts) {
138
+ if (a === b) return true;
139
+ if (typeof a !== typeof b) return false;
140
+ if (Array.isArray(a) && Array.isArray(b)) {
141
+ if (a.length !== b.length) return false;
142
+ for (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;
143
+ return true;
144
+ }
145
+ if (isPlainObject(a) && isPlainObject(b)) {
146
+ const ignoreUndefined = opts?.ignoreUndefined ?? true;
147
+ if (opts?.partial) {
148
+ for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
149
+ if (!deepEqual(a[k], b[k], opts)) return false;
150
+ }
151
+ return true;
152
+ }
153
+ let aCount = 0;
154
+ if (!ignoreUndefined) aCount = Object.keys(a).length;
155
+ else for (const k in a) if (a[k] !== void 0) aCount++;
156
+ let bCount = 0;
157
+ for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
158
+ bCount++;
159
+ if (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;
160
+ }
161
+ return aCount === bCount;
162
+ }
163
+ return false;
164
+ }
165
+ /**
166
+ * Create a promise with exposed resolve/reject and status fields.
167
+ * Useful for coordinating async router lifecycle operations.
168
+ */
169
+ function createControlledPromise(onResolve) {
170
+ let resolveLoadPromise;
171
+ let rejectLoadPromise;
172
+ const controlledPromise = new Promise((resolve, reject) => {
173
+ resolveLoadPromise = resolve;
174
+ rejectLoadPromise = reject;
175
+ });
176
+ controlledPromise.status = "pending";
177
+ controlledPromise.resolve = (value) => {
178
+ controlledPromise.status = "resolved";
179
+ controlledPromise.value = value;
180
+ resolveLoadPromise(value);
181
+ onResolve?.(value);
182
+ };
183
+ controlledPromise.reject = (e) => {
184
+ controlledPromise.status = "rejected";
185
+ rejectLoadPromise(e);
186
+ };
187
+ return controlledPromise;
188
+ }
189
+ /**
190
+ * Heuristically detect dynamic import "module not found" errors
191
+ * across major browsers for lazy route component handling.
192
+ */
193
+ function isModuleNotFoundError(error) {
194
+ if (typeof error?.message !== "string") return false;
195
+ return error.message.startsWith("Failed to fetch dynamically imported module") || error.message.startsWith("error loading dynamically imported module") || error.message.startsWith("Importing a module script failed");
196
+ }
197
+ function isPromise(value) {
198
+ return Boolean(value && typeof value === "object" && typeof value.then === "function");
199
+ }
200
+ /**
201
+ * Re-encode characters that are unsafe in URL paths.
202
+ * Includes ASCII control characters (0x00-0x1F, 0x7F) and a subset of the
203
+ * WHATWG URL "path percent-encode set" (", <, >, `, {, }).
204
+ *
205
+ * Space (0x20) is intentionally excluded — decodeURI decodes %20 to space
206
+ * and the router stores decoded spaces in location.pathname. The existing
207
+ * encodePathLikeUrl already handles re-encoding spaces for outgoing URLs.
208
+ *
209
+ * These characters are decoded by decodeURI but must remain percent-encoded
210
+ * in paths to match how upstream layers (CDNs, edge middleware, browsers)
211
+ * interpret the URL, preventing infinite redirect loops and path mismatches.
212
+ */
213
+ var PATH_UNSAFE_RE = /[\x00-\x1f\x7f"<>`{}]/g;
214
+ function sanitizePathSegment(segment) {
215
+ return segment.replace(PATH_UNSAFE_RE, (ch) => "%" + ch.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0"));
216
+ }
217
+ function decodeSegment(segment) {
218
+ let decoded;
219
+ try {
220
+ decoded = decodeURI(segment);
221
+ } catch {
222
+ decoded = segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {
223
+ try {
224
+ return decodeURI(match);
225
+ } catch {
226
+ return match;
227
+ }
228
+ });
229
+ }
230
+ return sanitizePathSegment(decoded);
231
+ }
232
+ /**
233
+ * Default list of URL protocols to allow in links, redirects, and navigation.
234
+ * Any absolute URL protocol not in this list is treated as dangerous by default.
235
+ */
236
+ var DEFAULT_PROTOCOL_ALLOWLIST = [
237
+ "http:",
238
+ "https:",
239
+ "mailto:",
240
+ "tel:"
241
+ ];
242
+ /**
243
+ * Check if a URL string uses a protocol that is not in the allowlist.
244
+ * Returns true for blocked protocols like javascript:, blob:, data:, etc.
245
+ *
246
+ * The URL constructor correctly normalizes:
247
+ * - Mixed case (JavaScript: → javascript:)
248
+ * - Whitespace/control characters (java\nscript: → javascript:)
249
+ * - Leading whitespace
250
+ *
251
+ * For relative URLs (no protocol), returns false (safe).
252
+ *
253
+ * @param url - The URL string to check
254
+ * @param allowlist - Set of protocols to allow
255
+ * @returns true if the URL uses a protocol that is not allowed
256
+ */
257
+ function isDangerousProtocol(url, allowlist) {
258
+ if (!url) return false;
259
+ try {
260
+ const parsed = new URL(url);
261
+ return !allowlist.has(parsed.protocol);
262
+ } catch {
263
+ return false;
264
+ }
265
+ }
266
+ var HTML_ESCAPE_LOOKUP = {
267
+ "&": "\\u0026",
268
+ ">": "\\u003e",
269
+ "<": "\\u003c",
270
+ "\u2028": "\\u2028",
271
+ "\u2029": "\\u2029"
272
+ };
273
+ var HTML_ESCAPE_REGEX = /[&><\u2028\u2029]/g;
274
+ /**
275
+ * Escape HTML special characters in a string to prevent XSS attacks
276
+ * when embedding strings in script tags during SSR.
277
+ *
278
+ * This is essential for preventing XSS vulnerabilities when user-controlled
279
+ * content is embedded in inline scripts.
280
+ */
281
+ function escapeHtml(str) {
282
+ return str.replace(HTML_ESCAPE_REGEX, (match) => HTML_ESCAPE_LOOKUP[match]);
283
+ }
284
+ function decodePath(path) {
285
+ if (!path) return {
286
+ path,
287
+ handledProtocolRelativeURL: false
288
+ };
289
+ if (!/[%\\\x00-\x1f\x7f]/.test(path) && !path.startsWith("//")) return {
290
+ path,
291
+ handledProtocolRelativeURL: false
292
+ };
293
+ const re = /%25|%5C/gi;
294
+ let cursor = 0;
295
+ let result = "";
296
+ let match;
297
+ while (null !== (match = re.exec(path))) {
298
+ result += decodeSegment(path.slice(cursor, match.index)) + match[0];
299
+ cursor = re.lastIndex;
300
+ }
301
+ result = result + decodeSegment(cursor ? path.slice(cursor) : path);
302
+ let handledProtocolRelativeURL = false;
303
+ if (result.startsWith("//")) {
304
+ handledProtocolRelativeURL = true;
305
+ result = "/" + result.replace(/^\/+/, "");
306
+ }
307
+ return {
308
+ path: result,
309
+ handledProtocolRelativeURL
310
+ };
311
+ }
312
+ /**
313
+ * Encodes a path the same way `new URL()` would, but without the overhead of full URL parsing.
314
+ *
315
+ * This function encodes:
316
+ * - Whitespace characters (spaces → %20, tabs → %09, etc.)
317
+ * - Non-ASCII/Unicode characters (emojis, accented characters, etc.)
318
+ *
319
+ * It preserves:
320
+ * - Already percent-encoded sequences (won't double-encode %2F, %25, etc.)
321
+ * - ASCII special characters valid in URL paths (@, $, &, +, etc.)
322
+ * - Forward slashes as path separators
323
+ *
324
+ * Used to generate proper href values for SSR without constructing URL objects.
325
+ *
326
+ * @example
327
+ * encodePathLikeUrl('/path/file name.pdf') // '/path/file%20name.pdf'
328
+ * encodePathLikeUrl('/path/日本語') // '/path/%E6%97%A5%E6%9C%AC%E8%AA%9E'
329
+ * encodePathLikeUrl('/path/already%20encoded') // '/path/already%20encoded' (preserved)
330
+ */
331
+ function encodePathLikeUrl(path) {
332
+ if (!/\s|[^\u0000-\u007F]/.test(path)) return path;
333
+ return path.replace(/\s|[^\u0000-\u007F]/gu, encodeURIComponent);
334
+ }
335
+ function arraysEqual(a, b) {
336
+ if (a === b) return true;
337
+ if (a.length !== b.length) return false;
338
+ for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
339
+ return true;
340
+ }
341
+ //#endregion
342
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/invariant.js
343
+ function invariant() {
344
+ throw new Error("Invariant failed");
345
+ }
346
+ //#endregion
86
347
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/lru-cache.js
87
348
  function createLRUCache(max) {
88
349
  const cache = /* @__PURE__ */ new Map();
@@ -1096,55 +1357,6 @@ function encodePathParam(value, decoder) {
1096
1357
  return decoder?.(encoded) ?? encoded;
1097
1358
  }
1098
1359
  //#endregion
1099
- //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/root.js
1100
- /** Stable identifier used for the root route in a route tree. */
1101
- var rootRouteId = "__root__";
1102
- //#endregion
1103
- //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/redirect.js
1104
- /**
1105
- * Create a redirect Response understood by TanStack Router.
1106
- *
1107
- * Use from route `loader`/`beforeLoad` or server functions to trigger a
1108
- * navigation. If `throw: true` is set, the redirect is thrown instead of
1109
- * returned. When an absolute `href` is supplied and `reloadDocument` is not
1110
- * set, a full-document navigation is inferred.
1111
- *
1112
- * @param opts Options for the redirect. Common fields:
1113
- * - `href`: absolute URL for external redirects; infers `reloadDocument`.
1114
- * - `statusCode`: HTTP status code to use (defaults to 307).
1115
- * - `headers`: additional headers to include on the Response.
1116
- * - Standard navigation options like `to`, `params`, `search`, `replace`,
1117
- * and `reloadDocument` for internal redirects.
1118
- * @returns A Response augmented with router navigation options.
1119
- * @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction
1120
- */
1121
- function redirect(opts) {
1122
- opts.statusCode = opts.statusCode || opts.code || 307;
1123
- if (!opts._builtLocation && !opts.reloadDocument && typeof opts.href === "string") try {
1124
- new URL(opts.href);
1125
- opts.reloadDocument = true;
1126
- } catch {}
1127
- const headers = new Headers(opts.headers);
1128
- if (opts.href && headers.get("Location") === null) headers.set("Location", opts.href);
1129
- const response = new Response(null, {
1130
- status: opts.statusCode,
1131
- headers
1132
- });
1133
- response.options = opts;
1134
- if (opts.throw) throw response;
1135
- return response;
1136
- }
1137
- /** Check whether a value is a TanStack Router redirect Response. */
1138
- /** Check whether a value is a TanStack Router redirect Response. */
1139
- function isRedirect(obj) {
1140
- return obj instanceof Response && !!obj.options;
1141
- }
1142
- /** True if value is a redirect with a resolved `href` location. */
1143
- /** True if value is a redirect with a resolved `href` location. */
1144
- function isResolvedRedirect(obj) {
1145
- return isRedirect(obj) && !!obj.options.href;
1146
- }
1147
- //#endregion
1148
1360
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.170.18_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/ClientOnly.js
1149
1361
  var import_jsx_runtime = require_jsx_runtime();
1150
1362
  /**
@@ -1193,6 +1405,160 @@ function subscribe() {
1193
1405
  return () => {};
1194
1406
  }
1195
1407
  //#endregion
1408
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
1409
+ /**
1410
+ * @license React
1411
+ * use-sync-external-store-shim.production.js
1412
+ *
1413
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1414
+ *
1415
+ * This source code is licensed under the MIT license found in the
1416
+ * LICENSE file in the root directory of this source tree.
1417
+ */
1418
+ var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
1419
+ var React = require_react();
1420
+ function is(x, y) {
1421
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1422
+ }
1423
+ var objectIs = "function" === typeof Object.is ? Object.is : is;
1424
+ var useState = React.useState;
1425
+ var useEffect = React.useEffect;
1426
+ var useLayoutEffect = React.useLayoutEffect;
1427
+ var useDebugValue = React.useDebugValue;
1428
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
1429
+ var value = getSnapshot(), _useState = useState({ inst: {
1430
+ value,
1431
+ getSnapshot
1432
+ } }), inst = _useState[0].inst, forceUpdate = _useState[1];
1433
+ useLayoutEffect(function() {
1434
+ inst.value = value;
1435
+ inst.getSnapshot = getSnapshot;
1436
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1437
+ }, [
1438
+ subscribe,
1439
+ value,
1440
+ getSnapshot
1441
+ ]);
1442
+ useEffect(function() {
1443
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1444
+ return subscribe(function() {
1445
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1446
+ });
1447
+ }, [subscribe]);
1448
+ useDebugValue(value);
1449
+ return value;
1450
+ }
1451
+ function checkIfSnapshotChanged(inst) {
1452
+ var latestGetSnapshot = inst.getSnapshot;
1453
+ inst = inst.value;
1454
+ try {
1455
+ var nextValue = latestGetSnapshot();
1456
+ return !objectIs(inst, nextValue);
1457
+ } catch (error) {
1458
+ return !0;
1459
+ }
1460
+ }
1461
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
1462
+ return getSnapshot();
1463
+ }
1464
+ var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
1465
+ exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
1466
+ }));
1467
+ //#endregion
1468
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/shim/index.js
1469
+ var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1470
+ module.exports = require_use_sync_external_store_shim_production();
1471
+ }));
1472
+ //#endregion
1473
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
1474
+ /**
1475
+ * @license React
1476
+ * use-sync-external-store-shim/with-selector.production.js
1477
+ *
1478
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1479
+ *
1480
+ * This source code is licensed under the MIT license found in the
1481
+ * LICENSE file in the root directory of this source tree.
1482
+ */
1483
+ var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
1484
+ var React = require_react();
1485
+ var shim = require_shim();
1486
+ function is(x, y) {
1487
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1488
+ }
1489
+ var objectIs = "function" === typeof Object.is ? Object.is : is;
1490
+ var useSyncExternalStore = shim.useSyncExternalStore;
1491
+ var useRef = React.useRef;
1492
+ var useEffect = React.useEffect;
1493
+ var useMemo = React.useMemo;
1494
+ var useDebugValue = React.useDebugValue;
1495
+ exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
1496
+ var instRef = useRef(null);
1497
+ if (null === instRef.current) {
1498
+ var inst = {
1499
+ hasValue: !1,
1500
+ value: null
1501
+ };
1502
+ instRef.current = inst;
1503
+ } else inst = instRef.current;
1504
+ instRef = useMemo(function() {
1505
+ function memoizedSelector(nextSnapshot) {
1506
+ if (!hasMemo) {
1507
+ hasMemo = !0;
1508
+ memoizedSnapshot = nextSnapshot;
1509
+ nextSnapshot = selector(nextSnapshot);
1510
+ if (void 0 !== isEqual && inst.hasValue) {
1511
+ var currentSelection = inst.value;
1512
+ if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
1513
+ }
1514
+ return memoizedSelection = nextSnapshot;
1515
+ }
1516
+ currentSelection = memoizedSelection;
1517
+ if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
1518
+ var nextSelection = selector(nextSnapshot);
1519
+ if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
1520
+ memoizedSnapshot = nextSnapshot;
1521
+ return memoizedSelection = nextSelection;
1522
+ }
1523
+ var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
1524
+ return [function() {
1525
+ return memoizedSelector(getSnapshot());
1526
+ }, null === maybeGetServerSnapshot ? void 0 : function() {
1527
+ return memoizedSelector(maybeGetServerSnapshot());
1528
+ }];
1529
+ }, [
1530
+ getSnapshot,
1531
+ getServerSnapshot,
1532
+ selector,
1533
+ isEqual
1534
+ ]);
1535
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
1536
+ useEffect(function() {
1537
+ inst.hasValue = !0;
1538
+ inst.value = value;
1539
+ }, [value]);
1540
+ useDebugValue(value);
1541
+ return value;
1542
+ };
1543
+ }));
1544
+ //#endregion
1545
+ //#region ../../node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-store/dist/esm/useStore.js
1546
+ var import_with_selector = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
1547
+ module.exports = require_with_selector_production();
1548
+ })))();
1549
+ function defaultCompare(a, b) {
1550
+ return a === b;
1551
+ }
1552
+ function useStore(atom, selector, compare = defaultCompare) {
1553
+ const subscribe = (0, import_react.useCallback)((handleStoreChange) => {
1554
+ if (!atom) return () => {};
1555
+ const { unsubscribe } = atom.subscribe(handleStoreChange);
1556
+ return unsubscribe;
1557
+ }, [atom]);
1558
+ const boundGetSnapshot = (0, import_react.useCallback)(() => atom?.get(), [atom]);
1559
+ return (0, import_with_selector.useSyncExternalStoreWithSelector)(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
1560
+ }
1561
+ //#endregion
1196
1562
  //#region ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/cjs/react-dom.production.js
1197
1563
  /**
1198
1564
  * @license React
@@ -1349,4 +1715,4 @@ var require_react_dom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1349
1715
  module.exports = require_react_dom_production();
1350
1716
  }));
1351
1717
  //#endregion
1352
- export { processRouteTree as C, useIntersectionObserver as D, useForwardedRef as E, useLayoutEffect as O, processRouteMasks as S, reactUse as T, trimPathRight as _, isResolvedRedirect as a, findRouteMatch as b, cleanPath as c, interpolatePath as d, joinPaths as f, trimPathLeft as g, trimPath as h, isRedirect as i, usePrevious as k, compileDecodeCharMap as l, resolvePath as m, ClientOnly as n, redirect as o, removeTrailingSlash as p, useHydrated as r, rootRouteId as s, require_react_dom as t, exactPathTest as u, buildRouteBranch as v, createLRUCache as w, findSingleMatch as x, findFlatMatch as y };
1718
+ export { functionalUpdate as A, useIntersectionObserver as B, DEFAULT_PROTOCOL_ALLOWLIST as C, deepEqual as D, decodePath as E, last as F, usePrevious as H, nullReplaceEqualDeep as I, replaceEqualDeep as L, isDangerousProtocol as M, isModuleNotFoundError as N, encodePathLikeUrl as O, isPromise as P, reactUse as R, invariant as S, createControlledPromise as T, useLayoutEffect as V, findRouteMatch as _, cleanPath as a, processRouteTree as b, interpolatePath as c, resolvePath as d, trimPath as f, findFlatMatch as g, buildRouteBranch as h, useHydrated as i, hasKeys as j, escapeHtml as k, joinPaths as l, trimPathRight as m, useStore as n, compileDecodeCharMap as o, trimPathLeft as p, ClientOnly as r, exactPathTest as s, require_react_dom as t, removeTrailingSlash as u, findSingleMatch as v, arraysEqual as w, createLRUCache as x, processRouteMasks as y, useForwardedRef as z };