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