@oardi/ts-utils 0.0.44 → 0.0.46
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/index.cjs.js +9 -9
- package/index.es.js +1272 -1214
- package/index.umd.js +9 -9
- package/package.json +1 -1
package/index.es.js
CHANGED
|
@@ -1,1227 +1,1285 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, i, o, s) => {
|
|
3
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
|
+
get: ((e) => i[e]).bind(null, d),
|
|
5
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
|
+
});
|
|
7
|
+
return e;
|
|
8
|
+
}, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
|
|
9
|
+
value: n,
|
|
10
|
+
enumerable: !0
|
|
11
|
+
}) : a, n)), l = {
|
|
12
|
+
xs: 0,
|
|
13
|
+
sm: 576,
|
|
14
|
+
md: 768,
|
|
15
|
+
lg: 992,
|
|
16
|
+
xl: 1200,
|
|
17
|
+
xxl: 1400,
|
|
18
|
+
xxxl: 1600
|
|
19
|
+
}, u = class {
|
|
20
|
+
static getScreenWidth() {
|
|
21
|
+
return window.innerWidth;
|
|
22
|
+
}
|
|
23
|
+
static getScreenHeight() {
|
|
24
|
+
return window.innerHeight;
|
|
25
|
+
}
|
|
26
|
+
}, d = class e {
|
|
27
|
+
static breakPoints = l;
|
|
28
|
+
static getCurrentBreakpoint() {
|
|
29
|
+
return e.getBreakpointByScreenWidth(u.getScreenWidth());
|
|
30
|
+
}
|
|
31
|
+
static getBreakpointByScreenWidth(t = u.getScreenWidth()) {
|
|
32
|
+
let n = "xs";
|
|
33
|
+
for (let r of Object.keys(e.breakPoints)) e.breakPoints[r] <= t && (n = r);
|
|
34
|
+
return {
|
|
35
|
+
breakpoint: n,
|
|
36
|
+
screenWidth: t
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
isScreenGreaterThan(t) {
|
|
40
|
+
return u.getScreenWidth() > e.breakPoints[t];
|
|
41
|
+
}
|
|
42
|
+
isScreenSmallerThan(t) {
|
|
43
|
+
return u.getScreenWidth() < e.breakPoints[t];
|
|
44
|
+
}
|
|
45
|
+
}, f = /* @__PURE__ */ function(e) {
|
|
46
|
+
return e.opera = "opera", e.firefox = "firefox", e.safari = "safari", e.ie = "ie", e.edgeLegacy = "edgeLegacy", e.edg = "edg", e.chrome = "chrome", e.iOS = "iOS", e.headlessChrome = "headlessChrome", e.nodeRuntime = "nodeRuntime", e.electron = "electron", e;
|
|
47
|
+
}({}), p = (typeof navigator < "u" ? navigator.userAgent : "").toLowerCase(), m = class e {
|
|
48
|
+
static isBrowserEnv() {
|
|
49
|
+
return typeof window < "u" && typeof navigator < "u";
|
|
50
|
+
}
|
|
51
|
+
static isOpera(e = p) {
|
|
52
|
+
return this.isBrowserEnv() ? e.includes("opr/") || e.includes("opera") : !1;
|
|
53
|
+
}
|
|
54
|
+
static isFirefox(e = p) {
|
|
55
|
+
return this.isBrowserEnv() ? e.includes("firefox") || globalThis.InstallTrigger !== void 0 : !1;
|
|
56
|
+
}
|
|
57
|
+
static isSafari(e = p) {
|
|
58
|
+
if (!this.isBrowserEnv()) return !1;
|
|
59
|
+
let t = navigator.vendor && navigator.vendor.includes("Apple"), n = e.includes("safari"), r = !(e.includes("crios") || e.includes("chrome") || e.includes("android") || e.includes("opr/") || e.includes("edg"));
|
|
60
|
+
return t && n && r;
|
|
61
|
+
}
|
|
62
|
+
static isIOS(e = p) {
|
|
63
|
+
if (!this.isBrowserEnv()) return !1;
|
|
64
|
+
let t = /iphone|ipad|ipod/.test(e), n = e.includes("macintosh") && navigator.maxTouchPoints > 1;
|
|
65
|
+
return t || n;
|
|
66
|
+
}
|
|
67
|
+
static isEdgeLegacy() {
|
|
68
|
+
return this.isBrowserEnv() ? !!window.StyleMedia && !p.includes("edg/") : !1;
|
|
69
|
+
}
|
|
70
|
+
static isEdg(e = p) {
|
|
71
|
+
return this.isBrowserEnv() ? e.includes("edg/") : !1;
|
|
72
|
+
}
|
|
73
|
+
static isIE() {
|
|
74
|
+
return !this.isBrowserEnv() && typeof document > "u" ? !1 : !!document.documentMode;
|
|
75
|
+
}
|
|
76
|
+
static isChrome(e = p) {
|
|
77
|
+
if (!this.isBrowserEnv()) return !1;
|
|
78
|
+
let t = navigator.vendor && navigator.vendor.includes("Google"), n = e.includes("chrome") || e.includes("crios"), r = !this.isEdg(e) && !this.isOpera(e);
|
|
79
|
+
return t && n && r;
|
|
80
|
+
}
|
|
81
|
+
static isElectron(e = p) {
|
|
82
|
+
return typeof process < "u" && process.versions?.electron ? !0 : e.includes("electron");
|
|
83
|
+
}
|
|
84
|
+
static isHeadlessChrome(e = p) {
|
|
85
|
+
return e.includes("headlesschrome");
|
|
86
|
+
}
|
|
87
|
+
static isNodeRuntime() {
|
|
88
|
+
return typeof process < "u" && !!process.versions?.node && !this.isBrowserEnv();
|
|
89
|
+
}
|
|
90
|
+
static getCurrentBrowser() {
|
|
91
|
+
let t = navigator.userAgent.toLowerCase();
|
|
92
|
+
if (typeof navigator > "u") throw Error("navigator not set");
|
|
93
|
+
if (e.isOpera()) return f.opera;
|
|
94
|
+
if (e.isFirefox()) return f.firefox;
|
|
95
|
+
if (e.isSafari()) return f.safari;
|
|
96
|
+
if (e.isIE()) return f.ie;
|
|
97
|
+
if (e.isEdgeLegacy()) return f.edgeLegacy;
|
|
98
|
+
if (e.isEdg()) return f.edg;
|
|
99
|
+
if (e.isChrome()) return f.chrome;
|
|
100
|
+
if (e.isIOS(t)) return f.iOS;
|
|
101
|
+
if (e.isElectron(t)) return f.electron;
|
|
102
|
+
if (e.isHeadlessChrome(t)) return f.headlessChrome;
|
|
103
|
+
if (e.isNodeRuntime()) return f.nodeRuntime;
|
|
104
|
+
throw Error("Browser could not be detected: " + t);
|
|
105
|
+
}
|
|
9
106
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
static getScreenHeight() {
|
|
15
|
-
return window.innerHeight;
|
|
16
|
-
}
|
|
17
|
-
// isScreenSmallerThan
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region lib/helpers/clipboard.helper.ts
|
|
109
|
+
function h(e) {
|
|
110
|
+
return navigator.clipboard.writeText(e);
|
|
18
111
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
return new Promise((i, o) => {
|
|
526
|
-
Nt(t, {
|
|
527
|
-
header: !0,
|
|
528
|
-
complete: (k) => i(k),
|
|
529
|
-
error: (k) => o(k)
|
|
530
|
-
});
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
async function qt(s, t, i) {
|
|
535
|
-
const o = i?.mimeType ?? Jt(t), k = Kt(s, o);
|
|
536
|
-
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
537
|
-
try {
|
|
538
|
-
const q = await (await window.showSaveFilePicker({
|
|
539
|
-
suggestedName: t,
|
|
540
|
-
types: [{ description: "Datei", accept: { [o]: [`.${Ft(t)}`] } }]
|
|
541
|
-
})).createWritable();
|
|
542
|
-
await q.write(k), await q.close();
|
|
543
|
-
return;
|
|
544
|
-
} catch {
|
|
545
|
-
}
|
|
546
|
-
const D = URL.createObjectURL(k), I = document.createElement("a");
|
|
547
|
-
I.href = D, I.download = t, I.rel = "noopener", I.style.display = "none", document.body.appendChild(I), Qt(I), window.setTimeout(() => {
|
|
548
|
-
document.body.removeChild(I), URL.revokeObjectURL(D);
|
|
549
|
-
}, 0), Vt() && window.open(D, "_blank", "noopener,noreferrer");
|
|
550
|
-
}
|
|
551
|
-
function Kt(s, t) {
|
|
552
|
-
if (s instanceof Blob)
|
|
553
|
-
return s.type ? s : new Blob([s], { type: t });
|
|
554
|
-
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
555
|
-
const i = s instanceof Uint8Array ? s : new Uint8Array(s);
|
|
556
|
-
return new Blob([i], { type: t });
|
|
557
|
-
}
|
|
558
|
-
return new Blob([s], { type: t || "text/plain;charset=utf-8" });
|
|
559
|
-
}
|
|
560
|
-
function Jt(s) {
|
|
561
|
-
switch (Ft(s).toLowerCase()) {
|
|
562
|
-
case "txt":
|
|
563
|
-
return "text/plain;charset=utf-8";
|
|
564
|
-
case "csv":
|
|
565
|
-
return "text/csv;charset=utf-8";
|
|
566
|
-
case "json":
|
|
567
|
-
return "application/json;charset=utf-8";
|
|
568
|
-
case "pdf":
|
|
569
|
-
return "application/pdf";
|
|
570
|
-
case "png":
|
|
571
|
-
return "image/png";
|
|
572
|
-
case "jpg":
|
|
573
|
-
case "jpeg":
|
|
574
|
-
return "image/jpeg";
|
|
575
|
-
case "svg":
|
|
576
|
-
return "image/svg+xml";
|
|
577
|
-
case "zip":
|
|
578
|
-
return "application/zip";
|
|
579
|
-
default:
|
|
580
|
-
return "application/octet-stream";
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
function Ft(s) {
|
|
584
|
-
const t = s.lastIndexOf(".");
|
|
585
|
-
return t >= 0 && t < s.length - 1 ? s.slice(t + 1) : "";
|
|
586
|
-
}
|
|
587
|
-
function Qt(s) {
|
|
588
|
-
const t = document.createEvent("MouseEvents");
|
|
589
|
-
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(t);
|
|
590
|
-
}
|
|
591
|
-
function Vt() {
|
|
592
|
-
const s = navigator.userAgent, t = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
|
|
593
|
-
return t || i;
|
|
594
|
-
}
|
|
595
|
-
class pe {
|
|
596
|
-
static getEnumValue(t, i) {
|
|
597
|
-
if (i in t)
|
|
598
|
-
return t[i];
|
|
599
|
-
throw Error(`${i} not found in ${t}`);
|
|
600
|
-
}
|
|
601
|
-
static getKeyValues(t) {
|
|
602
|
-
return Object.keys(t).filter((i) => !isNaN(Number(i))).map((i) => ({
|
|
603
|
-
key: Number(i),
|
|
604
|
-
value: t[i]
|
|
605
|
-
}));
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
class ge {
|
|
609
|
-
static getFileExtension(t) {
|
|
610
|
-
let i = "";
|
|
611
|
-
const o = t.lastIndexOf(".");
|
|
612
|
-
return o > 0 && o < t.length - 1 && (i = `.${t.substring(o + 1).toLowerCase()}`), i;
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* read content from a file or blob
|
|
616
|
-
*/
|
|
617
|
-
static readAsText(t) {
|
|
618
|
-
const i = new FileReader();
|
|
619
|
-
return new Promise((o, k) => {
|
|
620
|
-
i.onload = () => {
|
|
621
|
-
i.onload = null, i.onerror = null, typeof i.result == "string" ? o(i.result) : k(new Error("Unexpected result type"));
|
|
622
|
-
}, i.onerror = () => {
|
|
623
|
-
const D = i.error ?? new Error("FileReader error");
|
|
624
|
-
i.onload = null, i.onerror = null, k(D);
|
|
625
|
-
}, i.readAsText(t);
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
static readAsArrayBuffer(t) {
|
|
629
|
-
const i = new FileReader();
|
|
630
|
-
return new Promise((o, k) => {
|
|
631
|
-
i.onload = () => {
|
|
632
|
-
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? o(i.result) : k(new Error("Unexpected result type"));
|
|
633
|
-
}, i.onerror = () => {
|
|
634
|
-
const D = i.error ?? new Error("FileReader error");
|
|
635
|
-
i.onload = null, i.onerror = null, k(D);
|
|
636
|
-
}, i.readAsArrayBuffer(t);
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
static readAsDataUrl(t) {
|
|
640
|
-
const i = new FileReader();
|
|
641
|
-
return new Promise((o, k) => {
|
|
642
|
-
i.onload = (D) => {
|
|
643
|
-
o(D);
|
|
644
|
-
}, i.onerror = (D) => k(D), i.readAsDataURL(t);
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
/** usage:
|
|
648
|
-
* const file = new File(['Hello'], 'test.txt');
|
|
649
|
-
* FileHelper.formatFileSize(file.size);
|
|
650
|
-
* */
|
|
651
|
-
static formatFileSize(t, i = 2, o) {
|
|
652
|
-
if (t === 0)
|
|
653
|
-
return "0 Bytes";
|
|
654
|
-
const k = 1024, D = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
655
|
-
let I = Math.floor(Math.log(t) / Math.log(k));
|
|
656
|
-
o && D.includes(o) && (I = D.indexOf(o));
|
|
657
|
-
const P = t / Math.pow(k, I);
|
|
658
|
-
return `${parseFloat(P.toFixed(i))} ${D[I]}`;
|
|
659
|
-
}
|
|
660
|
-
static save(t, i, o) {
|
|
661
|
-
const k = new Blob([t], { type: o });
|
|
662
|
-
qt(k, i);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
class kt {
|
|
666
|
-
static set(t, i) {
|
|
667
|
-
localStorage.setItem(t, JSON.stringify(i));
|
|
668
|
-
}
|
|
669
|
-
static get(t) {
|
|
670
|
-
let i = null;
|
|
671
|
-
const o = localStorage.getItem(t);
|
|
672
|
-
return o && (i = JSON.parse(o)), i;
|
|
673
|
-
}
|
|
674
|
-
static remove(t) {
|
|
675
|
-
let i = !!kt.get(t);
|
|
676
|
-
return i && localStorage.removeItem(t), i;
|
|
677
|
-
}
|
|
678
|
-
static removeAll() {
|
|
679
|
-
localStorage.clear();
|
|
680
|
-
}
|
|
681
|
-
static getKeysBy(t) {
|
|
682
|
-
return Object.keys(localStorage).filter((i) => i.startsWith(t));
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
var yt = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(yt || {});
|
|
686
|
-
class G {
|
|
687
|
-
static listeners = /* @__PURE__ */ new Set();
|
|
688
|
-
static enabled = !0;
|
|
689
|
-
static log(...t) {
|
|
690
|
-
G.doLog(yt.log, t);
|
|
691
|
-
}
|
|
692
|
-
static info(...t) {
|
|
693
|
-
G.doLog(yt.info, t);
|
|
694
|
-
}
|
|
695
|
-
static warn(...t) {
|
|
696
|
-
G.doLog(yt.warn, t);
|
|
697
|
-
}
|
|
698
|
-
static debug(...t) {
|
|
699
|
-
G.doLog(yt.debug, t);
|
|
700
|
-
}
|
|
701
|
-
static error(...t) {
|
|
702
|
-
G.doLog(yt.error, t);
|
|
703
|
-
}
|
|
704
|
-
static clearListeners() {
|
|
705
|
-
G.listeners.clear();
|
|
706
|
-
}
|
|
707
|
-
static setEnabled(t) {
|
|
708
|
-
G.enabled = t;
|
|
709
|
-
}
|
|
710
|
-
static doLog(t, i) {
|
|
711
|
-
if (!G.enabled) return;
|
|
712
|
-
const o = {
|
|
713
|
-
type: t,
|
|
714
|
-
args: i,
|
|
715
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
716
|
-
};
|
|
717
|
-
for (const k of G.listeners)
|
|
718
|
-
try {
|
|
719
|
-
if (k(o) === !1)
|
|
720
|
-
return;
|
|
721
|
-
} catch {
|
|
722
|
-
}
|
|
723
|
-
console[t].apply(console, i);
|
|
724
|
-
}
|
|
725
|
-
static onLog(t, i = !1) {
|
|
726
|
-
if (i) {
|
|
727
|
-
const o = (k) => {
|
|
728
|
-
try {
|
|
729
|
-
return t(k);
|
|
730
|
-
} finally {
|
|
731
|
-
G.listeners.delete(o);
|
|
732
|
-
}
|
|
733
|
-
};
|
|
734
|
-
return G.listeners.add(o), () => G.listeners.delete(o);
|
|
735
|
-
}
|
|
736
|
-
return G.listeners.add(t), () => G.listeners.delete(t);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
const Zt = (s, t, i) => s.localeCompare(t) * (i ? 1 : -1), Gt = (s, t) => s < t ? -1 : s === t ? 0 : 1, Xt = (s, t, i) => Gt(s, t) * (i ? 1 : -1), Ht = (s, t, i) => {
|
|
740
|
-
let o = 0;
|
|
741
|
-
return typeof s == "string" && typeof t == "string" ? o = Zt(s, t, i) : o = Xt(s, t, i), o;
|
|
742
|
-
}, te = (s, t, i, o) => {
|
|
743
|
-
const k = i(s), D = i(t);
|
|
744
|
-
return Ht(k, D, o);
|
|
112
|
+
var { parse: g, unparse: _ } = (/* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
113
|
+
((n, r) => {
|
|
114
|
+
typeof define == "function" && define.amd ? define([], r) : typeof t == "object" && e !== void 0 ? t.exports = r() : n.Papa = r();
|
|
115
|
+
})(e, function e() {
|
|
116
|
+
var t = typeof self < "u" ? self : typeof window < "u" ? window : t === void 0 ? {} : t, n, r = !t.document && !!t.postMessage, i = t.IS_PAPA_WORKER || !1, a = {}, o = 0, s = {};
|
|
117
|
+
function c(e) {
|
|
118
|
+
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = {
|
|
119
|
+
data: [],
|
|
120
|
+
errors: [],
|
|
121
|
+
meta: {}
|
|
122
|
+
}, function(e) {
|
|
123
|
+
var t = y(e);
|
|
124
|
+
t.chunkSize = parseInt(t.chunkSize), e.step || e.chunk || (t.chunkSize = null), this._handle = new p(t), (this._handle.streamer = this)._config = t;
|
|
125
|
+
}.call(this, e), this.parseChunk = function(e, n) {
|
|
126
|
+
var r = parseInt(this._config.skipFirstNLines) || 0;
|
|
127
|
+
if (this.isFirstChunk && 0 < r) {
|
|
128
|
+
let t = this._config.newline;
|
|
129
|
+
t ||= (a = this._config.quoteChar || "\"", this._handle.guessLineEndings(e, a)), e = [...e.split(t).slice(r)].join(t);
|
|
130
|
+
}
|
|
131
|
+
this.isFirstChunk && x(this._config.beforeFirstChunk) && (a = this._config.beforeFirstChunk(e)) !== void 0 && (e = a), this.isFirstChunk = !1, this._halted = !1;
|
|
132
|
+
var r = this._partialLine + e, a = (this._partialLine = "", this._handle.parse(r, this._baseIndex, !this._finished));
|
|
133
|
+
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
134
|
+
if (e = a.meta.cursor, r = (this._finished || (this._partialLine = r.substring(e - this._baseIndex), this._baseIndex = e), a && a.data && (this._rowCount += a.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), i) t.postMessage({
|
|
135
|
+
results: a,
|
|
136
|
+
workerId: s.WORKER_ID,
|
|
137
|
+
finished: r
|
|
138
|
+
});
|
|
139
|
+
else if (x(this._config.chunk) && !n) {
|
|
140
|
+
if (this._config.chunk(a, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
141
|
+
this._completeResults = a = void 0;
|
|
142
|
+
}
|
|
143
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(a.data), this._completeResults.errors = this._completeResults.errors.concat(a.errors), this._completeResults.meta = a.meta), this._completed || !r || !x(this._config.complete) || a && a.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), r || a && a.meta.paused || this._nextChunk(), a;
|
|
144
|
+
}
|
|
145
|
+
this._halted = !0;
|
|
146
|
+
}, this._sendError = function(e) {
|
|
147
|
+
x(this._config.error) ? this._config.error(e) : i && this._config.error && t.postMessage({
|
|
148
|
+
workerId: s.WORKER_ID,
|
|
149
|
+
error: e,
|
|
150
|
+
finished: !1
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function l(e) {
|
|
155
|
+
var t;
|
|
156
|
+
(e ||= {}).chunkSize || (e.chunkSize = s.RemoteChunkSize), c.call(this, e), this._nextChunk = r ? function() {
|
|
157
|
+
this._readChunk(), this._chunkLoaded();
|
|
158
|
+
} : function() {
|
|
159
|
+
this._readChunk();
|
|
160
|
+
}, this.stream = function(e) {
|
|
161
|
+
this._input = e, this._nextChunk();
|
|
162
|
+
}, this._readChunk = function() {
|
|
163
|
+
if (this._finished) this._chunkLoaded();
|
|
164
|
+
else {
|
|
165
|
+
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), r || (t.onload = b(this._chunkLoaded, this), t.onerror = b(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !r), this._config.downloadRequestHeaders) {
|
|
166
|
+
var e, n = this._config.downloadRequestHeaders;
|
|
167
|
+
for (e in n) t.setRequestHeader(e, n[e]);
|
|
168
|
+
}
|
|
169
|
+
var i;
|
|
170
|
+
this._config.chunkSize && (i = this._start + this._config.chunkSize - 1, t.setRequestHeader("Range", "bytes=" + this._start + "-" + i));
|
|
171
|
+
try {
|
|
172
|
+
t.send(this._config.downloadRequestBody);
|
|
173
|
+
} catch (e) {
|
|
174
|
+
this._chunkError(e.message);
|
|
175
|
+
}
|
|
176
|
+
r && t.status === 0 && this._chunkError();
|
|
177
|
+
}
|
|
178
|
+
}, this._chunkLoaded = function() {
|
|
179
|
+
t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((e) => (e = e.getResponseHeader("Content-Range")) === null ? -1 : parseInt(e.substring(e.lastIndexOf("/") + 1)))(t), this.parseChunk(t.responseText)));
|
|
180
|
+
}, this._chunkError = function(e) {
|
|
181
|
+
e = t.statusText || e, this._sendError(Error(e));
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function u(e) {
|
|
185
|
+
(e ||= {}).chunkSize || (e.chunkSize = s.LocalChunkSize), c.call(this, e);
|
|
186
|
+
var t, n, r = typeof FileReader < "u";
|
|
187
|
+
this.stream = function(e) {
|
|
188
|
+
this._input = e, n = e.slice || e.webkitSlice || e.mozSlice, r ? ((t = new FileReader()).onload = b(this._chunkLoaded, this), t.onerror = b(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
|
|
189
|
+
}, this._nextChunk = function() {
|
|
190
|
+
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
191
|
+
}, this._readChunk = function() {
|
|
192
|
+
var e = this._input, i = (this._config.chunkSize && (i = Math.min(this._start + this._config.chunkSize, this._input.size), e = n.call(e, this._start, i)), t.readAsText(e, this._config.encoding));
|
|
193
|
+
r || this._chunkLoaded({ target: { result: i } });
|
|
194
|
+
}, this._chunkLoaded = function(e) {
|
|
195
|
+
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(e.target.result);
|
|
196
|
+
}, this._chunkError = function() {
|
|
197
|
+
this._sendError(t.error);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function d(e) {
|
|
201
|
+
var t;
|
|
202
|
+
c.call(this, e ||= {}), this.stream = function(e) {
|
|
203
|
+
return t = e, this._nextChunk();
|
|
204
|
+
}, this._nextChunk = function() {
|
|
205
|
+
var e, n;
|
|
206
|
+
if (!this._finished) return e = this._config.chunkSize, t = e ? (n = t.substring(0, e), t.substring(e)) : (n = t, ""), this._finished = !t, this.parseChunk(n);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function f(e) {
|
|
210
|
+
c.call(this, e ||= {});
|
|
211
|
+
var t = [], n = !0, r = !1;
|
|
212
|
+
this.pause = function() {
|
|
213
|
+
c.prototype.pause.apply(this, arguments), this._input.pause();
|
|
214
|
+
}, this.resume = function() {
|
|
215
|
+
c.prototype.resume.apply(this, arguments), this._input.resume();
|
|
216
|
+
}, this.stream = function(e) {
|
|
217
|
+
this._input = e, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
218
|
+
}, this._checkIsFinished = function() {
|
|
219
|
+
r && t.length === 1 && (this._finished = !0);
|
|
220
|
+
}, this._nextChunk = function() {
|
|
221
|
+
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : n = !0;
|
|
222
|
+
}, this._streamData = b(function(e) {
|
|
223
|
+
try {
|
|
224
|
+
t.push(typeof e == "string" ? e : e.toString(this._config.encoding)), n && (n = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
|
|
225
|
+
} catch (e) {
|
|
226
|
+
this._streamError(e);
|
|
227
|
+
}
|
|
228
|
+
}, this), this._streamError = b(function(e) {
|
|
229
|
+
this._streamCleanUp(), this._sendError(e);
|
|
230
|
+
}, this), this._streamEnd = b(function() {
|
|
231
|
+
this._streamCleanUp(), r = !0, this._streamData("");
|
|
232
|
+
}, this), this._streamCleanUp = b(function() {
|
|
233
|
+
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
234
|
+
}, this);
|
|
235
|
+
}
|
|
236
|
+
function p(e) {
|
|
237
|
+
var t, n, r, i, a = 2 ** 53, o = -a, c = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, u = this, d = 0, f = 0, p = !1, g = !1, _ = [], v = {
|
|
238
|
+
data: [],
|
|
239
|
+
errors: [],
|
|
240
|
+
meta: {}
|
|
241
|
+
};
|
|
242
|
+
function b(t) {
|
|
243
|
+
return e.skipEmptyLines === "greedy" ? t.join("").trim() === "" : t.length === 1 && t[0].length === 0;
|
|
244
|
+
}
|
|
245
|
+
function S() {
|
|
246
|
+
if (v && r && (w("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + s.DefaultDelimiter + "'"), r = !1), e.skipEmptyLines && (v.data = v.data.filter(function(e) {
|
|
247
|
+
return !b(e);
|
|
248
|
+
})), C()) {
|
|
249
|
+
if (v) if (Array.isArray(v.data[0])) {
|
|
250
|
+
for (var t = 0; C() && t < v.data.length; t++) v.data[t].forEach(n);
|
|
251
|
+
v.data.splice(0, 1);
|
|
252
|
+
} else v.data.forEach(n);
|
|
253
|
+
function n(t, n) {
|
|
254
|
+
x(e.transformHeader) && (t = e.transformHeader(t, n)), _.push(t);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function n(t, n) {
|
|
258
|
+
for (var r = e.header ? {} : [], i = 0; i < t.length; i++) {
|
|
259
|
+
var s = i, u = t[i], u = ((t, n) => ((t) => (e.dynamicTypingFunction && e.dynamicTyping[t] === void 0 && (e.dynamicTyping[t] = e.dynamicTypingFunction(t)), !0 === (e.dynamicTyping[t] || e.dynamicTyping)))(t) ? n === "true" || n === "TRUE" || n !== "false" && n !== "FALSE" && (((e) => {
|
|
260
|
+
if (c.test(e) && (e = parseFloat(e), o < e && e < a)) return 1;
|
|
261
|
+
})(n) ? parseFloat(n) : l.test(n) ? new Date(n) : n === "" ? null : n) : n)(s = e.header ? i >= _.length ? "__parsed_extra" : _[i] : s, u = e.transform ? e.transform(u, s) : u);
|
|
262
|
+
s === "__parsed_extra" ? (r[s] = r[s] || [], r[s].push(u)) : r[s] = u;
|
|
263
|
+
}
|
|
264
|
+
return e.header && (i > _.length ? w("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + i, f + n) : i < _.length && w("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + i, f + n)), r;
|
|
265
|
+
}
|
|
266
|
+
var i;
|
|
267
|
+
v && (e.header || e.dynamicTyping || e.transform) && (i = 1, !v.data.length || Array.isArray(v.data[0]) ? (v.data = v.data.map(n), i = v.data.length) : v.data = n(v.data, 0), e.header && v.meta && (v.meta.fields = _), f += i);
|
|
268
|
+
}
|
|
269
|
+
function C() {
|
|
270
|
+
return e.header && _.length === 0;
|
|
271
|
+
}
|
|
272
|
+
function w(e, t, n, r) {
|
|
273
|
+
e = {
|
|
274
|
+
type: e,
|
|
275
|
+
code: t,
|
|
276
|
+
message: n
|
|
277
|
+
}, r !== void 0 && (e.row = r), v.errors.push(e);
|
|
278
|
+
}
|
|
279
|
+
x(e.step) && (i = e.step, e.step = function(t) {
|
|
280
|
+
v = t, C() ? S() : (S(), v.data.length !== 0 && (d += t.data.length, e.preview && d > e.preview ? n.abort() : (v.data = v.data[0], i(v, u))));
|
|
281
|
+
}), this.parse = function(i, a, o) {
|
|
282
|
+
var c = e.quoteChar || "\"", c = (e.newline ||= this.guessLineEndings(i, c), r = !1, e.delimiter ? x(e.delimiter) && (e.delimiter = e.delimiter(i), v.meta.delimiter = e.delimiter) : ((c = ((t, n, r, i, a) => {
|
|
283
|
+
var o, c, l, u;
|
|
284
|
+
a ||= [
|
|
285
|
+
",",
|
|
286
|
+
" ",
|
|
287
|
+
"|",
|
|
288
|
+
";",
|
|
289
|
+
s.RECORD_SEP,
|
|
290
|
+
s.UNIT_SEP
|
|
291
|
+
];
|
|
292
|
+
for (var d = 0; d < a.length; d++) {
|
|
293
|
+
for (var f, p = a[d], m = 0, g = 0, _ = 0, v = (l = void 0, new h({
|
|
294
|
+
comments: i,
|
|
295
|
+
delimiter: p,
|
|
296
|
+
newline: n,
|
|
297
|
+
preview: 10
|
|
298
|
+
}).parse(t)), y = 0; y < v.data.length; y++) r && b(v.data[y]) ? _++ : (f = v.data[y].length, g += f, l === void 0 ? l = f : 0 < f && (m += Math.abs(f - l), l = f));
|
|
299
|
+
0 < v.data.length && (g /= v.data.length - _), (c === void 0 || m <= c) && (u === void 0 || u < g) && 1.99 < g && (c = m, o = p, u = g);
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
successful: !!(e.delimiter = o),
|
|
303
|
+
bestDelimiter: o
|
|
304
|
+
};
|
|
305
|
+
})(i, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = c.bestDelimiter : (r = !0, e.delimiter = s.DefaultDelimiter), v.meta.delimiter = e.delimiter), y(e));
|
|
306
|
+
return e.preview && e.header && c.preview++, t = i, n = new h(c), v = n.parse(t, a, o), S(), p ? { meta: { paused: !0 } } : v || { meta: { paused: !1 } };
|
|
307
|
+
}, this.paused = function() {
|
|
308
|
+
return p;
|
|
309
|
+
}, this.pause = function() {
|
|
310
|
+
p = !0, n.abort(), t = x(e.chunk) ? "" : t.substring(n.getCharIndex());
|
|
311
|
+
}, this.resume = function() {
|
|
312
|
+
u.streamer._halted ? (p = !1, u.streamer.parseChunk(t, !0)) : setTimeout(u.resume, 3);
|
|
313
|
+
}, this.aborted = function() {
|
|
314
|
+
return g;
|
|
315
|
+
}, this.abort = function() {
|
|
316
|
+
g = !0, n.abort(), v.meta.aborted = !0, x(e.complete) && e.complete(v), t = "";
|
|
317
|
+
}, this.guessLineEndings = function(e, t) {
|
|
318
|
+
e = e.substring(0, 1048576);
|
|
319
|
+
var t = RegExp(m(t) + "([^]*?)" + m(t), "gm"), n = (e = e.replace(t, "")).split("\r"), t = e.split("\n"), e = 1 < t.length && t[0].length < n[0].length;
|
|
320
|
+
if (n.length === 1 || e) return "\n";
|
|
321
|
+
for (var r = 0, i = 0; i < n.length; i++) n[i][0] === "\n" && r++;
|
|
322
|
+
return r >= n.length / 2 ? "\r\n" : "\r";
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
function m(e) {
|
|
326
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
327
|
+
}
|
|
328
|
+
function h(e) {
|
|
329
|
+
var t = (e ||= {}).delimiter, n = e.newline, r = e.comments, i = e.step, a = e.preview, o = e.fastMode, c = null, l = !1, u = e.quoteChar == null ? "\"" : e.quoteChar, d = u;
|
|
330
|
+
if (e.escapeChar !== void 0 && (d = e.escapeChar), (typeof t != "string" || -1 < s.BAD_DELIMITERS.indexOf(t)) && (t = ","), r === t) throw Error("Comment character same as delimiter");
|
|
331
|
+
!0 === r ? r = "#" : (typeof r != "string" || -1 < s.BAD_DELIMITERS.indexOf(r)) && (r = !1), n !== "\n" && n !== "\r" && n !== "\r\n" && (n = "\n");
|
|
332
|
+
var f = 0, p = !1;
|
|
333
|
+
this.parse = function(s, h, g) {
|
|
334
|
+
if (typeof s != "string") throw Error("Input must be a string");
|
|
335
|
+
var _ = s.length, v = t.length, y = n.length, b = r.length, S = x(i), C = [], w = [], T = [], E = f = 0;
|
|
336
|
+
if (!s) return R();
|
|
337
|
+
if (o || !1 !== o && s.indexOf(u) === -1) {
|
|
338
|
+
for (var D = s.split(n), O = 0; O < D.length; O++) {
|
|
339
|
+
if (T = D[O], f += T.length, O !== D.length - 1) f += n.length;
|
|
340
|
+
else if (g) return R();
|
|
341
|
+
if (!r || T.substring(0, b) !== r) {
|
|
342
|
+
if (S) {
|
|
343
|
+
if (C = [], P(T.split(t)), z(), p) return R();
|
|
344
|
+
} else P(T.split(t));
|
|
345
|
+
if (a && a <= O) return C = C.slice(0, a), R(!0);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return R();
|
|
349
|
+
}
|
|
350
|
+
for (var k = s.indexOf(t, f), A = s.indexOf(n, f), j = new RegExp(m(d) + m(u), "g"), M = s.indexOf(u, f);;) if (s[f] === u) for (M = f, f++;;) {
|
|
351
|
+
if ((M = s.indexOf(u, M + 1)) === -1) return g || w.push({
|
|
352
|
+
type: "Quotes",
|
|
353
|
+
code: "MissingQuotes",
|
|
354
|
+
message: "Quoted field unterminated",
|
|
355
|
+
row: C.length,
|
|
356
|
+
index: f
|
|
357
|
+
}), I();
|
|
358
|
+
if (M === _ - 1) return I(s.substring(f, M).replace(j, u));
|
|
359
|
+
if (u === d && s[M + 1] === d) M++;
|
|
360
|
+
else if (u === d || M === 0 || s[M - 1] !== d) {
|
|
361
|
+
k !== -1 && k < M + 1 && (k = s.indexOf(t, M + 1));
|
|
362
|
+
var N = F((A = A !== -1 && A < M + 1 ? s.indexOf(n, M + 1) : A) === -1 ? k : Math.min(k, A));
|
|
363
|
+
if (s.substr(M + 1 + N, v) === t) {
|
|
364
|
+
T.push(s.substring(f, M).replace(j, u)), s[f = M + 1 + N + v] !== u && (M = s.indexOf(u, f)), k = s.indexOf(t, f), A = s.indexOf(n, f);
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
if (N = F(A), s.substring(M + 1 + N, M + 1 + N + y) === n) {
|
|
368
|
+
if (T.push(s.substring(f, M).replace(j, u)), L(M + 1 + N + y), k = s.indexOf(t, f), M = s.indexOf(u, f), S && (z(), p)) return R();
|
|
369
|
+
if (a && C.length >= a) return R(!0);
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
w.push({
|
|
373
|
+
type: "Quotes",
|
|
374
|
+
code: "InvalidQuotes",
|
|
375
|
+
message: "Trailing quote on quoted field is malformed",
|
|
376
|
+
row: C.length,
|
|
377
|
+
index: f
|
|
378
|
+
}), M++;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
else if (r && T.length === 0 && s.substring(f, f + b) === r) {
|
|
382
|
+
if (A === -1) return R();
|
|
383
|
+
f = A + y, A = s.indexOf(n, f), k = s.indexOf(t, f);
|
|
384
|
+
} else if (k !== -1 && (k < A || A === -1)) T.push(s.substring(f, k)), f = k + v, k = s.indexOf(t, f);
|
|
385
|
+
else {
|
|
386
|
+
if (A === -1) break;
|
|
387
|
+
if (T.push(s.substring(f, A)), L(A + y), S && (z(), p)) return R();
|
|
388
|
+
if (a && C.length >= a) return R(!0);
|
|
389
|
+
}
|
|
390
|
+
return I();
|
|
391
|
+
function P(e) {
|
|
392
|
+
C.push(e), E = f;
|
|
393
|
+
}
|
|
394
|
+
function F(e) {
|
|
395
|
+
var t = 0;
|
|
396
|
+
return t = e !== -1 && (e = s.substring(M + 1, e)) && e.trim() === "" ? e.length : t;
|
|
397
|
+
}
|
|
398
|
+
function I(e) {
|
|
399
|
+
return g || (e === void 0 && (e = s.substring(f)), T.push(e), f = _, P(T), S && z()), R();
|
|
400
|
+
}
|
|
401
|
+
function L(e) {
|
|
402
|
+
f = e, P(T), T = [], A = s.indexOf(n, f);
|
|
403
|
+
}
|
|
404
|
+
function R(r) {
|
|
405
|
+
if (e.header && !h && C.length && !l) {
|
|
406
|
+
var i = C[0], a = Object.create(null), o = new Set(i);
|
|
407
|
+
let t = !1;
|
|
408
|
+
for (let n = 0; n < i.length; n++) {
|
|
409
|
+
let r = i[n];
|
|
410
|
+
if (a[r = x(e.transformHeader) ? e.transformHeader(r, n) : r]) {
|
|
411
|
+
let e, s = a[r];
|
|
412
|
+
for (; e = r + "_" + s, s++, o.has(e););
|
|
413
|
+
o.add(e), i[n] = e, a[r]++, t = !0, (c = c === null ? {} : c)[e] = r;
|
|
414
|
+
} else a[r] = 1, i[n] = r;
|
|
415
|
+
o.add(r);
|
|
416
|
+
}
|
|
417
|
+
t && console.warn("Duplicate headers found and renamed."), l = !0;
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
data: C,
|
|
421
|
+
errors: w,
|
|
422
|
+
meta: {
|
|
423
|
+
delimiter: t,
|
|
424
|
+
linebreak: n,
|
|
425
|
+
aborted: p,
|
|
426
|
+
truncated: !!r,
|
|
427
|
+
cursor: E + (h || 0),
|
|
428
|
+
renamedHeaders: c
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
function z() {
|
|
433
|
+
i(R()), C = [], w = [];
|
|
434
|
+
}
|
|
435
|
+
}, this.abort = function() {
|
|
436
|
+
p = !0;
|
|
437
|
+
}, this.getCharIndex = function() {
|
|
438
|
+
return f;
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function g(e) {
|
|
442
|
+
var t = e.data, n = a[t.workerId], r = !1;
|
|
443
|
+
if (t.error) n.userError(t.error, t.file);
|
|
444
|
+
else if (t.results && t.results.data) {
|
|
445
|
+
var i = {
|
|
446
|
+
abort: function() {
|
|
447
|
+
r = !0, _(t.workerId, {
|
|
448
|
+
data: [],
|
|
449
|
+
errors: [],
|
|
450
|
+
meta: { aborted: !0 }
|
|
451
|
+
});
|
|
452
|
+
},
|
|
453
|
+
pause: v,
|
|
454
|
+
resume: v
|
|
455
|
+
};
|
|
456
|
+
if (x(n.userStep)) {
|
|
457
|
+
for (var o = 0; o < t.results.data.length && (n.userStep({
|
|
458
|
+
data: t.results.data[o],
|
|
459
|
+
errors: t.results.errors,
|
|
460
|
+
meta: t.results.meta
|
|
461
|
+
}, i), !r); o++);
|
|
462
|
+
delete t.results;
|
|
463
|
+
} else x(n.userChunk) && (n.userChunk(t.results, i, t.file), delete t.results);
|
|
464
|
+
}
|
|
465
|
+
t.finished && !r && _(t.workerId, t.results);
|
|
466
|
+
}
|
|
467
|
+
function _(e, t) {
|
|
468
|
+
var n = a[e];
|
|
469
|
+
x(n.userComplete) && n.userComplete(t), n.terminate(), delete a[e];
|
|
470
|
+
}
|
|
471
|
+
function v() {
|
|
472
|
+
throw Error("Not implemented.");
|
|
473
|
+
}
|
|
474
|
+
function y(e) {
|
|
475
|
+
if (typeof e != "object" || !e) return e;
|
|
476
|
+
var t, n = Array.isArray(e) ? [] : {};
|
|
477
|
+
for (t in e) n[t] = y(e[t]);
|
|
478
|
+
return n;
|
|
479
|
+
}
|
|
480
|
+
function b(e, t) {
|
|
481
|
+
return function() {
|
|
482
|
+
e.apply(t, arguments);
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function x(e) {
|
|
486
|
+
return typeof e == "function";
|
|
487
|
+
}
|
|
488
|
+
return s.parse = function(n, r) {
|
|
489
|
+
var i = (r ||= {}).dynamicTyping || !1;
|
|
490
|
+
if (x(i) && (r.dynamicTypingFunction = i, i = {}), r.dynamicTyping = i, r.transform = !!x(r.transform) && r.transform, !r.worker || !s.WORKERS_SUPPORTED) return i = null, s.NODE_STREAM_INPUT, typeof n == "string" ? (n = ((e) => e.charCodeAt(0) === 65279 ? e.slice(1) : e)(n), i = new (r.download ? l : d)(r)) : !0 === n.readable && x(n.read) && x(n.on) ? i = new f(r) : (t.File && n instanceof File || n instanceof Object) && (i = new u(r)), i.stream(n);
|
|
491
|
+
(i = (() => {
|
|
492
|
+
var n;
|
|
493
|
+
return !!s.WORKERS_SUPPORTED && (n = (() => {
|
|
494
|
+
var n = t.URL || t.webkitURL || null, r = e.toString();
|
|
495
|
+
return s.BLOB_URL ||= n.createObjectURL(new Blob([
|
|
496
|
+
"var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ",
|
|
497
|
+
"(",
|
|
498
|
+
r,
|
|
499
|
+
")();"
|
|
500
|
+
], { type: "text/javascript" }));
|
|
501
|
+
})(), (n = new t.Worker(n)).onmessage = g, n.id = o++, a[n.id] = n);
|
|
502
|
+
})()).userStep = r.step, i.userChunk = r.chunk, i.userComplete = r.complete, i.userError = r.error, r.step = x(r.step), r.chunk = x(r.chunk), r.complete = x(r.complete), r.error = x(r.error), delete r.worker, i.postMessage({
|
|
503
|
+
input: n,
|
|
504
|
+
config: r,
|
|
505
|
+
workerId: i.id
|
|
506
|
+
});
|
|
507
|
+
}, s.unparse = function(e, t) {
|
|
508
|
+
var n = !1, r = !0, i = ",", a = "\r\n", o = "\"", c = o + o, l = !1, u = null, d = !1, f = ((() => {
|
|
509
|
+
if (typeof t == "object") {
|
|
510
|
+
if (typeof t.delimiter != "string" || s.BAD_DELIMITERS.filter(function(e) {
|
|
511
|
+
return t.delimiter.indexOf(e) !== -1;
|
|
512
|
+
}).length || (i = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (l = t.skipEmptyLines), typeof t.newline == "string" && (a = t.newline), typeof t.quoteChar == "string" && (o = t.quoteChar), typeof t.header == "boolean" && (r = t.header), Array.isArray(t.columns)) {
|
|
513
|
+
if (t.columns.length === 0) throw Error("Option columns is empty");
|
|
514
|
+
u = t.columns;
|
|
515
|
+
}
|
|
516
|
+
t.escapeChar !== void 0 && (c = t.escapeChar + o), t.escapeFormulae instanceof RegExp ? d = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (d = /^[=+\-@\t\r].*$/);
|
|
517
|
+
}
|
|
518
|
+
})(), new RegExp(m(o), "g"));
|
|
519
|
+
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
520
|
+
if (!e.length || Array.isArray(e[0])) return p(null, e, l);
|
|
521
|
+
if (typeof e[0] == "object") return p(u || Object.keys(e[0]), e, l);
|
|
522
|
+
} else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields ||= e.meta && e.meta.fields || u, e.fields ||= Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : [], Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), p(e.fields || [], e.data || [], l);
|
|
523
|
+
throw Error("Unable to serialize unrecognized input");
|
|
524
|
+
function p(e, t, n) {
|
|
525
|
+
var o = "", s = (typeof e == "string" && (e = JSON.parse(e)), typeof t == "string" && (t = JSON.parse(t)), Array.isArray(e) && 0 < e.length), c = !Array.isArray(t[0]);
|
|
526
|
+
if (s && r) {
|
|
527
|
+
for (var l = 0; l < e.length; l++) 0 < l && (o += i), o += h(e[l], l);
|
|
528
|
+
0 < t.length && (o += a);
|
|
529
|
+
}
|
|
530
|
+
for (var u = 0; u < t.length; u++) {
|
|
531
|
+
var d = (s ? e : t[u]).length, f = !1, p = s ? Object.keys(t[u]).length === 0 : t[u].length === 0;
|
|
532
|
+
if (n && !s && (f = n === "greedy" ? t[u].join("").trim() === "" : t[u].length === 1 && t[u][0].length === 0), n === "greedy" && s) {
|
|
533
|
+
for (var m = [], g = 0; g < d; g++) {
|
|
534
|
+
var _ = c ? e[g] : g;
|
|
535
|
+
m.push(t[u][_]);
|
|
536
|
+
}
|
|
537
|
+
f = m.join("").trim() === "";
|
|
538
|
+
}
|
|
539
|
+
if (!f) {
|
|
540
|
+
for (var v = 0; v < d; v++) {
|
|
541
|
+
0 < v && !p && (o += i);
|
|
542
|
+
var y = s && c ? e[v] : v;
|
|
543
|
+
o += h(t[u][y], v);
|
|
544
|
+
}
|
|
545
|
+
u < t.length - 1 && (!n || 0 < d && !p) && (o += a);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return o;
|
|
549
|
+
}
|
|
550
|
+
function h(e, t) {
|
|
551
|
+
var r, a;
|
|
552
|
+
return e == null ? "" : e.constructor === Date ? JSON.stringify(e).slice(1, 25) : (a = !1, d && typeof e == "string" && d.test(e) && (e = "'" + e, a = !0), r = e.toString().replace(f, c), (a = a || !0 === n || typeof n == "function" && n(e, t) || Array.isArray(n) && n[t] || ((e, t) => {
|
|
553
|
+
for (var n = 0; n < t.length; n++) if (-1 < e.indexOf(t[n])) return !0;
|
|
554
|
+
return !1;
|
|
555
|
+
})(r, s.BAD_DELIMITERS) || -1 < r.indexOf(i) || r.charAt(0) === " " || r.charAt(r.length - 1) === " ") ? o + r + o : r);
|
|
556
|
+
}
|
|
557
|
+
}, s.RECORD_SEP = "", s.UNIT_SEP = "", s.BYTE_ORDER_MARK = "", s.BAD_DELIMITERS = [
|
|
558
|
+
"\r",
|
|
559
|
+
"\n",
|
|
560
|
+
"\"",
|
|
561
|
+
s.BYTE_ORDER_MARK
|
|
562
|
+
], s.WORKERS_SUPPORTED = !r && !!t.Worker, s.NODE_STREAM_INPUT = 1, s.LocalChunkSize = 10485760, s.RemoteChunkSize = 5242880, s.DefaultDelimiter = ",", s.Parser = h, s.ParserHandle = p, s.NetworkStreamer = l, s.FileStreamer = u, s.StringStreamer = d, s.ReadableStreamStreamer = f, t.jQuery && ((n = t.jQuery).fn.parse = function(e) {
|
|
563
|
+
var r = e.config || {}, i = [];
|
|
564
|
+
return this.each(function(e) {
|
|
565
|
+
if (!(n(this).prop("tagName").toUpperCase() === "INPUT" && n(this).attr("type").toLowerCase() === "file" && t.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
566
|
+
for (var a = 0; a < this.files.length; a++) i.push({
|
|
567
|
+
file: this.files[a],
|
|
568
|
+
inputElem: this,
|
|
569
|
+
instanceConfig: n.extend({}, r)
|
|
570
|
+
});
|
|
571
|
+
}), a(), this;
|
|
572
|
+
function a() {
|
|
573
|
+
if (i.length === 0) x(e.complete) && e.complete();
|
|
574
|
+
else {
|
|
575
|
+
var t, r, a, c, l = i[0];
|
|
576
|
+
if (x(e.before)) {
|
|
577
|
+
var u = e.before(l.file, l.inputElem);
|
|
578
|
+
if (typeof u == "object") {
|
|
579
|
+
if (u.action === "abort") return t = "AbortError", r = l.file, a = l.inputElem, c = u.reason, void (x(e.error) && e.error({ name: t }, r, a, c));
|
|
580
|
+
if (u.action === "skip") return void o();
|
|
581
|
+
typeof u.config == "object" && (l.instanceConfig = n.extend(l.instanceConfig, u.config));
|
|
582
|
+
} else if (u === "skip") return void o();
|
|
583
|
+
}
|
|
584
|
+
var d = l.instanceConfig.complete;
|
|
585
|
+
l.instanceConfig.complete = function(e) {
|
|
586
|
+
x(d) && d(e, l.file, l.inputElem), o();
|
|
587
|
+
}, s.parse(l.file, l.instanceConfig);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function o() {
|
|
591
|
+
i.splice(0, 1), a();
|
|
592
|
+
}
|
|
593
|
+
}), i && (t.onmessage = function(e) {
|
|
594
|
+
e = e.data, s.WORKER_ID === void 0 && e && (s.WORKER_ID = e.workerId), typeof e.input == "string" ? t.postMessage({
|
|
595
|
+
workerId: s.WORKER_ID,
|
|
596
|
+
results: s.parse(e.input, e.config),
|
|
597
|
+
finished: !0
|
|
598
|
+
}) : (t.File && e.input instanceof File || e.input instanceof Object) && (e = s.parse(e.input, e.config)) && t.postMessage({
|
|
599
|
+
workerId: s.WORKER_ID,
|
|
600
|
+
results: e,
|
|
601
|
+
finished: !0
|
|
602
|
+
});
|
|
603
|
+
}), (l.prototype = Object.create(c.prototype)).constructor = l, (u.prototype = Object.create(c.prototype)).constructor = u, (d.prototype = Object.create(d.prototype)).constructor = d, (f.prototype = Object.create(c.prototype)).constructor = f, s;
|
|
604
|
+
});
|
|
605
|
+
})))())).default, v = class {
|
|
606
|
+
static unparse(e, t) {
|
|
607
|
+
return _(e, t);
|
|
608
|
+
}
|
|
609
|
+
static parse(e) {
|
|
610
|
+
return new Promise((t, n) => {
|
|
611
|
+
g(e, {
|
|
612
|
+
header: !0,
|
|
613
|
+
complete: (e) => t(e),
|
|
614
|
+
error: (e) => n(e)
|
|
615
|
+
});
|
|
616
|
+
});
|
|
617
|
+
}
|
|
745
618
|
};
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region lib/helpers/download.helper.ts
|
|
621
|
+
async function y(e, t, n) {
|
|
622
|
+
let r = n?.mimeType ?? x(t), i = b(e, r);
|
|
623
|
+
if ("showSaveFilePicker" in window && n?.showSaveFilePicker) try {
|
|
624
|
+
let e = await (await window.showSaveFilePicker({
|
|
625
|
+
suggestedName: t,
|
|
626
|
+
types: [{
|
|
627
|
+
description: "Datei",
|
|
628
|
+
accept: { [r]: [`.${S(t)}`] }
|
|
629
|
+
}]
|
|
630
|
+
})).createWritable();
|
|
631
|
+
await e.write(i), await e.close();
|
|
632
|
+
return;
|
|
633
|
+
} catch {}
|
|
634
|
+
let a = URL.createObjectURL(i), o = document.createElement("a");
|
|
635
|
+
o.href = a, o.download = t, o.rel = "noopener", o.style.display = "none", document.body.appendChild(o), C(o), window.setTimeout(() => {
|
|
636
|
+
document.body.removeChild(o), URL.revokeObjectURL(a);
|
|
637
|
+
}, 0), w() && window.open(a, "_blank", "noopener,noreferrer");
|
|
756
638
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
static handleResize = () => {
|
|
766
|
-
N.resizeTimeout !== null && (window.clearTimeout(N.resizeTimeout), N.resizeTimeout = null), N.resizeTimeout = window.setTimeout(() => {
|
|
767
|
-
const t = window.innerWidth;
|
|
768
|
-
if (t !== N.lastWidth) {
|
|
769
|
-
N.lastWidth = t;
|
|
770
|
-
for (const i of N.listeners)
|
|
771
|
-
i(t);
|
|
772
|
-
}
|
|
773
|
-
}, 150);
|
|
774
|
-
};
|
|
775
|
-
static init() {
|
|
776
|
-
N.initialized || (window.addEventListener("resize", N.handleResize, { passive: !0 }), N.initialized = !0);
|
|
777
|
-
}
|
|
778
|
-
static off(t) {
|
|
779
|
-
N.initialized && (N.listeners.delete(t), N.listeners.size === 0 && (window.removeEventListener("resize", N.handleResize), N.initialized = !1));
|
|
780
|
-
}
|
|
639
|
+
function b(e, t) {
|
|
640
|
+
if (e instanceof Blob) return e.type ? e : new Blob([e], { type: t });
|
|
641
|
+
if (e instanceof ArrayBuffer || e instanceof Uint8Array) {
|
|
642
|
+
let n = e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
643
|
+
return new Blob([n], { type: t });
|
|
644
|
+
}
|
|
645
|
+
return new Blob([e], { type: t || "text/plain;charset=utf-8" });
|
|
781
646
|
}
|
|
782
|
-
function
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
return this?.sort((i, o) => te(i, o, s, t)), this;
|
|
796
|
-
}, Array.prototype.removeBy = function(s, t) {
|
|
797
|
-
return this.filter((i) => s(i) !== t);
|
|
798
|
-
};
|
|
647
|
+
function x(e) {
|
|
648
|
+
switch (S(e).toLowerCase()) {
|
|
649
|
+
case "txt": return "text/plain;charset=utf-8";
|
|
650
|
+
case "csv": return "text/csv;charset=utf-8";
|
|
651
|
+
case "json": return "application/json;charset=utf-8";
|
|
652
|
+
case "pdf": return "application/pdf";
|
|
653
|
+
case "png": return "image/png";
|
|
654
|
+
case "jpg":
|
|
655
|
+
case "jpeg": return "image/jpeg";
|
|
656
|
+
case "svg": return "image/svg+xml";
|
|
657
|
+
case "zip": return "application/zip";
|
|
658
|
+
default: return "application/octet-stream";
|
|
659
|
+
}
|
|
799
660
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
(function(i, o) {
|
|
804
|
-
s.exports = o();
|
|
805
|
-
})(ee, (function() {
|
|
806
|
-
var i = 1e3, o = 6e4, k = 36e5, D = "millisecond", I = "second", P = "minute", q = "hour", p = "day", U = "week", F = "month", J = "quarter", B = "year", Z = "date", tt = "Invalid Date", ot = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, lt = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, vt = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(y) {
|
|
807
|
-
var h = ["th", "st", "nd", "rd"], d = y % 100;
|
|
808
|
-
return "[" + y + (h[(d - 20) % 10] || h[d] || h[0]) + "]";
|
|
809
|
-
} }, dt = function(y, h, d) {
|
|
810
|
-
var a = String(y);
|
|
811
|
-
return !a || a.length >= h ? y : "" + Array(h + 1 - a.length).join(d) + y;
|
|
812
|
-
}, bt = { s: dt, z: function(y) {
|
|
813
|
-
var h = -y.utcOffset(), d = Math.abs(h), a = Math.floor(d / 60), c = d % 60;
|
|
814
|
-
return (h <= 0 ? "+" : "-") + dt(a, 2, "0") + ":" + dt(c, 2, "0");
|
|
815
|
-
}, m: function y(h, d) {
|
|
816
|
-
if (h.date() < d.date()) return -y(d, h);
|
|
817
|
-
var a = 12 * (d.year() - h.year()) + (d.month() - h.month()), c = h.clone().add(a, F), f = d - c < 0, v = h.clone().add(a + (f ? -1 : 1), F);
|
|
818
|
-
return +(-(a + (d - c) / (f ? c - v : v - c)) || 0);
|
|
819
|
-
}, a: function(y) {
|
|
820
|
-
return y < 0 ? Math.ceil(y) || 0 : Math.floor(y);
|
|
821
|
-
}, p: function(y) {
|
|
822
|
-
return { M: F, y: B, w: U, d: p, D: Z, h: q, m: P, s: I, ms: D, Q: J }[y] || String(y || "").toLowerCase().replace(/s$/, "");
|
|
823
|
-
}, u: function(y) {
|
|
824
|
-
return y === void 0;
|
|
825
|
-
} }, ut = "en", Q = {};
|
|
826
|
-
Q[ut] = vt;
|
|
827
|
-
var R = "$isDayjsObject", e = function(y) {
|
|
828
|
-
return y instanceof m || !(!y || !y[R]);
|
|
829
|
-
}, r = function y(h, d, a) {
|
|
830
|
-
var c;
|
|
831
|
-
if (!h) return ut;
|
|
832
|
-
if (typeof h == "string") {
|
|
833
|
-
var f = h.toLowerCase();
|
|
834
|
-
Q[f] && (c = f), d && (Q[f] = d, c = f);
|
|
835
|
-
var v = h.split("-");
|
|
836
|
-
if (!c && v.length > 1) return y(v[0]);
|
|
837
|
-
} else {
|
|
838
|
-
var g = h.name;
|
|
839
|
-
Q[g] = h, c = g;
|
|
840
|
-
}
|
|
841
|
-
return !a && c && (ut = c), c || !a && ut;
|
|
842
|
-
}, n = function(y, h) {
|
|
843
|
-
if (e(y)) return y.clone();
|
|
844
|
-
var d = typeof h == "object" ? h : {};
|
|
845
|
-
return d.date = y, d.args = arguments, new m(d);
|
|
846
|
-
}, u = bt;
|
|
847
|
-
u.l = r, u.i = e, u.w = function(y, h) {
|
|
848
|
-
return n(y, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset });
|
|
849
|
-
};
|
|
850
|
-
var m = (function() {
|
|
851
|
-
function y(d) {
|
|
852
|
-
this.$L = r(d.locale, null, !0), this.parse(d), this.$x = this.$x || d.x || {}, this[R] = !0;
|
|
853
|
-
}
|
|
854
|
-
var h = y.prototype;
|
|
855
|
-
return h.parse = function(d) {
|
|
856
|
-
this.$d = (function(a) {
|
|
857
|
-
var c = a.date, f = a.utc;
|
|
858
|
-
if (c === null) return /* @__PURE__ */ new Date(NaN);
|
|
859
|
-
if (u.u(c)) return /* @__PURE__ */ new Date();
|
|
860
|
-
if (c instanceof Date) return new Date(c);
|
|
861
|
-
if (typeof c == "string" && !/Z$/i.test(c)) {
|
|
862
|
-
var v = c.match(ot);
|
|
863
|
-
if (v) {
|
|
864
|
-
var g = v[2] - 1 || 0, _ = (v[7] || "0").substring(0, 3);
|
|
865
|
-
return f ? new Date(Date.UTC(v[1], g, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, _)) : new Date(v[1], g, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, _);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
return new Date(c);
|
|
869
|
-
})(d), this.init();
|
|
870
|
-
}, h.init = function() {
|
|
871
|
-
var d = this.$d;
|
|
872
|
-
this.$y = d.getFullYear(), this.$M = d.getMonth(), this.$D = d.getDate(), this.$W = d.getDay(), this.$H = d.getHours(), this.$m = d.getMinutes(), this.$s = d.getSeconds(), this.$ms = d.getMilliseconds();
|
|
873
|
-
}, h.$utils = function() {
|
|
874
|
-
return u;
|
|
875
|
-
}, h.isValid = function() {
|
|
876
|
-
return this.$d.toString() !== tt;
|
|
877
|
-
}, h.isSame = function(d, a) {
|
|
878
|
-
var c = n(d);
|
|
879
|
-
return this.startOf(a) <= c && c <= this.endOf(a);
|
|
880
|
-
}, h.isAfter = function(d, a) {
|
|
881
|
-
return n(d) < this.startOf(a);
|
|
882
|
-
}, h.isBefore = function(d, a) {
|
|
883
|
-
return this.endOf(a) < n(d);
|
|
884
|
-
}, h.$g = function(d, a, c) {
|
|
885
|
-
return u.u(d) ? this[a] : this.set(c, d);
|
|
886
|
-
}, h.unix = function() {
|
|
887
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
888
|
-
}, h.valueOf = function() {
|
|
889
|
-
return this.$d.getTime();
|
|
890
|
-
}, h.startOf = function(d, a) {
|
|
891
|
-
var c = this, f = !!u.u(a) || a, v = u.p(d), g = function(x, O) {
|
|
892
|
-
var w = u.w(c.$u ? Date.UTC(c.$y, O, x) : new Date(c.$y, O, x), c);
|
|
893
|
-
return f ? w : w.endOf(p);
|
|
894
|
-
}, _ = function(x, O) {
|
|
895
|
-
return u.w(c.toDate()[x].apply(c.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), c);
|
|
896
|
-
}, l = this.$W, M = this.$M, C = this.$D, z = "set" + (this.$u ? "UTC" : "");
|
|
897
|
-
switch (v) {
|
|
898
|
-
case B:
|
|
899
|
-
return f ? g(1, 0) : g(31, 11);
|
|
900
|
-
case F:
|
|
901
|
-
return f ? g(1, M) : g(0, M + 1);
|
|
902
|
-
case U:
|
|
903
|
-
var Y = this.$locale().weekStart || 0, b = (l < Y ? l + 7 : l) - Y;
|
|
904
|
-
return g(f ? C - b : C + (6 - b), M);
|
|
905
|
-
case p:
|
|
906
|
-
case Z:
|
|
907
|
-
return _(z + "Hours", 0);
|
|
908
|
-
case q:
|
|
909
|
-
return _(z + "Minutes", 1);
|
|
910
|
-
case P:
|
|
911
|
-
return _(z + "Seconds", 2);
|
|
912
|
-
case I:
|
|
913
|
-
return _(z + "Milliseconds", 3);
|
|
914
|
-
default:
|
|
915
|
-
return this.clone();
|
|
916
|
-
}
|
|
917
|
-
}, h.endOf = function(d) {
|
|
918
|
-
return this.startOf(d, !1);
|
|
919
|
-
}, h.$set = function(d, a) {
|
|
920
|
-
var c, f = u.p(d), v = "set" + (this.$u ? "UTC" : ""), g = (c = {}, c[p] = v + "Date", c[Z] = v + "Date", c[F] = v + "Month", c[B] = v + "FullYear", c[q] = v + "Hours", c[P] = v + "Minutes", c[I] = v + "Seconds", c[D] = v + "Milliseconds", c)[f], _ = f === p ? this.$D + (a - this.$W) : a;
|
|
921
|
-
if (f === F || f === B) {
|
|
922
|
-
var l = this.clone().set(Z, 1);
|
|
923
|
-
l.$d[g](_), l.init(), this.$d = l.set(Z, Math.min(this.$D, l.daysInMonth())).$d;
|
|
924
|
-
} else g && this.$d[g](_);
|
|
925
|
-
return this.init(), this;
|
|
926
|
-
}, h.set = function(d, a) {
|
|
927
|
-
return this.clone().$set(d, a);
|
|
928
|
-
}, h.get = function(d) {
|
|
929
|
-
return this[u.p(d)]();
|
|
930
|
-
}, h.add = function(d, a) {
|
|
931
|
-
var c, f = this;
|
|
932
|
-
d = Number(d);
|
|
933
|
-
var v = u.p(a), g = function(M) {
|
|
934
|
-
var C = n(f);
|
|
935
|
-
return u.w(C.date(C.date() + Math.round(M * d)), f);
|
|
936
|
-
};
|
|
937
|
-
if (v === F) return this.set(F, this.$M + d);
|
|
938
|
-
if (v === B) return this.set(B, this.$y + d);
|
|
939
|
-
if (v === p) return g(1);
|
|
940
|
-
if (v === U) return g(7);
|
|
941
|
-
var _ = (c = {}, c[P] = o, c[q] = k, c[I] = i, c)[v] || 1, l = this.$d.getTime() + d * _;
|
|
942
|
-
return u.w(l, this);
|
|
943
|
-
}, h.subtract = function(d, a) {
|
|
944
|
-
return this.add(-1 * d, a);
|
|
945
|
-
}, h.format = function(d) {
|
|
946
|
-
var a = this, c = this.$locale();
|
|
947
|
-
if (!this.isValid()) return c.invalidDate || tt;
|
|
948
|
-
var f = d || "YYYY-MM-DDTHH:mm:ssZ", v = u.z(this), g = this.$H, _ = this.$m, l = this.$M, M = c.weekdays, C = c.months, z = c.meridiem, Y = function(O, w, A, j) {
|
|
949
|
-
return O && (O[w] || O(a, f)) || A[w].slice(0, j);
|
|
950
|
-
}, b = function(O) {
|
|
951
|
-
return u.s(g % 12 || 12, O, "0");
|
|
952
|
-
}, x = z || function(O, w, A) {
|
|
953
|
-
var j = O < 12 ? "AM" : "PM";
|
|
954
|
-
return A ? j.toLowerCase() : j;
|
|
955
|
-
};
|
|
956
|
-
return f.replace(lt, (function(O, w) {
|
|
957
|
-
return w || (function(A) {
|
|
958
|
-
switch (A) {
|
|
959
|
-
case "YY":
|
|
960
|
-
return String(a.$y).slice(-2);
|
|
961
|
-
case "YYYY":
|
|
962
|
-
return u.s(a.$y, 4, "0");
|
|
963
|
-
case "M":
|
|
964
|
-
return l + 1;
|
|
965
|
-
case "MM":
|
|
966
|
-
return u.s(l + 1, 2, "0");
|
|
967
|
-
case "MMM":
|
|
968
|
-
return Y(c.monthsShort, l, C, 3);
|
|
969
|
-
case "MMMM":
|
|
970
|
-
return Y(C, l);
|
|
971
|
-
case "D":
|
|
972
|
-
return a.$D;
|
|
973
|
-
case "DD":
|
|
974
|
-
return u.s(a.$D, 2, "0");
|
|
975
|
-
case "d":
|
|
976
|
-
return String(a.$W);
|
|
977
|
-
case "dd":
|
|
978
|
-
return Y(c.weekdaysMin, a.$W, M, 2);
|
|
979
|
-
case "ddd":
|
|
980
|
-
return Y(c.weekdaysShort, a.$W, M, 3);
|
|
981
|
-
case "dddd":
|
|
982
|
-
return M[a.$W];
|
|
983
|
-
case "H":
|
|
984
|
-
return String(g);
|
|
985
|
-
case "HH":
|
|
986
|
-
return u.s(g, 2, "0");
|
|
987
|
-
case "h":
|
|
988
|
-
return b(1);
|
|
989
|
-
case "hh":
|
|
990
|
-
return b(2);
|
|
991
|
-
case "a":
|
|
992
|
-
return x(g, _, !0);
|
|
993
|
-
case "A":
|
|
994
|
-
return x(g, _, !1);
|
|
995
|
-
case "m":
|
|
996
|
-
return String(_);
|
|
997
|
-
case "mm":
|
|
998
|
-
return u.s(_, 2, "0");
|
|
999
|
-
case "s":
|
|
1000
|
-
return String(a.$s);
|
|
1001
|
-
case "ss":
|
|
1002
|
-
return u.s(a.$s, 2, "0");
|
|
1003
|
-
case "SSS":
|
|
1004
|
-
return u.s(a.$ms, 3, "0");
|
|
1005
|
-
case "Z":
|
|
1006
|
-
return v;
|
|
1007
|
-
}
|
|
1008
|
-
return null;
|
|
1009
|
-
})(O) || v.replace(":", "");
|
|
1010
|
-
}));
|
|
1011
|
-
}, h.utcOffset = function() {
|
|
1012
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1013
|
-
}, h.diff = function(d, a, c) {
|
|
1014
|
-
var f, v = this, g = u.p(a), _ = n(d), l = (_.utcOffset() - this.utcOffset()) * o, M = this - _, C = function() {
|
|
1015
|
-
return u.m(v, _);
|
|
1016
|
-
};
|
|
1017
|
-
switch (g) {
|
|
1018
|
-
case B:
|
|
1019
|
-
f = C() / 12;
|
|
1020
|
-
break;
|
|
1021
|
-
case F:
|
|
1022
|
-
f = C();
|
|
1023
|
-
break;
|
|
1024
|
-
case J:
|
|
1025
|
-
f = C() / 3;
|
|
1026
|
-
break;
|
|
1027
|
-
case U:
|
|
1028
|
-
f = (M - l) / 6048e5;
|
|
1029
|
-
break;
|
|
1030
|
-
case p:
|
|
1031
|
-
f = (M - l) / 864e5;
|
|
1032
|
-
break;
|
|
1033
|
-
case q:
|
|
1034
|
-
f = M / k;
|
|
1035
|
-
break;
|
|
1036
|
-
case P:
|
|
1037
|
-
f = M / o;
|
|
1038
|
-
break;
|
|
1039
|
-
case I:
|
|
1040
|
-
f = M / i;
|
|
1041
|
-
break;
|
|
1042
|
-
default:
|
|
1043
|
-
f = M;
|
|
1044
|
-
}
|
|
1045
|
-
return c ? f : u.a(f);
|
|
1046
|
-
}, h.daysInMonth = function() {
|
|
1047
|
-
return this.endOf(F).$D;
|
|
1048
|
-
}, h.$locale = function() {
|
|
1049
|
-
return Q[this.$L];
|
|
1050
|
-
}, h.locale = function(d, a) {
|
|
1051
|
-
if (!d) return this.$L;
|
|
1052
|
-
var c = this.clone(), f = r(d, a, !0);
|
|
1053
|
-
return f && (c.$L = f), c;
|
|
1054
|
-
}, h.clone = function() {
|
|
1055
|
-
return u.w(this.$d, this);
|
|
1056
|
-
}, h.toDate = function() {
|
|
1057
|
-
return new Date(this.valueOf());
|
|
1058
|
-
}, h.toJSON = function() {
|
|
1059
|
-
return this.isValid() ? this.toISOString() : null;
|
|
1060
|
-
}, h.toISOString = function() {
|
|
1061
|
-
return this.$d.toISOString();
|
|
1062
|
-
}, h.toString = function() {
|
|
1063
|
-
return this.$d.toUTCString();
|
|
1064
|
-
}, y;
|
|
1065
|
-
})(), S = m.prototype;
|
|
1066
|
-
return n.prototype = S, [["$ms", D], ["$s", I], ["$m", P], ["$H", q], ["$W", p], ["$M", F], ["$y", B], ["$D", Z]].forEach((function(y) {
|
|
1067
|
-
S[y[1]] = function(h) {
|
|
1068
|
-
return this.$g(h, y[0], y[1]);
|
|
1069
|
-
};
|
|
1070
|
-
})), n.extend = function(y, h) {
|
|
1071
|
-
return y.$i || (y(h, m, n), y.$i = !0), n;
|
|
1072
|
-
}, n.locale = r, n.isDayjs = e, n.unix = function(y) {
|
|
1073
|
-
return n(1e3 * y);
|
|
1074
|
-
}, n.en = Q[ut], n.Ls = Q, n.p = {}, n;
|
|
1075
|
-
}));
|
|
1076
|
-
})(xt)), xt.exports;
|
|
661
|
+
function S(e) {
|
|
662
|
+
let t = e.lastIndexOf(".");
|
|
663
|
+
return t >= 0 && t < e.length - 1 ? e.slice(t + 1) : "";
|
|
1077
664
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
function se() {
|
|
1082
|
-
return Tt || (Tt = 1, (function(s, t) {
|
|
1083
|
-
(function(i, o) {
|
|
1084
|
-
s.exports = o();
|
|
1085
|
-
})(ie, (function() {
|
|
1086
|
-
var i = "day";
|
|
1087
|
-
return function(o, k, D) {
|
|
1088
|
-
var I = function(p) {
|
|
1089
|
-
return p.add(4 - p.isoWeekday(), i);
|
|
1090
|
-
}, P = k.prototype;
|
|
1091
|
-
P.isoWeekYear = function() {
|
|
1092
|
-
return I(this).year();
|
|
1093
|
-
}, P.isoWeek = function(p) {
|
|
1094
|
-
if (!this.$utils().u(p)) return this.add(7 * (p - this.isoWeek()), i);
|
|
1095
|
-
var U, F, J, B, Z = I(this), tt = (U = this.isoWeekYear(), F = this.$u, J = (F ? D.utc : D)().year(U).startOf("year"), B = 4 - J.isoWeekday(), J.isoWeekday() > 4 && (B += 7), J.add(B, i));
|
|
1096
|
-
return Z.diff(tt, "week") + 1;
|
|
1097
|
-
}, P.isoWeekday = function(p) {
|
|
1098
|
-
return this.$utils().u(p) ? this.day() || 7 : this.day(this.day() % 7 ? p : p - 7);
|
|
1099
|
-
};
|
|
1100
|
-
var q = P.startOf;
|
|
1101
|
-
P.startOf = function(p, U) {
|
|
1102
|
-
var F = this.$utils(), J = !!F.u(U) || U;
|
|
1103
|
-
return F.p(p) === "isoweek" ? J ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : q.bind(this)(p, U);
|
|
1104
|
-
};
|
|
1105
|
-
};
|
|
1106
|
-
}));
|
|
1107
|
-
})(Ot)), Ot.exports;
|
|
665
|
+
function C(e) {
|
|
666
|
+
let t = document.createEvent("MouseEvents");
|
|
667
|
+
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1108
668
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
function ce() {
|
|
1113
|
-
return Lt || (Lt = 1, (function(s, t) {
|
|
1114
|
-
(function(i, o) {
|
|
1115
|
-
s.exports = o();
|
|
1116
|
-
})(ue, (function() {
|
|
1117
|
-
var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
1118
|
-
return function(o, k, D) {
|
|
1119
|
-
var I = k.prototype, P = I.format;
|
|
1120
|
-
D.en.formats = i, I.format = function(q) {
|
|
1121
|
-
q === void 0 && (q = "YYYY-MM-DDTHH:mm:ssZ");
|
|
1122
|
-
var p = this.$locale().formats, U = (function(F, J) {
|
|
1123
|
-
return F.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(B, Z, tt) {
|
|
1124
|
-
var ot = tt && tt.toUpperCase();
|
|
1125
|
-
return Z || J[tt] || i[tt] || J[ot].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(lt, vt, dt) {
|
|
1126
|
-
return vt || dt.slice(1);
|
|
1127
|
-
}));
|
|
1128
|
-
}));
|
|
1129
|
-
})(q, p === void 0 ? {} : p);
|
|
1130
|
-
return P.call(this, U);
|
|
1131
|
-
};
|
|
1132
|
-
};
|
|
1133
|
-
}));
|
|
1134
|
-
})(Dt)), Dt.exports;
|
|
669
|
+
function w() {
|
|
670
|
+
let e = navigator.userAgent, t = /iPad|iPhone|iPod/.test(e), n = /^((?!chrome|android).)*safari/i.test(e);
|
|
671
|
+
return t || n;
|
|
1135
672
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region lib/helpers/enum.helper.ts
|
|
675
|
+
var T = class {
|
|
676
|
+
static getEnumValue(e, t) {
|
|
677
|
+
if (t in e) return e[t];
|
|
678
|
+
throw Error(`${t} not found in ${e}`);
|
|
679
|
+
}
|
|
680
|
+
static getKeyValues(e) {
|
|
681
|
+
return Object.keys(e).filter((e) => !isNaN(Number(e))).map((t) => ({
|
|
682
|
+
key: Number(t),
|
|
683
|
+
value: e[t]
|
|
684
|
+
}));
|
|
685
|
+
}
|
|
686
|
+
}, E = class {
|
|
687
|
+
static getFileExtension(e) {
|
|
688
|
+
let t = "", n = e.lastIndexOf(".");
|
|
689
|
+
return n > 0 && n < e.length - 1 && (t = `.${e.substring(n + 1).toLowerCase()}`), t;
|
|
690
|
+
}
|
|
691
|
+
static readAsText(e) {
|
|
692
|
+
let t = new FileReader();
|
|
693
|
+
return new Promise((n, r) => {
|
|
694
|
+
t.onload = () => {
|
|
695
|
+
t.onload = null, t.onerror = null, typeof t.result == "string" ? n(t.result) : r(/* @__PURE__ */ Error("Unexpected result type"));
|
|
696
|
+
}, t.onerror = () => {
|
|
697
|
+
let e = t.error ?? /* @__PURE__ */ Error("FileReader error");
|
|
698
|
+
t.onload = null, t.onerror = null, r(e);
|
|
699
|
+
}, t.readAsText(e);
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
static readAsArrayBuffer(e) {
|
|
703
|
+
let t = new FileReader();
|
|
704
|
+
return new Promise((n, r) => {
|
|
705
|
+
t.onload = () => {
|
|
706
|
+
t.onload = null, t.onerror = null, t.result instanceof ArrayBuffer ? n(t.result) : r(/* @__PURE__ */ Error("Unexpected result type"));
|
|
707
|
+
}, t.onerror = () => {
|
|
708
|
+
let e = t.error ?? /* @__PURE__ */ Error("FileReader error");
|
|
709
|
+
t.onload = null, t.onerror = null, r(e);
|
|
710
|
+
}, t.readAsArrayBuffer(e);
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
static readAsDataUrl(e) {
|
|
714
|
+
let t = new FileReader();
|
|
715
|
+
return new Promise((n, r) => {
|
|
716
|
+
t.onload = (e) => {
|
|
717
|
+
n(e);
|
|
718
|
+
}, t.onerror = (e) => r(e), t.readAsDataURL(e);
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
static formatFileSize(e, t = 2, n) {
|
|
722
|
+
if (e === 0) return "0 Bytes";
|
|
723
|
+
let r = 1024, i = [
|
|
724
|
+
"Bytes",
|
|
725
|
+
"KB",
|
|
726
|
+
"MB",
|
|
727
|
+
"GB",
|
|
728
|
+
"TB"
|
|
729
|
+
], a = Math.floor(Math.log(e) / Math.log(r));
|
|
730
|
+
n && i.includes(n) && (a = i.indexOf(n));
|
|
731
|
+
let o = e / r ** +a;
|
|
732
|
+
return `${parseFloat(o.toFixed(t))} ${i[a]}`;
|
|
733
|
+
}
|
|
734
|
+
static save(e, t, n) {
|
|
735
|
+
y(new Blob([e], { type: n }), t);
|
|
736
|
+
}
|
|
737
|
+
}, D = class e {
|
|
738
|
+
static set(e, t) {
|
|
739
|
+
localStorage.setItem(e, JSON.stringify(t));
|
|
740
|
+
}
|
|
741
|
+
static get(e) {
|
|
742
|
+
let t = null, n = localStorage.getItem(e);
|
|
743
|
+
return n && (t = JSON.parse(n)), t;
|
|
744
|
+
}
|
|
745
|
+
static remove(t) {
|
|
746
|
+
let n = !!e.get(t);
|
|
747
|
+
return n && localStorage.removeItem(t), n;
|
|
748
|
+
}
|
|
749
|
+
static removeAll() {
|
|
750
|
+
localStorage.clear();
|
|
751
|
+
}
|
|
752
|
+
static getKeysBy(e) {
|
|
753
|
+
return Object.keys(localStorage).filter((t) => t.startsWith(e));
|
|
754
|
+
}
|
|
755
|
+
}, O = /* @__PURE__ */ function(e) {
|
|
756
|
+
return e.log = "log", e.info = "info", e.warn = "warn", e.debug = "debug", e.error = "error", e;
|
|
757
|
+
}({}), k = class e {
|
|
758
|
+
static listeners = /* @__PURE__ */ new Set();
|
|
759
|
+
static enabled = !0;
|
|
760
|
+
static log(...t) {
|
|
761
|
+
e.doLog(O.log, t);
|
|
762
|
+
}
|
|
763
|
+
static info(...t) {
|
|
764
|
+
e.doLog(O.info, t);
|
|
765
|
+
}
|
|
766
|
+
static warn(...t) {
|
|
767
|
+
e.doLog(O.warn, t);
|
|
768
|
+
}
|
|
769
|
+
static debug(...t) {
|
|
770
|
+
e.doLog(O.debug, t);
|
|
771
|
+
}
|
|
772
|
+
static error(...t) {
|
|
773
|
+
e.doLog(O.error, t);
|
|
774
|
+
}
|
|
775
|
+
static clearListeners() {
|
|
776
|
+
e.listeners.clear();
|
|
777
|
+
}
|
|
778
|
+
static setEnabled(t) {
|
|
779
|
+
e.enabled = t;
|
|
780
|
+
}
|
|
781
|
+
static doLog(t, n) {
|
|
782
|
+
if (!e.enabled) return;
|
|
783
|
+
let r = {
|
|
784
|
+
type: t,
|
|
785
|
+
args: n,
|
|
786
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
787
|
+
};
|
|
788
|
+
for (let t of e.listeners) try {
|
|
789
|
+
if (t(r) === !1) return;
|
|
790
|
+
} catch {}
|
|
791
|
+
console[t].apply(console, n);
|
|
792
|
+
}
|
|
793
|
+
static onLog(t, n = !1) {
|
|
794
|
+
if (n) {
|
|
795
|
+
let n = (r) => {
|
|
796
|
+
try {
|
|
797
|
+
return t(r);
|
|
798
|
+
} finally {
|
|
799
|
+
e.listeners.delete(n);
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
return e.listeners.add(n), () => e.listeners.delete(n);
|
|
803
|
+
}
|
|
804
|
+
return e.listeners.add(t), () => e.listeners.delete(t);
|
|
805
|
+
}
|
|
806
|
+
}, A = /* @__PURE__ */ function(e) {
|
|
807
|
+
return e[e.NONE = 0] = "NONE", e[e.ASC = 1] = "ASC", e[e.DESC = -1] = "DESC", e;
|
|
808
|
+
}(A || {}), j = (e, t, n) => e.localeCompare(t) * (n ? A.ASC : A.DESC), M = (e, t) => e < t ? A.DESC : e === t ? A.NONE : A.ASC, N = (e, t, n) => M(e, t) * (n ? A.ASC : A.DESC), P = (e, t, n) => {
|
|
809
|
+
let r = 0;
|
|
810
|
+
return r = typeof e == "string" && typeof t == "string" ? j(e, t, n) : N(e, t, n), r;
|
|
811
|
+
}, F = (e, t, n, r) => P(n(e), n(t), r), I = class {
|
|
812
|
+
static get(e) {
|
|
813
|
+
return D.get(e);
|
|
814
|
+
}
|
|
815
|
+
static set(e, t) {
|
|
816
|
+
D.set(e, t);
|
|
817
|
+
}
|
|
818
|
+
static remove(e) {
|
|
819
|
+
D.remove(e);
|
|
820
|
+
}
|
|
821
|
+
}, L = class e {
|
|
822
|
+
static listeners = /* @__PURE__ */ new Set();
|
|
823
|
+
static initialized = !1;
|
|
824
|
+
static resizeTimeout = null;
|
|
825
|
+
static lastWidth = window.innerWidth;
|
|
826
|
+
static onResize(t) {
|
|
827
|
+
return e.initialized || e.init(), e.listeners.add(t), () => e.off(t);
|
|
828
|
+
}
|
|
829
|
+
static handleResize = () => {
|
|
830
|
+
e.resizeTimeout !== null && (window.clearTimeout(e.resizeTimeout), e.resizeTimeout = null), e.resizeTimeout = window.setTimeout(() => {
|
|
831
|
+
let t = window.innerWidth;
|
|
832
|
+
if (t !== e.lastWidth) {
|
|
833
|
+
e.lastWidth = t;
|
|
834
|
+
for (let n of e.listeners) n(t);
|
|
835
|
+
}
|
|
836
|
+
}, 150);
|
|
837
|
+
};
|
|
838
|
+
static init() {
|
|
839
|
+
e.initialized ||= (window.addEventListener("resize", e.handleResize, { passive: !0 }), !0);
|
|
840
|
+
}
|
|
841
|
+
static off(t) {
|
|
842
|
+
e.initialized && (e.listeners.delete(t), e.listeners.size === 0 && (window.removeEventListener("resize", e.handleResize), e.initialized = !1));
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
//#endregion
|
|
846
|
+
//#region lib/extensions/array-extensions.ts
|
|
847
|
+
function R() {
|
|
848
|
+
Array.prototype.distinct = function(e) {
|
|
849
|
+
return e ? this.filter((t, n, r) => r.findIndex((n) => e(n, t)) === n) : this.filter((e, t, n) => n.indexOf(e) === t);
|
|
850
|
+
}, Array.prototype.filterBy = function(e) {
|
|
851
|
+
return this.filter((t) => e(t));
|
|
852
|
+
}, Array.prototype.first = function() {
|
|
853
|
+
return this.length > 0 ? this[0] : null;
|
|
854
|
+
}, Array.prototype.groupBy = function(e) {
|
|
855
|
+
return this.reduce((t, n) => {
|
|
856
|
+
let r = e(n);
|
|
857
|
+
return t[r] || (t[r] = []), t[r].push(n), t;
|
|
858
|
+
}, {});
|
|
859
|
+
}, Array.prototype.orderBy = function(e, t = !0) {
|
|
860
|
+
return this?.sort((n, r) => F(n, r, e, t)), this;
|
|
861
|
+
}, Array.prototype.removeBy = function(e, t) {
|
|
862
|
+
return this.filter((n) => e(n) !== t);
|
|
863
|
+
};
|
|
1168
864
|
}
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region node_modules/dayjs/dayjs.min.js
|
|
867
|
+
var z = /* @__PURE__ */ o(((e, t) => {
|
|
868
|
+
(function(n, r) {
|
|
869
|
+
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
|
|
870
|
+
})(e, (function() {
|
|
871
|
+
var e = 1e3, t = 6e4, n = 36e5, r = "millisecond", i = "second", a = "minute", o = "hour", s = "day", c = "week", l = "month", u = "quarter", d = "year", f = "date", p = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = {
|
|
872
|
+
name: "en",
|
|
873
|
+
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
874
|
+
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
|
|
875
|
+
ordinal: function(e) {
|
|
876
|
+
var t = [
|
|
877
|
+
"th",
|
|
878
|
+
"st",
|
|
879
|
+
"nd",
|
|
880
|
+
"rd"
|
|
881
|
+
], n = e % 100;
|
|
882
|
+
return "[" + e + (t[(n - 20) % 10] || t[n] || t[0]) + "]";
|
|
883
|
+
}
|
|
884
|
+
}, _ = function(e, t, n) {
|
|
885
|
+
var r = String(e);
|
|
886
|
+
return !r || r.length >= t ? e : "" + Array(t + 1 - r.length).join(n) + e;
|
|
887
|
+
}, v = {
|
|
888
|
+
s: _,
|
|
889
|
+
z: function(e) {
|
|
890
|
+
var t = -e.utcOffset(), n = Math.abs(t), r = Math.floor(n / 60), i = n % 60;
|
|
891
|
+
return (t <= 0 ? "+" : "-") + _(r, 2, "0") + ":" + _(i, 2, "0");
|
|
892
|
+
},
|
|
893
|
+
m: function e(t, n) {
|
|
894
|
+
if (t.date() < n.date()) return -e(n, t);
|
|
895
|
+
var r = 12 * (n.year() - t.year()) + (n.month() - t.month()), i = t.clone().add(r, l), a = n - i < 0, o = t.clone().add(r + (a ? -1 : 1), l);
|
|
896
|
+
return +(-(r + (n - i) / (a ? i - o : o - i)) || 0);
|
|
897
|
+
},
|
|
898
|
+
a: function(e) {
|
|
899
|
+
return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
|
|
900
|
+
},
|
|
901
|
+
p: function(e) {
|
|
902
|
+
return {
|
|
903
|
+
M: l,
|
|
904
|
+
y: d,
|
|
905
|
+
w: c,
|
|
906
|
+
d: s,
|
|
907
|
+
D: f,
|
|
908
|
+
h: o,
|
|
909
|
+
m: a,
|
|
910
|
+
s: i,
|
|
911
|
+
ms: r,
|
|
912
|
+
Q: u
|
|
913
|
+
}[e] || String(e || "").toLowerCase().replace(/s$/, "");
|
|
914
|
+
},
|
|
915
|
+
u: function(e) {
|
|
916
|
+
return e === void 0;
|
|
917
|
+
}
|
|
918
|
+
}, y = "en", b = {};
|
|
919
|
+
b[y] = g;
|
|
920
|
+
var x = "$isDayjsObject", S = function(e) {
|
|
921
|
+
return e instanceof E || !(!e || !e[x]);
|
|
922
|
+
}, C = function e(t, n, r) {
|
|
923
|
+
var i;
|
|
924
|
+
if (!t) return y;
|
|
925
|
+
if (typeof t == "string") {
|
|
926
|
+
var a = t.toLowerCase();
|
|
927
|
+
b[a] && (i = a), n && (b[a] = n, i = a);
|
|
928
|
+
var o = t.split("-");
|
|
929
|
+
if (!i && o.length > 1) return e(o[0]);
|
|
930
|
+
} else {
|
|
931
|
+
var s = t.name;
|
|
932
|
+
b[s] = t, i = s;
|
|
933
|
+
}
|
|
934
|
+
return !r && i && (y = i), i || !r && y;
|
|
935
|
+
}, w = function(e, t) {
|
|
936
|
+
if (S(e)) return e.clone();
|
|
937
|
+
var n = typeof t == "object" ? t : {};
|
|
938
|
+
return n.date = e, n.args = arguments, new E(n);
|
|
939
|
+
}, T = v;
|
|
940
|
+
T.l = C, T.i = S, T.w = function(e, t) {
|
|
941
|
+
return w(e, {
|
|
942
|
+
locale: t.$L,
|
|
943
|
+
utc: t.$u,
|
|
944
|
+
x: t.$x,
|
|
945
|
+
$offset: t.$offset
|
|
946
|
+
});
|
|
947
|
+
};
|
|
948
|
+
var E = function() {
|
|
949
|
+
function g(e) {
|
|
950
|
+
this.$L = C(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[x] = !0;
|
|
951
|
+
}
|
|
952
|
+
var _ = g.prototype;
|
|
953
|
+
return _.parse = function(e) {
|
|
954
|
+
this.$d = function(e) {
|
|
955
|
+
var t = e.date, n = e.utc;
|
|
956
|
+
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
957
|
+
if (T.u(t)) return /* @__PURE__ */ new Date();
|
|
958
|
+
if (t instanceof Date) return new Date(t);
|
|
959
|
+
if (typeof t == "string" && !/Z$/i.test(t)) {
|
|
960
|
+
var r = t.match(m);
|
|
961
|
+
if (r) {
|
|
962
|
+
var i = r[2] - 1 || 0, a = (r[7] || "0").substring(0, 3);
|
|
963
|
+
return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
return new Date(t);
|
|
967
|
+
}(e), this.init();
|
|
968
|
+
}, _.init = function() {
|
|
969
|
+
var e = this.$d;
|
|
970
|
+
this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
|
|
971
|
+
}, _.$utils = function() {
|
|
972
|
+
return T;
|
|
973
|
+
}, _.isValid = function() {
|
|
974
|
+
return this.$d.toString() !== p;
|
|
975
|
+
}, _.isSame = function(e, t) {
|
|
976
|
+
var n = w(e);
|
|
977
|
+
return this.startOf(t) <= n && n <= this.endOf(t);
|
|
978
|
+
}, _.isAfter = function(e, t) {
|
|
979
|
+
return w(e) < this.startOf(t);
|
|
980
|
+
}, _.isBefore = function(e, t) {
|
|
981
|
+
return this.endOf(t) < w(e);
|
|
982
|
+
}, _.$g = function(e, t, n) {
|
|
983
|
+
return T.u(e) ? this[t] : this.set(n, e);
|
|
984
|
+
}, _.unix = function() {
|
|
985
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
986
|
+
}, _.valueOf = function() {
|
|
987
|
+
return this.$d.getTime();
|
|
988
|
+
}, _.startOf = function(e, t) {
|
|
989
|
+
var n = this, r = !!T.u(t) || t, u = T.p(e), p = function(e, t) {
|
|
990
|
+
var i = T.w(n.$u ? Date.UTC(n.$y, t, e) : new Date(n.$y, t, e), n);
|
|
991
|
+
return r ? i : i.endOf(s);
|
|
992
|
+
}, m = function(e, t) {
|
|
993
|
+
return T.w(n.toDate()[e].apply(n.toDate("s"), (r ? [
|
|
994
|
+
0,
|
|
995
|
+
0,
|
|
996
|
+
0,
|
|
997
|
+
0
|
|
998
|
+
] : [
|
|
999
|
+
23,
|
|
1000
|
+
59,
|
|
1001
|
+
59,
|
|
1002
|
+
999
|
|
1003
|
+
]).slice(t)), n);
|
|
1004
|
+
}, h = this.$W, g = this.$M, _ = this.$D, v = "set" + (this.$u ? "UTC" : "");
|
|
1005
|
+
switch (u) {
|
|
1006
|
+
case d: return r ? p(1, 0) : p(31, 11);
|
|
1007
|
+
case l: return r ? p(1, g) : p(0, g + 1);
|
|
1008
|
+
case c:
|
|
1009
|
+
var y = this.$locale().weekStart || 0, b = (h < y ? h + 7 : h) - y;
|
|
1010
|
+
return p(r ? _ - b : _ + (6 - b), g);
|
|
1011
|
+
case s:
|
|
1012
|
+
case f: return m(v + "Hours", 0);
|
|
1013
|
+
case o: return m(v + "Minutes", 1);
|
|
1014
|
+
case a: return m(v + "Seconds", 2);
|
|
1015
|
+
case i: return m(v + "Milliseconds", 3);
|
|
1016
|
+
default: return this.clone();
|
|
1017
|
+
}
|
|
1018
|
+
}, _.endOf = function(e) {
|
|
1019
|
+
return this.startOf(e, !1);
|
|
1020
|
+
}, _.$set = function(e, t) {
|
|
1021
|
+
var n, c = T.p(e), u = "set" + (this.$u ? "UTC" : ""), p = (n = {}, n[s] = u + "Date", n[f] = u + "Date", n[l] = u + "Month", n[d] = u + "FullYear", n[o] = u + "Hours", n[a] = u + "Minutes", n[i] = u + "Seconds", n[r] = u + "Milliseconds", n)[c], m = c === s ? this.$D + (t - this.$W) : t;
|
|
1022
|
+
if (c === l || c === d) {
|
|
1023
|
+
var h = this.clone().set(f, 1);
|
|
1024
|
+
h.$d[p](m), h.init(), this.$d = h.set(f, Math.min(this.$D, h.daysInMonth())).$d;
|
|
1025
|
+
} else p && this.$d[p](m);
|
|
1026
|
+
return this.init(), this;
|
|
1027
|
+
}, _.set = function(e, t) {
|
|
1028
|
+
return this.clone().$set(e, t);
|
|
1029
|
+
}, _.get = function(e) {
|
|
1030
|
+
return this[T.p(e)]();
|
|
1031
|
+
}, _.add = function(r, u) {
|
|
1032
|
+
var f, p = this;
|
|
1033
|
+
r = Number(r);
|
|
1034
|
+
var m = T.p(u), h = function(e) {
|
|
1035
|
+
var t = w(p);
|
|
1036
|
+
return T.w(t.date(t.date() + Math.round(e * r)), p);
|
|
1037
|
+
};
|
|
1038
|
+
if (m === l) return this.set(l, this.$M + r);
|
|
1039
|
+
if (m === d) return this.set(d, this.$y + r);
|
|
1040
|
+
if (m === s) return h(1);
|
|
1041
|
+
if (m === c) return h(7);
|
|
1042
|
+
var g = (f = {}, f[a] = t, f[o] = n, f[i] = e, f)[m] || 1, _ = this.$d.getTime() + r * g;
|
|
1043
|
+
return T.w(_, this);
|
|
1044
|
+
}, _.subtract = function(e, t) {
|
|
1045
|
+
return this.add(-1 * e, t);
|
|
1046
|
+
}, _.format = function(e) {
|
|
1047
|
+
var t = this, n = this.$locale();
|
|
1048
|
+
if (!this.isValid()) return n.invalidDate || p;
|
|
1049
|
+
var r = e || "YYYY-MM-DDTHH:mm:ssZ", i = T.z(this), a = this.$H, o = this.$m, s = this.$M, c = n.weekdays, l = n.months, u = n.meridiem, d = function(e, n, i, a) {
|
|
1050
|
+
return e && (e[n] || e(t, r)) || i[n].slice(0, a);
|
|
1051
|
+
}, f = function(e) {
|
|
1052
|
+
return T.s(a % 12 || 12, e, "0");
|
|
1053
|
+
}, m = u || function(e, t, n) {
|
|
1054
|
+
var r = e < 12 ? "AM" : "PM";
|
|
1055
|
+
return n ? r.toLowerCase() : r;
|
|
1056
|
+
};
|
|
1057
|
+
return r.replace(h, (function(e, r) {
|
|
1058
|
+
return r || function(e) {
|
|
1059
|
+
switch (e) {
|
|
1060
|
+
case "YY": return String(t.$y).slice(-2);
|
|
1061
|
+
case "YYYY": return T.s(t.$y, 4, "0");
|
|
1062
|
+
case "M": return s + 1;
|
|
1063
|
+
case "MM": return T.s(s + 1, 2, "0");
|
|
1064
|
+
case "MMM": return d(n.monthsShort, s, l, 3);
|
|
1065
|
+
case "MMMM": return d(l, s);
|
|
1066
|
+
case "D": return t.$D;
|
|
1067
|
+
case "DD": return T.s(t.$D, 2, "0");
|
|
1068
|
+
case "d": return String(t.$W);
|
|
1069
|
+
case "dd": return d(n.weekdaysMin, t.$W, c, 2);
|
|
1070
|
+
case "ddd": return d(n.weekdaysShort, t.$W, c, 3);
|
|
1071
|
+
case "dddd": return c[t.$W];
|
|
1072
|
+
case "H": return String(a);
|
|
1073
|
+
case "HH": return T.s(a, 2, "0");
|
|
1074
|
+
case "h": return f(1);
|
|
1075
|
+
case "hh": return f(2);
|
|
1076
|
+
case "a": return m(a, o, !0);
|
|
1077
|
+
case "A": return m(a, o, !1);
|
|
1078
|
+
case "m": return String(o);
|
|
1079
|
+
case "mm": return T.s(o, 2, "0");
|
|
1080
|
+
case "s": return String(t.$s);
|
|
1081
|
+
case "ss": return T.s(t.$s, 2, "0");
|
|
1082
|
+
case "SSS": return T.s(t.$ms, 3, "0");
|
|
1083
|
+
case "Z": return i;
|
|
1084
|
+
}
|
|
1085
|
+
return null;
|
|
1086
|
+
}(e) || i.replace(":", "");
|
|
1087
|
+
}));
|
|
1088
|
+
}, _.utcOffset = function() {
|
|
1089
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1090
|
+
}, _.diff = function(r, f, p) {
|
|
1091
|
+
var m, h = this, g = T.p(f), _ = w(r), v = (_.utcOffset() - this.utcOffset()) * t, y = this - _, b = function() {
|
|
1092
|
+
return T.m(h, _);
|
|
1093
|
+
};
|
|
1094
|
+
switch (g) {
|
|
1095
|
+
case d:
|
|
1096
|
+
m = b() / 12;
|
|
1097
|
+
break;
|
|
1098
|
+
case l:
|
|
1099
|
+
m = b();
|
|
1100
|
+
break;
|
|
1101
|
+
case u:
|
|
1102
|
+
m = b() / 3;
|
|
1103
|
+
break;
|
|
1104
|
+
case c:
|
|
1105
|
+
m = (y - v) / 6048e5;
|
|
1106
|
+
break;
|
|
1107
|
+
case s:
|
|
1108
|
+
m = (y - v) / 864e5;
|
|
1109
|
+
break;
|
|
1110
|
+
case o:
|
|
1111
|
+
m = y / n;
|
|
1112
|
+
break;
|
|
1113
|
+
case a:
|
|
1114
|
+
m = y / t;
|
|
1115
|
+
break;
|
|
1116
|
+
case i:
|
|
1117
|
+
m = y / e;
|
|
1118
|
+
break;
|
|
1119
|
+
default: m = y;
|
|
1120
|
+
}
|
|
1121
|
+
return p ? m : T.a(m);
|
|
1122
|
+
}, _.daysInMonth = function() {
|
|
1123
|
+
return this.endOf(l).$D;
|
|
1124
|
+
}, _.$locale = function() {
|
|
1125
|
+
return b[this.$L];
|
|
1126
|
+
}, _.locale = function(e, t) {
|
|
1127
|
+
if (!e) return this.$L;
|
|
1128
|
+
var n = this.clone(), r = C(e, t, !0);
|
|
1129
|
+
return r && (n.$L = r), n;
|
|
1130
|
+
}, _.clone = function() {
|
|
1131
|
+
return T.w(this.$d, this);
|
|
1132
|
+
}, _.toDate = function() {
|
|
1133
|
+
return new Date(this.valueOf());
|
|
1134
|
+
}, _.toJSON = function() {
|
|
1135
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1136
|
+
}, _.toISOString = function() {
|
|
1137
|
+
return this.$d.toISOString();
|
|
1138
|
+
}, _.toString = function() {
|
|
1139
|
+
return this.$d.toUTCString();
|
|
1140
|
+
}, g;
|
|
1141
|
+
}(), D = E.prototype;
|
|
1142
|
+
return w.prototype = D, [
|
|
1143
|
+
["$ms", r],
|
|
1144
|
+
["$s", i],
|
|
1145
|
+
["$m", a],
|
|
1146
|
+
["$H", o],
|
|
1147
|
+
["$W", s],
|
|
1148
|
+
["$M", l],
|
|
1149
|
+
["$y", d],
|
|
1150
|
+
["$D", f]
|
|
1151
|
+
].forEach((function(e) {
|
|
1152
|
+
D[e[1]] = function(t) {
|
|
1153
|
+
return this.$g(t, e[0], e[1]);
|
|
1154
|
+
};
|
|
1155
|
+
})), w.extend = function(e, t) {
|
|
1156
|
+
return e.$i ||= (e(t, E, w), !0), w;
|
|
1157
|
+
}, w.locale = C, w.isDayjs = S, w.unix = function(e) {
|
|
1158
|
+
return w(1e3 * e);
|
|
1159
|
+
}, w.en = b[y], w.Ls = b, w.p = {}, w;
|
|
1160
|
+
}));
|
|
1161
|
+
})), B = /* @__PURE__ */ o(((e, t) => {
|
|
1162
|
+
(function(n, r) {
|
|
1163
|
+
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_isoWeek = r();
|
|
1164
|
+
})(e, (function() {
|
|
1165
|
+
var e = "day";
|
|
1166
|
+
return function(t, n, r) {
|
|
1167
|
+
var i = function(t) {
|
|
1168
|
+
return t.add(4 - t.isoWeekday(), e);
|
|
1169
|
+
}, a = n.prototype;
|
|
1170
|
+
a.isoWeekYear = function() {
|
|
1171
|
+
return i(this).year();
|
|
1172
|
+
}, a.isoWeek = function(t) {
|
|
1173
|
+
if (!this.$utils().u(t)) return this.add(7 * (t - this.isoWeek()), e);
|
|
1174
|
+
var n, a, o, s, c = i(this), l = (n = this.isoWeekYear(), a = this.$u, o = (a ? r.utc : r)().year(n).startOf("year"), s = 4 - o.isoWeekday(), o.isoWeekday() > 4 && (s += 7), o.add(s, e));
|
|
1175
|
+
return c.diff(l, "week") + 1;
|
|
1176
|
+
}, a.isoWeekday = function(e) {
|
|
1177
|
+
return this.$utils().u(e) ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7);
|
|
1178
|
+
};
|
|
1179
|
+
var o = a.startOf;
|
|
1180
|
+
a.startOf = function(e, t) {
|
|
1181
|
+
var n = this.$utils(), r = !!n.u(t) || t;
|
|
1182
|
+
return n.p(e) === "isoweek" ? r ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : o.bind(this)(e, t);
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
}));
|
|
1186
|
+
})), V = /* @__PURE__ */ o(((e, t) => {
|
|
1187
|
+
(function(n, r) {
|
|
1188
|
+
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_localizedFormat = r();
|
|
1189
|
+
})(e, (function() {
|
|
1190
|
+
var e = {
|
|
1191
|
+
LTS: "h:mm:ss A",
|
|
1192
|
+
LT: "h:mm A",
|
|
1193
|
+
L: "MM/DD/YYYY",
|
|
1194
|
+
LL: "MMMM D, YYYY",
|
|
1195
|
+
LLL: "MMMM D, YYYY h:mm A",
|
|
1196
|
+
LLLL: "dddd, MMMM D, YYYY h:mm A"
|
|
1197
|
+
};
|
|
1198
|
+
return function(t, n, r) {
|
|
1199
|
+
var i = n.prototype, a = i.format;
|
|
1200
|
+
r.en.formats = e, i.format = function(t) {
|
|
1201
|
+
t === void 0 && (t = "YYYY-MM-DDTHH:mm:ssZ");
|
|
1202
|
+
var n = this.$locale().formats, r = function(t, n) {
|
|
1203
|
+
return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t, r, i) {
|
|
1204
|
+
var a = i && i.toUpperCase();
|
|
1205
|
+
return r || n[i] || e[i] || n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e, t, n) {
|
|
1206
|
+
return t || n.slice(1);
|
|
1207
|
+
}));
|
|
1208
|
+
}));
|
|
1209
|
+
}(t, n === void 0 ? {} : n);
|
|
1210
|
+
return a.call(this, r);
|
|
1211
|
+
};
|
|
1212
|
+
};
|
|
1213
|
+
}));
|
|
1214
|
+
})), H = /* @__PURE__ */ c(z()), U = /* @__PURE__ */ c(B()), W = /* @__PURE__ */ c(V());
|
|
1215
|
+
H.default.extend(W.default), H.default.extend(U.default);
|
|
1216
|
+
function G() {
|
|
1217
|
+
Date.prototype.add = function(e, t) {
|
|
1218
|
+
return (0, H.default)(this).add(e, t).toDate();
|
|
1219
|
+
}, Date.prototype.diff = function(e, t) {
|
|
1220
|
+
return (0, H.default)(this).diff(e, t);
|
|
1221
|
+
}, Date.prototype.endOf = function(e) {
|
|
1222
|
+
return (0, H.default)(this).endOf(e).toDate();
|
|
1223
|
+
}, Date.prototype.firstDayOfMonth = function() {
|
|
1224
|
+
return (0, H.default)(this).startOf("month").toDate();
|
|
1225
|
+
}, Date.prototype.format = function(e) {
|
|
1226
|
+
return (0, H.default)(this).format(e);
|
|
1227
|
+
}, Date.prototype.isAfter = function(e, t) {
|
|
1228
|
+
return (0, H.default)(this).isAfter(e, t);
|
|
1229
|
+
}, Date.prototype.isBefore = function(e, t) {
|
|
1230
|
+
return (0, H.default)(this).isBefore(e, t);
|
|
1231
|
+
}, Date.prototype.isValid = function() {
|
|
1232
|
+
return (0, H.default)(this).isValid();
|
|
1233
|
+
}, Date.prototype.isoWeek = function() {
|
|
1234
|
+
return (0, H.default)(this).isoWeek();
|
|
1235
|
+
}, Date.prototype.subtract = function(e, t) {
|
|
1236
|
+
return (0, H.default)(this).subtract(e, t).toDate();
|
|
1237
|
+
}, Date.prototype.lastDayOfMonth = function() {
|
|
1238
|
+
return (0, H.default)(this).endOf("month").toDate();
|
|
1239
|
+
}, Date.prototype.set = function(e, t) {
|
|
1240
|
+
return (0, H.default)(this).set(e, t).toDate();
|
|
1241
|
+
}, Date.prototype.startOf = function(e) {
|
|
1242
|
+
return (0, H.default)(this).startOf(e).toDate();
|
|
1243
|
+
};
|
|
1179
1244
|
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
1193
|
-
}
|
|
1194
|
-
onResizeChange(t) {
|
|
1195
|
-
this.onResizeCallbacks.add(t);
|
|
1196
|
-
}
|
|
1197
|
-
offResizeChange(t) {
|
|
1198
|
-
this.onResizeCallbacks.delete(t);
|
|
1199
|
-
}
|
|
1200
|
-
onResize = () => {
|
|
1201
|
-
typeof window > "u" || (this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
1202
|
-
this.emitTimeoutId = null;
|
|
1203
|
-
}, this.duplicateThresholdMs));
|
|
1204
|
-
};
|
|
1245
|
+
//#endregion
|
|
1246
|
+
//#region lib/extensions/string-extensions.ts
|
|
1247
|
+
function K() {
|
|
1248
|
+
String.prototype.capitalize = function() {
|
|
1249
|
+
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
1250
|
+
}, String.prototype.isNumber = function() {
|
|
1251
|
+
return !isNaN(Number(this)) && this.trim() !== "";
|
|
1252
|
+
}, String.prototype.isEmpty = function() {
|
|
1253
|
+
return this === void 0 || !this || this.length === 0;
|
|
1254
|
+
}, String.prototype.stripTags = function() {
|
|
1255
|
+
return new DOMParser().parseFromString(this.toString(), "text/html").body.textContent || "";
|
|
1256
|
+
};
|
|
1205
1257
|
}
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1258
|
+
//#endregion
|
|
1259
|
+
//#region lib/services/browser/browser.service.ts
|
|
1260
|
+
var q = class {
|
|
1261
|
+
resizeListener;
|
|
1262
|
+
onResizeCallbacks = /* @__PURE__ */ new Set();
|
|
1263
|
+
rafId = null;
|
|
1264
|
+
emitTimeoutId = null;
|
|
1265
|
+
duplicateThresholdMs = 60;
|
|
1266
|
+
constructor() {
|
|
1267
|
+
typeof window < "u" && (this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }));
|
|
1268
|
+
}
|
|
1269
|
+
destroy() {
|
|
1270
|
+
typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
1271
|
+
}
|
|
1272
|
+
onResizeChange(e) {
|
|
1273
|
+
this.onResizeCallbacks.add(e);
|
|
1274
|
+
}
|
|
1275
|
+
offResizeChange(e) {
|
|
1276
|
+
this.onResizeCallbacks.delete(e);
|
|
1277
|
+
}
|
|
1278
|
+
onResize = () => {
|
|
1279
|
+
typeof window > "u" || (this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
1280
|
+
this.emitTimeoutId = null;
|
|
1281
|
+
}, this.duplicateThresholdMs));
|
|
1282
|
+
};
|
|
1227
1283
|
};
|
|
1284
|
+
//#endregion
|
|
1285
|
+
export { d as BreakPointHelper, l as BreakPoints, m as BrowserHelper, q as BrowserService, f as BrowserType, v as CsvHelper, T as EnumHelper, E as FileHelper, D as LocalStorageHelper, k as LoggerHelper, O as LoggerType, u as ScreenHelper, I as TokenHelper, L as WindowResizeHelper, h as copyToClipboard, R as initArrayExtensions, G as initDateExtensions, K as initStringExtensions, y as saveAs, F as sortHelper };
|