bt-core-app 1.4.53 → 1.4.55
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/bt-core-app.js +717 -718
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -11,8 +11,8 @@ function Ot(e) {
|
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
13
|
function pt(e) {
|
|
14
|
-
const t = z([]), u = Le(),
|
|
15
|
-
function
|
|
14
|
+
const t = z([]), u = Le(), b = Le(), o = Le(), g = te(() => u.value != null);
|
|
15
|
+
function x(h) {
|
|
16
16
|
t.value = t.value.filter((m) => m.id != h);
|
|
17
17
|
}
|
|
18
18
|
function P(h) {
|
|
@@ -23,30 +23,30 @@ function pt(e) {
|
|
|
23
23
|
return t.value.push(m), m.id;
|
|
24
24
|
}
|
|
25
25
|
function N(h) {
|
|
26
|
-
h != null && (
|
|
26
|
+
h != null && (b.value = h.toString());
|
|
27
27
|
}
|
|
28
28
|
function $() {
|
|
29
|
-
|
|
29
|
+
b.value = void 0;
|
|
30
30
|
}
|
|
31
31
|
async function F(h, m) {
|
|
32
32
|
const l = { ...m };
|
|
33
33
|
l.completionMsg ?? (l.completionMsg = e == null ? void 0 : e.completionMsg), l.confirmationMsg ?? (l.confirmationMsg = e == null ? void 0 : e.confirmationMsg), l.errorMsg ?? (l.errorMsg = e == null ? void 0 : e.errorMsg), l.loadingMsg ?? (l.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), l.requireConfirmation ?? (l.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
|
|
34
34
|
const r = P(l.loadingMsg);
|
|
35
|
-
let
|
|
35
|
+
let y = null;
|
|
36
36
|
try {
|
|
37
|
-
return l.requireConfirmation || l.confirmationMsg,
|
|
38
|
-
} catch (
|
|
37
|
+
return l.requireConfirmation || l.confirmationMsg, y = await h(), l.completionMsg != null && (o.value = l.completionMsg), y;
|
|
38
|
+
} catch (S) {
|
|
39
39
|
if (l.throwError == !0)
|
|
40
|
-
return
|
|
41
|
-
N(l.errorMsg ??
|
|
40
|
+
return y;
|
|
41
|
+
N(l.errorMsg ?? S ?? "error");
|
|
42
42
|
} finally {
|
|
43
|
-
|
|
43
|
+
x(r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return Qr(t, (h) => {
|
|
47
47
|
u.value = h.length > 0 ? h[0].msg : void 0;
|
|
48
48
|
}, { deep: !0 }), {
|
|
49
|
-
actionErrorMsg:
|
|
49
|
+
actionErrorMsg: b,
|
|
50
50
|
actionLoadingMsg: u,
|
|
51
51
|
actionCompleteMsg: o,
|
|
52
52
|
clearErrors: $,
|
|
@@ -68,9 +68,9 @@ var qe = function() {
|
|
|
68
68
|
}
|
|
69
69
|
function u(o, g) {
|
|
70
70
|
if (g = typeof g == "object" ? g : { direction: g }, typeof o != "function") {
|
|
71
|
-
var
|
|
71
|
+
var x = o;
|
|
72
72
|
o = function(h) {
|
|
73
|
-
return h[
|
|
73
|
+
return h[x] ? h[x] : "";
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
if (o.length === 1) {
|
|
@@ -86,25 +86,25 @@ var qe = function() {
|
|
|
86
86
|
return -o(h, m);
|
|
87
87
|
} : o;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
return
|
|
89
|
+
function b(o, g) {
|
|
90
|
+
var x = typeof this == "function" && !this.firstBy ? this : !1, P = u(o, g), N = x ? function($, F) {
|
|
91
|
+
return x($, F) || P($, F);
|
|
92
92
|
} : P;
|
|
93
|
-
return N.thenBy =
|
|
93
|
+
return N.thenBy = b, N;
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return b.firstBy = b, b;
|
|
96
96
|
}();
|
|
97
97
|
function Ne(e, t) {
|
|
98
|
-
let u = e ?? "",
|
|
98
|
+
let u = e ?? "", b = t ?? "";
|
|
99
99
|
if (u.endsWith("/"))
|
|
100
100
|
do
|
|
101
101
|
u = u.slice(0, u.length - 1);
|
|
102
102
|
while (u.endsWith("/"));
|
|
103
|
-
if (
|
|
103
|
+
if (b.startsWith("/"))
|
|
104
104
|
do
|
|
105
|
-
|
|
106
|
-
while (
|
|
107
|
-
return `${u}/${
|
|
105
|
+
b = b.slice(1, b.length);
|
|
106
|
+
while (b.startsWith("/"));
|
|
107
|
+
return `${u}/${b}`;
|
|
108
108
|
}
|
|
109
109
|
function zn(e) {
|
|
110
110
|
return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
|
|
@@ -155,21 +155,21 @@ function et(e, t = !1) {
|
|
|
155
155
|
}
|
|
156
156
|
function Qn(e, t, u) {
|
|
157
157
|
if (e) {
|
|
158
|
-
var
|
|
159
|
-
|
|
158
|
+
var b = new Image();
|
|
159
|
+
b.onload = t, b.onerror = u, b.src = e;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
async function Xn(e, t = !0) {
|
|
163
|
-
return new Promise((u,
|
|
164
|
-
e == null &&
|
|
163
|
+
return new Promise((u, b) => {
|
|
164
|
+
e == null && b("no url given");
|
|
165
165
|
var o = new Image();
|
|
166
166
|
o.setAttribute("crossOrigin", "anonymous"), o.onload = function() {
|
|
167
167
|
var g = document.createElement("canvas");
|
|
168
168
|
g.width = this.width, g.height = this.height;
|
|
169
|
-
var
|
|
170
|
-
|
|
169
|
+
var x = g.getContext("2d");
|
|
170
|
+
x == null || x.drawImage(this, 0, 0), u(g.toDataURL("image/png"));
|
|
171
171
|
}, o.onerror = function() {
|
|
172
|
-
console.log("errr"), t ?
|
|
172
|
+
console.log("errr"), t ? b("image could not be loaded for some reason") : u(null);
|
|
173
173
|
}, e != null && (o.src = e);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
@@ -198,33 +198,33 @@ const He = [
|
|
|
198
198
|
function pn(e) {
|
|
199
199
|
if (e == null)
|
|
200
200
|
return 0;
|
|
201
|
-
const t = e.replaceAll(" ", "").split(",").map((
|
|
201
|
+
const t = e.replaceAll(" ", "").split(",").map((b) => b.toLowerCase()), u = He.filter((b) => b.values.some((o) => t.some((g) => o == g))).map((b) => b.value);
|
|
202
202
|
return u.length == 0 ? 8 : Math.min(...u);
|
|
203
203
|
}
|
|
204
204
|
function ea(e) {
|
|
205
205
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
206
|
-
let u = He.find((
|
|
206
|
+
let u = He.find((b) => b.values.some((o) => o == t));
|
|
207
207
|
return u != null ? u.short : "";
|
|
208
208
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
209
209
|
}
|
|
210
210
|
function ra(e, t) {
|
|
211
211
|
if (e == null || t == null)
|
|
212
212
|
return !0;
|
|
213
|
-
const u = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()),
|
|
214
|
-
return o != null && u.some((g) => g == o.short || o.values.some((
|
|
213
|
+
const u = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), b = t.replaceAll(" ", "").toLowerCase(), o = He.find((g) => g.values.some((x) => x == b));
|
|
214
|
+
return o != null && u.some((g) => g == o.short || o.values.some((x) => x == g));
|
|
215
215
|
}
|
|
216
216
|
function ta(e, t) {
|
|
217
217
|
if (t == null)
|
|
218
218
|
return e;
|
|
219
219
|
let u = e ?? "";
|
|
220
220
|
u = `${u},${t}`;
|
|
221
|
-
let
|
|
222
|
-
return
|
|
221
|
+
let b = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((o) => He.find((g) => g.values.some((x) => x == o))).filter((o) => o != null).sort(qe.firstBy((o) => (o == null ? void 0 : o.value) ?? 0)).map((o) => o == null ? void 0 : o.short))].toString();
|
|
222
|
+
return b.length > 0 ? b : void 0;
|
|
223
223
|
}
|
|
224
224
|
function na(e, t) {
|
|
225
225
|
if (t == null || e == null)
|
|
226
226
|
return e;
|
|
227
|
-
let u = e ?? "",
|
|
227
|
+
let u = e ?? "", b = t.replaceAll(" ", "").toLowerCase(), o = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((g) => He.find((x) => x.values.some((P) => P == g && P != b))).filter((g) => g != null).sort(qe.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
228
228
|
return o.length > 0 ? o : void 0;
|
|
229
229
|
}
|
|
230
230
|
function aa(e, t) {
|
|
@@ -243,38 +243,38 @@ function an() {
|
|
|
243
243
|
return "0001-01-01T00:00:00Z";
|
|
244
244
|
}
|
|
245
245
|
function ua(e, t) {
|
|
246
|
-
let u = "1",
|
|
247
|
-
if (
|
|
246
|
+
let u = "1", b = 0;
|
|
247
|
+
if (b < t)
|
|
248
248
|
do
|
|
249
|
-
u = u + "0",
|
|
250
|
-
while (
|
|
249
|
+
u = u + "0", b += 1;
|
|
250
|
+
while (b < t);
|
|
251
251
|
let o = Number.parseInt(u);
|
|
252
252
|
return Math.round(e * o) / o;
|
|
253
253
|
}
|
|
254
254
|
function ia(e, t) {
|
|
255
255
|
let u = e ?? "";
|
|
256
|
-
return t != null && (ln(u, t) ? u = u.split(",").filter((
|
|
256
|
+
return t != null && (ln(u, t) ? u = u.split(",").filter((b) => b != t).toString() : u != null ? u = `${u},${t}` : u = t), u != null && u.length > 0 ? u : null;
|
|
257
257
|
}
|
|
258
258
|
function ln(e, t) {
|
|
259
259
|
if (e == null || e.length == 0)
|
|
260
260
|
return !1;
|
|
261
261
|
if (!t)
|
|
262
262
|
return !0;
|
|
263
|
-
var u = e.split(","),
|
|
264
|
-
return u.some((o) =>
|
|
263
|
+
var u = e.split(","), b = t.split(",");
|
|
264
|
+
return u.some((o) => b.some((g) => g == o));
|
|
265
265
|
}
|
|
266
266
|
function Pr(e) {
|
|
267
267
|
if (!e)
|
|
268
268
|
return e;
|
|
269
269
|
let t, u = Array.isArray(e) ? [] : {};
|
|
270
|
-
for (const
|
|
271
|
-
t = e[
|
|
270
|
+
for (const b in e)
|
|
271
|
+
t = e[b], u[b] = typeof t == "object" ? Pr(t) : t;
|
|
272
272
|
return u;
|
|
273
273
|
}
|
|
274
274
|
function un(e) {
|
|
275
275
|
return e && Object.keys(e).sort().reduce(function(t, u) {
|
|
276
|
-
let
|
|
277
|
-
return t[u] = typeof
|
|
276
|
+
let b = e[u];
|
|
277
|
+
return t[u] = typeof b == "object" && b !== null ? un(b) : b, t;
|
|
278
278
|
}, Array.isArray(e) ? [] : {});
|
|
279
279
|
}
|
|
280
280
|
function cn(e, t) {
|
|
@@ -284,17 +284,17 @@ function rt(e, t = (u) => u) {
|
|
|
284
284
|
if (e == null)
|
|
285
285
|
return [];
|
|
286
286
|
const u = Array.isArray(e) ? e : t(e);
|
|
287
|
-
return Te(u) ? [...u.reduce((
|
|
288
|
-
|
|
287
|
+
return Te(u) ? [...u.reduce((b, o) => {
|
|
288
|
+
b.push(o);
|
|
289
289
|
const g = rt(o, t);
|
|
290
|
-
return Te(g) &&
|
|
290
|
+
return Te(g) && b.push(...g), b;
|
|
291
291
|
}, [])] : [];
|
|
292
292
|
}
|
|
293
293
|
function ca(e) {
|
|
294
|
-
const t = e.split(","), u = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]),
|
|
294
|
+
const t = e.split(","), u = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), b = t[0].split(":")[1].split(";")[0], o = new Uint8Array(u.length);
|
|
295
295
|
for (let g = 0; g < u.length; g++)
|
|
296
296
|
o[g] = u.charCodeAt(g);
|
|
297
|
-
return new Blob([o], { type:
|
|
297
|
+
return new Blob([o], { type: b });
|
|
298
298
|
}
|
|
299
299
|
function fn(e) {
|
|
300
300
|
var t = "";
|
|
@@ -320,8 +320,8 @@ function on(e, t, u) {
|
|
|
320
320
|
return !1;
|
|
321
321
|
for (let o = 0; o < u.length; o++) {
|
|
322
322
|
const g = u[o];
|
|
323
|
-
var
|
|
324
|
-
if (
|
|
323
|
+
var b = wr(e, g);
|
|
324
|
+
if (b != null && typeof b == "string" && cn(b, t))
|
|
325
325
|
return !0;
|
|
326
326
|
}
|
|
327
327
|
return !1;
|
|
@@ -338,8 +338,8 @@ function wr(e, t) {
|
|
|
338
338
|
if (e == null || e == null || !t)
|
|
339
339
|
return null;
|
|
340
340
|
var u = t.split(".");
|
|
341
|
-
let
|
|
342
|
-
for (var o = e, g = 0; g <
|
|
341
|
+
let b = u.length;
|
|
342
|
+
for (var o = e, g = 0; g < b; g++)
|
|
343
343
|
if (o = o[u[g]], o == null)
|
|
344
344
|
return null;
|
|
345
345
|
return o;
|
|
@@ -355,168 +355,168 @@ function Sr() {
|
|
|
355
355
|
return br;
|
|
356
356
|
}
|
|
357
357
|
function mn(e) {
|
|
358
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? P, u = (e == null ? void 0 : e.buildQuery) ?? g,
|
|
358
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? P, u = (e == null ? void 0 : e.buildQuery) ?? g, b = (e == null ? void 0 : e.buildUrl) ?? x, o = e == null ? void 0 : e.demo;
|
|
359
359
|
function g(l) {
|
|
360
360
|
let r = new URLSearchParams();
|
|
361
|
-
return Object.entries(l).forEach((
|
|
362
|
-
|
|
363
|
-
}), l.filterBy && r.set("filterBy", l.filterBy), l.includeCount && r.set("includeCount", l.includeCount.toString()), l.includeDetails != null && r.set("includeDetails", l.includeDetails.toString()), l.includeInactive && r.set("includeInactive", l.includeInactive.toString()), l.properties && r.set("properties", l.properties.toString()), l.query && r.set("query", l.query.toString()), l.searchString && r.set("searchString", l.searchString), l.sortOrder && r.set("sortOrder", l.sortOrder), l.sortBy && r.set("sortBy", l.sortBy), l.takeFrom && r.set("takeFrom", l.takeFrom.toString()), l.takeAmount && r.set("takeAmount", l.takeAmount.toString()), l.other && Object.entries(l.other).forEach((
|
|
364
|
-
|
|
361
|
+
return Object.entries(l).forEach((y) => {
|
|
362
|
+
y[1] != null && r.append(y[0], y[1]);
|
|
363
|
+
}), l.filterBy && r.set("filterBy", l.filterBy), l.includeCount && r.set("includeCount", l.includeCount.toString()), l.includeDetails != null && r.set("includeDetails", l.includeDetails.toString()), l.includeInactive && r.set("includeInactive", l.includeInactive.toString()), l.properties && r.set("properties", l.properties.toString()), l.query && r.set("query", l.query.toString()), l.searchString && r.set("searchString", l.searchString), l.sortOrder && r.set("sortOrder", l.sortOrder), l.sortBy && r.set("sortBy", l.sortBy), l.takeFrom && r.set("takeFrom", l.takeFrom.toString()), l.takeAmount && r.set("takeAmount", l.takeAmount.toString()), l.other && Object.entries(l.other).forEach((y) => {
|
|
364
|
+
y[1] != null && r.append(y[0], y[1].toString());
|
|
365
365
|
}), r.toString();
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
let r = j(l.url) ?? void 0,
|
|
369
|
-
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(l.nav)), l.additionalUrl != null && (r == null ? r = l.additionalUrl : r = Ne(r, l.additionalUrl)),
|
|
367
|
+
function x(l) {
|
|
368
|
+
let r = j(l.url) ?? void 0, y = j(l.id);
|
|
369
|
+
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(l.nav)), l.additionalUrl != null && (r == null ? r = l.additionalUrl : r = Ne(r, l.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ne(r, y)), l.params != null && (r = `${r}?${u(l.params)}`), l.finalUrl = r, l.finalUrl ?? "";
|
|
370
370
|
}
|
|
371
371
|
function P(l) {
|
|
372
|
-
var
|
|
372
|
+
var y, S;
|
|
373
373
|
let r = { ...l.headers };
|
|
374
|
-
return l.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = l.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((
|
|
374
|
+
return l.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = l.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(S = e == null ? void 0 : e.auth) == null ? void 0 : S.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = l.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
375
375
|
}
|
|
376
376
|
async function N(l) {
|
|
377
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
378
|
-
let c = l.finalUrl,
|
|
379
|
-
if (c == null && (c =
|
|
377
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
378
|
+
let c = l.finalUrl, D = l.headers;
|
|
379
|
+
if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
380
380
|
return console.log(`DEMO: Get from ${c}`), o.get(l);
|
|
381
381
|
console.log(`Get from ${c}`);
|
|
382
|
-
let
|
|
382
|
+
let E;
|
|
383
383
|
try {
|
|
384
|
-
if (
|
|
384
|
+
if (E = await fetch(c, {
|
|
385
385
|
method: "GET",
|
|
386
386
|
mode: "cors",
|
|
387
387
|
cache: "no-cache",
|
|
388
|
-
headers:
|
|
389
|
-
}), !
|
|
390
|
-
let M = await
|
|
391
|
-
throw new Error(M ??
|
|
388
|
+
headers: D
|
|
389
|
+
}), !E.ok) {
|
|
390
|
+
let M = await E.text();
|
|
391
|
+
throw new Error(M ?? E.statusText ?? "Get error");
|
|
392
392
|
}
|
|
393
|
+
if (S)
|
|
394
|
+
return await E.text();
|
|
393
395
|
if (y)
|
|
394
|
-
return await
|
|
395
|
-
if (E)
|
|
396
|
-
return await w.json();
|
|
396
|
+
return await E.json();
|
|
397
397
|
throw new Error();
|
|
398
398
|
} catch (M) {
|
|
399
|
-
const
|
|
399
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
400
400
|
if (!r)
|
|
401
401
|
return;
|
|
402
|
-
throw new Error(
|
|
402
|
+
throw new Error(w);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
async function $(l) {
|
|
406
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
407
|
-
let c = l.finalUrl,
|
|
408
|
-
if (c == null && (c =
|
|
406
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
407
|
+
let c = l.finalUrl, D = l.headers;
|
|
408
|
+
if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
409
409
|
return console.log(`DEMO: Get all from ${c}`), o.getAll(l);
|
|
410
410
|
console.log(`Get all from ${c}`);
|
|
411
|
-
let
|
|
411
|
+
let E;
|
|
412
412
|
try {
|
|
413
|
-
if (
|
|
413
|
+
if (E = await fetch(c, {
|
|
414
414
|
method: "GET",
|
|
415
415
|
mode: "cors",
|
|
416
416
|
cache: "no-cache",
|
|
417
|
-
headers:
|
|
418
|
-
}), !
|
|
419
|
-
let M = await
|
|
420
|
-
throw new Error(M ??
|
|
417
|
+
headers: D
|
|
418
|
+
}), !E.ok) {
|
|
419
|
+
let M = await E.text();
|
|
420
|
+
throw new Error(M ?? E.statusText ?? "Get all error");
|
|
421
421
|
}
|
|
422
|
+
if (S)
|
|
423
|
+
return await E.text();
|
|
422
424
|
if (y)
|
|
423
|
-
return await
|
|
424
|
-
if (E)
|
|
425
|
-
return await w.json();
|
|
425
|
+
return await E.json();
|
|
426
426
|
throw new Error();
|
|
427
427
|
} catch (M) {
|
|
428
|
-
const
|
|
428
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
429
429
|
if (!r)
|
|
430
430
|
return;
|
|
431
|
-
throw new Error(
|
|
431
|
+
throw new Error(w);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
async function F(l) {
|
|
435
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
436
|
-
let c = l.finalUrl,
|
|
437
|
-
if (c == null && (c =
|
|
435
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
436
|
+
let c = l.finalUrl, D = l.headers;
|
|
437
|
+
if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
438
438
|
return console.log(`DEMO: Post to ${c}`), o.post(l);
|
|
439
439
|
console.log(`Post to ${c}`);
|
|
440
|
-
let
|
|
440
|
+
let E;
|
|
441
441
|
try {
|
|
442
|
-
if (
|
|
442
|
+
if (E = await fetch(c, {
|
|
443
443
|
method: "POST",
|
|
444
444
|
mode: "cors",
|
|
445
445
|
cache: "no-cache",
|
|
446
|
-
headers:
|
|
446
|
+
headers: D,
|
|
447
447
|
body: JSON.stringify(l.data)
|
|
448
|
-
}), !
|
|
449
|
-
let M = await
|
|
450
|
-
throw new Error(M ??
|
|
448
|
+
}), !E.ok) {
|
|
449
|
+
let M = await E.text();
|
|
450
|
+
throw new Error(M ?? E.statusText ?? "Post error!");
|
|
451
451
|
}
|
|
452
|
+
if (S)
|
|
453
|
+
return await E.text();
|
|
452
454
|
if (y)
|
|
453
|
-
return await
|
|
454
|
-
if (E)
|
|
455
|
-
return await w.json();
|
|
455
|
+
return await E.json();
|
|
456
456
|
throw new Error();
|
|
457
457
|
} catch (M) {
|
|
458
|
-
if (
|
|
458
|
+
if (E.status == 200 || !r)
|
|
459
459
|
return;
|
|
460
|
-
const
|
|
461
|
-
throw new Error(
|
|
460
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
461
|
+
throw new Error(w);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
async function h(l) {
|
|
465
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
466
|
-
let c = l.finalUrl,
|
|
467
|
-
if (c == null && (c =
|
|
465
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
466
|
+
let c = l.finalUrl, D = l.headers;
|
|
467
|
+
if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
468
468
|
return console.log(`DEMO: Patch to ${c}`), o.patch(l);
|
|
469
469
|
console.log(`Patch to ${c}`);
|
|
470
|
-
let
|
|
470
|
+
let E;
|
|
471
471
|
try {
|
|
472
|
-
if (
|
|
472
|
+
if (E = await fetch(c, {
|
|
473
473
|
method: "PATCH",
|
|
474
474
|
mode: "cors",
|
|
475
475
|
cache: "no-cache",
|
|
476
|
-
headers:
|
|
476
|
+
headers: D,
|
|
477
477
|
body: JSON.stringify(l.data)
|
|
478
|
-
}), !
|
|
479
|
-
let M = await
|
|
480
|
-
throw new Error(M ??
|
|
478
|
+
}), !E.ok) {
|
|
479
|
+
let M = await E.text();
|
|
480
|
+
throw new Error(M ?? E.statusText ?? "Patch error!");
|
|
481
481
|
}
|
|
482
|
+
if (S)
|
|
483
|
+
return await E.text();
|
|
482
484
|
if (y)
|
|
483
|
-
return await
|
|
484
|
-
if (E)
|
|
485
|
-
return await w.json();
|
|
485
|
+
return await E.json();
|
|
486
486
|
throw new Error();
|
|
487
487
|
} catch (M) {
|
|
488
|
-
if (
|
|
488
|
+
if (E.status == 200 || !r)
|
|
489
489
|
return;
|
|
490
|
-
const
|
|
491
|
-
throw new Error(
|
|
490
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
491
|
+
throw new Error(w);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
async function m(l) {
|
|
495
495
|
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
496
|
-
let
|
|
497
|
-
if (
|
|
498
|
-
return console.log(`DEMO: Delete ${
|
|
499
|
-
console.log(`Delete ${
|
|
496
|
+
let y = l.finalUrl, S = l.headers;
|
|
497
|
+
if (y == null && (y = b(l)), l.overrideHeaders !== !0 && (S = t(l)), o != null && o.isDemoing.value)
|
|
498
|
+
return console.log(`DEMO: Delete ${y}`), o.deleteItem(l);
|
|
499
|
+
console.log(`Delete ${y}`);
|
|
500
500
|
let c;
|
|
501
501
|
try {
|
|
502
|
-
return c = await fetch(
|
|
502
|
+
return c = await fetch(y, {
|
|
503
503
|
method: "DELETE",
|
|
504
504
|
mode: "cors",
|
|
505
505
|
cache: "no-cache",
|
|
506
|
-
headers:
|
|
506
|
+
headers: S,
|
|
507
507
|
body: JSON.stringify(l.data)
|
|
508
508
|
}), c.status == 200 ? void 0 : c.statusText;
|
|
509
|
-
} catch (
|
|
510
|
-
const
|
|
509
|
+
} catch (D) {
|
|
510
|
+
const E = `${(c == null ? void 0 : c.status) ?? ""} ${(c == null ? void 0 : c.statusText) ?? ""} ${D.message}`;
|
|
511
511
|
if (!r)
|
|
512
|
-
return
|
|
513
|
-
throw new Error(`${c.status} ${c.statusText} ${
|
|
512
|
+
return E;
|
|
513
|
+
throw new Error(`${c.status} ${c.statusText} ${D.message}`);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
return br = {
|
|
517
517
|
buildHeaders: t,
|
|
518
518
|
buildQuery: u,
|
|
519
|
-
buildUrl:
|
|
519
|
+
buildUrl: b,
|
|
520
520
|
deleteItem: m,
|
|
521
521
|
get: N,
|
|
522
522
|
getAll: $,
|
|
@@ -525,20 +525,20 @@ function mn(e) {
|
|
|
525
525
|
}, br;
|
|
526
526
|
}
|
|
527
527
|
function tt(e) {
|
|
528
|
-
const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors:
|
|
528
|
+
const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors: b, isLoading: o, doAction: g, logError: x } = pt(e);
|
|
529
529
|
function P(r) {
|
|
530
530
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0), r.store ?? (r.store = e == null ? void 0 : e.store);
|
|
531
|
-
const
|
|
532
|
-
return
|
|
533
|
-
var
|
|
534
|
-
const c = r.id ?? ((
|
|
531
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
532
|
+
return y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
533
|
+
var E;
|
|
534
|
+
const c = r.id ?? ((E = r.data) == null ? void 0 : E.id);
|
|
535
535
|
if (c == null)
|
|
536
536
|
return Promise.resolve("No id found in delete action");
|
|
537
|
-
const
|
|
538
|
-
return
|
|
537
|
+
const D = S.findIndex((M) => M.id == c);
|
|
538
|
+
return D >= 0 && S.splice(D, 1), Promise.resolve(void 0);
|
|
539
539
|
}), g(async () => {
|
|
540
540
|
let c;
|
|
541
|
-
r.onCanDeleteAsync != null && (c = await r.onCanDeleteAsync(r.data)), c == null && r.onDeleteAsync != null && (c = await r.onDeleteAsync(r.data)), c == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data),
|
|
541
|
+
r.onCanDeleteAsync != null && (c = await r.onCanDeleteAsync(r.data)), c == null && r.onDeleteAsync != null && (c = await r.onDeleteAsync(r.data)), c == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), x(c);
|
|
542
542
|
}, {
|
|
543
543
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
544
544
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -550,11 +550,11 @@ function tt(e) {
|
|
|
550
550
|
}
|
|
551
551
|
function N(r) {
|
|
552
552
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get this item?" : void 0);
|
|
553
|
-
const
|
|
554
|
-
return
|
|
555
|
-
var
|
|
556
|
-
const c = r.id ?? ((
|
|
557
|
-
return c == null ? Promise.resolve(void 0) : Promise.resolve(
|
|
553
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
554
|
+
return y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
555
|
+
var D;
|
|
556
|
+
const c = r.id ?? ((D = r.data) == null ? void 0 : D.id);
|
|
557
|
+
return c == null ? Promise.resolve(void 0) : Promise.resolve(S.find((E) => E.id == c));
|
|
558
558
|
}), g(async () => {
|
|
559
559
|
let c;
|
|
560
560
|
return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
|
|
@@ -569,8 +569,8 @@ function tt(e) {
|
|
|
569
569
|
}
|
|
570
570
|
function $(r) {
|
|
571
571
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
|
|
572
|
-
const
|
|
573
|
-
return
|
|
572
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
573
|
+
return y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(S)), g(async () => {
|
|
574
574
|
let c;
|
|
575
575
|
return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
|
|
576
576
|
}, {
|
|
@@ -584,10 +584,10 @@ function tt(e) {
|
|
|
584
584
|
}
|
|
585
585
|
function F(r) {
|
|
586
586
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
|
|
587
|
-
const
|
|
588
|
-
return
|
|
589
|
-
let
|
|
590
|
-
return r.onCanRestoreAsync != null && (
|
|
587
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
588
|
+
return y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
|
|
589
|
+
let S, c;
|
|
590
|
+
return r.onCanRestoreAsync != null && (S = await r.onCanRestoreAsync(r.data)), S == null && r.onRestoreAsync != null && (c = await r.onRestoreAsync(r.data)), c != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(c), x(S), c;
|
|
591
591
|
}, {
|
|
592
592
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
593
593
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -599,24 +599,24 @@ function tt(e) {
|
|
|
599
599
|
}
|
|
600
600
|
function h(r) {
|
|
601
601
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to save this item?" : void 0);
|
|
602
|
-
const
|
|
603
|
-
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)),
|
|
602
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
603
|
+
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
|
|
604
604
|
var c;
|
|
605
|
-
return r.mode ?? (r.mode = ((c = r.data) == null ? void 0 : c.id) == null ? "new" : "edit"), r.mode == "new" ? await
|
|
605
|
+
return r.mode ?? (r.mode = ((c = r.data) == null ? void 0 : c.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
|
|
606
606
|
}) : r.onSaveAsync ?? (r.onSaveAsync = (c) => {
|
|
607
|
-
const
|
|
608
|
-
return
|
|
607
|
+
const D = S.findIndex((E) => E.id == c.id);
|
|
608
|
+
return D >= 0 ? S.splice(D, 1, c) : S.push(c), Promise.resolve(c);
|
|
609
609
|
}), g(async () => {
|
|
610
610
|
let c;
|
|
611
611
|
if (r.onGetSaveAsync != null && (c = await r.onGetSaveAsync(r.data)), c == null)
|
|
612
612
|
return;
|
|
613
613
|
if (r.onCanSaveAsync != null) {
|
|
614
|
-
let
|
|
615
|
-
if (
|
|
614
|
+
let E = await r.onCanSaveAsync(c);
|
|
615
|
+
if (x(E), E != null)
|
|
616
616
|
return;
|
|
617
617
|
}
|
|
618
|
-
let
|
|
619
|
-
return r.onSaveAsync != null && (
|
|
618
|
+
let D;
|
|
619
|
+
return r.onSaveAsync != null && (D = await r.onSaveAsync(c), D = D.data != null ? D.data : D), r.onSaveSuccessAsync != null && (D = await r.onSaveSuccessAsync(D)), D;
|
|
620
620
|
}, {
|
|
621
621
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
622
622
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -637,13 +637,13 @@ function tt(e) {
|
|
|
637
637
|
actionErrorMsg: t,
|
|
638
638
|
apiGet: m,
|
|
639
639
|
apiPost: l,
|
|
640
|
-
clearErrors:
|
|
640
|
+
clearErrors: b,
|
|
641
641
|
deleteItem: P,
|
|
642
642
|
doAction: g,
|
|
643
643
|
getAllItems: $,
|
|
644
644
|
getItem: N,
|
|
645
645
|
isLoading: o,
|
|
646
|
-
logError:
|
|
646
|
+
logError: x,
|
|
647
647
|
restoreItem: F,
|
|
648
648
|
saveItem: h
|
|
649
649
|
};
|
|
@@ -679,37 +679,37 @@ function da() {
|
|
|
679
679
|
function yn(e) {
|
|
680
680
|
const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
|
|
681
681
|
let u = z(localStorage.getItem(Gr) ?? "");
|
|
682
|
-
u.value.length == 0 &&
|
|
683
|
-
function
|
|
682
|
+
u.value.length == 0 && b();
|
|
683
|
+
function b() {
|
|
684
684
|
u.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Gr, u.value);
|
|
685
685
|
}
|
|
686
686
|
const o = Yt("auth-credentials", {});
|
|
687
687
|
function g(I) {
|
|
688
688
|
if (I == null)
|
|
689
689
|
return !0;
|
|
690
|
-
var
|
|
691
|
-
if (
|
|
690
|
+
var _ = e.getAuthItem != null ? e.getAuthItem(I) : null;
|
|
691
|
+
if (_ == null)
|
|
692
692
|
return !1;
|
|
693
|
-
if (
|
|
693
|
+
if (_.requiresAuth === !1)
|
|
694
694
|
return !0;
|
|
695
695
|
const s = j(o);
|
|
696
|
-
if (s.isSuspended &&
|
|
696
|
+
if (s.isSuspended && _.ignoreSuspension !== !0)
|
|
697
697
|
return !1;
|
|
698
698
|
if (s.isGlobalAdmin)
|
|
699
699
|
return !0;
|
|
700
|
-
if (
|
|
701
|
-
for (var A = 0; A <
|
|
702
|
-
if (!_
|
|
700
|
+
if (_.permissions != null) {
|
|
701
|
+
for (var A = 0; A < _.permissions.length; A++)
|
|
702
|
+
if (!x(_.permissions[A]))
|
|
703
703
|
return !1;
|
|
704
704
|
}
|
|
705
705
|
return !0;
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
const
|
|
709
|
-
if (
|
|
710
|
-
for (var s = 0; s <
|
|
711
|
-
var A =
|
|
712
|
-
if (
|
|
707
|
+
function x(I) {
|
|
708
|
+
const _ = j(o);
|
|
709
|
+
if (_.userPermissions != null)
|
|
710
|
+
for (var s = 0; s < _.userPermissions.length; s++) {
|
|
711
|
+
var A = _.userPermissions[s].split(".");
|
|
712
|
+
if (_.userPermissions[s] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
|
|
713
713
|
return !0;
|
|
714
714
|
}
|
|
715
715
|
return !1;
|
|
@@ -717,53 +717,53 @@ function yn(e) {
|
|
|
717
717
|
function P(I) {
|
|
718
718
|
if (I == null)
|
|
719
719
|
return !0;
|
|
720
|
-
var
|
|
721
|
-
if (
|
|
720
|
+
var _ = e.getAuthItem != null ? e.getAuthItem(I) : null;
|
|
721
|
+
if (_ == null)
|
|
722
722
|
return !1;
|
|
723
|
-
if (
|
|
723
|
+
if (_.requiresAuth === !1)
|
|
724
724
|
return !0;
|
|
725
725
|
const s = j(o);
|
|
726
|
-
if (s.isSuspended &&
|
|
726
|
+
if (s.isSuspended && _.ignoreSuspension !== !0)
|
|
727
727
|
return !1;
|
|
728
728
|
if (s.isGlobalAdmin)
|
|
729
729
|
return !0;
|
|
730
|
-
if (
|
|
731
|
-
for (var A = 0; A <
|
|
732
|
-
if (!N(
|
|
730
|
+
if (_.permissions != null) {
|
|
731
|
+
for (var A = 0; A < _.permissions.length; A++)
|
|
732
|
+
if (!N(_.permissions[A]))
|
|
733
733
|
return !1;
|
|
734
734
|
}
|
|
735
735
|
return !0;
|
|
736
736
|
}
|
|
737
737
|
function N(I) {
|
|
738
|
-
const
|
|
739
|
-
if (
|
|
740
|
-
for (var s = 0; s <
|
|
741
|
-
var A =
|
|
742
|
-
if (I == A[0] || I == "everything" ||
|
|
738
|
+
const _ = j(o);
|
|
739
|
+
if (_.userPermissions != null)
|
|
740
|
+
for (var s = 0; s < _.userPermissions.length; s++) {
|
|
741
|
+
var A = _.userPermissions[s].split(".");
|
|
742
|
+
if (I == A[0] || I == "everything" || _.userPermissions[s] == "everything.view" || _.userPermissions[s] == "everything.edit")
|
|
743
743
|
return !0;
|
|
744
744
|
}
|
|
745
745
|
return !1;
|
|
746
746
|
}
|
|
747
|
-
function $(I,
|
|
747
|
+
function $(I, _, s) {
|
|
748
748
|
let A = !0;
|
|
749
|
-
return j(o).isGlobalAdmin ? !0 : (
|
|
750
|
-
s == "edit" ?
|
|
749
|
+
return j(o).isGlobalAdmin ? !0 : (_ != null && _.length > 0 && _.forEach((Q) => {
|
|
750
|
+
s == "edit" ? x(Q) || (A = !1) : N(Q) || (A = !1);
|
|
751
751
|
}), I != null && I.length > 0 && (I.some((Q) => l(Q)) || (A = !1)), A);
|
|
752
752
|
}
|
|
753
|
-
function F(I,
|
|
753
|
+
function F(I, _ = !1) {
|
|
754
754
|
var s = e.getAuthItem != null ? e.getAuthItem(I) : null;
|
|
755
755
|
let A = !1;
|
|
756
756
|
if (s == null)
|
|
757
757
|
return !1;
|
|
758
758
|
let K = s.subscriptions ?? [], Q = s.permissions ?? [], re = $(K, Q, "view");
|
|
759
|
-
return re || !
|
|
759
|
+
return re || !_ || !Te(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ie) => {
|
|
760
760
|
F(ie, !0) && (A = !0);
|
|
761
761
|
}), A);
|
|
762
762
|
}
|
|
763
763
|
function h(I) {
|
|
764
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (
|
|
764
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (_, s) => {
|
|
765
765
|
const A = Ne(kr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
|
|
766
|
-
return
|
|
766
|
+
return _ ? `${A}&redirect_path=${_}` : A;
|
|
767
767
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, u.value) ?? "" : "";
|
|
768
768
|
}
|
|
769
769
|
function m(I) {
|
|
@@ -771,12 +771,12 @@ function yn(e) {
|
|
|
771
771
|
return I == null ? 0 : ((s = (e.subscriptionOptions ?? []).find((A) => A.code == I)) == null ? void 0 : s.value) ?? 0;
|
|
772
772
|
}
|
|
773
773
|
function l(I) {
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
774
|
+
const _ = j(o);
|
|
775
|
+
if (_.subscriptionCode == null)
|
|
776
776
|
return !1;
|
|
777
|
-
if (
|
|
777
|
+
if (_.subscriptionCode == I)
|
|
778
778
|
return !0;
|
|
779
|
-
const s = m(I), A = m(
|
|
779
|
+
const s = m(I), A = m(_.subscriptionCode);
|
|
780
780
|
return s <= A;
|
|
781
781
|
}
|
|
782
782
|
function r(I) {
|
|
@@ -787,16 +787,16 @@ function yn(e) {
|
|
|
787
787
|
);
|
|
788
788
|
return JSON.parse(A);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
791
|
-
o.value = void 0, M(), I != null &&
|
|
790
|
+
function y(I, _) {
|
|
791
|
+
o.value = void 0, M(), I != null && _ != null && _.currentRoute.value.path != I && _.push({ path: I });
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function S(I) {
|
|
794
794
|
var s;
|
|
795
|
-
j(o).isLoggedIn || ((s = e.demo) == null || s.endDemo(), C() && (
|
|
795
|
+
j(o).isLoggedIn || ((s = e.demo) == null || s.endDemo(), C() && (y(), window.location.href = h(I)));
|
|
796
796
|
}
|
|
797
|
-
async function c(I,
|
|
797
|
+
async function c(I, _) {
|
|
798
798
|
return e.getToken ?? (e.getToken = async () => {
|
|
799
|
-
let s = I, A =
|
|
799
|
+
let s = I, A = _, K = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
|
|
800
800
|
if (s == null || A == null)
|
|
801
801
|
throw new Error("Code and State required in OAuth token process");
|
|
802
802
|
if (A != u.value)
|
|
@@ -809,39 +809,39 @@ function yn(e) {
|
|
|
809
809
|
additionalUrl: re,
|
|
810
810
|
data: ie
|
|
811
811
|
});
|
|
812
|
-
|
|
813
|
-
}), await e.getToken(I,
|
|
812
|
+
D(W.access_token);
|
|
813
|
+
}), await e.getToken(I, _);
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function D(I) {
|
|
816
816
|
if (I != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
817
|
-
const
|
|
818
|
-
|
|
817
|
+
const _ = r(I);
|
|
818
|
+
E(_, I), e.processTokenPayload != null && e.processTokenPayload(o, _);
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function E(I, _) {
|
|
822
822
|
var A;
|
|
823
823
|
const s = o.value;
|
|
824
|
-
s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? or), s.token =
|
|
824
|
+
s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? or), s.token = _, s.userID = I.UserLoginID, s.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
|
|
825
825
|
}
|
|
826
826
|
function M() {
|
|
827
827
|
var I;
|
|
828
828
|
o.value ?? (o.value = {}), (I = o.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? or);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function w() {
|
|
831
831
|
const I = j(o);
|
|
832
|
-
return I.isLoggedIn && C() && (
|
|
832
|
+
return I.isLoggedIn && C() && (y(), window.location.href = h()), I.isLoggedIn;
|
|
833
833
|
}
|
|
834
834
|
function C() {
|
|
835
835
|
const I = j(o);
|
|
836
836
|
if (I == null || I.expiresOn == null)
|
|
837
837
|
return !0;
|
|
838
|
-
const
|
|
839
|
-
return
|
|
838
|
+
const _ = de.fromFormat(I.expiresOn, t), s = de.utc();
|
|
839
|
+
return _ <= s;
|
|
840
840
|
}
|
|
841
841
|
return M(), Ar = {
|
|
842
842
|
authState: u,
|
|
843
843
|
canEdit: g,
|
|
844
|
-
canEditPermit:
|
|
844
|
+
canEditPermit: x,
|
|
845
845
|
canView: P,
|
|
846
846
|
canViewPermit: N,
|
|
847
847
|
credentials: o,
|
|
@@ -850,106 +850,106 @@ function yn(e) {
|
|
|
850
850
|
getAuthorizeUrl: h,
|
|
851
851
|
getToken: c,
|
|
852
852
|
isLoggedIn: te(() => o.value.isLoggedIn === !0),
|
|
853
|
-
login:
|
|
854
|
-
logout:
|
|
855
|
-
resetAuthState:
|
|
856
|
-
setAuth:
|
|
853
|
+
login: S,
|
|
854
|
+
logout: y,
|
|
855
|
+
resetAuthState: b,
|
|
856
|
+
setAuth: D,
|
|
857
857
|
timeZone: te(() => o.value.timeZone ?? e.defaultTimeZone ?? or),
|
|
858
|
-
tryLogin:
|
|
858
|
+
tryLogin: w
|
|
859
859
|
}, Ar;
|
|
860
860
|
}
|
|
861
861
|
function wn(e, t, u = {}) {
|
|
862
862
|
const {
|
|
863
|
-
preventDefault:
|
|
863
|
+
preventDefault: b = !1,
|
|
864
864
|
stopPropagation: o = !1,
|
|
865
865
|
axis: g = "both"
|
|
866
|
-
} = u,
|
|
866
|
+
} = u, x = { capture: u.capture ?? !0 };
|
|
867
867
|
let P = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = { x: 0, y: 0 }, F = [], h = [], m = z(!1);
|
|
868
868
|
function l(M) {
|
|
869
|
-
j(
|
|
869
|
+
j(b) && M.preventDefault(), j(o) && M.stopPropagation();
|
|
870
870
|
}
|
|
871
871
|
function r(M) {
|
|
872
872
|
var s;
|
|
873
|
-
const
|
|
874
|
-
if (!
|
|
873
|
+
const w = j(e);
|
|
874
|
+
if (!w)
|
|
875
875
|
return;
|
|
876
|
-
const C =
|
|
877
|
-
$ = { x:
|
|
876
|
+
const C = w.$el, _ = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
|
|
877
|
+
$ = { x: _.clientX, y: _.clientY }, N = {
|
|
878
878
|
x: C.offsetLeft,
|
|
879
879
|
y: C.offsetTop
|
|
880
880
|
}, P = {
|
|
881
881
|
x: C.offsetLeft,
|
|
882
882
|
y: C.offsetTop
|
|
883
|
-
}, ((s = u.onStart) == null ? void 0 : s.call(u, $, M)) !== !1 && (h.push(he("mousemove",
|
|
883
|
+
}, ((s = u.onStart) == null ? void 0 : s.call(u, $, M)) !== !1 && (h.push(he("mousemove", y)), h.push(he("touchmove", y)), h.push(he("mouseup", S)), h.push(he("touchend", S)), l(M));
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function y(M) {
|
|
886
886
|
var A;
|
|
887
887
|
if (!$ || !j(e))
|
|
888
888
|
return;
|
|
889
889
|
const I = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
|
|
890
|
-
let
|
|
891
|
-
(g === "x" || g === "both") && (P.x = N.x +
|
|
890
|
+
let _ = I.clientX - $.x, s = I.clientY - $.y;
|
|
891
|
+
(g === "x" || g === "both") && (P.x = N.x + _), (g === "y" || g === "both") && (P.y = N.y + s), (A = u.onMove) == null || A.call(u, P, M), l(M), c(P);
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
var
|
|
893
|
+
function S(M) {
|
|
894
|
+
var w;
|
|
895
895
|
document.documentElement.style.cursor = "", h.forEach((C) => {
|
|
896
896
|
C();
|
|
897
|
-
}), h.length = 0, (
|
|
897
|
+
}), h.length = 0, (w = u.onEnd) == null || w.call(u, P, M), l(M);
|
|
898
898
|
}
|
|
899
899
|
function c(M) {
|
|
900
|
-
const
|
|
901
|
-
if (!
|
|
900
|
+
const w = j(e);
|
|
901
|
+
if (!w)
|
|
902
902
|
return;
|
|
903
|
-
const C =
|
|
903
|
+
const C = w.$el;
|
|
904
904
|
C.style.left = `${M.x}px`, C.style.top = `${M.y}px`;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function D() {
|
|
907
907
|
if (j(m))
|
|
908
908
|
return;
|
|
909
909
|
const M = j(t);
|
|
910
910
|
if (!M)
|
|
911
911
|
return;
|
|
912
|
-
const
|
|
913
|
-
|
|
912
|
+
const w = M.$el;
|
|
913
|
+
w.style.cursor = "move", F.push(he(w, "mousedown", r, x)), F.push(he(w, "touchstart", r, x)), m.value = !0;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function E() {
|
|
916
916
|
if (!j(m))
|
|
917
917
|
return;
|
|
918
918
|
const M = j(t);
|
|
919
919
|
if (!M)
|
|
920
920
|
return;
|
|
921
|
-
const
|
|
922
|
-
|
|
921
|
+
const w = M.$el;
|
|
922
|
+
w.style.cursor = "", F.forEach((C) => {
|
|
923
923
|
C();
|
|
924
924
|
}), F.length = 0, m.value = !1;
|
|
925
925
|
}
|
|
926
926
|
return {
|
|
927
927
|
draggingIsOn: m,
|
|
928
|
-
turnDraggableOff:
|
|
929
|
-
turnDraggableOn:
|
|
928
|
+
turnDraggableOff: E,
|
|
929
|
+
turnDraggableOn: D
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
932
|
const bn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
933
933
|
function Sn(e, t = {}) {
|
|
934
|
-
let u,
|
|
934
|
+
let u, b = t.handleWidth ?? 12, o = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, N = t.maxHeight ?? Number.MAX_SAFE_INTEGER, $ = t.preventDefault ?? !1, F = t.stopPropagation ?? !1, h, m = [];
|
|
935
935
|
const l = z(!1);
|
|
936
|
-
let r = [],
|
|
937
|
-
const
|
|
938
|
-
let
|
|
936
|
+
let r = [], y = [];
|
|
937
|
+
const S = z(!1), c = z({ x: 0, y: 0 });
|
|
938
|
+
let D = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, E = {};
|
|
939
939
|
function M(W) {
|
|
940
940
|
Ae($) && W.preventDefault(), Ae(F) && W.stopPropagation();
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function w(W, Y) {
|
|
943
943
|
m = Y.map(I), m.forEach((H) => W.$el.appendChild(H));
|
|
944
944
|
}
|
|
945
945
|
function C(W) {
|
|
946
946
|
m.forEach((Y) => W.$el.removeChild(Y));
|
|
947
947
|
}
|
|
948
948
|
function I(W) {
|
|
949
|
-
const Y =
|
|
949
|
+
const Y = b + "px", H = -b / 2 + "px", ae = o + 1, G = document.createElement("div");
|
|
950
950
|
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? o : ae).toString(), G.style.cursor = K(W), W.includes("t") && (G.style.top = H, G.style.height = Y, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = H, G.style.height = Y, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = H, G.style.width = Y, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = H, G.style.width = Y, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function _(W) {
|
|
953
953
|
var ne;
|
|
954
954
|
if (!m.some((fe) => fe == W.target))
|
|
955
955
|
return;
|
|
@@ -957,15 +957,15 @@ function Sn(e, t = {}) {
|
|
|
957
957
|
if (!Y)
|
|
958
958
|
return;
|
|
959
959
|
const H = Y.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
|
|
960
|
-
if (c.value.x = G.clientX, c.value.y = G.clientY,
|
|
960
|
+
if (c.value.x = G.clientX, c.value.y = G.clientY, D = {
|
|
961
961
|
left: H.offsetLeft,
|
|
962
962
|
top: H.offsetTop,
|
|
963
963
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
964
964
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
|
|
965
|
-
},
|
|
965
|
+
}, E = Pr(D), ((ne = t.onStart) == null ? void 0 : ne.call(t, c.value, W)) === !1)
|
|
966
966
|
return;
|
|
967
967
|
let X = W.target;
|
|
968
|
-
document.documentElement.style.cursor = K(X.dataset.handle), h = X.dataset.handle,
|
|
968
|
+
document.documentElement.style.cursor = K(X.dataset.handle), h = X.dataset.handle, y.push(he("mousemove", s)), y.push(he("mouseup", A)), y.push(he("touchmove", s)), y.push(he("touchend", A)), M(W);
|
|
969
969
|
}
|
|
970
970
|
function s(W) {
|
|
971
971
|
const Y = Ae(e);
|
|
@@ -973,29 +973,29 @@ function Sn(e, t = {}) {
|
|
|
973
973
|
return;
|
|
974
974
|
const H = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
|
|
975
975
|
let X = G.clientX - c.value.x, ne = G.clientY - c.value.y;
|
|
976
|
-
const fe = Ae(
|
|
976
|
+
const fe = Ae(D);
|
|
977
977
|
if (h.includes("t")) {
|
|
978
978
|
const ce = Math.min(N, Math.max(P, (fe.height ?? 0) - ne));
|
|
979
|
-
|
|
979
|
+
E.height = ce, E.top = (fe.top ?? 0) + ne;
|
|
980
980
|
}
|
|
981
981
|
if (h.includes("b")) {
|
|
982
982
|
const ce = Math.min(N, Math.max(P, (fe.height ?? 0) + ne));
|
|
983
|
-
|
|
983
|
+
E.height = ce;
|
|
984
984
|
}
|
|
985
985
|
if (h.includes("l")) {
|
|
986
|
-
const ce = Math.min(
|
|
987
|
-
|
|
986
|
+
const ce = Math.min(x, Math.max(g, (fe.width ?? 0) - X));
|
|
987
|
+
E.width = ce, E.left = (fe.left ?? 0) + X;
|
|
988
988
|
}
|
|
989
989
|
if (h.includes("r")) {
|
|
990
|
-
const ce = Math.min(
|
|
991
|
-
|
|
990
|
+
const ce = Math.min(x, Math.max(g, (fe.width ?? 0) + X));
|
|
991
|
+
E.width = ce;
|
|
992
992
|
}
|
|
993
|
-
H.dispatchEvent(new CustomEvent("resize")), M(W), re(
|
|
993
|
+
H.dispatchEvent(new CustomEvent("resize")), M(W), re(E);
|
|
994
994
|
}
|
|
995
995
|
function A() {
|
|
996
|
-
document.documentElement.style.cursor = "", h = null,
|
|
996
|
+
document.documentElement.style.cursor = "", h = null, y.forEach((W) => {
|
|
997
997
|
W();
|
|
998
|
-
}),
|
|
998
|
+
}), y.length = 0;
|
|
999
999
|
}
|
|
1000
1000
|
function K(W) {
|
|
1001
1001
|
const Y = {
|
|
@@ -1028,27 +1028,27 @@ function Sn(e, t = {}) {
|
|
|
1028
1028
|
H.style.width = "auto", H.style.top = "", H.style.left = "", H.style.position = "", H.style.transition = "", l.value = !1;
|
|
1029
1029
|
}, { once: !0 });
|
|
1030
1030
|
} else if ((u == "page" || Y.$el.style.position !== "absolute") && W !== "page") {
|
|
1031
|
-
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", l.value = !0,
|
|
1031
|
+
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", l.value = !0, D = {
|
|
1032
1032
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
1033
1033
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width")),
|
|
1034
1034
|
top: H.offsetTop,
|
|
1035
1035
|
left: H.offsetLeft,
|
|
1036
1036
|
position: "absolute"
|
|
1037
|
-
}, re(
|
|
1038
|
-
const ae =
|
|
1039
|
-
W == "freestyle" ?
|
|
1037
|
+
}, re(D), H.offsetHeight;
|
|
1038
|
+
const ae = D;
|
|
1039
|
+
W == "freestyle" ? E = {
|
|
1040
1040
|
height: ae.height,
|
|
1041
1041
|
width: (ae.width ?? 100) / 2,
|
|
1042
1042
|
top: (ae.top ?? 0) + 2,
|
|
1043
1043
|
left: (ae.left ?? 0) + 2,
|
|
1044
1044
|
position: "absolute"
|
|
1045
|
-
} : W == "blade" && (
|
|
1045
|
+
} : W == "blade" && (E = {
|
|
1046
1046
|
height: ae.height,
|
|
1047
1047
|
width: (ae.width ?? 100) / 2,
|
|
1048
1048
|
top: (ae.top ?? 0) + 2,
|
|
1049
1049
|
left: (ae.left ?? 0) + 2,
|
|
1050
1050
|
position: "absolute"
|
|
1051
|
-
}), re(
|
|
1051
|
+
}), re(E), he(H, "transitionend", () => {
|
|
1052
1052
|
H.style.transition = "", l.value = !1;
|
|
1053
1053
|
}, { once: !0 });
|
|
1054
1054
|
}
|
|
@@ -1061,38 +1061,38 @@ function Sn(e, t = {}) {
|
|
|
1061
1061
|
W.top ? H.style.top = `${W.top}px` : H.style.top = void 0, W.left ? H.style.left = `${W.left}px` : H.style.left = void 0, W.height ? H.style.height = `${W.height}px` : H.style.height = void 0, W.width ? H.style.width = `${W.width}px` : H.style.width = void 0, W.position ? H.style.position = `${W.position}` : H.style.position = void 0, console.log(H.style.position);
|
|
1062
1062
|
}
|
|
1063
1063
|
function ie(W, Y) {
|
|
1064
|
-
if (
|
|
1064
|
+
if (S.value)
|
|
1065
1065
|
return;
|
|
1066
1066
|
const H = Ae(e);
|
|
1067
|
-
H && (
|
|
1067
|
+
H && (w(H, W ?? bn), Q(Y), r.push(he(H.$el, "mousedown", _)), r.push(he(H.$el, "touchstart", _)), S.value = !0, u = Y);
|
|
1068
1068
|
}
|
|
1069
1069
|
function we(W) {
|
|
1070
|
-
if (!
|
|
1070
|
+
if (!S.value)
|
|
1071
1071
|
return;
|
|
1072
1072
|
const Y = Ae(e);
|
|
1073
1073
|
Y && (C(Y), Q(W), r.forEach((H) => {
|
|
1074
1074
|
H();
|
|
1075
|
-
}), r.length = 0,
|
|
1075
|
+
}), r.length = 0, S.value = !1);
|
|
1076
1076
|
}
|
|
1077
1077
|
return {
|
|
1078
|
-
resizingIsOn:
|
|
1078
|
+
resizingIsOn: S,
|
|
1079
1079
|
turnResizingOn: ie,
|
|
1080
1080
|
turnResizingOff: we
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
1083
|
function An(e) {
|
|
1084
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), u = (e == null ? void 0 : e.handle) ?? z(null),
|
|
1084
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), u = (e == null ? void 0 : e.handle) ?? z(null), b = z(!1), o = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: N } = Sn(t), { turnDraggableOff: $, turnDraggableOn: F } = wn(t, u);
|
|
1085
1085
|
Jt(t, (m) => {
|
|
1086
1086
|
const l = m[0], { width: r } = l.contentRect;
|
|
1087
|
-
|
|
1087
|
+
b.value = r < o;
|
|
1088
1088
|
});
|
|
1089
1089
|
function h(m) {
|
|
1090
1090
|
$(), m == "page" ? P(m) : m == "blade" ? N(["l", "r"], m) : m == "freestyle" ? (P(), N(void 0, m), F()) : m == "inline" && P();
|
|
1091
1091
|
}
|
|
1092
1092
|
return h(g.value), _e(g, (m) => h(m)), {
|
|
1093
|
-
isMobile:
|
|
1093
|
+
isMobile: b,
|
|
1094
1094
|
variant: g,
|
|
1095
|
-
bladeData:
|
|
1095
|
+
bladeData: x
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
1098
|
const dr = {
|
|
@@ -1134,12 +1134,12 @@ function ma(e) {
|
|
|
1134
1134
|
function En(e) {
|
|
1135
1135
|
const t = z({});
|
|
1136
1136
|
let u = e.vuetifyInstance;
|
|
1137
|
-
function
|
|
1137
|
+
function b() {
|
|
1138
1138
|
const h = localStorage.getItem("cosmetics");
|
|
1139
1139
|
h != null && h.length > 0 ? t.value = JSON.parse(h) : t.value = {
|
|
1140
1140
|
theme: e.defaultTheme ?? "light",
|
|
1141
|
-
light: e.defaultLightTheme
|
|
1142
|
-
dark: e.defaultDarkTheme
|
|
1141
|
+
light: { ...dr, ...e.defaultLightTheme },
|
|
1142
|
+
dark: { ...hr, ...e.defaultDarkTheme },
|
|
1143
1143
|
drawer: e.defaultDrawer ?? !0,
|
|
1144
1144
|
drawerStick: e.defaultDrawerStick ?? !1
|
|
1145
1145
|
};
|
|
@@ -1148,13 +1148,13 @@ function En(e) {
|
|
|
1148
1148
|
localStorage.setItem("cosmetics", JSON.stringify(t.value));
|
|
1149
1149
|
}
|
|
1150
1150
|
function g(h) {
|
|
1151
|
-
u != null && (u.global.name.value = t.value.theme, u.global.name.value == "dark" ? (h && (t.value.dark = { ...e.defaultDarkTheme
|
|
1151
|
+
u != null && (u.global.name.value = t.value.theme, u.global.name.value == "dark" ? (h && (t.value.dark = { ...hr, ...e.defaultDarkTheme }), u.themes.value.dark = {
|
|
1152
1152
|
...u.themes.value.dark,
|
|
1153
1153
|
colors: {
|
|
1154
1154
|
...u.themes.value.dark.colors,
|
|
1155
1155
|
...t.value.dark
|
|
1156
1156
|
}
|
|
1157
|
-
}) : (h && (t.value.light = { ...e.defaultLightTheme
|
|
1157
|
+
}) : (h && (t.value.light = { ...dr, ...e.defaultLightTheme }), u.themes.value.light = {
|
|
1158
1158
|
...u.themes.value.light,
|
|
1159
1159
|
colors: {
|
|
1160
1160
|
...u.themes.value.light.colors,
|
|
@@ -1162,7 +1162,7 @@ function En(e) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
}));
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function x(h) {
|
|
1166
1166
|
var m;
|
|
1167
1167
|
if (u != null) {
|
|
1168
1168
|
const l = u.themes.value.dark, r = u.themes.value.light;
|
|
@@ -1182,15 +1182,15 @@ function En(e) {
|
|
|
1182
1182
|
var h;
|
|
1183
1183
|
if (u != null) {
|
|
1184
1184
|
const m = u.themes.value.dark, l = u.themes.value.light;
|
|
1185
|
-
m.colors.primary = (t.value.dark ?? e.defaultDarkTheme
|
|
1185
|
+
m.colors.primary = (t.value.dark ?? { ...hr, ...e.defaultDarkTheme }).primary, l.colors.primary = (t.value.light ?? { ...dr, ...e.defaultLightTheme }).primary, (h = document.querySelector('meta[name="theme-color"]')) == null || h.setAttribute("content", "");
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
|
-
return
|
|
1188
|
+
return b(), _e(t, () => {
|
|
1189
1189
|
o();
|
|
1190
1190
|
}), Er = {
|
|
1191
1191
|
state: t,
|
|
1192
1192
|
resetCosmetics: g,
|
|
1193
|
-
setTemporaryColor:
|
|
1193
|
+
setTemporaryColor: x,
|
|
1194
1194
|
toggleDrawer: P,
|
|
1195
1195
|
toggleDrawerStick: N,
|
|
1196
1196
|
toggleLightDark: $,
|
|
@@ -1204,37 +1204,37 @@ function In() {
|
|
|
1204
1204
|
function e(t) {
|
|
1205
1205
|
const {
|
|
1206
1206
|
items: u,
|
|
1207
|
-
headers:
|
|
1207
|
+
headers: b,
|
|
1208
1208
|
fileName: o = "data.csv",
|
|
1209
1209
|
format: g = "file"
|
|
1210
1210
|
} = t;
|
|
1211
1211
|
if (!Te(u))
|
|
1212
1212
|
return;
|
|
1213
|
-
let
|
|
1214
|
-
|
|
1215
|
-
header:
|
|
1216
|
-
itemText:
|
|
1217
|
-
value:
|
|
1218
|
-
})) :
|
|
1213
|
+
let x = [];
|
|
1214
|
+
b != null ? x = b == null ? void 0 : b.filter((S) => (S.csv ?? S.csvText ?? S.csvFilter ?? S.csvArray) != null).map((S) => ({
|
|
1215
|
+
header: S.title ?? S.value ?? "",
|
|
1216
|
+
itemText: S.itemText,
|
|
1217
|
+
value: S.value
|
|
1218
|
+
})) : x = Object.keys(u[0]).map((S) => ({ header: rn(S) ?? "", value: S })), x = x.filter((S) => S.header.length > 0);
|
|
1219
1219
|
var P = [];
|
|
1220
|
-
for (let
|
|
1221
|
-
const c = u[
|
|
1220
|
+
for (let S = 0; S < u.length; S++) {
|
|
1221
|
+
const c = u[S];
|
|
1222
1222
|
var N = {}, $ = [];
|
|
1223
|
-
for (let
|
|
1224
|
-
const
|
|
1223
|
+
for (let D = 0; D < x.length; D++) {
|
|
1224
|
+
const E = x[D];
|
|
1225
1225
|
var F = null;
|
|
1226
|
-
typeof
|
|
1226
|
+
typeof E.value == "function" ? F = E.value(c) : typeof E.value == "string" && (F = wr(c, E.value)), E.itemText != null ? N[E.header] = wr(F, E.itemText) : N[E.header] = F;
|
|
1227
1227
|
}
|
|
1228
|
-
P.push(N), Te($) && $.forEach((
|
|
1229
|
-
P.push(
|
|
1228
|
+
P.push(N), Te($) && $.forEach((D) => {
|
|
1229
|
+
P.push(D);
|
|
1230
1230
|
}), $ = [];
|
|
1231
1231
|
}
|
|
1232
1232
|
var h = [];
|
|
1233
|
-
if (h.push(
|
|
1233
|
+
if (h.push(x.map((S) => S.header).toString()), P.forEach((S) => {
|
|
1234
1234
|
let c = [];
|
|
1235
|
-
|
|
1236
|
-
var
|
|
1237
|
-
c.push(
|
|
1235
|
+
x.forEach(function(D) {
|
|
1236
|
+
var E = S[D.header];
|
|
1237
|
+
c.push(E ?? "");
|
|
1238
1238
|
}), h.push(c.join(","));
|
|
1239
1239
|
}), g == "array")
|
|
1240
1240
|
return h;
|
|
@@ -1243,9 +1243,9 @@ function In() {
|
|
|
1243
1243
|
if (window.navigator.msSaveOrOpenBlob)
|
|
1244
1244
|
window.navigator.msSaveOrOpenBlob(l, o);
|
|
1245
1245
|
else {
|
|
1246
|
-
var r = document.createElement("a"),
|
|
1247
|
-
r.href =
|
|
1248
|
-
document.body.removeChild(r), window.URL.revokeObjectURL(
|
|
1246
|
+
var r = document.createElement("a"), y = URL.createObjectURL(l);
|
|
1247
|
+
r.href = y, r.download = o, document.body.appendChild(r), r.click(), setTimeout(function() {
|
|
1248
|
+
document.body.removeChild(r), window.URL.revokeObjectURL(y);
|
|
1249
1249
|
}, 0);
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
@@ -1262,7 +1262,7 @@ function Dn(e) {
|
|
|
1262
1262
|
function u() {
|
|
1263
1263
|
return o().startOf("day").toUTC().toString() ?? "";
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function b() {
|
|
1266
1266
|
return o().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
1267
1267
|
}
|
|
1268
1268
|
function o(N, $) {
|
|
@@ -1278,7 +1278,7 @@ function Dn(e) {
|
|
|
1278
1278
|
const h = F ? de.fromFormat(N, F, { zone: e.getTimeZone() }) : de.fromISO(N, { zone: e.getTimeZone() });
|
|
1279
1279
|
return $ ? h.toFormat($) : h == null ? void 0 : h.toString();
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function x(N, $) {
|
|
1282
1282
|
return N == null ? t() : $ ? de.fromFormat(N, $) : de.fromISO(N);
|
|
1283
1283
|
}
|
|
1284
1284
|
function P(N, $, F) {
|
|
@@ -1291,10 +1291,10 @@ function Dn(e) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return Ir = {
|
|
1293
1293
|
getToday: u,
|
|
1294
|
-
getTomorrow:
|
|
1294
|
+
getTomorrow: b,
|
|
1295
1295
|
tzDate: o,
|
|
1296
1296
|
tzString: g,
|
|
1297
|
-
utcDate:
|
|
1297
|
+
utcDate: x,
|
|
1298
1298
|
utcString: P
|
|
1299
1299
|
}, Ir;
|
|
1300
1300
|
}
|
|
@@ -1304,7 +1304,7 @@ function ya() {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
function xn(e) {
|
|
1306
1306
|
const t = z(!1), u = (e == null ? void 0 : e.apis) ?? [];
|
|
1307
|
-
function
|
|
1307
|
+
function b() {
|
|
1308
1308
|
t.value = !0;
|
|
1309
1309
|
}
|
|
1310
1310
|
function o() {
|
|
@@ -1318,30 +1318,30 @@ function xn(e) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
return m == null && (m = u.find((l) => Array.isArray(l.nav) ? l.nav.some((r) => r == h.nav) : l.nav == h.nav)), m;
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function x(h) {
|
|
1322
1322
|
var r;
|
|
1323
1323
|
if (u == null)
|
|
1324
1324
|
return Promise.resolve("no demo data available for this api");
|
|
1325
1325
|
const m = h.id ?? ((r = h.data) == null ? void 0 : r.id), l = g(h);
|
|
1326
1326
|
if (m != null && (l == null ? void 0 : l.data) != null) {
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1327
|
+
const y = l.data.findIndex((S) => S.id == m);
|
|
1328
|
+
y >= 0 && l.data.splice(y, 1);
|
|
1329
1329
|
}
|
|
1330
|
-
return new Promise(function(
|
|
1330
|
+
return new Promise(function(y) {
|
|
1331
1331
|
setTimeout(function() {
|
|
1332
|
-
|
|
1332
|
+
y(void 0);
|
|
1333
1333
|
}, 200);
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
1336
|
function P(h) {
|
|
1337
|
-
var
|
|
1337
|
+
var y, S, c;
|
|
1338
1338
|
if (u == null)
|
|
1339
1339
|
throw new Error("no demo data available for this api");
|
|
1340
|
-
const m = h.id ?? ((
|
|
1340
|
+
const m = h.id ?? ((y = h.data) == null ? void 0 : y.id), l = g(h);
|
|
1341
1341
|
let r;
|
|
1342
|
-
return l != null && (l.data ?? (l.data = []), l.getAction != null ? r = l.getAction(l.data, m) : m != null ? r = (
|
|
1342
|
+
return l != null && (l.data ?? (l.data = []), l.getAction != null ? r = l.getAction(l.data, m) : m != null ? r = (S = l.data) == null ? void 0 : S.find((D) => D.id == m) : l.path != null && ((c = l.data) == null ? void 0 : c.length) == 1 && (r = l.data[0])), r == null ? Promise.resolve(void 0) : new Promise((D) => {
|
|
1343
1343
|
setTimeout(() => {
|
|
1344
|
-
|
|
1344
|
+
D({
|
|
1345
1345
|
data: r
|
|
1346
1346
|
});
|
|
1347
1347
|
});
|
|
@@ -1363,21 +1363,21 @@ function xn(e) {
|
|
|
1363
1363
|
});
|
|
1364
1364
|
}
|
|
1365
1365
|
function $(h) {
|
|
1366
|
-
var r,
|
|
1366
|
+
var r, y;
|
|
1367
1367
|
if (u == null)
|
|
1368
1368
|
throw new Error("no demo data available for this api");
|
|
1369
1369
|
const m = g(h);
|
|
1370
1370
|
let l;
|
|
1371
|
-
return m != null && (m.data ?? (m.data = []), m.postAction != null ? l = m.postAction(m.data, h.data) : h.data != null && (h.data.id == null && (h.data.id = ((((r = m.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), l = h.data, (
|
|
1371
|
+
return m != null && (m.data ?? (m.data = []), m.postAction != null ? l = m.postAction(m.data, h.data) : h.data != null && (h.data.id == null && (h.data.id = ((((r = m.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), l = h.data, (y = m.data) == null || y.push(l))), l == null ? Promise.resolve(void 0) : new Promise((S) => {
|
|
1372
1372
|
setTimeout(() => {
|
|
1373
|
-
|
|
1373
|
+
S({
|
|
1374
1374
|
data: l
|
|
1375
1375
|
});
|
|
1376
1376
|
});
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
1379
|
function F(h) {
|
|
1380
|
-
var r,
|
|
1380
|
+
var r, y;
|
|
1381
1381
|
if (u == null)
|
|
1382
1382
|
throw new Error("no demo data available for this api");
|
|
1383
1383
|
const m = g(h);
|
|
@@ -1386,13 +1386,13 @@ function xn(e) {
|
|
|
1386
1386
|
if (m.data ?? (m.data = []), m.patchAction != null)
|
|
1387
1387
|
l = m.patchAction(m.data, h.data);
|
|
1388
1388
|
else if (h.data.id != null) {
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1389
|
+
const S = (r = m.data) == null ? void 0 : r.findIndex((c) => c.id == h.data.id);
|
|
1390
|
+
S != null && S > -1 && ((y = m.data) == null || y.splice(S, 1, h.data)), l = h.data;
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
return l == null ? Promise.resolve(void 0) : new Promise((
|
|
1393
|
+
return l == null ? Promise.resolve(void 0) : new Promise((S) => {
|
|
1394
1394
|
setTimeout(() => {
|
|
1395
|
-
|
|
1395
|
+
S({
|
|
1396
1396
|
data: l
|
|
1397
1397
|
});
|
|
1398
1398
|
});
|
|
@@ -1401,9 +1401,9 @@ function xn(e) {
|
|
|
1401
1401
|
return Dr = {
|
|
1402
1402
|
endDemo: o,
|
|
1403
1403
|
isDemoing: t,
|
|
1404
|
-
startDemo:
|
|
1404
|
+
startDemo: b,
|
|
1405
1405
|
data: u,
|
|
1406
|
-
deleteItem:
|
|
1406
|
+
deleteItem: x,
|
|
1407
1407
|
get: P,
|
|
1408
1408
|
getAll: N,
|
|
1409
1409
|
post: $,
|
|
@@ -1414,13 +1414,13 @@ var _n = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
|
1414
1414
|
function wa(e) {
|
|
1415
1415
|
function t(u) {
|
|
1416
1416
|
var o;
|
|
1417
|
-
const
|
|
1418
|
-
if (
|
|
1419
|
-
document.title =
|
|
1417
|
+
const b = u.matched.slice().reverse().find((g) => g.meta && g.meta.title);
|
|
1418
|
+
if (b)
|
|
1419
|
+
document.title = b.meta.title;
|
|
1420
1420
|
else {
|
|
1421
1421
|
const g = _n.NODE_ENV;
|
|
1422
|
-
let
|
|
1423
|
-
g == "development" ?
|
|
1422
|
+
let x = "";
|
|
1423
|
+
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((o = e == null ? void 0 : e.demo) == null ? void 0 : o.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
return {
|
|
@@ -1443,7 +1443,7 @@ function Tn(e) {
|
|
|
1443
1443
|
var A = "";
|
|
1444
1444
|
return s.companyAccount != null && (A = s.companyAccount.companyName + " | "), s.addressLineOne != null && (A = A + s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + ", "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function b(s) {
|
|
1447
1447
|
if (typeof s != "number")
|
|
1448
1448
|
return s;
|
|
1449
1449
|
var A = new Intl.NumberFormat("en-US", {
|
|
@@ -1459,7 +1459,7 @@ function Tn(e) {
|
|
|
1459
1459
|
function g(s, A) {
|
|
1460
1460
|
return t(s, "d LLL", A);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function x(s, A) {
|
|
1463
1463
|
return t(s, "ccc", A);
|
|
1464
1464
|
}
|
|
1465
1465
|
function P(s, A) {
|
|
@@ -1494,10 +1494,10 @@ function Tn(e) {
|
|
|
1494
1494
|
var A = "";
|
|
1495
1495
|
return s.addressLineOne != null && (A = s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + " "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A = A.replaceAll(",", " "), A;
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function y(s, A) {
|
|
1498
1498
|
return t(s, "ddd DD MMM YYYY", A);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function S(s, A) {
|
|
1501
1501
|
return t(s, "ccc dd LLL yyyy hh:mm a", A);
|
|
1502
1502
|
}
|
|
1503
1503
|
function c(s) {
|
|
@@ -1507,16 +1507,16 @@ function Tn(e) {
|
|
|
1507
1507
|
});
|
|
1508
1508
|
return A.format(s);
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function D(s) {
|
|
1511
1511
|
return s.replaceAll(",", " ");
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function E(s, A) {
|
|
1514
1514
|
return t(s, "dd LLL yyyy", A);
|
|
1515
1515
|
}
|
|
1516
1516
|
function M(s, A) {
|
|
1517
1517
|
return t(s, "dd LLL yyyy hh:mm a", A);
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function w(s, A) {
|
|
1520
1520
|
return t(s, "hh:mm a", A);
|
|
1521
1521
|
}
|
|
1522
1522
|
function C(s) {
|
|
@@ -1524,10 +1524,10 @@ function Tn(e) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
const I = {
|
|
1526
1526
|
toCompanyNameAndLocationLine: u,
|
|
1527
|
-
toCurrency:
|
|
1527
|
+
toCurrency: b,
|
|
1528
1528
|
toDayDate: o,
|
|
1529
1529
|
toDayMonth: g,
|
|
1530
|
-
toDayOfWeek:
|
|
1530
|
+
toDayOfWeek: x,
|
|
1531
1531
|
toDayShortDate: P,
|
|
1532
1532
|
toDayShortDateAndTime: N,
|
|
1533
1533
|
toDisplayNumber: $,
|
|
@@ -1536,16 +1536,16 @@ function Tn(e) {
|
|
|
1536
1536
|
toFormat: m,
|
|
1537
1537
|
toLocationLine: l,
|
|
1538
1538
|
toLocationLineNoCommas: r,
|
|
1539
|
-
toLongDate:
|
|
1540
|
-
toLongDateAndTime:
|
|
1539
|
+
toLongDate: y,
|
|
1540
|
+
toLongDateAndTime: S,
|
|
1541
1541
|
toPercent: c,
|
|
1542
|
-
toPrettyCSV:
|
|
1543
|
-
toShortDate:
|
|
1542
|
+
toPrettyCSV: D,
|
|
1543
|
+
toShortDate: E,
|
|
1544
1544
|
toShortDateAndTime: M,
|
|
1545
|
-
toTime:
|
|
1545
|
+
toTime: w,
|
|
1546
1546
|
toTimeOfDay: C
|
|
1547
1547
|
};
|
|
1548
|
-
function
|
|
1548
|
+
function _(s) {
|
|
1549
1549
|
if (s != null) {
|
|
1550
1550
|
let A = s;
|
|
1551
1551
|
if (A != null && I[A] != null)
|
|
@@ -1554,7 +1554,7 @@ function Tn(e) {
|
|
|
1554
1554
|
return (A) => A;
|
|
1555
1555
|
}
|
|
1556
1556
|
return xr = {
|
|
1557
|
-
findFilter:
|
|
1557
|
+
findFilter: _,
|
|
1558
1558
|
...I
|
|
1559
1559
|
}, xr;
|
|
1560
1560
|
}
|
|
@@ -1572,10 +1572,10 @@ var at = { exports: {} };
|
|
|
1572
1572
|
(function(u) {
|
|
1573
1573
|
e.exports = u();
|
|
1574
1574
|
})(function() {
|
|
1575
|
-
return function u(
|
|
1576
|
-
function
|
|
1575
|
+
return function u(b, o, g) {
|
|
1576
|
+
function x($, F) {
|
|
1577
1577
|
if (!o[$]) {
|
|
1578
|
-
if (!
|
|
1578
|
+
if (!b[$]) {
|
|
1579
1579
|
var h = typeof Ke == "function" && Ke;
|
|
1580
1580
|
if (!F && h)
|
|
1581
1581
|
return h($, !0);
|
|
@@ -1585,21 +1585,21 @@ var at = { exports: {} };
|
|
|
1585
1585
|
throw m.code = "MODULE_NOT_FOUND", m;
|
|
1586
1586
|
}
|
|
1587
1587
|
var l = o[$] = { exports: {} };
|
|
1588
|
-
|
|
1589
|
-
var
|
|
1590
|
-
return
|
|
1591
|
-
}, l, l.exports, u,
|
|
1588
|
+
b[$][0].call(l.exports, function(r) {
|
|
1589
|
+
var y = b[$][1][r];
|
|
1590
|
+
return x(y || r);
|
|
1591
|
+
}, l, l.exports, u, b, o, g);
|
|
1592
1592
|
}
|
|
1593
1593
|
return o[$].exports;
|
|
1594
1594
|
}
|
|
1595
1595
|
for (var P = typeof Ke == "function" && Ke, N = 0; N < g.length; N++)
|
|
1596
|
-
|
|
1597
|
-
return
|
|
1598
|
-
}({ 1: [function(u,
|
|
1596
|
+
x(g[N]);
|
|
1597
|
+
return x;
|
|
1598
|
+
}({ 1: [function(u, b, o) {
|
|
1599
1599
|
(function(g) {
|
|
1600
|
-
var
|
|
1601
|
-
if (
|
|
1602
|
-
var N = 0, $ = new
|
|
1600
|
+
var x = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
1601
|
+
if (x) {
|
|
1602
|
+
var N = 0, $ = new x(r), F = g.document.createTextNode("");
|
|
1603
1603
|
$.observe(F, {
|
|
1604
1604
|
characterData: !0
|
|
1605
1605
|
}), P = function() {
|
|
@@ -1612,183 +1612,183 @@ var at = { exports: {} };
|
|
|
1612
1612
|
};
|
|
1613
1613
|
} else
|
|
1614
1614
|
"document" in g && "onreadystatechange" in g.document.createElement("script") ? P = function() {
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1617
|
-
r(),
|
|
1618
|
-
}, g.document.documentElement.appendChild(
|
|
1615
|
+
var S = g.document.createElement("script");
|
|
1616
|
+
S.onreadystatechange = function() {
|
|
1617
|
+
r(), S.onreadystatechange = null, S.parentNode.removeChild(S), S = null;
|
|
1618
|
+
}, g.document.documentElement.appendChild(S);
|
|
1619
1619
|
} : P = function() {
|
|
1620
1620
|
setTimeout(r, 0);
|
|
1621
1621
|
};
|
|
1622
1622
|
var m, l = [];
|
|
1623
1623
|
function r() {
|
|
1624
1624
|
m = !0;
|
|
1625
|
-
for (var
|
|
1626
|
-
for (c = l, l = [],
|
|
1627
|
-
c[
|
|
1628
|
-
|
|
1625
|
+
for (var S, c, D = l.length; D; ) {
|
|
1626
|
+
for (c = l, l = [], S = -1; ++S < D; )
|
|
1627
|
+
c[S]();
|
|
1628
|
+
D = l.length;
|
|
1629
1629
|
}
|
|
1630
1630
|
m = !1;
|
|
1631
1631
|
}
|
|
1632
|
-
|
|
1633
|
-
function
|
|
1634
|
-
l.push(
|
|
1632
|
+
b.exports = y;
|
|
1633
|
+
function y(S) {
|
|
1634
|
+
l.push(S) === 1 && !m && P();
|
|
1635
1635
|
}
|
|
1636
1636
|
}).call(this, typeof je < "u" ? je : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1637
|
-
}, {}], 2: [function(u,
|
|
1637
|
+
}, {}], 2: [function(u, b, o) {
|
|
1638
1638
|
var g = u(1);
|
|
1639
|
-
function
|
|
1639
|
+
function x() {
|
|
1640
1640
|
}
|
|
1641
1641
|
var P = {}, N = ["REJECTED"], $ = ["FULFILLED"], F = ["PENDING"];
|
|
1642
|
-
|
|
1643
|
-
function h(
|
|
1644
|
-
if (typeof
|
|
1642
|
+
b.exports = h;
|
|
1643
|
+
function h(w) {
|
|
1644
|
+
if (typeof w != "function")
|
|
1645
1645
|
throw new TypeError("resolver must be a function");
|
|
1646
|
-
this.state = F, this.queue = [], this.outcome = void 0,
|
|
1646
|
+
this.state = F, this.queue = [], this.outcome = void 0, w !== x && y(this, w);
|
|
1647
1647
|
}
|
|
1648
|
-
h.prototype.catch = function(
|
|
1649
|
-
return this.then(null,
|
|
1650
|
-
}, h.prototype.then = function(
|
|
1651
|
-
if (typeof
|
|
1648
|
+
h.prototype.catch = function(w) {
|
|
1649
|
+
return this.then(null, w);
|
|
1650
|
+
}, h.prototype.then = function(w, C) {
|
|
1651
|
+
if (typeof w != "function" && this.state === $ || typeof C != "function" && this.state === N)
|
|
1652
1652
|
return this;
|
|
1653
|
-
var I = new this.constructor(
|
|
1653
|
+
var I = new this.constructor(x);
|
|
1654
1654
|
if (this.state !== F) {
|
|
1655
|
-
var
|
|
1656
|
-
l(I,
|
|
1655
|
+
var _ = this.state === $ ? w : C;
|
|
1656
|
+
l(I, _, this.outcome);
|
|
1657
1657
|
} else
|
|
1658
|
-
this.queue.push(new m(I,
|
|
1658
|
+
this.queue.push(new m(I, w, C));
|
|
1659
1659
|
return I;
|
|
1660
1660
|
};
|
|
1661
|
-
function m(
|
|
1662
|
-
this.promise =
|
|
1661
|
+
function m(w, C, I) {
|
|
1662
|
+
this.promise = w, typeof C == "function" && (this.onFulfilled = C, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
|
|
1663
1663
|
}
|
|
1664
|
-
m.prototype.callFulfilled = function(
|
|
1665
|
-
P.resolve(this.promise,
|
|
1666
|
-
}, m.prototype.otherCallFulfilled = function(
|
|
1667
|
-
l(this.promise, this.onFulfilled,
|
|
1668
|
-
}, m.prototype.callRejected = function(
|
|
1669
|
-
P.reject(this.promise,
|
|
1670
|
-
}, m.prototype.otherCallRejected = function(
|
|
1671
|
-
l(this.promise, this.onRejected,
|
|
1664
|
+
m.prototype.callFulfilled = function(w) {
|
|
1665
|
+
P.resolve(this.promise, w);
|
|
1666
|
+
}, m.prototype.otherCallFulfilled = function(w) {
|
|
1667
|
+
l(this.promise, this.onFulfilled, w);
|
|
1668
|
+
}, m.prototype.callRejected = function(w) {
|
|
1669
|
+
P.reject(this.promise, w);
|
|
1670
|
+
}, m.prototype.otherCallRejected = function(w) {
|
|
1671
|
+
l(this.promise, this.onRejected, w);
|
|
1672
1672
|
};
|
|
1673
|
-
function l(
|
|
1673
|
+
function l(w, C, I) {
|
|
1674
1674
|
g(function() {
|
|
1675
|
-
var
|
|
1675
|
+
var _;
|
|
1676
1676
|
try {
|
|
1677
|
-
|
|
1677
|
+
_ = C(I);
|
|
1678
1678
|
} catch (s) {
|
|
1679
|
-
return P.reject(
|
|
1679
|
+
return P.reject(w, s);
|
|
1680
1680
|
}
|
|
1681
|
-
|
|
1681
|
+
_ === w ? P.reject(w, new TypeError("Cannot resolve promise with itself")) : P.resolve(w, _);
|
|
1682
1682
|
});
|
|
1683
1683
|
}
|
|
1684
|
-
P.resolve = function(
|
|
1685
|
-
var I =
|
|
1684
|
+
P.resolve = function(w, C) {
|
|
1685
|
+
var I = S(r, C);
|
|
1686
1686
|
if (I.status === "error")
|
|
1687
|
-
return P.reject(
|
|
1688
|
-
var
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1687
|
+
return P.reject(w, I.value);
|
|
1688
|
+
var _ = I.value;
|
|
1689
|
+
if (_)
|
|
1690
|
+
y(w, _);
|
|
1691
1691
|
else {
|
|
1692
|
-
|
|
1693
|
-
for (var s = -1, A =
|
|
1694
|
-
|
|
1692
|
+
w.state = $, w.outcome = C;
|
|
1693
|
+
for (var s = -1, A = w.queue.length; ++s < A; )
|
|
1694
|
+
w.queue[s].callFulfilled(C);
|
|
1695
1695
|
}
|
|
1696
|
-
return
|
|
1697
|
-
}, P.reject = function(
|
|
1698
|
-
|
|
1699
|
-
for (var I = -1,
|
|
1700
|
-
|
|
1701
|
-
return
|
|
1696
|
+
return w;
|
|
1697
|
+
}, P.reject = function(w, C) {
|
|
1698
|
+
w.state = N, w.outcome = C;
|
|
1699
|
+
for (var I = -1, _ = w.queue.length; ++I < _; )
|
|
1700
|
+
w.queue[I].callRejected(C);
|
|
1701
|
+
return w;
|
|
1702
1702
|
};
|
|
1703
|
-
function r(
|
|
1704
|
-
var C =
|
|
1705
|
-
if (
|
|
1703
|
+
function r(w) {
|
|
1704
|
+
var C = w && w.then;
|
|
1705
|
+
if (w && (typeof w == "object" || typeof w == "function") && typeof C == "function")
|
|
1706
1706
|
return function() {
|
|
1707
|
-
C.apply(
|
|
1707
|
+
C.apply(w, arguments);
|
|
1708
1708
|
};
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function y(w, C) {
|
|
1711
1711
|
var I = !1;
|
|
1712
|
-
function
|
|
1713
|
-
I || (I = !0, P.reject(
|
|
1712
|
+
function _(Q) {
|
|
1713
|
+
I || (I = !0, P.reject(w, Q));
|
|
1714
1714
|
}
|
|
1715
1715
|
function s(Q) {
|
|
1716
|
-
I || (I = !0, P.resolve(
|
|
1716
|
+
I || (I = !0, P.resolve(w, Q));
|
|
1717
1717
|
}
|
|
1718
1718
|
function A() {
|
|
1719
|
-
C(s,
|
|
1719
|
+
C(s, _);
|
|
1720
1720
|
}
|
|
1721
|
-
var K =
|
|
1722
|
-
K.status === "error" &&
|
|
1721
|
+
var K = S(A);
|
|
1722
|
+
K.status === "error" && _(K.value);
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function S(w, C) {
|
|
1725
1725
|
var I = {};
|
|
1726
1726
|
try {
|
|
1727
|
-
I.value =
|
|
1728
|
-
} catch (
|
|
1729
|
-
I.status = "error", I.value =
|
|
1727
|
+
I.value = w(C), I.status = "success";
|
|
1728
|
+
} catch (_) {
|
|
1729
|
+
I.status = "error", I.value = _;
|
|
1730
1730
|
}
|
|
1731
1731
|
return I;
|
|
1732
1732
|
}
|
|
1733
1733
|
h.resolve = c;
|
|
1734
|
-
function c(
|
|
1735
|
-
return
|
|
1734
|
+
function c(w) {
|
|
1735
|
+
return w instanceof this ? w : P.resolve(new this(x), w);
|
|
1736
1736
|
}
|
|
1737
|
-
h.reject =
|
|
1738
|
-
function
|
|
1739
|
-
var C = new this(
|
|
1740
|
-
return P.reject(C,
|
|
1737
|
+
h.reject = D;
|
|
1738
|
+
function D(w) {
|
|
1739
|
+
var C = new this(x);
|
|
1740
|
+
return P.reject(C, w);
|
|
1741
1741
|
}
|
|
1742
|
-
h.all =
|
|
1743
|
-
function w
|
|
1742
|
+
h.all = E;
|
|
1743
|
+
function E(w) {
|
|
1744
1744
|
var C = this;
|
|
1745
|
-
if (Object.prototype.toString.call(
|
|
1745
|
+
if (Object.prototype.toString.call(w) !== "[object Array]")
|
|
1746
1746
|
return this.reject(new TypeError("must be an array"));
|
|
1747
|
-
var I =
|
|
1747
|
+
var I = w.length, _ = !1;
|
|
1748
1748
|
if (!I)
|
|
1749
1749
|
return this.resolve([]);
|
|
1750
|
-
for (var s = new Array(I), A = 0, K = -1, Q = new this(
|
|
1751
|
-
re(
|
|
1750
|
+
for (var s = new Array(I), A = 0, K = -1, Q = new this(x); ++K < I; )
|
|
1751
|
+
re(w[K], K);
|
|
1752
1752
|
return Q;
|
|
1753
1753
|
function re(ie, we) {
|
|
1754
1754
|
C.resolve(ie).then(W, function(Y) {
|
|
1755
|
-
|
|
1755
|
+
_ || (_ = !0, P.reject(Q, Y));
|
|
1756
1756
|
});
|
|
1757
1757
|
function W(Y) {
|
|
1758
|
-
s[we] = Y, ++A === I && !
|
|
1758
|
+
s[we] = Y, ++A === I && !_ && (_ = !0, P.resolve(Q, s));
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
1762
|
h.race = M;
|
|
1763
|
-
function M(
|
|
1763
|
+
function M(w) {
|
|
1764
1764
|
var C = this;
|
|
1765
|
-
if (Object.prototype.toString.call(
|
|
1765
|
+
if (Object.prototype.toString.call(w) !== "[object Array]")
|
|
1766
1766
|
return this.reject(new TypeError("must be an array"));
|
|
1767
|
-
var I =
|
|
1767
|
+
var I = w.length, _ = !1;
|
|
1768
1768
|
if (!I)
|
|
1769
1769
|
return this.resolve([]);
|
|
1770
|
-
for (var s = -1, A = new this(
|
|
1771
|
-
K(
|
|
1770
|
+
for (var s = -1, A = new this(x); ++s < I; )
|
|
1771
|
+
K(w[s]);
|
|
1772
1772
|
return A;
|
|
1773
1773
|
function K(Q) {
|
|
1774
1774
|
C.resolve(Q).then(function(re) {
|
|
1775
|
-
|
|
1775
|
+
_ || (_ = !0, P.resolve(A, re));
|
|
1776
1776
|
}, function(re) {
|
|
1777
|
-
|
|
1777
|
+
_ || (_ = !0, P.reject(A, re));
|
|
1778
1778
|
});
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
}, { 1: 1 }], 3: [function(u,
|
|
1781
|
+
}, { 1: 1 }], 3: [function(u, b, o) {
|
|
1782
1782
|
(function(g) {
|
|
1783
1783
|
typeof g.Promise != "function" && (g.Promise = u(2));
|
|
1784
1784
|
}).call(this, typeof je < "u" ? je : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1785
|
-
}, { 2: 2 }], 4: [function(u,
|
|
1785
|
+
}, { 2: 2 }], 4: [function(u, b, o) {
|
|
1786
1786
|
var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1787
1787
|
return typeof n;
|
|
1788
1788
|
} : function(n) {
|
|
1789
1789
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1790
1790
|
};
|
|
1791
|
-
function
|
|
1791
|
+
function x(n, i) {
|
|
1792
1792
|
if (!(n instanceof i))
|
|
1793
1793
|
throw new TypeError("Cannot call a class as a function");
|
|
1794
1794
|
}
|
|
@@ -1850,11 +1850,11 @@ var at = { exports: {} };
|
|
|
1850
1850
|
function r(n) {
|
|
1851
1851
|
return typeof n != "string" && (console.warn(n + " used as a key, but it is not a string."), n = String(n)), n;
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function y() {
|
|
1854
1854
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
1855
1855
|
return arguments[arguments.length - 1];
|
|
1856
1856
|
}
|
|
1857
|
-
var
|
|
1857
|
+
var S = "local-forage-detect-blob-support", c = void 0, D = {}, E = Object.prototype.toString, M = "readonly", w = "readwrite";
|
|
1858
1858
|
function C(n) {
|
|
1859
1859
|
for (var i = n.length, a = new ArrayBuffer(i), d = new Uint8Array(a), v = 0; v < i; v++)
|
|
1860
1860
|
d[v] = n.charCodeAt(v);
|
|
@@ -1862,8 +1862,8 @@ var at = { exports: {} };
|
|
|
1862
1862
|
}
|
|
1863
1863
|
function I(n) {
|
|
1864
1864
|
return new h(function(i) {
|
|
1865
|
-
var a = n.transaction(
|
|
1866
|
-
a.objectStore(
|
|
1865
|
+
var a = n.transaction(S, w), d = F([""]);
|
|
1866
|
+
a.objectStore(S).put(d, "key"), a.onabort = function(v) {
|
|
1867
1867
|
v.preventDefault(), v.stopPropagation(), i(!1);
|
|
1868
1868
|
}, a.oncomplete = function() {
|
|
1869
1869
|
var v = navigator.userAgent.match(/Chrome\/(\d+)/), f = navigator.userAgent.match(/Edge\//);
|
|
@@ -1873,13 +1873,13 @@ var at = { exports: {} };
|
|
|
1873
1873
|
return !1;
|
|
1874
1874
|
});
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1876
|
+
function _(n) {
|
|
1877
1877
|
return typeof c == "boolean" ? h.resolve(c) : I(n).then(function(i) {
|
|
1878
1878
|
return c = i, c;
|
|
1879
1879
|
});
|
|
1880
1880
|
}
|
|
1881
1881
|
function s(n) {
|
|
1882
|
-
var i =
|
|
1882
|
+
var i = D[n.name], a = {};
|
|
1883
1883
|
a.promise = new h(function(d, v) {
|
|
1884
1884
|
a.resolve = d, a.reject = v;
|
|
1885
1885
|
}), i.deferredOperations.push(a), i.dbReady ? i.dbReady = i.dbReady.then(function() {
|
|
@@ -1887,18 +1887,18 @@ var at = { exports: {} };
|
|
|
1887
1887
|
}) : i.dbReady = a.promise;
|
|
1888
1888
|
}
|
|
1889
1889
|
function A(n) {
|
|
1890
|
-
var i =
|
|
1890
|
+
var i = D[n.name], a = i.deferredOperations.pop();
|
|
1891
1891
|
if (a)
|
|
1892
1892
|
return a.resolve(), a.promise;
|
|
1893
1893
|
}
|
|
1894
1894
|
function K(n, i) {
|
|
1895
|
-
var a =
|
|
1895
|
+
var a = D[n.name], d = a.deferredOperations.pop();
|
|
1896
1896
|
if (d)
|
|
1897
1897
|
return d.reject(i), d.promise;
|
|
1898
1898
|
}
|
|
1899
1899
|
function Q(n, i) {
|
|
1900
1900
|
return new h(function(a, d) {
|
|
1901
|
-
if (
|
|
1901
|
+
if (D[n.name] = D[n.name] || ne(), n.db)
|
|
1902
1902
|
if (i)
|
|
1903
1903
|
s(n), n.db.close();
|
|
1904
1904
|
else
|
|
@@ -1909,7 +1909,7 @@ var at = { exports: {} };
|
|
|
1909
1909
|
i && (f.onupgradeneeded = function(T) {
|
|
1910
1910
|
var L = f.result;
|
|
1911
1911
|
try {
|
|
1912
|
-
L.createObjectStore(n.storeName), T.oldVersion <= 1 && L.createObjectStore(
|
|
1912
|
+
L.createObjectStore(n.storeName), T.oldVersion <= 1 && L.createObjectStore(S);
|
|
1913
1913
|
} catch (U) {
|
|
1914
1914
|
if (U.name === "ConstraintError")
|
|
1915
1915
|
console.warn('The database "' + n.name + '" has been upgraded from version ' + T.oldVersion + " to version " + T.newVersion + ', but the storage "' + n.storeName + '" already exists.');
|
|
@@ -1967,7 +1967,7 @@ var at = { exports: {} };
|
|
|
1967
1967
|
}
|
|
1968
1968
|
function ae(n) {
|
|
1969
1969
|
var i = this, a = i._initReady().then(function() {
|
|
1970
|
-
var d =
|
|
1970
|
+
var d = D[i._dbInfo.name];
|
|
1971
1971
|
if (d && d.dbReady)
|
|
1972
1972
|
return d.dbReady;
|
|
1973
1973
|
});
|
|
@@ -1975,7 +1975,7 @@ var at = { exports: {} };
|
|
|
1975
1975
|
}
|
|
1976
1976
|
function G(n) {
|
|
1977
1977
|
s(n);
|
|
1978
|
-
for (var i =
|
|
1978
|
+
for (var i = D[n.name], a = i.forages, d = 0; d < a.length; d++) {
|
|
1979
1979
|
var v = a[d];
|
|
1980
1980
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
1981
1981
|
}
|
|
@@ -2026,8 +2026,8 @@ var at = { exports: {} };
|
|
|
2026
2026
|
if (n)
|
|
2027
2027
|
for (var d in n)
|
|
2028
2028
|
a[d] = n[d];
|
|
2029
|
-
var v =
|
|
2030
|
-
v || (v = ne(),
|
|
2029
|
+
var v = D[a.name];
|
|
2030
|
+
v || (v = ne(), D[a.name] = v), v.forages.push(i), i._initReady || (i._initReady = i.ready, i.ready = ae);
|
|
2031
2031
|
var f = [];
|
|
2032
2032
|
function T() {
|
|
2033
2033
|
return h.resolve();
|
|
@@ -2107,11 +2107,11 @@ var at = { exports: {} };
|
|
|
2107
2107
|
var v = new h(function(f, T) {
|
|
2108
2108
|
var L;
|
|
2109
2109
|
d.ready().then(function() {
|
|
2110
|
-
return L = d._dbInfo,
|
|
2110
|
+
return L = d._dbInfo, E.call(i) === "[object Blob]" ? _(L.db).then(function(U) {
|
|
2111
2111
|
return U ? i : W(i);
|
|
2112
2112
|
}) : i;
|
|
2113
2113
|
}).then(function(U) {
|
|
2114
|
-
X(d._dbInfo,
|
|
2114
|
+
X(d._dbInfo, w, function(B, k) {
|
|
2115
2115
|
if (B)
|
|
2116
2116
|
return T(B);
|
|
2117
2117
|
try {
|
|
@@ -2137,7 +2137,7 @@ var at = { exports: {} };
|
|
|
2137
2137
|
n = r(n);
|
|
2138
2138
|
var d = new h(function(v, f) {
|
|
2139
2139
|
a.ready().then(function() {
|
|
2140
|
-
X(a._dbInfo,
|
|
2140
|
+
X(a._dbInfo, w, function(T, L) {
|
|
2141
2141
|
if (T)
|
|
2142
2142
|
return f(T);
|
|
2143
2143
|
try {
|
|
@@ -2161,7 +2161,7 @@ var at = { exports: {} };
|
|
|
2161
2161
|
function pe(n) {
|
|
2162
2162
|
var i = this, a = new h(function(d, v) {
|
|
2163
2163
|
i.ready().then(function() {
|
|
2164
|
-
X(i._dbInfo,
|
|
2164
|
+
X(i._dbInfo, w, function(f, T) {
|
|
2165
2165
|
if (f)
|
|
2166
2166
|
return v(f);
|
|
2167
2167
|
try {
|
|
@@ -2258,7 +2258,7 @@ var at = { exports: {} };
|
|
|
2258
2258
|
return m(a, n), a;
|
|
2259
2259
|
}
|
|
2260
2260
|
function tr(n, i) {
|
|
2261
|
-
i =
|
|
2261
|
+
i = y.apply(this, arguments);
|
|
2262
2262
|
var a = this.config();
|
|
2263
2263
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
2264
2264
|
var d = this, v;
|
|
@@ -2266,7 +2266,7 @@ var at = { exports: {} };
|
|
|
2266
2266
|
v = h.reject("Invalid arguments");
|
|
2267
2267
|
else {
|
|
2268
2268
|
var f = n.name === a.name && d._dbInfo.db, T = f ? h.resolve(d._dbInfo.db) : re(n).then(function(L) {
|
|
2269
|
-
var U =
|
|
2269
|
+
var U = D[n.name], B = U.forages;
|
|
2270
2270
|
U.db = L;
|
|
2271
2271
|
for (var k = 0; k < B.length; k++)
|
|
2272
2272
|
B[k]._dbInfo.db = L;
|
|
@@ -2276,7 +2276,7 @@ var at = { exports: {} };
|
|
|
2276
2276
|
if (L.objectStoreNames.contains(n.storeName)) {
|
|
2277
2277
|
var U = L.version + 1;
|
|
2278
2278
|
s(n);
|
|
2279
|
-
var B =
|
|
2279
|
+
var B = D[n.name], k = B.forages;
|
|
2280
2280
|
L.close();
|
|
2281
2281
|
for (var q = 0; q < k.length; q++) {
|
|
2282
2282
|
var Z = k[q];
|
|
@@ -2308,7 +2308,7 @@ var at = { exports: {} };
|
|
|
2308
2308
|
}
|
|
2309
2309
|
}) : v = T.then(function(L) {
|
|
2310
2310
|
s(n);
|
|
2311
|
-
var U =
|
|
2311
|
+
var U = D[n.name], B = U.forages;
|
|
2312
2312
|
L.close();
|
|
2313
2313
|
for (var k = 0; k < B.length; k++) {
|
|
2314
2314
|
var q = B[k];
|
|
@@ -2638,7 +2638,7 @@ var at = { exports: {} };
|
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
2640
|
function wt(n, i) {
|
|
2641
|
-
i =
|
|
2641
|
+
i = y.apply(this, arguments);
|
|
2642
2642
|
var a = this.config();
|
|
2643
2643
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
2644
2644
|
var d = this, v;
|
|
@@ -2808,7 +2808,7 @@ var at = { exports: {} };
|
|
|
2808
2808
|
return m(v, a), v;
|
|
2809
2809
|
}
|
|
2810
2810
|
function Nt(n, i) {
|
|
2811
|
-
if (i =
|
|
2811
|
+
if (i = y.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
|
|
2812
2812
|
var a = this.config();
|
|
2813
2813
|
n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
|
|
2814
2814
|
}
|
|
@@ -2879,7 +2879,7 @@ var at = { exports: {} };
|
|
|
2879
2879
|
}
|
|
2880
2880
|
var Gt = function() {
|
|
2881
2881
|
function n(i) {
|
|
2882
|
-
|
|
2882
|
+
x(this, n);
|
|
2883
2883
|
for (var a in Be)
|
|
2884
2884
|
if (Be.hasOwnProperty(a)) {
|
|
2885
2885
|
var d = Be[a], v = d._driver;
|
|
@@ -3004,7 +3004,7 @@ var at = { exports: {} };
|
|
|
3004
3004
|
return new n(a);
|
|
3005
3005
|
}, n;
|
|
3006
3006
|
}(), Wt = new Gt();
|
|
3007
|
-
|
|
3007
|
+
b.exports = Wt;
|
|
3008
3008
|
}, { 3: 3 }] }, {}, [4])(4);
|
|
3009
3009
|
});
|
|
3010
3010
|
})(at);
|
|
@@ -3031,14 +3031,14 @@ function Sa() {
|
|
|
3031
3031
|
async function u(o) {
|
|
3032
3032
|
return await me().removeItem(o);
|
|
3033
3033
|
}
|
|
3034
|
-
async function
|
|
3034
|
+
async function b(o, g) {
|
|
3035
3035
|
await me().setItem(g, o);
|
|
3036
3036
|
}
|
|
3037
3037
|
return {
|
|
3038
3038
|
clearAsync: e,
|
|
3039
3039
|
getAsync: t,
|
|
3040
3040
|
removeAsync: u,
|
|
3041
|
-
saveAsync:
|
|
3041
|
+
saveAsync: b
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
3044
|
let Oe;
|
|
@@ -3086,156 +3086,155 @@ const Ln = (e) => {
|
|
|
3086
3086
|
function Nn(e) {
|
|
3087
3087
|
return Xr(e.storeName, () => {
|
|
3088
3088
|
var l;
|
|
3089
|
-
const t = de.utc().toSeconds() / 86400, u = z({}),
|
|
3090
|
-
function
|
|
3091
|
-
var
|
|
3092
|
-
return `${e.storeName ?? "base"}_${((
|
|
3089
|
+
const t = de.utc().toSeconds() / 86400, u = z({}), b = z({}), o = e.storageMode == "local-cache", g = e.buildUrl ?? ((l = e.api) == null ? void 0 : l.buildUrl) ?? Ln;
|
|
3090
|
+
function x(r) {
|
|
3091
|
+
var y, S;
|
|
3092
|
+
return `${e.storeName ?? "base"}_${((y = e.auth) == null ? void 0 : y.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((S = r.data) == null ? void 0 : S.id) ?? "no-item-id"}_${r.finalUrl}`;
|
|
3093
3093
|
}
|
|
3094
3094
|
async function P(r) {
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
if (!c && u.value[y] !== void 0)
|
|
3095
|
+
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
3096
|
+
const y = x(r), S = r.refresh;
|
|
3097
|
+
if (!S && u.value[y] !== void 0)
|
|
3099
3098
|
return u.value[y] ?? null;
|
|
3100
|
-
if (!
|
|
3101
|
-
const
|
|
3102
|
-
if (
|
|
3103
|
-
return u.value[y] =
|
|
3099
|
+
if (!S && o == !0) {
|
|
3100
|
+
const c = await me().getItem(y);
|
|
3101
|
+
if (c != null && (e.api == null || parseFloat(c.meta.storedOn) > t - 7))
|
|
3102
|
+
return u.value[y] = c, c;
|
|
3104
3103
|
}
|
|
3105
3104
|
if (e.api == null)
|
|
3106
3105
|
return u.value[y];
|
|
3107
3106
|
try {
|
|
3108
|
-
let
|
|
3109
|
-
|
|
3110
|
-
var
|
|
3107
|
+
let c = b.value[y];
|
|
3108
|
+
c == null && (c = new Promise(async (E, M) => {
|
|
3109
|
+
var w;
|
|
3111
3110
|
try {
|
|
3112
|
-
let
|
|
3111
|
+
let C = await ((w = e.api) == null ? void 0 : w.getAll(r));
|
|
3113
3112
|
o == !0 && await me().setItem(y, {
|
|
3114
3113
|
meta: { storedOn: t },
|
|
3115
|
-
...
|
|
3116
|
-
}),
|
|
3117
|
-
} catch (
|
|
3118
|
-
C
|
|
3114
|
+
...C
|
|
3115
|
+
}), E(C);
|
|
3116
|
+
} catch (C) {
|
|
3117
|
+
M(C);
|
|
3119
3118
|
} finally {
|
|
3120
|
-
delete
|
|
3119
|
+
delete b.value[y];
|
|
3121
3120
|
}
|
|
3122
|
-
}),
|
|
3123
|
-
const
|
|
3124
|
-
return u.value[y] =
|
|
3125
|
-
} catch (
|
|
3126
|
-
let
|
|
3127
|
-
throw new Error(
|
|
3121
|
+
}), b.value[y] = c);
|
|
3122
|
+
const D = await c;
|
|
3123
|
+
return u.value[y] = D, D;
|
|
3124
|
+
} catch (c) {
|
|
3125
|
+
let D = c;
|
|
3126
|
+
throw new Error(D.message ?? "Problem");
|
|
3128
3127
|
}
|
|
3129
3128
|
}
|
|
3130
3129
|
async function N(r) {
|
|
3131
|
-
r.additionalUrl ?? (r.additionalUrl = "/get");
|
|
3132
|
-
const
|
|
3133
|
-
if (!
|
|
3134
|
-
return u.value[
|
|
3135
|
-
if (!
|
|
3136
|
-
const c = await me().getItem(
|
|
3130
|
+
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
3131
|
+
const y = x(r), S = r.refresh;
|
|
3132
|
+
if (!S && u.value[y] !== void 0)
|
|
3133
|
+
return u.value[y] ?? [];
|
|
3134
|
+
if (!S && o == !0) {
|
|
3135
|
+
const c = await me().getItem(y);
|
|
3137
3136
|
if (c != null && (e.api == null || parseFloat(c.meta.storedOn) > t - 7))
|
|
3138
|
-
return u.value[
|
|
3137
|
+
return u.value[y] = c, c;
|
|
3139
3138
|
}
|
|
3140
3139
|
if (e.api == null)
|
|
3141
|
-
return u.value[
|
|
3140
|
+
return u.value[y];
|
|
3142
3141
|
try {
|
|
3143
|
-
let c =
|
|
3144
|
-
c == null && (c = new Promise(async (
|
|
3145
|
-
var
|
|
3142
|
+
let c = b.value[y];
|
|
3143
|
+
c == null && (c = new Promise(async (E, M) => {
|
|
3144
|
+
var w;
|
|
3146
3145
|
try {
|
|
3147
|
-
let C = await ((
|
|
3148
|
-
o == !0 && await me().setItem(
|
|
3146
|
+
let C = await ((w = e.api) == null ? void 0 : w.get(r));
|
|
3147
|
+
o == !0 && await me().setItem(y, {
|
|
3149
3148
|
meta: { storedOn: t },
|
|
3150
3149
|
...C
|
|
3151
|
-
}),
|
|
3150
|
+
}), E(C);
|
|
3152
3151
|
} catch (C) {
|
|
3153
3152
|
M(C);
|
|
3154
3153
|
} finally {
|
|
3155
|
-
delete
|
|
3154
|
+
delete b.value[y];
|
|
3156
3155
|
}
|
|
3157
|
-
}),
|
|
3158
|
-
const
|
|
3159
|
-
return u.value[
|
|
3156
|
+
}), b.value[y] = c);
|
|
3157
|
+
const D = await c;
|
|
3158
|
+
return u.value[y] = D, D;
|
|
3160
3159
|
} catch (c) {
|
|
3161
|
-
let
|
|
3162
|
-
throw new Error(
|
|
3160
|
+
let D = c;
|
|
3161
|
+
throw new Error(D.message ?? "Problem");
|
|
3163
3162
|
}
|
|
3164
3163
|
}
|
|
3165
3164
|
async function $(r) {
|
|
3166
|
-
r.additionalUrl ?? (r.additionalUrl = "/patch");
|
|
3167
|
-
const
|
|
3168
|
-
let
|
|
3165
|
+
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
3166
|
+
const y = x(r);
|
|
3167
|
+
let S;
|
|
3169
3168
|
if (e.api != null)
|
|
3170
3169
|
try {
|
|
3171
3170
|
let c = await e.api.patch(r);
|
|
3172
|
-
|
|
3171
|
+
S = c == null ? void 0 : c.data;
|
|
3173
3172
|
} catch (c) {
|
|
3174
|
-
let
|
|
3175
|
-
throw new Error(
|
|
3173
|
+
let D = c;
|
|
3174
|
+
throw new Error(D.message ?? "Patch Problem");
|
|
3176
3175
|
}
|
|
3177
3176
|
else
|
|
3178
|
-
|
|
3179
|
-
if (
|
|
3180
|
-
const c = u.value[
|
|
3181
|
-
c != null && (c.data = { ...c.data, ...
|
|
3177
|
+
S = r.data;
|
|
3178
|
+
if (S != null) {
|
|
3179
|
+
const c = u.value[y];
|
|
3180
|
+
c != null && (c.data = { ...c.data, ...S }, o == !0 && await me().setItem(y, {
|
|
3182
3181
|
meta: { storedOn: t },
|
|
3183
3182
|
...c
|
|
3184
|
-
})),
|
|
3185
|
-
let M =
|
|
3183
|
+
})), S.id != null && S.rowVersion != null && Object.entries(u.value).forEach((E) => {
|
|
3184
|
+
let M = E[1];
|
|
3186
3185
|
if (M = M.data, M != null)
|
|
3187
3186
|
if (Array.isArray(M))
|
|
3188
|
-
for (let
|
|
3189
|
-
const C = M[
|
|
3190
|
-
C.id ==
|
|
3187
|
+
for (let w = 0; w < M.length; w++) {
|
|
3188
|
+
const C = M[w];
|
|
3189
|
+
C.id == S.id && M.splice(w, 1, { ...C, ...S });
|
|
3191
3190
|
}
|
|
3192
3191
|
else
|
|
3193
|
-
M.id ==
|
|
3192
|
+
M.id == S.id && (u.value[E[0]].data = { ...M, ...S });
|
|
3194
3193
|
});
|
|
3195
3194
|
}
|
|
3196
|
-
return
|
|
3195
|
+
return S;
|
|
3197
3196
|
}
|
|
3198
3197
|
async function F(r) {
|
|
3199
|
-
r.additionalUrl ?? (r.additionalUrl = "/post");
|
|
3200
|
-
const
|
|
3201
|
-
let
|
|
3198
|
+
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
3199
|
+
const y = x(r);
|
|
3200
|
+
let S;
|
|
3202
3201
|
if (e.api != null)
|
|
3203
3202
|
try {
|
|
3204
3203
|
let c = await e.api.post(r);
|
|
3205
|
-
|
|
3204
|
+
S = c == null ? void 0 : c.data;
|
|
3206
3205
|
} catch (c) {
|
|
3207
|
-
let
|
|
3208
|
-
throw new Error(
|
|
3206
|
+
let D = c;
|
|
3207
|
+
throw new Error(D.message ?? "Patch Problem");
|
|
3209
3208
|
}
|
|
3210
3209
|
else
|
|
3211
|
-
|
|
3212
|
-
return u.value[
|
|
3210
|
+
S = r.data;
|
|
3211
|
+
return u.value[y] = {
|
|
3213
3212
|
meta: { storedOn: t },
|
|
3214
|
-
data:
|
|
3215
|
-
}, o == !0 && await me().setItem(
|
|
3213
|
+
data: S
|
|
3214
|
+
}, o == !0 && await me().setItem(y, u.value[y]), S;
|
|
3216
3215
|
}
|
|
3217
3216
|
async function h(r) {
|
|
3218
|
-
r.additionalUrl ?? (r.additionalUrl = "/delete");
|
|
3219
|
-
const
|
|
3217
|
+
r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
|
|
3218
|
+
const y = x(r);
|
|
3220
3219
|
if (e.api != null)
|
|
3221
3220
|
try {
|
|
3222
|
-
let
|
|
3223
|
-
if (
|
|
3224
|
-
return
|
|
3225
|
-
} catch (
|
|
3226
|
-
let c =
|
|
3221
|
+
let S = await e.api.deleteItem(r);
|
|
3222
|
+
if (S != null)
|
|
3223
|
+
return S;
|
|
3224
|
+
} catch (S) {
|
|
3225
|
+
let c = S;
|
|
3227
3226
|
throw new Error(c.message ?? "Patch Problem");
|
|
3228
3227
|
}
|
|
3229
|
-
delete u.value[
|
|
3228
|
+
delete u.value[y], o == !0 && await me().removeItem(y);
|
|
3230
3229
|
}
|
|
3231
3230
|
async function m(r) {
|
|
3232
3231
|
if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
|
|
3233
3232
|
try {
|
|
3234
|
-
let
|
|
3235
|
-
return
|
|
3236
|
-
} catch (
|
|
3237
|
-
let
|
|
3238
|
-
throw new Error(
|
|
3233
|
+
let y = await e.api.patch(r);
|
|
3234
|
+
return y == null ? void 0 : y.data;
|
|
3235
|
+
} catch (y) {
|
|
3236
|
+
let S = y;
|
|
3237
|
+
throw new Error(S.message ?? "Patch Problem");
|
|
3239
3238
|
}
|
|
3240
3239
|
}
|
|
3241
3240
|
return {
|
|
@@ -3252,7 +3251,7 @@ function Nn(e) {
|
|
|
3252
3251
|
}
|
|
3253
3252
|
function Wr(e) {
|
|
3254
3253
|
return Xr(e.storeName, () => {
|
|
3255
|
-
const t = z(), u = z(0),
|
|
3254
|
+
const t = z(), u = z(0), b = de.utc().toSeconds() / 3600, o = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
|
|
3256
3255
|
function N() {
|
|
3257
3256
|
var c;
|
|
3258
3257
|
return `${e.storeName}_${((c = e.auth) == null ? void 0 : c.credentials.value.userID) ?? "no-user-id"}`;
|
|
@@ -3266,46 +3265,46 @@ function Wr(e) {
|
|
|
3266
3265
|
});
|
|
3267
3266
|
}
|
|
3268
3267
|
function F(c) {
|
|
3269
|
-
const
|
|
3270
|
-
return
|
|
3271
|
-
var
|
|
3268
|
+
const D = N();
|
|
3269
|
+
return x.value[D] || (x.value[D] = new Promise(async (E, M) => {
|
|
3270
|
+
var w, C;
|
|
3272
3271
|
try {
|
|
3273
3272
|
let I = await ((C = e.api) == null ? void 0 : C.getAll({
|
|
3274
3273
|
additionalUrl: "/getAll",
|
|
3275
3274
|
nav: c.nav,
|
|
3276
3275
|
params: {
|
|
3277
|
-
lastUpdate: ((
|
|
3276
|
+
lastUpdate: ((w = g.value) == null ? void 0 : w.lastUpdate) ?? an()
|
|
3278
3277
|
}
|
|
3279
3278
|
}));
|
|
3280
|
-
I == null ? M(I) : (t.value ?? (t.value = []), I.data.forEach((
|
|
3279
|
+
I == null ? M(I) : (t.value ?? (t.value = []), I.data.forEach((_) => {
|
|
3281
3280
|
var A, K;
|
|
3282
|
-
const s = t.value.findIndex((Q) => Q.id ==
|
|
3283
|
-
s >= 0 ? (A = t.value) == null || A.splice(s, 1,
|
|
3281
|
+
const s = t.value.findIndex((Q) => Q.id == _.id);
|
|
3282
|
+
s >= 0 ? (A = t.value) == null || A.splice(s, 1, _) : (K = t.value) == null || K.push(_);
|
|
3284
3283
|
}), u.value = t.value.length, g.value = {
|
|
3285
3284
|
lastUpdate: de.utc().toString(),
|
|
3286
|
-
storedOn:
|
|
3287
|
-
}, await $(),
|
|
3285
|
+
storedOn: b.toString()
|
|
3286
|
+
}, await $(), E(I));
|
|
3288
3287
|
} catch (I) {
|
|
3289
3288
|
M(I);
|
|
3290
3289
|
} finally {
|
|
3291
|
-
delete
|
|
3290
|
+
delete x.value[D];
|
|
3292
3291
|
}
|
|
3293
|
-
})),
|
|
3292
|
+
})), x.value[D];
|
|
3294
3293
|
}
|
|
3295
3294
|
async function h(c) {
|
|
3296
|
-
var M,
|
|
3297
|
-
const
|
|
3298
|
-
if (!
|
|
3295
|
+
var M, w, C;
|
|
3296
|
+
const D = N(), E = c.refresh;
|
|
3297
|
+
if (!E && t.value != null)
|
|
3299
3298
|
return {
|
|
3300
3299
|
count: (M = t.value) == null ? void 0 : M.length,
|
|
3301
3300
|
data: t.value,
|
|
3302
3301
|
filters: []
|
|
3303
3302
|
};
|
|
3304
|
-
if (!
|
|
3305
|
-
const I = await me().getItem(
|
|
3306
|
-
if (I != null && parseFloat(I.meta.storedOn) >
|
|
3303
|
+
if (!E && P == !0) {
|
|
3304
|
+
const I = await me().getItem(D);
|
|
3305
|
+
if (I != null && parseFloat(I.meta.storedOn) > b - 12)
|
|
3307
3306
|
return t.value = I.data, u.value = I.data.length, o.value = I.filters ?? [], g.value = I.meta, {
|
|
3308
|
-
count: (
|
|
3307
|
+
count: (w = t.value) == null ? void 0 : w.length,
|
|
3309
3308
|
data: t.value,
|
|
3310
3309
|
filters: []
|
|
3311
3310
|
};
|
|
@@ -3320,25 +3319,25 @@ function Wr(e) {
|
|
|
3320
3319
|
try {
|
|
3321
3320
|
return await F(c);
|
|
3322
3321
|
} catch (I) {
|
|
3323
|
-
let
|
|
3324
|
-
throw new Error(
|
|
3322
|
+
let _ = I;
|
|
3323
|
+
throw new Error(_.message ?? "Problem");
|
|
3325
3324
|
}
|
|
3326
3325
|
}
|
|
3327
3326
|
async function m(c) {
|
|
3328
|
-
var
|
|
3329
|
-
const
|
|
3330
|
-
if (
|
|
3327
|
+
var w, C, I;
|
|
3328
|
+
const D = N(), E = c.id ?? ((w = c.data) == null ? void 0 : w.id);
|
|
3329
|
+
if (E == null)
|
|
3331
3330
|
throw new Error("no id provided");
|
|
3332
3331
|
let M = c.refresh;
|
|
3333
3332
|
if (!M && t.value != null) {
|
|
3334
|
-
const
|
|
3335
|
-
if (
|
|
3336
|
-
return { data:
|
|
3333
|
+
const _ = t.value.find((s) => s.id == E);
|
|
3334
|
+
if (_ != null)
|
|
3335
|
+
return { data: _ };
|
|
3337
3336
|
}
|
|
3338
3337
|
if (!M && P == !0) {
|
|
3339
|
-
const
|
|
3340
|
-
if (
|
|
3341
|
-
t.value =
|
|
3338
|
+
const _ = await me().getItem(D);
|
|
3339
|
+
if (_ != null && parseFloat(_.meta.storedOn) > b - 12) {
|
|
3340
|
+
t.value = _.data, u.value = _.data.length, o.value = _.filters ?? [], g.value = _.meta;
|
|
3342
3341
|
let s = t.value.find((A) => A.id == c.id);
|
|
3343
3342
|
if (s != null)
|
|
3344
3343
|
return { data: s };
|
|
@@ -3346,100 +3345,100 @@ function Wr(e) {
|
|
|
3346
3345
|
}
|
|
3347
3346
|
if (e.api == null)
|
|
3348
3347
|
return {
|
|
3349
|
-
data: (C = t.value) == null ? void 0 : C.find((
|
|
3348
|
+
data: (C = t.value) == null ? void 0 : C.find((_) => _.id == c.id)
|
|
3350
3349
|
};
|
|
3351
3350
|
t.value ?? (t.value = []);
|
|
3352
3351
|
try {
|
|
3353
|
-
return await F(c), { data: (I = t.value) == null ? void 0 : I.find((
|
|
3354
|
-
} catch (
|
|
3355
|
-
let s =
|
|
3352
|
+
return await F(c), { data: (I = t.value) == null ? void 0 : I.find((_) => _.id == c.id) };
|
|
3353
|
+
} catch (_) {
|
|
3354
|
+
let s = _;
|
|
3356
3355
|
throw new Error(s.message ?? "Problem");
|
|
3357
3356
|
}
|
|
3358
3357
|
}
|
|
3359
3358
|
async function l(c) {
|
|
3360
|
-
var
|
|
3359
|
+
var E, M, w;
|
|
3361
3360
|
c.additionalUrl ?? (c.additionalUrl = "/patch");
|
|
3362
|
-
let
|
|
3361
|
+
let D;
|
|
3363
3362
|
if (e.api != null)
|
|
3364
3363
|
try {
|
|
3365
3364
|
let C = await e.api.patch(c);
|
|
3366
|
-
|
|
3365
|
+
D = { ...c.data, ...C == null ? void 0 : C.data };
|
|
3367
3366
|
} catch (C) {
|
|
3368
3367
|
let I = C;
|
|
3369
3368
|
throw new Error(I.message ?? "Patch Problem");
|
|
3370
3369
|
}
|
|
3371
3370
|
else
|
|
3372
|
-
|
|
3373
|
-
if (
|
|
3374
|
-
let C = (
|
|
3375
|
-
C != null && C >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(C, 1,
|
|
3371
|
+
D = c.data;
|
|
3372
|
+
if (D != null) {
|
|
3373
|
+
let C = (E = t.value) == null ? void 0 : E.findIndex((I) => I.id == D.id);
|
|
3374
|
+
C != null && C >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(C, 1, D), await $());
|
|
3376
3375
|
}
|
|
3377
|
-
return (
|
|
3376
|
+
return (w = t.value) == null ? void 0 : w.find((C) => C.id == (c.id ?? c.data.id));
|
|
3378
3377
|
}
|
|
3379
3378
|
async function r(c) {
|
|
3380
|
-
var
|
|
3379
|
+
var E, M;
|
|
3381
3380
|
c.additionalUrl ?? (c.additionalUrl = "/post");
|
|
3382
|
-
let
|
|
3381
|
+
let D;
|
|
3383
3382
|
if (e.api != null)
|
|
3384
3383
|
try {
|
|
3385
|
-
let
|
|
3386
|
-
|
|
3387
|
-
} catch (
|
|
3388
|
-
let C =
|
|
3384
|
+
let w = await e.api.post(c);
|
|
3385
|
+
D = w == null ? void 0 : w.data;
|
|
3386
|
+
} catch (w) {
|
|
3387
|
+
let C = w;
|
|
3389
3388
|
throw new Error(C.message ?? "Patch Problem");
|
|
3390
3389
|
}
|
|
3391
3390
|
else
|
|
3392
|
-
|
|
3393
|
-
return
|
|
3391
|
+
D = c.data;
|
|
3392
|
+
return D != null && (t.value ?? (t.value = []), (E = t.value) == null || E.unshift(D), u.value += 1, await $()), (M = t.value) == null ? void 0 : M.find((w) => w.id == (c.id ?? c.data.id));
|
|
3394
3393
|
}
|
|
3395
|
-
async function
|
|
3396
|
-
var
|
|
3394
|
+
async function y(c) {
|
|
3395
|
+
var E, M;
|
|
3397
3396
|
if (c.additionalUrl ?? (c.additionalUrl = "/delete"), e.api != null)
|
|
3398
3397
|
try {
|
|
3399
|
-
let
|
|
3400
|
-
if (
|
|
3401
|
-
return
|
|
3402
|
-
} catch (
|
|
3403
|
-
let C =
|
|
3398
|
+
let w = await e.api.deleteItem(c);
|
|
3399
|
+
if (w != null)
|
|
3400
|
+
return w;
|
|
3401
|
+
} catch (w) {
|
|
3402
|
+
let C = w;
|
|
3404
3403
|
throw new Error(C.message ?? "Patch Problem");
|
|
3405
3404
|
}
|
|
3406
|
-
const
|
|
3407
|
-
if (
|
|
3408
|
-
let
|
|
3409
|
-
|
|
3405
|
+
const D = c.id ?? c.data.id;
|
|
3406
|
+
if (D != null) {
|
|
3407
|
+
let w = (E = t.value) == null ? void 0 : E.findIndex((C) => C.id == D);
|
|
3408
|
+
w != null && w >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(w, 1), await $());
|
|
3410
3409
|
}
|
|
3411
3410
|
}
|
|
3412
|
-
async function
|
|
3413
|
-
var
|
|
3411
|
+
async function S(c) {
|
|
3412
|
+
var D;
|
|
3414
3413
|
if (c.additionalUrl ?? (c.additionalUrl = `/patch/restore?id=${c.data.id}`), e.api != null)
|
|
3415
3414
|
try {
|
|
3416
3415
|
await e.api.patch(c);
|
|
3417
|
-
} catch (
|
|
3418
|
-
let M =
|
|
3416
|
+
} catch (E) {
|
|
3417
|
+
let M = E;
|
|
3419
3418
|
throw new Error(M.message ?? "Patch Problem");
|
|
3420
3419
|
}
|
|
3421
3420
|
try {
|
|
3422
3421
|
c.additionalUrl = "/getAll", await F(c);
|
|
3423
|
-
} catch (
|
|
3424
|
-
let M =
|
|
3422
|
+
} catch (E) {
|
|
3423
|
+
let M = E;
|
|
3425
3424
|
throw new Error(M.message ?? "Problem");
|
|
3426
3425
|
}
|
|
3427
|
-
return (
|
|
3426
|
+
return (D = t.value) == null ? void 0 : D.find((E) => E.id == (c.id ?? c.data.id));
|
|
3428
3427
|
}
|
|
3429
3428
|
return {
|
|
3430
|
-
deleteItem:
|
|
3429
|
+
deleteItem: y,
|
|
3431
3430
|
get: m,
|
|
3432
3431
|
getAll: h,
|
|
3433
3432
|
patch: l,
|
|
3434
3433
|
post: r,
|
|
3435
|
-
restore:
|
|
3434
|
+
restore: S
|
|
3436
3435
|
};
|
|
3437
3436
|
});
|
|
3438
3437
|
}
|
|
3439
3438
|
function Rn(e, t) {
|
|
3440
|
-
const u = z(!1),
|
|
3439
|
+
const u = z(!1), b = zt(e);
|
|
3441
3440
|
let o = g(j(e));
|
|
3442
|
-
(t == null ? void 0 : t.useTracker) !== !1 && _e(
|
|
3441
|
+
(t == null ? void 0 : t.useTracker) !== !1 && _e(b, (P) => {
|
|
3443
3442
|
u.value = g(P) != o;
|
|
3444
3443
|
}, { deep: !0 });
|
|
3445
3444
|
function g(P) {
|
|
@@ -3450,13 +3449,13 @@ function Rn(e, t) {
|
|
|
3450
3449
|
t.propsToTrack.some((h) => h == F) || delete N[F];
|
|
3451
3450
|
})), JSON.stringify(N);
|
|
3452
3451
|
}
|
|
3453
|
-
function
|
|
3454
|
-
o = g(j(
|
|
3452
|
+
function x() {
|
|
3453
|
+
o = g(j(b)), u.value = !1;
|
|
3455
3454
|
}
|
|
3456
3455
|
return {
|
|
3457
|
-
asyncItem:
|
|
3456
|
+
asyncItem: b,
|
|
3458
3457
|
isChanged: u,
|
|
3459
|
-
restartTracker:
|
|
3458
|
+
restartTracker: x
|
|
3460
3459
|
};
|
|
3461
3460
|
}
|
|
3462
3461
|
function Ea(e, t) {
|
|
@@ -3464,18 +3463,18 @@ function Ea(e, t) {
|
|
|
3464
3463
|
const {
|
|
3465
3464
|
// useBladeSrc = true,
|
|
3466
3465
|
useRouteSrc: u = !0
|
|
3467
|
-
} = t ?? {},
|
|
3466
|
+
} = t ?? {}, b = e.storeMode ?? (t == null ? void 0 : t.storeMode) ?? "session", o = e.storageMode ?? (t == null ? void 0 : t.storageMode) ?? "local-cache", g = e.nav ?? e.bladeName ?? "basic", x = Or(), P = pr(), N = j(e.proxyQueryKey), $ = te(() => {
|
|
3468
3467
|
var G;
|
|
3469
3468
|
return j(e.proxyID) ?? (N != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[N] : void 0);
|
|
3470
|
-
}), F = z(void 0), { actionErrorMsg: h, actionLoadingMsg: m, deleteItem: l, getItem: r, getAllItems:
|
|
3469
|
+
}), F = z(void 0), { actionErrorMsg: h, actionLoadingMsg: m, deleteItem: l, getItem: r, getAllItems: y, restoreItem: S, saveItem: c } = tt({
|
|
3471
3470
|
nav: g,
|
|
3472
3471
|
proxyID: $.value,
|
|
3473
3472
|
store: ut({
|
|
3474
|
-
storeMode:
|
|
3473
|
+
storeMode: b,
|
|
3475
3474
|
storageMode: o,
|
|
3476
3475
|
nav: g
|
|
3477
3476
|
})
|
|
3478
|
-
}),
|
|
3477
|
+
}), D = te(() => e.errorMsg ?? h.value), E = te(() => e.loadingMsg ?? m.value), M = te(() => E.value != null), w = z(e.itemID ?? (u ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), C = z(w.value == "new" ? "new" : e.startEditing ? "edit" : "view"), I = Le(!1), _ = te(() => {
|
|
3479
3478
|
if (C.value == "new")
|
|
3480
3479
|
return !1;
|
|
3481
3480
|
const G = j(F);
|
|
@@ -3502,7 +3501,7 @@ function Ea(e, t) {
|
|
|
3502
3501
|
const {
|
|
3503
3502
|
additionalUrl: X,
|
|
3504
3503
|
onDeleteAsync: ne,
|
|
3505
|
-
onDeleteSuccessAsync: fe = () => (
|
|
3504
|
+
onDeleteSuccessAsync: fe = () => (x.back(), Promise.resolve(void 0)),
|
|
3506
3505
|
proxyID: ce
|
|
3507
3506
|
} = { ...e };
|
|
3508
3507
|
l({
|
|
@@ -3524,7 +3523,7 @@ function Ea(e, t) {
|
|
|
3524
3523
|
onRestoreSuccessAsync: fe,
|
|
3525
3524
|
proxyID: ce
|
|
3526
3525
|
} = { ...e };
|
|
3527
|
-
|
|
3526
|
+
S({
|
|
3528
3527
|
additionalUrl: X,
|
|
3529
3528
|
data: G,
|
|
3530
3529
|
nav: g,
|
|
@@ -3541,7 +3540,7 @@ function Ea(e, t) {
|
|
|
3541
3540
|
else {
|
|
3542
3541
|
const X = {
|
|
3543
3542
|
additionalUrl: e.additionalUrl,
|
|
3544
|
-
id:
|
|
3543
|
+
id: w.value,
|
|
3545
3544
|
nav: g,
|
|
3546
3545
|
proxyID: $.value,
|
|
3547
3546
|
params: e.params,
|
|
@@ -3553,7 +3552,7 @@ function Ea(e, t) {
|
|
|
3553
3552
|
if (e.isSingle === !0)
|
|
3554
3553
|
X.id === "new" ? F.value = e.onGetNew ? e.onGetNew() : {} : F.value = await r(X);
|
|
3555
3554
|
else {
|
|
3556
|
-
const ne = await
|
|
3555
|
+
const ne = await y(X);
|
|
3557
3556
|
F.value = ne.data;
|
|
3558
3557
|
}
|
|
3559
3558
|
}
|
|
@@ -3565,7 +3564,7 @@ function Ea(e, t) {
|
|
|
3565
3564
|
onCanSaveAsync: fe,
|
|
3566
3565
|
onGetSaveAsync: ce,
|
|
3567
3566
|
onSaveAsync: Ee,
|
|
3568
|
-
onSaveSuccessAsync: Re = () => ((X == null ? void 0 : X.navBack) === !0 ?
|
|
3567
|
+
onSaveSuccessAsync: Re = () => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : C.value = "view", Promise.resolve(void 0))
|
|
3569
3568
|
} = { ...e };
|
|
3570
3569
|
c({
|
|
3571
3570
|
additionalUrl: ne,
|
|
@@ -3585,7 +3584,7 @@ function Ea(e, t) {
|
|
|
3585
3584
|
const G = j(C);
|
|
3586
3585
|
!G || G == "view" ? C.value = "edit" : G == "edit" && (C.value = "view");
|
|
3587
3586
|
}
|
|
3588
|
-
return _e(
|
|
3587
|
+
return _e(D, (G) => {
|
|
3589
3588
|
I.value = G != null;
|
|
3590
3589
|
}), _e(() => e.refreshToggle, () => {
|
|
3591
3590
|
W({ deepRefresh: !0 });
|
|
@@ -3595,15 +3594,15 @@ function Ea(e, t) {
|
|
|
3595
3594
|
}), {
|
|
3596
3595
|
asyncItem: F,
|
|
3597
3596
|
deleteItem: ie,
|
|
3598
|
-
errorMsg:
|
|
3597
|
+
errorMsg: D,
|
|
3599
3598
|
isChanged: Q,
|
|
3600
|
-
isDeletable:
|
|
3599
|
+
isDeletable: _,
|
|
3601
3600
|
isEditing: te(() => C.value == "new" || C.value == "edit"),
|
|
3602
3601
|
isEditable: s,
|
|
3603
3602
|
isLoading: M,
|
|
3604
3603
|
isRestorable: A,
|
|
3605
3604
|
isSaveable: K,
|
|
3606
|
-
loadingMsg:
|
|
3605
|
+
loadingMsg: E,
|
|
3607
3606
|
mode: C,
|
|
3608
3607
|
refresh: W,
|
|
3609
3608
|
restoreItem: we,
|
|
@@ -3629,7 +3628,7 @@ function Bn(e) {
|
|
|
3629
3628
|
displayName: m.displayName ?? e.getDisplayName(m),
|
|
3630
3629
|
...m
|
|
3631
3630
|
}));
|
|
3632
|
-
function
|
|
3631
|
+
function b(m) {
|
|
3633
3632
|
var l;
|
|
3634
3633
|
return (l = P(m)) == null ? void 0 : l.archiveName;
|
|
3635
3634
|
}
|
|
@@ -3641,14 +3640,14 @@ function Bn(e) {
|
|
|
3641
3640
|
var l;
|
|
3642
3641
|
return (l = P(m)) == null ? void 0 : l.displayName;
|
|
3643
3642
|
}
|
|
3644
|
-
function
|
|
3643
|
+
function x(m) {
|
|
3645
3644
|
var l;
|
|
3646
3645
|
return (l = P(m)) == null ? void 0 : l.icon;
|
|
3647
3646
|
}
|
|
3648
3647
|
function P(m) {
|
|
3649
3648
|
return m == null ? null : typeof m != "string" ? m : rt(u, (r) => r.children).find((r) => {
|
|
3650
|
-
var
|
|
3651
|
-
return r.name == m || r.singleName == m || ((
|
|
3649
|
+
var y;
|
|
3650
|
+
return r.name == m || r.singleName == m || ((y = r.aliases) == null ? void 0 : y.some((S) => S == m));
|
|
3652
3651
|
}) ?? null;
|
|
3653
3652
|
}
|
|
3654
3653
|
function N(m) {
|
|
@@ -3684,10 +3683,10 @@ function Bn(e) {
|
|
|
3684
3683
|
backgroundName: Vr,
|
|
3685
3684
|
hesitate: mr,
|
|
3686
3685
|
navigationItems: u,
|
|
3687
|
-
findArchiveName:
|
|
3686
|
+
findArchiveName: b,
|
|
3688
3687
|
findCacheHours: o,
|
|
3689
3688
|
findDisplay: g,
|
|
3690
|
-
findIcon:
|
|
3689
|
+
findIcon: x,
|
|
3691
3690
|
findItem: P,
|
|
3692
3691
|
findStoreName: F,
|
|
3693
3692
|
findPath: N,
|
|
@@ -3697,13 +3696,13 @@ function Bn(e) {
|
|
|
3697
3696
|
}
|
|
3698
3697
|
function Ia(e, t, u) {
|
|
3699
3698
|
var Fe, ke;
|
|
3700
|
-
const
|
|
3699
|
+
const b = In(), o = Un(), g = Or(), x = pr(), { bladeData: P } = An({}), N = e.useBladeSrc ?? !0, $ = e.useRouteSrc ?? !0, F = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", h = e.storeMode ?? ((Fe = o.findItem(F)) == null ? void 0 : Fe.storeMode) ?? "session", m = e.storageMode ?? ((ke = o.findItem(F)) == null ? void 0 : ke.storageMode) ?? "local-cache", l = j(e.customFilters) ?? [], r = z([]), y = te(() => jt([
|
|
3701
3700
|
...l.filter((R) => R.name != null).map((R) => R.name),
|
|
3702
3701
|
...e.defaultFilters ?? [],
|
|
3703
3702
|
...r.value
|
|
3704
|
-
]).value),
|
|
3705
|
-
let c = z([...
|
|
3706
|
-
const
|
|
3703
|
+
]).value), S = z((e.defaultFilters ?? []).map((R) => y.value.indexOf(R)));
|
|
3704
|
+
let c = z([...S.value]);
|
|
3705
|
+
const D = te(() => Fr(c, S).value.length > 0 || Fr(S, c).value.length > 0), E = z(M());
|
|
3707
3706
|
function M() {
|
|
3708
3707
|
var R, J;
|
|
3709
3708
|
if (N) {
|
|
@@ -3712,13 +3711,13 @@ function Ia(e, t, u) {
|
|
|
3712
3711
|
return Number.parseInt(V);
|
|
3713
3712
|
}
|
|
3714
3713
|
if ($) {
|
|
3715
|
-
const V = (J =
|
|
3714
|
+
const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.page;
|
|
3716
3715
|
if (V != null)
|
|
3717
3716
|
return Number.parseInt(typeof V == "string" ? V : V.toString());
|
|
3718
3717
|
}
|
|
3719
3718
|
return 1;
|
|
3720
3719
|
}
|
|
3721
|
-
const
|
|
3720
|
+
const w = te(() => {
|
|
3722
3721
|
var R, J;
|
|
3723
3722
|
if (N) {
|
|
3724
3723
|
const V = (R = P.value) == null ? void 0 : R.proxyID;
|
|
@@ -3726,7 +3725,7 @@ function Ia(e, t, u) {
|
|
|
3726
3725
|
return V;
|
|
3727
3726
|
}
|
|
3728
3727
|
if ($) {
|
|
3729
|
-
const V = (J =
|
|
3728
|
+
const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.query;
|
|
3730
3729
|
if (V != null)
|
|
3731
3730
|
return V;
|
|
3732
3731
|
}
|
|
@@ -3740,19 +3739,19 @@ function Ia(e, t, u) {
|
|
|
3740
3739
|
return V;
|
|
3741
3740
|
}
|
|
3742
3741
|
if ($) {
|
|
3743
|
-
const V = (J =
|
|
3742
|
+
const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.search;
|
|
3744
3743
|
if (V != null)
|
|
3745
3744
|
return V;
|
|
3746
3745
|
}
|
|
3747
3746
|
}
|
|
3748
|
-
const
|
|
3747
|
+
const _ = z(j(e.startShowingInactive) ?? !1), s = te(() => [
|
|
3749
3748
|
...e.searchProps ?? [],
|
|
3750
3749
|
...(e.headers ?? []).filter((R) => R.searchable != null && R.value != null).map((R) => R.value ?? "")
|
|
3751
3750
|
]), A = z([]), K = Le([]), Q = z([]);
|
|
3752
3751
|
let re;
|
|
3753
3752
|
const { actionErrorMsg: ie, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = tt({
|
|
3754
3753
|
nav: F,
|
|
3755
|
-
proxyID:
|
|
3754
|
+
proxyID: w.value,
|
|
3756
3755
|
store: ut({
|
|
3757
3756
|
storeMode: h,
|
|
3758
3757
|
storageMode: m,
|
|
@@ -3760,8 +3759,8 @@ function Ia(e, t, u) {
|
|
|
3760
3759
|
})
|
|
3761
3760
|
}), X = te(() => e.errorMsg ?? ie.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ce = Le(!1), Ee = Le(e.showSearch ?? !0), Re = z(0), Ve = te(() => {
|
|
3762
3761
|
let R, J = [];
|
|
3763
|
-
|
|
3764
|
-
const oe =
|
|
3762
|
+
S.value.forEach((O) => {
|
|
3763
|
+
const oe = y.value[O], ve = l.find((De) => De.name == oe);
|
|
3765
3764
|
ve != null ? R = R != null ? `${R}ANDALSO${ve.filterFunction()}` : ve.filterFunction() : J.push(oe);
|
|
3766
3765
|
});
|
|
3767
3766
|
const V = {};
|
|
@@ -3769,8 +3768,8 @@ function Ia(e, t, u) {
|
|
|
3769
3768
|
}), pe = te(() => {
|
|
3770
3769
|
var J;
|
|
3771
3770
|
let R = e.params != null ? { ...e.params } : {};
|
|
3772
|
-
return e.useServerPagination && e.itemsPerPage != null && (R.includeCount = !0, R.takeAmount = e.itemsPerPage, R.takeFrom = (
|
|
3773
|
-
}), er = te(() => (R) => e.onCanDelete != null ? e.onCanDelete(R) : !(R != null && R.isInactive === !0)), rr = te(() => (R) =>
|
|
3771
|
+
return e.useServerPagination && e.itemsPerPage != null && (R.includeCount = !0, R.takeAmount = e.itemsPerPage, R.takeFrom = (E.value - 1) * e.itemsPerPage), Ve.value != null && (R = { ...R, ...Ve.value }), _.value && (R.includeInactive = !0), Te(e.selectProps) && (R.properties = (J = e.selectProps) == null ? void 0 : J.toString()), C.value != null && (R.searchString = C.value), R;
|
|
3772
|
+
}), er = te(() => (R) => e.onCanDelete != null ? e.onCanDelete(R) : !(R != null && R.isInactive === !0)), rr = te(() => (R) => _.value ? e.onCanRestore != null ? e.onCanRestore(R) : (R == null ? void 0 : R.isInactive) === !0 : !1), Ce = te(() => Q.value.filter((R) => !R.hide)), tr = te(() => {
|
|
3774
3773
|
let R = new Array();
|
|
3775
3774
|
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
3776
3775
|
let O = R.find((oe) => oe.position == V.sublevel);
|
|
@@ -3822,7 +3821,7 @@ function Ia(e, t, u) {
|
|
|
3822
3821
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3823
3822
|
onDeleteAsync: V,
|
|
3824
3823
|
onDeleteSuccessAsync: async () => (ve(oe), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3825
|
-
proxyID:
|
|
3824
|
+
proxyID: w.value,
|
|
3826
3825
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3827
3826
|
requireConfirmation: !0
|
|
3828
3827
|
}), t && t("deleted", R);
|
|
@@ -3835,13 +3834,13 @@ function Ia(e, t, u) {
|
|
|
3835
3834
|
onCanRestoreAsync: e.onCanRestoreAsync,
|
|
3836
3835
|
onRestoreAsync: e.onRestoreAsync,
|
|
3837
3836
|
onRestoreSuccessAsync: e.onRestoreSuccessAsync,
|
|
3838
|
-
proxyID:
|
|
3837
|
+
proxyID: w.value
|
|
3839
3838
|
// ...(useBladeSrc ? bladeData.value : {})
|
|
3840
3839
|
});
|
|
3841
3840
|
}
|
|
3842
3841
|
function Ue() {
|
|
3843
3842
|
Y(() => {
|
|
3844
|
-
|
|
3843
|
+
b.exportToCSV(Ce.value, K.value);
|
|
3845
3844
|
}, { loadingMsg: "Exporting to CSV" });
|
|
3846
3845
|
}
|
|
3847
3846
|
function Pe() {
|
|
@@ -3868,7 +3867,7 @@ function Ia(e, t, u) {
|
|
|
3868
3867
|
params: pe.value,
|
|
3869
3868
|
//params,
|
|
3870
3869
|
// params: params.getParamOptions(),
|
|
3871
|
-
proxyID:
|
|
3870
|
+
proxyID: w.value,
|
|
3872
3871
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3873
3872
|
// ...(props.useInterEvents ? eventData : {}),
|
|
3874
3873
|
refresh: (R == null ? void 0 : R.deepRefresh) ?? !1,
|
|
@@ -3911,7 +3910,7 @@ function Ia(e, t, u) {
|
|
|
3911
3910
|
}
|
|
3912
3911
|
return $e(), Kt([C], () => {
|
|
3913
3912
|
Pe();
|
|
3914
|
-
}, { debounce: 500, maxWait: 500 }), _e([
|
|
3913
|
+
}, { debounce: 500, maxWait: 500 }), _e([_, E], async () => {
|
|
3915
3914
|
await Ie();
|
|
3916
3915
|
}), _e([X, () => e.errorMsg], ([R, J]) => {
|
|
3917
3916
|
ce.value = R != null || J != null;
|
|
@@ -3921,18 +3920,18 @@ function Ia(e, t, u) {
|
|
|
3921
3920
|
Pe();
|
|
3922
3921
|
}), Kr(async () => {
|
|
3923
3922
|
var R;
|
|
3924
|
-
e.eager == !0 && await Ie({ deepRefresh: ((R =
|
|
3923
|
+
e.eager == !0 && await Ie({ deepRefresh: ((R = x == null ? void 0 : x.params) == null ? void 0 : R.refresh) == "true" });
|
|
3925
3924
|
}), {
|
|
3926
3925
|
add: be,
|
|
3927
3926
|
asyncItems: A,
|
|
3928
|
-
currentPage:
|
|
3927
|
+
currentPage: E,
|
|
3929
3928
|
deleteItem: lr,
|
|
3930
3929
|
displayHeaders: ar,
|
|
3931
3930
|
errorMsg: X,
|
|
3932
3931
|
exportToCSV: Ue,
|
|
3933
3932
|
filteredItems: K,
|
|
3934
|
-
filters:
|
|
3935
|
-
filtersChanged:
|
|
3933
|
+
filters: y,
|
|
3934
|
+
filtersChanged: D,
|
|
3936
3935
|
headerOptions: Q,
|
|
3937
3936
|
isDeletable: er,
|
|
3938
3937
|
isLoading: fe,
|
|
@@ -3941,11 +3940,11 @@ function Ia(e, t, u) {
|
|
|
3941
3940
|
refresh: Ie,
|
|
3942
3941
|
restoreItem: ze,
|
|
3943
3942
|
searchString: C,
|
|
3944
|
-
selectedFilters:
|
|
3943
|
+
selectedFilters: S,
|
|
3945
3944
|
selectItem: Ye,
|
|
3946
3945
|
// serverFilters,
|
|
3947
3946
|
showError: ce,
|
|
3948
|
-
showInactive:
|
|
3947
|
+
showInactive: _,
|
|
3949
3948
|
showSearch: Ee,
|
|
3950
3949
|
subtitleOptions: tr,
|
|
3951
3950
|
tableHeaders: Ce,
|
|
@@ -3962,8 +3961,8 @@ function $n(e) {
|
|
|
3962
3961
|
function t(u) {
|
|
3963
3962
|
if (!u)
|
|
3964
3963
|
return {};
|
|
3965
|
-
let
|
|
3966
|
-
return e.presets[
|
|
3964
|
+
let b = u;
|
|
3965
|
+
return e.presets[b] ?? {};
|
|
3967
3966
|
}
|
|
3968
3967
|
return Tr = {
|
|
3969
3968
|
usePresets: t
|
|
@@ -3976,21 +3975,21 @@ function xa() {
|
|
|
3976
3975
|
return Cr;
|
|
3977
3976
|
}
|
|
3978
3977
|
function Fn() {
|
|
3979
|
-
function e(
|
|
3980
|
-
Xe.value =
|
|
3978
|
+
function e(x) {
|
|
3979
|
+
Xe.value = x.detail, yr.value = !0;
|
|
3981
3980
|
}
|
|
3982
3981
|
function t() {
|
|
3983
3982
|
Jr || (Jr = !0, window.location.reload());
|
|
3984
3983
|
}
|
|
3985
3984
|
function u() {
|
|
3986
|
-
var
|
|
3987
|
-
(
|
|
3985
|
+
var x;
|
|
3986
|
+
(x = jr.value) == null || x.prompt(), gr.value = !1;
|
|
3988
3987
|
}
|
|
3989
|
-
function
|
|
3988
|
+
function b() {
|
|
3990
3989
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
3991
3990
|
}
|
|
3992
|
-
function o(
|
|
3993
|
-
|
|
3991
|
+
function o(x) {
|
|
3992
|
+
x.preventDefault(), gr.value = !0, jr.value = x;
|
|
3994
3993
|
}
|
|
3995
3994
|
function g() {
|
|
3996
3995
|
yr.value = !1, !(!Xe.value || !Xe.value.waiting) && Xe.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
@@ -4001,7 +4000,7 @@ function Fn() {
|
|
|
4001
4000
|
canInstallApp: gr,
|
|
4002
4001
|
canUpdateApp: yr,
|
|
4003
4002
|
installApp: u,
|
|
4004
|
-
isInstalled:
|
|
4003
|
+
isInstalled: b,
|
|
4005
4004
|
updateApp: g
|
|
4006
4005
|
}, Cr;
|
|
4007
4006
|
}
|
|
@@ -4014,9 +4013,9 @@ function Ta(e) {
|
|
|
4014
4013
|
install(t, u) {
|
|
4015
4014
|
var N;
|
|
4016
4015
|
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = u.vuetifyInstance), En(e);
|
|
4017
|
-
const
|
|
4018
|
-
$n(e), (N = e.auth).demo ?? (N.demo =
|
|
4019
|
-
const g = yn(e.auth),
|
|
4016
|
+
const b = xn(), o = Bn(e);
|
|
4017
|
+
$n(e), (N = e.auth).demo ?? (N.demo = b), e.auth.getAuthItem = o.findItem;
|
|
4018
|
+
const g = yn(e.auth), x = mn({
|
|
4020
4019
|
auth: g,
|
|
4021
4020
|
findPath: o.findPath,
|
|
4022
4021
|
useBearerToken: !0
|
|
@@ -4026,7 +4025,7 @@ function Ta(e) {
|
|
|
4026
4025
|
Tn({
|
|
4027
4026
|
dates: P
|
|
4028
4027
|
}), Fn(), Pn({
|
|
4029
|
-
api:
|
|
4028
|
+
api: x,
|
|
4030
4029
|
auth: g,
|
|
4031
4030
|
navigation: o
|
|
4032
4031
|
}), gn(e.urls);
|