@snowcone-app/canvas 0.46.6 → 0.46.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{ContextualToolbars-Dmo86Wd2.js → ContextualToolbars-BA0QCFF7.js} +3 -3
  2. package/dist/{ContextualToolbars-Dmo86Wd2.js.map → ContextualToolbars-BA0QCFF7.js.map} +1 -1
  3. package/dist/{EditorCanvasImpl-BHa8q4iO.js → EditorCanvasImpl-DsAgLgmR.js} +5 -5
  4. package/dist/{EditorCanvasImpl-BHa8q4iO.js.map → EditorCanvasImpl-DsAgLgmR.js.map} +1 -1
  5. package/dist/{ImagePanel-4fHABjNT.js → ImagePanel-DXQO8eOD.js} +3 -3
  6. package/dist/{ImagePanel-4fHABjNT.js.map → ImagePanel-DXQO8eOD.js.map} +1 -1
  7. package/dist/{SnowconeCanvas-GPag5BXG.js → SnowconeCanvas-d8JHL7mC.js} +6 -6
  8. package/dist/{SnowconeCanvas-GPag5BXG.js.map → SnowconeCanvas-d8JHL7mC.js.map} +1 -1
  9. package/dist/advanced.mjs +7 -7
  10. package/dist/{custom-icons-Dt0Y4VSn.js → custom-icons-3gVIcPLj.js} +2 -2
  11. package/dist/{custom-icons-Dt0Y4VSn.js.map → custom-icons-3gVIcPLj.js.map} +1 -1
  12. package/dist/{embed-DhjsJ3ni.js → embed-CG-lFuZn.js} +5 -5
  13. package/dist/{embed-DhjsJ3ni.js.map → embed-CG-lFuZn.js.map} +1 -1
  14. package/dist/embed.mjs +3 -3
  15. package/dist/index.mjs +5 -5
  16. package/dist/{template-fields-CKEuUmTM.js → template-fields-C2JnjdcI.js} +2 -2
  17. package/dist/{template-fields-CKEuUmTM.js.map → template-fields-C2JnjdcI.js.map} +1 -1
  18. package/dist/{useCommands-BI7O5Lf0.js → useCommands--GNTAyjd.js} +141 -145
  19. package/dist/useCommands--GNTAyjd.js.map +1 -0
  20. package/dist/{validation-au_-Sj-A.js → validation-9BuyvBcJ.js} +132 -136
  21. package/dist/validation-9BuyvBcJ.js.map +1 -0
  22. package/dist/vendor/ui/primitives/Button.d.ts +1 -1
  23. package/example/package.json +1 -1
  24. package/package.json +3 -3
  25. package/dist/useCommands-BI7O5Lf0.js.map +0 -1
  26. package/dist/validation-au_-Sj-A.js.map +0 -1
@@ -396,11 +396,6 @@ const yi = {
396
396
  width: 24,
397
397
  height: 24
398
398
  },
399
- "lucide:pen-tool": {
400
- body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z"/><path d="m18 13l-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18M2.3 2.3l7.286 7.286"/><circle cx="11" cy="11" r="2"/></g>',
401
- width: 24,
402
- height: 24
403
- },
404
399
  "lucide:redo-2": {
405
400
  body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m15 14l5-5l-5-5"/><path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"/></g>',
406
401
  width: 24,
@@ -539,7 +534,7 @@ const yi = {
539
534
  }, Gr = typeof window < "u";
540
535
  async function bi() {
541
536
  if (!Gr) return;
542
- const { addIcon: e } = await Promise.resolve().then(() => vs);
537
+ const { addIcon: e } = await Promise.resolve().then(() => bs);
543
538
  for (const [t, n] of Object.entries(yi))
544
539
  e(t, n);
545
540
  }
@@ -920,7 +915,44 @@ function xi(e = {}) {
920
915
  layerCount: w.length
921
916
  };
922
917
  }
923
- function ki(e, t) {
918
+ class ki {
919
+ constructor() {
920
+ this.isProtectedFlag = !1, this.timeout = null, this.timeoutDuration = 5e3;
921
+ }
922
+ /**
923
+ * Protect the next click from triggering deselection
924
+ * Automatically expires after one check or timeout
925
+ */
926
+ protectNextClick() {
927
+ this.isProtectedFlag = !0, this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
928
+ this.isProtectedFlag = !1, this.timeout = null;
929
+ }, this.timeoutDuration);
930
+ }
931
+ /**
932
+ * Check if the current click should be protected
933
+ * This consumes the protection (one-time use)
934
+ * @returns {boolean} true if click should be protected, false otherwise
935
+ */
936
+ shouldProtectClick() {
937
+ const t = this.isProtectedFlag;
938
+ return this.isProtectedFlag && (this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null)), t;
939
+ }
940
+ /**
941
+ * Manually clear protection (useful for cleanup)
942
+ */
943
+ clearProtection() {
944
+ this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null);
945
+ }
946
+ /**
947
+ * Check if protection is currently active (without consuming it)
948
+ * @returns {boolean} true if protection is active
949
+ */
950
+ isProtected() {
951
+ return this.isProtectedFlag;
952
+ }
953
+ }
954
+ const Ci = new ki();
955
+ function Si(e, t) {
924
956
  const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
925
957
  function i(s) {
926
958
  if (n[s]) return o[s] = [];
@@ -950,18 +982,18 @@ const qr = Object.freeze({
950
982
  body: "",
951
983
  hidden: !1
952
984
  });
953
- function Ci(e, t) {
985
+ function Ei(e, t) {
954
986
  const n = {};
955
987
  !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
956
988
  const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
957
989
  return r && (n.rotate = r), n;
958
990
  }
959
991
  function lr(e, t) {
960
- const n = Ci(e, t);
992
+ const n = Ei(e, t);
961
993
  for (const r in An) r in Bt ? r in e && !(r in n) && (n[r] = Bt[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
962
994
  return n;
963
995
  }
964
- function Si(e, t, n) {
996
+ function Ai(e, t, n) {
965
997
  const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
966
998
  let i = {};
967
999
  function s(a) {
@@ -975,14 +1007,14 @@ function Yr(e, t) {
975
1007
  e.not_found instanceof Array && e.not_found.forEach((o) => {
976
1008
  t(o, null), n.push(o);
977
1009
  });
978
- const r = ki(e);
1010
+ const r = Si(e);
979
1011
  for (const o in r) {
980
1012
  const i = r[o];
981
- i && (t(o, Si(e, o, i)), n.push(o));
1013
+ i && (t(o, Ai(e, o, i)), n.push(o));
982
1014
  }
983
1015
  return n;
984
1016
  }
985
- const Ei = {
1017
+ const Mi = {
986
1018
  provider: "",
987
1019
  aliases: {},
988
1020
  not_found: {},
@@ -995,7 +1027,7 @@ function fn(e, t) {
995
1027
  function Kr(e) {
996
1028
  if (typeof e != "object" || e === null) return null;
997
1029
  const t = e;
998
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !fn(e, Ei)) return null;
1030
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !fn(e, Mi)) return null;
999
1031
  const n = t.icons;
1000
1032
  for (const o in n) {
1001
1033
  const i = n[o];
@@ -1009,7 +1041,7 @@ function Kr(e) {
1009
1041
  return t;
1010
1042
  }
1011
1043
  const cr = /* @__PURE__ */ Object.create(null);
1012
- function Ai(e, t) {
1044
+ function Di(e, t) {
1013
1045
  return {
1014
1046
  provider: e,
1015
1047
  prefix: t,
@@ -1019,14 +1051,14 @@ function Ai(e, t) {
1019
1051
  }
1020
1052
  function it(e, t) {
1021
1053
  const n = cr[e] || (cr[e] = /* @__PURE__ */ Object.create(null));
1022
- return n[t] || (n[t] = Ai(e, t));
1054
+ return n[t] || (n[t] = Di(e, t));
1023
1055
  }
1024
1056
  function Xr(e, t) {
1025
1057
  return Kr(t) ? Yr(t, (n, r) => {
1026
1058
  r ? e.icons[n] = r : e.missing.add(n);
1027
1059
  }) : [];
1028
1060
  }
1029
- function Mi(e, t, n) {
1061
+ function Li(e, t, n) {
1030
1062
  try {
1031
1063
  if (typeof n.body == "string")
1032
1064
  return e.icons[t] = { ...n }, !0;
@@ -1083,7 +1115,7 @@ function Zr(e, t) {
1083
1115
  const n = Kt(e, !0, xt);
1084
1116
  if (!n) return !1;
1085
1117
  const r = it(n.provider, n.prefix);
1086
- return t ? Mi(r, n.name, t) : (r.missing.add(n.name), !0);
1118
+ return t ? Li(r, n.name, t) : (r.missing.add(n.name), !0);
1087
1119
  }
1088
1120
  function eo(e, t) {
1089
1121
  if (typeof e != "object") return !1;
@@ -1107,15 +1139,15 @@ const to = Object.freeze({
1107
1139
  }), no = Object.freeze({
1108
1140
  ...to,
1109
1141
  ...Bt
1110
- }), Di = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Li = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1142
+ }), Ti = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ii = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1111
1143
  function Mn(e, t, n) {
1112
1144
  if (t === 1) return e;
1113
1145
  if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
1114
1146
  if (typeof e != "string") return e;
1115
- const r = e.split(Di);
1147
+ const r = e.split(Ti);
1116
1148
  if (r === null || !r.length) return e;
1117
1149
  const o = [];
1118
- let i = r.shift(), s = Li.test(i);
1150
+ let i = r.shift(), s = Ii.test(i);
1119
1151
  for (; ; ) {
1120
1152
  if (s) {
1121
1153
  const a = parseFloat(i);
@@ -1125,7 +1157,7 @@ function Mn(e, t, n) {
1125
1157
  s = !s;
1126
1158
  }
1127
1159
  }
1128
- function Ti(e, t = "defs") {
1160
+ function Ri(e, t = "defs") {
1129
1161
  let n = "";
1130
1162
  const r = e.indexOf("<" + t);
1131
1163
  for (; r >= 0; ) {
@@ -1140,14 +1172,14 @@ function Ti(e, t = "defs") {
1140
1172
  content: e
1141
1173
  };
1142
1174
  }
1143
- function Ii(e, t) {
1175
+ function Ni(e, t) {
1144
1176
  return e ? "<defs>" + e + "</defs>" + t : t;
1145
1177
  }
1146
- function Ri(e, t, n) {
1147
- const r = Ti(e);
1148
- return Ii(r.defs, t + r.content + n);
1178
+ function zi(e, t, n) {
1179
+ const r = Ri(e);
1180
+ return Ni(r.defs, t + r.content + n);
1149
1181
  }
1150
- const Ni = (e) => e === "unset" || e === "undefined" || e === "none";
1182
+ const Oi = (e) => e === "unset" || e === "undefined" || e === "none";
1151
1183
  function ro(e, t) {
1152
1184
  const n = {
1153
1185
  ...Vn,
@@ -1178,13 +1210,13 @@ function ro(e, t) {
1178
1210
  L = o.width / 2 + o.left, g.unshift("rotate(-90 " + L.toString() + " " + L.toString() + ")");
1179
1211
  break;
1180
1212
  }
1181
- M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), g.length && (i = Ri(i, '<g transform="' + g.join(" ") + '">', "</g>"));
1213
+ M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), g.length && (i = zi(i, '<g transform="' + g.join(" ") + '">', "</g>"));
1182
1214
  });
1183
1215
  const s = r.width, a = r.height, l = o.width, c = o.height;
1184
1216
  let u, d;
1185
1217
  s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u = Mn(d, l / c)) : (u = s === "auto" ? l : s, d = a === null ? Mn(u, c / l) : a === "auto" ? c : a);
1186
1218
  const h = {}, p = (y, g) => {
1187
- Ni(g) || (h[y] = g.toString());
1219
+ Oi(g) || (h[y] = g.toString());
1188
1220
  };
1189
1221
  p("width", u), p("height", d);
1190
1222
  const k = [
@@ -1199,21 +1231,21 @@ function ro(e, t) {
1199
1231
  body: i
1200
1232
  };
1201
1233
  }
1202
- const zi = /\sid="(\S+)"/g, Oi = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
1203
- let Fi = 0;
1204
- function oo(e, t = Oi) {
1234
+ const Fi = /\sid="(\S+)"/g, ji = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
1235
+ let Pi = 0;
1236
+ function oo(e, t = ji) {
1205
1237
  const n = [];
1206
1238
  let r;
1207
- for (; r = zi.exec(e); ) n.push(r[1]);
1239
+ for (; r = Fi.exec(e); ) n.push(r[1]);
1208
1240
  if (!n.length) return e;
1209
1241
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
1210
1242
  return n.forEach((i) => {
1211
- const s = typeof t == "function" ? t(i) : t + (Fi++).toString(), a = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1243
+ const s = typeof t == "function" ? t(i) : t + (Pi++).toString(), a = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1212
1244
  e = e.replace(new RegExp('([#;"])(' + a + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
1213
1245
  }), e = e.replace(new RegExp(o, "g"), ""), e;
1214
1246
  }
1215
1247
  const Dn = /* @__PURE__ */ Object.create(null);
1216
- function ji(e, t) {
1248
+ function $i(e, t) {
1217
1249
  Dn[e] = t;
1218
1250
  }
1219
1251
  function Ln(e) {
@@ -1244,15 +1276,15 @@ function io(e, t) {
1244
1276
  function _n(e) {
1245
1277
  return Gn[e];
1246
1278
  }
1247
- const Pi = () => {
1279
+ const Hi = () => {
1248
1280
  let e;
1249
1281
  try {
1250
1282
  if (e = fetch, typeof e == "function") return e;
1251
1283
  } catch {
1252
1284
  }
1253
1285
  };
1254
- let ur = Pi();
1255
- function $i(e, t) {
1286
+ let ur = Hi();
1287
+ function Bi(e, t) {
1256
1288
  const n = _n(e);
1257
1289
  if (!n) return 0;
1258
1290
  let r;
@@ -1267,11 +1299,11 @@ function $i(e, t) {
1267
1299
  }
1268
1300
  return r;
1269
1301
  }
1270
- function Hi(e) {
1302
+ function Vi(e) {
1271
1303
  return e === 404;
1272
1304
  }
1273
- const Bi = (e, t, n) => {
1274
- const r = [], o = $i(e, t), i = "icons";
1305
+ const Ui = (e, t, n) => {
1306
+ const r = [], o = Bi(e, t), i = "icons";
1275
1307
  let s = {
1276
1308
  type: i,
1277
1309
  provider: e,
@@ -1287,19 +1319,19 @@ const Bi = (e, t, n) => {
1287
1319
  }, a = l.length), s.icons.push(l);
1288
1320
  }), r.push(s), r;
1289
1321
  };
1290
- function Vi(e) {
1322
+ function Gi(e) {
1291
1323
  if (typeof e == "string") {
1292
1324
  const t = _n(e);
1293
1325
  if (t) return t.path;
1294
1326
  }
1295
1327
  return "/";
1296
1328
  }
1297
- const Ui = (e, t, n) => {
1329
+ const _i = (e, t, n) => {
1298
1330
  if (!ur) {
1299
1331
  n("abort", 424);
1300
1332
  return;
1301
1333
  }
1302
- let r = Vi(t.provider);
1334
+ let r = Gi(t.provider);
1303
1335
  switch (t.type) {
1304
1336
  case "icons": {
1305
1337
  const i = t.prefix, a = t.icons.join(","), l = new URLSearchParams({ icons: a });
@@ -1320,7 +1352,7 @@ const Ui = (e, t, n) => {
1320
1352
  const s = i.status;
1321
1353
  if (s !== 200) {
1322
1354
  setTimeout(() => {
1323
- n(Hi(s) ? "abort" : "next", s);
1355
+ n(Vi(s) ? "abort" : "next", s);
1324
1356
  });
1325
1357
  return;
1326
1358
  }
@@ -1338,9 +1370,9 @@ const Ui = (e, t, n) => {
1338
1370
  }).catch(() => {
1339
1371
  n("next", o);
1340
1372
  });
1341
- }, Gi = {
1342
- prepare: Bi,
1343
- send: Ui
1373
+ }, Wi = {
1374
+ prepare: Ui,
1375
+ send: _i
1344
1376
  };
1345
1377
  function so(e, t) {
1346
1378
  e.forEach((n) => {
@@ -1348,7 +1380,7 @@ function so(e, t) {
1348
1380
  r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
1349
1381
  });
1350
1382
  }
1351
- function _i(e) {
1383
+ function qi(e) {
1352
1384
  e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
1353
1385
  e.pendingCallbacksFlag = !1;
1354
1386
  const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
@@ -1377,9 +1409,9 @@ function _i(e) {
1377
1409
  });
1378
1410
  }));
1379
1411
  }
1380
- let Wi = 0;
1381
- function qi(e, t, n) {
1382
- const r = Wi++, o = so.bind(null, n, r);
1412
+ let Yi = 0;
1413
+ function Ki(e, t, n) {
1414
+ const r = Yi++, o = so.bind(null, n, r);
1383
1415
  if (!t.pending.length) return o;
1384
1416
  const i = {
1385
1417
  id: r,
@@ -1391,7 +1423,7 @@ function qi(e, t, n) {
1391
1423
  (s.loaderCallbacks || (s.loaderCallbacks = [])).push(i);
1392
1424
  }), o;
1393
1425
  }
1394
- function Yi(e) {
1426
+ function Xi(e) {
1395
1427
  const t = {
1396
1428
  loaded: [],
1397
1429
  missing: [],
@@ -1417,14 +1449,14 @@ function Yi(e) {
1417
1449
  u.push(d);
1418
1450
  }), t;
1419
1451
  }
1420
- function Ki(e, t = !0, n = !1) {
1452
+ function Ji(e, t = !0, n = !1) {
1421
1453
  const r = [];
1422
1454
  return e.forEach((o) => {
1423
1455
  const i = typeof o == "string" ? Kt(o, t, n) : o;
1424
1456
  i && r.push(i);
1425
1457
  }), r;
1426
1458
  }
1427
- const Xi = {
1459
+ const Qi = {
1428
1460
  resources: [],
1429
1461
  index: 0,
1430
1462
  timeout: 2e3,
@@ -1432,7 +1464,7 @@ const Xi = {
1432
1464
  random: !1,
1433
1465
  dataAfterTimeout: !1
1434
1466
  };
1435
- function Ji(e, t, n, r) {
1467
+ function Zi(e, t, n, r) {
1436
1468
  const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
1437
1469
  let s;
1438
1470
  if (e.random) {
@@ -1532,7 +1564,7 @@ function Ji(e, t, n, r) {
1532
1564
  }
1533
1565
  function ao(e) {
1534
1566
  const t = {
1535
- ...Xi,
1567
+ ...Qi,
1536
1568
  ...e
1537
1569
  };
1538
1570
  let n = [];
@@ -1540,7 +1572,7 @@ function ao(e) {
1540
1572
  n = n.filter((a) => a().status === "pending");
1541
1573
  }
1542
1574
  function o(a, l, c) {
1543
- const u = Ji(t, a, l, (d, h) => {
1575
+ const u = Zi(t, a, l, (d, h) => {
1544
1576
  r(), c && c(d, h);
1545
1577
  });
1546
1578
  return n.push(u), u;
@@ -1561,7 +1593,7 @@ function ao(e) {
1561
1593
  function fr() {
1562
1594
  }
1563
1595
  const hn = /* @__PURE__ */ Object.create(null);
1564
- function Qi(e) {
1596
+ function es(e) {
1565
1597
  if (!hn[e]) {
1566
1598
  const t = _n(e);
1567
1599
  if (!t) return;
@@ -1573,14 +1605,14 @@ function Qi(e) {
1573
1605
  }
1574
1606
  return hn[e];
1575
1607
  }
1576
- function Zi(e, t, n) {
1608
+ function ts(e, t, n) {
1577
1609
  let r, o;
1578
1610
  if (typeof e == "string") {
1579
1611
  const i = Ln(e);
1580
1612
  if (!i)
1581
1613
  return n(void 0, 424), fr;
1582
1614
  o = i.send;
1583
- const s = Qi(e);
1615
+ const s = es(e);
1584
1616
  s && (r = s.redundancy);
1585
1617
  } else {
1586
1618
  const i = Un(e);
@@ -1594,12 +1626,12 @@ function Zi(e, t, n) {
1594
1626
  }
1595
1627
  function hr() {
1596
1628
  }
1597
- function es(e) {
1629
+ function ns(e) {
1598
1630
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
1599
- e.iconsLoaderFlag = !1, _i(e);
1631
+ e.iconsLoaderFlag = !1, qi(e);
1600
1632
  }));
1601
1633
  }
1602
- function ts(e) {
1634
+ function rs(e) {
1603
1635
  const t = [], n = [];
1604
1636
  return e.forEach((r) => {
1605
1637
  (r.match(Jr) ? t : n).push(r);
@@ -1623,7 +1655,7 @@ function gt(e, t, n) {
1623
1655
  } catch (o) {
1624
1656
  console.error(o);
1625
1657
  }
1626
- r(), es(e);
1658
+ r(), ns(e);
1627
1659
  }
1628
1660
  function gr(e, t) {
1629
1661
  e instanceof Promise ? e.then((n) => {
@@ -1632,7 +1664,7 @@ function gr(e, t) {
1632
1664
  t(null);
1633
1665
  }) : t(e);
1634
1666
  }
1635
- function ns(e, t) {
1667
+ function os(e, t) {
1636
1668
  e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
1637
1669
  e.iconsQueueFlag = !1;
1638
1670
  const { provider: n, prefix: r } = e, o = e.iconsToLoad;
@@ -1657,7 +1689,7 @@ function ns(e, t) {
1657
1689
  });
1658
1690
  return;
1659
1691
  }
1660
- const { valid: s, invalid: a } = ts(o);
1692
+ const { valid: s, invalid: a } = rs(o);
1661
1693
  if (a.length && gt(e, a, null), !s.length) return;
1662
1694
  const l = r.match(Jr) ? Ln(n) : null;
1663
1695
  if (!l) {
@@ -1665,14 +1697,14 @@ function ns(e, t) {
1665
1697
  return;
1666
1698
  }
1667
1699
  l.prepare(n, r, s).forEach((u) => {
1668
- Zi(n, u, (d) => {
1700
+ ts(n, u, (d) => {
1669
1701
  gt(e, u.icons, d);
1670
1702
  });
1671
1703
  });
1672
1704
  }));
1673
1705
  }
1674
1706
  const lo = (e, t) => {
1675
- const n = Ki(e, !0, Qr()), r = Yi(n);
1707
+ const n = Ji(e, !0, Qr()), r = Xi(n);
1676
1708
  if (!r.pending.length) {
1677
1709
  let l = !0;
1678
1710
  return t && setTimeout(() => {
@@ -1694,10 +1726,10 @@ const lo = (e, t) => {
1694
1726
  p.has(d) || (p.add(d), o[c][u].push(d));
1695
1727
  }), i.forEach((l) => {
1696
1728
  const c = o[l.provider][l.prefix];
1697
- c.length && ns(l, c);
1698
- }), t ? qi(t, r, i) : hr;
1729
+ c.length && os(l, c);
1730
+ }), t ? Ki(t, r, i) : hr;
1699
1731
  };
1700
- function rs(e, t) {
1732
+ function is(e, t) {
1701
1733
  const n = { ...e };
1702
1734
  for (const r in t) {
1703
1735
  const o = t[r], i = typeof o;
@@ -1705,9 +1737,9 @@ function rs(e, t) {
1705
1737
  }
1706
1738
  return n;
1707
1739
  }
1708
- const os = /[\s,]+/;
1709
- function is(e, t) {
1710
- t.split(os).forEach((n) => {
1740
+ const ss = /[\s,]+/;
1741
+ function as(e, t) {
1742
+ t.split(ss).forEach((n) => {
1711
1743
  switch (n.trim()) {
1712
1744
  case "horizontal":
1713
1745
  e.hFlip = !0;
@@ -1718,7 +1750,7 @@ function is(e, t) {
1718
1750
  }
1719
1751
  });
1720
1752
  }
1721
- function ss(e, t = 0) {
1753
+ function ls(e, t = 0) {
1722
1754
  const n = e.replace(/^-?[0-9.]*/, "");
1723
1755
  function r(o) {
1724
1756
  for (; o < 0; ) o += 4;
@@ -1743,40 +1775,40 @@ function ss(e, t = 0) {
1743
1775
  }
1744
1776
  return t;
1745
1777
  }
1746
- function as(e, t) {
1778
+ function cs(e, t) {
1747
1779
  let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1748
1780
  for (const r in t) n += " " + r + '="' + t[r] + '"';
1749
1781
  return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
1750
1782
  }
1751
- function ls(e) {
1783
+ function ds(e) {
1752
1784
  return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1753
1785
  }
1754
- function cs(e) {
1755
- return "data:image/svg+xml," + ls(e);
1786
+ function us(e) {
1787
+ return "data:image/svg+xml," + ds(e);
1756
1788
  }
1757
- function ds(e) {
1758
- return 'url("' + cs(e) + '")';
1789
+ function fs(e) {
1790
+ return 'url("' + us(e) + '")';
1759
1791
  }
1760
1792
  let vt;
1761
- function us() {
1793
+ function hs() {
1762
1794
  try {
1763
1795
  vt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
1764
1796
  } catch {
1765
1797
  vt = null;
1766
1798
  }
1767
1799
  }
1768
- function fs(e) {
1769
- return vt === void 0 && us(), vt ? vt.createHTML(e) : e;
1800
+ function gs(e) {
1801
+ return vt === void 0 && hs(), vt ? vt.createHTML(e) : e;
1770
1802
  }
1771
1803
  const co = {
1772
1804
  ...no,
1773
1805
  inline: !1
1774
- }, hs = {
1806
+ }, ps = {
1775
1807
  xmlns: "http://www.w3.org/2000/svg",
1776
1808
  xmlnsXlink: "http://www.w3.org/1999/xlink",
1777
1809
  "aria-hidden": !0,
1778
1810
  role: "img"
1779
- }, gs = {
1811
+ }, ms = {
1780
1812
  display: "inline-block"
1781
1813
  }, Tn = {
1782
1814
  backgroundColor: "currentColor"
@@ -1796,16 +1828,16 @@ for (const e in mr) {
1796
1828
  for (const n in pr)
1797
1829
  t[e + n] = pr[n];
1798
1830
  }
1799
- const ps = {
1831
+ const vs = {
1800
1832
  ...co,
1801
1833
  inline: !0
1802
1834
  };
1803
1835
  function vr(e) {
1804
1836
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
1805
1837
  }
1806
- const ms = (e, t, n) => {
1807
- const r = t.inline ? ps : co, o = rs(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
1808
- ...i === "svg" ? hs : {}
1838
+ const ys = (e, t, n) => {
1839
+ const r = t.inline ? vs : co, o = is(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
1840
+ ...i === "svg" ? ps : {}
1809
1841
  };
1810
1842
  if (n) {
1811
1843
  const g = Kt(n, !1, !0);
@@ -1848,7 +1880,7 @@ const ms = (e, t, n) => {
1848
1880
  break;
1849
1881
  // Flip as string: 'horizontal,vertical'
1850
1882
  case "flip":
1851
- typeof m == "string" && is(o, m);
1883
+ typeof m == "string" && as(o, m);
1852
1884
  break;
1853
1885
  // Color: copy to style
1854
1886
  case "color":
@@ -1856,7 +1888,7 @@ const ms = (e, t, n) => {
1856
1888
  break;
1857
1889
  // Rotation as string
1858
1890
  case "rotate":
1859
- typeof m == "string" ? o[g] = ss(m) : typeof m == "number" && (o[g] = m);
1891
+ typeof m == "string" ? o[g] = ls(m) : typeof m == "number" && (o[g] = m);
1860
1892
  break;
1861
1893
  // Remove aria-hidden
1862
1894
  case "ariaHidden":
@@ -1876,26 +1908,26 @@ const ms = (e, t, n) => {
1876
1908
  }, Object.assign(l, u);
1877
1909
  let g = 0, m = t.id;
1878
1910
  return typeof m == "string" && (m = m.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
1879
- __html: fs(oo(c.body, m ? () => m + "ID" + g++ : "iconifyReact"))
1911
+ __html: gs(oo(c.body, m ? () => m + "ID" + g++ : "iconifyReact"))
1880
1912
  }, En("svg", l);
1881
1913
  }
1882
- const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = as(d, {
1914
+ const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = cs(d, {
1883
1915
  ...u,
1884
1916
  width: h + "",
1885
1917
  height: p + ""
1886
1918
  });
1887
1919
  return l.style = {
1888
1920
  ...s,
1889
- "--svg": ds(y),
1921
+ "--svg": fs(y),
1890
1922
  width: vr(u.width),
1891
1923
  height: vr(u.height),
1892
- ...gs,
1924
+ ...ms,
1893
1925
  ...k ? Tn : uo,
1894
1926
  ...a
1895
1927
  }, En("span", l);
1896
1928
  };
1897
1929
  Qr(!0);
1898
- ji("", Gi);
1930
+ $i("", Wi);
1899
1931
  if (typeof document < "u" && typeof window < "u") {
1900
1932
  const e = window;
1901
1933
  if (e.IconifyPreload !== void 0) {
@@ -1983,7 +2015,7 @@ function fo(e) {
1983
2015
  t && u();
1984
2016
  }, [e.icon, t]);
1985
2017
  const { name: d, data: h } = s;
1986
- return h ? ms({
2018
+ return h ? ys({
1987
2019
  ...Vn,
1988
2020
  ...h
1989
2021
  }, e, d) : e.children ? e.children : e.fallback ? e.fallback : En("span", {});
@@ -1997,7 +2029,7 @@ $n((e, t) => fo({
1997
2029
  ...e,
1998
2030
  _ref: t
1999
2031
  }));
2000
- const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2032
+ const bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2001
2033
  __proto__: null,
2002
2034
  Icon: $,
2003
2035
  addAPIProvider: io,
@@ -2007,44 +2039,7 @@ const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2007
2039
  calculateSize: Mn,
2008
2040
  loadIcons: lo,
2009
2041
  replaceIDs: oo
2010
- }, Symbol.toStringTag, { value: "Module" }));
2011
- class ys {
2012
- constructor() {
2013
- this.isProtectedFlag = !1, this.timeout = null, this.timeoutDuration = 5e3;
2014
- }
2015
- /**
2016
- * Protect the next click from triggering deselection
2017
- * Automatically expires after one check or timeout
2018
- */
2019
- protectNextClick() {
2020
- this.isProtectedFlag = !0, this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
2021
- this.isProtectedFlag = !1, this.timeout = null;
2022
- }, this.timeoutDuration);
2023
- }
2024
- /**
2025
- * Check if the current click should be protected
2026
- * This consumes the protection (one-time use)
2027
- * @returns {boolean} true if click should be protected, false otherwise
2028
- */
2029
- shouldProtectClick() {
2030
- const t = this.isProtectedFlag;
2031
- return this.isProtectedFlag && (this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null)), t;
2032
- }
2033
- /**
2034
- * Manually clear protection (useful for cleanup)
2035
- */
2036
- clearProtection() {
2037
- this.isProtectedFlag = !1, this.timeout && (clearTimeout(this.timeout), this.timeout = null);
2038
- }
2039
- /**
2040
- * Check if protection is currently active (without consuming it)
2041
- * @returns {boolean} true if protection is active
2042
- */
2043
- isProtected() {
2044
- return this.isProtectedFlag;
2045
- }
2046
- }
2047
- const bs = new ys(), ws = Vr({ prefix: "sc" });
2042
+ }, Symbol.toStringTag, { value: "Module" })), ws = Vr({ prefix: "sc" });
2048
2043
  function Re(...e) {
2049
2044
  return ws(Br(e));
2050
2045
  }
@@ -6728,7 +6723,7 @@ const Uo = ({
6728
6723
  contentClassName: c = ""
6729
6724
  }) => {
6730
6725
  const u = V(null), d = V(null), h = V(null), [p, k] = B({}), [y, g] = B(!1), m = (M) => {
6731
- M.stopPropagation(), !n && a && bs.protectNextClick(), r(!n);
6726
+ M.stopPropagation(), !n && a && Ci.protectNextClick(), r(!n);
6732
6727
  };
6733
6728
  q(() => {
6734
6729
  if (!n) return;
@@ -7241,7 +7236,7 @@ function Wo({
7241
7236
  return q(() => {
7242
7237
  if (!t || o) return;
7243
7238
  let s = !1;
7244
- return import("./ImagePanel-4fHABjNT.js").then(
7239
+ return import("./ImagePanel-DXQO8eOD.js").then(
7245
7240
  (a) => {
7246
7241
  s || i(() => a.ImagePanel);
7247
7242
  },
@@ -8110,6 +8105,7 @@ function Ac() {
8110
8105
  };
8111
8106
  }
8112
8107
  export {
8108
+ yo as $,
8113
8109
  ir as A,
8114
8110
  st as B,
8115
8111
  Cc as C,
@@ -8134,9 +8130,9 @@ export {
8134
8130
  ho as V,
8135
8131
  As as W,
8136
8132
  Rn as X,
8137
- mo as Y,
8138
- vo as Z,
8139
- yo as _,
8133
+ yi as Y,
8134
+ mo as Z,
8135
+ vo as _,
8140
8136
  Sc as a,
8141
8137
  js as b,
8142
8138
  Re as c,
@@ -8155,7 +8151,7 @@ export {
8155
8151
  Uo as p,
8156
8152
  Xt as q,
8157
8153
  At as r,
8158
- bs as s,
8154
+ Ci as s,
8159
8155
  jn as t,
8160
8156
  xs as u,
8161
8157
  Xe as v,
@@ -8164,4 +8160,4 @@ export {
8164
8160
  or as y,
8165
8161
  rn as z
8166
8162
  };
8167
- //# sourceMappingURL=useCommands-BI7O5Lf0.js.map
8163
+ //# sourceMappingURL=useCommands--GNTAyjd.js.map