@unifold/connect-react 0.1.58 → 0.1.59

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/dist/index.js CHANGED
@@ -1260,19 +1260,19 @@ function useUnifold() {
1260
1260
  // ../ui-react/dist/index.mjs
1261
1261
  var import_react8 = require("react");
1262
1262
 
1263
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1263
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
1264
1264
  var import_react3 = require("react");
1265
1265
 
1266
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
1266
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
1267
1267
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1268
1268
  var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
1269
1269
  return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
1270
1270
  }).join(" ").trim();
1271
1271
 
1272
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
1272
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
1273
1273
  var import_react2 = require("react");
1274
1274
 
1275
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
1275
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
1276
1276
  var defaultAttributes = {
1277
1277
  xmlns: "http://www.w3.org/2000/svg",
1278
1278
  width: 24,
@@ -1285,7 +1285,7 @@ var defaultAttributes = {
1285
1285
  strokeLinejoin: "round"
1286
1286
  };
1287
1287
 
1288
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
1288
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
1289
1289
  var Icon = (0, import_react2.forwardRef)(
1290
1290
  ({
1291
1291
  color = "currentColor",
@@ -1317,7 +1317,7 @@ var Icon = (0, import_react2.forwardRef)(
1317
1317
  }
1318
1318
  );
1319
1319
 
1320
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1320
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
1321
1321
  var createLucideIcon = (iconName, iconNode) => {
1322
1322
  const Component = (0, import_react3.forwardRef)(
1323
1323
  ({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
@@ -1331,7 +1331,7 @@ var createLucideIcon = (iconName, iconNode) => {
1331
1331
  return Component;
1332
1332
  };
1333
1333
 
1334
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
1334
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
1335
1335
  var ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
1336
1336
  ["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
1337
1337
  ["path", { d: "M4 7h16", key: "6tx8e3" }],
@@ -1339,13 +1339,13 @@ var ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
1339
1339
  ["path", { d: "M20 17H4", key: "h6l3hr" }]
1340
1340
  ]);
1341
1341
 
1342
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
1342
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-left.js
1343
1343
  var ArrowLeft = createLucideIcon("ArrowLeft", [
1344
1344
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1345
1345
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
1346
1346
  ]);
1347
1347
 
1348
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js
1348
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js
1349
1349
  var ArrowUpDown = createLucideIcon("ArrowUpDown", [
1350
1350
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
1351
1351
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
@@ -1353,36 +1353,36 @@ var ArrowUpDown = createLucideIcon("ArrowUpDown", [
1353
1353
  ["path", { d: "M7 4v16", key: "1glfcx" }]
1354
1354
  ]);
1355
1355
 
1356
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
1356
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js
1357
1357
  var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
1358
1358
 
1359
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
1359
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js
1360
1360
  var ChevronDown = createLucideIcon("ChevronDown", [
1361
1361
  ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
1362
1362
  ]);
1363
1363
 
1364
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
1364
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js
1365
1365
  var ChevronRight = createLucideIcon("ChevronRight", [
1366
1366
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
1367
1367
  ]);
1368
1368
 
1369
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
1369
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-up.js
1370
1370
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
1371
1371
 
1372
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-alert.js
1372
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-alert.js
1373
1373
  var CircleAlert = createLucideIcon("CircleAlert", [
1374
1374
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1375
1375
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
1376
1376
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
1377
1377
  ]);
1378
1378
 
1379
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-check.js
1379
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-check.js
1380
1380
  var CircleCheck = createLucideIcon("CircleCheck", [
1381
1381
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1382
1382
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1383
1383
  ]);
1384
1384
 
1385
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clipboard-paste.js
1385
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/clipboard-paste.js
1386
1386
  var ClipboardPaste = createLucideIcon("ClipboardPaste", [
1387
1387
  [
1388
1388
  "path",
@@ -1398,38 +1398,38 @@ var ClipboardPaste = createLucideIcon("ClipboardPaste", [
1398
1398
  ["path", { d: "m17 10 4 4-4 4", key: "vp2hj1" }]
1399
1399
  ]);
1400
1400
 
1401
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
1401
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/clock.js
1402
1402
  var Clock = createLucideIcon("Clock", [
1403
1403
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1404
1404
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
1405
1405
  ]);
1406
1406
 
1407
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
1407
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/copy.js
1408
1408
  var Copy = createLucideIcon("Copy", [
1409
1409
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1410
1410
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1411
1411
  ]);
1412
1412
 
1413
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
1413
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/credit-card.js
1414
1414
  var CreditCard = createLucideIcon("CreditCard", [
1415
1415
  ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
1416
1416
  ["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
1417
1417
  ]);
1418
1418
 
1419
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
1419
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
1420
1420
  var DollarSign = createLucideIcon("DollarSign", [
1421
1421
  ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
1422
1422
  ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
1423
1423
  ]);
1424
1424
 
1425
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/external-link.js
1425
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/external-link.js
1426
1426
  var ExternalLink = createLucideIcon("ExternalLink", [
1427
1427
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
1428
1428
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
1429
1429
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
1430
1430
  ]);
1431
1431
 
1432
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/hand.js
1432
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/hand.js
1433
1433
  var Hand = createLucideIcon("Hand", [
1434
1434
  ["path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2", key: "1fvzgz" }],
1435
1435
  ["path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2", key: "1kc0my" }],
@@ -1443,26 +1443,26 @@ var Hand = createLucideIcon("Hand", [
1443
1443
  ]
1444
1444
  ]);
1445
1445
 
1446
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
1446
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/info.js
1447
1447
  var Info = createLucideIcon("Info", [
1448
1448
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1449
1449
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
1450
1450
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
1451
1451
  ]);
1452
1452
 
1453
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/link-2.js
1453
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/link-2.js
1454
1454
  var Link2 = createLucideIcon("Link2", [
1455
1455
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
1456
1456
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
1457
1457
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
1458
1458
  ]);
1459
1459
 
1460
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js
1460
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/loader-circle.js
1461
1461
  var LoaderCircle = createLucideIcon("LoaderCircle", [
1462
1462
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
1463
1463
  ]);
1464
1464
 
1465
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/map-pin-off.js
1465
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/map-pin-off.js
1466
1466
  var MapPinOff = createLucideIcon("MapPinOff", [
1467
1467
  ["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16", key: "1d4wjd" }],
1468
1468
  [
@@ -1477,7 +1477,7 @@ var MapPinOff = createLucideIcon("MapPinOff", [
1477
1477
  ["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74", key: "13wojd" }]
1478
1478
  ]);
1479
1479
 
1480
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
1480
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
1481
1481
  var RefreshCw = createLucideIcon("RefreshCw", [
1482
1482
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1483
1483
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
@@ -1485,7 +1485,7 @@ var RefreshCw = createLucideIcon("RefreshCw", [
1485
1485
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
1486
1486
  ]);
1487
1487
 
1488
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js
1488
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/shield-check.js
1489
1489
  var ShieldCheck = createLucideIcon("ShieldCheck", [
1490
1490
  [
1491
1491
  "path",
@@ -1497,7 +1497,7 @@ var ShieldCheck = createLucideIcon("ShieldCheck", [
1497
1497
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1498
1498
  ]);
1499
1499
 
1500
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield.js
1500
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/shield.js
1501
1501
  var Shield = createLucideIcon("Shield", [
1502
1502
  [
1503
1503
  "path",
@@ -1508,7 +1508,7 @@ var Shield = createLucideIcon("Shield", [
1508
1508
  ]
1509
1509
  ]);
1510
1510
 
1511
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
1511
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
1512
1512
  var TriangleAlert = createLucideIcon("TriangleAlert", [
1513
1513
  [
1514
1514
  "path",
@@ -1521,7 +1521,7 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
1521
1521
  ["path", { d: "M12 17h.01", key: "p32p05" }]
1522
1522
  ]);
1523
1523
 
1524
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
1524
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
1525
1525
  var WalletMinimal = createLucideIcon("WalletMinimal", [
1526
1526
  ["path", { d: "M17 14h.01", key: "7oqj8z" }],
1527
1527
  [
@@ -1533,7 +1533,7 @@ var WalletMinimal = createLucideIcon("WalletMinimal", [
1533
1533
  ]
1534
1534
  ]);
1535
1535
 
1536
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet.js
1536
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/wallet.js
1537
1537
  var Wallet = createLucideIcon("Wallet", [
1538
1538
  [
1539
1539
  "path",
@@ -1545,13 +1545,13 @@ var Wallet = createLucideIcon("Wallet", [
1545
1545
  ["path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4", key: "xoc0q4" }]
1546
1546
  ]);
1547
1547
 
1548
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
1548
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js
1549
1549
  var X = createLucideIcon("X", [
1550
1550
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1551
1551
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1552
1552
  ]);
1553
1553
 
1554
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/zap.js
1554
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/zap.js
1555
1555
  var Zap = createLucideIcon("Zap", [
1556
1556
  [
1557
1557
  "path",
@@ -1565,7 +1565,7 @@ var Zap = createLucideIcon("Zap", [
1565
1565
  // ../ui-react/dist/index.mjs
1566
1566
  var React36 = __toESM(require("react"), 1);
1567
1567
 
1568
- // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._c543yfkcelkno3idkccogkevua/node_modules/@radix-ui/react-dialog/dist/index.mjs
1568
+ // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._qsrlqvvmbbdzsfzle7bhabp7n4/node_modules/@radix-ui/react-dialog/dist/index.mjs
1569
1569
  var React24 = __toESM(require("react"), 1);
1570
1570
 
1571
1571
  // ../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
@@ -1579,7 +1579,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
1579
1579
  };
1580
1580
  }
1581
1581
 
1582
- // ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1582
+ // ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1583
1583
  var React = __toESM(require("react"), 1);
1584
1584
  function setRef(ref, value) {
1585
1585
  if (typeof ref === "function") {
@@ -1616,7 +1616,7 @@ function useComposedRefs(...refs) {
1616
1616
  return React.useCallback(composeRefs(...refs), refs);
1617
1617
  }
1618
1618
 
1619
- // ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
1619
+ // ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.mjs
1620
1620
  var React2 = __toESM(require("react"), 1);
1621
1621
  var import_jsx_runtime2 = require("react/jsx-runtime");
1622
1622
  function createContext22(rootComponentName, defaultContext) {
@@ -1693,15 +1693,15 @@ function composeContextScopes(...scopes) {
1693
1693
  return createScope;
1694
1694
  }
1695
1695
 
1696
- // ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
1696
+ // ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.mjs
1697
1697
  var React4 = __toESM(require("react"), 1);
1698
1698
 
1699
- // ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
1699
+ // ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
1700
1700
  var React3 = __toESM(require("react"), 1);
1701
1701
  var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
1702
1702
  };
1703
1703
 
1704
- // ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
1704
+ // ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.mjs
1705
1705
  var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
1706
1706
  var count = 0;
1707
1707
  function useId(deterministicId) {
@@ -1712,7 +1712,7 @@ function useId(deterministicId) {
1712
1712
  return deterministicId || (id ? `radix-${id}` : "");
1713
1713
  }
1714
1714
 
1715
- // ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1715
+ // ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1716
1716
  var React5 = __toESM(require("react"), 1);
1717
1717
  var React22 = __toESM(require("react"), 1);
1718
1718
  var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
@@ -1780,14 +1780,14 @@ function isFunction(value) {
1780
1780
  return typeof value === "function";
1781
1781
  }
1782
1782
 
1783
- // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ww6fouyx2m6cwmjzqm53vz7gdi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
1783
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ibhfsyo6t6zt76khfyzt7lbbq4/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
1784
1784
  var React10 = __toESM(require("react"), 1);
1785
1785
 
1786
- // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._ttsd3lhl6vteekfa4w7yhzbari/node_modules/@radix-ui/react-primitive/dist/index.mjs
1786
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._gsiol2hcpd6qizfnjc77drzehq/node_modules/@radix-ui/react-primitive/dist/index.mjs
1787
1787
  var React7 = __toESM(require("react"), 1);
1788
1788
  var ReactDOM = __toESM(require("react-dom"), 1);
1789
1789
 
1790
- // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
1790
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
1791
1791
  var React6 = __toESM(require("react"), 1);
1792
1792
  var import_jsx_runtime3 = require("react/jsx-runtime");
1793
1793
  // @__NO_SIDE_EFFECTS__
@@ -1882,7 +1882,7 @@ function getElementRef(element) {
1882
1882
  return element.props.ref || element.ref;
1883
1883
  }
1884
1884
 
1885
- // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._ttsd3lhl6vteekfa4w7yhzbari/node_modules/@radix-ui/react-primitive/dist/index.mjs
1885
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._gsiol2hcpd6qizfnjc77drzehq/node_modules/@radix-ui/react-primitive/dist/index.mjs
1886
1886
  var import_jsx_runtime4 = require("react/jsx-runtime");
1887
1887
  var NODES = [
1888
1888
  "a",
@@ -1920,7 +1920,7 @@ function dispatchDiscreteCustomEvent(target, event) {
1920
1920
  if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
1921
1921
  }
1922
1922
 
1923
- // ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
1923
+ // ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
1924
1924
  var React8 = __toESM(require("react"), 1);
1925
1925
  function useCallbackRef(callback) {
1926
1926
  const callbackRef = React8.useRef(callback);
@@ -1930,7 +1930,7 @@ function useCallbackRef(callback) {
1930
1930
  return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
1931
1931
  }
1932
1932
 
1933
- // ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
1933
+ // ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
1934
1934
  var React9 = __toESM(require("react"), 1);
1935
1935
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
1936
1936
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
@@ -1945,7 +1945,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
1945
1945
  }, [onEscapeKeyDown, ownerDocument]);
1946
1946
  }
1947
1947
 
1948
- // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ww6fouyx2m6cwmjzqm53vz7gdi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
1948
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ibhfsyo6t6zt76khfyzt7lbbq4/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
1949
1949
  var import_jsx_runtime5 = require("react/jsx-runtime");
1950
1950
  var DISMISSABLE_LAYER_NAME = "DismissableLayer";
1951
1951
  var CONTEXT_UPDATE = "dismissableLayer.update";
@@ -2150,7 +2150,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
2150
2150
  }
2151
2151
  }
2152
2152
 
2153
- // ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@1_tfxcpqbhv4yeom5omze5oqyk7a/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
2153
+ // ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@1_md5yxmzngi2erdl2zbrekjyad4/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
2154
2154
  var React11 = __toESM(require("react"), 1);
2155
2155
  var import_jsx_runtime6 = require("react/jsx-runtime");
2156
2156
  var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
@@ -2354,7 +2354,7 @@ function removeLinks(items) {
2354
2354
  return items.filter((item) => item.tagName !== "A");
2355
2355
  }
2356
2356
 
2357
- // ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_nk6ushapd5m5qcefseikyaidiq/node_modules/@radix-ui/react-portal/dist/index.mjs
2357
+ // ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_a2vhfobmg2rqexwxy4r74ynlqm/node_modules/@radix-ui/react-portal/dist/index.mjs
2358
2358
  var React12 = __toESM(require("react"), 1);
2359
2359
  var import_react_dom = __toESM(require("react-dom"), 1);
2360
2360
  var import_jsx_runtime7 = require("react/jsx-runtime");
@@ -2368,7 +2368,7 @@ var Portal = React12.forwardRef((props, forwardedRef) => {
2368
2368
  });
2369
2369
  Portal.displayName = PORTAL_NAME;
2370
2370
 
2371
- // ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2_lhxxu3bl2a5egptwobjoj75owm/node_modules/@radix-ui/react-presence/dist/index.mjs
2371
+ // ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2_vxszomp4jt7xd7ti6rlx4jypfq/node_modules/@radix-ui/react-presence/dist/index.mjs
2372
2372
  var React23 = __toESM(require("react"), 1);
2373
2373
  var React13 = __toESM(require("react"), 1);
2374
2374
  function useStateMachine(initialState, machine) {
@@ -2494,7 +2494,7 @@ function getElementRef2(element) {
2494
2494
  return element.props.ref || element.ref;
2495
2495
  }
2496
2496
 
2497
- // ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
2497
+ // ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
2498
2498
  var React14 = __toESM(require("react"), 1);
2499
2499
  var count2 = 0;
2500
2500
  function useFocusGuards() {
@@ -2554,19 +2554,19 @@ function __spreadArray(to, from, pack) {
2554
2554
  return to.concat(ar || Array.prototype.slice.call(from));
2555
2555
  }
2556
2556
 
2557
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
2557
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
2558
2558
  var React21 = __toESM(require("react"));
2559
2559
 
2560
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
2560
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
2561
2561
  var React17 = __toESM(require("react"));
2562
2562
 
2563
- // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
2563
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
2564
2564
  var zeroRightClassName = "right-scroll-bar-position";
2565
2565
  var fullWidthClassName = "width-before-scroll-bar";
2566
2566
  var noScrollbarsClassName = "with-scroll-bars-hidden";
2567
2567
  var removedBarSizeVariable = "--removed-body-scroll-bar-size";
2568
2568
 
2569
- // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js
2569
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/assignRef.js
2570
2570
  function assignRef(ref, value) {
2571
2571
  if (typeof ref === "function") {
2572
2572
  ref(value);
@@ -2576,7 +2576,7 @@ function assignRef(ref, value) {
2576
2576
  return ref;
2577
2577
  }
2578
2578
 
2579
- // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js
2579
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useRef.js
2580
2580
  var import_react4 = require("react");
2581
2581
  function useCallbackRef2(initialValue, callback) {
2582
2582
  var ref = (0, import_react4.useState)(function() {
@@ -2604,7 +2604,7 @@ function useCallbackRef2(initialValue, callback) {
2604
2604
  return ref.facade;
2605
2605
  }
2606
2606
 
2607
- // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
2607
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
2608
2608
  var React15 = __toESM(require("react"));
2609
2609
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
2610
2610
  var currentValues = /* @__PURE__ */ new WeakMap();
@@ -2636,7 +2636,7 @@ function useMergeRefs(refs, defaultValue) {
2636
2636
  return callbackRef;
2637
2637
  }
2638
2638
 
2639
- // ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js
2639
+ // ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/use-sidecar/dist/es2015/medium.js
2640
2640
  function ItoI(a) {
2641
2641
  return a;
2642
2642
  }
@@ -2722,7 +2722,7 @@ function createSidecarMedium(options) {
2722
2722
  return medium;
2723
2723
  }
2724
2724
 
2725
- // ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js
2725
+ // ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/use-sidecar/dist/es2015/exports.js
2726
2726
  var React16 = __toESM(require("react"));
2727
2727
  var SideCar = function(_a) {
2728
2728
  var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
@@ -2741,10 +2741,10 @@ function exportSidecar(medium, exported) {
2741
2741
  return SideCar;
2742
2742
  }
2743
2743
 
2744
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js
2744
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/medium.js
2745
2745
  var effectCar = createSidecarMedium();
2746
2746
 
2747
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
2747
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
2748
2748
  var nothing = function() {
2749
2749
  return;
2750
2750
  };
@@ -2776,13 +2776,13 @@ RemoveScroll.classNames = {
2776
2776
  zeroRight: zeroRightClassName
2777
2777
  };
2778
2778
 
2779
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
2779
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
2780
2780
  var React20 = __toESM(require("react"));
2781
2781
 
2782
- // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2782
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2783
2783
  var React19 = __toESM(require("react"));
2784
2784
 
2785
- // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
2785
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
2786
2786
  var React18 = __toESM(require("react"));
2787
2787
 
2788
2788
  // ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
@@ -2797,7 +2797,7 @@ var getNonce = function() {
2797
2797
  return void 0;
2798
2798
  };
2799
2799
 
2800
- // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js
2800
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/singleton.js
2801
2801
  function makeStyleTag() {
2802
2802
  if (!document)
2803
2803
  return null;
@@ -2843,7 +2843,7 @@ var stylesheetSingleton = function() {
2843
2843
  };
2844
2844
  };
2845
2845
 
2846
- // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
2846
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
2847
2847
  var styleHookSingleton = function() {
2848
2848
  var sheet = stylesheetSingleton();
2849
2849
  return function(styles, isDynamic) {
@@ -2856,7 +2856,7 @@ var styleHookSingleton = function() {
2856
2856
  };
2857
2857
  };
2858
2858
 
2859
- // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js
2859
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/component.js
2860
2860
  var styleSingleton = function() {
2861
2861
  var useStyle = styleHookSingleton();
2862
2862
  var Sheet = function(_a) {
@@ -2867,7 +2867,7 @@ var styleSingleton = function() {
2867
2867
  return Sheet;
2868
2868
  };
2869
2869
 
2870
- // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
2870
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
2871
2871
  var zeroGap = {
2872
2872
  left: 0,
2873
2873
  top: 0,
@@ -2902,7 +2902,7 @@ var getGapWidth = function(gapMode) {
2902
2902
  };
2903
2903
  };
2904
2904
 
2905
- // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2905
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2906
2906
  var Style = styleSingleton();
2907
2907
  var lockAttribute = "data-scroll-locked";
2908
2908
  var getStyles = function(_a, allowRelative, gapMode, important) {
@@ -2942,7 +2942,7 @@ var RemoveScrollBar = function(_a) {
2942
2942
  return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
2943
2943
  };
2944
2944
 
2945
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
2945
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
2946
2946
  var passiveSupported = false;
2947
2947
  if (typeof window !== "undefined") {
2948
2948
  try {
@@ -2961,7 +2961,7 @@ if (typeof window !== "undefined") {
2961
2961
  var options;
2962
2962
  var nonPassive = passiveSupported ? { passive: false } : false;
2963
2963
 
2964
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
2964
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
2965
2965
  var alwaysContainsScroll = function(node) {
2966
2966
  return node.tagName === "TEXTAREA";
2967
2967
  };
@@ -3061,7 +3061,7 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
3061
3061
  return shouldCancelScroll;
3062
3062
  };
3063
3063
 
3064
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
3064
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
3065
3065
  var getTouchXY = function(event) {
3066
3066
  return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
3067
3067
  };
@@ -3232,10 +3232,10 @@ function getOutermostShadowParent(node) {
3232
3232
  return shadowParent;
3233
3233
  }
3234
3234
 
3235
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js
3235
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/sidecar.js
3236
3236
  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
3237
3237
 
3238
- // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
3238
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
3239
3239
  var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
3240
3240
  return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
3241
3241
  });
@@ -3363,7 +3363,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
3363
3363
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
3364
3364
  };
3365
3365
 
3366
- // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._c543yfkcelkno3idkccogkevua/node_modules/@radix-ui/react-dialog/dist/index.mjs
3366
+ // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._qsrlqvvmbbdzsfzle7bhabp7n4/node_modules/@radix-ui/react-dialog/dist/index.mjs
3367
3367
  var import_jsx_runtime8 = require("react/jsx-runtime");
3368
3368
  var DIALOG_NAME = "Dialog";
3369
3369
  var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
@@ -6271,12 +6271,12 @@ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
6271
6271
  return ExecutionStatus2;
6272
6272
  })(ExecutionStatus || {});
6273
6273
  var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
6274
- async function queryExecutions(externalUserId, publishableKey, actionType) {
6274
+ async function queryExecutions(externalUserId, publishableKey, actionType = "deposit") {
6275
6275
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6276
6276
  validatePublishableKey(pk);
6277
6277
  const body = {
6278
6278
  external_user_id: externalUserId,
6279
- ...actionType ? { action_type: actionType } : {}
6279
+ action_type: actionType
6280
6280
  };
6281
6281
  const response = await fetch(
6282
6282
  `${API_BASE_URL}/v1/public/direct_executions/query`,
@@ -7231,7 +7231,7 @@ var import_jsx_runtime35 = require("react/jsx-runtime");
7231
7231
  var React92 = __toESM(require("react"), 1);
7232
7232
  var React82 = __toESM(require("react"), 1);
7233
7233
 
7234
- // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
7234
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
7235
7235
  var React25 = __toESM(require("react"), 1);
7236
7236
  var import_jsx_runtime9 = require("react/jsx-runtime");
7237
7237
  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
@@ -7424,6 +7424,2006 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
7424
7424
  var import_jsx_runtime56 = require("react/jsx-runtime");
7425
7425
  var import_jsx_runtime57 = require("react/jsx-runtime");
7426
7426
  var import_react23 = require("react");
7427
+
7428
+ // ../../node_modules/.pnpm/fuse.js@7.4.0/node_modules/fuse.js/dist/fuse.mjs
7429
+ function isArray(value) {
7430
+ return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
7431
+ }
7432
+ function baseToString(value) {
7433
+ if (typeof value == "string") {
7434
+ return value;
7435
+ }
7436
+ if (typeof value === "bigint") {
7437
+ return value.toString();
7438
+ }
7439
+ const result = value + "";
7440
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
7441
+ }
7442
+ function toString(value) {
7443
+ return value == null ? "" : baseToString(value);
7444
+ }
7445
+ function isString(value) {
7446
+ return typeof value === "string";
7447
+ }
7448
+ function isNumber2(value) {
7449
+ return typeof value === "number";
7450
+ }
7451
+ function isBoolean(value) {
7452
+ return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]";
7453
+ }
7454
+ function isObject(value) {
7455
+ return typeof value === "object";
7456
+ }
7457
+ function isObjectLike(value) {
7458
+ return isObject(value) && value !== null;
7459
+ }
7460
+ function isDefined(value) {
7461
+ return value !== void 0 && value !== null;
7462
+ }
7463
+ function isBlank(value) {
7464
+ return !value.trim().length;
7465
+ }
7466
+ function getTag(value) {
7467
+ return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
7468
+ }
7469
+ var INCORRECT_INDEX_TYPE = "Incorrect 'index' type";
7470
+ var INVALID_DOC_INDEX = "Invalid doc index: must be a non-negative integer within the bounds of the docs array";
7471
+ var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`;
7472
+ var PATTERN_LENGTH_TOO_LARGE = (max2) => `Pattern length exceeds max of ${max2}.`;
7473
+ var MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;
7474
+ var INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`;
7475
+ var FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED = `Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`;
7476
+ var hasOwn = Object.prototype.hasOwnProperty;
7477
+ var KeyStore = class {
7478
+ constructor(keys) {
7479
+ this._keys = [];
7480
+ this._keyMap = {};
7481
+ let totalWeight = 0;
7482
+ keys.forEach((key) => {
7483
+ const obj = createKey(key);
7484
+ this._keys.push(obj);
7485
+ this._keyMap[obj.id] = obj;
7486
+ totalWeight += obj.weight;
7487
+ });
7488
+ this._keys.forEach((key) => {
7489
+ key.weight /= totalWeight;
7490
+ });
7491
+ }
7492
+ get(keyId) {
7493
+ return this._keyMap[keyId];
7494
+ }
7495
+ keys() {
7496
+ return this._keys;
7497
+ }
7498
+ toJSON() {
7499
+ return JSON.stringify(this._keys);
7500
+ }
7501
+ };
7502
+ function createKey(key) {
7503
+ let path = null;
7504
+ let id = null;
7505
+ let src = null;
7506
+ let weight = 1;
7507
+ let getFn = null;
7508
+ if (isString(key) || isArray(key)) {
7509
+ src = key;
7510
+ path = createKeyPath(key);
7511
+ id = createKeyId(key);
7512
+ } else {
7513
+ if (!hasOwn.call(key, "name")) {
7514
+ throw new Error(MISSING_KEY_PROPERTY("name"));
7515
+ }
7516
+ const name = key.name;
7517
+ src = name;
7518
+ if (hasOwn.call(key, "weight") && key.weight !== void 0) {
7519
+ weight = key.weight;
7520
+ if (weight <= 0) {
7521
+ throw new Error(INVALID_KEY_WEIGHT_VALUE(createKeyId(name)));
7522
+ }
7523
+ }
7524
+ path = createKeyPath(name);
7525
+ id = createKeyId(name);
7526
+ getFn = key.getFn ?? null;
7527
+ }
7528
+ return {
7529
+ path,
7530
+ id,
7531
+ weight,
7532
+ src,
7533
+ getFn
7534
+ };
7535
+ }
7536
+ function createKeyPath(key) {
7537
+ return isArray(key) ? key : key.split(".");
7538
+ }
7539
+ function createKeyId(key) {
7540
+ return isArray(key) ? key.join(".") : key;
7541
+ }
7542
+ function get(obj, path) {
7543
+ const list = [];
7544
+ let arr = false;
7545
+ const deepGet = (obj2, path2, index2, arrayIndex) => {
7546
+ if (!isDefined(obj2)) {
7547
+ return;
7548
+ }
7549
+ if (!path2[index2]) {
7550
+ list.push(arrayIndex !== void 0 ? {
7551
+ v: obj2,
7552
+ i: arrayIndex
7553
+ } : obj2);
7554
+ } else {
7555
+ const key = path2[index2];
7556
+ const value = obj2[key];
7557
+ if (!isDefined(value)) {
7558
+ return;
7559
+ }
7560
+ if (index2 === path2.length - 1 && (isString(value) || isNumber2(value) || isBoolean(value) || typeof value === "bigint")) {
7561
+ list.push(arrayIndex !== void 0 ? {
7562
+ v: toString(value),
7563
+ i: arrayIndex
7564
+ } : toString(value));
7565
+ } else if (isArray(value)) {
7566
+ arr = true;
7567
+ for (let i = 0, len = value.length; i < len; i += 1) {
7568
+ deepGet(value[i], path2, index2 + 1, i);
7569
+ }
7570
+ } else if (path2.length) {
7571
+ deepGet(value, path2, index2 + 1, arrayIndex);
7572
+ }
7573
+ }
7574
+ };
7575
+ deepGet(obj, isString(path) ? path.split(".") : path, 0);
7576
+ return arr ? list : list[0];
7577
+ }
7578
+ var MatchOptions = {
7579
+ includeMatches: false,
7580
+ findAllMatches: false,
7581
+ minMatchCharLength: 1
7582
+ };
7583
+ var BasicOptions = {
7584
+ isCaseSensitive: false,
7585
+ ignoreDiacritics: false,
7586
+ includeScore: false,
7587
+ keys: [],
7588
+ shouldSort: true,
7589
+ sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1
7590
+ };
7591
+ var FuzzyOptions = {
7592
+ location: 0,
7593
+ threshold: 0.6,
7594
+ distance: 100
7595
+ };
7596
+ var AdvancedOptions = {
7597
+ useExtendedSearch: false,
7598
+ useTokenSearch: false,
7599
+ tokenize: void 0,
7600
+ tokenMatch: "any",
7601
+ getFn: get,
7602
+ ignoreLocation: false,
7603
+ ignoreFieldNorm: false,
7604
+ fieldNormWeight: 1
7605
+ };
7606
+ var Config = Object.freeze({
7607
+ ...BasicOptions,
7608
+ ...MatchOptions,
7609
+ ...FuzzyOptions,
7610
+ ...AdvancedOptions
7611
+ });
7612
+ function norm(weight = 1, mantissa = 3) {
7613
+ const cache = /* @__PURE__ */ new Map();
7614
+ const m = Math.pow(10, mantissa);
7615
+ return {
7616
+ get(value) {
7617
+ let numTokens = 1;
7618
+ let inSpace = false;
7619
+ for (let i = 0; i < value.length; i++) {
7620
+ if (value.charCodeAt(i) === 32) {
7621
+ if (!inSpace) {
7622
+ numTokens++;
7623
+ inSpace = true;
7624
+ }
7625
+ } else {
7626
+ inSpace = false;
7627
+ }
7628
+ }
7629
+ if (cache.has(numTokens)) {
7630
+ return cache.get(numTokens);
7631
+ }
7632
+ const n = Math.round(m / Math.pow(numTokens, 0.5 * weight)) / m;
7633
+ cache.set(numTokens, n);
7634
+ return n;
7635
+ },
7636
+ clear() {
7637
+ cache.clear();
7638
+ }
7639
+ };
7640
+ }
7641
+ var FuseIndex = class {
7642
+ constructor({
7643
+ getFn = Config.getFn,
7644
+ fieldNormWeight = Config.fieldNormWeight
7645
+ } = {}) {
7646
+ this.norm = norm(fieldNormWeight, 3);
7647
+ this.getFn = getFn;
7648
+ this.isCreated = false;
7649
+ this.docs = [];
7650
+ this.keys = [];
7651
+ this._keysMap = {};
7652
+ this.setIndexRecords();
7653
+ }
7654
+ setSources(docs = []) {
7655
+ this.docs = docs;
7656
+ }
7657
+ setIndexRecords(records = []) {
7658
+ this.records = records;
7659
+ }
7660
+ setKeys(keys = []) {
7661
+ this.keys = keys;
7662
+ this._keysMap = {};
7663
+ keys.forEach((key, idx) => {
7664
+ this._keysMap[key.id] = idx;
7665
+ });
7666
+ }
7667
+ create() {
7668
+ if (this.isCreated || !this.docs.length) {
7669
+ return;
7670
+ }
7671
+ this.isCreated = true;
7672
+ const len = this.docs.length;
7673
+ this.records = new Array(len);
7674
+ let recordCount = 0;
7675
+ if (isString(this.docs[0])) {
7676
+ for (let i = 0; i < len; i++) {
7677
+ const record = this._createStringRecord(this.docs[i], i);
7678
+ if (record) {
7679
+ this.records[recordCount++] = record;
7680
+ }
7681
+ }
7682
+ } else {
7683
+ for (let i = 0; i < len; i++) {
7684
+ this.records[recordCount++] = this._createObjectRecord(this.docs[i], i);
7685
+ }
7686
+ }
7687
+ this.records.length = recordCount;
7688
+ this.norm.clear();
7689
+ }
7690
+ // Appends a record for `doc` at `docIndex` (the doc's position in the source
7691
+ // array). Returns the appended record, or null when `doc` is a blank string
7692
+ // (those are skipped at record creation; see `_createStringRecord`). Callers
7693
+ // use the return value to gate downstream bookkeeping like the inverted
7694
+ // index, which must not be touched when no record was produced.
7695
+ add(doc, docIndex) {
7696
+ if (!Number.isInteger(docIndex) || docIndex < 0) {
7697
+ throw new Error(INVALID_DOC_INDEX);
7698
+ }
7699
+ if (isString(doc)) {
7700
+ const record2 = this._createStringRecord(doc, docIndex);
7701
+ if (record2) {
7702
+ this.records.push(record2);
7703
+ }
7704
+ return record2;
7705
+ }
7706
+ const record = this._createObjectRecord(doc, docIndex);
7707
+ this.records.push(record);
7708
+ return record;
7709
+ }
7710
+ // Removes the record for the doc at the specified source-array (docs) index.
7711
+ // Blank string docs have no record; callers may pass such an index and the
7712
+ // splice is a no-op, but subsequent records still need their .i decremented
7713
+ // to track the docs array that the caller is splicing in parallel.
7714
+ removeAt(idx) {
7715
+ if (!Number.isInteger(idx) || idx < 0) {
7716
+ throw new Error(INVALID_DOC_INDEX);
7717
+ }
7718
+ for (let i = 0, len = this.records.length; i < len; i += 1) {
7719
+ if (this.records[i].i === idx) {
7720
+ this.records.splice(i, 1);
7721
+ break;
7722
+ }
7723
+ }
7724
+ for (let i = 0, len = this.records.length; i < len; i += 1) {
7725
+ if (this.records[i].i > idx) {
7726
+ this.records[i].i -= 1;
7727
+ }
7728
+ }
7729
+ }
7730
+ // Removes records for the docs at the specified source-array indices, then
7731
+ // shifts every surviving record's .i down by the count of removed indices
7732
+ // strictly less than it (mirrors removeAndShiftInvertedIndex's shift math).
7733
+ // Invalid entries (non-integer, negative) in `indices` are dropped silently
7734
+ // — removeAll's natural use case is "caller passed a list of matched doc
7735
+ // indices"; asymmetric throw-vs-no-op would be more surprising than a clean
7736
+ // filter.
7737
+ removeAll(indices) {
7738
+ const toRemove = /* @__PURE__ */ new Set();
7739
+ for (const v of indices) {
7740
+ if (Number.isInteger(v) && v >= 0) {
7741
+ toRemove.add(v);
7742
+ }
7743
+ }
7744
+ if (toRemove.size === 0) {
7745
+ return;
7746
+ }
7747
+ this.records = this.records.filter((r2) => !toRemove.has(r2.i));
7748
+ const sorted = Array.from(toRemove).sort((a, b) => a - b);
7749
+ for (const record of this.records) {
7750
+ let lo = 0;
7751
+ let hi = sorted.length;
7752
+ while (lo < hi) {
7753
+ const mid = lo + hi >>> 1;
7754
+ if (sorted[mid] < record.i) lo = mid + 1;
7755
+ else hi = mid;
7756
+ }
7757
+ record.i -= lo;
7758
+ }
7759
+ }
7760
+ getValueForItemAtKeyId(item, keyId) {
7761
+ return item[this._keysMap[keyId]];
7762
+ }
7763
+ size() {
7764
+ return this.records.length;
7765
+ }
7766
+ _createStringRecord(doc, docIndex) {
7767
+ if (!isDefined(doc) || isBlank(doc)) {
7768
+ return null;
7769
+ }
7770
+ return {
7771
+ v: doc,
7772
+ i: docIndex,
7773
+ n: this.norm.get(doc)
7774
+ };
7775
+ }
7776
+ _createObjectRecord(doc, docIndex) {
7777
+ const record = {
7778
+ i: docIndex,
7779
+ $: {}
7780
+ };
7781
+ for (let keyIndex = 0, keyLen = this.keys.length; keyIndex < keyLen; keyIndex++) {
7782
+ const key = this.keys[keyIndex];
7783
+ const value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);
7784
+ if (!isDefined(value)) {
7785
+ continue;
7786
+ }
7787
+ if (isArray(value)) {
7788
+ const subRecords = [];
7789
+ for (let i = 0, len = value.length; i < len; i += 1) {
7790
+ const item = value[i];
7791
+ if (!isDefined(item)) {
7792
+ continue;
7793
+ }
7794
+ if (isString(item)) {
7795
+ if (!isBlank(item)) {
7796
+ const subRecord = {
7797
+ v: item,
7798
+ i,
7799
+ n: this.norm.get(item)
7800
+ };
7801
+ subRecords.push(subRecord);
7802
+ }
7803
+ } else if (isDefined(item.v)) {
7804
+ const text = isString(item.v) ? item.v : toString(item.v);
7805
+ if (!isBlank(text)) {
7806
+ const subRecord = {
7807
+ v: text,
7808
+ i: item.i,
7809
+ n: this.norm.get(text)
7810
+ };
7811
+ subRecords.push(subRecord);
7812
+ }
7813
+ }
7814
+ }
7815
+ record.$[keyIndex] = subRecords;
7816
+ } else if (isString(value) && !isBlank(value)) {
7817
+ const subRecord = {
7818
+ v: value,
7819
+ n: this.norm.get(value)
7820
+ };
7821
+ record.$[keyIndex] = subRecord;
7822
+ }
7823
+ }
7824
+ return record;
7825
+ }
7826
+ toJSON() {
7827
+ return {
7828
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7829
+ keys: this.keys.map(({
7830
+ getFn,
7831
+ ...key
7832
+ }) => key),
7833
+ records: this.records
7834
+ };
7835
+ }
7836
+ };
7837
+ function createIndex(keys, docs, {
7838
+ getFn = Config.getFn,
7839
+ fieldNormWeight = Config.fieldNormWeight
7840
+ } = {}) {
7841
+ const myIndex = new FuseIndex({
7842
+ getFn,
7843
+ fieldNormWeight
7844
+ });
7845
+ myIndex.setKeys(keys.map(createKey));
7846
+ myIndex.setSources(docs);
7847
+ myIndex.create();
7848
+ return myIndex;
7849
+ }
7850
+ function parseIndex(data, {
7851
+ getFn = Config.getFn,
7852
+ fieldNormWeight = Config.fieldNormWeight
7853
+ } = {}) {
7854
+ const {
7855
+ keys,
7856
+ records
7857
+ } = data;
7858
+ const myIndex = new FuseIndex({
7859
+ getFn,
7860
+ fieldNormWeight
7861
+ });
7862
+ myIndex.setKeys(keys);
7863
+ myIndex.setIndexRecords(records);
7864
+ return myIndex;
7865
+ }
7866
+ function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) {
7867
+ const indices = [];
7868
+ let start = -1;
7869
+ let end = -1;
7870
+ let i = 0;
7871
+ for (let len = matchmask.length; i < len; i += 1) {
7872
+ const match = matchmask[i];
7873
+ if (match && start === -1) {
7874
+ start = i;
7875
+ } else if (!match && start !== -1) {
7876
+ end = i - 1;
7877
+ if (end - start + 1 >= minMatchCharLength) {
7878
+ indices.push([start, end]);
7879
+ }
7880
+ start = -1;
7881
+ }
7882
+ }
7883
+ if (matchmask[i - 1] && i - start >= minMatchCharLength) {
7884
+ indices.push([start, i - 1]);
7885
+ }
7886
+ return indices;
7887
+ }
7888
+ var MAX_BITS = 32;
7889
+ function search(text, pattern, patternAlphabet, {
7890
+ location = Config.location,
7891
+ distance = Config.distance,
7892
+ threshold = Config.threshold,
7893
+ findAllMatches = Config.findAllMatches,
7894
+ minMatchCharLength = Config.minMatchCharLength,
7895
+ includeMatches = Config.includeMatches,
7896
+ ignoreLocation = Config.ignoreLocation
7897
+ } = {}) {
7898
+ if (pattern.length > MAX_BITS) {
7899
+ throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));
7900
+ }
7901
+ const patternLen = pattern.length;
7902
+ const textLen = text.length;
7903
+ const expectedLocation = Math.max(0, Math.min(location, textLen));
7904
+ let currentThreshold = threshold;
7905
+ let bestLocation = expectedLocation;
7906
+ const calcScore = (errors, currentLocation) => {
7907
+ const accuracy = errors / patternLen;
7908
+ if (ignoreLocation) return accuracy;
7909
+ const proximity = Math.abs(expectedLocation - currentLocation);
7910
+ if (!distance) return proximity ? 1 : accuracy;
7911
+ return accuracy + proximity / distance;
7912
+ };
7913
+ const computeMatches = minMatchCharLength > 1 || includeMatches;
7914
+ const matchMask = computeMatches ? Array(textLen) : [];
7915
+ let index2;
7916
+ while ((index2 = text.indexOf(pattern, bestLocation)) > -1) {
7917
+ const score = calcScore(0, index2);
7918
+ currentThreshold = Math.min(score, currentThreshold);
7919
+ bestLocation = index2 + patternLen;
7920
+ if (computeMatches) {
7921
+ let i = 0;
7922
+ while (i < patternLen) {
7923
+ matchMask[index2 + i] = 1;
7924
+ i += 1;
7925
+ }
7926
+ }
7927
+ }
7928
+ bestLocation = -1;
7929
+ let lastBitArr = [];
7930
+ let finalScore = 1;
7931
+ let bestErrors = 0;
7932
+ let binMax = patternLen + textLen;
7933
+ const mask = 1 << patternLen - 1;
7934
+ for (let i = 0; i < patternLen; i += 1) {
7935
+ let binMin = 0;
7936
+ let binMid = binMax;
7937
+ while (binMin < binMid) {
7938
+ const score2 = calcScore(i, expectedLocation + binMid);
7939
+ if (score2 <= currentThreshold) {
7940
+ binMin = binMid;
7941
+ } else {
7942
+ binMax = binMid;
7943
+ }
7944
+ binMid = Math.floor((binMax - binMin) / 2 + binMin);
7945
+ }
7946
+ binMax = binMid;
7947
+ let start = Math.max(1, expectedLocation - binMid + 1);
7948
+ const finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;
7949
+ const bitArr = Array(finish + 2);
7950
+ bitArr[finish + 1] = (1 << i) - 1;
7951
+ for (let j = finish; j >= start; j -= 1) {
7952
+ const currentLocation = j - 1;
7953
+ const charMatch = patternAlphabet[text[currentLocation]];
7954
+ bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;
7955
+ if (i) {
7956
+ bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];
7957
+ }
7958
+ if (bitArr[j] & mask) {
7959
+ finalScore = calcScore(i, currentLocation);
7960
+ if (finalScore <= currentThreshold) {
7961
+ currentThreshold = finalScore;
7962
+ bestLocation = currentLocation;
7963
+ bestErrors = i;
7964
+ if (bestLocation <= expectedLocation) {
7965
+ break;
7966
+ }
7967
+ start = Math.max(1, 2 * expectedLocation - bestLocation);
7968
+ }
7969
+ }
7970
+ }
7971
+ const score = calcScore(i + 1, expectedLocation);
7972
+ if (score > currentThreshold) {
7973
+ break;
7974
+ }
7975
+ lastBitArr = bitArr;
7976
+ }
7977
+ if (computeMatches && bestLocation >= 0) {
7978
+ const matchEnd = Math.min(textLen - 1, bestLocation + patternLen - 1 + bestErrors);
7979
+ for (let k = bestLocation; k <= matchEnd; k += 1) {
7980
+ if (patternAlphabet[text[k]]) {
7981
+ matchMask[k] = 1;
7982
+ }
7983
+ }
7984
+ }
7985
+ const result = {
7986
+ isMatch: bestLocation >= 0,
7987
+ // Count exact matches (those with a score of 0) to be "almost" exact
7988
+ score: Math.max(1e-3, finalScore)
7989
+ };
7990
+ if (computeMatches) {
7991
+ const indices = convertMaskToIndices(matchMask, minMatchCharLength);
7992
+ if (!indices.length) {
7993
+ result.isMatch = false;
7994
+ } else if (includeMatches) {
7995
+ result.indices = indices;
7996
+ }
7997
+ }
7998
+ return result;
7999
+ }
8000
+ function createPatternAlphabet(pattern) {
8001
+ const mask = {};
8002
+ for (let i = 0, len = pattern.length; i < len; i += 1) {
8003
+ const char = pattern.charAt(i);
8004
+ mask[char] = (mask[char] || 0) | 1 << len - i - 1;
8005
+ }
8006
+ return mask;
8007
+ }
8008
+ function mergeIndices(indices) {
8009
+ if (indices.length <= 1) return indices;
8010
+ indices.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
8011
+ const merged = [indices[0]];
8012
+ for (let i = 1, len = indices.length; i < len; i += 1) {
8013
+ const last = merged[merged.length - 1];
8014
+ const curr = indices[i];
8015
+ if (curr[0] <= last[1] + 1) {
8016
+ last[1] = Math.max(last[1], curr[1]);
8017
+ } else {
8018
+ merged.push(curr);
8019
+ }
8020
+ }
8021
+ return merged;
8022
+ }
8023
+ var NON_DECOMPOSABLE_MAP = {
8024
+ "\u0142": "l",
8025
+ // ł
8026
+ "\u0141": "L",
8027
+ // Ł
8028
+ "\u0111": "d",
8029
+ // đ
8030
+ "\u0110": "D",
8031
+ // Đ
8032
+ "\xF8": "o",
8033
+ // ø
8034
+ "\xD8": "O",
8035
+ // Ø
8036
+ "\u0127": "h",
8037
+ // ħ
8038
+ "\u0126": "H",
8039
+ // Ħ
8040
+ "\u0167": "t",
8041
+ // ŧ
8042
+ "\u0166": "T",
8043
+ // Ŧ
8044
+ "\u0131": "i",
8045
+ // ı
8046
+ "\xDF": "ss"
8047
+ // ß
8048
+ };
8049
+ var NON_DECOMPOSABLE_RE = new RegExp("[" + Object.keys(NON_DECOMPOSABLE_MAP).join("") + "]", "g");
8050
+ var stripDiacritics = typeof String.prototype.normalize === "function" ? (str) => str.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "").replace(NON_DECOMPOSABLE_RE, (ch) => NON_DECOMPOSABLE_MAP[ch]) : (str) => str;
8051
+ var BitapSearch = class {
8052
+ constructor(pattern, {
8053
+ location = Config.location,
8054
+ threshold = Config.threshold,
8055
+ distance = Config.distance,
8056
+ includeMatches = Config.includeMatches,
8057
+ findAllMatches = Config.findAllMatches,
8058
+ minMatchCharLength = Config.minMatchCharLength,
8059
+ isCaseSensitive = Config.isCaseSensitive,
8060
+ ignoreDiacritics = Config.ignoreDiacritics,
8061
+ ignoreLocation = Config.ignoreLocation
8062
+ } = {}) {
8063
+ this.options = {
8064
+ location,
8065
+ threshold,
8066
+ distance,
8067
+ includeMatches,
8068
+ findAllMatches,
8069
+ minMatchCharLength,
8070
+ isCaseSensitive,
8071
+ ignoreDiacritics,
8072
+ ignoreLocation
8073
+ };
8074
+ pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
8075
+ pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
8076
+ this.pattern = pattern;
8077
+ this.chunks = [];
8078
+ if (!this.pattern.length) {
8079
+ return;
8080
+ }
8081
+ const addChunk = (pattern2, startIndex) => {
8082
+ this.chunks.push({
8083
+ pattern: pattern2,
8084
+ alphabet: createPatternAlphabet(pattern2),
8085
+ startIndex
8086
+ });
8087
+ };
8088
+ const len = this.pattern.length;
8089
+ if (len > MAX_BITS) {
8090
+ let i = 0;
8091
+ const remainder = len % MAX_BITS;
8092
+ const end = len - remainder;
8093
+ while (i < end) {
8094
+ addChunk(this.pattern.substr(i, MAX_BITS), i);
8095
+ i += MAX_BITS;
8096
+ }
8097
+ if (remainder) {
8098
+ const startIndex = len - MAX_BITS;
8099
+ addChunk(this.pattern.substr(startIndex), startIndex);
8100
+ }
8101
+ } else {
8102
+ addChunk(this.pattern, 0);
8103
+ }
8104
+ }
8105
+ searchIn(text) {
8106
+ const {
8107
+ isCaseSensitive,
8108
+ ignoreDiacritics,
8109
+ includeMatches
8110
+ } = this.options;
8111
+ text = isCaseSensitive ? text : text.toLowerCase();
8112
+ text = ignoreDiacritics ? stripDiacritics(text) : text;
8113
+ if (this.pattern === text) {
8114
+ const result2 = {
8115
+ isMatch: true,
8116
+ score: 0
8117
+ };
8118
+ if (includeMatches) {
8119
+ result2.indices = [[0, text.length - 1]];
8120
+ }
8121
+ return result2;
8122
+ }
8123
+ const {
8124
+ location,
8125
+ distance,
8126
+ threshold,
8127
+ findAllMatches,
8128
+ minMatchCharLength,
8129
+ ignoreLocation
8130
+ } = this.options;
8131
+ const allIndices = [];
8132
+ let totalScore = 0;
8133
+ let hasMatches = false;
8134
+ this.chunks.forEach(({
8135
+ pattern,
8136
+ alphabet,
8137
+ startIndex
8138
+ }) => {
8139
+ const {
8140
+ isMatch,
8141
+ score,
8142
+ indices
8143
+ } = search(text, pattern, alphabet, {
8144
+ location: location + startIndex,
8145
+ distance,
8146
+ threshold,
8147
+ findAllMatches,
8148
+ minMatchCharLength,
8149
+ includeMatches,
8150
+ ignoreLocation
8151
+ });
8152
+ if (isMatch) {
8153
+ hasMatches = true;
8154
+ }
8155
+ totalScore += score;
8156
+ if (isMatch && indices) {
8157
+ allIndices.push(...indices);
8158
+ }
8159
+ });
8160
+ const result = {
8161
+ isMatch: hasMatches,
8162
+ score: hasMatches ? totalScore / this.chunks.length : 1
8163
+ };
8164
+ if (hasMatches && includeMatches) {
8165
+ result.indices = mergeIndices(allIndices);
8166
+ }
8167
+ return result;
8168
+ }
8169
+ };
8170
+ var MULTI_MATCH_TYPES = /* @__PURE__ */ new Set(["fuzzy", "include"]);
8171
+ function isInverse(type) {
8172
+ return type.startsWith("inverse");
8173
+ }
8174
+ var matchers = [
8175
+ // =term — exact match
8176
+ {
8177
+ type: "exact",
8178
+ multiRegex: /^="(.*)"$/,
8179
+ singleRegex: /^=(.*)$/,
8180
+ create: (pattern) => ({
8181
+ type: "exact",
8182
+ search(text) {
8183
+ const isMatch = text === pattern;
8184
+ return {
8185
+ isMatch,
8186
+ score: isMatch ? 0 : 1,
8187
+ indices: [0, pattern.length - 1]
8188
+ };
8189
+ }
8190
+ })
8191
+ },
8192
+ // 'term — include (substring) match
8193
+ {
8194
+ type: "include",
8195
+ multiRegex: /^'"(.*)"$/,
8196
+ singleRegex: /^'(.*)$/,
8197
+ create: (pattern) => ({
8198
+ type: "include",
8199
+ search(text) {
8200
+ let location = 0;
8201
+ let index2;
8202
+ const indices = [];
8203
+ const patternLen = pattern.length;
8204
+ while ((index2 = text.indexOf(pattern, location)) > -1) {
8205
+ location = index2 + patternLen;
8206
+ indices.push([index2, location - 1]);
8207
+ }
8208
+ const isMatch = !!indices.length;
8209
+ return {
8210
+ isMatch,
8211
+ score: isMatch ? 0 : 1,
8212
+ indices
8213
+ };
8214
+ }
8215
+ })
8216
+ },
8217
+ // ^term — prefix match
8218
+ {
8219
+ type: "prefix-exact",
8220
+ multiRegex: /^\^"(.*)"$/,
8221
+ singleRegex: /^\^(.*)$/,
8222
+ create: (pattern) => ({
8223
+ type: "prefix-exact",
8224
+ search(text) {
8225
+ const isMatch = text.startsWith(pattern);
8226
+ return {
8227
+ isMatch,
8228
+ score: isMatch ? 0 : 1,
8229
+ indices: [0, pattern.length - 1]
8230
+ };
8231
+ }
8232
+ })
8233
+ },
8234
+ // !^term — inverse prefix match
8235
+ {
8236
+ type: "inverse-prefix-exact",
8237
+ multiRegex: /^!\^"(.*)"$/,
8238
+ singleRegex: /^!\^(.*)$/,
8239
+ create: (pattern) => ({
8240
+ type: "inverse-prefix-exact",
8241
+ search(text) {
8242
+ const isMatch = !text.startsWith(pattern);
8243
+ return {
8244
+ isMatch,
8245
+ score: isMatch ? 0 : 1,
8246
+ indices: [0, text.length - 1]
8247
+ };
8248
+ }
8249
+ })
8250
+ },
8251
+ // !term$ — inverse suffix match
8252
+ {
8253
+ type: "inverse-suffix-exact",
8254
+ multiRegex: /^!"(.*)"\$$/,
8255
+ singleRegex: /^!(.*)\$$/,
8256
+ create: (pattern) => ({
8257
+ type: "inverse-suffix-exact",
8258
+ search(text) {
8259
+ const isMatch = !text.endsWith(pattern);
8260
+ return {
8261
+ isMatch,
8262
+ score: isMatch ? 0 : 1,
8263
+ indices: [0, text.length - 1]
8264
+ };
8265
+ }
8266
+ })
8267
+ },
8268
+ // term$ — suffix match
8269
+ {
8270
+ type: "suffix-exact",
8271
+ multiRegex: /^"(.*)"\$$/,
8272
+ singleRegex: /^(.*)\$$/,
8273
+ create: (pattern) => ({
8274
+ type: "suffix-exact",
8275
+ search(text) {
8276
+ const isMatch = text.endsWith(pattern);
8277
+ return {
8278
+ isMatch,
8279
+ score: isMatch ? 0 : 1,
8280
+ indices: [text.length - pattern.length, text.length - 1]
8281
+ };
8282
+ }
8283
+ })
8284
+ },
8285
+ // !term — inverse exact (does not contain)
8286
+ {
8287
+ type: "inverse-exact",
8288
+ multiRegex: /^!"(.*)"$/,
8289
+ singleRegex: /^!(.*)$/,
8290
+ create: (pattern) => ({
8291
+ type: "inverse-exact",
8292
+ search(text) {
8293
+ const isMatch = text.indexOf(pattern) === -1;
8294
+ return {
8295
+ isMatch,
8296
+ score: isMatch ? 0 : 1,
8297
+ indices: [0, text.length - 1]
8298
+ };
8299
+ }
8300
+ })
8301
+ },
8302
+ // term — fuzzy match (catch-all, must be last)
8303
+ {
8304
+ type: "fuzzy",
8305
+ multiRegex: /^"(.*)"$/,
8306
+ singleRegex: /^(.*)$/,
8307
+ create: (pattern, options = {}) => {
8308
+ const bitap = new BitapSearch(pattern, {
8309
+ location: options.location ?? Config.location,
8310
+ threshold: options.threshold ?? Config.threshold,
8311
+ distance: options.distance ?? Config.distance,
8312
+ includeMatches: options.includeMatches ?? Config.includeMatches,
8313
+ findAllMatches: options.findAllMatches ?? Config.findAllMatches,
8314
+ minMatchCharLength: options.minMatchCharLength ?? Config.minMatchCharLength,
8315
+ isCaseSensitive: options.isCaseSensitive ?? Config.isCaseSensitive,
8316
+ ignoreDiacritics: options.ignoreDiacritics ?? Config.ignoreDiacritics,
8317
+ ignoreLocation: options.ignoreLocation ?? Config.ignoreLocation
8318
+ });
8319
+ return {
8320
+ type: "fuzzy",
8321
+ search(text) {
8322
+ return bitap.searchIn(text);
8323
+ }
8324
+ };
8325
+ }
8326
+ }
8327
+ ];
8328
+ var matchersLen = matchers.length;
8329
+ var ESCAPED_PIPE = "\0";
8330
+ var OR_TOKEN = "|";
8331
+ function tokenize(pattern) {
8332
+ const tokens = [];
8333
+ const len = pattern.length;
8334
+ let i = 0;
8335
+ while (i < len) {
8336
+ while (i < len && pattern[i] === " ") i++;
8337
+ if (i >= len) break;
8338
+ let j = i;
8339
+ while (j < len && pattern[j] !== " " && pattern[j] !== '"') j++;
8340
+ if (j < len && pattern[j] === '"') {
8341
+ j++;
8342
+ while (j < len) {
8343
+ if (pattern[j] === '"') {
8344
+ const next = j + 1;
8345
+ if (next >= len || pattern[next] === " ") {
8346
+ j++;
8347
+ break;
8348
+ }
8349
+ if (pattern[next] === "$" && (next + 1 >= len || pattern[next + 1] === " ")) {
8350
+ j += 2;
8351
+ break;
8352
+ }
8353
+ }
8354
+ j++;
8355
+ }
8356
+ tokens.push(pattern.substring(i, j));
8357
+ i = j;
8358
+ } else {
8359
+ while (j < len && pattern[j] !== " ") j++;
8360
+ tokens.push(pattern.substring(i, j));
8361
+ i = j;
8362
+ }
8363
+ }
8364
+ return tokens;
8365
+ }
8366
+ function getMatch(pattern, exp) {
8367
+ const matches = pattern.match(exp);
8368
+ return matches ? matches[1] : null;
8369
+ }
8370
+ function parseQuery(pattern, options = {}) {
8371
+ const escaped = pattern.replace(/\\\|/g, ESCAPED_PIPE);
8372
+ return escaped.split(OR_TOKEN).map((item) => {
8373
+ const restored = item.replace(/\u0000/g, "|");
8374
+ const query = tokenize(restored.trim()).filter((item2) => item2 && !!item2.trim());
8375
+ const results = [];
8376
+ for (let i = 0, len = query.length; i < len; i += 1) {
8377
+ const queryItem = query[i];
8378
+ let found = false;
8379
+ let idx = -1;
8380
+ while (!found && ++idx < matchersLen) {
8381
+ const def = matchers[idx];
8382
+ const token = getMatch(queryItem, def.multiRegex);
8383
+ if (token) {
8384
+ results.push(def.create(token, options));
8385
+ found = true;
8386
+ }
8387
+ }
8388
+ if (found) {
8389
+ continue;
8390
+ }
8391
+ idx = -1;
8392
+ while (++idx < matchersLen) {
8393
+ const def = matchers[idx];
8394
+ const token = getMatch(queryItem, def.singleRegex);
8395
+ if (token) {
8396
+ results.push(def.create(token, options));
8397
+ break;
8398
+ }
8399
+ }
8400
+ }
8401
+ return results;
8402
+ });
8403
+ }
8404
+ var ExtendedSearch = class {
8405
+ constructor(pattern, {
8406
+ isCaseSensitive = Config.isCaseSensitive,
8407
+ ignoreDiacritics = Config.ignoreDiacritics,
8408
+ includeMatches = Config.includeMatches,
8409
+ minMatchCharLength = Config.minMatchCharLength,
8410
+ ignoreLocation = Config.ignoreLocation,
8411
+ findAllMatches = Config.findAllMatches,
8412
+ location = Config.location,
8413
+ threshold = Config.threshold,
8414
+ distance = Config.distance
8415
+ } = {}) {
8416
+ this.query = null;
8417
+ this.options = {
8418
+ isCaseSensitive,
8419
+ ignoreDiacritics,
8420
+ includeMatches,
8421
+ minMatchCharLength,
8422
+ findAllMatches,
8423
+ ignoreLocation,
8424
+ location,
8425
+ threshold,
8426
+ distance
8427
+ };
8428
+ pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
8429
+ pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
8430
+ this.pattern = pattern;
8431
+ this.query = parseQuery(this.pattern, this.options);
8432
+ }
8433
+ static condition(_, options) {
8434
+ return options.useExtendedSearch;
8435
+ }
8436
+ // Note: searchIn operates on a single text value and sets hasInverse on the
8437
+ // result when inverse patterns are involved. _searchObjectList uses this to
8438
+ // switch from "ANY key" to "ALL keys" aggregation. See #712.
8439
+ searchIn(text) {
8440
+ const query = this.query;
8441
+ if (!query) {
8442
+ return {
8443
+ isMatch: false,
8444
+ score: 1
8445
+ };
8446
+ }
8447
+ const {
8448
+ includeMatches,
8449
+ isCaseSensitive,
8450
+ ignoreDiacritics
8451
+ } = this.options;
8452
+ text = isCaseSensitive ? text : text.toLowerCase();
8453
+ text = ignoreDiacritics ? stripDiacritics(text) : text;
8454
+ let numMatches = 0;
8455
+ const allIndices = [];
8456
+ let totalScore = 0;
8457
+ let hasInverse = false;
8458
+ for (let i = 0, qLen = query.length; i < qLen; i += 1) {
8459
+ const searchers = query[i];
8460
+ allIndices.length = 0;
8461
+ numMatches = 0;
8462
+ hasInverse = false;
8463
+ for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {
8464
+ const matcher = searchers[j];
8465
+ const {
8466
+ isMatch,
8467
+ indices,
8468
+ score
8469
+ } = matcher.search(text);
8470
+ if (isMatch) {
8471
+ numMatches += 1;
8472
+ totalScore += score;
8473
+ if (isInverse(matcher.type)) {
8474
+ hasInverse = true;
8475
+ }
8476
+ if (includeMatches) {
8477
+ if (MULTI_MATCH_TYPES.has(matcher.type)) {
8478
+ allIndices.push(...indices);
8479
+ } else {
8480
+ allIndices.push(indices);
8481
+ }
8482
+ }
8483
+ } else {
8484
+ totalScore = 0;
8485
+ numMatches = 0;
8486
+ allIndices.length = 0;
8487
+ hasInverse = false;
8488
+ break;
8489
+ }
8490
+ }
8491
+ if (numMatches) {
8492
+ const result = {
8493
+ isMatch: true,
8494
+ score: totalScore / numMatches
8495
+ };
8496
+ if (hasInverse) {
8497
+ result.hasInverse = true;
8498
+ }
8499
+ if (includeMatches) {
8500
+ result.indices = mergeIndices(allIndices);
8501
+ }
8502
+ return result;
8503
+ }
8504
+ }
8505
+ return {
8506
+ isMatch: false,
8507
+ score: 1
8508
+ };
8509
+ }
8510
+ };
8511
+ var registeredSearchers = [];
8512
+ function register(...args) {
8513
+ registeredSearchers.push(...args);
8514
+ }
8515
+ function createSearcher(pattern, options) {
8516
+ for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {
8517
+ const searcherClass = registeredSearchers[i];
8518
+ if (searcherClass.condition(pattern, options)) {
8519
+ return new searcherClass(pattern, options);
8520
+ }
8521
+ }
8522
+ return new BitapSearch(pattern, options);
8523
+ }
8524
+ var LogicalOperator = {
8525
+ AND: "$and",
8526
+ OR: "$or"
8527
+ };
8528
+ var KeyType = {
8529
+ PATH: "$path",
8530
+ PATTERN: "$val"
8531
+ };
8532
+ var isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);
8533
+ var isPath = (query) => !!query[KeyType.PATH];
8534
+ var isLeaf = (query) => !isArray(query) && isObject(query) && !isExpression(query);
8535
+ var convertToExplicit = (query) => ({
8536
+ [LogicalOperator.AND]: Object.keys(query).map((key) => ({
8537
+ [key]: query[key]
8538
+ }))
8539
+ });
8540
+ function parse2(query, options, {
8541
+ auto = true
8542
+ } = {}) {
8543
+ const next = (query2) => {
8544
+ if (isString(query2)) {
8545
+ const obj = {
8546
+ keyId: null,
8547
+ pattern: query2
8548
+ };
8549
+ if (auto) {
8550
+ obj.searcher = createSearcher(query2, options);
8551
+ }
8552
+ return obj;
8553
+ }
8554
+ const keys = Object.keys(query2);
8555
+ const isQueryPath = isPath(query2);
8556
+ if (!isQueryPath && keys.length > 1 && !isExpression(query2)) {
8557
+ return next(convertToExplicit(query2));
8558
+ }
8559
+ if (isLeaf(query2)) {
8560
+ const key = isQueryPath ? query2[KeyType.PATH] : keys[0];
8561
+ const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key];
8562
+ if (!isString(pattern)) {
8563
+ throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));
8564
+ }
8565
+ const obj = {
8566
+ keyId: createKeyId(key),
8567
+ pattern
8568
+ };
8569
+ if (auto) {
8570
+ obj.searcher = createSearcher(pattern, options);
8571
+ }
8572
+ return obj;
8573
+ }
8574
+ const node = {
8575
+ children: [],
8576
+ operator: keys[0]
8577
+ };
8578
+ keys.forEach((key) => {
8579
+ const value = query2[key];
8580
+ if (isArray(value)) {
8581
+ value.forEach((item) => {
8582
+ node.children.push(next(item));
8583
+ });
8584
+ }
8585
+ });
8586
+ return node;
8587
+ };
8588
+ if (!isExpression(query)) {
8589
+ query = convertToExplicit(query);
8590
+ }
8591
+ return next(query);
8592
+ }
8593
+ function computeScoreSingle(matches, {
8594
+ ignoreFieldNorm = Config.ignoreFieldNorm
8595
+ }) {
8596
+ let totalScore = 1;
8597
+ matches.forEach(({
8598
+ key,
8599
+ norm: norm2,
8600
+ score
8601
+ }) => {
8602
+ const weight = key ? key.weight : null;
8603
+ totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm2));
8604
+ });
8605
+ return totalScore;
8606
+ }
8607
+ function computeScore(results, {
8608
+ ignoreFieldNorm = Config.ignoreFieldNorm
8609
+ }) {
8610
+ results.forEach((result) => {
8611
+ result.score = computeScoreSingle(result.matches, {
8612
+ ignoreFieldNorm
8613
+ });
8614
+ });
8615
+ }
8616
+ var MaxHeap = class {
8617
+ constructor(limit) {
8618
+ this.limit = limit;
8619
+ this.heap = [];
8620
+ }
8621
+ get size() {
8622
+ return this.heap.length;
8623
+ }
8624
+ shouldInsert(score) {
8625
+ return this.size < this.limit || score < this.heap[0].score;
8626
+ }
8627
+ insert(item) {
8628
+ if (this.size < this.limit) {
8629
+ this.heap.push(item);
8630
+ this._bubbleUp(this.size - 1);
8631
+ } else if (item.score < this.heap[0].score) {
8632
+ this.heap[0] = item;
8633
+ this._sinkDown(0);
8634
+ }
8635
+ }
8636
+ extractSorted(sortFn) {
8637
+ return this.heap.sort(sortFn);
8638
+ }
8639
+ _bubbleUp(i) {
8640
+ const heap = this.heap;
8641
+ while (i > 0) {
8642
+ const parent = i - 1 >> 1;
8643
+ if (heap[i].score <= heap[parent].score) break;
8644
+ const tmp = heap[i];
8645
+ heap[i] = heap[parent];
8646
+ heap[parent] = tmp;
8647
+ i = parent;
8648
+ }
8649
+ }
8650
+ _sinkDown(i) {
8651
+ const heap = this.heap;
8652
+ const len = heap.length;
8653
+ let largest = i;
8654
+ do {
8655
+ i = largest;
8656
+ const left = 2 * i + 1;
8657
+ const right = 2 * i + 2;
8658
+ if (left < len && heap[left].score > heap[largest].score) {
8659
+ largest = left;
8660
+ }
8661
+ if (right < len && heap[right].score > heap[largest].score) {
8662
+ largest = right;
8663
+ }
8664
+ if (largest !== i) {
8665
+ const tmp = heap[i];
8666
+ heap[i] = heap[largest];
8667
+ heap[largest] = tmp;
8668
+ }
8669
+ } while (largest !== i);
8670
+ }
8671
+ };
8672
+ function formatMatches(result) {
8673
+ const matches = [];
8674
+ result.matches.forEach((match) => {
8675
+ if (!isDefined(match.indices) || !match.indices.length) {
8676
+ return;
8677
+ }
8678
+ const obj = {
8679
+ indices: match.indices,
8680
+ value: match.value
8681
+ };
8682
+ if (match.key) {
8683
+ obj.key = match.key.id;
8684
+ }
8685
+ if (match.idx > -1) {
8686
+ obj.refIndex = match.idx;
8687
+ }
8688
+ matches.push(obj);
8689
+ });
8690
+ return matches;
8691
+ }
8692
+ function format(results, docs, {
8693
+ includeMatches = Config.includeMatches,
8694
+ includeScore = Config.includeScore
8695
+ } = {}) {
8696
+ return results.map((result) => {
8697
+ const {
8698
+ idx
8699
+ } = result;
8700
+ const data = {
8701
+ item: docs[idx],
8702
+ refIndex: idx
8703
+ };
8704
+ if (includeMatches) data.matches = formatMatches(result);
8705
+ if (includeScore) data.score = result.score;
8706
+ return data;
8707
+ });
8708
+ }
8709
+ var DEFAULT_TOKEN = /[\p{L}\p{M}\p{N}_]+/gu;
8710
+ var warned = /* @__PURE__ */ new WeakSet();
8711
+ function warnNonGlobal(regex) {
8712
+ if (!warned.has(regex)) {
8713
+ warned.add(regex);
8714
+ console.warn(`[Fuse] tokenize regex ${regex} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`);
8715
+ }
8716
+ }
8717
+ function resolveTokenize(tokenize2) {
8718
+ if (typeof tokenize2 === "function") {
8719
+ let validated = false;
8720
+ return (text) => {
8721
+ const result = tokenize2(text);
8722
+ if (!validated) {
8723
+ validated = true;
8724
+ if (!Array.isArray(result) || result.some((t12) => typeof t12 !== "string")) {
8725
+ throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(result) ? "array containing non-strings" : typeof result}.`);
8726
+ }
8727
+ }
8728
+ return result;
8729
+ };
8730
+ }
8731
+ if (tokenize2 instanceof RegExp) {
8732
+ if (!tokenize2.global) warnNonGlobal(tokenize2);
8733
+ return (text) => text.match(tokenize2) || [];
8734
+ }
8735
+ return (text) => text.match(DEFAULT_TOKEN) || [];
8736
+ }
8737
+ function createAnalyzer({
8738
+ isCaseSensitive = false,
8739
+ ignoreDiacritics = false,
8740
+ tokenize: tokenize2
8741
+ } = {}) {
8742
+ const tokenizeFn = resolveTokenize(tokenize2);
8743
+ return {
8744
+ tokenize(text) {
8745
+ if (!isCaseSensitive) {
8746
+ text = text.toLowerCase();
8747
+ }
8748
+ if (ignoreDiacritics) {
8749
+ text = stripDiacritics(text);
8750
+ }
8751
+ return tokenizeFn(text);
8752
+ }
8753
+ };
8754
+ }
8755
+ var MAX_MASK_TERMS = 31;
8756
+ var TokenSearch = class {
8757
+ // `tokenMatch: 'all'` (AND) coverage. When true, searchIn reports which
8758
+ // query terms matched each text so the core loop can require record-level
8759
+ // coverage of every term. Bitmask is the ≤31-term fast path; Set is the
8760
+ // ≥32-term fallback (JS bitwise ops are 32-bit signed).
8761
+ static condition(_, options) {
8762
+ return options.useTokenSearch;
8763
+ }
8764
+ constructor(pattern, options) {
8765
+ this.options = options;
8766
+ this.analyzer = createAnalyzer({
8767
+ isCaseSensitive: options.isCaseSensitive,
8768
+ ignoreDiacritics: options.ignoreDiacritics,
8769
+ tokenize: options.tokenize
8770
+ });
8771
+ const queryTerms = this.analyzer.tokenize(pattern);
8772
+ const invertedIndex = options._invertedIndex;
8773
+ const {
8774
+ df,
8775
+ fieldCount
8776
+ } = invertedIndex;
8777
+ this.termSearchers = [];
8778
+ this.idfWeights = [];
8779
+ for (const term of queryTerms) {
8780
+ this.termSearchers.push(new BitapSearch(term, {
8781
+ location: options.location,
8782
+ threshold: options.threshold,
8783
+ distance: options.distance,
8784
+ includeMatches: options.includeMatches,
8785
+ findAllMatches: options.findAllMatches,
8786
+ minMatchCharLength: options.minMatchCharLength,
8787
+ isCaseSensitive: options.isCaseSensitive,
8788
+ ignoreDiacritics: options.ignoreDiacritics,
8789
+ ignoreLocation: true
8790
+ }));
8791
+ const docFreq = df.get(term) || 0;
8792
+ const idf = Math.log(1 + (fieldCount - docFreq + 0.5) / (docFreq + 0.5));
8793
+ this.idfWeights.push(idf);
8794
+ }
8795
+ this.combineAll = options.tokenMatch === "all";
8796
+ this.numTerms = this.termSearchers.length;
8797
+ this.useMask = this.numTerms <= MAX_MASK_TERMS;
8798
+ }
8799
+ searchIn(text) {
8800
+ if (!this.termSearchers.length) {
8801
+ return {
8802
+ isMatch: false,
8803
+ score: 1
8804
+ };
8805
+ }
8806
+ const allIndices = [];
8807
+ let weightedScore = 0;
8808
+ let maxPossibleScore = 0;
8809
+ let matchedCount = 0;
8810
+ let matchedMask = 0;
8811
+ const matchedTerms = this.combineAll && !this.useMask ? /* @__PURE__ */ new Set() : null;
8812
+ for (let i = 0; i < this.termSearchers.length; i++) {
8813
+ const result = this.termSearchers[i].searchIn(text);
8814
+ const idf = this.idfWeights[i];
8815
+ maxPossibleScore += idf;
8816
+ if (result.isMatch) {
8817
+ matchedCount++;
8818
+ weightedScore += idf * (1 - result.score);
8819
+ if (result.indices) {
8820
+ allIndices.push(...result.indices);
8821
+ }
8822
+ if (this.combineAll) {
8823
+ if (this.useMask) {
8824
+ matchedMask |= 1 << i;
8825
+ } else {
8826
+ matchedTerms.add(i);
8827
+ }
8828
+ }
8829
+ }
8830
+ }
8831
+ if (matchedCount === 0) {
8832
+ return {
8833
+ isMatch: false,
8834
+ score: 1
8835
+ };
8836
+ }
8837
+ const normalized = maxPossibleScore > 0 ? 1 - weightedScore / maxPossibleScore : 0;
8838
+ const searchResult = {
8839
+ isMatch: true,
8840
+ score: Math.max(1e-3, normalized)
8841
+ };
8842
+ if (this.options.includeMatches && allIndices.length) {
8843
+ searchResult.indices = mergeIndices(allIndices);
8844
+ }
8845
+ if (this.combineAll) {
8846
+ if (this.useMask) {
8847
+ searchResult.matchedMask = matchedMask;
8848
+ } else {
8849
+ searchResult.matchedTerms = matchedTerms;
8850
+ }
8851
+ searchResult.termCount = this.numTerms;
8852
+ }
8853
+ return searchResult;
8854
+ }
8855
+ };
8856
+ function addField(index2, text, docIdx, analyzer) {
8857
+ const tokens = analyzer.tokenize(text);
8858
+ if (!tokens.length) return;
8859
+ index2.fieldCount++;
8860
+ index2.docFieldCount.set(docIdx, (index2.docFieldCount.get(docIdx) || 0) + 1);
8861
+ const distinctTerms = new Set(tokens);
8862
+ let perDocTerms = index2.docTermFieldHits.get(docIdx);
8863
+ if (!perDocTerms) {
8864
+ perDocTerms = /* @__PURE__ */ new Map();
8865
+ index2.docTermFieldHits.set(docIdx, perDocTerms);
8866
+ }
8867
+ for (const term of distinctTerms) {
8868
+ perDocTerms.set(term, (perDocTerms.get(term) || 0) + 1);
8869
+ index2.df.set(term, (index2.df.get(term) || 0) + 1);
8870
+ }
8871
+ }
8872
+ function ingestRecord(index2, record, keyCount, analyzer) {
8873
+ const {
8874
+ i: docIdx,
8875
+ v,
8876
+ $: fields
8877
+ } = record;
8878
+ if (v !== void 0) {
8879
+ addField(index2, v, docIdx, analyzer);
8880
+ return;
8881
+ }
8882
+ if (!fields) return;
8883
+ for (let keyIdx = 0; keyIdx < keyCount; keyIdx++) {
8884
+ const value = fields[keyIdx];
8885
+ if (!value) continue;
8886
+ if (Array.isArray(value)) {
8887
+ for (const sub of value) addField(index2, sub.v, docIdx, analyzer);
8888
+ } else {
8889
+ addField(index2, value.v, docIdx, analyzer);
8890
+ }
8891
+ }
8892
+ }
8893
+ function buildInvertedIndex(records, keyCount, analyzer) {
8894
+ const index2 = {
8895
+ fieldCount: 0,
8896
+ df: /* @__PURE__ */ new Map(),
8897
+ docFieldCount: /* @__PURE__ */ new Map(),
8898
+ docTermFieldHits: /* @__PURE__ */ new Map()
8899
+ };
8900
+ for (const record of records) {
8901
+ ingestRecord(index2, record, keyCount, analyzer);
8902
+ }
8903
+ return index2;
8904
+ }
8905
+ function addToInvertedIndex(index2, record, keyCount, analyzer) {
8906
+ ingestRecord(index2, record, keyCount, analyzer);
8907
+ }
8908
+ function removeFromInvertedIndex(index2, docIdx) {
8909
+ const fieldCount = index2.docFieldCount.get(docIdx);
8910
+ if (fieldCount === void 0) return;
8911
+ index2.fieldCount -= fieldCount;
8912
+ index2.docFieldCount.delete(docIdx);
8913
+ const perDocTerms = index2.docTermFieldHits.get(docIdx);
8914
+ if (!perDocTerms) return;
8915
+ for (const [term, hits] of perDocTerms) {
8916
+ const next = (index2.df.get(term) || 0) - hits;
8917
+ if (next <= 0) {
8918
+ index2.df.delete(term);
8919
+ } else {
8920
+ index2.df.set(term, next);
8921
+ }
8922
+ }
8923
+ index2.docTermFieldHits.delete(docIdx);
8924
+ }
8925
+ function removeAndShiftInvertedIndex(index2, removedIndices) {
8926
+ if (removedIndices.length === 0) return;
8927
+ const sorted = Array.from(new Set(removedIndices)).sort((a, b) => a - b);
8928
+ for (const idx of sorted) {
8929
+ removeFromInvertedIndex(index2, idx);
8930
+ }
8931
+ const shift4 = (oldIdx) => {
8932
+ let lo = 0;
8933
+ let hi = sorted.length;
8934
+ while (lo < hi) {
8935
+ const mid = lo + hi >>> 1;
8936
+ if (sorted[mid] < oldIdx) lo = mid + 1;
8937
+ else hi = mid;
8938
+ }
8939
+ return oldIdx - lo;
8940
+ };
8941
+ const firstRemoved = sorted[0];
8942
+ const shiftedDocFieldCount = /* @__PURE__ */ new Map();
8943
+ for (const [oldKey, count3] of index2.docFieldCount) {
8944
+ shiftedDocFieldCount.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, count3);
8945
+ }
8946
+ index2.docFieldCount = shiftedDocFieldCount;
8947
+ const shiftedDocTermFieldHits = /* @__PURE__ */ new Map();
8948
+ for (const [oldKey, terms] of index2.docTermFieldHits) {
8949
+ shiftedDocTermFieldHits.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, terms);
8950
+ }
8951
+ index2.docTermFieldHits = shiftedDocTermFieldHits;
8952
+ }
8953
+ var Fuse = class {
8954
+ // Statics are assigned in entry.ts
8955
+ constructor(docs, options, index2) {
8956
+ this.options = {
8957
+ ...Config,
8958
+ ...options
8959
+ };
8960
+ if (this.options.useExtendedSearch && false) ;
8961
+ if (this.options.useTokenSearch && false) ;
8962
+ this._keyStore = new KeyStore(this.options.keys);
8963
+ this._docs = docs;
8964
+ this._myIndex = null;
8965
+ this._invertedIndex = null;
8966
+ this.setCollection(docs, index2);
8967
+ this._lastQuery = null;
8968
+ this._lastSearcher = null;
8969
+ }
8970
+ _getSearcher(query) {
8971
+ if (this._lastQuery === query) {
8972
+ return this._lastSearcher;
8973
+ }
8974
+ const opts = this._invertedIndex ? {
8975
+ ...this.options,
8976
+ _invertedIndex: this._invertedIndex
8977
+ } : this.options;
8978
+ const searcher = createSearcher(query, opts);
8979
+ this._lastQuery = query;
8980
+ this._lastSearcher = searcher;
8981
+ return searcher;
8982
+ }
8983
+ setCollection(docs, index2) {
8984
+ this._docs = docs;
8985
+ if (index2 && !(index2 instanceof FuseIndex)) {
8986
+ throw new Error(INCORRECT_INDEX_TYPE);
8987
+ }
8988
+ this._myIndex = index2 || createIndex(this.options.keys, this._docs, {
8989
+ getFn: this.options.getFn,
8990
+ fieldNormWeight: this.options.fieldNormWeight
8991
+ });
8992
+ if (this.options.useTokenSearch) {
8993
+ const analyzer = createAnalyzer({
8994
+ isCaseSensitive: this.options.isCaseSensitive,
8995
+ ignoreDiacritics: this.options.ignoreDiacritics,
8996
+ tokenize: this.options.tokenize
8997
+ });
8998
+ this._invertedIndex = buildInvertedIndex(this._myIndex.records, this._myIndex.keys.length, analyzer);
8999
+ }
9000
+ this._invalidateSearcherCache();
9001
+ }
9002
+ add(doc) {
9003
+ if (!isDefined(doc)) {
9004
+ return;
9005
+ }
9006
+ this._docs.push(doc);
9007
+ const record = this._myIndex.add(doc, this._docs.length - 1);
9008
+ if (this._invertedIndex && record) {
9009
+ const analyzer = createAnalyzer({
9010
+ isCaseSensitive: this.options.isCaseSensitive,
9011
+ ignoreDiacritics: this.options.ignoreDiacritics,
9012
+ tokenize: this.options.tokenize
9013
+ });
9014
+ addToInvertedIndex(this._invertedIndex, record, this._myIndex.keys.length, analyzer);
9015
+ }
9016
+ this._invalidateSearcherCache();
9017
+ }
9018
+ remove(predicate = () => false) {
9019
+ const results = [];
9020
+ const indicesToRemove = [];
9021
+ for (let i = 0, len = this._docs.length; i < len; i += 1) {
9022
+ if (predicate(this._docs[i], i)) {
9023
+ results.push(this._docs[i]);
9024
+ indicesToRemove.push(i);
9025
+ }
9026
+ }
9027
+ if (indicesToRemove.length) {
9028
+ if (this._invertedIndex) {
9029
+ removeAndShiftInvertedIndex(this._invertedIndex, indicesToRemove);
9030
+ }
9031
+ const toRemove = new Set(indicesToRemove);
9032
+ this._docs = this._docs.filter((_, i) => !toRemove.has(i));
9033
+ this._myIndex.removeAll(indicesToRemove);
9034
+ this._invalidateSearcherCache();
9035
+ }
9036
+ return results;
9037
+ }
9038
+ removeAt(idx) {
9039
+ if (!Number.isInteger(idx) || idx < 0 || idx >= this._docs.length) {
9040
+ throw new Error(INVALID_DOC_INDEX);
9041
+ }
9042
+ if (this._invertedIndex) {
9043
+ removeAndShiftInvertedIndex(this._invertedIndex, [idx]);
9044
+ }
9045
+ const doc = this._docs.splice(idx, 1)[0];
9046
+ this._myIndex.removeAt(idx);
9047
+ this._invalidateSearcherCache();
9048
+ return doc;
9049
+ }
9050
+ _invalidateSearcherCache() {
9051
+ this._lastQuery = null;
9052
+ this._lastSearcher = null;
9053
+ }
9054
+ getIndex() {
9055
+ return this._myIndex;
9056
+ }
9057
+ search(query, options) {
9058
+ const {
9059
+ limit = -1
9060
+ } = options || {};
9061
+ const {
9062
+ includeMatches,
9063
+ includeScore,
9064
+ shouldSort,
9065
+ sortFn,
9066
+ ignoreFieldNorm
9067
+ } = this.options;
9068
+ if (isString(query) && !query.trim()) {
9069
+ let docs = this._docs.map((item, idx) => ({
9070
+ item,
9071
+ refIndex: idx
9072
+ }));
9073
+ if (isNumber2(limit) && limit > -1) {
9074
+ docs = docs.slice(0, limit);
9075
+ }
9076
+ return docs;
9077
+ }
9078
+ const useHeap = isNumber2(limit) && limit > 0 && isString(query);
9079
+ let results;
9080
+ if (useHeap) {
9081
+ const heap = new MaxHeap(limit);
9082
+ if (isString(this._docs[0])) {
9083
+ this._searchStringList(query, {
9084
+ heap,
9085
+ ignoreFieldNorm
9086
+ });
9087
+ } else {
9088
+ this._searchObjectList(query, {
9089
+ heap,
9090
+ ignoreFieldNorm
9091
+ });
9092
+ }
9093
+ results = heap.extractSorted(sortFn);
9094
+ } else {
9095
+ results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
9096
+ computeScore(results, {
9097
+ ignoreFieldNorm
9098
+ });
9099
+ if (shouldSort) {
9100
+ results.sort(sortFn);
9101
+ }
9102
+ if (isNumber2(limit) && limit > -1) {
9103
+ results = results.slice(0, limit);
9104
+ }
9105
+ }
9106
+ return format(results, this._docs, {
9107
+ includeMatches,
9108
+ includeScore
9109
+ });
9110
+ }
9111
+ _searchStringList(query, {
9112
+ heap,
9113
+ ignoreFieldNorm
9114
+ } = {}) {
9115
+ const searcher = this._getSearcher(query);
9116
+ const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
9117
+ const {
9118
+ records
9119
+ } = this._myIndex;
9120
+ const results = heap ? null : [];
9121
+ records.forEach(({
9122
+ v: text,
9123
+ i: idx,
9124
+ n: norm2
9125
+ }) => {
9126
+ if (!isDefined(text)) {
9127
+ return;
9128
+ }
9129
+ const searchResult = searcher.searchIn(text);
9130
+ if (searchResult.isMatch) {
9131
+ const match = {
9132
+ score: searchResult.score,
9133
+ value: text,
9134
+ norm: norm2,
9135
+ indices: searchResult.indices
9136
+ };
9137
+ if (requireAllTokens) {
9138
+ match.matchedMask = searchResult.matchedMask;
9139
+ match.matchedTerms = searchResult.matchedTerms;
9140
+ match.termCount = searchResult.termCount;
9141
+ }
9142
+ const matches = [match];
9143
+ if (!requireAllTokens || this._coversAllTokens(matches)) {
9144
+ const result = {
9145
+ item: text,
9146
+ idx,
9147
+ matches
9148
+ };
9149
+ if (heap) {
9150
+ result.score = computeScoreSingle(result.matches, {
9151
+ ignoreFieldNorm
9152
+ });
9153
+ if (heap.shouldInsert(result.score)) {
9154
+ heap.insert(result);
9155
+ }
9156
+ } else {
9157
+ results.push(result);
9158
+ }
9159
+ }
9160
+ }
9161
+ });
9162
+ return results;
9163
+ }
9164
+ _searchLogical(query) {
9165
+ const expression = parse2(query, this.options);
9166
+ const evaluate2 = (node, item, idx) => {
9167
+ if (!("children" in node)) {
9168
+ const {
9169
+ keyId,
9170
+ searcher
9171
+ } = node;
9172
+ let matches;
9173
+ if (keyId === null) {
9174
+ matches = [];
9175
+ this._myIndex.keys.forEach((key, keyIndex) => {
9176
+ matches.push(...this._findMatches({
9177
+ key,
9178
+ value: item[keyIndex],
9179
+ searcher
9180
+ }));
9181
+ });
9182
+ } else {
9183
+ matches = this._findMatches({
9184
+ key: this._keyStore.get(keyId),
9185
+ value: this._myIndex.getValueForItemAtKeyId(item, keyId),
9186
+ searcher
9187
+ });
9188
+ }
9189
+ if (matches && matches.length) {
9190
+ return [{
9191
+ idx,
9192
+ item,
9193
+ matches
9194
+ }];
9195
+ }
9196
+ return [];
9197
+ }
9198
+ const {
9199
+ children,
9200
+ operator
9201
+ } = node;
9202
+ const res = [];
9203
+ for (let i = 0, len = children.length; i < len; i += 1) {
9204
+ const child = children[i];
9205
+ const result = evaluate2(child, item, idx);
9206
+ if (result.length) {
9207
+ res.push(...result);
9208
+ } else if (operator === LogicalOperator.AND) {
9209
+ return [];
9210
+ }
9211
+ }
9212
+ return res;
9213
+ };
9214
+ const records = this._myIndex.records;
9215
+ const resultMap = /* @__PURE__ */ new Map();
9216
+ const results = [];
9217
+ records.forEach(({
9218
+ $: item,
9219
+ i: idx
9220
+ }) => {
9221
+ if (isDefined(item)) {
9222
+ const expResults = evaluate2(expression, item, idx);
9223
+ if (expResults.length) {
9224
+ if (!resultMap.has(idx)) {
9225
+ resultMap.set(idx, {
9226
+ idx,
9227
+ item,
9228
+ matches: []
9229
+ });
9230
+ results.push(resultMap.get(idx));
9231
+ }
9232
+ expResults.forEach(({
9233
+ matches
9234
+ }) => {
9235
+ resultMap.get(idx).matches.push(...matches);
9236
+ });
9237
+ }
9238
+ }
9239
+ });
9240
+ return results;
9241
+ }
9242
+ // When a search involves inverse patterns (e.g. !Syrup), the aggregation
9243
+ // across keys switches from "ANY key matches" to "ALL keys must match."
9244
+ // This is signaled by hasInverse on the SearchResult from ExtendedSearch.
9245
+ //
9246
+ // For mixed patterns like "^hello !Syrup", a key failure is ambiguous —
9247
+ // it could be the positive or inverse term that failed. In that case we
9248
+ // conservatively exclude the item, which is strictly better than the old
9249
+ // behavior of including it. See: https://github.com/krisk/Fuse/issues/712
9250
+ _searchObjectList(query, {
9251
+ heap,
9252
+ ignoreFieldNorm
9253
+ } = {}) {
9254
+ const searcher = this._getSearcher(query);
9255
+ const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
9256
+ const {
9257
+ keys,
9258
+ records
9259
+ } = this._myIndex;
9260
+ const results = heap ? null : [];
9261
+ records.forEach(({
9262
+ $: item,
9263
+ i: idx
9264
+ }) => {
9265
+ if (!isDefined(item)) {
9266
+ return;
9267
+ }
9268
+ const matches = [];
9269
+ let anyKeyFailed = false;
9270
+ let hasInverse = false;
9271
+ keys.forEach((key, keyIndex) => {
9272
+ const keyMatches = this._findMatches({
9273
+ key,
9274
+ value: item[keyIndex],
9275
+ searcher
9276
+ });
9277
+ if (keyMatches.length) {
9278
+ matches.push(...keyMatches);
9279
+ if (keyMatches[0].hasInverse) {
9280
+ hasInverse = true;
9281
+ }
9282
+ } else {
9283
+ anyKeyFailed = true;
9284
+ }
9285
+ });
9286
+ if (hasInverse && anyKeyFailed) {
9287
+ return;
9288
+ }
9289
+ if (matches.length && (!requireAllTokens || this._coversAllTokens(matches))) {
9290
+ const result = {
9291
+ idx,
9292
+ item,
9293
+ matches
9294
+ };
9295
+ if (heap) {
9296
+ result.score = computeScoreSingle(result.matches, {
9297
+ ignoreFieldNorm
9298
+ });
9299
+ if (heap.shouldInsert(result.score)) {
9300
+ heap.insert(result);
9301
+ }
9302
+ } else {
9303
+ results.push(result);
9304
+ }
9305
+ }
9306
+ });
9307
+ return results;
9308
+ }
9309
+ _findMatches({
9310
+ key,
9311
+ value,
9312
+ searcher
9313
+ }) {
9314
+ if (!isDefined(value)) {
9315
+ return [];
9316
+ }
9317
+ const matches = [];
9318
+ if (isArray(value)) {
9319
+ value.forEach(({
9320
+ v: text,
9321
+ i: idx,
9322
+ n: norm2
9323
+ }) => {
9324
+ if (!isDefined(text)) {
9325
+ return;
9326
+ }
9327
+ const searchResult = searcher.searchIn(text);
9328
+ if (searchResult.isMatch) {
9329
+ const match = {
9330
+ score: searchResult.score,
9331
+ key,
9332
+ value: text,
9333
+ idx,
9334
+ norm: norm2,
9335
+ indices: searchResult.indices,
9336
+ hasInverse: searchResult.hasInverse
9337
+ };
9338
+ if (searchResult.termCount !== void 0) {
9339
+ match.matchedMask = searchResult.matchedMask;
9340
+ match.matchedTerms = searchResult.matchedTerms;
9341
+ match.termCount = searchResult.termCount;
9342
+ }
9343
+ matches.push(match);
9344
+ }
9345
+ });
9346
+ } else {
9347
+ const {
9348
+ v: text,
9349
+ n: norm2
9350
+ } = value;
9351
+ const searchResult = searcher.searchIn(text);
9352
+ if (searchResult.isMatch) {
9353
+ const match = {
9354
+ score: searchResult.score,
9355
+ key,
9356
+ value: text,
9357
+ norm: norm2,
9358
+ indices: searchResult.indices,
9359
+ hasInverse: searchResult.hasInverse
9360
+ };
9361
+ if (searchResult.termCount !== void 0) {
9362
+ match.matchedMask = searchResult.matchedMask;
9363
+ match.matchedTerms = searchResult.matchedTerms;
9364
+ match.termCount = searchResult.termCount;
9365
+ }
9366
+ matches.push(match);
9367
+ }
9368
+ }
9369
+ return matches;
9370
+ }
9371
+ // Record-level AND gate for token search (`tokenMatch: 'all'`). Returns true
9372
+ // unless the matched terms across ALL of a record's field/array-element
9373
+ // matches fail to cover every query term. `termCount` is only set by
9374
+ // TokenSearch in 'all' mode, so non-token / 'any' searches always pass.
9375
+ _coversAllTokens(matches) {
9376
+ const termCount = matches.length ? matches[0].termCount : void 0;
9377
+ if (termCount === void 0) {
9378
+ return true;
9379
+ }
9380
+ if (termCount <= MAX_MASK_TERMS) {
9381
+ let coverage2 = 0;
9382
+ for (let i = 0; i < matches.length; i++) {
9383
+ coverage2 |= matches[i].matchedMask || 0;
9384
+ }
9385
+ return coverage2 === 2 ** termCount - 1;
9386
+ }
9387
+ const coverage = /* @__PURE__ */ new Set();
9388
+ for (let i = 0; i < matches.length; i++) {
9389
+ const terms = matches[i].matchedTerms;
9390
+ if (terms) {
9391
+ for (const t12 of terms) {
9392
+ coverage.add(t12);
9393
+ }
9394
+ }
9395
+ }
9396
+ return coverage.size === termCount;
9397
+ }
9398
+ };
9399
+ Fuse.version = "7.4.0";
9400
+ Fuse.createIndex = createIndex;
9401
+ Fuse.parseIndex = parseIndex;
9402
+ Fuse.config = Config;
9403
+ Fuse.match = function(pattern, text, options) {
9404
+ if (options && options.useTokenSearch) {
9405
+ throw new Error(FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED);
9406
+ }
9407
+ const searcher = createSearcher(pattern, {
9408
+ ...Config,
9409
+ ...options
9410
+ });
9411
+ return searcher.searchIn(text);
9412
+ };
9413
+ {
9414
+ Fuse.parseQuery = parse2;
9415
+ }
9416
+ {
9417
+ register(ExtendedSearch);
9418
+ }
9419
+ {
9420
+ register(TokenSearch);
9421
+ }
9422
+ Fuse.use = function(...plugins) {
9423
+ plugins.forEach((plugin) => register(plugin));
9424
+ };
9425
+
9426
+ // ../ui-react/dist/index.mjs
7427
9427
  var import_jsx_runtime58 = require("react/jsx-runtime");
7428
9428
  var import_react24 = require("react");
7429
9429
  var import_jsx_runtime59 = require("react/jsx-runtime");
@@ -7431,10 +9431,10 @@ var import_jsx_runtime60 = require("react/jsx-runtime");
7431
9431
  var import_react25 = require("react");
7432
9432
  var React272 = __toESM(require("react"), 1);
7433
9433
 
7434
- // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._aqltx4jspgwttwvtzmq3z5uagy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
9434
+ // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._udyjcec5g7ve3mpsxbgla63vgi/node_modules/@radix-ui/react-tooltip/dist/index.mjs
7435
9435
  var React31 = __toESM(require("react"), 1);
7436
9436
 
7437
- // ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_64rpffaf3sso2bzgb3su5jbaxm/node_modules/@radix-ui/react-popper/dist/index.mjs
9437
+ // ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_plbhs5hqqc2ne4pfqm2mjggvti/node_modules/@radix-ui/react-popper/dist/index.mjs
7438
9438
  var React29 = __toESM(require("react"), 1);
7439
9439
 
7440
9440
  // ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
@@ -9043,7 +11043,7 @@ var computePosition2 = (reference, floating, options) => {
9043
11043
  });
9044
11044
  };
9045
11045
 
9046
- // ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
11046
+ // ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
9047
11047
  var React26 = __toESM(require("react"), 1);
9048
11048
  var import_react5 = require("react");
9049
11049
  var ReactDOM3 = __toESM(require("react-dom"), 1);
@@ -9327,7 +11327,7 @@ var arrow3 = (options, deps) => ({
9327
11327
  options: [options, deps]
9328
11328
  });
9329
11329
 
9330
- // ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9__3k7jfnq3g5zq63z6pm7q63bd4u/node_modules/@radix-ui/react-arrow/dist/index.mjs
11330
+ // ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9__trfewiwgkjpdk2hzi5vnfkkag4/node_modules/@radix-ui/react-arrow/dist/index.mjs
9331
11331
  var React27 = __toESM(require("react"), 1);
9332
11332
  var import_jsx_runtime10 = require("react/jsx-runtime");
9333
11333
  var NAME = "Arrow";
@@ -9349,7 +11349,7 @@ var Arrow = React27.forwardRef((props, forwardedRef) => {
9349
11349
  Arrow.displayName = NAME;
9350
11350
  var Root2 = Arrow;
9351
11351
 
9352
- // ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
11352
+ // ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-size/dist/index.mjs
9353
11353
  var React28 = __toESM(require("react"), 1);
9354
11354
  function useSize(element) {
9355
11355
  const [size4, setSize] = React28.useState(void 0);
@@ -9386,7 +11386,7 @@ function useSize(element) {
9386
11386
  return size4;
9387
11387
  }
9388
11388
 
9389
- // ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_64rpffaf3sso2bzgb3su5jbaxm/node_modules/@radix-ui/react-popper/dist/index.mjs
11389
+ // ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_plbhs5hqqc2ne4pfqm2mjggvti/node_modules/@radix-ui/react-popper/dist/index.mjs
9390
11390
  var import_jsx_runtime11 = require("react/jsx-runtime");
9391
11391
  var POPPER_NAME = "Popper";
9392
11392
  var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
@@ -9658,7 +11658,7 @@ var Anchor = PopperAnchor;
9658
11658
  var Content2 = PopperContent;
9659
11659
  var Arrow2 = PopperArrow;
9660
11660
 
9661
- // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_wt7sdqfyqu7fggokpnlq4zaz2e/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
11661
+ // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_xe64s7cc2fbkwxawx7ejudwycu/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
9662
11662
  var React30 = __toESM(require("react"), 1);
9663
11663
  var import_jsx_runtime12 = require("react/jsx-runtime");
9664
11664
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
@@ -9690,7 +11690,7 @@ var VisuallyHidden = React30.forwardRef(
9690
11690
  VisuallyHidden.displayName = NAME2;
9691
11691
  var Root3 = VisuallyHidden;
9692
11692
 
9693
- // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._aqltx4jspgwttwvtzmq3z5uagy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
11693
+ // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._udyjcec5g7ve3mpsxbgla63vgi/node_modules/@radix-ui/react-tooltip/dist/index.mjs
9694
11694
  var import_jsx_runtime13 = require("react/jsx-runtime");
9695
11695
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
9696
11696
  createPopperScope
@@ -10173,7 +12173,7 @@ var import_jsx_runtime63 = require("react/jsx-runtime");
10173
12173
  var import_react26 = require("react");
10174
12174
  var React282 = __toESM(require("react"), 1);
10175
12175
 
10176
- // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
12176
+ // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_cot3leusltbsophitaz3dgdqdm/node_modules/@radix-ui/react-select/dist/index.mjs
10177
12177
  var React35 = __toESM(require("react"), 1);
10178
12178
  var ReactDOM4 = __toESM(require("react-dom"), 1);
10179
12179
 
@@ -10182,7 +12182,7 @@ function clamp2(value, [min2, max2]) {
10182
12182
  return Math.min(max2, Math.max(min2, value));
10183
12183
  }
10184
12184
 
10185
- // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19_532r4g3s7qk4zcqxxtldqwghxu/node_modules/@radix-ui/react-collection/dist/index.mjs
12185
+ // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19_aqbloo75wukq4oiqf2nfnf7fqm/node_modules/@radix-ui/react-collection/dist/index.mjs
10186
12186
  var import_react6 = __toESM(require("react"), 1);
10187
12187
  var import_jsx_runtime14 = require("react/jsx-runtime");
10188
12188
  var import_react7 = __toESM(require("react"), 1);
@@ -10250,7 +12250,7 @@ function createCollection(name) {
10250
12250
  ];
10251
12251
  }
10252
12252
 
10253
- // ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
12253
+ // ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-direction/dist/index.mjs
10254
12254
  var React33 = __toESM(require("react"), 1);
10255
12255
  var import_jsx_runtime16 = require("react/jsx-runtime");
10256
12256
  var DirectionContext = React33.createContext(void 0);
@@ -10259,7 +12259,7 @@ function useDirection(localDir) {
10259
12259
  return localDir || globalDir || "ltr";
10260
12260
  }
10261
12261
 
10262
- // ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
12262
+ // ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-previous/dist/index.mjs
10263
12263
  var React34 = __toESM(require("react"), 1);
10264
12264
  function usePrevious(value) {
10265
12265
  const ref = React34.useRef({ value, previous: value });
@@ -10272,7 +12272,7 @@ function usePrevious(value) {
10272
12272
  }, [value]);
10273
12273
  }
10274
12274
 
10275
- // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
12275
+ // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_cot3leusltbsophitaz3dgdqdm/node_modules/@radix-ui/react-select/dist/index.mjs
10276
12276
  var import_jsx_runtime17 = require("react/jsx-runtime");
10277
12277
  var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
10278
12278
  var SELECTION_KEYS = [" ", "Enter"];
@@ -10394,10 +12394,10 @@ var SelectTrigger = React35.forwardRef(
10394
12394
  const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
10395
12395
  const getItems = useCollection(__scopeSelect);
10396
12396
  const pointerTypeRef = React35.useRef("touch");
10397
- const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
12397
+ const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search2) => {
10398
12398
  const enabledItems = getItems().filter((item) => !item.disabled);
10399
12399
  const currentItem = enabledItems.find((item) => item.value === context.value);
10400
- const nextItem = findNextItem(enabledItems, search, currentItem);
12400
+ const nextItem = findNextItem(enabledItems, search2, currentItem);
10401
12401
  if (nextItem !== void 0) {
10402
12402
  context.onValueChange(nextItem.value);
10403
12403
  }
@@ -10624,10 +12624,10 @@ var SelectContentImpl = React35.forwardRef(
10624
12624
  window.removeEventListener("resize", close);
10625
12625
  };
10626
12626
  }, [onOpenChange]);
10627
- const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {
12627
+ const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search2) => {
10628
12628
  const enabledItems = getItems().filter((item) => !item.disabled);
10629
12629
  const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);
10630
- const nextItem = findNextItem(enabledItems, search, currentItem);
12630
+ const nextItem = findNextItem(enabledItems, search2, currentItem);
10631
12631
  if (nextItem) {
10632
12632
  setTimeout(() => nextItem.ref.current.focus());
10633
12633
  }
@@ -11356,13 +13356,13 @@ function useTypeaheadSearch(onSearchChange) {
11356
13356
  const timerRef = React35.useRef(0);
11357
13357
  const handleTypeaheadSearch = React35.useCallback(
11358
13358
  (key) => {
11359
- const search = searchRef.current + key;
11360
- handleSearchChange(search);
13359
+ const search2 = searchRef.current + key;
13360
+ handleSearchChange(search2);
11361
13361
  (function updateSearch(value) {
11362
13362
  searchRef.current = value;
11363
13363
  window.clearTimeout(timerRef.current);
11364
13364
  if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
11365
- })(search);
13365
+ })(search2);
11366
13366
  },
11367
13367
  [handleSearchChange]
11368
13368
  );
@@ -11375,9 +13375,9 @@ function useTypeaheadSearch(onSearchChange) {
11375
13375
  }, []);
11376
13376
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
11377
13377
  }
11378
- function findNextItem(items, search, currentItem) {
11379
- const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
11380
- const normalizedSearch = isRepeated ? search[0] : search;
13378
+ function findNextItem(items, search2, currentItem) {
13379
+ const isRepeated = search2.length > 1 && Array.from(search2).every((char) => char === search2[0]);
13380
+ const normalizedSearch = isRepeated ? search2[0] : search2;
11381
13381
  const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
11382
13382
  let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));
11383
13383
  const excludeCurrentItem = normalizedSearch.length === 1;
@@ -21439,13 +23439,25 @@ function TokenSelectorSheet({
21439
23439
  });
21440
23440
  setRecentTokens(updated);
21441
23441
  };
23442
+ const fuse = (0, import_react23.useMemo)(
23443
+ () => new Fuse(allOptions, {
23444
+ keys: [
23445
+ { name: "token.symbol", weight: 2 },
23446
+ { name: "token.name", weight: 1 },
23447
+ { name: "chain.chain_name", weight: 0.5 }
23448
+ ],
23449
+ threshold: 0.2,
23450
+ ignoreLocation: true,
23451
+ minMatchCharLength: 2
23452
+ }),
23453
+ [allOptions]
23454
+ );
21442
23455
  const filteredOptions = (0, import_react23.useMemo)(() => {
21443
23456
  if (!searchQuery.trim()) return allOptions;
21444
- const query = searchQuery.toLowerCase();
21445
- return allOptions.filter(
21446
- ({ token, chain }) => token.symbol.toLowerCase().includes(query) || token.name.toLowerCase().includes(query) || chain.chain_name.toLowerCase().includes(query)
21447
- );
21448
- }, [allOptions, searchQuery]);
23457
+ const query = searchQuery.trim();
23458
+ const results = fuse.search(query);
23459
+ return results.map((r2) => r2.item);
23460
+ }, [fuse, allOptions, searchQuery]);
21449
23461
  const isCommonToken = (symbol, chainType, chainId) => {
21450
23462
  return COMMON_TOKENS.some(
21451
23463
  (ct) => ct.symbol === symbol && ct.chainType === chainType && ct.chainId === chainId
@@ -25088,6 +27100,7 @@ function DepositModal({
25088
27100
  enableConnectWallet = false,
25089
27101
  browserWalletAmountQuickSelect = "percentage",
25090
27102
  enablePayWithExchange,
27103
+ enableFiatOnramp,
25091
27104
  enableConnectExchange = false,
25092
27105
  enableCashApp = false,
25093
27106
  hideDepositFlowInfo = false,
@@ -25109,8 +27122,9 @@ function DepositModal({
25109
27122
  const s = initialScreen ?? "main";
25110
27123
  if (s === "tracker" && hideDepositTracker) return "main";
25111
27124
  if (s === "cashapp" && !enableCashApp) return "main";
27125
+ if (s === "card" && enableFiatOnramp === false) return "main";
25112
27126
  return s;
25113
- }, [initialScreen, hideDepositTracker, enableCashApp]);
27127
+ }, [initialScreen, hideDepositTracker, enableCashApp, enableFiatOnramp]);
25114
27128
  const [containerEl, setContainerEl] = (0, import_react8.useState)(null);
25115
27129
  const containerCallbackRef = (0, import_react8.useCallback)((el) => {
25116
27130
  setContainerEl(el);
@@ -25226,6 +27240,13 @@ function DepositModal({
25226
27240
  enabled: open
25227
27241
  });
25228
27242
  const showPayWithExchange = enablePayWithExchange ?? projectConfig?.pay_with_exchange?.enabled ?? true;
27243
+ const showFiatOnramp = enableFiatOnramp ?? projectConfig?.fiat_onramp?.enabled ?? true;
27244
+ (0, import_react8.useEffect)(() => {
27245
+ if (view === "card" && !showFiatOnramp) {
27246
+ setView("main");
27247
+ setCardView("amount");
27248
+ }
27249
+ }, [view, showFiatOnramp]);
25229
27250
  const { exchanges, isLoading: exchangesLoading } = useExchanges({
25230
27251
  publishableKey,
25231
27252
  enabled: open && showPayWithExchange
@@ -25535,7 +27556,7 @@ function DepositModal({
25535
27556
  featuredWallets: projectConfig?.connect_wallet?.wallets
25536
27557
  }
25537
27558
  ),
25538
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
27559
+ showFiatOnramp && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
25539
27560
  DepositWithCardButton,
25540
27561
  {
25541
27562
  onClick: () => setView("card"),
@@ -28537,6 +30558,7 @@ function UnifoldProvider2({
28537
30558
  transferInputVariant: config?.transferInputVariant,
28538
30559
  enableConnectWallet: config?.enableConnectWallet,
28539
30560
  enablePayWithExchange: config?.enablePayWithExchange,
30561
+ enableFiatOnramp: config?.enableFiatOnramp,
28540
30562
  enableConnectExchange: config?.enableConnectExchange,
28541
30563
  enableCashApp: config?.enableCashApp,
28542
30564
  onDepositSuccess: handleDepositSuccess,