@ichaingo/web-worker 1.4.18 → 1.4.20

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
- var Ge = Object.defineProperty;
2
- var Be = (v, r, h) => r in v ? Ge(v, r, { enumerable: !0, configurable: !0, writable: !0, value: h }) : v[r] = h;
3
- var D = (v, r, h) => Be(v, typeof r != "symbol" ? r + "" : r, h);
1
+ var $e = Object.defineProperty;
2
+ var Be = (v, r, h) => r in v ? $e(v, r, { enumerable: !0, configurable: !0, writable: !0, value: h }) : v[r] = h;
3
+ var H = (v, r, h) => Be(v, typeof r != "symbol" ? r + "" : r, h);
4
4
  var Ie;
5
5
  (function(v) {
6
6
  v.ALL_CHAIN_LATEST_BLOCK = "allChainLatestBlock", v.CHAIN_LATEST_BLOCK = "chainLatestBlock";
@@ -23,7 +23,7 @@ var Me;
23
23
  function Ke() {
24
24
  if (Me) return f;
25
25
  Me = 1;
26
- var v = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), z = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), $ = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), F = Symbol.iterator;
26
+ var v = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), G = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), D = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), F = Symbol.iterator;
27
27
  function ue(t) {
28
28
  return t === null || typeof t != "object" ? null : (t = F && t[F] || t["@@iterator"], typeof t == "function" ? t : null);
29
29
  }
@@ -38,26 +38,26 @@ function Ke() {
38
38
  enqueueSetState: function() {
39
39
  }
40
40
  }, J = Object.assign, ie = {};
41
- function H(t, o, c) {
41
+ function Y(t, o, c) {
42
42
  this.props = t, this.context = o, this.refs = ie, this.updater = c || x;
43
43
  }
44
- H.prototype.isReactComponent = {}, H.prototype.setState = function(t, o) {
44
+ Y.prototype.isReactComponent = {}, Y.prototype.setState = function(t, o) {
45
45
  if (typeof t != "object" && typeof t != "function" && t != null)
46
46
  throw Error(
47
47
  "takes an object of state variables to update or a function which returns an object of state variables."
48
48
  );
49
49
  this.updater.enqueueSetState(this, t, o, "setState");
50
- }, H.prototype.forceUpdate = function(t) {
50
+ }, Y.prototype.forceUpdate = function(t) {
51
51
  this.updater.enqueueForceUpdate(this, t, "forceUpdate");
52
52
  };
53
53
  function Q() {
54
54
  }
55
- Q.prototype = H.prototype;
55
+ Q.prototype = Y.prototype;
56
56
  function ee(t, o, c) {
57
57
  this.props = t, this.context = o, this.refs = ie, this.updater = c || x;
58
58
  }
59
59
  var L = ee.prototype = new Q();
60
- L.constructor = ee, J(L, H.prototype), L.isPureReactComponent = !0;
60
+ L.constructor = ee, J(L, Y.prototype), L.isPureReactComponent = !0;
61
61
  var ae = Array.isArray, g = { H: null, A: null, T: null, S: null, V: null }, te = Object.prototype.hasOwnProperty;
62
62
  function ne(t, o, c, a, _, R) {
63
63
  return c = R.ref, {
@@ -68,7 +68,7 @@ function Ke() {
68
68
  props: R
69
69
  };
70
70
  }
71
- function Y(t, o) {
71
+ function U(t, o) {
72
72
  return ne(
73
73
  t.type,
74
74
  o,
@@ -78,7 +78,7 @@ function Ke() {
78
78
  t.props
79
79
  );
80
80
  }
81
- function U(t) {
81
+ function W(t) {
82
82
  return typeof t == "object" && t !== null && t.$$typeof === v;
83
83
  }
84
84
  function me(t) {
@@ -134,7 +134,7 @@ function Ke() {
134
134
  case r:
135
135
  p = !0;
136
136
  break;
137
- case G:
137
+ case $:
138
138
  return p = t._init, j(
139
139
  p(t._payload),
140
140
  o,
@@ -147,7 +147,7 @@ function Ke() {
147
147
  if (p)
148
148
  return _ = _(t), p = a === "" ? "." + re(t, 0) : a, ae(_) ? (c = "", p != null && (c = p.replace(T, "$&/") + "/"), j(_, o, c, "", function(V) {
149
149
  return V;
150
- })) : _ != null && (U(_) && (_ = Y(
150
+ })) : _ != null && (W(_) && (_ = U(
151
151
  _,
152
152
  c + (_.key == null || t && t.key === _.key ? "" : ("" + _.key).replace(
153
153
  T,
@@ -189,7 +189,7 @@ function Ke() {
189
189
  }
190
190
  return p;
191
191
  }
192
- function W(t, o, c) {
192
+ function q(t, o, c) {
193
193
  if (t == null) return t;
194
194
  var a = [], _ = 0;
195
195
  return j(t, a, "", "", function(R) {
@@ -229,9 +229,9 @@ function Ke() {
229
229
  function ce() {
230
230
  }
231
231
  return f.Children = {
232
- map: W,
232
+ map: q,
233
233
  forEach: function(t, o, c) {
234
- W(
234
+ q(
235
235
  t,
236
236
  function() {
237
237
  o.apply(this, arguments);
@@ -241,23 +241,23 @@ function Ke() {
241
241
  },
242
242
  count: function(t) {
243
243
  var o = 0;
244
- return W(t, function() {
244
+ return q(t, function() {
245
245
  o++;
246
246
  }), o;
247
247
  },
248
248
  toArray: function(t) {
249
- return W(t, function(o) {
249
+ return q(t, function(o) {
250
250
  return o;
251
251
  }) || [];
252
252
  },
253
253
  only: function(t) {
254
- if (!U(t))
254
+ if (!W(t))
255
255
  throw Error(
256
256
  "React.Children.only expected to receive a single React element child."
257
257
  );
258
258
  return t;
259
259
  }
260
- }, f.Component = H, f.Fragment = h, f.Profiler = M, f.PureComponent = ee, f.StrictMode = b, f.Suspense = A, f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = g, f.__COMPILER_RUNTIME = {
260
+ }, f.Component = Y, f.Fragment = h, f.Profiler = M, f.PureComponent = ee, f.StrictMode = b, f.Suspense = A, f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = g, f.__COMPILER_RUNTIME = {
261
261
  __proto__: null,
262
262
  c: function(t) {
263
263
  return g.H.useMemoCache(t);
@@ -285,7 +285,7 @@ function Ke() {
285
285
  return ne(t.type, _, void 0, void 0, R, a);
286
286
  }, f.createContext = function(t) {
287
287
  return t = {
288
- $$typeof: z,
288
+ $$typeof: G,
289
289
  _currentValue: t,
290
290
  _currentValue2: t,
291
291
  _threadCount: 0,
@@ -315,15 +315,15 @@ function Ke() {
315
315
  return { current: null };
316
316
  }, f.forwardRef = function(t) {
317
317
  return { $$typeof: O, render: t };
318
- }, f.isValidElement = U, f.lazy = function(t) {
318
+ }, f.isValidElement = W, f.lazy = function(t) {
319
319
  return {
320
- $$typeof: G,
320
+ $$typeof: $,
321
321
  _payload: { _status: -1, _result: t },
322
322
  _init: oe
323
323
  };
324
324
  }, f.memo = function(t, o) {
325
325
  return {
326
- $$typeof: $,
326
+ $$typeof: D,
327
327
  type: t,
328
328
  compare: o === void 0 ? null : o
329
329
  };
@@ -397,9 +397,9 @@ var se = { exports: {} };
397
397
  * LICENSE file in the root directory of this source tree.
398
398
  */
399
399
  se.exports;
400
- var $e;
400
+ var De;
401
401
  function Qe() {
402
- return $e || ($e = 1, (function(v, r) {
402
+ return De || (De = 1, (function(v, r) {
403
403
  process.env.NODE_ENV !== "production" && (function() {
404
404
  function h(e, n) {
405
405
  Object.defineProperty(k.prototype, e, {
@@ -427,7 +427,7 @@ function Qe() {
427
427
  function k(e, n, s) {
428
428
  this.props = e, this.context = n, this.refs = _e, this.updater = s || Te;
429
429
  }
430
- function z() {
430
+ function G() {
431
431
  }
432
432
  function O(e, n, s) {
433
433
  this.props = e, this.context = n, this.refs = _e, this.updater = s || Te;
@@ -435,7 +435,7 @@ function Qe() {
435
435
  function A(e) {
436
436
  return "" + e;
437
437
  }
438
- function $(e) {
438
+ function D(e) {
439
439
  try {
440
440
  A(e);
441
441
  var n = !1;
@@ -452,10 +452,10 @@ function Qe() {
452
452
  ), A(e);
453
453
  }
454
454
  }
455
- function G(e) {
455
+ function $(e) {
456
456
  if (e == null) return null;
457
457
  if (typeof e == "function")
458
- return e.$$typeof === Ye ? null : e.displayName || e.name || null;
458
+ return e.$$typeof === Ue ? null : e.displayName || e.name || null;
459
459
  if (typeof e == "string") return e;
460
460
  switch (e) {
461
461
  case t:
@@ -468,7 +468,7 @@ function Qe() {
468
468
  return "Suspense";
469
469
  case I:
470
470
  return "SuspenseList";
471
- case He:
471
+ case Ye:
472
472
  return "Activity";
473
473
  }
474
474
  if (typeof e == "object")
@@ -485,11 +485,11 @@ function Qe() {
485
485
  var n = e.render;
486
486
  return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
487
487
  case w:
488
- return n = e.displayName || null, n !== null ? n : G(e.type) || "Memo";
488
+ return n = e.displayName || null, n !== null ? n : $(e.type) || "Memo";
489
489
  case V:
490
490
  n = e._payload, e = e._init;
491
491
  try {
492
- return G(e(n));
492
+ return $(e(n));
493
493
  } catch {
494
494
  }
495
495
  }
@@ -500,7 +500,7 @@ function Qe() {
500
500
  if (typeof e == "object" && e !== null && e.$$typeof === V)
501
501
  return "<...>";
502
502
  try {
503
- var n = G(e);
503
+ var n = $(e);
504
504
  return n ? "<" + n + ">" : "<...>";
505
505
  } catch {
506
506
  return "<...>";
@@ -532,8 +532,8 @@ function Qe() {
532
532
  configurable: !0
533
533
  });
534
534
  }
535
- function H() {
536
- var e = G(this.type);
535
+ function Y() {
536
+ var e = $(this.type);
537
537
  return ke[e] || (ke[e] = !0, console.error(
538
538
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
539
539
  )), e = this.props.ref, e !== void 0 ? e : null;
@@ -547,7 +547,7 @@ function Qe() {
547
547
  _owner: i
548
548
  }, (s !== void 0 ? s : null) !== null ? Object.defineProperty(e, "ref", {
549
549
  enumerable: !1,
550
- get: H
550
+ get: Y
551
551
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
552
552
  configurable: !1,
553
553
  enumerable: !1,
@@ -592,7 +592,7 @@ function Qe() {
592
592
  });
593
593
  }
594
594
  function g(e, n) {
595
- return typeof e == "object" && e !== null && e.key != null ? ($(e.key), ae("" + e.key)) : n.toString(36);
595
+ return typeof e == "object" && e !== null && e.key != null ? (D(e.key), ae("" + e.key)) : n.toString(36);
596
596
  }
597
597
  function te() {
598
598
  }
@@ -619,7 +619,7 @@ function Qe() {
619
619
  }
620
620
  throw e;
621
621
  }
622
- function Y(e, n, s, u, i) {
622
+ function U(e, n, s, u, i) {
623
623
  var m = typeof e;
624
624
  (m === "undefined" || m === "boolean") && (e = null);
625
625
  var l = !1;
@@ -638,7 +638,7 @@ function Qe() {
638
638
  l = !0;
639
639
  break;
640
640
  case V:
641
- return l = e._init, Y(
641
+ return l = e._init, U(
642
642
  l(e._payload),
643
643
  n,
644
644
  s,
@@ -650,9 +650,9 @@ function Qe() {
650
650
  if (l) {
651
651
  l = e, i = i(l);
652
652
  var y = u === "" ? "." + g(l, 0) : u;
653
- return be(i) ? (s = "", y != null && (s = y.replace(Ne, "$&/") + "/"), Y(i, n, s, "", function(q) {
654
- return q;
655
- })) : i != null && (L(i) && (i.key != null && (l && l.key === i.key || $(i.key)), s = ee(
653
+ return be(i) ? (s = "", y != null && (s = y.replace(Ne, "$&/") + "/"), U(i, n, s, "", function(z) {
654
+ return z;
655
+ })) : i != null && (L(i) && (i.key != null && (l && l.key === i.key || D(i.key)), s = ee(
656
656
  i,
657
657
  s + (i.key == null || l && l.key === i.key ? "" : ("" + i.key).replace(
658
658
  Ne,
@@ -662,7 +662,7 @@ function Qe() {
662
662
  }
663
663
  if (l = 0, y = u === "" ? "." : u + ":", be(e))
664
664
  for (var d = 0; d < e.length; d++)
665
- u = e[d], m = y + g(u, d), l += Y(
665
+ u = e[d], m = y + g(u, d), l += U(
666
666
  u,
667
667
  n,
668
668
  s,
@@ -673,7 +673,7 @@ function Qe() {
673
673
  for (d === e.entries && (Ae || console.warn(
674
674
  "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
675
675
  ), Ae = !0), e = d.call(e), d = 0; !(u = e.next()).done; )
676
- u = u.value, m = y + g(u, d++), l += Y(
676
+ u = u.value, m = y + g(u, d++), l += U(
677
677
  u,
678
678
  n,
679
679
  s,
@@ -682,7 +682,7 @@ function Qe() {
682
682
  );
683
683
  else if (m === "object") {
684
684
  if (typeof e.then == "function")
685
- return Y(
685
+ return U(
686
686
  ne(e),
687
687
  n,
688
688
  s,
@@ -695,10 +695,10 @@ function Qe() {
695
695
  }
696
696
  return l;
697
697
  }
698
- function U(e, n, s) {
698
+ function W(e, n, s) {
699
699
  if (e == null) return e;
700
700
  var u = [], i = 0;
701
- return Y(e, u, "", "", function(m) {
701
+ return U(e, u, "", "", function(m) {
702
702
  return n.call(s, m, i++);
703
703
  }), u;
704
704
  }
@@ -771,13 +771,13 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
771
771
  "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
772
772
  ), de = n;
773
773
  }
774
- function W(e, n, s) {
774
+ function q(e, n, s) {
775
775
  var u = E.actQueue;
776
776
  if (u !== null)
777
777
  if (u.length !== 0)
778
778
  try {
779
779
  oe(u), B(function() {
780
- return W(e, n, s);
780
+ return q(e, n, s);
781
781
  });
782
782
  return;
783
783
  } catch (i) {
@@ -814,7 +814,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
814
814
  }
815
815
  }
816
816
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
817
- var X = Symbol.for("react.transitional.element"), ce = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), He = Symbol.for("react.activity"), ve = Symbol.iterator, Re = {}, Te = {
817
+ var X = Symbol.for("react.transitional.element"), ce = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Ye = Symbol.for("react.activity"), ve = Symbol.iterator, Re = {}, Te = {
818
818
  isMounted: function() {
819
819
  return !1;
820
820
  },
@@ -849,8 +849,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
849
849
  }, fe;
850
850
  for (fe in N)
851
851
  N.hasOwnProperty(fe) && h(fe, N[fe]);
852
- z.prototype = k.prototype, N = O.prototype = new z(), N.constructor = O, we(N, k.prototype), N.isPureReactComponent = !0;
853
- var be = Array.isArray, Ye = Symbol.for("react.client.reference"), E = {
852
+ G.prototype = k.prototype, N = O.prototype = new G(), N.constructor = O, we(N, k.prototype), N.isPureReactComponent = !0;
853
+ var be = Array.isArray, Ue = Symbol.for("react.client.reference"), E = {
854
854
  H: null,
855
855
  A: null,
856
856
  T: null,
@@ -871,10 +871,10 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
871
871
  return e();
872
872
  }
873
873
  };
874
- var Ce, Se, ke = {}, Ue = N.react_stack_bottom_frame.bind(
874
+ var Ce, Se, ke = {}, We = N.react_stack_bottom_frame.bind(
875
875
  N,
876
876
  x
877
- )(), We = Oe(F(x)), Ae = !1, Ne = /\/+/g, Pe = typeof reportError == "function" ? reportError : function(e) {
877
+ )(), qe = Oe(F(x)), Ae = !1, Ne = /\/+/g, Pe = typeof reportError == "function" ? reportError : function(e) {
878
878
  if (typeof window == "object" && typeof window.ErrorEvent == "function") {
879
879
  var n = new window.ErrorEvent("error", {
880
880
  bubbles: !0,
@@ -899,9 +899,9 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
899
899
  return T().useMemoCache(e);
900
900
  }
901
901
  }), r.Children = {
902
- map: U,
902
+ map: W,
903
903
  forEach: function(e, n, s) {
904
- U(
904
+ W(
905
905
  e,
906
906
  function() {
907
907
  n.apply(this, arguments);
@@ -911,12 +911,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
911
911
  },
912
912
  count: function(e) {
913
913
  var n = 0;
914
- return U(e, function() {
914
+ return W(e, function() {
915
915
  n++;
916
916
  }), n;
917
917
  },
918
918
  toArray: function(e) {
919
- return U(e, function(n) {
919
+ return W(e, function(n) {
920
920
  return n;
921
921
  }) || [];
922
922
  },
@@ -945,33 +945,33 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
945
945
  "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
946
946
  ));
947
947
  }), {
948
- then: function(d, q) {
948
+ then: function(d, z) {
949
949
  i = !0, l.then(
950
950
  function(Z) {
951
951
  if (j(n, s), s === 0) {
952
952
  try {
953
953
  oe(u), B(function() {
954
- return W(
954
+ return q(
955
955
  Z,
956
956
  d,
957
- q
957
+ z
958
958
  );
959
959
  });
960
- } catch (ze) {
961
- E.thrownErrors.push(ze);
960
+ } catch (Ge) {
961
+ E.thrownErrors.push(Ge);
962
962
  }
963
963
  if (0 < E.thrownErrors.length) {
964
- var qe = K(
964
+ var ze = K(
965
965
  E.thrownErrors
966
966
  );
967
- E.thrownErrors.length = 0, q(qe);
967
+ E.thrownErrors.length = 0, z(ze);
968
968
  }
969
969
  } else d(Z);
970
970
  },
971
971
  function(Z) {
972
972
  j(n, s), 0 < E.thrownErrors.length && (Z = K(
973
973
  E.thrownErrors
974
- ), E.thrownErrors.length = 0), q(Z);
974
+ ), E.thrownErrors.length = 0), z(Z);
975
975
  }
976
976
  );
977
977
  }
@@ -985,12 +985,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
985
985
  }), E.actQueue = null), 0 < E.thrownErrors.length)
986
986
  throw e = K(E.thrownErrors), E.thrownErrors.length = 0, e;
987
987
  return {
988
- then: function(d, q) {
988
+ then: function(d, z) {
989
989
  i = !0, s === 0 ? (E.actQueue = u, B(function() {
990
- return W(
990
+ return q(
991
991
  y,
992
992
  d,
993
- q
993
+ z
994
994
  );
995
995
  })) : d(y);
996
996
  }
@@ -1020,7 +1020,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
1020
1020
  }
1021
1021
  l = n.ref !== void 0;
1022
1022
  }
1023
- l && (m = ue()), J(n) && ($(n.key), i = "" + n.key);
1023
+ l && (m = ue()), J(n) && (D(n.key), i = "" + n.key);
1024
1024
  for (y in n)
1025
1025
  !le.call(n, y) || y === "key" || y === "__self" || y === "__source" || y === "ref" && n.ref === void 0 || (u[y] = n[y]);
1026
1026
  }
@@ -1064,7 +1064,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
1064
1064
  if (u = {}, i = null, n != null)
1065
1065
  for (d in Se || !("__self" in n) || "key" in n || (Se = !0, console.warn(
1066
1066
  "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1067
- )), J(n) && ($(n.key), i = "" + n.key), n)
1067
+ )), J(n) && (D(n.key), i = "" + n.key), n)
1068
1068
  le.call(n, d) && d !== "key" && d !== "__self" && d !== "__source" && (u[d] = n[d]);
1069
1069
  var m = arguments.length - 2;
1070
1070
  if (m === 1) u.children = s;
@@ -1088,8 +1088,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
1088
1088
  void 0,
1089
1089
  ue(),
1090
1090
  u,
1091
- d ? Error("react-stack-top-frame") : Ue,
1092
- d ? Oe(F(e)) : We
1091
+ d ? Error("react-stack-top-frame") : We,
1092
+ d ? Oe(F(e)) : qe
1093
1093
  );
1094
1094
  }, r.createRef = function() {
1095
1095
  var e = { current: null };
@@ -1221,20 +1221,20 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
1221
1221
  })();
1222
1222
  })(se, se.exports)), se.exports;
1223
1223
  }
1224
- var De;
1224
+ var He;
1225
1225
  function Xe() {
1226
- return De || (De = 1, process.env.NODE_ENV === "production" ? Ee.exports = Ke() : Ee.exports = Qe()), Ee.exports;
1226
+ return He || (He = 1, process.env.NODE_ENV === "production" ? Ee.exports = Ke() : Ee.exports = Qe()), Ee.exports;
1227
1227
  }
1228
1228
  Xe();
1229
1229
  const S = class S {
1230
1230
  constructor(r) {
1231
- D(this, "socket", null);
1232
- D(this, "config");
1233
- D(this, "status", P.DISCONNECTED);
1234
- D(this, "reconnectAttempts", 0);
1235
- D(this, "reconnectTimer", null);
1236
- D(this, "heartbeatTimer", null);
1237
- D(this, "eventListeners", {});
1231
+ H(this, "socket", null);
1232
+ H(this, "config");
1233
+ H(this, "status", P.DISCONNECTED);
1234
+ H(this, "reconnectAttempts", 0);
1235
+ H(this, "reconnectTimer", null);
1236
+ H(this, "heartbeatTimer", null);
1237
+ H(this, "eventListeners", {});
1238
1238
  this.config = {
1239
1239
  reconnectInterval: 3e3,
1240
1240
  maxReconnectAttempts: 5,
@@ -1267,12 +1267,12 @@ const S = class S {
1267
1267
  ...this.config,
1268
1268
  ...r
1269
1269
  }, new Promise((h, b) => {
1270
- var k, z;
1270
+ var k, G;
1271
1271
  if (((k = this.socket) == null ? void 0 : k.readyState) === WebSocket.OPEN) {
1272
1272
  h();
1273
1273
  return;
1274
1274
  }
1275
- const M = this.config.url + ((z = this.config) != null && z.params ? `?${Object.entries(this.config.params).map(([O, A]) => `${O}=${A}`).join("&")}` : "");
1275
+ const M = this.config.url + ((G = this.config) != null && G.params ? `?${Object.entries(this.config.params).map(([O, A]) => `${O}=${A}`).join("&")}` : "");
1276
1276
  if (M) {
1277
1277
  this.setStatus(P.CONNECTING), this.log("正在连接WebSocket...", M);
1278
1278
  try {
@@ -1280,8 +1280,8 @@ const S = class S {
1280
1280
  var O, A;
1281
1281
  this.log("WebSocket连接成功"), this.setStatus(P.CONNECTED), this.reconnectAttempts = 0, this.startHeartbeat(), (A = (O = this.eventListeners).open) == null || A.call(O), h();
1282
1282
  }, this.socket.onerror = (O) => {
1283
- var A, $;
1284
- this.log("WebSocket连接错误:", O), this.setStatus(P.ERROR), ($ = (A = this.eventListeners).error) == null || $.call(A, O), b(O);
1283
+ var A, D;
1284
+ this.log("WebSocket连接错误:", O), this.setStatus(P.ERROR), (D = (A = this.eventListeners).error) == null || D.call(A, O), b(O);
1285
1285
  };
1286
1286
  } catch (O) {
1287
1287
  this.log("创建WebSocket连接失败:", O), this.setStatus(P.ERROR), b(O);
@@ -1397,7 +1397,7 @@ const S = class S {
1397
1397
  this.disconnect(), this.eventListeners = {}, S.instance = null;
1398
1398
  }
1399
1399
  };
1400
- D(S, "instance", null);
1400
+ H(S, "instance", null);
1401
1401
  let ge = S, C = null;
1402
1402
  self.onmessage = (v) => {
1403
1403
  const { type: r, data: h } = (v == null ? void 0 : v.data) || {};
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ function E({ children: e }) {
9
9
  return W(() => {
10
10
  const r = new Worker(new URL(
11
11
  /* @vite-ignore */
12
- "./assets/webWorker-CvepzMkT.js",
12
+ "./assets/webWorker-BKC-jwjV.js",
13
13
  import.meta.url
14
14
  ), { type: "module" });
15
15
  return r.postMessage({ type: "INIT", data: { url: process.env.NEXT_PUBLIC_WS_URL, debug: !1 } }), r.onmessage = (o) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichaingo/web-worker",
3
- "version": "1.4.18",
3
+ "version": "1.4.20",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  }
20
20
  },
21
21
  "peerDependencies": {
22
- "@ichaingo/web-socket": "1.4.18",
23
- "@ichaingo/logger": "1.4.18"
22
+ "@ichaingo/web-socket": "1.4.20",
23
+ "@ichaingo/logger": "1.4.20"
24
24
  },
25
25
  "devDependencies": {
26
26
  "rollup-plugin-preserve-use-client": "^3.0.1"