@oardi/ts-utils 0.0.20 → 0.0.22
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/extensions/date-extension.d.ts +2 -0
- package/extensions/date-extension.d.ts.map +1 -1
- package/helpers/logger/index.d.ts +2 -0
- package/helpers/logger/index.d.ts.map +1 -1
- package/helpers/logger/logger.helper.d.ts +3 -0
- package/helpers/logger/logger.helper.d.ts.map +1 -1
- package/index.cjs.js +9 -9
- package/index.es.js +360 -345
- package/index.umd.js +9 -9
- package/package.json +1 -1
package/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function Xe(
|
|
2
|
-
return navigator.clipboard.writeText(
|
|
1
|
+
function Xe(s) {
|
|
2
|
+
return navigator.clipboard.writeText(s);
|
|
3
3
|
}
|
|
4
|
-
function be(
|
|
5
|
-
return
|
|
4
|
+
function be(s) {
|
|
5
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
6
6
|
}
|
|
7
7
|
var _e = { exports: {} };
|
|
8
8
|
/* @license
|
|
@@ -13,30 +13,30 @@ License: MIT
|
|
|
13
13
|
*/
|
|
14
14
|
var $e = _e.exports, De;
|
|
15
15
|
function Ce() {
|
|
16
|
-
return De || (De = 1, (function(
|
|
16
|
+
return De || (De = 1, (function(s, r) {
|
|
17
17
|
((i, l) => {
|
|
18
|
-
|
|
18
|
+
s.exports = l();
|
|
19
19
|
})($e, function i() {
|
|
20
|
-
var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {}, v,
|
|
20
|
+
var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {}, v, M = !l.document && !!l.postMessage, T = l.IS_PAPA_WORKER || !1, P = {}, Y = 0, w = {};
|
|
21
21
|
function N(e) {
|
|
22
22
|
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(t) {
|
|
23
23
|
var n = se(t);
|
|
24
24
|
n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new ee(n), (this._handle.streamer = this)._config = n;
|
|
25
25
|
}).call(this, e), this.parseChunk = function(t, n) {
|
|
26
|
-
var
|
|
27
|
-
if (this.isFirstChunk && 0 <
|
|
26
|
+
var o = parseInt(this._config.skipFirstNLines) || 0;
|
|
27
|
+
if (this.isFirstChunk && 0 < o) {
|
|
28
28
|
let S = this._config.newline;
|
|
29
|
-
S || (g = this._config.quoteChar || '"', S = this._handle.guessLineEndings(t, g)), t = [...t.split(S).slice(
|
|
29
|
+
S || (g = this._config.quoteChar || '"', S = this._handle.guessLineEndings(t, g)), t = [...t.split(S).slice(o)].join(S);
|
|
30
30
|
}
|
|
31
31
|
this.isFirstChunk && R(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
|
|
32
|
-
var
|
|
32
|
+
var o = this._partialLine + t, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
|
|
33
33
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
34
|
-
if (t = g.meta.cursor,
|
|
34
|
+
if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), T) l.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
|
|
35
35
|
else if (R(this._config.chunk) && !n) {
|
|
36
36
|
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
37
37
|
this._completeResults = g = void 0;
|
|
38
38
|
}
|
|
39
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !
|
|
39
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !o || !R(this._config.complete) || g && g.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), o || g && g.meta.paused || this._nextChunk(), g;
|
|
40
40
|
}
|
|
41
41
|
this._halted = !0;
|
|
42
42
|
}, this._sendError = function(t) {
|
|
@@ -45,7 +45,7 @@ function Ce() {
|
|
|
45
45
|
}
|
|
46
46
|
function W(e) {
|
|
47
47
|
var t;
|
|
48
|
-
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk =
|
|
48
|
+
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk = M ? function() {
|
|
49
49
|
this._readChunk(), this._chunkLoaded();
|
|
50
50
|
} : function() {
|
|
51
51
|
this._readChunk();
|
|
@@ -54,9 +54,9 @@ function Ce() {
|
|
|
54
54
|
}, this._readChunk = function() {
|
|
55
55
|
if (this._finished) this._chunkLoaded();
|
|
56
56
|
else {
|
|
57
|
-
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials),
|
|
58
|
-
var n,
|
|
59
|
-
for (n in
|
|
57
|
+
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), M || (t.onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !M), this._config.downloadRequestHeaders) {
|
|
58
|
+
var n, o = this._config.downloadRequestHeaders;
|
|
59
|
+
for (n in o) t.setRequestHeader(n, o[n]);
|
|
60
60
|
}
|
|
61
61
|
var g;
|
|
62
62
|
this._config.chunkSize && (g = this._start + this._config.chunkSize - 1, t.setRequestHeader("Range", "bytes=" + this._start + "-" + g));
|
|
@@ -65,7 +65,7 @@ function Ce() {
|
|
|
65
65
|
} catch (S) {
|
|
66
66
|
this._chunkError(S.message);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
M && t.status === 0 && this._chunkError();
|
|
69
69
|
}
|
|
70
70
|
}, this._chunkLoaded = function() {
|
|
71
71
|
t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((n) => (n = n.getResponseHeader("Content-Range")) !== null ? parseInt(n.substring(n.lastIndexOf("/") + 1)) : -1)(t), this.parseChunk(t.responseText)));
|
|
@@ -75,14 +75,14 @@ function Ce() {
|
|
|
75
75
|
}
|
|
76
76
|
function X(e) {
|
|
77
77
|
(e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize), N.call(this, e);
|
|
78
|
-
var t, n,
|
|
78
|
+
var t, n, o = typeof FileReader < "u";
|
|
79
79
|
this.stream = function(g) {
|
|
80
|
-
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice,
|
|
80
|
+
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
|
|
81
81
|
}, this._nextChunk = function() {
|
|
82
82
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
83
83
|
}, this._readChunk = function() {
|
|
84
84
|
var g = this._input, S = (this._config.chunkSize && (S = Math.min(this._start + this._config.chunkSize, this._input.size), g = n.call(g, this._start, S)), t.readAsText(g, this._config.encoding));
|
|
85
|
-
|
|
85
|
+
o || this._chunkLoaded({ target: { result: S } });
|
|
86
86
|
}, this._chunkLoaded = function(g) {
|
|
87
87
|
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(g.target.result);
|
|
88
88
|
}, this._chunkError = function() {
|
|
@@ -94,13 +94,13 @@ function Ce() {
|
|
|
94
94
|
N.call(this, e = e || {}), this.stream = function(n) {
|
|
95
95
|
return t = n, this._nextChunk();
|
|
96
96
|
}, this._nextChunk = function() {
|
|
97
|
-
var n,
|
|
98
|
-
if (!this._finished) return n = this._config.chunkSize, t = n ? (
|
|
97
|
+
var n, o;
|
|
98
|
+
if (!this._finished) return n = this._config.chunkSize, t = n ? (o = t.substring(0, n), t.substring(n)) : (o = t, ""), this._finished = !t, this.parseChunk(o);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function V(e) {
|
|
102
102
|
N.call(this, e = e || {});
|
|
103
|
-
var t = [], n = !0,
|
|
103
|
+
var t = [], n = !0, o = !1;
|
|
104
104
|
this.pause = function() {
|
|
105
105
|
N.prototype.pause.apply(this, arguments), this._input.pause();
|
|
106
106
|
}, this.resume = function() {
|
|
@@ -108,7 +108,7 @@ function Ce() {
|
|
|
108
108
|
}, this.stream = function(g) {
|
|
109
109
|
this._input = g, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
110
110
|
}, this._checkIsFinished = function() {
|
|
111
|
-
|
|
111
|
+
o && t.length === 1 && (this._finished = !0);
|
|
112
112
|
}, this._nextChunk = function() {
|
|
113
113
|
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : n = !0;
|
|
114
114
|
}, this._streamData = q(function(g) {
|
|
@@ -120,19 +120,19 @@ function Ce() {
|
|
|
120
120
|
}, this), this._streamError = q(function(g) {
|
|
121
121
|
this._streamCleanUp(), this._sendError(g);
|
|
122
122
|
}, this), this._streamEnd = q(function() {
|
|
123
|
-
this._streamCleanUp(),
|
|
123
|
+
this._streamCleanUp(), o = !0, this._streamData("");
|
|
124
124
|
}, this), this._streamCleanUp = q(function() {
|
|
125
125
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
126
126
|
}, this);
|
|
127
127
|
}
|
|
128
128
|
function ee(e) {
|
|
129
|
-
var t, n,
|
|
130
|
-
function
|
|
129
|
+
var t, n, o, g, S = Math.pow(2, 53), m = -S, f = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, h = /^((\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, u = 0, c = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
|
|
130
|
+
function O(b) {
|
|
131
131
|
return e.skipEmptyLines === "greedy" ? b.join("").trim() === "" : b.length === 1 && b[0].length === 0;
|
|
132
132
|
}
|
|
133
133
|
function C() {
|
|
134
|
-
if (d &&
|
|
135
|
-
return !
|
|
134
|
+
if (d && o && (j("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), e.skipEmptyLines && (d.data = d.data.filter(function(k) {
|
|
135
|
+
return !O(k);
|
|
136
136
|
})), B()) {
|
|
137
137
|
let k = function(A, F) {
|
|
138
138
|
R(e.transformHeader) && (A = e.transformHeader(A, F)), _.push(A);
|
|
@@ -143,17 +143,17 @@ function Ce() {
|
|
|
143
143
|
} else d.data.forEach(k);
|
|
144
144
|
}
|
|
145
145
|
function D(k, A) {
|
|
146
|
-
for (var F = e.header ? {} : [],
|
|
147
|
-
var
|
|
146
|
+
for (var F = e.header ? {} : [], I = 0; I < k.length; I++) {
|
|
147
|
+
var L = I, $ = k[I], $ = ((G, x) => ((z) => (e.dynamicTypingFunction && e.dynamicTyping[z] === void 0 && (e.dynamicTyping[z] = e.dynamicTypingFunction(z)), (e.dynamicTyping[z] || e.dynamicTyping) === !0))(G) ? x === "true" || x === "TRUE" || x !== "false" && x !== "FALSE" && (((z) => {
|
|
148
148
|
if (f.test(z) && (z = parseFloat(z), m < z && z < S))
|
|
149
149
|
return 1;
|
|
150
|
-
})(x) ? parseFloat(x) :
|
|
151
|
-
|
|
150
|
+
})(x) ? parseFloat(x) : h.test(x) ? new Date(x) : x === "" ? null : x) : x)(L = e.header ? I >= _.length ? "__parsed_extra" : _[I] : L, $ = e.transform ? e.transform($, L) : $);
|
|
151
|
+
L === "__parsed_extra" ? (F[L] = F[L] || [], F[L].push($)) : F[L] = $;
|
|
152
152
|
}
|
|
153
|
-
return e.header && (
|
|
153
|
+
return e.header && (I > _.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + I, c + A) : I < _.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + I, c + A)), F;
|
|
154
154
|
}
|
|
155
155
|
var E;
|
|
156
|
-
d && (e.header || e.dynamicTyping || e.transform) && (E = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(D), E = d.data.length) : d.data = D(d.data, 0), e.header && d.meta && (d.meta.fields = _),
|
|
156
|
+
d && (e.header || e.dynamicTyping || e.transform) && (E = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(D), E = d.data.length) : d.data = D(d.data, 0), e.header && d.meta && (d.meta.fields = _), c += E);
|
|
157
157
|
}
|
|
158
158
|
function B() {
|
|
159
159
|
return e.header && _.length === 0;
|
|
@@ -162,24 +162,24 @@ function Ce() {
|
|
|
162
162
|
b = { type: b, code: D, message: E }, k !== void 0 && (b.row = k), d.errors.push(b);
|
|
163
163
|
}
|
|
164
164
|
R(e.step) && (g = e.step, e.step = function(b) {
|
|
165
|
-
d = b, B() ? C() : (C(), d.data.length !== 0 && (
|
|
165
|
+
d = b, B() ? C() : (C(), d.data.length !== 0 && (u += b.data.length, e.preview && u > e.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
|
|
166
166
|
}), this.parse = function(b, D, E) {
|
|
167
|
-
var k = e.quoteChar || '"', k = (e.newline || (e.newline = this.guessLineEndings(b, k)),
|
|
168
|
-
var
|
|
167
|
+
var k = e.quoteChar || '"', k = (e.newline || (e.newline = this.guessLineEndings(b, k)), o = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(b), d.meta.delimiter = e.delimiter) : ((k = ((A, F, I, L, $) => {
|
|
168
|
+
var G, x, z, ue;
|
|
169
169
|
$ = $ || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
|
|
170
|
-
for (var
|
|
171
|
-
for (var te, pe = $[
|
|
172
|
-
0 <
|
|
170
|
+
for (var he = 0; he < $.length; he++) {
|
|
171
|
+
for (var te, pe = $[he], H = 0, re = 0, U = 0, Q = (z = void 0, new ce({ comments: L, delimiter: pe, newline: F, preview: 10 }).parse(A)), ae = 0; ae < Q.data.length; ae++) I && O(Q.data[ae]) ? U++ : (te = Q.data[ae].length, re += te, z === void 0 ? z = te : 0 < te && (H += Math.abs(te - z), z = te));
|
|
172
|
+
0 < Q.data.length && (re /= Q.data.length - U), (x === void 0 || H <= x) && (ue === void 0 || ue < re) && 1.99 < re && (x = H, G = pe, ue = re);
|
|
173
173
|
}
|
|
174
|
-
return { successful: !!(e.delimiter =
|
|
175
|
-
})(b, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = k.bestDelimiter : (
|
|
176
|
-
return e.preview && e.header && k.preview++, t = b, n = new
|
|
174
|
+
return { successful: !!(e.delimiter = G), bestDelimiter: G };
|
|
175
|
+
})(b, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = k.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), d.meta.delimiter = e.delimiter), se(e));
|
|
176
|
+
return e.preview && e.header && k.preview++, t = b, n = new ce(k), d = n.parse(t, D, E), C(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
|
|
177
177
|
}, this.paused = function() {
|
|
178
178
|
return y;
|
|
179
179
|
}, this.pause = function() {
|
|
180
180
|
y = !0, n.abort(), t = R(e.chunk) ? "" : t.substring(n.getCharIndex());
|
|
181
181
|
}, this.resume = function() {
|
|
182
|
-
|
|
182
|
+
a.streamer._halted ? (y = !1, a.streamer.parseChunk(t, !0)) : setTimeout(a.resume, 3);
|
|
183
183
|
}, this.aborted = function() {
|
|
184
184
|
return p;
|
|
185
185
|
}, this.abort = function() {
|
|
@@ -190,7 +190,7 @@ function Ce() {
|
|
|
190
190
|
`), A = 1 < k.length && k[0].length < E[0].length;
|
|
191
191
|
if (E.length === 1 || A) return `
|
|
192
192
|
`;
|
|
193
|
-
for (var F = 0,
|
|
193
|
+
for (var F = 0, I = 0; I < E.length; I++) E[I][0] === `
|
|
194
194
|
` && F++;
|
|
195
195
|
return F >= E.length / 2 ? `\r
|
|
196
196
|
` : "\r";
|
|
@@ -199,87 +199,87 @@ function Ce() {
|
|
|
199
199
|
function ie(e) {
|
|
200
200
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
var t = (e = e || {}).delimiter, n = e.newline,
|
|
204
|
-
if (e.escapeChar !== void 0 && (
|
|
205
|
-
|
|
202
|
+
function ce(e) {
|
|
203
|
+
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, S = e.preview, m = e.fastMode, f = null, h = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
|
|
204
|
+
if (e.escapeChar !== void 0 && (u = e.escapeChar), (typeof t != "string" || -1 < w.BAD_DELIMITERS.indexOf(t)) && (t = ","), o === t) throw new Error("Comment character same as delimiter");
|
|
205
|
+
o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
|
|
206
206
|
` && n !== "\r" && n !== `\r
|
|
207
207
|
` && (n = `
|
|
208
208
|
`);
|
|
209
|
-
var
|
|
209
|
+
var c = 0, y = !1;
|
|
210
210
|
this.parse = function(p, _, d) {
|
|
211
211
|
if (typeof p != "string") throw new Error("Input must be a string");
|
|
212
|
-
var
|
|
212
|
+
var O = p.length, C = t.length, B = n.length, j = o.length, b = R(g), D = [], E = [], k = [], A = c = 0;
|
|
213
213
|
if (!p) return H();
|
|
214
|
-
if (m || m !== !1 && p.indexOf(
|
|
215
|
-
for (var F = p.split(n),
|
|
216
|
-
if (k = F[
|
|
214
|
+
if (m || m !== !1 && p.indexOf(a) === -1) {
|
|
215
|
+
for (var F = p.split(n), I = 0; I < F.length; I++) {
|
|
216
|
+
if (k = F[I], c += k.length, I !== F.length - 1) c += n.length;
|
|
217
217
|
else if (d) return H();
|
|
218
|
-
if (!
|
|
218
|
+
if (!o || k.substring(0, j) !== o) {
|
|
219
219
|
if (b) {
|
|
220
220
|
if (D = [], ue(k.split(t)), re(), y) return H();
|
|
221
221
|
} else ue(k.split(t));
|
|
222
|
-
if (S && S <=
|
|
222
|
+
if (S && S <= I) return D = D.slice(0, S), H(!0);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
return H();
|
|
226
226
|
}
|
|
227
|
-
for (var
|
|
228
|
-
if ((x = p.indexOf(
|
|
229
|
-
if (x ===
|
|
230
|
-
if (
|
|
231
|
-
else if (
|
|
232
|
-
|
|
233
|
-
var z =
|
|
227
|
+
for (var L = p.indexOf(t, c), $ = p.indexOf(n, c), G = new RegExp(ie(u) + ie(a), "g"), x = p.indexOf(a, c); ; ) if (p[c] === a) for (x = c, c++; ; ) {
|
|
228
|
+
if ((x = p.indexOf(a, x + 1)) === -1) return d || E.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: D.length, index: c }), te();
|
|
229
|
+
if (x === O - 1) return te(p.substring(c, x).replace(G, a));
|
|
230
|
+
if (a === u && p[x + 1] === u) x++;
|
|
231
|
+
else if (a === u || x === 0 || p[x - 1] !== u) {
|
|
232
|
+
L !== -1 && L < x + 1 && (L = p.indexOf(t, x + 1));
|
|
233
|
+
var z = he(($ = $ !== -1 && $ < x + 1 ? p.indexOf(n, x + 1) : $) === -1 ? L : Math.min(L, $));
|
|
234
234
|
if (p.substr(x + 1 + z, C) === t) {
|
|
235
|
-
k.push(p.substring(
|
|
235
|
+
k.push(p.substring(c, x).replace(G, a)), p[c = x + 1 + z + C] !== a && (x = p.indexOf(a, c)), L = p.indexOf(t, c), $ = p.indexOf(n, c);
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
|
-
if (z =
|
|
239
|
-
if (k.push(p.substring(
|
|
238
|
+
if (z = he($), p.substring(x + 1 + z, x + 1 + z + B) === n) {
|
|
239
|
+
if (k.push(p.substring(c, x).replace(G, a)), pe(x + 1 + z + B), L = p.indexOf(t, c), x = p.indexOf(a, c), b && (re(), y)) return H();
|
|
240
240
|
if (S && D.length >= S) return H(!0);
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
|
-
E.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: D.length, index:
|
|
243
|
+
E.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: D.length, index: c }), x++;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
else if (
|
|
246
|
+
else if (o && k.length === 0 && p.substring(c, c + j) === o) {
|
|
247
247
|
if ($ === -1) return H();
|
|
248
|
-
|
|
249
|
-
} else if (
|
|
248
|
+
c = $ + B, $ = p.indexOf(n, c), L = p.indexOf(t, c);
|
|
249
|
+
} else if (L !== -1 && (L < $ || $ === -1)) k.push(p.substring(c, L)), c = L + C, L = p.indexOf(t, c);
|
|
250
250
|
else {
|
|
251
251
|
if ($ === -1) break;
|
|
252
|
-
if (k.push(p.substring(
|
|
252
|
+
if (k.push(p.substring(c, $)), pe($ + B), b && (re(), y)) return H();
|
|
253
253
|
if (S && D.length >= S) return H(!0);
|
|
254
254
|
}
|
|
255
255
|
return te();
|
|
256
256
|
function ue(U) {
|
|
257
|
-
D.push(U), A =
|
|
257
|
+
D.push(U), A = c;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
260
|
-
var
|
|
261
|
-
return
|
|
259
|
+
function he(U) {
|
|
260
|
+
var Q = 0;
|
|
261
|
+
return Q = U !== -1 && (U = p.substring(x + 1, U)) && U.trim() === "" ? U.length : Q;
|
|
262
262
|
}
|
|
263
263
|
function te(U) {
|
|
264
|
-
return d || (U === void 0 && (U = p.substring(
|
|
264
|
+
return d || (U === void 0 && (U = p.substring(c)), k.push(U), c = O, ue(k), b && re()), H();
|
|
265
265
|
}
|
|
266
266
|
function pe(U) {
|
|
267
|
-
|
|
267
|
+
c = U, ue(k), k = [], $ = p.indexOf(n, c);
|
|
268
268
|
}
|
|
269
269
|
function H(U) {
|
|
270
|
-
if (e.header && !_ && D.length && !
|
|
271
|
-
var
|
|
270
|
+
if (e.header && !_ && D.length && !h) {
|
|
271
|
+
var Q = D[0], ae = /* @__PURE__ */ Object.create(null), ve = new Set(Q);
|
|
272
272
|
let Se = !1;
|
|
273
|
-
for (let le = 0; le <
|
|
274
|
-
let ne =
|
|
273
|
+
for (let le = 0; le < Q.length; le++) {
|
|
274
|
+
let ne = Q[le];
|
|
275
275
|
if (ae[ne = R(e.transformHeader) ? e.transformHeader(ne, le) : ne]) {
|
|
276
276
|
let ge, xe = ae[ne];
|
|
277
277
|
for (; ge = ne + "_" + xe, xe++, ve.has(ge); ) ;
|
|
278
|
-
ve.add(ge),
|
|
279
|
-
} else ae[ne] = 1,
|
|
278
|
+
ve.add(ge), Q[le] = ge, ae[ne]++, Se = !0, (f = f === null ? {} : f)[ge] = ne;
|
|
279
|
+
} else ae[ne] = 1, Q[le] = ne;
|
|
280
280
|
ve.add(ne);
|
|
281
281
|
}
|
|
282
|
-
Se && console.warn("Duplicate headers found and renamed."),
|
|
282
|
+
Se && console.warn("Duplicate headers found and renamed."), h = !0;
|
|
283
283
|
}
|
|
284
284
|
return { data: D, errors: E, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: A + (_ || 0), renamedHeaders: f } };
|
|
285
285
|
}
|
|
@@ -289,22 +289,22 @@ function Ce() {
|
|
|
289
289
|
}, this.abort = function() {
|
|
290
290
|
y = !0;
|
|
291
291
|
}, this.getCharIndex = function() {
|
|
292
|
-
return
|
|
292
|
+
return c;
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
295
|
function de(e) {
|
|
296
|
-
var t = e.data, n = P[t.workerId],
|
|
296
|
+
var t = e.data, n = P[t.workerId], o = !1;
|
|
297
297
|
if (t.error) n.userError(t.error, t.file);
|
|
298
298
|
else if (t.results && t.results.data) {
|
|
299
299
|
var g = { abort: function() {
|
|
300
|
-
|
|
300
|
+
o = !0, oe(t.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
301
301
|
}, pause: ye, resume: ye };
|
|
302
302
|
if (R(n.userStep)) {
|
|
303
|
-
for (var S = 0; S < t.results.data.length && (n.userStep({ data: t.results.data[S], errors: t.results.errors, meta: t.results.meta }, g), !
|
|
303
|
+
for (var S = 0; S < t.results.data.length && (n.userStep({ data: t.results.data[S], errors: t.results.errors, meta: t.results.meta }, g), !o); S++) ;
|
|
304
304
|
delete t.results;
|
|
305
305
|
} else R(n.userChunk) && (n.userChunk(t.results, g, t.file), delete t.results);
|
|
306
306
|
}
|
|
307
|
-
t.finished && !
|
|
307
|
+
t.finished && !o && oe(t.workerId, t.results);
|
|
308
308
|
}
|
|
309
309
|
function oe(e, t) {
|
|
310
310
|
var n = P[e];
|
|
@@ -329,104 +329,104 @@ function Ce() {
|
|
|
329
329
|
}
|
|
330
330
|
return w.parse = function(e, t) {
|
|
331
331
|
var n = (t = t || {}).dynamicTyping || !1;
|
|
332
|
-
if (R(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!R(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((
|
|
332
|
+
if (R(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!R(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && R(e.read) && R(e.on) ? n = new V(t) : (l.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
|
|
333
333
|
(n = (() => {
|
|
334
|
-
var
|
|
335
|
-
return !!w.WORKERS_SUPPORTED && (
|
|
334
|
+
var o;
|
|
335
|
+
return !!w.WORKERS_SUPPORTED && (o = (() => {
|
|
336
336
|
var g = l.URL || l.webkitURL || null, S = i.toString();
|
|
337
337
|
return w.BLOB_URL || (w.BLOB_URL = g.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" })));
|
|
338
|
-
})(), (
|
|
338
|
+
})(), (o = new l.Worker(o)).onmessage = de, o.id = Y++, P[o.id] = o);
|
|
339
339
|
})()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = R(t.step), t.chunk = R(t.chunk), t.complete = R(t.complete), t.error = R(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
|
|
340
340
|
}, w.unparse = function(e, t) {
|
|
341
|
-
var n = !1,
|
|
342
|
-
`, m = '"', f = m + m,
|
|
341
|
+
var n = !1, o = !0, g = ",", S = `\r
|
|
342
|
+
`, m = '"', f = m + m, h = !1, a = null, u = !1, c = ((() => {
|
|
343
343
|
if (typeof t == "object") {
|
|
344
344
|
if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
|
|
345
345
|
return t.delimiter.indexOf(_) !== -1;
|
|
346
|
-
}).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (
|
|
346
|
+
}).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (h = t.skipEmptyLines), typeof t.newline == "string" && (S = t.newline), typeof t.quoteChar == "string" && (m = t.quoteChar), typeof t.header == "boolean" && (o = t.header), Array.isArray(t.columns)) {
|
|
347
347
|
if (t.columns.length === 0) throw new Error("Option columns is empty");
|
|
348
|
-
|
|
348
|
+
a = t.columns;
|
|
349
349
|
}
|
|
350
|
-
t.escapeChar !== void 0 && (f = t.escapeChar + m), t.escapeFormulae instanceof RegExp ?
|
|
350
|
+
t.escapeChar !== void 0 && (f = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
|
|
351
351
|
}
|
|
352
352
|
})(), new RegExp(ie(m), "g"));
|
|
353
353
|
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
354
|
-
if (!e.length || Array.isArray(e[0])) return y(null, e,
|
|
355
|
-
if (typeof e[0] == "object") return y(
|
|
356
|
-
} 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 ||
|
|
354
|
+
if (!e.length || Array.isArray(e[0])) return y(null, e, h);
|
|
355
|
+
if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, h);
|
|
356
|
+
} 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])), y(e.fields || [], e.data || [], h);
|
|
357
357
|
throw new Error("Unable to serialize unrecognized input");
|
|
358
|
-
function y(_, d,
|
|
358
|
+
function y(_, d, O) {
|
|
359
359
|
var C = "", B = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), j = !Array.isArray(d[0]);
|
|
360
|
-
if (B &&
|
|
360
|
+
if (B && o) {
|
|
361
361
|
for (var b = 0; b < _.length; b++) 0 < b && (C += g), C += p(_[b], b);
|
|
362
362
|
0 < d.length && (C += S);
|
|
363
363
|
}
|
|
364
364
|
for (var D = 0; D < d.length; D++) {
|
|
365
365
|
var E = (B ? _ : d[D]).length, k = !1, A = B ? Object.keys(d[D]).length === 0 : d[D].length === 0;
|
|
366
|
-
if (
|
|
367
|
-
for (var F = [],
|
|
368
|
-
var
|
|
369
|
-
F.push(d[D][
|
|
366
|
+
if (O && !B && (k = O === "greedy" ? d[D].join("").trim() === "" : d[D].length === 1 && d[D][0].length === 0), O === "greedy" && B) {
|
|
367
|
+
for (var F = [], I = 0; I < E; I++) {
|
|
368
|
+
var L = j ? _[I] : I;
|
|
369
|
+
F.push(d[D][L]);
|
|
370
370
|
}
|
|
371
371
|
k = F.join("").trim() === "";
|
|
372
372
|
}
|
|
373
373
|
if (!k) {
|
|
374
374
|
for (var $ = 0; $ < E; $++) {
|
|
375
375
|
0 < $ && !A && (C += g);
|
|
376
|
-
var
|
|
377
|
-
C += p(d[D][
|
|
376
|
+
var G = B && j ? _[$] : $;
|
|
377
|
+
C += p(d[D][G], $);
|
|
378
378
|
}
|
|
379
|
-
D < d.length - 1 && (!
|
|
379
|
+
D < d.length - 1 && (!O || 0 < E && !A) && (C += S);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
return C;
|
|
383
383
|
}
|
|
384
384
|
function p(_, d) {
|
|
385
|
-
var
|
|
386
|
-
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (C = !1,
|
|
385
|
+
var O, C;
|
|
386
|
+
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (C = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, C = !0), O = _.toString().replace(c, f), (C = C || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((B, j) => {
|
|
387
387
|
for (var b = 0; b < j.length; b++) if (-1 < B.indexOf(j[b])) return !0;
|
|
388
388
|
return !1;
|
|
389
|
-
})(
|
|
389
|
+
})(O, w.BAD_DELIMITERS) || -1 < O.indexOf(g) || O.charAt(0) === " " || O.charAt(O.length - 1) === " ") ? m + O + m : O);
|
|
390
390
|
}
|
|
391
391
|
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
392
|
-
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !
|
|
392
|
+
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !M && !!l.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = ce, w.ParserHandle = ee, w.NetworkStreamer = W, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = V, l.jQuery && ((v = l.jQuery).fn.parse = function(e) {
|
|
393
393
|
var t = e.config || {}, n = [];
|
|
394
394
|
return this.each(function(S) {
|
|
395
395
|
if (!(v(this).prop("tagName").toUpperCase() === "INPUT" && v(this).attr("type").toLowerCase() === "file" && l.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
396
396
|
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: v.extend({}, t) });
|
|
397
|
-
}),
|
|
398
|
-
function
|
|
397
|
+
}), o(), this;
|
|
398
|
+
function o() {
|
|
399
399
|
if (n.length === 0) R(e.complete) && e.complete();
|
|
400
400
|
else {
|
|
401
|
-
var S, m, f,
|
|
401
|
+
var S, m, f, h, a = n[0];
|
|
402
402
|
if (R(e.before)) {
|
|
403
|
-
var
|
|
404
|
-
if (typeof
|
|
405
|
-
if (
|
|
406
|
-
if (
|
|
407
|
-
typeof
|
|
408
|
-
} else if (
|
|
403
|
+
var u = e.before(a.file, a.inputElem);
|
|
404
|
+
if (typeof u == "object") {
|
|
405
|
+
if (u.action === "abort") return S = "AbortError", m = a.file, f = a.inputElem, h = u.reason, void (R(e.error) && e.error({ name: S }, m, f, h));
|
|
406
|
+
if (u.action === "skip") return void g();
|
|
407
|
+
typeof u.config == "object" && (a.instanceConfig = v.extend(a.instanceConfig, u.config));
|
|
408
|
+
} else if (u === "skip") return void g();
|
|
409
409
|
}
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
R(
|
|
413
|
-
}, w.parse(
|
|
410
|
+
var c = a.instanceConfig.complete;
|
|
411
|
+
a.instanceConfig.complete = function(y) {
|
|
412
|
+
R(c) && c(y, a.file, a.inputElem), g();
|
|
413
|
+
}, w.parse(a.file, a.instanceConfig);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
function g() {
|
|
417
|
-
n.splice(0, 1),
|
|
417
|
+
n.splice(0, 1), o();
|
|
418
418
|
}
|
|
419
419
|
}), T && (l.onmessage = function(e) {
|
|
420
420
|
e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? l.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (l.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && l.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
|
|
421
|
-
}), (W.prototype = Object.create(N.prototype)).constructor = W, (X.prototype = Object.create(N.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (
|
|
421
|
+
}), (W.prototype = Object.create(N.prototype)).constructor = W, (X.prototype = Object.create(N.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (V.prototype = Object.create(N.prototype)).constructor = V, w;
|
|
422
422
|
});
|
|
423
423
|
})(_e)), _e.exports;
|
|
424
424
|
}
|
|
425
425
|
var Re = Ce();
|
|
426
|
-
const Ae = /* @__PURE__ */ be(Re), { parse: Te, unparse:
|
|
426
|
+
const Ae = /* @__PURE__ */ be(Re), { parse: Te, unparse: Ie } = Ae;
|
|
427
427
|
class et {
|
|
428
428
|
static unparse(r, i) {
|
|
429
|
-
return
|
|
429
|
+
return Ie(r, i);
|
|
430
430
|
}
|
|
431
431
|
static parse(r) {
|
|
432
432
|
return new Promise((i, l) => {
|
|
@@ -438,34 +438,34 @@ class et {
|
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
async function
|
|
442
|
-
const l = i?.mimeType ?? Fe(r), v = Be(
|
|
441
|
+
async function Le(s, r, i) {
|
|
442
|
+
const l = i?.mimeType ?? Fe(r), v = Be(s, l);
|
|
443
443
|
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
444
444
|
try {
|
|
445
445
|
const Y = await (await window.showSaveFilePicker({
|
|
446
446
|
suggestedName: r,
|
|
447
|
-
types: [{ description: "Datei", accept: { [l]: [`.${
|
|
447
|
+
types: [{ description: "Datei", accept: { [l]: [`.${Me(r)}`] } }]
|
|
448
448
|
})).createWritable();
|
|
449
449
|
await Y.write(v), await Y.close();
|
|
450
450
|
return;
|
|
451
451
|
} catch {
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
T.href =
|
|
455
|
-
document.body.removeChild(T), URL.revokeObjectURL(
|
|
456
|
-
}, 0), je() && window.open(
|
|
453
|
+
const M = URL.createObjectURL(v), T = document.createElement("a");
|
|
454
|
+
T.href = M, T.download = r, T.rel = "noopener", T.style.display = "none", document.body.appendChild(T), ze(T), window.setTimeout(() => {
|
|
455
|
+
document.body.removeChild(T), URL.revokeObjectURL(M);
|
|
456
|
+
}, 0), je() && window.open(M, "_blank", "noopener,noreferrer");
|
|
457
457
|
}
|
|
458
|
-
function Be(
|
|
459
|
-
if (
|
|
460
|
-
return
|
|
461
|
-
if (
|
|
462
|
-
const i =
|
|
458
|
+
function Be(s, r) {
|
|
459
|
+
if (s instanceof Blob)
|
|
460
|
+
return s.type ? s : new Blob([s], { type: r });
|
|
461
|
+
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
462
|
+
const i = s instanceof Uint8Array ? s : new Uint8Array(s);
|
|
463
463
|
return new Blob([i], { type: r });
|
|
464
464
|
}
|
|
465
|
-
return new Blob([
|
|
465
|
+
return new Blob([s], { type: r || "text/plain;charset=utf-8" });
|
|
466
466
|
}
|
|
467
|
-
function Fe(
|
|
468
|
-
switch (
|
|
467
|
+
function Fe(s) {
|
|
468
|
+
switch (Me(s).toLowerCase()) {
|
|
469
469
|
case "txt":
|
|
470
470
|
return "text/plain;charset=utf-8";
|
|
471
471
|
case "csv":
|
|
@@ -487,16 +487,16 @@ function Fe(u) {
|
|
|
487
487
|
return "application/octet-stream";
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
const r =
|
|
492
|
-
return r >= 0 && r <
|
|
490
|
+
function Me(s) {
|
|
491
|
+
const r = s.lastIndexOf(".");
|
|
492
|
+
return r >= 0 && r < s.length - 1 ? s.slice(r + 1) : "";
|
|
493
493
|
}
|
|
494
|
-
function ze(
|
|
494
|
+
function ze(s) {
|
|
495
495
|
const r = document.createEvent("MouseEvents");
|
|
496
|
-
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null),
|
|
496
|
+
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(r);
|
|
497
497
|
}
|
|
498
498
|
function je() {
|
|
499
|
-
const
|
|
499
|
+
const s = navigator.userAgent, r = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
|
|
500
500
|
return r || i;
|
|
501
501
|
}
|
|
502
502
|
class tt {
|
|
@@ -527,8 +527,8 @@ class rt {
|
|
|
527
527
|
i.onload = () => {
|
|
528
528
|
i.onload = null, i.onerror = null, typeof i.result == "string" ? l(i.result) : v(new Error("Unexpected result type"));
|
|
529
529
|
}, i.onerror = () => {
|
|
530
|
-
const
|
|
531
|
-
i.onload = null, i.onerror = null, v(
|
|
530
|
+
const M = i.error ?? new Error("FileReader error");
|
|
531
|
+
i.onload = null, i.onerror = null, v(M);
|
|
532
532
|
}, i.readAsText(r);
|
|
533
533
|
});
|
|
534
534
|
}
|
|
@@ -538,17 +538,17 @@ class rt {
|
|
|
538
538
|
i.onload = () => {
|
|
539
539
|
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? l(i.result) : v(new Error("Unexpected result type"));
|
|
540
540
|
}, i.onerror = () => {
|
|
541
|
-
const
|
|
542
|
-
i.onload = null, i.onerror = null, v(
|
|
541
|
+
const M = i.error ?? new Error("FileReader error");
|
|
542
|
+
i.onload = null, i.onerror = null, v(M);
|
|
543
543
|
}, i.readAsArrayBuffer(r);
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
546
|
static readAsDataUrl(r) {
|
|
547
547
|
const i = new FileReader();
|
|
548
548
|
return new Promise((l, v) => {
|
|
549
|
-
i.onload = (
|
|
550
|
-
l(
|
|
551
|
-
}, i.onerror = (
|
|
549
|
+
i.onload = (M) => {
|
|
550
|
+
l(M);
|
|
551
|
+
}, i.onerror = (M) => v(M), i.readAsDataURL(r);
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
/** usage:
|
|
@@ -558,15 +558,15 @@ class rt {
|
|
|
558
558
|
static formatFileSize(r, i = 2, l) {
|
|
559
559
|
if (r === 0)
|
|
560
560
|
return "0 Bytes";
|
|
561
|
-
const v = 1024,
|
|
561
|
+
const v = 1024, M = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
562
562
|
let T = Math.floor(Math.log(r) / Math.log(v));
|
|
563
|
-
l &&
|
|
563
|
+
l && M.includes(l) && (T = M.indexOf(l));
|
|
564
564
|
const P = r / Math.pow(v, T);
|
|
565
|
-
return `${parseFloat(P.toFixed(i))} ${
|
|
565
|
+
return `${parseFloat(P.toFixed(i))} ${M[T]}`;
|
|
566
566
|
}
|
|
567
567
|
static save(r, i, l) {
|
|
568
568
|
const v = new Blob([r], { type: l });
|
|
569
|
-
|
|
569
|
+
Le(v, i);
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
class me {
|
|
@@ -589,31 +589,39 @@ class me {
|
|
|
589
589
|
return Object.keys(localStorage).filter((i) => i.startsWith(r));
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
var fe = /* @__PURE__ */ ((
|
|
593
|
-
class
|
|
592
|
+
var fe = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(fe || {});
|
|
593
|
+
class J {
|
|
594
594
|
static listeners = /* @__PURE__ */ new Set();
|
|
595
|
+
static enabled = !0;
|
|
595
596
|
static log(...r) {
|
|
596
|
-
|
|
597
|
+
J.doLog(fe.log, r);
|
|
597
598
|
}
|
|
598
599
|
static info(...r) {
|
|
599
|
-
|
|
600
|
+
J.doLog(fe.info, r);
|
|
600
601
|
}
|
|
601
602
|
static warn(...r) {
|
|
602
|
-
|
|
603
|
+
J.doLog(fe.warn, r);
|
|
603
604
|
}
|
|
604
605
|
static debug(...r) {
|
|
605
|
-
|
|
606
|
+
J.doLog(fe.debug, r);
|
|
606
607
|
}
|
|
607
608
|
static error(...r) {
|
|
608
|
-
|
|
609
|
+
J.doLog(fe.error, r);
|
|
610
|
+
}
|
|
611
|
+
static clearListeners() {
|
|
612
|
+
J.listeners.clear();
|
|
613
|
+
}
|
|
614
|
+
static setEnabled(r) {
|
|
615
|
+
J.enabled = r;
|
|
609
616
|
}
|
|
610
617
|
static doLog(r, i) {
|
|
618
|
+
if (!J.enabled) return;
|
|
611
619
|
const l = {
|
|
612
620
|
type: r,
|
|
613
621
|
args: i,
|
|
614
622
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
615
623
|
};
|
|
616
|
-
for (const v of
|
|
624
|
+
for (const v of J.listeners)
|
|
617
625
|
try {
|
|
618
626
|
if (v(l) === !1)
|
|
619
627
|
return;
|
|
@@ -627,20 +635,20 @@ class V {
|
|
|
627
635
|
try {
|
|
628
636
|
return r(v);
|
|
629
637
|
} finally {
|
|
630
|
-
|
|
638
|
+
J.listeners.delete(l);
|
|
631
639
|
}
|
|
632
640
|
};
|
|
633
|
-
return
|
|
641
|
+
return J.listeners.add(l), () => J.listeners.delete(l);
|
|
634
642
|
}
|
|
635
|
-
return
|
|
643
|
+
return J.listeners.add(r), () => J.listeners.delete(r);
|
|
636
644
|
}
|
|
637
645
|
}
|
|
638
|
-
const We = (
|
|
646
|
+
const We = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), Ue = (s, r) => s < r ? -1 : s === r ? 0 : 1, Pe = (s, r, i) => Ue(s, r) * (i ? 1 : -1), Ye = (s, r, i) => {
|
|
639
647
|
let l = 0;
|
|
640
|
-
return typeof
|
|
641
|
-
}, Ne = (
|
|
642
|
-
const v = i(
|
|
643
|
-
return Ye(v,
|
|
648
|
+
return typeof s == "string" && typeof r == "string" ? l = We(s, r, i) : l = Pe(s, r, i), l;
|
|
649
|
+
}, Ne = (s, r, i, l) => {
|
|
650
|
+
const v = i(s), M = i(r);
|
|
651
|
+
return Ye(v, M, l);
|
|
644
652
|
};
|
|
645
653
|
class nt {
|
|
646
654
|
static get(r) {
|
|
@@ -653,135 +661,135 @@ class nt {
|
|
|
653
661
|
me.remove(r);
|
|
654
662
|
}
|
|
655
663
|
}
|
|
656
|
-
Array.prototype.distinct = function(
|
|
664
|
+
Array.prototype.distinct = function(s) {
|
|
657
665
|
const r = this;
|
|
658
|
-
return
|
|
666
|
+
return s ? r.filter((l, v, M) => M.findIndex((T) => s(T, l)) === v) : r.filter((l, v, M) => M.indexOf(l) === v);
|
|
659
667
|
};
|
|
660
|
-
Array.prototype.filterBy = function(
|
|
661
|
-
return this.filter((r) =>
|
|
668
|
+
Array.prototype.filterBy = function(s) {
|
|
669
|
+
return this.filter((r) => s(r));
|
|
662
670
|
};
|
|
663
671
|
Array.prototype.first = function() {
|
|
664
672
|
return this?.length > 0 ? this[0] : null;
|
|
665
673
|
};
|
|
666
|
-
Array.prototype.groupBy = function(
|
|
674
|
+
Array.prototype.groupBy = function(s) {
|
|
667
675
|
return this.reduce((r, i) => {
|
|
668
|
-
const l =
|
|
676
|
+
const l = s(i);
|
|
669
677
|
return (r[l] = r[l] || []).push(i), r;
|
|
670
678
|
}, {});
|
|
671
679
|
};
|
|
672
|
-
Array.prototype.orderBy = function(
|
|
673
|
-
return this?.sort((i, l) => Ne(i, l,
|
|
680
|
+
Array.prototype.orderBy = function(s, r = !0) {
|
|
681
|
+
return this?.sort((i, l) => Ne(i, l, s, r)), this;
|
|
674
682
|
};
|
|
675
|
-
Array.prototype.removeBy = function(
|
|
676
|
-
return this.filter((i) =>
|
|
683
|
+
Array.prototype.removeBy = function(s, r) {
|
|
684
|
+
return this.filter((i) => s(i) !== r);
|
|
677
685
|
};
|
|
678
686
|
var we = { exports: {} }, qe = we.exports, Ee;
|
|
679
687
|
function He() {
|
|
680
|
-
return Ee || (Ee = 1, (function(
|
|
688
|
+
return Ee || (Ee = 1, (function(s, r) {
|
|
681
689
|
(function(i, l) {
|
|
682
|
-
|
|
690
|
+
s.exports = l();
|
|
683
691
|
})(qe, (function() {
|
|
684
|
-
var i = 1e3, l = 6e4, v = 36e5,
|
|
685
|
-
var f = ["th", "st", "nd", "rd"],
|
|
686
|
-
return "[" + m + (f[(
|
|
687
|
-
} }, oe = function(m, f,
|
|
688
|
-
var
|
|
689
|
-
return !
|
|
692
|
+
var i = 1e3, l = 6e4, v = 36e5, M = "millisecond", T = "second", P = "minute", Y = "hour", w = "day", N = "week", W = "month", X = "quarter", K = "year", V = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ce = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, de = { 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(m) {
|
|
693
|
+
var f = ["th", "st", "nd", "rd"], h = m % 100;
|
|
694
|
+
return "[" + m + (f[(h - 20) % 10] || f[h] || f[0]) + "]";
|
|
695
|
+
} }, oe = function(m, f, h) {
|
|
696
|
+
var a = String(m);
|
|
697
|
+
return !a || a.length >= f ? m : "" + Array(f + 1 - a.length).join(h) + m;
|
|
690
698
|
}, ye = { s: oe, z: function(m) {
|
|
691
|
-
var f = -m.utcOffset(),
|
|
692
|
-
return (f <= 0 ? "+" : "-") + oe(
|
|
693
|
-
}, m: function m(f,
|
|
694
|
-
if (f.date() <
|
|
695
|
-
var
|
|
696
|
-
return +(-(
|
|
699
|
+
var f = -m.utcOffset(), h = Math.abs(f), a = Math.floor(h / 60), u = h % 60;
|
|
700
|
+
return (f <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
|
|
701
|
+
}, m: function m(f, h) {
|
|
702
|
+
if (f.date() < h.date()) return -m(h, f);
|
|
703
|
+
var a = 12 * (h.year() - f.year()) + (h.month() - f.month()), u = f.clone().add(a, W), c = h - u < 0, y = f.clone().add(a + (c ? -1 : 1), W);
|
|
704
|
+
return +(-(a + (h - u) / (c ? u - y : y - u)) || 0);
|
|
697
705
|
}, a: function(m) {
|
|
698
706
|
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
699
707
|
}, p: function(m) {
|
|
700
|
-
return { M: W, y: K, w: N, d: w, D:
|
|
708
|
+
return { M: W, y: K, w: N, d: w, D: V, h: Y, m: P, s: T, ms: M, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
701
709
|
}, u: function(m) {
|
|
702
710
|
return m === void 0;
|
|
703
711
|
} }, se = "en", q = {};
|
|
704
712
|
q[se] = de;
|
|
705
713
|
var R = "$isDayjsObject", e = function(m) {
|
|
706
714
|
return m instanceof g || !(!m || !m[R]);
|
|
707
|
-
}, t = function m(f,
|
|
708
|
-
var
|
|
715
|
+
}, t = function m(f, h, a) {
|
|
716
|
+
var u;
|
|
709
717
|
if (!f) return se;
|
|
710
718
|
if (typeof f == "string") {
|
|
711
|
-
var
|
|
712
|
-
q[
|
|
719
|
+
var c = f.toLowerCase();
|
|
720
|
+
q[c] && (u = c), h && (q[c] = h, u = c);
|
|
713
721
|
var y = f.split("-");
|
|
714
|
-
if (!
|
|
722
|
+
if (!u && y.length > 1) return m(y[0]);
|
|
715
723
|
} else {
|
|
716
724
|
var p = f.name;
|
|
717
|
-
q[p] = f,
|
|
725
|
+
q[p] = f, u = p;
|
|
718
726
|
}
|
|
719
|
-
return !
|
|
727
|
+
return !a && u && (se = u), u || !a && se;
|
|
720
728
|
}, n = function(m, f) {
|
|
721
729
|
if (e(m)) return m.clone();
|
|
722
|
-
var
|
|
723
|
-
return
|
|
724
|
-
},
|
|
725
|
-
|
|
730
|
+
var h = typeof f == "object" ? f : {};
|
|
731
|
+
return h.date = m, h.args = arguments, new g(h);
|
|
732
|
+
}, o = ye;
|
|
733
|
+
o.l = t, o.i = e, o.w = function(m, f) {
|
|
726
734
|
return n(m, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
|
|
727
735
|
};
|
|
728
736
|
var g = (function() {
|
|
729
|
-
function m(
|
|
730
|
-
this.$L = t(
|
|
737
|
+
function m(h) {
|
|
738
|
+
this.$L = t(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[R] = !0;
|
|
731
739
|
}
|
|
732
740
|
var f = m.prototype;
|
|
733
|
-
return f.parse = function(
|
|
734
|
-
this.$d = (function(
|
|
735
|
-
var
|
|
736
|
-
if (
|
|
737
|
-
if (
|
|
738
|
-
if (
|
|
739
|
-
if (typeof
|
|
740
|
-
var y =
|
|
741
|
+
return f.parse = function(h) {
|
|
742
|
+
this.$d = (function(a) {
|
|
743
|
+
var u = a.date, c = a.utc;
|
|
744
|
+
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
745
|
+
if (o.u(u)) return /* @__PURE__ */ new Date();
|
|
746
|
+
if (u instanceof Date) return new Date(u);
|
|
747
|
+
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
748
|
+
var y = u.match(ie);
|
|
741
749
|
if (y) {
|
|
742
750
|
var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
|
|
743
|
-
return
|
|
751
|
+
return c ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _);
|
|
744
752
|
}
|
|
745
753
|
}
|
|
746
|
-
return new Date(
|
|
747
|
-
})(
|
|
754
|
+
return new Date(u);
|
|
755
|
+
})(h), this.init();
|
|
748
756
|
}, f.init = function() {
|
|
749
|
-
var
|
|
750
|
-
this.$y =
|
|
757
|
+
var h = this.$d;
|
|
758
|
+
this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
|
|
751
759
|
}, f.$utils = function() {
|
|
752
|
-
return
|
|
760
|
+
return o;
|
|
753
761
|
}, f.isValid = function() {
|
|
754
762
|
return this.$d.toString() !== ee;
|
|
755
|
-
}, f.isSame = function(
|
|
756
|
-
var
|
|
757
|
-
return this.startOf(
|
|
758
|
-
}, f.isAfter = function(
|
|
759
|
-
return n(
|
|
760
|
-
}, f.isBefore = function(
|
|
761
|
-
return this.endOf(
|
|
762
|
-
}, f.$g = function(
|
|
763
|
-
return
|
|
763
|
+
}, f.isSame = function(h, a) {
|
|
764
|
+
var u = n(h);
|
|
765
|
+
return this.startOf(a) <= u && u <= this.endOf(a);
|
|
766
|
+
}, f.isAfter = function(h, a) {
|
|
767
|
+
return n(h) < this.startOf(a);
|
|
768
|
+
}, f.isBefore = function(h, a) {
|
|
769
|
+
return this.endOf(a) < n(h);
|
|
770
|
+
}, f.$g = function(h, a, u) {
|
|
771
|
+
return o.u(h) ? this[a] : this.set(u, h);
|
|
764
772
|
}, f.unix = function() {
|
|
765
773
|
return Math.floor(this.valueOf() / 1e3);
|
|
766
774
|
}, f.valueOf = function() {
|
|
767
775
|
return this.$d.getTime();
|
|
768
|
-
}, f.startOf = function(
|
|
769
|
-
var
|
|
770
|
-
var k =
|
|
771
|
-
return
|
|
776
|
+
}, f.startOf = function(h, a) {
|
|
777
|
+
var u = this, c = !!o.u(a) || a, y = o.p(h), p = function(D, E) {
|
|
778
|
+
var k = o.w(u.$u ? Date.UTC(u.$y, E, D) : new Date(u.$y, E, D), u);
|
|
779
|
+
return c ? k : k.endOf(w);
|
|
772
780
|
}, _ = function(D, E) {
|
|
773
|
-
return
|
|
774
|
-
}, d = this.$W,
|
|
781
|
+
return o.w(u.toDate()[D].apply(u.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(E)), u);
|
|
782
|
+
}, d = this.$W, O = this.$M, C = this.$D, B = "set" + (this.$u ? "UTC" : "");
|
|
775
783
|
switch (y) {
|
|
776
784
|
case K:
|
|
777
|
-
return
|
|
785
|
+
return c ? p(1, 0) : p(31, 11);
|
|
778
786
|
case W:
|
|
779
|
-
return
|
|
787
|
+
return c ? p(1, O) : p(0, O + 1);
|
|
780
788
|
case N:
|
|
781
789
|
var j = this.$locale().weekStart || 0, b = (d < j ? d + 7 : d) - j;
|
|
782
|
-
return p(
|
|
790
|
+
return p(c ? C - b : C + (6 - b), O);
|
|
783
791
|
case w:
|
|
784
|
-
case
|
|
792
|
+
case V:
|
|
785
793
|
return _(B + "Hours", 0);
|
|
786
794
|
case Y:
|
|
787
795
|
return _(B + "Minutes", 1);
|
|
@@ -792,76 +800,76 @@ function He() {
|
|
|
792
800
|
default:
|
|
793
801
|
return this.clone();
|
|
794
802
|
}
|
|
795
|
-
}, f.endOf = function(
|
|
796
|
-
return this.startOf(
|
|
797
|
-
}, f.$set = function(
|
|
798
|
-
var
|
|
799
|
-
if (
|
|
800
|
-
var d = this.clone().set(
|
|
801
|
-
d.$d[p](_), d.init(), this.$d = d.set(
|
|
803
|
+
}, f.endOf = function(h) {
|
|
804
|
+
return this.startOf(h, !1);
|
|
805
|
+
}, f.$set = function(h, a) {
|
|
806
|
+
var u, c = o.p(h), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[Y] = y + "Hours", u[P] = y + "Minutes", u[T] = y + "Seconds", u[M] = y + "Milliseconds", u)[c], _ = c === w ? this.$D + (a - this.$W) : a;
|
|
807
|
+
if (c === W || c === K) {
|
|
808
|
+
var d = this.clone().set(V, 1);
|
|
809
|
+
d.$d[p](_), d.init(), this.$d = d.set(V, Math.min(this.$D, d.daysInMonth())).$d;
|
|
802
810
|
} else p && this.$d[p](_);
|
|
803
811
|
return this.init(), this;
|
|
804
|
-
}, f.set = function(
|
|
805
|
-
return this.clone().$set(
|
|
806
|
-
}, f.get = function(
|
|
807
|
-
return this[
|
|
808
|
-
}, f.add = function(
|
|
809
|
-
var
|
|
810
|
-
|
|
811
|
-
var y =
|
|
812
|
-
var C = n(
|
|
813
|
-
return
|
|
812
|
+
}, f.set = function(h, a) {
|
|
813
|
+
return this.clone().$set(h, a);
|
|
814
|
+
}, f.get = function(h) {
|
|
815
|
+
return this[o.p(h)]();
|
|
816
|
+
}, f.add = function(h, a) {
|
|
817
|
+
var u, c = this;
|
|
818
|
+
h = Number(h);
|
|
819
|
+
var y = o.p(a), p = function(O) {
|
|
820
|
+
var C = n(c);
|
|
821
|
+
return o.w(C.date(C.date() + Math.round(O * h)), c);
|
|
814
822
|
};
|
|
815
|
-
if (y === W) return this.set(W, this.$M +
|
|
816
|
-
if (y === K) return this.set(K, this.$y +
|
|
823
|
+
if (y === W) return this.set(W, this.$M + h);
|
|
824
|
+
if (y === K) return this.set(K, this.$y + h);
|
|
817
825
|
if (y === w) return p(1);
|
|
818
826
|
if (y === N) return p(7);
|
|
819
|
-
var _ = (
|
|
820
|
-
return
|
|
821
|
-
}, f.subtract = function(
|
|
822
|
-
return this.add(-1 *
|
|
823
|
-
}, f.format = function(
|
|
824
|
-
var
|
|
825
|
-
if (!this.isValid()) return
|
|
826
|
-
var
|
|
827
|
-
return E && (E[k] || E(
|
|
827
|
+
var _ = (u = {}, u[P] = l, u[Y] = v, u[T] = i, u)[y] || 1, d = this.$d.getTime() + h * _;
|
|
828
|
+
return o.w(d, this);
|
|
829
|
+
}, f.subtract = function(h, a) {
|
|
830
|
+
return this.add(-1 * h, a);
|
|
831
|
+
}, f.format = function(h) {
|
|
832
|
+
var a = this, u = this.$locale();
|
|
833
|
+
if (!this.isValid()) return u.invalidDate || ee;
|
|
834
|
+
var c = h || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, O = u.weekdays, C = u.months, B = u.meridiem, j = function(E, k, A, F) {
|
|
835
|
+
return E && (E[k] || E(a, c)) || A[k].slice(0, F);
|
|
828
836
|
}, b = function(E) {
|
|
829
|
-
return
|
|
837
|
+
return o.s(p % 12 || 12, E, "0");
|
|
830
838
|
}, D = B || function(E, k, A) {
|
|
831
839
|
var F = E < 12 ? "AM" : "PM";
|
|
832
840
|
return A ? F.toLowerCase() : F;
|
|
833
841
|
};
|
|
834
|
-
return
|
|
842
|
+
return c.replace(ce, (function(E, k) {
|
|
835
843
|
return k || (function(A) {
|
|
836
844
|
switch (A) {
|
|
837
845
|
case "YY":
|
|
838
|
-
return String(
|
|
846
|
+
return String(a.$y).slice(-2);
|
|
839
847
|
case "YYYY":
|
|
840
|
-
return
|
|
848
|
+
return o.s(a.$y, 4, "0");
|
|
841
849
|
case "M":
|
|
842
850
|
return d + 1;
|
|
843
851
|
case "MM":
|
|
844
|
-
return
|
|
852
|
+
return o.s(d + 1, 2, "0");
|
|
845
853
|
case "MMM":
|
|
846
|
-
return j(
|
|
854
|
+
return j(u.monthsShort, d, C, 3);
|
|
847
855
|
case "MMMM":
|
|
848
856
|
return j(C, d);
|
|
849
857
|
case "D":
|
|
850
|
-
return
|
|
858
|
+
return a.$D;
|
|
851
859
|
case "DD":
|
|
852
|
-
return
|
|
860
|
+
return o.s(a.$D, 2, "0");
|
|
853
861
|
case "d":
|
|
854
|
-
return String(
|
|
862
|
+
return String(a.$W);
|
|
855
863
|
case "dd":
|
|
856
|
-
return j(
|
|
864
|
+
return j(u.weekdaysMin, a.$W, O, 2);
|
|
857
865
|
case "ddd":
|
|
858
|
-
return j(
|
|
866
|
+
return j(u.weekdaysShort, a.$W, O, 3);
|
|
859
867
|
case "dddd":
|
|
860
|
-
return
|
|
868
|
+
return O[a.$W];
|
|
861
869
|
case "H":
|
|
862
870
|
return String(p);
|
|
863
871
|
case "HH":
|
|
864
|
-
return
|
|
872
|
+
return o.s(p, 2, "0");
|
|
865
873
|
case "h":
|
|
866
874
|
return b(1);
|
|
867
875
|
case "hh":
|
|
@@ -873,13 +881,13 @@ function He() {
|
|
|
873
881
|
case "m":
|
|
874
882
|
return String(_);
|
|
875
883
|
case "mm":
|
|
876
|
-
return
|
|
884
|
+
return o.s(_, 2, "0");
|
|
877
885
|
case "s":
|
|
878
|
-
return String(
|
|
886
|
+
return String(a.$s);
|
|
879
887
|
case "ss":
|
|
880
|
-
return
|
|
888
|
+
return o.s(a.$s, 2, "0");
|
|
881
889
|
case "SSS":
|
|
882
|
-
return
|
|
890
|
+
return o.s(a.$ms, 3, "0");
|
|
883
891
|
case "Z":
|
|
884
892
|
return y;
|
|
885
893
|
}
|
|
@@ -888,49 +896,49 @@ function He() {
|
|
|
888
896
|
}));
|
|
889
897
|
}, f.utcOffset = function() {
|
|
890
898
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
891
|
-
}, f.diff = function(
|
|
892
|
-
var
|
|
893
|
-
return
|
|
899
|
+
}, f.diff = function(h, a, u) {
|
|
900
|
+
var c, y = this, p = o.p(a), _ = n(h), d = (_.utcOffset() - this.utcOffset()) * l, O = this - _, C = function() {
|
|
901
|
+
return o.m(y, _);
|
|
894
902
|
};
|
|
895
903
|
switch (p) {
|
|
896
904
|
case K:
|
|
897
|
-
|
|
905
|
+
c = C() / 12;
|
|
898
906
|
break;
|
|
899
907
|
case W:
|
|
900
|
-
|
|
908
|
+
c = C();
|
|
901
909
|
break;
|
|
902
910
|
case X:
|
|
903
|
-
|
|
911
|
+
c = C() / 3;
|
|
904
912
|
break;
|
|
905
913
|
case N:
|
|
906
|
-
|
|
914
|
+
c = (O - d) / 6048e5;
|
|
907
915
|
break;
|
|
908
916
|
case w:
|
|
909
|
-
|
|
917
|
+
c = (O - d) / 864e5;
|
|
910
918
|
break;
|
|
911
919
|
case Y:
|
|
912
|
-
|
|
920
|
+
c = O / v;
|
|
913
921
|
break;
|
|
914
922
|
case P:
|
|
915
|
-
|
|
923
|
+
c = O / l;
|
|
916
924
|
break;
|
|
917
925
|
case T:
|
|
918
|
-
|
|
926
|
+
c = O / i;
|
|
919
927
|
break;
|
|
920
928
|
default:
|
|
921
|
-
|
|
929
|
+
c = O;
|
|
922
930
|
}
|
|
923
|
-
return
|
|
931
|
+
return u ? c : o.a(c);
|
|
924
932
|
}, f.daysInMonth = function() {
|
|
925
933
|
return this.endOf(W).$D;
|
|
926
934
|
}, f.$locale = function() {
|
|
927
935
|
return q[this.$L];
|
|
928
|
-
}, f.locale = function(
|
|
929
|
-
if (!
|
|
930
|
-
var
|
|
931
|
-
return
|
|
936
|
+
}, f.locale = function(h, a) {
|
|
937
|
+
if (!h) return this.$L;
|
|
938
|
+
var u = this.clone(), c = t(h, a, !0);
|
|
939
|
+
return c && (u.$L = c), u;
|
|
932
940
|
}, f.clone = function() {
|
|
933
|
-
return
|
|
941
|
+
return o.w(this.$d, this);
|
|
934
942
|
}, f.toDate = function() {
|
|
935
943
|
return new Date(this.valueOf());
|
|
936
944
|
}, f.toJSON = function() {
|
|
@@ -941,7 +949,7 @@ function He() {
|
|
|
941
949
|
return this.$d.toUTCString();
|
|
942
950
|
}, m;
|
|
943
951
|
})(), S = g.prototype;
|
|
944
|
-
return n.prototype = S, [["$ms",
|
|
952
|
+
return n.prototype = S, [["$ms", M], ["$s", T], ["$m", P], ["$H", Y], ["$W", w], ["$M", W], ["$y", K], ["$D", V]].forEach((function(m) {
|
|
945
953
|
S[m[1]] = function(f) {
|
|
946
954
|
return this.$g(f, m[0], m[1]);
|
|
947
955
|
};
|
|
@@ -954,22 +962,22 @@ function He() {
|
|
|
954
962
|
})(we)), we.exports;
|
|
955
963
|
}
|
|
956
964
|
var Ke = He();
|
|
957
|
-
const
|
|
958
|
-
var ke = { exports: {} }, Je = ke.exports,
|
|
965
|
+
const Z = /* @__PURE__ */ be(Ke);
|
|
966
|
+
var ke = { exports: {} }, Je = ke.exports, Oe;
|
|
959
967
|
function Qe() {
|
|
960
|
-
return
|
|
968
|
+
return Oe || (Oe = 1, (function(s, r) {
|
|
961
969
|
(function(i, l) {
|
|
962
|
-
|
|
970
|
+
s.exports = l();
|
|
963
971
|
})(Je, (function() {
|
|
964
972
|
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" };
|
|
965
|
-
return function(l, v,
|
|
973
|
+
return function(l, v, M) {
|
|
966
974
|
var T = v.prototype, P = T.format;
|
|
967
|
-
|
|
975
|
+
M.en.formats = i, T.format = function(Y) {
|
|
968
976
|
Y === void 0 && (Y = "YYYY-MM-DDTHH:mm:ssZ");
|
|
969
977
|
var w = this.$locale().formats, N = (function(W, X) {
|
|
970
|
-
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K,
|
|
978
|
+
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V, ee) {
|
|
971
979
|
var ie = ee && ee.toUpperCase();
|
|
972
|
-
return
|
|
980
|
+
return V || X[ee] || i[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ce, de, oe) {
|
|
973
981
|
return de || oe.slice(1);
|
|
974
982
|
}));
|
|
975
983
|
}));
|
|
@@ -982,36 +990,42 @@ function Qe() {
|
|
|
982
990
|
}
|
|
983
991
|
var Ve = Qe();
|
|
984
992
|
const Ze = /* @__PURE__ */ be(Ve);
|
|
985
|
-
|
|
986
|
-
Date.prototype.isAfter = function(
|
|
987
|
-
return
|
|
993
|
+
Z.extend(Ze);
|
|
994
|
+
Date.prototype.isAfter = function(s, r) {
|
|
995
|
+
return Z(this).isAfter(s, r);
|
|
988
996
|
};
|
|
989
|
-
Date.prototype.isBefore = function(
|
|
990
|
-
return
|
|
997
|
+
Date.prototype.isBefore = function(s, r) {
|
|
998
|
+
return Z(this).isBefore(s, r);
|
|
991
999
|
};
|
|
992
|
-
Date.prototype.format = function(
|
|
993
|
-
return
|
|
1000
|
+
Date.prototype.format = function(s) {
|
|
1001
|
+
return Z(this).format(s);
|
|
994
1002
|
};
|
|
995
1003
|
Date.prototype.isValid = function() {
|
|
996
|
-
return
|
|
1004
|
+
return Z(this).isValid();
|
|
997
1005
|
};
|
|
998
|
-
Date.prototype.add = function(
|
|
999
|
-
return
|
|
1006
|
+
Date.prototype.add = function(s, r) {
|
|
1007
|
+
return Z(this).add(s, r).toDate();
|
|
1000
1008
|
};
|
|
1001
|
-
Date.prototype.subtract = function(
|
|
1002
|
-
return
|
|
1009
|
+
Date.prototype.subtract = function(s, r) {
|
|
1010
|
+
return Z(this).subtract(s, r).toDate();
|
|
1003
1011
|
};
|
|
1004
1012
|
Date.prototype.firstDayOfMonth = function() {
|
|
1005
|
-
return
|
|
1013
|
+
return Z(this).startOf("month").toDate();
|
|
1006
1014
|
};
|
|
1007
1015
|
Date.prototype.lastDayOfMonth = function() {
|
|
1008
|
-
return
|
|
1016
|
+
return Z(this).endOf("month").toDate();
|
|
1017
|
+
};
|
|
1018
|
+
Date.prototype.set = function(s, r) {
|
|
1019
|
+
return Z(this).set(s, r).toDate();
|
|
1020
|
+
};
|
|
1021
|
+
Date.prototype.diff = function(s, r) {
|
|
1022
|
+
return Z(this).diff(s, r);
|
|
1009
1023
|
};
|
|
1010
|
-
Date.prototype.
|
|
1011
|
-
return
|
|
1024
|
+
Date.prototype.startOf = function(s) {
|
|
1025
|
+
return Z(this).startOf(s).toDate();
|
|
1012
1026
|
};
|
|
1013
|
-
Date.prototype.
|
|
1014
|
-
return
|
|
1027
|
+
Date.prototype.endOf = function(s) {
|
|
1028
|
+
return Z(this).endOf(s).toDate();
|
|
1015
1029
|
};
|
|
1016
1030
|
String.prototype.capitalize = function() {
|
|
1017
1031
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
@@ -1102,10 +1116,11 @@ export {
|
|
|
1102
1116
|
tt as EnumHelper,
|
|
1103
1117
|
rt as FileHelper,
|
|
1104
1118
|
me as LocalStorageHelper,
|
|
1105
|
-
|
|
1119
|
+
J as LoggerHelper,
|
|
1120
|
+
fe as LoggerType,
|
|
1106
1121
|
Ge as ScreenBreakpoints,
|
|
1107
1122
|
nt as TokenHelper,
|
|
1108
1123
|
Xe as copyToClipboard,
|
|
1109
|
-
|
|
1124
|
+
Le as saveAs,
|
|
1110
1125
|
Ne as sortHelper
|
|
1111
1126
|
};
|