quirk-ui 0.1.217 → 0.1.219

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.
@@ -1,6 +1,6 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { j as Q, d as U, b as sn, i as C, r as I, s as y, g as w, w as fe, v as Je } from "../../../react.esm-DKyXDL7m.js";
3
- import { Modal as _ } from "./index.mjs";
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { j as Q, d as x, b as sn, i as C, r as I, s as m, g as k, w as fe, v as Je } from "../../../react.esm-DKyXDL7m.js";
3
+ import { Modal as S } from "./index.mjs";
4
4
  import "../../../index-DPGXWTtt.js";
5
5
  function a(e, t, n) {
6
6
  return e.namespaceURI && e.namespaceURI !== "http://www.w3.org/1999/xhtml" || (t = Array.isArray(t) ? t : [
@@ -214,10 +214,10 @@ function fn(e) {
214
214
  configurable: !0
215
215
  }), n[te];
216
216
  }
217
- function pn(e) {
217
+ function hn(e) {
218
218
  Ge(e.navigator.clipboard) && e.navigator.clipboard[te].resetClipboardStub();
219
219
  }
220
- function hn(e) {
220
+ function pn(e) {
221
221
  Ge(e.navigator.clipboard) && e.navigator.clipboard[te].detachClipboardStub();
222
222
  }
223
223
  async function bn(e) {
@@ -245,8 +245,8 @@ async function Ct(e, t) {
245
245
  throw new Error("The Clipboard API is unavailable.");
246
246
  }
247
247
  const Ae = globalThis;
248
- typeof Ae.afterEach == "function" && Ae.afterEach(() => pn(globalThis.window));
249
- typeof Ae.afterAll == "function" && Ae.afterAll(() => hn(globalThis.window));
248
+ typeof Ae.afterEach == "function" && Ae.afterEach(() => hn(globalThis.window));
249
+ typeof Ae.afterAll == "function" && Ae.afterAll(() => pn(globalThis.window));
250
250
  const It = [
251
251
  "input:not([type=hidden]):not([disabled])",
252
252
  "button:not([disabled])",
@@ -308,18 +308,18 @@ function vn(e, t) {
308
308
  function Y(e) {
309
309
  return e.hasAttribute("contenteditable") && (e.getAttribute("contenteditable") == "true" || e.getAttribute("contenteditable") == "");
310
310
  }
311
- function ye(e) {
312
- const t = yn(e);
311
+ function me(e) {
312
+ const t = mn(e);
313
313
  return t && (t.closest('[contenteditable=""]') || t.closest('[contenteditable="true"]'));
314
314
  }
315
- function yn(e) {
315
+ function mn(e) {
316
316
  return e.nodeType === 1 ? e : e.parentElement;
317
317
  }
318
- var _t = /* @__PURE__ */ function(e) {
318
+ var St = /* @__PURE__ */ function(e) {
319
319
  return e.button = "button", e.color = "color", e.file = "file", e.image = "image", e.reset = "reset", e.submit = "submit", e.checkbox = "checkbox", e.radio = "radio", e;
320
- }(_t || {});
321
- function St(e) {
322
- return a(e, "button") || a(e, "input") && e.type in _t;
320
+ }(St || {});
321
+ function _t(e) {
322
+ return a(e, "button") || a(e, "input") && e.type in St;
323
323
  }
324
324
  function ne(e) {
325
325
  return Ot(e) && !e.readOnly || Y(e);
@@ -333,8 +333,8 @@ function Ot(e) {
333
333
  function P(e) {
334
334
  return At(e) && Ot(e);
335
335
  }
336
- function mn(e) {
337
- return At(e) && St(e);
336
+ function yn(e) {
337
+ return At(e) && _t(e);
338
338
  }
339
339
  function At(e) {
340
340
  return e.nodeType === 1;
@@ -342,7 +342,7 @@ function At(e) {
342
342
  function En(e) {
343
343
  const t = e.ownerDocument.getSelection();
344
344
  if (t != null && t.focusNode && P(e)) {
345
- const i = ye(t.focusNode);
345
+ const i = me(t.focusNode);
346
346
  if (i) {
347
347
  if (!t.isCollapsed) {
348
348
  var n;
@@ -401,7 +401,7 @@ function Mt(e) {
401
401
  function In(e) {
402
402
  return e[Me];
403
403
  }
404
- function _n(e, t) {
404
+ function Sn(e, t) {
405
405
  e[M] = t;
406
406
  }
407
407
  function ue(e, { focusOffset: t, anchorOffset: n = t }, i = "replace") {
@@ -419,7 +419,7 @@ function ue(e, { focusOffset: t, anchorOffset: n = t }, i = "replace") {
419
419
  } catch {
420
420
  }
421
421
  }
422
- function me(e) {
422
+ function ye(e) {
423
423
  var t, n, i;
424
424
  const r = (i = e[M]) !== null && i !== void 0 ? i : {
425
425
  anchorOffset: (t = e.selectionStart) !== null && t !== void 0 ? t : 0,
@@ -431,10 +431,10 @@ function me(e) {
431
431
  endOffset: Math.max(r.anchorOffset, r.focusOffset)
432
432
  };
433
433
  }
434
- function Sn(e) {
434
+ function _n(e) {
435
435
  return !!e[M];
436
436
  }
437
- function Se(e) {
437
+ function _e(e) {
438
438
  e[M] = void 0;
439
439
  }
440
440
  const De = globalThis.parseInt;
@@ -457,18 +457,18 @@ function Dt(e, t) {
457
457
  const n = e.cloneNode();
458
458
  return n.value = t, n.value === t;
459
459
  }
460
- var xt = /* @__PURE__ */ function(e) {
460
+ var Ut = /* @__PURE__ */ function(e) {
461
461
  return e.email = "email", e.password = "password", e.search = "search", e.telephone = "telephone", e.text = "text", e.url = "url", e;
462
- }(xt || {});
462
+ }(Ut || {});
463
463
  function On(e) {
464
464
  var t;
465
465
  const n = (t = e.getAttribute("maxlength")) !== null && t !== void 0 ? t : "";
466
466
  return /^\d+$/.test(n) && Number(n) >= 0 ? Number(n) : void 0;
467
467
  }
468
468
  function An(e) {
469
- return a(e, "textarea") || a(e, "input") && e.type in xt;
469
+ return a(e, "textarea") || a(e, "input") && e.type in Ut;
470
470
  }
471
- function Ut(e, t, n, i) {
471
+ function xt(e, t, n, i) {
472
472
  if (Pe(e) && t + n >= 0 && t + n <= e.nodeValue.length)
473
473
  return {
474
474
  node: e,
@@ -538,7 +538,7 @@ function Dn(e, t, n) {
538
538
  var i;
539
539
  const r = e[`${t}Sibling`];
540
540
  if (r) {
541
- if (e = xn(r, t === "next" ? "first" : "last"), n(e))
541
+ if (e = Un(r, t === "next" ? "first" : "last"), n(e))
542
542
  return e;
543
543
  } else if (e.parentNode && (!qe(e.parentNode) || !Y(e.parentNode) && e.parentNode !== ((i = e.ownerDocument) === null || i === void 0 ? void 0 : i.body)))
544
544
  e = e.parentNode;
@@ -546,17 +546,17 @@ function Dn(e, t, n) {
546
546
  break;
547
547
  }
548
548
  }
549
- function xn(e, t) {
549
+ function Un(e, t) {
550
550
  for (; e.hasChildNodes(); )
551
551
  e = e[`${t}Child`];
552
552
  return e;
553
553
  }
554
554
  const Ee = Symbol("Track programmatic changes for React workaround");
555
- function Un(e) {
555
+ function xn(e) {
556
556
  return Object.getOwnPropertyNames(e).some((t) => t.startsWith("__react")) && T(e).REACT_VERSION === 17;
557
557
  }
558
558
  function Nn(e) {
559
- Un(e) && (e[Ee] = {
559
+ xn(e) && (e[Ee] = {
560
560
  previousValue: String(e.value),
561
561
  tracked: []
562
562
  });
@@ -573,7 +573,7 @@ function Ln(e, t) {
573
573
  if (e[Ee] = void 0, !(!(i == null || (n = i.tracked) === null || n === void 0) && n.length))
574
574
  return;
575
575
  const r = i.tracked.length === 2 && i.tracked[0] === i.previousValue && i.tracked[1] === e.value;
576
- r || We(e), Sn(e) && ue(e, {
576
+ r || We(e), _n(e) && ue(e, {
577
577
  focusOffset: r ? t : e.value.length
578
578
  });
579
579
  }
@@ -582,11 +582,11 @@ function Nt(e) {
582
582
  if (t && P(t))
583
583
  return {
584
584
  type: "input",
585
- selection: me(t)
585
+ selection: ye(t)
586
586
  };
587
587
  const n = t == null ? void 0 : t.ownerDocument.getSelection();
588
588
  return {
589
- type: ye(e) && (n == null ? void 0 : n.anchorNode) && ye(n.anchorNode) ? "contenteditable" : "default",
589
+ type: me(e) && (n == null ? void 0 : n.anchorNode) && me(n.anchorNode) ? "contenteditable" : "default",
590
590
  selection: n
591
591
  };
592
592
  }
@@ -632,7 +632,7 @@ function Rn(e, t, n, i, r) {
632
632
  "deleteContentBackward",
633
633
  "deleteContentForward"
634
634
  ].includes(r)) {
635
- const s = Ut(n.startContainer, n.startOffset, r === "deleteContentBackward" ? -1 : 1, r);
635
+ const s = xt(n.startContainer, n.startOffset, r === "deleteContentBackward" ? -1 : 1, r);
636
636
  if (s) {
637
637
  o = !0;
638
638
  const u = n.cloneRange();
@@ -681,8 +681,8 @@ function Kn(e, t, { startOffset: n, endOffset: i }, r) {
681
681
  if (a(t, "input", {
682
682
  type: "time"
683
683
  })) {
684
- const h = Pn(l);
685
- h !== "" && Dt(t, h) && (l = h, f = h.length);
684
+ const p = Pn(l);
685
+ p !== "" && Dt(t, p) && (l = p, f = p.length);
686
686
  }
687
687
  return {
688
688
  oldValue: o,
@@ -754,7 +754,7 @@ function Xn(e, t) {
754
754
  }
755
755
  function nt(e, t) {
756
756
  if (P(e)) {
757
- const n = me(e);
757
+ const n = ye(e);
758
758
  J({
759
759
  focusNode: e,
760
760
  focusOffset: n.startOffset === n.endOffset ? n.focusOffset + t : t < 0 ? n.startOffset : n.endOffset
@@ -764,7 +764,7 @@ function nt(e, t) {
764
764
  if (!(n != null && n.focusNode))
765
765
  return;
766
766
  if (n.isCollapsed) {
767
- const i = Ut(n.focusNode, n.focusOffset, t);
767
+ const i = xt(n.focusNode, n.focusOffset, t);
768
768
  i && J({
769
769
  focusNode: i.node,
770
770
  focusOffset: i.offset
@@ -781,7 +781,7 @@ function Lt(e) {
781
781
  focusOffset: O(e).length
782
782
  });
783
783
  var t;
784
- const n = (t = ye(e)) !== null && t !== void 0 ? t : e.ownerDocument.body;
784
+ const n = (t = me(e)) !== null && t !== void 0 ? t : e.ownerDocument.body;
785
785
  J({
786
786
  focusNode: n,
787
787
  anchorOffset: 0,
@@ -790,12 +790,12 @@ function Lt(e) {
790
790
  }
791
791
  function Wn(e) {
792
792
  if (P(e))
793
- return me(e).startOffset === 0 && me(e).endOffset === O(e).length;
793
+ return ye(e).startOffset === 0 && ye(e).endOffset === O(e).length;
794
794
  var t;
795
- const n = (t = ye(e)) !== null && t !== void 0 ? t : e.ownerDocument.body, i = e.ownerDocument.getSelection();
795
+ const n = (t = me(e)) !== null && t !== void 0 ? t : e.ownerDocument.body, i = e.ownerDocument.getSelection();
796
796
  return (i == null ? void 0 : i.anchorNode) === n && i.focusNode === n && i.anchorOffset === 0 && i.focusOffset === n.childNodes.length;
797
797
  }
798
- function he(e, t, n) {
798
+ function pe(e, t, n) {
799
799
  var i;
800
800
  if (P(e))
801
801
  return J({
@@ -868,7 +868,7 @@ const it = {
868
868
  /* istanbul ignore next */
869
869
  0
870
870
  );
871
- he(t, r, r);
871
+ pe(t, r, r);
872
872
  };
873
873
  },
874
874
  Home: (e, t) => {
@@ -877,7 +877,7 @@ const it = {
877
877
  "textarea"
878
878
  ]) || Y(t))
879
879
  return () => {
880
- he(t, 0, 0);
880
+ pe(t, 0, 0);
881
881
  };
882
882
  },
883
883
  PageDown: (e, t) => {
@@ -886,7 +886,7 @@ const it = {
886
886
  ]))
887
887
  return () => {
888
888
  const n = O(t).length;
889
- he(t, n, n);
889
+ pe(t, n, n);
890
890
  };
891
891
  },
892
892
  PageUp: (e, t) => {
@@ -894,7 +894,7 @@ const it = {
894
894
  "input"
895
895
  ]))
896
896
  return () => {
897
- he(t, 0, 0);
897
+ pe(t, 0, 0);
898
898
  };
899
899
  },
900
900
  Tab: (e, t, n) => () => {
@@ -948,7 +948,7 @@ $.keyup = (e, t, n) => {
948
948
  };
949
949
  const rt = {
950
950
  " ": (e, t, n) => {
951
- if (St(t))
951
+ if (_t(t))
952
952
  return () => n.dispatchUIEvent(t, "click");
953
953
  }
954
954
  };
@@ -1241,26 +1241,26 @@ const ei = {
1241
1241
  ],
1242
1242
  Event: [],
1243
1243
  FocusEvent: [
1244
- pe,
1244
+ he,
1245
1245
  ii
1246
1246
  ],
1247
1247
  InputEvent: [
1248
- pe,
1248
+ he,
1249
1249
  ri
1250
1250
  ],
1251
1251
  MouseEvent: [
1252
- pe,
1252
+ he,
1253
1253
  Le,
1254
1254
  ot
1255
1255
  ],
1256
1256
  PointerEvent: [
1257
- pe,
1257
+ he,
1258
1258
  Le,
1259
1259
  ot,
1260
1260
  si
1261
1261
  ],
1262
1262
  KeyboardEvent: [
1263
- pe,
1263
+ he,
1264
1264
  Le,
1265
1265
  oi
1266
1266
  ]
@@ -1286,13 +1286,13 @@ function ti(e) {
1286
1286
  const l = (d = e.ProgressEvent) !== null && d !== void 0 ? d : class extends n {
1287
1287
  };
1288
1288
  var f;
1289
- const h = (f = e.TransitionEvent) !== null && f !== void 0 ? f : class extends n {
1289
+ const p = (f = e.TransitionEvent) !== null && f !== void 0 ? f : class extends n {
1290
1290
  };
1291
1291
  var b;
1292
1292
  const v = (b = e.UIEvent) !== null && b !== void 0 ? b : class extends n {
1293
1293
  };
1294
- var x;
1295
- const ce = (x = e.CompositionEvent) !== null && x !== void 0 ? x : class extends v {
1294
+ var U;
1295
+ const ce = (U = e.CompositionEvent) !== null && U !== void 0 ? U : class extends v {
1296
1296
  };
1297
1297
  var R;
1298
1298
  const de = (R = e.FocusEvent) !== null && R !== void 0 ? R : class extends v {
@@ -1309,8 +1309,8 @@ function ti(e) {
1309
1309
  var G;
1310
1310
  const nn = (G = e.DragEvent) !== null && G !== void 0 ? G : class extends H {
1311
1311
  };
1312
- var Ue;
1313
- const rn = (Ue = e.PointerEvent) !== null && Ue !== void 0 ? Ue : class extends H {
1312
+ var xe;
1313
+ const rn = (xe = e.PointerEvent) !== null && xe !== void 0 ? xe : class extends H {
1314
1314
  };
1315
1315
  var Ne;
1316
1316
  const on = (Ne = e.TouchEvent) !== null && Ne !== void 0 ? Ne : class extends v {
@@ -1321,7 +1321,7 @@ function ti(e) {
1321
1321
  ClipboardEvent: s,
1322
1322
  PopStateEvent: c,
1323
1323
  ProgressEvent: l,
1324
- TransitionEvent: h,
1324
+ TransitionEvent: p,
1325
1325
  UIEvent: v,
1326
1326
  CompositionEvent: ce,
1327
1327
  FocusEvent: de,
@@ -1359,13 +1359,13 @@ function ri(e, { data: t, inputType: n, isComposing: i }) {
1359
1359
  inputType: String(n)
1360
1360
  });
1361
1361
  }
1362
- function pe(e, { view: t, detail: n }) {
1362
+ function he(e, { view: t, detail: n }) {
1363
1363
  F(e, {
1364
1364
  view: t,
1365
1365
  detail: g(n ?? 0)
1366
1366
  });
1367
1367
  }
1368
- function Le(e, { altKey: t, ctrlKey: n, metaKey: i, shiftKey: r, modifierAltGraph: o, modifierCapsLock: s, modifierFn: u, modifierFnLock: c, modifierNumLock: d, modifierScrollLock: l, modifierSymbol: f, modifierSymbolLock: h }) {
1368
+ function Le(e, { altKey: t, ctrlKey: n, metaKey: i, shiftKey: r, modifierAltGraph: o, modifierCapsLock: s, modifierFn: u, modifierFnLock: c, modifierNumLock: d, modifierScrollLock: l, modifierSymbol: f, modifierSymbolLock: p }) {
1369
1369
  F(e, {
1370
1370
  altKey: !!t,
1371
1371
  ctrlKey: !!n,
@@ -1384,7 +1384,7 @@ function Le(e, { altKey: t, ctrlKey: n, metaKey: i, shiftKey: r, modifierAltGrap
1384
1384
  ScrollLock: l,
1385
1385
  Shift: r,
1386
1386
  Symbol: f,
1387
- SymbolLock: h
1387
+ SymbolLock: p
1388
1388
  }[b];
1389
1389
  }
1390
1390
  });
@@ -1399,7 +1399,7 @@ function oi(e, { key: t, code: n, location: i, repeat: r, isComposing: o, charCo
1399
1399
  charCode: s
1400
1400
  });
1401
1401
  }
1402
- function ot(e, { x: t, y: n, screenX: i, screenY: r, clientX: o = t, clientY: s = n, button: u, buttons: c, relatedTarget: d, offsetX: l, offsetY: f, pageX: h, pageY: b }) {
1402
+ function ot(e, { x: t, y: n, screenX: i, screenY: r, clientX: o = t, clientY: s = n, button: u, buttons: c, relatedTarget: d, offsetX: l, offsetY: f, pageX: p, pageY: b }) {
1403
1403
  F(e, {
1404
1404
  screenX: g(i),
1405
1405
  screenY: g(r),
@@ -1412,7 +1412,7 @@ function ot(e, { x: t, y: n, screenX: i, screenY: r, clientX: o = t, clientY: s
1412
1412
  relatedTarget: d,
1413
1413
  offsetX: g(l),
1414
1414
  offsetY: g(f),
1415
- pageX: g(h),
1415
+ pageX: g(p),
1416
1416
  pageY: g(b)
1417
1417
  });
1418
1418
  }
@@ -1554,22 +1554,22 @@ function li(e) {
1554
1554
  Number(n),
1555
1555
  ...i
1556
1556
  ],
1557
- then: () => r ? void 0 : Se(e)
1557
+ then: () => r ? void 0 : _e(e)
1558
1558
  };
1559
1559
  }), Z(e, "selectionStart", function(n) {
1560
1560
  return {
1561
1561
  realArgs: n,
1562
- then: () => Se(e)
1562
+ then: () => _e(e)
1563
1563
  };
1564
1564
  }), Z(e, "selectionEnd", function(n) {
1565
1565
  return {
1566
1566
  realArgs: n,
1567
- then: () => Se(e)
1567
+ then: () => _e(e)
1568
1568
  };
1569
1569
  }), Z(e, "select", function() {
1570
1570
  return {
1571
1571
  realArgs: [],
1572
- then: () => _n(e, {
1572
+ then: () => Sn(e, {
1573
1573
  anchorOffset: 0,
1574
1574
  focusOffset: O(e).length
1575
1575
  })
@@ -1581,7 +1581,7 @@ function ai(e) {
1581
1581
  return {
1582
1582
  realArgs: n,
1583
1583
  then: () => {
1584
- We(e), Se(e);
1584
+ We(e), _e(e);
1585
1585
  }
1586
1586
  };
1587
1587
  });
@@ -1609,12 +1609,12 @@ function ct(e) {
1609
1609
  ]) && (ci(e), li(e), ai(e)), e[ee] = ee);
1610
1610
  }
1611
1611
  function fi(e) {
1612
- return pi(e) ? e : e.ownerDocument;
1612
+ return hi(e) ? e : e.ownerDocument;
1613
1613
  }
1614
- function pi(e) {
1614
+ function hi(e) {
1615
1615
  return e.nodeType === 9;
1616
1616
  }
1617
- var k = /* @__PURE__ */ function(e) {
1617
+ var w = /* @__PURE__ */ function(e) {
1618
1618
  return e[e.Trigger = 2] = "Trigger", e[e.Call = 1] = "Call", e;
1619
1619
  }({});
1620
1620
  function be(e, t) {
@@ -1642,10 +1642,10 @@ function X(e, t, n) {
1642
1642
  writable: !0
1643
1643
  }) : e[t] = n, e;
1644
1644
  }
1645
- var S = /* @__PURE__ */ function(e) {
1645
+ var _ = /* @__PURE__ */ function(e) {
1646
1646
  return e[e.STANDARD = 0] = "STANDARD", e[e.LEFT = 1] = "LEFT", e[e.RIGHT = 2] = "RIGHT", e[e.NUMPAD = 3] = "NUMPAD", e;
1647
1647
  }({});
1648
- const hi = [
1648
+ const pi = [
1649
1649
  "Alt",
1650
1650
  "AltGraph",
1651
1651
  "Control",
@@ -1655,7 +1655,7 @@ const hi = [
1655
1655
  "Symbol"
1656
1656
  ];
1657
1657
  function dt(e) {
1658
- return hi.includes(e);
1658
+ return pi.includes(e);
1659
1659
  }
1660
1660
  const bi = [
1661
1661
  "CapsLock",
@@ -1793,52 +1793,52 @@ const vi = [
1793
1793
  {
1794
1794
  code: "AltLeft",
1795
1795
  key: "Alt",
1796
- location: S.LEFT
1796
+ location: _.LEFT
1797
1797
  },
1798
1798
  {
1799
1799
  code: "AltRight",
1800
1800
  key: "Alt",
1801
- location: S.RIGHT
1801
+ location: _.RIGHT
1802
1802
  },
1803
1803
  {
1804
1804
  code: "ShiftLeft",
1805
1805
  key: "Shift",
1806
- location: S.LEFT
1806
+ location: _.LEFT
1807
1807
  },
1808
1808
  {
1809
1809
  code: "ShiftRight",
1810
1810
  key: "Shift",
1811
- location: S.RIGHT
1811
+ location: _.RIGHT
1812
1812
  },
1813
1813
  {
1814
1814
  code: "ControlLeft",
1815
1815
  key: "Control",
1816
- location: S.LEFT
1816
+ location: _.LEFT
1817
1817
  },
1818
1818
  {
1819
1819
  code: "ControlRight",
1820
1820
  key: "Control",
1821
- location: S.RIGHT
1821
+ location: _.RIGHT
1822
1822
  },
1823
1823
  {
1824
1824
  code: "MetaLeft",
1825
1825
  key: "Meta",
1826
- location: S.LEFT
1826
+ location: _.LEFT
1827
1827
  },
1828
1828
  {
1829
1829
  code: "MetaRight",
1830
1830
  key: "Meta",
1831
- location: S.RIGHT
1831
+ location: _.RIGHT
1832
1832
  },
1833
1833
  {
1834
1834
  code: "OSLeft",
1835
1835
  key: "OS",
1836
- location: S.LEFT
1836
+ location: _.LEFT
1837
1837
  },
1838
1838
  {
1839
1839
  code: "OSRight",
1840
1840
  key: "OS",
1841
- location: S.RIGHT
1841
+ location: _.RIGHT
1842
1842
  },
1843
1843
  {
1844
1844
  code: "ContextMenu",
@@ -1916,7 +1916,7 @@ const vi = [
1916
1916
  code: "AltRight",
1917
1917
  key: "AltGraph"
1918
1918
  }
1919
- ], yi = [
1919
+ ], mi = [
1920
1920
  {
1921
1921
  name: "MouseLeft",
1922
1922
  pointerType: "mouse",
@@ -1945,7 +1945,7 @@ const vi = [
1945
1945
  pointerType: "touch"
1946
1946
  }
1947
1947
  ];
1948
- function mi(e, t, n) {
1948
+ function yi(e, t, n) {
1949
1949
  return t in e ? Object.defineProperty(e, t, {
1950
1950
  value: n,
1951
1951
  enumerable: !0,
@@ -1976,7 +1976,7 @@ class Ht {
1976
1976
  return delete this.pressed[n], n;
1977
1977
  }
1978
1978
  constructor() {
1979
- mi(this, "pressed", {});
1979
+ yi(this, "pressed", {});
1980
1980
  }
1981
1981
  }
1982
1982
  const at = {
@@ -2075,7 +2075,7 @@ function Gt(e, t, n = !0) {
2075
2075
  };
2076
2076
  }
2077
2077
  function ki({ document: e, target: t, clickCount: n, node: i, offset: r }) {
2078
- if (mn(t))
2078
+ if (yn(t))
2079
2079
  return;
2080
2080
  const o = P(t), s = String(o ? O(t) : t.textContent), [u, c] = i ? (
2081
2081
  // which elements might be considered in the same line of text.
@@ -2099,13 +2099,13 @@ function ki({ document: e, target: t, clickCount: n, node: i, offset: r }) {
2099
2099
  target: t,
2100
2100
  node: i,
2101
2101
  offset: u
2102
- }), { node: f, offset: h } = Ke({
2102
+ }), { node: f, offset: p } = Ke({
2103
2103
  target: t,
2104
2104
  node: i,
2105
2105
  offset: c
2106
2106
  }), b = t.ownerDocument.createRange();
2107
2107
  try {
2108
- b.setStart(d, l), b.setEnd(f, h);
2108
+ b.setStart(d, l), b.setEnd(f, p);
2109
2109
  } catch {
2110
2110
  throw new Error("The given offset is out of bounds.");
2111
2111
  }
@@ -2150,8 +2150,8 @@ function Ci(e, { document: t, target: n, node: i, offset: r }) {
2150
2150
  }
2151
2151
  }
2152
2152
  function Xt(e, t) {
2153
- var n, i, r, o, s, u, c, d, l, f, h, b, v, x, ce, R, de, V, le, K, ae, j, H, G;
2154
- return e.target !== t.target || ((n = e.coords) === null || n === void 0 ? void 0 : n.x) !== ((i = t.coords) === null || i === void 0 ? void 0 : i.x) || ((r = e.coords) === null || r === void 0 ? void 0 : r.y) !== ((o = t.coords) === null || o === void 0 ? void 0 : o.y) || ((s = e.coords) === null || s === void 0 ? void 0 : s.clientX) !== ((u = t.coords) === null || u === void 0 ? void 0 : u.clientX) || ((c = e.coords) === null || c === void 0 ? void 0 : c.clientY) !== ((d = t.coords) === null || d === void 0 ? void 0 : d.clientY) || ((l = e.coords) === null || l === void 0 ? void 0 : l.offsetX) !== ((f = t.coords) === null || f === void 0 ? void 0 : f.offsetX) || ((h = e.coords) === null || h === void 0 ? void 0 : h.offsetY) !== ((b = t.coords) === null || b === void 0 ? void 0 : b.offsetY) || ((v = e.coords) === null || v === void 0 ? void 0 : v.pageX) !== ((x = t.coords) === null || x === void 0 ? void 0 : x.pageX) || ((ce = e.coords) === null || ce === void 0 ? void 0 : ce.pageY) !== ((R = t.coords) === null || R === void 0 ? void 0 : R.pageY) || ((de = e.coords) === null || de === void 0 ? void 0 : de.screenX) !== ((V = t.coords) === null || V === void 0 ? void 0 : V.screenX) || ((le = e.coords) === null || le === void 0 ? void 0 : le.screenY) !== ((K = t.coords) === null || K === void 0 ? void 0 : K.screenY) || ((ae = e.caret) === null || ae === void 0 ? void 0 : ae.node) !== ((j = t.caret) === null || j === void 0 ? void 0 : j.node) || ((H = e.caret) === null || H === void 0 ? void 0 : H.offset) !== ((G = t.caret) === null || G === void 0 ? void 0 : G.offset);
2153
+ var n, i, r, o, s, u, c, d, l, f, p, b, v, U, ce, R, de, V, le, K, ae, j, H, G;
2154
+ return e.target !== t.target || ((n = e.coords) === null || n === void 0 ? void 0 : n.x) !== ((i = t.coords) === null || i === void 0 ? void 0 : i.x) || ((r = e.coords) === null || r === void 0 ? void 0 : r.y) !== ((o = t.coords) === null || o === void 0 ? void 0 : o.y) || ((s = e.coords) === null || s === void 0 ? void 0 : s.clientX) !== ((u = t.coords) === null || u === void 0 ? void 0 : u.clientX) || ((c = e.coords) === null || c === void 0 ? void 0 : c.clientY) !== ((d = t.coords) === null || d === void 0 ? void 0 : d.clientY) || ((l = e.coords) === null || l === void 0 ? void 0 : l.offsetX) !== ((f = t.coords) === null || f === void 0 ? void 0 : f.offsetX) || ((p = e.coords) === null || p === void 0 ? void 0 : p.offsetY) !== ((b = t.coords) === null || b === void 0 ? void 0 : b.offsetY) || ((v = e.coords) === null || v === void 0 ? void 0 : v.pageX) !== ((U = t.coords) === null || U === void 0 ? void 0 : U.pageX) || ((ce = e.coords) === null || ce === void 0 ? void 0 : ce.pageY) !== ((R = t.coords) === null || R === void 0 ? void 0 : R.pageY) || ((de = e.coords) === null || de === void 0 ? void 0 : de.screenX) !== ((V = t.coords) === null || V === void 0 ? void 0 : V.screenX) || ((le = e.coords) === null || le === void 0 ? void 0 : le.screenY) !== ((K = t.coords) === null || K === void 0 ? void 0 : K.screenY) || ((ae = e.caret) === null || ae === void 0 ? void 0 : ae.node) !== ((j = t.caret) === null || j === void 0 ? void 0 : j.node) || ((H = e.caret) === null || H === void 0 ? void 0 : H.offset) !== ((G = t.caret) === null || G === void 0 ? void 0 : G.offset);
2155
2155
  }
2156
2156
  function W(e, t, n) {
2157
2157
  return t in e ? Object.defineProperty(e, t, {
@@ -2273,11 +2273,11 @@ class Ii {
2273
2273
  }());
2274
2274
  }
2275
2275
  }
2276
- function xe(e, t) {
2276
+ function Ue(e, t) {
2277
2277
  var n;
2278
2278
  return ((n = Wt(e, t)) === null || n === void 0 ? void 0 : n.pointerEvents) !== "none";
2279
2279
  }
2280
- function _i(e) {
2280
+ function Si(e) {
2281
2281
  const t = T(e);
2282
2282
  for (let n = e, i = []; n != null && n.ownerDocument; n = n.parentElement) {
2283
2283
  i.push(n);
@@ -2292,15 +2292,15 @@ function _i(e) {
2292
2292
  };
2293
2293
  }
2294
2294
  }
2295
- const pt = Symbol("Last check for pointer-events");
2295
+ const ht = Symbol("Last check for pointer-events");
2296
2296
  function Wt(e, t) {
2297
- const n = t[pt];
2298
- if (!(e.config.pointerEventsCheck !== Oe.Never && (!n || ht(e.config.pointerEventsCheck, Oe.EachApiCall) && n[k.Call] !== Ie(e, k.Call) || ht(e.config.pointerEventsCheck, Oe.EachTrigger) && n[k.Trigger] !== Ie(e, k.Trigger))))
2297
+ const n = t[ht];
2298
+ if (!(e.config.pointerEventsCheck !== Oe.Never && (!n || pt(e.config.pointerEventsCheck, Oe.EachApiCall) && n[w.Call] !== Ie(e, w.Call) || pt(e.config.pointerEventsCheck, Oe.EachTrigger) && n[w.Trigger] !== Ie(e, w.Trigger))))
2299
2299
  return n == null ? void 0 : n.result;
2300
- const r = _i(t);
2301
- return t[pt] = {
2302
- [k.Call]: Ie(e, k.Call),
2303
- [k.Trigger]: Ie(e, k.Trigger),
2300
+ const r = Si(t);
2301
+ return t[ht] = {
2302
+ [w.Call]: Ie(e, w.Call),
2303
+ [w.Trigger]: Ie(e, w.Trigger),
2304
2304
  result: r
2305
2305
  }, r;
2306
2306
  }
@@ -2310,11 +2310,11 @@ function ge(e, t) {
2310
2310
  throw new Error([
2311
2311
  `Unable to perform pointer interaction as the element ${n.tree.length > 1 ? "inherits" : "has"} \`pointer-events: none\`:`,
2312
2312
  "",
2313
- Si(n.tree)
2313
+ _i(n.tree)
2314
2314
  ].join(`
2315
2315
  `));
2316
2316
  }
2317
- function Si(e) {
2317
+ function _i(e) {
2318
2318
  return e.reverse().map((t, n) => [
2319
2319
  "".padEnd(n),
2320
2320
  t.tagName,
@@ -2353,7 +2353,7 @@ function Pi(e) {
2353
2353
  }
2354
2354
  return n = n == null ? void 0 : n.replace(/\n/g, " "), Number(n == null ? void 0 : n.length) > 30 && (n = `${n == null ? void 0 : n.substring(0, 29)}…`), n ? `(label=${n})` : "";
2355
2355
  }
2356
- function ht(e, t) {
2356
+ function pt(e, t) {
2357
2357
  return (e & t) > 0;
2358
2358
  }
2359
2359
  function A(e, t, n) {
@@ -2376,7 +2376,7 @@ class Oi {
2376
2376
  const o = this.getTarget(t), s = this.getEventInit(-1), [u, c] = ve(r, o);
2377
2377
  return {
2378
2378
  leave: () => {
2379
- xe(t, r) && r !== o && (t.dispatchUIEvent(r, "pointerout", s), u.forEach((d) => t.dispatchUIEvent(d, "pointerleave", s)));
2379
+ Ue(t, r) && r !== o && (t.dispatchUIEvent(r, "pointerout", s), u.forEach((d) => t.dispatchUIEvent(d, "pointerleave", s)));
2380
2380
  },
2381
2381
  enter: () => {
2382
2382
  ge(t, o), r !== o && (t.dispatchUIEvent(o, "pointerover", s), c.forEach((d) => t.dispatchUIEvent(d, "pointerenter", s)));
@@ -2400,7 +2400,7 @@ class Oi {
2400
2400
  }
2401
2401
  release(t) {
2402
2402
  const n = this.getTarget(t), [i] = ve(n, null), r = this.getEventInit();
2403
- xe(t, n) && (t.dispatchUIEvent(n, "pointerout", r), i.forEach((o) => t.dispatchUIEvent(o, "pointerleave", r))), this.isCancelled = !0;
2403
+ Ue(t, n) && (t.dispatchUIEvent(n, "pointerout", r), i.forEach((o) => t.dispatchUIEvent(o, "pointerleave", r))), this.isCancelled = !0;
2404
2404
  }
2405
2405
  getTarget(t) {
2406
2406
  var n;
@@ -2550,7 +2550,7 @@ async function Di(e) {
2550
2550
  "[MouseLeft][MouseLeft]"
2551
2551
  ]);
2552
2552
  }
2553
- async function xi(e) {
2553
+ async function Ui(e) {
2554
2554
  return this.pointer([
2555
2555
  {
2556
2556
  target: e
@@ -2558,7 +2558,7 @@ async function xi(e) {
2558
2558
  "[MouseLeft][MouseLeft][MouseLeft]"
2559
2559
  ]);
2560
2560
  }
2561
- async function Ui(e) {
2561
+ async function xi(e) {
2562
2562
  return this.pointer({
2563
2563
  target: e
2564
2564
  });
@@ -2607,12 +2607,12 @@ function $i(e, t, n, i) {
2607
2607
  t += l.length;
2608
2608
  const f = e[t] === "/" || !l && e[t] === ">" ? e[t] : "";
2609
2609
  t += f.length;
2610
- const h = ze[n], b = e[t] === h ? h : "";
2610
+ const p = ze[n], b = e[t] === p ? p : "";
2611
2611
  if (!b)
2612
2612
  throw new Error(Jt([
2613
2613
  !l && "repeat modifier",
2614
2614
  !f && "release modifier",
2615
- `"${h}"`
2615
+ `"${p}"`
2616
2616
  ].filter(Boolean).join(" or "), e[t], e, i));
2617
2617
  return t += b.length, {
2618
2618
  consumedLength: t,
@@ -2644,8 +2644,8 @@ function Ri(e, t) {
2644
2644
  var i;
2645
2645
  const l = (i = e.find((f) => {
2646
2646
  if (r === "[") {
2647
- var h;
2648
- return ((h = f.code) === null || h === void 0 ? void 0 : h.toLowerCase()) === o.toLowerCase();
2647
+ var p;
2648
+ return ((p = f.code) === null || p === void 0 ? void 0 : p.toLowerCase()) === o.toLowerCase();
2649
2649
  } else if (r === "{") {
2650
2650
  var b;
2651
2651
  return ((b = f.key) === null || b === void 0 ? void 0 : b.toLowerCase()) === o.toLowerCase();
@@ -2693,7 +2693,7 @@ function Qt(e) {
2693
2693
  return n;
2694
2694
  }
2695
2695
  function Hi(e) {
2696
- const t = me(e);
2696
+ const t = ye(e);
2697
2697
  return O(e).substring(t.startOffset, t.endOffset);
2698
2698
  }
2699
2699
  async function Gi() {
@@ -2777,7 +2777,7 @@ async function Yi(e, t) {
2777
2777
  offset: (d = t.offset) !== null && d !== void 0 ? d : vt(t) || o == null || (i = o.caret) === null || i === void 0 ? void 0 : i.offset
2778
2778
  }
2779
2779
  };
2780
- "keyDef" in t ? (e.system.pointer.isKeyPressed(t.keyDef) && (be(e, k.Trigger), await e.system.pointer.release(e, t.keyDef, l)), t.releasePrevious || (be(e, k.Trigger), await e.system.pointer.press(e, t.keyDef, l), t.releaseSelf && (be(e, k.Trigger), await e.system.pointer.release(e, t.keyDef, l)))) : (be(e, k.Trigger), await e.system.pointer.move(e, r, l));
2780
+ "keyDef" in t ? (e.system.pointer.isKeyPressed(t.keyDef) && (be(e, w.Trigger), await e.system.pointer.release(e, t.keyDef, l)), t.releasePrevious || (be(e, w.Trigger), await e.system.pointer.press(e, t.keyDef, l), t.releaseSelf && (be(e, w.Trigger), await e.system.pointer.release(e, t.keyDef, l)))) : (be(e, w.Trigger), await e.system.pointer.move(e, r, l));
2781
2781
  }
2782
2782
  function vt(e) {
2783
2783
  var t, n;
@@ -2830,11 +2830,11 @@ async function Zt(e, t, n) {
2830
2830
  if (a(t, "select"))
2831
2831
  if (t.multiple)
2832
2832
  for (const u of o) {
2833
- const c = this.config.pointerEventsCheck === 0 ? !0 : xe(this, u);
2833
+ const c = this.config.pointerEventsCheck === 0 ? !0 : Ue(this, u);
2834
2834
  c && (this.dispatchUIEvent(u, "pointerover"), this.dispatchUIEvent(t, "pointerenter"), this.dispatchUIEvent(u, "mouseover"), this.dispatchUIEvent(t, "mouseenter"), this.dispatchUIEvent(u, "pointermove"), this.dispatchUIEvent(u, "mousemove"), this.dispatchUIEvent(u, "pointerdown"), this.dispatchUIEvent(u, "mousedown")), L(t), c && (this.dispatchUIEvent(u, "pointerup"), this.dispatchUIEvent(u, "mouseup")), s(u), c && this.dispatchUIEvent(u, "click"), await se(this.config);
2835
2835
  }
2836
2836
  else if (o.length === 1) {
2837
- const u = this.config.pointerEventsCheck === 0 ? !0 : xe(this, t);
2837
+ const u = this.config.pointerEventsCheck === 0 ? !0 : Ue(this, t);
2838
2838
  u ? await this.click(t) : L(t), s(o[0]), u && (this.dispatchUIEvent(t, "pointerover"), this.dispatchUIEvent(t, "pointerenter"), this.dispatchUIEvent(t, "mouseover"), this.dispatchUIEvent(t, "mouseenter"), this.dispatchUIEvent(t, "pointerup"), this.dispatchUIEvent(t, "mouseup"), this.dispatchUIEvent(t, "click")), await se(this.config);
2839
2839
  } else
2840
2840
  throw Q().getElementError("Cannot select multiple options on a non-multiple select", t);
@@ -2845,20 +2845,20 @@ async function Zt(e, t, n) {
2845
2845
  throw Q().getElementError("Cannot select options on elements that are neither select nor listbox elements", t);
2846
2846
  }
2847
2847
  async function tr(e, t, { skipClick: n = this.config.skipClick, skipAutoClose: i = this.config.skipAutoClose, initialSelectionStart: r, initialSelectionEnd: o } = {}) {
2848
- e.disabled || (n || await this.click(e), r !== void 0 && he(e, r, o ?? r), await this.keyboard(t), i || await ji(this));
2848
+ e.disabled || (n || await this.click(e), r !== void 0 && pe(e, r, o ?? r), await this.keyboard(t), i || await ji(this));
2849
2849
  }
2850
- const yt = Symbol("files and value properties are mocked");
2850
+ const mt = Symbol("files and value properties are mocked");
2851
2851
  function Fe(e, t, n) {
2852
2852
  n ? Object.defineProperty(e, t, n) : delete e[t];
2853
2853
  }
2854
2854
  function nr(e, t) {
2855
2855
  var n;
2856
- (n = e[yt]) === null || n === void 0 || n.restore();
2856
+ (n = e[mt]) === null || n === void 0 || n.restore();
2857
2857
  const i = Object.getOwnPropertyDescriptor(e, "type"), r = Object.getOwnPropertyDescriptor(e, "value"), o = Object.getOwnPropertyDescriptor(e, "files");
2858
2858
  function s() {
2859
2859
  Fe(e, "type", i), Fe(e, "value", r), Fe(e, "files", o);
2860
2860
  }
2861
- e[yt] = {
2861
+ e[mt] = {
2862
2862
  restore: s
2863
2863
  }, Object.defineProperties(e, {
2864
2864
  files: {
@@ -2904,7 +2904,7 @@ async function ir(e, t) {
2904
2904
  };
2905
2905
  n.addEventListener("fileDialog", r), await this.click(e), n.removeEventListener("fileDialog", r);
2906
2906
  }
2907
- function _e(e) {
2907
+ function Se(e) {
2908
2908
  return e.toLowerCase().replace(/(\.|\/)jpg\b/g, "$1jpeg");
2909
2909
  }
2910
2910
  function rr(e, t) {
@@ -2915,13 +2915,13 @@ function rr(e, t) {
2915
2915
  "image/*",
2916
2916
  "video/*"
2917
2917
  ];
2918
- return _e(t).trim().split(/\s*,\s*/).some((i) => i.startsWith(".") ? _e(e.name).endsWith(i) : n.includes(i) ? _e(e.type).startsWith(i.replace("*", "")) : _e(e.type) === i);
2918
+ return Se(t).trim().split(/\s*,\s*/).some((i) => i.startsWith(".") ? Se(e.name).endsWith(i) : n.includes(i) ? Se(e.type).startsWith(i.replace("*", "")) : Se(e.type) === i);
2919
2919
  }
2920
- const mt = {
2920
+ const yt = {
2921
2921
  click: Mi,
2922
2922
  dblClick: Di,
2923
- tripleClick: xi,
2924
- hover: Ui,
2923
+ tripleClick: Ui,
2924
+ hover: xi,
2925
2925
  unhover: Ni,
2926
2926
  tab: Bi,
2927
2927
  keyboard: Vi,
@@ -2944,7 +2944,7 @@ const en = {
2944
2944
  delay: 0,
2945
2945
  document: globalThis.document,
2946
2946
  keyboardMap: vi,
2947
- pointerMap: yi,
2947
+ pointerMap: mi,
2948
2948
  pointerEventsCheck: Oe.EachApiCall,
2949
2949
  skipAutoClose: !1,
2950
2950
  skipClick: !1,
@@ -2973,7 +2973,7 @@ function ur(e = {}) {
2973
2973
  );
2974
2974
  return fn(i), Ye(t).api;
2975
2975
  }
2976
- function m({ keyboardState: e, pointerState: t, ...n } = {}, i) {
2976
+ function y({ keyboardState: e, pointerState: t, ...n } = {}, i) {
2977
2977
  const r = tn(n, en, i);
2978
2978
  jt(r.document), Kt(T(r.document).HTMLElement);
2979
2979
  var o;
@@ -2991,7 +2991,7 @@ function cr(e) {
2991
2991
  }
2992
2992
  function dr(e, t) {
2993
2993
  function n(...i) {
2994
- return be(e, k.Call), or(() => t.apply(e, i).then(async (r) => (await se(e.config), r)));
2994
+ return be(e, w.Call), or(() => t.apply(e, i).then(async (r) => (await se(e.config), r)));
2995
2995
  }
2996
2996
  return Object.defineProperty(n, "name", {
2997
2997
  get: () => t.name
@@ -3005,11 +3005,11 @@ function Ye(e, t = new qt()) {
3005
3005
  dispatchUIEvent: ui.bind(n),
3006
3006
  system: t,
3007
3007
  levelRefs: {},
3008
- ...mt
3008
+ ...yt
3009
3009
  }), {
3010
3010
  instance: n,
3011
3011
  api: {
3012
- ...Object.fromEntries(Object.entries(mt).map(([i, r]) => [
3012
+ ...Object.fromEntries(Object.entries(yt).map(([i, r]) => [
3013
3013
  i,
3014
3014
  dr(n, r)
3015
3015
  ])),
@@ -3022,214 +3022,209 @@ function lr(e, t, n) {
3022
3022
  return (r = (i = e.document) !== null && i !== void 0 ? i : t && fi(t)) !== null && r !== void 0 ? r : n.document;
3023
3023
  }
3024
3024
  function ar(e) {
3025
- return m().api.clear(e);
3025
+ return y().api.clear(e);
3026
3026
  }
3027
3027
  function fr(e, t = {}) {
3028
- return m(t, e).api.click(e);
3029
- }
3030
- function pr(e = {}) {
3031
- return m(e).api.copy();
3028
+ return y(t, e).api.click(e);
3032
3029
  }
3033
3030
  function hr(e = {}) {
3034
- return m(e).api.cut();
3031
+ return y(e).api.copy();
3032
+ }
3033
+ function pr(e = {}) {
3034
+ return y(e).api.cut();
3035
3035
  }
3036
3036
  function br(e, t = {}) {
3037
- return m(t).api.dblClick(e);
3037
+ return y(t).api.dblClick(e);
3038
3038
  }
3039
3039
  function gr(e, t, n = {}) {
3040
- return m(n).api.deselectOptions(e, t);
3040
+ return y(n).api.deselectOptions(e, t);
3041
3041
  }
3042
3042
  function vr(e, t = {}) {
3043
- return m(t).api.hover(e);
3043
+ return y(t).api.hover(e);
3044
3044
  }
3045
- async function yr(e, t = {}) {
3046
- const { api: n, system: i } = m(t);
3045
+ async function mr(e, t = {}) {
3046
+ const { api: n, system: i } = y(t);
3047
3047
  return n.keyboard(e).then(() => i);
3048
3048
  }
3049
- async function mr(e, t = {}) {
3050
- const { api: n, system: i } = m(t);
3049
+ async function yr(e, t = {}) {
3050
+ const { api: n, system: i } = y(t);
3051
3051
  return n.pointer(e).then(() => i);
3052
3052
  }
3053
3053
  function Er(e, t) {
3054
- return m(t).api.paste(e);
3054
+ return y(t).api.paste(e);
3055
3055
  }
3056
3056
  function wr(e, t, n = {}) {
3057
- return m(n).api.selectOptions(e, t);
3057
+ return y(n).api.selectOptions(e, t);
3058
3058
  }
3059
3059
  function kr(e, t = {}) {
3060
- return m(t).api.tripleClick(e);
3060
+ return y(t).api.tripleClick(e);
3061
3061
  }
3062
3062
  function Tr(e, t, n = {}) {
3063
- return m(n, e).api.type(e, t, n);
3063
+ return y(n, e).api.type(e, t, n);
3064
3064
  }
3065
3065
  function Cr(e, t = {}) {
3066
- const { api: n, system: i } = m(t);
3066
+ const { api: n, system: i } = y(t);
3067
3067
  return i.pointer.setMousePosition({
3068
3068
  target: e
3069
3069
  }), n.unhover(e);
3070
3070
  }
3071
3071
  function Ir(e, t, n = {}) {
3072
- return m(n).api.upload(e, t);
3072
+ return y(n).api.upload(e, t);
3073
3073
  }
3074
- function _r(e = {}) {
3075
- return m().api.tab(e);
3074
+ function Sr(e = {}) {
3075
+ return y().api.tab(e);
3076
3076
  }
3077
- const Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3077
+ const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3078
3078
  __proto__: null,
3079
3079
  clear: ar,
3080
3080
  click: fr,
3081
- copy: pr,
3082
- cut: hr,
3081
+ copy: hr,
3082
+ cut: pr,
3083
3083
  dblClick: br,
3084
3084
  deselectOptions: gr,
3085
3085
  hover: vr,
3086
- keyboard: yr,
3086
+ keyboard: mr,
3087
3087
  paste: Er,
3088
- pointer: mr,
3088
+ pointer: yr,
3089
3089
  selectOptions: wr,
3090
- tab: _r,
3090
+ tab: Sr,
3091
3091
  tripleClick: kr,
3092
3092
  type: Tr,
3093
3093
  unhover: Cr,
3094
3094
  upload: Ir
3095
3095
  }, Symbol.toStringTag, { value: "Module" })), q = {
3096
- ...Sr,
3096
+ ..._r,
3097
3097
  setup: ur
3098
3098
  };
3099
- U("Modal", () => {
3099
+ x("Modal", () => {
3100
3100
  sn(() => {
3101
- document.body.innerHTML = "";
3102
- const e = document.createElement("div");
3103
- e.id = "__next", document.body.appendChild(e);
3104
- }), U("Scroll lock", () => {
3105
- C("sets inert on app root when modal opens", async () => {
3101
+ document.body.innerHTML = "", document.documentElement.style.overflow = "";
3102
+ }), x("Scroll lock", () => {
3103
+ C("sets overflow:hidden on html element when modal opens", async () => {
3106
3104
  const e = q.setup();
3107
3105
  I(
3108
- /* @__PURE__ */ p(_, { content: /* @__PURE__ */ p("div", { children: "Content" }), trigger: /* @__PURE__ */ p("button", { children: "Open" }) })
3109
- ), await e.click(y.getByRole("button", { name: "Open" }));
3110
- const t = document.getElementById("__next");
3111
- w(t).toHaveAttribute("inert"), w(t == null ? void 0 : t.style.overflow).toBe("hidden");
3112
- }), C("removes inert from app root when modal closes", async () => {
3106
+ /* @__PURE__ */ h(S, { content: /* @__PURE__ */ h("div", { children: "Content" }), trigger: /* @__PURE__ */ h("button", { children: "Open" }) })
3107
+ ), await e.click(m.getByRole("button", { name: "Open" })), k(document.documentElement.style.overflow).toBe("hidden");
3108
+ }), C("removes overflow:hidden from html element when modal closes", async () => {
3113
3109
  const e = q.setup();
3114
3110
  I(
3115
- /* @__PURE__ */ p(_, { content: /* @__PURE__ */ p("div", { children: "Content" }), trigger: /* @__PURE__ */ p("button", { children: "Open" }) })
3116
- ), await e.click(y.getByRole("button", { name: "Open" })), await e.click(y.getByRole("button", { name: /close/i })), await fe(() => {
3117
- const t = document.getElementById("__next");
3118
- w(t).not.toHaveAttribute("inert"), w(t == null ? void 0 : t.style.overflow).toBe("");
3111
+ /* @__PURE__ */ h(S, { content: /* @__PURE__ */ h("div", { children: "Content" }), trigger: /* @__PURE__ */ h("button", { children: "Open" }) })
3112
+ ), await e.click(m.getByRole("button", { name: "Open" })), await e.click(m.getByRole("button", { name: /close/i })), await fe(() => {
3113
+ k(document.documentElement.style.overflow).toBe("");
3119
3114
  });
3120
3115
  });
3121
- }), U("Rendering", () => {
3116
+ }), x("Rendering", () => {
3122
3117
  C("renders the trigger button", () => {
3123
3118
  I(
3124
- /* @__PURE__ */ p(
3125
- _,
3119
+ /* @__PURE__ */ h(
3120
+ S,
3126
3121
  {
3127
- content: /* @__PURE__ */ p("div", { children: "Modal Content" }),
3128
- trigger: /* @__PURE__ */ p("button", { children: "Open Modal" })
3122
+ content: /* @__PURE__ */ h("div", { children: "Modal Content" }),
3123
+ trigger: /* @__PURE__ */ h("button", { children: "Open Modal" })
3129
3124
  }
3130
3125
  )
3131
- ), w(
3132
- y.getByRole("button", { name: "Open Modal" })
3126
+ ), k(
3127
+ m.getByRole("button", { name: "Open Modal" })
3133
3128
  ).toBeInTheDocument();
3134
3129
  }), C("does not render modal content initially", () => {
3135
3130
  I(
3136
- /* @__PURE__ */ p(
3137
- _,
3131
+ /* @__PURE__ */ h(
3132
+ S,
3138
3133
  {
3139
- content: /* @__PURE__ */ p("div", { children: "Modal Content" }),
3140
- trigger: /* @__PURE__ */ p("button", { children: "Open Modal" })
3134
+ content: /* @__PURE__ */ h("div", { children: "Modal Content" }),
3135
+ trigger: /* @__PURE__ */ h("button", { children: "Open Modal" })
3141
3136
  }
3142
3137
  )
3143
- ), w(y.queryByText("Modal Content")).not.toBeInTheDocument();
3138
+ ), k(m.queryByText("Modal Content")).not.toBeInTheDocument();
3144
3139
  }), C("renders modal content when trigger is clicked", async () => {
3145
3140
  const e = q.setup();
3146
3141
  I(
3147
- /* @__PURE__ */ p(
3148
- _,
3142
+ /* @__PURE__ */ h(
3143
+ S,
3149
3144
  {
3150
- content: /* @__PURE__ */ p("div", { children: "Modal Content" }),
3151
- trigger: /* @__PURE__ */ p("button", { children: "Open Modal" })
3145
+ content: /* @__PURE__ */ h("div", { children: "Modal Content" }),
3146
+ trigger: /* @__PURE__ */ h("button", { children: "Open Modal" })
3152
3147
  }
3153
3148
  )
3154
- ), await e.click(y.getByRole("button", { name: "Open Modal" })), w(y.getByText("Modal Content")).toBeInTheDocument();
3149
+ ), await e.click(m.getByRole("button", { name: "Open Modal" })), k(m.getByText("Modal Content")).toBeInTheDocument();
3155
3150
  });
3156
- }), U("Form render prop", () => {
3151
+ }), x("Form render prop", () => {
3157
3152
  C("renders form via renderForm when formData provided", () => {
3158
- const e = { _id: "form-1", heading: "Contact" }, t = Je.fn(() => /* @__PURE__ */ p("form", { "data-testid": "the-form" }));
3153
+ const e = { _id: "form-1", heading: "Contact" }, t = Je.fn(() => /* @__PURE__ */ h("form", { "data-testid": "the-form" }));
3159
3154
  I(
3160
- /* @__PURE__ */ p(
3161
- _,
3155
+ /* @__PURE__ */ h(
3156
+ S,
3162
3157
  {
3163
- trigger: /* @__PURE__ */ p("button", { children: "Open" }),
3158
+ trigger: /* @__PURE__ */ h("button", { children: "Open" }),
3164
3159
  isOpen: !0,
3165
3160
  formData: e,
3166
3161
  renderForm: t
3167
3162
  }
3168
3163
  )
3169
- ), w(t).toHaveBeenCalledWith(e), w(y.getByTestId("the-form")).toBeInTheDocument();
3164
+ ), k(t).toHaveBeenCalledWith(e), k(m.getByTestId("the-form")).toBeInTheDocument();
3170
3165
  });
3171
- }), U("Close Button", () => {
3166
+ }), x("Close Button", () => {
3172
3167
  C("closes modal when close button is clicked", async () => {
3173
3168
  const e = q.setup();
3174
3169
  I(
3175
- /* @__PURE__ */ p(
3176
- _,
3170
+ /* @__PURE__ */ h(
3171
+ S,
3177
3172
  {
3178
- content: /* @__PURE__ */ p("div", { children: "Modal Content" }),
3179
- trigger: /* @__PURE__ */ p("button", { children: "Open Modal" })
3173
+ content: /* @__PURE__ */ h("div", { children: "Modal Content" }),
3174
+ trigger: /* @__PURE__ */ h("button", { children: "Open Modal" })
3180
3175
  }
3181
3176
  )
3182
- ), await e.click(y.getByRole("button", { name: "Open Modal" })), w(y.getByText("Modal Content")).toBeInTheDocument(), await e.click(y.getByRole("button", { name: /close/i })), await fe(() => {
3183
- w(y.queryByText("Modal Content")).not.toBeInTheDocument();
3177
+ ), await e.click(m.getByRole("button", { name: "Open Modal" })), k(m.getByText("Modal Content")).toBeInTheDocument(), await e.click(m.getByRole("button", { name: /close/i })), await fe(() => {
3178
+ k(m.queryByText("Modal Content")).not.toBeInTheDocument();
3184
3179
  });
3185
3180
  });
3186
- }), U("Overlay Click", () => {
3181
+ }), x("Overlay Click", () => {
3187
3182
  C("closes modal when clicking overlay by default", async () => {
3188
3183
  const e = q.setup();
3189
3184
  I(
3190
- /* @__PURE__ */ p(
3191
- _,
3185
+ /* @__PURE__ */ h(
3186
+ S,
3192
3187
  {
3193
- content: /* @__PURE__ */ p("div", { children: "Modal Content" }),
3194
- trigger: /* @__PURE__ */ p("button", { children: "Open Modal" })
3188
+ content: /* @__PURE__ */ h("div", { children: "Modal Content" }),
3189
+ trigger: /* @__PURE__ */ h("button", { children: "Open Modal" })
3195
3190
  }
3196
3191
  )
3197
- ), await e.click(y.getByRole("button", { name: "Open Modal" }));
3192
+ ), await e.click(m.getByRole("button", { name: "Open Modal" }));
3198
3193
  const t = document.querySelector(".overlay");
3199
3194
  t && await e.click(t), await fe(() => {
3200
- w(y.queryByText("Modal Content")).not.toBeInTheDocument();
3195
+ k(m.queryByText("Modal Content")).not.toBeInTheDocument();
3201
3196
  });
3202
3197
  });
3203
- }), U("Escape Key", () => {
3198
+ }), x("Escape Key", () => {
3204
3199
  C("closes modal on Escape key by default", async () => {
3205
3200
  const e = q.setup();
3206
3201
  I(
3207
- /* @__PURE__ */ p(
3208
- _,
3202
+ /* @__PURE__ */ h(
3203
+ S,
3209
3204
  {
3210
- content: /* @__PURE__ */ p("div", { children: "Modal Content" }),
3211
- trigger: /* @__PURE__ */ p("button", { children: "Open Modal" })
3205
+ content: /* @__PURE__ */ h("div", { children: "Modal Content" }),
3206
+ trigger: /* @__PURE__ */ h("button", { children: "Open Modal" })
3212
3207
  }
3213
3208
  )
3214
- ), await e.click(y.getByRole("button", { name: "Open Modal" })), await e.keyboard("{Escape}"), await fe(() => {
3215
- w(y.queryByText("Modal Content")).not.toBeInTheDocument();
3209
+ ), await e.click(m.getByRole("button", { name: "Open Modal" })), await e.keyboard("{Escape}"), await fe(() => {
3210
+ k(m.queryByText("Modal Content")).not.toBeInTheDocument();
3216
3211
  });
3217
3212
  });
3218
- }), U("Controlled Mode", () => {
3213
+ }), x("Controlled Mode", () => {
3219
3214
  C("calls onClose when close button is clicked in controlled mode", async () => {
3220
3215
  const e = q.setup(), t = Je.fn();
3221
3216
  I(
3222
- /* @__PURE__ */ p(
3223
- _,
3217
+ /* @__PURE__ */ h(
3218
+ S,
3224
3219
  {
3225
- content: /* @__PURE__ */ p("div", { children: "Content" }),
3226
- trigger: /* @__PURE__ */ p("button", { children: "Open" }),
3220
+ content: /* @__PURE__ */ h("div", { children: "Content" }),
3221
+ trigger: /* @__PURE__ */ h("button", { children: "Open" }),
3227
3222
  isOpen: !0,
3228
3223
  onClose: t
3229
3224
  }
3230
3225
  )
3231
- ), await e.click(y.getByRole("button", { name: /close/i })), await fe(() => {
3232
- w(t).toHaveBeenCalled();
3226
+ ), await e.click(m.getByRole("button", { name: /close/i })), await fe(() => {
3227
+ k(t).toHaveBeenCalled();
3233
3228
  });
3234
3229
  });
3235
3230
  });