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