bt-core-app 1.4.54 → 1.4.56
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 +1218 -1208
- package/dist/index.d.ts +21 -0
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { ref as z, shallowRef as Le, computed as te, toValue as j, watch as _e, toRef as
|
|
2
|
-
import { watchArray as
|
|
1
|
+
import { ref as z, shallowRef as Le, computed as te, toValue as j, watch as _e, toRef as Yt, onMounted as Qr } from "vue";
|
|
2
|
+
import { watchArray as Xr, useStorage as Zt, useEventListener as he, toValue as Ae, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Fr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
|
|
3
3
|
import { DateTime as de } from "luxon";
|
|
4
|
-
import { defineStore as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
function Xt(e) {
|
|
7
|
-
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, Ot);
|
|
8
|
-
}
|
|
4
|
+
import { defineStore as Or } from "pinia";
|
|
5
|
+
import { useRouter as pr, useRoute as et } from "vue-router";
|
|
9
6
|
function Ot(e) {
|
|
7
|
+
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
|
|
8
|
+
}
|
|
9
|
+
function pt(e) {
|
|
10
10
|
const t = Math.random() * 16 | 0;
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const t = z([]), u = Le(),
|
|
15
|
-
function
|
|
13
|
+
function en(e) {
|
|
14
|
+
const t = z([]), u = Le(), b = Le(), o = Le(), g = te(() => u.value != null);
|
|
15
|
+
function x(h) {
|
|
16
16
|
t.value = t.value.filter((m) => m.id != h);
|
|
17
17
|
}
|
|
18
18
|
function P(h) {
|
|
19
19
|
const m = {
|
|
20
|
-
id:
|
|
20
|
+
id: Ot(),
|
|
21
21
|
msg: h ?? "Loading"
|
|
22
22
|
};
|
|
23
23
|
return t.value.push(m), m.id;
|
|
24
24
|
}
|
|
25
25
|
function N(h) {
|
|
26
|
-
h != null && (
|
|
26
|
+
h != null && (b.value = h.toString());
|
|
27
27
|
}
|
|
28
28
|
function $() {
|
|
29
|
-
|
|
29
|
+
b.value = void 0;
|
|
30
30
|
}
|
|
31
31
|
async function F(h, m) {
|
|
32
32
|
const l = { ...m };
|
|
33
33
|
l.completionMsg ?? (l.completionMsg = e == null ? void 0 : e.completionMsg), l.confirmationMsg ?? (l.confirmationMsg = e == null ? void 0 : e.confirmationMsg), l.errorMsg ?? (l.errorMsg = e == null ? void 0 : e.errorMsg), l.loadingMsg ?? (l.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), l.requireConfirmation ?? (l.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
|
|
34
34
|
const r = P(l.loadingMsg);
|
|
35
|
-
let
|
|
35
|
+
let y = null;
|
|
36
36
|
try {
|
|
37
|
-
return l.requireConfirmation || l.confirmationMsg,
|
|
38
|
-
} catch (
|
|
37
|
+
return l.requireConfirmation || l.confirmationMsg, y = await h(), l.completionMsg != null && (o.value = l.completionMsg), y;
|
|
38
|
+
} catch (S) {
|
|
39
39
|
if (l.throwError == !0)
|
|
40
|
-
return
|
|
41
|
-
N(l.errorMsg ??
|
|
40
|
+
return y;
|
|
41
|
+
N(l.errorMsg ?? S ?? "error");
|
|
42
42
|
} finally {
|
|
43
|
-
|
|
43
|
+
x(r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return
|
|
46
|
+
return Xr(t, (h) => {
|
|
47
47
|
u.value = h.length > 0 ? h[0].msg : void 0;
|
|
48
48
|
}, { deep: !0 }), {
|
|
49
|
-
actionErrorMsg:
|
|
49
|
+
actionErrorMsg: b,
|
|
50
50
|
actionLoadingMsg: u,
|
|
51
51
|
actionCompleteMsg: o,
|
|
52
52
|
clearErrors: $,
|
|
@@ -56,7 +56,7 @@ function pt(e) {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
var je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
59
|
-
function
|
|
59
|
+
function rn(e) {
|
|
60
60
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
61
61
|
}
|
|
62
62
|
var qe = function() {
|
|
@@ -68,9 +68,9 @@ var qe = function() {
|
|
|
68
68
|
}
|
|
69
69
|
function u(o, g) {
|
|
70
70
|
if (g = typeof g == "object" ? g : { direction: g }, typeof o != "function") {
|
|
71
|
-
var
|
|
71
|
+
var x = o;
|
|
72
72
|
o = function(h) {
|
|
73
|
-
return h[
|
|
73
|
+
return h[x] ? h[x] : "";
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
if (o.length === 1) {
|
|
@@ -86,38 +86,38 @@ var qe = function() {
|
|
|
86
86
|
return -o(h, m);
|
|
87
87
|
} : o;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
return
|
|
89
|
+
function b(o, g) {
|
|
90
|
+
var x = typeof this == "function" && !this.firstBy ? this : !1, P = u(o, g), N = x ? function($, F) {
|
|
91
|
+
return x($, F) || P($, F);
|
|
92
92
|
} : P;
|
|
93
|
-
return N.thenBy =
|
|
93
|
+
return N.thenBy = b, N;
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return b.firstBy = b, b;
|
|
96
96
|
}();
|
|
97
97
|
function Ne(e, t) {
|
|
98
|
-
let u = e ?? "",
|
|
98
|
+
let u = e ?? "", b = t ?? "";
|
|
99
99
|
if (u.endsWith("/"))
|
|
100
100
|
do
|
|
101
101
|
u = u.slice(0, u.length - 1);
|
|
102
102
|
while (u.endsWith("/"));
|
|
103
|
-
if (
|
|
103
|
+
if (b.startsWith("/"))
|
|
104
104
|
do
|
|
105
|
-
|
|
106
|
-
while (
|
|
107
|
-
return `${u}/${
|
|
105
|
+
b = b.slice(1, b.length);
|
|
106
|
+
while (b.startsWith("/"));
|
|
107
|
+
return `${u}/${b}`;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Zn(e) {
|
|
110
110
|
return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Jn(e = "blitzItExtensionExists") {
|
|
113
113
|
try {
|
|
114
114
|
var t = document.getElementById(e);
|
|
115
115
|
return t != null;
|
|
116
116
|
} catch (u) {
|
|
117
|
-
return console.log(
|
|
117
|
+
return console.log(sn(u)), !1;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function jn(e, t) {
|
|
121
121
|
return [
|
|
122
122
|
{ lat: e.lat - t, lng: e.lng + t },
|
|
123
123
|
{ lat: e.lat - t, lng: e.lng - t },
|
|
@@ -125,7 +125,7 @@ function Zn(e, t) {
|
|
|
125
125
|
{ lat: e.lat + t, lng: e.lng + t }
|
|
126
126
|
];
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Kn(e, t) {
|
|
129
129
|
return [
|
|
130
130
|
{ lat: e.lat - t * 2, lng: e.lng + t },
|
|
131
131
|
{ lat: e.lat - t * 2, lng: e.lng - t },
|
|
@@ -133,7 +133,7 @@ function Jn(e, t) {
|
|
|
133
133
|
{ lat: e.lat, lng: e.lng + t }
|
|
134
134
|
];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Qn(e, t) {
|
|
137
137
|
return [
|
|
138
138
|
{ lat: e.lat, lng: e.lng + t },
|
|
139
139
|
{ lat: e.lat, lng: e.lng - t },
|
|
@@ -141,11 +141,11 @@ function jn(e, t) {
|
|
|
141
141
|
{ lat: e.lat + t * 2, lng: e.lng + t }
|
|
142
142
|
];
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
var t =
|
|
144
|
+
function Xn(e) {
|
|
145
|
+
var t = rt(e, !0);
|
|
146
146
|
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(" ", "");
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function rt(e, t = !1) {
|
|
149
149
|
if (e == null)
|
|
150
150
|
return "";
|
|
151
151
|
if (typeof e != "object")
|
|
@@ -153,36 +153,36 @@ function et(e, t = !1) {
|
|
|
153
153
|
var u = "";
|
|
154
154
|
return e.addressLineOne != null && !t && (u = e.addressLineOne + " "), e.streetNumber != null && (u = u + e.streetNumber + " "), e.streetName != null && (u = u + e.streetName + ", "), e.suburb != null && (u = u + e.suburb + " "), e.state != null && (u = u + e.state + " "), e.postcode != null && (u = u + e.postcode), u;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function On(e, t, u) {
|
|
157
157
|
if (e) {
|
|
158
|
-
var
|
|
159
|
-
|
|
158
|
+
var b = new Image();
|
|
159
|
+
b.onload = t, b.onerror = u, b.src = e;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
async function
|
|
163
|
-
return new Promise((u,
|
|
164
|
-
e == null &&
|
|
162
|
+
async function pn(e, t = !0) {
|
|
163
|
+
return new Promise((u, b) => {
|
|
164
|
+
e == null && b("no url given");
|
|
165
165
|
var o = new Image();
|
|
166
166
|
o.setAttribute("crossOrigin", "anonymous"), o.onload = function() {
|
|
167
167
|
var g = document.createElement("canvas");
|
|
168
168
|
g.width = this.width, g.height = this.height;
|
|
169
|
-
var
|
|
170
|
-
|
|
169
|
+
var x = g.getContext("2d");
|
|
170
|
+
x == null || x.drawImage(this, 0, 0), u(g.toDataURL("image/png"));
|
|
171
171
|
}, o.onerror = function() {
|
|
172
|
-
console.log("errr"), t ?
|
|
172
|
+
console.log("errr"), t ? b("image could not be loaded for some reason") : u(null);
|
|
173
173
|
}, e != null && (o.src = e);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function tn(e) {
|
|
177
177
|
return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function ea(e) {
|
|
180
180
|
if (e != null && typeof e == "object")
|
|
181
181
|
for (var t in e)
|
|
182
182
|
/^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
|
|
183
183
|
return e;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function nn(e) {
|
|
186
186
|
return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (u) => u.toUpperCase()));
|
|
187
187
|
}
|
|
188
188
|
const He = [
|
|
@@ -195,108 +195,108 @@ const He = [
|
|
|
195
195
|
{ value: 7, short: "sat", values: ["sat", "saturday"] },
|
|
196
196
|
{ value: 0, short: "always", values: ["always", null, void 0] }
|
|
197
197
|
];
|
|
198
|
-
function
|
|
198
|
+
function ra(e) {
|
|
199
199
|
if (e == null)
|
|
200
200
|
return 0;
|
|
201
|
-
const t = e.replaceAll(" ", "").split(",").map((
|
|
201
|
+
const t = e.replaceAll(" ", "").split(",").map((b) => b.toLowerCase()), u = He.filter((b) => b.values.some((o) => t.some((g) => o == g))).map((b) => b.value);
|
|
202
202
|
return u.length == 0 ? 8 : Math.min(...u);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function ta(e) {
|
|
205
205
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
206
|
-
let u = He.find((
|
|
206
|
+
let u = He.find((b) => b.values.some((o) => o == t));
|
|
207
207
|
return u != null ? u.short : "";
|
|
208
208
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function na(e, t) {
|
|
211
211
|
if (e == null || t == null)
|
|
212
212
|
return !0;
|
|
213
|
-
const u = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()),
|
|
214
|
-
return o != null && u.some((g) => g == o.short || o.values.some((
|
|
213
|
+
const u = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), b = t.replaceAll(" ", "").toLowerCase(), o = He.find((g) => g.values.some((x) => x == b));
|
|
214
|
+
return o != null && u.some((g) => g == o.short || o.values.some((x) => x == g));
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function aa(e, t) {
|
|
217
217
|
if (t == null)
|
|
218
218
|
return e;
|
|
219
219
|
let u = e ?? "";
|
|
220
220
|
u = `${u},${t}`;
|
|
221
|
-
let
|
|
222
|
-
return
|
|
221
|
+
let b = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((o) => He.find((g) => g.values.some((x) => x == o))).filter((o) => o != null).sort(qe.firstBy((o) => (o == null ? void 0 : o.value) ?? 0)).map((o) => o == null ? void 0 : o.short))].toString();
|
|
222
|
+
return b.length > 0 ? b : void 0;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function la(e, t) {
|
|
225
225
|
if (t == null || e == null)
|
|
226
226
|
return e;
|
|
227
|
-
let u = e ?? "",
|
|
227
|
+
let u = e ?? "", b = t.replaceAll(" ", "").toLowerCase(), o = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((g) => He.find((x) => x.values.some((P) => P == g && P != b))).filter((g) => g != null).sort(qe.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
228
228
|
return o.length > 0 ? o : void 0;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ua(e, t) {
|
|
231
231
|
return e != null && Array.isArray(e) && e.length == t;
|
|
232
232
|
}
|
|
233
233
|
function Te(e, t = 0) {
|
|
234
234
|
return e != null && Array.isArray(e) && e.length > t;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function an(e) {
|
|
237
237
|
return e == "0001-01-01T00:00:00Z";
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function ca() {
|
|
240
240
|
return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function ln() {
|
|
243
243
|
return "0001-01-01T00:00:00Z";
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
let u = "1",
|
|
247
|
-
if (
|
|
245
|
+
function ia(e, t) {
|
|
246
|
+
let u = "1", b = 0;
|
|
247
|
+
if (b < t)
|
|
248
248
|
do
|
|
249
|
-
u = u + "0",
|
|
250
|
-
while (
|
|
249
|
+
u = u + "0", b += 1;
|
|
250
|
+
while (b < t);
|
|
251
251
|
let o = Number.parseInt(u);
|
|
252
252
|
return Math.round(e * o) / o;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function fa(e, t) {
|
|
255
255
|
let u = e ?? "";
|
|
256
|
-
return t != null && (
|
|
256
|
+
return t != null && (un(u, t) ? u = u.split(",").filter((b) => b != t).toString() : u != null ? u = `${u},${t}` : u = t), u != null && u.length > 0 ? u : null;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function un(e, t) {
|
|
259
259
|
if (e == null || e.length == 0)
|
|
260
260
|
return !1;
|
|
261
261
|
if (!t)
|
|
262
262
|
return !0;
|
|
263
|
-
var u = e.split(","),
|
|
264
|
-
return u.some((o) =>
|
|
263
|
+
var u = e.split(","), b = t.split(",");
|
|
264
|
+
return u.some((o) => b.some((g) => g == o));
|
|
265
265
|
}
|
|
266
266
|
function Pr(e) {
|
|
267
267
|
if (!e)
|
|
268
268
|
return e;
|
|
269
269
|
let t, u = Array.isArray(e) ? [] : {};
|
|
270
|
-
for (const
|
|
271
|
-
t = e[
|
|
270
|
+
for (const b in e)
|
|
271
|
+
t = e[b], u[b] = typeof t == "object" ? Pr(t) : t;
|
|
272
272
|
return u;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function cn(e) {
|
|
275
275
|
return e && Object.keys(e).sort().reduce(function(t, u) {
|
|
276
|
-
let
|
|
277
|
-
return t[u] = typeof
|
|
276
|
+
let b = e[u];
|
|
277
|
+
return t[u] = typeof b == "object" && b !== null ? cn(b) : b, t;
|
|
278
278
|
}, Array.isArray(e) ? [] : {});
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function fn(e, t) {
|
|
281
281
|
return t == null ? !0 : e == null ? !1 : e.toLowerCase().includes(t.toLowerCase());
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function tt(e, t = (u) => u) {
|
|
284
284
|
if (e == null)
|
|
285
285
|
return [];
|
|
286
286
|
const u = Array.isArray(e) ? e : t(e);
|
|
287
|
-
return Te(u) ? [...u.reduce((
|
|
288
|
-
|
|
289
|
-
const g =
|
|
290
|
-
return Te(g) &&
|
|
287
|
+
return Te(u) ? [...u.reduce((b, o) => {
|
|
288
|
+
b.push(o);
|
|
289
|
+
const g = tt(o, t);
|
|
290
|
+
return Te(g) && b.push(...g), b;
|
|
291
291
|
}, [])] : [];
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
const t = e.split(","), u = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]),
|
|
293
|
+
function sa(e) {
|
|
294
|
+
const t = e.split(","), u = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), b = t[0].split(":")[1].split(";")[0], o = new Uint8Array(u.length);
|
|
295
295
|
for (let g = 0; g < u.length; g++)
|
|
296
296
|
o[g] = u.charCodeAt(g);
|
|
297
|
-
return new Blob([o], { type:
|
|
297
|
+
return new Blob([o], { type: b });
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function sn(e) {
|
|
300
300
|
var t = "";
|
|
301
301
|
if (e) {
|
|
302
302
|
if (e.message && (t = e.message), e.response && e.response.data) {
|
|
@@ -309,27 +309,27 @@ function fn(e) {
|
|
|
309
309
|
}
|
|
310
310
|
return "hmmm no error was supplied";
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function on() {
|
|
313
313
|
const e = "#" + Math.floor(Math.random() * 16777215).toString(16);
|
|
314
|
-
return e.length !== 7 ?
|
|
314
|
+
return e.length !== 7 ? on() : e;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function dn(e, t, u) {
|
|
317
317
|
if (t == null)
|
|
318
318
|
return !0;
|
|
319
319
|
if (e == null || u == null)
|
|
320
320
|
return !1;
|
|
321
321
|
for (let o = 0; o < u.length; o++) {
|
|
322
322
|
const g = u[o];
|
|
323
|
-
var
|
|
324
|
-
if (
|
|
323
|
+
var b = wr(e, g);
|
|
324
|
+
if (b != null && typeof b == "string" && fn(b, t))
|
|
325
325
|
return !0;
|
|
326
326
|
}
|
|
327
327
|
return !1;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function oa(e) {
|
|
330
330
|
return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function da(e = 2e3) {
|
|
333
333
|
return new Promise((t) => {
|
|
334
334
|
setTimeout(() => t(), e);
|
|
335
335
|
});
|
|
@@ -338,185 +338,185 @@ function wr(e, t) {
|
|
|
338
338
|
if (e == null || e == null || !t)
|
|
339
339
|
return null;
|
|
340
340
|
var u = t.split(".");
|
|
341
|
-
let
|
|
342
|
-
for (var o = e, g = 0; g <
|
|
341
|
+
let b = u.length;
|
|
342
|
+
for (var o = e, g = 0; g < b; g++)
|
|
343
343
|
if (o = o[u[g]], o == null)
|
|
344
344
|
return null;
|
|
345
345
|
return o;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function hn(e) {
|
|
348
348
|
return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function mn(e) {
|
|
351
351
|
return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
|
|
352
352
|
}
|
|
353
353
|
let br;
|
|
354
354
|
function Sr() {
|
|
355
355
|
return br;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? P, u = (e == null ? void 0 : e.buildQuery) ?? g,
|
|
357
|
+
function vn(e) {
|
|
358
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? P, u = (e == null ? void 0 : e.buildQuery) ?? g, b = (e == null ? void 0 : e.buildUrl) ?? x, o = e == null ? void 0 : e.demo;
|
|
359
359
|
function g(l) {
|
|
360
360
|
let r = new URLSearchParams();
|
|
361
|
-
return Object.entries(l).forEach((
|
|
362
|
-
|
|
363
|
-
}), l.filterBy && r.set("filterBy", l.filterBy), l.includeCount && r.set("includeCount", l.includeCount.toString()), l.includeDetails != null && r.set("includeDetails", l.includeDetails.toString()), l.includeInactive && r.set("includeInactive", l.includeInactive.toString()), l.properties && r.set("properties", l.properties.toString()), l.query && r.set("query", l.query.toString()), l.searchString && r.set("searchString", l.searchString), l.sortOrder && r.set("sortOrder", l.sortOrder), l.sortBy && r.set("sortBy", l.sortBy), l.takeFrom && r.set("takeFrom", l.takeFrom.toString()), l.takeAmount && r.set("takeAmount", l.takeAmount.toString()), l.other && Object.entries(l.other).forEach((
|
|
364
|
-
|
|
361
|
+
return Object.entries(l).forEach((y) => {
|
|
362
|
+
y[1] != null && r.append(y[0], y[1]);
|
|
363
|
+
}), l.filterBy && r.set("filterBy", l.filterBy), l.includeCount && r.set("includeCount", l.includeCount.toString()), l.includeDetails != null && r.set("includeDetails", l.includeDetails.toString()), l.includeInactive && r.set("includeInactive", l.includeInactive.toString()), l.properties && r.set("properties", l.properties.toString()), l.query && r.set("query", l.query.toString()), l.searchString && r.set("searchString", l.searchString), l.sortOrder && r.set("sortOrder", l.sortOrder), l.sortBy && r.set("sortBy", l.sortBy), l.takeFrom && r.set("takeFrom", l.takeFrom.toString()), l.takeAmount && r.set("takeAmount", l.takeAmount.toString()), l.other && Object.entries(l.other).forEach((y) => {
|
|
364
|
+
y[1] != null && r.append(y[0], y[1].toString());
|
|
365
365
|
}), r.toString();
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
let r = j(l.url) ?? void 0,
|
|
369
|
-
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(l.nav)), l.additionalUrl != null && (r == null ? r = l.additionalUrl : r = Ne(r, l.additionalUrl)),
|
|
367
|
+
function x(l) {
|
|
368
|
+
let r = j(l.url) ?? void 0, y = j(l.id);
|
|
369
|
+
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(l.nav)), l.additionalUrl != null && (r == null ? r = l.additionalUrl : r = Ne(r, l.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ne(r, y)), l.params != null && (r = `${r}?${u(l.params)}`), l.finalUrl = r, l.finalUrl ?? "";
|
|
370
370
|
}
|
|
371
371
|
function P(l) {
|
|
372
|
-
var
|
|
372
|
+
var y, S;
|
|
373
373
|
let r = { ...l.headers };
|
|
374
|
-
return l.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = l.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((
|
|
374
|
+
return l.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = l.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(S = e == null ? void 0 : e.auth) == null ? void 0 : S.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = l.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
375
375
|
}
|
|
376
376
|
async function N(l) {
|
|
377
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
378
|
-
let
|
|
379
|
-
if (
|
|
380
|
-
return console.log(`DEMO: Get from ${
|
|
381
|
-
console.log(`Get from ${
|
|
382
|
-
let
|
|
377
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
378
|
+
let i = l.finalUrl, D = l.headers;
|
|
379
|
+
if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
380
|
+
return console.log(`DEMO: Get from ${i}`), o.get(l);
|
|
381
|
+
console.log(`Get from ${i}`);
|
|
382
|
+
let E;
|
|
383
383
|
try {
|
|
384
|
-
if (
|
|
384
|
+
if (E = await fetch(i, {
|
|
385
385
|
method: "GET",
|
|
386
386
|
mode: "cors",
|
|
387
387
|
cache: "no-cache",
|
|
388
|
-
headers:
|
|
389
|
-
}), !
|
|
390
|
-
let M = await
|
|
391
|
-
throw new Error(M ??
|
|
388
|
+
headers: D
|
|
389
|
+
}), !E.ok) {
|
|
390
|
+
let M = await E.text();
|
|
391
|
+
throw new Error(M ?? E.statusText ?? "Get error");
|
|
392
392
|
}
|
|
393
|
+
if (S)
|
|
394
|
+
return await E.text();
|
|
393
395
|
if (y)
|
|
394
|
-
return await
|
|
395
|
-
if (E)
|
|
396
|
-
return await w.json();
|
|
396
|
+
return await E.json();
|
|
397
397
|
throw new Error();
|
|
398
398
|
} catch (M) {
|
|
399
|
-
const
|
|
399
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
400
400
|
if (!r)
|
|
401
401
|
return;
|
|
402
|
-
throw new Error(
|
|
402
|
+
throw new Error(w);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
async function $(l) {
|
|
406
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
407
|
-
let
|
|
408
|
-
if (
|
|
409
|
-
return console.log(`DEMO: Get all from ${
|
|
410
|
-
console.log(`Get all from ${
|
|
411
|
-
let
|
|
406
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
407
|
+
let i = l.finalUrl, D = l.headers;
|
|
408
|
+
if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
409
|
+
return console.log(`DEMO: Get all from ${i}`), o.getAll(l);
|
|
410
|
+
console.log(`Get all from ${i}`);
|
|
411
|
+
let E;
|
|
412
412
|
try {
|
|
413
|
-
if (
|
|
413
|
+
if (E = await fetch(i, {
|
|
414
414
|
method: "GET",
|
|
415
415
|
mode: "cors",
|
|
416
416
|
cache: "no-cache",
|
|
417
|
-
headers:
|
|
418
|
-
}), !
|
|
419
|
-
let M = await
|
|
420
|
-
throw new Error(M ??
|
|
417
|
+
headers: D
|
|
418
|
+
}), !E.ok) {
|
|
419
|
+
let M = await E.text();
|
|
420
|
+
throw new Error(M ?? E.statusText ?? "Get all error");
|
|
421
421
|
}
|
|
422
|
+
if (S)
|
|
423
|
+
return await E.text();
|
|
422
424
|
if (y)
|
|
423
|
-
return await
|
|
424
|
-
if (E)
|
|
425
|
-
return await w.json();
|
|
425
|
+
return await E.json();
|
|
426
426
|
throw new Error();
|
|
427
427
|
} catch (M) {
|
|
428
|
-
const
|
|
428
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
429
429
|
if (!r)
|
|
430
430
|
return;
|
|
431
|
-
throw new Error(
|
|
431
|
+
throw new Error(w);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
async function F(l) {
|
|
435
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
436
|
-
let
|
|
437
|
-
if (
|
|
438
|
-
return console.log(`DEMO: Post to ${
|
|
439
|
-
console.log(`Post to ${
|
|
440
|
-
let
|
|
435
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
436
|
+
let i = l.finalUrl, D = l.headers;
|
|
437
|
+
if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
438
|
+
return console.log(`DEMO: Post to ${i}`), o.post(l);
|
|
439
|
+
console.log(`Post to ${i}`);
|
|
440
|
+
let E;
|
|
441
441
|
try {
|
|
442
|
-
if (
|
|
442
|
+
if (E = await fetch(i, {
|
|
443
443
|
method: "POST",
|
|
444
444
|
mode: "cors",
|
|
445
445
|
cache: "no-cache",
|
|
446
|
-
headers:
|
|
446
|
+
headers: D,
|
|
447
447
|
body: JSON.stringify(l.data)
|
|
448
|
-
}), !
|
|
449
|
-
let M = await
|
|
450
|
-
throw new Error(M ??
|
|
448
|
+
}), !E.ok) {
|
|
449
|
+
let M = await E.text();
|
|
450
|
+
throw new Error(M ?? E.statusText ?? "Post error!");
|
|
451
451
|
}
|
|
452
|
+
if (S)
|
|
453
|
+
return await E.text();
|
|
452
454
|
if (y)
|
|
453
|
-
return await
|
|
454
|
-
if (E)
|
|
455
|
-
return await w.json();
|
|
455
|
+
return await E.json();
|
|
456
456
|
throw new Error();
|
|
457
457
|
} catch (M) {
|
|
458
|
-
if (
|
|
458
|
+
if (E.status == 200 || !r)
|
|
459
459
|
return;
|
|
460
|
-
const
|
|
461
|
-
throw new Error(
|
|
460
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
461
|
+
throw new Error(w);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
async function h(l) {
|
|
465
|
-
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
466
|
-
let
|
|
467
|
-
if (
|
|
468
|
-
return console.log(`DEMO: Patch to ${
|
|
469
|
-
console.log(`Patch to ${
|
|
470
|
-
let
|
|
465
|
+
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
466
|
+
let i = l.finalUrl, D = l.headers;
|
|
467
|
+
if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
|
|
468
|
+
return console.log(`DEMO: Patch to ${i}`), o.patch(l);
|
|
469
|
+
console.log(`Patch to ${i}`);
|
|
470
|
+
let E;
|
|
471
471
|
try {
|
|
472
|
-
if (
|
|
472
|
+
if (E = await fetch(i, {
|
|
473
473
|
method: "PATCH",
|
|
474
474
|
mode: "cors",
|
|
475
475
|
cache: "no-cache",
|
|
476
|
-
headers:
|
|
476
|
+
headers: D,
|
|
477
477
|
body: JSON.stringify(l.data)
|
|
478
|
-
}), !
|
|
479
|
-
let M = await
|
|
480
|
-
throw new Error(M ??
|
|
478
|
+
}), !E.ok) {
|
|
479
|
+
let M = await E.text();
|
|
480
|
+
throw new Error(M ?? E.statusText ?? "Patch error!");
|
|
481
481
|
}
|
|
482
|
+
if (S)
|
|
483
|
+
return await E.text();
|
|
482
484
|
if (y)
|
|
483
|
-
return await
|
|
484
|
-
if (E)
|
|
485
|
-
return await w.json();
|
|
485
|
+
return await E.json();
|
|
486
486
|
throw new Error();
|
|
487
487
|
} catch (M) {
|
|
488
|
-
if (
|
|
488
|
+
if (E.status == 200 || !r)
|
|
489
489
|
return;
|
|
490
|
-
const
|
|
491
|
-
throw new Error(
|
|
490
|
+
const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
|
|
491
|
+
throw new Error(w);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
async function m(l) {
|
|
495
495
|
const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
496
|
-
let
|
|
497
|
-
if (
|
|
498
|
-
return console.log(`DEMO: Delete ${
|
|
499
|
-
console.log(`Delete ${
|
|
500
|
-
let
|
|
496
|
+
let y = l.finalUrl, S = l.headers;
|
|
497
|
+
if (y == null && (y = b(l)), l.overrideHeaders !== !0 && (S = t(l)), o != null && o.isDemoing.value)
|
|
498
|
+
return console.log(`DEMO: Delete ${y}`), o.deleteItem(l);
|
|
499
|
+
console.log(`Delete ${y}`);
|
|
500
|
+
let i;
|
|
501
501
|
try {
|
|
502
|
-
return
|
|
502
|
+
return i = await fetch(y, {
|
|
503
503
|
method: "DELETE",
|
|
504
504
|
mode: "cors",
|
|
505
505
|
cache: "no-cache",
|
|
506
|
-
headers:
|
|
506
|
+
headers: S,
|
|
507
507
|
body: JSON.stringify(l.data)
|
|
508
|
-
}),
|
|
509
|
-
} catch (
|
|
510
|
-
const
|
|
508
|
+
}), i.status == 200 ? void 0 : i.statusText;
|
|
509
|
+
} catch (D) {
|
|
510
|
+
const E = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${D.message}`;
|
|
511
511
|
if (!r)
|
|
512
|
-
return
|
|
513
|
-
throw new Error(`${
|
|
512
|
+
return E;
|
|
513
|
+
throw new Error(`${i.status} ${i.statusText} ${D.message}`);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
return br = {
|
|
517
517
|
buildHeaders: t,
|
|
518
518
|
buildQuery: u,
|
|
519
|
-
buildUrl:
|
|
519
|
+
buildUrl: b,
|
|
520
520
|
deleteItem: m,
|
|
521
521
|
get: N,
|
|
522
522
|
getAll: $,
|
|
@@ -524,21 +524,21 @@ function mn(e) {
|
|
|
524
524
|
post: F
|
|
525
525
|
}, br;
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors:
|
|
527
|
+
function nt(e) {
|
|
528
|
+
const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors: b, isLoading: o, doAction: g, logError: x } = en(e);
|
|
529
529
|
function P(r) {
|
|
530
530
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0), r.store ?? (r.store = e == null ? void 0 : e.store);
|
|
531
|
-
const
|
|
532
|
-
return
|
|
533
|
-
var
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
531
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
532
|
+
return y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
533
|
+
var E;
|
|
534
|
+
const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
|
|
535
|
+
if (i == null)
|
|
536
536
|
return Promise.resolve("No id found in delete action");
|
|
537
|
-
const
|
|
538
|
-
return
|
|
537
|
+
const D = S.findIndex((M) => M.id == i);
|
|
538
|
+
return D >= 0 && S.splice(D, 1), Promise.resolve(void 0);
|
|
539
539
|
}), g(async () => {
|
|
540
|
-
let
|
|
541
|
-
r.onCanDeleteAsync != null && (
|
|
540
|
+
let i;
|
|
541
|
+
r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), x(i);
|
|
542
542
|
}, {
|
|
543
543
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
544
544
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -550,14 +550,14 @@ function tt(e) {
|
|
|
550
550
|
}
|
|
551
551
|
function N(r) {
|
|
552
552
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get this item?" : void 0);
|
|
553
|
-
const
|
|
554
|
-
return
|
|
555
|
-
var
|
|
556
|
-
const
|
|
557
|
-
return
|
|
553
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
554
|
+
return y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
555
|
+
var D;
|
|
556
|
+
const i = r.id ?? ((D = r.data) == null ? void 0 : D.id);
|
|
557
|
+
return i == null ? Promise.resolve(void 0) : Promise.resolve(S.find((E) => E.id == i));
|
|
558
558
|
}), g(async () => {
|
|
559
|
-
let
|
|
560
|
-
return r.onGetAsync != null && (
|
|
559
|
+
let i;
|
|
560
|
+
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
561
561
|
}, {
|
|
562
562
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
563
563
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -569,10 +569,10 @@ function tt(e) {
|
|
|
569
569
|
}
|
|
570
570
|
function $(r) {
|
|
571
571
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
|
|
572
|
-
const
|
|
573
|
-
return
|
|
574
|
-
let
|
|
575
|
-
return r.onGetAsync != null && (
|
|
572
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
573
|
+
return y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(S)), g(async () => {
|
|
574
|
+
let i;
|
|
575
|
+
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
576
576
|
}, {
|
|
577
577
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
578
578
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -584,10 +584,10 @@ function tt(e) {
|
|
|
584
584
|
}
|
|
585
585
|
function F(r) {
|
|
586
586
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
|
|
587
|
-
const
|
|
588
|
-
return
|
|
589
|
-
let
|
|
590
|
-
return r.onCanRestoreAsync != null && (
|
|
587
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
588
|
+
return y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
|
|
589
|
+
let S, i;
|
|
590
|
+
return r.onCanRestoreAsync != null && (S = await r.onCanRestoreAsync(r.data)), S == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), x(S), i;
|
|
591
591
|
}, {
|
|
592
592
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
593
593
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -599,24 +599,24 @@ function tt(e) {
|
|
|
599
599
|
}
|
|
600
600
|
function h(r) {
|
|
601
601
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to save this item?" : void 0);
|
|
602
|
-
const
|
|
603
|
-
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (
|
|
604
|
-
var
|
|
605
|
-
return r.mode ?? (r.mode = ((
|
|
606
|
-
}) : r.onSaveAsync ?? (r.onSaveAsync = (
|
|
607
|
-
const
|
|
608
|
-
return
|
|
602
|
+
const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
|
|
603
|
+
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
|
|
604
|
+
var i;
|
|
605
|
+
return r.mode ?? (r.mode = ((i = r.data) == null ? void 0 : i.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
|
|
606
|
+
}) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
|
|
607
|
+
const D = S.findIndex((E) => E.id == i.id);
|
|
608
|
+
return D >= 0 ? S.splice(D, 1, i) : S.push(i), Promise.resolve(i);
|
|
609
609
|
}), g(async () => {
|
|
610
|
-
let
|
|
611
|
-
if (r.onGetSaveAsync != null && (
|
|
610
|
+
let i;
|
|
611
|
+
if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
|
|
612
612
|
return;
|
|
613
613
|
if (r.onCanSaveAsync != null) {
|
|
614
|
-
let
|
|
615
|
-
if (
|
|
614
|
+
let E = await r.onCanSaveAsync(i);
|
|
615
|
+
if (x(E), E != null)
|
|
616
616
|
return;
|
|
617
617
|
}
|
|
618
|
-
let
|
|
619
|
-
return r.onSaveAsync != null && (
|
|
618
|
+
let D;
|
|
619
|
+
return r.onSaveAsync != null && (D = await r.onSaveAsync(i), D = D.data != null ? D.data : D), r.onSaveSuccessAsync != null && (D = await r.onSaveSuccessAsync(D)), D;
|
|
620
620
|
}, {
|
|
621
621
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
622
622
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -637,20 +637,20 @@ function tt(e) {
|
|
|
637
637
|
actionErrorMsg: t,
|
|
638
638
|
apiGet: m,
|
|
639
639
|
apiPost: l,
|
|
640
|
-
clearErrors:
|
|
640
|
+
clearErrors: b,
|
|
641
641
|
deleteItem: P,
|
|
642
642
|
doAction: g,
|
|
643
643
|
getAllItems: $,
|
|
644
644
|
getItem: N,
|
|
645
645
|
isLoading: o,
|
|
646
|
-
logError:
|
|
646
|
+
logError: x,
|
|
647
647
|
restoreItem: F,
|
|
648
648
|
saveItem: h
|
|
649
649
|
};
|
|
650
650
|
}
|
|
651
651
|
var Mr = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
652
652
|
let ye;
|
|
653
|
-
function
|
|
653
|
+
function at() {
|
|
654
654
|
const e = Mr.NODE_ENV;
|
|
655
655
|
return ye == null ? e : (ye[e] ?? ye.development).localDbName ?? e;
|
|
656
656
|
}
|
|
@@ -658,58 +658,58 @@ function kr() {
|
|
|
658
658
|
const e = Mr.NODE_ENV;
|
|
659
659
|
return ye == null ? "" : (ye[e] ?? ye.development).auth ?? "";
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function gn(e) {
|
|
662
662
|
const t = Mr.NODE_ENV;
|
|
663
663
|
if (ye == null)
|
|
664
664
|
return "";
|
|
665
665
|
const u = ye[t] ?? ye.development;
|
|
666
666
|
return e == null ? u.data ?? "" : u.other[e] ?? u.data ?? "";
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function ha() {
|
|
669
669
|
return ye;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function yn(e) {
|
|
672
672
|
return ye = e, ye;
|
|
673
673
|
}
|
|
674
674
|
let or = "Australia/Melbourne", Ar;
|
|
675
675
|
const Gr = "auth-credentials-state";
|
|
676
|
-
function
|
|
676
|
+
function ma() {
|
|
677
677
|
return Ar;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function wn(e) {
|
|
680
680
|
const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
|
|
681
681
|
let u = z(localStorage.getItem(Gr) ?? "");
|
|
682
|
-
u.value.length == 0 &&
|
|
683
|
-
function
|
|
682
|
+
u.value.length == 0 && b();
|
|
683
|
+
function b() {
|
|
684
684
|
u.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Gr, u.value);
|
|
685
685
|
}
|
|
686
|
-
const o =
|
|
686
|
+
const o = Zt("auth-credentials", {});
|
|
687
687
|
function g(I) {
|
|
688
688
|
if (I == null)
|
|
689
689
|
return !0;
|
|
690
|
-
var
|
|
691
|
-
if (
|
|
690
|
+
var _ = e.getAuthItem != null ? e.getAuthItem(I) : null;
|
|
691
|
+
if (_ == null)
|
|
692
692
|
return !1;
|
|
693
|
-
if (
|
|
693
|
+
if (_.requiresAuth === !1)
|
|
694
694
|
return !0;
|
|
695
695
|
const s = j(o);
|
|
696
|
-
if (s.isSuspended &&
|
|
696
|
+
if (s.isSuspended && _.ignoreSuspension !== !0)
|
|
697
697
|
return !1;
|
|
698
698
|
if (s.isGlobalAdmin)
|
|
699
699
|
return !0;
|
|
700
|
-
if (
|
|
701
|
-
for (var A = 0; A <
|
|
702
|
-
if (!_
|
|
700
|
+
if (_.permissions != null) {
|
|
701
|
+
for (var A = 0; A < _.permissions.length; A++)
|
|
702
|
+
if (!x(_.permissions[A]))
|
|
703
703
|
return !1;
|
|
704
704
|
}
|
|
705
705
|
return !0;
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
const
|
|
709
|
-
if (
|
|
710
|
-
for (var s = 0; s <
|
|
711
|
-
var A =
|
|
712
|
-
if (
|
|
707
|
+
function x(I) {
|
|
708
|
+
const _ = j(o);
|
|
709
|
+
if (_.userPermissions != null)
|
|
710
|
+
for (var s = 0; s < _.userPermissions.length; s++) {
|
|
711
|
+
var A = _.userPermissions[s].split(".");
|
|
712
|
+
if (_.userPermissions[s] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
|
|
713
713
|
return !0;
|
|
714
714
|
}
|
|
715
715
|
return !1;
|
|
@@ -717,53 +717,53 @@ function yn(e) {
|
|
|
717
717
|
function P(I) {
|
|
718
718
|
if (I == null)
|
|
719
719
|
return !0;
|
|
720
|
-
var
|
|
721
|
-
if (
|
|
720
|
+
var _ = e.getAuthItem != null ? e.getAuthItem(I) : null;
|
|
721
|
+
if (_ == null)
|
|
722
722
|
return !1;
|
|
723
|
-
if (
|
|
723
|
+
if (_.requiresAuth === !1)
|
|
724
724
|
return !0;
|
|
725
725
|
const s = j(o);
|
|
726
|
-
if (s.isSuspended &&
|
|
726
|
+
if (s.isSuspended && _.ignoreSuspension !== !0)
|
|
727
727
|
return !1;
|
|
728
728
|
if (s.isGlobalAdmin)
|
|
729
729
|
return !0;
|
|
730
|
-
if (
|
|
731
|
-
for (var A = 0; A <
|
|
732
|
-
if (!N(
|
|
730
|
+
if (_.permissions != null) {
|
|
731
|
+
for (var A = 0; A < _.permissions.length; A++)
|
|
732
|
+
if (!N(_.permissions[A]))
|
|
733
733
|
return !1;
|
|
734
734
|
}
|
|
735
735
|
return !0;
|
|
736
736
|
}
|
|
737
737
|
function N(I) {
|
|
738
|
-
const
|
|
739
|
-
if (
|
|
740
|
-
for (var s = 0; s <
|
|
741
|
-
var A =
|
|
742
|
-
if (I == A[0] || I == "everything" ||
|
|
738
|
+
const _ = j(o);
|
|
739
|
+
if (_.userPermissions != null)
|
|
740
|
+
for (var s = 0; s < _.userPermissions.length; s++) {
|
|
741
|
+
var A = _.userPermissions[s].split(".");
|
|
742
|
+
if (I == A[0] || I == "everything" || _.userPermissions[s] == "everything.view" || _.userPermissions[s] == "everything.edit")
|
|
743
743
|
return !0;
|
|
744
744
|
}
|
|
745
745
|
return !1;
|
|
746
746
|
}
|
|
747
|
-
function $(I,
|
|
747
|
+
function $(I, _, s) {
|
|
748
748
|
let A = !0;
|
|
749
|
-
return j(o).isGlobalAdmin ? !0 : (
|
|
750
|
-
s == "edit" ?
|
|
749
|
+
return j(o).isGlobalAdmin ? !0 : (_ != null && _.length > 0 && _.forEach((Q) => {
|
|
750
|
+
s == "edit" ? x(Q) || (A = !1) : N(Q) || (A = !1);
|
|
751
751
|
}), I != null && I.length > 0 && (I.some((Q) => l(Q)) || (A = !1)), A);
|
|
752
752
|
}
|
|
753
|
-
function F(I,
|
|
753
|
+
function F(I, _ = !1) {
|
|
754
754
|
var s = e.getAuthItem != null ? e.getAuthItem(I) : null;
|
|
755
755
|
let A = !1;
|
|
756
756
|
if (s == null)
|
|
757
757
|
return !1;
|
|
758
758
|
let K = s.subscriptions ?? [], Q = s.permissions ?? [], re = $(K, Q, "view");
|
|
759
|
-
return re || !
|
|
760
|
-
F(
|
|
759
|
+
return re || !_ || !Te(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ce) => {
|
|
760
|
+
F(ce, !0) && (A = !0);
|
|
761
761
|
}), A);
|
|
762
762
|
}
|
|
763
763
|
function h(I) {
|
|
764
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (
|
|
764
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (_, s) => {
|
|
765
765
|
const A = Ne(kr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
|
|
766
|
-
return
|
|
766
|
+
return _ ? `${A}&redirect_path=${_}` : A;
|
|
767
767
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, u.value) ?? "" : "";
|
|
768
768
|
}
|
|
769
769
|
function m(I) {
|
|
@@ -771,12 +771,12 @@ function yn(e) {
|
|
|
771
771
|
return I == null ? 0 : ((s = (e.subscriptionOptions ?? []).find((A) => A.code == I)) == null ? void 0 : s.value) ?? 0;
|
|
772
772
|
}
|
|
773
773
|
function l(I) {
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
774
|
+
const _ = j(o);
|
|
775
|
+
if (_.subscriptionCode == null)
|
|
776
776
|
return !1;
|
|
777
|
-
if (
|
|
777
|
+
if (_.subscriptionCode == I)
|
|
778
778
|
return !0;
|
|
779
|
-
const s = m(I), A = m(
|
|
779
|
+
const s = m(I), A = m(_.subscriptionCode);
|
|
780
780
|
return s <= A;
|
|
781
781
|
}
|
|
782
782
|
function r(I) {
|
|
@@ -787,169 +787,169 @@ function yn(e) {
|
|
|
787
787
|
);
|
|
788
788
|
return JSON.parse(A);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
791
|
-
o.value = void 0, M(), I != null &&
|
|
790
|
+
function y(I, _) {
|
|
791
|
+
o.value = void 0, M(), I != null && _ != null && _.currentRoute.value.path != I && _.push({ path: I });
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function S(I) {
|
|
794
794
|
var s;
|
|
795
|
-
j(o).isLoggedIn || ((s = e.demo) == null || s.endDemo(), C() && (
|
|
795
|
+
j(o).isLoggedIn || ((s = e.demo) == null || s.endDemo(), C() && (y(), window.location.href = h(I)));
|
|
796
796
|
}
|
|
797
|
-
async function
|
|
797
|
+
async function i(I, _) {
|
|
798
798
|
return e.getToken ?? (e.getToken = async () => {
|
|
799
|
-
let s = I, A =
|
|
799
|
+
let s = I, A = _, K = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
|
|
800
800
|
if (s == null || A == null)
|
|
801
801
|
throw new Error("Code and State required in OAuth token process");
|
|
802
802
|
if (A != u.value)
|
|
803
803
|
throw new Error("state does not match");
|
|
804
804
|
let re = "";
|
|
805
805
|
e.getTokenUrl ?? (e.getTokenUrl = () => Ne(kr(), "token")), re = e.getTokenUrl(s, `${window.location.origin}/authentication`, K, Q);
|
|
806
|
-
const
|
|
807
|
-
|
|
806
|
+
const ce = {};
|
|
807
|
+
ce.grant_type = K, ce.code = s, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
|
|
808
808
|
const W = await Sr().post({
|
|
809
809
|
additionalUrl: re,
|
|
810
|
-
data:
|
|
810
|
+
data: ce
|
|
811
811
|
});
|
|
812
|
-
|
|
813
|
-
}), await e.getToken(I,
|
|
812
|
+
D(W.access_token);
|
|
813
|
+
}), await e.getToken(I, _);
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function D(I) {
|
|
816
816
|
if (I != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
817
|
-
const
|
|
818
|
-
|
|
817
|
+
const _ = r(I);
|
|
818
|
+
E(_, I), e.processTokenPayload != null && e.processTokenPayload(o, _);
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function E(I, _) {
|
|
822
822
|
var A;
|
|
823
823
|
const s = o.value;
|
|
824
|
-
s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? or), s.token =
|
|
824
|
+
s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? or), s.token = _, s.userID = I.UserLoginID, s.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
|
|
825
825
|
}
|
|
826
826
|
function M() {
|
|
827
827
|
var I;
|
|
828
828
|
o.value ?? (o.value = {}), (I = o.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? or);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function w() {
|
|
831
831
|
const I = j(o);
|
|
832
|
-
return I.isLoggedIn && C() && (
|
|
832
|
+
return I.isLoggedIn && C() && (y(), window.location.href = h()), I.isLoggedIn;
|
|
833
833
|
}
|
|
834
834
|
function C() {
|
|
835
835
|
const I = j(o);
|
|
836
836
|
if (I == null || I.expiresOn == null)
|
|
837
837
|
return !0;
|
|
838
|
-
const
|
|
839
|
-
return
|
|
838
|
+
const _ = de.fromFormat(I.expiresOn, t), s = de.utc();
|
|
839
|
+
return _ <= s;
|
|
840
840
|
}
|
|
841
841
|
return M(), Ar = {
|
|
842
842
|
authState: u,
|
|
843
843
|
canEdit: g,
|
|
844
|
-
canEditPermit:
|
|
844
|
+
canEditPermit: x,
|
|
845
845
|
canView: P,
|
|
846
846
|
canViewPermit: N,
|
|
847
847
|
credentials: o,
|
|
848
848
|
doShow: $,
|
|
849
849
|
doShowByNav: F,
|
|
850
850
|
getAuthorizeUrl: h,
|
|
851
|
-
getToken:
|
|
851
|
+
getToken: i,
|
|
852
852
|
isLoggedIn: te(() => o.value.isLoggedIn === !0),
|
|
853
|
-
login:
|
|
854
|
-
logout:
|
|
855
|
-
resetAuthState:
|
|
856
|
-
setAuth:
|
|
853
|
+
login: S,
|
|
854
|
+
logout: y,
|
|
855
|
+
resetAuthState: b,
|
|
856
|
+
setAuth: D,
|
|
857
857
|
timeZone: te(() => o.value.timeZone ?? e.defaultTimeZone ?? or),
|
|
858
|
-
tryLogin:
|
|
858
|
+
tryLogin: w
|
|
859
859
|
}, Ar;
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function bn(e, t, u = {}) {
|
|
862
862
|
const {
|
|
863
|
-
preventDefault:
|
|
863
|
+
preventDefault: b = !1,
|
|
864
864
|
stopPropagation: o = !1,
|
|
865
865
|
axis: g = "both"
|
|
866
|
-
} = u,
|
|
866
|
+
} = u, x = { capture: u.capture ?? !0 };
|
|
867
867
|
let P = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = { x: 0, y: 0 }, F = [], h = [], m = z(!1);
|
|
868
868
|
function l(M) {
|
|
869
|
-
j(
|
|
869
|
+
j(b) && M.preventDefault(), j(o) && M.stopPropagation();
|
|
870
870
|
}
|
|
871
871
|
function r(M) {
|
|
872
872
|
var s;
|
|
873
|
-
const
|
|
874
|
-
if (!
|
|
873
|
+
const w = j(e);
|
|
874
|
+
if (!w)
|
|
875
875
|
return;
|
|
876
|
-
const C =
|
|
877
|
-
$ = { x:
|
|
876
|
+
const C = w.$el, _ = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
|
|
877
|
+
$ = { x: _.clientX, y: _.clientY }, N = {
|
|
878
878
|
x: C.offsetLeft,
|
|
879
879
|
y: C.offsetTop
|
|
880
880
|
}, P = {
|
|
881
881
|
x: C.offsetLeft,
|
|
882
882
|
y: C.offsetTop
|
|
883
|
-
}, ((s = u.onStart) == null ? void 0 : s.call(u, $, M)) !== !1 && (h.push(he("mousemove",
|
|
883
|
+
}, ((s = u.onStart) == null ? void 0 : s.call(u, $, M)) !== !1 && (h.push(he("mousemove", y)), h.push(he("touchmove", y)), h.push(he("mouseup", S)), h.push(he("touchend", S)), l(M));
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function y(M) {
|
|
886
886
|
var A;
|
|
887
887
|
if (!$ || !j(e))
|
|
888
888
|
return;
|
|
889
889
|
const I = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
|
|
890
|
-
let
|
|
891
|
-
(g === "x" || g === "both") && (P.x = N.x +
|
|
890
|
+
let _ = I.clientX - $.x, s = I.clientY - $.y;
|
|
891
|
+
(g === "x" || g === "both") && (P.x = N.x + _), (g === "y" || g === "both") && (P.y = N.y + s), (A = u.onMove) == null || A.call(u, P, M), l(M), i(P);
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
var
|
|
893
|
+
function S(M) {
|
|
894
|
+
var w;
|
|
895
895
|
document.documentElement.style.cursor = "", h.forEach((C) => {
|
|
896
896
|
C();
|
|
897
|
-
}), h.length = 0, (
|
|
897
|
+
}), h.length = 0, (w = u.onEnd) == null || w.call(u, P, M), l(M);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
const
|
|
901
|
-
if (!
|
|
899
|
+
function i(M) {
|
|
900
|
+
const w = j(e);
|
|
901
|
+
if (!w)
|
|
902
902
|
return;
|
|
903
|
-
const C =
|
|
903
|
+
const C = w.$el;
|
|
904
904
|
C.style.left = `${M.x}px`, C.style.top = `${M.y}px`;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function D() {
|
|
907
907
|
if (j(m))
|
|
908
908
|
return;
|
|
909
909
|
const M = j(t);
|
|
910
910
|
if (!M)
|
|
911
911
|
return;
|
|
912
|
-
const
|
|
913
|
-
|
|
912
|
+
const w = M.$el;
|
|
913
|
+
w.style.cursor = "move", F.push(he(w, "mousedown", r, x)), F.push(he(w, "touchstart", r, x)), m.value = !0;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function E() {
|
|
916
916
|
if (!j(m))
|
|
917
917
|
return;
|
|
918
918
|
const M = j(t);
|
|
919
919
|
if (!M)
|
|
920
920
|
return;
|
|
921
|
-
const
|
|
922
|
-
|
|
921
|
+
const w = M.$el;
|
|
922
|
+
w.style.cursor = "", F.forEach((C) => {
|
|
923
923
|
C();
|
|
924
924
|
}), F.length = 0, m.value = !1;
|
|
925
925
|
}
|
|
926
926
|
return {
|
|
927
927
|
draggingIsOn: m,
|
|
928
|
-
turnDraggableOff:
|
|
929
|
-
turnDraggableOn:
|
|
928
|
+
turnDraggableOff: E,
|
|
929
|
+
turnDraggableOn: D
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
|
-
const
|
|
933
|
-
function
|
|
934
|
-
let u,
|
|
932
|
+
const Sn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
933
|
+
function An(e, t = {}) {
|
|
934
|
+
let u, b = t.handleWidth ?? 12, o = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, N = t.maxHeight ?? Number.MAX_SAFE_INTEGER, $ = t.preventDefault ?? !1, F = t.stopPropagation ?? !1, h, m = [];
|
|
935
935
|
const l = z(!1);
|
|
936
|
-
let r = [],
|
|
937
|
-
const
|
|
938
|
-
let
|
|
936
|
+
let r = [], y = [];
|
|
937
|
+
const S = z(!1), i = z({ x: 0, y: 0 });
|
|
938
|
+
let D = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, E = {};
|
|
939
939
|
function M(W) {
|
|
940
940
|
Ae($) && W.preventDefault(), Ae(F) && W.stopPropagation();
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function w(W, Y) {
|
|
943
943
|
m = Y.map(I), m.forEach((H) => W.$el.appendChild(H));
|
|
944
944
|
}
|
|
945
945
|
function C(W) {
|
|
946
946
|
m.forEach((Y) => W.$el.removeChild(Y));
|
|
947
947
|
}
|
|
948
948
|
function I(W) {
|
|
949
|
-
const Y =
|
|
949
|
+
const Y = b + "px", H = -b / 2 + "px", ae = o + 1, G = document.createElement("div");
|
|
950
950
|
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? o : ae).toString(), G.style.cursor = K(W), W.includes("t") && (G.style.top = H, G.style.height = Y, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = H, G.style.height = Y, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = H, G.style.width = Y, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = H, G.style.width = Y, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function _(W) {
|
|
953
953
|
var ne;
|
|
954
954
|
if (!m.some((fe) => fe == W.target))
|
|
955
955
|
return;
|
|
@@ -957,45 +957,45 @@ function Sn(e, t = {}) {
|
|
|
957
957
|
if (!Y)
|
|
958
958
|
return;
|
|
959
959
|
const H = Y.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
|
|
960
|
-
if (
|
|
960
|
+
if (i.value.x = G.clientX, i.value.y = G.clientY, D = {
|
|
961
961
|
left: H.offsetLeft,
|
|
962
962
|
top: H.offsetTop,
|
|
963
963
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
964
964
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
|
|
965
|
-
},
|
|
965
|
+
}, E = Pr(D), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, W)) === !1)
|
|
966
966
|
return;
|
|
967
967
|
let X = W.target;
|
|
968
|
-
document.documentElement.style.cursor = K(X.dataset.handle), h = X.dataset.handle,
|
|
968
|
+
document.documentElement.style.cursor = K(X.dataset.handle), h = X.dataset.handle, y.push(he("mousemove", s)), y.push(he("mouseup", A)), y.push(he("touchmove", s)), y.push(he("touchend", A)), M(W);
|
|
969
969
|
}
|
|
970
970
|
function s(W) {
|
|
971
971
|
const Y = Ae(e);
|
|
972
972
|
if (!Y)
|
|
973
973
|
return;
|
|
974
974
|
const H = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
|
|
975
|
-
let X = G.clientX -
|
|
976
|
-
const fe = Ae(
|
|
975
|
+
let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
|
|
976
|
+
const fe = Ae(D);
|
|
977
977
|
if (h.includes("t")) {
|
|
978
|
-
const
|
|
979
|
-
|
|
978
|
+
const ie = Math.min(N, Math.max(P, (fe.height ?? 0) - ne));
|
|
979
|
+
E.height = ie, E.top = (fe.top ?? 0) + ne;
|
|
980
980
|
}
|
|
981
981
|
if (h.includes("b")) {
|
|
982
|
-
const
|
|
983
|
-
|
|
982
|
+
const ie = Math.min(N, Math.max(P, (fe.height ?? 0) + ne));
|
|
983
|
+
E.height = ie;
|
|
984
984
|
}
|
|
985
985
|
if (h.includes("l")) {
|
|
986
|
-
const
|
|
987
|
-
|
|
986
|
+
const ie = Math.min(x, Math.max(g, (fe.width ?? 0) - X));
|
|
987
|
+
E.width = ie, E.left = (fe.left ?? 0) + X;
|
|
988
988
|
}
|
|
989
989
|
if (h.includes("r")) {
|
|
990
|
-
const
|
|
991
|
-
|
|
990
|
+
const ie = Math.min(x, Math.max(g, (fe.width ?? 0) + X));
|
|
991
|
+
E.width = ie;
|
|
992
992
|
}
|
|
993
|
-
H.dispatchEvent(new CustomEvent("resize")), M(W), re(
|
|
993
|
+
H.dispatchEvent(new CustomEvent("resize")), M(W), re(E);
|
|
994
994
|
}
|
|
995
995
|
function A() {
|
|
996
|
-
document.documentElement.style.cursor = "", h = null,
|
|
996
|
+
document.documentElement.style.cursor = "", h = null, y.forEach((W) => {
|
|
997
997
|
W();
|
|
998
|
-
}),
|
|
998
|
+
}), y.length = 0;
|
|
999
999
|
}
|
|
1000
1000
|
function K(W) {
|
|
1001
1001
|
const Y = {
|
|
@@ -1012,7 +1012,7 @@ function Sn(e, t = {}) {
|
|
|
1012
1012
|
return;
|
|
1013
1013
|
const H = Y.$el;
|
|
1014
1014
|
if (console.log(u), u !== "page" && W == "page") {
|
|
1015
|
-
const ae =
|
|
1015
|
+
const ae = Jt(H), G = Ae(ae) ?? null;
|
|
1016
1016
|
let X = 0;
|
|
1017
1017
|
if (G != null) {
|
|
1018
1018
|
const ne = window.getComputedStyle(G);
|
|
@@ -1028,27 +1028,27 @@ function Sn(e, t = {}) {
|
|
|
1028
1028
|
H.style.width = "auto", H.style.top = "", H.style.left = "", H.style.position = "", H.style.transition = "", l.value = !1;
|
|
1029
1029
|
}, { once: !0 });
|
|
1030
1030
|
} else if ((u == "page" || Y.$el.style.position !== "absolute") && W !== "page") {
|
|
1031
|
-
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", l.value = !0,
|
|
1031
|
+
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", l.value = !0, D = {
|
|
1032
1032
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
1033
1033
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width")),
|
|
1034
1034
|
top: H.offsetTop,
|
|
1035
1035
|
left: H.offsetLeft,
|
|
1036
1036
|
position: "absolute"
|
|
1037
|
-
}, re(
|
|
1038
|
-
const ae =
|
|
1039
|
-
W == "freestyle" ?
|
|
1037
|
+
}, re(D), H.offsetHeight;
|
|
1038
|
+
const ae = D;
|
|
1039
|
+
W == "freestyle" ? E = {
|
|
1040
1040
|
height: ae.height,
|
|
1041
1041
|
width: (ae.width ?? 100) / 2,
|
|
1042
1042
|
top: (ae.top ?? 0) + 2,
|
|
1043
1043
|
left: (ae.left ?? 0) + 2,
|
|
1044
1044
|
position: "absolute"
|
|
1045
|
-
} : W == "blade" && (
|
|
1045
|
+
} : W == "blade" && (E = {
|
|
1046
1046
|
height: ae.height,
|
|
1047
1047
|
width: (ae.width ?? 100) / 2,
|
|
1048
1048
|
top: (ae.top ?? 0) + 2,
|
|
1049
1049
|
left: (ae.left ?? 0) + 2,
|
|
1050
1050
|
position: "absolute"
|
|
1051
|
-
}), re(
|
|
1051
|
+
}), re(E), he(H, "transitionend", () => {
|
|
1052
1052
|
H.style.transition = "", l.value = !1;
|
|
1053
1053
|
}, { once: !0 });
|
|
1054
1054
|
}
|
|
@@ -1060,39 +1060,39 @@ function Sn(e, t = {}) {
|
|
|
1060
1060
|
const H = Y.$el;
|
|
1061
1061
|
W.top ? H.style.top = `${W.top}px` : H.style.top = void 0, W.left ? H.style.left = `${W.left}px` : H.style.left = void 0, W.height ? H.style.height = `${W.height}px` : H.style.height = void 0, W.width ? H.style.width = `${W.width}px` : H.style.width = void 0, W.position ? H.style.position = `${W.position}` : H.style.position = void 0, console.log(H.style.position);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1064
|
-
if (
|
|
1063
|
+
function ce(W, Y) {
|
|
1064
|
+
if (S.value)
|
|
1065
1065
|
return;
|
|
1066
1066
|
const H = Ae(e);
|
|
1067
|
-
H && (
|
|
1067
|
+
H && (w(H, W ?? Sn), Q(Y), r.push(he(H.$el, "mousedown", _)), r.push(he(H.$el, "touchstart", _)), S.value = !0, u = Y);
|
|
1068
1068
|
}
|
|
1069
1069
|
function we(W) {
|
|
1070
|
-
if (!
|
|
1070
|
+
if (!S.value)
|
|
1071
1071
|
return;
|
|
1072
1072
|
const Y = Ae(e);
|
|
1073
1073
|
Y && (C(Y), Q(W), r.forEach((H) => {
|
|
1074
1074
|
H();
|
|
1075
|
-
}), r.length = 0,
|
|
1075
|
+
}), r.length = 0, S.value = !1);
|
|
1076
1076
|
}
|
|
1077
1077
|
return {
|
|
1078
|
-
resizingIsOn:
|
|
1079
|
-
turnResizingOn:
|
|
1078
|
+
resizingIsOn: S,
|
|
1079
|
+
turnResizingOn: ce,
|
|
1080
1080
|
turnResizingOff: we
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), u = (e == null ? void 0 : e.handle) ?? z(null),
|
|
1085
|
-
|
|
1083
|
+
function En(e) {
|
|
1084
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), u = (e == null ? void 0 : e.handle) ?? z(null), b = z(!1), o = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: N } = An(t), { turnDraggableOff: $, turnDraggableOn: F } = bn(t, u);
|
|
1085
|
+
jt(t, (m) => {
|
|
1086
1086
|
const l = m[0], { width: r } = l.contentRect;
|
|
1087
|
-
|
|
1087
|
+
b.value = r < o;
|
|
1088
1088
|
});
|
|
1089
1089
|
function h(m) {
|
|
1090
1090
|
$(), m == "page" ? P(m) : m == "blade" ? N(["l", "r"], m) : m == "freestyle" ? (P(), N(void 0, m), F()) : m == "inline" && P();
|
|
1091
1091
|
}
|
|
1092
1092
|
return h(g.value), _e(g, (m) => h(m)), {
|
|
1093
|
-
isMobile:
|
|
1093
|
+
isMobile: b,
|
|
1094
1094
|
variant: g,
|
|
1095
|
-
bladeData:
|
|
1095
|
+
bladeData: x
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
1098
|
const dr = {
|
|
@@ -1113,10 +1113,10 @@ const dr = {
|
|
|
1113
1113
|
warning: "#FB8C00"
|
|
1114
1114
|
};
|
|
1115
1115
|
let Er;
|
|
1116
|
-
function
|
|
1116
|
+
function va() {
|
|
1117
1117
|
return Er;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function ga(e) {
|
|
1120
1120
|
const t = localStorage.getItem("cosmetics");
|
|
1121
1121
|
let u;
|
|
1122
1122
|
return t != null && t.length > 0 && (u = JSON.parse(t)), u ?? (u = {}), u.dark ?? (u.dark = e == null ? void 0 : e.dark), u.light ?? (u.light = e == null ? void 0 : e.light), u.theme ?? (u.theme = e == null ? void 0 : e.defaultTheme), {
|
|
@@ -1131,10 +1131,10 @@ function ma(e) {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
};
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function In(e) {
|
|
1135
1135
|
const t = z({});
|
|
1136
1136
|
let u = e.vuetifyInstance;
|
|
1137
|
-
function
|
|
1137
|
+
function b() {
|
|
1138
1138
|
const h = localStorage.getItem("cosmetics");
|
|
1139
1139
|
h != null && h.length > 0 ? t.value = JSON.parse(h) : t.value = {
|
|
1140
1140
|
theme: e.defaultTheme ?? "light",
|
|
@@ -1162,7 +1162,7 @@ function En(e) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
}));
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function x(h) {
|
|
1166
1166
|
var m;
|
|
1167
1167
|
if (u != null) {
|
|
1168
1168
|
const l = u.themes.value.dark, r = u.themes.value.light;
|
|
@@ -1185,57 +1185,57 @@ function En(e) {
|
|
|
1185
1185
|
m.colors.primary = (t.value.dark ?? { ...hr, ...e.defaultDarkTheme }).primary, l.colors.primary = (t.value.light ?? { ...dr, ...e.defaultLightTheme }).primary, (h = document.querySelector('meta[name="theme-color"]')) == null || h.setAttribute("content", "");
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
|
-
return
|
|
1188
|
+
return b(), _e(t, () => {
|
|
1189
1189
|
o();
|
|
1190
1190
|
}), Er = {
|
|
1191
1191
|
state: t,
|
|
1192
1192
|
resetCosmetics: g,
|
|
1193
|
-
setTemporaryColor:
|
|
1193
|
+
setTemporaryColor: x,
|
|
1194
1194
|
toggleDrawer: P,
|
|
1195
1195
|
toggleDrawerStick: N,
|
|
1196
1196
|
toggleLightDark: $,
|
|
1197
1197
|
undoTemporaryColor: F
|
|
1198
1198
|
}, Er;
|
|
1199
1199
|
}
|
|
1200
|
-
const
|
|
1200
|
+
const ya = {
|
|
1201
1201
|
canExportCSV: !1
|
|
1202
1202
|
};
|
|
1203
|
-
function
|
|
1203
|
+
function Dn() {
|
|
1204
1204
|
function e(t) {
|
|
1205
1205
|
const {
|
|
1206
1206
|
items: u,
|
|
1207
|
-
headers:
|
|
1207
|
+
headers: b,
|
|
1208
1208
|
fileName: o = "data.csv",
|
|
1209
1209
|
format: g = "file"
|
|
1210
1210
|
} = t;
|
|
1211
1211
|
if (!Te(u))
|
|
1212
1212
|
return;
|
|
1213
|
-
let
|
|
1214
|
-
|
|
1215
|
-
header:
|
|
1216
|
-
itemText:
|
|
1217
|
-
value:
|
|
1218
|
-
})) :
|
|
1213
|
+
let x = [];
|
|
1214
|
+
b != null ? x = b == null ? void 0 : b.filter((S) => (S.csv ?? S.csvText ?? S.csvFilter ?? S.csvArray) != null).map((S) => ({
|
|
1215
|
+
header: S.title ?? S.value ?? "",
|
|
1216
|
+
itemText: S.itemText,
|
|
1217
|
+
value: S.value
|
|
1218
|
+
})) : x = Object.keys(u[0]).map((S) => ({ header: tn(S) ?? "", value: S })), x = x.filter((S) => S.header.length > 0);
|
|
1219
1219
|
var P = [];
|
|
1220
|
-
for (let
|
|
1221
|
-
const
|
|
1220
|
+
for (let S = 0; S < u.length; S++) {
|
|
1221
|
+
const i = u[S];
|
|
1222
1222
|
var N = {}, $ = [];
|
|
1223
|
-
for (let
|
|
1224
|
-
const
|
|
1223
|
+
for (let D = 0; D < x.length; D++) {
|
|
1224
|
+
const E = x[D];
|
|
1225
1225
|
var F = null;
|
|
1226
|
-
typeof
|
|
1226
|
+
typeof E.value == "function" ? F = E.value(i) : typeof E.value == "string" && (F = wr(i, E.value)), E.itemText != null ? N[E.header] = wr(F, E.itemText) : N[E.header] = F;
|
|
1227
1227
|
}
|
|
1228
|
-
P.push(N), Te($) && $.forEach((
|
|
1229
|
-
P.push(
|
|
1228
|
+
P.push(N), Te($) && $.forEach((D) => {
|
|
1229
|
+
P.push(D);
|
|
1230
1230
|
}), $ = [];
|
|
1231
1231
|
}
|
|
1232
1232
|
var h = [];
|
|
1233
|
-
if (h.push(
|
|
1234
|
-
let
|
|
1235
|
-
|
|
1236
|
-
var
|
|
1237
|
-
|
|
1238
|
-
}), h.push(
|
|
1233
|
+
if (h.push(x.map((S) => S.header).toString()), P.forEach((S) => {
|
|
1234
|
+
let i = [];
|
|
1235
|
+
x.forEach(function(D) {
|
|
1236
|
+
var E = S[D.header];
|
|
1237
|
+
i.push(E ?? "");
|
|
1238
|
+
}), h.push(i.join(","));
|
|
1239
1239
|
}), g == "array")
|
|
1240
1240
|
return h;
|
|
1241
1241
|
var m = h.join(`
|
|
@@ -1243,9 +1243,9 @@ function In() {
|
|
|
1243
1243
|
if (window.navigator.msSaveOrOpenBlob)
|
|
1244
1244
|
window.navigator.msSaveOrOpenBlob(l, o);
|
|
1245
1245
|
else {
|
|
1246
|
-
var r = document.createElement("a"),
|
|
1247
|
-
r.href =
|
|
1248
|
-
document.body.removeChild(r), window.URL.revokeObjectURL(
|
|
1246
|
+
var r = document.createElement("a"), y = URL.createObjectURL(l);
|
|
1247
|
+
r.href = y, r.download = o, document.body.appendChild(r), r.click(), setTimeout(function() {
|
|
1248
|
+
document.body.removeChild(r), window.URL.revokeObjectURL(y);
|
|
1249
1249
|
}, 0);
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
@@ -1254,15 +1254,15 @@ function In() {
|
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
1256
|
let Ir;
|
|
1257
|
-
function
|
|
1257
|
+
function wa() {
|
|
1258
1258
|
return Ir;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function xn(e) {
|
|
1261
1261
|
const t = e.getUTC ?? de.utc;
|
|
1262
1262
|
function u() {
|
|
1263
1263
|
return o().startOf("day").toUTC().toString() ?? "";
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function b() {
|
|
1266
1266
|
return o().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
1267
1267
|
}
|
|
1268
1268
|
function o(N, $) {
|
|
@@ -1278,7 +1278,7 @@ function Dn(e) {
|
|
|
1278
1278
|
const h = F ? de.fromFormat(N, F, { zone: e.getTimeZone() }) : de.fromISO(N, { zone: e.getTimeZone() });
|
|
1279
1279
|
return $ ? h.toFormat($) : h == null ? void 0 : h.toString();
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function x(N, $) {
|
|
1282
1282
|
return N == null ? t() : $ ? de.fromFormat(N, $) : de.fromISO(N);
|
|
1283
1283
|
}
|
|
1284
1284
|
function P(N, $, F) {
|
|
@@ -1291,20 +1291,20 @@ function Dn(e) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return Ir = {
|
|
1293
1293
|
getToday: u,
|
|
1294
|
-
getTomorrow:
|
|
1294
|
+
getTomorrow: b,
|
|
1295
1295
|
tzDate: o,
|
|
1296
1296
|
tzString: g,
|
|
1297
|
-
utcDate:
|
|
1297
|
+
utcDate: x,
|
|
1298
1298
|
utcString: P
|
|
1299
1299
|
}, Ir;
|
|
1300
1300
|
}
|
|
1301
1301
|
let Dr;
|
|
1302
|
-
function
|
|
1302
|
+
function ba() {
|
|
1303
1303
|
return Dr;
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function _n(e) {
|
|
1306
1306
|
const t = z(!1), u = (e == null ? void 0 : e.apis) ?? [];
|
|
1307
|
-
function
|
|
1307
|
+
function b() {
|
|
1308
1308
|
t.value = !0;
|
|
1309
1309
|
}
|
|
1310
1310
|
function o() {
|
|
@@ -1318,30 +1318,30 @@ function xn(e) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
return m == null && (m = u.find((l) => Array.isArray(l.nav) ? l.nav.some((r) => r == h.nav) : l.nav == h.nav)), m;
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function x(h) {
|
|
1322
1322
|
var r;
|
|
1323
1323
|
if (u == null)
|
|
1324
1324
|
return Promise.resolve("no demo data available for this api");
|
|
1325
1325
|
const m = h.id ?? ((r = h.data) == null ? void 0 : r.id), l = g(h);
|
|
1326
1326
|
if (m != null && (l == null ? void 0 : l.data) != null) {
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1327
|
+
const y = l.data.findIndex((S) => S.id == m);
|
|
1328
|
+
y >= 0 && l.data.splice(y, 1);
|
|
1329
1329
|
}
|
|
1330
|
-
return new Promise(function(
|
|
1330
|
+
return new Promise(function(y) {
|
|
1331
1331
|
setTimeout(function() {
|
|
1332
|
-
|
|
1332
|
+
y(void 0);
|
|
1333
1333
|
}, 200);
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
1336
|
function P(h) {
|
|
1337
|
-
var
|
|
1337
|
+
var y, S, i;
|
|
1338
1338
|
if (u == null)
|
|
1339
1339
|
throw new Error("no demo data available for this api");
|
|
1340
|
-
const m = h.id ?? ((
|
|
1340
|
+
const m = h.id ?? ((y = h.data) == null ? void 0 : y.id), l = g(h);
|
|
1341
1341
|
let r;
|
|
1342
|
-
return l != null && (l.data ?? (l.data = []), l.getAction != null ? r = l.getAction(l.data, m) : m != null ? r = (
|
|
1342
|
+
return l != null && (l.data ?? (l.data = []), l.getAction != null ? r = l.getAction(l.data, m) : m != null ? r = (S = l.data) == null ? void 0 : S.find((D) => D.id == m) : l.path != null && ((i = l.data) == null ? void 0 : i.length) == 1 && (r = l.data[0])), r == null ? Promise.resolve(void 0) : new Promise((D) => {
|
|
1343
1343
|
setTimeout(() => {
|
|
1344
|
-
|
|
1344
|
+
D({
|
|
1345
1345
|
data: r
|
|
1346
1346
|
});
|
|
1347
1347
|
});
|
|
@@ -1363,21 +1363,21 @@ function xn(e) {
|
|
|
1363
1363
|
});
|
|
1364
1364
|
}
|
|
1365
1365
|
function $(h) {
|
|
1366
|
-
var r,
|
|
1366
|
+
var r, y;
|
|
1367
1367
|
if (u == null)
|
|
1368
1368
|
throw new Error("no demo data available for this api");
|
|
1369
1369
|
const m = g(h);
|
|
1370
1370
|
let l;
|
|
1371
|
-
return m != null && (m.data ?? (m.data = []), m.postAction != null ? l = m.postAction(m.data, h.data) : h.data != null && (h.data.id == null && (h.data.id = ((((r = m.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), l = h.data, (
|
|
1371
|
+
return m != null && (m.data ?? (m.data = []), m.postAction != null ? l = m.postAction(m.data, h.data) : h.data != null && (h.data.id == null && (h.data.id = ((((r = m.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), l = h.data, (y = m.data) == null || y.push(l))), l == null ? Promise.resolve(void 0) : new Promise((S) => {
|
|
1372
1372
|
setTimeout(() => {
|
|
1373
|
-
|
|
1373
|
+
S({
|
|
1374
1374
|
data: l
|
|
1375
1375
|
});
|
|
1376
1376
|
});
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
1379
|
function F(h) {
|
|
1380
|
-
var r,
|
|
1380
|
+
var r, y;
|
|
1381
1381
|
if (u == null)
|
|
1382
1382
|
throw new Error("no demo data available for this api");
|
|
1383
1383
|
const m = g(h);
|
|
@@ -1386,13 +1386,13 @@ function xn(e) {
|
|
|
1386
1386
|
if (m.data ?? (m.data = []), m.patchAction != null)
|
|
1387
1387
|
l = m.patchAction(m.data, h.data);
|
|
1388
1388
|
else if (h.data.id != null) {
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1389
|
+
const S = (r = m.data) == null ? void 0 : r.findIndex((i) => i.id == h.data.id);
|
|
1390
|
+
S != null && S > -1 && ((y = m.data) == null || y.splice(S, 1, h.data)), l = h.data;
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
return l == null ? Promise.resolve(void 0) : new Promise((
|
|
1393
|
+
return l == null ? Promise.resolve(void 0) : new Promise((S) => {
|
|
1394
1394
|
setTimeout(() => {
|
|
1395
|
-
|
|
1395
|
+
S({
|
|
1396
1396
|
data: l
|
|
1397
1397
|
});
|
|
1398
1398
|
});
|
|
@@ -1401,26 +1401,26 @@ function xn(e) {
|
|
|
1401
1401
|
return Dr = {
|
|
1402
1402
|
endDemo: o,
|
|
1403
1403
|
isDemoing: t,
|
|
1404
|
-
startDemo:
|
|
1404
|
+
startDemo: b,
|
|
1405
1405
|
data: u,
|
|
1406
|
-
deleteItem:
|
|
1406
|
+
deleteItem: x,
|
|
1407
1407
|
get: P,
|
|
1408
1408
|
getAll: N,
|
|
1409
1409
|
post: $,
|
|
1410
1410
|
patch: F
|
|
1411
1411
|
}, Dr;
|
|
1412
1412
|
}
|
|
1413
|
-
var
|
|
1414
|
-
function
|
|
1413
|
+
var Tn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
1414
|
+
function Sa(e) {
|
|
1415
1415
|
function t(u) {
|
|
1416
1416
|
var o;
|
|
1417
|
-
const
|
|
1418
|
-
if (
|
|
1419
|
-
document.title =
|
|
1417
|
+
const b = u.matched.slice().reverse().find((g) => g.meta && g.meta.title);
|
|
1418
|
+
if (b)
|
|
1419
|
+
document.title = b.meta.title;
|
|
1420
1420
|
else {
|
|
1421
|
-
const g =
|
|
1422
|
-
let
|
|
1423
|
-
g == "development" ?
|
|
1421
|
+
const g = Tn.NODE_ENV;
|
|
1422
|
+
let x = "";
|
|
1423
|
+
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((o = e == null ? void 0 : e.demo) == null ? void 0 : o.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
return {
|
|
@@ -1428,12 +1428,12 @@ function wa(e) {
|
|
|
1428
1428
|
};
|
|
1429
1429
|
}
|
|
1430
1430
|
let xr;
|
|
1431
|
-
function
|
|
1431
|
+
function Aa() {
|
|
1432
1432
|
return xr;
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Cn(e) {
|
|
1435
1435
|
function t(s, A, K) {
|
|
1436
|
-
return s ?
|
|
1436
|
+
return s ? an(s) ? K ?? "" : e.dates.tzString(s, A) : K ?? s ?? "";
|
|
1437
1437
|
}
|
|
1438
1438
|
function u(s) {
|
|
1439
1439
|
if (!s)
|
|
@@ -1443,7 +1443,7 @@ function Tn(e) {
|
|
|
1443
1443
|
var A = "";
|
|
1444
1444
|
return s.companyAccount != null && (A = s.companyAccount.companyName + " | "), s.addressLineOne != null && (A = A + s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + ", "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function b(s) {
|
|
1447
1447
|
if (typeof s != "number")
|
|
1448
1448
|
return s;
|
|
1449
1449
|
var A = new Intl.NumberFormat("en-US", {
|
|
@@ -1459,7 +1459,7 @@ function Tn(e) {
|
|
|
1459
1459
|
function g(s, A) {
|
|
1460
1460
|
return t(s, "d LLL", A);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function x(s, A) {
|
|
1463
1463
|
return t(s, "ccc", A);
|
|
1464
1464
|
}
|
|
1465
1465
|
function P(s, A) {
|
|
@@ -1484,7 +1484,7 @@ function Tn(e) {
|
|
|
1484
1484
|
return e.dates.utcString(s, A);
|
|
1485
1485
|
}
|
|
1486
1486
|
function l(s) {
|
|
1487
|
-
return
|
|
1487
|
+
return rt(s, !1);
|
|
1488
1488
|
}
|
|
1489
1489
|
function r(s) {
|
|
1490
1490
|
if (!s)
|
|
@@ -1494,29 +1494,29 @@ function Tn(e) {
|
|
|
1494
1494
|
var A = "";
|
|
1495
1495
|
return s.addressLineOne != null && (A = s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + " "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A = A.replaceAll(",", " "), A;
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function y(s, A) {
|
|
1498
1498
|
return t(s, "ddd DD MMM YYYY", A);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function S(s, A) {
|
|
1501
1501
|
return t(s, "ccc dd LLL yyyy hh:mm a", A);
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function i(s) {
|
|
1504
1504
|
var A = new Intl.NumberFormat("en-US", {
|
|
1505
1505
|
style: "percent",
|
|
1506
1506
|
minimumFractionDigits: 2
|
|
1507
1507
|
});
|
|
1508
1508
|
return A.format(s);
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function D(s) {
|
|
1511
1511
|
return s.replaceAll(",", " ");
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function E(s, A) {
|
|
1514
1514
|
return t(s, "dd LLL yyyy", A);
|
|
1515
1515
|
}
|
|
1516
1516
|
function M(s, A) {
|
|
1517
1517
|
return t(s, "dd LLL yyyy hh:mm a", A);
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function w(s, A) {
|
|
1520
1520
|
return t(s, "hh:mm a", A);
|
|
1521
1521
|
}
|
|
1522
1522
|
function C(s) {
|
|
@@ -1524,10 +1524,10 @@ function Tn(e) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
const I = {
|
|
1526
1526
|
toCompanyNameAndLocationLine: u,
|
|
1527
|
-
toCurrency:
|
|
1527
|
+
toCurrency: b,
|
|
1528
1528
|
toDayDate: o,
|
|
1529
1529
|
toDayMonth: g,
|
|
1530
|
-
toDayOfWeek:
|
|
1530
|
+
toDayOfWeek: x,
|
|
1531
1531
|
toDayShortDate: P,
|
|
1532
1532
|
toDayShortDateAndTime: N,
|
|
1533
1533
|
toDisplayNumber: $,
|
|
@@ -1536,16 +1536,16 @@ function Tn(e) {
|
|
|
1536
1536
|
toFormat: m,
|
|
1537
1537
|
toLocationLine: l,
|
|
1538
1538
|
toLocationLineNoCommas: r,
|
|
1539
|
-
toLongDate:
|
|
1540
|
-
toLongDateAndTime:
|
|
1541
|
-
toPercent:
|
|
1542
|
-
toPrettyCSV:
|
|
1543
|
-
toShortDate:
|
|
1539
|
+
toLongDate: y,
|
|
1540
|
+
toLongDateAndTime: S,
|
|
1541
|
+
toPercent: i,
|
|
1542
|
+
toPrettyCSV: D,
|
|
1543
|
+
toShortDate: E,
|
|
1544
1544
|
toShortDateAndTime: M,
|
|
1545
|
-
toTime:
|
|
1545
|
+
toTime: w,
|
|
1546
1546
|
toTimeOfDay: C
|
|
1547
1547
|
};
|
|
1548
|
-
function
|
|
1548
|
+
function _(s) {
|
|
1549
1549
|
if (s != null) {
|
|
1550
1550
|
let A = s;
|
|
1551
1551
|
if (A != null && I[A] != null)
|
|
@@ -1554,14 +1554,14 @@ function Tn(e) {
|
|
|
1554
1554
|
return (A) => A;
|
|
1555
1555
|
}
|
|
1556
1556
|
return xr = {
|
|
1557
|
-
findFilter:
|
|
1557
|
+
findFilter: _,
|
|
1558
1558
|
...I
|
|
1559
1559
|
}, xr;
|
|
1560
1560
|
}
|
|
1561
1561
|
function Ke(e) {
|
|
1562
1562
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1563
1563
|
}
|
|
1564
|
-
var
|
|
1564
|
+
var lt = { exports: {} };
|
|
1565
1565
|
/*!
|
|
1566
1566
|
localForage -- Offline Storage, Improved
|
|
1567
1567
|
Version 1.10.0
|
|
@@ -1572,10 +1572,10 @@ var at = { exports: {} };
|
|
|
1572
1572
|
(function(u) {
|
|
1573
1573
|
e.exports = u();
|
|
1574
1574
|
})(function() {
|
|
1575
|
-
return function u(
|
|
1576
|
-
function
|
|
1575
|
+
return function u(b, o, g) {
|
|
1576
|
+
function x($, F) {
|
|
1577
1577
|
if (!o[$]) {
|
|
1578
|
-
if (!
|
|
1578
|
+
if (!b[$]) {
|
|
1579
1579
|
var h = typeof Ke == "function" && Ke;
|
|
1580
1580
|
if (!F && h)
|
|
1581
1581
|
return h($, !0);
|
|
@@ -1585,21 +1585,21 @@ var at = { exports: {} };
|
|
|
1585
1585
|
throw m.code = "MODULE_NOT_FOUND", m;
|
|
1586
1586
|
}
|
|
1587
1587
|
var l = o[$] = { exports: {} };
|
|
1588
|
-
|
|
1589
|
-
var
|
|
1590
|
-
return
|
|
1591
|
-
}, l, l.exports, u,
|
|
1588
|
+
b[$][0].call(l.exports, function(r) {
|
|
1589
|
+
var y = b[$][1][r];
|
|
1590
|
+
return x(y || r);
|
|
1591
|
+
}, l, l.exports, u, b, o, g);
|
|
1592
1592
|
}
|
|
1593
1593
|
return o[$].exports;
|
|
1594
1594
|
}
|
|
1595
1595
|
for (var P = typeof Ke == "function" && Ke, N = 0; N < g.length; N++)
|
|
1596
|
-
|
|
1597
|
-
return
|
|
1598
|
-
}({ 1: [function(u,
|
|
1596
|
+
x(g[N]);
|
|
1597
|
+
return x;
|
|
1598
|
+
}({ 1: [function(u, b, o) {
|
|
1599
1599
|
(function(g) {
|
|
1600
|
-
var
|
|
1601
|
-
if (
|
|
1602
|
-
var N = 0, $ = new
|
|
1600
|
+
var x = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
1601
|
+
if (x) {
|
|
1602
|
+
var N = 0, $ = new x(r), F = g.document.createTextNode("");
|
|
1603
1603
|
$.observe(F, {
|
|
1604
1604
|
characterData: !0
|
|
1605
1605
|
}), P = function() {
|
|
@@ -1612,184 +1612,184 @@ var at = { exports: {} };
|
|
|
1612
1612
|
};
|
|
1613
1613
|
} else
|
|
1614
1614
|
"document" in g && "onreadystatechange" in g.document.createElement("script") ? P = function() {
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1617
|
-
r(),
|
|
1618
|
-
}, g.document.documentElement.appendChild(
|
|
1615
|
+
var S = g.document.createElement("script");
|
|
1616
|
+
S.onreadystatechange = function() {
|
|
1617
|
+
r(), S.onreadystatechange = null, S.parentNode.removeChild(S), S = null;
|
|
1618
|
+
}, g.document.documentElement.appendChild(S);
|
|
1619
1619
|
} : P = function() {
|
|
1620
1620
|
setTimeout(r, 0);
|
|
1621
1621
|
};
|
|
1622
1622
|
var m, l = [];
|
|
1623
1623
|
function r() {
|
|
1624
1624
|
m = !0;
|
|
1625
|
-
for (var
|
|
1626
|
-
for (
|
|
1627
|
-
|
|
1628
|
-
|
|
1625
|
+
for (var S, i, D = l.length; D; ) {
|
|
1626
|
+
for (i = l, l = [], S = -1; ++S < D; )
|
|
1627
|
+
i[S]();
|
|
1628
|
+
D = l.length;
|
|
1629
1629
|
}
|
|
1630
1630
|
m = !1;
|
|
1631
1631
|
}
|
|
1632
|
-
|
|
1633
|
-
function
|
|
1634
|
-
l.push(
|
|
1632
|
+
b.exports = y;
|
|
1633
|
+
function y(S) {
|
|
1634
|
+
l.push(S) === 1 && !m && P();
|
|
1635
1635
|
}
|
|
1636
1636
|
}).call(this, typeof je < "u" ? je : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1637
|
-
}, {}], 2: [function(u,
|
|
1637
|
+
}, {}], 2: [function(u, b, o) {
|
|
1638
1638
|
var g = u(1);
|
|
1639
|
-
function
|
|
1639
|
+
function x() {
|
|
1640
1640
|
}
|
|
1641
1641
|
var P = {}, N = ["REJECTED"], $ = ["FULFILLED"], F = ["PENDING"];
|
|
1642
|
-
|
|
1643
|
-
function h(
|
|
1644
|
-
if (typeof
|
|
1642
|
+
b.exports = h;
|
|
1643
|
+
function h(w) {
|
|
1644
|
+
if (typeof w != "function")
|
|
1645
1645
|
throw new TypeError("resolver must be a function");
|
|
1646
|
-
this.state = F, this.queue = [], this.outcome = void 0,
|
|
1646
|
+
this.state = F, this.queue = [], this.outcome = void 0, w !== x && y(this, w);
|
|
1647
1647
|
}
|
|
1648
|
-
h.prototype.catch = function(
|
|
1649
|
-
return this.then(null,
|
|
1650
|
-
}, h.prototype.then = function(
|
|
1651
|
-
if (typeof
|
|
1648
|
+
h.prototype.catch = function(w) {
|
|
1649
|
+
return this.then(null, w);
|
|
1650
|
+
}, h.prototype.then = function(w, C) {
|
|
1651
|
+
if (typeof w != "function" && this.state === $ || typeof C != "function" && this.state === N)
|
|
1652
1652
|
return this;
|
|
1653
|
-
var I = new this.constructor(
|
|
1653
|
+
var I = new this.constructor(x);
|
|
1654
1654
|
if (this.state !== F) {
|
|
1655
|
-
var
|
|
1656
|
-
l(I,
|
|
1655
|
+
var _ = this.state === $ ? w : C;
|
|
1656
|
+
l(I, _, this.outcome);
|
|
1657
1657
|
} else
|
|
1658
|
-
this.queue.push(new m(I,
|
|
1658
|
+
this.queue.push(new m(I, w, C));
|
|
1659
1659
|
return I;
|
|
1660
1660
|
};
|
|
1661
|
-
function m(
|
|
1662
|
-
this.promise =
|
|
1661
|
+
function m(w, C, I) {
|
|
1662
|
+
this.promise = w, typeof C == "function" && (this.onFulfilled = C, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
|
|
1663
1663
|
}
|
|
1664
|
-
m.prototype.callFulfilled = function(
|
|
1665
|
-
P.resolve(this.promise,
|
|
1666
|
-
}, m.prototype.otherCallFulfilled = function(
|
|
1667
|
-
l(this.promise, this.onFulfilled,
|
|
1668
|
-
}, m.prototype.callRejected = function(
|
|
1669
|
-
P.reject(this.promise,
|
|
1670
|
-
}, m.prototype.otherCallRejected = function(
|
|
1671
|
-
l(this.promise, this.onRejected,
|
|
1664
|
+
m.prototype.callFulfilled = function(w) {
|
|
1665
|
+
P.resolve(this.promise, w);
|
|
1666
|
+
}, m.prototype.otherCallFulfilled = function(w) {
|
|
1667
|
+
l(this.promise, this.onFulfilled, w);
|
|
1668
|
+
}, m.prototype.callRejected = function(w) {
|
|
1669
|
+
P.reject(this.promise, w);
|
|
1670
|
+
}, m.prototype.otherCallRejected = function(w) {
|
|
1671
|
+
l(this.promise, this.onRejected, w);
|
|
1672
1672
|
};
|
|
1673
|
-
function l(
|
|
1673
|
+
function l(w, C, I) {
|
|
1674
1674
|
g(function() {
|
|
1675
|
-
var
|
|
1675
|
+
var _;
|
|
1676
1676
|
try {
|
|
1677
|
-
|
|
1677
|
+
_ = C(I);
|
|
1678
1678
|
} catch (s) {
|
|
1679
|
-
return P.reject(
|
|
1679
|
+
return P.reject(w, s);
|
|
1680
1680
|
}
|
|
1681
|
-
|
|
1681
|
+
_ === w ? P.reject(w, new TypeError("Cannot resolve promise with itself")) : P.resolve(w, _);
|
|
1682
1682
|
});
|
|
1683
1683
|
}
|
|
1684
|
-
P.resolve = function(
|
|
1685
|
-
var I =
|
|
1684
|
+
P.resolve = function(w, C) {
|
|
1685
|
+
var I = S(r, C);
|
|
1686
1686
|
if (I.status === "error")
|
|
1687
|
-
return P.reject(
|
|
1688
|
-
var
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1687
|
+
return P.reject(w, I.value);
|
|
1688
|
+
var _ = I.value;
|
|
1689
|
+
if (_)
|
|
1690
|
+
y(w, _);
|
|
1691
1691
|
else {
|
|
1692
|
-
|
|
1693
|
-
for (var s = -1, A =
|
|
1694
|
-
|
|
1692
|
+
w.state = $, w.outcome = C;
|
|
1693
|
+
for (var s = -1, A = w.queue.length; ++s < A; )
|
|
1694
|
+
w.queue[s].callFulfilled(C);
|
|
1695
1695
|
}
|
|
1696
|
-
return
|
|
1697
|
-
}, P.reject = function(
|
|
1698
|
-
|
|
1699
|
-
for (var I = -1,
|
|
1700
|
-
|
|
1701
|
-
return
|
|
1696
|
+
return w;
|
|
1697
|
+
}, P.reject = function(w, C) {
|
|
1698
|
+
w.state = N, w.outcome = C;
|
|
1699
|
+
for (var I = -1, _ = w.queue.length; ++I < _; )
|
|
1700
|
+
w.queue[I].callRejected(C);
|
|
1701
|
+
return w;
|
|
1702
1702
|
};
|
|
1703
|
-
function r(
|
|
1704
|
-
var C =
|
|
1705
|
-
if (
|
|
1703
|
+
function r(w) {
|
|
1704
|
+
var C = w && w.then;
|
|
1705
|
+
if (w && (typeof w == "object" || typeof w == "function") && typeof C == "function")
|
|
1706
1706
|
return function() {
|
|
1707
|
-
C.apply(
|
|
1707
|
+
C.apply(w, arguments);
|
|
1708
1708
|
};
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function y(w, C) {
|
|
1711
1711
|
var I = !1;
|
|
1712
|
-
function
|
|
1713
|
-
I || (I = !0, P.reject(
|
|
1712
|
+
function _(Q) {
|
|
1713
|
+
I || (I = !0, P.reject(w, Q));
|
|
1714
1714
|
}
|
|
1715
1715
|
function s(Q) {
|
|
1716
|
-
I || (I = !0, P.resolve(
|
|
1716
|
+
I || (I = !0, P.resolve(w, Q));
|
|
1717
1717
|
}
|
|
1718
1718
|
function A() {
|
|
1719
|
-
C(s,
|
|
1719
|
+
C(s, _);
|
|
1720
1720
|
}
|
|
1721
|
-
var K =
|
|
1722
|
-
K.status === "error" &&
|
|
1721
|
+
var K = S(A);
|
|
1722
|
+
K.status === "error" && _(K.value);
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function S(w, C) {
|
|
1725
1725
|
var I = {};
|
|
1726
1726
|
try {
|
|
1727
|
-
I.value =
|
|
1728
|
-
} catch (
|
|
1729
|
-
I.status = "error", I.value =
|
|
1727
|
+
I.value = w(C), I.status = "success";
|
|
1728
|
+
} catch (_) {
|
|
1729
|
+
I.status = "error", I.value = _;
|
|
1730
1730
|
}
|
|
1731
1731
|
return I;
|
|
1732
1732
|
}
|
|
1733
|
-
h.resolve =
|
|
1734
|
-
function
|
|
1735
|
-
return
|
|
1733
|
+
h.resolve = i;
|
|
1734
|
+
function i(w) {
|
|
1735
|
+
return w instanceof this ? w : P.resolve(new this(x), w);
|
|
1736
1736
|
}
|
|
1737
|
-
h.reject =
|
|
1738
|
-
function
|
|
1739
|
-
var C = new this(
|
|
1740
|
-
return P.reject(C,
|
|
1737
|
+
h.reject = D;
|
|
1738
|
+
function D(w) {
|
|
1739
|
+
var C = new this(x);
|
|
1740
|
+
return P.reject(C, w);
|
|
1741
1741
|
}
|
|
1742
|
-
h.all =
|
|
1743
|
-
function w
|
|
1742
|
+
h.all = E;
|
|
1743
|
+
function E(w) {
|
|
1744
1744
|
var C = this;
|
|
1745
|
-
if (Object.prototype.toString.call(
|
|
1745
|
+
if (Object.prototype.toString.call(w) !== "[object Array]")
|
|
1746
1746
|
return this.reject(new TypeError("must be an array"));
|
|
1747
|
-
var I =
|
|
1747
|
+
var I = w.length, _ = !1;
|
|
1748
1748
|
if (!I)
|
|
1749
1749
|
return this.resolve([]);
|
|
1750
|
-
for (var s = new Array(I), A = 0, K = -1, Q = new this(
|
|
1751
|
-
re(
|
|
1750
|
+
for (var s = new Array(I), A = 0, K = -1, Q = new this(x); ++K < I; )
|
|
1751
|
+
re(w[K], K);
|
|
1752
1752
|
return Q;
|
|
1753
|
-
function re(
|
|
1754
|
-
C.resolve(
|
|
1755
|
-
|
|
1753
|
+
function re(ce, we) {
|
|
1754
|
+
C.resolve(ce).then(W, function(Y) {
|
|
1755
|
+
_ || (_ = !0, P.reject(Q, Y));
|
|
1756
1756
|
});
|
|
1757
1757
|
function W(Y) {
|
|
1758
|
-
s[we] = Y, ++A === I && !
|
|
1758
|
+
s[we] = Y, ++A === I && !_ && (_ = !0, P.resolve(Q, s));
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
1762
|
h.race = M;
|
|
1763
|
-
function M(
|
|
1763
|
+
function M(w) {
|
|
1764
1764
|
var C = this;
|
|
1765
|
-
if (Object.prototype.toString.call(
|
|
1765
|
+
if (Object.prototype.toString.call(w) !== "[object Array]")
|
|
1766
1766
|
return this.reject(new TypeError("must be an array"));
|
|
1767
|
-
var I =
|
|
1767
|
+
var I = w.length, _ = !1;
|
|
1768
1768
|
if (!I)
|
|
1769
1769
|
return this.resolve([]);
|
|
1770
|
-
for (var s = -1, A = new this(
|
|
1771
|
-
K(
|
|
1770
|
+
for (var s = -1, A = new this(x); ++s < I; )
|
|
1771
|
+
K(w[s]);
|
|
1772
1772
|
return A;
|
|
1773
1773
|
function K(Q) {
|
|
1774
1774
|
C.resolve(Q).then(function(re) {
|
|
1775
|
-
|
|
1775
|
+
_ || (_ = !0, P.resolve(A, re));
|
|
1776
1776
|
}, function(re) {
|
|
1777
|
-
|
|
1777
|
+
_ || (_ = !0, P.reject(A, re));
|
|
1778
1778
|
});
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
}, { 1: 1 }], 3: [function(u,
|
|
1781
|
+
}, { 1: 1 }], 3: [function(u, b, o) {
|
|
1782
1782
|
(function(g) {
|
|
1783
1783
|
typeof g.Promise != "function" && (g.Promise = u(2));
|
|
1784
1784
|
}).call(this, typeof je < "u" ? je : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1785
|
-
}, { 2: 2 }], 4: [function(u,
|
|
1785
|
+
}, { 2: 2 }], 4: [function(u, b, o) {
|
|
1786
1786
|
var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1787
1787
|
return typeof n;
|
|
1788
1788
|
} : function(n) {
|
|
1789
1789
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1790
1790
|
};
|
|
1791
|
-
function
|
|
1792
|
-
if (!(n instanceof
|
|
1791
|
+
function x(n, c) {
|
|
1792
|
+
if (!(n instanceof c))
|
|
1793
1793
|
throw new TypeError("Cannot call a class as a function");
|
|
1794
1794
|
}
|
|
1795
1795
|
function P() {
|
|
@@ -1813,8 +1813,8 @@ var at = { exports: {} };
|
|
|
1813
1813
|
try {
|
|
1814
1814
|
if (!N || !N.open)
|
|
1815
1815
|
return !1;
|
|
1816
|
-
var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform),
|
|
1817
|
-
return (!n ||
|
|
1816
|
+
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;
|
|
1817
|
+
return (!n || c) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
|
|
1818
1818
|
// and HTC Android devices <4.4 are missing IDBKeyRange
|
|
1819
1819
|
// See: https://github.com/mozilla/localForage/issues/128
|
|
1820
1820
|
// See: https://github.com/mozilla/localForage/issues/272
|
|
@@ -1823,93 +1823,93 @@ var at = { exports: {} };
|
|
|
1823
1823
|
return !1;
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
|
-
function F(n,
|
|
1827
|
-
n = n || [],
|
|
1826
|
+
function F(n, c) {
|
|
1827
|
+
n = n || [], c = c || {};
|
|
1828
1828
|
try {
|
|
1829
|
-
return new Blob(n,
|
|
1829
|
+
return new Blob(n, c);
|
|
1830
1830
|
} catch (f) {
|
|
1831
1831
|
if (f.name !== "TypeError")
|
|
1832
1832
|
throw f;
|
|
1833
1833
|
for (var a = typeof BlobBuilder < "u" ? BlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : WebKitBlobBuilder, d = new a(), v = 0; v < n.length; v += 1)
|
|
1834
1834
|
d.append(n[v]);
|
|
1835
|
-
return d.getBlob(
|
|
1835
|
+
return d.getBlob(c.type);
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
1838
|
typeof Promise > "u" && u(3);
|
|
1839
1839
|
var h = Promise;
|
|
1840
|
-
function m(n,
|
|
1841
|
-
|
|
1842
|
-
|
|
1840
|
+
function m(n, c) {
|
|
1841
|
+
c && n.then(function(a) {
|
|
1842
|
+
c(null, a);
|
|
1843
1843
|
}, function(a) {
|
|
1844
|
-
|
|
1844
|
+
c(a);
|
|
1845
1845
|
});
|
|
1846
1846
|
}
|
|
1847
|
-
function l(n,
|
|
1848
|
-
typeof
|
|
1847
|
+
function l(n, c, a) {
|
|
1848
|
+
typeof c == "function" && n.then(c), typeof a == "function" && n.catch(a);
|
|
1849
1849
|
}
|
|
1850
1850
|
function r(n) {
|
|
1851
1851
|
return typeof n != "string" && (console.warn(n + " used as a key, but it is not a string."), n = String(n)), n;
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function y() {
|
|
1854
1854
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
1855
1855
|
return arguments[arguments.length - 1];
|
|
1856
1856
|
}
|
|
1857
|
-
var
|
|
1857
|
+
var S = "local-forage-detect-blob-support", i = void 0, D = {}, E = Object.prototype.toString, M = "readonly", w = "readwrite";
|
|
1858
1858
|
function C(n) {
|
|
1859
|
-
for (var
|
|
1859
|
+
for (var c = n.length, a = new ArrayBuffer(c), d = new Uint8Array(a), v = 0; v < c; v++)
|
|
1860
1860
|
d[v] = n.charCodeAt(v);
|
|
1861
1861
|
return a;
|
|
1862
1862
|
}
|
|
1863
1863
|
function I(n) {
|
|
1864
|
-
return new h(function(
|
|
1865
|
-
var a = n.transaction(
|
|
1866
|
-
a.objectStore(
|
|
1867
|
-
v.preventDefault(), v.stopPropagation(),
|
|
1864
|
+
return new h(function(c) {
|
|
1865
|
+
var a = n.transaction(S, w), d = F([""]);
|
|
1866
|
+
a.objectStore(S).put(d, "key"), a.onabort = function(v) {
|
|
1867
|
+
v.preventDefault(), v.stopPropagation(), c(!1);
|
|
1868
1868
|
}, a.oncomplete = function() {
|
|
1869
1869
|
var v = navigator.userAgent.match(/Chrome\/(\d+)/), f = navigator.userAgent.match(/Edge\//);
|
|
1870
|
-
|
|
1870
|
+
c(f || !v || parseInt(v[1], 10) >= 43);
|
|
1871
1871
|
};
|
|
1872
1872
|
}).catch(function() {
|
|
1873
1873
|
return !1;
|
|
1874
1874
|
});
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1877
|
-
return typeof
|
|
1878
|
-
return
|
|
1876
|
+
function _(n) {
|
|
1877
|
+
return typeof i == "boolean" ? h.resolve(i) : I(n).then(function(c) {
|
|
1878
|
+
return i = c, i;
|
|
1879
1879
|
});
|
|
1880
1880
|
}
|
|
1881
1881
|
function s(n) {
|
|
1882
|
-
var
|
|
1882
|
+
var c = D[n.name], a = {};
|
|
1883
1883
|
a.promise = new h(function(d, v) {
|
|
1884
1884
|
a.resolve = d, a.reject = v;
|
|
1885
|
-
}),
|
|
1885
|
+
}), c.deferredOperations.push(a), c.dbReady ? c.dbReady = c.dbReady.then(function() {
|
|
1886
1886
|
return a.promise;
|
|
1887
|
-
}) :
|
|
1887
|
+
}) : c.dbReady = a.promise;
|
|
1888
1888
|
}
|
|
1889
1889
|
function A(n) {
|
|
1890
|
-
var
|
|
1890
|
+
var c = D[n.name], a = c.deferredOperations.pop();
|
|
1891
1891
|
if (a)
|
|
1892
1892
|
return a.resolve(), a.promise;
|
|
1893
1893
|
}
|
|
1894
|
-
function K(n,
|
|
1895
|
-
var a =
|
|
1894
|
+
function K(n, c) {
|
|
1895
|
+
var a = D[n.name], d = a.deferredOperations.pop();
|
|
1896
1896
|
if (d)
|
|
1897
|
-
return d.reject(
|
|
1897
|
+
return d.reject(c), d.promise;
|
|
1898
1898
|
}
|
|
1899
|
-
function Q(n,
|
|
1899
|
+
function Q(n, c) {
|
|
1900
1900
|
return new h(function(a, d) {
|
|
1901
|
-
if (
|
|
1902
|
-
if (
|
|
1901
|
+
if (D[n.name] = D[n.name] || ne(), n.db)
|
|
1902
|
+
if (c)
|
|
1903
1903
|
s(n), n.db.close();
|
|
1904
1904
|
else
|
|
1905
1905
|
return a(n.db);
|
|
1906
1906
|
var v = [n.name];
|
|
1907
|
-
|
|
1907
|
+
c && v.push(n.version);
|
|
1908
1908
|
var f = N.open.apply(N, v);
|
|
1909
|
-
|
|
1909
|
+
c && (f.onupgradeneeded = function(T) {
|
|
1910
1910
|
var L = f.result;
|
|
1911
1911
|
try {
|
|
1912
|
-
L.createObjectStore(n.storeName), T.oldVersion <= 1 && L.createObjectStore(
|
|
1912
|
+
L.createObjectStore(n.storeName), T.oldVersion <= 1 && L.createObjectStore(S);
|
|
1913
1913
|
} catch (U) {
|
|
1914
1914
|
if (U.name === "ConstraintError")
|
|
1915
1915
|
console.warn('The database "' + n.name + '" has been upgraded from version ' + T.oldVersion + " to version " + T.newVersion + ', but the storage "' + n.storeName + '" already exists.');
|
|
@@ -1929,14 +1929,14 @@ var at = { exports: {} };
|
|
|
1929
1929
|
function re(n) {
|
|
1930
1930
|
return Q(n, !1);
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function ce(n) {
|
|
1933
1933
|
return Q(n, !0);
|
|
1934
1934
|
}
|
|
1935
|
-
function we(n,
|
|
1935
|
+
function we(n, c) {
|
|
1936
1936
|
if (!n.db)
|
|
1937
1937
|
return !0;
|
|
1938
1938
|
var a = !n.db.objectStoreNames.contains(n.storeName), d = n.version < n.db.version, v = n.version > n.db.version;
|
|
1939
|
-
if (d && (n.version !==
|
|
1939
|
+
if (d && (n.version !== c && console.warn('The database "' + n.name + `" can't be downgraded from version ` + n.db.version + " to version " + n.version + "."), n.version = n.db.version), v || a) {
|
|
1940
1940
|
if (a) {
|
|
1941
1941
|
var f = n.db.version + 1;
|
|
1942
1942
|
f > n.version && (n.version = f);
|
|
@@ -1946,11 +1946,11 @@ var at = { exports: {} };
|
|
|
1946
1946
|
return !1;
|
|
1947
1947
|
}
|
|
1948
1948
|
function W(n) {
|
|
1949
|
-
return new h(function(
|
|
1949
|
+
return new h(function(c, a) {
|
|
1950
1950
|
var d = new FileReader();
|
|
1951
1951
|
d.onerror = a, d.onloadend = function(v) {
|
|
1952
1952
|
var f = btoa(v.target.result || "");
|
|
1953
|
-
|
|
1953
|
+
c({
|
|
1954
1954
|
__local_forage_encoded_blob: !0,
|
|
1955
1955
|
data: f,
|
|
1956
1956
|
type: n.type
|
|
@@ -1959,15 +1959,15 @@ var at = { exports: {} };
|
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
function Y(n) {
|
|
1962
|
-
var
|
|
1963
|
-
return F([
|
|
1962
|
+
var c = C(atob(n.data));
|
|
1963
|
+
return F([c], { type: n.type });
|
|
1964
1964
|
}
|
|
1965
1965
|
function H(n) {
|
|
1966
1966
|
return n && n.__local_forage_encoded_blob;
|
|
1967
1967
|
}
|
|
1968
1968
|
function ae(n) {
|
|
1969
|
-
var
|
|
1970
|
-
var d =
|
|
1969
|
+
var c = this, a = c._initReady().then(function() {
|
|
1970
|
+
var d = D[c._dbInfo.name];
|
|
1971
1971
|
if (d && d.dbReady)
|
|
1972
1972
|
return d.dbReady;
|
|
1973
1973
|
});
|
|
@@ -1975,33 +1975,33 @@ var at = { exports: {} };
|
|
|
1975
1975
|
}
|
|
1976
1976
|
function G(n) {
|
|
1977
1977
|
s(n);
|
|
1978
|
-
for (var
|
|
1978
|
+
for (var c = D[n.name], a = c.forages, d = 0; d < a.length; d++) {
|
|
1979
1979
|
var v = a[d];
|
|
1980
1980
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
1981
1981
|
}
|
|
1982
1982
|
return n.db = null, re(n).then(function(f) {
|
|
1983
|
-
return n.db = f, we(n) ?
|
|
1983
|
+
return n.db = f, we(n) ? ce(n) : f;
|
|
1984
1984
|
}).then(function(f) {
|
|
1985
|
-
n.db =
|
|
1985
|
+
n.db = c.db = f;
|
|
1986
1986
|
for (var T = 0; T < a.length; T++)
|
|
1987
1987
|
a[T]._dbInfo.db = f;
|
|
1988
1988
|
}).catch(function(f) {
|
|
1989
1989
|
throw K(n, f), f;
|
|
1990
1990
|
});
|
|
1991
1991
|
}
|
|
1992
|
-
function X(n,
|
|
1992
|
+
function X(n, c, a, d) {
|
|
1993
1993
|
d === void 0 && (d = 1);
|
|
1994
1994
|
try {
|
|
1995
|
-
var v = n.db.transaction(n.storeName,
|
|
1995
|
+
var v = n.db.transaction(n.storeName, c);
|
|
1996
1996
|
a(null, v);
|
|
1997
1997
|
} catch (f) {
|
|
1998
1998
|
if (d > 0 && (!n.db || f.name === "InvalidStateError" || f.name === "NotFoundError"))
|
|
1999
1999
|
return h.resolve().then(function() {
|
|
2000
2000
|
if (!n.db || f.name === "NotFoundError" && !n.db.objectStoreNames.contains(n.storeName) && n.version <= n.db.version)
|
|
2001
|
-
return n.db && (n.version = n.db.version + 1),
|
|
2001
|
+
return n.db && (n.version = n.db.version + 1), ce(n);
|
|
2002
2002
|
}).then(function() {
|
|
2003
2003
|
return G(n).then(function() {
|
|
2004
|
-
X(n,
|
|
2004
|
+
X(n, c, a, d - 1);
|
|
2005
2005
|
});
|
|
2006
2006
|
}).catch(a);
|
|
2007
2007
|
a(f);
|
|
@@ -2020,36 +2020,36 @@ var at = { exports: {} };
|
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
2022
2022
|
function fe(n) {
|
|
2023
|
-
var
|
|
2023
|
+
var c = this, a = {
|
|
2024
2024
|
db: null
|
|
2025
2025
|
};
|
|
2026
2026
|
if (n)
|
|
2027
2027
|
for (var d in n)
|
|
2028
2028
|
a[d] = n[d];
|
|
2029
|
-
var v =
|
|
2030
|
-
v || (v = ne(),
|
|
2029
|
+
var v = D[a.name];
|
|
2030
|
+
v || (v = ne(), D[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready = ae);
|
|
2031
2031
|
var f = [];
|
|
2032
2032
|
function T() {
|
|
2033
2033
|
return h.resolve();
|
|
2034
2034
|
}
|
|
2035
2035
|
for (var L = 0; L < v.forages.length; L++) {
|
|
2036
2036
|
var U = v.forages[L];
|
|
2037
|
-
U !==
|
|
2037
|
+
U !== c && f.push(U._initReady().catch(T));
|
|
2038
2038
|
}
|
|
2039
2039
|
var B = v.forages.slice(0);
|
|
2040
2040
|
return h.all(f).then(function() {
|
|
2041
2041
|
return a.db = v.db, re(a);
|
|
2042
2042
|
}).then(function(k) {
|
|
2043
|
-
return a.db = k, we(a,
|
|
2043
|
+
return a.db = k, we(a, c._defaultConfig.version) ? ce(a) : k;
|
|
2044
2044
|
}).then(function(k) {
|
|
2045
|
-
a.db = v.db = k,
|
|
2045
|
+
a.db = v.db = k, c._dbInfo = a;
|
|
2046
2046
|
for (var q = 0; q < B.length; q++) {
|
|
2047
2047
|
var Z = B[q];
|
|
2048
|
-
Z !==
|
|
2048
|
+
Z !== c && (Z._dbInfo.db = a.db, Z._dbInfo.version = a.version);
|
|
2049
2049
|
}
|
|
2050
2050
|
});
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function ie(n, c) {
|
|
2053
2053
|
var a = this;
|
|
2054
2054
|
n = r(n);
|
|
2055
2055
|
var d = new h(function(v, f) {
|
|
@@ -2071,9 +2071,9 @@ var at = { exports: {} };
|
|
|
2071
2071
|
});
|
|
2072
2072
|
}).catch(f);
|
|
2073
2073
|
});
|
|
2074
|
-
return m(d,
|
|
2074
|
+
return m(d, c), d;
|
|
2075
2075
|
}
|
|
2076
|
-
function Ee(n,
|
|
2076
|
+
function Ee(n, c) {
|
|
2077
2077
|
var a = this, d = new h(function(v, f) {
|
|
2078
2078
|
a.ready().then(function() {
|
|
2079
2079
|
X(a._dbInfo, M, function(T, L) {
|
|
@@ -2099,19 +2099,19 @@ var at = { exports: {} };
|
|
|
2099
2099
|
});
|
|
2100
2100
|
}).catch(f);
|
|
2101
2101
|
});
|
|
2102
|
-
return m(d,
|
|
2102
|
+
return m(d, c), d;
|
|
2103
2103
|
}
|
|
2104
|
-
function Re(n,
|
|
2104
|
+
function Re(n, c, a) {
|
|
2105
2105
|
var d = this;
|
|
2106
2106
|
n = r(n);
|
|
2107
2107
|
var v = new h(function(f, T) {
|
|
2108
2108
|
var L;
|
|
2109
2109
|
d.ready().then(function() {
|
|
2110
|
-
return L = d._dbInfo,
|
|
2111
|
-
return U ?
|
|
2112
|
-
}) :
|
|
2110
|
+
return L = d._dbInfo, E.call(c) === "[object Blob]" ? _(L.db).then(function(U) {
|
|
2111
|
+
return U ? c : W(c);
|
|
2112
|
+
}) : c;
|
|
2113
2113
|
}).then(function(U) {
|
|
2114
|
-
X(d._dbInfo,
|
|
2114
|
+
X(d._dbInfo, w, function(B, k) {
|
|
2115
2115
|
if (B)
|
|
2116
2116
|
return T(B);
|
|
2117
2117
|
try {
|
|
@@ -2132,12 +2132,12 @@ var at = { exports: {} };
|
|
|
2132
2132
|
});
|
|
2133
2133
|
return m(v, a), v;
|
|
2134
2134
|
}
|
|
2135
|
-
function Ve(n,
|
|
2135
|
+
function Ve(n, c) {
|
|
2136
2136
|
var a = this;
|
|
2137
2137
|
n = r(n);
|
|
2138
2138
|
var d = new h(function(v, f) {
|
|
2139
2139
|
a.ready().then(function() {
|
|
2140
|
-
X(a._dbInfo,
|
|
2140
|
+
X(a._dbInfo, w, function(T, L) {
|
|
2141
2141
|
if (T)
|
|
2142
2142
|
return f(T);
|
|
2143
2143
|
try {
|
|
@@ -2156,16 +2156,16 @@ var at = { exports: {} };
|
|
|
2156
2156
|
});
|
|
2157
2157
|
}).catch(f);
|
|
2158
2158
|
});
|
|
2159
|
-
return m(d,
|
|
2159
|
+
return m(d, c), d;
|
|
2160
2160
|
}
|
|
2161
2161
|
function pe(n) {
|
|
2162
|
-
var
|
|
2163
|
-
|
|
2164
|
-
X(
|
|
2162
|
+
var c = this, a = new h(function(d, v) {
|
|
2163
|
+
c.ready().then(function() {
|
|
2164
|
+
X(c._dbInfo, w, function(f, T) {
|
|
2165
2165
|
if (f)
|
|
2166
2166
|
return v(f);
|
|
2167
2167
|
try {
|
|
2168
|
-
var L = T.objectStore(
|
|
2168
|
+
var L = T.objectStore(c._dbInfo.storeName), U = L.clear();
|
|
2169
2169
|
T.oncomplete = function() {
|
|
2170
2170
|
d();
|
|
2171
2171
|
}, T.onabort = T.onerror = function() {
|
|
@@ -2181,13 +2181,13 @@ var at = { exports: {} };
|
|
|
2181
2181
|
return m(a, n), a;
|
|
2182
2182
|
}
|
|
2183
2183
|
function er(n) {
|
|
2184
|
-
var
|
|
2185
|
-
|
|
2186
|
-
X(
|
|
2184
|
+
var c = this, a = new h(function(d, v) {
|
|
2185
|
+
c.ready().then(function() {
|
|
2186
|
+
X(c._dbInfo, M, function(f, T) {
|
|
2187
2187
|
if (f)
|
|
2188
2188
|
return v(f);
|
|
2189
2189
|
try {
|
|
2190
|
-
var L = T.objectStore(
|
|
2190
|
+
var L = T.objectStore(c._dbInfo.storeName), U = L.count();
|
|
2191
2191
|
U.onsuccess = function() {
|
|
2192
2192
|
d(U.result);
|
|
2193
2193
|
}, U.onerror = function() {
|
|
@@ -2201,7 +2201,7 @@ var at = { exports: {} };
|
|
|
2201
2201
|
});
|
|
2202
2202
|
return m(a, n), a;
|
|
2203
2203
|
}
|
|
2204
|
-
function rr(n,
|
|
2204
|
+
function rr(n, c) {
|
|
2205
2205
|
var a = this, d = new h(function(v, f) {
|
|
2206
2206
|
if (n < 0) {
|
|
2207
2207
|
v(null);
|
|
@@ -2229,16 +2229,16 @@ var at = { exports: {} };
|
|
|
2229
2229
|
});
|
|
2230
2230
|
}).catch(f);
|
|
2231
2231
|
});
|
|
2232
|
-
return m(d,
|
|
2232
|
+
return m(d, c), d;
|
|
2233
2233
|
}
|
|
2234
2234
|
function Ce(n) {
|
|
2235
|
-
var
|
|
2236
|
-
|
|
2237
|
-
X(
|
|
2235
|
+
var c = this, a = new h(function(d, v) {
|
|
2236
|
+
c.ready().then(function() {
|
|
2237
|
+
X(c._dbInfo, M, function(f, T) {
|
|
2238
2238
|
if (f)
|
|
2239
2239
|
return v(f);
|
|
2240
2240
|
try {
|
|
2241
|
-
var L = T.objectStore(
|
|
2241
|
+
var L = T.objectStore(c._dbInfo.storeName), U = L.openKeyCursor(), B = [];
|
|
2242
2242
|
U.onsuccess = function() {
|
|
2243
2243
|
var k = U.result;
|
|
2244
2244
|
if (!k) {
|
|
@@ -2257,8 +2257,8 @@ var at = { exports: {} };
|
|
|
2257
2257
|
});
|
|
2258
2258
|
return m(a, n), a;
|
|
2259
2259
|
}
|
|
2260
|
-
function tr(n,
|
|
2261
|
-
|
|
2260
|
+
function tr(n, c) {
|
|
2261
|
+
c = y.apply(this, arguments);
|
|
2262
2262
|
var a = this.config();
|
|
2263
2263
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
2264
2264
|
var d = this, v;
|
|
@@ -2266,7 +2266,7 @@ var at = { exports: {} };
|
|
|
2266
2266
|
v = h.reject("Invalid arguments");
|
|
2267
2267
|
else {
|
|
2268
2268
|
var f = n.name === a.name && d._dbInfo.db, T = f ? h.resolve(d._dbInfo.db) : re(n).then(function(L) {
|
|
2269
|
-
var U =
|
|
2269
|
+
var U = D[n.name], B = U.forages;
|
|
2270
2270
|
U.db = L;
|
|
2271
2271
|
for (var k = 0; k < B.length; k++)
|
|
2272
2272
|
B[k]._dbInfo.db = L;
|
|
@@ -2276,7 +2276,7 @@ var at = { exports: {} };
|
|
|
2276
2276
|
if (L.objectStoreNames.contains(n.storeName)) {
|
|
2277
2277
|
var U = L.version + 1;
|
|
2278
2278
|
s(n);
|
|
2279
|
-
var B =
|
|
2279
|
+
var B = D[n.name], k = B.forages;
|
|
2280
2280
|
L.close();
|
|
2281
2281
|
for (var q = 0; q < k.length; q++) {
|
|
2282
2282
|
var Z = k[q];
|
|
@@ -2308,7 +2308,7 @@ var at = { exports: {} };
|
|
|
2308
2308
|
}
|
|
2309
2309
|
}) : v = T.then(function(L) {
|
|
2310
2310
|
s(n);
|
|
2311
|
-
var U =
|
|
2311
|
+
var U = D[n.name], B = U.forages;
|
|
2312
2312
|
L.close();
|
|
2313
2313
|
for (var k = 0; k < B.length; k++) {
|
|
2314
2314
|
var q = B[k];
|
|
@@ -2338,14 +2338,14 @@ var at = { exports: {} };
|
|
|
2338
2338
|
});
|
|
2339
2339
|
});
|
|
2340
2340
|
}
|
|
2341
|
-
return m(v,
|
|
2341
|
+
return m(v, c), v;
|
|
2342
2342
|
}
|
|
2343
2343
|
var nr = {
|
|
2344
2344
|
_driver: "asyncStorage",
|
|
2345
2345
|
_initStorage: fe,
|
|
2346
2346
|
_support: $(),
|
|
2347
2347
|
iterate: Ee,
|
|
2348
|
-
getItem:
|
|
2348
|
+
getItem: ie,
|
|
2349
2349
|
setItem: Re,
|
|
2350
2350
|
removeItem: Ve,
|
|
2351
2351
|
clear: pe,
|
|
@@ -2359,46 +2359,46 @@ var at = { exports: {} };
|
|
|
2359
2359
|
}
|
|
2360
2360
|
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", lr = "~~local_forage_type~", ze = /^~~local_forage_type~([^~]+)~/, Ue = "__lfsc__:", Pe = Ue.length, $e = "arbf", Ie = "blob", Ye = "si08", Ze = "ui08", Fe = "uic8", ke = "si16", R = "si32", J = "ur16", V = "ui32", O = "fl32", oe = "fl64", ve = Pe + $e.length, De = Object.prototype.toString;
|
|
2361
2361
|
function Se(n) {
|
|
2362
|
-
var
|
|
2363
|
-
n[n.length - 1] === "=" && (
|
|
2364
|
-
var B = new ArrayBuffer(
|
|
2362
|
+
var c = n.length * 0.75, a = n.length, d, v = 0, f, T, L, U;
|
|
2363
|
+
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
2364
|
+
var B = new ArrayBuffer(c), k = new Uint8Array(B);
|
|
2365
2365
|
for (d = 0; d < a; d += 4)
|
|
2366
2366
|
f = be.indexOf(n[d]), T = be.indexOf(n[d + 1]), L = be.indexOf(n[d + 2]), U = be.indexOf(n[d + 3]), k[v++] = f << 2 | T >> 4, k[v++] = (T & 15) << 4 | L >> 2, k[v++] = (L & 3) << 6 | U & 63;
|
|
2367
2367
|
return B;
|
|
2368
2368
|
}
|
|
2369
2369
|
function se(n) {
|
|
2370
|
-
var
|
|
2371
|
-
for (d = 0; d <
|
|
2372
|
-
a += be[
|
|
2373
|
-
return
|
|
2370
|
+
var c = new Uint8Array(n), a = "", d;
|
|
2371
|
+
for (d = 0; d < c.length; d += 3)
|
|
2372
|
+
a += be[c[d] >> 2], a += be[(c[d] & 3) << 4 | c[d + 1] >> 4], a += be[(c[d + 1] & 15) << 2 | c[d + 2] >> 6], a += be[c[d + 2] & 63];
|
|
2373
|
+
return c.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : c.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
|
|
2374
2374
|
}
|
|
2375
|
-
function Me(n,
|
|
2375
|
+
function Me(n, c) {
|
|
2376
2376
|
var a = "";
|
|
2377
2377
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
2378
2378
|
var d, v = Ue;
|
|
2379
|
-
n instanceof ArrayBuffer ? (d = n, v += $e) : (d = n.buffer, a === "[object Int8Array]" ? v += Ye : a === "[object Uint8Array]" ? v += Ze : a === "[object Uint8ClampedArray]" ? v += Fe : a === "[object Int16Array]" ? v += ke : a === "[object Uint16Array]" ? v += J : a === "[object Int32Array]" ? v += R : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += oe :
|
|
2379
|
+
n instanceof ArrayBuffer ? (d = n, v += $e) : (d = n.buffer, a === "[object Int8Array]" ? v += Ye : a === "[object Uint8Array]" ? v += Ze : a === "[object Uint8ClampedArray]" ? v += Fe : a === "[object Int16Array]" ? v += ke : a === "[object Uint16Array]" ? v += J : a === "[object Int32Array]" ? v += R : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += oe : c(new Error("Failed to get type for BinaryArray"))), c(v + se(d));
|
|
2380
2380
|
} else if (a === "[object Blob]") {
|
|
2381
2381
|
var f = new FileReader();
|
|
2382
2382
|
f.onload = function() {
|
|
2383
2383
|
var T = lr + n.type + "~" + se(this.result);
|
|
2384
|
-
|
|
2384
|
+
c(Ue + Ie + T);
|
|
2385
2385
|
}, f.readAsArrayBuffer(n);
|
|
2386
2386
|
} else
|
|
2387
2387
|
try {
|
|
2388
|
-
|
|
2388
|
+
c(JSON.stringify(n));
|
|
2389
2389
|
} catch (T) {
|
|
2390
|
-
console.error("Couldn't convert value into a JSON string: ", n),
|
|
2390
|
+
console.error("Couldn't convert value into a JSON string: ", n), c(null, T);
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
function it(n) {
|
|
2394
2394
|
if (n.substring(0, Pe) !== Ue)
|
|
2395
2395
|
return JSON.parse(n);
|
|
2396
|
-
var
|
|
2397
|
-
if (a === Ie && ze.test(
|
|
2398
|
-
var v =
|
|
2399
|
-
d = v[1],
|
|
2396
|
+
var c = n.substring(ve), a = n.substring(Pe, ve), d;
|
|
2397
|
+
if (a === Ie && ze.test(c)) {
|
|
2398
|
+
var v = c.match(ze);
|
|
2399
|
+
d = v[1], c = c.substring(v[0].length);
|
|
2400
2400
|
}
|
|
2401
|
-
var f = Se(
|
|
2401
|
+
var f = Se(c);
|
|
2402
2402
|
switch (a) {
|
|
2403
2403
|
case $e:
|
|
2404
2404
|
return f;
|
|
@@ -2432,11 +2432,11 @@ var at = { exports: {} };
|
|
|
2432
2432
|
stringToBuffer: Se,
|
|
2433
2433
|
bufferToString: se
|
|
2434
2434
|
};
|
|
2435
|
-
function Lr(n,
|
|
2436
|
-
n.executeSql("CREATE TABLE IF NOT EXISTS " +
|
|
2435
|
+
function Lr(n, c, a, d) {
|
|
2436
|
+
n.executeSql("CREATE TABLE IF NOT EXISTS " + c.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], a, d);
|
|
2437
2437
|
}
|
|
2438
|
-
function
|
|
2439
|
-
var
|
|
2438
|
+
function ft(n) {
|
|
2439
|
+
var c = this, a = {
|
|
2440
2440
|
db: null
|
|
2441
2441
|
};
|
|
2442
2442
|
if (n)
|
|
@@ -2450,7 +2450,7 @@ var at = { exports: {} };
|
|
|
2450
2450
|
}
|
|
2451
2451
|
a.db.transaction(function(L) {
|
|
2452
2452
|
Lr(L, a, function() {
|
|
2453
|
-
|
|
2453
|
+
c._dbInfo = a, f();
|
|
2454
2454
|
}, function(U, B) {
|
|
2455
2455
|
T(B);
|
|
2456
2456
|
});
|
|
@@ -2458,16 +2458,16 @@ var at = { exports: {} };
|
|
|
2458
2458
|
});
|
|
2459
2459
|
return a.serializer = ur, v;
|
|
2460
2460
|
}
|
|
2461
|
-
function xe(n,
|
|
2461
|
+
function xe(n, c, a, d, v, f) {
|
|
2462
2462
|
n.executeSql(a, d, v, function(T, L) {
|
|
2463
|
-
L.code === L.SYNTAX_ERR ? T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [
|
|
2464
|
-
B.rows.length ? f(U, L) : Lr(U,
|
|
2463
|
+
L.code === L.SYNTAX_ERR ? T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(U, B) {
|
|
2464
|
+
B.rows.length ? f(U, L) : Lr(U, c, function() {
|
|
2465
2465
|
U.executeSql(a, d, v, f);
|
|
2466
2466
|
}, f);
|
|
2467
2467
|
}, f) : f(T, L);
|
|
2468
2468
|
}, f);
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2470
|
+
function st(n, c) {
|
|
2471
2471
|
var a = this;
|
|
2472
2472
|
n = r(n);
|
|
2473
2473
|
var d = new h(function(v, f) {
|
|
@@ -2483,9 +2483,9 @@ var at = { exports: {} };
|
|
|
2483
2483
|
});
|
|
2484
2484
|
}).catch(f);
|
|
2485
2485
|
});
|
|
2486
|
-
return m(d,
|
|
2486
|
+
return m(d, c), d;
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2488
|
+
function ot(n, c) {
|
|
2489
2489
|
var a = this, d = new h(function(v, f) {
|
|
2490
2490
|
a.ready().then(function() {
|
|
2491
2491
|
var T = a._dbInfo;
|
|
@@ -2505,16 +2505,16 @@ var at = { exports: {} };
|
|
|
2505
2505
|
});
|
|
2506
2506
|
}).catch(f);
|
|
2507
2507
|
});
|
|
2508
|
-
return m(d,
|
|
2508
|
+
return m(d, c), d;
|
|
2509
2509
|
}
|
|
2510
|
-
function Nr(n,
|
|
2510
|
+
function Nr(n, c, a, d) {
|
|
2511
2511
|
var v = this;
|
|
2512
2512
|
n = r(n);
|
|
2513
2513
|
var f = new h(function(T, L) {
|
|
2514
2514
|
v.ready().then(function() {
|
|
2515
|
-
|
|
2516
|
-
var U =
|
|
2517
|
-
B.serializer.serialize(
|
|
2515
|
+
c === void 0 && (c = null);
|
|
2516
|
+
var U = c, B = v._dbInfo;
|
|
2517
|
+
B.serializer.serialize(c, function(k, q) {
|
|
2518
2518
|
q ? L(q) : B.db.transaction(function(Z) {
|
|
2519
2519
|
xe(Z, B, "INSERT OR REPLACE INTO " + B.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
|
|
2520
2520
|
T(U);
|
|
@@ -2535,10 +2535,10 @@ var at = { exports: {} };
|
|
|
2535
2535
|
});
|
|
2536
2536
|
return m(f, a), f;
|
|
2537
2537
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return Nr.apply(this, [n,
|
|
2538
|
+
function dt(n, c, a) {
|
|
2539
|
+
return Nr.apply(this, [n, c, a, 1]);
|
|
2540
2540
|
}
|
|
2541
|
-
function
|
|
2541
|
+
function ht(n, c) {
|
|
2542
2542
|
var a = this;
|
|
2543
2543
|
n = r(n);
|
|
2544
2544
|
var d = new h(function(v, f) {
|
|
@@ -2553,12 +2553,12 @@ var at = { exports: {} };
|
|
|
2553
2553
|
});
|
|
2554
2554
|
}).catch(f);
|
|
2555
2555
|
});
|
|
2556
|
-
return m(d,
|
|
2556
|
+
return m(d, c), d;
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2559
|
-
var
|
|
2560
|
-
|
|
2561
|
-
var f =
|
|
2558
|
+
function mt(n) {
|
|
2559
|
+
var c = this, a = new h(function(d, v) {
|
|
2560
|
+
c.ready().then(function() {
|
|
2561
|
+
var f = c._dbInfo;
|
|
2562
2562
|
f.db.transaction(function(T) {
|
|
2563
2563
|
xe(T, f, "DELETE FROM " + f.storeName, [], function() {
|
|
2564
2564
|
d();
|
|
@@ -2570,10 +2570,10 @@ var at = { exports: {} };
|
|
|
2570
2570
|
});
|
|
2571
2571
|
return m(a, n), a;
|
|
2572
2572
|
}
|
|
2573
|
-
function
|
|
2574
|
-
var
|
|
2575
|
-
|
|
2576
|
-
var f =
|
|
2573
|
+
function vt(n) {
|
|
2574
|
+
var c = this, a = new h(function(d, v) {
|
|
2575
|
+
c.ready().then(function() {
|
|
2576
|
+
var f = c._dbInfo;
|
|
2577
2577
|
f.db.transaction(function(T) {
|
|
2578
2578
|
xe(T, f, "SELECT COUNT(key) as c FROM " + f.storeName, [], function(L, U) {
|
|
2579
2579
|
var B = U.rows.item(0).c;
|
|
@@ -2586,7 +2586,7 @@ var at = { exports: {} };
|
|
|
2586
2586
|
});
|
|
2587
2587
|
return m(a, n), a;
|
|
2588
2588
|
}
|
|
2589
|
-
function
|
|
2589
|
+
function gt(n, c) {
|
|
2590
2590
|
var a = this, d = new h(function(v, f) {
|
|
2591
2591
|
a.ready().then(function() {
|
|
2592
2592
|
var T = a._dbInfo;
|
|
@@ -2600,12 +2600,12 @@ var at = { exports: {} };
|
|
|
2600
2600
|
});
|
|
2601
2601
|
}).catch(f);
|
|
2602
2602
|
});
|
|
2603
|
-
return m(d,
|
|
2603
|
+
return m(d, c), d;
|
|
2604
2604
|
}
|
|
2605
|
-
function
|
|
2606
|
-
var
|
|
2607
|
-
|
|
2608
|
-
var f =
|
|
2605
|
+
function yt(n) {
|
|
2606
|
+
var c = this, a = new h(function(d, v) {
|
|
2607
|
+
c.ready().then(function() {
|
|
2608
|
+
var f = c._dbInfo;
|
|
2609
2609
|
f.db.transaction(function(T) {
|
|
2610
2610
|
xe(T, f, "SELECT key FROM " + f.storeName, [], function(L, U) {
|
|
2611
2611
|
for (var B = [], k = 0; k < U.rows.length; k++)
|
|
@@ -2619,13 +2619,13 @@ var at = { exports: {} };
|
|
|
2619
2619
|
});
|
|
2620
2620
|
return m(a, n), a;
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2623
|
-
return new h(function(
|
|
2622
|
+
function wt(n) {
|
|
2623
|
+
return new h(function(c, a) {
|
|
2624
2624
|
n.transaction(function(d) {
|
|
2625
2625
|
d.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v, f) {
|
|
2626
2626
|
for (var T = [], L = 0; L < f.rows.length; L++)
|
|
2627
2627
|
T.push(f.rows.item(L).name);
|
|
2628
|
-
|
|
2628
|
+
c({
|
|
2629
2629
|
db: n,
|
|
2630
2630
|
storeNames: T
|
|
2631
2631
|
});
|
|
@@ -2637,8 +2637,8 @@ var at = { exports: {} };
|
|
|
2637
2637
|
});
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
|
-
function
|
|
2641
|
-
|
|
2640
|
+
function bt(n, c) {
|
|
2641
|
+
c = y.apply(this, arguments);
|
|
2642
2642
|
var a = this.config();
|
|
2643
2643
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
2644
2644
|
var d = this, v;
|
|
@@ -2647,7 +2647,7 @@ var at = { exports: {} };
|
|
|
2647
2647
|
n.name === a.name ? T = d._dbInfo.db : T = openDatabase(n.name, "", "", 0), n.storeName ? f({
|
|
2648
2648
|
db: T,
|
|
2649
2649
|
storeNames: [n.storeName]
|
|
2650
|
-
}) : f(
|
|
2650
|
+
}) : f(wt(T));
|
|
2651
2651
|
}).then(function(f) {
|
|
2652
2652
|
return new h(function(T, L) {
|
|
2653
2653
|
f.db.transaction(function(U) {
|
|
@@ -2671,23 +2671,23 @@ var at = { exports: {} };
|
|
|
2671
2671
|
L(U);
|
|
2672
2672
|
});
|
|
2673
2673
|
});
|
|
2674
|
-
}) : v = h.reject("Invalid arguments"), m(v,
|
|
2674
|
+
}) : v = h.reject("Invalid arguments"), m(v, c), v;
|
|
2675
2675
|
}
|
|
2676
|
-
var
|
|
2676
|
+
var St = {
|
|
2677
2677
|
_driver: "webSQLStorage",
|
|
2678
|
-
_initStorage:
|
|
2678
|
+
_initStorage: ft,
|
|
2679
2679
|
_support: ar(),
|
|
2680
|
-
iterate:
|
|
2681
|
-
getItem:
|
|
2682
|
-
setItem:
|
|
2683
|
-
removeItem:
|
|
2684
|
-
clear:
|
|
2685
|
-
length:
|
|
2686
|
-
key:
|
|
2687
|
-
keys:
|
|
2688
|
-
dropInstance:
|
|
2680
|
+
iterate: ot,
|
|
2681
|
+
getItem: st,
|
|
2682
|
+
setItem: dt,
|
|
2683
|
+
removeItem: ht,
|
|
2684
|
+
clear: mt,
|
|
2685
|
+
length: vt,
|
|
2686
|
+
key: gt,
|
|
2687
|
+
keys: yt,
|
|
2688
|
+
dropInstance: bt
|
|
2689
2689
|
};
|
|
2690
|
-
function
|
|
2690
|
+
function At() {
|
|
2691
2691
|
try {
|
|
2692
2692
|
return typeof localStorage < "u" && "setItem" in localStorage && // in IE8 typeof localStorage.setItem === 'object'
|
|
2693
2693
|
!!localStorage.setItem;
|
|
@@ -2695,11 +2695,11 @@ var at = { exports: {} };
|
|
|
2695
2695
|
return !1;
|
|
2696
2696
|
}
|
|
2697
2697
|
}
|
|
2698
|
-
function Rr(n,
|
|
2698
|
+
function Rr(n, c) {
|
|
2699
2699
|
var a = n.name + "/";
|
|
2700
|
-
return n.storeName !==
|
|
2700
|
+
return n.storeName !== c.storeName && (a += n.storeName + "/"), a;
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2702
|
+
function Et() {
|
|
2703
2703
|
var n = "_localforage_support_test";
|
|
2704
2704
|
try {
|
|
2705
2705
|
return localStorage.setItem(n, !0), localStorage.removeItem(n), !1;
|
|
@@ -2707,35 +2707,35 @@ var at = { exports: {} };
|
|
|
2707
2707
|
return !0;
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return !
|
|
2710
|
+
function It() {
|
|
2711
|
+
return !Et() || localStorage.length > 0;
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2714
|
-
var
|
|
2713
|
+
function Dt(n) {
|
|
2714
|
+
var c = this, a = {};
|
|
2715
2715
|
if (n)
|
|
2716
2716
|
for (var d in n)
|
|
2717
2717
|
a[d] = n[d];
|
|
2718
|
-
return a.keyPrefix = Rr(n,
|
|
2718
|
+
return a.keyPrefix = Rr(n, c._defaultConfig), It() ? (c._dbInfo = a, a.serializer = ur, h.resolve()) : h.reject();
|
|
2719
2719
|
}
|
|
2720
|
-
function
|
|
2721
|
-
var
|
|
2722
|
-
for (var d =
|
|
2720
|
+
function xt(n) {
|
|
2721
|
+
var c = this, a = c.ready().then(function() {
|
|
2722
|
+
for (var d = c._dbInfo.keyPrefix, v = localStorage.length - 1; v >= 0; v--) {
|
|
2723
2723
|
var f = localStorage.key(v);
|
|
2724
2724
|
f.indexOf(d) === 0 && localStorage.removeItem(f);
|
|
2725
2725
|
}
|
|
2726
2726
|
});
|
|
2727
2727
|
return m(a, n), a;
|
|
2728
2728
|
}
|
|
2729
|
-
function
|
|
2729
|
+
function _t(n, c) {
|
|
2730
2730
|
var a = this;
|
|
2731
2731
|
n = r(n);
|
|
2732
2732
|
var d = a.ready().then(function() {
|
|
2733
2733
|
var v = a._dbInfo, f = localStorage.getItem(v.keyPrefix + n);
|
|
2734
2734
|
return f && (f = v.serializer.deserialize(f)), f;
|
|
2735
2735
|
});
|
|
2736
|
-
return m(d,
|
|
2736
|
+
return m(d, c), d;
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2738
|
+
function Tt(n, c) {
|
|
2739
2739
|
var a = this, d = a.ready().then(function() {
|
|
2740
2740
|
for (var v = a._dbInfo, f = v.keyPrefix, T = f.length, L = localStorage.length, U = 1, B = 0; B < L; B++) {
|
|
2741
2741
|
var k = localStorage.key(B);
|
|
@@ -2746,9 +2746,9 @@ var at = { exports: {} };
|
|
|
2746
2746
|
}
|
|
2747
2747
|
}
|
|
2748
2748
|
});
|
|
2749
|
-
return m(d,
|
|
2749
|
+
return m(d, c), d;
|
|
2750
2750
|
}
|
|
2751
|
-
function
|
|
2751
|
+
function Ct(n, c) {
|
|
2752
2752
|
var a = this, d = a.ready().then(function() {
|
|
2753
2753
|
var v = a._dbInfo, f;
|
|
2754
2754
|
try {
|
|
@@ -2758,11 +2758,11 @@ var at = { exports: {} };
|
|
|
2758
2758
|
}
|
|
2759
2759
|
return f && (f = f.substring(v.keyPrefix.length)), f;
|
|
2760
2760
|
});
|
|
2761
|
-
return m(d,
|
|
2761
|
+
return m(d, c), d;
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2764
|
-
var
|
|
2765
|
-
for (var d =
|
|
2763
|
+
function Pt(n) {
|
|
2764
|
+
var c = this, a = c.ready().then(function() {
|
|
2765
|
+
for (var d = c._dbInfo, v = localStorage.length, f = [], T = 0; T < v; T++) {
|
|
2766
2766
|
var L = localStorage.key(T);
|
|
2767
2767
|
L.indexOf(d.keyPrefix) === 0 && f.push(L.substring(d.keyPrefix.length));
|
|
2768
2768
|
}
|
|
@@ -2770,30 +2770,30 @@ var at = { exports: {} };
|
|
|
2770
2770
|
});
|
|
2771
2771
|
return m(a, n), a;
|
|
2772
2772
|
}
|
|
2773
|
-
function
|
|
2774
|
-
var
|
|
2773
|
+
function Mt(n) {
|
|
2774
|
+
var c = this, a = c.keys().then(function(d) {
|
|
2775
2775
|
return d.length;
|
|
2776
2776
|
});
|
|
2777
2777
|
return m(a, n), a;
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2779
|
+
function Lt(n, c) {
|
|
2780
2780
|
var a = this;
|
|
2781
2781
|
n = r(n);
|
|
2782
2782
|
var d = a.ready().then(function() {
|
|
2783
2783
|
var v = a._dbInfo;
|
|
2784
2784
|
localStorage.removeItem(v.keyPrefix + n);
|
|
2785
2785
|
});
|
|
2786
|
-
return m(d,
|
|
2786
|
+
return m(d, c), d;
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2788
|
+
function Nt(n, c, a) {
|
|
2789
2789
|
var d = this;
|
|
2790
2790
|
n = r(n);
|
|
2791
2791
|
var v = d.ready().then(function() {
|
|
2792
|
-
|
|
2793
|
-
var f =
|
|
2792
|
+
c === void 0 && (c = null);
|
|
2793
|
+
var f = c;
|
|
2794
2794
|
return new h(function(T, L) {
|
|
2795
2795
|
var U = d._dbInfo;
|
|
2796
|
-
U.serializer.serialize(
|
|
2796
|
+
U.serializer.serialize(c, function(B, k) {
|
|
2797
2797
|
if (k)
|
|
2798
2798
|
L(k);
|
|
2799
2799
|
else
|
|
@@ -2807,8 +2807,8 @@ var at = { exports: {} };
|
|
|
2807
2807
|
});
|
|
2808
2808
|
return m(v, a), v;
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2811
|
-
if (
|
|
2810
|
+
function Rt(n, c) {
|
|
2811
|
+
if (c = y.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
|
|
2812
2812
|
var a = this.config();
|
|
2813
2813
|
n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
|
|
2814
2814
|
}
|
|
@@ -2820,26 +2820,26 @@ var at = { exports: {} };
|
|
|
2820
2820
|
var L = localStorage.key(T);
|
|
2821
2821
|
L.indexOf(f) === 0 && localStorage.removeItem(L);
|
|
2822
2822
|
}
|
|
2823
|
-
}) : v = h.reject("Invalid arguments"), m(v,
|
|
2823
|
+
}) : v = h.reject("Invalid arguments"), m(v, c), v;
|
|
2824
2824
|
}
|
|
2825
|
-
var
|
|
2825
|
+
var Ut = {
|
|
2826
2826
|
_driver: "localStorageWrapper",
|
|
2827
|
-
_initStorage:
|
|
2828
|
-
_support:
|
|
2829
|
-
iterate:
|
|
2830
|
-
getItem:
|
|
2831
|
-
setItem:
|
|
2832
|
-
removeItem:
|
|
2833
|
-
clear:
|
|
2834
|
-
length:
|
|
2835
|
-
key:
|
|
2836
|
-
keys:
|
|
2837
|
-
dropInstance:
|
|
2838
|
-
},
|
|
2839
|
-
return
|
|
2840
|
-
},
|
|
2841
|
-
for (var d =
|
|
2842
|
-
if (
|
|
2827
|
+
_initStorage: Dt,
|
|
2828
|
+
_support: At(),
|
|
2829
|
+
iterate: Tt,
|
|
2830
|
+
getItem: _t,
|
|
2831
|
+
setItem: Nt,
|
|
2832
|
+
removeItem: Lt,
|
|
2833
|
+
clear: xt,
|
|
2834
|
+
length: Mt,
|
|
2835
|
+
key: Ct,
|
|
2836
|
+
keys: Pt,
|
|
2837
|
+
dropInstance: Rt
|
|
2838
|
+
}, Bt = function(c, a) {
|
|
2839
|
+
return c === a || typeof c == "number" && typeof a == "number" && isNaN(c) && isNaN(a);
|
|
2840
|
+
}, $t = function(c, a) {
|
|
2841
|
+
for (var d = c.length, v = 0; v < d; ) {
|
|
2842
|
+
if (Bt(c[v], a))
|
|
2843
2843
|
return !0;
|
|
2844
2844
|
v++;
|
|
2845
2845
|
}
|
|
@@ -2848,11 +2848,11 @@ var at = { exports: {} };
|
|
|
2848
2848
|
return Object.prototype.toString.call(n) === "[object Array]";
|
|
2849
2849
|
}, Ge = {}, Br = {}, Be = {
|
|
2850
2850
|
INDEXEDDB: nr,
|
|
2851
|
-
WEBSQL:
|
|
2852
|
-
LOCALSTORAGE:
|
|
2853
|
-
},
|
|
2851
|
+
WEBSQL: St,
|
|
2852
|
+
LOCALSTORAGE: Ut
|
|
2853
|
+
}, Ft = [Be.INDEXEDDB._driver, Be.WEBSQL._driver, Be.LOCALSTORAGE._driver], Je = ["dropInstance"], cr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Je), kt = {
|
|
2854
2854
|
description: "",
|
|
2855
|
-
driver:
|
|
2855
|
+
driver: Ft.slice(),
|
|
2856
2856
|
name: "localforage",
|
|
2857
2857
|
// Default DB size is _JUST UNDER_ 5MB, as it's the highest size
|
|
2858
2858
|
// we can use without a prompt.
|
|
@@ -2860,32 +2860,32 @@ var at = { exports: {} };
|
|
|
2860
2860
|
storeName: "keyvaluepairs",
|
|
2861
2861
|
version: 1
|
|
2862
2862
|
};
|
|
2863
|
-
function
|
|
2864
|
-
n[
|
|
2863
|
+
function Gt(n, c) {
|
|
2864
|
+
n[c] = function() {
|
|
2865
2865
|
var a = arguments;
|
|
2866
2866
|
return n.ready().then(function() {
|
|
2867
|
-
return n[
|
|
2867
|
+
return n[c].apply(n, a);
|
|
2868
2868
|
});
|
|
2869
2869
|
};
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function ir() {
|
|
2872
2872
|
for (var n = 1; n < arguments.length; n++) {
|
|
2873
|
-
var
|
|
2874
|
-
if (
|
|
2875
|
-
for (var a in
|
|
2876
|
-
|
|
2873
|
+
var c = arguments[n];
|
|
2874
|
+
if (c)
|
|
2875
|
+
for (var a in c)
|
|
2876
|
+
c.hasOwnProperty(a) && (Ur(c[a]) ? arguments[0][a] = c[a].slice() : arguments[0][a] = c[a]);
|
|
2877
2877
|
}
|
|
2878
2878
|
return arguments[0];
|
|
2879
2879
|
}
|
|
2880
|
-
var
|
|
2881
|
-
function n(
|
|
2882
|
-
|
|
2880
|
+
var Wt = function() {
|
|
2881
|
+
function n(c) {
|
|
2882
|
+
x(this, n);
|
|
2883
2883
|
for (var a in Be)
|
|
2884
2884
|
if (Be.hasOwnProperty(a)) {
|
|
2885
2885
|
var d = Be[a], v = d._driver;
|
|
2886
2886
|
this[a] = v, Ge[v] || this.defineDriver(d);
|
|
2887
2887
|
}
|
|
2888
|
-
this._defaultConfig =
|
|
2888
|
+
this._defaultConfig = ir({}, kt), this._config = ir({}, this._defaultConfig, c), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
2889
2889
|
});
|
|
2890
2890
|
}
|
|
2891
2891
|
return n.prototype.config = function(a) {
|
|
@@ -2908,20 +2908,20 @@ var at = { exports: {} };
|
|
|
2908
2908
|
L(B);
|
|
2909
2909
|
return;
|
|
2910
2910
|
}
|
|
2911
|
-
for (var k =
|
|
2912
|
-
var p = k[q], ee =
|
|
2911
|
+
for (var k = cr.concat("_initStorage"), q = 0, Z = k.length; q < Z; q++) {
|
|
2912
|
+
var p = k[q], ee = !$t(Je, p);
|
|
2913
2913
|
if ((ee || a[p]) && typeof a[p] != "function") {
|
|
2914
2914
|
L(B);
|
|
2915
2915
|
return;
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
var ue = function() {
|
|
2919
|
-
for (var We = function(
|
|
2919
|
+
for (var We = function(Vt) {
|
|
2920
2920
|
return function() {
|
|
2921
|
-
var
|
|
2921
|
+
var zt = new Error("Method " + Vt + " is not implemented by the current driver"), $r = h.reject(zt);
|
|
2922
2922
|
return m($r, arguments[arguments.length - 1]), $r;
|
|
2923
2923
|
};
|
|
2924
|
-
}, fr = 0,
|
|
2924
|
+
}, fr = 0, Ht = Je.length; fr < Ht; fr++) {
|
|
2925
2925
|
var sr = Je[fr];
|
|
2926
2926
|
a[sr] || (a[sr] = We(sr));
|
|
2927
2927
|
}
|
|
@@ -2990,7 +2990,7 @@ var at = { exports: {} };
|
|
|
2990
2990
|
}, n.prototype.supports = function(a) {
|
|
2991
2991
|
return !!Br[a];
|
|
2992
2992
|
}, n.prototype._extend = function(a) {
|
|
2993
|
-
|
|
2993
|
+
ir(this, a);
|
|
2994
2994
|
}, n.prototype._getSupportedDrivers = function(a) {
|
|
2995
2995
|
for (var d = [], v = 0, f = a.length; v < f; v++) {
|
|
2996
2996
|
var T = a[v];
|
|
@@ -2998,27 +2998,27 @@ var at = { exports: {} };
|
|
|
2998
2998
|
}
|
|
2999
2999
|
return d;
|
|
3000
3000
|
}, n.prototype._wrapLibraryMethodsWithReady = function() {
|
|
3001
|
-
for (var a = 0, d =
|
|
3002
|
-
|
|
3001
|
+
for (var a = 0, d = cr.length; a < d; a++)
|
|
3002
|
+
Gt(this, cr[a]);
|
|
3003
3003
|
}, n.prototype.createInstance = function(a) {
|
|
3004
3004
|
return new n(a);
|
|
3005
3005
|
}, n;
|
|
3006
|
-
}(),
|
|
3007
|
-
|
|
3006
|
+
}(), qt = new Wt();
|
|
3007
|
+
b.exports = qt;
|
|
3008
3008
|
}, { 3: 3 }] }, {}, [4])(4);
|
|
3009
3009
|
});
|
|
3010
|
-
})(
|
|
3011
|
-
var
|
|
3012
|
-
const
|
|
3010
|
+
})(lt);
|
|
3011
|
+
var Pn = lt.exports;
|
|
3012
|
+
const ut = /* @__PURE__ */ rn(Pn);
|
|
3013
3013
|
let Qe = null;
|
|
3014
|
-
|
|
3015
|
-
name:
|
|
3014
|
+
ut.config({
|
|
3015
|
+
name: at()
|
|
3016
3016
|
});
|
|
3017
3017
|
function me() {
|
|
3018
|
-
const e =
|
|
3019
|
-
return (Qe == null || Qe.config.name != e) && (Qe =
|
|
3018
|
+
const e = at();
|
|
3019
|
+
return (Qe == null || Qe.config.name != e) && (Qe = ut.createInstance({ name: e })), Qe;
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function Ea() {
|
|
3022
3022
|
async function e(o) {
|
|
3023
3023
|
const g = me();
|
|
3024
3024
|
(await g.keys()).filter((N) => N.startsWith(o)).forEach((N) => {
|
|
@@ -3031,30 +3031,30 @@ function Sa() {
|
|
|
3031
3031
|
async function u(o) {
|
|
3032
3032
|
return await me().removeItem(o);
|
|
3033
3033
|
}
|
|
3034
|
-
async function
|
|
3034
|
+
async function b(o, g) {
|
|
3035
3035
|
await me().setItem(g, o);
|
|
3036
3036
|
}
|
|
3037
3037
|
return {
|
|
3038
3038
|
clearAsync: e,
|
|
3039
3039
|
getAsync: t,
|
|
3040
3040
|
removeAsync: u,
|
|
3041
|
-
saveAsync:
|
|
3041
|
+
saveAsync: b
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
3044
|
let Oe;
|
|
3045
|
-
function
|
|
3045
|
+
function Ia(e) {
|
|
3046
3046
|
return Oe(e)();
|
|
3047
3047
|
}
|
|
3048
|
-
function
|
|
3048
|
+
function ct(e) {
|
|
3049
3049
|
return Oe(e);
|
|
3050
3050
|
}
|
|
3051
|
-
function
|
|
3052
|
-
return Oe = (t) =>
|
|
3051
|
+
function Mn(e) {
|
|
3052
|
+
return Oe = (t) => Ln({
|
|
3053
3053
|
...e,
|
|
3054
3054
|
...t
|
|
3055
3055
|
}), Oe;
|
|
3056
3056
|
}
|
|
3057
|
-
function
|
|
3057
|
+
function Ln(e) {
|
|
3058
3058
|
if (console.log("getting store definition"), e.storeMode == null && e.nav != null && e.navigation != null) {
|
|
3059
3059
|
const t = e.navigation.findItem(e.nav);
|
|
3060
3060
|
e.storeMode = t == null ? void 0 : t.storeMode, e.storeName ?? (e.storeName = e.navigation.findStoreName(e.nav));
|
|
@@ -3070,9 +3070,9 @@ function Mn(e) {
|
|
|
3070
3070
|
throw new Error("Must supply an api object to use store");
|
|
3071
3071
|
return Wr({ ...e, storeName: e.storeName ?? "" });
|
|
3072
3072
|
} else
|
|
3073
|
-
return
|
|
3073
|
+
return Rn({ ...e, storeName: e.storeName ?? "" });
|
|
3074
3074
|
}
|
|
3075
|
-
const
|
|
3075
|
+
const Nn = (e) => {
|
|
3076
3076
|
let t = j(e.url) ?? void 0;
|
|
3077
3077
|
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ne(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ne(t, e.id)), e.params != null) {
|
|
3078
3078
|
t ?? (t = "");
|
|
@@ -3083,159 +3083,158 @@ const Ln = (e) => {
|
|
|
3083
3083
|
}
|
|
3084
3084
|
return e.finalUrl = t, e.finalUrl ?? "";
|
|
3085
3085
|
};
|
|
3086
|
-
function
|
|
3087
|
-
return
|
|
3086
|
+
function Rn(e) {
|
|
3087
|
+
return Or(e.storeName, () => {
|
|
3088
3088
|
var l;
|
|
3089
|
-
const t = de.utc().toSeconds() / 86400, u = z({}),
|
|
3090
|
-
function
|
|
3091
|
-
var
|
|
3092
|
-
return `${e.storeName ?? "base"}_${((
|
|
3089
|
+
const t = de.utc().toSeconds() / 86400, u = z({}), b = z({}), o = e.storageMode == "local-cache", g = e.buildUrl ?? ((l = e.api) == null ? void 0 : l.buildUrl) ?? Nn;
|
|
3090
|
+
function x(r) {
|
|
3091
|
+
var y, S;
|
|
3092
|
+
return `${e.storeName ?? "base"}_${((y = e.auth) == null ? void 0 : y.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((S = r.data) == null ? void 0 : S.id) ?? "no-item-id"}_${r.finalUrl}`;
|
|
3093
3093
|
}
|
|
3094
3094
|
async function P(r) {
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
if (!c && u.value[y] !== void 0)
|
|
3095
|
+
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
3096
|
+
const y = x(r), S = r.refresh;
|
|
3097
|
+
if (!S && u.value[y] !== void 0)
|
|
3099
3098
|
return u.value[y] ?? null;
|
|
3100
|
-
if (!
|
|
3101
|
-
const
|
|
3102
|
-
if (
|
|
3103
|
-
return u.value[y] =
|
|
3099
|
+
if (!S && o == !0) {
|
|
3100
|
+
const i = await me().getItem(y);
|
|
3101
|
+
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
3102
|
+
return u.value[y] = i, i;
|
|
3104
3103
|
}
|
|
3105
3104
|
if (e.api == null)
|
|
3106
3105
|
return u.value[y];
|
|
3107
3106
|
try {
|
|
3108
|
-
let
|
|
3109
|
-
|
|
3110
|
-
var
|
|
3107
|
+
let i = b.value[y];
|
|
3108
|
+
i == null && (i = new Promise(async (E, M) => {
|
|
3109
|
+
var w;
|
|
3111
3110
|
try {
|
|
3112
|
-
let
|
|
3111
|
+
let C = await ((w = e.api) == null ? void 0 : w.getAll(r));
|
|
3113
3112
|
o == !0 && await me().setItem(y, {
|
|
3114
3113
|
meta: { storedOn: t },
|
|
3115
|
-
...
|
|
3116
|
-
}),
|
|
3117
|
-
} catch (
|
|
3118
|
-
C
|
|
3114
|
+
...C
|
|
3115
|
+
}), E(C);
|
|
3116
|
+
} catch (C) {
|
|
3117
|
+
M(C);
|
|
3119
3118
|
} finally {
|
|
3120
|
-
delete
|
|
3119
|
+
delete b.value[y];
|
|
3121
3120
|
}
|
|
3122
|
-
}),
|
|
3123
|
-
const
|
|
3124
|
-
return u.value[y] =
|
|
3125
|
-
} catch (
|
|
3126
|
-
let
|
|
3127
|
-
throw new Error(
|
|
3121
|
+
}), b.value[y] = i);
|
|
3122
|
+
const D = await i;
|
|
3123
|
+
return u.value[y] = D, D;
|
|
3124
|
+
} catch (i) {
|
|
3125
|
+
let D = i;
|
|
3126
|
+
throw new Error(D.message ?? "Problem");
|
|
3128
3127
|
}
|
|
3129
3128
|
}
|
|
3130
3129
|
async function N(r) {
|
|
3131
|
-
r.additionalUrl ?? (r.additionalUrl = "/get");
|
|
3132
|
-
const
|
|
3133
|
-
if (!
|
|
3134
|
-
return u.value[
|
|
3135
|
-
if (!
|
|
3136
|
-
const
|
|
3137
|
-
if (
|
|
3138
|
-
return u.value[
|
|
3130
|
+
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
3131
|
+
const y = x(r), S = r.refresh;
|
|
3132
|
+
if (!S && u.value[y] !== void 0)
|
|
3133
|
+
return u.value[y] ?? [];
|
|
3134
|
+
if (!S && o == !0) {
|
|
3135
|
+
const i = await me().getItem(y);
|
|
3136
|
+
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
3137
|
+
return u.value[y] = i, i;
|
|
3139
3138
|
}
|
|
3140
3139
|
if (e.api == null)
|
|
3141
|
-
return u.value[
|
|
3140
|
+
return u.value[y];
|
|
3142
3141
|
try {
|
|
3143
|
-
let
|
|
3144
|
-
|
|
3145
|
-
var
|
|
3142
|
+
let i = b.value[y];
|
|
3143
|
+
i == null && (i = new Promise(async (E, M) => {
|
|
3144
|
+
var w;
|
|
3146
3145
|
try {
|
|
3147
|
-
let C = await ((
|
|
3148
|
-
o == !0 && await me().setItem(
|
|
3146
|
+
let C = await ((w = e.api) == null ? void 0 : w.get(r));
|
|
3147
|
+
o == !0 && await me().setItem(y, {
|
|
3149
3148
|
meta: { storedOn: t },
|
|
3150
3149
|
...C
|
|
3151
|
-
}),
|
|
3150
|
+
}), E(C);
|
|
3152
3151
|
} catch (C) {
|
|
3153
3152
|
M(C);
|
|
3154
3153
|
} finally {
|
|
3155
|
-
delete
|
|
3154
|
+
delete b.value[y];
|
|
3156
3155
|
}
|
|
3157
|
-
}),
|
|
3158
|
-
const
|
|
3159
|
-
return u.value[
|
|
3160
|
-
} catch (
|
|
3161
|
-
let
|
|
3162
|
-
throw new Error(
|
|
3156
|
+
}), b.value[y] = i);
|
|
3157
|
+
const D = await i;
|
|
3158
|
+
return u.value[y] = D, D;
|
|
3159
|
+
} catch (i) {
|
|
3160
|
+
let D = i;
|
|
3161
|
+
throw new Error(D.message ?? "Problem");
|
|
3163
3162
|
}
|
|
3164
3163
|
}
|
|
3165
3164
|
async function $(r) {
|
|
3166
|
-
r.additionalUrl ?? (r.additionalUrl = "/patch");
|
|
3167
|
-
const
|
|
3168
|
-
let
|
|
3165
|
+
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
3166
|
+
const y = x(r);
|
|
3167
|
+
let S;
|
|
3169
3168
|
if (e.api != null)
|
|
3170
3169
|
try {
|
|
3171
|
-
let
|
|
3172
|
-
|
|
3173
|
-
} catch (
|
|
3174
|
-
let
|
|
3175
|
-
throw new Error(
|
|
3170
|
+
let i = await e.api.patch(r);
|
|
3171
|
+
S = i == null ? void 0 : i.data;
|
|
3172
|
+
} catch (i) {
|
|
3173
|
+
let D = i;
|
|
3174
|
+
throw new Error(D.message ?? "Patch Problem");
|
|
3176
3175
|
}
|
|
3177
3176
|
else
|
|
3178
|
-
|
|
3179
|
-
if (
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3177
|
+
S = r.data;
|
|
3178
|
+
if (S != null) {
|
|
3179
|
+
const i = u.value[y];
|
|
3180
|
+
i != null && (i.data = { ...i.data, ...S }, o == !0 && await me().setItem(y, {
|
|
3182
3181
|
meta: { storedOn: t },
|
|
3183
|
-
...
|
|
3184
|
-
})),
|
|
3185
|
-
let M =
|
|
3182
|
+
...i
|
|
3183
|
+
})), S.id != null && S.rowVersion != null && Object.entries(u.value).forEach((E) => {
|
|
3184
|
+
let M = E[1];
|
|
3186
3185
|
if (M = M.data, M != null)
|
|
3187
3186
|
if (Array.isArray(M))
|
|
3188
|
-
for (let
|
|
3189
|
-
const C = M[
|
|
3190
|
-
C.id ==
|
|
3187
|
+
for (let w = 0; w < M.length; w++) {
|
|
3188
|
+
const C = M[w];
|
|
3189
|
+
C.id == S.id && M.splice(w, 1, { ...C, ...S });
|
|
3191
3190
|
}
|
|
3192
3191
|
else
|
|
3193
|
-
M.id ==
|
|
3192
|
+
M.id == S.id && (u.value[E[0]].data = { ...M, ...S });
|
|
3194
3193
|
});
|
|
3195
3194
|
}
|
|
3196
|
-
return
|
|
3195
|
+
return S;
|
|
3197
3196
|
}
|
|
3198
3197
|
async function F(r) {
|
|
3199
|
-
r.additionalUrl ?? (r.additionalUrl = "/post");
|
|
3200
|
-
const
|
|
3201
|
-
let
|
|
3198
|
+
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
3199
|
+
const y = x(r);
|
|
3200
|
+
let S;
|
|
3202
3201
|
if (e.api != null)
|
|
3203
3202
|
try {
|
|
3204
|
-
let
|
|
3205
|
-
|
|
3206
|
-
} catch (
|
|
3207
|
-
let
|
|
3208
|
-
throw new Error(
|
|
3203
|
+
let i = await e.api.post(r);
|
|
3204
|
+
S = i == null ? void 0 : i.data;
|
|
3205
|
+
} catch (i) {
|
|
3206
|
+
let D = i;
|
|
3207
|
+
throw new Error(D.message ?? "Patch Problem");
|
|
3209
3208
|
}
|
|
3210
3209
|
else
|
|
3211
|
-
|
|
3212
|
-
return u.value[
|
|
3210
|
+
S = r.data;
|
|
3211
|
+
return u.value[y] = {
|
|
3213
3212
|
meta: { storedOn: t },
|
|
3214
|
-
data:
|
|
3215
|
-
}, o == !0 && await me().setItem(
|
|
3213
|
+
data: S
|
|
3214
|
+
}, o == !0 && await me().setItem(y, u.value[y]), S;
|
|
3216
3215
|
}
|
|
3217
3216
|
async function h(r) {
|
|
3218
|
-
r.additionalUrl ?? (r.additionalUrl = "/delete");
|
|
3219
|
-
const
|
|
3217
|
+
r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
|
|
3218
|
+
const y = x(r);
|
|
3220
3219
|
if (e.api != null)
|
|
3221
3220
|
try {
|
|
3222
|
-
let
|
|
3223
|
-
if (
|
|
3224
|
-
return
|
|
3225
|
-
} catch (
|
|
3226
|
-
let
|
|
3227
|
-
throw new Error(
|
|
3221
|
+
let S = await e.api.deleteItem(r);
|
|
3222
|
+
if (S != null)
|
|
3223
|
+
return S;
|
|
3224
|
+
} catch (S) {
|
|
3225
|
+
let i = S;
|
|
3226
|
+
throw new Error(i.message ?? "Patch Problem");
|
|
3228
3227
|
}
|
|
3229
|
-
delete u.value[
|
|
3228
|
+
delete u.value[y], o == !0 && await me().removeItem(y);
|
|
3230
3229
|
}
|
|
3231
3230
|
async function m(r) {
|
|
3232
3231
|
if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
|
|
3233
3232
|
try {
|
|
3234
|
-
let
|
|
3235
|
-
return
|
|
3236
|
-
} catch (
|
|
3237
|
-
let
|
|
3238
|
-
throw new Error(
|
|
3233
|
+
let y = await e.api.patch(r);
|
|
3234
|
+
return y == null ? void 0 : y.data;
|
|
3235
|
+
} catch (y) {
|
|
3236
|
+
let S = y;
|
|
3237
|
+
throw new Error(S.message ?? "Patch Problem");
|
|
3239
3238
|
}
|
|
3240
3239
|
}
|
|
3241
3240
|
return {
|
|
@@ -3251,11 +3250,11 @@ function Nn(e) {
|
|
|
3251
3250
|
});
|
|
3252
3251
|
}
|
|
3253
3252
|
function Wr(e) {
|
|
3254
|
-
return
|
|
3255
|
-
const t = z(), u = z(0),
|
|
3253
|
+
return Or(e.storeName, () => {
|
|
3254
|
+
const t = z(), u = z(0), b = de.utc().toSeconds() / 3600, o = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
|
|
3256
3255
|
function N() {
|
|
3257
|
-
var
|
|
3258
|
-
return `${e.storeName}_${((
|
|
3256
|
+
var i;
|
|
3257
|
+
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
3259
3258
|
}
|
|
3260
3259
|
async function $() {
|
|
3261
3260
|
P == !0 && await me().setItem(N(), {
|
|
@@ -3265,47 +3264,47 @@ function Wr(e) {
|
|
|
3265
3264
|
filters: []
|
|
3266
3265
|
});
|
|
3267
3266
|
}
|
|
3268
|
-
function F(
|
|
3269
|
-
const
|
|
3270
|
-
return
|
|
3271
|
-
var
|
|
3267
|
+
function F(i) {
|
|
3268
|
+
const D = N();
|
|
3269
|
+
return x.value[D] || (x.value[D] = new Promise(async (E, M) => {
|
|
3270
|
+
var w, C;
|
|
3272
3271
|
try {
|
|
3273
3272
|
let I = await ((C = e.api) == null ? void 0 : C.getAll({
|
|
3274
3273
|
additionalUrl: "/getAll",
|
|
3275
|
-
nav:
|
|
3274
|
+
nav: i.nav,
|
|
3276
3275
|
params: {
|
|
3277
|
-
lastUpdate: ((
|
|
3276
|
+
lastUpdate: ((w = g.value) == null ? void 0 : w.lastUpdate) ?? ln()
|
|
3278
3277
|
}
|
|
3279
3278
|
}));
|
|
3280
|
-
I == null ? M(I) : (t.value ?? (t.value = []), I.data.forEach((
|
|
3279
|
+
I == null ? M(I) : (t.value ?? (t.value = []), I.data.forEach((_) => {
|
|
3281
3280
|
var A, K;
|
|
3282
|
-
const s = t.value.findIndex((Q) => Q.id ==
|
|
3283
|
-
s >= 0 ? (A = t.value) == null || A.splice(s, 1,
|
|
3281
|
+
const s = t.value.findIndex((Q) => Q.id == _.id);
|
|
3282
|
+
s >= 0 ? (A = t.value) == null || A.splice(s, 1, _) : (K = t.value) == null || K.push(_);
|
|
3284
3283
|
}), u.value = t.value.length, g.value = {
|
|
3285
3284
|
lastUpdate: de.utc().toString(),
|
|
3286
|
-
storedOn:
|
|
3287
|
-
}, await $(),
|
|
3285
|
+
storedOn: b.toString()
|
|
3286
|
+
}, await $(), E(I));
|
|
3288
3287
|
} catch (I) {
|
|
3289
3288
|
M(I);
|
|
3290
3289
|
} finally {
|
|
3291
|
-
delete
|
|
3290
|
+
delete x.value[D];
|
|
3292
3291
|
}
|
|
3293
|
-
})),
|
|
3292
|
+
})), x.value[D];
|
|
3294
3293
|
}
|
|
3295
|
-
async function h(
|
|
3296
|
-
var M,
|
|
3297
|
-
const
|
|
3298
|
-
if (!
|
|
3294
|
+
async function h(i) {
|
|
3295
|
+
var M, w, C;
|
|
3296
|
+
const D = N(), E = i.refresh;
|
|
3297
|
+
if (!E && t.value != null)
|
|
3299
3298
|
return {
|
|
3300
3299
|
count: (M = t.value) == null ? void 0 : M.length,
|
|
3301
3300
|
data: t.value,
|
|
3302
3301
|
filters: []
|
|
3303
3302
|
};
|
|
3304
|
-
if (!
|
|
3305
|
-
const I = await me().getItem(
|
|
3306
|
-
if (I != null && parseFloat(I.meta.storedOn) >
|
|
3303
|
+
if (!E && P == !0) {
|
|
3304
|
+
const I = await me().getItem(D);
|
|
3305
|
+
if (I != null && parseFloat(I.meta.storedOn) > b - 12)
|
|
3307
3306
|
return t.value = I.data, u.value = I.data.length, o.value = I.filters ?? [], g.value = I.meta, {
|
|
3308
|
-
count: (
|
|
3307
|
+
count: (w = t.value) == null ? void 0 : w.length,
|
|
3309
3308
|
data: t.value,
|
|
3310
3309
|
filters: []
|
|
3311
3310
|
};
|
|
@@ -3318,128 +3317,128 @@ function Wr(e) {
|
|
|
3318
3317
|
};
|
|
3319
3318
|
t.value ?? (t.value = []);
|
|
3320
3319
|
try {
|
|
3321
|
-
return await F(
|
|
3320
|
+
return await F(i);
|
|
3322
3321
|
} catch (I) {
|
|
3323
|
-
let
|
|
3324
|
-
throw new Error(
|
|
3322
|
+
let _ = I;
|
|
3323
|
+
throw new Error(_.message ?? "Problem");
|
|
3325
3324
|
}
|
|
3326
3325
|
}
|
|
3327
|
-
async function m(
|
|
3328
|
-
var
|
|
3329
|
-
const
|
|
3330
|
-
if (
|
|
3326
|
+
async function m(i) {
|
|
3327
|
+
var w, C, I;
|
|
3328
|
+
const D = N(), E = i.id ?? ((w = i.data) == null ? void 0 : w.id);
|
|
3329
|
+
if (E == null)
|
|
3331
3330
|
throw new Error("no id provided");
|
|
3332
|
-
let M =
|
|
3331
|
+
let M = i.refresh;
|
|
3333
3332
|
if (!M && t.value != null) {
|
|
3334
|
-
const
|
|
3335
|
-
if (
|
|
3336
|
-
return { data:
|
|
3333
|
+
const _ = t.value.find((s) => s.id == E);
|
|
3334
|
+
if (_ != null)
|
|
3335
|
+
return { data: _ };
|
|
3337
3336
|
}
|
|
3338
3337
|
if (!M && P == !0) {
|
|
3339
|
-
const
|
|
3340
|
-
if (
|
|
3341
|
-
t.value =
|
|
3342
|
-
let s = t.value.find((A) => A.id ==
|
|
3338
|
+
const _ = await me().getItem(D);
|
|
3339
|
+
if (_ != null && parseFloat(_.meta.storedOn) > b - 12) {
|
|
3340
|
+
t.value = _.data, u.value = _.data.length, o.value = _.filters ?? [], g.value = _.meta;
|
|
3341
|
+
let s = t.value.find((A) => A.id == i.id);
|
|
3343
3342
|
if (s != null)
|
|
3344
3343
|
return { data: s };
|
|
3345
3344
|
}
|
|
3346
3345
|
}
|
|
3347
3346
|
if (e.api == null)
|
|
3348
3347
|
return {
|
|
3349
|
-
data: (C = t.value) == null ? void 0 : C.find((
|
|
3348
|
+
data: (C = t.value) == null ? void 0 : C.find((_) => _.id == i.id)
|
|
3350
3349
|
};
|
|
3351
3350
|
t.value ?? (t.value = []);
|
|
3352
3351
|
try {
|
|
3353
|
-
return await F(
|
|
3354
|
-
} catch (
|
|
3355
|
-
let s =
|
|
3352
|
+
return await F(i), { data: (I = t.value) == null ? void 0 : I.find((_) => _.id == i.id) };
|
|
3353
|
+
} catch (_) {
|
|
3354
|
+
let s = _;
|
|
3356
3355
|
throw new Error(s.message ?? "Problem");
|
|
3357
3356
|
}
|
|
3358
3357
|
}
|
|
3359
|
-
async function l(
|
|
3360
|
-
var
|
|
3361
|
-
|
|
3362
|
-
let
|
|
3358
|
+
async function l(i) {
|
|
3359
|
+
var E, M, w;
|
|
3360
|
+
i.additionalUrl ?? (i.additionalUrl = "/patch");
|
|
3361
|
+
let D;
|
|
3363
3362
|
if (e.api != null)
|
|
3364
3363
|
try {
|
|
3365
|
-
let C = await e.api.patch(
|
|
3366
|
-
|
|
3364
|
+
let C = await e.api.patch(i);
|
|
3365
|
+
D = { ...i.data, ...C == null ? void 0 : C.data };
|
|
3367
3366
|
} catch (C) {
|
|
3368
3367
|
let I = C;
|
|
3369
3368
|
throw new Error(I.message ?? "Patch Problem");
|
|
3370
3369
|
}
|
|
3371
3370
|
else
|
|
3372
|
-
|
|
3373
|
-
if (
|
|
3374
|
-
let C = (
|
|
3375
|
-
C != null && C >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(C, 1,
|
|
3371
|
+
D = i.data;
|
|
3372
|
+
if (D != null) {
|
|
3373
|
+
let C = (E = t.value) == null ? void 0 : E.findIndex((I) => I.id == D.id);
|
|
3374
|
+
C != null && C >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(C, 1, D), await $());
|
|
3376
3375
|
}
|
|
3377
|
-
return (
|
|
3376
|
+
return (w = t.value) == null ? void 0 : w.find((C) => C.id == (i.id ?? i.data.id));
|
|
3378
3377
|
}
|
|
3379
|
-
async function r(
|
|
3380
|
-
var
|
|
3381
|
-
|
|
3382
|
-
let
|
|
3378
|
+
async function r(i) {
|
|
3379
|
+
var E, M;
|
|
3380
|
+
i.additionalUrl ?? (i.additionalUrl = "/post");
|
|
3381
|
+
let D;
|
|
3383
3382
|
if (e.api != null)
|
|
3384
3383
|
try {
|
|
3385
|
-
let
|
|
3386
|
-
|
|
3387
|
-
} catch (
|
|
3388
|
-
let C =
|
|
3384
|
+
let w = await e.api.post(i);
|
|
3385
|
+
D = w == null ? void 0 : w.data;
|
|
3386
|
+
} catch (w) {
|
|
3387
|
+
let C = w;
|
|
3389
3388
|
throw new Error(C.message ?? "Patch Problem");
|
|
3390
3389
|
}
|
|
3391
3390
|
else
|
|
3392
|
-
|
|
3393
|
-
return
|
|
3391
|
+
D = i.data;
|
|
3392
|
+
return D != null && (t.value ?? (t.value = []), (E = t.value) == null || E.unshift(D), u.value += 1, await $()), (M = t.value) == null ? void 0 : M.find((w) => w.id == (i.id ?? i.data.id));
|
|
3394
3393
|
}
|
|
3395
|
-
async function
|
|
3396
|
-
var
|
|
3397
|
-
if (
|
|
3394
|
+
async function y(i) {
|
|
3395
|
+
var E, M;
|
|
3396
|
+
if (i.additionalUrl ?? (i.additionalUrl = "/delete"), e.api != null)
|
|
3398
3397
|
try {
|
|
3399
|
-
let
|
|
3400
|
-
if (
|
|
3401
|
-
return
|
|
3402
|
-
} catch (
|
|
3403
|
-
let C =
|
|
3398
|
+
let w = await e.api.deleteItem(i);
|
|
3399
|
+
if (w != null)
|
|
3400
|
+
return w;
|
|
3401
|
+
} catch (w) {
|
|
3402
|
+
let C = w;
|
|
3404
3403
|
throw new Error(C.message ?? "Patch Problem");
|
|
3405
3404
|
}
|
|
3406
|
-
const
|
|
3407
|
-
if (
|
|
3408
|
-
let
|
|
3409
|
-
|
|
3405
|
+
const D = i.id ?? i.data.id;
|
|
3406
|
+
if (D != null) {
|
|
3407
|
+
let w = (E = t.value) == null ? void 0 : E.findIndex((C) => C.id == D);
|
|
3408
|
+
w != null && w >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(w, 1), await $());
|
|
3410
3409
|
}
|
|
3411
3410
|
}
|
|
3412
|
-
async function
|
|
3413
|
-
var
|
|
3414
|
-
if (
|
|
3411
|
+
async function S(i) {
|
|
3412
|
+
var D;
|
|
3413
|
+
if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
|
|
3415
3414
|
try {
|
|
3416
|
-
await e.api.patch(
|
|
3417
|
-
} catch (
|
|
3418
|
-
let M =
|
|
3415
|
+
await e.api.patch(i);
|
|
3416
|
+
} catch (E) {
|
|
3417
|
+
let M = E;
|
|
3419
3418
|
throw new Error(M.message ?? "Patch Problem");
|
|
3420
3419
|
}
|
|
3421
3420
|
try {
|
|
3422
|
-
|
|
3423
|
-
} catch (
|
|
3424
|
-
let M =
|
|
3421
|
+
i.additionalUrl = "/getAll", await F(i);
|
|
3422
|
+
} catch (E) {
|
|
3423
|
+
let M = E;
|
|
3425
3424
|
throw new Error(M.message ?? "Problem");
|
|
3426
3425
|
}
|
|
3427
|
-
return (
|
|
3426
|
+
return (D = t.value) == null ? void 0 : D.find((E) => E.id == (i.id ?? i.data.id));
|
|
3428
3427
|
}
|
|
3429
3428
|
return {
|
|
3430
|
-
deleteItem:
|
|
3429
|
+
deleteItem: y,
|
|
3431
3430
|
get: m,
|
|
3432
3431
|
getAll: h,
|
|
3433
3432
|
patch: l,
|
|
3434
3433
|
post: r,
|
|
3435
|
-
restore:
|
|
3434
|
+
restore: S
|
|
3436
3435
|
};
|
|
3437
3436
|
});
|
|
3438
3437
|
}
|
|
3439
|
-
function
|
|
3440
|
-
const u = z(!1),
|
|
3438
|
+
function Un(e, t) {
|
|
3439
|
+
const u = z(!1), b = Yt(e);
|
|
3441
3440
|
let o = g(j(e));
|
|
3442
|
-
(t == null ? void 0 : t.useTracker) !== !1 && _e(
|
|
3441
|
+
(t == null ? void 0 : t.useTracker) !== !1 && _e(b, (P) => {
|
|
3443
3442
|
u.value = g(P) != o;
|
|
3444
3443
|
}, { deep: !0 });
|
|
3445
3444
|
function g(P) {
|
|
@@ -3450,32 +3449,32 @@ function Rn(e, t) {
|
|
|
3450
3449
|
t.propsToTrack.some((h) => h == F) || delete N[F];
|
|
3451
3450
|
})), JSON.stringify(N);
|
|
3452
3451
|
}
|
|
3453
|
-
function
|
|
3454
|
-
o = g(j(
|
|
3452
|
+
function x() {
|
|
3453
|
+
o = g(j(b)), u.value = !1;
|
|
3455
3454
|
}
|
|
3456
3455
|
return {
|
|
3457
|
-
asyncItem:
|
|
3456
|
+
asyncItem: b,
|
|
3458
3457
|
isChanged: u,
|
|
3459
|
-
restartTracker:
|
|
3458
|
+
restartTracker: x
|
|
3460
3459
|
};
|
|
3461
3460
|
}
|
|
3462
|
-
function
|
|
3461
|
+
function Da(e, t) {
|
|
3463
3462
|
var ae;
|
|
3464
3463
|
const {
|
|
3465
3464
|
// useBladeSrc = true,
|
|
3466
3465
|
useRouteSrc: u = !0
|
|
3467
|
-
} = t ?? {},
|
|
3466
|
+
} = t ?? {}, b = e.storeMode ?? (t == null ? void 0 : t.storeMode) ?? "session", o = e.storageMode ?? (t == null ? void 0 : t.storageMode) ?? "local-cache", g = e.nav ?? e.bladeName ?? "basic", x = pr(), P = et(), N = j(e.proxyQueryKey), $ = te(() => {
|
|
3468
3467
|
var G;
|
|
3469
3468
|
return j(e.proxyID) ?? (N != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[N] : void 0);
|
|
3470
|
-
}), F = z(void 0), { actionErrorMsg: h, actionLoadingMsg: m, deleteItem: l, getItem: r, getAllItems:
|
|
3469
|
+
}), F = z(void 0), { actionErrorMsg: h, actionLoadingMsg: m, deleteItem: l, getItem: r, getAllItems: y, restoreItem: S, saveItem: i } = nt({
|
|
3471
3470
|
nav: g,
|
|
3472
3471
|
proxyID: $.value,
|
|
3473
|
-
store:
|
|
3474
|
-
storeMode:
|
|
3472
|
+
store: ct({
|
|
3473
|
+
storeMode: b,
|
|
3475
3474
|
storageMode: o,
|
|
3476
3475
|
nav: g
|
|
3477
3476
|
})
|
|
3478
|
-
}),
|
|
3477
|
+
}), D = te(() => e.errorMsg ?? h.value), E = te(() => e.loadingMsg ?? m.value), M = te(() => E.value != null), w = z(e.itemID ?? (u ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), C = z(w.value == "new" ? "new" : e.startEditing ? "edit" : "view"), I = Le(!1), _ = te(() => {
|
|
3479
3478
|
if (C.value == "new")
|
|
3480
3479
|
return !1;
|
|
3481
3480
|
const G = j(F);
|
|
@@ -3493,17 +3492,17 @@ function Ea(e, t) {
|
|
|
3493
3492
|
}), K = te(() => {
|
|
3494
3493
|
const G = j(F);
|
|
3495
3494
|
return e.onCanSave != null ? e.onCanSave(G) : !0;
|
|
3496
|
-
}), { isChanged: Q, restartTracker: re } =
|
|
3495
|
+
}), { isChanged: Q, restartTracker: re } = Un(F, {
|
|
3497
3496
|
useTracker: e.trackChanges,
|
|
3498
3497
|
propsToIgnore: e.trackIgnoreProps,
|
|
3499
3498
|
propsToTrack: e.trackProps
|
|
3500
3499
|
});
|
|
3501
|
-
function
|
|
3500
|
+
function ce(G) {
|
|
3502
3501
|
const {
|
|
3503
3502
|
additionalUrl: X,
|
|
3504
3503
|
onDeleteAsync: ne,
|
|
3505
|
-
onDeleteSuccessAsync: fe = () => (
|
|
3506
|
-
proxyID:
|
|
3504
|
+
onDeleteSuccessAsync: fe = () => (x.back(), Promise.resolve(void 0)),
|
|
3505
|
+
proxyID: ie
|
|
3507
3506
|
} = { ...e };
|
|
3508
3507
|
l({
|
|
3509
3508
|
additionalUrl: X,
|
|
@@ -3511,7 +3510,7 @@ function Ea(e, t) {
|
|
|
3511
3510
|
nav: g,
|
|
3512
3511
|
onDeleteAsync: ne,
|
|
3513
3512
|
onDeleteSuccessAsync: fe,
|
|
3514
|
-
proxyID:
|
|
3513
|
+
proxyID: ie
|
|
3515
3514
|
// ...params.getOptions(),
|
|
3516
3515
|
//...(useBladeSrc ? bladeData.value : {}),
|
|
3517
3516
|
//requireConfirmation: true
|
|
@@ -3522,15 +3521,15 @@ function Ea(e, t) {
|
|
|
3522
3521
|
additionalUrl: X,
|
|
3523
3522
|
onRestoreAsync: ne,
|
|
3524
3523
|
onRestoreSuccessAsync: fe,
|
|
3525
|
-
proxyID:
|
|
3524
|
+
proxyID: ie
|
|
3526
3525
|
} = { ...e };
|
|
3527
|
-
|
|
3526
|
+
S({
|
|
3528
3527
|
additionalUrl: X,
|
|
3529
3528
|
data: G,
|
|
3530
3529
|
nav: g,
|
|
3531
3530
|
onRestoreAsync: ne,
|
|
3532
3531
|
onRestoreSuccessAsync: fe,
|
|
3533
|
-
proxyID:
|
|
3532
|
+
proxyID: ie
|
|
3534
3533
|
// ...params.getOptions(),
|
|
3535
3534
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3536
3535
|
});
|
|
@@ -3541,7 +3540,7 @@ function Ea(e, t) {
|
|
|
3541
3540
|
else {
|
|
3542
3541
|
const X = {
|
|
3543
3542
|
additionalUrl: e.additionalUrl,
|
|
3544
|
-
id:
|
|
3543
|
+
id: w.value,
|
|
3545
3544
|
nav: g,
|
|
3546
3545
|
proxyID: $.value,
|
|
3547
3546
|
params: e.params,
|
|
@@ -3553,7 +3552,7 @@ function Ea(e, t) {
|
|
|
3553
3552
|
if (e.isSingle === !0)
|
|
3554
3553
|
X.id === "new" ? F.value = e.onGetNew ? e.onGetNew() : {} : F.value = await r(X);
|
|
3555
3554
|
else {
|
|
3556
|
-
const ne = await
|
|
3555
|
+
const ne = await y(X);
|
|
3557
3556
|
F.value = ne.data;
|
|
3558
3557
|
}
|
|
3559
3558
|
}
|
|
@@ -3563,16 +3562,16 @@ function Ea(e, t) {
|
|
|
3563
3562
|
const {
|
|
3564
3563
|
additionalUrl: ne,
|
|
3565
3564
|
onCanSaveAsync: fe,
|
|
3566
|
-
onGetSaveAsync:
|
|
3565
|
+
onGetSaveAsync: ie,
|
|
3567
3566
|
onSaveAsync: Ee,
|
|
3568
|
-
onSaveSuccessAsync: Re = () => ((X == null ? void 0 : X.navBack) === !0 ?
|
|
3567
|
+
onSaveSuccessAsync: Re = () => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : C.value = "view", Promise.resolve(void 0))
|
|
3569
3568
|
} = { ...e };
|
|
3570
|
-
|
|
3569
|
+
i({
|
|
3571
3570
|
additionalUrl: ne,
|
|
3572
3571
|
data: G,
|
|
3573
3572
|
nav: g,
|
|
3574
3573
|
onCanSaveAsync: fe,
|
|
3575
|
-
onGetSaveAsync:
|
|
3574
|
+
onGetSaveAsync: ie,
|
|
3576
3575
|
onSaveAsync: Ee,
|
|
3577
3576
|
onSaveSuccessAsync: Re,
|
|
3578
3577
|
proxyID: $.value,
|
|
@@ -3585,25 +3584,25 @@ function Ea(e, t) {
|
|
|
3585
3584
|
const G = j(C);
|
|
3586
3585
|
!G || G == "view" ? C.value = "edit" : G == "edit" && (C.value = "view");
|
|
3587
3586
|
}
|
|
3588
|
-
return _e(
|
|
3587
|
+
return _e(D, (G) => {
|
|
3589
3588
|
I.value = G != null;
|
|
3590
3589
|
}), _e(() => e.refreshToggle, () => {
|
|
3591
3590
|
W({ deepRefresh: !0 });
|
|
3592
|
-
}),
|
|
3591
|
+
}), Qr(async () => {
|
|
3593
3592
|
var G;
|
|
3594
3593
|
e.eager == !0 && await W({ deepRefresh: ((G = P == null ? void 0 : P.params) == null ? void 0 : G.refresh) == "true" });
|
|
3595
3594
|
}), {
|
|
3596
3595
|
asyncItem: F,
|
|
3597
|
-
deleteItem:
|
|
3598
|
-
errorMsg:
|
|
3596
|
+
deleteItem: ce,
|
|
3597
|
+
errorMsg: D,
|
|
3599
3598
|
isChanged: Q,
|
|
3600
|
-
isDeletable:
|
|
3599
|
+
isDeletable: _,
|
|
3601
3600
|
isEditing: te(() => C.value == "new" || C.value == "edit"),
|
|
3602
3601
|
isEditable: s,
|
|
3603
3602
|
isLoading: M,
|
|
3604
3603
|
isRestorable: A,
|
|
3605
3604
|
isSaveable: K,
|
|
3606
|
-
loadingMsg:
|
|
3605
|
+
loadingMsg: E,
|
|
3607
3606
|
mode: C,
|
|
3608
3607
|
refresh: W,
|
|
3609
3608
|
restoreItem: we,
|
|
@@ -3614,22 +3613,22 @@ function Ea(e, t) {
|
|
|
3614
3613
|
}
|
|
3615
3614
|
const qr = z(!0), Hr = z(!1), Vr = z(), mr = z(!1);
|
|
3616
3615
|
let vr = null, _r;
|
|
3617
|
-
function
|
|
3616
|
+
function Bn() {
|
|
3618
3617
|
return _r;
|
|
3619
3618
|
}
|
|
3620
|
-
function
|
|
3619
|
+
function $n(e) {
|
|
3621
3620
|
const t = e.defaultCacheExpiryHours ?? 7;
|
|
3622
3621
|
e.getDisplayName ?? (e.getDisplayName = (m) => {
|
|
3623
3622
|
if (m.displayName != null)
|
|
3624
3623
|
return m.displayName;
|
|
3625
3624
|
if (m.name != null)
|
|
3626
|
-
return
|
|
3625
|
+
return nn(m.name.replaceAll("-", " "));
|
|
3627
3626
|
});
|
|
3628
3627
|
const u = (e.navItems ?? []).map((m) => ({
|
|
3629
3628
|
displayName: m.displayName ?? e.getDisplayName(m),
|
|
3630
3629
|
...m
|
|
3631
3630
|
}));
|
|
3632
|
-
function
|
|
3631
|
+
function b(m) {
|
|
3633
3632
|
var l;
|
|
3634
3633
|
return (l = P(m)) == null ? void 0 : l.archiveName;
|
|
3635
3634
|
}
|
|
@@ -3641,21 +3640,21 @@ function Bn(e) {
|
|
|
3641
3640
|
var l;
|
|
3642
3641
|
return (l = P(m)) == null ? void 0 : l.displayName;
|
|
3643
3642
|
}
|
|
3644
|
-
function
|
|
3643
|
+
function x(m) {
|
|
3645
3644
|
var l;
|
|
3646
3645
|
return (l = P(m)) == null ? void 0 : l.icon;
|
|
3647
3646
|
}
|
|
3648
3647
|
function P(m) {
|
|
3649
|
-
return m == null ? null : typeof m != "string" ? m :
|
|
3650
|
-
var
|
|
3651
|
-
return r.name == m || r.singleName == m || ((
|
|
3648
|
+
return m == null ? null : typeof m != "string" ? m : tt(u, (r) => r.children).find((r) => {
|
|
3649
|
+
var y;
|
|
3650
|
+
return r.name == m || r.singleName == m || ((y = r.aliases) == null ? void 0 : y.some((S) => S == m));
|
|
3652
3651
|
}) ?? null;
|
|
3653
3652
|
}
|
|
3654
3653
|
function N(m) {
|
|
3655
3654
|
const l = P(m);
|
|
3656
3655
|
if (l == null)
|
|
3657
3656
|
return;
|
|
3658
|
-
let r =
|
|
3657
|
+
let r = gn(l.microservice ?? "default") ?? "";
|
|
3659
3658
|
return l.path != null && (r = Ne(r, l.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3660
3659
|
}
|
|
3661
3660
|
function $(m) {
|
|
@@ -3664,7 +3663,7 @@ function Bn(e) {
|
|
|
3664
3663
|
return l.singleName;
|
|
3665
3664
|
const r = l == null ? void 0 : l.displayName;
|
|
3666
3665
|
if (r != null)
|
|
3667
|
-
return
|
|
3666
|
+
return mn(r);
|
|
3668
3667
|
}
|
|
3669
3668
|
function F(m) {
|
|
3670
3669
|
const l = P(m);
|
|
@@ -3684,10 +3683,10 @@ function Bn(e) {
|
|
|
3684
3683
|
backgroundName: Vr,
|
|
3685
3684
|
hesitate: mr,
|
|
3686
3685
|
navigationItems: u,
|
|
3687
|
-
findArchiveName:
|
|
3686
|
+
findArchiveName: b,
|
|
3688
3687
|
findCacheHours: o,
|
|
3689
3688
|
findDisplay: g,
|
|
3690
|
-
findIcon:
|
|
3689
|
+
findIcon: x,
|
|
3691
3690
|
findItem: P,
|
|
3692
3691
|
findStoreName: F,
|
|
3693
3692
|
findPath: N,
|
|
@@ -3695,15 +3694,15 @@ function Bn(e) {
|
|
|
3695
3694
|
updateNavigationProperties: h
|
|
3696
3695
|
}, _r;
|
|
3697
3696
|
}
|
|
3698
|
-
function
|
|
3697
|
+
function xa(e, t, u) {
|
|
3699
3698
|
var Fe, ke;
|
|
3700
|
-
const
|
|
3699
|
+
const b = Dn(), o = Bn(), g = pr(), x = et(), { bladeData: P } = En({}), N = e.useBladeSrc ?? !0, $ = e.useRouteSrc ?? !0, F = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", h = e.storeMode ?? ((Fe = o.findItem(F)) == null ? void 0 : Fe.storeMode) ?? "session", m = e.storageMode ?? ((ke = o.findItem(F)) == null ? void 0 : ke.storageMode) ?? "local-cache", l = j(e.customFilters) ?? [], r = z([]), y = te(() => Kt([
|
|
3701
3700
|
...l.filter((R) => R.name != null).map((R) => R.name),
|
|
3702
3701
|
...e.defaultFilters ?? [],
|
|
3703
3702
|
...r.value
|
|
3704
|
-
]).value),
|
|
3705
|
-
let
|
|
3706
|
-
const
|
|
3703
|
+
]).value), S = z((e.defaultFilters ?? []).map((R) => y.value.indexOf(R)));
|
|
3704
|
+
let i = z([...S.value]);
|
|
3705
|
+
const D = te(() => Fr(i, S).value.length > 0 || Fr(S, i).value.length > 0), E = z(M());
|
|
3707
3706
|
function M() {
|
|
3708
3707
|
var R, J;
|
|
3709
3708
|
if (N) {
|
|
@@ -3712,13 +3711,13 @@ function Ia(e, t, u) {
|
|
|
3712
3711
|
return Number.parseInt(V);
|
|
3713
3712
|
}
|
|
3714
3713
|
if ($) {
|
|
3715
|
-
const V = (J =
|
|
3714
|
+
const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.page;
|
|
3716
3715
|
if (V != null)
|
|
3717
3716
|
return Number.parseInt(typeof V == "string" ? V : V.toString());
|
|
3718
3717
|
}
|
|
3719
3718
|
return 1;
|
|
3720
3719
|
}
|
|
3721
|
-
const
|
|
3720
|
+
const w = te(() => {
|
|
3722
3721
|
var R, J;
|
|
3723
3722
|
if (N) {
|
|
3724
3723
|
const V = (R = P.value) == null ? void 0 : R.proxyID;
|
|
@@ -3726,7 +3725,7 @@ function Ia(e, t, u) {
|
|
|
3726
3725
|
return V;
|
|
3727
3726
|
}
|
|
3728
3727
|
if ($) {
|
|
3729
|
-
const V = (J =
|
|
3728
|
+
const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.query;
|
|
3730
3729
|
if (V != null)
|
|
3731
3730
|
return V;
|
|
3732
3731
|
}
|
|
@@ -3740,28 +3739,28 @@ function Ia(e, t, u) {
|
|
|
3740
3739
|
return V;
|
|
3741
3740
|
}
|
|
3742
3741
|
if ($) {
|
|
3743
|
-
const V = (J =
|
|
3742
|
+
const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.search;
|
|
3744
3743
|
if (V != null)
|
|
3745
3744
|
return V;
|
|
3746
3745
|
}
|
|
3747
3746
|
}
|
|
3748
|
-
const
|
|
3747
|
+
const _ = z(j(e.startShowingInactive) ?? !1), s = te(() => [
|
|
3749
3748
|
...e.searchProps ?? [],
|
|
3750
3749
|
...(e.headers ?? []).filter((R) => R.searchable != null && R.value != null).map((R) => R.value ?? "")
|
|
3751
3750
|
]), A = z([]), K = Le([]), Q = z([]);
|
|
3752
3751
|
let re;
|
|
3753
|
-
const { actionErrorMsg:
|
|
3752
|
+
const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = nt({
|
|
3754
3753
|
nav: F,
|
|
3755
|
-
proxyID:
|
|
3756
|
-
store:
|
|
3754
|
+
proxyID: w.value,
|
|
3755
|
+
store: ct({
|
|
3757
3756
|
storeMode: h,
|
|
3758
3757
|
storageMode: m,
|
|
3759
3758
|
nav: F
|
|
3760
3759
|
})
|
|
3761
|
-
}), X = te(() => e.errorMsg ??
|
|
3760
|
+
}), X = te(() => e.errorMsg ?? ce.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ie = Le(!1), Ee = Le(e.showSearch ?? !0), Re = z(0), Ve = te(() => {
|
|
3762
3761
|
let R, J = [];
|
|
3763
|
-
|
|
3764
|
-
const oe =
|
|
3762
|
+
S.value.forEach((O) => {
|
|
3763
|
+
const oe = y.value[O], ve = l.find((De) => De.name == oe);
|
|
3765
3764
|
ve != null ? R = R != null ? `${R}ANDALSO${ve.filterFunction()}` : ve.filterFunction() : J.push(oe);
|
|
3766
3765
|
});
|
|
3767
3766
|
const V = {};
|
|
@@ -3769,8 +3768,8 @@ function Ia(e, t, u) {
|
|
|
3769
3768
|
}), pe = te(() => {
|
|
3770
3769
|
var J;
|
|
3771
3770
|
let R = e.params != null ? { ...e.params } : {};
|
|
3772
|
-
return e.useServerPagination && e.itemsPerPage != null && (R.includeCount = !0, R.takeAmount = e.itemsPerPage, R.takeFrom = (
|
|
3773
|
-
}), er = te(() => (R) => e.onCanDelete != null ? e.onCanDelete(R) : !(R != null && R.isInactive === !0)), rr = te(() => (R) =>
|
|
3771
|
+
return e.useServerPagination && e.itemsPerPage != null && (R.includeCount = !0, R.takeAmount = e.itemsPerPage, R.takeFrom = (E.value - 1) * e.itemsPerPage), Ve.value != null && (R = { ...R, ...Ve.value }), _.value && (R.includeInactive = !0), Te(e.selectProps) && (R.properties = (J = e.selectProps) == null ? void 0 : J.toString()), C.value != null && (R.searchString = C.value), R;
|
|
3772
|
+
}), er = te(() => (R) => e.onCanDelete != null ? e.onCanDelete(R) : !(R != null && R.isInactive === !0)), rr = te(() => (R) => _.value ? e.onCanRestore != null ? e.onCanRestore(R) : (R == null ? void 0 : R.isInactive) === !0 : !1), Ce = te(() => Q.value.filter((R) => !R.hide)), tr = te(() => {
|
|
3774
3773
|
let R = new Array();
|
|
3775
3774
|
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
3776
3775
|
let O = R.find((oe) => oe.position == V.sublevel);
|
|
@@ -3822,7 +3821,7 @@ function Ia(e, t, u) {
|
|
|
3822
3821
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3823
3822
|
onDeleteAsync: V,
|
|
3824
3823
|
onDeleteSuccessAsync: async () => (ve(oe), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3825
|
-
proxyID:
|
|
3824
|
+
proxyID: w.value,
|
|
3826
3825
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3827
3826
|
requireConfirmation: !0
|
|
3828
3827
|
}), t && t("deleted", R);
|
|
@@ -3835,20 +3834,20 @@ function Ia(e, t, u) {
|
|
|
3835
3834
|
onCanRestoreAsync: e.onCanRestoreAsync,
|
|
3836
3835
|
onRestoreAsync: e.onRestoreAsync,
|
|
3837
3836
|
onRestoreSuccessAsync: e.onRestoreSuccessAsync,
|
|
3838
|
-
proxyID:
|
|
3837
|
+
proxyID: w.value
|
|
3839
3838
|
// ...(useBladeSrc ? bladeData.value : {})
|
|
3840
3839
|
});
|
|
3841
3840
|
}
|
|
3842
3841
|
function Ue() {
|
|
3843
3842
|
Y(() => {
|
|
3844
|
-
|
|
3843
|
+
b.exportToCSV(Ce.value, K.value);
|
|
3845
3844
|
}, { loadingMsg: "Exporting to CSV" });
|
|
3846
3845
|
}
|
|
3847
3846
|
function Pe() {
|
|
3848
3847
|
let R = j(A);
|
|
3849
3848
|
if (R = e.onFilter ? e.onFilter(R) : R, C.value != null && C.value.length > 0) {
|
|
3850
3849
|
let J = [...s.value];
|
|
3851
|
-
e.itemText && J.push(e.itemText), Te(J) && (R = R.filter((V) =>
|
|
3850
|
+
e.itemText && J.push(e.itemText), Te(J) && (R = R.filter((V) => dn(V, C.value, J)));
|
|
3852
3851
|
}
|
|
3853
3852
|
K.value = R;
|
|
3854
3853
|
}
|
|
@@ -3857,7 +3856,7 @@ function Ia(e, t, u) {
|
|
|
3857
3856
|
e.headers != null && (Q.value = [...e.headers], R || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
3858
3857
|
}
|
|
3859
3858
|
async function Ie(R) {
|
|
3860
|
-
if (
|
|
3859
|
+
if (ie.value = !1, (R == null ? void 0 : R.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, C.value = void 0), e.items != null) {
|
|
3861
3860
|
A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3862
3861
|
return;
|
|
3863
3862
|
}
|
|
@@ -3868,7 +3867,7 @@ function Ia(e, t, u) {
|
|
|
3868
3867
|
params: pe.value,
|
|
3869
3868
|
//params,
|
|
3870
3869
|
// params: params.getParamOptions(),
|
|
3871
|
-
proxyID:
|
|
3870
|
+
proxyID: w.value,
|
|
3872
3871
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3873
3872
|
// ...(props.useInterEvents ? eventData : {}),
|
|
3874
3873
|
refresh: (R == null ? void 0 : R.deepRefresh) ?? !1,
|
|
@@ -3909,30 +3908,30 @@ function Ia(e, t, u) {
|
|
|
3909
3908
|
function Ze() {
|
|
3910
3909
|
Ee.value ? (Ee.value = e.showSearch ?? !1, C.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
|
|
3911
3910
|
}
|
|
3912
|
-
return $e(),
|
|
3911
|
+
return $e(), Qt([C], () => {
|
|
3913
3912
|
Pe();
|
|
3914
|
-
}, { debounce: 500, maxWait: 500 }), _e([
|
|
3913
|
+
}, { debounce: 500, maxWait: 500 }), _e([_, E], async () => {
|
|
3915
3914
|
await Ie();
|
|
3916
3915
|
}), _e([X, () => e.errorMsg], ([R, J]) => {
|
|
3917
|
-
|
|
3916
|
+
ie.value = R != null || J != null;
|
|
3918
3917
|
}), _e(() => e.refreshToggle, () => {
|
|
3919
3918
|
Ie({ deepRefresh: !0 });
|
|
3920
|
-
}),
|
|
3919
|
+
}), Xr([A, () => e.items], () => {
|
|
3921
3920
|
Pe();
|
|
3922
|
-
}),
|
|
3921
|
+
}), Qr(async () => {
|
|
3923
3922
|
var R;
|
|
3924
|
-
e.eager == !0 && await Ie({ deepRefresh: ((R =
|
|
3923
|
+
e.eager == !0 && await Ie({ deepRefresh: ((R = x == null ? void 0 : x.params) == null ? void 0 : R.refresh) == "true" });
|
|
3925
3924
|
}), {
|
|
3926
3925
|
add: be,
|
|
3927
3926
|
asyncItems: A,
|
|
3928
|
-
currentPage:
|
|
3927
|
+
currentPage: E,
|
|
3929
3928
|
deleteItem: lr,
|
|
3930
3929
|
displayHeaders: ar,
|
|
3931
3930
|
errorMsg: X,
|
|
3932
3931
|
exportToCSV: Ue,
|
|
3933
3932
|
filteredItems: K,
|
|
3934
|
-
filters:
|
|
3935
|
-
filtersChanged:
|
|
3933
|
+
filters: y,
|
|
3934
|
+
filtersChanged: D,
|
|
3936
3935
|
headerOptions: Q,
|
|
3937
3936
|
isDeletable: er,
|
|
3938
3937
|
isLoading: fe,
|
|
@@ -3941,11 +3940,11 @@ function Ia(e, t, u) {
|
|
|
3941
3940
|
refresh: Ie,
|
|
3942
3941
|
restoreItem: ze,
|
|
3943
3942
|
searchString: C,
|
|
3944
|
-
selectedFilters:
|
|
3943
|
+
selectedFilters: S,
|
|
3945
3944
|
selectItem: Ye,
|
|
3946
3945
|
// serverFilters,
|
|
3947
|
-
showError:
|
|
3948
|
-
showInactive:
|
|
3946
|
+
showError: ie,
|
|
3947
|
+
showInactive: _,
|
|
3949
3948
|
showSearch: Ee,
|
|
3950
3949
|
subtitleOptions: tr,
|
|
3951
3950
|
tableHeaders: Ce,
|
|
@@ -3955,15 +3954,15 @@ function Ia(e, t, u) {
|
|
|
3955
3954
|
};
|
|
3956
3955
|
}
|
|
3957
3956
|
let Tr;
|
|
3958
|
-
function
|
|
3957
|
+
function _a(e) {
|
|
3959
3958
|
return Tr.usePresets(e);
|
|
3960
3959
|
}
|
|
3961
|
-
function
|
|
3960
|
+
function Fn(e) {
|
|
3962
3961
|
function t(u) {
|
|
3963
3962
|
if (!u)
|
|
3964
3963
|
return {};
|
|
3965
|
-
let
|
|
3966
|
-
return e.presets[
|
|
3964
|
+
let b = u;
|
|
3965
|
+
return e.presets[b] ?? {};
|
|
3967
3966
|
}
|
|
3968
3967
|
return Tr = {
|
|
3969
3968
|
usePresets: t
|
|
@@ -3972,151 +3971,162 @@ function $n(e) {
|
|
|
3972
3971
|
let zr, Yr, Zr, Jr = !1;
|
|
3973
3972
|
const gr = z(!1), yr = z(!1), jr = z(), Xe = z();
|
|
3974
3973
|
let Cr;
|
|
3975
|
-
function
|
|
3974
|
+
function Ta() {
|
|
3976
3975
|
return Cr;
|
|
3977
3976
|
}
|
|
3978
|
-
function
|
|
3979
|
-
function e(
|
|
3980
|
-
Xe.value =
|
|
3977
|
+
function kn() {
|
|
3978
|
+
function e(x) {
|
|
3979
|
+
Xe.value = x.detail, yr.value = !0;
|
|
3981
3980
|
}
|
|
3982
3981
|
function t() {
|
|
3983
3982
|
Jr || (Jr = !0, window.location.reload());
|
|
3984
3983
|
}
|
|
3985
3984
|
function u() {
|
|
3986
|
-
var
|
|
3987
|
-
(
|
|
3985
|
+
var x;
|
|
3986
|
+
(x = jr.value) == null || x.prompt(), gr.value = !1;
|
|
3988
3987
|
}
|
|
3989
|
-
function
|
|
3988
|
+
function b() {
|
|
3990
3989
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
3991
3990
|
}
|
|
3992
|
-
function o(
|
|
3993
|
-
|
|
3991
|
+
function o(x) {
|
|
3992
|
+
x.preventDefault(), gr.value = !0, jr.value = x;
|
|
3994
3993
|
}
|
|
3995
3994
|
function g() {
|
|
3996
3995
|
yr.value = !1, !(!Xe.value || !Xe.value.waiting) && Xe.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
3997
3996
|
}
|
|
3998
|
-
return
|
|
3997
|
+
return Xt(() => {
|
|
3999
3998
|
zr == null && (zr = document.addEventListener("swUpdated", e, { once: !0 })), Yr == null && (Yr = navigator.serviceWorker.addEventListener("controllerchange", t)), Zr == null && (Zr = window.addEventListener("beforeinstallprompt", o));
|
|
4000
3999
|
}), Cr = {
|
|
4001
4000
|
canInstallApp: gr,
|
|
4002
4001
|
canUpdateApp: yr,
|
|
4003
4002
|
installApp: u,
|
|
4004
|
-
isInstalled:
|
|
4003
|
+
isInstalled: b,
|
|
4005
4004
|
updateApp: g
|
|
4006
4005
|
}, Cr;
|
|
4007
4006
|
}
|
|
4008
|
-
function
|
|
4007
|
+
function Ca(e) {
|
|
4009
4008
|
const t = [];
|
|
4010
|
-
return (e == null ? void 0 : e.required) == !0 && t.push((u) => !!u || "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((u) => !!u || "Password is required"), t.push((u) => u != null && u.length > 9 || "Password must be 10 or more characters"), t.push((u) => /^(.*[a-z].*)$/.test(u) || "Password must contain a lowercase letter"), t.push((u) => /^(.*[A-Z].*)$/.test(u) || "Password must contain an uppercase letter"), t.push((u) => /^(.*\d.*)$/.test(u) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((u) => !!u || "Email is required"), t.push((u) =>
|
|
4009
|
+
return (e == null ? void 0 : e.required) == !0 && t.push((u) => !!u || "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((u) => !!u || "Password is required"), t.push((u) => u != null && u.length > 9 || "Password must be 10 or more characters"), t.push((u) => /^(.*[a-z].*)$/.test(u) || "Password must contain a lowercase letter"), t.push((u) => /^(.*[A-Z].*)$/.test(u) || "Password must contain an uppercase letter"), t.push((u) => /^(.*\d.*)$/.test(u) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((u) => !!u || "Email is required"), t.push((u) => hn(u) || "Email must be valid")), t;
|
|
4010
|
+
}
|
|
4011
|
+
let Kr;
|
|
4012
|
+
function Gn(e) {
|
|
4013
|
+
const t = z((e == null ? void 0 : e.default) ?? "Admin"), u = z((e == null ? void 0 : e.groups) ?? []);
|
|
4014
|
+
return Kr = {
|
|
4015
|
+
currentGroup: t,
|
|
4016
|
+
groupOptions: u,
|
|
4017
|
+
useRoutes: e == null ? void 0 : e.useRoutes
|
|
4018
|
+
}, Kr;
|
|
4011
4019
|
}
|
|
4012
|
-
function
|
|
4020
|
+
function Pa(e) {
|
|
4013
4021
|
return {
|
|
4014
4022
|
install(t, u) {
|
|
4015
4023
|
var N;
|
|
4016
|
-
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = u.vuetifyInstance),
|
|
4017
|
-
const
|
|
4018
|
-
|
|
4019
|
-
const g =
|
|
4024
|
+
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = u.vuetifyInstance), In(e);
|
|
4025
|
+
const b = _n(), o = $n(e);
|
|
4026
|
+
Fn(e), (N = e.auth).demo ?? (N.demo = b), e.auth.getAuthItem = o.findItem;
|
|
4027
|
+
const g = wn(e.auth);
|
|
4028
|
+
Gn(e.menu);
|
|
4029
|
+
const x = vn({
|
|
4020
4030
|
auth: g,
|
|
4021
4031
|
findPath: o.findPath,
|
|
4022
4032
|
useBearerToken: !0
|
|
4023
|
-
}), P =
|
|
4033
|
+
}), P = xn({
|
|
4024
4034
|
getTimeZone: () => g.timeZone.value
|
|
4025
4035
|
});
|
|
4026
|
-
|
|
4036
|
+
Cn({
|
|
4027
4037
|
dates: P
|
|
4028
|
-
}),
|
|
4029
|
-
api:
|
|
4038
|
+
}), kn(), Mn({
|
|
4039
|
+
api: x,
|
|
4030
4040
|
auth: g,
|
|
4031
4041
|
navigation: o
|
|
4032
|
-
}),
|
|
4042
|
+
}), yn(e.urls);
|
|
4033
4043
|
}
|
|
4034
4044
|
};
|
|
4035
4045
|
}
|
|
4036
4046
|
export {
|
|
4037
|
-
|
|
4038
|
-
|
|
4047
|
+
sa as DataURIToBlob,
|
|
4048
|
+
aa as addWeekday,
|
|
4039
4049
|
Ne as appendUrl,
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4050
|
+
nn as capitalizeWords,
|
|
4051
|
+
On as checkImage,
|
|
4052
|
+
fn as containsSearch,
|
|
4053
|
+
na as containsWeekday,
|
|
4044
4054
|
Pr as copyDeep,
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4055
|
+
cn as copyItemByAlphabet,
|
|
4056
|
+
vn as createApi,
|
|
4057
|
+
wn as createAuth,
|
|
4058
|
+
Pa as createCore,
|
|
4059
|
+
In as createCosmetics,
|
|
4060
|
+
xn as createDates,
|
|
4061
|
+
_n as createDemo,
|
|
4062
|
+
Cn as createFilters,
|
|
4063
|
+
$n as createNavigation,
|
|
4064
|
+
kn as createPWA,
|
|
4065
|
+
Fn as createPresets,
|
|
4066
|
+
Rn as createSessionStoreDefinition,
|
|
4067
|
+
Mn as createStoreBuilder,
|
|
4068
|
+
yn as createUrl,
|
|
4059
4069
|
Wr as createWholeLastUpdateStoreDefinition,
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4070
|
+
un as csvContains,
|
|
4071
|
+
ya as csvDefaults,
|
|
4072
|
+
tt as deepSelect,
|
|
4073
|
+
Zn as distinct,
|
|
4074
|
+
Jn as extensionExists,
|
|
4075
|
+
sn as extractErrorDescription,
|
|
4076
|
+
tn as fromCamelCase,
|
|
4077
|
+
jn as getAreaAround,
|
|
4078
|
+
Kn as getAreaToLeft,
|
|
4079
|
+
Qn as getAreaToRight,
|
|
4080
|
+
Xn as getGoogleMapsLocationLine,
|
|
4081
|
+
pn as getImageData,
|
|
4082
|
+
rt as getLocationLine,
|
|
4083
|
+
ca as getMinDate,
|
|
4084
|
+
ln as getMinDateString,
|
|
4085
|
+
on as getRandomColor,
|
|
4086
|
+
dn as hasSearch,
|
|
4087
|
+
ua as isArrayOfLength,
|
|
4078
4088
|
Te as isLengthyArray,
|
|
4079
|
-
|
|
4089
|
+
an as isMinDate,
|
|
4080
4090
|
wr as nestedValue,
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4091
|
+
la as removeWeekday,
|
|
4092
|
+
ia as roundTo,
|
|
4093
|
+
mn as singularize,
|
|
4094
|
+
ea as toCamelCase,
|
|
4095
|
+
oa as toCompareString,
|
|
4096
|
+
fa as toggleCSV,
|
|
4097
|
+
da as twiddleThumbs,
|
|
4098
|
+
nt as useActions,
|
|
4099
|
+
en as useActionsTracker,
|
|
4090
4100
|
Sr as useApi,
|
|
4091
|
-
|
|
4101
|
+
ma as useAuth,
|
|
4092
4102
|
kr as useAuthUrl,
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4103
|
+
En as useBlade,
|
|
4104
|
+
Dn as useCSV,
|
|
4105
|
+
va as useCosmetics,
|
|
4106
|
+
gn as useDataUrl,
|
|
4107
|
+
wa as useDates,
|
|
4108
|
+
at as useDbName,
|
|
4109
|
+
ba as useDemo,
|
|
4110
|
+
Sa as useDocumentMeta,
|
|
4111
|
+
bn as useDraggable,
|
|
4112
|
+
Aa as useFilters,
|
|
4113
|
+
Ot as useId,
|
|
4114
|
+
Da as useItem,
|
|
4115
|
+
xa as useList,
|
|
4116
|
+
Ea as useLocalCache,
|
|
4117
|
+
ga as useLocalCosmetics,
|
|
4108
4118
|
me as useLocalDb,
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
+
Bn as useNavigation,
|
|
4120
|
+
Ta as usePWA,
|
|
4121
|
+
_a as usePresets,
|
|
4122
|
+
An as useResizable,
|
|
4123
|
+
Ca as useRules,
|
|
4124
|
+
Ia as useStore,
|
|
4125
|
+
ct as useStoreDefinition,
|
|
4126
|
+
Un as useTracker,
|
|
4127
|
+
ha as useUrls,
|
|
4128
|
+
hn as validEmail,
|
|
4119
4129
|
He as weekdayPairs,
|
|
4120
|
-
|
|
4121
|
-
|
|
4130
|
+
ta as weekdayShortName,
|
|
4131
|
+
ra as weekdayValue
|
|
4122
4132
|
};
|