@cartanova/qgrid-cli 1.4.0 → 1.5.0
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.
- package/bundle/dist/application/qgrid/pool.js +6 -3
- package/bundle/src/application/qgrid/pool.ts +6 -2
- package/bundle/web-dist/client/assets/index-CJbMnvkl.css +1 -0
- package/bundle/web-dist/client/assets/index-DhqeOdaq.js +116 -0
- package/bundle/web-dist/client/assets/logs-BzY81a5V.js +1 -0
- package/bundle/web-dist/client/assets/preload-helper-ca-nBW7U.js +1 -0
- package/bundle/web-dist/client/assets/routes-C8VZv8Ii.js +5 -0
- package/bundle/web-dist/client/assets/{show-CFGLH8f_.js → show-B9Z-snx2.js} +1 -1
- package/bundle/web-dist/client/assets/{tokens-Bib8aQbc.js → tokens-Dk4_IBwI.js} +1 -1
- package/bundle/web-dist/client/index.html +3 -2
- package/bundle/web-dist/server/assets/lazyRouteComponent-Dyl_0WZs.js +1982 -0
- package/bundle/web-dist/server/assets/logs-bLRMIO1J.js +244 -0
- package/bundle/web-dist/server/assets/{routes-Dx59lTlD.js → routes-qwzTPLE2.js} +14 -388
- package/bundle/web-dist/server/assets/{show-BEFi1cKV.js → show-Btv2c6zd.js} +2 -1
- package/bundle/web-dist/server/assets/{tokens-Dyi6qMmP.js → tokens-BYhGItkk.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +70 -2008
- package/dist/cli.js +25 -4
- package/package.json +1 -1
- package/bundle/web-dist/client/assets/index-BP0XRvKL.css +0 -1
- package/bundle/web-dist/client/assets/index-CgXTSTgN.js +0 -116
- package/bundle/web-dist/client/assets/routes-DvViUcG1.js +0 -5
- /package/bundle/web-dist/client/assets/{services.generated-CAJQk7Wk.js → services.generated-1X7EKUWg.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { $ as __commonJSMin, B as matchQuery, C as Mutation, D as onlineManager, F as functionalUpdate
|
|
1
|
+
import { $ as __commonJSMin, B as matchQuery, C as Mutation, D as onlineManager, F as functionalUpdate, G as resolveStaleTime, H as partialMatchKey, I as hashKey, J as skipToken, L as hashQueryKeyByOptions, M as addToEnd, N as addToStart, O as notifyManager, P as ensureQueryFn, Q as Subscribable, S as require_react, T as Query, V as noop, Z as focusManager, h as object, j as addConsumeAwareSignal, m as number, n as SUPPORTED_LOCALES, nt as __toESM, r as setLocale, t as SD$1, tt as __require, v as require_react_dom, x as require_jsx_runtime, y as QueryClientProvider, z as matchMutation } from "./assets/sd.generated-BeEKgSOs.js";
|
|
2
|
+
import { A as decodePath, C as findRouteMatch, D as createLRUCache, E as processRouteTree, F as last, I as replaceEqualDeep, M as findLast, N as functionalUpdate$1, O as invariant, P as isPromise, S as findFlatMatch, T as processRouteMasks, _ as interpolatePath, a as Link, b as trimPath, c as usePrevious, d as useRouter, f as getRouterContext, g as cleanPath, h as isNotFound, i as createRootRouteWithContext, j as deepEqual, k as createControlledPromise, l as matchContext, m as rootRouteId, n as createFileRoute, p as warning, r as createLazyFileRoute, s as useLayoutEffect, t as lazyRouteComponent, u as useRouterState, v as joinPaths, w as findSingleMatch, x as trimPathRight, y as resolvePath } from "./assets/lazyRouteComponent-Dyl_0WZs.js";
|
|
2
3
|
//#region ../../node_modules/.pnpm/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/hydration.js
|
|
3
4
|
function defaultTransformerFn(data) {
|
|
4
5
|
return data;
|
|
@@ -412,7 +413,7 @@ var QueryClient = class {
|
|
|
412
413
|
setQueryData(queryKey, updater, options) {
|
|
413
414
|
const defaultedOptions = this.defaultQueryOptions({ queryKey });
|
|
414
415
|
const prevData = this.#queryCache.get(defaultedOptions.queryHash)?.state.data;
|
|
415
|
-
const data = functionalUpdate
|
|
416
|
+
const data = functionalUpdate(updater, prevData);
|
|
416
417
|
if (data === void 0) return;
|
|
417
418
|
return this.#queryCache.build(this, defaultedOptions).setData(data, {
|
|
418
419
|
...options,
|
|
@@ -1132,981 +1133,6 @@ function createRandomKey() {
|
|
|
1132
1133
|
return (Math.random() + 1).toString(36).substring(7);
|
|
1133
1134
|
}
|
|
1134
1135
|
//#endregion
|
|
1135
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/utils.js
|
|
1136
|
-
function last(arr) {
|
|
1137
|
-
return arr[arr.length - 1];
|
|
1138
|
-
}
|
|
1139
|
-
function isFunction$1(d) {
|
|
1140
|
-
return typeof d === "function";
|
|
1141
|
-
}
|
|
1142
|
-
function functionalUpdate(updater, previous) {
|
|
1143
|
-
if (isFunction$1(updater)) return updater(previous);
|
|
1144
|
-
return updater;
|
|
1145
|
-
}
|
|
1146
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
1147
|
-
function replaceEqualDeep(prev, _next) {
|
|
1148
|
-
if (prev === _next) return prev;
|
|
1149
|
-
const next = _next;
|
|
1150
|
-
const array = isPlainArray(prev) && isPlainArray(next);
|
|
1151
|
-
if (!array && !(isPlainObject$1(prev) && isPlainObject$1(next))) return next;
|
|
1152
|
-
const prevItems = array ? prev : getEnumerableOwnKeys(prev);
|
|
1153
|
-
if (!prevItems) return next;
|
|
1154
|
-
const nextItems = array ? next : getEnumerableOwnKeys(next);
|
|
1155
|
-
if (!nextItems) return next;
|
|
1156
|
-
const prevSize = prevItems.length;
|
|
1157
|
-
const nextSize = nextItems.length;
|
|
1158
|
-
const copy = array ? new Array(nextSize) : {};
|
|
1159
|
-
let equalItems = 0;
|
|
1160
|
-
for (let i = 0; i < nextSize; i++) {
|
|
1161
|
-
const key = array ? i : nextItems[i];
|
|
1162
|
-
const p = prev[key];
|
|
1163
|
-
const n = next[key];
|
|
1164
|
-
if (p === n) {
|
|
1165
|
-
copy[key] = p;
|
|
1166
|
-
if (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;
|
|
1167
|
-
continue;
|
|
1168
|
-
}
|
|
1169
|
-
if (p === null || n === null || typeof p !== "object" || typeof n !== "object") {
|
|
1170
|
-
copy[key] = n;
|
|
1171
|
-
continue;
|
|
1172
|
-
}
|
|
1173
|
-
const v = replaceEqualDeep(p, n);
|
|
1174
|
-
copy[key] = v;
|
|
1175
|
-
if (v === p) equalItems++;
|
|
1176
|
-
}
|
|
1177
|
-
return prevSize === nextSize && equalItems === prevSize ? prev : copy;
|
|
1178
|
-
}
|
|
1179
|
-
function getEnumerableOwnKeys(o) {
|
|
1180
|
-
const keys = [];
|
|
1181
|
-
const names = Object.getOwnPropertyNames(o);
|
|
1182
|
-
for (const name of names) {
|
|
1183
|
-
if (!Object.prototype.propertyIsEnumerable.call(o, name)) return false;
|
|
1184
|
-
keys.push(name);
|
|
1185
|
-
}
|
|
1186
|
-
const symbols = Object.getOwnPropertySymbols(o);
|
|
1187
|
-
for (const symbol of symbols) {
|
|
1188
|
-
if (!Object.prototype.propertyIsEnumerable.call(o, symbol)) return false;
|
|
1189
|
-
keys.push(symbol);
|
|
1190
|
-
}
|
|
1191
|
-
return keys;
|
|
1192
|
-
}
|
|
1193
|
-
function isPlainObject$1(o) {
|
|
1194
|
-
if (!hasObjectPrototype(o)) return false;
|
|
1195
|
-
const ctor = o.constructor;
|
|
1196
|
-
if (typeof ctor === "undefined") return true;
|
|
1197
|
-
const prot = ctor.prototype;
|
|
1198
|
-
if (!hasObjectPrototype(prot)) return false;
|
|
1199
|
-
if (!prot.hasOwnProperty("isPrototypeOf")) return false;
|
|
1200
|
-
return true;
|
|
1201
|
-
}
|
|
1202
|
-
function hasObjectPrototype(o) {
|
|
1203
|
-
return Object.prototype.toString.call(o) === "[object Object]";
|
|
1204
|
-
}
|
|
1205
|
-
function isPlainArray(value) {
|
|
1206
|
-
return Array.isArray(value) && value.length === Object.keys(value).length;
|
|
1207
|
-
}
|
|
1208
|
-
function deepEqual(a, b, opts) {
|
|
1209
|
-
if (a === b) return true;
|
|
1210
|
-
if (typeof a !== typeof b) return false;
|
|
1211
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
1212
|
-
if (a.length !== b.length) return false;
|
|
1213
|
-
for (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;
|
|
1214
|
-
return true;
|
|
1215
|
-
}
|
|
1216
|
-
if (isPlainObject$1(a) && isPlainObject$1(b)) {
|
|
1217
|
-
const ignoreUndefined = opts?.ignoreUndefined ?? true;
|
|
1218
|
-
if (opts?.partial) {
|
|
1219
|
-
for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
|
|
1220
|
-
if (!deepEqual(a[k], b[k], opts)) return false;
|
|
1221
|
-
}
|
|
1222
|
-
return true;
|
|
1223
|
-
}
|
|
1224
|
-
let aCount = 0;
|
|
1225
|
-
if (!ignoreUndefined) aCount = Object.keys(a).length;
|
|
1226
|
-
else for (const k in a) if (a[k] !== void 0) aCount++;
|
|
1227
|
-
let bCount = 0;
|
|
1228
|
-
for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
|
|
1229
|
-
bCount++;
|
|
1230
|
-
if (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;
|
|
1231
|
-
}
|
|
1232
|
-
return aCount === bCount;
|
|
1233
|
-
}
|
|
1234
|
-
return false;
|
|
1235
|
-
}
|
|
1236
|
-
function createControlledPromise(onResolve) {
|
|
1237
|
-
let resolveLoadPromise;
|
|
1238
|
-
let rejectLoadPromise;
|
|
1239
|
-
const controlledPromise = new Promise((resolve, reject) => {
|
|
1240
|
-
resolveLoadPromise = resolve;
|
|
1241
|
-
rejectLoadPromise = reject;
|
|
1242
|
-
});
|
|
1243
|
-
controlledPromise.status = "pending";
|
|
1244
|
-
controlledPromise.resolve = (value) => {
|
|
1245
|
-
controlledPromise.status = "resolved";
|
|
1246
|
-
controlledPromise.value = value;
|
|
1247
|
-
resolveLoadPromise(value);
|
|
1248
|
-
onResolve?.(value);
|
|
1249
|
-
};
|
|
1250
|
-
controlledPromise.reject = (e) => {
|
|
1251
|
-
controlledPromise.status = "rejected";
|
|
1252
|
-
rejectLoadPromise(e);
|
|
1253
|
-
};
|
|
1254
|
-
return controlledPromise;
|
|
1255
|
-
}
|
|
1256
|
-
function isModuleNotFoundError(error) {
|
|
1257
|
-
if (typeof error?.message !== "string") return false;
|
|
1258
|
-
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");
|
|
1259
|
-
}
|
|
1260
|
-
function isPromise(value) {
|
|
1261
|
-
return Boolean(value && typeof value === "object" && typeof value.then === "function");
|
|
1262
|
-
}
|
|
1263
|
-
function findLast(array, predicate) {
|
|
1264
|
-
for (let i = array.length - 1; i >= 0; i--) {
|
|
1265
|
-
const item = array[i];
|
|
1266
|
-
if (predicate(item)) return item;
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
function decodeSegment(segment) {
|
|
1270
|
-
try {
|
|
1271
|
-
return decodeURI(segment);
|
|
1272
|
-
} catch {
|
|
1273
|
-
return segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {
|
|
1274
|
-
try {
|
|
1275
|
-
return decodeURI(match);
|
|
1276
|
-
} catch {
|
|
1277
|
-
return match;
|
|
1278
|
-
}
|
|
1279
|
-
});
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
function decodePath(path, decodeIgnore) {
|
|
1283
|
-
if (!path) return path;
|
|
1284
|
-
const re = decodeIgnore ? new RegExp(`${decodeIgnore.join("|")}`, "gi") : /%25|%5C/gi;
|
|
1285
|
-
let cursor = 0;
|
|
1286
|
-
let result = "";
|
|
1287
|
-
let match;
|
|
1288
|
-
while (null !== (match = re.exec(path))) {
|
|
1289
|
-
result += decodeSegment(path.slice(cursor, match.index)) + match[0];
|
|
1290
|
-
cursor = re.lastIndex;
|
|
1291
|
-
}
|
|
1292
|
-
return result + decodeSegment(cursor ? path.slice(cursor) : path);
|
|
1293
|
-
}
|
|
1294
|
-
//#endregion
|
|
1295
|
-
//#region ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
1296
|
-
var isProduction$1 = process.env.NODE_ENV === "production";
|
|
1297
|
-
var prefix = "Invariant failed";
|
|
1298
|
-
function invariant(condition, message) {
|
|
1299
|
-
if (condition) return;
|
|
1300
|
-
if (isProduction$1) throw new Error(prefix);
|
|
1301
|
-
var provided = typeof message === "function" ? message() : message;
|
|
1302
|
-
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
1303
|
-
throw new Error(value);
|
|
1304
|
-
}
|
|
1305
|
-
//#endregion
|
|
1306
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/lru-cache.js
|
|
1307
|
-
function createLRUCache(max) {
|
|
1308
|
-
const cache = /* @__PURE__ */ new Map();
|
|
1309
|
-
let oldest;
|
|
1310
|
-
let newest;
|
|
1311
|
-
const touch = (entry) => {
|
|
1312
|
-
if (!entry.next) return;
|
|
1313
|
-
if (!entry.prev) {
|
|
1314
|
-
entry.next.prev = void 0;
|
|
1315
|
-
oldest = entry.next;
|
|
1316
|
-
entry.next = void 0;
|
|
1317
|
-
if (newest) {
|
|
1318
|
-
entry.prev = newest;
|
|
1319
|
-
newest.next = entry;
|
|
1320
|
-
}
|
|
1321
|
-
} else {
|
|
1322
|
-
entry.prev.next = entry.next;
|
|
1323
|
-
entry.next.prev = entry.prev;
|
|
1324
|
-
entry.next = void 0;
|
|
1325
|
-
if (newest) {
|
|
1326
|
-
newest.next = entry;
|
|
1327
|
-
entry.prev = newest;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
newest = entry;
|
|
1331
|
-
};
|
|
1332
|
-
return {
|
|
1333
|
-
get(key) {
|
|
1334
|
-
const entry = cache.get(key);
|
|
1335
|
-
if (!entry) return void 0;
|
|
1336
|
-
touch(entry);
|
|
1337
|
-
return entry.value;
|
|
1338
|
-
},
|
|
1339
|
-
set(key, value) {
|
|
1340
|
-
if (cache.size >= max && oldest) {
|
|
1341
|
-
const toDelete = oldest;
|
|
1342
|
-
cache.delete(toDelete.key);
|
|
1343
|
-
if (toDelete.next) {
|
|
1344
|
-
oldest = toDelete.next;
|
|
1345
|
-
toDelete.next.prev = void 0;
|
|
1346
|
-
}
|
|
1347
|
-
if (toDelete === newest) newest = void 0;
|
|
1348
|
-
}
|
|
1349
|
-
const existing = cache.get(key);
|
|
1350
|
-
if (existing) {
|
|
1351
|
-
existing.value = value;
|
|
1352
|
-
touch(existing);
|
|
1353
|
-
} else {
|
|
1354
|
-
const entry = {
|
|
1355
|
-
key,
|
|
1356
|
-
value,
|
|
1357
|
-
prev: newest
|
|
1358
|
-
};
|
|
1359
|
-
if (newest) newest.next = entry;
|
|
1360
|
-
newest = entry;
|
|
1361
|
-
if (!oldest) oldest = entry;
|
|
1362
|
-
cache.set(key, entry);
|
|
1363
|
-
}
|
|
1364
|
-
},
|
|
1365
|
-
clear() {
|
|
1366
|
-
cache.clear();
|
|
1367
|
-
oldest = void 0;
|
|
1368
|
-
newest = void 0;
|
|
1369
|
-
}
|
|
1370
|
-
};
|
|
1371
|
-
}
|
|
1372
|
-
var SEGMENT_TYPE_INDEX = 4;
|
|
1373
|
-
var PARAM_W_CURLY_BRACES_RE = /^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/;
|
|
1374
|
-
var OPTIONAL_PARAM_W_CURLY_BRACES_RE = /^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/;
|
|
1375
|
-
var WILDCARD_W_CURLY_BRACES_RE = /^([^{]*)\{\$\}([^}]*)$/;
|
|
1376
|
-
function parseSegment(path, start, output = new Uint16Array(6)) {
|
|
1377
|
-
const next = path.indexOf("/", start);
|
|
1378
|
-
const end = next === -1 ? path.length : next;
|
|
1379
|
-
const part = path.substring(start, end);
|
|
1380
|
-
if (!part || !part.includes("$")) {
|
|
1381
|
-
output[0] = 0;
|
|
1382
|
-
output[1] = start;
|
|
1383
|
-
output[2] = start;
|
|
1384
|
-
output[3] = end;
|
|
1385
|
-
output[4] = end;
|
|
1386
|
-
output[5] = end;
|
|
1387
|
-
return output;
|
|
1388
|
-
}
|
|
1389
|
-
if (part === "$") {
|
|
1390
|
-
const total = path.length;
|
|
1391
|
-
output[0] = 2;
|
|
1392
|
-
output[1] = start;
|
|
1393
|
-
output[2] = start;
|
|
1394
|
-
output[3] = total;
|
|
1395
|
-
output[4] = total;
|
|
1396
|
-
output[5] = total;
|
|
1397
|
-
return output;
|
|
1398
|
-
}
|
|
1399
|
-
if (part.charCodeAt(0) === 36) {
|
|
1400
|
-
output[0] = 1;
|
|
1401
|
-
output[1] = start;
|
|
1402
|
-
output[2] = start + 1;
|
|
1403
|
-
output[3] = end;
|
|
1404
|
-
output[4] = end;
|
|
1405
|
-
output[5] = end;
|
|
1406
|
-
return output;
|
|
1407
|
-
}
|
|
1408
|
-
const wildcardBracesMatch = part.match(WILDCARD_W_CURLY_BRACES_RE);
|
|
1409
|
-
if (wildcardBracesMatch) {
|
|
1410
|
-
const pLength = wildcardBracesMatch[1].length;
|
|
1411
|
-
output[0] = 2;
|
|
1412
|
-
output[1] = start + pLength;
|
|
1413
|
-
output[2] = start + pLength + 1;
|
|
1414
|
-
output[3] = start + pLength + 2;
|
|
1415
|
-
output[4] = start + pLength + 3;
|
|
1416
|
-
output[5] = path.length;
|
|
1417
|
-
return output;
|
|
1418
|
-
}
|
|
1419
|
-
const optionalParamBracesMatch = part.match(OPTIONAL_PARAM_W_CURLY_BRACES_RE);
|
|
1420
|
-
if (optionalParamBracesMatch) {
|
|
1421
|
-
const prefix = optionalParamBracesMatch[1];
|
|
1422
|
-
const paramName = optionalParamBracesMatch[2];
|
|
1423
|
-
const suffix = optionalParamBracesMatch[3];
|
|
1424
|
-
const pLength = prefix.length;
|
|
1425
|
-
output[0] = 3;
|
|
1426
|
-
output[1] = start + pLength;
|
|
1427
|
-
output[2] = start + pLength + 3;
|
|
1428
|
-
output[3] = start + pLength + 3 + paramName.length;
|
|
1429
|
-
output[4] = end - suffix.length;
|
|
1430
|
-
output[5] = end;
|
|
1431
|
-
return output;
|
|
1432
|
-
}
|
|
1433
|
-
const paramBracesMatch = part.match(PARAM_W_CURLY_BRACES_RE);
|
|
1434
|
-
if (paramBracesMatch) {
|
|
1435
|
-
const prefix = paramBracesMatch[1];
|
|
1436
|
-
const paramName = paramBracesMatch[2];
|
|
1437
|
-
const suffix = paramBracesMatch[3];
|
|
1438
|
-
const pLength = prefix.length;
|
|
1439
|
-
output[0] = 1;
|
|
1440
|
-
output[1] = start + pLength;
|
|
1441
|
-
output[2] = start + pLength + 2;
|
|
1442
|
-
output[3] = start + pLength + 2 + paramName.length;
|
|
1443
|
-
output[4] = end - suffix.length;
|
|
1444
|
-
output[5] = end;
|
|
1445
|
-
return output;
|
|
1446
|
-
}
|
|
1447
|
-
output[0] = 0;
|
|
1448
|
-
output[1] = start;
|
|
1449
|
-
output[2] = start;
|
|
1450
|
-
output[3] = end;
|
|
1451
|
-
output[4] = end;
|
|
1452
|
-
output[5] = end;
|
|
1453
|
-
return output;
|
|
1454
|
-
}
|
|
1455
|
-
function parseSegments(defaultCaseSensitive, data, route, start, node, depth, onRoute) {
|
|
1456
|
-
onRoute?.(route);
|
|
1457
|
-
let cursor = start;
|
|
1458
|
-
{
|
|
1459
|
-
const path = route.fullPath ?? route.from;
|
|
1460
|
-
const length = path.length;
|
|
1461
|
-
const caseSensitive = route.options?.caseSensitive ?? defaultCaseSensitive;
|
|
1462
|
-
while (cursor < length) {
|
|
1463
|
-
const segment = parseSegment(path, cursor, data);
|
|
1464
|
-
let nextNode;
|
|
1465
|
-
const start2 = cursor;
|
|
1466
|
-
const end = segment[5];
|
|
1467
|
-
cursor = end + 1;
|
|
1468
|
-
depth++;
|
|
1469
|
-
switch (segment[0]) {
|
|
1470
|
-
case 0: {
|
|
1471
|
-
const value = path.substring(segment[2], segment[3]);
|
|
1472
|
-
if (caseSensitive) {
|
|
1473
|
-
const existingNode = node.static?.get(value);
|
|
1474
|
-
if (existingNode) nextNode = existingNode;
|
|
1475
|
-
else {
|
|
1476
|
-
node.static ??= /* @__PURE__ */ new Map();
|
|
1477
|
-
const next = createStaticNode(route.fullPath ?? route.from);
|
|
1478
|
-
next.parent = node;
|
|
1479
|
-
next.depth = depth;
|
|
1480
|
-
nextNode = next;
|
|
1481
|
-
node.static.set(value, next);
|
|
1482
|
-
}
|
|
1483
|
-
} else {
|
|
1484
|
-
const name = value.toLowerCase();
|
|
1485
|
-
const existingNode = node.staticInsensitive?.get(name);
|
|
1486
|
-
if (existingNode) nextNode = existingNode;
|
|
1487
|
-
else {
|
|
1488
|
-
node.staticInsensitive ??= /* @__PURE__ */ new Map();
|
|
1489
|
-
const next = createStaticNode(route.fullPath ?? route.from);
|
|
1490
|
-
next.parent = node;
|
|
1491
|
-
next.depth = depth;
|
|
1492
|
-
nextNode = next;
|
|
1493
|
-
node.staticInsensitive.set(name, next);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
break;
|
|
1497
|
-
}
|
|
1498
|
-
case 1: {
|
|
1499
|
-
const prefix_raw = path.substring(start2, segment[1]);
|
|
1500
|
-
const suffix_raw = path.substring(segment[4], end);
|
|
1501
|
-
const actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);
|
|
1502
|
-
const prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();
|
|
1503
|
-
const suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();
|
|
1504
|
-
const existingNode = node.dynamic?.find((s) => s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);
|
|
1505
|
-
if (existingNode) nextNode = existingNode;
|
|
1506
|
-
else {
|
|
1507
|
-
const next = createDynamicNode(1, route.fullPath ?? route.from, actuallyCaseSensitive, prefix, suffix);
|
|
1508
|
-
nextNode = next;
|
|
1509
|
-
next.depth = depth;
|
|
1510
|
-
next.parent = node;
|
|
1511
|
-
node.dynamic ??= [];
|
|
1512
|
-
node.dynamic.push(next);
|
|
1513
|
-
}
|
|
1514
|
-
break;
|
|
1515
|
-
}
|
|
1516
|
-
case 3: {
|
|
1517
|
-
const prefix_raw = path.substring(start2, segment[1]);
|
|
1518
|
-
const suffix_raw = path.substring(segment[4], end);
|
|
1519
|
-
const actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);
|
|
1520
|
-
const prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();
|
|
1521
|
-
const suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();
|
|
1522
|
-
const existingNode = node.optional?.find((s) => s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);
|
|
1523
|
-
if (existingNode) nextNode = existingNode;
|
|
1524
|
-
else {
|
|
1525
|
-
const next = createDynamicNode(3, route.fullPath ?? route.from, actuallyCaseSensitive, prefix, suffix);
|
|
1526
|
-
nextNode = next;
|
|
1527
|
-
next.parent = node;
|
|
1528
|
-
next.depth = depth;
|
|
1529
|
-
node.optional ??= [];
|
|
1530
|
-
node.optional.push(next);
|
|
1531
|
-
}
|
|
1532
|
-
break;
|
|
1533
|
-
}
|
|
1534
|
-
case 2: {
|
|
1535
|
-
const prefix_raw = path.substring(start2, segment[1]);
|
|
1536
|
-
const suffix_raw = path.substring(segment[4], end);
|
|
1537
|
-
const actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);
|
|
1538
|
-
const prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();
|
|
1539
|
-
const suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();
|
|
1540
|
-
const next = createDynamicNode(2, route.fullPath ?? route.from, actuallyCaseSensitive, prefix, suffix);
|
|
1541
|
-
nextNode = next;
|
|
1542
|
-
next.parent = node;
|
|
1543
|
-
next.depth = depth;
|
|
1544
|
-
node.wildcard ??= [];
|
|
1545
|
-
node.wildcard.push(next);
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
node = nextNode;
|
|
1549
|
-
}
|
|
1550
|
-
const isLeaf = (route.path || !route.children) && !route.isRoot;
|
|
1551
|
-
if (isLeaf && path.endsWith("/")) {
|
|
1552
|
-
const indexNode = createStaticNode(route.fullPath ?? route.from);
|
|
1553
|
-
indexNode.kind = SEGMENT_TYPE_INDEX;
|
|
1554
|
-
indexNode.parent = node;
|
|
1555
|
-
depth++;
|
|
1556
|
-
indexNode.depth = depth;
|
|
1557
|
-
node.index = indexNode;
|
|
1558
|
-
node = indexNode;
|
|
1559
|
-
}
|
|
1560
|
-
if (isLeaf && !node.route) {
|
|
1561
|
-
node.route = route;
|
|
1562
|
-
node.fullPath = route.fullPath ?? route.from;
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
if (route.children) for (const child of route.children) parseSegments(defaultCaseSensitive, data, child, cursor, node, depth, onRoute);
|
|
1566
|
-
}
|
|
1567
|
-
function sortDynamic(a, b) {
|
|
1568
|
-
if (a.prefix && b.prefix && a.prefix !== b.prefix) {
|
|
1569
|
-
if (a.prefix.startsWith(b.prefix)) return -1;
|
|
1570
|
-
if (b.prefix.startsWith(a.prefix)) return 1;
|
|
1571
|
-
}
|
|
1572
|
-
if (a.suffix && b.suffix && a.suffix !== b.suffix) {
|
|
1573
|
-
if (a.suffix.endsWith(b.suffix)) return -1;
|
|
1574
|
-
if (b.suffix.endsWith(a.suffix)) return 1;
|
|
1575
|
-
}
|
|
1576
|
-
if (a.prefix && !b.prefix) return -1;
|
|
1577
|
-
if (!a.prefix && b.prefix) return 1;
|
|
1578
|
-
if (a.suffix && !b.suffix) return -1;
|
|
1579
|
-
if (!a.suffix && b.suffix) return 1;
|
|
1580
|
-
if (a.caseSensitive && !b.caseSensitive) return -1;
|
|
1581
|
-
if (!a.caseSensitive && b.caseSensitive) return 1;
|
|
1582
|
-
return 0;
|
|
1583
|
-
}
|
|
1584
|
-
function sortTreeNodes(node) {
|
|
1585
|
-
if (node.static) for (const child of node.static.values()) sortTreeNodes(child);
|
|
1586
|
-
if (node.staticInsensitive) for (const child of node.staticInsensitive.values()) sortTreeNodes(child);
|
|
1587
|
-
if (node.dynamic?.length) {
|
|
1588
|
-
node.dynamic.sort(sortDynamic);
|
|
1589
|
-
for (const child of node.dynamic) sortTreeNodes(child);
|
|
1590
|
-
}
|
|
1591
|
-
if (node.optional?.length) {
|
|
1592
|
-
node.optional.sort(sortDynamic);
|
|
1593
|
-
for (const child of node.optional) sortTreeNodes(child);
|
|
1594
|
-
}
|
|
1595
|
-
if (node.wildcard?.length) {
|
|
1596
|
-
node.wildcard.sort(sortDynamic);
|
|
1597
|
-
for (const child of node.wildcard) sortTreeNodes(child);
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
function createStaticNode(fullPath) {
|
|
1601
|
-
return {
|
|
1602
|
-
kind: 0,
|
|
1603
|
-
depth: 0,
|
|
1604
|
-
index: null,
|
|
1605
|
-
static: null,
|
|
1606
|
-
staticInsensitive: null,
|
|
1607
|
-
dynamic: null,
|
|
1608
|
-
optional: null,
|
|
1609
|
-
wildcard: null,
|
|
1610
|
-
route: null,
|
|
1611
|
-
fullPath,
|
|
1612
|
-
parent: null
|
|
1613
|
-
};
|
|
1614
|
-
}
|
|
1615
|
-
function createDynamicNode(kind, fullPath, caseSensitive, prefix, suffix) {
|
|
1616
|
-
return {
|
|
1617
|
-
kind,
|
|
1618
|
-
depth: 0,
|
|
1619
|
-
index: null,
|
|
1620
|
-
static: null,
|
|
1621
|
-
staticInsensitive: null,
|
|
1622
|
-
dynamic: null,
|
|
1623
|
-
optional: null,
|
|
1624
|
-
wildcard: null,
|
|
1625
|
-
route: null,
|
|
1626
|
-
fullPath,
|
|
1627
|
-
parent: null,
|
|
1628
|
-
caseSensitive,
|
|
1629
|
-
prefix,
|
|
1630
|
-
suffix
|
|
1631
|
-
};
|
|
1632
|
-
}
|
|
1633
|
-
function processRouteMasks(routeList, processedTree) {
|
|
1634
|
-
const segmentTree = createStaticNode("/");
|
|
1635
|
-
const data = new Uint16Array(6);
|
|
1636
|
-
for (const route of routeList) parseSegments(false, data, route, 1, segmentTree, 0);
|
|
1637
|
-
sortTreeNodes(segmentTree);
|
|
1638
|
-
processedTree.masksTree = segmentTree;
|
|
1639
|
-
processedTree.flatCache = createLRUCache(1e3);
|
|
1640
|
-
}
|
|
1641
|
-
function findFlatMatch(path, processedTree) {
|
|
1642
|
-
path ||= "/";
|
|
1643
|
-
const cached = processedTree.flatCache.get(path);
|
|
1644
|
-
if (cached) return cached;
|
|
1645
|
-
const result = findMatch(path, processedTree.masksTree);
|
|
1646
|
-
processedTree.flatCache.set(path, result);
|
|
1647
|
-
return result;
|
|
1648
|
-
}
|
|
1649
|
-
function findSingleMatch(from, caseSensitive, fuzzy, path, processedTree) {
|
|
1650
|
-
from ||= "/";
|
|
1651
|
-
path ||= "/";
|
|
1652
|
-
const key = caseSensitive ? `case\0${from}` : from;
|
|
1653
|
-
let tree = processedTree.singleCache.get(key);
|
|
1654
|
-
if (!tree) {
|
|
1655
|
-
tree = createStaticNode("/");
|
|
1656
|
-
parseSegments(caseSensitive, new Uint16Array(6), { from }, 1, tree, 0);
|
|
1657
|
-
processedTree.singleCache.set(key, tree);
|
|
1658
|
-
}
|
|
1659
|
-
return findMatch(path, tree, fuzzy);
|
|
1660
|
-
}
|
|
1661
|
-
function findRouteMatch(path, processedTree, fuzzy = false) {
|
|
1662
|
-
const key = fuzzy ? path : `nofuzz\0${path}`;
|
|
1663
|
-
const cached = processedTree.matchCache.get(key);
|
|
1664
|
-
if (cached !== void 0) return cached;
|
|
1665
|
-
path ||= "/";
|
|
1666
|
-
const result = findMatch(path, processedTree.segmentTree, fuzzy);
|
|
1667
|
-
if (result) result.branch = buildRouteBranch(result.route);
|
|
1668
|
-
processedTree.matchCache.set(key, result);
|
|
1669
|
-
return result;
|
|
1670
|
-
}
|
|
1671
|
-
function trimPathRight$1(path) {
|
|
1672
|
-
return path === "/" ? path : path.replace(/\/{1,}$/, "");
|
|
1673
|
-
}
|
|
1674
|
-
function processRouteTree(routeTree, caseSensitive = false, initRoute) {
|
|
1675
|
-
const segmentTree = createStaticNode(routeTree.fullPath);
|
|
1676
|
-
const data = new Uint16Array(6);
|
|
1677
|
-
const routesById = {};
|
|
1678
|
-
const routesByPath = {};
|
|
1679
|
-
let index = 0;
|
|
1680
|
-
parseSegments(caseSensitive, data, routeTree, 1, segmentTree, 0, (route) => {
|
|
1681
|
-
initRoute?.(route, index);
|
|
1682
|
-
invariant(!(route.id in routesById), `Duplicate routes found with id: ${String(route.id)}`);
|
|
1683
|
-
routesById[route.id] = route;
|
|
1684
|
-
if (index !== 0 && route.path) {
|
|
1685
|
-
const trimmedFullPath = trimPathRight$1(route.fullPath);
|
|
1686
|
-
if (!routesByPath[trimmedFullPath] || route.fullPath.endsWith("/")) routesByPath[trimmedFullPath] = route;
|
|
1687
|
-
}
|
|
1688
|
-
index++;
|
|
1689
|
-
});
|
|
1690
|
-
sortTreeNodes(segmentTree);
|
|
1691
|
-
return {
|
|
1692
|
-
processedTree: {
|
|
1693
|
-
segmentTree,
|
|
1694
|
-
singleCache: createLRUCache(1e3),
|
|
1695
|
-
matchCache: createLRUCache(1e3),
|
|
1696
|
-
flatCache: null,
|
|
1697
|
-
masksTree: null
|
|
1698
|
-
},
|
|
1699
|
-
routesById,
|
|
1700
|
-
routesByPath
|
|
1701
|
-
};
|
|
1702
|
-
}
|
|
1703
|
-
function findMatch(path, segmentTree, fuzzy = false) {
|
|
1704
|
-
const parts = path.split("/");
|
|
1705
|
-
const leaf = getNodeMatch(path, parts, segmentTree, fuzzy);
|
|
1706
|
-
if (!leaf) return null;
|
|
1707
|
-
const params = extractParams(path, parts, leaf);
|
|
1708
|
-
if ("**" in leaf) params["**"] = leaf["**"];
|
|
1709
|
-
return {
|
|
1710
|
-
route: leaf.node.route,
|
|
1711
|
-
params
|
|
1712
|
-
};
|
|
1713
|
-
}
|
|
1714
|
-
function extractParams(path, parts, leaf) {
|
|
1715
|
-
const list = buildBranch(leaf.node);
|
|
1716
|
-
let nodeParts = null;
|
|
1717
|
-
const params = {};
|
|
1718
|
-
for (let partIndex = 0, nodeIndex = 0, pathIndex = 0; nodeIndex < list.length; partIndex++, nodeIndex++, pathIndex++) {
|
|
1719
|
-
const node = list[nodeIndex];
|
|
1720
|
-
const part = parts[partIndex];
|
|
1721
|
-
const currentPathIndex = pathIndex;
|
|
1722
|
-
if (part) pathIndex += part.length;
|
|
1723
|
-
if (node.kind === 1) {
|
|
1724
|
-
nodeParts ??= leaf.node.fullPath.split("/");
|
|
1725
|
-
const nodePart = nodeParts[nodeIndex];
|
|
1726
|
-
const preLength = node.prefix?.length ?? 0;
|
|
1727
|
-
if (nodePart.charCodeAt(preLength) === 123) {
|
|
1728
|
-
const sufLength = node.suffix?.length ?? 0;
|
|
1729
|
-
const name = nodePart.substring(preLength + 2, nodePart.length - sufLength - 1);
|
|
1730
|
-
const value = part.substring(preLength, part.length - sufLength);
|
|
1731
|
-
params[name] = decodeURIComponent(value);
|
|
1732
|
-
} else {
|
|
1733
|
-
const name = nodePart.substring(1);
|
|
1734
|
-
params[name] = decodeURIComponent(part);
|
|
1735
|
-
}
|
|
1736
|
-
} else if (node.kind === 3) {
|
|
1737
|
-
if (leaf.skipped & 1 << nodeIndex) {
|
|
1738
|
-
partIndex--;
|
|
1739
|
-
continue;
|
|
1740
|
-
}
|
|
1741
|
-
nodeParts ??= leaf.node.fullPath.split("/");
|
|
1742
|
-
const nodePart = nodeParts[nodeIndex];
|
|
1743
|
-
const preLength = node.prefix?.length ?? 0;
|
|
1744
|
-
const sufLength = node.suffix?.length ?? 0;
|
|
1745
|
-
const name = nodePart.substring(preLength + 3, nodePart.length - sufLength - 1);
|
|
1746
|
-
const value = node.suffix || node.prefix ? part.substring(preLength, part.length - sufLength) : part;
|
|
1747
|
-
if (value) params[name] = decodeURIComponent(value);
|
|
1748
|
-
} else if (node.kind === 2) {
|
|
1749
|
-
const n = node;
|
|
1750
|
-
const value = path.substring(currentPathIndex + (n.prefix?.length ?? 0), path.length - (n.suffix?.length ?? 0));
|
|
1751
|
-
const splat = decodeURIComponent(value);
|
|
1752
|
-
params["*"] = splat;
|
|
1753
|
-
params._splat = splat;
|
|
1754
|
-
break;
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return params;
|
|
1758
|
-
}
|
|
1759
|
-
function buildRouteBranch(route) {
|
|
1760
|
-
const list = [route];
|
|
1761
|
-
while (route.parentRoute) {
|
|
1762
|
-
route = route.parentRoute;
|
|
1763
|
-
list.push(route);
|
|
1764
|
-
}
|
|
1765
|
-
list.reverse();
|
|
1766
|
-
return list;
|
|
1767
|
-
}
|
|
1768
|
-
function buildBranch(node) {
|
|
1769
|
-
const list = Array(node.depth + 1);
|
|
1770
|
-
do {
|
|
1771
|
-
list[node.depth] = node;
|
|
1772
|
-
node = node.parent;
|
|
1773
|
-
} while (node);
|
|
1774
|
-
return list;
|
|
1775
|
-
}
|
|
1776
|
-
function getNodeMatch(path, parts, segmentTree, fuzzy) {
|
|
1777
|
-
if (path === "/" && segmentTree.index) return {
|
|
1778
|
-
node: segmentTree.index,
|
|
1779
|
-
skipped: 0
|
|
1780
|
-
};
|
|
1781
|
-
const trailingSlash = !last(parts);
|
|
1782
|
-
const pathIsIndex = trailingSlash && path !== "/";
|
|
1783
|
-
const partsLength = parts.length - (trailingSlash ? 1 : 0);
|
|
1784
|
-
const stack = [{
|
|
1785
|
-
node: segmentTree,
|
|
1786
|
-
index: 1,
|
|
1787
|
-
skipped: 0,
|
|
1788
|
-
depth: 1,
|
|
1789
|
-
statics: 1,
|
|
1790
|
-
dynamics: 0,
|
|
1791
|
-
optionals: 0
|
|
1792
|
-
}];
|
|
1793
|
-
let wildcardMatch = null;
|
|
1794
|
-
let bestFuzzy = null;
|
|
1795
|
-
let bestMatch = null;
|
|
1796
|
-
while (stack.length) {
|
|
1797
|
-
const frame = stack.pop();
|
|
1798
|
-
let { node, index, skipped, depth, statics, dynamics, optionals } = frame;
|
|
1799
|
-
if (fuzzy && node.route && node.kind !== SEGMENT_TYPE_INDEX && isFrameMoreSpecific(bestFuzzy, frame)) bestFuzzy = frame;
|
|
1800
|
-
const isBeyondPath = index === partsLength;
|
|
1801
|
-
if (isBeyondPath) {
|
|
1802
|
-
if (node.route && !pathIsIndex && isFrameMoreSpecific(bestMatch, frame)) bestMatch = frame;
|
|
1803
|
-
if (!node.optional && !node.wildcard && !node.index) continue;
|
|
1804
|
-
}
|
|
1805
|
-
const part = isBeyondPath ? void 0 : parts[index];
|
|
1806
|
-
let lowerPart;
|
|
1807
|
-
if (isBeyondPath && node.index) {
|
|
1808
|
-
const indexFrame = {
|
|
1809
|
-
node: node.index,
|
|
1810
|
-
index,
|
|
1811
|
-
skipped,
|
|
1812
|
-
depth: depth + 1,
|
|
1813
|
-
statics,
|
|
1814
|
-
dynamics,
|
|
1815
|
-
optionals
|
|
1816
|
-
};
|
|
1817
|
-
if (statics === partsLength && !dynamics && !optionals && !skipped) return indexFrame;
|
|
1818
|
-
if (isFrameMoreSpecific(bestMatch, indexFrame)) bestMatch = indexFrame;
|
|
1819
|
-
}
|
|
1820
|
-
if (node.wildcard && isFrameMoreSpecific(wildcardMatch, frame)) for (const segment of node.wildcard) {
|
|
1821
|
-
const { prefix, suffix } = segment;
|
|
1822
|
-
if (prefix) {
|
|
1823
|
-
if (isBeyondPath) continue;
|
|
1824
|
-
if (!(segment.caseSensitive ? part : lowerPart ??= part.toLowerCase()).startsWith(prefix)) continue;
|
|
1825
|
-
}
|
|
1826
|
-
if (suffix) {
|
|
1827
|
-
if (isBeyondPath) continue;
|
|
1828
|
-
const end = parts.slice(index).join("/").slice(-suffix.length);
|
|
1829
|
-
if ((segment.caseSensitive ? end : end.toLowerCase()) !== suffix) continue;
|
|
1830
|
-
}
|
|
1831
|
-
wildcardMatch = {
|
|
1832
|
-
node: segment,
|
|
1833
|
-
index: partsLength,
|
|
1834
|
-
skipped,
|
|
1835
|
-
depth,
|
|
1836
|
-
statics,
|
|
1837
|
-
dynamics,
|
|
1838
|
-
optionals
|
|
1839
|
-
};
|
|
1840
|
-
break;
|
|
1841
|
-
}
|
|
1842
|
-
if (node.optional) {
|
|
1843
|
-
const nextSkipped = skipped | 1 << depth;
|
|
1844
|
-
const nextDepth = depth + 1;
|
|
1845
|
-
for (let i = node.optional.length - 1; i >= 0; i--) {
|
|
1846
|
-
const segment = node.optional[i];
|
|
1847
|
-
stack.push({
|
|
1848
|
-
node: segment,
|
|
1849
|
-
index,
|
|
1850
|
-
skipped: nextSkipped,
|
|
1851
|
-
depth: nextDepth,
|
|
1852
|
-
statics,
|
|
1853
|
-
dynamics,
|
|
1854
|
-
optionals
|
|
1855
|
-
});
|
|
1856
|
-
}
|
|
1857
|
-
if (!isBeyondPath) for (let i = node.optional.length - 1; i >= 0; i--) {
|
|
1858
|
-
const segment = node.optional[i];
|
|
1859
|
-
const { prefix, suffix } = segment;
|
|
1860
|
-
if (prefix || suffix) {
|
|
1861
|
-
const casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();
|
|
1862
|
-
if (prefix && !casePart.startsWith(prefix)) continue;
|
|
1863
|
-
if (suffix && !casePart.endsWith(suffix)) continue;
|
|
1864
|
-
}
|
|
1865
|
-
stack.push({
|
|
1866
|
-
node: segment,
|
|
1867
|
-
index: index + 1,
|
|
1868
|
-
skipped,
|
|
1869
|
-
depth: nextDepth,
|
|
1870
|
-
statics,
|
|
1871
|
-
dynamics,
|
|
1872
|
-
optionals: optionals + 1
|
|
1873
|
-
});
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
if (!isBeyondPath && node.dynamic && part) for (let i = node.dynamic.length - 1; i >= 0; i--) {
|
|
1877
|
-
const segment = node.dynamic[i];
|
|
1878
|
-
const { prefix, suffix } = segment;
|
|
1879
|
-
if (prefix || suffix) {
|
|
1880
|
-
const casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();
|
|
1881
|
-
if (prefix && !casePart.startsWith(prefix)) continue;
|
|
1882
|
-
if (suffix && !casePart.endsWith(suffix)) continue;
|
|
1883
|
-
}
|
|
1884
|
-
stack.push({
|
|
1885
|
-
node: segment,
|
|
1886
|
-
index: index + 1,
|
|
1887
|
-
skipped,
|
|
1888
|
-
depth: depth + 1,
|
|
1889
|
-
statics,
|
|
1890
|
-
dynamics: dynamics + 1,
|
|
1891
|
-
optionals
|
|
1892
|
-
});
|
|
1893
|
-
}
|
|
1894
|
-
if (!isBeyondPath && node.staticInsensitive) {
|
|
1895
|
-
const match = node.staticInsensitive.get(lowerPart ??= part.toLowerCase());
|
|
1896
|
-
if (match) stack.push({
|
|
1897
|
-
node: match,
|
|
1898
|
-
index: index + 1,
|
|
1899
|
-
skipped,
|
|
1900
|
-
depth: depth + 1,
|
|
1901
|
-
statics: statics + 1,
|
|
1902
|
-
dynamics,
|
|
1903
|
-
optionals
|
|
1904
|
-
});
|
|
1905
|
-
}
|
|
1906
|
-
if (!isBeyondPath && node.static) {
|
|
1907
|
-
const match = node.static.get(part);
|
|
1908
|
-
if (match) stack.push({
|
|
1909
|
-
node: match,
|
|
1910
|
-
index: index + 1,
|
|
1911
|
-
skipped,
|
|
1912
|
-
depth: depth + 1,
|
|
1913
|
-
statics: statics + 1,
|
|
1914
|
-
dynamics,
|
|
1915
|
-
optionals
|
|
1916
|
-
});
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
if (bestMatch && wildcardMatch) return isFrameMoreSpecific(wildcardMatch, bestMatch) ? bestMatch : wildcardMatch;
|
|
1920
|
-
if (bestMatch) return bestMatch;
|
|
1921
|
-
if (wildcardMatch) return wildcardMatch;
|
|
1922
|
-
if (fuzzy && bestFuzzy) {
|
|
1923
|
-
let sliceIndex = bestFuzzy.index;
|
|
1924
|
-
for (let i = 0; i < bestFuzzy.index; i++) sliceIndex += parts[i].length;
|
|
1925
|
-
const splat = sliceIndex === path.length ? "/" : path.slice(sliceIndex);
|
|
1926
|
-
return {
|
|
1927
|
-
node: bestFuzzy.node,
|
|
1928
|
-
skipped: bestFuzzy.skipped,
|
|
1929
|
-
"**": decodeURIComponent(splat)
|
|
1930
|
-
};
|
|
1931
|
-
}
|
|
1932
|
-
return null;
|
|
1933
|
-
}
|
|
1934
|
-
function isFrameMoreSpecific(prev, next) {
|
|
1935
|
-
if (!prev) return true;
|
|
1936
|
-
return next.statics > prev.statics || next.statics === prev.statics && (next.dynamics > prev.dynamics || next.dynamics === prev.dynamics && (next.optionals > prev.optionals || next.optionals === prev.optionals && ((next.node.kind === SEGMENT_TYPE_INDEX) > (prev.node.kind === SEGMENT_TYPE_INDEX) || next.node.kind === SEGMENT_TYPE_INDEX === (prev.node.kind === SEGMENT_TYPE_INDEX) && next.depth > prev.depth)));
|
|
1937
|
-
}
|
|
1938
|
-
//#endregion
|
|
1939
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/path.js
|
|
1940
|
-
function joinPaths(paths) {
|
|
1941
|
-
return cleanPath(paths.filter((val) => {
|
|
1942
|
-
return val !== void 0;
|
|
1943
|
-
}).join("/"));
|
|
1944
|
-
}
|
|
1945
|
-
function cleanPath(path) {
|
|
1946
|
-
return path.replace(/\/{2,}/g, "/");
|
|
1947
|
-
}
|
|
1948
|
-
function trimPathLeft(path) {
|
|
1949
|
-
return path === "/" ? path : path.replace(/^\/{1,}/, "");
|
|
1950
|
-
}
|
|
1951
|
-
function trimPathRight(path) {
|
|
1952
|
-
const len = path.length;
|
|
1953
|
-
return len > 1 && path[len - 1] === "/" ? path.replace(/\/{1,}$/, "") : path;
|
|
1954
|
-
}
|
|
1955
|
-
function trimPath(path) {
|
|
1956
|
-
return trimPathRight(trimPathLeft(path));
|
|
1957
|
-
}
|
|
1958
|
-
function removeTrailingSlash(value, basepath) {
|
|
1959
|
-
if (value?.endsWith("/") && value !== "/" && value !== `${basepath}/`) return value.slice(0, -1);
|
|
1960
|
-
return value;
|
|
1961
|
-
}
|
|
1962
|
-
function exactPathTest(pathName1, pathName2, basepath) {
|
|
1963
|
-
return removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);
|
|
1964
|
-
}
|
|
1965
|
-
function resolvePath({ base, to, trailingSlash = "never", cache }) {
|
|
1966
|
-
const isAbsolute = to.startsWith("/");
|
|
1967
|
-
const isBase = !isAbsolute && to === ".";
|
|
1968
|
-
let key;
|
|
1969
|
-
if (cache) {
|
|
1970
|
-
key = isAbsolute ? to : isBase ? base : base + "\0" + to;
|
|
1971
|
-
const cached = cache.get(key);
|
|
1972
|
-
if (cached) return cached;
|
|
1973
|
-
}
|
|
1974
|
-
let baseSegments;
|
|
1975
|
-
if (isBase) baseSegments = base.split("/");
|
|
1976
|
-
else if (isAbsolute) baseSegments = to.split("/");
|
|
1977
|
-
else {
|
|
1978
|
-
baseSegments = base.split("/");
|
|
1979
|
-
while (baseSegments.length > 1 && last(baseSegments) === "") baseSegments.pop();
|
|
1980
|
-
const toSegments = to.split("/");
|
|
1981
|
-
for (let index = 0, length = toSegments.length; index < length; index++) {
|
|
1982
|
-
const value = toSegments[index];
|
|
1983
|
-
if (value === "") {
|
|
1984
|
-
if (!index) baseSegments = [value];
|
|
1985
|
-
else if (index === length - 1) baseSegments.push(value);
|
|
1986
|
-
} else if (value === "..") baseSegments.pop();
|
|
1987
|
-
else if (value === ".");
|
|
1988
|
-
else baseSegments.push(value);
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
if (baseSegments.length > 1) {
|
|
1992
|
-
if (last(baseSegments) === "") {
|
|
1993
|
-
if (trailingSlash === "never") baseSegments.pop();
|
|
1994
|
-
} else if (trailingSlash === "always") baseSegments.push("");
|
|
1995
|
-
}
|
|
1996
|
-
let segment;
|
|
1997
|
-
let joined = "";
|
|
1998
|
-
for (let i = 0; i < baseSegments.length; i++) {
|
|
1999
|
-
if (i > 0) joined += "/";
|
|
2000
|
-
const part = baseSegments[i];
|
|
2001
|
-
if (!part) continue;
|
|
2002
|
-
segment = parseSegment(part, 0, segment);
|
|
2003
|
-
const kind = segment[0];
|
|
2004
|
-
if (kind === 0) {
|
|
2005
|
-
joined += part;
|
|
2006
|
-
continue;
|
|
2007
|
-
}
|
|
2008
|
-
const end = segment[5];
|
|
2009
|
-
const prefix = part.substring(0, segment[1]);
|
|
2010
|
-
const suffix = part.substring(segment[4], end);
|
|
2011
|
-
const value = part.substring(segment[2], segment[3]);
|
|
2012
|
-
if (kind === 1) joined += prefix || suffix ? `${prefix}{$${value}}${suffix}` : `$${value}`;
|
|
2013
|
-
else if (kind === 2) joined += prefix || suffix ? `${prefix}{$}${suffix}` : "$";
|
|
2014
|
-
else joined += `${prefix}{-$${value}}${suffix}`;
|
|
2015
|
-
}
|
|
2016
|
-
joined = cleanPath(joined);
|
|
2017
|
-
const result = joined || "/";
|
|
2018
|
-
if (key && cache) cache.set(key, result);
|
|
2019
|
-
return result;
|
|
2020
|
-
}
|
|
2021
|
-
function encodeParam(key, params, decodeCharMap) {
|
|
2022
|
-
const value = params[key];
|
|
2023
|
-
if (typeof value !== "string") return value;
|
|
2024
|
-
if (key === "_splat") return encodeURI(value);
|
|
2025
|
-
else return encodePathParam(value, decodeCharMap);
|
|
2026
|
-
}
|
|
2027
|
-
function interpolatePath({ path, params, decodeCharMap }) {
|
|
2028
|
-
let isMissingParams = false;
|
|
2029
|
-
const usedParams = {};
|
|
2030
|
-
if (!path || path === "/") return {
|
|
2031
|
-
interpolatedPath: "/",
|
|
2032
|
-
usedParams,
|
|
2033
|
-
isMissingParams
|
|
2034
|
-
};
|
|
2035
|
-
if (!path.includes("$")) return {
|
|
2036
|
-
interpolatedPath: path,
|
|
2037
|
-
usedParams,
|
|
2038
|
-
isMissingParams
|
|
2039
|
-
};
|
|
2040
|
-
const length = path.length;
|
|
2041
|
-
let cursor = 0;
|
|
2042
|
-
let segment;
|
|
2043
|
-
let joined = "";
|
|
2044
|
-
while (cursor < length) {
|
|
2045
|
-
const start = cursor;
|
|
2046
|
-
segment = parseSegment(path, start, segment);
|
|
2047
|
-
const end = segment[5];
|
|
2048
|
-
cursor = end + 1;
|
|
2049
|
-
if (start === end) continue;
|
|
2050
|
-
const kind = segment[0];
|
|
2051
|
-
if (kind === 0) {
|
|
2052
|
-
joined += "/" + path.substring(start, end);
|
|
2053
|
-
continue;
|
|
2054
|
-
}
|
|
2055
|
-
if (kind === 2) {
|
|
2056
|
-
const splat = params._splat;
|
|
2057
|
-
usedParams._splat = splat;
|
|
2058
|
-
usedParams["*"] = splat;
|
|
2059
|
-
const prefix = path.substring(start, segment[1]);
|
|
2060
|
-
const suffix = path.substring(segment[4], end);
|
|
2061
|
-
if (!splat) {
|
|
2062
|
-
isMissingParams = true;
|
|
2063
|
-
if (prefix || suffix) joined += "/" + prefix + suffix;
|
|
2064
|
-
continue;
|
|
2065
|
-
}
|
|
2066
|
-
const value = encodeParam("_splat", params, decodeCharMap);
|
|
2067
|
-
joined += "/" + prefix + value + suffix;
|
|
2068
|
-
continue;
|
|
2069
|
-
}
|
|
2070
|
-
if (kind === 1) {
|
|
2071
|
-
const key = path.substring(segment[2], segment[3]);
|
|
2072
|
-
if (!isMissingParams && !(key in params)) isMissingParams = true;
|
|
2073
|
-
usedParams[key] = params[key];
|
|
2074
|
-
const prefix = path.substring(start, segment[1]);
|
|
2075
|
-
const suffix = path.substring(segment[4], end);
|
|
2076
|
-
const value = encodeParam(key, params, decodeCharMap) ?? "undefined";
|
|
2077
|
-
joined += "/" + prefix + value + suffix;
|
|
2078
|
-
continue;
|
|
2079
|
-
}
|
|
2080
|
-
if (kind === 3) {
|
|
2081
|
-
const key = path.substring(segment[2], segment[3]);
|
|
2082
|
-
const valueRaw = params[key];
|
|
2083
|
-
if (valueRaw == null) continue;
|
|
2084
|
-
usedParams[key] = valueRaw;
|
|
2085
|
-
const prefix = path.substring(start, segment[1]);
|
|
2086
|
-
const suffix = path.substring(segment[4], end);
|
|
2087
|
-
const value = encodeParam(key, params, decodeCharMap) ?? "";
|
|
2088
|
-
joined += "/" + prefix + value + suffix;
|
|
2089
|
-
continue;
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
if (path.endsWith("/")) joined += "/";
|
|
2093
|
-
return {
|
|
2094
|
-
usedParams,
|
|
2095
|
-
interpolatedPath: joined || "/",
|
|
2096
|
-
isMissingParams
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
function encodePathParam(value, decodeCharMap) {
|
|
2100
|
-
let encoded = encodeURIComponent(value);
|
|
2101
|
-
if (decodeCharMap) for (const [encodedChar, char] of decodeCharMap) encoded = encoded.replaceAll(encodedChar, char);
|
|
2102
|
-
return encoded;
|
|
2103
|
-
}
|
|
2104
|
-
//#endregion
|
|
2105
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/not-found.js
|
|
2106
|
-
function isNotFound(obj) {
|
|
2107
|
-
return !!obj?.isNotFound;
|
|
2108
|
-
}
|
|
2109
|
-
//#endregion
|
|
2110
1136
|
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js
|
|
2111
1137
|
function getSafeSessionStorage() {
|
|
2112
1138
|
try {
|
|
@@ -2130,7 +1156,7 @@ function createScrollRestorationCache() {
|
|
|
2130
1156
|
let state = persistedState ? JSON.parse(persistedState) : {};
|
|
2131
1157
|
return {
|
|
2132
1158
|
state,
|
|
2133
|
-
set: (updater) => (state = functionalUpdate(updater, state) || state, safeSessionStorage.setItem(storageKey, JSON.stringify(state)))
|
|
1159
|
+
set: (updater) => (state = functionalUpdate$1(updater, state) || state, safeSessionStorage.setItem(storageKey, JSON.stringify(state)))
|
|
2134
1160
|
};
|
|
2135
1161
|
}
|
|
2136
1162
|
var scrollRestorationCache = createScrollRestorationCache();
|
|
@@ -2329,9 +1355,6 @@ function stringifySearchWith(stringify, parser) {
|
|
|
2329
1355
|
};
|
|
2330
1356
|
}
|
|
2331
1357
|
//#endregion
|
|
2332
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/root.js
|
|
2333
|
-
var rootRouteId = "__root__";
|
|
2334
|
-
//#endregion
|
|
2335
1358
|
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/redirect.js
|
|
2336
1359
|
function redirect(opts) {
|
|
2337
1360
|
opts.statusCode = opts.statusCode || opts.code || 307;
|
|
@@ -3160,7 +2183,7 @@ var RouterCore = class {
|
|
|
3160
2183
|
const fromSearch = lastMatch.search;
|
|
3161
2184
|
const fromParams = { ...lastMatch.params };
|
|
3162
2185
|
const nextTo = dest.to ? this.resolvePathWithBase(fromPath, `${dest.to}`) : this.resolvePathWithBase(fromPath, ".");
|
|
3163
|
-
const nextParams = dest.params === false || dest.params === null ? {} : (dest.params ?? true) === true ? fromParams : Object.assign(fromParams, functionalUpdate(dest.params, fromParams));
|
|
2186
|
+
const nextParams = dest.params === false || dest.params === null ? {} : (dest.params ?? true) === true ? fromParams : Object.assign(fromParams, functionalUpdate$1(dest.params, fromParams));
|
|
3164
2187
|
const interpolatedNextTo = interpolatePath({
|
|
3165
2188
|
path: nextTo,
|
|
3166
2189
|
params: nextParams
|
|
@@ -3196,9 +2219,9 @@ var RouterCore = class {
|
|
|
3196
2219
|
});
|
|
3197
2220
|
nextSearch = replaceEqualDeep(fromSearch, nextSearch);
|
|
3198
2221
|
const searchStr = this.options.stringifySearch(nextSearch);
|
|
3199
|
-
const hash = dest.hash === true ? currentLocation.hash : dest.hash ? functionalUpdate(dest.hash, currentLocation.hash) : void 0;
|
|
2222
|
+
const hash = dest.hash === true ? currentLocation.hash : dest.hash ? functionalUpdate$1(dest.hash, currentLocation.hash) : void 0;
|
|
3200
2223
|
const hashStr = hash ? `#${hash}` : "";
|
|
3201
|
-
let nextState = dest.state === true ? currentLocation.state : dest.state ? functionalUpdate(dest.state, currentLocation.state) : {};
|
|
2224
|
+
let nextState = dest.state === true ? currentLocation.state : dest.state ? functionalUpdate$1(dest.state, currentLocation.state) : {};
|
|
3202
2225
|
nextState = replaceEqualDeep(currentLocation.state, nextState);
|
|
3203
2226
|
const fullPath = `${nextPathname}${searchStr}${hashStr}`;
|
|
3204
2227
|
const url = new URL(fullPath, this.origin);
|
|
@@ -3225,7 +2248,7 @@ var RouterCore = class {
|
|
|
3225
2248
|
if (match) {
|
|
3226
2249
|
Object.assign(params, match.params);
|
|
3227
2250
|
const { from: _from, params: maskParams, ...maskProps } = match.route;
|
|
3228
|
-
const nextParams = maskParams === false || maskParams === null ? {} : (maskParams ?? true) === true ? params : Object.assign(params, functionalUpdate(maskParams, params));
|
|
2251
|
+
const nextParams = maskParams === false || maskParams === null ? {} : (maskParams ?? true) === true ? params : Object.assign(params, functionalUpdate$1(maskParams, params));
|
|
3229
2252
|
maskedDest = {
|
|
3230
2253
|
from: opts.from,
|
|
3231
2254
|
...maskProps,
|
|
@@ -3915,7 +2938,7 @@ function applySearchMiddleware({ search, dest, destRoutes, _includeValidateSearc
|
|
|
3915
2938
|
const final = ({ search: search2 }) => {
|
|
3916
2939
|
if (!dest.search) return {};
|
|
3917
2940
|
if (dest.search === true) return search2;
|
|
3918
|
-
return functionalUpdate(dest.search, search2);
|
|
2941
|
+
return functionalUpdate$1(dest.search, search2);
|
|
3919
2942
|
};
|
|
3920
2943
|
allMiddlewares.push(final);
|
|
3921
2944
|
const applyNext = (index, currentSearch) => {
|
|
@@ -3932,77 +2955,6 @@ function applySearchMiddleware({ search, dest, destRoutes, _includeValidateSearc
|
|
|
3932
2955
|
return applyNext(0, search);
|
|
3933
2956
|
}
|
|
3934
2957
|
//#endregion
|
|
3935
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/link.js
|
|
3936
|
-
var preloadWarning = "Error preloading route! ☝️";
|
|
3937
|
-
//#endregion
|
|
3938
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/route.js
|
|
3939
|
-
var BaseRoute = class {
|
|
3940
|
-
constructor(options) {
|
|
3941
|
-
this.init = (opts) => {
|
|
3942
|
-
this.originalIndex = opts.originalIndex;
|
|
3943
|
-
const options2 = this.options;
|
|
3944
|
-
const isRoot = !options2?.path && !options2?.id;
|
|
3945
|
-
this.parentRoute = this.options.getParentRoute?.();
|
|
3946
|
-
if (isRoot) this._path = rootRouteId;
|
|
3947
|
-
else if (!this.parentRoute) invariant(false, `Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);
|
|
3948
|
-
let path = isRoot ? rootRouteId : options2?.path;
|
|
3949
|
-
if (path && path !== "/") path = trimPathLeft(path);
|
|
3950
|
-
const customId = options2?.id || path;
|
|
3951
|
-
let id = isRoot ? rootRouteId : joinPaths([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, customId]);
|
|
3952
|
-
if (path === "__root__") path = "/";
|
|
3953
|
-
if (id !== "__root__") id = joinPaths(["/", id]);
|
|
3954
|
-
const fullPath = id === "__root__" ? "/" : joinPaths([this.parentRoute.fullPath, path]);
|
|
3955
|
-
this._path = path;
|
|
3956
|
-
this._id = id;
|
|
3957
|
-
this._fullPath = fullPath;
|
|
3958
|
-
this._to = fullPath;
|
|
3959
|
-
};
|
|
3960
|
-
this.addChildren = (children) => {
|
|
3961
|
-
return this._addFileChildren(children);
|
|
3962
|
-
};
|
|
3963
|
-
this._addFileChildren = (children) => {
|
|
3964
|
-
if (Array.isArray(children)) this.children = children;
|
|
3965
|
-
if (typeof children === "object" && children !== null) this.children = Object.values(children);
|
|
3966
|
-
return this;
|
|
3967
|
-
};
|
|
3968
|
-
this._addFileTypes = () => {
|
|
3969
|
-
return this;
|
|
3970
|
-
};
|
|
3971
|
-
this.updateLoader = (options2) => {
|
|
3972
|
-
Object.assign(this.options, options2);
|
|
3973
|
-
return this;
|
|
3974
|
-
};
|
|
3975
|
-
this.update = (options2) => {
|
|
3976
|
-
Object.assign(this.options, options2);
|
|
3977
|
-
return this;
|
|
3978
|
-
};
|
|
3979
|
-
this.lazy = (lazyFn) => {
|
|
3980
|
-
this.lazyFn = lazyFn;
|
|
3981
|
-
return this;
|
|
3982
|
-
};
|
|
3983
|
-
this.options = options || {};
|
|
3984
|
-
this.isRoot = !options?.getParentRoute;
|
|
3985
|
-
if (options?.id && options?.path) throw new Error(`Route cannot have both an 'id' and a 'path' option.`);
|
|
3986
|
-
}
|
|
3987
|
-
get to() {
|
|
3988
|
-
return this._to;
|
|
3989
|
-
}
|
|
3990
|
-
get id() {
|
|
3991
|
-
return this._id;
|
|
3992
|
-
}
|
|
3993
|
-
get path() {
|
|
3994
|
-
return this._path;
|
|
3995
|
-
}
|
|
3996
|
-
get fullPath() {
|
|
3997
|
-
return this._fullPath;
|
|
3998
|
-
}
|
|
3999
|
-
};
|
|
4000
|
-
var BaseRootRoute = class extends BaseRoute {
|
|
4001
|
-
constructor(options) {
|
|
4002
|
-
super(options);
|
|
4003
|
-
}
|
|
4004
|
-
};
|
|
4005
|
-
//#endregion
|
|
4006
2958
|
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/CatchBoundary.js
|
|
4007
2959
|
var import_jsx_runtime = require_jsx_runtime();
|
|
4008
2960
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
@@ -4106,935 +3058,6 @@ function subscribe() {
|
|
|
4106
3058
|
return () => {};
|
|
4107
3059
|
}
|
|
4108
3060
|
//#endregion
|
|
4109
|
-
//#region ../../node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js
|
|
4110
|
-
var isProduction = process.env.NODE_ENV === "production";
|
|
4111
|
-
function warning(condition, message) {
|
|
4112
|
-
if (!isProduction) {
|
|
4113
|
-
if (condition) return;
|
|
4114
|
-
var text = "Warning: " + message;
|
|
4115
|
-
if (typeof console !== "undefined") console.warn(text);
|
|
4116
|
-
try {
|
|
4117
|
-
throw Error(text);
|
|
4118
|
-
} catch (x) {}
|
|
4119
|
-
}
|
|
4120
|
-
}
|
|
4121
|
-
//#endregion
|
|
4122
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
4123
|
-
/**
|
|
4124
|
-
* @license React
|
|
4125
|
-
* use-sync-external-store-shim.production.js
|
|
4126
|
-
*
|
|
4127
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4128
|
-
*
|
|
4129
|
-
* This source code is licensed under the MIT license found in the
|
|
4130
|
-
* LICENSE file in the root directory of this source tree.
|
|
4131
|
-
*/
|
|
4132
|
-
var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4133
|
-
var React = require_react();
|
|
4134
|
-
function is(x, y) {
|
|
4135
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
4136
|
-
}
|
|
4137
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
4138
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
4139
|
-
var value = getSnapshot(), _useState = useState({ inst: {
|
|
4140
|
-
value,
|
|
4141
|
-
getSnapshot
|
|
4142
|
-
} }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
4143
|
-
useLayoutEffect(function() {
|
|
4144
|
-
inst.value = value;
|
|
4145
|
-
inst.getSnapshot = getSnapshot;
|
|
4146
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
4147
|
-
}, [
|
|
4148
|
-
subscribe,
|
|
4149
|
-
value,
|
|
4150
|
-
getSnapshot
|
|
4151
|
-
]);
|
|
4152
|
-
useEffect(function() {
|
|
4153
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
4154
|
-
return subscribe(function() {
|
|
4155
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
4156
|
-
});
|
|
4157
|
-
}, [subscribe]);
|
|
4158
|
-
useDebugValue(value);
|
|
4159
|
-
return value;
|
|
4160
|
-
}
|
|
4161
|
-
function checkIfSnapshotChanged(inst) {
|
|
4162
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
4163
|
-
inst = inst.value;
|
|
4164
|
-
try {
|
|
4165
|
-
var nextValue = latestGetSnapshot();
|
|
4166
|
-
return !objectIs(inst, nextValue);
|
|
4167
|
-
} catch (error) {
|
|
4168
|
-
return !0;
|
|
4169
|
-
}
|
|
4170
|
-
}
|
|
4171
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
4172
|
-
return getSnapshot();
|
|
4173
|
-
}
|
|
4174
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
4175
|
-
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
4176
|
-
}));
|
|
4177
|
-
//#endregion
|
|
4178
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
4179
|
-
/**
|
|
4180
|
-
* @license React
|
|
4181
|
-
* use-sync-external-store-shim.development.js
|
|
4182
|
-
*
|
|
4183
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4184
|
-
*
|
|
4185
|
-
* This source code is licensed under the MIT license found in the
|
|
4186
|
-
* LICENSE file in the root directory of this source tree.
|
|
4187
|
-
*/
|
|
4188
|
-
var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4189
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
4190
|
-
function is(x, y) {
|
|
4191
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
4192
|
-
}
|
|
4193
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
4194
|
-
didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
4195
|
-
var value = getSnapshot();
|
|
4196
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
4197
|
-
var cachedValue = getSnapshot();
|
|
4198
|
-
objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
|
|
4199
|
-
}
|
|
4200
|
-
cachedValue = useState({ inst: {
|
|
4201
|
-
value,
|
|
4202
|
-
getSnapshot
|
|
4203
|
-
} });
|
|
4204
|
-
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
4205
|
-
useLayoutEffect(function() {
|
|
4206
|
-
inst.value = value;
|
|
4207
|
-
inst.getSnapshot = getSnapshot;
|
|
4208
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
4209
|
-
}, [
|
|
4210
|
-
subscribe,
|
|
4211
|
-
value,
|
|
4212
|
-
getSnapshot
|
|
4213
|
-
]);
|
|
4214
|
-
useEffect(function() {
|
|
4215
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
4216
|
-
return subscribe(function() {
|
|
4217
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
4218
|
-
});
|
|
4219
|
-
}, [subscribe]);
|
|
4220
|
-
useDebugValue(value);
|
|
4221
|
-
return value;
|
|
4222
|
-
}
|
|
4223
|
-
function checkIfSnapshotChanged(inst) {
|
|
4224
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
4225
|
-
inst = inst.value;
|
|
4226
|
-
try {
|
|
4227
|
-
var nextValue = latestGetSnapshot();
|
|
4228
|
-
return !objectIs(inst, nextValue);
|
|
4229
|
-
} catch (error) {
|
|
4230
|
-
return !0;
|
|
4231
|
-
}
|
|
4232
|
-
}
|
|
4233
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
4234
|
-
return getSnapshot();
|
|
4235
|
-
}
|
|
4236
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4237
|
-
var React = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
4238
|
-
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
4239
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4240
|
-
})();
|
|
4241
|
-
}));
|
|
4242
|
-
//#endregion
|
|
4243
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/shim/index.js
|
|
4244
|
-
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4245
|
-
if (process.env.NODE_ENV === "production") module.exports = require_use_sync_external_store_shim_production();
|
|
4246
|
-
else module.exports = require_use_sync_external_store_shim_development();
|
|
4247
|
-
}));
|
|
4248
|
-
//#endregion
|
|
4249
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
4250
|
-
/**
|
|
4251
|
-
* @license React
|
|
4252
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
4253
|
-
*
|
|
4254
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4255
|
-
*
|
|
4256
|
-
* This source code is licensed under the MIT license found in the
|
|
4257
|
-
* LICENSE file in the root directory of this source tree.
|
|
4258
|
-
*/
|
|
4259
|
-
var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4260
|
-
var React = require_react(), shim = require_shim();
|
|
4261
|
-
function is(x, y) {
|
|
4262
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
4263
|
-
}
|
|
4264
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
4265
|
-
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
4266
|
-
var instRef = useRef(null);
|
|
4267
|
-
if (null === instRef.current) {
|
|
4268
|
-
var inst = {
|
|
4269
|
-
hasValue: !1,
|
|
4270
|
-
value: null
|
|
4271
|
-
};
|
|
4272
|
-
instRef.current = inst;
|
|
4273
|
-
} else inst = instRef.current;
|
|
4274
|
-
instRef = useMemo(function() {
|
|
4275
|
-
function memoizedSelector(nextSnapshot) {
|
|
4276
|
-
if (!hasMemo) {
|
|
4277
|
-
hasMemo = !0;
|
|
4278
|
-
memoizedSnapshot = nextSnapshot;
|
|
4279
|
-
nextSnapshot = selector(nextSnapshot);
|
|
4280
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
4281
|
-
var currentSelection = inst.value;
|
|
4282
|
-
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
4283
|
-
}
|
|
4284
|
-
return memoizedSelection = nextSnapshot;
|
|
4285
|
-
}
|
|
4286
|
-
currentSelection = memoizedSelection;
|
|
4287
|
-
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
4288
|
-
var nextSelection = selector(nextSnapshot);
|
|
4289
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
4290
|
-
memoizedSnapshot = nextSnapshot;
|
|
4291
|
-
return memoizedSelection = nextSelection;
|
|
4292
|
-
}
|
|
4293
|
-
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
4294
|
-
return [function() {
|
|
4295
|
-
return memoizedSelector(getSnapshot());
|
|
4296
|
-
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
4297
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
4298
|
-
}];
|
|
4299
|
-
}, [
|
|
4300
|
-
getSnapshot,
|
|
4301
|
-
getServerSnapshot,
|
|
4302
|
-
selector,
|
|
4303
|
-
isEqual
|
|
4304
|
-
]);
|
|
4305
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
4306
|
-
useEffect(function() {
|
|
4307
|
-
inst.hasValue = !0;
|
|
4308
|
-
inst.value = value;
|
|
4309
|
-
}, [value]);
|
|
4310
|
-
useDebugValue(value);
|
|
4311
|
-
return value;
|
|
4312
|
-
};
|
|
4313
|
-
}));
|
|
4314
|
-
//#endregion
|
|
4315
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
4316
|
-
/**
|
|
4317
|
-
* @license React
|
|
4318
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
4319
|
-
*
|
|
4320
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4321
|
-
*
|
|
4322
|
-
* This source code is licensed under the MIT license found in the
|
|
4323
|
-
* LICENSE file in the root directory of this source tree.
|
|
4324
|
-
*/
|
|
4325
|
-
var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4326
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
4327
|
-
function is(x, y) {
|
|
4328
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
4329
|
-
}
|
|
4330
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4331
|
-
var React = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
4332
|
-
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
4333
|
-
var instRef = useRef(null);
|
|
4334
|
-
if (null === instRef.current) {
|
|
4335
|
-
var inst = {
|
|
4336
|
-
hasValue: !1,
|
|
4337
|
-
value: null
|
|
4338
|
-
};
|
|
4339
|
-
instRef.current = inst;
|
|
4340
|
-
} else inst = instRef.current;
|
|
4341
|
-
instRef = useMemo(function() {
|
|
4342
|
-
function memoizedSelector(nextSnapshot) {
|
|
4343
|
-
if (!hasMemo) {
|
|
4344
|
-
hasMemo = !0;
|
|
4345
|
-
memoizedSnapshot = nextSnapshot;
|
|
4346
|
-
nextSnapshot = selector(nextSnapshot);
|
|
4347
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
4348
|
-
var currentSelection = inst.value;
|
|
4349
|
-
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
4350
|
-
}
|
|
4351
|
-
return memoizedSelection = nextSnapshot;
|
|
4352
|
-
}
|
|
4353
|
-
currentSelection = memoizedSelection;
|
|
4354
|
-
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
4355
|
-
var nextSelection = selector(nextSnapshot);
|
|
4356
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
4357
|
-
memoizedSnapshot = nextSnapshot;
|
|
4358
|
-
return memoizedSelection = nextSelection;
|
|
4359
|
-
}
|
|
4360
|
-
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
4361
|
-
return [function() {
|
|
4362
|
-
return memoizedSelector(getSnapshot());
|
|
4363
|
-
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
4364
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
4365
|
-
}];
|
|
4366
|
-
}, [
|
|
4367
|
-
getSnapshot,
|
|
4368
|
-
getServerSnapshot,
|
|
4369
|
-
selector,
|
|
4370
|
-
isEqual
|
|
4371
|
-
]);
|
|
4372
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
4373
|
-
useEffect(function() {
|
|
4374
|
-
inst.hasValue = !0;
|
|
4375
|
-
inst.value = value;
|
|
4376
|
-
}, [value]);
|
|
4377
|
-
useDebugValue(value);
|
|
4378
|
-
return value;
|
|
4379
|
-
};
|
|
4380
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4381
|
-
})();
|
|
4382
|
-
}));
|
|
4383
|
-
//#endregion
|
|
4384
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-store@0.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-store/dist/esm/index.js
|
|
4385
|
-
var import_with_selector = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4386
|
-
if (process.env.NODE_ENV === "production") module.exports = require_with_selector_production();
|
|
4387
|
-
else module.exports = require_with_selector_development();
|
|
4388
|
-
})))();
|
|
4389
|
-
function useStore$1(store, selector = (d) => d, options = {}) {
|
|
4390
|
-
const equal = options.equal ?? shallow;
|
|
4391
|
-
return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, () => store.state, () => store.state, selector, equal);
|
|
4392
|
-
}
|
|
4393
|
-
function shallow(objA, objB) {
|
|
4394
|
-
if (Object.is(objA, objB)) return true;
|
|
4395
|
-
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return false;
|
|
4396
|
-
if (objA instanceof Map && objB instanceof Map) {
|
|
4397
|
-
if (objA.size !== objB.size) return false;
|
|
4398
|
-
for (const [k, v] of objA) if (!objB.has(k) || !Object.is(v, objB.get(k))) return false;
|
|
4399
|
-
return true;
|
|
4400
|
-
}
|
|
4401
|
-
if (objA instanceof Set && objB instanceof Set) {
|
|
4402
|
-
if (objA.size !== objB.size) return false;
|
|
4403
|
-
for (const v of objA) if (!objB.has(v)) return false;
|
|
4404
|
-
return true;
|
|
4405
|
-
}
|
|
4406
|
-
if (objA instanceof Date && objB instanceof Date) {
|
|
4407
|
-
if (objA.getTime() !== objB.getTime()) return false;
|
|
4408
|
-
return true;
|
|
4409
|
-
}
|
|
4410
|
-
const keysA = getOwnKeys(objA);
|
|
4411
|
-
if (keysA.length !== getOwnKeys(objB).length) return false;
|
|
4412
|
-
for (let i = 0; i < keysA.length; i++) if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) return false;
|
|
4413
|
-
return true;
|
|
4414
|
-
}
|
|
4415
|
-
function getOwnKeys(obj) {
|
|
4416
|
-
return Object.keys(obj).concat(Object.getOwnPropertySymbols(obj));
|
|
4417
|
-
}
|
|
4418
|
-
//#endregion
|
|
4419
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/routerContext.js
|
|
4420
|
-
var routerContext = import_react.createContext(null);
|
|
4421
|
-
function getRouterContext() {
|
|
4422
|
-
if (typeof document === "undefined") return routerContext;
|
|
4423
|
-
if (window.__TSR_ROUTER_CONTEXT__) return window.__TSR_ROUTER_CONTEXT__;
|
|
4424
|
-
window.__TSR_ROUTER_CONTEXT__ = routerContext;
|
|
4425
|
-
return routerContext;
|
|
4426
|
-
}
|
|
4427
|
-
//#endregion
|
|
4428
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useRouter.js
|
|
4429
|
-
function useRouter(opts) {
|
|
4430
|
-
const value = import_react.useContext(getRouterContext());
|
|
4431
|
-
warning(!((opts?.warn ?? true) && !value), "useRouter must be used inside a <RouterProvider> component!");
|
|
4432
|
-
return value;
|
|
4433
|
-
}
|
|
4434
|
-
//#endregion
|
|
4435
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useRouterState.js
|
|
4436
|
-
function useRouterState(opts) {
|
|
4437
|
-
const contextRouter = useRouter({ warn: opts?.router === void 0 });
|
|
4438
|
-
const router = opts?.router || contextRouter;
|
|
4439
|
-
const previousResult = (0, import_react.useRef)(void 0);
|
|
4440
|
-
return useStore$1(router.__store, (state) => {
|
|
4441
|
-
if (opts?.select) {
|
|
4442
|
-
if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {
|
|
4443
|
-
const newSlice = replaceEqualDeep(previousResult.current, opts.select(state));
|
|
4444
|
-
previousResult.current = newSlice;
|
|
4445
|
-
return newSlice;
|
|
4446
|
-
}
|
|
4447
|
-
return opts.select(state);
|
|
4448
|
-
}
|
|
4449
|
-
return state;
|
|
4450
|
-
});
|
|
4451
|
-
}
|
|
4452
|
-
//#endregion
|
|
4453
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/matchContext.js
|
|
4454
|
-
var matchContext = import_react.createContext(void 0);
|
|
4455
|
-
var dummyMatchContext = import_react.createContext(void 0);
|
|
4456
|
-
//#endregion
|
|
4457
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useMatch.js
|
|
4458
|
-
function useMatch(opts) {
|
|
4459
|
-
const nearestMatchId = import_react.useContext(opts.from ? dummyMatchContext : matchContext);
|
|
4460
|
-
return useRouterState({
|
|
4461
|
-
select: (state) => {
|
|
4462
|
-
const match = state.matches.find((d) => opts.from ? opts.from === d.routeId : d.id === nearestMatchId);
|
|
4463
|
-
invariant(!((opts.shouldThrow ?? true) && !match), `Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`);
|
|
4464
|
-
if (match === void 0) return;
|
|
4465
|
-
return opts.select ? opts.select(match) : match;
|
|
4466
|
-
},
|
|
4467
|
-
structuralSharing: opts.structuralSharing
|
|
4468
|
-
});
|
|
4469
|
-
}
|
|
4470
|
-
//#endregion
|
|
4471
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useLoaderData.js
|
|
4472
|
-
function useLoaderData(opts) {
|
|
4473
|
-
return useMatch({
|
|
4474
|
-
from: opts.from,
|
|
4475
|
-
strict: opts.strict,
|
|
4476
|
-
structuralSharing: opts.structuralSharing,
|
|
4477
|
-
select: (s) => {
|
|
4478
|
-
return opts.select ? opts.select(s.loaderData) : s.loaderData;
|
|
4479
|
-
}
|
|
4480
|
-
});
|
|
4481
|
-
}
|
|
4482
|
-
//#endregion
|
|
4483
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js
|
|
4484
|
-
function useLoaderDeps(opts) {
|
|
4485
|
-
const { select, ...rest } = opts;
|
|
4486
|
-
return useMatch({
|
|
4487
|
-
...rest,
|
|
4488
|
-
select: (s) => {
|
|
4489
|
-
return select ? select(s.loaderDeps) : s.loaderDeps;
|
|
4490
|
-
}
|
|
4491
|
-
});
|
|
4492
|
-
}
|
|
4493
|
-
//#endregion
|
|
4494
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useParams.js
|
|
4495
|
-
function useParams(opts) {
|
|
4496
|
-
return useMatch({
|
|
4497
|
-
from: opts.from,
|
|
4498
|
-
shouldThrow: opts.shouldThrow,
|
|
4499
|
-
structuralSharing: opts.structuralSharing,
|
|
4500
|
-
strict: opts.strict,
|
|
4501
|
-
select: (match) => {
|
|
4502
|
-
const params = opts.strict === false ? match.params : match._strictParams;
|
|
4503
|
-
return opts.select ? opts.select(params) : params;
|
|
4504
|
-
}
|
|
4505
|
-
});
|
|
4506
|
-
}
|
|
4507
|
-
//#endregion
|
|
4508
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useSearch.js
|
|
4509
|
-
function useSearch(opts) {
|
|
4510
|
-
return useMatch({
|
|
4511
|
-
from: opts.from,
|
|
4512
|
-
strict: opts.strict,
|
|
4513
|
-
shouldThrow: opts.shouldThrow,
|
|
4514
|
-
structuralSharing: opts.structuralSharing,
|
|
4515
|
-
select: (match) => {
|
|
4516
|
-
return opts.select ? opts.select(match.search) : match.search;
|
|
4517
|
-
}
|
|
4518
|
-
});
|
|
4519
|
-
}
|
|
4520
|
-
//#endregion
|
|
4521
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/utils.js
|
|
4522
|
-
var useLayoutEffect = typeof window !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
|
|
4523
|
-
function usePrevious(value) {
|
|
4524
|
-
const ref = import_react.useRef({
|
|
4525
|
-
value,
|
|
4526
|
-
prev: null
|
|
4527
|
-
});
|
|
4528
|
-
const current = ref.current.value;
|
|
4529
|
-
if (value !== current) ref.current = {
|
|
4530
|
-
value,
|
|
4531
|
-
prev: current
|
|
4532
|
-
};
|
|
4533
|
-
return ref.current.prev;
|
|
4534
|
-
}
|
|
4535
|
-
function useIntersectionObserver(ref, callback, intersectionObserverOptions = {}, options = {}) {
|
|
4536
|
-
import_react.useEffect(() => {
|
|
4537
|
-
if (!ref.current || options.disabled || typeof IntersectionObserver !== "function") return;
|
|
4538
|
-
const observer = new IntersectionObserver(([entry]) => {
|
|
4539
|
-
callback(entry);
|
|
4540
|
-
}, intersectionObserverOptions);
|
|
4541
|
-
observer.observe(ref.current);
|
|
4542
|
-
return () => {
|
|
4543
|
-
observer.disconnect();
|
|
4544
|
-
};
|
|
4545
|
-
}, [
|
|
4546
|
-
callback,
|
|
4547
|
-
intersectionObserverOptions,
|
|
4548
|
-
options.disabled,
|
|
4549
|
-
ref
|
|
4550
|
-
]);
|
|
4551
|
-
}
|
|
4552
|
-
function useForwardedRef(ref) {
|
|
4553
|
-
const innerRef = import_react.useRef(null);
|
|
4554
|
-
import_react.useImperativeHandle(ref, () => innerRef.current, []);
|
|
4555
|
-
return innerRef;
|
|
4556
|
-
}
|
|
4557
|
-
//#endregion
|
|
4558
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useNavigate.js
|
|
4559
|
-
function useNavigate(_defaultOpts) {
|
|
4560
|
-
const router = useRouter();
|
|
4561
|
-
return import_react.useCallback((options) => {
|
|
4562
|
-
return router.navigate({
|
|
4563
|
-
...options,
|
|
4564
|
-
from: options.from ?? _defaultOpts?.from
|
|
4565
|
-
});
|
|
4566
|
-
}, [_defaultOpts?.from, router]);
|
|
4567
|
-
}
|
|
4568
|
-
//#endregion
|
|
4569
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/link.js
|
|
4570
|
-
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
|
|
4571
|
-
function useLinkProps(options, forwardedRef) {
|
|
4572
|
-
const router = useRouter();
|
|
4573
|
-
const [isTransitioning, setIsTransitioning] = import_react.useState(false);
|
|
4574
|
-
const hasRenderFetched = import_react.useRef(false);
|
|
4575
|
-
const innerRef = useForwardedRef(forwardedRef);
|
|
4576
|
-
const { activeProps, inactiveProps, activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, children, target, disabled, style, className, onClick, onFocus, onMouseEnter, onMouseLeave, onTouchStart, ignoreBlocker, params: _params, search: _search, hash: _hash, state: _state, mask: _mask, reloadDocument: _reloadDocument, unsafeRelative: _unsafeRelative, from: _from, _fromLocation, ...propsSafeToSpread } = options;
|
|
4577
|
-
const currentSearch = useRouterState({
|
|
4578
|
-
select: (s) => s.location.search,
|
|
4579
|
-
structuralSharing: true
|
|
4580
|
-
});
|
|
4581
|
-
const from = options.from;
|
|
4582
|
-
const _options = import_react.useMemo(() => {
|
|
4583
|
-
return {
|
|
4584
|
-
...options,
|
|
4585
|
-
from
|
|
4586
|
-
};
|
|
4587
|
-
}, [
|
|
4588
|
-
router,
|
|
4589
|
-
currentSearch,
|
|
4590
|
-
from,
|
|
4591
|
-
options._fromLocation,
|
|
4592
|
-
options.hash,
|
|
4593
|
-
options.to,
|
|
4594
|
-
options.search,
|
|
4595
|
-
options.params,
|
|
4596
|
-
options.state,
|
|
4597
|
-
options.mask,
|
|
4598
|
-
options.unsafeRelative
|
|
4599
|
-
]);
|
|
4600
|
-
const next = import_react.useMemo(() => router.buildLocation({ ..._options }), [router, _options]);
|
|
4601
|
-
const hrefOption = import_react.useMemo(() => {
|
|
4602
|
-
if (disabled) return;
|
|
4603
|
-
let href = next.maskedLocation ? next.maskedLocation.url.href : next.url.href;
|
|
4604
|
-
let external = false;
|
|
4605
|
-
if (router.origin) if (href.startsWith(router.origin)) href = router.history.createHref(href.replace(router.origin, "")) || "/";
|
|
4606
|
-
else external = true;
|
|
4607
|
-
return {
|
|
4608
|
-
href,
|
|
4609
|
-
external
|
|
4610
|
-
};
|
|
4611
|
-
}, [
|
|
4612
|
-
disabled,
|
|
4613
|
-
next.maskedLocation,
|
|
4614
|
-
next.url,
|
|
4615
|
-
router.origin,
|
|
4616
|
-
router.history
|
|
4617
|
-
]);
|
|
4618
|
-
const externalLink = import_react.useMemo(() => {
|
|
4619
|
-
if (hrefOption?.external) return hrefOption.href;
|
|
4620
|
-
try {
|
|
4621
|
-
new URL(to);
|
|
4622
|
-
return to;
|
|
4623
|
-
} catch {}
|
|
4624
|
-
}, [to, hrefOption]);
|
|
4625
|
-
const preload = options.reloadDocument || externalLink ? false : userPreload ?? router.options.defaultPreload;
|
|
4626
|
-
const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
|
|
4627
|
-
const isActive = useRouterState({ select: (s) => {
|
|
4628
|
-
if (externalLink) return false;
|
|
4629
|
-
if (activeOptions?.exact) {
|
|
4630
|
-
if (!exactPathTest(s.location.pathname, next.pathname, router.basepath)) return false;
|
|
4631
|
-
} else {
|
|
4632
|
-
const currentPathSplit = removeTrailingSlash(s.location.pathname, router.basepath);
|
|
4633
|
-
const nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);
|
|
4634
|
-
if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
|
|
4635
|
-
}
|
|
4636
|
-
if (activeOptions?.includeSearch ?? true) {
|
|
4637
|
-
if (!deepEqual(s.location.search, next.search, {
|
|
4638
|
-
partial: !activeOptions?.exact,
|
|
4639
|
-
ignoreUndefined: !activeOptions?.explicitUndefined
|
|
4640
|
-
})) return false;
|
|
4641
|
-
}
|
|
4642
|
-
if (activeOptions?.includeHash) return s.location.hash === next.hash;
|
|
4643
|
-
return true;
|
|
4644
|
-
} });
|
|
4645
|
-
const doPreload = import_react.useCallback(() => {
|
|
4646
|
-
router.preloadRoute({ ..._options }).catch((err) => {
|
|
4647
|
-
console.warn(err);
|
|
4648
|
-
console.warn(preloadWarning);
|
|
4649
|
-
});
|
|
4650
|
-
}, [router, _options]);
|
|
4651
|
-
useIntersectionObserver(innerRef, import_react.useCallback((entry) => {
|
|
4652
|
-
if (entry?.isIntersecting) doPreload();
|
|
4653
|
-
}, [doPreload]), intersectionObserverOptions, { disabled: !!disabled || !(preload === "viewport") });
|
|
4654
|
-
import_react.useEffect(() => {
|
|
4655
|
-
if (hasRenderFetched.current) return;
|
|
4656
|
-
if (!disabled && preload === "render") {
|
|
4657
|
-
doPreload();
|
|
4658
|
-
hasRenderFetched.current = true;
|
|
4659
|
-
}
|
|
4660
|
-
}, [
|
|
4661
|
-
disabled,
|
|
4662
|
-
doPreload,
|
|
4663
|
-
preload
|
|
4664
|
-
]);
|
|
4665
|
-
const handleClick = (e) => {
|
|
4666
|
-
const elementTarget = e.currentTarget.getAttribute("target");
|
|
4667
|
-
const effectiveTarget = target !== void 0 ? target : elementTarget;
|
|
4668
|
-
if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === "_self") && e.button === 0) {
|
|
4669
|
-
e.preventDefault();
|
|
4670
|
-
(0, import_react_dom.flushSync)(() => {
|
|
4671
|
-
setIsTransitioning(true);
|
|
4672
|
-
});
|
|
4673
|
-
const unsub = router.subscribe("onResolved", () => {
|
|
4674
|
-
unsub();
|
|
4675
|
-
setIsTransitioning(false);
|
|
4676
|
-
});
|
|
4677
|
-
router.navigate({
|
|
4678
|
-
..._options,
|
|
4679
|
-
replace,
|
|
4680
|
-
resetScroll,
|
|
4681
|
-
hashScrollIntoView,
|
|
4682
|
-
startTransition,
|
|
4683
|
-
viewTransition,
|
|
4684
|
-
ignoreBlocker
|
|
4685
|
-
});
|
|
4686
|
-
}
|
|
4687
|
-
};
|
|
4688
|
-
if (externalLink) return {
|
|
4689
|
-
...propsSafeToSpread,
|
|
4690
|
-
ref: innerRef,
|
|
4691
|
-
href: externalLink,
|
|
4692
|
-
...children && { children },
|
|
4693
|
-
...target && { target },
|
|
4694
|
-
...disabled && { disabled },
|
|
4695
|
-
...style && { style },
|
|
4696
|
-
...className && { className },
|
|
4697
|
-
...onClick && { onClick },
|
|
4698
|
-
...onFocus && { onFocus },
|
|
4699
|
-
...onMouseEnter && { onMouseEnter },
|
|
4700
|
-
...onMouseLeave && { onMouseLeave },
|
|
4701
|
-
...onTouchStart && { onTouchStart }
|
|
4702
|
-
};
|
|
4703
|
-
const handleFocus = (_) => {
|
|
4704
|
-
if (disabled) return;
|
|
4705
|
-
if (preload) doPreload();
|
|
4706
|
-
};
|
|
4707
|
-
const handleTouchStart = handleFocus;
|
|
4708
|
-
const handleEnter = (e) => {
|
|
4709
|
-
if (disabled || !preload) return;
|
|
4710
|
-
if (!preloadDelay) doPreload();
|
|
4711
|
-
else {
|
|
4712
|
-
const eventTarget = e.target;
|
|
4713
|
-
if (timeoutMap.has(eventTarget)) return;
|
|
4714
|
-
const id = setTimeout(() => {
|
|
4715
|
-
timeoutMap.delete(eventTarget);
|
|
4716
|
-
doPreload();
|
|
4717
|
-
}, preloadDelay);
|
|
4718
|
-
timeoutMap.set(eventTarget, id);
|
|
4719
|
-
}
|
|
4720
|
-
};
|
|
4721
|
-
const handleLeave = (e) => {
|
|
4722
|
-
if (disabled || !preload || !preloadDelay) return;
|
|
4723
|
-
const eventTarget = e.target;
|
|
4724
|
-
const id = timeoutMap.get(eventTarget);
|
|
4725
|
-
if (id) {
|
|
4726
|
-
clearTimeout(id);
|
|
4727
|
-
timeoutMap.delete(eventTarget);
|
|
4728
|
-
}
|
|
4729
|
-
};
|
|
4730
|
-
const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
|
|
4731
|
-
const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
|
|
4732
|
-
const resolvedClassName = [
|
|
4733
|
-
className,
|
|
4734
|
-
resolvedActiveProps.className,
|
|
4735
|
-
resolvedInactiveProps.className
|
|
4736
|
-
].filter(Boolean).join(" ");
|
|
4737
|
-
const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
|
|
4738
|
-
...style,
|
|
4739
|
-
...resolvedActiveProps.style,
|
|
4740
|
-
...resolvedInactiveProps.style
|
|
4741
|
-
};
|
|
4742
|
-
return {
|
|
4743
|
-
...propsSafeToSpread,
|
|
4744
|
-
...resolvedActiveProps,
|
|
4745
|
-
...resolvedInactiveProps,
|
|
4746
|
-
href: hrefOption?.href,
|
|
4747
|
-
ref: innerRef,
|
|
4748
|
-
onClick: composeHandlers([onClick, handleClick]),
|
|
4749
|
-
onFocus: composeHandlers([onFocus, handleFocus]),
|
|
4750
|
-
onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),
|
|
4751
|
-
onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
|
|
4752
|
-
onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
|
|
4753
|
-
disabled: !!disabled,
|
|
4754
|
-
target,
|
|
4755
|
-
...resolvedStyle && { style: resolvedStyle },
|
|
4756
|
-
...resolvedClassName && { className: resolvedClassName },
|
|
4757
|
-
...disabled && STATIC_DISABLED_PROPS,
|
|
4758
|
-
...isActive && STATIC_ACTIVE_PROPS,
|
|
4759
|
-
...isTransitioning && STATIC_TRANSITIONING_PROPS
|
|
4760
|
-
};
|
|
4761
|
-
}
|
|
4762
|
-
var STATIC_EMPTY_OBJECT = {};
|
|
4763
|
-
var STATIC_ACTIVE_OBJECT = { className: "active" };
|
|
4764
|
-
var STATIC_DISABLED_PROPS = {
|
|
4765
|
-
role: "link",
|
|
4766
|
-
"aria-disabled": true
|
|
4767
|
-
};
|
|
4768
|
-
var STATIC_ACTIVE_PROPS = {
|
|
4769
|
-
"data-status": "active",
|
|
4770
|
-
"aria-current": "page"
|
|
4771
|
-
};
|
|
4772
|
-
var STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
|
|
4773
|
-
var timeoutMap = /* @__PURE__ */ new WeakMap();
|
|
4774
|
-
var intersectionObserverOptions = { rootMargin: "100px" };
|
|
4775
|
-
var composeHandlers = (handlers) => (e) => {
|
|
4776
|
-
for (const handler of handlers) {
|
|
4777
|
-
if (!handler) continue;
|
|
4778
|
-
if (e.defaultPrevented) return;
|
|
4779
|
-
handler(e);
|
|
4780
|
-
}
|
|
4781
|
-
};
|
|
4782
|
-
var Link = import_react.forwardRef((props, ref) => {
|
|
4783
|
-
const { _asChild, ...rest } = props;
|
|
4784
|
-
const { type: _type, ref: innerRef, ...linkProps } = useLinkProps(rest, ref);
|
|
4785
|
-
const children = typeof rest.children === "function" ? rest.children({ isActive: linkProps["data-status"] === "active" }) : rest.children;
|
|
4786
|
-
if (_asChild === void 0) delete linkProps.disabled;
|
|
4787
|
-
return import_react.createElement(_asChild ? _asChild : "a", {
|
|
4788
|
-
...linkProps,
|
|
4789
|
-
ref: innerRef
|
|
4790
|
-
}, children);
|
|
4791
|
-
});
|
|
4792
|
-
function isCtrlEvent(e) {
|
|
4793
|
-
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
4794
|
-
}
|
|
4795
|
-
//#endregion
|
|
4796
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/route.js
|
|
4797
|
-
var Route$4 = class extends BaseRoute {
|
|
4798
|
-
/**
|
|
4799
|
-
* @deprecated Use the `createRoute` function instead.
|
|
4800
|
-
*/
|
|
4801
|
-
constructor(options) {
|
|
4802
|
-
super(options);
|
|
4803
|
-
this.useMatch = (opts) => {
|
|
4804
|
-
return useMatch({
|
|
4805
|
-
select: opts?.select,
|
|
4806
|
-
from: this.id,
|
|
4807
|
-
structuralSharing: opts?.structuralSharing
|
|
4808
|
-
});
|
|
4809
|
-
};
|
|
4810
|
-
this.useRouteContext = (opts) => {
|
|
4811
|
-
return useMatch({
|
|
4812
|
-
...opts,
|
|
4813
|
-
from: this.id,
|
|
4814
|
-
select: (d) => opts?.select ? opts.select(d.context) : d.context
|
|
4815
|
-
});
|
|
4816
|
-
};
|
|
4817
|
-
this.useSearch = (opts) => {
|
|
4818
|
-
return useSearch({
|
|
4819
|
-
select: opts?.select,
|
|
4820
|
-
structuralSharing: opts?.structuralSharing,
|
|
4821
|
-
from: this.id
|
|
4822
|
-
});
|
|
4823
|
-
};
|
|
4824
|
-
this.useParams = (opts) => {
|
|
4825
|
-
return useParams({
|
|
4826
|
-
select: opts?.select,
|
|
4827
|
-
structuralSharing: opts?.structuralSharing,
|
|
4828
|
-
from: this.id
|
|
4829
|
-
});
|
|
4830
|
-
};
|
|
4831
|
-
this.useLoaderDeps = (opts) => {
|
|
4832
|
-
return useLoaderDeps({
|
|
4833
|
-
...opts,
|
|
4834
|
-
from: this.id
|
|
4835
|
-
});
|
|
4836
|
-
};
|
|
4837
|
-
this.useLoaderData = (opts) => {
|
|
4838
|
-
return useLoaderData({
|
|
4839
|
-
...opts,
|
|
4840
|
-
from: this.id
|
|
4841
|
-
});
|
|
4842
|
-
};
|
|
4843
|
-
this.useNavigate = () => {
|
|
4844
|
-
return useNavigate({ from: this.fullPath });
|
|
4845
|
-
};
|
|
4846
|
-
this.Link = import_react.forwardRef((props, ref) => {
|
|
4847
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
4848
|
-
ref,
|
|
4849
|
-
from: this.fullPath,
|
|
4850
|
-
...props
|
|
4851
|
-
});
|
|
4852
|
-
});
|
|
4853
|
-
this.$$typeof = Symbol.for("react.memo");
|
|
4854
|
-
}
|
|
4855
|
-
};
|
|
4856
|
-
function createRoute(options) {
|
|
4857
|
-
return new Route$4(options);
|
|
4858
|
-
}
|
|
4859
|
-
function createRootRouteWithContext() {
|
|
4860
|
-
return (options) => {
|
|
4861
|
-
return createRootRoute(options);
|
|
4862
|
-
};
|
|
4863
|
-
}
|
|
4864
|
-
var RootRoute = class extends BaseRootRoute {
|
|
4865
|
-
/**
|
|
4866
|
-
* @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.
|
|
4867
|
-
*/
|
|
4868
|
-
constructor(options) {
|
|
4869
|
-
super(options);
|
|
4870
|
-
this.useMatch = (opts) => {
|
|
4871
|
-
return useMatch({
|
|
4872
|
-
select: opts?.select,
|
|
4873
|
-
from: this.id,
|
|
4874
|
-
structuralSharing: opts?.structuralSharing
|
|
4875
|
-
});
|
|
4876
|
-
};
|
|
4877
|
-
this.useRouteContext = (opts) => {
|
|
4878
|
-
return useMatch({
|
|
4879
|
-
...opts,
|
|
4880
|
-
from: this.id,
|
|
4881
|
-
select: (d) => opts?.select ? opts.select(d.context) : d.context
|
|
4882
|
-
});
|
|
4883
|
-
};
|
|
4884
|
-
this.useSearch = (opts) => {
|
|
4885
|
-
return useSearch({
|
|
4886
|
-
select: opts?.select,
|
|
4887
|
-
structuralSharing: opts?.structuralSharing,
|
|
4888
|
-
from: this.id
|
|
4889
|
-
});
|
|
4890
|
-
};
|
|
4891
|
-
this.useParams = (opts) => {
|
|
4892
|
-
return useParams({
|
|
4893
|
-
select: opts?.select,
|
|
4894
|
-
structuralSharing: opts?.structuralSharing,
|
|
4895
|
-
from: this.id
|
|
4896
|
-
});
|
|
4897
|
-
};
|
|
4898
|
-
this.useLoaderDeps = (opts) => {
|
|
4899
|
-
return useLoaderDeps({
|
|
4900
|
-
...opts,
|
|
4901
|
-
from: this.id
|
|
4902
|
-
});
|
|
4903
|
-
};
|
|
4904
|
-
this.useLoaderData = (opts) => {
|
|
4905
|
-
return useLoaderData({
|
|
4906
|
-
...opts,
|
|
4907
|
-
from: this.id
|
|
4908
|
-
});
|
|
4909
|
-
};
|
|
4910
|
-
this.useNavigate = () => {
|
|
4911
|
-
return useNavigate({ from: this.fullPath });
|
|
4912
|
-
};
|
|
4913
|
-
this.Link = import_react.forwardRef((props, ref) => {
|
|
4914
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
4915
|
-
ref,
|
|
4916
|
-
from: this.fullPath,
|
|
4917
|
-
...props
|
|
4918
|
-
});
|
|
4919
|
-
});
|
|
4920
|
-
this.$$typeof = Symbol.for("react.memo");
|
|
4921
|
-
}
|
|
4922
|
-
};
|
|
4923
|
-
function createRootRoute(options) {
|
|
4924
|
-
return new RootRoute(options);
|
|
4925
|
-
}
|
|
4926
|
-
//#endregion
|
|
4927
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/fileRoute.js
|
|
4928
|
-
function createFileRoute(path) {
|
|
4929
|
-
if (typeof path === "object") return new FileRoute(path, { silent: true }).createRoute(path);
|
|
4930
|
-
return new FileRoute(path, { silent: true }).createRoute;
|
|
4931
|
-
}
|
|
4932
|
-
var FileRoute = class {
|
|
4933
|
-
constructor(path, _opts) {
|
|
4934
|
-
this.path = path;
|
|
4935
|
-
this.createRoute = (options) => {
|
|
4936
|
-
warning(this.silent, "FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");
|
|
4937
|
-
const route = createRoute(options);
|
|
4938
|
-
route.isRoot = false;
|
|
4939
|
-
return route;
|
|
4940
|
-
};
|
|
4941
|
-
this.silent = _opts?.silent;
|
|
4942
|
-
}
|
|
4943
|
-
};
|
|
4944
|
-
var LazyRoute = class {
|
|
4945
|
-
constructor(opts) {
|
|
4946
|
-
this.useMatch = (opts2) => {
|
|
4947
|
-
return useMatch({
|
|
4948
|
-
select: opts2?.select,
|
|
4949
|
-
from: this.options.id,
|
|
4950
|
-
structuralSharing: opts2?.structuralSharing
|
|
4951
|
-
});
|
|
4952
|
-
};
|
|
4953
|
-
this.useRouteContext = (opts2) => {
|
|
4954
|
-
return useMatch({
|
|
4955
|
-
from: this.options.id,
|
|
4956
|
-
select: (d) => opts2?.select ? opts2.select(d.context) : d.context
|
|
4957
|
-
});
|
|
4958
|
-
};
|
|
4959
|
-
this.useSearch = (opts2) => {
|
|
4960
|
-
return useSearch({
|
|
4961
|
-
select: opts2?.select,
|
|
4962
|
-
structuralSharing: opts2?.structuralSharing,
|
|
4963
|
-
from: this.options.id
|
|
4964
|
-
});
|
|
4965
|
-
};
|
|
4966
|
-
this.useParams = (opts2) => {
|
|
4967
|
-
return useParams({
|
|
4968
|
-
select: opts2?.select,
|
|
4969
|
-
structuralSharing: opts2?.structuralSharing,
|
|
4970
|
-
from: this.options.id
|
|
4971
|
-
});
|
|
4972
|
-
};
|
|
4973
|
-
this.useLoaderDeps = (opts2) => {
|
|
4974
|
-
return useLoaderDeps({
|
|
4975
|
-
...opts2,
|
|
4976
|
-
from: this.options.id
|
|
4977
|
-
});
|
|
4978
|
-
};
|
|
4979
|
-
this.useLoaderData = (opts2) => {
|
|
4980
|
-
return useLoaderData({
|
|
4981
|
-
...opts2,
|
|
4982
|
-
from: this.options.id
|
|
4983
|
-
});
|
|
4984
|
-
};
|
|
4985
|
-
this.useNavigate = () => {
|
|
4986
|
-
return useNavigate({ from: useRouter().routesById[this.options.id].fullPath });
|
|
4987
|
-
};
|
|
4988
|
-
this.options = opts;
|
|
4989
|
-
this.$$typeof = Symbol.for("react.memo");
|
|
4990
|
-
}
|
|
4991
|
-
};
|
|
4992
|
-
function createLazyFileRoute(id) {
|
|
4993
|
-
if (typeof id === "object") return new LazyRoute(id);
|
|
4994
|
-
return (opts) => new LazyRoute({
|
|
4995
|
-
id,
|
|
4996
|
-
...opts
|
|
4997
|
-
});
|
|
4998
|
-
}
|
|
4999
|
-
//#endregion
|
|
5000
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/lazyRouteComponent.js
|
|
5001
|
-
function lazyRouteComponent(importer, exportName) {
|
|
5002
|
-
let loadPromise;
|
|
5003
|
-
let comp;
|
|
5004
|
-
let error;
|
|
5005
|
-
let reload;
|
|
5006
|
-
const load = () => {
|
|
5007
|
-
if (!loadPromise) loadPromise = importer().then((res) => {
|
|
5008
|
-
loadPromise = void 0;
|
|
5009
|
-
comp = res[exportName ?? "default"];
|
|
5010
|
-
}).catch((err) => {
|
|
5011
|
-
error = err;
|
|
5012
|
-
if (isModuleNotFoundError(error)) {
|
|
5013
|
-
if (error instanceof Error && typeof window !== "undefined" && typeof sessionStorage !== "undefined") {
|
|
5014
|
-
const storageKey = `tanstack_router_reload:${error.message}`;
|
|
5015
|
-
if (!sessionStorage.getItem(storageKey)) {
|
|
5016
|
-
sessionStorage.setItem(storageKey, "1");
|
|
5017
|
-
reload = true;
|
|
5018
|
-
}
|
|
5019
|
-
}
|
|
5020
|
-
}
|
|
5021
|
-
});
|
|
5022
|
-
return loadPromise;
|
|
5023
|
-
};
|
|
5024
|
-
const lazyComp = function Lazy(props) {
|
|
5025
|
-
if (reload) {
|
|
5026
|
-
window.location.reload();
|
|
5027
|
-
throw new Promise(() => {});
|
|
5028
|
-
}
|
|
5029
|
-
if (error) throw error;
|
|
5030
|
-
if (!comp) if (import_react.use) import_react.use(load());
|
|
5031
|
-
else throw load();
|
|
5032
|
-
return import_react.createElement(comp, props);
|
|
5033
|
-
};
|
|
5034
|
-
lazyComp.preload = load;
|
|
5035
|
-
return lazyComp;
|
|
5036
|
-
}
|
|
5037
|
-
//#endregion
|
|
5038
3061
|
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/Transitioner.js
|
|
5039
3062
|
function Transitioner() {
|
|
5040
3063
|
const router = useRouter();
|
|
@@ -24644,7 +22667,7 @@ var require_react_dom_server_node_development = /* @__PURE__ */ __commonJSMin(((
|
|
|
24644
22667
|
})();
|
|
24645
22668
|
}));
|
|
24646
22669
|
//#endregion
|
|
24647
|
-
//#region ~icons/lucide/
|
|
22670
|
+
//#region ~icons/lucide/file-text.jsx
|
|
24648
22671
|
var import_server_node = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
24649
22672
|
var l, s;
|
|
24650
22673
|
if (process.env.NODE_ENV === "production") {
|
|
@@ -24662,6 +22685,22 @@ var import_server_node = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
24662
22685
|
exports.resumeToPipeableStream = s.resumeToPipeableStream;
|
|
24663
22686
|
exports.resume = s.resume;
|
|
24664
22687
|
})))();
|
|
22688
|
+
var lucideFileText = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
22689
|
+
viewBox: "0 0 24 24",
|
|
22690
|
+
width: "1.2em",
|
|
22691
|
+
height: "1.2em",
|
|
22692
|
+
...props,
|
|
22693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", {
|
|
22694
|
+
fill: "none",
|
|
22695
|
+
stroke: "currentColor",
|
|
22696
|
+
strokeLinecap: "round",
|
|
22697
|
+
strokeLinejoin: "round",
|
|
22698
|
+
strokeWidth: 2,
|
|
22699
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8" })]
|
|
22700
|
+
})
|
|
22701
|
+
});
|
|
22702
|
+
//#endregion
|
|
22703
|
+
//#region ~icons/lucide/home.jsx
|
|
24665
22704
|
var lucideHome = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
24666
22705
|
viewBox: "0 0 24 24",
|
|
24667
22706
|
width: "1.2em",
|
|
@@ -24699,15 +22738,23 @@ var lucideKeyRound = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg
|
|
|
24699
22738
|
});
|
|
24700
22739
|
//#endregion
|
|
24701
22740
|
//#region src/components/Sidebar.tsx
|
|
24702
|
-
var menuItems = [
|
|
24703
|
-
|
|
24704
|
-
|
|
24705
|
-
|
|
24706
|
-
|
|
24707
|
-
|
|
24708
|
-
|
|
24709
|
-
|
|
24710
|
-
|
|
22741
|
+
var menuItems = [
|
|
22742
|
+
{
|
|
22743
|
+
title: "Dashboard",
|
|
22744
|
+
path: "/",
|
|
22745
|
+
icon: lucideHome
|
|
22746
|
+
},
|
|
22747
|
+
{
|
|
22748
|
+
title: "Tokens",
|
|
22749
|
+
path: "/tokens",
|
|
22750
|
+
icon: lucideKeyRound
|
|
22751
|
+
},
|
|
22752
|
+
{
|
|
22753
|
+
title: "Request Logs",
|
|
22754
|
+
path: "/logs",
|
|
22755
|
+
icon: lucideFileText
|
|
22756
|
+
}
|
|
22757
|
+
];
|
|
24711
22758
|
function Sidebar({ className }) {
|
|
24712
22759
|
const pathname = useRouterState({ select: (s) => s.location.pathname });
|
|
24713
22760
|
const isActive = (path) => {
|
|
@@ -24763,6 +22810,7 @@ function App({ children }) {
|
|
|
24763
22810
|
}
|
|
24764
22811
|
//#endregion
|
|
24765
22812
|
//#region ../../node_modules/.pnpm/@better-auth+core@1.4.22_@better-auth+utils@0.3.0_@better-fetch+fetch@1.1.21_better-cal_b83eeaac17f91af5784582817c6edbf3/node_modules/@better-auth/core/dist/env/env-impl.mjs
|
|
22813
|
+
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
|
|
24766
22814
|
var _envShim = Object.create(null);
|
|
24767
22815
|
var _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis);
|
|
24768
22816
|
var env = new Proxy(_envShim, {
|
|
@@ -44547,7 +42595,7 @@ function SonamuProvider({ children }) {
|
|
|
44547
42595
|
}
|
|
44548
42596
|
//#endregion
|
|
44549
42597
|
//#region src/routes/__root.tsx
|
|
44550
|
-
var Route$
|
|
42598
|
+
var Route$4 = createRootRouteWithContext()({
|
|
44551
42599
|
head: () => ({ meta: [
|
|
44552
42600
|
{ charSet: "utf-8" },
|
|
44553
42601
|
{
|
|
@@ -44559,7 +42607,7 @@ var Route$3 = createRootRouteWithContext()({
|
|
|
44559
42607
|
component: RootComponent
|
|
44560
42608
|
});
|
|
44561
42609
|
function RootComponent() {
|
|
44562
|
-
const { queryClient } = Route$
|
|
42610
|
+
const { queryClient } = Route$4.useRouteContext();
|
|
44563
42611
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("html", {
|
|
44564
42612
|
lang: "en",
|
|
44565
42613
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("head", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("link", {
|
|
@@ -44577,15 +42625,23 @@ function RootComponent() {
|
|
|
44577
42625
|
}
|
|
44578
42626
|
//#endregion
|
|
44579
42627
|
//#region src/routes/tokens.tsx
|
|
44580
|
-
var $$splitComponentImporter$
|
|
44581
|
-
var Route$
|
|
42628
|
+
var $$splitComponentImporter$3 = () => import("./assets/tokens-BYhGItkk.js");
|
|
42629
|
+
var Route$3 = createFileRoute("/tokens")({ component: lazyRouteComponent($$splitComponentImporter$3, "component") });
|
|
42630
|
+
//#endregion
|
|
42631
|
+
//#region src/routes/logs.tsx
|
|
42632
|
+
var $$splitComponentImporter$2 = () => import("./assets/logs-bLRMIO1J.js");
|
|
42633
|
+
var logsSearchSchema = object({ page: number().optional().default(1) });
|
|
42634
|
+
var Route$2 = createFileRoute("/logs")({
|
|
42635
|
+
validateSearch: logsSearchSchema,
|
|
42636
|
+
component: lazyRouteComponent($$splitComponentImporter$2, "component")
|
|
42637
|
+
});
|
|
44582
42638
|
//#endregion
|
|
44583
42639
|
//#region src/routes/index.tsx
|
|
44584
|
-
var $$splitComponentImporter$1 = () => import("./assets/routes-
|
|
42640
|
+
var $$splitComponentImporter$1 = () => import("./assets/routes-qwzTPLE2.js");
|
|
44585
42641
|
var Route$1 = createFileRoute("/")({ component: lazyRouteComponent($$splitComponentImporter$1, "component") });
|
|
44586
42642
|
//#endregion
|
|
44587
42643
|
//#region src/routes/requests/show.tsx
|
|
44588
|
-
var $$splitComponentImporter = () => import("./assets/show-
|
|
42644
|
+
var $$splitComponentImporter = () => import("./assets/show-Btv2c6zd.js");
|
|
44589
42645
|
var showSearchSchema = object({ id: number() });
|
|
44590
42646
|
var Route = createFileRoute("/requests/show")({
|
|
44591
42647
|
validateSearch: showSearchSchema,
|
|
@@ -44593,25 +42649,31 @@ var Route = createFileRoute("/requests/show")({
|
|
|
44593
42649
|
});
|
|
44594
42650
|
//#endregion
|
|
44595
42651
|
//#region src/routeTree.gen.ts
|
|
44596
|
-
var TokensRoute = Route$
|
|
42652
|
+
var TokensRoute = Route$3.update({
|
|
44597
42653
|
id: "/tokens",
|
|
44598
42654
|
path: "/tokens",
|
|
44599
|
-
getParentRoute: () => Route$
|
|
42655
|
+
getParentRoute: () => Route$4
|
|
42656
|
+
});
|
|
42657
|
+
var LogsRoute = Route$2.update({
|
|
42658
|
+
id: "/logs",
|
|
42659
|
+
path: "/logs",
|
|
42660
|
+
getParentRoute: () => Route$4
|
|
44600
42661
|
});
|
|
44601
42662
|
var rootRouteChildren = {
|
|
44602
42663
|
IndexRoute: Route$1.update({
|
|
44603
42664
|
id: "/",
|
|
44604
42665
|
path: "/",
|
|
44605
|
-
getParentRoute: () => Route$
|
|
42666
|
+
getParentRoute: () => Route$4
|
|
44606
42667
|
}),
|
|
42668
|
+
LogsRoute,
|
|
44607
42669
|
TokensRoute,
|
|
44608
42670
|
RequestsShowRoute: Route.update({
|
|
44609
42671
|
id: "/requests/show",
|
|
44610
42672
|
path: "/requests/show",
|
|
44611
|
-
getParentRoute: () => Route$
|
|
42673
|
+
getParentRoute: () => Route$4
|
|
44612
42674
|
})
|
|
44613
42675
|
};
|
|
44614
|
-
var routeTree = Route$
|
|
42676
|
+
var routeTree = Route$4._addFileChildren(rootRouteChildren)._addFileTypes();
|
|
44615
42677
|
//#endregion
|
|
44616
42678
|
//#region src/entry-server.generated.tsx
|
|
44617
42679
|
/**
|
|
@@ -44642,4 +42704,4 @@ async function render(url, preloadedData = []) {
|
|
|
44642
42704
|
};
|
|
44643
42705
|
}
|
|
44644
42706
|
//#endregion
|
|
44645
|
-
export {
|
|
42707
|
+
export { lucideKeyRound as a, mn as i, Route$2 as n, m5 as r, render, Route as t };
|