pinia-plugin-subscription 0.0.0-beta.5 → 0.0.0-beta.6
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,4 +1,4 @@
|
|
|
1
|
-
import { defineStore as
|
|
1
|
+
import { defineStore as At } from "pinia";
|
|
2
2
|
class $n {
|
|
3
3
|
_createInstance;
|
|
4
4
|
_name;
|
|
@@ -33,7 +33,7 @@ class $n {
|
|
|
33
33
|
this._storeInstance = this._createInstance(e, n, s), this._storeInstance && (this._subscriptions = this._storeInstance.getSubscriptions(), this._storeMutationSubscription = this._storeInstance.storeSubscribe, this._storeOnActionSubscription = this._storeInstance.onAction, this.pluginCreated && this.pluginCreated(e));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const xt = "pinia-plugin-subscription", le = (t, e = "white") => `background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;
|
|
37
37
|
function ue(t, e) {
|
|
38
38
|
if (!t)
|
|
39
39
|
throw new Error("Style instructions are required");
|
|
@@ -57,7 +57,7 @@ class fe {
|
|
|
57
57
|
info: { bgColor: this._errorBgColor, color: this._errorColor, icon: this._errorIcon }
|
|
58
58
|
};
|
|
59
59
|
static formatMessage(e, n) {
|
|
60
|
-
return ` [${n} ${
|
|
60
|
+
return ` [${n} ${xt}] - ${e} `;
|
|
61
61
|
}
|
|
62
62
|
static generateStyle(e) {
|
|
63
63
|
return le(e.bgColor, e.color);
|
|
@@ -90,32 +90,32 @@ class fe {
|
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
class
|
|
94
|
-
static _pluginName =
|
|
93
|
+
class K extends fe {
|
|
94
|
+
static _pluginName = xt;
|
|
95
95
|
}
|
|
96
96
|
function Mn(t, e, n) {
|
|
97
97
|
const s = n ? { storeOptions: n } : {};
|
|
98
|
-
return typeof e == "function" ?
|
|
98
|
+
return typeof e == "function" ? pe(
|
|
99
99
|
t,
|
|
100
100
|
e,
|
|
101
101
|
s
|
|
102
|
-
) :
|
|
102
|
+
) : he(
|
|
103
103
|
t,
|
|
104
104
|
e,
|
|
105
105
|
s
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
|
-
function he(t, e, n) {
|
|
109
|
-
return xt(t, e, n);
|
|
110
|
-
}
|
|
111
108
|
function pe(t, e, n) {
|
|
112
|
-
return
|
|
109
|
+
return At(t, e, n);
|
|
110
|
+
}
|
|
111
|
+
function he(t, e, n) {
|
|
112
|
+
return n && (e = { ...e, ...n ?? {} }), At(t, e);
|
|
113
113
|
}
|
|
114
114
|
const de = /* @__PURE__ */ new Set(["_", "$"]);
|
|
115
|
-
function
|
|
115
|
+
function Tt(t) {
|
|
116
116
|
return de.has(t[0]);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Dt(t) {
|
|
119
119
|
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");
|
|
120
120
|
}
|
|
121
121
|
class _e {
|
|
@@ -130,94 +130,79 @@ class _e {
|
|
|
130
130
|
this._subscribers = e;
|
|
131
131
|
}
|
|
132
132
|
get subscriptions() {
|
|
133
|
-
if (!
|
|
133
|
+
if (!Dt(this._subscriptions))
|
|
134
134
|
return this._subscriptions;
|
|
135
135
|
}
|
|
136
136
|
addResetStoreCallback(e) {
|
|
137
137
|
this._resetStoreCallback.push(e);
|
|
138
138
|
}
|
|
139
|
-
addSubscriber(e) {
|
|
140
|
-
this._subscribers.push(e);
|
|
141
|
-
}
|
|
142
|
-
addSubscriptions(e) {
|
|
143
|
-
e && (this._subscriptions = [...this._subscriptions, e]);
|
|
144
|
-
}
|
|
145
139
|
executeResetStoreCallbacks(e) {
|
|
146
140
|
this._resetStoreCallback.forEach((n) => n(e));
|
|
147
141
|
}
|
|
148
|
-
findPluginSubscriptions(e) {
|
|
149
|
-
return this._subscriptions.filter(
|
|
150
|
-
(n) => n && n[e]
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
142
|
plugin({ store: e, options: n }) {
|
|
154
143
|
if (this._subscribers.length)
|
|
155
144
|
try {
|
|
156
145
|
this._subscribers.forEach(
|
|
157
146
|
(s) => {
|
|
158
|
-
s.invoke({ store: e, options: n }, this._debug), this.
|
|
147
|
+
s.invoke({ store: e, options: n }, this._debug), s.subscriptions && this.subscriptionDelivery({ store: e, options: n }, s.subscriptions), s.storeMutationSubscription && this.storeMutationSubscription(s.storeMutationSubscription), s.storeOnActionSubscription && this.storeOnActionSubscription(s.storeOnActionSubscription), s.resetStoreCallback && this.addResetStoreCallback(s.resetStoreCallback);
|
|
159
148
|
}
|
|
160
|
-
), this.
|
|
149
|
+
), this.rewriteResetStore({ store: e }, Object.assign({}, e.$state), Object.assign({}, e));
|
|
161
150
|
} catch (s) {
|
|
162
|
-
|
|
151
|
+
K.logError("PluginSubscription.plugin()", s, e, n);
|
|
163
152
|
}
|
|
164
153
|
}
|
|
165
154
|
rewriteResetStore({ store: e }, n, s) {
|
|
166
155
|
e.$reset = () => {
|
|
167
156
|
this.executeResetStoreCallbacks(e), Object.keys(s).forEach((r) => {
|
|
168
|
-
|
|
157
|
+
Tt(r) || (e[r] = n[r] ?? s[r]);
|
|
169
158
|
}), e.$patch(JSON.parse(JSON.stringify(n)));
|
|
170
159
|
};
|
|
171
160
|
}
|
|
172
161
|
storeOnActionSubscription(e) {
|
|
173
162
|
const { store: n, callback: s } = e();
|
|
174
163
|
n.$onAction(({ after: r, args: o, name: i }) => {
|
|
175
|
-
this._debug &&
|
|
164
|
+
this._debug && K.log(`store.$subscribe ${n.$id}`, [r, o, i, n]), s({ after: r, args: o, name: i });
|
|
176
165
|
});
|
|
177
166
|
}
|
|
178
167
|
storeMutationSubscription(e) {
|
|
179
168
|
const { store: n, callback: s } = e();
|
|
180
169
|
n.$subscribe((r) => {
|
|
181
|
-
this._debug &&
|
|
170
|
+
this._debug && K.log(`store.$subscribe ${n.$id}`, [r, n]), s(r);
|
|
182
171
|
});
|
|
183
172
|
}
|
|
184
|
-
subscriptionDelivery({ store: e, options: n }) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
s.invoke({ store: c, options: n }, this._debug);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
), s.storeMutationSubscription && this.storeMutationSubscription(s.storeMutationSubscription), s.storeOnActionSubscription && this.storeOnActionSubscription(s.storeOnActionSubscription);
|
|
173
|
+
subscriptionDelivery({ store: e, options: n }, s) {
|
|
174
|
+
Object.entries(s).forEach(([r, o]) => {
|
|
175
|
+
try {
|
|
176
|
+
const { subscription: i, subscriptionOptions: c } = o;
|
|
177
|
+
i.invoke({ store: e, options: { ...n, ...c } }, this._debug);
|
|
178
|
+
} catch (i) {
|
|
179
|
+
K.logError(`PluginSubscription.subscriptionDelivery() - ${r}`, i, e, n);
|
|
195
180
|
}
|
|
196
|
-
);
|
|
181
|
+
});
|
|
197
182
|
}
|
|
198
183
|
}
|
|
199
|
-
const
|
|
184
|
+
const q = new _e();
|
|
200
185
|
// @__NO_SIDE_EFFECTS__
|
|
201
186
|
function ge(t) {
|
|
202
187
|
const e = /* @__PURE__ */ Object.create(null);
|
|
203
188
|
for (const n of t.split(",")) e[n] = 1;
|
|
204
189
|
return (n) => n in e;
|
|
205
190
|
}
|
|
206
|
-
const
|
|
191
|
+
const ut = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
207
192
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
208
193
|
const $t = () => {
|
|
209
194
|
}, be = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
|
|
210
|
-
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), F = Object.assign, me = Object.prototype.hasOwnProperty,
|
|
195
|
+
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), F = Object.assign, me = Object.prototype.hasOwnProperty, ft = (t, e) => me.call(t, e), d = Array.isArray, H = (t) => Mt(t) === "[object Map]", V = (t) => typeof t == "function", N = (t) => typeof t == "string", U = (t) => typeof t == "symbol", _ = (t) => t !== null && typeof t == "object", ye = Object.prototype.toString, Mt = (t) => ye.call(t), Pt = (t) => Mt(t).slice(8, -1), et = (t) => N(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, Se = (t) => {
|
|
211
196
|
const e = /* @__PURE__ */ Object.create(null);
|
|
212
197
|
return ((n) => e[n] || (e[n] = t(n)));
|
|
213
|
-
}, Ee = Se((t) => t.charAt(0).toUpperCase() + t.slice(1)),
|
|
214
|
-
let
|
|
215
|
-
const nt = () =>
|
|
216
|
-
function
|
|
198
|
+
}, Ee = Se((t) => t.charAt(0).toUpperCase() + t.slice(1)), _t = (t, e) => !Object.is(t, e);
|
|
199
|
+
let Nt;
|
|
200
|
+
const nt = () => Nt || (Nt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
201
|
+
function gt(t) {
|
|
217
202
|
if (d(t)) {
|
|
218
203
|
const e = {};
|
|
219
204
|
for (let n = 0; n < t.length; n++) {
|
|
220
|
-
const s = t[n], r = N(s) ?
|
|
205
|
+
const s = t[n], r = N(s) ? ve(s) : gt(s);
|
|
221
206
|
if (r)
|
|
222
207
|
for (const o in r)
|
|
223
208
|
e[o] = r[o];
|
|
@@ -227,7 +212,7 @@ function bt(t) {
|
|
|
227
212
|
return t;
|
|
228
213
|
}
|
|
229
214
|
const we = /;(?![^(]*\))/g, Oe = /:([^]+)/, Ne = /\/\*[^]*?\*\//g;
|
|
230
|
-
function
|
|
215
|
+
function ve(t) {
|
|
231
216
|
const e = {};
|
|
232
217
|
return t.replace(Ne, "").split(we).forEach((n) => {
|
|
233
218
|
if (n) {
|
|
@@ -236,13 +221,13 @@ function Re(t) {
|
|
|
236
221
|
}
|
|
237
222
|
}), e;
|
|
238
223
|
}
|
|
239
|
-
function
|
|
224
|
+
function bt(t) {
|
|
240
225
|
let e = "";
|
|
241
226
|
if (N(t))
|
|
242
227
|
e = t;
|
|
243
228
|
else if (d(t))
|
|
244
229
|
for (let n = 0; n < t.length; n++) {
|
|
245
|
-
const s =
|
|
230
|
+
const s = bt(t[n]);
|
|
246
231
|
s && (e += s + " ");
|
|
247
232
|
}
|
|
248
233
|
else if (_(t))
|
|
@@ -254,10 +239,10 @@ function M(t, ...e) {
|
|
|
254
239
|
console.warn(`[Vue warn] ${t}`, ...e);
|
|
255
240
|
}
|
|
256
241
|
let Ft = 0, rt;
|
|
257
|
-
function
|
|
242
|
+
function mt() {
|
|
258
243
|
Ft++;
|
|
259
244
|
}
|
|
260
|
-
function
|
|
245
|
+
function yt() {
|
|
261
246
|
if (--Ft > 0)
|
|
262
247
|
return;
|
|
263
248
|
let t;
|
|
@@ -276,7 +261,7 @@ function St() {
|
|
|
276
261
|
}
|
|
277
262
|
if (t) throw t;
|
|
278
263
|
}
|
|
279
|
-
class
|
|
264
|
+
class Re {
|
|
280
265
|
// TODO isolatedDeclarations "__v_skip"
|
|
281
266
|
constructor(e) {
|
|
282
267
|
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);
|
|
@@ -287,7 +272,7 @@ class ve {
|
|
|
287
272
|
this.version++, this.notify(e);
|
|
288
273
|
}
|
|
289
274
|
notify(e) {
|
|
290
|
-
|
|
275
|
+
mt();
|
|
291
276
|
try {
|
|
292
277
|
if (process.env.NODE_ENV !== "production")
|
|
293
278
|
for (let n = this.subsHead; n; n = n.nextSub)
|
|
@@ -302,7 +287,7 @@ class ve {
|
|
|
302
287
|
for (let n = this.subs; n; n = n.prevSub)
|
|
303
288
|
n.sub.notify() && n.sub.dep.notify();
|
|
304
289
|
} finally {
|
|
305
|
-
|
|
290
|
+
yt();
|
|
306
291
|
}
|
|
307
292
|
}
|
|
308
293
|
}
|
|
@@ -310,7 +295,7 @@ const jt = /* @__PURE__ */ new WeakMap(), st = Symbol(
|
|
|
310
295
|
process.env.NODE_ENV !== "production" ? "Object iterate" : ""
|
|
311
296
|
), vt = Symbol(
|
|
312
297
|
process.env.NODE_ENV !== "production" ? "Map keys iterate" : ""
|
|
313
|
-
),
|
|
298
|
+
), Rt = Symbol(
|
|
314
299
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
315
300
|
);
|
|
316
301
|
function I(t, e, n, s, r, o) {
|
|
@@ -327,29 +312,29 @@ function I(t, e, n, s, r, o) {
|
|
|
327
312
|
oldTarget: o
|
|
328
313
|
}) : l.trigger());
|
|
329
314
|
};
|
|
330
|
-
if (
|
|
315
|
+
if (mt(), e === "clear")
|
|
331
316
|
i.forEach(c);
|
|
332
317
|
else {
|
|
333
318
|
const l = d(t), f = l && et(n);
|
|
334
319
|
if (l && n === "length") {
|
|
335
|
-
const
|
|
336
|
-
i.forEach((a,
|
|
337
|
-
(
|
|
320
|
+
const h = Number(s);
|
|
321
|
+
i.forEach((a, p) => {
|
|
322
|
+
(p === "length" || p === Rt || !U(p) && p >= h) && c(a);
|
|
338
323
|
});
|
|
339
324
|
} else
|
|
340
|
-
switch ((n !== void 0 || i.has(void 0)) && c(i.get(n)), f && c(i.get(
|
|
325
|
+
switch ((n !== void 0 || i.has(void 0)) && c(i.get(n)), f && c(i.get(Rt)), e) {
|
|
341
326
|
case "add":
|
|
342
|
-
l ? f && c(i.get("length")) : (c(i.get(st)),
|
|
327
|
+
l ? f && c(i.get("length")) : (c(i.get(st)), H(t) && c(i.get(vt)));
|
|
343
328
|
break;
|
|
344
329
|
case "delete":
|
|
345
|
-
l || (c(i.get(st)),
|
|
330
|
+
l || (c(i.get(st)), H(t) && c(i.get(vt)));
|
|
346
331
|
break;
|
|
347
332
|
case "set":
|
|
348
|
-
|
|
333
|
+
H(t) && c(i.get(st));
|
|
349
334
|
break;
|
|
350
335
|
}
|
|
351
336
|
}
|
|
352
|
-
|
|
337
|
+
yt();
|
|
353
338
|
}
|
|
354
339
|
function Ce(t, e) {
|
|
355
340
|
const n = jt.get(t);
|
|
@@ -357,18 +342,18 @@ function Ce(t, e) {
|
|
|
357
342
|
}
|
|
358
343
|
function x(t) {
|
|
359
344
|
const e = u(t);
|
|
360
|
-
return e === t || y(t) ? e : e.map(
|
|
345
|
+
return e === t || y(t) ? e : e.map(v);
|
|
361
346
|
}
|
|
362
|
-
function
|
|
347
|
+
function St(t) {
|
|
363
348
|
return t = u(t), t;
|
|
364
349
|
}
|
|
365
|
-
function
|
|
366
|
-
return E(t) ?
|
|
350
|
+
function R(t, e) {
|
|
351
|
+
return E(t) ? Et(t) ? z(v(e)) : z(e) : v(e);
|
|
367
352
|
}
|
|
368
353
|
const Ie = {
|
|
369
354
|
__proto__: null,
|
|
370
355
|
[Symbol.iterator]() {
|
|
371
|
-
return ot(this, Symbol.iterator, (t) =>
|
|
356
|
+
return ot(this, Symbol.iterator, (t) => R(this, t));
|
|
372
357
|
},
|
|
373
358
|
concat(...t) {
|
|
374
359
|
return x(this).concat(
|
|
@@ -376,7 +361,7 @@ const Ie = {
|
|
|
376
361
|
);
|
|
377
362
|
},
|
|
378
363
|
entries() {
|
|
379
|
-
return ot(this, "entries", (t) => (t[1] =
|
|
364
|
+
return ot(this, "entries", (t) => (t[1] = R(this, t[1]), t));
|
|
380
365
|
},
|
|
381
366
|
every(t, e) {
|
|
382
367
|
return w(this, "every", t, e, void 0, arguments);
|
|
@@ -387,7 +372,7 @@ const Ie = {
|
|
|
387
372
|
"filter",
|
|
388
373
|
t,
|
|
389
374
|
e,
|
|
390
|
-
(n) => n.map((s) =>
|
|
375
|
+
(n) => n.map((s) => R(this, s)),
|
|
391
376
|
arguments
|
|
392
377
|
);
|
|
393
378
|
},
|
|
@@ -397,7 +382,7 @@ const Ie = {
|
|
|
397
382
|
"find",
|
|
398
383
|
t,
|
|
399
384
|
e,
|
|
400
|
-
(n) =>
|
|
385
|
+
(n) => R(this, n),
|
|
401
386
|
arguments
|
|
402
387
|
);
|
|
403
388
|
},
|
|
@@ -410,7 +395,7 @@ const Ie = {
|
|
|
410
395
|
"findLast",
|
|
411
396
|
t,
|
|
412
397
|
e,
|
|
413
|
-
(n) =>
|
|
398
|
+
(n) => R(this, n),
|
|
414
399
|
arguments
|
|
415
400
|
);
|
|
416
401
|
},
|
|
@@ -444,10 +429,10 @@ const Ie = {
|
|
|
444
429
|
return k(this, "push", t);
|
|
445
430
|
},
|
|
446
431
|
reduce(t, ...e) {
|
|
447
|
-
return
|
|
432
|
+
return Ct(this, "reduce", t, e);
|
|
448
433
|
},
|
|
449
434
|
reduceRight(t, ...e) {
|
|
450
|
-
return
|
|
435
|
+
return Ct(this, "reduceRight", t, e);
|
|
451
436
|
},
|
|
452
437
|
shift() {
|
|
453
438
|
return k(this, "shift");
|
|
@@ -472,11 +457,11 @@ const Ie = {
|
|
|
472
457
|
return k(this, "unshift", t);
|
|
473
458
|
},
|
|
474
459
|
values() {
|
|
475
|
-
return ot(this, "values", (t) =>
|
|
460
|
+
return ot(this, "values", (t) => R(this, t));
|
|
476
461
|
}
|
|
477
462
|
};
|
|
478
463
|
function ot(t, e, n) {
|
|
479
|
-
const s =
|
|
464
|
+
const s = St(t), r = s[e]();
|
|
480
465
|
return s !== t && !y(t) && (r._next = r.next, r.next = () => {
|
|
481
466
|
const o = r._next();
|
|
482
467
|
return o.done || (o.value = n(o.value)), o;
|
|
@@ -484,43 +469,43 @@ function ot(t, e, n) {
|
|
|
484
469
|
}
|
|
485
470
|
const Ve = Array.prototype;
|
|
486
471
|
function w(t, e, n, s, r, o) {
|
|
487
|
-
const i =
|
|
472
|
+
const i = St(t), c = i !== t && !y(t), l = i[e];
|
|
488
473
|
if (l !== Ve[e]) {
|
|
489
474
|
const a = l.apply(t, o);
|
|
490
|
-
return c ?
|
|
475
|
+
return c ? v(a) : a;
|
|
491
476
|
}
|
|
492
477
|
let f = n;
|
|
493
|
-
i !== t && (c ? f = function(a,
|
|
494
|
-
return n.call(this,
|
|
495
|
-
} : n.length > 2 && (f = function(a,
|
|
496
|
-
return n.call(this, a,
|
|
478
|
+
i !== t && (c ? f = function(a, p) {
|
|
479
|
+
return n.call(this, R(t, a), p, t);
|
|
480
|
+
} : n.length > 2 && (f = function(a, p) {
|
|
481
|
+
return n.call(this, a, p, t);
|
|
497
482
|
}));
|
|
498
|
-
const
|
|
499
|
-
return c && r ? r(
|
|
483
|
+
const h = l.call(i, f, s);
|
|
484
|
+
return c && r ? r(h) : h;
|
|
500
485
|
}
|
|
501
|
-
function
|
|
502
|
-
const r =
|
|
486
|
+
function Ct(t, e, n, s) {
|
|
487
|
+
const r = St(t);
|
|
503
488
|
let o = n;
|
|
504
489
|
return r !== t && (y(t) ? n.length > 3 && (o = function(i, c, l) {
|
|
505
490
|
return n.call(this, i, c, l, t);
|
|
506
491
|
}) : o = function(i, c, l) {
|
|
507
|
-
return n.call(this, i,
|
|
492
|
+
return n.call(this, i, R(t, c), l, t);
|
|
508
493
|
}), r[e](o, ...s);
|
|
509
494
|
}
|
|
510
495
|
function it(t, e, n) {
|
|
511
496
|
const s = u(t), r = s[e](...n);
|
|
512
|
-
return (r === -1 || r === !1) &&
|
|
497
|
+
return (r === -1 || r === !1) && L(n[0]) ? (n[0] = u(n[0]), s[e](...n)) : r;
|
|
513
498
|
}
|
|
514
499
|
function k(t, e, n = []) {
|
|
515
|
-
|
|
500
|
+
mt();
|
|
516
501
|
const s = u(t)[e].apply(t, n);
|
|
517
|
-
return
|
|
502
|
+
return yt(), s;
|
|
518
503
|
}
|
|
519
504
|
const Ae = /* @__PURE__ */ ge("__proto__,__v_isRef,__isVue"), kt = new Set(
|
|
520
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(
|
|
505
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(U)
|
|
521
506
|
);
|
|
522
507
|
function xe(t) {
|
|
523
|
-
return
|
|
508
|
+
return U(t) || (t = String(t)), u(this).hasOwnProperty(t);
|
|
524
509
|
}
|
|
525
510
|
class Kt {
|
|
526
511
|
constructor(e = !1, n = !1) {
|
|
@@ -555,13 +540,13 @@ class Kt {
|
|
|
555
540
|
// its class methods
|
|
556
541
|
g(e) ? e : s
|
|
557
542
|
);
|
|
558
|
-
if ((
|
|
543
|
+
if ((U(n) ? kt.has(n) : Ae(n)) || o)
|
|
559
544
|
return c;
|
|
560
545
|
if (g(c)) {
|
|
561
546
|
const l = i && et(n) ? c : c.value;
|
|
562
|
-
return r && _(l) ?
|
|
547
|
+
return r && _(l) ? ht(l) : l;
|
|
563
548
|
}
|
|
564
|
-
return _(c) ? r ?
|
|
549
|
+
return _(c) ? r ? ht(c) : Wt(c) : c;
|
|
565
550
|
}
|
|
566
551
|
}
|
|
567
552
|
class Te extends Kt {
|
|
@@ -579,21 +564,21 @@ class Te extends Kt {
|
|
|
579
564
|
e[n]
|
|
580
565
|
), !0) : (o.value = s, !0);
|
|
581
566
|
}
|
|
582
|
-
const c = i ? Number(n) < e.length :
|
|
567
|
+
const c = i ? Number(n) < e.length : ft(e, n), l = Reflect.set(
|
|
583
568
|
e,
|
|
584
569
|
n,
|
|
585
570
|
s,
|
|
586
571
|
g(e) ? e : r
|
|
587
572
|
);
|
|
588
|
-
return e === u(r) && (c ?
|
|
573
|
+
return e === u(r) && (c ? _t(s, o) && I(e, "set", n, s, o) : I(e, "add", n, s)), l;
|
|
589
574
|
}
|
|
590
575
|
deleteProperty(e, n) {
|
|
591
|
-
const s =
|
|
576
|
+
const s = ft(e, n), r = e[n], o = Reflect.deleteProperty(e, n);
|
|
592
577
|
return o && s && I(e, "delete", n, void 0, r), o;
|
|
593
578
|
}
|
|
594
579
|
has(e, n) {
|
|
595
580
|
const s = Reflect.has(e, n);
|
|
596
|
-
return !
|
|
581
|
+
return !U(n) || kt.has(n), s;
|
|
597
582
|
}
|
|
598
583
|
ownKeys(e) {
|
|
599
584
|
return Reflect.ownKeys(e);
|
|
@@ -616,16 +601,16 @@ class De extends Kt {
|
|
|
616
601
|
), !0;
|
|
617
602
|
}
|
|
618
603
|
}
|
|
619
|
-
const $e = /* @__PURE__ */ new Te(), Me = /* @__PURE__ */ new De(), pt = (t) => t,
|
|
604
|
+
const $e = /* @__PURE__ */ new Te(), Me = /* @__PURE__ */ new De(), pt = (t) => t, J = (t) => Reflect.getPrototypeOf(t);
|
|
620
605
|
function Pe(t, e, n) {
|
|
621
606
|
return function(...s) {
|
|
622
|
-
const r = this.__v_raw, o = u(r), i =
|
|
607
|
+
const r = this.__v_raw, o = u(r), i = H(o), c = t === "entries" || t === Symbol.iterator && i, l = r[t](...s), f = n ? pt : e ? z : v;
|
|
623
608
|
return {
|
|
624
609
|
// iterator protocol
|
|
625
610
|
next() {
|
|
626
|
-
const { value:
|
|
627
|
-
return a ? { value:
|
|
628
|
-
value: c ? [f(
|
|
611
|
+
const { value: h, done: a } = l.next();
|
|
612
|
+
return a ? { value: h, done: a } : {
|
|
613
|
+
value: c ? [f(h[0]), f(h[1])] : f(h),
|
|
629
614
|
done: a
|
|
630
615
|
};
|
|
631
616
|
},
|
|
@@ -636,7 +621,7 @@ function Pe(t, e, n) {
|
|
|
636
621
|
};
|
|
637
622
|
};
|
|
638
623
|
}
|
|
639
|
-
function
|
|
624
|
+
function B(t) {
|
|
640
625
|
return function(...e) {
|
|
641
626
|
if (process.env.NODE_ENV !== "production") {
|
|
642
627
|
const n = e[0] ? `on key "${e[0]}" ` : "";
|
|
@@ -651,7 +636,7 @@ function J(t) {
|
|
|
651
636
|
function Fe(t, e) {
|
|
652
637
|
const n = {
|
|
653
638
|
get(r) {
|
|
654
|
-
const o = this.__v_raw, i = u(o), c = u(r), { has: l } =
|
|
639
|
+
const o = this.__v_raw, i = u(o), c = u(r), { has: l } = J(i), f = e ? pt : t ? z : v;
|
|
655
640
|
if (l.call(i, r))
|
|
656
641
|
return f(o.get(r));
|
|
657
642
|
if (l.call(i, c))
|
|
@@ -671,40 +656,40 @@ function Fe(t, e) {
|
|
|
671
656
|
forEach(r, o) {
|
|
672
657
|
const i = this, c = i.__v_raw;
|
|
673
658
|
u(c);
|
|
674
|
-
const l = e ? pt : t ?
|
|
675
|
-
return c.forEach((f,
|
|
659
|
+
const l = e ? pt : t ? z : v;
|
|
660
|
+
return c.forEach((f, h) => r.call(o, l(f), l(h), i));
|
|
676
661
|
}
|
|
677
662
|
};
|
|
678
663
|
return F(
|
|
679
664
|
n,
|
|
680
665
|
t ? {
|
|
681
|
-
add:
|
|
682
|
-
set:
|
|
683
|
-
delete:
|
|
684
|
-
clear:
|
|
666
|
+
add: B("add"),
|
|
667
|
+
set: B("set"),
|
|
668
|
+
delete: B("delete"),
|
|
669
|
+
clear: B("clear")
|
|
685
670
|
} : {
|
|
686
671
|
add(r) {
|
|
687
672
|
!e && !y(r) && !E(r) && (r = u(r));
|
|
688
673
|
const o = u(this);
|
|
689
|
-
return
|
|
674
|
+
return J(o).has.call(o, r) || (o.add(r), I(o, "add", r, r)), this;
|
|
690
675
|
},
|
|
691
676
|
set(r, o) {
|
|
692
677
|
!e && !y(o) && !E(o) && (o = u(o));
|
|
693
|
-
const i = u(this), { has: c, get: l } =
|
|
678
|
+
const i = u(this), { has: c, get: l } = J(i);
|
|
694
679
|
let f = c.call(i, r);
|
|
695
|
-
f ? process.env.NODE_ENV !== "production" &&
|
|
696
|
-
const
|
|
697
|
-
return i.set(r, o), f ?
|
|
680
|
+
f ? process.env.NODE_ENV !== "production" && It(i, c, r) : (r = u(r), f = c.call(i, r));
|
|
681
|
+
const h = l.call(i, r);
|
|
682
|
+
return i.set(r, o), f ? _t(o, h) && I(i, "set", r, o, h) : I(i, "add", r, o), this;
|
|
698
683
|
},
|
|
699
684
|
delete(r) {
|
|
700
|
-
const o = u(this), { has: i, get: c } =
|
|
685
|
+
const o = u(this), { has: i, get: c } = J(o);
|
|
701
686
|
let l = i.call(o, r);
|
|
702
|
-
l ? process.env.NODE_ENV !== "production" &&
|
|
703
|
-
const f = c ? c.call(o, r) : void 0,
|
|
704
|
-
return l && I(o, "delete", r, void 0, f),
|
|
687
|
+
l ? process.env.NODE_ENV !== "production" && It(o, i, r) : (r = u(r), l = i.call(o, r));
|
|
688
|
+
const f = c ? c.call(o, r) : void 0, h = o.delete(r);
|
|
689
|
+
return l && I(o, "delete", r, void 0, f), h;
|
|
705
690
|
},
|
|
706
691
|
clear() {
|
|
707
|
-
const r = u(this), o = r.size !== 0, i = process.env.NODE_ENV !== "production" ?
|
|
692
|
+
const r = u(this), o = r.size !== 0, i = process.env.NODE_ENV !== "production" ? H(r) ? new Map(r) : new Set(r) : void 0, c = r.clear();
|
|
708
693
|
return o && I(
|
|
709
694
|
r,
|
|
710
695
|
"clear",
|
|
@@ -726,7 +711,7 @@ function Fe(t, e) {
|
|
|
726
711
|
function Ht(t, e) {
|
|
727
712
|
const n = Fe(t, e);
|
|
728
713
|
return (s, r, o) => r === "__v_isReactive" ? !t : r === "__v_isReadonly" ? t : r === "__v_raw" ? s : Reflect.get(
|
|
729
|
-
|
|
714
|
+
ft(n, r) && r in s ? n : s,
|
|
730
715
|
r,
|
|
731
716
|
o
|
|
732
717
|
);
|
|
@@ -736,7 +721,7 @@ const je = {
|
|
|
736
721
|
}, ke = {
|
|
737
722
|
get: /* @__PURE__ */ Ht(!0, !1)
|
|
738
723
|
};
|
|
739
|
-
function
|
|
724
|
+
function It(t, e, n) {
|
|
740
725
|
const s = u(n);
|
|
741
726
|
if (s !== n && e.call(t, s)) {
|
|
742
727
|
const r = Pt(t);
|
|
@@ -772,7 +757,7 @@ function Wt(t) {
|
|
|
772
757
|
Lt
|
|
773
758
|
);
|
|
774
759
|
}
|
|
775
|
-
function
|
|
760
|
+
function ht(t) {
|
|
776
761
|
return Ut(
|
|
777
762
|
t,
|
|
778
763
|
!0,
|
|
@@ -802,8 +787,8 @@ function Ut(t, e, n, s, r) {
|
|
|
802
787
|
);
|
|
803
788
|
return r.set(t, c), c;
|
|
804
789
|
}
|
|
805
|
-
function
|
|
806
|
-
return E(t) ?
|
|
790
|
+
function Et(t) {
|
|
791
|
+
return E(t) ? Et(t.__v_raw) : !!(t && t.__v_isReactive);
|
|
807
792
|
}
|
|
808
793
|
function E(t) {
|
|
809
794
|
return !!(t && t.__v_isReadonly);
|
|
@@ -811,14 +796,14 @@ function E(t) {
|
|
|
811
796
|
function y(t) {
|
|
812
797
|
return !!(t && t.__v_isShallow);
|
|
813
798
|
}
|
|
814
|
-
function
|
|
799
|
+
function L(t) {
|
|
815
800
|
return t ? !!t.__v_raw : !1;
|
|
816
801
|
}
|
|
817
802
|
function u(t) {
|
|
818
803
|
const e = t && t.__v_raw;
|
|
819
804
|
return e ? u(e) : t;
|
|
820
805
|
}
|
|
821
|
-
const
|
|
806
|
+
const v = (t) => _(t) ? Wt(t) : t, z = (t) => _(t) ? ht(t) : t;
|
|
822
807
|
function g(t) {
|
|
823
808
|
return t ? t.__v_isRef === !0 : !1;
|
|
824
809
|
}
|
|
@@ -830,7 +815,7 @@ function We(t, e) {
|
|
|
830
815
|
}
|
|
831
816
|
class Ue {
|
|
832
817
|
constructor(e, n) {
|
|
833
|
-
this.dep = new
|
|
818
|
+
this.dep = new Re(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? e : u(e), this._value = n ? e : v(e), this.__v_isShallow = n;
|
|
834
819
|
}
|
|
835
820
|
get value() {
|
|
836
821
|
return process.env.NODE_ENV !== "production" ? this.dep.track({
|
|
@@ -841,7 +826,7 @@ class Ue {
|
|
|
841
826
|
}
|
|
842
827
|
set value(e) {
|
|
843
828
|
const n = this._rawValue, s = this.__v_isShallow || y(e) || E(e);
|
|
844
|
-
e = s ? e : u(e),
|
|
829
|
+
e = s ? e : u(e), _t(e, n) && (this._rawValue = e, this._value = s ? e : v(e), process.env.NODE_ENV !== "production" ? this.dep.trigger({
|
|
845
830
|
target: this,
|
|
846
831
|
type: "set",
|
|
847
832
|
key: "value",
|
|
@@ -859,7 +844,7 @@ class Je {
|
|
|
859
844
|
let r = !0, o = e;
|
|
860
845
|
if (!d(e) || !et(String(n)))
|
|
861
846
|
do
|
|
862
|
-
r = !
|
|
847
|
+
r = !L(o) || y(o);
|
|
863
848
|
while (r && (o = o.__v_raw));
|
|
864
849
|
this._shallow = r;
|
|
865
850
|
}
|
|
@@ -908,7 +893,7 @@ function P(t, ...e) {
|
|
|
908
893
|
ct = !0;
|
|
909
894
|
const n = A.length ? A[A.length - 1].component : null, s = n && n.appContext.config.warnHandler, r = Ze();
|
|
910
895
|
if (s)
|
|
911
|
-
|
|
896
|
+
wt(
|
|
912
897
|
s,
|
|
913
898
|
n,
|
|
914
899
|
11,
|
|
@@ -1006,7 +991,7 @@ const Bt = {
|
|
|
1006
991
|
15: "component update",
|
|
1007
992
|
16: "app unmount cleanup function"
|
|
1008
993
|
};
|
|
1009
|
-
function
|
|
994
|
+
function wt(t, e, n, s) {
|
|
1010
995
|
try {
|
|
1011
996
|
return s ? t(...s) : t();
|
|
1012
997
|
} catch (r) {
|
|
@@ -1014,21 +999,21 @@ function Ot(t, e, n, s) {
|
|
|
1014
999
|
}
|
|
1015
1000
|
}
|
|
1016
1001
|
function Yt(t, e, n, s = !0) {
|
|
1017
|
-
const r = e ? e.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: i } = e && e.appContext.config ||
|
|
1002
|
+
const r = e ? e.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: i } = e && e.appContext.config || ut;
|
|
1018
1003
|
if (e) {
|
|
1019
1004
|
let c = e.parent;
|
|
1020
1005
|
const l = e.proxy, f = process.env.NODE_ENV !== "production" ? Bt[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
|
|
1021
1006
|
for (; c; ) {
|
|
1022
|
-
const
|
|
1023
|
-
if (
|
|
1024
|
-
for (let a = 0; a <
|
|
1025
|
-
if (
|
|
1007
|
+
const h = c.ec;
|
|
1008
|
+
if (h) {
|
|
1009
|
+
for (let a = 0; a < h.length; a++)
|
|
1010
|
+
if (h[a](t, l, f) === !1)
|
|
1026
1011
|
return;
|
|
1027
1012
|
}
|
|
1028
1013
|
c = c.parent;
|
|
1029
1014
|
}
|
|
1030
1015
|
if (o) {
|
|
1031
|
-
|
|
1016
|
+
wt(o, null, 10, [
|
|
1032
1017
|
t,
|
|
1033
1018
|
l,
|
|
1034
1019
|
f
|
|
@@ -1055,25 +1040,25 @@ let O = -1;
|
|
|
1055
1040
|
const $ = [];
|
|
1056
1041
|
let C = null, T = 0;
|
|
1057
1042
|
const sn = /* @__PURE__ */ Promise.resolve();
|
|
1058
|
-
let
|
|
1043
|
+
let dt = null;
|
|
1059
1044
|
const on = 100;
|
|
1060
1045
|
function cn(t) {
|
|
1061
1046
|
let e = O + 1, n = m.length;
|
|
1062
1047
|
for (; e < n; ) {
|
|
1063
|
-
const s = e + n >>> 1, r = m[s], o =
|
|
1048
|
+
const s = e + n >>> 1, r = m[s], o = W(r);
|
|
1064
1049
|
o < t || o === t && r.flags & 2 ? e = s + 1 : n = s;
|
|
1065
1050
|
}
|
|
1066
1051
|
return e;
|
|
1067
1052
|
}
|
|
1068
1053
|
function an(t) {
|
|
1069
1054
|
if (!(t.flags & 1)) {
|
|
1070
|
-
const e =
|
|
1055
|
+
const e = W(t), n = m[m.length - 1];
|
|
1071
1056
|
!n || // fast path when the job id is larger than the tail
|
|
1072
|
-
!(t.flags & 2) && e >=
|
|
1057
|
+
!(t.flags & 2) && e >= W(n) ? m.push(t) : m.splice(cn(e), 0, t), t.flags |= 1, Gt();
|
|
1073
1058
|
}
|
|
1074
1059
|
}
|
|
1075
1060
|
function Gt() {
|
|
1076
|
-
|
|
1061
|
+
dt || (dt = sn.then(Qt));
|
|
1077
1062
|
}
|
|
1078
1063
|
function ln(t) {
|
|
1079
1064
|
d(t) ? $.push(...t) : C && t.id === -1 ? C.splice(T + 1, 0, t) : t.flags & 1 || ($.push(t), t.flags |= 1), Gt();
|
|
@@ -1081,7 +1066,7 @@ function ln(t) {
|
|
|
1081
1066
|
function un(t) {
|
|
1082
1067
|
if ($.length) {
|
|
1083
1068
|
const e = [...new Set($)].sort(
|
|
1084
|
-
(n, s) =>
|
|
1069
|
+
(n, s) => W(n) - W(s)
|
|
1085
1070
|
);
|
|
1086
1071
|
if ($.length = 0, C) {
|
|
1087
1072
|
C.push(...e);
|
|
@@ -1094,7 +1079,7 @@ function un(t) {
|
|
|
1094
1079
|
C = null, T = 0;
|
|
1095
1080
|
}
|
|
1096
1081
|
}
|
|
1097
|
-
const
|
|
1082
|
+
const W = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
|
|
1098
1083
|
function Qt(t) {
|
|
1099
1084
|
process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
|
|
1100
1085
|
const e = process.env.NODE_ENV !== "production" ? (n) => Xt(t, n) : $t;
|
|
@@ -1104,7 +1089,7 @@ function Qt(t) {
|
|
|
1104
1089
|
if (n && !(n.flags & 8)) {
|
|
1105
1090
|
if (process.env.NODE_ENV !== "production" && e(n))
|
|
1106
1091
|
continue;
|
|
1107
|
-
n.flags & 4 && (n.flags &= -2),
|
|
1092
|
+
n.flags & 4 && (n.flags &= -2), wt(
|
|
1108
1093
|
n,
|
|
1109
1094
|
n.i,
|
|
1110
1095
|
n.i ? 15 : 14
|
|
@@ -1116,7 +1101,7 @@ function Qt(t) {
|
|
|
1116
1101
|
const n = m[O];
|
|
1117
1102
|
n && (n.flags &= -2);
|
|
1118
1103
|
}
|
|
1119
|
-
O = -1, m.length = 0, un(t),
|
|
1104
|
+
O = -1, m.length = 0, un(t), dt = null, (m.length || $.length) && Qt(t);
|
|
1120
1105
|
}
|
|
1121
1106
|
}
|
|
1122
1107
|
function Xt(t, e) {
|
|
@@ -1134,8 +1119,8 @@ function Xt(t, e) {
|
|
|
1134
1119
|
const at = /* @__PURE__ */ new Map();
|
|
1135
1120
|
process.env.NODE_ENV !== "production" && (nt().__VUE_HMR_RUNTIME__ = {
|
|
1136
1121
|
createRecord: lt(fn),
|
|
1137
|
-
rerender: lt(
|
|
1138
|
-
reload: lt(
|
|
1122
|
+
rerender: lt(pn),
|
|
1123
|
+
reload: lt(hn)
|
|
1139
1124
|
});
|
|
1140
1125
|
const Q = /* @__PURE__ */ new Map();
|
|
1141
1126
|
function fn(t, e) {
|
|
@@ -1147,21 +1132,21 @@ function fn(t, e) {
|
|
|
1147
1132
|
function X(t) {
|
|
1148
1133
|
return ae(t) ? t.__vccOpts : t;
|
|
1149
1134
|
}
|
|
1150
|
-
function
|
|
1135
|
+
function pn(t, e) {
|
|
1151
1136
|
const n = Q.get(t);
|
|
1152
1137
|
n && (n.initialDef.render = e, [...n.instances].forEach((s) => {
|
|
1153
1138
|
e && (s.render = e, X(s.type).render = e), s.renderCache = [], s.job.flags & 8 || s.update();
|
|
1154
1139
|
}));
|
|
1155
1140
|
}
|
|
1156
|
-
function
|
|
1141
|
+
function hn(t, e) {
|
|
1157
1142
|
const n = Q.get(t);
|
|
1158
1143
|
if (!n) return;
|
|
1159
|
-
e = X(e),
|
|
1144
|
+
e = X(e), Vt(n.initialDef, e);
|
|
1160
1145
|
const s = [...n.instances];
|
|
1161
1146
|
for (let r = 0; r < s.length; r++) {
|
|
1162
1147
|
const o = s[r], i = X(o.type);
|
|
1163
1148
|
let c = at.get(i);
|
|
1164
|
-
c || (i !== n.initialDef &&
|
|
1149
|
+
c || (i !== n.initialDef && Vt(i, e), at.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 ? an(() => {
|
|
1165
1150
|
o.job.flags & 8 || (o.parent.update(), c.delete(o));
|
|
1166
1151
|
}) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
|
|
1167
1152
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
@@ -1171,7 +1156,7 @@ function pn(t, e) {
|
|
|
1171
1156
|
at.clear();
|
|
1172
1157
|
});
|
|
1173
1158
|
}
|
|
1174
|
-
function
|
|
1159
|
+
function Vt(t, e) {
|
|
1175
1160
|
F(t, e);
|
|
1176
1161
|
for (const n in t)
|
|
1177
1162
|
n !== "__file" && !(n in e) && delete t[n];
|
|
@@ -1187,17 +1172,17 @@ function lt(t) {
|
|
|
1187
1172
|
}
|
|
1188
1173
|
};
|
|
1189
1174
|
}
|
|
1190
|
-
let D,
|
|
1175
|
+
let D, Y = [];
|
|
1191
1176
|
function Zt(t, e) {
|
|
1192
1177
|
var n, s;
|
|
1193
|
-
D = t, D ? (D.enabled = !0,
|
|
1178
|
+
D = t, D ? (D.enabled = !0, Y.forEach(({ event: r, args: o }) => D.emit(r, ...o)), Y = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
|
|
1194
1179
|
window.HTMLElement && // also exclude jsdom
|
|
1195
1180
|
// eslint-disable-next-line no-restricted-syntax
|
|
1196
1181
|
!((s = (n = window.navigator) == null ? void 0 : n.userAgent) != null && s.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((o) => {
|
|
1197
1182
|
Zt(o, e);
|
|
1198
1183
|
}), setTimeout(() => {
|
|
1199
|
-
D || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null,
|
|
1200
|
-
}, 3e3)) :
|
|
1184
|
+
D || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, Y = []);
|
|
1185
|
+
}, 3e3)) : Y = [];
|
|
1201
1186
|
}
|
|
1202
1187
|
let Z = null, dn = null;
|
|
1203
1188
|
const _n = (t) => t.__isTeleport;
|
|
@@ -1251,9 +1236,9 @@ function Nn(t, e = null, n = null, s = 0, r = null, o = t === ne ? 0 : 1, i = !1
|
|
|
1251
1236
|
appContext: null,
|
|
1252
1237
|
ctx: Z
|
|
1253
1238
|
};
|
|
1254
|
-
return c ? (
|
|
1239
|
+
return c ? (Ot(l, n), o & 128 && t.normalize(l)) : n && (l.shapeFlag |= N(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && P("VNode created with invalid key (NaN). VNode type:", l.type), l;
|
|
1255
1240
|
}
|
|
1256
|
-
const
|
|
1241
|
+
const vn = process.env.NODE_ENV !== "production" ? On : se;
|
|
1257
1242
|
function se(t, e = null, n = null, s = 0, r = null, o = !1) {
|
|
1258
1243
|
if ((!t || t === gn) && (process.env.NODE_ENV !== "production" && !t && P(`Invalid vnode type when creating vnode: ${t}.`), t = En), wn(t)) {
|
|
1259
1244
|
const c = tt(
|
|
@@ -1262,15 +1247,15 @@ function se(t, e = null, n = null, s = 0, r = null, o = !1) {
|
|
|
1262
1247
|
!0
|
|
1263
1248
|
/* mergeRef: true */
|
|
1264
1249
|
);
|
|
1265
|
-
return n &&
|
|
1250
|
+
return n && Ot(c, n), c.patchFlag = -2, c;
|
|
1266
1251
|
}
|
|
1267
1252
|
if (ae(t) && (t = t.__vccOpts), e) {
|
|
1268
|
-
e =
|
|
1253
|
+
e = Rn(e);
|
|
1269
1254
|
let { class: c, style: l } = e;
|
|
1270
|
-
c && !N(c) && (e.class =
|
|
1255
|
+
c && !N(c) && (e.class = bt(c)), _(l) && (L(l) && !d(l) && (l = F({}, l)), e.style = gt(l));
|
|
1271
1256
|
}
|
|
1272
1257
|
const i = N(t) ? 1 : yn(t) ? 128 : _n(t) ? 64 : _(t) ? 4 : V(t) ? 2 : 0;
|
|
1273
|
-
return process.env.NODE_ENV !== "production" && i & 4 &&
|
|
1258
|
+
return process.env.NODE_ENV !== "production" && i & 4 && L(t) && (t = u(t), P(
|
|
1274
1259
|
"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`.",
|
|
1275
1260
|
`
|
|
1276
1261
|
Component that was made reactive: `,
|
|
@@ -1286,11 +1271,11 @@ Component that was made reactive: `,
|
|
|
1286
1271
|
!0
|
|
1287
1272
|
);
|
|
1288
1273
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return t ?
|
|
1274
|
+
function Rn(t) {
|
|
1275
|
+
return t ? L(t) || ee(t) ? F({}, t) : t : null;
|
|
1291
1276
|
}
|
|
1292
1277
|
function tt(t, e, n = !1, s = !1) {
|
|
1293
|
-
const { props: r, ref: o, patchFlag: i, children: c, transition: l } = t, f = e ? In(r || {}, e) : r,
|
|
1278
|
+
const { props: r, ref: o, patchFlag: i, children: c, transition: l } = t, f = e ? In(r || {}, e) : r, h = {
|
|
1294
1279
|
__v_isVNode: !0,
|
|
1295
1280
|
__v_skip: !0,
|
|
1296
1281
|
type: t.type,
|
|
@@ -1335,18 +1320,18 @@ function tt(t, e, n = !1, s = !1) {
|
|
|
1335
1320
|
ce: t.ce
|
|
1336
1321
|
};
|
|
1337
1322
|
return l && s && te(
|
|
1338
|
-
|
|
1339
|
-
l.clone(
|
|
1340
|
-
),
|
|
1323
|
+
h,
|
|
1324
|
+
l.clone(h)
|
|
1325
|
+
), h;
|
|
1341
1326
|
}
|
|
1342
1327
|
function oe(t) {
|
|
1343
1328
|
const e = tt(t);
|
|
1344
1329
|
return d(t.children) && (e.children = t.children.map(oe)), e;
|
|
1345
1330
|
}
|
|
1346
1331
|
function Cn(t = " ", e = 0) {
|
|
1347
|
-
return
|
|
1332
|
+
return vn(Sn, null, t, e);
|
|
1348
1333
|
}
|
|
1349
|
-
function
|
|
1334
|
+
function Ot(t, e) {
|
|
1350
1335
|
let n = 0;
|
|
1351
1336
|
const { shapeFlag: s } = t;
|
|
1352
1337
|
if (e == null)
|
|
@@ -1356,7 +1341,7 @@ function Nt(t, e) {
|
|
|
1356
1341
|
else if (typeof e == "object")
|
|
1357
1342
|
if (s & 65) {
|
|
1358
1343
|
const r = e.default;
|
|
1359
|
-
r && (r._c && (r._d = !1),
|
|
1344
|
+
r && (r._c && (r._d = !1), Ot(t, r()), r._c && (r._d = !0));
|
|
1360
1345
|
return;
|
|
1361
1346
|
} else
|
|
1362
1347
|
n = 32, !e._ && !ee(e) && (e._ctx = Z);
|
|
@@ -1369,9 +1354,9 @@ function In(...t) {
|
|
|
1369
1354
|
const s = t[n];
|
|
1370
1355
|
for (const r in s)
|
|
1371
1356
|
if (r === "class")
|
|
1372
|
-
e.class !== s.class && (e.class =
|
|
1357
|
+
e.class !== s.class && (e.class = bt([e.class, s.class]));
|
|
1373
1358
|
else if (r === "style")
|
|
1374
|
-
e.style =
|
|
1359
|
+
e.style = gt([e.style, s.style]);
|
|
1375
1360
|
else if (be(r)) {
|
|
1376
1361
|
const o = e[r], i = s[r];
|
|
1377
1362
|
i && o !== i && !(d(o) && o.includes(i)) && (e[r] = o ? [].concat(o, i) : i);
|
|
@@ -1431,17 +1416,17 @@ function xn() {
|
|
|
1431
1416
|
if (a.__isVue)
|
|
1432
1417
|
return ["div", t, "VueInstance"];
|
|
1433
1418
|
if (g(a)) {
|
|
1434
|
-
const
|
|
1419
|
+
const p = a.value;
|
|
1435
1420
|
return [
|
|
1436
1421
|
"div",
|
|
1437
1422
|
{},
|
|
1438
|
-
["span", t,
|
|
1423
|
+
["span", t, h(a)],
|
|
1439
1424
|
"<",
|
|
1440
|
-
c(
|
|
1425
|
+
c(p),
|
|
1441
1426
|
">"
|
|
1442
1427
|
];
|
|
1443
1428
|
} else {
|
|
1444
|
-
if (
|
|
1429
|
+
if (Et(a))
|
|
1445
1430
|
return [
|
|
1446
1431
|
"div",
|
|
1447
1432
|
{},
|
|
@@ -1475,12 +1460,12 @@ function xn() {
|
|
|
1475
1460
|
}
|
|
1476
1461
|
};
|
|
1477
1462
|
function o(a) {
|
|
1478
|
-
const
|
|
1479
|
-
a.type.props && a.props &&
|
|
1463
|
+
const p = [];
|
|
1464
|
+
a.type.props && a.props && p.push(i("props", u(a.props))), a.setupState !== ut && p.push(i("setup", a.setupState)), a.data !== ut && p.push(i("data", u(a.data)));
|
|
1480
1465
|
const b = l(a, "computed");
|
|
1481
|
-
b &&
|
|
1466
|
+
b && p.push(i("computed", b));
|
|
1482
1467
|
const S = l(a, "inject");
|
|
1483
|
-
return S &&
|
|
1468
|
+
return S && p.push(i("injected", S)), p.push([
|
|
1484
1469
|
"div",
|
|
1485
1470
|
{},
|
|
1486
1471
|
[
|
|
@@ -1491,10 +1476,10 @@ function xn() {
|
|
|
1491
1476
|
"$ (internal): "
|
|
1492
1477
|
],
|
|
1493
1478
|
["object", { object: a }]
|
|
1494
|
-
]),
|
|
1479
|
+
]), p;
|
|
1495
1480
|
}
|
|
1496
|
-
function i(a,
|
|
1497
|
-
return
|
|
1481
|
+
function i(a, p) {
|
|
1482
|
+
return p = F({}, p), Object.keys(p).length ? [
|
|
1498
1483
|
"div",
|
|
1499
1484
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
1500
1485
|
[
|
|
@@ -1509,33 +1494,33 @@ function xn() {
|
|
|
1509
1494
|
{
|
|
1510
1495
|
style: "padding-left:1.25em"
|
|
1511
1496
|
},
|
|
1512
|
-
...Object.keys(
|
|
1497
|
+
...Object.keys(p).map((b) => [
|
|
1513
1498
|
"div",
|
|
1514
1499
|
{},
|
|
1515
1500
|
["span", s, b + ": "],
|
|
1516
|
-
c(
|
|
1501
|
+
c(p[b], !1)
|
|
1517
1502
|
])
|
|
1518
1503
|
]
|
|
1519
1504
|
] : ["span", {}];
|
|
1520
1505
|
}
|
|
1521
|
-
function c(a,
|
|
1522
|
-
return typeof a == "number" ? ["span", e, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", s, a] : _(a) ? ["object", { object:
|
|
1506
|
+
function c(a, p = !0) {
|
|
1507
|
+
return typeof a == "number" ? ["span", e, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", s, a] : _(a) ? ["object", { object: p ? u(a) : a }] : ["span", n, String(a)];
|
|
1523
1508
|
}
|
|
1524
|
-
function l(a,
|
|
1509
|
+
function l(a, p) {
|
|
1525
1510
|
const b = a.type;
|
|
1526
1511
|
if (V(b))
|
|
1527
1512
|
return;
|
|
1528
1513
|
const S = {};
|
|
1529
1514
|
for (const j in a.ctx)
|
|
1530
|
-
f(b, j,
|
|
1515
|
+
f(b, j, p) && (S[j] = a.ctx[j]);
|
|
1531
1516
|
return S;
|
|
1532
1517
|
}
|
|
1533
|
-
function f(a,
|
|
1518
|
+
function f(a, p, b) {
|
|
1534
1519
|
const S = a[b];
|
|
1535
|
-
if (d(S) && S.includes(
|
|
1520
|
+
if (d(S) && S.includes(p) || _(S) && p in S || a.extends && f(a.extends, p, b) || a.mixins && a.mixins.some((j) => f(j, p, b)))
|
|
1536
1521
|
return !0;
|
|
1537
1522
|
}
|
|
1538
|
-
function
|
|
1523
|
+
function h(a) {
|
|
1539
1524
|
return y(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
|
|
1540
1525
|
}
|
|
1541
1526
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(r) : window.devtoolsFormatters = [r];
|
|
@@ -1604,8 +1589,8 @@ class Pn {
|
|
|
1604
1589
|
addToState(e, n) {
|
|
1605
1590
|
this.isOptionApi() || n?.value || (n = qt(n)), this.state[e] = n, this.store[e] = Ye(this.state, e);
|
|
1606
1591
|
}
|
|
1607
|
-
addSubscription(e, n) {
|
|
1608
|
-
this._subscriptions[e] = n;
|
|
1592
|
+
addSubscription(e, n, s) {
|
|
1593
|
+
this._subscriptions[e] = { subscription: n, subscriptionOptions: s };
|
|
1609
1594
|
}
|
|
1610
1595
|
/**
|
|
1611
1596
|
* Create and return a class instance
|
|
@@ -1619,10 +1604,10 @@ class Pn {
|
|
|
1619
1604
|
return new this(e, n, s);
|
|
1620
1605
|
}
|
|
1621
1606
|
debugLog(e, n) {
|
|
1622
|
-
this._debug &&
|
|
1607
|
+
this._debug && K.log(e, n);
|
|
1623
1608
|
}
|
|
1624
1609
|
hasDeniedFirstChar(e) {
|
|
1625
|
-
return
|
|
1610
|
+
return Tt(e[0]);
|
|
1626
1611
|
}
|
|
1627
1612
|
static hasRequiredKeys(e) {
|
|
1628
1613
|
return this._requiredKeys === void 0 || this._requiredKeys?.every((n) => !!e[n]);
|
|
@@ -1634,7 +1619,7 @@ class Pn {
|
|
|
1634
1619
|
return this.getValue(this.state[e]);
|
|
1635
1620
|
}
|
|
1636
1621
|
getSubscriptions() {
|
|
1637
|
-
if (!
|
|
1622
|
+
if (!Dt(this._subscriptions))
|
|
1638
1623
|
return this._subscriptions;
|
|
1639
1624
|
}
|
|
1640
1625
|
getValue(e) {
|
|
@@ -1651,14 +1636,14 @@ class Pn {
|
|
|
1651
1636
|
}
|
|
1652
1637
|
}
|
|
1653
1638
|
function Fn(t, e = !1) {
|
|
1654
|
-
return typeof e != "boolean" && (e = !1),
|
|
1639
|
+
return typeof e != "boolean" && (e = !1), q.debug = e, q.subscribers = t, q.plugin.bind(q);
|
|
1655
1640
|
}
|
|
1656
1641
|
export {
|
|
1657
1642
|
fe as CustomConsole,
|
|
1658
1643
|
$n as PluginSubscriber,
|
|
1659
|
-
|
|
1644
|
+
q as PluginSubscription,
|
|
1660
1645
|
Pn as Store,
|
|
1661
1646
|
Fn as createPlugin,
|
|
1662
1647
|
Mn as defineAStore,
|
|
1663
|
-
|
|
1648
|
+
Dt as isEmpty
|
|
1664
1649
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],x):(_=typeof globalThis<"u"?globalThis:_||self,x(_["pinia-plugin-subscription"]={},_.Pinia))})(this,(function(_,x){"use strict";class fe{_createInstance;_name;_storeInstance;_resetStoreCallback;_storeOnActionSubscription;_storeMutationSubscription;_subscriptions;pluginCreated;get name(){return this._name}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){this._name=e,this._createInstance=n}invoke({store:e,options:n},s){this._storeInstance=this._createInstance(e,n,s),this._storeInstance&&(this._subscriptions=this._storeInstance.getSubscriptions(),this._storeMutationSubscription=this._storeInstance.storeSubscribe,this._storeOnActionSubscription=this._storeInstance.onAction,this.pluginCreated&&this.pluginCreated(e))}}const Ct="pinia-plugin-subscription",he=(t,e="white")=>`background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;function pe(t,e){if(!t)throw new Error("Style instructions are required");console.log("%c%s",t,e.shift(),...e)}class It{static _bgColor="#ffec73";static _color="green";static _icon="🍍⚡";static _errorBgColor="#d24545";static _errorColor="white";static _errorIcon="🍍⚠️";static _pluginName;static _styles={error:{bgColor:this._bgColor,color:this._color,icon:this._icon},info:{bgColor:this._errorBgColor,color:this._errorColor,icon:this._errorIcon}};static formatMessage(e,n){return` [${n} ${Ct}] - ${e} `}static generateStyle(e){return he(e.bgColor,e.color)}static getStyleDefinition(e){return this._styles[e??"info"]}static log(...e){this.useLog(this.getStyleDefinition(),e)}static logError(...e){this.useLog(this.getStyleDefinition("error"),e)}static rebuildArgs(e,n){if(typeof e=="string")return[this.formatMessage(e,n)];if(Array.isArray(e))return[this.formatMessage(e.shift(),n),...e??[]]}static useLog(e,n){pe(this.generateStyle(e),this.rebuildArgs(n,e.icon))}}class B extends It{static _pluginName=Ct}function de(t,e,n){const s=n?{storeOptions:n}:{};return typeof e=="function"?_e(t,e,s):ge(t,e,s)}function _e(t,e,n){return x.defineStore(t,e,n)}function ge(t,e,n){return n&&(e={...e,...n??{}}),x.defineStore(t,e)}const be=new Set(["_","$"]);function Vt(t){return be.has(t[0])}function Y(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")}class me{_debug=!1;_resetStoreCallback=[];_subscribers=[];_subscriptions=[];set debug(e){this._debug=e}set subscribers(e){this._subscribers=e}get subscriptions(){if(!Y(this._subscriptions))return this._subscriptions}addResetStoreCallback(e){this._resetStoreCallback.push(e)}addSubscriber(e){this._subscribers.push(e)}addSubscriptions(e){e&&(this._subscriptions=[...this._subscriptions,e])}executeResetStoreCallbacks(e){this._resetStoreCallback.forEach(n=>n(e))}findPluginSubscriptions(e){return this._subscriptions.filter(n=>n&&n[e])}plugin({store:e,options:n}){if(this._subscribers.length)try{this._subscribers.forEach(s=>{s.invoke({store:e,options:n},this._debug),this.addSubscriptions(s.subscriptions),s.resetStoreCallback&&this.addResetStoreCallback(s.resetStoreCallback)}),this.subscriptionDelivery({store:e,options:n}),this.rewriteResetStore({store:e},Object.assign({},e.$state),Object.assign({},e))}catch(s){B.logError("PluginSubscription.plugin()",s,e,n)}}rewriteResetStore({store:e},n,s){e.$reset=()=>{this.executeResetStoreCallbacks(e),Object.keys(s).forEach(r=>{Vt(r)||(e[r]=n[r]??s[r])}),e.$patch(JSON.parse(JSON.stringify(n)))}}storeOnActionSubscription(e){const{store:n,callback:s}=e();n.$onAction(({after:r,args:i,name:o})=>{this._debug&&B.log(`store.$subscribe ${n.$id}`,[r,i,o,n]),s({after:r,args:i,name:o})})}storeMutationSubscription(e){const{store:n,callback:s}=e();n.$subscribe(r=>{this._debug&&B.log(`store.$subscribe ${n.$id}`,[r,n]),s(r)})}subscriptionDelivery({store:e,options:n}){this._subscribers.forEach(s=>{const r=this.findPluginSubscriptions(s.name);Y(r)||r?.forEach(i=>{i[s.name]?.(e)?.forEach(c=>{s.invoke({store:c,options:n},this._debug)})}),s.storeMutationSubscription&&this.storeMutationSubscription(s.storeMutationSubscription),s.storeOnActionSubscription&&this.storeOnActionSubscription(s.storeOnActionSubscription)})}}const K=new me;function ye(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const ot=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const At=()=>{},Se=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),D=Object.assign,Ee=Object.prototype.hasOwnProperty,ct=(t,e)=>Ee.call(t,e),d=Array.isArray,H=t=>Tt(t)==="[object Map]",C=t=>typeof t=="function",O=t=>typeof t=="string",L=t=>typeof t=="symbol",g=t=>t!==null&&typeof t=="object",we=Object.prototype.toString,Tt=t=>we.call(t),xt=t=>Tt(t).slice(8,-1),G=t=>O(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oe=(t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))})(t=>t.charAt(0).toUpperCase()+t.slice(1)),at=(t,e)=>!Object.is(t,e);let Dt;const Q=()=>Dt||(Dt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function lt(t){if(d(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],r=O(s)?Ce(s):lt(s);if(r)for(const i in r)e[i]=r[i]}return e}else if(O(t)||g(t))return t}const Ne=/;(?![^(]*\))/g,ve=/:([^]+)/,Re=/\/\*[^]*?\*\//g;function Ce(t){const e={};return t.replace(Re,"").split(Ne).forEach(n=>{if(n){const s=n.split(ve);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function ut(t){let e="";if(O(t))e=t;else if(d(t))for(let n=0;n<t.length;n++){const s=ut(t[n]);s&&(e+=s+" ")}else if(g(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function $(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let $t=0,ft;function ht(){$t++}function pt(){if(--$t>0)return;let t;for(;ft;){let e=ft;for(ft=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){t||(t=s)}e=n}}if(t)throw t}class Ie{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){ht();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(D({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{pt()}}}const Pt=new WeakMap,dt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Mt=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),Ft=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function jn(t,e,n){}function I(t,e,n,s,r,i){const o=Pt.get(t);if(!o)return;const c=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:t,type:e,key:n,newValue:s,oldValue:r,oldTarget:i}):l.trigger())};if(ht(),e==="clear")o.forEach(c);else{const l=d(t),f=l&&G(n);if(l&&n==="length"){const p=Number(s);o.forEach((a,h)=>{(h==="length"||h===Ft||!L(h)&&h>=p)&&c(a)})}else switch((n!==void 0||o.has(void 0))&&c(o.get(n)),f&&c(o.get(Ft)),e){case"add":l?f&&c(o.get("length")):(c(o.get(dt)),H(t)&&c(o.get(Mt)));break;case"delete":l||(c(o.get(dt)),H(t)&&c(o.get(Mt)));break;case"set":H(t)&&c(o.get(dt));break}}pt()}function Ve(t,e){const n=Pt.get(t);return n&&n.get(e)}function P(t){const e=u(t);return e===t||m(t)?e:e.map(v)}function _t(t){return t=u(t),t}function V(t,e){return E(t)?St(t)?U(v(e)):U(e):v(e)}const Ae={__proto__:null,[Symbol.iterator](){return gt(this,Symbol.iterator,t=>V(this,t))},concat(...t){return P(this).concat(...t.map(e=>d(e)?P(e):e))},entries(){return gt(this,"entries",t=>(t[1]=V(this,t[1]),t))},every(t,e){return N(this,"every",t,e,void 0,arguments)},filter(t,e){return N(this,"filter",t,e,n=>n.map(s=>V(this,s)),arguments)},find(t,e){return N(this,"find",t,e,n=>V(this,n),arguments)},findIndex(t,e){return N(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return N(this,"findLast",t,e,n=>V(this,n),arguments)},findLastIndex(t,e){return N(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return N(this,"forEach",t,e,void 0,arguments)},includes(...t){return bt(this,"includes",t)},indexOf(...t){return bt(this,"indexOf",t)},join(t){return P(this).join(t)},lastIndexOf(...t){return bt(this,"lastIndexOf",t)},map(t,e){return N(this,"map",t,e,void 0,arguments)},pop(){return z(this,"pop")},push(...t){return z(this,"push",t)},reduce(t,...e){return jt(this,"reduce",t,e)},reduceRight(t,...e){return jt(this,"reduceRight",t,e)},shift(){return z(this,"shift")},some(t,e){return N(this,"some",t,e,void 0,arguments)},splice(...t){return z(this,"splice",t)},toReversed(){return P(this).toReversed()},toSorted(t){return P(this).toSorted(t)},toSpliced(...t){return P(this).toSpliced(...t)},unshift(...t){return z(this,"unshift",t)},values(){return gt(this,"values",t=>V(this,t))}};function gt(t,e,n){const s=_t(t),r=s[e]();return s!==t&&!m(t)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Te=Array.prototype;function N(t,e,n,s,r,i){const o=_t(t),c=o!==t&&!m(t),l=o[e];if(l!==Te[e]){const a=l.apply(t,i);return c?v(a):a}let f=n;o!==t&&(c?f=function(a,h){return n.call(this,V(t,a),h,t)}:n.length>2&&(f=function(a,h){return n.call(this,a,h,t)}));const p=l.call(o,f,s);return c&&r?r(p):p}function jt(t,e,n,s){const r=_t(t);let i=n;return r!==t&&(m(t)?n.length>3&&(i=function(o,c,l){return n.call(this,o,c,l,t)}):i=function(o,c,l){return n.call(this,o,V(t,c),l,t)}),r[e](i,...s)}function bt(t,e,n){const s=u(t),r=s[e](...n);return(r===-1||r===!1)&&W(n[0])?(n[0]=u(n[0]),s[e](...n)):r}function z(t,e,n=[]){ht();const s=u(t)[e].apply(t,n);return pt(),s}const xe=ye("__proto__,__v_isRef,__isVue"),kt=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(L));function De(t){return L(t)||(t=String(t)),u(this).hasOwnProperty(t)}class Kt{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,s){if(n==="__v_skip")return e.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?ze:Wt:i?Le:zt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const o=d(e);if(!r){let l;if(o&&(l=Ae[n]))return l;if(n==="hasOwnProperty")return De}const c=Reflect.get(e,n,b(e)?e:s);if((L(n)?kt.has(n):xe(n))||i)return c;if(b(c)){const l=o&&G(n)?c:c.value;return r&&g(l)?yt(l):l}return g(c)?r?yt(c):Ut(c):c}}class $e extends Kt{constructor(e=!1){super(!1,e)}set(e,n,s,r){let i=e[n];const o=d(e)&&G(n);if(!this._isShallow){const f=E(i);if(!m(s)&&!E(s)&&(i=u(i),s=u(s)),!o&&b(i)&&!b(s))return f?(process.env.NODE_ENV!=="production"&&$(`Set operation on key "${String(n)}" failed: target is readonly.`,e[n]),!0):(i.value=s,!0)}const c=o?Number(n)<e.length:ct(e,n),l=Reflect.set(e,n,s,b(e)?e:r);return e===u(r)&&(c?at(s,i)&&I(e,"set",n,s,i):I(e,"add",n,s)),l}deleteProperty(e,n){const s=ct(e,n),r=e[n],i=Reflect.deleteProperty(e,n);return i&&s&&I(e,"delete",n,void 0,r),i}has(e,n){const s=Reflect.has(e,n);return!L(n)||kt.has(n),s}ownKeys(e){return Reflect.ownKeys(e)}}class Pe extends Kt{constructor(e=!1){super(!0,e)}set(e,n){return process.env.NODE_ENV!=="production"&&$(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return process.env.NODE_ENV!=="production"&&$(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}}const Me=new $e,Fe=new Pe,mt=t=>t,X=t=>Reflect.getPrototypeOf(t);function je(t,e,n){return function(...s){const r=this.__v_raw,i=u(r),o=H(i),c=t==="entries"||t===Symbol.iterator&&o,l=r[t](...s),f=n?mt:e?U:v;return{next(){const{value:p,done:a}=l.next();return a?{value:p,done:a}:{value:c?[f(p[0]),f(p[1])]:f(p),done:a}},[Symbol.iterator](){return this}}}}function Z(t){return function(...e){if(process.env.NODE_ENV!=="production"){const n=e[0]?`on key "${e[0]}" `:"";$(`${Oe(t)} operation ${n}failed: target is readonly.`,u(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function ke(t,e){const n={get(r){const i=this.__v_raw,o=u(i),c=u(r),{has:l}=X(o),f=e?mt:t?U:v;if(l.call(o,r))return f(i.get(r));if(l.call(o,c))return f(i.get(c));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!t&&(u(r),void 0),r.size},has(r){const i=this.__v_raw;u(i);const o=u(r);return r===o?i.has(r):i.has(r)||i.has(o)},forEach(r,i){const o=this,c=o.__v_raw;u(c);const l=e?mt:t?U:v;return c.forEach((f,p)=>r.call(i,l(f),l(p),o))}};return D(n,t?{add:Z("add"),set:Z("set"),delete:Z("delete"),clear:Z("clear")}:{add(r){!e&&!m(r)&&!E(r)&&(r=u(r));const i=u(this);return X(i).has.call(i,r)||(i.add(r),I(i,"add",r,r)),this},set(r,i){!e&&!m(i)&&!E(i)&&(i=u(i));const o=u(this),{has:c,get:l}=X(o);let f=c.call(o,r);f?process.env.NODE_ENV!=="production"&&Lt(o,c,r):(r=u(r),f=c.call(o,r));const p=l.call(o,r);return o.set(r,i),f?at(i,p)&&I(o,"set",r,i,p):I(o,"add",r,i),this},delete(r){const i=u(this),{has:o,get:c}=X(i);let l=o.call(i,r);l?process.env.NODE_ENV!=="production"&&Lt(i,o,r):(r=u(r),l=o.call(i,r));const f=c?c.call(i,r):void 0,p=i.delete(r);return l&&I(i,"delete",r,void 0,f),p},clear(){const r=u(this),i=r.size!==0,o=process.env.NODE_ENV!=="production"?H(r)?new Map(r):new Set(r):void 0,c=r.clear();return i&&I(r,"clear",void 0,void 0,o),c}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=je(r,t,e)}),n}function Ht(t,e){const n=ke(t,e);return(s,r,i)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?s:Reflect.get(ct(n,r)&&r in s?n:s,r,i)}const Ke={get:Ht(!1,!1)},He={get:Ht(!0,!1)};function Lt(t,e,n){const s=u(n);if(s!==n&&e.call(t,s)){const r=xt(t);$(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="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 zt=new WeakMap,Le=new WeakMap,Wt=new WeakMap,ze=new WeakMap;function We(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ue(t){return t.__v_skip||!Object.isExtensible(t)?0:We(xt(t))}function Ut(t){return E(t)?t:qt(t,!1,Me,Ke,zt)}function yt(t){return qt(t,!0,Fe,He,Wt)}function qt(t,e,n,s,r){if(!g(t))return process.env.NODE_ENV!=="production"&&$(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=Ue(t);if(i===0)return t;const o=r.get(t);if(o)return o;const c=new Proxy(t,i===2?s:n);return r.set(t,c),c}function St(t){return E(t)?St(t.__v_raw):!!(t&&t.__v_isReactive)}function E(t){return!!(t&&t.__v_isReadonly)}function m(t){return!!(t&&t.__v_isShallow)}function W(t){return t?!!t.__v_raw:!1}function u(t){const e=t&&t.__v_raw;return e?u(e):t}const v=t=>g(t)?Ut(t):t,U=t=>g(t)?yt(t):t;function b(t){return t?t.__v_isRef===!0:!1}function Jt(t){return qe(t,!1)}function qe(t,e){return b(t)?t:new Je(t,e)}class Je{constructor(e,n){this.dep=new Ie,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:u(e),this._value=n?e:v(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,s=this.__v_isShallow||m(e)||E(e);e=s?e:u(e),at(e,n)&&(this._rawValue=e,this._value=s?e:v(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}}function Be(t){return b(t)?t.value:t}class Ye{constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=u(e);let r=!0,i=e;if(!d(e)||!G(String(n)))do r=!W(i)||m(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Be(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&b(this._raw[this._key])){const n=this._object[this._key];if(b(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return Ve(this._raw,this._key)}}class Ge{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 Qe(t,e,n){return b(t)?t:C(t)?new Ge(t):g(t)&&arguments.length>1?Xe(t,e,n):Jt(t)}function Xe(t,e,n){return new Ye(t,e,n)}const T=[];function Ze(t){T.push(t)}function tn(){T.pop()}let Et=!1;function M(t,...e){if(Et)return;Et=!0;const n=T.length?T[T.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=en();if(s)wt(s,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,r.map(({vnode:i})=>`at <${le(n,i.type)}>`).join(`
|
|
2
|
-
`),r]);else{const
|
|
3
|
-
`,...nn(r)),console.warn(...
|
|
4
|
-
`],...rn(n))}),e}function rn({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",s=t.component?t.component.parent==null:!1,r=` at <${le(t.component,t.type,s)}`,
|
|
5
|
-
Component that was made reactive: `,t)),Rn(t,e,n,s,r,o
|
|
1
|
+
(function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],x):(_=typeof globalThis<"u"?globalThis:_||self,x(_["pinia-plugin-subscription"]={},_.Pinia))})(this,(function(_,x){"use strict";class fe{_createInstance;_name;_storeInstance;_resetStoreCallback;_storeOnActionSubscription;_storeMutationSubscription;_subscriptions;pluginCreated;get name(){return this._name}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){this._name=e,this._createInstance=n}invoke({store:e,options:n},s){this._storeInstance=this._createInstance(e,n,s),this._storeInstance&&(this._subscriptions=this._storeInstance.getSubscriptions(),this._storeMutationSubscription=this._storeInstance.storeSubscribe,this._storeOnActionSubscription=this._storeInstance.onAction,this.pluginCreated&&this.pluginCreated(e))}}const Ct="pinia-plugin-subscription",pe=(t,e="white")=>`background-color: ${t}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;function he(t,e){if(!t)throw new Error("Style instructions are required");console.log("%c%s",t,e.shift(),...e)}class It{static _bgColor="#ffec73";static _color="green";static _icon="🍍⚡";static _errorBgColor="#d24545";static _errorColor="white";static _errorIcon="🍍⚠️";static _pluginName;static _styles={error:{bgColor:this._bgColor,color:this._color,icon:this._icon},info:{bgColor:this._errorBgColor,color:this._errorColor,icon:this._errorIcon}};static formatMessage(e,n){return` [${n} ${Ct}] - ${e} `}static generateStyle(e){return pe(e.bgColor,e.color)}static getStyleDefinition(e){return this._styles[e??"info"]}static log(...e){this.useLog(this.getStyleDefinition(),e)}static logError(...e){this.useLog(this.getStyleDefinition("error"),e)}static rebuildArgs(e,n){if(typeof e=="string")return[this.formatMessage(e,n)];if(Array.isArray(e))return[this.formatMessage(e.shift(),n),...e??[]]}static useLog(e,n){he(this.generateStyle(e),this.rebuildArgs(n,e.icon))}}class K extends It{static _pluginName=Ct}function de(t,e,n){const s=n?{storeOptions:n}:{};return typeof e=="function"?_e(t,e,s):ge(t,e,s)}function _e(t,e,n){return x.defineStore(t,e,n)}function ge(t,e,n){return n&&(e={...e,...n??{}}),x.defineStore(t,e)}const be=new Set(["_","$"]);function Vt(t){return be.has(t[0])}function ot(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")}class me{_debug=!1;_resetStoreCallback=[];_subscribers=[];_subscriptions=[];set debug(e){this._debug=e}set subscribers(e){this._subscribers=e}get subscriptions(){if(!ot(this._subscriptions))return this._subscriptions}addResetStoreCallback(e){this._resetStoreCallback.push(e)}executeResetStoreCallbacks(e){this._resetStoreCallback.forEach(n=>n(e))}plugin({store:e,options:n}){if(this._subscribers.length)try{this._subscribers.forEach(s=>{s.invoke({store:e,options:n},this._debug),s.subscriptions&&this.subscriptionDelivery({store:e,options:n},s.subscriptions),s.storeMutationSubscription&&this.storeMutationSubscription(s.storeMutationSubscription),s.storeOnActionSubscription&&this.storeOnActionSubscription(s.storeOnActionSubscription),s.resetStoreCallback&&this.addResetStoreCallback(s.resetStoreCallback)}),this.rewriteResetStore({store:e},Object.assign({},e.$state),Object.assign({},e))}catch(s){K.logError("PluginSubscription.plugin()",s,e,n)}}rewriteResetStore({store:e},n,s){e.$reset=()=>{this.executeResetStoreCallbacks(e),Object.keys(s).forEach(r=>{Vt(r)||(e[r]=n[r]??s[r])}),e.$patch(JSON.parse(JSON.stringify(n)))}}storeOnActionSubscription(e){const{store:n,callback:s}=e();n.$onAction(({after:r,args:o,name:i})=>{this._debug&&K.log(`store.$subscribe ${n.$id}`,[r,o,i,n]),s({after:r,args:o,name:i})})}storeMutationSubscription(e){const{store:n,callback:s}=e();n.$subscribe(r=>{this._debug&&K.log(`store.$subscribe ${n.$id}`,[r,n]),s(r)})}subscriptionDelivery({store:e,options:n},s){Object.entries(s).forEach(([r,o])=>{try{const{subscription:i,subscriptionOptions:c}=o;i.invoke({store:e,options:{...n,...c}},this._debug)}catch(i){K.logError(`PluginSubscription.subscriptionDelivery() - ${r}`,i,e,n)}})}}const H=new me;function ye(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const it=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const At=()=>{},Se=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),D=Object.assign,Ee=Object.prototype.hasOwnProperty,ct=(t,e)=>Ee.call(t,e),d=Array.isArray,L=t=>Tt(t)==="[object Map]",C=t=>typeof t=="function",O=t=>typeof t=="string",z=t=>typeof t=="symbol",g=t=>t!==null&&typeof t=="object",we=Object.prototype.toString,Tt=t=>we.call(t),xt=t=>Tt(t).slice(8,-1),Y=t=>O(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oe=(t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))})(t=>t.charAt(0).toUpperCase()+t.slice(1)),at=(t,e)=>!Object.is(t,e);let Dt;const G=()=>Dt||(Dt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function lt(t){if(d(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],r=O(s)?Ce(s):lt(s);if(r)for(const o in r)e[o]=r[o]}return e}else if(O(t)||g(t))return t}const Ne=/;(?![^(]*\))/g,ve=/:([^]+)/,Re=/\/\*[^]*?\*\//g;function Ce(t){const e={};return t.replace(Re,"").split(Ne).forEach(n=>{if(n){const s=n.split(ve);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function ut(t){let e="";if(O(t))e=t;else if(d(t))for(let n=0;n<t.length;n++){const s=ut(t[n]);s&&(e+=s+" ")}else if(g(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function $(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let $t=0,ft;function pt(){$t++}function ht(){if(--$t>0)return;let t;for(;ft;){let e=ft;for(ft=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){t||(t=s)}e=n}}if(t)throw t}class Ie{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){pt();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(D({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ht()}}}const Pt=new WeakMap,dt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Mt=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),Ft=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function jn(t,e,n){}function I(t,e,n,s,r,o){const i=Pt.get(t);if(!i)return;const c=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:t,type:e,key:n,newValue:s,oldValue:r,oldTarget:o}):l.trigger())};if(pt(),e==="clear")i.forEach(c);else{const l=d(t),f=l&&Y(n);if(l&&n==="length"){const h=Number(s);i.forEach((a,p)=>{(p==="length"||p===Ft||!z(p)&&p>=h)&&c(a)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),f&&c(i.get(Ft)),e){case"add":l?f&&c(i.get("length")):(c(i.get(dt)),L(t)&&c(i.get(Mt)));break;case"delete":l||(c(i.get(dt)),L(t)&&c(i.get(Mt)));break;case"set":L(t)&&c(i.get(dt));break}}ht()}function Ve(t,e){const n=Pt.get(t);return n&&n.get(e)}function P(t){const e=u(t);return e===t||m(t)?e:e.map(v)}function _t(t){return t=u(t),t}function V(t,e){return E(t)?St(t)?q(v(e)):q(e):v(e)}const Ae={__proto__:null,[Symbol.iterator](){return gt(this,Symbol.iterator,t=>V(this,t))},concat(...t){return P(this).concat(...t.map(e=>d(e)?P(e):e))},entries(){return gt(this,"entries",t=>(t[1]=V(this,t[1]),t))},every(t,e){return N(this,"every",t,e,void 0,arguments)},filter(t,e){return N(this,"filter",t,e,n=>n.map(s=>V(this,s)),arguments)},find(t,e){return N(this,"find",t,e,n=>V(this,n),arguments)},findIndex(t,e){return N(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return N(this,"findLast",t,e,n=>V(this,n),arguments)},findLastIndex(t,e){return N(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return N(this,"forEach",t,e,void 0,arguments)},includes(...t){return bt(this,"includes",t)},indexOf(...t){return bt(this,"indexOf",t)},join(t){return P(this).join(t)},lastIndexOf(...t){return bt(this,"lastIndexOf",t)},map(t,e){return N(this,"map",t,e,void 0,arguments)},pop(){return W(this,"pop")},push(...t){return W(this,"push",t)},reduce(t,...e){return jt(this,"reduce",t,e)},reduceRight(t,...e){return jt(this,"reduceRight",t,e)},shift(){return W(this,"shift")},some(t,e){return N(this,"some",t,e,void 0,arguments)},splice(...t){return W(this,"splice",t)},toReversed(){return P(this).toReversed()},toSorted(t){return P(this).toSorted(t)},toSpliced(...t){return P(this).toSpliced(...t)},unshift(...t){return W(this,"unshift",t)},values(){return gt(this,"values",t=>V(this,t))}};function gt(t,e,n){const s=_t(t),r=s[e]();return s!==t&&!m(t)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Te=Array.prototype;function N(t,e,n,s,r,o){const i=_t(t),c=i!==t&&!m(t),l=i[e];if(l!==Te[e]){const a=l.apply(t,o);return c?v(a):a}let f=n;i!==t&&(c?f=function(a,p){return n.call(this,V(t,a),p,t)}:n.length>2&&(f=function(a,p){return n.call(this,a,p,t)}));const h=l.call(i,f,s);return c&&r?r(h):h}function jt(t,e,n,s){const r=_t(t);let o=n;return r!==t&&(m(t)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,t)}):o=function(i,c,l){return n.call(this,i,V(t,c),l,t)}),r[e](o,...s)}function bt(t,e,n){const s=u(t),r=s[e](...n);return(r===-1||r===!1)&&U(n[0])?(n[0]=u(n[0]),s[e](...n)):r}function W(t,e,n=[]){pt();const s=u(t)[e].apply(t,n);return ht(),s}const xe=ye("__proto__,__v_isRef,__isVue"),kt=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(z));function De(t){return z(t)||(t=String(t)),u(this).hasOwnProperty(t)}class Kt{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,s){if(n==="__v_skip")return e.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?ze:Wt:o?Le:zt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const i=d(e);if(!r){let l;if(i&&(l=Ae[n]))return l;if(n==="hasOwnProperty")return De}const c=Reflect.get(e,n,b(e)?e:s);if((z(n)?kt.has(n):xe(n))||o)return c;if(b(c)){const l=i&&Y(n)?c:c.value;return r&&g(l)?yt(l):l}return g(c)?r?yt(c):Ut(c):c}}class $e extends Kt{constructor(e=!1){super(!1,e)}set(e,n,s,r){let o=e[n];const i=d(e)&&Y(n);if(!this._isShallow){const f=E(o);if(!m(s)&&!E(s)&&(o=u(o),s=u(s)),!i&&b(o)&&!b(s))return f?(process.env.NODE_ENV!=="production"&&$(`Set operation on key "${String(n)}" failed: target is readonly.`,e[n]),!0):(o.value=s,!0)}const c=i?Number(n)<e.length:ct(e,n),l=Reflect.set(e,n,s,b(e)?e:r);return e===u(r)&&(c?at(s,o)&&I(e,"set",n,s,o):I(e,"add",n,s)),l}deleteProperty(e,n){const s=ct(e,n),r=e[n],o=Reflect.deleteProperty(e,n);return o&&s&&I(e,"delete",n,void 0,r),o}has(e,n){const s=Reflect.has(e,n);return!z(n)||kt.has(n),s}ownKeys(e){return Reflect.ownKeys(e)}}class Pe extends Kt{constructor(e=!1){super(!0,e)}set(e,n){return process.env.NODE_ENV!=="production"&&$(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return process.env.NODE_ENV!=="production"&&$(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}}const Me=new $e,Fe=new Pe,mt=t=>t,Q=t=>Reflect.getPrototypeOf(t);function je(t,e,n){return function(...s){const r=this.__v_raw,o=u(r),i=L(o),c=t==="entries"||t===Symbol.iterator&&i,l=r[t](...s),f=n?mt:e?q:v;return{next(){const{value:h,done:a}=l.next();return a?{value:h,done:a}:{value:c?[f(h[0]),f(h[1])]:f(h),done:a}},[Symbol.iterator](){return this}}}}function X(t){return function(...e){if(process.env.NODE_ENV!=="production"){const n=e[0]?`on key "${e[0]}" `:"";$(`${Oe(t)} operation ${n}failed: target is readonly.`,u(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function ke(t,e){const n={get(r){const o=this.__v_raw,i=u(o),c=u(r),{has:l}=Q(i),f=e?mt:t?q:v;if(l.call(i,r))return f(o.get(r));if(l.call(i,c))return f(o.get(c));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!t&&(u(r),void 0),r.size},has(r){const o=this.__v_raw;u(o);const i=u(r);return r===i?o.has(r):o.has(r)||o.has(i)},forEach(r,o){const i=this,c=i.__v_raw;u(c);const l=e?mt:t?q:v;return c.forEach((f,h)=>r.call(o,l(f),l(h),i))}};return D(n,t?{add:X("add"),set:X("set"),delete:X("delete"),clear:X("clear")}:{add(r){!e&&!m(r)&&!E(r)&&(r=u(r));const o=u(this);return Q(o).has.call(o,r)||(o.add(r),I(o,"add",r,r)),this},set(r,o){!e&&!m(o)&&!E(o)&&(o=u(o));const i=u(this),{has:c,get:l}=Q(i);let f=c.call(i,r);f?process.env.NODE_ENV!=="production"&&Lt(i,c,r):(r=u(r),f=c.call(i,r));const h=l.call(i,r);return i.set(r,o),f?at(o,h)&&I(i,"set",r,o,h):I(i,"add",r,o),this},delete(r){const o=u(this),{has:i,get:c}=Q(o);let l=i.call(o,r);l?process.env.NODE_ENV!=="production"&&Lt(o,i,r):(r=u(r),l=i.call(o,r));const f=c?c.call(o,r):void 0,h=o.delete(r);return l&&I(o,"delete",r,void 0,f),h},clear(){const r=u(this),o=r.size!==0,i=process.env.NODE_ENV!=="production"?L(r)?new Map(r):new Set(r):void 0,c=r.clear();return o&&I(r,"clear",void 0,void 0,i),c}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=je(r,t,e)}),n}function Ht(t,e){const n=ke(t,e);return(s,r,o)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?s:Reflect.get(ct(n,r)&&r in s?n:s,r,o)}const Ke={get:Ht(!1,!1)},He={get:Ht(!0,!1)};function Lt(t,e,n){const s=u(n);if(s!==n&&e.call(t,s)){const r=xt(t);$(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="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 zt=new WeakMap,Le=new WeakMap,Wt=new WeakMap,ze=new WeakMap;function We(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ue(t){return t.__v_skip||!Object.isExtensible(t)?0:We(xt(t))}function Ut(t){return E(t)?t:qt(t,!1,Me,Ke,zt)}function yt(t){return qt(t,!0,Fe,He,Wt)}function qt(t,e,n,s,r){if(!g(t))return process.env.NODE_ENV!=="production"&&$(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=Ue(t);if(o===0)return t;const i=r.get(t);if(i)return i;const c=new Proxy(t,o===2?s:n);return r.set(t,c),c}function St(t){return E(t)?St(t.__v_raw):!!(t&&t.__v_isReactive)}function E(t){return!!(t&&t.__v_isReadonly)}function m(t){return!!(t&&t.__v_isShallow)}function U(t){return t?!!t.__v_raw:!1}function u(t){const e=t&&t.__v_raw;return e?u(e):t}const v=t=>g(t)?Ut(t):t,q=t=>g(t)?yt(t):t;function b(t){return t?t.__v_isRef===!0:!1}function Jt(t){return qe(t,!1)}function qe(t,e){return b(t)?t:new Je(t,e)}class Je{constructor(e,n){this.dep=new Ie,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:u(e),this._value=n?e:v(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,s=this.__v_isShallow||m(e)||E(e);e=s?e:u(e),at(e,n)&&(this._rawValue=e,this._value=s?e:v(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}}function Be(t){return b(t)?t.value:t}class Ye{constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=u(e);let r=!0,o=e;if(!d(e)||!Y(String(n)))do r=!U(o)||m(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Be(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&b(this._raw[this._key])){const n=this._object[this._key];if(b(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return Ve(this._raw,this._key)}}class Ge{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 Qe(t,e,n){return b(t)?t:C(t)?new Ge(t):g(t)&&arguments.length>1?Xe(t,e,n):Jt(t)}function Xe(t,e,n){return new Ye(t,e,n)}const T=[];function Ze(t){T.push(t)}function tn(){T.pop()}let Et=!1;function M(t,...e){if(Et)return;Et=!0;const n=T.length?T[T.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=en();if(s)wt(s,n,11,[t+e.map(o=>{var i,c;return(c=(i=o.toString)==null?void 0:i.call(o))!=null?c:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${le(n,o.type)}>`).join(`
|
|
2
|
+
`),r]);else{const o=[`[Vue warn]: ${t}`,...e];r.length&&o.push(`
|
|
3
|
+
`,...nn(r)),console.warn(...o)}Et=!1}function en(){let t=T[T.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 s=t.component&&t.component.parent;t=s&&s.vnode}return e}function nn(t){const e=[];return t.forEach((n,s)=>{e.push(...s===0?[]:[`
|
|
4
|
+
`],...rn(n))}),e}function rn({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",s=t.component?t.component.parent==null:!1,r=` at <${le(t.component,t.type,s)}`,o=">"+n;return t.props?[r,...sn(t.props),o]:[r+o]}function sn(t){const e=[],n=Object.keys(t);return n.slice(0,3).forEach(s=>{e.push(...Bt(s,t[s]))}),n.length>3&&e.push(" ..."),e}function Bt(t,e,n){return O(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:b(e)?(e=Bt(t,u(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):C(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=u(e),n?e:[`${t}=`,e])}const Yt={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 wt(t,e,n,s){try{return s?t(...s):t()}catch(r){Gt(r,e,n)}}function Gt(t,e,n,s=!0){const r=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=e&&e.appContext.config||it;if(e){let c=e.parent;const l=e.proxy,f=process.env.NODE_ENV!=="production"?Yt[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let a=0;a<h.length;a++)if(h[a](t,l,f)===!1)return}c=c.parent}if(o){wt(o,null,10,[t,l,f]);return}}on(t,n,r,s,i)}function on(t,e,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Yt[e];if(n&&Ze(n),M(`Unhandled error${o?` during execution of ${o}`:""}`),n&&tn(),s)throw t;console.error(t)}else{if(r)throw t;console.error(t)}}const y=[];let R=-1;const F=[];let A=null,j=0;const cn=Promise.resolve();let Ot=null;const an=100;function ln(t){let e=R+1,n=y.length;for(;e<n;){const s=e+n>>>1,r=y[s],o=J(r);o<t||o===t&&r.flags&2?e=s+1:n=s}return e}function un(t){if(!(t.flags&1)){const e=J(t),n=y[y.length-1];!n||!(t.flags&2)&&e>=J(n)?y.push(t):y.splice(ln(e),0,t),t.flags|=1,Qt()}}function Qt(){Ot||(Ot=cn.then(Xt))}function fn(t){d(t)?F.push(...t):A&&t.id===-1?A.splice(j+1,0,t):t.flags&1||(F.push(t),t.flags|=1),Qt()}function pn(t){if(F.length){const e=[...new Set(F)].sort((n,s)=>J(n)-J(s));if(F.length=0,A){A.push(...e);return}for(A=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),j=0;j<A.length;j++){const n=A[j];process.env.NODE_ENV!=="production"&&Zt(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}A=null,j=0}}const J=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Xt(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);const e=process.env.NODE_ENV!=="production"?n=>Zt(t,n):At;try{for(R=0;R<y.length;R++){const n=y[R];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),wt(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;R<y.length;R++){const n=y[R];n&&(n.flags&=-2)}R=-1,y.length=0,pn(t),Ot=null,(y.length||F.length)&&Xt(t)}}function Zt(t,e){const n=t.get(e)||0;if(n>an){const s=e.i,r=s&&ae(s.type);return Gt(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. 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 Nt=new Map;process.env.NODE_ENV!=="production"&&(G().__VUE_HMR_RUNTIME__={createRecord:vt(hn),rerender:vt(dn),reload:vt(_n)});const Z=new Map;function hn(t,e){return Z.has(t)?!1:(Z.set(t,{initialDef:tt(e),instances:new Set}),!0)}function tt(t){return ue(t)?t.__vccOpts:t}function dn(t,e){const n=Z.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(s=>{e&&(s.render=e,tt(s.type).render=e),s.renderCache=[],s.job.flags&8||s.update()}))}function _n(t,e){const n=Z.get(t);if(!n)return;e=tt(e),te(n.initialDef,e);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=tt(o.type);let c=Nt.get(i);c||(i!==n.initialDef&&te(i,e),Nt.set(i,c=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?un(()=>{o.job.flags&8||(o.parent.update(),c.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(i)}fn(()=>{Nt.clear()})}function te(t,e){D(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(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let k,et=[];function ee(t,e){var n,s;k=t,k?(k.enabled=!0,et.forEach(({event:r,args:o})=>k.emit(r,...o)),et=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{ee(o,e)}),setTimeout(()=>{k||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,et=[])},3e3)):et=[]}let nt=null,gn=null;const bn=t=>t.__isTeleport;function ne(t,e){t.shapeFlag&6&&t.component?(t.transition=e,ne(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}G().requestIdleCallback,G().cancelIdleCallback;const mn=Symbol.for("v-ndc"),yn={};process.env.NODE_ENV!=="production"&&(yn.ownKeys=t=>(M("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 Sn={},re=t=>Object.getPrototypeOf(t)===Sn,En=t=>t.__isSuspense,se=Symbol.for("v-fgt"),wn=Symbol.for("v-txt"),On=Symbol.for("v-cmt");function Nn(t){return t?t.__v_isVNode===!0:!1}const vn=(...t)=>ie(...t),oe=({key:t})=>t??null,rt=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?O(t)||b(t)||C(t)?{i:nt,r:t,k:e,f:!!n}:t:null);function Rn(t,e=null,n=null,s=0,r=null,o=t===se?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&oe(e),ref:e&&rt(e),scopeId:gn,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:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:nt};return c?(Rt(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=O(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&M("VNode created with invalid key (NaN). VNode type:",l.type),l}const Cn=process.env.NODE_ENV!=="production"?vn:ie;function ie(t,e=null,n=null,s=0,r=null,o=!1){if((!t||t===mn)&&(process.env.NODE_ENV!=="production"&&!t&&M(`Invalid vnode type when creating vnode: ${t}.`),t=On),Nn(t)){const c=st(t,e,!0);return n&&Rt(c,n),c.patchFlag=-2,c}if(ue(t)&&(t=t.__vccOpts),e){e=In(e);let{class:c,style:l}=e;c&&!O(c)&&(e.class=ut(c)),g(l)&&(U(l)&&!d(l)&&(l=D({},l)),e.style=lt(l))}const i=O(t)?1:En(t)?128:bn(t)?64:g(t)?4:C(t)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&U(t)&&(t=u(t),M("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)),Rn(t,e,n,s,r,i,o,!0)}function In(t){return t?U(t)||re(t)?D({},t):t:null}function st(t,e,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=t,f=e?An(r||{},e):r,h={__v_isVNode:!0,__v_skip:!0,type:t.type,props:f,key:f&&oe(f),ref:e&&e.ref?n&&o?d(o)?o.concat(rt(e)):[o,rt(e)]:rt(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&d(c)?c.map(ce):c,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==se?i===-1?16:i|16:i,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&st(t.ssContent),ssFallback:t.ssFallback&&st(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&s&&ne(h,l.clone(h)),h}function ce(t){const e=st(t);return d(t.children)&&(e.children=t.children.map(ce)),e}function Vn(t=" ",e=0){return Cn(wn,null,t,e)}function Rt(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(d(e))n=16;else if(typeof e=="object")if(s&65){const r=e.default;r&&(r._c&&(r._d=!1),Rt(t,r()),r._c&&(r._d=!0));return}else n=32,!e._&&!re(e)&&(e._ctx=nt);else C(e)?(e={default:e,_ctx:nt},n=32):(e=String(e),s&64?(n=16,e=[Vn(e)]):n=8);t.children=e,t.shapeFlag|=n}function An(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const r in s)if(r==="class")e.class!==s.class&&(e.class=ut([e.class,s.class]));else if(r==="style")e.style=lt([e.style,s.style]);else if(Se(r)){const o=e[r],i=s[r];i&&o!==i&&!(d(o)&&o.includes(i))&&(e[r]=o?[].concat(o,i):i)}else r!==""&&(e[r]=s[r])}return e}{const t=G(),e=(n,s)=>{let r;return(r=t[n])||(r=t[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const Tn=/(?:^|[-_])\w/g,xn=t=>t.replace(Tn,e=>e.toUpperCase()).replace(/[-_]/g,"");function ae(t,e=!0){return C(t)?t.displayName||t.name:t.name||e&&t.__name}function le(t,e,n=!1){let s=ae(e);if(!s&&e.__file){const r=e.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&t){const r=o=>{for(const i in o)if(o[i]===e)return i};s=r(t.components)||t.parent&&r(t.parent.type.components)||r(t.appContext.components)}return s?xn(s):n?"App":"Anonymous"}function ue(t){return C(t)&&"__vccOpts"in t}function Dn(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},s={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(a){if(!g(a))return null;if(a.__isVue)return["div",t,"VueInstance"];if(b(a)){const p=a.value;return["div",{},["span",t,h(a)],"<",c(p),">"]}else{if(St(a))return["div",{},["span",t,m(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${E(a)?" (readonly)":""}`];if(E(a))return["div",{},["span",t,m(a)?"ShallowReadonly":"Readonly"],"<",c(a),">"]}return null},hasBody(a){return a&&a.__isVue},body(a){if(a&&a.__isVue)return["div",{},...o(a.$)]}};function o(a){const p=[];a.type.props&&a.props&&p.push(i("props",u(a.props))),a.setupState!==it&&p.push(i("setup",a.setupState)),a.data!==it&&p.push(i("data",u(a.data)));const S=l(a,"computed");S&&p.push(i("computed",S));const w=l(a,"inject");return w&&p.push(i("injected",w)),p.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:a}]]),p}function i(a,p){return p=D({},p),Object.keys(p).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},a],["div",{style:"padding-left:1.25em"},...Object.keys(p).map(S=>["div",{},["span",s,S+": "],c(p[S],!1)])]]:["span",{}]}function c(a,p=!0){return typeof a=="number"?["span",e,a]:typeof a=="string"?["span",n,JSON.stringify(a)]:typeof a=="boolean"?["span",s,a]:g(a)?["object",{object:p?u(a):a}]:["span",n,String(a)]}function l(a,p){const S=a.type;if(C(S))return;const w={};for(const B in a.ctx)f(S,B,p)&&(w[B]=a.ctx[B]);return w}function f(a,p,S){const w=a[S];if(d(w)&&w.includes(p)||g(w)&&p in w||a.extends&&f(a.extends,p,S)||a.mixins&&a.mixins.some(B=>f(B,p,S)))return!0}function h(a){return m(a)?"ShallowRef":a.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function $n(){Dn()}process.env.NODE_ENV!=="production"&&$n();class Pn{_debug=!1;_onAction;_options;_store;_subscriptions={};_storeSubscribe;static _requiredKeys;get debug(){return this._debug}set debug(e){this._debug=e}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,s=!1){this._debug=s,this._options=n.storeOptions,this._store=e}addToState(e,n){this.isOptionApi()||n?.value||(n=Jt(n)),this.state[e]=n,this.store[e]=Qe(this.state,e)}addSubscription(e,n,s){this._subscriptions[e]={subscription:n,subscriptionOptions:s}}static customizeStore(e,n,s=!1){if(n.storeOptions&&this.hasRequiredKeys(n.storeOptions))return new this(e,n,s)}debugLog(e,n){this._debug&&K.log(e,n)}hasDeniedFirstChar(e){return Vt(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(!ot(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 Mn(t,e=!1){return typeof e!="boolean"&&(e=!1),H.debug=e,H.subscribers=t,H.plugin.bind(H)}_.CustomConsole=It,_.PluginSubscriber=fe,_.PluginSubscription=H,_.Store=Pn,_.createPlugin=Mn,_.defineAStore=de,_.isEmpty=ot,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { PiniaPlugin, PiniaPluginContext, Store as PiniaStore, StateTree } from "pinia"
|
|
2
|
-
import type { PluginSubscriber as PluginSubscriberInterface,
|
|
2
|
+
import type { PluginSubscriber as PluginSubscriberInterface, PluginSubscriptions, StoreOnActionSubscription, StoreMutationSubscription } from "./plugin"
|
|
3
3
|
import { DefineAugmentedStore, StatePropertyValue, StoreOptions, StoreOptionsPropertyValue } from "./store"
|
|
4
|
-
import { AnyObject } from "./src/types"
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
declare module 'pinia-plugin-subscription' {
|
|
@@ -50,7 +49,7 @@ declare module 'pinia-plugin-subscription' {
|
|
|
50
49
|
|
|
51
50
|
addPropertiesToState(properties: string[], values?: AnyObject): void
|
|
52
51
|
|
|
53
|
-
addSubscription(pluginName: string, subscription:
|
|
52
|
+
addSubscription(pluginName: string, subscription: PluginSubscriberInterface, subscriptionOptions?: StoreOptions): void
|
|
54
53
|
|
|
55
54
|
addToState(name: string, value?: StatePropertyValue): void
|
|
56
55
|
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { PiniaPluginContext, StateTree, Store, SubscriptionCallbackMutation } from "pinia";
|
|
2
|
+
import { StoreOptions } from "./store";
|
|
3
|
+
import { PluginSubscriberInterface } from ".";
|
|
2
4
|
export interface PluginSubscriber {
|
|
3
5
|
invoke: (context: PiniaPluginContext, debug?: boolean) => void;
|
|
4
6
|
name: string;
|
|
@@ -16,7 +18,10 @@ export interface OnActionParameters {
|
|
|
16
18
|
args: any[] | object;
|
|
17
19
|
name: string;
|
|
18
20
|
}
|
|
19
|
-
export
|
|
21
|
+
export interface PluginSubscription {
|
|
22
|
+
subscription: PluginSubscriberInterface;
|
|
23
|
+
subscriptionOptions?: StoreOptions;
|
|
24
|
+
}
|
|
20
25
|
export type PluginSubscriptions = Record<string, PluginSubscription>;
|
|
21
26
|
export type NativePiniaSubscription<Callback> = () => NativePiniaSubscriptionReturn<Callback>;
|
|
22
27
|
export type StoreOnActionSubscriptionCallback = (params: OnActionParameters) => void;
|