@pdfme/ui 5.5.8-dev.44 → 5.5.8-dev.46

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.es.js CHANGED
@@ -12659,17 +12659,19 @@ const expressionCache = /* @__PURE__ */ new Map(), parseDataCache = /* @__PURE__
12659
12659
  const [, c] = this.findWithLabelByType(s);
12660
12660
  return c;
12661
12661
  }
12662
- }), DEFAULT_LANG = "en", DESTROYED_ERR_MSG = "[@pdfme/ui] this instance is already destroyed", SELECTABLE_CLASSNAME = "selectable", RULER_HEIGHT = 30, PAGE_GAP = 10, LEFT_SIDEBAR_WIDTH = 45, RIGHT_SIDEBAR_WIDTH = 400, BACKGROUND_COLOR = "rgb(74, 74, 74)", DEFAULT_MAX_ZOOM = 2, DESIGNER_CLASSNAME = "pdfme-designer-", UI_CLASSNAME = "pdfme-ui-", isff = typeof navigator < "u" ? navigator.userAgent.toLowerCase().indexOf("firefox") > 0 : !1;
12662
+ }), DEFAULT_LANG = "en", DESTROYED_ERR_MSG = "[@pdfme/ui] this instance is already destroyed", SELECTABLE_CLASSNAME = "selectable", RULER_HEIGHT = 30, PAGE_GAP = 10, LEFT_SIDEBAR_WIDTH = 45, RIGHT_SIDEBAR_WIDTH = 400, BACKGROUND_COLOR = "rgb(74, 74, 74)", DEFAULT_MAX_ZOOM = 2, DESIGNER_CLASSNAME = "pdfme-designer-", UI_CLASSNAME = "pdfme-ui-";
12663
+ const isff = typeof navigator < "u" ? navigator.userAgent.toLowerCase().indexOf("firefox") > 0 : !1;
12663
12664
  function addEvent$1(a, s, c, u) {
12664
- a.addEventListener ? a.addEventListener(s, c, u) : a.attachEvent && a.attachEvent("on".concat(s), c);
12665
+ a.addEventListener ? a.addEventListener(s, c, u) : a.attachEvent && a.attachEvent(`on${s}`, c);
12665
12666
  }
12666
12667
  function removeEvent$1(a, s, c, u) {
12667
- a.removeEventListener ? a.removeEventListener(s, c, u) : a.detachEvent && a.detachEvent("on".concat(s), c);
12668
+ a && (a.removeEventListener ? a.removeEventListener(s, c, u) : a.detachEvent && a.detachEvent(`on${s}`, c));
12668
12669
  }
12669
12670
  function getMods(a, s) {
12670
- const c = s.slice(0, s.length - 1);
12671
- for (let u = 0; u < c.length; u++) c[u] = a[c[u].toLowerCase()];
12672
- return c;
12671
+ const c = s.slice(0, s.length - 1), u = [];
12672
+ for (let d = 0; d < c.length; d++)
12673
+ u.push(a[c[d].toLowerCase()]);
12674
+ return u;
12673
12675
  }
12674
12676
  function getKeys$1(a) {
12675
12677
  typeof a != "string" && (a = ""), a = a.replace(/\s/g, "");
@@ -12686,6 +12688,10 @@ function compareArray(a, s) {
12686
12688
  u.indexOf(c[p]) === -1 && (d = !1);
12687
12689
  return d;
12688
12690
  }
12691
+ function getLayoutIndependentKeyCode(a) {
12692
+ let s = a.keyCode || a.which || a.charCode;
12693
+ return a.code && /^Key[A-Z]$/.test(a.code) && (s = a.code.charCodeAt(3)), s;
12694
+ }
12689
12695
  const _keyMap = {
12690
12696
  backspace: 8,
12691
12697
  "⌫": 8,
@@ -12778,113 +12784,92 @@ const _keyMap = {
12778
12784
  91: !1
12779
12785
  }, _handlers = {};
12780
12786
  for (let a = 1; a < 20; a++)
12781
- _keyMap["f".concat(a)] = 111 + a;
12782
- let _downKeys = [], winListendFocus = null, _scope = "all";
12783
- const elementEventMap = /* @__PURE__ */ new Map(), code = (a) => _keyMap[a.toLowerCase()] || _modifier[a.toLowerCase()] || a.toUpperCase().charCodeAt(0), getKey$3 = (a) => Object.keys(_keyMap).find((s) => _keyMap[s] === a), getModifier = (a) => Object.keys(_modifier).find((s) => _modifier[s] === a);
12784
- function setScope(a) {
12787
+ _keyMap[`f${a}`] = 111 + a;
12788
+ let _downKeys = [], winListendFocus = null, winListendFullscreen = null, _scope = "all";
12789
+ const elementEventMap = /* @__PURE__ */ new Map(), code = (a) => _keyMap[a.toLowerCase()] || _modifier[a.toLowerCase()] || a.toUpperCase().charCodeAt(0), getKey$3 = (a) => Object.keys(_keyMap).find((s) => _keyMap[s] === a), getModifier = (a) => Object.keys(_modifier).find((s) => _modifier[s] === a), setScope = (a) => {
12785
12790
  _scope = a || "all";
12786
- }
12787
- function getScope() {
12788
- return _scope || "all";
12789
- }
12790
- function getPressedKeyCodes() {
12791
- return _downKeys.slice(0);
12792
- }
12793
- function getPressedKeyString() {
12794
- return _downKeys.map((a) => getKey$3(a) || getModifier(a) || String.fromCharCode(a));
12795
- }
12796
- function getAllKeyCodes() {
12791
+ }, getScope = () => _scope || "all", getPressedKeyCodes = () => _downKeys.slice(0), getPressedKeyString = () => _downKeys.map(
12792
+ (a) => getKey$3(a) || getModifier(a) || String.fromCharCode(a)
12793
+ ), getAllKeyCodes = () => {
12797
12794
  const a = [];
12798
12795
  return Object.keys(_handlers).forEach((s) => {
12799
- _handlers[s].forEach((c) => {
12800
- let {
12801
- key: u,
12802
- scope: d,
12803
- mods: p,
12804
- shortcut: v
12805
- } = c;
12796
+ _handlers[s].forEach(({ key: c, scope: u, mods: d, shortcut: p }) => {
12806
12797
  a.push({
12807
- scope: d,
12808
- shortcut: v,
12809
- mods: p,
12810
- keys: u.split("+").map((A) => code(A))
12798
+ scope: u,
12799
+ shortcut: p,
12800
+ mods: d,
12801
+ keys: c.split("+").map((v) => code(v))
12811
12802
  });
12812
12803
  });
12813
12804
  }), a;
12814
- }
12815
- function filter$1(a) {
12816
- const s = a.target || a.srcElement, {
12817
- tagName: c
12818
- } = s;
12805
+ }, filter$1 = (a) => {
12806
+ const s = a.target || a.srcElement, { tagName: c } = s;
12819
12807
  let u = !0;
12820
- const d = c === "INPUT" && !["checkbox", "radio", "range", "button", "file", "reset", "submit", "color"].includes(s.type);
12808
+ const d = c === "INPUT" && ![
12809
+ "checkbox",
12810
+ "radio",
12811
+ "range",
12812
+ "button",
12813
+ "file",
12814
+ "reset",
12815
+ "submit",
12816
+ "color"
12817
+ ].includes(s.type);
12821
12818
  return (s.isContentEditable || (d || c === "TEXTAREA" || c === "SELECT") && !s.readOnly) && (u = !1), u;
12822
- }
12823
- function isPressed(a) {
12824
- return typeof a == "string" && (a = code(a)), _downKeys.indexOf(a) !== -1;
12825
- }
12826
- function deleteScope(a, s) {
12819
+ }, isPressed = (a) => (typeof a == "string" && (a = code(a)), _downKeys.indexOf(a) !== -1), deleteScope = (a, s) => {
12827
12820
  let c, u;
12828
12821
  a || (a = getScope());
12829
12822
  for (const d in _handlers)
12830
12823
  if (Object.prototype.hasOwnProperty.call(_handlers, d))
12831
12824
  for (c = _handlers[d], u = 0; u < c.length; )
12832
- c[u].scope === a ? c.splice(u, 1).forEach((v) => {
12833
- let {
12834
- element: A
12835
- } = v;
12836
- return removeKeyEvent(A);
12837
- }) : u++;
12825
+ c[u].scope === a ? c.splice(u, 1).forEach(({ element: v }) => removeKeyEvent(v)) : u++;
12838
12826
  getScope() === a && setScope(s || "all");
12839
- }
12827
+ };
12840
12828
  function clearModifier(a) {
12841
- let s = a.keyCode || a.which || a.charCode;
12829
+ let s = getLayoutIndependentKeyCode(a);
12842
12830
  a.key && a.key.toLowerCase() === "capslock" && (s = code(a.key));
12843
12831
  const c = _downKeys.indexOf(s);
12844
12832
  if (c >= 0 && _downKeys.splice(c, 1), a.key && a.key.toLowerCase() === "meta" && _downKeys.splice(0, _downKeys.length), (s === 93 || s === 224) && (s = 91), s in _mods) {
12845
12833
  _mods[s] = !1;
12846
- for (const u in _modifier) _modifier[u] === s && (hotkeys$1[u] = !1);
12834
+ for (const u in _modifier)
12835
+ _modifier[u] === s && (hotkeys$1[u] = !1);
12847
12836
  }
12848
12837
  }
12849
- function unbind(a) {
12838
+ const unbind = (a, ...s) => {
12850
12839
  if (typeof a > "u")
12851
- Object.keys(_handlers).forEach((d) => {
12852
- Array.isArray(_handlers[d]) && _handlers[d].forEach((p) => eachUnbind(p)), delete _handlers[d];
12840
+ Object.keys(_handlers).forEach((c) => {
12841
+ Array.isArray(_handlers[c]) && _handlers[c].forEach((u) => eachUnbind(u)), delete _handlers[c];
12853
12842
  }), removeKeyEvent(null);
12854
12843
  else if (Array.isArray(a))
12855
- a.forEach((d) => {
12856
- d.key && eachUnbind(d);
12844
+ a.forEach((c) => {
12845
+ c.key && eachUnbind(c);
12857
12846
  });
12858
12847
  else if (typeof a == "object")
12859
12848
  a.key && eachUnbind(a);
12860
12849
  else if (typeof a == "string") {
12861
- for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
12862
- c[u - 1] = arguments[u];
12863
- let [d, p] = c;
12864
- typeof d == "function" && (p = d, d = ""), eachUnbind({
12850
+ let [c, u] = s;
12851
+ typeof c == "function" && (u = c, c = ""), eachUnbind({
12865
12852
  key: a,
12866
- scope: d,
12867
- method: p,
12853
+ scope: c,
12854
+ method: u,
12868
12855
  splitKey: "+"
12869
12856
  });
12870
12857
  }
12871
- }
12872
- const eachUnbind = (a) => {
12873
- let {
12874
- key: s,
12875
- scope: c,
12876
- method: u,
12877
- splitKey: d = "+"
12878
- } = a;
12879
- getKeys$1(s).forEach((v) => {
12880
- const A = v.split(d), x = A.length, g = A[x - 1], b = g === "*" ? "*" : code(g);
12881
- if (!_handlers[b]) return;
12882
- c || (c = getScope());
12883
- const y = x > 1 ? getMods(_modifier, A) : [], f = [];
12884
- _handlers[b] = _handlers[b].filter((m) => {
12885
- const w = (u ? m.method === u : !0) && m.scope === c && compareArray(m.mods, y);
12886
- return w && f.push(m.element), !w;
12887
- }), f.forEach((m) => removeKeyEvent(m));
12858
+ }, eachUnbind = ({
12859
+ key: a,
12860
+ scope: s,
12861
+ method: c,
12862
+ splitKey: u = "+"
12863
+ }) => {
12864
+ getKeys$1(a).forEach((p) => {
12865
+ const v = p.split(u), A = v.length, x = v[A - 1], g = x === "*" ? "*" : code(x);
12866
+ if (!_handlers[g]) return;
12867
+ s || (s = getScope());
12868
+ const b = A > 1 ? getMods(_modifier, v) : [], y = [];
12869
+ _handlers[g] = _handlers[g].filter((f) => {
12870
+ const E = (c ? f.method === c : !0) && f.scope === s && compareArray(f.mods, b);
12871
+ return E && y.push(f.element), !E;
12872
+ }), y.forEach((f) => removeKeyEvent(f));
12888
12873
  });
12889
12874
  };
12890
12875
  function eventHandler(a, s, c, u) {
@@ -12900,117 +12885,108 @@ function eventHandler(a, s, c, u) {
12900
12885
  }
12901
12886
  function dispatch(a, s) {
12902
12887
  const c = _handlers["*"];
12903
- let u = a.keyCode || a.which || a.charCode;
12904
- if (a.key && a.key.toLowerCase() === "capslock" || !hotkeys$1.filter.call(this, a)) return;
12905
- if ((u === 93 || u === 224) && (u = 91), _downKeys.indexOf(u) === -1 && u !== 229 && _downKeys.push(u), ["metaKey", "ctrlKey", "altKey", "shiftKey"].forEach((A) => {
12906
- const x = modifierMap[A];
12907
- a[A] && _downKeys.indexOf(x) === -1 ? _downKeys.push(x) : !a[A] && _downKeys.indexOf(x) > -1 ? _downKeys.splice(_downKeys.indexOf(x), 1) : A === "metaKey" && a[A] && (_downKeys = _downKeys.filter((g) => g in modifierMap || g === u));
12888
+ let u = getLayoutIndependentKeyCode(a);
12889
+ if (a.key && a.key.toLowerCase() === "capslock" || !(hotkeys$1.filter || filter$1).call(this, a)) return;
12890
+ if ((u === 93 || u === 224) && (u = 91), _downKeys.indexOf(u) === -1 && u !== 229 && _downKeys.push(u), ["metaKey", "ctrlKey", "altKey", "shiftKey"].forEach((x) => {
12891
+ const g = modifierMap[x];
12892
+ a[x] && _downKeys.indexOf(g) === -1 ? _downKeys.push(g) : !a[x] && _downKeys.indexOf(g) > -1 ? _downKeys.splice(_downKeys.indexOf(g), 1) : x === "metaKey" && a[x] && (_downKeys = _downKeys.filter((b) => b in modifierMap || b === u));
12908
12893
  }), u in _mods) {
12909
12894
  _mods[u] = !0;
12910
- for (const A in _modifier)
12911
- if (Object.prototype.hasOwnProperty.call(_modifier, A)) {
12912
- const x = modifierMap[_modifier[A]];
12913
- hotkeys$1[A] = a[x];
12895
+ for (const x in _modifier)
12896
+ if (Object.prototype.hasOwnProperty.call(_modifier, x)) {
12897
+ const g = modifierMap[_modifier[x]];
12898
+ hotkeys$1[x] = a[g];
12914
12899
  }
12915
12900
  if (!c) return;
12916
12901
  }
12917
- for (const A in _mods)
12918
- Object.prototype.hasOwnProperty.call(_mods, A) && (_mods[A] = a[modifierMap[A]]);
12902
+ for (const x in _mods)
12903
+ Object.prototype.hasOwnProperty.call(_mods, x) && (_mods[x] = a[modifierMap[x]]);
12919
12904
  a.getModifierState && !(a.altKey && !a.ctrlKey) && a.getModifierState("AltGraph") && (_downKeys.indexOf(17) === -1 && _downKeys.push(17), _downKeys.indexOf(18) === -1 && _downKeys.push(18), _mods[17] = !0, _mods[18] = !0);
12920
- const d = getScope();
12905
+ const p = getScope();
12921
12906
  if (c)
12922
- for (let A = 0; A < c.length; A++)
12923
- c[A].scope === d && (a.type === "keydown" && c[A].keydown || a.type === "keyup" && c[A].keyup) && eventHandler(a, c[A], d, s);
12907
+ for (let x = 0; x < c.length; x++)
12908
+ c[x].scope === p && (a.type === "keydown" && c[x].keydown || a.type === "keyup" && c[x].keyup) && eventHandler(a, c[x], p, s);
12924
12909
  if (!(u in _handlers)) return;
12925
- const p = _handlers[u], v = p.length;
12926
- for (let A = 0; A < v; A++)
12927
- if ((a.type === "keydown" && p[A].keydown || a.type === "keyup" && p[A].keyup) && p[A].key) {
12928
- const x = p[A], {
12929
- splitKey: g
12930
- } = x, b = x.key.split(g), y = [];
12931
- for (let f = 0; f < b.length; f++)
12932
- y.push(code(b[f]));
12933
- y.sort().join("") === _downKeys.sort().join("") && eventHandler(a, x, d, s);
12934
- }
12935
- }
12936
- function hotkeys$1(a, s, c) {
12910
+ const v = _handlers[u], A = v.length;
12911
+ for (let x = 0; x < A; x++)
12912
+ if ((a.type === "keydown" && v[x].keydown || a.type === "keyup" && v[x].keyup) && v[x].key) {
12913
+ const g = v[x], { splitKey: b } = g, y = g.key.split(b), f = [];
12914
+ for (let m = 0; m < y.length; m++)
12915
+ f.push(code(y[m]));
12916
+ f.sort().join("") === _downKeys.sort().join("") && eventHandler(a, g, p, s);
12917
+ }
12918
+ }
12919
+ const hotkeys$1 = function a(s, c, u) {
12937
12920
  _downKeys = [];
12938
- const u = getKeys$1(a);
12939
- let d = [], p = "all", v = document, A = 0, x = !1, g = !0, b = "+", y = !1, f = !1;
12940
- for (c === void 0 && typeof s == "function" && (c = s), Object.prototype.toString.call(s) === "[object Object]" && (s.scope && (p = s.scope), s.element && (v = s.element), s.keyup && (x = s.keyup), s.keydown !== void 0 && (g = s.keydown), s.capture !== void 0 && (y = s.capture), typeof s.splitKey == "string" && (b = s.splitKey), s.single === !0 && (f = !0)), typeof s == "string" && (p = s), f && unbind(a, p); A < u.length; A++)
12941
- a = u[A].split(b), d = [], a.length > 1 && (d = getMods(_modifier, a)), a = a[a.length - 1], a = a === "*" ? "*" : code(a), a in _handlers || (_handlers[a] = []), _handlers[a].push({
12942
- keyup: x,
12943
- keydown: g,
12944
- scope: p,
12945
- mods: d,
12946
- shortcut: u[A],
12947
- method: c,
12948
- key: u[A],
12949
- splitKey: b,
12950
- element: v
12951
- });
12952
- if (typeof v < "u" && window) {
12953
- if (!elementEventMap.has(v)) {
12954
- const m = function() {
12955
- let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.event;
12956
- return dispatch(w, v);
12957
- }, E = function() {
12958
- let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.event;
12959
- dispatch(w, v), clearModifier(w);
12921
+ const d = getKeys$1(s);
12922
+ let p = [], v = "all", A = document, x = 0, g = !1, b = !0, y = "+", f = !1, m = !1;
12923
+ if (u === void 0 && typeof c == "function" && (u = c), Object.prototype.toString.call(c) === "[object Object]") {
12924
+ const E = c;
12925
+ E.scope && (v = E.scope), E.element && (A = E.element), E.keyup && (g = E.keyup), E.keydown !== void 0 && (b = E.keydown), E.capture !== void 0 && (f = E.capture), typeof E.splitKey == "string" && (y = E.splitKey), E.single === !0 && (m = !0);
12926
+ }
12927
+ for (typeof c == "string" && (v = c), m && unbind(s, v); x < d.length; x++) {
12928
+ const E = d[x].split(y);
12929
+ p = [], E.length > 1 && (p = getMods(_modifier, E));
12930
+ let w = E[E.length - 1];
12931
+ w = w === "*" ? "*" : code(w), w in _handlers || (_handlers[w] = []), _handlers[w].push({
12932
+ keyup: g,
12933
+ keydown: b,
12934
+ scope: v,
12935
+ mods: p,
12936
+ shortcut: d[x],
12937
+ method: u,
12938
+ key: d[x],
12939
+ splitKey: y,
12940
+ element: A
12941
+ });
12942
+ }
12943
+ if (typeof A < "u" && typeof window < "u") {
12944
+ if (!elementEventMap.has(A)) {
12945
+ const E = (S = window.event) => dispatch(S, A), w = (S = window.event) => {
12946
+ dispatch(S, A), clearModifier(S);
12960
12947
  };
12961
- elementEventMap.set(v, {
12962
- keydownListener: m,
12963
- keyupListenr: E,
12964
- capture: y
12965
- }), addEvent$1(v, "keydown", m, y), addEvent$1(v, "keyup", E, y);
12948
+ elementEventMap.set(A, { keydownListener: E, keyupListenr: w, capture: f }), addEvent$1(A, "keydown", E, f), addEvent$1(A, "keyup", w, f);
12966
12949
  }
12967
12950
  if (!winListendFocus) {
12968
- const m = () => {
12951
+ const E = () => {
12969
12952
  _downKeys = [];
12970
12953
  };
12971
- winListendFocus = {
12972
- listener: m,
12973
- capture: y
12974
- }, addEvent$1(window, "focus", m, y);
12954
+ winListendFocus = { listener: E, capture: f }, addEvent$1(window, "focus", E, f);
12955
+ }
12956
+ if (!winListendFullscreen && typeof document < "u") {
12957
+ const E = () => {
12958
+ _downKeys = [];
12959
+ for (const $ in _mods) _mods[$] = !1;
12960
+ for (const $ in _modifier) a[$] = !1;
12961
+ }, w = E, S = E;
12962
+ document.addEventListener("fullscreenchange", w), document.addEventListener("webkitfullscreenchange", S), winListendFullscreen = { fullscreen: w, webkit: S };
12975
12963
  }
12976
12964
  }
12977
- }
12978
- function trigger(a) {
12979
- let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "all";
12965
+ };
12966
+ function trigger(a, s = "all") {
12980
12967
  Object.keys(_handlers).forEach((c) => {
12981
- _handlers[c].filter((d) => d.scope === s && d.shortcut === a).forEach((d) => {
12982
- d && d.method && d.method();
12968
+ _handlers[c].filter(
12969
+ (d) => d.scope === s && d.shortcut === a
12970
+ ).forEach((d) => {
12971
+ d && d.method && d.method({}, d);
12983
12972
  });
12984
12973
  });
12985
12974
  }
12986
12975
  function removeKeyEvent(a) {
12987
12976
  const s = Object.values(_handlers).flat();
12988
- if (s.findIndex((u) => {
12989
- let {
12990
- element: d
12991
- } = u;
12992
- return d === a;
12993
- }) < 0) {
12994
- const {
12995
- keydownListener: u,
12996
- keyupListenr: d,
12997
- capture: p
12998
- } = elementEventMap.get(a) || {};
12977
+ if (s.findIndex(({ element: u }) => u === a) < 0 && a) {
12978
+ const { keydownListener: u, keyupListenr: d, capture: p } = elementEventMap.get(a) || {};
12999
12979
  u && d && (removeEvent$1(a, "keyup", d, p), removeEvent$1(a, "keydown", u, p), elementEventMap.delete(a));
13000
12980
  }
13001
- if ((s.length <= 0 || elementEventMap.size <= 0) && (Object.keys(elementEventMap).forEach((d) => {
13002
- const {
13003
- keydownListener: p,
13004
- keyupListenr: v,
13005
- capture: A
13006
- } = elementEventMap.get(d) || {};
13007
- p && v && (removeEvent$1(d, "keyup", v, A), removeEvent$1(d, "keydown", p, A), elementEventMap.delete(d));
13008
- }), elementEventMap.clear(), Object.keys(_handlers).forEach((d) => delete _handlers[d]), winListendFocus)) {
13009
- const {
13010
- listener: d,
13011
- capture: p
13012
- } = winListendFocus;
13013
- removeEvent$1(window, "focus", d, p), winListendFocus = null;
12981
+ if (s.length <= 0 || elementEventMap.size <= 0) {
12982
+ if (Array.from(elementEventMap.keys()).forEach((d) => {
12983
+ const { keydownListener: p, keyupListenr: v, capture: A } = elementEventMap.get(d) || {};
12984
+ p && v && (removeEvent$1(d, "keyup", v, A), removeEvent$1(d, "keydown", p, A), elementEventMap.delete(d));
12985
+ }), elementEventMap.clear(), Object.keys(_handlers).forEach((d) => delete _handlers[d]), winListendFocus) {
12986
+ const { listener: d, capture: p } = winListendFocus;
12987
+ removeEvent$1(window, "focus", d, p), winListendFocus = null;
12988
+ }
12989
+ winListendFullscreen && typeof document < "u" && (document.removeEventListener("fullscreenchange", winListendFullscreen.fullscreen), document.removeEventListener("webkitfullscreenchange", winListendFullscreen.webkit), winListendFullscreen = null);
13014
12990
  }
13015
12991
  }
13016
12992
  const _api = {
@@ -13028,12 +13004,15 @@ const _api = {
13028
13004
  modifier: _modifier,
13029
13005
  modifierMap
13030
13006
  };
13031
- for (const a in _api)
13032
- Object.prototype.hasOwnProperty.call(_api, a) && (hotkeys$1[a] = _api[a]);
13007
+ for (const a in _api) {
13008
+ const s = a;
13009
+ Object.prototype.hasOwnProperty.call(_api, s) && (hotkeys$1[s] = _api[s]);
13010
+ }
13033
13011
  if (typeof window < "u") {
13034
13012
  const a = window.hotkeys;
13035
13013
  hotkeys$1.noConflict = (s) => (s && window.hotkeys === hotkeys$1 && (window.hotkeys = a), hotkeys$1), window.hotkeys = hotkeys$1;
13036
13014
  }
13015
+ typeof module < "u" && module.exports && (module.exports = hotkeys$1, module.exports.default = hotkeys$1);
13037
13016
  var reactExports = requireReact();
13038
13017
  const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports), React$1 = /* @__PURE__ */ _mergeNamespaces({
13039
13018
  __proto__: null,