ss-component-new 1.1.74 → 1.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper-B7R8Jogt.js +524 -0
- package/dist/{array-vzwMZhM4.js → array-BejyPB_1.js} +241 -247
- package/dist/{index-Dq67q_uS.js → index-10n3uNlg.js} +3 -4
- package/dist/{index-CFk0o1Np.js → index-BT8Pkr84.js} +6 -7
- package/dist/{index-CemfYGA8.js → index-BvoThyOF.js} +2 -2
- package/dist/index-CCr_UQBn.js +3749 -0
- package/dist/{index-C3H4rMr-.js → index-ChCXzsYf.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-Bfua7ui1.js → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-DG5vph3h.js} +38 -39
- package/dist/main-BUjoLIJC.js +404 -0
- package/dist/{index-TqZwOJHG.js → menu-oGClEGzK.js} +1788 -3818
- package/dist/{modelComp-B2WEXyGq.js → modelComp-CqA1NVfH.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +31 -2
- package/dist/ss-component.umd.cjs +51 -84
- package/package.json +5 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/cloneDeep-DA0SrY7X.js +0 -318
- package/dist/index-BdGhClne.js +0 -351
- package/dist/index-CA5c0w_z.js +0 -370
- package/dist/index-DA26Wnhj.js +0 -3133
- package/dist/index-DtuPN0eZ.js +0 -131
- package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BY0XvD7v.js +0 -254
- package/dist/main-BJbKQjwb.js +0 -288
- package/dist/menu-CD2KJPvR.js +0 -924
package/dist/menu-CD2KJPvR.js
DELETED
|
@@ -1,924 +0,0 @@
|
|
|
1
|
-
import { hasInjectionContext as ye, inject as Ee, effectScope as be, ref as oe, markRaw as V, toRaw as R, computed as se, isRef as M, isReactive as q, toRef as W, getCurrentInstance as xe, reactive as Le, nextTick as fe, watch as Se, unref as Ue, getCurrentScope as Fe, onScopeDispose as He, toRefs as de } from "vue";
|
|
2
|
-
import { D as Ne } from "./index-TqZwOJHG.js";
|
|
3
|
-
function H(e, o, n) {
|
|
4
|
-
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, n), n) : (e[o] = n, n);
|
|
5
|
-
}
|
|
6
|
-
function K(e, o) {
|
|
7
|
-
if (Array.isArray(e)) {
|
|
8
|
-
e.splice(o, 1);
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
delete e[o];
|
|
12
|
-
}
|
|
13
|
-
/*!
|
|
14
|
-
* pinia v2.2.8
|
|
15
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
16
|
-
* @license MIT
|
|
17
|
-
*/
|
|
18
|
-
let C;
|
|
19
|
-
const U = (e) => C = e, pt = () => ye() && Ee(re) || C, re = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
20
|
-
/* istanbul ignore next */
|
|
21
|
-
Symbol()
|
|
22
|
-
);
|
|
23
|
-
function T(e) {
|
|
24
|
-
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
25
|
-
}
|
|
26
|
-
var O;
|
|
27
|
-
(function(e) {
|
|
28
|
-
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
29
|
-
})(O || (O = {}));
|
|
30
|
-
const I = typeof window < "u", pe = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
31
|
-
function We(e, { autoBom: o = !1 } = {}) {
|
|
32
|
-
return o && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
33
|
-
}
|
|
34
|
-
function ce(e, o, n) {
|
|
35
|
-
const t = new XMLHttpRequest();
|
|
36
|
-
t.open("GET", e), t.responseType = "blob", t.onload = function() {
|
|
37
|
-
Pe(t.response, o, n);
|
|
38
|
-
}, t.onerror = function() {
|
|
39
|
-
console.error("could not download file");
|
|
40
|
-
}, t.send();
|
|
41
|
-
}
|
|
42
|
-
function Oe(e) {
|
|
43
|
-
const o = new XMLHttpRequest();
|
|
44
|
-
o.open("HEAD", e, !1);
|
|
45
|
-
try {
|
|
46
|
-
o.send();
|
|
47
|
-
} catch {
|
|
48
|
-
}
|
|
49
|
-
return o.status >= 200 && o.status <= 299;
|
|
50
|
-
}
|
|
51
|
-
function J(e) {
|
|
52
|
-
try {
|
|
53
|
-
e.dispatchEvent(new MouseEvent("click"));
|
|
54
|
-
} catch {
|
|
55
|
-
const n = document.createEvent("MouseEvents");
|
|
56
|
-
n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const G = typeof navigator == "object" ? navigator : { userAgent: "" }, we = /Macintosh/.test(G.userAgent) && /AppleWebKit/.test(G.userAgent) && !/Safari/.test(G.userAgent), Pe = I ? (
|
|
60
|
-
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
61
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !we ? Je : (
|
|
62
|
-
// Use msSaveOrOpenBlob as a second approach
|
|
63
|
-
"msSaveOrOpenBlob" in G ? Ge : (
|
|
64
|
-
// Fallback to using FileReader and a popup
|
|
65
|
-
Be
|
|
66
|
-
)
|
|
67
|
-
)
|
|
68
|
-
) : () => {
|
|
69
|
-
};
|
|
70
|
-
function Je(e, o = "download", n) {
|
|
71
|
-
const t = document.createElement("a");
|
|
72
|
-
t.download = o, t.rel = "noopener", typeof e == "string" ? (t.href = e, t.origin !== location.origin ? Oe(t.href) ? ce(e, o, n) : (t.target = "_blank", J(t)) : J(t)) : (t.href = URL.createObjectURL(e), setTimeout(function() {
|
|
73
|
-
URL.revokeObjectURL(t.href);
|
|
74
|
-
}, 4e4), setTimeout(function() {
|
|
75
|
-
J(t);
|
|
76
|
-
}, 0));
|
|
77
|
-
}
|
|
78
|
-
function Ge(e, o = "download", n) {
|
|
79
|
-
if (typeof e == "string")
|
|
80
|
-
if (Oe(e))
|
|
81
|
-
ce(e, o, n);
|
|
82
|
-
else {
|
|
83
|
-
const t = document.createElement("a");
|
|
84
|
-
t.href = e, t.target = "_blank", setTimeout(function() {
|
|
85
|
-
J(t);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else
|
|
89
|
-
navigator.msSaveOrOpenBlob(We(e, n), o);
|
|
90
|
-
}
|
|
91
|
-
function Be(e, o, n, t) {
|
|
92
|
-
if (t = t || open("", "_blank"), t && (t.document.title = t.document.body.innerText = "downloading..."), typeof e == "string")
|
|
93
|
-
return ce(e, o, n);
|
|
94
|
-
const s = e.type === "application/octet-stream", c = /constructor/i.test(String(pe.HTMLElement)) || "safari" in pe, u = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
95
|
-
if ((u || s && c || we) && typeof FileReader < "u") {
|
|
96
|
-
const i = new FileReader();
|
|
97
|
-
i.onloadend = function() {
|
|
98
|
-
let l = i.result;
|
|
99
|
-
if (typeof l != "string")
|
|
100
|
-
throw t = null, new Error("Wrong reader.result type");
|
|
101
|
-
l = u ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"), t ? t.location.href = l : location.assign(l), t = null;
|
|
102
|
-
}, i.readAsDataURL(e);
|
|
103
|
-
} else {
|
|
104
|
-
const i = URL.createObjectURL(e);
|
|
105
|
-
t ? t.location.assign(i) : location.href = i, t = null, setTimeout(function() {
|
|
106
|
-
URL.revokeObjectURL(i);
|
|
107
|
-
}, 4e4);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function m(e, o) {
|
|
111
|
-
const n = "🍍 " + e;
|
|
112
|
-
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, o) : o === "error" ? console.error(n) : o === "warn" ? console.warn(n) : console.log(n);
|
|
113
|
-
}
|
|
114
|
-
function ie(e) {
|
|
115
|
-
return "_a" in e && "install" in e;
|
|
116
|
-
}
|
|
117
|
-
function Ie() {
|
|
118
|
-
if (!("clipboard" in navigator))
|
|
119
|
-
return m("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
120
|
-
}
|
|
121
|
-
function $e(e) {
|
|
122
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (m('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
123
|
-
}
|
|
124
|
-
async function Ye(e) {
|
|
125
|
-
if (!Ie())
|
|
126
|
-
try {
|
|
127
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), m("Global state copied to clipboard.");
|
|
128
|
-
} catch (o) {
|
|
129
|
-
if ($e(o))
|
|
130
|
-
return;
|
|
131
|
-
m("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
async function ze(e) {
|
|
135
|
-
if (!Ie())
|
|
136
|
-
try {
|
|
137
|
-
De(e, JSON.parse(await navigator.clipboard.readText())), m("Global state pasted from clipboard.");
|
|
138
|
-
} catch (o) {
|
|
139
|
-
if ($e(o))
|
|
140
|
-
return;
|
|
141
|
-
m("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
async function qe(e) {
|
|
145
|
-
try {
|
|
146
|
-
Pe(new Blob([JSON.stringify(e.state.value)], {
|
|
147
|
-
type: "text/plain;charset=utf-8"
|
|
148
|
-
}), "pinia-state.json");
|
|
149
|
-
} catch (o) {
|
|
150
|
-
m("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
let w;
|
|
154
|
-
function Xe() {
|
|
155
|
-
w || (w = document.createElement("input"), w.type = "file", w.accept = ".json");
|
|
156
|
-
function e() {
|
|
157
|
-
return new Promise((o, n) => {
|
|
158
|
-
w.onchange = async () => {
|
|
159
|
-
const t = w.files;
|
|
160
|
-
if (!t)
|
|
161
|
-
return o(null);
|
|
162
|
-
const s = t.item(0);
|
|
163
|
-
return o(s ? { text: await s.text(), file: s } : null);
|
|
164
|
-
}, w.oncancel = () => o(null), w.onerror = n, w.click();
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return e;
|
|
168
|
-
}
|
|
169
|
-
async function Qe(e) {
|
|
170
|
-
try {
|
|
171
|
-
const n = await Xe()();
|
|
172
|
-
if (!n)
|
|
173
|
-
return;
|
|
174
|
-
const { text: t, file: s } = n;
|
|
175
|
-
De(e, JSON.parse(t)), m(`Global state imported from "${s.name}".`);
|
|
176
|
-
} catch (o) {
|
|
177
|
-
m("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function De(e, o) {
|
|
181
|
-
for (const n in o) {
|
|
182
|
-
const t = e.state.value[n];
|
|
183
|
-
t ? Object.assign(t, o[n]) : e.state.value[n] = o[n];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
function N(e) {
|
|
187
|
-
return {
|
|
188
|
-
_custom: {
|
|
189
|
-
display: e
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
const Ve = "🍍 Pinia (root)", B = "_root";
|
|
194
|
-
function Ze(e) {
|
|
195
|
-
return ie(e) ? {
|
|
196
|
-
id: B,
|
|
197
|
-
label: Ve
|
|
198
|
-
} : {
|
|
199
|
-
id: e.$id,
|
|
200
|
-
label: e.$id
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
function Ke(e) {
|
|
204
|
-
if (ie(e)) {
|
|
205
|
-
const n = Array.from(e._s.keys()), t = e._s;
|
|
206
|
-
return {
|
|
207
|
-
state: n.map((c) => ({
|
|
208
|
-
editable: !0,
|
|
209
|
-
key: c,
|
|
210
|
-
value: e.state.value[c]
|
|
211
|
-
})),
|
|
212
|
-
getters: n.filter((c) => t.get(c)._getters).map((c) => {
|
|
213
|
-
const u = t.get(c);
|
|
214
|
-
return {
|
|
215
|
-
editable: !1,
|
|
216
|
-
key: c,
|
|
217
|
-
value: u._getters.reduce((i, l) => (i[l] = u[l], i), {})
|
|
218
|
-
};
|
|
219
|
-
})
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
const o = {
|
|
223
|
-
state: Object.keys(e.$state).map((n) => ({
|
|
224
|
-
editable: !0,
|
|
225
|
-
key: n,
|
|
226
|
-
value: e.$state[n]
|
|
227
|
-
}))
|
|
228
|
-
};
|
|
229
|
-
return e._getters && e._getters.length && (o.getters = e._getters.map((n) => ({
|
|
230
|
-
editable: !1,
|
|
231
|
-
key: n,
|
|
232
|
-
value: e[n]
|
|
233
|
-
}))), e._customProperties.size && (o.customProperties = Array.from(e._customProperties).map((n) => ({
|
|
234
|
-
editable: !0,
|
|
235
|
-
key: n,
|
|
236
|
-
value: e[n]
|
|
237
|
-
}))), o;
|
|
238
|
-
}
|
|
239
|
-
function et(e) {
|
|
240
|
-
return e ? Array.isArray(e) ? e.reduce((o, n) => (o.keys.push(n.key), o.operations.push(n.type), o.oldValue[n.key] = n.oldValue, o.newValue[n.key] = n.newValue, o), {
|
|
241
|
-
oldValue: {},
|
|
242
|
-
keys: [],
|
|
243
|
-
operations: [],
|
|
244
|
-
newValue: {}
|
|
245
|
-
}) : {
|
|
246
|
-
operation: N(e.type),
|
|
247
|
-
key: N(e.key),
|
|
248
|
-
oldValue: e.oldValue,
|
|
249
|
-
newValue: e.newValue
|
|
250
|
-
} : {};
|
|
251
|
-
}
|
|
252
|
-
function tt(e) {
|
|
253
|
-
switch (e) {
|
|
254
|
-
case O.direct:
|
|
255
|
-
return "mutation";
|
|
256
|
-
case O.patchFunction:
|
|
257
|
-
return "$patch";
|
|
258
|
-
case O.patchObject:
|
|
259
|
-
return "$patch";
|
|
260
|
-
default:
|
|
261
|
-
return "unknown";
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
let k = !0;
|
|
265
|
-
const Y = [], D = "pinia:mutations", _ = "pinia", { assign: nt } = Object, z = (e) => "🍍 " + e;
|
|
266
|
-
function ot(e, o) {
|
|
267
|
-
Ne({
|
|
268
|
-
id: "dev.esm.pinia",
|
|
269
|
-
label: "Pinia 🍍",
|
|
270
|
-
logo: "https://pinia.vuejs.org/logo.svg",
|
|
271
|
-
packageName: "pinia",
|
|
272
|
-
homepage: "https://pinia.vuejs.org",
|
|
273
|
-
componentStateTypes: Y,
|
|
274
|
-
app: e
|
|
275
|
-
}, (n) => {
|
|
276
|
-
typeof n.now != "function" && m("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({
|
|
277
|
-
id: D,
|
|
278
|
-
label: "Pinia 🍍",
|
|
279
|
-
color: 15064968
|
|
280
|
-
}), n.addInspector({
|
|
281
|
-
id: _,
|
|
282
|
-
label: "Pinia 🍍",
|
|
283
|
-
icon: "storage",
|
|
284
|
-
treeFilterPlaceholder: "Search stores",
|
|
285
|
-
actions: [
|
|
286
|
-
{
|
|
287
|
-
icon: "content_copy",
|
|
288
|
-
action: () => {
|
|
289
|
-
Ye(o);
|
|
290
|
-
},
|
|
291
|
-
tooltip: "Serialize and copy the state"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
icon: "content_paste",
|
|
295
|
-
action: async () => {
|
|
296
|
-
await ze(o), n.sendInspectorTree(_), n.sendInspectorState(_);
|
|
297
|
-
},
|
|
298
|
-
tooltip: "Replace the state with the content of your clipboard"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
icon: "save",
|
|
302
|
-
action: () => {
|
|
303
|
-
qe(o);
|
|
304
|
-
},
|
|
305
|
-
tooltip: "Save the state as a JSON file"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
icon: "folder_open",
|
|
309
|
-
action: async () => {
|
|
310
|
-
await Qe(o), n.sendInspectorTree(_), n.sendInspectorState(_);
|
|
311
|
-
},
|
|
312
|
-
tooltip: "Import the state from a JSON file"
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
nodeActions: [
|
|
316
|
-
{
|
|
317
|
-
icon: "restore",
|
|
318
|
-
tooltip: 'Reset the state (with "$reset")',
|
|
319
|
-
action: (t) => {
|
|
320
|
-
const s = o._s.get(t);
|
|
321
|
-
s ? typeof s.$reset != "function" ? m(`Cannot reset "${t}" store because it doesn't have a "$reset" method implemented.`, "warn") : (s.$reset(), m(`Store "${t}" reset.`)) : m(`Cannot reset "${t}" store because it wasn't found.`, "warn");
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
]
|
|
325
|
-
}), n.on.inspectComponent((t, s) => {
|
|
326
|
-
const c = t.componentInstance && t.componentInstance.proxy;
|
|
327
|
-
if (c && c._pStores) {
|
|
328
|
-
const u = t.componentInstance.proxy._pStores;
|
|
329
|
-
Object.values(u).forEach((i) => {
|
|
330
|
-
t.instanceData.state.push({
|
|
331
|
-
type: z(i.$id),
|
|
332
|
-
key: "state",
|
|
333
|
-
editable: !0,
|
|
334
|
-
value: i._isOptionsAPI ? {
|
|
335
|
-
_custom: {
|
|
336
|
-
value: R(i.$state),
|
|
337
|
-
actions: [
|
|
338
|
-
{
|
|
339
|
-
icon: "restore",
|
|
340
|
-
tooltip: "Reset the state of this store",
|
|
341
|
-
action: () => i.$reset()
|
|
342
|
-
}
|
|
343
|
-
]
|
|
344
|
-
}
|
|
345
|
-
} : (
|
|
346
|
-
// NOTE: workaround to unwrap transferred refs
|
|
347
|
-
Object.keys(i.$state).reduce((l, d) => (l[d] = i.$state[d], l), {})
|
|
348
|
-
)
|
|
349
|
-
}), i._getters && i._getters.length && t.instanceData.state.push({
|
|
350
|
-
type: z(i.$id),
|
|
351
|
-
key: "getters",
|
|
352
|
-
editable: !1,
|
|
353
|
-
value: i._getters.reduce((l, d) => {
|
|
354
|
-
try {
|
|
355
|
-
l[d] = i[d];
|
|
356
|
-
} catch (g) {
|
|
357
|
-
l[d] = g;
|
|
358
|
-
}
|
|
359
|
-
return l;
|
|
360
|
-
}, {})
|
|
361
|
-
});
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}), n.on.getInspectorTree((t) => {
|
|
365
|
-
if (t.app === e && t.inspectorId === _) {
|
|
366
|
-
let s = [o];
|
|
367
|
-
s = s.concat(Array.from(o._s.values())), t.rootNodes = (t.filter ? s.filter((c) => "$id" in c ? c.$id.toLowerCase().includes(t.filter.toLowerCase()) : Ve.toLowerCase().includes(t.filter.toLowerCase())) : s).map(Ze);
|
|
368
|
-
}
|
|
369
|
-
}), globalThis.$pinia = o, n.on.getInspectorState((t) => {
|
|
370
|
-
if (t.app === e && t.inspectorId === _) {
|
|
371
|
-
const s = t.nodeId === B ? o : o._s.get(t.nodeId);
|
|
372
|
-
if (!s)
|
|
373
|
-
return;
|
|
374
|
-
s && (t.nodeId !== B && (globalThis.$store = R(s)), t.state = Ke(s));
|
|
375
|
-
}
|
|
376
|
-
}), n.on.editInspectorState((t, s) => {
|
|
377
|
-
if (t.app === e && t.inspectorId === _) {
|
|
378
|
-
const c = t.nodeId === B ? o : o._s.get(t.nodeId);
|
|
379
|
-
if (!c)
|
|
380
|
-
return m(`store "${t.nodeId}" not found`, "error");
|
|
381
|
-
const { path: u } = t;
|
|
382
|
-
ie(c) ? u.unshift("state") : (u.length !== 1 || !c._customProperties.has(u[0]) || u[0] in c.$state) && u.unshift("$state"), k = !1, t.set(c, u, t.state.value), k = !0;
|
|
383
|
-
}
|
|
384
|
-
}), n.on.editComponentState((t) => {
|
|
385
|
-
if (t.type.startsWith("🍍")) {
|
|
386
|
-
const s = t.type.replace(/^🍍\s*/, ""), c = o._s.get(s);
|
|
387
|
-
if (!c)
|
|
388
|
-
return m(`store "${s}" not found`, "error");
|
|
389
|
-
const { path: u } = t;
|
|
390
|
-
if (u[0] !== "state")
|
|
391
|
-
return m(`Invalid path for store "${s}":
|
|
392
|
-
${u}
|
|
393
|
-
Only state can be modified.`);
|
|
394
|
-
u[0] = "$state", k = !1, t.set(c, u, t.state.value), k = !0;
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
function st(e, o) {
|
|
400
|
-
Y.includes(z(o.$id)) || Y.push(z(o.$id)), Ne({
|
|
401
|
-
id: "dev.esm.pinia",
|
|
402
|
-
label: "Pinia 🍍",
|
|
403
|
-
logo: "https://pinia.vuejs.org/logo.svg",
|
|
404
|
-
packageName: "pinia",
|
|
405
|
-
homepage: "https://pinia.vuejs.org",
|
|
406
|
-
componentStateTypes: Y,
|
|
407
|
-
app: e,
|
|
408
|
-
settings: {
|
|
409
|
-
logStoreChanges: {
|
|
410
|
-
label: "Notify about new/deleted stores",
|
|
411
|
-
type: "boolean",
|
|
412
|
-
defaultValue: !0
|
|
413
|
-
}
|
|
414
|
-
// useEmojis: {
|
|
415
|
-
// label: 'Use emojis in messages ⚡️',
|
|
416
|
-
// type: 'boolean',
|
|
417
|
-
// defaultValue: true,
|
|
418
|
-
// },
|
|
419
|
-
}
|
|
420
|
-
}, (n) => {
|
|
421
|
-
const t = typeof n.now == "function" ? n.now.bind(n) : Date.now;
|
|
422
|
-
o.$onAction(({ after: u, onError: i, name: l, args: d }) => {
|
|
423
|
-
const g = Te++;
|
|
424
|
-
n.addTimelineEvent({
|
|
425
|
-
layerId: D,
|
|
426
|
-
event: {
|
|
427
|
-
time: t(),
|
|
428
|
-
title: "🛫 " + l,
|
|
429
|
-
subtitle: "start",
|
|
430
|
-
data: {
|
|
431
|
-
store: N(o.$id),
|
|
432
|
-
action: N(l),
|
|
433
|
-
args: d
|
|
434
|
-
},
|
|
435
|
-
groupId: g
|
|
436
|
-
}
|
|
437
|
-
}), u((h) => {
|
|
438
|
-
$ = void 0, n.addTimelineEvent({
|
|
439
|
-
layerId: D,
|
|
440
|
-
event: {
|
|
441
|
-
time: t(),
|
|
442
|
-
title: "🛬 " + l,
|
|
443
|
-
subtitle: "end",
|
|
444
|
-
data: {
|
|
445
|
-
store: N(o.$id),
|
|
446
|
-
action: N(l),
|
|
447
|
-
args: d,
|
|
448
|
-
result: h
|
|
449
|
-
},
|
|
450
|
-
groupId: g
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
}), i((h) => {
|
|
454
|
-
$ = void 0, n.addTimelineEvent({
|
|
455
|
-
layerId: D,
|
|
456
|
-
event: {
|
|
457
|
-
time: t(),
|
|
458
|
-
logType: "error",
|
|
459
|
-
title: "💥 " + l,
|
|
460
|
-
subtitle: "end",
|
|
461
|
-
data: {
|
|
462
|
-
store: N(o.$id),
|
|
463
|
-
action: N(l),
|
|
464
|
-
args: d,
|
|
465
|
-
error: h
|
|
466
|
-
},
|
|
467
|
-
groupId: g
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
}, !0), o._customProperties.forEach((u) => {
|
|
472
|
-
Se(() => Ue(o[u]), (i, l) => {
|
|
473
|
-
n.notifyComponentUpdate(), n.sendInspectorState(_), k && n.addTimelineEvent({
|
|
474
|
-
layerId: D,
|
|
475
|
-
event: {
|
|
476
|
-
time: t(),
|
|
477
|
-
title: "Change",
|
|
478
|
-
subtitle: u,
|
|
479
|
-
data: {
|
|
480
|
-
newValue: i,
|
|
481
|
-
oldValue: l
|
|
482
|
-
},
|
|
483
|
-
groupId: $
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
}, { deep: !0 });
|
|
487
|
-
}), o.$subscribe(({ events: u, type: i }, l) => {
|
|
488
|
-
if (n.notifyComponentUpdate(), n.sendInspectorState(_), !k)
|
|
489
|
-
return;
|
|
490
|
-
const d = {
|
|
491
|
-
time: t(),
|
|
492
|
-
title: tt(i),
|
|
493
|
-
data: nt({ store: N(o.$id) }, et(u)),
|
|
494
|
-
groupId: $
|
|
495
|
-
};
|
|
496
|
-
i === O.patchFunction ? d.subtitle = "⤵️" : i === O.patchObject ? d.subtitle = "🧩" : u && !Array.isArray(u) && (d.subtitle = u.type), u && (d.data["rawEvent(s)"] = {
|
|
497
|
-
_custom: {
|
|
498
|
-
display: "DebuggerEvent",
|
|
499
|
-
type: "object",
|
|
500
|
-
tooltip: "raw DebuggerEvent[]",
|
|
501
|
-
value: u
|
|
502
|
-
}
|
|
503
|
-
}), n.addTimelineEvent({
|
|
504
|
-
layerId: D,
|
|
505
|
-
event: d
|
|
506
|
-
});
|
|
507
|
-
}, { detached: !0, flush: "sync" });
|
|
508
|
-
const s = o._hotUpdate;
|
|
509
|
-
o._hotUpdate = V((u) => {
|
|
510
|
-
s(u), n.addTimelineEvent({
|
|
511
|
-
layerId: D,
|
|
512
|
-
event: {
|
|
513
|
-
time: t(),
|
|
514
|
-
title: "🔥 " + o.$id,
|
|
515
|
-
subtitle: "HMR update",
|
|
516
|
-
data: {
|
|
517
|
-
store: N(o.$id),
|
|
518
|
-
info: N("HMR update")
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}), n.notifyComponentUpdate(), n.sendInspectorTree(_), n.sendInspectorState(_);
|
|
522
|
-
});
|
|
523
|
-
const { $dispose: c } = o;
|
|
524
|
-
o.$dispose = () => {
|
|
525
|
-
c(), n.notifyComponentUpdate(), n.sendInspectorTree(_), n.sendInspectorState(_), n.getSettings().logStoreChanges && m(`Disposed "${o.$id}" store 🗑`);
|
|
526
|
-
}, n.notifyComponentUpdate(), n.sendInspectorTree(_), n.sendInspectorState(_), n.getSettings().logStoreChanges && m(`"${o.$id}" store installed 🆕`);
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
let Te = 0, $;
|
|
530
|
-
function he(e, o, n) {
|
|
531
|
-
const t = o.reduce((s, c) => (s[c] = R(e)[c], s), {});
|
|
532
|
-
for (const s in t)
|
|
533
|
-
e[s] = function() {
|
|
534
|
-
const c = Te, u = n ? new Proxy(e, {
|
|
535
|
-
get(...l) {
|
|
536
|
-
return $ = c, Reflect.get(...l);
|
|
537
|
-
},
|
|
538
|
-
set(...l) {
|
|
539
|
-
return $ = c, Reflect.set(...l);
|
|
540
|
-
}
|
|
541
|
-
}) : e;
|
|
542
|
-
$ = c;
|
|
543
|
-
const i = t[s].apply(u, arguments);
|
|
544
|
-
return $ = void 0, i;
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
function rt({ app: e, store: o, options: n }) {
|
|
548
|
-
if (!o.$id.startsWith("__hot:")) {
|
|
549
|
-
if (o._isOptionsAPI = !!n.state, !o._p._testing) {
|
|
550
|
-
he(o, Object.keys(n.actions), o._isOptionsAPI);
|
|
551
|
-
const t = o._hotUpdate;
|
|
552
|
-
R(o)._hotUpdate = function(s) {
|
|
553
|
-
t.apply(this, arguments), he(o, Object.keys(s._hmrPayload.actions), !!o._isOptionsAPI);
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
st(
|
|
557
|
-
e,
|
|
558
|
-
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
559
|
-
o
|
|
560
|
-
);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
function ht() {
|
|
564
|
-
const e = be(!0), o = e.run(() => oe({}));
|
|
565
|
-
let n = [], t = [];
|
|
566
|
-
const s = V({
|
|
567
|
-
install(c) {
|
|
568
|
-
U(s), s._a = c, c.provide(re, s), c.config.globalProperties.$pinia = s, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && I && ot(c, s), t.forEach((u) => n.push(u)), t = [];
|
|
569
|
-
},
|
|
570
|
-
use(c) {
|
|
571
|
-
return this._a ? n.push(c) : t.push(c), this;
|
|
572
|
-
},
|
|
573
|
-
_p: n,
|
|
574
|
-
// it's actually undefined here
|
|
575
|
-
// @ts-expect-error
|
|
576
|
-
_a: null,
|
|
577
|
-
_e: e,
|
|
578
|
-
_s: /* @__PURE__ */ new Map(),
|
|
579
|
-
state: o
|
|
580
|
-
});
|
|
581
|
-
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && I && typeof Proxy < "u" && s.use(rt), s;
|
|
582
|
-
}
|
|
583
|
-
function Ae(e, o) {
|
|
584
|
-
for (const n in o) {
|
|
585
|
-
const t = o[n];
|
|
586
|
-
if (!(n in e))
|
|
587
|
-
continue;
|
|
588
|
-
const s = e[n];
|
|
589
|
-
T(s) && T(t) && !M(t) && !q(t) ? e[n] = Ae(s, t) : e[n] = t;
|
|
590
|
-
}
|
|
591
|
-
return e;
|
|
592
|
-
}
|
|
593
|
-
const je = () => {
|
|
594
|
-
};
|
|
595
|
-
function ge(e, o, n, t = je) {
|
|
596
|
-
e.push(o);
|
|
597
|
-
const s = () => {
|
|
598
|
-
const c = e.indexOf(o);
|
|
599
|
-
c > -1 && (e.splice(c, 1), t());
|
|
600
|
-
};
|
|
601
|
-
return !n && Fe() && He(s), s;
|
|
602
|
-
}
|
|
603
|
-
function j(e, ...o) {
|
|
604
|
-
e.slice().forEach((n) => {
|
|
605
|
-
n(...o);
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
const ct = (e) => e(), me = Symbol(), ee = Symbol();
|
|
609
|
-
function te(e, o) {
|
|
610
|
-
e instanceof Map && o instanceof Map ? o.forEach((n, t) => e.set(t, n)) : e instanceof Set && o instanceof Set && o.forEach(e.add, e);
|
|
611
|
-
for (const n in o) {
|
|
612
|
-
if (!o.hasOwnProperty(n))
|
|
613
|
-
continue;
|
|
614
|
-
const t = o[n], s = e[n];
|
|
615
|
-
T(s) && T(t) && e.hasOwnProperty(n) && !M(t) && !q(t) ? e[n] = te(s, t) : e[n] = t;
|
|
616
|
-
}
|
|
617
|
-
return e;
|
|
618
|
-
}
|
|
619
|
-
const it = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
620
|
-
/* istanbul ignore next */
|
|
621
|
-
Symbol()
|
|
622
|
-
);
|
|
623
|
-
function at(e) {
|
|
624
|
-
return !T(e) || !e.hasOwnProperty(it);
|
|
625
|
-
}
|
|
626
|
-
const { assign: S } = Object;
|
|
627
|
-
function _e(e) {
|
|
628
|
-
return !!(M(e) && e.effect);
|
|
629
|
-
}
|
|
630
|
-
function ve(e, o, n, t) {
|
|
631
|
-
const { state: s, actions: c, getters: u } = o, i = n.state.value[e];
|
|
632
|
-
let l;
|
|
633
|
-
function d() {
|
|
634
|
-
!i && (process.env.NODE_ENV === "production" || !t) && (n.state.value[e] = s ? s() : {});
|
|
635
|
-
const g = process.env.NODE_ENV !== "production" && t ? (
|
|
636
|
-
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
637
|
-
de(oe(s ? s() : {}).value)
|
|
638
|
-
) : de(n.state.value[e]);
|
|
639
|
-
return S(g, c, Object.keys(u || {}).reduce((h, v) => (process.env.NODE_ENV !== "production" && v in g && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${v}" in store "${e}".`), h[v] = V(se(() => {
|
|
640
|
-
U(n);
|
|
641
|
-
const y = n._s.get(e);
|
|
642
|
-
return u[v].call(y, y);
|
|
643
|
-
})), h), {}));
|
|
644
|
-
}
|
|
645
|
-
return l = ne(e, d, o, n, t, !0), l;
|
|
646
|
-
}
|
|
647
|
-
function ne(e, o, n = {}, t, s, c) {
|
|
648
|
-
let u;
|
|
649
|
-
const i = S({ actions: {} }, n);
|
|
650
|
-
if (process.env.NODE_ENV !== "production" && !t._e.active)
|
|
651
|
-
throw new Error("Pinia destroyed");
|
|
652
|
-
const l = { deep: !0 };
|
|
653
|
-
process.env.NODE_ENV !== "production" && (l.onTrigger = (a) => {
|
|
654
|
-
d ? y = a : d == !1 && !f._hotUpdating && (Array.isArray(y) ? y.push(a) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
655
|
-
});
|
|
656
|
-
let d, g, h = [], v = [], y;
|
|
657
|
-
const A = t.state.value[e];
|
|
658
|
-
!c && !A && (process.env.NODE_ENV === "production" || !s) && (t.state.value[e] = {});
|
|
659
|
-
const X = oe({});
|
|
660
|
-
let ae;
|
|
661
|
-
function ue(a) {
|
|
662
|
-
let r;
|
|
663
|
-
d = g = !1, process.env.NODE_ENV !== "production" && (y = []), typeof a == "function" ? (a(t.state.value[e]), r = {
|
|
664
|
-
type: O.patchFunction,
|
|
665
|
-
storeId: e,
|
|
666
|
-
events: y
|
|
667
|
-
}) : (te(t.state.value[e], a), r = {
|
|
668
|
-
type: O.patchObject,
|
|
669
|
-
payload: a,
|
|
670
|
-
storeId: e,
|
|
671
|
-
events: y
|
|
672
|
-
});
|
|
673
|
-
const p = ae = Symbol();
|
|
674
|
-
fe().then(() => {
|
|
675
|
-
ae === p && (d = !0);
|
|
676
|
-
}), g = !0, j(h, r, t.state.value[e]);
|
|
677
|
-
}
|
|
678
|
-
const Ce = c ? function() {
|
|
679
|
-
const { state: r } = n, p = r ? r() : {};
|
|
680
|
-
this.$patch((E) => {
|
|
681
|
-
S(E, p);
|
|
682
|
-
});
|
|
683
|
-
} : (
|
|
684
|
-
/* istanbul ignore next */
|
|
685
|
-
process.env.NODE_ENV !== "production" ? () => {
|
|
686
|
-
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
687
|
-
} : je
|
|
688
|
-
);
|
|
689
|
-
function ke() {
|
|
690
|
-
u.stop(), h = [], v = [], t._s.delete(e);
|
|
691
|
-
}
|
|
692
|
-
const Q = (a, r = "") => {
|
|
693
|
-
if (me in a)
|
|
694
|
-
return a[ee] = r, a;
|
|
695
|
-
const p = function() {
|
|
696
|
-
U(t);
|
|
697
|
-
const E = Array.from(arguments), x = [], Z = [];
|
|
698
|
-
function Re(b) {
|
|
699
|
-
x.push(b);
|
|
700
|
-
}
|
|
701
|
-
function Me(b) {
|
|
702
|
-
Z.push(b);
|
|
703
|
-
}
|
|
704
|
-
j(v, {
|
|
705
|
-
args: E,
|
|
706
|
-
name: p[ee],
|
|
707
|
-
store: f,
|
|
708
|
-
after: Re,
|
|
709
|
-
onError: Me
|
|
710
|
-
});
|
|
711
|
-
let L;
|
|
712
|
-
try {
|
|
713
|
-
L = a.apply(this && this.$id === e ? this : f, E);
|
|
714
|
-
} catch (b) {
|
|
715
|
-
throw j(Z, b), b;
|
|
716
|
-
}
|
|
717
|
-
return L instanceof Promise ? L.then((b) => (j(x, b), b)).catch((b) => (j(Z, b), Promise.reject(b))) : (j(x, L), L);
|
|
718
|
-
};
|
|
719
|
-
return p[me] = !0, p[ee] = r, p;
|
|
720
|
-
}, F = /* @__PURE__ */ V({
|
|
721
|
-
actions: {},
|
|
722
|
-
getters: {},
|
|
723
|
-
state: [],
|
|
724
|
-
hotState: X
|
|
725
|
-
}), le = {
|
|
726
|
-
_p: t,
|
|
727
|
-
// _s: scope,
|
|
728
|
-
$id: e,
|
|
729
|
-
$onAction: ge.bind(null, v),
|
|
730
|
-
$patch: ue,
|
|
731
|
-
$reset: Ce,
|
|
732
|
-
$subscribe(a, r = {}) {
|
|
733
|
-
const p = ge(h, a, r.detached, () => E()), E = u.run(() => Se(() => t.state.value[e], (x) => {
|
|
734
|
-
(r.flush === "sync" ? g : d) && a({
|
|
735
|
-
storeId: e,
|
|
736
|
-
type: O.direct,
|
|
737
|
-
events: y
|
|
738
|
-
}, x);
|
|
739
|
-
}, S({}, l, r)));
|
|
740
|
-
return p;
|
|
741
|
-
},
|
|
742
|
-
$dispose: ke
|
|
743
|
-
}, f = Le(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && I ? S(
|
|
744
|
-
{
|
|
745
|
-
_hmrPayload: F,
|
|
746
|
-
_customProperties: V(/* @__PURE__ */ new Set())
|
|
747
|
-
// devtools custom properties
|
|
748
|
-
},
|
|
749
|
-
le
|
|
750
|
-
// must be added later
|
|
751
|
-
// setupStore
|
|
752
|
-
) : le);
|
|
753
|
-
t._s.set(e, f);
|
|
754
|
-
const P = (t._a && t._a.runWithContext || ct)(() => t._e.run(() => (u = be()).run(() => o({ action: Q }))));
|
|
755
|
-
for (const a in P) {
|
|
756
|
-
const r = P[a];
|
|
757
|
-
if (M(r) && !_e(r) || q(r))
|
|
758
|
-
process.env.NODE_ENV !== "production" && s ? H(X.value, a, W(P, a)) : c || (A && at(r) && (M(r) ? r.value = A[a] : te(r, A[a])), t.state.value[e][a] = r), process.env.NODE_ENV !== "production" && F.state.push(a);
|
|
759
|
-
else if (typeof r == "function") {
|
|
760
|
-
const p = process.env.NODE_ENV !== "production" && s ? r : Q(r, a);
|
|
761
|
-
P[a] = p, process.env.NODE_ENV !== "production" && (F.actions[a] = r), i.actions[a] = r;
|
|
762
|
-
} else process.env.NODE_ENV !== "production" && _e(r) && (F.getters[a] = c ? (
|
|
763
|
-
// @ts-expect-error
|
|
764
|
-
n.getters[a]
|
|
765
|
-
) : r, I && (P._getters || // @ts-expect-error: same
|
|
766
|
-
(P._getters = V([]))).push(a));
|
|
767
|
-
}
|
|
768
|
-
if (S(f, P), S(R(f), P), Object.defineProperty(f, "$state", {
|
|
769
|
-
get: () => process.env.NODE_ENV !== "production" && s ? X.value : t.state.value[e],
|
|
770
|
-
set: (a) => {
|
|
771
|
-
if (process.env.NODE_ENV !== "production" && s)
|
|
772
|
-
throw new Error("cannot set hotState");
|
|
773
|
-
ue((r) => {
|
|
774
|
-
S(r, a);
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
}), process.env.NODE_ENV !== "production" && (f._hotUpdate = V((a) => {
|
|
778
|
-
f._hotUpdating = !0, a._hmrPayload.state.forEach((r) => {
|
|
779
|
-
if (r in f.$state) {
|
|
780
|
-
const p = a.$state[r], E = f.$state[r];
|
|
781
|
-
typeof p == "object" && T(p) && T(E) ? Ae(p, E) : a.$state[r] = E;
|
|
782
|
-
}
|
|
783
|
-
H(f, r, W(a.$state, r));
|
|
784
|
-
}), Object.keys(f.$state).forEach((r) => {
|
|
785
|
-
r in a.$state || K(f, r);
|
|
786
|
-
}), d = !1, g = !1, t.state.value[e] = W(a._hmrPayload, "hotState"), g = !0, fe().then(() => {
|
|
787
|
-
d = !0;
|
|
788
|
-
});
|
|
789
|
-
for (const r in a._hmrPayload.actions) {
|
|
790
|
-
const p = a[r];
|
|
791
|
-
H(f, r, Q(p, r));
|
|
792
|
-
}
|
|
793
|
-
for (const r in a._hmrPayload.getters) {
|
|
794
|
-
const p = a._hmrPayload.getters[r], E = c ? (
|
|
795
|
-
// special handling of options api
|
|
796
|
-
se(() => (U(t), p.call(f, f)))
|
|
797
|
-
) : p;
|
|
798
|
-
H(f, r, E);
|
|
799
|
-
}
|
|
800
|
-
Object.keys(f._hmrPayload.getters).forEach((r) => {
|
|
801
|
-
r in a._hmrPayload.getters || K(f, r);
|
|
802
|
-
}), Object.keys(f._hmrPayload.actions).forEach((r) => {
|
|
803
|
-
r in a._hmrPayload.actions || K(f, r);
|
|
804
|
-
}), f._hmrPayload = a._hmrPayload, f._getters = a._getters, f._hotUpdating = !1;
|
|
805
|
-
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && I) {
|
|
806
|
-
const a = {
|
|
807
|
-
writable: !0,
|
|
808
|
-
configurable: !0,
|
|
809
|
-
// avoid warning on devtools trying to display this property
|
|
810
|
-
enumerable: !1
|
|
811
|
-
};
|
|
812
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((r) => {
|
|
813
|
-
Object.defineProperty(f, r, S({ value: f[r] }, a));
|
|
814
|
-
});
|
|
815
|
-
}
|
|
816
|
-
return t._p.forEach((a) => {
|
|
817
|
-
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && I) {
|
|
818
|
-
const r = u.run(() => a({
|
|
819
|
-
store: f,
|
|
820
|
-
app: t._a,
|
|
821
|
-
pinia: t,
|
|
822
|
-
options: i
|
|
823
|
-
}));
|
|
824
|
-
Object.keys(r || {}).forEach((p) => f._customProperties.add(p)), S(f, r);
|
|
825
|
-
} else
|
|
826
|
-
S(f, u.run(() => a({
|
|
827
|
-
store: f,
|
|
828
|
-
app: t._a,
|
|
829
|
-
pinia: t,
|
|
830
|
-
options: i
|
|
831
|
-
})));
|
|
832
|
-
}), process.env.NODE_ENV !== "production" && f.$state && typeof f.$state == "object" && typeof f.$state.constructor == "function" && !f.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
833
|
-
state: () => new MyClass()
|
|
834
|
-
Found in store "${f.$id}".`), A && c && n.hydrate && n.hydrate(f.$state, A), d = !0, g = !0, f;
|
|
835
|
-
}
|
|
836
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
837
|
-
// @__NO_SIDE_EFFECTS__
|
|
838
|
-
function ut(e, o, n) {
|
|
839
|
-
let t, s;
|
|
840
|
-
const c = typeof o == "function";
|
|
841
|
-
if (typeof e == "string")
|
|
842
|
-
t = e, s = c ? n : o;
|
|
843
|
-
else if (s = e, t = e.id, process.env.NODE_ENV !== "production" && typeof t != "string")
|
|
844
|
-
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
845
|
-
function u(i, l) {
|
|
846
|
-
const d = ye();
|
|
847
|
-
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
|
848
|
-
// pinia instance with getActivePinia()
|
|
849
|
-
(process.env.NODE_ENV === "test" && C && C._testing ? null : i) || (d ? Ee(re, null) : null), i && U(i), process.env.NODE_ENV !== "production" && !C)
|
|
850
|
-
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
851
|
-
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
852
|
-
This will fail in production.`);
|
|
853
|
-
i = C, i._s.has(t) || (c ? ne(t, o, s, i) : ve(t, s, i), process.env.NODE_ENV !== "production" && (u._pinia = i));
|
|
854
|
-
const g = i._s.get(t);
|
|
855
|
-
if (process.env.NODE_ENV !== "production" && l) {
|
|
856
|
-
const h = "__hot:" + t, v = c ? ne(h, o, s, i, !0) : ve(h, S({}, s), i, !0);
|
|
857
|
-
l._hotUpdate(v), delete i.state.value[h], i._s.delete(h);
|
|
858
|
-
}
|
|
859
|
-
if (process.env.NODE_ENV !== "production" && I) {
|
|
860
|
-
const h = xe();
|
|
861
|
-
if (h && h.proxy && // avoid adding stores that are just built for hot module replacement
|
|
862
|
-
!l) {
|
|
863
|
-
const v = h.proxy, y = "_pStores" in v ? v._pStores : v._pStores = {};
|
|
864
|
-
y[t] = g;
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
return g;
|
|
868
|
-
}
|
|
869
|
-
return u.$id = t, u;
|
|
870
|
-
}
|
|
871
|
-
function gt(e) {
|
|
872
|
-
{
|
|
873
|
-
const o = R(e), n = {};
|
|
874
|
-
for (const t in o) {
|
|
875
|
-
const s = o[t];
|
|
876
|
-
s.effect ? n[t] = // ...
|
|
877
|
-
se({
|
|
878
|
-
get: () => e[t],
|
|
879
|
-
set(c) {
|
|
880
|
-
e[t] = c;
|
|
881
|
-
}
|
|
882
|
-
}) : (M(s) || q(s)) && (n[t] = // ---
|
|
883
|
-
W(e, t));
|
|
884
|
-
}
|
|
885
|
-
return n;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
const mt = /* @__PURE__ */ ut("menuState", {
|
|
889
|
-
state: () => ({
|
|
890
|
-
rawMenu: {},
|
|
891
|
-
menus: [],
|
|
892
|
-
activeMenuPath: "",
|
|
893
|
-
activeMenuOpenPaths: [],
|
|
894
|
-
systemKey: "",
|
|
895
|
-
menuTriggerType: "open"
|
|
896
|
-
}),
|
|
897
|
-
actions: {
|
|
898
|
-
setMenus(e) {
|
|
899
|
-
this.menus = e;
|
|
900
|
-
},
|
|
901
|
-
setMenuTriggerType(e) {
|
|
902
|
-
this.menuTriggerType = e;
|
|
903
|
-
},
|
|
904
|
-
setSystemKey(e) {
|
|
905
|
-
this.systemKey = e;
|
|
906
|
-
},
|
|
907
|
-
setActiveMenuPath(e) {
|
|
908
|
-
this.activeMenuPath = e, console.log("setActiveMenuPath:", e);
|
|
909
|
-
},
|
|
910
|
-
setActiveMenuOpenPaths(e) {
|
|
911
|
-
this.activeMenuOpenPaths = e, console.log("setActiveMenuPath-open:", e);
|
|
912
|
-
},
|
|
913
|
-
setRawMenu(e) {
|
|
914
|
-
this.rawMenu = e;
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
});
|
|
918
|
-
export {
|
|
919
|
-
ht as c,
|
|
920
|
-
ut as d,
|
|
921
|
-
pt as g,
|
|
922
|
-
gt as s,
|
|
923
|
-
mt as u
|
|
924
|
-
};
|