bt-core-app 1.4.86 → 1.4.88
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 +654 -645
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as
|
|
2
|
-
import { watchArray as Or, useStorage as
|
|
1
|
+
import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as _e, toRef as Yt, onMounted as Xr, openBlock as Zt, createElementBlock as Jt } from "vue";
|
|
2
|
+
import { watchArray as Or, useStorage as jt, useEventListener as me, toValue as Ae, useParentElement as Kt, useResizeObserver as Qt, useArrayUnique as Xt, useArrayDifference as Gr, watchDebounced as Ot, tryOnMounted as pt } from "@vueuse/core";
|
|
3
3
|
import { defineStore as pr } from "pinia";
|
|
4
4
|
import { DateTime as he } from "luxon";
|
|
5
5
|
import { useRouter as Mr, useRoute as et } from "vue-router";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
|
|
6
|
+
function en(e) {
|
|
7
|
+
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, rn);
|
|
9
8
|
}
|
|
10
|
-
function
|
|
9
|
+
function rn(e) {
|
|
11
10
|
const t = Math.random() * 16 | 0;
|
|
12
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
13
12
|
}
|
|
14
|
-
function
|
|
15
|
-
const t = z([]), l = Re(), S = Re(),
|
|
13
|
+
function tn(e) {
|
|
14
|
+
const t = z([]), l = Re(), S = Re(), f = Re(), g = te(() => l.value != null);
|
|
16
15
|
function x(d) {
|
|
17
16
|
t.value = t.value.filter((h) => h.id != d);
|
|
18
17
|
}
|
|
19
18
|
function P(d) {
|
|
20
19
|
const h = {
|
|
21
|
-
id:
|
|
20
|
+
id: en(),
|
|
22
21
|
msg: d ?? "Loading"
|
|
23
22
|
};
|
|
24
23
|
return t.value.push(h), h.id;
|
|
25
24
|
}
|
|
26
|
-
function
|
|
25
|
+
function T(d) {
|
|
27
26
|
d != null && (S.value = d.toString());
|
|
28
27
|
}
|
|
29
28
|
function N() {
|
|
@@ -35,14 +34,14 @@ function en(e) {
|
|
|
35
34
|
const r = P(u.loadingMsg);
|
|
36
35
|
let y = null;
|
|
37
36
|
try {
|
|
38
|
-
return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (
|
|
37
|
+
return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (f.value = u.completionMsg), y;
|
|
39
38
|
} catch (I) {
|
|
40
39
|
if ((e == null ? void 0 : e.onError) != null)
|
|
41
40
|
e.onError(I);
|
|
42
41
|
else {
|
|
43
42
|
if (u.throwError == !0)
|
|
44
43
|
return I;
|
|
45
|
-
|
|
44
|
+
T(u.errorMsg ?? I ?? "error");
|
|
46
45
|
}
|
|
47
46
|
} finally {
|
|
48
47
|
x(r);
|
|
@@ -53,49 +52,49 @@ function en(e) {
|
|
|
53
52
|
}, { deep: !0 }), {
|
|
54
53
|
actionErrorMsg: S,
|
|
55
54
|
actionLoadingMsg: l,
|
|
56
|
-
actionCompleteMsg:
|
|
55
|
+
actionCompleteMsg: f,
|
|
57
56
|
clearErrors: N,
|
|
58
57
|
doAction: $,
|
|
59
58
|
isLoading: g,
|
|
60
|
-
logError:
|
|
59
|
+
logError: T
|
|
61
60
|
};
|
|
62
61
|
}
|
|
63
62
|
var Qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
64
|
-
function
|
|
63
|
+
function nn(e) {
|
|
65
64
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
66
65
|
}
|
|
67
66
|
var Ue = function() {
|
|
68
|
-
function e(
|
|
69
|
-
return
|
|
67
|
+
function e(f) {
|
|
68
|
+
return f;
|
|
70
69
|
}
|
|
71
|
-
function t(
|
|
72
|
-
return typeof
|
|
70
|
+
function t(f) {
|
|
71
|
+
return typeof f == "string" ? f.toLowerCase() : f;
|
|
73
72
|
}
|
|
74
|
-
function l(
|
|
75
|
-
if (g = typeof g == "object" ? g : { direction: g }, typeof
|
|
76
|
-
var x =
|
|
77
|
-
|
|
73
|
+
function l(f, g) {
|
|
74
|
+
if (g = typeof g == "object" ? g : { direction: g }, typeof f != "function") {
|
|
75
|
+
var x = f;
|
|
76
|
+
f = function(d) {
|
|
78
77
|
return d[x] ? d[x] : "";
|
|
79
78
|
};
|
|
80
79
|
}
|
|
81
|
-
if (
|
|
82
|
-
var P =
|
|
80
|
+
if (f.length === 1) {
|
|
81
|
+
var P = f, T = g.ignoreCase ? t : e, N = g.cmp || function(d, h) {
|
|
83
82
|
return d < h ? -1 : d > h ? 1 : 0;
|
|
84
83
|
};
|
|
85
|
-
|
|
86
|
-
return N(
|
|
84
|
+
f = function(d, h) {
|
|
85
|
+
return N(T(P(d)), T(P(h)));
|
|
87
86
|
};
|
|
88
87
|
}
|
|
89
88
|
const $ = { "-1": "", desc: "" };
|
|
90
89
|
return g.direction in $ ? function(d, h) {
|
|
91
|
-
return -
|
|
92
|
-
} :
|
|
90
|
+
return -f(d, h);
|
|
91
|
+
} : f;
|
|
93
92
|
}
|
|
94
|
-
function S(
|
|
95
|
-
var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(
|
|
93
|
+
function S(f, g) {
|
|
94
|
+
var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(f, g), T = x ? function(N, $) {
|
|
96
95
|
return x(N, $) || P(N, $);
|
|
97
96
|
} : P;
|
|
98
|
-
return
|
|
97
|
+
return T.thenBy = S, T;
|
|
99
98
|
}
|
|
100
99
|
return S.firstBy = S, S;
|
|
101
100
|
}();
|
|
@@ -111,18 +110,18 @@ function Be(e, t) {
|
|
|
111
110
|
while (S.startsWith("/"));
|
|
112
111
|
return `${l}/${S}`;
|
|
113
112
|
}
|
|
114
|
-
function
|
|
113
|
+
function On(e) {
|
|
115
114
|
return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
|
|
116
115
|
}
|
|
117
|
-
function
|
|
116
|
+
function pn(e = "blitzItExtensionExists") {
|
|
118
117
|
try {
|
|
119
118
|
var t = document.getElementById(e);
|
|
120
119
|
return t != null;
|
|
121
120
|
} catch (l) {
|
|
122
|
-
return console.log(
|
|
121
|
+
return console.log(dn(l)), !1;
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
|
-
function
|
|
124
|
+
function ea(e, t) {
|
|
126
125
|
return [
|
|
127
126
|
{ lat: e.lat - t, lng: e.lng + t },
|
|
128
127
|
{ lat: e.lat - t, lng: e.lng - t },
|
|
@@ -130,7 +129,7 @@ function Kn(e, t) {
|
|
|
130
129
|
{ lat: e.lat + t, lng: e.lng + t }
|
|
131
130
|
];
|
|
132
131
|
}
|
|
133
|
-
function
|
|
132
|
+
function ra(e, t) {
|
|
134
133
|
return [
|
|
135
134
|
{ lat: e.lat - t * 2, lng: e.lng + t },
|
|
136
135
|
{ lat: e.lat - t * 2, lng: e.lng - t },
|
|
@@ -138,7 +137,7 @@ function Qn(e, t) {
|
|
|
138
137
|
{ lat: e.lat, lng: e.lng + t }
|
|
139
138
|
];
|
|
140
139
|
}
|
|
141
|
-
function
|
|
140
|
+
function ta(e, t) {
|
|
142
141
|
return [
|
|
143
142
|
{ lat: e.lat, lng: e.lng + t },
|
|
144
143
|
{ lat: e.lat, lng: e.lng - t },
|
|
@@ -146,7 +145,7 @@ function Xn(e, t) {
|
|
|
146
145
|
{ lat: e.lat + t * 2, lng: e.lng + t }
|
|
147
146
|
];
|
|
148
147
|
}
|
|
149
|
-
function
|
|
148
|
+
function na(e) {
|
|
150
149
|
var t = rt(e, !0);
|
|
151
150
|
return t = t.toLowerCase(), t = t.replace(" victoria ", "vic"), t = t.replace(" queensland ", "qld"), t = t.replace(" new south wales ", "nsw"), t = t.replace(" northern territory ", "nt"), t = t.replace(" western australia ", "wa"), t = t.replace(" tasmania ", "tas"), t = t.replace(" south australia ", "sa"), t = t.replace(" australian captial territory ", "act"), t = t.replace(" & ", " and "), t = t.replace(" road", " rd"), t = t.replace(" street", " st"), t = t.replace(" lane", " ln"), t = t.replace(" alley", " aly"), t = t.replace(" arcade", " arc"), t = t.replace(" boulevard", " blvd"), t = t.replace(" court", " ct"), t = t.replace(" cove", " cv"), t = t.replace(" highway", " hwy"), t.replaceAll(" ", "");
|
|
152
151
|
}
|
|
@@ -158,36 +157,36 @@ function rt(e, t = !1) {
|
|
|
158
157
|
var l = "";
|
|
159
158
|
return e.addressLineOne != null && !t && (l = e.addressLineOne + " "), e.streetNumber != null && (l = l + e.streetNumber + " "), e.streetName != null && (l = l + e.streetName + ", "), e.suburb != null && (l = l + e.suburb + " "), e.state != null && (l = l + e.state + " "), e.postcode != null && (l = l + e.postcode), l;
|
|
160
159
|
}
|
|
161
|
-
function
|
|
160
|
+
function aa(e, t, l) {
|
|
162
161
|
if (e) {
|
|
163
162
|
var S = new Image();
|
|
164
163
|
S.onload = t, S.onerror = l, S.src = e;
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
|
-
async function
|
|
166
|
+
async function la(e, t = !0) {
|
|
168
167
|
return new Promise((l, S) => {
|
|
169
168
|
e == null && S("no url given");
|
|
170
|
-
var
|
|
171
|
-
|
|
169
|
+
var f = new Image();
|
|
170
|
+
f.setAttribute("crossOrigin", "anonymous"), f.onload = function() {
|
|
172
171
|
var g = document.createElement("canvas");
|
|
173
172
|
g.width = this.width, g.height = this.height;
|
|
174
173
|
var x = g.getContext("2d");
|
|
175
174
|
x == null || x.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
|
|
176
|
-
},
|
|
175
|
+
}, f.onerror = function() {
|
|
177
176
|
console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
|
|
178
|
-
}, e != null && (
|
|
177
|
+
}, e != null && (f.src = e);
|
|
179
178
|
});
|
|
180
179
|
}
|
|
181
|
-
function
|
|
180
|
+
function an(e) {
|
|
182
181
|
return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
|
|
183
182
|
}
|
|
184
|
-
function
|
|
183
|
+
function ua(e) {
|
|
185
184
|
if (e != null && typeof e == "object")
|
|
186
185
|
for (var t in e)
|
|
187
186
|
/^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
|
|
188
187
|
return e;
|
|
189
188
|
}
|
|
190
|
-
function
|
|
189
|
+
function ln(e) {
|
|
191
190
|
return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (l) => l.toUpperCase()));
|
|
192
191
|
}
|
|
193
192
|
const Ye = [
|
|
@@ -200,73 +199,73 @@ const Ye = [
|
|
|
200
199
|
{ value: 7, short: "sat", values: ["sat", "saturday"] },
|
|
201
200
|
{ value: 0, short: "always", values: ["always", null, void 0] }
|
|
202
201
|
];
|
|
203
|
-
function
|
|
202
|
+
function ia(e) {
|
|
204
203
|
if (e == null)
|
|
205
204
|
return 0;
|
|
206
|
-
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((
|
|
205
|
+
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((f) => t.some((g) => f == g))).map((S) => S.value);
|
|
207
206
|
return l.length == 0 ? 8 : Math.min(...l);
|
|
208
207
|
}
|
|
209
|
-
function
|
|
208
|
+
function ca(e) {
|
|
210
209
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
211
|
-
let l = Ye.find((S) => S.values.some((
|
|
210
|
+
let l = Ye.find((S) => S.values.some((f) => f == t));
|
|
212
211
|
return l != null ? l.short : "";
|
|
213
212
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
214
213
|
}
|
|
215
|
-
function
|
|
214
|
+
function fa(e, t) {
|
|
216
215
|
if (e == null || t == null)
|
|
217
216
|
return !0;
|
|
218
|
-
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(),
|
|
219
|
-
return
|
|
217
|
+
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), f = Ye.find((g) => g.values.some((x) => x == S));
|
|
218
|
+
return f != null && l.some((g) => g == f.short || f.values.some((x) => x == g));
|
|
220
219
|
}
|
|
221
|
-
function
|
|
220
|
+
function sa(e, t) {
|
|
222
221
|
if (t == null)
|
|
223
222
|
return e;
|
|
224
223
|
let l = e ?? "";
|
|
225
224
|
l = `${l},${t}`;
|
|
226
|
-
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((
|
|
225
|
+
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((f) => Ye.find((g) => g.values.some((x) => x == f))).filter((f) => f != null).sort(Ue.firstBy((f) => (f == null ? void 0 : f.value) ?? 0)).map((f) => f == null ? void 0 : f.short))].toString();
|
|
227
226
|
return S.length > 0 ? S : void 0;
|
|
228
227
|
}
|
|
229
|
-
function
|
|
228
|
+
function oa(e, t) {
|
|
230
229
|
if (t == null || e == null)
|
|
231
230
|
return e;
|
|
232
|
-
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(),
|
|
233
|
-
return
|
|
231
|
+
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), f = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ye.find((x) => x.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Ue.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
232
|
+
return f.length > 0 ? f : void 0;
|
|
234
233
|
}
|
|
235
|
-
function
|
|
234
|
+
function da(e, t) {
|
|
236
235
|
return e != null && Array.isArray(e) && e.length == t;
|
|
237
236
|
}
|
|
238
|
-
function
|
|
237
|
+
function Te(e, t = 0) {
|
|
239
238
|
return e != null && Array.isArray(e) && e.length > t;
|
|
240
239
|
}
|
|
241
|
-
function
|
|
240
|
+
function un(e) {
|
|
242
241
|
return e == "0001-01-01T00:00:00Z";
|
|
243
242
|
}
|
|
244
|
-
function
|
|
243
|
+
function ha() {
|
|
245
244
|
return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
|
|
246
245
|
}
|
|
247
|
-
function
|
|
246
|
+
function cn() {
|
|
248
247
|
return "0001-01-01T00:00:00Z";
|
|
249
248
|
}
|
|
250
|
-
function
|
|
249
|
+
function ma(e, t) {
|
|
251
250
|
let l = "1", S = 0;
|
|
252
251
|
if (S < t)
|
|
253
252
|
do
|
|
254
253
|
l = l + "0", S += 1;
|
|
255
254
|
while (S < t);
|
|
256
|
-
let
|
|
257
|
-
return Math.round(e *
|
|
255
|
+
let f = Number.parseInt(l);
|
|
256
|
+
return Math.round(e * f) / f;
|
|
258
257
|
}
|
|
259
|
-
function
|
|
258
|
+
function va(e, t) {
|
|
260
259
|
let l = e ?? "";
|
|
261
|
-
return t != null && (
|
|
260
|
+
return t != null && (fn(l, t) ? l = l.split(",").filter((S) => S != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
|
|
262
261
|
}
|
|
263
|
-
function
|
|
262
|
+
function fn(e, t) {
|
|
264
263
|
if (e == null || e.length == 0)
|
|
265
264
|
return !1;
|
|
266
265
|
if (!t)
|
|
267
266
|
return !0;
|
|
268
267
|
var l = e.split(","), S = t.split(",");
|
|
269
|
-
return l.some((
|
|
268
|
+
return l.some((f) => S.some((g) => g == f));
|
|
270
269
|
}
|
|
271
270
|
function Lr(e) {
|
|
272
271
|
if (!e)
|
|
@@ -276,32 +275,32 @@ function Lr(e) {
|
|
|
276
275
|
t = e[S], l[S] = typeof t == "object" ? Lr(t) : t;
|
|
277
276
|
return l;
|
|
278
277
|
}
|
|
279
|
-
function
|
|
278
|
+
function sn(e) {
|
|
280
279
|
return e && Object.keys(e).sort().reduce(function(t, l) {
|
|
281
280
|
let S = e[l];
|
|
282
|
-
return t[l] = typeof S == "object" && S !== null ?
|
|
281
|
+
return t[l] = typeof S == "object" && S !== null ? sn(S) : S, t;
|
|
283
282
|
}, Array.isArray(e) ? [] : {});
|
|
284
283
|
}
|
|
285
|
-
function
|
|
284
|
+
function on(e, t) {
|
|
286
285
|
return t == null ? !0 : e == null ? !1 : e.toLowerCase().includes(t.toLowerCase());
|
|
287
286
|
}
|
|
288
287
|
function tt(e, t = (l) => l) {
|
|
289
288
|
if (e == null)
|
|
290
289
|
return [];
|
|
291
290
|
const l = Array.isArray(e) ? e : t(e);
|
|
292
|
-
return
|
|
293
|
-
S.push(
|
|
294
|
-
const g = tt(
|
|
295
|
-
return
|
|
291
|
+
return Te(l) ? [...l.reduce((S, f) => {
|
|
292
|
+
S.push(f);
|
|
293
|
+
const g = tt(f, t);
|
|
294
|
+
return Te(g) && S.push(...g), S;
|
|
296
295
|
}, [])] : [];
|
|
297
296
|
}
|
|
298
|
-
function
|
|
299
|
-
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0],
|
|
297
|
+
function ga(e) {
|
|
298
|
+
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], f = new Uint8Array(l.length);
|
|
300
299
|
for (let g = 0; g < l.length; g++)
|
|
301
|
-
|
|
302
|
-
return new Blob([
|
|
300
|
+
f[g] = l.charCodeAt(g);
|
|
301
|
+
return new Blob([f], { type: S });
|
|
303
302
|
}
|
|
304
|
-
function
|
|
303
|
+
function dn(e) {
|
|
305
304
|
var t = "";
|
|
306
305
|
if (e) {
|
|
307
306
|
if (e.message && (t = e.message), e.response && e.response.data) {
|
|
@@ -314,27 +313,27 @@ function sn(e) {
|
|
|
314
313
|
}
|
|
315
314
|
return "hmmm no error was supplied";
|
|
316
315
|
}
|
|
317
|
-
function
|
|
316
|
+
function hn() {
|
|
318
317
|
const e = "#" + Math.floor(Math.random() * 16777215).toString(16);
|
|
319
|
-
return e.length !== 7 ?
|
|
318
|
+
return e.length !== 7 ? hn() : e;
|
|
320
319
|
}
|
|
321
|
-
function
|
|
320
|
+
function mn(e, t, l) {
|
|
322
321
|
if (t == null)
|
|
323
322
|
return !0;
|
|
324
323
|
if (e == null || l == null)
|
|
325
324
|
return !1;
|
|
326
|
-
for (let
|
|
327
|
-
const g = l[
|
|
325
|
+
for (let f = 0; f < l.length; f++) {
|
|
326
|
+
const g = l[f];
|
|
328
327
|
var S = Sr(e, g);
|
|
329
|
-
if (S != null && typeof S == "string" &&
|
|
328
|
+
if (S != null && typeof S == "string" && on(S, t))
|
|
330
329
|
return !0;
|
|
331
330
|
}
|
|
332
331
|
return !1;
|
|
333
332
|
}
|
|
334
|
-
function
|
|
333
|
+
function ya(e) {
|
|
335
334
|
return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
|
|
336
335
|
}
|
|
337
|
-
function
|
|
336
|
+
function wa(e = 2e3) {
|
|
338
337
|
return new Promise((t) => {
|
|
339
338
|
setTimeout(() => t(), e);
|
|
340
339
|
});
|
|
@@ -344,15 +343,15 @@ function Sr(e, t) {
|
|
|
344
343
|
return null;
|
|
345
344
|
var l = t.split(".");
|
|
346
345
|
let S = l.length;
|
|
347
|
-
for (var
|
|
348
|
-
if (
|
|
346
|
+
for (var f = e, g = 0; g < S; g++)
|
|
347
|
+
if (f = f[l[g]], f == null)
|
|
349
348
|
return null;
|
|
350
|
-
return
|
|
349
|
+
return f;
|
|
351
350
|
}
|
|
352
|
-
function
|
|
351
|
+
function vn(e) {
|
|
353
352
|
return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
|
|
354
353
|
}
|
|
355
|
-
function
|
|
354
|
+
function gn(e) {
|
|
356
355
|
return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
|
|
357
356
|
}
|
|
358
357
|
function Xe(e) {
|
|
@@ -369,9 +368,9 @@ var nt = { exports: {} };
|
|
|
369
368
|
(function(l) {
|
|
370
369
|
e.exports = l();
|
|
371
370
|
})(function() {
|
|
372
|
-
return function l(S,
|
|
371
|
+
return function l(S, f, g) {
|
|
373
372
|
function x(N, $) {
|
|
374
|
-
if (!
|
|
373
|
+
if (!f[N]) {
|
|
375
374
|
if (!S[N]) {
|
|
376
375
|
var d = typeof Xe == "function" && Xe;
|
|
377
376
|
if (!$ && d)
|
|
@@ -381,26 +380,26 @@ var nt = { exports: {} };
|
|
|
381
380
|
var h = new Error("Cannot find module '" + N + "'");
|
|
382
381
|
throw h.code = "MODULE_NOT_FOUND", h;
|
|
383
382
|
}
|
|
384
|
-
var u =
|
|
383
|
+
var u = f[N] = { exports: {} };
|
|
385
384
|
S[N][0].call(u.exports, function(r) {
|
|
386
385
|
var y = S[N][1][r];
|
|
387
386
|
return x(y || r);
|
|
388
|
-
}, u, u.exports, l, S,
|
|
387
|
+
}, u, u.exports, l, S, f, g);
|
|
389
388
|
}
|
|
390
|
-
return
|
|
389
|
+
return f[N].exports;
|
|
391
390
|
}
|
|
392
|
-
for (var P = typeof Xe == "function" && Xe,
|
|
393
|
-
x(g[
|
|
391
|
+
for (var P = typeof Xe == "function" && Xe, T = 0; T < g.length; T++)
|
|
392
|
+
x(g[T]);
|
|
394
393
|
return x;
|
|
395
|
-
}({ 1: [function(l, S,
|
|
394
|
+
}({ 1: [function(l, S, f) {
|
|
396
395
|
(function(g) {
|
|
397
396
|
var x = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
398
397
|
if (x) {
|
|
399
|
-
var
|
|
398
|
+
var T = 0, N = new x(r), $ = g.document.createTextNode("");
|
|
400
399
|
N.observe($, {
|
|
401
400
|
characterData: !0
|
|
402
401
|
}), P = function() {
|
|
403
|
-
$.data =
|
|
402
|
+
$.data = T = ++T % 2;
|
|
404
403
|
};
|
|
405
404
|
} else if (!g.setImmediate && typeof g.MessageChannel < "u") {
|
|
406
405
|
var d = new g.MessageChannel();
|
|
@@ -431,11 +430,11 @@ var nt = { exports: {} };
|
|
|
431
430
|
u.push(I) === 1 && !h && P();
|
|
432
431
|
}
|
|
433
432
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
434
|
-
}, {}], 2: [function(l, S,
|
|
433
|
+
}, {}], 2: [function(l, S, f) {
|
|
435
434
|
var g = l(1);
|
|
436
435
|
function x() {
|
|
437
436
|
}
|
|
438
|
-
var P = {},
|
|
437
|
+
var P = {}, T = ["REJECTED"], N = ["FULFILLED"], $ = ["PENDING"];
|
|
439
438
|
S.exports = d;
|
|
440
439
|
function d(b) {
|
|
441
440
|
if (typeof b != "function")
|
|
@@ -444,19 +443,19 @@ var nt = { exports: {} };
|
|
|
444
443
|
}
|
|
445
444
|
d.prototype.catch = function(b) {
|
|
446
445
|
return this.then(null, b);
|
|
447
|
-
}, d.prototype.then = function(b,
|
|
448
|
-
if (typeof b != "function" && this.state === N || typeof
|
|
446
|
+
}, d.prototype.then = function(b, _) {
|
|
447
|
+
if (typeof b != "function" && this.state === N || typeof _ != "function" && this.state === T)
|
|
449
448
|
return this;
|
|
450
449
|
var D = new this.constructor(x);
|
|
451
450
|
if (this.state !== $) {
|
|
452
|
-
var L = this.state === N ? b :
|
|
451
|
+
var L = this.state === N ? b : _;
|
|
453
452
|
u(D, L, this.outcome);
|
|
454
453
|
} else
|
|
455
|
-
this.queue.push(new h(D, b,
|
|
454
|
+
this.queue.push(new h(D, b, _));
|
|
456
455
|
return D;
|
|
457
456
|
};
|
|
458
|
-
function h(b,
|
|
459
|
-
this.promise = b, typeof
|
|
457
|
+
function h(b, _, D) {
|
|
458
|
+
this.promise = b, typeof _ == "function" && (this.onFulfilled = _, this.callFulfilled = this.otherCallFulfilled), typeof D == "function" && (this.onRejected = D, this.callRejected = this.otherCallRejected);
|
|
460
459
|
}
|
|
461
460
|
h.prototype.callFulfilled = function(b) {
|
|
462
461
|
P.resolve(this.promise, b);
|
|
@@ -467,61 +466,61 @@ var nt = { exports: {} };
|
|
|
467
466
|
}, h.prototype.otherCallRejected = function(b) {
|
|
468
467
|
u(this.promise, this.onRejected, b);
|
|
469
468
|
};
|
|
470
|
-
function u(b,
|
|
469
|
+
function u(b, _, D) {
|
|
471
470
|
g(function() {
|
|
472
471
|
var L;
|
|
473
472
|
try {
|
|
474
|
-
L =
|
|
475
|
-
} catch (
|
|
476
|
-
return P.reject(b,
|
|
473
|
+
L = _(D);
|
|
474
|
+
} catch (s) {
|
|
475
|
+
return P.reject(b, s);
|
|
477
476
|
}
|
|
478
477
|
L === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, L);
|
|
479
478
|
});
|
|
480
479
|
}
|
|
481
|
-
P.resolve = function(b,
|
|
482
|
-
var D = I(r,
|
|
480
|
+
P.resolve = function(b, _) {
|
|
481
|
+
var D = I(r, _);
|
|
483
482
|
if (D.status === "error")
|
|
484
483
|
return P.reject(b, D.value);
|
|
485
484
|
var L = D.value;
|
|
486
485
|
if (L)
|
|
487
486
|
y(b, L);
|
|
488
487
|
else {
|
|
489
|
-
b.state = N, b.outcome =
|
|
490
|
-
for (var
|
|
491
|
-
b.queue[
|
|
488
|
+
b.state = N, b.outcome = _;
|
|
489
|
+
for (var s = -1, A = b.queue.length; ++s < A; )
|
|
490
|
+
b.queue[s].callFulfilled(_);
|
|
492
491
|
}
|
|
493
492
|
return b;
|
|
494
|
-
}, P.reject = function(b,
|
|
495
|
-
b.state =
|
|
493
|
+
}, P.reject = function(b, _) {
|
|
494
|
+
b.state = T, b.outcome = _;
|
|
496
495
|
for (var D = -1, L = b.queue.length; ++D < L; )
|
|
497
|
-
b.queue[D].callRejected(
|
|
496
|
+
b.queue[D].callRejected(_);
|
|
498
497
|
return b;
|
|
499
498
|
};
|
|
500
499
|
function r(b) {
|
|
501
|
-
var
|
|
502
|
-
if (b && (typeof b == "object" || typeof b == "function") && typeof
|
|
500
|
+
var _ = b && b.then;
|
|
501
|
+
if (b && (typeof b == "object" || typeof b == "function") && typeof _ == "function")
|
|
503
502
|
return function() {
|
|
504
|
-
|
|
503
|
+
_.apply(b, arguments);
|
|
505
504
|
};
|
|
506
505
|
}
|
|
507
|
-
function y(b,
|
|
506
|
+
function y(b, _) {
|
|
508
507
|
var D = !1;
|
|
509
508
|
function L(Q) {
|
|
510
509
|
D || (D = !0, P.reject(b, Q));
|
|
511
510
|
}
|
|
512
|
-
function
|
|
511
|
+
function s(Q) {
|
|
513
512
|
D || (D = !0, P.resolve(b, Q));
|
|
514
513
|
}
|
|
515
514
|
function A() {
|
|
516
|
-
|
|
515
|
+
_(s, L);
|
|
517
516
|
}
|
|
518
517
|
var J = I(A);
|
|
519
518
|
J.status === "error" && L(J.value);
|
|
520
519
|
}
|
|
521
|
-
function I(b,
|
|
520
|
+
function I(b, _) {
|
|
522
521
|
var D = {};
|
|
523
522
|
try {
|
|
524
|
-
D.value = b(
|
|
523
|
+
D.value = b(_), D.status = "success";
|
|
525
524
|
} catch (L) {
|
|
526
525
|
D.status = "error", D.value = L;
|
|
527
526
|
}
|
|
@@ -533,53 +532,53 @@ var nt = { exports: {} };
|
|
|
533
532
|
}
|
|
534
533
|
d.reject = E;
|
|
535
534
|
function E(b) {
|
|
536
|
-
var
|
|
537
|
-
return P.reject(
|
|
535
|
+
var _ = new this(x);
|
|
536
|
+
return P.reject(_, b);
|
|
538
537
|
}
|
|
539
538
|
d.all = w;
|
|
540
539
|
function w(b) {
|
|
541
|
-
var
|
|
540
|
+
var _ = this;
|
|
542
541
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
543
542
|
return this.reject(new TypeError("must be an array"));
|
|
544
543
|
var D = b.length, L = !1;
|
|
545
544
|
if (!D)
|
|
546
545
|
return this.resolve([]);
|
|
547
|
-
for (var
|
|
546
|
+
for (var s = new Array(D), A = 0, J = -1, Q = new this(x); ++J < D; )
|
|
548
547
|
ee(b[J], J);
|
|
549
548
|
return Q;
|
|
550
549
|
function ee(ce, we) {
|
|
551
|
-
|
|
550
|
+
_.resolve(ce).then(W, function(Y) {
|
|
552
551
|
L || (L = !0, P.reject(Q, Y));
|
|
553
552
|
});
|
|
554
553
|
function W(Y) {
|
|
555
|
-
|
|
554
|
+
s[we] = Y, ++A === D && !L && (L = !0, P.resolve(Q, s));
|
|
556
555
|
}
|
|
557
556
|
}
|
|
558
557
|
}
|
|
559
558
|
d.race = M;
|
|
560
559
|
function M(b) {
|
|
561
|
-
var
|
|
560
|
+
var _ = this;
|
|
562
561
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
563
562
|
return this.reject(new TypeError("must be an array"));
|
|
564
563
|
var D = b.length, L = !1;
|
|
565
564
|
if (!D)
|
|
566
565
|
return this.resolve([]);
|
|
567
|
-
for (var
|
|
568
|
-
J(b[
|
|
566
|
+
for (var s = -1, A = new this(x); ++s < D; )
|
|
567
|
+
J(b[s]);
|
|
569
568
|
return A;
|
|
570
569
|
function J(Q) {
|
|
571
|
-
|
|
570
|
+
_.resolve(Q).then(function(ee) {
|
|
572
571
|
L || (L = !0, P.resolve(A, ee));
|
|
573
572
|
}, function(ee) {
|
|
574
573
|
L || (L = !0, P.reject(A, ee));
|
|
575
574
|
});
|
|
576
575
|
}
|
|
577
576
|
}
|
|
578
|
-
}, { 1: 1 }], 3: [function(l, S,
|
|
577
|
+
}, { 1: 1 }], 3: [function(l, S, f) {
|
|
579
578
|
(function(g) {
|
|
580
579
|
typeof g.Promise != "function" && (g.Promise = l(2));
|
|
581
580
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
582
|
-
}, { 2: 2 }], 4: [function(l, S,
|
|
581
|
+
}, { 2: 2 }], 4: [function(l, S, f) {
|
|
583
582
|
var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
584
583
|
return typeof n;
|
|
585
584
|
} : function(n) {
|
|
@@ -605,10 +604,10 @@ var nt = { exports: {} };
|
|
|
605
604
|
return;
|
|
606
605
|
}
|
|
607
606
|
}
|
|
608
|
-
var
|
|
607
|
+
var T = P();
|
|
609
608
|
function N() {
|
|
610
609
|
try {
|
|
611
|
-
if (!
|
|
610
|
+
if (!T || !T.open)
|
|
612
611
|
return !1;
|
|
613
612
|
var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), c = typeof fetch == "function" && fetch.toString().indexOf("[native code") !== -1;
|
|
614
613
|
return (!n || c) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
|
|
@@ -652,7 +651,7 @@ var nt = { exports: {} };
|
|
|
652
651
|
return arguments[arguments.length - 1];
|
|
653
652
|
}
|
|
654
653
|
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, M = "readonly", b = "readwrite";
|
|
655
|
-
function
|
|
654
|
+
function _(n) {
|
|
656
655
|
for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
|
|
657
656
|
m[v] = n.charCodeAt(v);
|
|
658
657
|
return a;
|
|
@@ -675,7 +674,7 @@ var nt = { exports: {} };
|
|
|
675
674
|
return i = c, i;
|
|
676
675
|
});
|
|
677
676
|
}
|
|
678
|
-
function
|
|
677
|
+
function s(n) {
|
|
679
678
|
var c = E[n.name], a = {};
|
|
680
679
|
a.promise = new d(function(m, v) {
|
|
681
680
|
a.resolve = m, a.reject = v;
|
|
@@ -697,12 +696,12 @@ var nt = { exports: {} };
|
|
|
697
696
|
return new d(function(a, m) {
|
|
698
697
|
if (E[n.name] = E[n.name] || ne(), n.db)
|
|
699
698
|
if (c)
|
|
700
|
-
|
|
699
|
+
s(n), n.db.close();
|
|
701
700
|
else
|
|
702
701
|
return a(n.db);
|
|
703
702
|
var v = [n.name];
|
|
704
703
|
c && v.push(n.version);
|
|
705
|
-
var o =
|
|
704
|
+
var o = T.open.apply(T, v);
|
|
706
705
|
c && (o.onupgradeneeded = function(C) {
|
|
707
706
|
var R = o.result;
|
|
708
707
|
try {
|
|
@@ -756,7 +755,7 @@ var nt = { exports: {} };
|
|
|
756
755
|
});
|
|
757
756
|
}
|
|
758
757
|
function Y(n) {
|
|
759
|
-
var c =
|
|
758
|
+
var c = _(atob(n.data));
|
|
760
759
|
return $([c], { type: n.type });
|
|
761
760
|
}
|
|
762
761
|
function H(n) {
|
|
@@ -771,7 +770,7 @@ var nt = { exports: {} };
|
|
|
771
770
|
return u(a, n, n), a;
|
|
772
771
|
}
|
|
773
772
|
function G(n) {
|
|
774
|
-
|
|
773
|
+
s(n);
|
|
775
774
|
for (var c = E[n.name], a = c.forages, m = 0; m < a.length; m++) {
|
|
776
775
|
var v = a[m];
|
|
777
776
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
@@ -1072,7 +1071,7 @@ var nt = { exports: {} };
|
|
|
1072
1071
|
n.storeName ? v = C.then(function(R) {
|
|
1073
1072
|
if (R.objectStoreNames.contains(n.storeName)) {
|
|
1074
1073
|
var B = R.version + 1;
|
|
1075
|
-
|
|
1074
|
+
s(n);
|
|
1076
1075
|
var F = E[n.name], k = F.forages;
|
|
1077
1076
|
R.close();
|
|
1078
1077
|
for (var q = 0; q < k.length; q++) {
|
|
@@ -1080,7 +1079,7 @@ var nt = { exports: {} };
|
|
|
1080
1079
|
Z._dbInfo.db = null, Z._dbInfo.version = B;
|
|
1081
1080
|
}
|
|
1082
1081
|
var p = new d(function(re, ie) {
|
|
1083
|
-
var le =
|
|
1082
|
+
var le = T.open(n.name, B);
|
|
1084
1083
|
le.onerror = function(ye) {
|
|
1085
1084
|
var ze = le.result;
|
|
1086
1085
|
ze.close(), ie(ye);
|
|
@@ -1104,7 +1103,7 @@ var nt = { exports: {} };
|
|
|
1104
1103
|
});
|
|
1105
1104
|
}
|
|
1106
1105
|
}) : v = C.then(function(R) {
|
|
1107
|
-
|
|
1106
|
+
s(n);
|
|
1108
1107
|
var B = E[n.name], F = B.forages;
|
|
1109
1108
|
R.close();
|
|
1110
1109
|
for (var k = 0; k < F.length; k++) {
|
|
@@ -1112,7 +1111,7 @@ var nt = { exports: {} };
|
|
|
1112
1111
|
q._dbInfo.db = null;
|
|
1113
1112
|
}
|
|
1114
1113
|
var Z = new d(function(p, re) {
|
|
1115
|
-
var ie =
|
|
1114
|
+
var ie = T.deleteDatabase(n.name);
|
|
1116
1115
|
ie.onerror = function() {
|
|
1117
1116
|
var le = ie.result;
|
|
1118
1117
|
le && le.close(), re(ie.error);
|
|
@@ -1523,7 +1522,7 @@ var nt = { exports: {} };
|
|
|
1523
1522
|
});
|
|
1524
1523
|
return h(a, n), a;
|
|
1525
1524
|
}
|
|
1526
|
-
function
|
|
1525
|
+
function _t(n, c) {
|
|
1527
1526
|
var a = this;
|
|
1528
1527
|
n = r(n);
|
|
1529
1528
|
var m = a.ready().then(function() {
|
|
@@ -1532,7 +1531,7 @@ var nt = { exports: {} };
|
|
|
1532
1531
|
});
|
|
1533
1532
|
return h(m, c), m;
|
|
1534
1533
|
}
|
|
1535
|
-
function
|
|
1534
|
+
function Tt(n, c) {
|
|
1536
1535
|
var a = this, m = a.ready().then(function() {
|
|
1537
1536
|
for (var v = a._dbInfo, o = v.keyPrefix, C = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
|
|
1538
1537
|
var k = localStorage.key(F);
|
|
@@ -1623,8 +1622,8 @@ var nt = { exports: {} };
|
|
|
1623
1622
|
_driver: "localStorageWrapper",
|
|
1624
1623
|
_initStorage: Dt,
|
|
1625
1624
|
_support: At(),
|
|
1626
|
-
iterate:
|
|
1627
|
-
getItem:
|
|
1625
|
+
iterate: Tt,
|
|
1626
|
+
getItem: _t,
|
|
1628
1627
|
setItem: Lt,
|
|
1629
1628
|
removeItem: Mt,
|
|
1630
1629
|
clear: xt,
|
|
@@ -1805,8 +1804,8 @@ var nt = { exports: {} };
|
|
|
1805
1804
|
}, { 3: 3 }] }, {}, [4])(4);
|
|
1806
1805
|
});
|
|
1807
1806
|
})(nt);
|
|
1808
|
-
var
|
|
1809
|
-
const at = /* @__PURE__ */
|
|
1807
|
+
var yn = nt.exports;
|
|
1808
|
+
const at = /* @__PURE__ */ nn(yn);
|
|
1810
1809
|
let ue;
|
|
1811
1810
|
function lt() {
|
|
1812
1811
|
const e = ue == null ? void 0 : ue.getEnv();
|
|
@@ -1816,17 +1815,17 @@ function Wr() {
|
|
|
1816
1815
|
const e = ue == null ? void 0 : ue.getEnv();
|
|
1817
1816
|
return console.log(`env var: ${e}`), ue == null ? "" : (ue[e] ?? ue.development).auth ?? "";
|
|
1818
1817
|
}
|
|
1819
|
-
function
|
|
1818
|
+
function wn(e) {
|
|
1820
1819
|
const t = ue == null ? void 0 : ue.getEnv();
|
|
1821
1820
|
if (ue == null)
|
|
1822
1821
|
return "";
|
|
1823
1822
|
const l = ue[t] ?? ue.development;
|
|
1824
1823
|
return e == null ? l.data ?? "" : l.other[e] ?? l.data ?? "";
|
|
1825
1824
|
}
|
|
1826
|
-
function
|
|
1825
|
+
function ba() {
|
|
1827
1826
|
return ue;
|
|
1828
1827
|
}
|
|
1829
|
-
function
|
|
1828
|
+
function bn(e) {
|
|
1830
1829
|
return ue = e, ue;
|
|
1831
1830
|
}
|
|
1832
1831
|
let Oe = null;
|
|
@@ -1837,21 +1836,21 @@ function ve() {
|
|
|
1837
1836
|
const e = lt();
|
|
1838
1837
|
return (Oe == null || Oe.config.name != e) && (Oe = at.createInstance({ name: e })), Oe;
|
|
1839
1838
|
}
|
|
1840
|
-
function
|
|
1841
|
-
async function e(
|
|
1839
|
+
function Sa() {
|
|
1840
|
+
async function e(f) {
|
|
1842
1841
|
const g = ve();
|
|
1843
|
-
(await g.keys()).filter((
|
|
1844
|
-
g.removeItem(
|
|
1842
|
+
(await g.keys()).filter((T) => T.startsWith(f)).forEach((T) => {
|
|
1843
|
+
g.removeItem(T);
|
|
1845
1844
|
});
|
|
1846
1845
|
}
|
|
1847
|
-
async function t(
|
|
1848
|
-
return await ve().getItem(
|
|
1846
|
+
async function t(f) {
|
|
1847
|
+
return await ve().getItem(f);
|
|
1849
1848
|
}
|
|
1850
|
-
async function l(
|
|
1851
|
-
return await ve().removeItem(
|
|
1849
|
+
async function l(f) {
|
|
1850
|
+
return await ve().removeItem(f);
|
|
1852
1851
|
}
|
|
1853
|
-
async function S(
|
|
1854
|
-
await ve().setItem(g,
|
|
1852
|
+
async function S(f, g) {
|
|
1853
|
+
await ve().setItem(g, f);
|
|
1855
1854
|
}
|
|
1856
1855
|
return {
|
|
1857
1856
|
clearAsync: e,
|
|
@@ -1861,21 +1860,21 @@ function va() {
|
|
|
1861
1860
|
};
|
|
1862
1861
|
}
|
|
1863
1862
|
let er;
|
|
1864
|
-
function
|
|
1863
|
+
function Aa(e) {
|
|
1865
1864
|
return er(e)();
|
|
1866
1865
|
}
|
|
1867
1866
|
function Le(e) {
|
|
1868
1867
|
return er(e);
|
|
1869
1868
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return er = (t) =>
|
|
1869
|
+
function Sn(e) {
|
|
1870
|
+
return er = (t) => An({
|
|
1872
1871
|
...e,
|
|
1873
1872
|
...t
|
|
1874
1873
|
}), er;
|
|
1875
1874
|
}
|
|
1876
|
-
function
|
|
1877
|
-
var t, l, S,
|
|
1878
|
-
if (e.storeMode ?? (e.storeMode = ((l = (t = e.navigation) == null ? void 0 : t.findItem(e.nav)) == null ? void 0 : l.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((
|
|
1875
|
+
function An(e) {
|
|
1876
|
+
var t, l, S, f, g;
|
|
1877
|
+
if (e.storeMode ?? (e.storeMode = ((l = (t = e.navigation) == null ? void 0 : t.findItem(e.nav)) == null ? void 0 : l.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((f = (S = e.navigation) == null ? void 0 : S.findItem(e.nav)) == null ? void 0 : f.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((g = e.navigation) == null ? void 0 : g.findStoreName(e.nav)) ?? e.nav), e.storeName == null)
|
|
1879
1878
|
throw new Error("no store name provided");
|
|
1880
1879
|
if (e.storeMode == "whole-last-updated") {
|
|
1881
1880
|
if (e.api == null)
|
|
@@ -1886,23 +1885,23 @@ function bn(e) {
|
|
|
1886
1885
|
throw new Error("Must supply an api object to use store");
|
|
1887
1886
|
return qr({ ...e, storeName: e.storeName ?? "" });
|
|
1888
1887
|
} else
|
|
1889
|
-
return
|
|
1888
|
+
return In({ ...e, storeName: e.storeName ?? "" });
|
|
1890
1889
|
}
|
|
1891
|
-
const
|
|
1890
|
+
const En = (e) => {
|
|
1892
1891
|
let t = K(e.url) ?? void 0;
|
|
1893
1892
|
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Be(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Be(t, e.id)), e.params != null) {
|
|
1894
1893
|
t ?? (t = "");
|
|
1895
1894
|
let l = new URLSearchParams();
|
|
1896
|
-
Object.entries(e.params).sort(Ue.firstBy((
|
|
1897
|
-
|
|
1895
|
+
Object.entries(e.params).sort(Ue.firstBy((f) => f[0])).forEach((f) => {
|
|
1896
|
+
f[1] != null && l.append(f[0], f[1].toString());
|
|
1898
1897
|
}), t = `${t}?${l.toString()}`;
|
|
1899
1898
|
}
|
|
1900
1899
|
return e.finalUrl = t, e.finalUrl ?? "";
|
|
1901
1900
|
};
|
|
1902
|
-
function
|
|
1901
|
+
function In(e) {
|
|
1903
1902
|
return pr(e.storeName, () => {
|
|
1904
1903
|
var u;
|
|
1905
|
-
const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}),
|
|
1904
|
+
const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), f = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? En;
|
|
1906
1905
|
function x(r) {
|
|
1907
1906
|
var i, E;
|
|
1908
1907
|
let y = "";
|
|
@@ -1914,7 +1913,7 @@ function An(e) {
|
|
|
1914
1913
|
const y = x(r), I = r.refresh;
|
|
1915
1914
|
if (!I && l.value[y] !== void 0)
|
|
1916
1915
|
return l.value[y];
|
|
1917
|
-
if (!I &&
|
|
1916
|
+
if (!I && f == !0) {
|
|
1918
1917
|
const i = await ve().getItem(y);
|
|
1919
1918
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1920
1919
|
return l.value[y] = i, i;
|
|
@@ -1926,15 +1925,15 @@ function An(e) {
|
|
|
1926
1925
|
i == null && (i = new Promise(async (w, M) => {
|
|
1927
1926
|
var b;
|
|
1928
1927
|
try {
|
|
1929
|
-
const
|
|
1928
|
+
const _ = await ((b = e.api) == null ? void 0 : b.getAll(r)), D = {
|
|
1930
1929
|
meta: { storedOn: t.toString() },
|
|
1931
|
-
data:
|
|
1932
|
-
count:
|
|
1933
|
-
filters: (
|
|
1930
|
+
data: _ == null ? void 0 : _.data,
|
|
1931
|
+
count: _ == null ? void 0 : _.count,
|
|
1932
|
+
filters: (_ == null ? void 0 : _.filters) ?? []
|
|
1934
1933
|
};
|
|
1935
|
-
|
|
1936
|
-
} catch (
|
|
1937
|
-
M(
|
|
1934
|
+
f == !0 && await ve().setItem(y, D), w(D);
|
|
1935
|
+
} catch (_) {
|
|
1936
|
+
M(_);
|
|
1938
1937
|
} finally {
|
|
1939
1938
|
delete S.value[y];
|
|
1940
1939
|
}
|
|
@@ -1949,12 +1948,12 @@ function An(e) {
|
|
|
1949
1948
|
throw i;
|
|
1950
1949
|
}
|
|
1951
1950
|
}
|
|
1952
|
-
async function
|
|
1951
|
+
async function T(r) {
|
|
1953
1952
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1954
1953
|
const y = x(r), I = r.refresh;
|
|
1955
1954
|
if (!I && l.value[y] !== void 0)
|
|
1956
1955
|
return l.value[y];
|
|
1957
|
-
if (!I &&
|
|
1956
|
+
if (!I && f == !0) {
|
|
1958
1957
|
const i = await ve().getItem(y);
|
|
1959
1958
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1960
1959
|
return l.value[y] = i, { data: i.data };
|
|
@@ -1966,14 +1965,14 @@ function An(e) {
|
|
|
1966
1965
|
i == null && (i = new Promise(async (w, M) => {
|
|
1967
1966
|
var b;
|
|
1968
1967
|
try {
|
|
1969
|
-
let
|
|
1968
|
+
let _ = await ((b = e.api) == null ? void 0 : b.get(r));
|
|
1970
1969
|
const D = {
|
|
1971
1970
|
meta: { storedOn: t.toString() },
|
|
1972
|
-
data:
|
|
1971
|
+
data: _ == null ? void 0 : _.data
|
|
1973
1972
|
};
|
|
1974
|
-
|
|
1975
|
-
} catch (
|
|
1976
|
-
M(
|
|
1973
|
+
f == !0 && await ve().setItem(y, D), w(D);
|
|
1974
|
+
} catch (_) {
|
|
1975
|
+
M(_);
|
|
1977
1976
|
} finally {
|
|
1978
1977
|
delete S.value[y];
|
|
1979
1978
|
}
|
|
@@ -2003,12 +2002,12 @@ function An(e) {
|
|
|
2003
2002
|
meta: { storedOn: t.toString() },
|
|
2004
2003
|
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
|
|
2005
2004
|
};
|
|
2006
|
-
return l.value[y] = E,
|
|
2005
|
+
return l.value[y] = E, f == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((M) => {
|
|
2007
2006
|
const b = M[1].data;
|
|
2008
2007
|
if (b != null)
|
|
2009
2008
|
if (Array.isArray(b))
|
|
2010
|
-
for (let
|
|
2011
|
-
b[
|
|
2009
|
+
for (let _ = 0; _ < b.length; _++)
|
|
2010
|
+
b[_].id == I.id && b.splice(_, 1, E.data);
|
|
2012
2011
|
else
|
|
2013
2012
|
b.id == I.id && (l.value[M[0]] = E);
|
|
2014
2013
|
}), E.data;
|
|
@@ -2033,7 +2032,7 @@ function An(e) {
|
|
|
2033
2032
|
meta: { storedOn: t.toString() },
|
|
2034
2033
|
data: I
|
|
2035
2034
|
};
|
|
2036
|
-
return
|
|
2035
|
+
return f == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
|
|
2037
2036
|
}
|
|
2038
2037
|
return I;
|
|
2039
2038
|
}
|
|
@@ -2059,7 +2058,7 @@ function An(e) {
|
|
|
2059
2058
|
M[b].id == I && M.splice(b, 1);
|
|
2060
2059
|
else
|
|
2061
2060
|
delete l.value[w[0]];
|
|
2062
|
-
}),
|
|
2061
|
+
}), f == !0 && await ve().removeItem(y);
|
|
2063
2062
|
}
|
|
2064
2063
|
async function h(r) {
|
|
2065
2064
|
if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
|
|
@@ -2072,7 +2071,7 @@ function An(e) {
|
|
|
2072
2071
|
}
|
|
2073
2072
|
return {
|
|
2074
2073
|
deleteItem: d,
|
|
2075
|
-
get:
|
|
2074
|
+
get: T,
|
|
2076
2075
|
getAll: P,
|
|
2077
2076
|
patch: N,
|
|
2078
2077
|
post: $,
|
|
@@ -2084,13 +2083,13 @@ function An(e) {
|
|
|
2084
2083
|
}
|
|
2085
2084
|
function qr(e) {
|
|
2086
2085
|
return pr(e.storeName, () => {
|
|
2087
|
-
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600,
|
|
2088
|
-
function
|
|
2086
|
+
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, f = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
|
|
2087
|
+
function T() {
|
|
2089
2088
|
var i;
|
|
2090
2089
|
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
2091
2090
|
}
|
|
2092
2091
|
async function N() {
|
|
2093
|
-
P == !0 && await ve().setItem(
|
|
2092
|
+
P == !0 && await ve().setItem(T(), {
|
|
2094
2093
|
meta: g.value,
|
|
2095
2094
|
data: t.value,
|
|
2096
2095
|
count: l.value,
|
|
@@ -2098,21 +2097,21 @@ function qr(e) {
|
|
|
2098
2097
|
});
|
|
2099
2098
|
}
|
|
2100
2099
|
function $(i) {
|
|
2101
|
-
const E =
|
|
2100
|
+
const E = T();
|
|
2102
2101
|
return x.value[E] || (x.value[E] = new Promise(async (w, M) => {
|
|
2103
|
-
var b,
|
|
2102
|
+
var b, _;
|
|
2104
2103
|
try {
|
|
2105
|
-
let D = await ((
|
|
2104
|
+
let D = await ((_ = e.api) == null ? void 0 : _.getAll({
|
|
2106
2105
|
additionalUrl: "/getAll",
|
|
2107
2106
|
nav: i.nav,
|
|
2108
2107
|
params: {
|
|
2109
|
-
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ??
|
|
2108
|
+
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? cn()
|
|
2110
2109
|
}
|
|
2111
2110
|
}));
|
|
2112
2111
|
D == null ? M(D) : (t.value ?? (t.value = []), D.data.forEach((L) => {
|
|
2113
2112
|
var A, J;
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2113
|
+
const s = t.value.findIndex((Q) => Q.id == L.id);
|
|
2114
|
+
s >= 0 ? (A = t.value) == null || A.splice(s, 1, L) : (J = t.value) == null || J.push(L);
|
|
2116
2115
|
}), l.value = t.value.length, g.value = {
|
|
2117
2116
|
lastUpdate: he.utc().toString(),
|
|
2118
2117
|
storedOn: S.toString()
|
|
@@ -2125,8 +2124,8 @@ function qr(e) {
|
|
|
2125
2124
|
})), x.value[E];
|
|
2126
2125
|
}
|
|
2127
2126
|
async function d(i) {
|
|
2128
|
-
var M, b,
|
|
2129
|
-
const E =
|
|
2127
|
+
var M, b, _;
|
|
2128
|
+
const E = T(), w = i.refresh;
|
|
2130
2129
|
if (!w && t.value != null)
|
|
2131
2130
|
return {
|
|
2132
2131
|
count: (M = t.value) == null ? void 0 : M.length,
|
|
@@ -2136,7 +2135,7 @@ function qr(e) {
|
|
|
2136
2135
|
if (!w && P == !0) {
|
|
2137
2136
|
const D = await ve().getItem(E);
|
|
2138
2137
|
if (D != null && parseFloat(D.meta.storedOn) > S - 7)
|
|
2139
|
-
return t.value = D.data, l.value = D.data.length,
|
|
2138
|
+
return t.value = D.data, l.value = D.data.length, f.value = D.filters ?? [], g.value = D.meta, {
|
|
2140
2139
|
count: (b = t.value) == null ? void 0 : b.length,
|
|
2141
2140
|
data: t.value ?? [],
|
|
2142
2141
|
filters: []
|
|
@@ -2144,9 +2143,9 @@ function qr(e) {
|
|
|
2144
2143
|
}
|
|
2145
2144
|
if (e.api == null)
|
|
2146
2145
|
return {
|
|
2147
|
-
count: (
|
|
2146
|
+
count: (_ = t.value) == null ? void 0 : _.length,
|
|
2148
2147
|
data: t.value ?? [],
|
|
2149
|
-
filters:
|
|
2148
|
+
filters: f.value
|
|
2150
2149
|
};
|
|
2151
2150
|
t.value ?? (t.value = []);
|
|
2152
2151
|
try {
|
|
@@ -2157,34 +2156,34 @@ function qr(e) {
|
|
|
2157
2156
|
}
|
|
2158
2157
|
}
|
|
2159
2158
|
async function h(i) {
|
|
2160
|
-
var b,
|
|
2161
|
-
const E =
|
|
2159
|
+
var b, _, D, L;
|
|
2160
|
+
const E = T(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
|
|
2162
2161
|
if (w == null)
|
|
2163
2162
|
throw new Error("no id provided");
|
|
2164
2163
|
let M = i.refresh;
|
|
2165
2164
|
if (!M && t.value != null) {
|
|
2166
|
-
const
|
|
2167
|
-
if (
|
|
2168
|
-
return { data:
|
|
2165
|
+
const s = t.value.find((A) => A.id == w);
|
|
2166
|
+
if (s != null)
|
|
2167
|
+
return { data: s };
|
|
2169
2168
|
}
|
|
2170
2169
|
if (!M && P == !0) {
|
|
2171
|
-
const
|
|
2172
|
-
if (
|
|
2173
|
-
t.value =
|
|
2174
|
-
let A = (
|
|
2170
|
+
const s = await ve().getItem(E);
|
|
2171
|
+
if (s != null && parseFloat(s.meta.storedOn) > S - 12) {
|
|
2172
|
+
t.value = s.data, l.value = s.data.length, f.value = s.filters ?? [], g.value = s.meta;
|
|
2173
|
+
let A = (_ = t.value) == null ? void 0 : _.find((J) => J.id == i.id);
|
|
2175
2174
|
if (A != null)
|
|
2176
2175
|
return { data: A };
|
|
2177
2176
|
}
|
|
2178
2177
|
}
|
|
2179
2178
|
if (e.api == null)
|
|
2180
2179
|
return {
|
|
2181
|
-
data: (D = t.value) == null ? void 0 : D.find((
|
|
2180
|
+
data: (D = t.value) == null ? void 0 : D.find((s) => s.id == i.id)
|
|
2182
2181
|
};
|
|
2183
2182
|
t.value ?? (t.value = []);
|
|
2184
2183
|
try {
|
|
2185
|
-
return await $(i), { data: (L = t.value) == null ? void 0 : L.find((
|
|
2186
|
-
} catch (
|
|
2187
|
-
let A =
|
|
2184
|
+
return await $(i), { data: (L = t.value) == null ? void 0 : L.find((s) => s.id == i.id) };
|
|
2185
|
+
} catch (s) {
|
|
2186
|
+
let A = s;
|
|
2188
2187
|
throw new Error(A.message ?? "Problem");
|
|
2189
2188
|
}
|
|
2190
2189
|
}
|
|
@@ -2194,19 +2193,19 @@ function qr(e) {
|
|
|
2194
2193
|
let E;
|
|
2195
2194
|
if (e.api != null)
|
|
2196
2195
|
try {
|
|
2197
|
-
let
|
|
2198
|
-
E = { ...i.data, ...
|
|
2199
|
-
} catch (
|
|
2200
|
-
let D =
|
|
2196
|
+
let _ = await e.api.patch(i);
|
|
2197
|
+
E = { ...i.data, ..._ == null ? void 0 : _.data };
|
|
2198
|
+
} catch (_) {
|
|
2199
|
+
let D = _;
|
|
2201
2200
|
throw new Error(D.message ?? "Patch Problem");
|
|
2202
2201
|
}
|
|
2203
2202
|
else
|
|
2204
2203
|
E = i.data;
|
|
2205
2204
|
if (E != null) {
|
|
2206
|
-
let
|
|
2207
|
-
|
|
2205
|
+
let _ = (w = t.value) == null ? void 0 : w.findIndex((D) => D.id == E.id);
|
|
2206
|
+
_ != null && _ >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(_, 1, E), await N());
|
|
2208
2207
|
}
|
|
2209
|
-
return (b = t.value) == null ? void 0 : b.find((
|
|
2208
|
+
return (b = t.value) == null ? void 0 : b.find((_) => _.id == (i.id ?? i.data.id));
|
|
2210
2209
|
}
|
|
2211
2210
|
async function r(i) {
|
|
2212
2211
|
var w, M;
|
|
@@ -2217,8 +2216,8 @@ function qr(e) {
|
|
|
2217
2216
|
let b = await e.api.post(i);
|
|
2218
2217
|
E = b == null ? void 0 : b.data;
|
|
2219
2218
|
} catch (b) {
|
|
2220
|
-
let
|
|
2221
|
-
throw new Error(
|
|
2219
|
+
let _ = b;
|
|
2220
|
+
throw new Error(_.message ?? "Patch Problem");
|
|
2222
2221
|
}
|
|
2223
2222
|
else
|
|
2224
2223
|
E = i.data;
|
|
@@ -2232,12 +2231,12 @@ function qr(e) {
|
|
|
2232
2231
|
if (b != null)
|
|
2233
2232
|
return b;
|
|
2234
2233
|
} catch (b) {
|
|
2235
|
-
let
|
|
2236
|
-
throw new Error(
|
|
2234
|
+
let _ = b;
|
|
2235
|
+
throw new Error(_.message ?? "Patch Problem");
|
|
2237
2236
|
}
|
|
2238
2237
|
const E = i.id ?? i.data.id;
|
|
2239
2238
|
if (E != null) {
|
|
2240
|
-
let b = (w = t.value) == null ? void 0 : w.findIndex((
|
|
2239
|
+
let b = (w = t.value) == null ? void 0 : w.findIndex((_) => _.id == E);
|
|
2241
2240
|
b != null && b >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(b, 1), await N());
|
|
2242
2241
|
}
|
|
2243
2242
|
}
|
|
@@ -2272,8 +2271,8 @@ let Ar;
|
|
|
2272
2271
|
function Er() {
|
|
2273
2272
|
return Ar;
|
|
2274
2273
|
}
|
|
2275
|
-
function
|
|
2276
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? x,
|
|
2274
|
+
function Dn(e) {
|
|
2275
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? x, f = e == null ? void 0 : e.demo;
|
|
2277
2276
|
function g(u) {
|
|
2278
2277
|
let r = new URLSearchParams();
|
|
2279
2278
|
return Object.entries(u).forEach((y) => {
|
|
@@ -2291,11 +2290,11 @@ function En(e) {
|
|
|
2291
2290
|
let r = { ...u.headers };
|
|
2292
2291
|
return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.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 ${(I = e == null ? void 0 : e.auth) == null ? void 0 : I.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
2293
2292
|
}
|
|
2294
|
-
async function
|
|
2293
|
+
async function T(u) {
|
|
2295
2294
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2296
2295
|
let i = u.finalUrl, E = u.headers;
|
|
2297
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2298
|
-
return console.log(`DEMO: Get from ${i}`),
|
|
2296
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
|
|
2297
|
+
return console.log(`DEMO: Get from ${i}`), f.get(u);
|
|
2299
2298
|
console.log(`Get from ${i}`);
|
|
2300
2299
|
let w;
|
|
2301
2300
|
try {
|
|
@@ -2329,8 +2328,8 @@ function En(e) {
|
|
|
2329
2328
|
async function N(u) {
|
|
2330
2329
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2331
2330
|
let i = u.finalUrl, E = u.headers;
|
|
2332
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2333
|
-
return console.log(`DEMO: Get all from ${i}`),
|
|
2331
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
|
|
2332
|
+
return console.log(`DEMO: Get all from ${i}`), f.getAll(u);
|
|
2334
2333
|
console.log(`Get all from ${i}`);
|
|
2335
2334
|
let w;
|
|
2336
2335
|
try {
|
|
@@ -2364,8 +2363,8 @@ function En(e) {
|
|
|
2364
2363
|
async function $(u) {
|
|
2365
2364
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2366
2365
|
let i = u.finalUrl, E = u.headers;
|
|
2367
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2368
|
-
return console.log(`DEMO: Post to ${i}`),
|
|
2366
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
|
|
2367
|
+
return console.log(`DEMO: Post to ${i}`), f.post(u);
|
|
2369
2368
|
console.log(`Post to ${i}`);
|
|
2370
2369
|
let w;
|
|
2371
2370
|
try {
|
|
@@ -2400,8 +2399,8 @@ function En(e) {
|
|
|
2400
2399
|
async function d(u) {
|
|
2401
2400
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2402
2401
|
let i = u.finalUrl, E = u.headers;
|
|
2403
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2404
|
-
return console.log(`DEMO: Patch to ${i}`),
|
|
2402
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
|
|
2403
|
+
return console.log(`DEMO: Patch to ${i}`), f.patch(u);
|
|
2405
2404
|
console.log(`Patch to ${i}`);
|
|
2406
2405
|
let w;
|
|
2407
2406
|
try {
|
|
@@ -2436,8 +2435,8 @@ function En(e) {
|
|
|
2436
2435
|
async function h(u) {
|
|
2437
2436
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
2438
2437
|
let y = u.finalUrl, I = u.headers;
|
|
2439
|
-
if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)),
|
|
2440
|
-
return console.log(`DEMO: Delete ${y}`),
|
|
2438
|
+
if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)), f != null && f.isDemoing.value)
|
|
2439
|
+
return console.log(`DEMO: Delete ${y}`), f.deleteItem(u);
|
|
2441
2440
|
console.log(`Delete ${y}`);
|
|
2442
2441
|
let i;
|
|
2443
2442
|
try {
|
|
@@ -2466,14 +2465,14 @@ function En(e) {
|
|
|
2466
2465
|
buildQuery: l,
|
|
2467
2466
|
buildUrl: S,
|
|
2468
2467
|
deleteItem: h,
|
|
2469
|
-
get:
|
|
2468
|
+
get: T,
|
|
2470
2469
|
getAll: N,
|
|
2471
2470
|
patch: d,
|
|
2472
2471
|
post: $
|
|
2473
2472
|
}, Ar;
|
|
2474
2473
|
}
|
|
2475
2474
|
function ut(e) {
|
|
2476
|
-
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading:
|
|
2475
|
+
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: f, doAction: g, logError: x } = tn(e);
|
|
2477
2476
|
function P(r) {
|
|
2478
2477
|
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);
|
|
2479
2478
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
@@ -2497,7 +2496,7 @@ function ut(e) {
|
|
|
2497
2496
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2498
2497
|
});
|
|
2499
2498
|
}
|
|
2500
|
-
function
|
|
2499
|
+
function T(r) {
|
|
2501
2500
|
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);
|
|
2502
2501
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2503
2502
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
@@ -2593,8 +2592,8 @@ function ut(e) {
|
|
|
2593
2592
|
deleteItem: P,
|
|
2594
2593
|
doAction: g,
|
|
2595
2594
|
getAllItems: N,
|
|
2596
|
-
getItem:
|
|
2597
|
-
isLoading:
|
|
2595
|
+
getItem: T,
|
|
2596
|
+
isLoading: f,
|
|
2598
2597
|
logError: x,
|
|
2599
2598
|
restoreItem: $,
|
|
2600
2599
|
saveItem: d
|
|
@@ -2602,17 +2601,17 @@ function ut(e) {
|
|
|
2602
2601
|
}
|
|
2603
2602
|
let hr = "Australia/Melbourne", Ir;
|
|
2604
2603
|
const Hr = "auth-credentials-state";
|
|
2605
|
-
function
|
|
2604
|
+
function xn() {
|
|
2606
2605
|
return Ir;
|
|
2607
2606
|
}
|
|
2608
|
-
function
|
|
2607
|
+
function _n(e) {
|
|
2609
2608
|
const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
|
|
2610
2609
|
let l = z(localStorage.getItem(Hr) ?? "");
|
|
2611
2610
|
l.value.length == 0 && S();
|
|
2612
2611
|
function S() {
|
|
2613
2612
|
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
|
|
2614
2613
|
}
|
|
2615
|
-
const
|
|
2614
|
+
const f = jt("auth-credentials", {});
|
|
2616
2615
|
function g(D) {
|
|
2617
2616
|
if (D == null)
|
|
2618
2617
|
return !0;
|
|
@@ -2621,10 +2620,10 @@ function Dn(e) {
|
|
|
2621
2620
|
return !1;
|
|
2622
2621
|
if (L.requiresAuth === !1)
|
|
2623
2622
|
return !0;
|
|
2624
|
-
const
|
|
2625
|
-
if (
|
|
2623
|
+
const s = K(f);
|
|
2624
|
+
if (s.isSuspended && L.ignoreSuspension !== !0)
|
|
2626
2625
|
return !1;
|
|
2627
|
-
if (
|
|
2626
|
+
if (s.isGlobalAdmin)
|
|
2628
2627
|
return !0;
|
|
2629
2628
|
if (L.permissions != null) {
|
|
2630
2629
|
for (var A = 0; A < L.permissions.length; A++)
|
|
@@ -2634,11 +2633,11 @@ function Dn(e) {
|
|
|
2634
2633
|
return !0;
|
|
2635
2634
|
}
|
|
2636
2635
|
function x(D) {
|
|
2637
|
-
const L = K(
|
|
2636
|
+
const L = K(f);
|
|
2638
2637
|
if (L.userPermissions != null)
|
|
2639
|
-
for (var
|
|
2640
|
-
var A = L.userPermissions[
|
|
2641
|
-
if (L.userPermissions[
|
|
2638
|
+
for (var s = 0; s < L.userPermissions.length; s++) {
|
|
2639
|
+
var A = L.userPermissions[s].split(".");
|
|
2640
|
+
if (L.userPermissions[s] == "everything.edit" || D == A[0] && A.length > 1 && A[1] == "edit")
|
|
2642
2641
|
return !0;
|
|
2643
2642
|
}
|
|
2644
2643
|
return !1;
|
|
@@ -2651,89 +2650,89 @@ function Dn(e) {
|
|
|
2651
2650
|
return !1;
|
|
2652
2651
|
if (L.requiresAuth === !1)
|
|
2653
2652
|
return !0;
|
|
2654
|
-
const
|
|
2655
|
-
if (
|
|
2653
|
+
const s = K(f);
|
|
2654
|
+
if (s.isSuspended && L.ignoreSuspension !== !0)
|
|
2656
2655
|
return !1;
|
|
2657
|
-
if (
|
|
2656
|
+
if (s.isGlobalAdmin)
|
|
2658
2657
|
return !0;
|
|
2659
2658
|
if (L.permissions != null) {
|
|
2660
2659
|
for (var A = 0; A < L.permissions.length; A++)
|
|
2661
|
-
if (!
|
|
2660
|
+
if (!T(L.permissions[A]))
|
|
2662
2661
|
return !1;
|
|
2663
2662
|
}
|
|
2664
2663
|
return !0;
|
|
2665
2664
|
}
|
|
2666
|
-
function
|
|
2667
|
-
const L = K(
|
|
2665
|
+
function T(D) {
|
|
2666
|
+
const L = K(f);
|
|
2668
2667
|
if (L.userPermissions != null)
|
|
2669
|
-
for (var
|
|
2670
|
-
var A = L.userPermissions[
|
|
2671
|
-
if (D == A[0] || D == "everything" || L.userPermissions[
|
|
2668
|
+
for (var s = 0; s < L.userPermissions.length; s++) {
|
|
2669
|
+
var A = L.userPermissions[s].split(".");
|
|
2670
|
+
if (D == A[0] || D == "everything" || L.userPermissions[s] == "everything.view" || L.userPermissions[s] == "everything.edit")
|
|
2672
2671
|
return !0;
|
|
2673
2672
|
}
|
|
2674
2673
|
return !1;
|
|
2675
2674
|
}
|
|
2676
|
-
function N(D, L,
|
|
2675
|
+
function N(D, L, s) {
|
|
2677
2676
|
let A = !0;
|
|
2678
|
-
return K(
|
|
2679
|
-
|
|
2677
|
+
return K(f).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((Q) => {
|
|
2678
|
+
s == "edit" ? x(Q) || (A = !1) : T(Q) || (A = !1);
|
|
2680
2679
|
}), D != null && D.length > 0 && (D.some((Q) => u(Q)) || (A = !1)), A);
|
|
2681
2680
|
}
|
|
2682
2681
|
function $(D, L = !1) {
|
|
2683
|
-
var
|
|
2682
|
+
var s = e.getAuthItem != null ? e.getAuthItem(D) : null;
|
|
2684
2683
|
let A = !1;
|
|
2685
|
-
if (
|
|
2684
|
+
if (s == null)
|
|
2686
2685
|
return !1;
|
|
2687
|
-
let J =
|
|
2688
|
-
return ee || !L || !
|
|
2686
|
+
let J = s.subscriptions ?? [], Q = s.permissions ?? [], ee = N(J, Q, "view");
|
|
2687
|
+
return ee || !L || !Te(s.children) ? ee : ((s == null ? void 0 : s.children) != null && s.children.forEach((ce) => {
|
|
2689
2688
|
$(ce, !0) && (A = !0);
|
|
2690
2689
|
}), A);
|
|
2691
2690
|
}
|
|
2692
2691
|
function d(D) {
|
|
2693
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L,
|
|
2694
|
-
const A = Be(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${
|
|
2692
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L, s) => {
|
|
2693
|
+
const A = Be(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
|
|
2695
2694
|
return L ? `${A}&redirect_path=${L}` : A;
|
|
2696
2695
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(D, l.value) ?? "" : "";
|
|
2697
2696
|
}
|
|
2698
2697
|
function h(D) {
|
|
2699
|
-
var
|
|
2700
|
-
return D == null ? 0 : ((
|
|
2698
|
+
var s;
|
|
2699
|
+
return D == null ? 0 : ((s = (e.subscriptionOptions ?? []).find((A) => A.code == D)) == null ? void 0 : s.value) ?? 0;
|
|
2701
2700
|
}
|
|
2702
2701
|
function u(D) {
|
|
2703
|
-
const L = K(
|
|
2702
|
+
const L = K(f);
|
|
2704
2703
|
if (L.subscriptionCode == null)
|
|
2705
2704
|
return !1;
|
|
2706
2705
|
if (L.subscriptionCode == D)
|
|
2707
2706
|
return !0;
|
|
2708
|
-
const
|
|
2709
|
-
return
|
|
2707
|
+
const s = h(D), A = h(L.subscriptionCode);
|
|
2708
|
+
return s <= A;
|
|
2710
2709
|
}
|
|
2711
2710
|
function r(D) {
|
|
2712
|
-
const
|
|
2713
|
-
atob(
|
|
2711
|
+
const s = D.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
|
|
2712
|
+
atob(s).split("").map(function(J) {
|
|
2714
2713
|
return "%" + ("00" + J.charCodeAt(0).toString(16)).slice(-2);
|
|
2715
2714
|
}).join("")
|
|
2716
2715
|
);
|
|
2717
2716
|
return JSON.parse(A);
|
|
2718
2717
|
}
|
|
2719
2718
|
function y(D, L) {
|
|
2720
|
-
|
|
2719
|
+
f.value = void 0, M(), D != null && L != null && L.currentRoute.value.path != D && L.push({ path: D });
|
|
2721
2720
|
}
|
|
2722
2721
|
function I(D) {
|
|
2723
|
-
var
|
|
2724
|
-
K(
|
|
2722
|
+
var s;
|
|
2723
|
+
K(f).isLoggedIn || ((s = e.demo) == null || s.endDemo(), _() && (y(), window.location.href = d(D)));
|
|
2725
2724
|
}
|
|
2726
2725
|
async function i(D, L) {
|
|
2727
2726
|
return e.getToken ?? (e.getToken = async () => {
|
|
2728
|
-
let
|
|
2729
|
-
if (
|
|
2727
|
+
let s = D, A = L, J = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
|
|
2728
|
+
if (s == null || A == null)
|
|
2730
2729
|
throw new Error("Code and State required in OAuth token process");
|
|
2731
2730
|
if (A != l.value)
|
|
2732
2731
|
throw new Error("state does not match");
|
|
2733
2732
|
let ee = "";
|
|
2734
|
-
e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")), ee = e.getTokenUrl(
|
|
2733
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")), ee = e.getTokenUrl(s, `${window.location.origin}/authentication`, J, Q);
|
|
2735
2734
|
const ce = {};
|
|
2736
|
-
ce.grant_type = J, ce.code =
|
|
2735
|
+
ce.grant_type = J, ce.code = s, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
|
|
2737
2736
|
const W = await Er().post({
|
|
2738
2737
|
additionalUrl: ee,
|
|
2739
2738
|
data: ce
|
|
@@ -2744,93 +2743,93 @@ function Dn(e) {
|
|
|
2744
2743
|
function E(D) {
|
|
2745
2744
|
if (D != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2746
2745
|
const L = r(D);
|
|
2747
|
-
w(L, D), e.processTokenPayload != null && e.processTokenPayload(
|
|
2746
|
+
w(L, D), e.processTokenPayload != null && e.processTokenPayload(f, L);
|
|
2748
2747
|
}
|
|
2749
2748
|
}
|
|
2750
2749
|
function w(D, L) {
|
|
2751
2750
|
var A;
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2751
|
+
const s = f.value;
|
|
2752
|
+
s.expiresOn = D.ExpiresOn, s.isGlobalAdmin = D.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = D.Permissions, s.subscriptionCode = D.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? hr), s.token = L, s.userID = D.UserLoginID, s.userPermissions = ((A = D.Permissions) == null ? void 0 : A.split(",")) ?? [];
|
|
2754
2753
|
}
|
|
2755
2754
|
function M() {
|
|
2756
2755
|
var D;
|
|
2757
|
-
|
|
2756
|
+
f.value ?? (f.value = {}), (D = f.value).timeZone ?? (D.timeZone = e.defaultTimeZone ?? hr);
|
|
2758
2757
|
}
|
|
2759
2758
|
function b() {
|
|
2760
|
-
const D = K(
|
|
2761
|
-
return D.isLoggedIn &&
|
|
2759
|
+
const D = K(f);
|
|
2760
|
+
return D.isLoggedIn && _() && (y(), window.location.href = d()), D.isLoggedIn;
|
|
2762
2761
|
}
|
|
2763
|
-
function
|
|
2764
|
-
const D = K(
|
|
2762
|
+
function _() {
|
|
2763
|
+
const D = K(f);
|
|
2765
2764
|
if (D == null || D.expiresOn == null)
|
|
2766
2765
|
return !0;
|
|
2767
|
-
const L = he.fromFormat(D.expiresOn, t),
|
|
2768
|
-
return L <=
|
|
2766
|
+
const L = he.fromFormat(D.expiresOn, t), s = he.utc();
|
|
2767
|
+
return L <= s;
|
|
2769
2768
|
}
|
|
2770
2769
|
return M(), Ir = {
|
|
2771
2770
|
authState: l,
|
|
2772
2771
|
canEdit: g,
|
|
2773
2772
|
canEditPermit: x,
|
|
2774
2773
|
canView: P,
|
|
2775
|
-
canViewPermit:
|
|
2776
|
-
credentials:
|
|
2774
|
+
canViewPermit: T,
|
|
2775
|
+
credentials: f,
|
|
2777
2776
|
doShow: N,
|
|
2778
2777
|
doShowByNav: $,
|
|
2779
2778
|
getAuthorizeUrl: d,
|
|
2780
2779
|
getToken: i,
|
|
2781
|
-
isLoggedIn: te(() =>
|
|
2780
|
+
isLoggedIn: te(() => f.value.isLoggedIn === !0),
|
|
2782
2781
|
login: I,
|
|
2783
2782
|
logout: y,
|
|
2784
2783
|
resetAuthState: S,
|
|
2785
2784
|
setAuth: E,
|
|
2786
|
-
timeZone: te(() =>
|
|
2785
|
+
timeZone: te(() => f.value.timeZone ?? e.defaultTimeZone ?? hr),
|
|
2787
2786
|
tryLogin: b
|
|
2788
2787
|
}, Ir;
|
|
2789
2788
|
}
|
|
2790
|
-
function
|
|
2789
|
+
function Tn(e, t, l = {}) {
|
|
2791
2790
|
const {
|
|
2792
2791
|
preventDefault: S = !1,
|
|
2793
|
-
stopPropagation:
|
|
2792
|
+
stopPropagation: f = !1,
|
|
2794
2793
|
axis: g = "both"
|
|
2795
2794
|
} = l, x = { capture: l.capture ?? !0 };
|
|
2796
|
-
let P = { x: 0, y: 0 },
|
|
2795
|
+
let P = { x: 0, y: 0 }, T = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2797
2796
|
function u(M) {
|
|
2798
|
-
K(S) && M.preventDefault(), K(
|
|
2797
|
+
K(S) && M.preventDefault(), K(f) && M.stopPropagation();
|
|
2799
2798
|
}
|
|
2800
2799
|
function r(M) {
|
|
2801
|
-
var
|
|
2800
|
+
var s;
|
|
2802
2801
|
const b = K(e);
|
|
2803
2802
|
if (!b)
|
|
2804
2803
|
return;
|
|
2805
|
-
const
|
|
2806
|
-
N = { x: L.clientX, y: L.clientY },
|
|
2807
|
-
x:
|
|
2808
|
-
y:
|
|
2804
|
+
const _ = b.$el, L = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
|
|
2805
|
+
N = { x: L.clientX, y: L.clientY }, T = {
|
|
2806
|
+
x: _.offsetLeft,
|
|
2807
|
+
y: _.offsetTop
|
|
2809
2808
|
}, P = {
|
|
2810
|
-
x:
|
|
2811
|
-
y:
|
|
2812
|
-
}, ((
|
|
2809
|
+
x: _.offsetLeft,
|
|
2810
|
+
y: _.offsetTop
|
|
2811
|
+
}, ((s = l.onStart) == null ? void 0 : s.call(l, N, M)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(M));
|
|
2813
2812
|
}
|
|
2814
2813
|
function y(M) {
|
|
2815
2814
|
var A;
|
|
2816
2815
|
if (!N || !K(e))
|
|
2817
2816
|
return;
|
|
2818
2817
|
const D = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
|
|
2819
|
-
let L = D.clientX - N.x,
|
|
2820
|
-
(g === "x" || g === "both") && (P.x =
|
|
2818
|
+
let L = D.clientX - N.x, s = D.clientY - N.y;
|
|
2819
|
+
(g === "x" || g === "both") && (P.x = T.x + L), (g === "y" || g === "both") && (P.y = T.y + s), (A = l.onMove) == null || A.call(l, P, M), u(M), i(P);
|
|
2821
2820
|
}
|
|
2822
2821
|
function I(M) {
|
|
2823
2822
|
var b;
|
|
2824
|
-
document.documentElement.style.cursor = "", d.forEach((
|
|
2825
|
-
|
|
2823
|
+
document.documentElement.style.cursor = "", d.forEach((_) => {
|
|
2824
|
+
_();
|
|
2826
2825
|
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P, M), u(M);
|
|
2827
2826
|
}
|
|
2828
2827
|
function i(M) {
|
|
2829
2828
|
const b = K(e);
|
|
2830
2829
|
if (!b)
|
|
2831
2830
|
return;
|
|
2832
|
-
const
|
|
2833
|
-
|
|
2831
|
+
const _ = b.$el;
|
|
2832
|
+
_.style.left = `${M.x}px`, _.style.top = `${M.y}px`;
|
|
2834
2833
|
}
|
|
2835
2834
|
function E() {
|
|
2836
2835
|
if (K(h))
|
|
@@ -2848,8 +2847,8 @@ function xn(e, t, l = {}) {
|
|
|
2848
2847
|
if (!M)
|
|
2849
2848
|
return;
|
|
2850
2849
|
const b = M.$el;
|
|
2851
|
-
b.style.cursor = "", $.forEach((
|
|
2852
|
-
|
|
2850
|
+
b.style.cursor = "", $.forEach((_) => {
|
|
2851
|
+
_();
|
|
2853
2852
|
}), $.length = 0, h.value = !1;
|
|
2854
2853
|
}
|
|
2855
2854
|
return {
|
|
@@ -2858,9 +2857,9 @@ function xn(e, t, l = {}) {
|
|
|
2858
2857
|
turnDraggableOn: E
|
|
2859
2858
|
};
|
|
2860
2859
|
}
|
|
2861
|
-
const
|
|
2862
|
-
function
|
|
2863
|
-
let l, S = t.handleWidth ?? 12,
|
|
2860
|
+
const Cn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2861
|
+
function Pn(e, t = {}) {
|
|
2862
|
+
let l, S = t.handleWidth ?? 12, f = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, T = t.maxHeight ?? Number.MAX_SAFE_INTEGER, N = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2864
2863
|
const u = z(!1);
|
|
2865
2864
|
let r = [], y = [];
|
|
2866
2865
|
const I = z(!1), i = z({ x: 0, y: 0 });
|
|
@@ -2871,12 +2870,12 @@ function _n(e, t = {}) {
|
|
|
2871
2870
|
function b(W, Y) {
|
|
2872
2871
|
h = Y.map(D), h.forEach((H) => W.$el.appendChild(H));
|
|
2873
2872
|
}
|
|
2874
|
-
function
|
|
2873
|
+
function _(W) {
|
|
2875
2874
|
h.forEach((Y) => W.$el.removeChild(Y));
|
|
2876
2875
|
}
|
|
2877
2876
|
function D(W) {
|
|
2878
|
-
const Y = S + "px", H = -S / 2 + "px", ae =
|
|
2879
|
-
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ?
|
|
2877
|
+
const Y = S + "px", H = -S / 2 + "px", ae = f + 1, G = document.createElement("div");
|
|
2878
|
+
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? f : ae).toString(), G.style.cursor = J(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;
|
|
2880
2879
|
}
|
|
2881
2880
|
function L(W) {
|
|
2882
2881
|
var ne;
|
|
@@ -2894,9 +2893,9 @@ function _n(e, t = {}) {
|
|
|
2894
2893
|
}, w = Lr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, W)) === !1)
|
|
2895
2894
|
return;
|
|
2896
2895
|
let X = W.target;
|
|
2897
|
-
document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(me("mousemove",
|
|
2896
|
+
document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(me("mousemove", s)), y.push(me("mouseup", A)), y.push(me("touchmove", s)), y.push(me("touchend", A)), M(W);
|
|
2898
2897
|
}
|
|
2899
|
-
function
|
|
2898
|
+
function s(W) {
|
|
2900
2899
|
const Y = Ae(e);
|
|
2901
2900
|
if (!Y)
|
|
2902
2901
|
return;
|
|
@@ -2904,11 +2903,11 @@ function _n(e, t = {}) {
|
|
|
2904
2903
|
let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
|
|
2905
2904
|
const se = Ae(E);
|
|
2906
2905
|
if (d.includes("t")) {
|
|
2907
|
-
const fe = Math.min(
|
|
2906
|
+
const fe = Math.min(T, Math.max(P, (se.height ?? 0) - ne));
|
|
2908
2907
|
w.height = fe, w.top = (se.top ?? 0) + ne;
|
|
2909
2908
|
}
|
|
2910
2909
|
if (d.includes("b")) {
|
|
2911
|
-
const fe = Math.min(
|
|
2910
|
+
const fe = Math.min(T, Math.max(P, (se.height ?? 0) + ne));
|
|
2912
2911
|
w.height = fe;
|
|
2913
2912
|
}
|
|
2914
2913
|
if (d.includes("l")) {
|
|
@@ -2941,7 +2940,7 @@ function _n(e, t = {}) {
|
|
|
2941
2940
|
return;
|
|
2942
2941
|
const H = Y.$el;
|
|
2943
2942
|
if (console.log(l), l !== "page" && W == "page") {
|
|
2944
|
-
const ae =
|
|
2943
|
+
const ae = Kt(H), G = Ae(ae) ?? null;
|
|
2945
2944
|
let X = 0;
|
|
2946
2945
|
if (G != null) {
|
|
2947
2946
|
const ne = window.getComputedStyle(G);
|
|
@@ -2993,13 +2992,13 @@ function _n(e, t = {}) {
|
|
|
2993
2992
|
if (I.value)
|
|
2994
2993
|
return;
|
|
2995
2994
|
const H = Ae(e);
|
|
2996
|
-
H && (b(H, W ??
|
|
2995
|
+
H && (b(H, W ?? Cn), Q(Y), r.push(me(H.$el, "mousedown", L)), r.push(me(H.$el, "touchstart", L)), I.value = !0, l = Y);
|
|
2997
2996
|
}
|
|
2998
2997
|
function we(W) {
|
|
2999
2998
|
if (!I.value)
|
|
3000
2999
|
return;
|
|
3001
3000
|
const Y = Ae(e);
|
|
3002
|
-
Y && (
|
|
3001
|
+
Y && (_(Y), Q(W), r.forEach((H) => {
|
|
3003
3002
|
H();
|
|
3004
3003
|
}), r.length = 0, I.value = !1);
|
|
3005
3004
|
}
|
|
@@ -3009,16 +3008,16 @@ function _n(e, t = {}) {
|
|
|
3009
3008
|
turnResizingOff: we
|
|
3010
3009
|
};
|
|
3011
3010
|
}
|
|
3012
|
-
function
|
|
3013
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1),
|
|
3014
|
-
|
|
3011
|
+
function Nn(e) {
|
|
3012
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), f = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: T } = Pn(t), { turnDraggableOff: N, turnDraggableOn: $ } = Tn(t, l);
|
|
3013
|
+
Qt(t, (h) => {
|
|
3015
3014
|
const u = h[0], { width: r } = u.contentRect;
|
|
3016
|
-
S.value = r <
|
|
3015
|
+
S.value = r < f;
|
|
3017
3016
|
});
|
|
3018
3017
|
function d(h) {
|
|
3019
|
-
N(), h == "page" ? P(h) : h == "blade" ?
|
|
3018
|
+
N(), h == "page" ? P(h) : h == "blade" ? T(["l", "r"], h) : h == "freestyle" ? (P(), T(void 0, h), $()) : h == "inline" && P();
|
|
3020
3019
|
}
|
|
3021
|
-
return d(g.value),
|
|
3020
|
+
return d(g.value), _e(g, (h) => d(h)), {
|
|
3022
3021
|
isMobile: S,
|
|
3023
3022
|
variant: g,
|
|
3024
3023
|
bladeData: x
|
|
@@ -3042,10 +3041,10 @@ const mr = {
|
|
|
3042
3041
|
warning: "#FB8C00"
|
|
3043
3042
|
};
|
|
3044
3043
|
let Dr;
|
|
3045
|
-
function
|
|
3044
|
+
function Ea() {
|
|
3046
3045
|
return Dr;
|
|
3047
3046
|
}
|
|
3048
|
-
function
|
|
3047
|
+
function Ia(e) {
|
|
3049
3048
|
const t = localStorage.getItem("cosmetics");
|
|
3050
3049
|
let l;
|
|
3051
3050
|
return t != null && t.length > 0 && (l = JSON.parse(t)), l ?? (l = {}), l.dark ?? (l.dark = e == null ? void 0 : e.dark), l.light ?? (l.light = e == null ? void 0 : e.light), l.theme ?? (l.theme = e == null ? void 0 : e.defaultTheme), {
|
|
@@ -3060,7 +3059,7 @@ function wa(e) {
|
|
|
3060
3059
|
}
|
|
3061
3060
|
};
|
|
3062
3061
|
}
|
|
3063
|
-
function
|
|
3062
|
+
function Mn(e) {
|
|
3064
3063
|
const t = z({});
|
|
3065
3064
|
let l = e.vuetifyInstance;
|
|
3066
3065
|
function S() {
|
|
@@ -3073,7 +3072,7 @@ function Pn(e) {
|
|
|
3073
3072
|
drawerStick: e.defaultDrawerStick ?? !1
|
|
3074
3073
|
};
|
|
3075
3074
|
}
|
|
3076
|
-
function
|
|
3075
|
+
function f() {
|
|
3077
3076
|
localStorage.setItem("cosmetics", JSON.stringify(t.value));
|
|
3078
3077
|
}
|
|
3079
3078
|
function g(d) {
|
|
@@ -3101,7 +3100,7 @@ function Pn(e) {
|
|
|
3101
3100
|
function P() {
|
|
3102
3101
|
t.value.drawer = !t.value.drawer;
|
|
3103
3102
|
}
|
|
3104
|
-
function
|
|
3103
|
+
function T() {
|
|
3105
3104
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3106
3105
|
}
|
|
3107
3106
|
function N() {
|
|
@@ -3114,47 +3113,47 @@ function Pn(e) {
|
|
|
3114
3113
|
h.colors.primary = (t.value.dark ?? { ...vr, ...e.defaultDarkTheme }).primary, u.colors.primary = (t.value.light ?? { ...mr, ...e.defaultLightTheme }).primary, (d = document.querySelector('meta[name="theme-color"]')) == null || d.setAttribute("content", "");
|
|
3115
3114
|
}
|
|
3116
3115
|
}
|
|
3117
|
-
return S(),
|
|
3118
|
-
|
|
3116
|
+
return S(), _e(t, () => {
|
|
3117
|
+
f();
|
|
3119
3118
|
}), Dr = {
|
|
3120
3119
|
state: t,
|
|
3121
3120
|
resetCosmetics: g,
|
|
3122
3121
|
setTemporaryColor: x,
|
|
3123
3122
|
toggleDrawer: P,
|
|
3124
|
-
toggleDrawerStick:
|
|
3123
|
+
toggleDrawerStick: T,
|
|
3125
3124
|
toggleLightDark: N,
|
|
3126
3125
|
undoTemporaryColor: $
|
|
3127
3126
|
}, Dr;
|
|
3128
3127
|
}
|
|
3129
|
-
const
|
|
3128
|
+
const Da = {
|
|
3130
3129
|
canExportCSV: !1
|
|
3131
3130
|
};
|
|
3132
|
-
function
|
|
3131
|
+
function Ln() {
|
|
3133
3132
|
function e(t) {
|
|
3134
3133
|
const {
|
|
3135
3134
|
items: l,
|
|
3136
3135
|
headers: S,
|
|
3137
|
-
fileName:
|
|
3136
|
+
fileName: f = "data.csv",
|
|
3138
3137
|
format: g = "file"
|
|
3139
3138
|
} = t;
|
|
3140
|
-
if (!
|
|
3139
|
+
if (!Te(l))
|
|
3141
3140
|
return;
|
|
3142
3141
|
let x = [];
|
|
3143
3142
|
S != null ? x = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
|
|
3144
3143
|
header: I.title ?? I.value ?? "",
|
|
3145
3144
|
itemText: I.itemText,
|
|
3146
3145
|
value: I.value
|
|
3147
|
-
})) : x = Object.keys(l[0]).map((I) => ({ header:
|
|
3146
|
+
})) : x = Object.keys(l[0]).map((I) => ({ header: an(I) ?? "", value: I })), x = x.filter((I) => I.header.length > 0);
|
|
3148
3147
|
var P = [];
|
|
3149
3148
|
for (let I = 0; I < l.length; I++) {
|
|
3150
3149
|
const i = l[I];
|
|
3151
|
-
var
|
|
3150
|
+
var T = {}, N = [];
|
|
3152
3151
|
for (let E = 0; E < x.length; E++) {
|
|
3153
3152
|
const w = x[E];
|
|
3154
3153
|
var $ = null;
|
|
3155
|
-
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ?
|
|
3154
|
+
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? T[w.header] = Sr($, w.itemText) : T[w.header] = $;
|
|
3156
3155
|
}
|
|
3157
|
-
P.push(
|
|
3156
|
+
P.push(T), Te(N) && N.forEach((E) => {
|
|
3158
3157
|
P.push(E);
|
|
3159
3158
|
}), N = [];
|
|
3160
3159
|
}
|
|
@@ -3170,10 +3169,10 @@ function Nn() {
|
|
|
3170
3169
|
var h = d.join(`
|
|
3171
3170
|
`), u = new Blob([h], { type: "text/plain;charset=utf-8" });
|
|
3172
3171
|
if (window.navigator.msSaveOrOpenBlob)
|
|
3173
|
-
window.navigator.msSaveOrOpenBlob(u,
|
|
3172
|
+
window.navigator.msSaveOrOpenBlob(u, f);
|
|
3174
3173
|
else {
|
|
3175
3174
|
var r = document.createElement("a"), y = URL.createObjectURL(u);
|
|
3176
|
-
r.href = y, r.download =
|
|
3175
|
+
r.href = y, r.download = f, document.body.appendChild(r), r.click(), setTimeout(function() {
|
|
3177
3176
|
document.body.removeChild(r), window.URL.revokeObjectURL(y);
|
|
3178
3177
|
}, 0);
|
|
3179
3178
|
}
|
|
@@ -3183,60 +3182,60 @@ function Nn() {
|
|
|
3183
3182
|
};
|
|
3184
3183
|
}
|
|
3185
3184
|
let xr;
|
|
3186
|
-
function
|
|
3185
|
+
function xa() {
|
|
3187
3186
|
return xr;
|
|
3188
3187
|
}
|
|
3189
|
-
function
|
|
3188
|
+
function Rn(e) {
|
|
3190
3189
|
const t = e.getUTC ?? he.utc;
|
|
3191
3190
|
function l() {
|
|
3192
|
-
return
|
|
3191
|
+
return f().startOf("day").toUTC().toString() ?? "";
|
|
3193
3192
|
}
|
|
3194
3193
|
function S() {
|
|
3195
|
-
return
|
|
3194
|
+
return f().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3196
3195
|
}
|
|
3197
|
-
function
|
|
3198
|
-
return
|
|
3196
|
+
function f(T, N) {
|
|
3197
|
+
return T == null ? t().setZone(e.getTimeZone()) : N ? he.fromFormat(T, N, { zone: e.getTimeZone() }) : he.fromISO(T, { zone: e.getTimeZone() });
|
|
3199
3198
|
}
|
|
3200
|
-
function g(
|
|
3201
|
-
if (
|
|
3199
|
+
function g(T, N, $) {
|
|
3200
|
+
if (T == null) {
|
|
3202
3201
|
const h = t().setZone(e.getTimeZone());
|
|
3203
3202
|
return N ? h.toFormat(N) : h.toString();
|
|
3204
3203
|
}
|
|
3205
|
-
if (
|
|
3204
|
+
if (T == "Invalid DateTime")
|
|
3206
3205
|
return "";
|
|
3207
|
-
const d = $ ? he.fromFormat(
|
|
3206
|
+
const d = $ ? he.fromFormat(T, $, { zone: e.getTimeZone() }) : he.fromISO(T, { zone: e.getTimeZone() });
|
|
3208
3207
|
return N ? d.toFormat(N) : d == null ? void 0 : d.toString();
|
|
3209
3208
|
}
|
|
3210
|
-
function x(
|
|
3211
|
-
return
|
|
3209
|
+
function x(T, N) {
|
|
3210
|
+
return T == null ? t() : N ? he.fromFormat(T, N) : he.fromISO(T);
|
|
3212
3211
|
}
|
|
3213
|
-
function P(
|
|
3214
|
-
if (
|
|
3212
|
+
function P(T, N, $) {
|
|
3213
|
+
if (T == null)
|
|
3215
3214
|
return N ? t().toFormat(N) : t().toString();
|
|
3216
3215
|
{
|
|
3217
|
-
const d = $ ? he.fromFormat(
|
|
3216
|
+
const d = $ ? he.fromFormat(T, $) : he.fromISO(T);
|
|
3218
3217
|
return N ? d.toFormat(N) : d.toString();
|
|
3219
3218
|
}
|
|
3220
3219
|
}
|
|
3221
3220
|
return xr = {
|
|
3222
3221
|
getToday: l,
|
|
3223
3222
|
getTomorrow: S,
|
|
3224
|
-
tzDate:
|
|
3223
|
+
tzDate: f,
|
|
3225
3224
|
tzString: g,
|
|
3226
3225
|
utcDate: x,
|
|
3227
3226
|
utcString: P
|
|
3228
3227
|
}, xr;
|
|
3229
3228
|
}
|
|
3230
|
-
let
|
|
3231
|
-
function
|
|
3232
|
-
return
|
|
3229
|
+
let _r;
|
|
3230
|
+
function _a() {
|
|
3231
|
+
return _r;
|
|
3233
3232
|
}
|
|
3234
|
-
function
|
|
3233
|
+
function Un(e) {
|
|
3235
3234
|
const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3236
3235
|
function S() {
|
|
3237
3236
|
t.value = !0;
|
|
3238
3237
|
}
|
|
3239
|
-
function
|
|
3238
|
+
function f() {
|
|
3240
3239
|
t.value = !1;
|
|
3241
3240
|
}
|
|
3242
3241
|
function g(d) {
|
|
@@ -3276,7 +3275,7 @@ function Ln(e) {
|
|
|
3276
3275
|
});
|
|
3277
3276
|
});
|
|
3278
3277
|
}
|
|
3279
|
-
function
|
|
3278
|
+
function T(d) {
|
|
3280
3279
|
if (l == null)
|
|
3281
3280
|
throw new Error("no demo data available for this api");
|
|
3282
3281
|
const h = g(d);
|
|
@@ -3327,138 +3326,138 @@ function Ln(e) {
|
|
|
3327
3326
|
});
|
|
3328
3327
|
});
|
|
3329
3328
|
}
|
|
3330
|
-
return
|
|
3331
|
-
endDemo:
|
|
3329
|
+
return _r = {
|
|
3330
|
+
endDemo: f,
|
|
3332
3331
|
isDemoing: t,
|
|
3333
3332
|
startDemo: S,
|
|
3334
3333
|
data: l,
|
|
3335
3334
|
deleteItem: x,
|
|
3336
3335
|
get: P,
|
|
3337
|
-
getAll:
|
|
3336
|
+
getAll: T,
|
|
3338
3337
|
post: N,
|
|
3339
3338
|
patch: $
|
|
3340
|
-
},
|
|
3339
|
+
}, _r;
|
|
3341
3340
|
}
|
|
3342
|
-
var
|
|
3343
|
-
function
|
|
3341
|
+
var Bn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
3342
|
+
function Ta(e) {
|
|
3344
3343
|
function t(l) {
|
|
3345
|
-
var
|
|
3344
|
+
var f;
|
|
3346
3345
|
const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
|
|
3347
3346
|
if (S)
|
|
3348
3347
|
document.title = S.meta.title;
|
|
3349
3348
|
else {
|
|
3350
|
-
const g =
|
|
3349
|
+
const g = Bn.VITE_NODE_ENV;
|
|
3351
3350
|
let x = "";
|
|
3352
|
-
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((
|
|
3351
|
+
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((f = e == null ? void 0 : e.demo) == null ? void 0 : f.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
|
|
3353
3352
|
}
|
|
3354
3353
|
}
|
|
3355
3354
|
return {
|
|
3356
3355
|
updateMeta: t
|
|
3357
3356
|
};
|
|
3358
3357
|
}
|
|
3359
|
-
let
|
|
3360
|
-
function
|
|
3361
|
-
return
|
|
3358
|
+
let Tr;
|
|
3359
|
+
function Ca() {
|
|
3360
|
+
return Tr;
|
|
3362
3361
|
}
|
|
3363
|
-
function
|
|
3364
|
-
function t(
|
|
3365
|
-
return
|
|
3362
|
+
function $n(e) {
|
|
3363
|
+
function t(s, A, J) {
|
|
3364
|
+
return s ? un(s) ? J ?? "" : e.dates.tzString(s, A) : J ?? s ?? "";
|
|
3366
3365
|
}
|
|
3367
|
-
function l(
|
|
3368
|
-
if (!
|
|
3366
|
+
function l(s) {
|
|
3367
|
+
if (!s)
|
|
3369
3368
|
return "";
|
|
3370
|
-
if (typeof
|
|
3371
|
-
return
|
|
3369
|
+
if (typeof s != "object")
|
|
3370
|
+
return s;
|
|
3372
3371
|
var A = "";
|
|
3373
|
-
return
|
|
3372
|
+
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;
|
|
3374
3373
|
}
|
|
3375
|
-
function S(
|
|
3376
|
-
if (typeof
|
|
3377
|
-
return
|
|
3374
|
+
function S(s) {
|
|
3375
|
+
if (typeof s != "number")
|
|
3376
|
+
return s;
|
|
3378
3377
|
var A = new Intl.NumberFormat("en-US", {
|
|
3379
3378
|
style: "currency",
|
|
3380
3379
|
currency: "AUD",
|
|
3381
3380
|
minimumFractionDigits: 2
|
|
3382
3381
|
});
|
|
3383
|
-
return A.format(
|
|
3382
|
+
return A.format(s);
|
|
3384
3383
|
}
|
|
3385
|
-
function s
|
|
3386
|
-
return t(
|
|
3384
|
+
function f(s, A) {
|
|
3385
|
+
return t(s, "ccc | d LLL", A);
|
|
3387
3386
|
}
|
|
3388
|
-
function g(
|
|
3389
|
-
return t(
|
|
3387
|
+
function g(s, A) {
|
|
3388
|
+
return t(s, "d LLL", A);
|
|
3390
3389
|
}
|
|
3391
|
-
function x(
|
|
3392
|
-
return t(
|
|
3390
|
+
function x(s, A) {
|
|
3391
|
+
return t(s, "ccc", A);
|
|
3393
3392
|
}
|
|
3394
|
-
function P(
|
|
3395
|
-
return t(
|
|
3393
|
+
function P(s, A) {
|
|
3394
|
+
return t(s, "ccc dd LLL yyyy", A);
|
|
3396
3395
|
}
|
|
3397
|
-
function
|
|
3398
|
-
return t(
|
|
3396
|
+
function T(s, A) {
|
|
3397
|
+
return t(s, "ccc dd LLL @ hh:mm a", A);
|
|
3399
3398
|
}
|
|
3400
|
-
function N(
|
|
3401
|
-
return new Intl.NumberFormat().format(
|
|
3399
|
+
function N(s) {
|
|
3400
|
+
return new Intl.NumberFormat().format(s);
|
|
3402
3401
|
}
|
|
3403
|
-
function $(
|
|
3404
|
-
return
|
|
3402
|
+
function $(s) {
|
|
3403
|
+
return s == 0 ? "" : new Intl.NumberFormat().format(s);
|
|
3405
3404
|
}
|
|
3406
|
-
function d(
|
|
3407
|
-
if (
|
|
3405
|
+
function d(s) {
|
|
3406
|
+
if (s == 0)
|
|
3408
3407
|
return "";
|
|
3409
|
-
var A = new Intl.NumberFormat().format(
|
|
3410
|
-
return
|
|
3408
|
+
var A = new Intl.NumberFormat().format(s);
|
|
3409
|
+
return s > 0 ? "+" + A : A;
|
|
3411
3410
|
}
|
|
3412
|
-
function h(
|
|
3413
|
-
return e.dates.utcString(
|
|
3411
|
+
function h(s, A) {
|
|
3412
|
+
return e.dates.utcString(s, A);
|
|
3414
3413
|
}
|
|
3415
|
-
function u(
|
|
3416
|
-
return rt(
|
|
3414
|
+
function u(s) {
|
|
3415
|
+
return rt(s, !1);
|
|
3417
3416
|
}
|
|
3418
|
-
function r(
|
|
3419
|
-
if (!
|
|
3417
|
+
function r(s) {
|
|
3418
|
+
if (!s)
|
|
3420
3419
|
return "";
|
|
3421
|
-
if (typeof
|
|
3422
|
-
return
|
|
3420
|
+
if (typeof s != "object")
|
|
3421
|
+
return s;
|
|
3423
3422
|
var A = "";
|
|
3424
|
-
return
|
|
3423
|
+
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;
|
|
3425
3424
|
}
|
|
3426
|
-
function y(
|
|
3427
|
-
return t(
|
|
3425
|
+
function y(s, A) {
|
|
3426
|
+
return t(s, "ddd DD MMM YYYY", A);
|
|
3428
3427
|
}
|
|
3429
|
-
function I(
|
|
3430
|
-
return t(
|
|
3428
|
+
function I(s, A) {
|
|
3429
|
+
return t(s, "ccc dd LLL yyyy hh:mm a", A);
|
|
3431
3430
|
}
|
|
3432
|
-
function i(
|
|
3431
|
+
function i(s) {
|
|
3433
3432
|
var A = new Intl.NumberFormat("en-US", {
|
|
3434
3433
|
style: "percent",
|
|
3435
3434
|
minimumFractionDigits: 2
|
|
3436
3435
|
});
|
|
3437
|
-
return A.format(
|
|
3436
|
+
return A.format(s);
|
|
3438
3437
|
}
|
|
3439
|
-
function E(
|
|
3440
|
-
return
|
|
3438
|
+
function E(s) {
|
|
3439
|
+
return s.replaceAll(",", " ");
|
|
3441
3440
|
}
|
|
3442
|
-
function w(
|
|
3443
|
-
return t(
|
|
3441
|
+
function w(s, A) {
|
|
3442
|
+
return t(s, "dd LLL yyyy", A);
|
|
3444
3443
|
}
|
|
3445
|
-
function M(
|
|
3446
|
-
return t(
|
|
3444
|
+
function M(s, A) {
|
|
3445
|
+
return t(s, "dd LLL yyyy hh:mm a", A);
|
|
3447
3446
|
}
|
|
3448
|
-
function b(
|
|
3449
|
-
return t(
|
|
3447
|
+
function b(s, A) {
|
|
3448
|
+
return t(s, "hh:mm a", A);
|
|
3450
3449
|
}
|
|
3451
|
-
function
|
|
3452
|
-
return
|
|
3450
|
+
function _(s) {
|
|
3451
|
+
return s == null ? "" : typeof s == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: s }).toFormat("T") : typeof s == "string" ? e.dates.tzString(s, "t") : "unknown";
|
|
3453
3452
|
}
|
|
3454
3453
|
const D = {
|
|
3455
3454
|
toCompanyNameAndLocationLine: l,
|
|
3456
3455
|
toCurrency: S,
|
|
3457
|
-
toDayDate:
|
|
3456
|
+
toDayDate: f,
|
|
3458
3457
|
toDayMonth: g,
|
|
3459
3458
|
toDayOfWeek: x,
|
|
3460
3459
|
toDayShortDate: P,
|
|
3461
|
-
toDayShortDateAndTime:
|
|
3460
|
+
toDayShortDateAndTime: T,
|
|
3462
3461
|
toDisplayNumber: N,
|
|
3463
3462
|
toDisplayNumberOver: $,
|
|
3464
3463
|
toDisplayNumberSigned: d,
|
|
@@ -3472,37 +3471,37 @@ function Un(e) {
|
|
|
3472
3471
|
toShortDate: w,
|
|
3473
3472
|
toShortDateAndTime: M,
|
|
3474
3473
|
toTime: b,
|
|
3475
|
-
toTimeOfDay:
|
|
3474
|
+
toTimeOfDay: _
|
|
3476
3475
|
};
|
|
3477
|
-
function L(
|
|
3478
|
-
if (
|
|
3479
|
-
let A =
|
|
3476
|
+
function L(s) {
|
|
3477
|
+
if (s != null) {
|
|
3478
|
+
let A = s;
|
|
3480
3479
|
if (A != null && D[A] != null)
|
|
3481
3480
|
return D[A];
|
|
3482
3481
|
}
|
|
3483
3482
|
return (A) => A;
|
|
3484
3483
|
}
|
|
3485
|
-
return
|
|
3484
|
+
return Tr = {
|
|
3486
3485
|
findFilter: L,
|
|
3487
3486
|
...D
|
|
3488
|
-
},
|
|
3487
|
+
}, Tr;
|
|
3489
3488
|
}
|
|
3490
|
-
function
|
|
3489
|
+
function Fn(e, t) {
|
|
3491
3490
|
const l = z(!1), S = Yt(e);
|
|
3492
|
-
let
|
|
3493
|
-
(t == null ? void 0 : t.useTracker) !== !1 &&
|
|
3494
|
-
l.value = g(P) !=
|
|
3491
|
+
let f = g(K(e));
|
|
3492
|
+
(t == null ? void 0 : t.useTracker) !== !1 && _e(S, (P) => {
|
|
3493
|
+
l.value = g(P) != f;
|
|
3495
3494
|
}, { deep: !0 });
|
|
3496
3495
|
function g(P) {
|
|
3497
|
-
const
|
|
3496
|
+
const T = Lr(P);
|
|
3498
3497
|
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((N) => {
|
|
3499
|
-
delete
|
|
3498
|
+
delete T[N];
|
|
3500
3499
|
}) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
|
|
3501
|
-
t.propsToTrack.some((d) => d == $) || delete
|
|
3502
|
-
})), JSON.stringify(
|
|
3500
|
+
t.propsToTrack.some((d) => d == $) || delete T[$];
|
|
3501
|
+
})), JSON.stringify(T);
|
|
3503
3502
|
}
|
|
3504
3503
|
function x() {
|
|
3505
|
-
|
|
3504
|
+
f = g(K(S)), l.value = !1;
|
|
3506
3505
|
}
|
|
3507
3506
|
return {
|
|
3508
3507
|
asyncItem: S,
|
|
@@ -3510,42 +3509,42 @@ function Bn(e, t) {
|
|
|
3510
3509
|
restartTracker: x
|
|
3511
3510
|
};
|
|
3512
3511
|
}
|
|
3513
|
-
function
|
|
3512
|
+
function Pa(e, t) {
|
|
3514
3513
|
var ae;
|
|
3515
3514
|
const {
|
|
3516
3515
|
// useBladeSrc = true,
|
|
3517
3516
|
useRouteSrc: l = !0
|
|
3518
|
-
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode),
|
|
3517
|
+
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), f = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", x = Mr(), P = et(), T = K(e.proxyQueryKey), N = te(() => {
|
|
3519
3518
|
var G;
|
|
3520
|
-
return K(e.proxyID) ?? (
|
|
3519
|
+
return K(e.proxyID) ?? (T != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[T] : void 0);
|
|
3521
3520
|
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
|
|
3522
3521
|
nav: g,
|
|
3523
3522
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3524
3523
|
proxyID: N.value,
|
|
3525
3524
|
store: Le({
|
|
3526
3525
|
storeMode: S,
|
|
3527
|
-
storageMode:
|
|
3526
|
+
storageMode: f,
|
|
3528
3527
|
nav: g
|
|
3529
3528
|
})
|
|
3530
|
-
}), E = te(() => e.errorMsg ?? d.value), w = te(() => e.loadingMsg ?? h.value), M = te(() => w.value != null), b = z(e.itemID ?? (l ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)),
|
|
3531
|
-
if (
|
|
3529
|
+
}), E = te(() => e.errorMsg ?? d.value), w = te(() => e.loadingMsg ?? h.value), M = te(() => w.value != null), b = z(e.itemID ?? (l ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), _ = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), D = Re(!1), L = te(() => {
|
|
3530
|
+
if (_.value == "new")
|
|
3532
3531
|
return !1;
|
|
3533
3532
|
const G = K($);
|
|
3534
3533
|
return e.onCanDelete != null ? e.onCanDelete(G) : (G == null ? void 0 : G.isInactive) !== !0;
|
|
3535
|
-
}),
|
|
3536
|
-
if (
|
|
3534
|
+
}), s = te(() => {
|
|
3535
|
+
if (_.value == "new")
|
|
3537
3536
|
return !1;
|
|
3538
3537
|
const G = K($);
|
|
3539
3538
|
return e.onCanEdit != null ? e.onCanEdit(G) : !0;
|
|
3540
3539
|
}), A = te(() => {
|
|
3541
|
-
if (
|
|
3540
|
+
if (_.value == "new")
|
|
3542
3541
|
return !1;
|
|
3543
3542
|
const G = K($);
|
|
3544
3543
|
return e.onCanRestore != null ? e.onCanRestore(G) : (G == null ? void 0 : G.isInactive) === !0;
|
|
3545
3544
|
}), J = te(() => {
|
|
3546
3545
|
const G = K($);
|
|
3547
3546
|
return e.onCanSave != null ? e.onCanSave(G) : !0;
|
|
3548
|
-
}), { isChanged: Q, restartTracker: ee } =
|
|
3547
|
+
}), { isChanged: Q, restartTracker: ee } = Fn($, {
|
|
3549
3548
|
useTracker: e.trackChanges,
|
|
3550
3549
|
propsToIgnore: e.trackIgnoreProps,
|
|
3551
3550
|
propsToTrack: e.trackProps
|
|
@@ -3617,7 +3616,7 @@ function Da(e, t) {
|
|
|
3617
3616
|
onCanSaveAsync: se,
|
|
3618
3617
|
onGetSaveAsync: fe,
|
|
3619
3618
|
onSaveAsync: Ee,
|
|
3620
|
-
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), ee(),
|
|
3619
|
+
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), ee(), _.value = "view"), Promise.resolve(void 0))
|
|
3621
3620
|
} = { ...e };
|
|
3622
3621
|
i({
|
|
3623
3622
|
additionalUrl: ne,
|
|
@@ -3630,16 +3629,16 @@ function Da(e, t) {
|
|
|
3630
3629
|
proxyID: N.value,
|
|
3631
3630
|
// ...params.getOptions(),
|
|
3632
3631
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3633
|
-
mode:
|
|
3632
|
+
mode: _.value
|
|
3634
3633
|
});
|
|
3635
3634
|
}
|
|
3636
3635
|
function H() {
|
|
3637
|
-
const G = K(
|
|
3638
|
-
!G || G == "view" ?
|
|
3636
|
+
const G = K(_);
|
|
3637
|
+
!G || G == "view" ? _.value = "edit" : G == "edit" && (_.value = "view");
|
|
3639
3638
|
}
|
|
3640
|
-
return
|
|
3639
|
+
return _e(E, (G) => {
|
|
3641
3640
|
D.value = G != null;
|
|
3642
|
-
}),
|
|
3641
|
+
}), _e(() => e.refreshToggle, () => {
|
|
3643
3642
|
W({ deepRefresh: !0 });
|
|
3644
3643
|
}), Xr(async () => {
|
|
3645
3644
|
var G;
|
|
@@ -3650,14 +3649,14 @@ function Da(e, t) {
|
|
|
3650
3649
|
errorMsg: E,
|
|
3651
3650
|
isChanged: Q,
|
|
3652
3651
|
isDeletable: L,
|
|
3653
|
-
isEditing: te(() =>
|
|
3654
|
-
isEditable:
|
|
3652
|
+
isEditing: te(() => _.value == "new" || _.value == "edit"),
|
|
3653
|
+
isEditable: s,
|
|
3655
3654
|
isLoading: M,
|
|
3656
|
-
isNew: te(() =>
|
|
3655
|
+
isNew: te(() => _.value == "new"),
|
|
3657
3656
|
isRestorable: A,
|
|
3658
3657
|
isSaveable: J,
|
|
3659
3658
|
loadingMsg: w,
|
|
3660
|
-
mode:
|
|
3659
|
+
mode: _,
|
|
3661
3660
|
refresh: W,
|
|
3662
3661
|
restoreItem: we,
|
|
3663
3662
|
saveItem: Y,
|
|
@@ -3670,13 +3669,13 @@ let yr = null, Cr;
|
|
|
3670
3669
|
function it() {
|
|
3671
3670
|
return Cr;
|
|
3672
3671
|
}
|
|
3673
|
-
function
|
|
3672
|
+
function kn(e) {
|
|
3674
3673
|
const t = e.defaultCacheExpiryHours ?? 7;
|
|
3675
3674
|
e.getDisplayName ?? (e.getDisplayName = (h) => {
|
|
3676
3675
|
if (h.displayName != null)
|
|
3677
3676
|
return h.displayName;
|
|
3678
3677
|
if (h.name != null)
|
|
3679
|
-
return
|
|
3678
|
+
return ln(h.name.replaceAll("-", " "));
|
|
3680
3679
|
});
|
|
3681
3680
|
const l = (e.navItems ?? []).map((h) => ({
|
|
3682
3681
|
displayName: h.displayName ?? e.getDisplayName(h),
|
|
@@ -3686,7 +3685,7 @@ function $n(e) {
|
|
|
3686
3685
|
var u;
|
|
3687
3686
|
return (u = P(h)) == null ? void 0 : u.archiveName;
|
|
3688
3687
|
}
|
|
3689
|
-
function
|
|
3688
|
+
function f(h) {
|
|
3690
3689
|
var u;
|
|
3691
3690
|
return ((u = P(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
|
|
3692
3691
|
}
|
|
@@ -3704,11 +3703,11 @@ function $n(e) {
|
|
|
3704
3703
|
return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((I) => I == h));
|
|
3705
3704
|
}) ?? null;
|
|
3706
3705
|
}
|
|
3707
|
-
function
|
|
3706
|
+
function T(h) {
|
|
3708
3707
|
const u = P(h);
|
|
3709
3708
|
if (u == null)
|
|
3710
3709
|
return;
|
|
3711
|
-
let r =
|
|
3710
|
+
let r = wn(u.microservice ?? "default") ?? "";
|
|
3712
3711
|
return u.path != null && (r = Be(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3713
3712
|
}
|
|
3714
3713
|
function N(h) {
|
|
@@ -3717,7 +3716,7 @@ function $n(e) {
|
|
|
3717
3716
|
return u.singleName;
|
|
3718
3717
|
const r = u == null ? void 0 : u.displayName;
|
|
3719
3718
|
if (r != null)
|
|
3720
|
-
return
|
|
3719
|
+
return gn(r);
|
|
3721
3720
|
}
|
|
3722
3721
|
function $(h) {
|
|
3723
3722
|
const u = P(h);
|
|
@@ -3738,19 +3737,19 @@ function $n(e) {
|
|
|
3738
3737
|
hesitate: gr,
|
|
3739
3738
|
navigationItems: l,
|
|
3740
3739
|
findArchiveName: S,
|
|
3741
|
-
findCacheHours:
|
|
3740
|
+
findCacheHours: f,
|
|
3742
3741
|
findDisplay: g,
|
|
3743
3742
|
findIcon: x,
|
|
3744
3743
|
findItem: P,
|
|
3745
3744
|
findStoreName: $,
|
|
3746
|
-
findPath:
|
|
3745
|
+
findPath: T,
|
|
3747
3746
|
findSingleDisplay: N,
|
|
3748
3747
|
updateNavigationProperties: d
|
|
3749
3748
|
}, Cr;
|
|
3750
3749
|
}
|
|
3751
|
-
function
|
|
3750
|
+
function Na(e, t, l) {
|
|
3752
3751
|
var qe, He;
|
|
3753
|
-
const S =
|
|
3752
|
+
const S = Ln(), f = it(), g = Mr(), x = et(), { bladeData: P } = Nn({}), T = e.useBladeSrc ?? !0, N = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = f.findItem($)) == null ? void 0 : qe.storeMode), h = e.storageMode ?? ((He = f.findItem($)) == null ? void 0 : He.storageMode), u = K(e.customFilters) ?? [], r = z([]), y = te(() => Xt([
|
|
3754
3753
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3755
3754
|
...e.defaultFilters ?? [],
|
|
3756
3755
|
...r.value
|
|
@@ -3759,7 +3758,7 @@ function xa(e, t, l) {
|
|
|
3759
3758
|
const E = te(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(M());
|
|
3760
3759
|
function M() {
|
|
3761
3760
|
var U, j;
|
|
3762
|
-
if (
|
|
3761
|
+
if (T) {
|
|
3763
3762
|
const V = (U = P.value) == null ? void 0 : U.page;
|
|
3764
3763
|
if (V != null)
|
|
3765
3764
|
return Number.parseInt(V);
|
|
@@ -3773,7 +3772,7 @@ function xa(e, t, l) {
|
|
|
3773
3772
|
}
|
|
3774
3773
|
const b = te(() => {
|
|
3775
3774
|
var U, j;
|
|
3776
|
-
if (
|
|
3775
|
+
if (T) {
|
|
3777
3776
|
const V = (U = P.value) == null ? void 0 : U.proxyID;
|
|
3778
3777
|
if (V != null)
|
|
3779
3778
|
return V;
|
|
@@ -3784,10 +3783,10 @@ function xa(e, t, l) {
|
|
|
3784
3783
|
return V;
|
|
3785
3784
|
}
|
|
3786
3785
|
return e.proxyID;
|
|
3787
|
-
}),
|
|
3786
|
+
}), _ = z(D());
|
|
3788
3787
|
function D() {
|
|
3789
3788
|
var U, j;
|
|
3790
|
-
if (
|
|
3789
|
+
if (T) {
|
|
3791
3790
|
const V = (U = P.value) == null ? void 0 : U.search;
|
|
3792
3791
|
if (V != null)
|
|
3793
3792
|
return V;
|
|
@@ -3798,7 +3797,7 @@ function xa(e, t, l) {
|
|
|
3798
3797
|
return V;
|
|
3799
3798
|
}
|
|
3800
3799
|
}
|
|
3801
|
-
const L = z(K(e.startShowingInactive) ?? !1),
|
|
3800
|
+
const L = z(K(e.startShowingInactive) ?? !1), s = te(() => [
|
|
3802
3801
|
...e.searchProps ?? [],
|
|
3803
3802
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3804
3803
|
]), A = z([]), J = Re([]), Q = z([]);
|
|
@@ -3819,11 +3818,11 @@ function xa(e, t, l) {
|
|
|
3819
3818
|
ge != null ? U = U != null ? `${U}ANDALSO${ge.filterFunction()}` : ge.filterFunction() : j.push(de);
|
|
3820
3819
|
});
|
|
3821
3820
|
const V = {};
|
|
3822
|
-
return
|
|
3821
|
+
return Te(j) && (V.filterBy = j.toString()), U != null && (V.query = U), V;
|
|
3823
3822
|
}), rr = te(() => {
|
|
3824
3823
|
var j;
|
|
3825
3824
|
let U = e.params != null ? { ...e.params } : {};
|
|
3826
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0),
|
|
3825
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0), Te(e.selectProps) && (U.properties = (j = e.selectProps) == null ? void 0 : j.toString()), _.value != null && (U.searchString = _.value), U;
|
|
3827
3826
|
}), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) => L.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Pe = te(() => Q.value.filter((U) => !U.hide)), ar = te(() => {
|
|
3828
3827
|
let U = new Array();
|
|
3829
3828
|
return Pe.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
@@ -3900,9 +3899,9 @@ function xa(e, t, l) {
|
|
|
3900
3899
|
}
|
|
3901
3900
|
function Ne() {
|
|
3902
3901
|
let U = K(A);
|
|
3903
|
-
if (U = e.onFilter ? e.onFilter(U) : U,
|
|
3904
|
-
let j = [...
|
|
3905
|
-
e.itemText && j.push(e.itemText),
|
|
3902
|
+
if (U = e.onFilter ? e.onFilter(U) : U, _.value != null && _.value.length > 0) {
|
|
3903
|
+
let j = [...s.value];
|
|
3904
|
+
e.itemText && j.push(e.itemText), Te(j) && (U = U.filter((V) => mn(V, _.value, j)));
|
|
3906
3905
|
}
|
|
3907
3906
|
J.value = U;
|
|
3908
3907
|
}
|
|
@@ -3911,7 +3910,7 @@ function xa(e, t, l) {
|
|
|
3911
3910
|
e.headers != null && (Q.value = [...e.headers], U || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
3912
3911
|
}
|
|
3913
3912
|
async function Ie(U) {
|
|
3914
|
-
if (fe.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1,
|
|
3913
|
+
if (fe.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, _.value = void 0), e.items != null) {
|
|
3915
3914
|
A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3916
3915
|
return;
|
|
3917
3916
|
}
|
|
@@ -3961,15 +3960,15 @@ function xa(e, t, l) {
|
|
|
3961
3960
|
}
|
|
3962
3961
|
}
|
|
3963
3962
|
function je() {
|
|
3964
|
-
Ee.value ? (Ee.value = e.showSearch ?? !1,
|
|
3963
|
+
Ee.value ? (Ee.value = e.showSearch ?? !1, _.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
|
|
3965
3964
|
}
|
|
3966
|
-
return We(),
|
|
3965
|
+
return We(), Ot([_], () => {
|
|
3967
3966
|
Ne();
|
|
3968
|
-
}, { debounce: 500, maxWait: 500 }),
|
|
3967
|
+
}, { debounce: 500, maxWait: 500 }), _e([L, w], async () => {
|
|
3969
3968
|
await Ie();
|
|
3970
|
-
}),
|
|
3969
|
+
}), _e([X, () => e.errorMsg], ([U, j]) => {
|
|
3971
3970
|
fe.value = U != null || j != null;
|
|
3972
|
-
}),
|
|
3971
|
+
}), _e(() => e.refreshToggle, () => {
|
|
3973
3972
|
Ie({ deepRefresh: !0 });
|
|
3974
3973
|
}), Or([A, () => e.items], () => {
|
|
3975
3974
|
Ne();
|
|
@@ -3994,7 +3993,7 @@ function xa(e, t, l) {
|
|
|
3994
3993
|
loadingMsg: ne,
|
|
3995
3994
|
refresh: Ie,
|
|
3996
3995
|
restoreItem: Ze,
|
|
3997
|
-
searchString:
|
|
3996
|
+
searchString: _,
|
|
3998
3997
|
selectedFilters: I,
|
|
3999
3998
|
selectItem: Je,
|
|
4000
3999
|
// serverFilters,
|
|
@@ -4009,7 +4008,7 @@ function xa(e, t, l) {
|
|
|
4009
4008
|
};
|
|
4010
4009
|
}
|
|
4011
4010
|
let Ge;
|
|
4012
|
-
function
|
|
4011
|
+
function Gn(e) {
|
|
4013
4012
|
const t = z((e == null ? void 0 : e.default) ?? "Admin"), l = z((e == null ? void 0 : e.groups) ?? []);
|
|
4014
4013
|
return Ge = {
|
|
4015
4014
|
currentGroup: t,
|
|
@@ -4017,45 +4016,45 @@ function Fn(e) {
|
|
|
4017
4016
|
useRoutes: e == null ? void 0 : e.useRoutes
|
|
4018
4017
|
}, Ge;
|
|
4019
4018
|
}
|
|
4020
|
-
function
|
|
4021
|
-
const e = Mr(), t = it(), l =
|
|
4019
|
+
function Ma() {
|
|
4020
|
+
const e = Mr(), t = it(), l = xn();
|
|
4022
4021
|
let S = e.getRoutes();
|
|
4023
4022
|
return {
|
|
4024
4023
|
...Ge,
|
|
4025
4024
|
sidebarNavItems: te(() => {
|
|
4026
4025
|
var g;
|
|
4027
4026
|
S = S.filter((x) => x.meta != null && x.meta.menuGroup != null);
|
|
4028
|
-
const
|
|
4027
|
+
const f = [];
|
|
4029
4028
|
return S.forEach((x) => {
|
|
4030
4029
|
var d;
|
|
4031
|
-
const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup),
|
|
4032
|
-
let $ =
|
|
4030
|
+
const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup), T = t.findItem(x.meta.nav), N = x.meta;
|
|
4031
|
+
let $ = f.find((h) => h.displayName == N.menuGroup);
|
|
4033
4032
|
$ == null && ($ = {
|
|
4034
4033
|
displayName: N.menuGroup,
|
|
4035
|
-
icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (
|
|
4034
|
+
icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (T == null ? void 0 : T.icon),
|
|
4036
4035
|
isGroup: !0,
|
|
4037
4036
|
items: []
|
|
4038
|
-
},
|
|
4039
|
-
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(
|
|
4040
|
-
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(
|
|
4041
|
-
permissions: (N == null ? void 0 : N.permissions) ?? (
|
|
4037
|
+
}, f.push($)), (d = $.items) == null || d.push({
|
|
4038
|
+
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(T ?? void 0),
|
|
4039
|
+
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(T ?? void 0),
|
|
4040
|
+
permissions: (N == null ? void 0 : N.permissions) ?? (T == null ? void 0 : T.permissions) ?? [],
|
|
4042
4041
|
requiresAuth: (N == null ? void 0 : N.requiresAuth) !== !1,
|
|
4043
|
-
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (
|
|
4044
|
-
subFilters: (N == null ? void 0 : N.subFilters) ?? (
|
|
4042
|
+
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (T == null ? void 0 : T.subscriptions) ?? [],
|
|
4043
|
+
subFilters: (N == null ? void 0 : N.subFilters) ?? (T == null ? void 0 : T.subFilters) ?? [],
|
|
4045
4044
|
routeName: x.name
|
|
4046
4045
|
});
|
|
4047
|
-
}),
|
|
4046
|
+
}), f.forEach((x) => {
|
|
4048
4047
|
var P;
|
|
4049
|
-
x.items = (P = x.items) == null ? void 0 : P.filter((
|
|
4050
|
-
}), Ge.currentGroup.value != null ? ((g =
|
|
4048
|
+
x.items = (P = x.items) == null ? void 0 : P.filter((T) => !T.requiresAuth || l.doShow(T.subscriptions, T.permissions, "view")).sort(Ue.firstBy((T) => T.displayName));
|
|
4049
|
+
}), Ge.currentGroup.value != null ? ((g = f.find((x) => x.displayName == Ge.currentGroup.value)) == null ? void 0 : g.items) ?? [] : f.filter((x) => !x.requiresAuth || l.doShow(x.subscriptions, x.permissions, "view"));
|
|
4051
4050
|
})
|
|
4052
4051
|
};
|
|
4053
4052
|
}
|
|
4054
4053
|
let Pr;
|
|
4055
|
-
function
|
|
4054
|
+
function La(e) {
|
|
4056
4055
|
return Pr.usePresets(e);
|
|
4057
4056
|
}
|
|
4058
|
-
function
|
|
4057
|
+
function Wn(e) {
|
|
4059
4058
|
function t(l) {
|
|
4060
4059
|
if (!l)
|
|
4061
4060
|
return {};
|
|
@@ -4069,10 +4068,10 @@ function kn(e) {
|
|
|
4069
4068
|
let Zr, Jr, jr, Kr = !1;
|
|
4070
4069
|
const wr = z(!1), br = z(!1), Qr = z(), pe = z();
|
|
4071
4070
|
let Nr;
|
|
4072
|
-
function
|
|
4071
|
+
function Ra() {
|
|
4073
4072
|
return Nr;
|
|
4074
4073
|
}
|
|
4075
|
-
function
|
|
4074
|
+
function qn() {
|
|
4076
4075
|
function e(x) {
|
|
4077
4076
|
pe.value = x.detail, br.value = !0;
|
|
4078
4077
|
}
|
|
@@ -4086,14 +4085,14 @@ function Gn() {
|
|
|
4086
4085
|
function S() {
|
|
4087
4086
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
4088
4087
|
}
|
|
4089
|
-
function
|
|
4088
|
+
function f(x) {
|
|
4090
4089
|
x.preventDefault(), wr.value = !0, Qr.value = x;
|
|
4091
4090
|
}
|
|
4092
4091
|
function g() {
|
|
4093
4092
|
br.value = !1, !(!pe.value || !pe.value.waiting) && pe.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
4094
4093
|
}
|
|
4095
|
-
return
|
|
4096
|
-
Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt",
|
|
4094
|
+
return pt(() => {
|
|
4095
|
+
Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", f));
|
|
4097
4096
|
}), Nr = {
|
|
4098
4097
|
canInstallApp: wr,
|
|
4099
4098
|
canUpdateApp: br,
|
|
@@ -4102,122 +4101,132 @@ function Gn() {
|
|
|
4102
4101
|
updateApp: g
|
|
4103
4102
|
}, Nr;
|
|
4104
4103
|
}
|
|
4105
|
-
function
|
|
4104
|
+
function Ua(e) {
|
|
4106
4105
|
const t = [];
|
|
4107
|
-
return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) =>
|
|
4106
|
+
return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) => vn(l) || "Email must be valid")), t;
|
|
4107
|
+
}
|
|
4108
|
+
const Hn = (e, t) => {
|
|
4109
|
+
const l = e.__vccOpts || e;
|
|
4110
|
+
for (const [S, f] of t)
|
|
4111
|
+
l[S] = f;
|
|
4112
|
+
return l;
|
|
4113
|
+
}, Vn = {};
|
|
4114
|
+
function zn(e, t) {
|
|
4115
|
+
return Zt(), Jt("div", null, "test");
|
|
4108
4116
|
}
|
|
4109
|
-
|
|
4117
|
+
const Yn = /* @__PURE__ */ Hn(Vn, [["render", zn]]);
|
|
4118
|
+
function Ba(e) {
|
|
4110
4119
|
return {
|
|
4111
4120
|
install(t, l) {
|
|
4112
|
-
var
|
|
4113
|
-
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance),
|
|
4114
|
-
const S =
|
|
4115
|
-
|
|
4116
|
-
const g =
|
|
4117
|
-
|
|
4118
|
-
const x =
|
|
4121
|
+
var T;
|
|
4122
|
+
console.log(t), t.component("bt-test", Yn), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), bn(e.urls), Mn(e);
|
|
4123
|
+
const S = Un(), f = kn(e);
|
|
4124
|
+
Wn(e), (T = e.auth).demo ?? (T.demo = S), e.auth.getAuthItem = f.findItem;
|
|
4125
|
+
const g = _n(e.auth);
|
|
4126
|
+
Gn(e.menu);
|
|
4127
|
+
const x = Dn({
|
|
4119
4128
|
auth: g,
|
|
4120
|
-
findPath:
|
|
4129
|
+
findPath: f.findPath,
|
|
4121
4130
|
useBearerToken: !0
|
|
4122
|
-
}), P =
|
|
4131
|
+
}), P = Rn({
|
|
4123
4132
|
getTimeZone: () => g.timeZone.value
|
|
4124
4133
|
});
|
|
4125
|
-
|
|
4134
|
+
$n({
|
|
4126
4135
|
dates: P
|
|
4127
|
-
}),
|
|
4136
|
+
}), qn(), Sn({
|
|
4128
4137
|
api: x,
|
|
4129
4138
|
auth: g,
|
|
4130
|
-
navigation:
|
|
4139
|
+
navigation: f
|
|
4131
4140
|
});
|
|
4132
4141
|
}
|
|
4133
4142
|
};
|
|
4134
4143
|
}
|
|
4135
4144
|
export {
|
|
4136
|
-
|
|
4137
|
-
|
|
4145
|
+
ga as DataURIToBlob,
|
|
4146
|
+
sa as addWeekday,
|
|
4138
4147
|
Be as appendUrl,
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4148
|
+
ln as capitalizeWords,
|
|
4149
|
+
aa as checkImage,
|
|
4150
|
+
on as containsSearch,
|
|
4151
|
+
fa as containsWeekday,
|
|
4143
4152
|
Lr as copyDeep,
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4153
|
+
sn as copyItemByAlphabet,
|
|
4154
|
+
Dn as createApi,
|
|
4155
|
+
_n as createAuth,
|
|
4156
|
+
Ba as createCore,
|
|
4157
|
+
Mn as createCosmetics,
|
|
4158
|
+
Rn as createDates,
|
|
4159
|
+
Un as createDemo,
|
|
4160
|
+
$n as createFilters,
|
|
4161
|
+
Gn as createMenu,
|
|
4162
|
+
kn as createNavigation,
|
|
4163
|
+
qn as createPWA,
|
|
4164
|
+
Wn as createPresets,
|
|
4165
|
+
In as createSessionStoreDefinition,
|
|
4166
|
+
Sn as createStoreBuilder,
|
|
4167
|
+
bn as createUrl,
|
|
4159
4168
|
qr as createWholeLastUpdateStoreDefinition,
|
|
4160
|
-
|
|
4161
|
-
|
|
4169
|
+
fn as csvContains,
|
|
4170
|
+
Da as csvDefaults,
|
|
4162
4171
|
tt as deepSelect,
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
+
On as distinct,
|
|
4173
|
+
pn as extensionExists,
|
|
4174
|
+
dn as extractErrorDescription,
|
|
4175
|
+
an as fromCamelCase,
|
|
4176
|
+
ea as getAreaAround,
|
|
4177
|
+
ra as getAreaToLeft,
|
|
4178
|
+
ta as getAreaToRight,
|
|
4179
|
+
na as getGoogleMapsLocationLine,
|
|
4180
|
+
la as getImageData,
|
|
4172
4181
|
rt as getLocationLine,
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4182
|
+
ha as getMinDate,
|
|
4183
|
+
cn as getMinDateString,
|
|
4184
|
+
hn as getRandomColor,
|
|
4185
|
+
mn as hasSearch,
|
|
4186
|
+
da as isArrayOfLength,
|
|
4187
|
+
Te as isLengthyArray,
|
|
4188
|
+
un as isMinDate,
|
|
4180
4189
|
Sr as nestedValue,
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4190
|
+
oa as removeWeekday,
|
|
4191
|
+
ma as roundTo,
|
|
4192
|
+
gn as singularize,
|
|
4193
|
+
ua as toCamelCase,
|
|
4194
|
+
ya as toCompareString,
|
|
4195
|
+
va as toggleCSV,
|
|
4196
|
+
wa as twiddleThumbs,
|
|
4188
4197
|
ut as useActions,
|
|
4189
|
-
|
|
4198
|
+
tn as useActionsTracker,
|
|
4190
4199
|
Er as useApi,
|
|
4191
|
-
|
|
4200
|
+
xn as useAuth,
|
|
4192
4201
|
Wr as useAuthUrl,
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4202
|
+
Nn as useBlade,
|
|
4203
|
+
Ln as useCSV,
|
|
4204
|
+
Ea as useCosmetics,
|
|
4205
|
+
wn as useDataUrl,
|
|
4206
|
+
xa as useDates,
|
|
4198
4207
|
lt as useDbName,
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
+
_a as useDemo,
|
|
4209
|
+
Ta as useDocumentMeta,
|
|
4210
|
+
Tn as useDraggable,
|
|
4211
|
+
Ca as useFilters,
|
|
4212
|
+
en as useId,
|
|
4213
|
+
Pa as useItem,
|
|
4214
|
+
Na as useList,
|
|
4215
|
+
Sa as useLocalCache,
|
|
4216
|
+
Ia as useLocalCosmetics,
|
|
4208
4217
|
ve as useLocalDb,
|
|
4209
|
-
|
|
4218
|
+
Ma as useMenu,
|
|
4210
4219
|
it as useNavigation,
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4220
|
+
Ra as usePWA,
|
|
4221
|
+
La as usePresets,
|
|
4222
|
+
Pn as useResizable,
|
|
4223
|
+
Ua as useRules,
|
|
4224
|
+
Aa as useStore,
|
|
4216
4225
|
Le as useStoreDefinition,
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4226
|
+
Fn as useTracker,
|
|
4227
|
+
ba as useUrls,
|
|
4228
|
+
vn as validEmail,
|
|
4220
4229
|
Ye as weekdayPairs,
|
|
4221
|
-
|
|
4222
|
-
|
|
4230
|
+
ca as weekdayShortName,
|
|
4231
|
+
ia as weekdayValue
|
|
4223
4232
|
};
|