pinia-plugin-subscription 0.1.3-beta.0 → 0.1.3-beta.1

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,5 +1,5 @@
1
1
  import { defineStore as Mt } from "pinia";
2
- class Wn {
2
+ class zn {
3
3
  _console;
4
4
  _createInstance;
5
5
  _name;
@@ -69,8 +69,8 @@ class Pt {
69
69
  this.console.error(...e);
70
70
  }
71
71
  }
72
- const Ft = "pinia-plugin-subscription", _e = (t, e = "white") => `background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;
73
- function ge(t, e) {
72
+ const Ft = "pinia-plugin-subscription", ge = (t, e = "white") => `background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;
73
+ function be(t, e) {
74
74
  if (!t)
75
75
  throw new Error("Style instructions are required");
76
76
  console.log(
@@ -80,7 +80,7 @@ function ge(t, e) {
80
80
  ...e
81
81
  );
82
82
  }
83
- class be {
83
+ class me {
84
84
  _bgColor = "#ffec73";
85
85
  _color = "green";
86
86
  _icon = "🍍⚡";
@@ -95,7 +95,7 @@ class be {
95
95
  return ` [${n} ${Ft}] - ${e} `;
96
96
  }
97
97
  generateStyle(e) {
98
- return _e(e.bgColor, e.color);
98
+ return ge(e.bgColor, e.color);
99
99
  }
100
100
  getStyleDefinition(e) {
101
101
  return this._styles[e ?? "info"];
@@ -119,21 +119,21 @@ class be {
119
119
  return [this.formatMessage(e.shift(), n), ...e ?? []];
120
120
  }
121
121
  useLog(e, n) {
122
- ge(
122
+ be(
123
123
  this.generateStyle(e),
124
124
  this.rebuildArgs(n, e.icon)
125
125
  );
126
126
  }
127
127
  }
128
- class me extends be {
128
+ class Se extends me {
129
129
  _pluginName = Ft;
130
130
  }
131
- const Se = new me();
131
+ const ye = new Se();
132
132
  function gt(t) {
133
133
  return t ? Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : typeof t == "string" ? t.trim() === "" : !1 : !(typeof t == "boolean" || typeof t == "number");
134
134
  }
135
135
  const $t = "PluginSubscription";
136
- class ye extends Pt {
136
+ class we extends Pt {
137
137
  _className = $t;
138
138
  _pluginDebug;
139
139
  _resetStoreCallback = [];
@@ -149,7 +149,7 @@ class ye extends Pt {
149
149
  return this._subscriptions;
150
150
  }
151
151
  constructor(e, n) {
152
- super(Array.isArray(n) && !!n?.includes($t), Se), this._pluginDebug = Array.isArray(n) ? n : void 0, this._subscribers = e;
152
+ super(Array.isArray(n) && !!n?.includes($t), ye), this._pluginDebug = Array.isArray(n) ? n : void 0, this._subscribers = e;
153
153
  }
154
154
  addResetStoreCallback(e) {
155
155
  this._resetStoreCallback.push(e);
@@ -251,18 +251,18 @@ function Oe(t) {
251
251
  const bt = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
252
252
  process.env.NODE_ENV !== "production" && Object.freeze([]);
253
253
  const kt = () => {
254
- }, we = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
255
- (t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), Ee = (t) => t.startsWith("onUpdate:"), M = Object.assign, Ne = Object.prototype.hasOwnProperty, mt = (t, e) => Ne.call(t, e), d = Array.isArray, z = (t) => jt(t) === "[object Map]", $ = (t) => typeof t == "function", R = (t) => typeof t == "string", T = (t) => typeof t == "symbol", g = (t) => t !== null && typeof t == "object", ve = Object.prototype.toString, jt = (t) => ve.call(t), Kt = (t) => jt(t).slice(8, -1), it = (t) => R(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, Re = (t) => {
254
+ }, Ee = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
255
+ (t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), Ne = (t) => t.startsWith("onUpdate:"), M = Object.assign, ve = Object.prototype.hasOwnProperty, mt = (t, e) => ve.call(t, e), d = Array.isArray, z = (t) => jt(t) === "[object Map]", $ = (t) => typeof t == "function", R = (t) => typeof t == "string", T = (t) => typeof t == "symbol", g = (t) => t !== null && typeof t == "object", Re = Object.prototype.toString, jt = (t) => Re.call(t), Kt = (t) => jt(t).slice(8, -1), it = (t) => R(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, Ce = (t) => {
256
256
  const e = /* @__PURE__ */ Object.create(null);
257
257
  return ((n) => e[n] || (e[n] = t(n)));
258
- }, Ce = Re((t) => t.charAt(0).toUpperCase() + t.slice(1)), D = (t, e) => !Object.is(t, e);
258
+ }, Ae = Ce((t) => t.charAt(0).toUpperCase() + t.slice(1)), D = (t, e) => !Object.is(t, e);
259
259
  let Dt;
260
260
  const ct = () => Dt || (Dt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
261
261
  function Et(t) {
262
262
  if (d(t)) {
263
263
  const e = {};
264
264
  for (let n = 0; n < t.length; n++) {
265
- const r = t[n], s = R(r) ? De(r) : Et(r);
265
+ const r = t[n], s = R(r) ? Ve(r) : Et(r);
266
266
  if (s)
267
267
  for (const o in s)
268
268
  e[o] = s[o];
@@ -271,12 +271,12 @@ function Et(t) {
271
271
  } else if (R(t) || g(t))
272
272
  return t;
273
273
  }
274
- const Ae = /;(?![^(]*\))/g, Ie = /:([^]+)/, $e = /\/\*[^]*?\*\//g;
275
- function De(t) {
274
+ const Ie = /;(?![^(]*\))/g, $e = /:([^]+)/, De = /\/\*[^]*?\*\//g;
275
+ function Ve(t) {
276
276
  const e = {};
277
- return t.replace($e, "").split(Ae).forEach((n) => {
277
+ return t.replace(De, "").split(Ie).forEach((n) => {
278
278
  if (n) {
279
- const r = n.split(Ie);
279
+ const r = n.split($e);
280
280
  r.length > 1 && (e[r[0].trim()] = r[1].trim());
281
281
  }
282
282
  }), e;
@@ -298,7 +298,7 @@ function Nt(t) {
298
298
  function K(t, ...e) {
299
299
  console.warn(`[Vue warn] ${t}`, ...e);
300
300
  }
301
- let Ve, Ht = 0, ut;
301
+ let xe, Ht = 0, ut;
302
302
  function vt() {
303
303
  Ht++;
304
304
  }
@@ -368,7 +368,7 @@ const tt = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ Symbol(
368
368
  process.env.NODE_ENV !== "production" ? "Array iterate" : ""
369
369
  );
370
370
  function _(t, e, n) {
371
- if (Z && Ve) {
371
+ if (Z && xe) {
372
372
  let r = tt.get(t);
373
373
  r || tt.set(t, r = /* @__PURE__ */ new Map());
374
374
  let s = r.get(n);
@@ -417,7 +417,7 @@ function I(t, e, n, r, s, o) {
417
417
  }
418
418
  Rt();
419
419
  }
420
- function xe(t, e) {
420
+ function Te(t, e) {
421
421
  const n = tt.get(t);
422
422
  return n && n.get(e);
423
423
  }
@@ -428,13 +428,13 @@ function P(t) {
428
428
  function Ct(t) {
429
429
  return _(t = /* @__PURE__ */ p(t), "iterate", U), t;
430
430
  }
431
- function w(t, e) {
432
- return /* @__PURE__ */ E(t) ? J(/* @__PURE__ */ At(t) ? C(e) : e) : C(e);
431
+ function O(t, e) {
432
+ return /* @__PURE__ */ E(t) ? B(/* @__PURE__ */ At(t) ? C(e) : e) : C(e);
433
433
  }
434
- const Te = {
434
+ const Me = {
435
435
  __proto__: null,
436
436
  [Symbol.iterator]() {
437
- return ft(this, Symbol.iterator, (t) => w(this, t));
437
+ return ft(this, Symbol.iterator, (t) => O(this, t));
438
438
  },
439
439
  concat(...t) {
440
440
  return P(this).concat(
@@ -442,7 +442,7 @@ const Te = {
442
442
  );
443
443
  },
444
444
  entries() {
445
- return ft(this, "entries", (t) => (t[1] = w(this, t[1]), t));
445
+ return ft(this, "entries", (t) => (t[1] = O(this, t[1]), t));
446
446
  },
447
447
  every(t, e) {
448
448
  return N(this, "every", t, e, void 0, arguments);
@@ -453,7 +453,7 @@ const Te = {
453
453
  "filter",
454
454
  t,
455
455
  e,
456
- (n) => n.map((r) => w(this, r)),
456
+ (n) => n.map((r) => O(this, r)),
457
457
  arguments
458
458
  );
459
459
  },
@@ -463,7 +463,7 @@ const Te = {
463
463
  "find",
464
464
  t,
465
465
  e,
466
- (n) => w(this, n),
466
+ (n) => O(this, n),
467
467
  arguments
468
468
  );
469
469
  },
@@ -476,7 +476,7 @@ const Te = {
476
476
  "findLast",
477
477
  t,
478
478
  e,
479
- (n) => w(this, n),
479
+ (n) => O(this, n),
480
480
  arguments
481
481
  );
482
482
  },
@@ -538,7 +538,7 @@ const Te = {
538
538
  return W(this, "unshift", t);
539
539
  },
540
540
  values() {
541
- return ft(this, "values", (t) => w(this, t));
541
+ return ft(this, "values", (t) => O(this, t));
542
542
  }
543
543
  };
544
544
  function ft(t, e, n) {
@@ -548,16 +548,16 @@ function ft(t, e, n) {
548
548
  return o.done || (o.value = n(o.value)), o;
549
549
  }), s;
550
550
  }
551
- const Me = Array.prototype;
551
+ const Pe = Array.prototype;
552
552
  function N(t, e, n, r, s, o) {
553
553
  const i = Ct(t), c = i !== t && !/* @__PURE__ */ y(t), a = i[e];
554
- if (a !== Me[e]) {
554
+ if (a !== Pe[e]) {
555
555
  const l = a.apply(t, o);
556
556
  return c ? C(l) : l;
557
557
  }
558
558
  let u = n;
559
559
  i !== t && (c ? u = function(l, f) {
560
- return n.call(this, w(t, l), f, t);
560
+ return n.call(this, O(t, l), f, t);
561
561
  } : n.length > 2 && (u = function(l, f) {
562
562
  return n.call(this, l, f, t);
563
563
  }));
@@ -568,12 +568,12 @@ function Vt(t, e, n, r) {
568
568
  const s = Ct(t), o = s !== t && !/* @__PURE__ */ y(t);
569
569
  let i = n, c = !1;
570
570
  s !== t && (o ? (c = r.length === 0, i = function(u, h, l) {
571
- return c && (c = !1, u = w(t, u)), n.call(this, u, w(t, h), l, t);
571
+ return c && (c = !1, u = O(t, u)), n.call(this, u, O(t, h), l, t);
572
572
  }) : n.length > 3 && (i = function(u, h, l) {
573
573
  return n.call(this, u, h, l, t);
574
574
  }));
575
575
  const a = s[e](i, ...r);
576
- return c ? w(t, a) : a;
576
+ return c ? O(t, a) : a;
577
577
  }
578
578
  function pt(t, e, n) {
579
579
  const r = /* @__PURE__ */ p(t);
@@ -586,10 +586,10 @@ function W(t, e, n = []) {
586
586
  const r = (/* @__PURE__ */ p(t))[e].apply(t, n);
587
587
  return Rt(), at(), r;
588
588
  }
589
- const Pe = /* @__PURE__ */ Oe("__proto__,__v_isRef,__isVue"), zt = new Set(
589
+ const Fe = /* @__PURE__ */ Oe("__proto__,__v_isRef,__isVue"), zt = new Set(
590
590
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(T)
591
591
  );
592
- function Fe(t) {
592
+ function ke(t) {
593
593
  T(t) || (t = String(t));
594
594
  const e = /* @__PURE__ */ p(this);
595
595
  return _(e, "has", t), e.hasOwnProperty(t);
@@ -608,16 +608,16 @@ class Ut {
608
608
  if (n === "__v_isShallow")
609
609
  return o;
610
610
  if (n === "__v_raw")
611
- return r === (s ? o ? Je : Bt : o ? qe : Jt).get(e) || // receiver is not the reactive proxy, but has the same prototype
611
+ return r === (s ? o ? Je : Jt : o ? Be : Bt).get(e) || // receiver is not the reactive proxy, but has the same prototype
612
612
  // this means the receiver is a user proxy of the reactive proxy
613
613
  Object.getPrototypeOf(e) === Object.getPrototypeOf(r) ? e : void 0;
614
614
  const i = d(e);
615
615
  if (!s) {
616
616
  let a;
617
- if (i && (a = Te[n]))
617
+ if (i && (a = Me[n]))
618
618
  return a;
619
619
  if (n === "hasOwnProperty")
620
- return Fe;
620
+ return ke;
621
621
  }
622
622
  const c = Reflect.get(
623
623
  e,
@@ -627,16 +627,16 @@ class Ut {
627
627
  // its class methods
628
628
  /* @__PURE__ */ b(e) ? e : r
629
629
  );
630
- if ((T(n) ? zt.has(n) : Pe(n)) || (s || _(e, "get", n), o))
630
+ if ((T(n) ? zt.has(n) : Fe(n)) || (s || _(e, "get", n), o))
631
631
  return c;
632
632
  if (/* @__PURE__ */ b(c)) {
633
633
  const a = i && it(n) ? c : c.value;
634
- return s && g(a) ? /* @__PURE__ */ Ot(a) : a;
634
+ return s && g(a) ? /* @__PURE__ */ wt(a) : a;
635
635
  }
636
- return g(c) ? s ? /* @__PURE__ */ Ot(c) : /* @__PURE__ */ Yt(c) : c;
636
+ return g(c) ? s ? /* @__PURE__ */ wt(c) : /* @__PURE__ */ Yt(c) : c;
637
637
  }
638
638
  }
639
- class ke extends Ut {
639
+ class je extends Ut {
640
640
  constructor(e = !1) {
641
641
  super(!1, e);
642
642
  }
@@ -675,7 +675,7 @@ class ke extends Ut {
675
675
  ), Reflect.ownKeys(e);
676
676
  }
677
677
  }
678
- class je extends Ut {
678
+ class Ke extends Ut {
679
679
  constructor(e = !1) {
680
680
  super(!0, e);
681
681
  }
@@ -692,10 +692,10 @@ class je extends Ut {
692
692
  ), !0;
693
693
  }
694
694
  }
695
- const Ke = /* @__PURE__ */ new ke(), He = /* @__PURE__ */ new je(), yt = (t) => t, Y = (t) => Reflect.getPrototypeOf(t);
696
- function Le(t, e, n) {
695
+ const He = /* @__PURE__ */ new je(), Le = /* @__PURE__ */ new Ke(), yt = (t) => t, Y = (t) => Reflect.getPrototypeOf(t);
696
+ function We(t, e, n) {
697
697
  return function(...r) {
698
- const s = this.__v_raw, o = /* @__PURE__ */ p(s), i = z(o), c = t === "entries" || t === Symbol.iterator && i, a = t === "keys" && i, u = s[t](...r), h = n ? yt : e ? J : C;
698
+ const s = this.__v_raw, o = /* @__PURE__ */ p(s), i = z(o), c = t === "entries" || t === Symbol.iterator && i, a = t === "keys" && i, u = s[t](...r), h = n ? yt : e ? B : C;
699
699
  return !e && _(
700
700
  o,
701
701
  "iterate",
@@ -721,19 +721,19 @@ function G(t) {
721
721
  if (process.env.NODE_ENV !== "production") {
722
722
  const n = e[0] ? `on key "${e[0]}" ` : "";
723
723
  K(
724
- `${Ce(t)} operation ${n}failed: target is readonly.`,
724
+ `${Ae(t)} operation ${n}failed: target is readonly.`,
725
725
  /* @__PURE__ */ p(this)
726
726
  );
727
727
  }
728
728
  return t === "delete" ? !1 : t === "clear" ? void 0 : this;
729
729
  };
730
730
  }
731
- function We(t, e) {
731
+ function ze(t, e) {
732
732
  const n = {
733
733
  get(s) {
734
734
  const o = this.__v_raw, i = /* @__PURE__ */ p(o), c = /* @__PURE__ */ p(s);
735
735
  t || (D(s, c) && _(i, "get", s), _(i, "get", c));
736
- const { has: a } = Y(i), u = e ? yt : t ? J : C;
736
+ const { has: a } = Y(i), u = e ? yt : t ? B : C;
737
737
  if (a.call(i, s))
738
738
  return u(o.get(s));
739
739
  if (a.call(i, c))
@@ -749,7 +749,7 @@ function We(t, e) {
749
749
  return t || (D(s, c) && _(i, "has", s), _(i, "has", c)), s === c ? o.has(s) : o.has(s) || o.has(c);
750
750
  },
751
751
  forEach(s, o) {
752
- const i = this, c = i.__v_raw, a = /* @__PURE__ */ p(c), u = e ? yt : t ? J : C;
752
+ const i = this, c = i.__v_raw, a = /* @__PURE__ */ p(c), u = e ? yt : t ? B : C;
753
753
  return !t && _(a, "iterate", V), c.forEach((h, l) => s.call(o, u(h), u(l), i));
754
754
  }
755
755
  };
@@ -797,20 +797,20 @@ function We(t, e) {
797
797
  "entries",
798
798
  Symbol.iterator
799
799
  ].forEach((s) => {
800
- n[s] = Le(s, t, e);
800
+ n[s] = We(s, t, e);
801
801
  }), n;
802
802
  }
803
803
  function qt(t, e) {
804
- const n = We(t, e);
804
+ const n = ze(t, e);
805
805
  return (r, s, o) => s === "__v_isReactive" ? !t : s === "__v_isReadonly" ? t : s === "__v_raw" ? r : Reflect.get(
806
806
  mt(n, s) && s in r ? n : r,
807
807
  s,
808
808
  o
809
809
  );
810
810
  }
811
- const ze = {
811
+ const Ue = {
812
812
  get: /* @__PURE__ */ qt(!1, !1)
813
- }, Ue = {
813
+ }, qe = {
814
814
  get: /* @__PURE__ */ qt(!0, !1)
815
815
  };
816
816
  function xt(t, e, n) {
@@ -822,8 +822,8 @@ function xt(t, e, n) {
822
822
  );
823
823
  }
824
824
  }
825
- const Jt = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap();
826
- function Be(t) {
825
+ const Bt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap();
826
+ function Ye(t) {
827
827
  switch (t) {
828
828
  case "Object":
829
829
  case "Array":
@@ -842,19 +842,19 @@ function Yt(t) {
842
842
  return /* @__PURE__ */ E(t) ? t : Gt(
843
843
  t,
844
844
  !1,
845
- Ke,
846
- ze,
847
- Jt
845
+ He,
846
+ Ue,
847
+ Bt
848
848
  );
849
849
  }
850
850
  // @__NO_SIDE_EFFECTS__
851
- function Ot(t) {
851
+ function wt(t) {
852
852
  return Gt(
853
853
  t,
854
854
  !0,
855
- He,
856
- Ue,
857
- Bt
855
+ Le,
856
+ qe,
857
+ Jt
858
858
  );
859
859
  }
860
860
  function Gt(t, e, n, r, s) {
@@ -869,7 +869,7 @@ function Gt(t, e, n, r, s) {
869
869
  const o = s.get(t);
870
870
  if (o)
871
871
  return o;
872
- const i = Be(Kt(t));
872
+ const i = Ye(Kt(t));
873
873
  if (i === 0)
874
874
  return t;
875
875
  const c = new Proxy(
@@ -899,19 +899,19 @@ function p(t) {
899
899
  const e = t && t.__v_raw;
900
900
  return e ? /* @__PURE__ */ p(e) : t;
901
901
  }
902
- const C = (t) => g(t) ? /* @__PURE__ */ Yt(t) : t, J = (t) => g(t) ? /* @__PURE__ */ Ot(t) : t;
902
+ const C = (t) => g(t) ? /* @__PURE__ */ Yt(t) : t, B = (t) => g(t) ? /* @__PURE__ */ wt(t) : t;
903
903
  // @__NO_SIDE_EFFECTS__
904
904
  function b(t) {
905
905
  return t ? t.__v_isRef === !0 : !1;
906
906
  }
907
907
  // @__NO_SIDE_EFFECTS__
908
908
  function Qt(t) {
909
- return Ye(t, !1);
909
+ return Ge(t, !1);
910
910
  }
911
- function Ye(t, e) {
912
- return /* @__PURE__ */ b(t) ? t : new Ge(t, e);
911
+ function Ge(t, e) {
912
+ return /* @__PURE__ */ b(t) ? t : new Qe(t, e);
913
913
  }
914
- class Ge {
914
+ class Qe {
915
915
  constructor(e, n) {
916
916
  this.dep = new Wt(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? e : /* @__PURE__ */ p(e), this._value = n ? e : C(e), this.__v_isShallow = n;
917
917
  }
@@ -933,10 +933,10 @@ class Ge {
933
933
  }) : this.dep.trigger());
934
934
  }
935
935
  }
936
- function Qe(t) {
936
+ function Xe(t) {
937
937
  return /* @__PURE__ */ b(t) ? t.value : t;
938
938
  }
939
- class Xe {
939
+ class Ze {
940
940
  constructor(e, n, r) {
941
941
  this._object = e, this._defaultValue = r, this.__v_isRef = !0, this._value = void 0, this._key = T(n) ? n : String(n), this._raw = /* @__PURE__ */ p(e);
942
942
  let s = !0, o = e;
@@ -948,7 +948,7 @@ class Xe {
948
948
  }
949
949
  get value() {
950
950
  let e = this._object[this._key];
951
- return this._shallow && (e = Qe(e)), this._value = e === void 0 ? this._defaultValue : e;
951
+ return this._shallow && (e = Xe(e)), this._value = e === void 0 ? this._defaultValue : e;
952
952
  }
953
953
  set value(e) {
954
954
  if (this._shallow && /* @__PURE__ */ b(this._raw[this._key])) {
@@ -961,10 +961,10 @@ class Xe {
961
961
  this._object[this._key] = e;
962
962
  }
963
963
  get dep() {
964
- return xe(this._raw, this._key);
964
+ return Te(this._raw, this._key);
965
965
  }
966
966
  }
967
- class Ze {
967
+ class tn {
968
968
  constructor(e) {
969
969
  this._getter = e, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
970
970
  }
@@ -973,24 +973,24 @@ class Ze {
973
973
  }
974
974
  }
975
975
  // @__NO_SIDE_EFFECTS__
976
- function tn(t, e, n) {
977
- return /* @__PURE__ */ b(t) ? t : $(t) ? new Ze(t) : g(t) && arguments.length > 1 ? en(t, e, n) : /* @__PURE__ */ Qt(t);
978
- }
979
976
  function en(t, e, n) {
980
- return new Xe(t, e, n);
977
+ return /* @__PURE__ */ b(t) ? t : $(t) ? new tn(t) : g(t) && arguments.length > 1 ? nn(t, e, n) : /* @__PURE__ */ Qt(t);
978
+ }
979
+ function nn(t, e, n) {
980
+ return new Ze(t, e, n);
981
981
  }
982
982
  const x = [];
983
- function nn(t) {
983
+ function sn(t) {
984
984
  x.push(t);
985
985
  }
986
- function sn() {
986
+ function rn() {
987
987
  x.pop();
988
988
  }
989
989
  let ht = !1;
990
990
  function H(t, ...e) {
991
991
  if (ht) return;
992
992
  ht = !0, lt();
993
- const n = x.length ? x[x.length - 1].component : null, r = n && n.appContext.config.warnHandler, s = rn();
993
+ const n = x.length ? x[x.length - 1].component : null, r = n && n.appContext.config.warnHandler, s = on();
994
994
  if (r)
995
995
  It(
996
996
  r,
@@ -1013,11 +1013,11 @@ function H(t, ...e) {
1013
1013
  else {
1014
1014
  const o = [`[Vue warn]: ${t}`, ...e];
1015
1015
  s.length && o.push(`
1016
- `, ...on(s)), console.warn(...o);
1016
+ `, ...cn(s)), console.warn(...o);
1017
1017
  }
1018
1018
  at(), ht = !1;
1019
1019
  }
1020
- function rn() {
1020
+ function on() {
1021
1021
  let t = x[x.length - 1];
1022
1022
  if (!t)
1023
1023
  return [];
@@ -1033,22 +1033,22 @@ function rn() {
1033
1033
  }
1034
1034
  return e;
1035
1035
  }
1036
- function on(t) {
1036
+ function cn(t) {
1037
1037
  const e = [];
1038
1038
  return t.forEach((n, r) => {
1039
1039
  e.push(...r === 0 ? [] : [`
1040
- `], ...cn(n));
1040
+ `], ...ln(n));
1041
1041
  }), e;
1042
1042
  }
1043
- function cn({ vnode: t, recurseCount: e }) {
1043
+ function ln({ vnode: t, recurseCount: e }) {
1044
1044
  const n = e > 0 ? `... (${e} recursive calls)` : "", r = t.component ? t.component.parent == null : !1, s = ` at <${pe(
1045
1045
  t.component,
1046
1046
  t.type,
1047
1047
  r
1048
1048
  )}`, o = ">" + n;
1049
- return t.props ? [s, ...ln(t.props), o] : [s + o];
1049
+ return t.props ? [s, ...an(t.props), o] : [s + o];
1050
1050
  }
1051
- function ln(t) {
1051
+ function an(t) {
1052
1052
  const e = [], n = Object.keys(t);
1053
1053
  return n.slice(0, 3).forEach((r) => {
1054
1054
  e.push(...Xt(r, t[r]));
@@ -1120,12 +1120,12 @@ function te(t, e, n, r = !0) {
1120
1120
  return;
1121
1121
  }
1122
1122
  }
1123
- an(t, n, s, r, i);
1123
+ un(t, n, s, r, i);
1124
1124
  }
1125
- function an(t, e, n, r = !0, s = !1) {
1125
+ function un(t, e, n, r = !0, s = !1) {
1126
1126
  if (process.env.NODE_ENV !== "production") {
1127
1127
  const o = Zt[e];
1128
- if (n && nn(n), H(`Unhandled error${o ? ` during execution of ${o}` : ""}`), n && sn(), r)
1128
+ if (n && sn(n), H(`Unhandled error${o ? ` during execution of ${o}` : ""}`), n && rn(), r)
1129
1129
  throw t;
1130
1130
  console.error(t);
1131
1131
  } else {
@@ -1138,34 +1138,34 @@ const S = [];
1138
1138
  let v = -1;
1139
1139
  const j = [];
1140
1140
  let A = null, F = 0;
1141
- const un = /* @__PURE__ */ Promise.resolve();
1142
- let wt = null;
1143
- const fn = 100;
1144
- function pn(t) {
1141
+ const fn = /* @__PURE__ */ Promise.resolve();
1142
+ let Ot = null;
1143
+ const pn = 100;
1144
+ function hn(t) {
1145
1145
  let e = v + 1, n = S.length;
1146
1146
  for (; e < n; ) {
1147
- const r = e + n >>> 1, s = S[r], o = B(s);
1147
+ const r = e + n >>> 1, s = S[r], o = J(s);
1148
1148
  o < t || o === t && s.flags & 2 ? e = r + 1 : n = r;
1149
1149
  }
1150
1150
  return e;
1151
1151
  }
1152
- function hn(t) {
1152
+ function dn(t) {
1153
1153
  if (!(t.flags & 1)) {
1154
- const e = B(t), n = S[S.length - 1];
1154
+ const e = J(t), n = S[S.length - 1];
1155
1155
  !n || // fast path when the job id is larger than the tail
1156
- !(t.flags & 2) && e >= B(n) ? S.push(t) : S.splice(pn(e), 0, t), t.flags |= 1, ee();
1156
+ !(t.flags & 2) && e >= J(n) ? S.push(t) : S.splice(hn(e), 0, t), t.flags |= 1, ee();
1157
1157
  }
1158
1158
  }
1159
1159
  function ee() {
1160
- wt || (wt = un.then(ne));
1160
+ Ot || (Ot = fn.then(ne));
1161
1161
  }
1162
- function dn(t) {
1162
+ function _n(t) {
1163
1163
  d(t) ? j.push(...t) : A && t.id === -1 ? A.splice(F + 1, 0, t) : t.flags & 1 || (j.push(t), t.flags |= 1), ee();
1164
1164
  }
1165
- function _n(t) {
1165
+ function gn(t) {
1166
1166
  if (j.length) {
1167
1167
  const e = [...new Set(j)].sort(
1168
- (n, r) => B(n) - B(r)
1168
+ (n, r) => J(n) - J(r)
1169
1169
  );
1170
1170
  if (j.length = 0, A) {
1171
1171
  A.push(...e);
@@ -1178,7 +1178,7 @@ function _n(t) {
1178
1178
  A = null, F = 0;
1179
1179
  }
1180
1180
  }
1181
- const B = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
1181
+ const J = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
1182
1182
  function ne(t) {
1183
1183
  process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
1184
1184
  const e = process.env.NODE_ENV !== "production" ? (n) => se(t, n) : kt;
@@ -1200,12 +1200,12 @@ function ne(t) {
1200
1200
  const n = S[v];
1201
1201
  n && (n.flags &= -2);
1202
1202
  }
1203
- v = -1, S.length = 0, _n(t), wt = null, (S.length || j.length) && ne(t);
1203
+ v = -1, S.length = 0, gn(t), Ot = null, (S.length || j.length) && ne(t);
1204
1204
  }
1205
1205
  }
1206
1206
  function se(t, e) {
1207
1207
  const n = t.get(e) || 0;
1208
- if (n > fn) {
1208
+ if (n > pn) {
1209
1209
  const r = e.i, s = r && fe(r.type);
1210
1210
  return te(
1211
1211
  `Maximum recursive updates exceeded${s ? ` in component <${s}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
@@ -1217,12 +1217,12 @@ function se(t, e) {
1217
1217
  }
1218
1218
  const dt = /* @__PURE__ */ new Map();
1219
1219
  process.env.NODE_ENV !== "production" && (ct().__VUE_HMR_RUNTIME__ = {
1220
- createRecord: _t(gn),
1221
- rerender: _t(bn),
1222
- reload: _t(mn)
1220
+ createRecord: _t(bn),
1221
+ rerender: _t(mn),
1222
+ reload: _t(Sn)
1223
1223
  });
1224
1224
  const et = /* @__PURE__ */ new Map();
1225
- function gn(t, e) {
1225
+ function bn(t, e) {
1226
1226
  return et.has(t) ? !1 : (et.set(t, {
1227
1227
  initialDef: nt(e),
1228
1228
  instances: /* @__PURE__ */ new Set()
@@ -1231,13 +1231,13 @@ function gn(t, e) {
1231
1231
  function nt(t) {
1232
1232
  return he(t) ? t.__vccOpts : t;
1233
1233
  }
1234
- function bn(t, e) {
1234
+ function mn(t, e) {
1235
1235
  const n = et.get(t);
1236
1236
  n && (n.initialDef.render = e, [...n.instances].forEach((r) => {
1237
1237
  e && (r.render = e, nt(r.type).render = e), r.renderCache = [], r.job.flags & 8 || r.update();
1238
1238
  }));
1239
1239
  }
1240
- function mn(t, e) {
1240
+ function Sn(t, e) {
1241
1241
  const n = et.get(t);
1242
1242
  if (!n) return;
1243
1243
  e = nt(e), Tt(n.initialDef, e);
@@ -1245,13 +1245,13 @@ function mn(t, e) {
1245
1245
  for (let s = 0; s < r.length; s++) {
1246
1246
  const o = r[s], i = nt(o.type);
1247
1247
  let c = dt.get(i);
1248
- c || (i !== n.initialDef && Tt(i, e), dt.set(i, c = /* @__PURE__ */ new Set())), c.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (c.add(o), o.ceReload(e.styles), c.delete(o)) : o.parent ? hn(() => {
1248
+ c || (i !== n.initialDef && Tt(i, e), dt.set(i, c = /* @__PURE__ */ new Set())), c.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (c.add(o), o.ceReload(e.styles), c.delete(o)) : o.parent ? dn(() => {
1249
1249
  o.job.flags & 8 || (o.parent.update(), c.delete(o));
1250
1250
  }) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
1251
1251
  "[HMR] Root or manually mounted instance modified. Full reload required."
1252
1252
  ), o.root.ce && o !== o.root && o.root.ce._removeChildStyle(i);
1253
1253
  }
1254
- dn(() => {
1254
+ _n(() => {
1255
1255
  dt.clear();
1256
1256
  });
1257
1257
  }
@@ -1283,29 +1283,29 @@ function re(t, e) {
1283
1283
  k || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, Q = []);
1284
1284
  }, 3e3)) : Q = [];
1285
1285
  }
1286
- let st = null, Sn = null;
1287
- const yn = (t) => t.__isTeleport;
1286
+ let st = null, yn = null;
1287
+ const wn = (t) => t.__isTeleport;
1288
1288
  function oe(t, e) {
1289
1289
  t.shapeFlag & 6 && t.component ? (t.transition = e, oe(t.component.subTree, e)) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent), t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e;
1290
1290
  }
1291
1291
  ct().requestIdleCallback;
1292
1292
  ct().cancelIdleCallback;
1293
- const On = /* @__PURE__ */ Symbol.for("v-ndc"), wn = {};
1294
- process.env.NODE_ENV !== "production" && (wn.ownKeys = (t) => (H(
1293
+ const On = /* @__PURE__ */ Symbol.for("v-ndc"), En = {};
1294
+ process.env.NODE_ENV !== "production" && (En.ownKeys = (t) => (H(
1295
1295
  "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
1296
1296
  ), Reflect.ownKeys(t)));
1297
- const En = {}, ie = (t) => Object.getPrototypeOf(t) === En, Nn = (t) => t.__isSuspense, ce = /* @__PURE__ */ Symbol.for("v-fgt"), vn = /* @__PURE__ */ Symbol.for("v-txt"), Rn = /* @__PURE__ */ Symbol.for("v-cmt");
1298
- function Cn(t) {
1297
+ const Nn = {}, ie = (t) => Object.getPrototypeOf(t) === Nn, vn = (t) => t.__isSuspense, ce = /* @__PURE__ */ Symbol.for("v-fgt"), Rn = /* @__PURE__ */ Symbol.for("v-txt"), Cn = /* @__PURE__ */ Symbol.for("v-cmt");
1298
+ function An(t) {
1299
1299
  return t ? t.__v_isVNode === !0 : !1;
1300
1300
  }
1301
- const An = (...t) => ae(
1301
+ const In = (...t) => ae(
1302
1302
  ...t
1303
1303
  ), le = ({ key: t }) => t ?? null, X = ({
1304
1304
  ref: t,
1305
1305
  ref_key: e,
1306
1306
  ref_for: n
1307
1307
  }) => (typeof t == "number" && (t = "" + t), t != null ? R(t) || /* @__PURE__ */ b(t) || $(t) ? { i: st, r: t, k: e, f: !!n } : t : null);
1308
- function In(t, e = null, n = null, r = 0, s = null, o = t === ce ? 0 : 1, i = !1, c = !1) {
1308
+ function $n(t, e = null, n = null, r = 0, s = null, o = t === ce ? 0 : 1, i = !1, c = !1) {
1309
1309
  const a = {
1310
1310
  __v_isVNode: !0,
1311
1311
  __v_skip: !0,
@@ -1313,7 +1313,7 @@ function In(t, e = null, n = null, r = 0, s = null, o = t === ce ? 0 : 1, i = !1
1313
1313
  props: e,
1314
1314
  key: e && le(e),
1315
1315
  ref: e && X(e),
1316
- scopeId: Sn,
1316
+ scopeId: yn,
1317
1317
  slotScopeIds: null,
1318
1318
  children: n,
1319
1319
  component: null,
@@ -1337,9 +1337,9 @@ function In(t, e = null, n = null, r = 0, s = null, o = t === ce ? 0 : 1, i = !1
1337
1337
  };
1338
1338
  return c ? (ot(a, n), o & 128 && t.normalize(a)) : n && (a.shapeFlag |= R(n) ? 8 : 16), process.env.NODE_ENV !== "production" && a.key !== a.key && H("VNode created with invalid key (NaN). VNode type:", a.type), a;
1339
1339
  }
1340
- const $n = process.env.NODE_ENV !== "production" ? An : ae;
1340
+ const Dn = process.env.NODE_ENV !== "production" ? In : ae;
1341
1341
  function ae(t, e = null, n = null, r = 0, s = null, o = !1) {
1342
- if ((!t || t === On) && (process.env.NODE_ENV !== "production" && !t && H(`Invalid vnode type when creating vnode: ${t}.`), t = Rn), Cn(t)) {
1342
+ if ((!t || t === On) && (process.env.NODE_ENV !== "production" && !t && H(`Invalid vnode type when creating vnode: ${t}.`), t = Cn), An(t)) {
1343
1343
  const c = rt(
1344
1344
  t,
1345
1345
  e,
@@ -1349,17 +1349,17 @@ function ae(t, e = null, n = null, r = 0, s = null, o = !1) {
1349
1349
  return n && ot(c, n), c.patchFlag = -2, c;
1350
1350
  }
1351
1351
  if (he(t) && (t = t.__vccOpts), e) {
1352
- e = Dn(e);
1352
+ e = Vn(e);
1353
1353
  let { class: c, style: a } = e;
1354
1354
  c && !R(c) && (e.class = Nt(c)), g(a) && (/* @__PURE__ */ q(a) && !d(a) && (a = M({}, a)), e.style = Et(a));
1355
1355
  }
1356
- const i = R(t) ? 1 : Nn(t) ? 128 : yn(t) ? 64 : g(t) ? 4 : $(t) ? 2 : 0;
1356
+ const i = R(t) ? 1 : vn(t) ? 128 : wn(t) ? 64 : g(t) ? 4 : $(t) ? 2 : 0;
1357
1357
  return process.env.NODE_ENV !== "production" && i & 4 && /* @__PURE__ */ q(t) && (t = /* @__PURE__ */ p(t), H(
1358
1358
  "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
1359
1359
  `
1360
1360
  Component that was made reactive: `,
1361
1361
  t
1362
- )), In(
1362
+ )), $n(
1363
1363
  t,
1364
1364
  e,
1365
1365
  n,
@@ -1370,11 +1370,11 @@ Component that was made reactive: `,
1370
1370
  !0
1371
1371
  );
1372
1372
  }
1373
- function Dn(t) {
1373
+ function Vn(t) {
1374
1374
  return t ? /* @__PURE__ */ q(t) || ie(t) ? M({}, t) : t : null;
1375
1375
  }
1376
1376
  function rt(t, e, n = !1, r = !1) {
1377
- const { props: s, ref: o, patchFlag: i, children: c, transition: a } = t, u = e ? xn(s || {}, e) : s, h = {
1377
+ const { props: s, ref: o, patchFlag: i, children: c, transition: a } = t, u = e ? Tn(s || {}, e) : s, h = {
1378
1378
  __v_isVNode: !0,
1379
1379
  __v_skip: !0,
1380
1380
  type: t.type,
@@ -1427,8 +1427,8 @@ function ue(t) {
1427
1427
  const e = rt(t);
1428
1428
  return d(t.children) && (e.children = t.children.map(ue)), e;
1429
1429
  }
1430
- function Vn(t = " ", e = 0) {
1431
- return $n(vn, null, t, e);
1430
+ function xn(t = " ", e = 0) {
1431
+ return Dn(Rn, null, t, e);
1432
1432
  }
1433
1433
  function ot(t, e) {
1434
1434
  let n = 0;
@@ -1451,10 +1451,10 @@ function ot(t, e) {
1451
1451
  }
1452
1452
  e = { default: e, _ctx: st }, n = 32;
1453
1453
  } else
1454
- e = String(e), r & 64 ? (n = 16, e = [Vn(e)]) : n = 8;
1454
+ e = String(e), r & 64 ? (n = 16, e = [xn(e)]) : n = 8;
1455
1455
  t.children = e, t.shapeFlag |= n;
1456
1456
  }
1457
- function xn(...t) {
1457
+ function Tn(...t) {
1458
1458
  const e = {};
1459
1459
  for (let n = 0; n < t.length; n++) {
1460
1460
  const r = t[n];
@@ -1463,11 +1463,11 @@ function xn(...t) {
1463
1463
  e.class !== r.class && (e.class = Nt([e.class, r.class]));
1464
1464
  else if (s === "style")
1465
1465
  e.style = Et([e.style, r.style]);
1466
- else if (we(s)) {
1466
+ else if (Ee(s)) {
1467
1467
  const o = e[s], i = r[s];
1468
1468
  i && o !== i && !(d(o) && o.includes(i)) ? e[s] = o ? [].concat(o, i) : i : i == null && o == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
1469
1469
  // the model listener.
1470
- !Ee(s) && (e[s] = i);
1470
+ !Ne(s) && (e[s] = i);
1471
1471
  } else s !== "" && (e[s] = r[s]);
1472
1472
  }
1473
1473
  return e;
@@ -1488,7 +1488,7 @@ function xn(...t) {
1488
1488
  );
1489
1489
  }
1490
1490
  process.env.NODE_ENV;
1491
- const Tn = /(?:^|[-_])\w/g, Mn = (t) => t.replace(Tn, (e) => e.toUpperCase()).replace(/[-_]/g, "");
1491
+ const Mn = /(?:^|[-_])\w/g, Pn = (t) => t.replace(Mn, (e) => e.toUpperCase()).replace(/[-_]/g, "");
1492
1492
  function fe(t, e = !0) {
1493
1493
  return $(t) ? t.displayName || t.name : t.name || e && t.__name;
1494
1494
  }
@@ -1508,12 +1508,12 @@ function pe(t, e, n = !1) {
1508
1508
  t.parent.type.components
1509
1509
  ) || s(t.appContext.components);
1510
1510
  }
1511
- return r ? Mn(r) : n ? "App" : "Anonymous";
1511
+ return r ? Pn(r) : n ? "App" : "Anonymous";
1512
1512
  }
1513
1513
  function he(t) {
1514
1514
  return $(t) && "__vccOpts" in t;
1515
1515
  }
1516
- function Pn() {
1516
+ function Fn() {
1517
1517
  if (process.env.NODE_ENV === "production" || typeof window > "u")
1518
1518
  return;
1519
1519
  const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, r = { style: "color:#eb2f96" }, s = {
@@ -1573,8 +1573,8 @@ function Pn() {
1573
1573
  l.type.props && l.props && f.push(i("props", /* @__PURE__ */ p(l.props))), l.setupState !== bt && f.push(i("setup", l.setupState)), l.data !== bt && f.push(i("data", /* @__PURE__ */ p(l.data)));
1574
1574
  const m = a(l, "computed");
1575
1575
  m && f.push(i("computed", m));
1576
- const O = a(l, "inject");
1577
- return O && f.push(i("injected", O)), f.push([
1576
+ const w = a(l, "inject");
1577
+ return w && f.push(i("injected", w)), f.push([
1578
1578
  "div",
1579
1579
  {},
1580
1580
  [
@@ -1619,14 +1619,14 @@ function Pn() {
1619
1619
  const m = l.type;
1620
1620
  if ($(m))
1621
1621
  return;
1622
- const O = {};
1622
+ const w = {};
1623
1623
  for (const L in l.ctx)
1624
- u(m, L, f) && (O[L] = l.ctx[L]);
1625
- return O;
1624
+ u(m, L, f) && (w[L] = l.ctx[L]);
1625
+ return w;
1626
1626
  }
1627
1627
  function u(l, f, m) {
1628
- const O = l[m];
1629
- if (d(O) && O.includes(f) || g(O) && f in O || l.extends && u(l.extends, f, m) || l.mixins && l.mixins.some((L) => u(L, f, m)))
1628
+ const w = l[m];
1629
+ if (d(w) && w.includes(f) || g(w) && f in w || l.extends && u(l.extends, f, m) || l.mixins && l.mixins.some((L) => u(L, f, m)))
1630
1630
  return !0;
1631
1631
  }
1632
1632
  function h(l) {
@@ -1637,44 +1637,46 @@ function Pn() {
1637
1637
  process.env.NODE_ENV;
1638
1638
  process.env.NODE_ENV;
1639
1639
  process.env.NODE_ENV;
1640
- function Fn() {
1641
- Pn();
1640
+ function kn() {
1641
+ Fn();
1642
1642
  }
1643
- process.env.NODE_ENV !== "production" && Fn();
1644
- const de = /* @__PURE__ */ new WeakMap();
1645
- function zn(t, e, n) {
1643
+ process.env.NODE_ENV !== "production" && kn();
1644
+ const de = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new Map();
1645
+ function Un(t, e, n) {
1646
1646
  const r = n ? { storeOptions: n } : {};
1647
- return typeof e == "function" ? kn(
1647
+ return typeof e == "function" ? jn(
1648
1648
  t,
1649
1649
  e,
1650
1650
  r
1651
- ) : jn(
1651
+ ) : Kn(
1652
1652
  t,
1653
1653
  e,
1654
1654
  r
1655
1655
  );
1656
1656
  }
1657
- function Un(t) {
1658
- return de.get(t);
1657
+ function qn(t) {
1658
+ return de.get(t) ?? (typeof t?.$id == "string" ? _e.get(t.$id) : void 0);
1659
1659
  }
1660
- function kn(t, e, n) {
1660
+ function jn(t, e, n) {
1661
1661
  const r = {
1662
1662
  id: t,
1663
1663
  extensions: {}
1664
- }, s = Mt(t, () => e(r), n);
1664
+ };
1665
+ _e.set(t, r);
1666
+ const s = Mt(t, () => e(r), n);
1665
1667
  return Object.assign(((...o) => {
1666
1668
  const i = s(...o);
1667
1669
  return de.set(i, r), i;
1668
1670
  }), s);
1669
1671
  }
1670
- function jn(t, e, n) {
1672
+ function Kn(t, e, n) {
1671
1673
  return n && (e = { ...e, ...n ?? {} }), Mt(t, e);
1672
1674
  }
1673
- const Kn = /* @__PURE__ */ new Set(["_", "$"]);
1674
- function Hn(t) {
1675
- return Kn.has(t[0]);
1675
+ const Hn = /* @__PURE__ */ new Set(["_", "$"]);
1676
+ function Ln(t) {
1677
+ return Hn.has(t[0]);
1676
1678
  }
1677
- class qn extends Pt {
1679
+ class Bn extends Pt {
1678
1680
  _className = "Store";
1679
1681
  _onAction;
1680
1682
  _options;
@@ -1723,7 +1725,7 @@ class qn extends Pt {
1723
1725
  * @param value
1724
1726
  */
1725
1727
  addToState(e, n) {
1726
- this.isOptionApi() || n?.value || (n = /* @__PURE__ */ Qt(n)), this.state[e] = n, this.store[e] = /* @__PURE__ */ tn(this.state, e);
1728
+ this.isOptionApi() || n?.value || (n = /* @__PURE__ */ Qt(n)), this.state[e] = n, this.store[e] = /* @__PURE__ */ en(this.state, e);
1727
1729
  }
1728
1730
  addSubscription(e, n, r) {
1729
1731
  this._subscriptions[e] = { subscription: n, ...r ?? {} };
@@ -1740,7 +1742,7 @@ class qn extends Pt {
1740
1742
  return new this(e, n, r, s);
1741
1743
  }
1742
1744
  hasDeniedFirstChar(e) {
1743
- return Hn(e[0]);
1745
+ return Ln(e[0]);
1744
1746
  }
1745
1747
  static hasRequiredKeys(e) {
1746
1748
  return this._requiredKeys !== void 0 && this._requiredKeys?.every((n) => !!e[n]);
@@ -1769,17 +1771,17 @@ class qn extends Pt {
1769
1771
  }
1770
1772
  }
1771
1773
  function Jn(t, e) {
1772
- const n = new ye(t, e);
1774
+ const n = new we(t, e);
1773
1775
  return n.plugin.bind(n);
1774
1776
  }
1775
1777
  export {
1776
- be as CustomConsole,
1778
+ me as CustomConsole,
1777
1779
  Ft as PLUGIN_NAME,
1778
- Wn as PluginSubscriber,
1779
- ye as PluginSubscription,
1780
- qn as Store,
1780
+ zn as PluginSubscriber,
1781
+ we as PluginSubscription,
1782
+ Bn as Store,
1781
1783
  Jn as createPlugin,
1782
- zn as defineAStore,
1783
- Un as getDefineAStoreSetupContext,
1784
+ Un as defineAStore,
1785
+ qn as getDefineAStoreSetupContext,
1784
1786
  gt as isEmpty
1785
1787
  };
@@ -1,5 +1,5 @@
1
- (function(_,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],F):(_=typeof globalThis<"u"?globalThis:_||self,F(_["pinia-plugin-subscription"]={},_.Pinia))})(this,(function(_,F){"use strict";class me{_console;_createInstance;_name;_pluginOptions;_storeInstance;_resetStoreCallback;_storeOnActionSubscription;_storeMutationSubscription;_subscriptions;pluginCreated;get console(){return this._console??console}get name(){return this._name}get pluginOptions(){return this._pluginOptions??{}}set pluginOptions(e){this._pluginOptions=e}get resetStoreCallback(){return this._resetStoreCallback}get storeOnActionSubscription(){return this._storeOnActionSubscription}get storeMutationSubscription(){return this._storeMutationSubscription}get subscriptions(){return this._subscriptions}set subscriptions(e){this._subscriptions=e}constructor(e,n,r){this._name=e,this._createInstance=n,r&&(this._console=r)}invoke({store:e,options:n},r){return this._storeInstance=this._createInstance(e,{...n,...this.pluginOptions},r,this.console),this._storeInstance?(this._subscriptions=this._storeInstance.getSubscriptions(),this._storeMutationSubscription=this._storeInstance.storeSubscribe,this._storeOnActionSubscription=this._storeInstance.onAction,this.pluginCreated&&this.pluginCreated(e),!0):!1}}class Tt{_console;_debug=!1;get console(){return this._console??console}set console(e){this._console=e}get debug(){return this._debug}set debug(e){this._debug=e}constructor(e,n){this._debug=e,n&&(this._console=n)}debugLog(...e){this._debug&&(Array.isArray(e)&&(e[0]=`${this._className} - ${e[0]}`),this.console.log(...e))}logError(...e){this.console.error(...e)}}const ht="pinia-plugin-subscription",Se=(t,e="white")=>`background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;function ye(t,e){if(!t)throw new Error("Style instructions are required");console.log("%c%s",t,e.shift(),...e)}class xt{_bgColor="#ffec73";_color="green";_icon="🍍⚡";_errorBgColor="#d24545";_errorColor="white";_errorIcon="🍍⚠️";_styles={error:{bgColor:this._errorBgColor,color:this._errorColor,icon:this._errorIcon},info:{bgColor:this._bgColor,color:this._color,icon:this._icon}};formatMessage(e,n){return` [${n} ${ht}] - ${e} `}generateStyle(e){return Se(e.bgColor,e.color)}getStyleDefinition(e){return this._styles[e??"info"]}log(...e){this.useLog(this.getStyleDefinition(),e)}error(...e){this.useLog(this.getStyleDefinition("error"),e)}rebuildArgs(e,n){if(typeof e=="string")return[this.formatMessage(e,n)];if(Array.isArray(e))return[this.formatMessage(e.shift(),n),...e??[]]}useLog(e,n){ye(this.generateStyle(e),this.rebuildArgs(n,e.icon))}}class Oe extends xt{_pluginName=ht}const we=new Oe;function Q(t){return t?Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.trim()==="":!1:!(typeof t=="boolean"||typeof t=="number")}const Mt="PluginSubscription";class Pt extends Tt{_className=Mt;_pluginDebug;_resetStoreCallback=[];_subscribers=[];_subscribersDelivered=new Set;_subscriptions=[];_subscriptionsDelivered=new Set;set subscribers(e){this._subscribers=e}get subscriptions(){if(!Q(this._subscriptions))return this._subscriptions}constructor(e,n){super(Array.isArray(n)&&!!n?.includes(Mt),we),this._pluginDebug=Array.isArray(n)?n:void 0,this._subscribers=e}addResetStoreCallback(e){this._resetStoreCallback.push(e)}definePluginDebug(e){return!!this._pluginDebug?.includes(e.name)}executeResetStoreCallbacks(e){this._resetStoreCallback.forEach(n=>n(e))}plugin({store:e,options:n}){if(this._subscribers.length){this.debugLog(`plugin() - ${e.$id}`,["subscriber:",this._subscribers,"store:",e,"options:",n]);try{this._subscribers.forEach(r=>{this._subscribersDelivered.has(`${r.name}-${e.$id}`)||r.invoke({store:e,options:n},this.definePluginDebug(r))&&(this._subscribersDelivered.add(`${r.name}-${e.$id}`),r.subscriptions&&this.subscriptionDelivery({store:e,options:n},r.subscriptions),r.storeMutationSubscription&&this.storeMutationSubscription(r.storeMutationSubscription),r.storeOnActionSubscription&&this.storeOnActionSubscription(r.storeOnActionSubscription),r.resetStoreCallback&&this.addResetStoreCallback(r.resetStoreCallback))}),this.rewriteResetStore({store:e},JSON.stringify(e.$state),Object.assign({},e))}catch(r){this.logError(r,e,n)}}}rewriteResetStore({store:e},n,r){e.$reset=()=>{this.debugLog("rewriteResetStore()",{initState:n,store:e,customStore:r}),this.executeResetStoreCallbacks(e),e.$patch(JSON.parse(n))}}storeOnActionSubscription(e){const{store:n,callback:r}=e();n.$onAction(({after:s,args:i,name:o})=>{this.debugLog(`storeOnActionSubscription ${n.$id}`,{after:s,args:i,name:o,store:n}),r({after:s,args:i,name:o})})}storeMutationSubscription(e){const{store:n,callback:r}=e();n.$subscribe(s=>{this.debugLog(`$subscribe ${n.$id}`,{mutation:s,store:n}),r(s)})}subscriptionDelivery({store:e,options:n},r){Object.entries(r).forEach(([s,i])=>{try{if(this._subscriptionsDelivered.has(`${s}-${e.$id}`))return;const{subscription:o,subscriptionOptions:c,stores:a}=i;this.debugLog(`subscriptionDelivery() - store: ${e.$id}`,["pluginName:",s,"subscription:",o,"options:",i,"stores:",a]);const u={storeOptions:{...n?.storeOptions??{},...c}};o.invoke({store:e,options:{...n,...u}},this.debug),this._subscriptionsDelivered.add(`${s}-${e.$id}`),Q(a)||a?.forEach(h=>o.invoke({store:h,options:{...n,...u,...h?.storeOptions??{}}},this.debug))}catch(o){this.logError("subscriptionDelivery()",o,e,n)}})}}function Ee(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const dt=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ft=()=>{},Ne=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),ve=t=>t.startsWith("onUpdate:"),V=Object.assign,Re=Object.prototype.hasOwnProperty,_t=(t,e)=>Re.call(t,e),d=Array.isArray,z=t=>kt(t)==="[object Map]",I=t=>typeof t=="function",v=t=>typeof t=="string",T=t=>typeof t=="symbol",b=t=>t!==null&&typeof t=="object",Ce=Object.prototype.toString,kt=t=>Ce.call(t),jt=t=>kt(t).slice(8,-1),X=t=>v(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ae=(t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))})(t=>t.charAt(0).toUpperCase()+t.slice(1)),x=(t,e)=>!Object.is(t,e);let Kt;const Z=()=>Kt||(Kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gt(t){if(d(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],s=v(r)?Ve(r):gt(r);if(s)for(const i in s)e[i]=s[i]}return e}else if(v(t)||b(t))return t}const Ie=/;(?![^(]*\))/g,De=/:([^]+)/,$e=/\/\*[^]*?\*\//g;function Ve(t){const e={};return t.replace($e,"").split(Ie).forEach(n=>{if(n){const r=n.split(De);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function bt(t){let e="";if(v(t))e=t;else if(d(t))for(let n=0;n<t.length;n++){const r=bt(t[n]);r&&(e+=r+" ")}else if(b(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function k(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let Te,Ht=0,mt;function St(){Ht++}function yt(){if(--Ht>0)return;let t;for(;mt;){let e=mt;for(mt=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}let tt=!0;const Lt=[];function et(){Lt.push(tt),tt=!1}function nt(){const t=Lt.pop();tt=t===void 0?!0:t}class Wt{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(e){}trigger(e){this.version++,this.notify(e)}notify(e){St();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(V({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{yt()}}}const st=new WeakMap,M=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Ot=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),U=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function g(t,e,n){if(tt&&Te){let r=st.get(t);r||st.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new Wt),s.map=r,s.key=n),process.env.NODE_ENV!=="production"?s.track({target:t,type:e,key:n}):s.track()}}function D(t,e,n,r,s,i){const o=st.get(t);if(!o)return;const c=a=>{a&&(process.env.NODE_ENV!=="production"?a.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i}):a.trigger())};if(St(),e==="clear")o.forEach(c);else{const a=d(t),u=a&&X(n);if(a&&n==="length"){const h=Number(r);o.forEach((l,f)=>{(f==="length"||f===U||!T(f)&&f>=h)&&c(l)})}else switch((n!==void 0||o.has(void 0))&&c(o.get(n)),u&&c(o.get(U)),e){case"add":a?u&&c(o.get("length")):(c(o.get(M)),z(t)&&c(o.get(Ot)));break;case"delete":a||(c(o.get(M)),z(t)&&c(o.get(Ot)));break;case"set":z(t)&&c(o.get(M));break}}yt()}function xe(t,e){const n=st.get(t);return n&&n.get(e)}function j(t){const e=p(t);return e===t?e:(g(e,"iterate",U),S(t)?e:e.map(C))}function wt(t){return g(t=p(t),"iterate",U),t}function w(t,e){return E(t)?B(Ct(t)?C(e):e):C(e)}const Me={__proto__:null,[Symbol.iterator](){return Et(this,Symbol.iterator,t=>w(this,t))},concat(...t){return j(this).concat(...t.map(e=>d(e)?j(e):e))},entries(){return Et(this,"entries",t=>(t[1]=w(this,t[1]),t))},every(t,e){return R(this,"every",t,e,void 0,arguments)},filter(t,e){return R(this,"filter",t,e,n=>n.map(r=>w(this,r)),arguments)},find(t,e){return R(this,"find",t,e,n=>w(this,n),arguments)},findIndex(t,e){return R(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return R(this,"findLast",t,e,n=>w(this,n),arguments)},findLastIndex(t,e){return R(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return R(this,"forEach",t,e,void 0,arguments)},includes(...t){return Nt(this,"includes",t)},indexOf(...t){return Nt(this,"indexOf",t)},join(t){return j(this).join(t)},lastIndexOf(...t){return Nt(this,"lastIndexOf",t)},map(t,e){return R(this,"map",t,e,void 0,arguments)},pop(){return q(this,"pop")},push(...t){return q(this,"push",t)},reduce(t,...e){return zt(this,"reduce",t,e)},reduceRight(t,...e){return zt(this,"reduceRight",t,e)},shift(){return q(this,"shift")},some(t,e){return R(this,"some",t,e,void 0,arguments)},splice(...t){return q(this,"splice",t)},toReversed(){return j(this).toReversed()},toSorted(t){return j(this).toSorted(t)},toSpliced(...t){return j(this).toSpliced(...t)},unshift(...t){return q(this,"unshift",t)},values(){return Et(this,"values",t=>w(this,t))}};function Et(t,e,n){const r=wt(t),s=r[e]();return r!==t&&!S(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const Pe=Array.prototype;function R(t,e,n,r,s,i){const o=wt(t),c=o!==t&&!S(t),a=o[e];if(a!==Pe[e]){const l=a.apply(t,i);return c?C(l):l}let u=n;o!==t&&(c?u=function(l,f){return n.call(this,w(t,l),f,t)}:n.length>2&&(u=function(l,f){return n.call(this,l,f,t)}));const h=a.call(o,u,r);return c&&s?s(h):h}function zt(t,e,n,r){const s=wt(t),i=s!==t&&!S(t);let o=n,c=!1;s!==t&&(i?(c=r.length===0,o=function(u,h,l){return c&&(c=!1,u=w(t,u)),n.call(this,u,w(t,h),l,t)}):n.length>3&&(o=function(u,h,l){return n.call(this,u,h,l,t)}));const a=s[e](o,...r);return c?w(t,a):a}function Nt(t,e,n){const r=p(t);g(r,"iterate",U);const s=r[e](...n);return(s===-1||s===!1)&&J(n[0])?(n[0]=p(n[0]),r[e](...n)):s}function q(t,e,n=[]){et(),St();const r=p(t)[e].apply(t,n);return yt(),nt(),r}const Fe=Ee("__proto__,__v_isRef,__isVue"),Ut=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(T));function ke(t){T(t)||(t=String(t));const e=p(this);return g(e,"has",t),e.hasOwnProperty(t)}class qt{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Be:Gt:i?Je:Yt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const o=d(e);if(!s){let a;if(o&&(a=Me[n]))return a;if(n==="hasOwnProperty")return ke}const c=Reflect.get(e,n,m(e)?e:r);if((T(n)?Ut.has(n):Fe(n))||(s||g(e,"get",n),i))return c;if(m(c)){const a=o&&X(n)?c:c.value;return s&&b(a)?Rt(a):a}return b(c)?s?Rt(c):Qt(c):c}}class je extends qt{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];const o=d(e)&&X(n);if(!this._isShallow){const u=E(i);if(!S(r)&&!E(r)&&(i=p(i),r=p(r)),!o&&m(i)&&!m(r))return u?(process.env.NODE_ENV!=="production"&&k(`Set operation on key "${String(n)}" failed: target is readonly.`,e[n]),!0):(i.value=r,!0)}const c=o?Number(n)<e.length:_t(e,n),a=Reflect.set(e,n,r,m(e)?e:s);return e===p(s)&&a&&(c?x(r,i)&&D(e,"set",n,r,i):D(e,"add",n,r)),a}deleteProperty(e,n){const r=_t(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&D(e,"delete",n,void 0,s),i}has(e,n){const r=Reflect.has(e,n);return(!T(n)||!Ut.has(n))&&g(e,"has",n),r}ownKeys(e){return g(e,"iterate",d(e)?"length":M),Reflect.ownKeys(e)}}class Ke extends qt{constructor(e=!1){super(!0,e)}set(e,n){return process.env.NODE_ENV!=="production"&&k(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return process.env.NODE_ENV!=="production"&&k(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}}const He=new je,Le=new Ke,vt=t=>t,rt=t=>Reflect.getPrototypeOf(t);function We(t,e,n){return function(...r){const s=this.__v_raw,i=p(s),o=z(i),c=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,u=s[t](...r),h=n?vt:e?B:C;return!e&&g(i,"iterate",a?Ot:M),V(Object.create(u),{next(){const{value:l,done:f}=u.next();return f?{value:l,done:f}:{value:c?[h(l[0]),h(l[1])]:h(l),done:f}}})}}function it(t){return function(...e){if(process.env.NODE_ENV!=="production"){const n=e[0]?`on key "${e[0]}" `:"";k(`${Ae(t)} operation ${n}failed: target is readonly.`,p(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function ze(t,e){const n={get(s){const i=this.__v_raw,o=p(i),c=p(s);t||(x(s,c)&&g(o,"get",s),g(o,"get",c));const{has:a}=rt(o),u=e?vt:t?B:C;if(a.call(o,s))return u(i.get(s));if(a.call(o,c))return u(i.get(c));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!t&&g(p(s),"iterate",M),s.size},has(s){const i=this.__v_raw,o=p(i),c=p(s);return t||(x(s,c)&&g(o,"has",s),g(o,"has",c)),s===c?i.has(s):i.has(s)||i.has(c)},forEach(s,i){const o=this,c=o.__v_raw,a=p(c),u=e?vt:t?B:C;return!t&&g(a,"iterate",M),c.forEach((h,l)=>s.call(i,u(h),u(l),o))}};return V(n,t?{add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear")}:{add(s){const i=p(this),o=rt(i),c=p(s),a=!e&&!S(s)&&!E(s)?c:s;return o.has.call(i,a)||x(s,a)&&o.has.call(i,s)||x(c,a)&&o.has.call(i,c)||(i.add(a),D(i,"add",a,a)),this},set(s,i){!e&&!S(i)&&!E(i)&&(i=p(i));const o=p(this),{has:c,get:a}=rt(o);let u=c.call(o,s);u?process.env.NODE_ENV!=="production"&&Bt(o,c,s):(s=p(s),u=c.call(o,s));const h=a.call(o,s);return o.set(s,i),u?x(i,h)&&D(o,"set",s,i,h):D(o,"add",s,i),this},delete(s){const i=p(this),{has:o,get:c}=rt(i);let a=o.call(i,s);a?process.env.NODE_ENV!=="production"&&Bt(i,o,s):(s=p(s),a=o.call(i,s));const u=c?c.call(i,s):void 0,h=i.delete(s);return a&&D(i,"delete",s,void 0,u),h},clear(){const s=p(this),i=s.size!==0,o=process.env.NODE_ENV!=="production"?z(s)?new Map(s):new Set(s):void 0,c=s.clear();return i&&D(s,"clear",void 0,void 0,o),c}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=We(s,t,e)}),n}function Jt(t,e){const n=ze(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(_t(n,s)&&s in r?n:r,s,i)}const Ue={get:Jt(!1,!1)},qe={get:Jt(!0,!1)};function Bt(t,e,n){const r=p(n);if(r!==n&&e.call(t,r)){const s=jt(t);k(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Yt=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Be=new WeakMap;function Ye(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qt(t){return E(t)?t:Xt(t,!1,He,Ue,Yt)}function Rt(t){return Xt(t,!0,Le,qe,Gt)}function Xt(t,e,n,r,s){if(!b(t))return process.env.NODE_ENV!=="production"&&k(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const i=s.get(t);if(i)return i;const o=Ye(jt(t));if(o===0)return t;const c=new Proxy(t,o===2?r:n);return s.set(t,c),c}function Ct(t){return E(t)?Ct(t.__v_raw):!!(t&&t.__v_isReactive)}function E(t){return!!(t&&t.__v_isReadonly)}function S(t){return!!(t&&t.__v_isShallow)}function J(t){return t?!!t.__v_raw:!1}function p(t){const e=t&&t.__v_raw;return e?p(e):t}const C=t=>b(t)?Qt(t):t,B=t=>b(t)?Rt(t):t;function m(t){return t?t.__v_isRef===!0:!1}function Zt(t){return Ge(t,!1)}function Ge(t,e){return m(t)?t:new Qe(t,e)}class Qe{constructor(e,n){this.dep=new Wt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:p(e),this._value=n?e:C(e),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||S(e)||E(e);e=r?e:p(e),x(e,n)&&(this._rawValue=e,this._value=r?e:C(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}}function Xe(t){return m(t)?t.value:t}class Ze{constructor(e,n,r){this._object=e,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._key=T(n)?n:String(n),this._raw=p(e);let s=!0,i=e;if(!d(e)||T(this._key)||!X(this._key))do s=!J(i)||S(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=Xe(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&m(this._raw[this._key])){const n=this._object[this._key];if(m(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return xe(this._raw,this._key)}}class tn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function en(t,e,n){return m(t)?t:I(t)?new tn(t):b(t)&&arguments.length>1?nn(t,e,n):Zt(t)}function nn(t,e,n){return new Ze(t,e,n)}const P=[];function sn(t){P.push(t)}function rn(){P.pop()}let At=!1;function K(t,...e){if(At)return;At=!0,et();const n=P.length?P[P.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=on();if(r)It(r,n,11,[t+e.map(i=>{var o,c;return(c=(o=i.toString)==null?void 0:o.call(i))!=null?c:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${_e(n,i.type)}>`).join(`
1
+ (function(_,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],F):(_=typeof globalThis<"u"?globalThis:_||self,F(_["pinia-plugin-subscription"]={},_.Pinia))})(this,(function(_,F){"use strict";class Se{_console;_createInstance;_name;_pluginOptions;_storeInstance;_resetStoreCallback;_storeOnActionSubscription;_storeMutationSubscription;_subscriptions;pluginCreated;get console(){return this._console??console}get name(){return this._name}get pluginOptions(){return this._pluginOptions??{}}set pluginOptions(e){this._pluginOptions=e}get resetStoreCallback(){return this._resetStoreCallback}get storeOnActionSubscription(){return this._storeOnActionSubscription}get storeMutationSubscription(){return this._storeMutationSubscription}get subscriptions(){return this._subscriptions}set subscriptions(e){this._subscriptions=e}constructor(e,n,r){this._name=e,this._createInstance=n,r&&(this._console=r)}invoke({store:e,options:n},r){return this._storeInstance=this._createInstance(e,{...n,...this.pluginOptions},r,this.console),this._storeInstance?(this._subscriptions=this._storeInstance.getSubscriptions(),this._storeMutationSubscription=this._storeInstance.storeSubscribe,this._storeOnActionSubscription=this._storeInstance.onAction,this.pluginCreated&&this.pluginCreated(e),!0):!1}}class Tt{_console;_debug=!1;get console(){return this._console??console}set console(e){this._console=e}get debug(){return this._debug}set debug(e){this._debug=e}constructor(e,n){this._debug=e,n&&(this._console=n)}debugLog(...e){this._debug&&(Array.isArray(e)&&(e[0]=`${this._className} - ${e[0]}`),this.console.log(...e))}logError(...e){this.console.error(...e)}}const ht="pinia-plugin-subscription",ye=(t,e="white")=>`background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;function Oe(t,e){if(!t)throw new Error("Style instructions are required");console.log("%c%s",t,e.shift(),...e)}class xt{_bgColor="#ffec73";_color="green";_icon="🍍⚡";_errorBgColor="#d24545";_errorColor="white";_errorIcon="🍍⚠️";_styles={error:{bgColor:this._errorBgColor,color:this._errorColor,icon:this._errorIcon},info:{bgColor:this._bgColor,color:this._color,icon:this._icon}};formatMessage(e,n){return` [${n} ${ht}] - ${e} `}generateStyle(e){return ye(e.bgColor,e.color)}getStyleDefinition(e){return this._styles[e??"info"]}log(...e){this.useLog(this.getStyleDefinition(),e)}error(...e){this.useLog(this.getStyleDefinition("error"),e)}rebuildArgs(e,n){if(typeof e=="string")return[this.formatMessage(e,n)];if(Array.isArray(e))return[this.formatMessage(e.shift(),n),...e??[]]}useLog(e,n){Oe(this.generateStyle(e),this.rebuildArgs(n,e.icon))}}class we extends xt{_pluginName=ht}const Ee=new we;function Q(t){return t?Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.trim()==="":!1:!(typeof t=="boolean"||typeof t=="number")}const Mt="PluginSubscription";class Pt extends Tt{_className=Mt;_pluginDebug;_resetStoreCallback=[];_subscribers=[];_subscribersDelivered=new Set;_subscriptions=[];_subscriptionsDelivered=new Set;set subscribers(e){this._subscribers=e}get subscriptions(){if(!Q(this._subscriptions))return this._subscriptions}constructor(e,n){super(Array.isArray(n)&&!!n?.includes(Mt),Ee),this._pluginDebug=Array.isArray(n)?n:void 0,this._subscribers=e}addResetStoreCallback(e){this._resetStoreCallback.push(e)}definePluginDebug(e){return!!this._pluginDebug?.includes(e.name)}executeResetStoreCallbacks(e){this._resetStoreCallback.forEach(n=>n(e))}plugin({store:e,options:n}){if(this._subscribers.length){this.debugLog(`plugin() - ${e.$id}`,["subscriber:",this._subscribers,"store:",e,"options:",n]);try{this._subscribers.forEach(r=>{this._subscribersDelivered.has(`${r.name}-${e.$id}`)||r.invoke({store:e,options:n},this.definePluginDebug(r))&&(this._subscribersDelivered.add(`${r.name}-${e.$id}`),r.subscriptions&&this.subscriptionDelivery({store:e,options:n},r.subscriptions),r.storeMutationSubscription&&this.storeMutationSubscription(r.storeMutationSubscription),r.storeOnActionSubscription&&this.storeOnActionSubscription(r.storeOnActionSubscription),r.resetStoreCallback&&this.addResetStoreCallback(r.resetStoreCallback))}),this.rewriteResetStore({store:e},JSON.stringify(e.$state),Object.assign({},e))}catch(r){this.logError(r,e,n)}}}rewriteResetStore({store:e},n,r){e.$reset=()=>{this.debugLog("rewriteResetStore()",{initState:n,store:e,customStore:r}),this.executeResetStoreCallbacks(e),e.$patch(JSON.parse(n))}}storeOnActionSubscription(e){const{store:n,callback:r}=e();n.$onAction(({after:s,args:i,name:o})=>{this.debugLog(`storeOnActionSubscription ${n.$id}`,{after:s,args:i,name:o,store:n}),r({after:s,args:i,name:o})})}storeMutationSubscription(e){const{store:n,callback:r}=e();n.$subscribe(s=>{this.debugLog(`$subscribe ${n.$id}`,{mutation:s,store:n}),r(s)})}subscriptionDelivery({store:e,options:n},r){Object.entries(r).forEach(([s,i])=>{try{if(this._subscriptionsDelivered.has(`${s}-${e.$id}`))return;const{subscription:o,subscriptionOptions:c,stores:a}=i;this.debugLog(`subscriptionDelivery() - store: ${e.$id}`,["pluginName:",s,"subscription:",o,"options:",i,"stores:",a]);const u={storeOptions:{...n?.storeOptions??{},...c}};o.invoke({store:e,options:{...n,...u}},this.debug),this._subscriptionsDelivered.add(`${s}-${e.$id}`),Q(a)||a?.forEach(h=>o.invoke({store:h,options:{...n,...u,...h?.storeOptions??{}}},this.debug))}catch(o){this.logError("subscriptionDelivery()",o,e,n)}})}}function Ne(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const dt=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ft=()=>{},ve=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Re=t=>t.startsWith("onUpdate:"),V=Object.assign,Ce=Object.prototype.hasOwnProperty,_t=(t,e)=>Ce.call(t,e),d=Array.isArray,z=t=>kt(t)==="[object Map]",I=t=>typeof t=="function",v=t=>typeof t=="string",T=t=>typeof t=="symbol",b=t=>t!==null&&typeof t=="object",Ae=Object.prototype.toString,kt=t=>Ae.call(t),jt=t=>kt(t).slice(8,-1),X=t=>v(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ie=(t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))})(t=>t.charAt(0).toUpperCase()+t.slice(1)),x=(t,e)=>!Object.is(t,e);let Kt;const Z=()=>Kt||(Kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gt(t){if(d(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],s=v(r)?Te(r):gt(r);if(s)for(const i in s)e[i]=s[i]}return e}else if(v(t)||b(t))return t}const $e=/;(?![^(]*\))/g,De=/:([^]+)/,Ve=/\/\*[^]*?\*\//g;function Te(t){const e={};return t.replace(Ve,"").split($e).forEach(n=>{if(n){const r=n.split(De);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function bt(t){let e="";if(v(t))e=t;else if(d(t))for(let n=0;n<t.length;n++){const r=bt(t[n]);r&&(e+=r+" ")}else if(b(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function k(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let xe,Ht=0,mt;function St(){Ht++}function yt(){if(--Ht>0)return;let t;for(;mt;){let e=mt;for(mt=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}let tt=!0;const Lt=[];function et(){Lt.push(tt),tt=!1}function nt(){const t=Lt.pop();tt=t===void 0?!0:t}class Wt{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(e){}trigger(e){this.version++,this.notify(e)}notify(e){St();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(V({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{yt()}}}const st=new WeakMap,M=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Ot=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),U=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function g(t,e,n){if(tt&&xe){let r=st.get(t);r||st.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new Wt),s.map=r,s.key=n),process.env.NODE_ENV!=="production"?s.track({target:t,type:e,key:n}):s.track()}}function $(t,e,n,r,s,i){const o=st.get(t);if(!o)return;const c=a=>{a&&(process.env.NODE_ENV!=="production"?a.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i}):a.trigger())};if(St(),e==="clear")o.forEach(c);else{const a=d(t),u=a&&X(n);if(a&&n==="length"){const h=Number(r);o.forEach((l,f)=>{(f==="length"||f===U||!T(f)&&f>=h)&&c(l)})}else switch((n!==void 0||o.has(void 0))&&c(o.get(n)),u&&c(o.get(U)),e){case"add":a?u&&c(o.get("length")):(c(o.get(M)),z(t)&&c(o.get(Ot)));break;case"delete":a||(c(o.get(M)),z(t)&&c(o.get(Ot)));break;case"set":z(t)&&c(o.get(M));break}}yt()}function Me(t,e){const n=st.get(t);return n&&n.get(e)}function j(t){const e=p(t);return e===t?e:(g(e,"iterate",U),S(t)?e:e.map(C))}function wt(t){return g(t=p(t),"iterate",U),t}function w(t,e){return E(t)?J(Ct(t)?C(e):e):C(e)}const Pe={__proto__:null,[Symbol.iterator](){return Et(this,Symbol.iterator,t=>w(this,t))},concat(...t){return j(this).concat(...t.map(e=>d(e)?j(e):e))},entries(){return Et(this,"entries",t=>(t[1]=w(this,t[1]),t))},every(t,e){return R(this,"every",t,e,void 0,arguments)},filter(t,e){return R(this,"filter",t,e,n=>n.map(r=>w(this,r)),arguments)},find(t,e){return R(this,"find",t,e,n=>w(this,n),arguments)},findIndex(t,e){return R(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return R(this,"findLast",t,e,n=>w(this,n),arguments)},findLastIndex(t,e){return R(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return R(this,"forEach",t,e,void 0,arguments)},includes(...t){return Nt(this,"includes",t)},indexOf(...t){return Nt(this,"indexOf",t)},join(t){return j(this).join(t)},lastIndexOf(...t){return Nt(this,"lastIndexOf",t)},map(t,e){return R(this,"map",t,e,void 0,arguments)},pop(){return q(this,"pop")},push(...t){return q(this,"push",t)},reduce(t,...e){return zt(this,"reduce",t,e)},reduceRight(t,...e){return zt(this,"reduceRight",t,e)},shift(){return q(this,"shift")},some(t,e){return R(this,"some",t,e,void 0,arguments)},splice(...t){return q(this,"splice",t)},toReversed(){return j(this).toReversed()},toSorted(t){return j(this).toSorted(t)},toSpliced(...t){return j(this).toSpliced(...t)},unshift(...t){return q(this,"unshift",t)},values(){return Et(this,"values",t=>w(this,t))}};function Et(t,e,n){const r=wt(t),s=r[e]();return r!==t&&!S(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const Fe=Array.prototype;function R(t,e,n,r,s,i){const o=wt(t),c=o!==t&&!S(t),a=o[e];if(a!==Fe[e]){const l=a.apply(t,i);return c?C(l):l}let u=n;o!==t&&(c?u=function(l,f){return n.call(this,w(t,l),f,t)}:n.length>2&&(u=function(l,f){return n.call(this,l,f,t)}));const h=a.call(o,u,r);return c&&s?s(h):h}function zt(t,e,n,r){const s=wt(t),i=s!==t&&!S(t);let o=n,c=!1;s!==t&&(i?(c=r.length===0,o=function(u,h,l){return c&&(c=!1,u=w(t,u)),n.call(this,u,w(t,h),l,t)}):n.length>3&&(o=function(u,h,l){return n.call(this,u,h,l,t)}));const a=s[e](o,...r);return c?w(t,a):a}function Nt(t,e,n){const r=p(t);g(r,"iterate",U);const s=r[e](...n);return(s===-1||s===!1)&&B(n[0])?(n[0]=p(n[0]),r[e](...n)):s}function q(t,e,n=[]){et(),St();const r=p(t)[e].apply(t,n);return yt(),nt(),r}const ke=Ne("__proto__,__v_isRef,__isVue"),Ut=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(T));function je(t){T(t)||(t=String(t));const e=p(this);return g(e,"has",t),e.hasOwnProperty(t)}class qt{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Ye:Gt:i?Je:Yt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const o=d(e);if(!s){let a;if(o&&(a=Pe[n]))return a;if(n==="hasOwnProperty")return je}const c=Reflect.get(e,n,m(e)?e:r);if((T(n)?Ut.has(n):ke(n))||(s||g(e,"get",n),i))return c;if(m(c)){const a=o&&X(n)?c:c.value;return s&&b(a)?Rt(a):a}return b(c)?s?Rt(c):Qt(c):c}}class Ke extends qt{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];const o=d(e)&&X(n);if(!this._isShallow){const u=E(i);if(!S(r)&&!E(r)&&(i=p(i),r=p(r)),!o&&m(i)&&!m(r))return u?(process.env.NODE_ENV!=="production"&&k(`Set operation on key "${String(n)}" failed: target is readonly.`,e[n]),!0):(i.value=r,!0)}const c=o?Number(n)<e.length:_t(e,n),a=Reflect.set(e,n,r,m(e)?e:s);return e===p(s)&&a&&(c?x(r,i)&&$(e,"set",n,r,i):$(e,"add",n,r)),a}deleteProperty(e,n){const r=_t(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&$(e,"delete",n,void 0,s),i}has(e,n){const r=Reflect.has(e,n);return(!T(n)||!Ut.has(n))&&g(e,"has",n),r}ownKeys(e){return g(e,"iterate",d(e)?"length":M),Reflect.ownKeys(e)}}class He extends qt{constructor(e=!1){super(!0,e)}set(e,n){return process.env.NODE_ENV!=="production"&&k(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return process.env.NODE_ENV!=="production"&&k(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}}const Le=new Ke,We=new He,vt=t=>t,rt=t=>Reflect.getPrototypeOf(t);function ze(t,e,n){return function(...r){const s=this.__v_raw,i=p(s),o=z(i),c=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,u=s[t](...r),h=n?vt:e?J:C;return!e&&g(i,"iterate",a?Ot:M),V(Object.create(u),{next(){const{value:l,done:f}=u.next();return f?{value:l,done:f}:{value:c?[h(l[0]),h(l[1])]:h(l),done:f}}})}}function it(t){return function(...e){if(process.env.NODE_ENV!=="production"){const n=e[0]?`on key "${e[0]}" `:"";k(`${Ie(t)} operation ${n}failed: target is readonly.`,p(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Ue(t,e){const n={get(s){const i=this.__v_raw,o=p(i),c=p(s);t||(x(s,c)&&g(o,"get",s),g(o,"get",c));const{has:a}=rt(o),u=e?vt:t?J:C;if(a.call(o,s))return u(i.get(s));if(a.call(o,c))return u(i.get(c));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!t&&g(p(s),"iterate",M),s.size},has(s){const i=this.__v_raw,o=p(i),c=p(s);return t||(x(s,c)&&g(o,"has",s),g(o,"has",c)),s===c?i.has(s):i.has(s)||i.has(c)},forEach(s,i){const o=this,c=o.__v_raw,a=p(c),u=e?vt:t?J:C;return!t&&g(a,"iterate",M),c.forEach((h,l)=>s.call(i,u(h),u(l),o))}};return V(n,t?{add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear")}:{add(s){const i=p(this),o=rt(i),c=p(s),a=!e&&!S(s)&&!E(s)?c:s;return o.has.call(i,a)||x(s,a)&&o.has.call(i,s)||x(c,a)&&o.has.call(i,c)||(i.add(a),$(i,"add",a,a)),this},set(s,i){!e&&!S(i)&&!E(i)&&(i=p(i));const o=p(this),{has:c,get:a}=rt(o);let u=c.call(o,s);u?process.env.NODE_ENV!=="production"&&Jt(o,c,s):(s=p(s),u=c.call(o,s));const h=a.call(o,s);return o.set(s,i),u?x(i,h)&&$(o,"set",s,i,h):$(o,"add",s,i),this},delete(s){const i=p(this),{has:o,get:c}=rt(i);let a=o.call(i,s);a?process.env.NODE_ENV!=="production"&&Jt(i,o,s):(s=p(s),a=o.call(i,s));const u=c?c.call(i,s):void 0,h=i.delete(s);return a&&$(i,"delete",s,void 0,u),h},clear(){const s=p(this),i=s.size!==0,o=process.env.NODE_ENV!=="production"?z(s)?new Map(s):new Set(s):void 0,c=s.clear();return i&&$(s,"clear",void 0,void 0,o),c}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=ze(s,t,e)}),n}function Bt(t,e){const n=Ue(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(_t(n,s)&&s in r?n:r,s,i)}const qe={get:Bt(!1,!1)},Be={get:Bt(!0,!1)};function Jt(t,e,n){const r=p(n);if(r!==n&&e.call(t,r)){const s=jt(t);k(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Yt=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Ye=new WeakMap;function Ge(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qt(t){return E(t)?t:Xt(t,!1,Le,qe,Yt)}function Rt(t){return Xt(t,!0,We,Be,Gt)}function Xt(t,e,n,r,s){if(!b(t))return process.env.NODE_ENV!=="production"&&k(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const i=s.get(t);if(i)return i;const o=Ge(jt(t));if(o===0)return t;const c=new Proxy(t,o===2?r:n);return s.set(t,c),c}function Ct(t){return E(t)?Ct(t.__v_raw):!!(t&&t.__v_isReactive)}function E(t){return!!(t&&t.__v_isReadonly)}function S(t){return!!(t&&t.__v_isShallow)}function B(t){return t?!!t.__v_raw:!1}function p(t){const e=t&&t.__v_raw;return e?p(e):t}const C=t=>b(t)?Qt(t):t,J=t=>b(t)?Rt(t):t;function m(t){return t?t.__v_isRef===!0:!1}function Zt(t){return Qe(t,!1)}function Qe(t,e){return m(t)?t:new Xe(t,e)}class Xe{constructor(e,n){this.dep=new Wt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:p(e),this._value=n?e:C(e),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||S(e)||E(e);e=r?e:p(e),x(e,n)&&(this._rawValue=e,this._value=r?e:C(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}}function Ze(t){return m(t)?t.value:t}class tn{constructor(e,n,r){this._object=e,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._key=T(n)?n:String(n),this._raw=p(e);let s=!0,i=e;if(!d(e)||T(this._key)||!X(this._key))do s=!B(i)||S(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=Ze(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&m(this._raw[this._key])){const n=this._object[this._key];if(m(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return Me(this._raw,this._key)}}class en{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function nn(t,e,n){return m(t)?t:I(t)?new en(t):b(t)&&arguments.length>1?sn(t,e,n):Zt(t)}function sn(t,e,n){return new tn(t,e,n)}const P=[];function rn(t){P.push(t)}function on(){P.pop()}let At=!1;function K(t,...e){if(At)return;At=!0,et();const n=P.length?P[P.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=cn();if(r)It(r,n,11,[t+e.map(i=>{var o,c;return(c=(o=i.toString)==null?void 0:o.call(i))!=null?c:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${_e(n,i.type)}>`).join(`
2
2
  `),s]);else{const i=[`[Vue warn]: ${t}`,...e];s.length&&i.push(`
3
- `,...cn(s)),console.warn(...i)}nt(),At=!1}function on(){let t=P[P.length-1];if(!t)return[];const e=[];for(;t;){const n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});const r=t.component&&t.component.parent;t=r&&r.vnode}return e}function cn(t){const e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
4
- `],...ln(n))}),e}function ln({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${_e(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...an(t.props),i]:[s+i]}function an(t){const e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...te(r,t[r]))}),n.length>3&&e.push(" ..."),e}function te(t,e,n){return v(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:m(e)?(e=te(t,p(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):I(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=p(e),n?e:[`${t}=`,e])}const ee={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function It(t,e,n,r){try{return r?t(...r):t()}catch(s){ne(s,e,n)}}function ne(t,e,n,r=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||dt;if(e){let c=e.parent;const a=e.proxy,u=process.env.NODE_ENV!=="production"?ee[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let l=0;l<h.length;l++)if(h[l](t,a,u)===!1)return}c=c.parent}if(i){et(),It(i,null,10,[t,a,u]),nt();return}}un(t,n,s,r,o)}function un(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){const i=ee[e];if(n&&sn(n),K(`Unhandled error${i?` during execution of ${i}`:""}`),n&&rn(),r)throw t;console.error(t)}else{if(s)throw t;console.error(t)}}const y=[];let A=-1;const H=[];let $=null,L=0;const fn=Promise.resolve();let Dt=null;const pn=100;function hn(t){let e=A+1,n=y.length;for(;e<n;){const r=e+n>>>1,s=y[r],i=Y(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function dn(t){if(!(t.flags&1)){const e=Y(t),n=y[y.length-1];!n||!(t.flags&2)&&e>=Y(n)?y.push(t):y.splice(hn(e),0,t),t.flags|=1,se()}}function se(){Dt||(Dt=fn.then(re))}function _n(t){d(t)?H.push(...t):$&&t.id===-1?$.splice(L+1,0,t):t.flags&1||(H.push(t),t.flags|=1),se()}function gn(t){if(H.length){const e=[...new Set(H)].sort((n,r)=>Y(n)-Y(r));if(H.length=0,$){$.push(...e);return}for($=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),L=0;L<$.length;L++){const n=$[L];process.env.NODE_ENV!=="production"&&ie(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}$=null,L=0}}const Y=t=>t.id==null?t.flags&2?-1:1/0:t.id;function re(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);const e=process.env.NODE_ENV!=="production"?n=>ie(t,n):Ft;try{for(A=0;A<y.length;A++){const n=y[A];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),It(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;A<y.length;A++){const n=y[A];n&&(n.flags&=-2)}A=-1,y.length=0,gn(t),Dt=null,(y.length||H.length)&&re(t)}}function ie(t,e){const n=t.get(e)||0;if(n>pn){const r=e.i,s=r&&de(r.type);return ne(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}const $t=new Map;process.env.NODE_ENV!=="production"&&(Z().__VUE_HMR_RUNTIME__={createRecord:Vt(bn),rerender:Vt(mn),reload:Vt(Sn)});const ot=new Map;function bn(t,e){return ot.has(t)?!1:(ot.set(t,{initialDef:ct(e),instances:new Set}),!0)}function ct(t){return ge(t)?t.__vccOpts:t}function mn(t,e){const n=ot.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,ct(r.type).render=e),r.renderCache=[],r.job.flags&8||r.update()}))}function Sn(t,e){const n=ot.get(t);if(!n)return;e=ct(e),oe(n.initialDef,e);const r=[...n.instances];for(let s=0;s<r.length;s++){const i=r[s],o=ct(i.type);let c=$t.get(o);c||(o!==n.initialDef&&oe(o,e),$t.set(o,c=new Set)),c.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(c.add(i),i.ceReload(e.styles),c.delete(i)):i.parent?dn(()=>{i.job.flags&8||(i.parent.update(),c.delete(i))}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}_n(()=>{$t.clear()})}function oe(t,e){V(t,e);for(const n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Vt(t){return(e,n)=>{try{return t(e,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let W,lt=[];function ce(t,e){var n,r;W=t,W?(W.enabled=!0,lt.forEach(({event:s,args:i})=>W.emit(s,...i)),lt=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{ce(i,e)}),setTimeout(()=>{W||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,lt=[])},3e3)):lt=[]}let at=null,yn=null;const On=t=>t.__isTeleport;function le(t,e){t.shapeFlag&6&&t.component?(t.transition=e,le(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Z().requestIdleCallback,Z().cancelIdleCallback;const wn=Symbol.for("v-ndc"),En={};process.env.NODE_ENV!=="production"&&(En.ownKeys=t=>(K("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t)));const Nn={},ae=t=>Object.getPrototypeOf(t)===Nn,vn=t=>t.__isSuspense,ue=Symbol.for("v-fgt"),Rn=Symbol.for("v-txt"),Cn=Symbol.for("v-cmt");function An(t){return t?t.__v_isVNode===!0:!1}const In=(...t)=>pe(...t),fe=({key:t})=>t??null,ut=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?v(t)||m(t)||I(t)?{i:at,r:t,k:e,f:!!n}:t:null);function Dn(t,e=null,n=null,r=0,s=null,i=t===ue?0:1,o=!1,c=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&fe(e),ref:e&&ut(e),scopeId:yn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:at};return c?(pt(a,n),i&128&&t.normalize(a)):n&&(a.shapeFlag|=v(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&K("VNode created with invalid key (NaN). VNode type:",a.type),a}const $n=process.env.NODE_ENV!=="production"?In:pe;function pe(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===wn)&&(process.env.NODE_ENV!=="production"&&!t&&K(`Invalid vnode type when creating vnode: ${t}.`),t=Cn),An(t)){const c=ft(t,e,!0);return n&&pt(c,n),c.patchFlag=-2,c}if(ge(t)&&(t=t.__vccOpts),e){e=Vn(e);let{class:c,style:a}=e;c&&!v(c)&&(e.class=bt(c)),b(a)&&(J(a)&&!d(a)&&(a=V({},a)),e.style=gt(a))}const o=v(t)?1:vn(t)?128:On(t)?64:b(t)?4:I(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&J(t)&&(t=p(t),K("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
5
- Component that was made reactive: `,t)),Dn(t,e,n,r,s,o,i,!0)}function Vn(t){return t?J(t)||ae(t)?V({},t):t:null}function ft(t,e,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:c,transition:a}=t,u=e?xn(s||{},e):s,h={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&fe(u),ref:e&&e.ref?n&&i?d(i)?i.concat(ut(e)):[i,ut(e)]:ut(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&d(c)?c.map(he):c,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ue?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:a,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ft(t.ssContent),ssFallback:t.ssFallback&&ft(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return a&&r&&le(h,a.clone(h)),h}function he(t){const e=ft(t);return d(t.children)&&(e.children=t.children.map(he)),e}function Tn(t=" ",e=0){return $n(Rn,null,t,e)}function pt(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(d(e))n=16;else if(typeof e=="object")if(r&65){const s=e.default;s&&(s._c&&(s._d=!1),pt(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!ae(e)&&(e._ctx=at);else if(I(e)){if(r&65){pt(t,{default:e});return}e={default:e,_ctx:at},n=32}else e=String(e),r&64?(n=16,e=[Tn(e)]):n=8;t.children=e,t.shapeFlag|=n}function xn(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const s in r)if(s==="class")e.class!==r.class&&(e.class=bt([e.class,r.class]));else if(s==="style")e.style=gt([e.style,r.style]);else if(Ne(s)){const i=e[s],o=r[s];o&&i!==o&&!(d(i)&&i.includes(o))?e[s]=i?[].concat(i,o):o:o==null&&i==null&&!ve(s)&&(e[s]=o)}else s!==""&&(e[s]=r[s])}return e}{const t=Z(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const Mn=/(?:^|[-_])\w/g,Pn=t=>t.replace(Mn,e=>e.toUpperCase()).replace(/[-_]/g,"");function de(t,e=!0){return I(t)?t.displayName||t.name:t.name||e&&t.__name}function _e(t,e,n=!1){let r=de(e);if(!r&&e.__file){const s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t){const s=i=>{for(const o in i)if(i[o]===e)return o};r=s(t.components)||t.parent&&s(t.parent.type.components)||s(t.appContext.components)}return r?Pn(r):n?"App":"Anonymous"}function ge(t){return I(t)&&"__vccOpts"in t}function Fn(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(l){if(!b(l))return null;if(l.__isVue)return["div",t,"VueInstance"];if(m(l)){et();const f=l.value;return nt(),["div",{},["span",t,h(l)],"<",c(f),">"]}else{if(Ct(l))return["div",{},["span",t,S(l)?"ShallowReactive":"Reactive"],"<",c(l),`>${E(l)?" (readonly)":""}`];if(E(l))return["div",{},["span",t,S(l)?"ShallowReadonly":"Readonly"],"<",c(l),">"]}return null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...i(l.$)]}};function i(l){const f=[];l.type.props&&l.props&&f.push(o("props",p(l.props))),l.setupState!==dt&&f.push(o("setup",l.setupState)),l.data!==dt&&f.push(o("data",p(l.data)));const O=a(l,"computed");O&&f.push(o("computed",O));const N=a(l,"inject");return N&&f.push(o("injected",N)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),f}function o(l,f){return f=V({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(O=>["div",{},["span",r,O+": "],c(f[O],!1)])]]:["span",{}]}function c(l,f=!0){return typeof l=="number"?["span",e,l]:typeof l=="string"?["span",n,JSON.stringify(l)]:typeof l=="boolean"?["span",r,l]:b(l)?["object",{object:f?p(l):l}]:["span",n,String(l)]}function a(l,f){const O=l.type;if(I(O))return;const N={};for(const G in l.ctx)u(O,G,f)&&(N[G]=l.ctx[G]);return N}function u(l,f,O){const N=l[O];if(d(N)&&N.includes(f)||b(N)&&f in N||l.extends&&u(l.extends,f,O)||l.mixins&&l.mixins.some(G=>u(G,f,O)))return!0}function h(l){return S(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function kn(){Fn()}process.env.NODE_ENV!=="production"&&kn();const be=new WeakMap;function jn(t,e,n){const r=n?{storeOptions:n}:{};return typeof e=="function"?Hn(t,e,r):Ln(t,e,r)}function Kn(t){return be.get(t)}function Hn(t,e,n){const r={id:t,extensions:{}},s=F.defineStore(t,()=>e(r),n);return Object.assign(((...i)=>{const o=s(...i);return be.set(o,r),o}),s)}function Ln(t,e,n){return n&&(e={...e,...n??{}}),F.defineStore(t,e)}const Wn=new Set(["_","$"]);function zn(t){return Wn.has(t[0])}class Un extends Tt{_className="Store";_onAction;_options;_store;_subscriptions={};_storeSubscribe;static _requiredKeys;get onAction(){if(this._onAction)return()=>({store:this.store,callback:this._onAction})}set onAction(e){this._onAction=e}get options(){return this._options}get state(){return this._store.$state}set state(e){this._store.$state=e}get store(){return this._store}get storeSubscribe(){if(this._storeSubscribe)return()=>({store:this.store,callback:this._storeSubscribe})}set storeSubscribe(e){this._storeSubscribe=e}constructor(e,n,r=!1,s){super(r,s),this._options=n.storeOptions,this._store=e}addToState(e,n){this.isOptionApi()||n?.value||(n=Zt(n)),this.state[e]=n,this.store[e]=en(this.state,e)}addSubscription(e,n,r){this._subscriptions[e]={subscription:n,...r??{}}}static customizeStore(e,n,r=!1,s){if(n.storeOptions&&this.hasRequiredKeys(n.storeOptions))return new this(e,n,r,s)}hasDeniedFirstChar(e){return zn(e[0])}static hasRequiredKeys(e){return this._requiredKeys!==void 0&&this._requiredKeys?.every(n=>!!e[n])}getOption(e){return this.options&&this.options[e]}getStatePropertyValue(e){return this.getValue(this.state[e])}getSubscriptions(){if(!Q(this._subscriptions))return this._subscriptions}getValue(e){return e?.__v_isRef?e.value:e}isOptionApi(){return this.store._isOptionsAPI}stateHas(e){return this.state.hasOwnProperty(e)}storeHas(e){return this.store.hasOwnProperty(e)}}function qn(t,e){const n=new Pt(t,e);return n.plugin.bind(n)}_.CustomConsole=xt,_.PLUGIN_NAME=ht,_.PluginSubscriber=me,_.PluginSubscription=Pt,_.Store=Un,_.createPlugin=qn,_.defineAStore=jn,_.getDefineAStoreSetupContext=Kn,_.isEmpty=Q,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
3
+ `,...ln(s)),console.warn(...i)}nt(),At=!1}function cn(){let t=P[P.length-1];if(!t)return[];const e=[];for(;t;){const n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});const r=t.component&&t.component.parent;t=r&&r.vnode}return e}function ln(t){const e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
4
+ `],...an(n))}),e}function an({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${_e(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...un(t.props),i]:[s+i]}function un(t){const e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...te(r,t[r]))}),n.length>3&&e.push(" ..."),e}function te(t,e,n){return v(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:m(e)?(e=te(t,p(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):I(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=p(e),n?e:[`${t}=`,e])}const ee={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function It(t,e,n,r){try{return r?t(...r):t()}catch(s){ne(s,e,n)}}function ne(t,e,n,r=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||dt;if(e){let c=e.parent;const a=e.proxy,u=process.env.NODE_ENV!=="production"?ee[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let l=0;l<h.length;l++)if(h[l](t,a,u)===!1)return}c=c.parent}if(i){et(),It(i,null,10,[t,a,u]),nt();return}}fn(t,n,s,r,o)}function fn(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){const i=ee[e];if(n&&rn(n),K(`Unhandled error${i?` during execution of ${i}`:""}`),n&&on(),r)throw t;console.error(t)}else{if(s)throw t;console.error(t)}}const y=[];let A=-1;const H=[];let D=null,L=0;const pn=Promise.resolve();let $t=null;const hn=100;function dn(t){let e=A+1,n=y.length;for(;e<n;){const r=e+n>>>1,s=y[r],i=Y(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function _n(t){if(!(t.flags&1)){const e=Y(t),n=y[y.length-1];!n||!(t.flags&2)&&e>=Y(n)?y.push(t):y.splice(dn(e),0,t),t.flags|=1,se()}}function se(){$t||($t=pn.then(re))}function gn(t){d(t)?H.push(...t):D&&t.id===-1?D.splice(L+1,0,t):t.flags&1||(H.push(t),t.flags|=1),se()}function bn(t){if(H.length){const e=[...new Set(H)].sort((n,r)=>Y(n)-Y(r));if(H.length=0,D){D.push(...e);return}for(D=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),L=0;L<D.length;L++){const n=D[L];process.env.NODE_ENV!=="production"&&ie(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}D=null,L=0}}const Y=t=>t.id==null?t.flags&2?-1:1/0:t.id;function re(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);const e=process.env.NODE_ENV!=="production"?n=>ie(t,n):Ft;try{for(A=0;A<y.length;A++){const n=y[A];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),It(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;A<y.length;A++){const n=y[A];n&&(n.flags&=-2)}A=-1,y.length=0,bn(t),$t=null,(y.length||H.length)&&re(t)}}function ie(t,e){const n=t.get(e)||0;if(n>hn){const r=e.i,s=r&&de(r.type);return ne(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}const Dt=new Map;process.env.NODE_ENV!=="production"&&(Z().__VUE_HMR_RUNTIME__={createRecord:Vt(mn),rerender:Vt(Sn),reload:Vt(yn)});const ot=new Map;function mn(t,e){return ot.has(t)?!1:(ot.set(t,{initialDef:ct(e),instances:new Set}),!0)}function ct(t){return ge(t)?t.__vccOpts:t}function Sn(t,e){const n=ot.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,ct(r.type).render=e),r.renderCache=[],r.job.flags&8||r.update()}))}function yn(t,e){const n=ot.get(t);if(!n)return;e=ct(e),oe(n.initialDef,e);const r=[...n.instances];for(let s=0;s<r.length;s++){const i=r[s],o=ct(i.type);let c=Dt.get(o);c||(o!==n.initialDef&&oe(o,e),Dt.set(o,c=new Set)),c.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(c.add(i),i.ceReload(e.styles),c.delete(i)):i.parent?_n(()=>{i.job.flags&8||(i.parent.update(),c.delete(i))}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}gn(()=>{Dt.clear()})}function oe(t,e){V(t,e);for(const n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Vt(t){return(e,n)=>{try{return t(e,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let W,lt=[];function ce(t,e){var n,r;W=t,W?(W.enabled=!0,lt.forEach(({event:s,args:i})=>W.emit(s,...i)),lt=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{ce(i,e)}),setTimeout(()=>{W||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,lt=[])},3e3)):lt=[]}let at=null,On=null;const wn=t=>t.__isTeleport;function le(t,e){t.shapeFlag&6&&t.component?(t.transition=e,le(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Z().requestIdleCallback,Z().cancelIdleCallback;const En=Symbol.for("v-ndc"),Nn={};process.env.NODE_ENV!=="production"&&(Nn.ownKeys=t=>(K("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t)));const vn={},ae=t=>Object.getPrototypeOf(t)===vn,Rn=t=>t.__isSuspense,ue=Symbol.for("v-fgt"),Cn=Symbol.for("v-txt"),An=Symbol.for("v-cmt");function In(t){return t?t.__v_isVNode===!0:!1}const $n=(...t)=>pe(...t),fe=({key:t})=>t??null,ut=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?v(t)||m(t)||I(t)?{i:at,r:t,k:e,f:!!n}:t:null);function Dn(t,e=null,n=null,r=0,s=null,i=t===ue?0:1,o=!1,c=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&fe(e),ref:e&&ut(e),scopeId:On,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:at};return c?(pt(a,n),i&128&&t.normalize(a)):n&&(a.shapeFlag|=v(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&K("VNode created with invalid key (NaN). VNode type:",a.type),a}const Vn=process.env.NODE_ENV!=="production"?$n:pe;function pe(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===En)&&(process.env.NODE_ENV!=="production"&&!t&&K(`Invalid vnode type when creating vnode: ${t}.`),t=An),In(t)){const c=ft(t,e,!0);return n&&pt(c,n),c.patchFlag=-2,c}if(ge(t)&&(t=t.__vccOpts),e){e=Tn(e);let{class:c,style:a}=e;c&&!v(c)&&(e.class=bt(c)),b(a)&&(B(a)&&!d(a)&&(a=V({},a)),e.style=gt(a))}const o=v(t)?1:Rn(t)?128:wn(t)?64:b(t)?4:I(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&B(t)&&(t=p(t),K("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
5
+ Component that was made reactive: `,t)),Dn(t,e,n,r,s,o,i,!0)}function Tn(t){return t?B(t)||ae(t)?V({},t):t:null}function ft(t,e,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:c,transition:a}=t,u=e?Mn(s||{},e):s,h={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&fe(u),ref:e&&e.ref?n&&i?d(i)?i.concat(ut(e)):[i,ut(e)]:ut(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&d(c)?c.map(he):c,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ue?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:a,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ft(t.ssContent),ssFallback:t.ssFallback&&ft(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return a&&r&&le(h,a.clone(h)),h}function he(t){const e=ft(t);return d(t.children)&&(e.children=t.children.map(he)),e}function xn(t=" ",e=0){return Vn(Cn,null,t,e)}function pt(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(d(e))n=16;else if(typeof e=="object")if(r&65){const s=e.default;s&&(s._c&&(s._d=!1),pt(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!ae(e)&&(e._ctx=at);else if(I(e)){if(r&65){pt(t,{default:e});return}e={default:e,_ctx:at},n=32}else e=String(e),r&64?(n=16,e=[xn(e)]):n=8;t.children=e,t.shapeFlag|=n}function Mn(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const s in r)if(s==="class")e.class!==r.class&&(e.class=bt([e.class,r.class]));else if(s==="style")e.style=gt([e.style,r.style]);else if(ve(s)){const i=e[s],o=r[s];o&&i!==o&&!(d(i)&&i.includes(o))?e[s]=i?[].concat(i,o):o:o==null&&i==null&&!Re(s)&&(e[s]=o)}else s!==""&&(e[s]=r[s])}return e}{const t=Z(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const Pn=/(?:^|[-_])\w/g,Fn=t=>t.replace(Pn,e=>e.toUpperCase()).replace(/[-_]/g,"");function de(t,e=!0){return I(t)?t.displayName||t.name:t.name||e&&t.__name}function _e(t,e,n=!1){let r=de(e);if(!r&&e.__file){const s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t){const s=i=>{for(const o in i)if(i[o]===e)return o};r=s(t.components)||t.parent&&s(t.parent.type.components)||s(t.appContext.components)}return r?Fn(r):n?"App":"Anonymous"}function ge(t){return I(t)&&"__vccOpts"in t}function kn(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(l){if(!b(l))return null;if(l.__isVue)return["div",t,"VueInstance"];if(m(l)){et();const f=l.value;return nt(),["div",{},["span",t,h(l)],"<",c(f),">"]}else{if(Ct(l))return["div",{},["span",t,S(l)?"ShallowReactive":"Reactive"],"<",c(l),`>${E(l)?" (readonly)":""}`];if(E(l))return["div",{},["span",t,S(l)?"ShallowReadonly":"Readonly"],"<",c(l),">"]}return null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...i(l.$)]}};function i(l){const f=[];l.type.props&&l.props&&f.push(o("props",p(l.props))),l.setupState!==dt&&f.push(o("setup",l.setupState)),l.data!==dt&&f.push(o("data",p(l.data)));const O=a(l,"computed");O&&f.push(o("computed",O));const N=a(l,"inject");return N&&f.push(o("injected",N)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),f}function o(l,f){return f=V({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(O=>["div",{},["span",r,O+": "],c(f[O],!1)])]]:["span",{}]}function c(l,f=!0){return typeof l=="number"?["span",e,l]:typeof l=="string"?["span",n,JSON.stringify(l)]:typeof l=="boolean"?["span",r,l]:b(l)?["object",{object:f?p(l):l}]:["span",n,String(l)]}function a(l,f){const O=l.type;if(I(O))return;const N={};for(const G in l.ctx)u(O,G,f)&&(N[G]=l.ctx[G]);return N}function u(l,f,O){const N=l[O];if(d(N)&&N.includes(f)||b(N)&&f in N||l.extends&&u(l.extends,f,O)||l.mixins&&l.mixins.some(G=>u(G,f,O)))return!0}function h(l){return S(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function jn(){kn()}process.env.NODE_ENV!=="production"&&jn();const be=new WeakMap,me=new Map;function Kn(t,e,n){const r=n?{storeOptions:n}:{};return typeof e=="function"?Ln(t,e,r):Wn(t,e,r)}function Hn(t){return be.get(t)??(typeof t?.$id=="string"?me.get(t.$id):void 0)}function Ln(t,e,n){const r={id:t,extensions:{}};me.set(t,r);const s=F.defineStore(t,()=>e(r),n);return Object.assign(((...i)=>{const o=s(...i);return be.set(o,r),o}),s)}function Wn(t,e,n){return n&&(e={...e,...n??{}}),F.defineStore(t,e)}const zn=new Set(["_","$"]);function Un(t){return zn.has(t[0])}class qn extends Tt{_className="Store";_onAction;_options;_store;_subscriptions={};_storeSubscribe;static _requiredKeys;get onAction(){if(this._onAction)return()=>({store:this.store,callback:this._onAction})}set onAction(e){this._onAction=e}get options(){return this._options}get state(){return this._store.$state}set state(e){this._store.$state=e}get store(){return this._store}get storeSubscribe(){if(this._storeSubscribe)return()=>({store:this.store,callback:this._storeSubscribe})}set storeSubscribe(e){this._storeSubscribe=e}constructor(e,n,r=!1,s){super(r,s),this._options=n.storeOptions,this._store=e}addToState(e,n){this.isOptionApi()||n?.value||(n=Zt(n)),this.state[e]=n,this.store[e]=nn(this.state,e)}addSubscription(e,n,r){this._subscriptions[e]={subscription:n,...r??{}}}static customizeStore(e,n,r=!1,s){if(n.storeOptions&&this.hasRequiredKeys(n.storeOptions))return new this(e,n,r,s)}hasDeniedFirstChar(e){return Un(e[0])}static hasRequiredKeys(e){return this._requiredKeys!==void 0&&this._requiredKeys?.every(n=>!!e[n])}getOption(e){return this.options&&this.options[e]}getStatePropertyValue(e){return this.getValue(this.state[e])}getSubscriptions(){if(!Q(this._subscriptions))return this._subscriptions}getValue(e){return e?.__v_isRef?e.value:e}isOptionApi(){return this.store._isOptionsAPI}stateHas(e){return this.state.hasOwnProperty(e)}storeHas(e){return this.store.hasOwnProperty(e)}}function Bn(t,e){const n=new Pt(t,e);return n.plugin.bind(n)}_.CustomConsole=xt,_.PLUGIN_NAME=ht,_.PluginSubscriber=Se,_.PluginSubscription=Pt,_.Store=qn,_.createPlugin=Bn,_.defineAStore=Kn,_.getDefineAStoreSetupContext=Hn,_.isEmpty=Q,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinia-plugin-subscription",
3
- "version": "0.1.3-beta.0",
3
+ "version": "0.1.3-beta.1",
4
4
  "description": "Pinia plugin for Vue.js that helps building Pinia plugins by centralizing subscriber registration and providing a Store base class for store helpers.",
5
5
  "type": "module",
6
6
  "sideEffects": false,