@opentiny/utils 3.25.0 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.es.js +30 -27
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -124,7 +124,7 @@ function yr() {
124
124
  }
125
125
  var ms;
126
126
  function Pt() {
127
- return ms || (ms = 1, function(e, t) {
127
+ return ms || (ms = 1, (function(e, t) {
128
128
  var s = nn(), n = yr();
129
129
  function i(o, a) {
130
130
  var l = new n(a);
@@ -133,7 +133,7 @@ function Pt() {
133
133
  t = e.exports = i, t.FilterCSS = n;
134
134
  for (var r in s) t[r] = s[r];
135
135
  typeof window < "u" && (window.filterCSS = e.exports);
136
- }(Je, Je.exports)), Je.exports;
136
+ })(Je, Je.exports)), Je.exports;
137
137
  }
138
138
  var Et, ys;
139
139
  function es() {
@@ -565,23 +565,23 @@ function br() {
565
565
  }
566
566
  var Ss;
567
567
  function wr() {
568
- return Ss || (Ss = 1, function(e, t) {
568
+ return Ss || (Ss = 1, (function(e, t) {
569
569
  var s = on(), n = an(), i = br();
570
570
  function r(a, l) {
571
571
  var f = new i(l);
572
572
  return f.process(a);
573
573
  }
574
- t = e.exports = r, t.filterXSS = r, t.FilterXSS = i, function() {
574
+ t = e.exports = r, t.filterXSS = r, t.FilterXSS = i, (function() {
575
575
  for (var a in s)
576
576
  t[a] = s[a];
577
577
  for (var l in n)
578
578
  t[l] = n[l];
579
- }(), typeof window < "u" && (window.filterXSS = e.exports);
579
+ })(), typeof window < "u" && (window.filterXSS = e.exports);
580
580
  function o() {
581
581
  return typeof self < "u" && typeof DedicatedWorkerGlobalScope < "u" && self instanceof DedicatedWorkerGlobalScope;
582
582
  }
583
583
  o() && (self.filterXSS = e.exports);
584
- }(Ve, Ve.exports)), Ve.exports;
584
+ })(Ve, Ve.exports)), Ve.exports;
585
585
  }
586
586
  var ut = wr();
587
587
  let X = {
@@ -898,14 +898,14 @@ const _r = (e) => {
898
898
  return e.offsetParent === null;
899
899
  }
900
900
  return !1;
901
- }, bn = function() {
901
+ }, bn = (function() {
902
902
  if (typeof Map < "u")
903
903
  return Map;
904
904
  const e = (t, s) => {
905
905
  let n = -1;
906
906
  return t.some((i, r) => i[0] === s ? (n = r, !0) : !1), n;
907
907
  };
908
- return function() {
908
+ return (function() {
909
909
  function t() {
910
910
  this.__entries__ = [];
911
911
  }
@@ -935,15 +935,15 @@ const _r = (e) => {
935
935
  s.call(n, o[1], o[0]);
936
936
  }
937
937
  }, t;
938
- }();
939
- }(), jr = globalThis.Function, dt = function() {
938
+ })();
939
+ })(), jr = globalThis.Function, dt = (function() {
940
940
  const e = (t) => t.Math === Math;
941
941
  return typeof global < "u" && e(global) ? global : typeof self < "u" && e(self) ? self : typeof window < "u" && e(window) ? window : jr("return this")();
942
- }(), Br = function() {
942
+ })(), Br = (function() {
943
943
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(dt) : function(e) {
944
944
  return setTimeout(() => e(Date.now()), 1e3 / 60);
945
945
  };
946
- }();
946
+ })();
947
947
  let Wr = 2;
948
948
  function Kr(e, t) {
949
949
  let s = !1, n = !1, i = 0, r;
@@ -963,7 +963,7 @@ function Kr(e, t) {
963
963
  i = l;
964
964
  }, r;
965
965
  }
966
- const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Xr = typeof MutationObserver < "u", Gr = function() {
966
+ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Xr = typeof MutationObserver < "u", Gr = (function() {
967
967
  function e() {
968
968
  this.observers_ = [], this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Kr(this.refresh.bind(this), Yr);
969
969
  }
@@ -1000,7 +1000,7 @@ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size"
1000
1000
  }, e.getInstance = function() {
1001
1001
  return this._instance || (this._instance = new e()), this._instance;
1002
1002
  }, e._instance = null, e;
1003
- }(), wn = function(e, t) {
1003
+ })(), wn = function(e, t) {
1004
1004
  for (let s = 0, n = Object.keys(t); s < n.length; s++) {
1005
1005
  const i = n[s];
1006
1006
  Object.defineProperty(e, i, {
@@ -1047,9 +1047,9 @@ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size"
1047
1047
  Math.abs(f) !== 1 && (l -= f), Math.abs(u) !== 1 && (a -= u);
1048
1048
  }
1049
1049
  return bt(i.left, i.top, a, l);
1050
- }, ei = /* @__PURE__ */ function() {
1050
+ }, ei = /* @__PURE__ */ (function() {
1051
1051
  return typeof SVGGraphicsElement < "u" ? (e) => e instanceof Fe(e).SVGGraphicsElement : (e) => e instanceof Fe(e).SVGElement && typeof e.getBBox == "function";
1052
- }(), ti = function(e) {
1052
+ })(), ti = function(e) {
1053
1053
  return S ? vn : ei(e) ? Vr(e) : Qr(e);
1054
1054
  }, si = function(e) {
1055
1055
  const t = e.x, s = e.y, n = e.width, i = e.height, o = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
@@ -1063,7 +1063,7 @@ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size"
1063
1063
  bottom: i + s,
1064
1064
  left: t
1065
1065
  }), o;
1066
- }, ni = function() {
1066
+ }, ni = (function() {
1067
1067
  function e(t) {
1068
1068
  this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = bt(0, 0, 0, 0), this.target = t;
1069
1069
  }
@@ -1074,13 +1074,13 @@ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size"
1074
1074
  const t = ti(this.target);
1075
1075
  return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
1076
1076
  }, e;
1077
- }(), ri = /* @__PURE__ */ function() {
1077
+ })(), ri = /* @__PURE__ */ (function() {
1078
1078
  function e(t, s) {
1079
1079
  const n = si(s);
1080
1080
  wn(this, { target: t, contentRect: n });
1081
1081
  }
1082
1082
  return e;
1083
- }(), ii = function() {
1083
+ })(), ii = (function() {
1084
1084
  function e(t, s, n) {
1085
1085
  if (this.observations_ = new bn(), this.activeObservations_ = [], typeof t != "function")
1086
1086
  throw new TypeError("[TINY-Resize] The callback provided as parameter 1 is not a function.");
@@ -1123,7 +1123,7 @@ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size"
1123
1123
  }, e.prototype.clearActive = function() {
1124
1124
  this.activeObservations_.splice(0);
1125
1125
  }, e;
1126
- }(), Sn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new bn(), xn = /* @__PURE__ */ function() {
1126
+ })(), Sn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new bn(), xn = /* @__PURE__ */ (function() {
1127
1127
  function e(t) {
1128
1128
  if (!(this instanceof e))
1129
1129
  throw new TypeError("[TINY-Resize] Cannot call a class as a function.");
@@ -1133,16 +1133,16 @@ const Yr = 20, Ur = ["top", "right", "bottom", "left", "width", "height", "size"
1133
1133
  Sn.set(this, n);
1134
1134
  }
1135
1135
  return e;
1136
- }();
1136
+ })();
1137
1137
  ["observe", "unobserve", "disconnect"].forEach((e) => {
1138
1138
  xn.prototype[e] = function() {
1139
1139
  let t;
1140
1140
  return (t = Sn.get(this))[e].apply(t, arguments);
1141
1141
  };
1142
1142
  });
1143
- const oi = function() {
1143
+ const oi = (function() {
1144
1144
  return typeof dt.ResizeObserver < "u" ? dt.ResizeObserver : xn;
1145
- }(), ai = globalThis, li = "tcirzywvqlkjhgfbZQG_FLOWHSUBDNIMYREVKCAJxp57XP043891T62-modnaesu", Nn = li.split("").reverse().join("");
1145
+ })(), ai = globalThis, li = "tcirzywvqlkjhgfbZQG_FLOWHSUBDNIMYREVKCAJxp57XP043891T62-modnaesu", Nn = li.split("").reverse().join("");
1146
1146
  let fe, ue;
1147
1147
  const ci = (e) => new Uint8Array(new ArrayBuffer(e)), Ns = (e) => ai.crypto.getRandomValues(e), En = (e) => {
1148
1148
  !fe || fe.length < e ? (fe = ci(e * 128), Ns(fe), ue = 0) : ue + e > fe.length && (Ns(fe), ue = 0), ue += e;
@@ -2150,7 +2150,7 @@ const Li = (e, t) => {
2150
2150
  const s = Cs(e, t), n = Os(e, t, 1), i = Os(e, t, s), r = po(e, t), o = go(e, t), a = Cs(r.year, r.month);
2151
2151
  let l = 0;
2152
2152
  const f = s + n + 7 - i - 1;
2153
- return f / 7 < 6 && f / 7 >= 5 && (l = 6 * 7 - f), {
2153
+ return f / 7 < 6 && f / 7 >= 5 && (l = 42 - f), {
2154
2154
  last: {
2155
2155
  year: r.year,
2156
2156
  month: r.month,
@@ -3464,7 +3464,10 @@ const qc = D, Hc = (e, t, ...s) => {
3464
3464
  }, s.unshift(i), s.unshift(t), e.apply(null, s);
3465
3465
  }
3466
3466
  return !n;
3467
- }, jc = (e) => !e || !e.target ? null : e.target.shadowRoot && e.composed && e.composedPath()[0] || e.target, Bc = (e, t) => {
3467
+ }, jc = (e) => {
3468
+ var t;
3469
+ return !e || !e.target ? null : (t = e.target) != null && t.shadowRoot && e.composed && e.composedPath()[0] || e.target;
3470
+ }, Bc = (e, t) => {
3468
3471
  let s;
3469
3472
  if (e.target === null && t)
3470
3473
  s = t;
@@ -3488,11 +3491,11 @@ const qc = D, Hc = (e, t, ...s) => {
3488
3491
  }).catch(i || Sa) : r ? s() : n && n();
3489
3492
  } else
3490
3493
  s();
3491
- }, xa = function() {
3494
+ }, xa = (function() {
3492
3495
  return S ? function(e) {
3493
3496
  setTimeout(() => e(Date.now()), 1e3 / 60);
3494
3497
  } : window.requestAnimationFrame.bind(window);
3495
- }(), Gt = (e) => {
3498
+ })(), Gt = (e) => {
3496
3499
  e.scheduled || (e.scheduled = !0, e.raf(Na.bind(null, e)));
3497
3500
  }, Na = (e) => {
3498
3501
  const { reads: t, writes: s } = e;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opentiny/utils",
3
3
  "type": "module",
4
- "version": "3.25.0",
4
+ "version": "3.27.0",
5
5
  "description": "nanoid console xss",
6
6
  "author": "",
7
7
  "license": "ISC",