@oardi/ts-utils 0.0.11 → 0.0.13
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/enums/browsertype.enum.d.ts +14 -0
- package/enums/browsertype.enum.d.ts.map +1 -0
- package/extensions/date-extension.d.ts.map +1 -1
- package/extensions/string-extensions.d.ts +1 -0
- package/extensions/string-extensions.d.ts.map +1 -1
- package/helpers/sort.helper.d.ts.map +1 -1
- package/index.cjs.js +6 -6
- package/index.es.js +306 -304
- package/index.umd.js +6 -6
- package/interfaces/browser.interface.d.ts +6 -0
- package/interfaces/browser.interface.d.ts.map +1 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/services/browser.service.d.ts +5 -21
- package/services/browser.service.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/size.type.d.ts +2 -0
- package/types/size.type.d.ts.map +1 -0
package/index.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
async function
|
|
2
|
-
const l = s?.mimeType ??
|
|
1
|
+
async function $e(i, r, s) {
|
|
2
|
+
const l = s?.mimeType ?? Le(r), $ = Re(i, l);
|
|
3
3
|
if ("showSaveFilePicker" in window && s?.showSaveFilePicker)
|
|
4
4
|
try {
|
|
5
5
|
const q = await (await window.showSaveFilePicker({
|
|
6
6
|
suggestedName: r,
|
|
7
|
-
types: [{ description: "Datei", accept: { [l]: [`.${
|
|
7
|
+
types: [{ description: "Datei", accept: { [l]: [`.${De(r)}`] } }]
|
|
8
8
|
})).createWritable();
|
|
9
9
|
await q.write($), await q.close();
|
|
10
10
|
return;
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
|
-
const C = URL.createObjectURL($),
|
|
14
|
-
|
|
15
|
-
document.body.removeChild(
|
|
16
|
-
}, 0),
|
|
13
|
+
const C = URL.createObjectURL($), j = document.createElement("a");
|
|
14
|
+
j.href = C, j.download = r, j.rel = "noopener", j.style.display = "none", document.body.appendChild(j), Ae(j), window.setTimeout(() => {
|
|
15
|
+
document.body.removeChild(j), URL.revokeObjectURL(C);
|
|
16
|
+
}, 0), Ie() && window.open(C, "_blank", "noopener,noreferrer");
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Re(i, r) {
|
|
19
19
|
if (i instanceof Blob)
|
|
20
20
|
return i.type ? i : new Blob([i], { type: r });
|
|
21
21
|
if (i instanceof ArrayBuffer || i instanceof Uint8Array) {
|
|
@@ -24,8 +24,8 @@ function $e(i, r) {
|
|
|
24
24
|
}
|
|
25
25
|
return new Blob([i], { type: r || "text/plain;charset=utf-8" });
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
switch (
|
|
27
|
+
function Le(i) {
|
|
28
|
+
switch (De(i).toLowerCase()) {
|
|
29
29
|
case "txt":
|
|
30
30
|
return "text/plain;charset=utf-8";
|
|
31
31
|
case "csv":
|
|
@@ -47,15 +47,15 @@ function Re(i) {
|
|
|
47
47
|
return "application/octet-stream";
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function De(i) {
|
|
51
51
|
const r = i.lastIndexOf(".");
|
|
52
52
|
return r >= 0 && r < i.length - 1 ? i.slice(r + 1) : "";
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Ae(i) {
|
|
55
55
|
const r = document.createEvent("MouseEvents");
|
|
56
56
|
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), i.dispatchEvent(r);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Ie() {
|
|
59
59
|
const i = navigator.userAgent, r = /iPad|iPhone|iPod/.test(i), s = /^((?!chrome|android).)*safari/i.test(i);
|
|
60
60
|
return r || s;
|
|
61
61
|
}
|
|
@@ -72,16 +72,16 @@ class Qe {
|
|
|
72
72
|
}));
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const Te = (i, r, s) => i.localeCompare(r) * (s ? 1 : -1), Fe = (i, r) => i < r ? -1 : i === r ? 0 : 1, je = (i, r, s) => Fe(i, r) * (s ? 1 : -1), ze = (i, r, s) => {
|
|
76
76
|
let l = 0;
|
|
77
|
-
return typeof i == "string" && typeof r == "string" ? l =
|
|
78
|
-
},
|
|
77
|
+
return typeof i == "string" && typeof r == "string" ? l = Te(i, r, s) : l = je(i, r, s), l;
|
|
78
|
+
}, Be = (i, r, s, l) => {
|
|
79
79
|
const $ = s(i), C = s(r);
|
|
80
80
|
return ze($, C, l);
|
|
81
81
|
};
|
|
82
82
|
Array.prototype.distinct = function(i) {
|
|
83
83
|
const r = this;
|
|
84
|
-
return i ? r.filter((l, $, C) => C.findIndex((
|
|
84
|
+
return i ? r.filter((l, $, C) => C.findIndex((j) => i(j, l)) === $) : r.filter((l, $, C) => C.indexOf(l) === $);
|
|
85
85
|
};
|
|
86
86
|
Array.prototype.filterBy = function(i) {
|
|
87
87
|
return this.filter((r) => {
|
|
@@ -99,118 +99,118 @@ Array.prototype.groupBy = function(i) {
|
|
|
99
99
|
}, {});
|
|
100
100
|
};
|
|
101
101
|
Array.prototype.orderBy = function(i, r = !0) {
|
|
102
|
-
return this?.sort((s, l) =>
|
|
102
|
+
return this?.sort((s, l) => Be(s, l, i, r)), this;
|
|
103
103
|
};
|
|
104
104
|
Array.prototype.removeBy = function(i, r) {
|
|
105
105
|
return this.filter((s) => i(s) !== r);
|
|
106
106
|
};
|
|
107
|
-
function
|
|
107
|
+
function Ce(i) {
|
|
108
108
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
112
|
-
return
|
|
110
|
+
var ye = { exports: {} }, We = ye.exports, Se;
|
|
111
|
+
function Ue() {
|
|
112
|
+
return Se || (Se = 1, (function(i, r) {
|
|
113
113
|
(function(s, l) {
|
|
114
114
|
i.exports = l();
|
|
115
|
-
})(We, function() {
|
|
116
|
-
var s = 1e3, l = 6e4, $ = 36e5, C = "millisecond",
|
|
117
|
-
var
|
|
118
|
-
return "[" + m + (
|
|
119
|
-
} },
|
|
115
|
+
})(We, (function() {
|
|
116
|
+
var s = 1e3, l = 6e4, $ = 36e5, C = "millisecond", j = "second", H = "minute", q = "hour", w = "day", P = "week", W = "month", X = "quarter", K = "year", Q = "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+)?$/, he = /\[([^\]]+)]|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, le = { 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) {
|
|
117
|
+
var f = ["th", "st", "nd", "rd"], c = m % 100;
|
|
118
|
+
return "[" + m + (f[(c - 20) % 10] || f[c] || f[0]) + "]";
|
|
119
|
+
} }, oe = function(m, f, c) {
|
|
120
120
|
var a = String(m);
|
|
121
|
-
return !a || a.length >=
|
|
122
|
-
},
|
|
123
|
-
var
|
|
124
|
-
return (
|
|
125
|
-
}, m: function m(
|
|
126
|
-
if (
|
|
127
|
-
var a = 12 * (c.year() -
|
|
121
|
+
return !a || a.length >= f ? m : "" + Array(f + 1 - a.length).join(c) + m;
|
|
122
|
+
}, me = { s: oe, z: function(m) {
|
|
123
|
+
var f = -m.utcOffset(), c = Math.abs(f), a = Math.floor(c / 60), u = c % 60;
|
|
124
|
+
return (f <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
|
|
125
|
+
}, m: function m(f, c) {
|
|
126
|
+
if (f.date() < c.date()) return -m(c, f);
|
|
127
|
+
var a = 12 * (c.year() - f.year()) + (c.month() - f.month()), u = f.clone().add(a, W), h = c - u < 0, y = f.clone().add(a + (h ? -1 : 1), W);
|
|
128
128
|
return +(-(a + (c - u) / (h ? u - y : y - u)) || 0);
|
|
129
129
|
}, a: function(m) {
|
|
130
130
|
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
131
131
|
}, p: function(m) {
|
|
132
|
-
return { M:
|
|
132
|
+
return { M: W, y: K, w: P, d: w, D: Q, h: q, m: H, s: j, ms: C, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
133
133
|
}, u: function(m) {
|
|
134
134
|
return m === void 0;
|
|
135
|
-
} },
|
|
136
|
-
Y[
|
|
135
|
+
} }, se = "en", Y = {};
|
|
136
|
+
Y[se] = le;
|
|
137
137
|
var R = "$isDayjsObject", e = function(m) {
|
|
138
138
|
return m instanceof g || !(!m || !m[R]);
|
|
139
|
-
}, t = function m(
|
|
139
|
+
}, t = function m(f, c, a) {
|
|
140
140
|
var u;
|
|
141
|
-
if (!
|
|
142
|
-
if (typeof
|
|
143
|
-
var h =
|
|
141
|
+
if (!f) return se;
|
|
142
|
+
if (typeof f == "string") {
|
|
143
|
+
var h = f.toLowerCase();
|
|
144
144
|
Y[h] && (u = h), c && (Y[h] = c, u = h);
|
|
145
|
-
var y =
|
|
145
|
+
var y = f.split("-");
|
|
146
146
|
if (!u && y.length > 1) return m(y[0]);
|
|
147
147
|
} else {
|
|
148
|
-
var p =
|
|
149
|
-
Y[p] =
|
|
148
|
+
var p = f.name;
|
|
149
|
+
Y[p] = f, u = p;
|
|
150
150
|
}
|
|
151
|
-
return !a && u && (
|
|
152
|
-
}, n = function(m,
|
|
151
|
+
return !a && u && (se = u), u || !a && se;
|
|
152
|
+
}, n = function(m, f) {
|
|
153
153
|
if (e(m)) return m.clone();
|
|
154
|
-
var c = typeof
|
|
154
|
+
var c = typeof f == "object" ? f : {};
|
|
155
155
|
return c.date = m, c.args = arguments, new g(c);
|
|
156
|
-
}, o =
|
|
157
|
-
o.l = t, o.i = e, o.w = function(m,
|
|
158
|
-
return n(m, { locale:
|
|
156
|
+
}, o = me;
|
|
157
|
+
o.l = t, o.i = e, o.w = function(m, f) {
|
|
158
|
+
return n(m, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
|
|
159
159
|
};
|
|
160
|
-
var g = function() {
|
|
160
|
+
var g = (function() {
|
|
161
161
|
function m(c) {
|
|
162
162
|
this.$L = t(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[R] = !0;
|
|
163
163
|
}
|
|
164
|
-
var
|
|
165
|
-
return
|
|
166
|
-
this.$d = function(a) {
|
|
164
|
+
var f = m.prototype;
|
|
165
|
+
return f.parse = function(c) {
|
|
166
|
+
this.$d = (function(a) {
|
|
167
167
|
var u = a.date, h = a.utc;
|
|
168
168
|
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
169
169
|
if (o.u(u)) return /* @__PURE__ */ new Date();
|
|
170
170
|
if (u instanceof Date) return new Date(u);
|
|
171
171
|
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
172
|
-
var y = u.match(
|
|
172
|
+
var y = u.match(ie);
|
|
173
173
|
if (y) {
|
|
174
174
|
var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
|
|
175
175
|
return h ? 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, _);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
return new Date(u);
|
|
179
|
-
}(c), this.init();
|
|
180
|
-
},
|
|
179
|
+
})(c), this.init();
|
|
180
|
+
}, f.init = function() {
|
|
181
181
|
var c = this.$d;
|
|
182
182
|
this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
|
|
183
|
-
},
|
|
183
|
+
}, f.$utils = function() {
|
|
184
184
|
return o;
|
|
185
|
-
},
|
|
186
|
-
return this.$d.toString() !==
|
|
187
|
-
},
|
|
185
|
+
}, f.isValid = function() {
|
|
186
|
+
return this.$d.toString() !== ee;
|
|
187
|
+
}, f.isSame = function(c, a) {
|
|
188
188
|
var u = n(c);
|
|
189
189
|
return this.startOf(a) <= u && u <= this.endOf(a);
|
|
190
|
-
},
|
|
190
|
+
}, f.isAfter = function(c, a) {
|
|
191
191
|
return n(c) < this.startOf(a);
|
|
192
|
-
},
|
|
192
|
+
}, f.isBefore = function(c, a) {
|
|
193
193
|
return this.endOf(a) < n(c);
|
|
194
|
-
},
|
|
194
|
+
}, f.$g = function(c, a, u) {
|
|
195
195
|
return o.u(c) ? this[a] : this.set(u, c);
|
|
196
|
-
},
|
|
196
|
+
}, f.unix = function() {
|
|
197
197
|
return Math.floor(this.valueOf() / 1e3);
|
|
198
|
-
},
|
|
198
|
+
}, f.valueOf = function() {
|
|
199
199
|
return this.$d.getTime();
|
|
200
|
-
},
|
|
200
|
+
}, f.startOf = function(c, a) {
|
|
201
201
|
var u = this, h = !!o.u(a) || a, y = o.p(c), p = function(E, O) {
|
|
202
202
|
var v = o.w(u.$u ? Date.UTC(u.$y, O, E) : new Date(u.$y, O, E), u);
|
|
203
203
|
return h ? v : v.endOf(w);
|
|
204
204
|
}, _ = function(E, O) {
|
|
205
205
|
return o.w(u.toDate()[E].apply(u.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), u);
|
|
206
|
-
},
|
|
206
|
+
}, d = this.$W, x = this.$M, M = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
207
207
|
switch (y) {
|
|
208
208
|
case K:
|
|
209
209
|
return h ? p(1, 0) : p(31, 11);
|
|
210
|
-
case
|
|
210
|
+
case W:
|
|
211
211
|
return h ? p(1, x) : p(0, x + 1);
|
|
212
212
|
case P:
|
|
213
|
-
var
|
|
213
|
+
var B = this.$locale().weekStart || 0, k = (d < B ? d + 7 : d) - B;
|
|
214
214
|
return p(h ? M - k : M + (6 - k), x);
|
|
215
215
|
case w:
|
|
216
216
|
case Q:
|
|
@@ -219,43 +219,43 @@ function Be() {
|
|
|
219
219
|
return _(T + "Minutes", 1);
|
|
220
220
|
case H:
|
|
221
221
|
return _(T + "Seconds", 2);
|
|
222
|
-
case
|
|
222
|
+
case j:
|
|
223
223
|
return _(T + "Milliseconds", 3);
|
|
224
224
|
default:
|
|
225
225
|
return this.clone();
|
|
226
226
|
}
|
|
227
|
-
},
|
|
227
|
+
}, f.endOf = function(c) {
|
|
228
228
|
return this.startOf(c, !1);
|
|
229
|
-
},
|
|
230
|
-
var u, h = o.p(c), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[Q] = y + "Date", u[
|
|
231
|
-
if (h ===
|
|
232
|
-
var
|
|
233
|
-
|
|
229
|
+
}, f.$set = function(c, a) {
|
|
230
|
+
var u, h = o.p(c), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[Q] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[q] = y + "Hours", u[H] = y + "Minutes", u[j] = y + "Seconds", u[C] = y + "Milliseconds", u)[h], _ = h === w ? this.$D + (a - this.$W) : a;
|
|
231
|
+
if (h === W || h === K) {
|
|
232
|
+
var d = this.clone().set(Q, 1);
|
|
233
|
+
d.$d[p](_), d.init(), this.$d = d.set(Q, Math.min(this.$D, d.daysInMonth())).$d;
|
|
234
234
|
} else p && this.$d[p](_);
|
|
235
235
|
return this.init(), this;
|
|
236
|
-
},
|
|
236
|
+
}, f.set = function(c, a) {
|
|
237
237
|
return this.clone().$set(c, a);
|
|
238
|
-
},
|
|
238
|
+
}, f.get = function(c) {
|
|
239
239
|
return this[o.p(c)]();
|
|
240
|
-
},
|
|
240
|
+
}, f.add = function(c, a) {
|
|
241
241
|
var u, h = this;
|
|
242
242
|
c = Number(c);
|
|
243
243
|
var y = o.p(a), p = function(x) {
|
|
244
244
|
var M = n(h);
|
|
245
245
|
return o.w(M.date(M.date() + Math.round(x * c)), h);
|
|
246
246
|
};
|
|
247
|
-
if (y ===
|
|
247
|
+
if (y === W) return this.set(W, this.$M + c);
|
|
248
248
|
if (y === K) return this.set(K, this.$y + c);
|
|
249
249
|
if (y === w) return p(1);
|
|
250
250
|
if (y === P) return p(7);
|
|
251
|
-
var _ = (u = {}, u[H] = l, u[q] = $, u[
|
|
252
|
-
return o.w(
|
|
253
|
-
},
|
|
251
|
+
var _ = (u = {}, u[H] = l, u[q] = $, u[j] = s, u)[y] || 1, d = this.$d.getTime() + c * _;
|
|
252
|
+
return o.w(d, this);
|
|
253
|
+
}, f.subtract = function(c, a) {
|
|
254
254
|
return this.add(-1 * c, a);
|
|
255
|
-
},
|
|
255
|
+
}, f.format = function(c) {
|
|
256
256
|
var a = this, u = this.$locale();
|
|
257
|
-
if (!this.isValid()) return u.invalidDate ||
|
|
258
|
-
var h = c || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m,
|
|
257
|
+
if (!this.isValid()) return u.invalidDate || ee;
|
|
258
|
+
var h = c || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, x = u.weekdays, M = u.months, T = u.meridiem, B = function(O, v, L, F) {
|
|
259
259
|
return O && (O[v] || O(a, h)) || L[v].slice(0, F);
|
|
260
260
|
}, k = function(O) {
|
|
261
261
|
return o.s(p % 12 || 12, O, "0");
|
|
@@ -263,21 +263,21 @@ function Be() {
|
|
|
263
263
|
var F = O < 12 ? "AM" : "PM";
|
|
264
264
|
return L ? F.toLowerCase() : F;
|
|
265
265
|
};
|
|
266
|
-
return h.replace(
|
|
267
|
-
return v || function(L) {
|
|
266
|
+
return h.replace(he, (function(O, v) {
|
|
267
|
+
return v || (function(L) {
|
|
268
268
|
switch (L) {
|
|
269
269
|
case "YY":
|
|
270
270
|
return String(a.$y).slice(-2);
|
|
271
271
|
case "YYYY":
|
|
272
272
|
return o.s(a.$y, 4, "0");
|
|
273
273
|
case "M":
|
|
274
|
-
return
|
|
274
|
+
return d + 1;
|
|
275
275
|
case "MM":
|
|
276
|
-
return o.s(
|
|
276
|
+
return o.s(d + 1, 2, "0");
|
|
277
277
|
case "MMM":
|
|
278
|
-
return
|
|
278
|
+
return B(u.monthsShort, d, M, 3);
|
|
279
279
|
case "MMMM":
|
|
280
|
-
return
|
|
280
|
+
return B(M, d);
|
|
281
281
|
case "D":
|
|
282
282
|
return a.$D;
|
|
283
283
|
case "DD":
|
|
@@ -285,9 +285,9 @@ function Be() {
|
|
|
285
285
|
case "d":
|
|
286
286
|
return String(a.$W);
|
|
287
287
|
case "dd":
|
|
288
|
-
return
|
|
288
|
+
return B(u.weekdaysMin, a.$W, x, 2);
|
|
289
289
|
case "ddd":
|
|
290
|
-
return
|
|
290
|
+
return B(u.weekdaysShort, a.$W, x, 3);
|
|
291
291
|
case "dddd":
|
|
292
292
|
return x[a.$W];
|
|
293
293
|
case "H":
|
|
@@ -316,29 +316,29 @@ function Be() {
|
|
|
316
316
|
return y;
|
|
317
317
|
}
|
|
318
318
|
return null;
|
|
319
|
-
}(O) || y.replace(":", "");
|
|
320
|
-
});
|
|
321
|
-
},
|
|
319
|
+
})(O) || y.replace(":", "");
|
|
320
|
+
}));
|
|
321
|
+
}, f.utcOffset = function() {
|
|
322
322
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
323
|
-
},
|
|
324
|
-
var h, y = this, p = o.p(a), _ = n(c),
|
|
323
|
+
}, f.diff = function(c, a, u) {
|
|
324
|
+
var h, y = this, p = o.p(a), _ = n(c), d = (_.utcOffset() - this.utcOffset()) * l, x = this - _, M = function() {
|
|
325
325
|
return o.m(y, _);
|
|
326
326
|
};
|
|
327
327
|
switch (p) {
|
|
328
328
|
case K:
|
|
329
329
|
h = M() / 12;
|
|
330
330
|
break;
|
|
331
|
-
case
|
|
331
|
+
case W:
|
|
332
332
|
h = M();
|
|
333
333
|
break;
|
|
334
|
-
case
|
|
334
|
+
case X:
|
|
335
335
|
h = M() / 3;
|
|
336
336
|
break;
|
|
337
337
|
case P:
|
|
338
|
-
h = (x -
|
|
338
|
+
h = (x - d) / 6048e5;
|
|
339
339
|
break;
|
|
340
340
|
case w:
|
|
341
|
-
h = (x -
|
|
341
|
+
h = (x - d) / 864e5;
|
|
342
342
|
break;
|
|
343
343
|
case q:
|
|
344
344
|
h = x / $;
|
|
@@ -346,104 +346,104 @@ function Be() {
|
|
|
346
346
|
case H:
|
|
347
347
|
h = x / l;
|
|
348
348
|
break;
|
|
349
|
-
case
|
|
349
|
+
case j:
|
|
350
350
|
h = x / s;
|
|
351
351
|
break;
|
|
352
352
|
default:
|
|
353
353
|
h = x;
|
|
354
354
|
}
|
|
355
355
|
return u ? h : o.a(h);
|
|
356
|
-
},
|
|
357
|
-
return this.endOf(
|
|
358
|
-
},
|
|
356
|
+
}, f.daysInMonth = function() {
|
|
357
|
+
return this.endOf(W).$D;
|
|
358
|
+
}, f.$locale = function() {
|
|
359
359
|
return Y[this.$L];
|
|
360
|
-
},
|
|
360
|
+
}, f.locale = function(c, a) {
|
|
361
361
|
if (!c) return this.$L;
|
|
362
362
|
var u = this.clone(), h = t(c, a, !0);
|
|
363
363
|
return h && (u.$L = h), u;
|
|
364
|
-
},
|
|
364
|
+
}, f.clone = function() {
|
|
365
365
|
return o.w(this.$d, this);
|
|
366
|
-
},
|
|
366
|
+
}, f.toDate = function() {
|
|
367
367
|
return new Date(this.valueOf());
|
|
368
|
-
},
|
|
368
|
+
}, f.toJSON = function() {
|
|
369
369
|
return this.isValid() ? this.toISOString() : null;
|
|
370
|
-
},
|
|
370
|
+
}, f.toISOString = function() {
|
|
371
371
|
return this.$d.toISOString();
|
|
372
|
-
},
|
|
372
|
+
}, f.toString = function() {
|
|
373
373
|
return this.$d.toUTCString();
|
|
374
374
|
}, m;
|
|
375
|
-
}(), b = g.prototype;
|
|
376
|
-
return n.prototype = b, [["$ms", C], ["$s",
|
|
377
|
-
b[m[1]] = function(
|
|
378
|
-
return this.$g(
|
|
375
|
+
})(), b = g.prototype;
|
|
376
|
+
return n.prototype = b, [["$ms", C], ["$s", j], ["$m", H], ["$H", q], ["$W", w], ["$M", W], ["$y", K], ["$D", Q]].forEach((function(m) {
|
|
377
|
+
b[m[1]] = function(f) {
|
|
378
|
+
return this.$g(f, m[0], m[1]);
|
|
379
379
|
};
|
|
380
|
-
}), n.extend = function(m,
|
|
381
|
-
return m.$i || (m(
|
|
380
|
+
})), n.extend = function(m, f) {
|
|
381
|
+
return m.$i || (m(f, g, n), m.$i = !0), n;
|
|
382
382
|
}, n.locale = t, n.isDayjs = e, n.unix = function(m) {
|
|
383
383
|
return n(1e3 * m);
|
|
384
|
-
}, n.en = Y[
|
|
385
|
-
});
|
|
386
|
-
}(
|
|
384
|
+
}, n.en = Y[se], n.Ls = Y, n.p = {}, n;
|
|
385
|
+
}));
|
|
386
|
+
})(ye)), ye.exports;
|
|
387
387
|
}
|
|
388
|
-
var
|
|
389
|
-
const
|
|
390
|
-
var
|
|
391
|
-
function
|
|
392
|
-
return
|
|
388
|
+
var Pe = Ue();
|
|
389
|
+
const G = /* @__PURE__ */ Ce(Pe);
|
|
390
|
+
var _e = { exports: {} }, Ye = _e.exports, Ee;
|
|
391
|
+
function Ne() {
|
|
392
|
+
return Ee || (Ee = 1, (function(i, r) {
|
|
393
393
|
(function(s, l) {
|
|
394
394
|
i.exports = l();
|
|
395
|
-
})(
|
|
395
|
+
})(Ye, (function() {
|
|
396
396
|
var s = { 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" };
|
|
397
397
|
return function(l, $, C) {
|
|
398
|
-
var
|
|
399
|
-
C.en.formats = s,
|
|
398
|
+
var j = $.prototype, H = j.format;
|
|
399
|
+
C.en.formats = s, j.format = function(q) {
|
|
400
400
|
q === void 0 && (q = "YYYY-MM-DDTHH:mm:ssZ");
|
|
401
|
-
var w = this.$locale().formats, P = function(
|
|
402
|
-
return
|
|
403
|
-
var
|
|
404
|
-
return Q ||
|
|
405
|
-
return
|
|
406
|
-
});
|
|
407
|
-
});
|
|
408
|
-
}(q, w === void 0 ? {} : w);
|
|
401
|
+
var w = this.$locale().formats, P = (function(W, X) {
|
|
402
|
+
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, Q, ee) {
|
|
403
|
+
var ie = ee && ee.toUpperCase();
|
|
404
|
+
return Q || X[ee] || s[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(he, le, oe) {
|
|
405
|
+
return le || oe.slice(1);
|
|
406
|
+
}));
|
|
407
|
+
}));
|
|
408
|
+
})(q, w === void 0 ? {} : w);
|
|
409
409
|
return H.call(this, P);
|
|
410
410
|
};
|
|
411
411
|
};
|
|
412
|
-
});
|
|
413
|
-
}(
|
|
412
|
+
}));
|
|
413
|
+
})(_e)), _e.exports;
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
const
|
|
417
|
-
|
|
415
|
+
var He = Ne();
|
|
416
|
+
const qe = /* @__PURE__ */ Ce(He);
|
|
417
|
+
G.extend(qe);
|
|
418
418
|
Date.prototype.isAfter = function(i, r) {
|
|
419
|
-
return
|
|
419
|
+
return G(this).isAfter(i, r);
|
|
420
420
|
};
|
|
421
421
|
Date.prototype.isBefore = function(i, r) {
|
|
422
|
-
return
|
|
422
|
+
return G(this).isBefore(i, r);
|
|
423
423
|
};
|
|
424
424
|
Date.prototype.format = function(i) {
|
|
425
|
-
return
|
|
425
|
+
return G(this).format(i);
|
|
426
426
|
};
|
|
427
427
|
Date.prototype.isValid = function() {
|
|
428
|
-
return
|
|
428
|
+
return G(this).isValid();
|
|
429
429
|
};
|
|
430
430
|
Date.prototype.add = function(i, r) {
|
|
431
|
-
return
|
|
431
|
+
return G(this).add(i, r).toDate();
|
|
432
432
|
};
|
|
433
433
|
Date.prototype.subtract = function(i, r) {
|
|
434
|
-
return
|
|
434
|
+
return G(this).subtract(i, r).toDate();
|
|
435
435
|
};
|
|
436
436
|
Date.prototype.firstDayOfMonth = function() {
|
|
437
|
-
return
|
|
437
|
+
return G(this).startOf("month").toDate();
|
|
438
438
|
};
|
|
439
439
|
Date.prototype.lastDayOfMonth = function() {
|
|
440
|
-
return
|
|
440
|
+
return G(this).endOf("month").toDate();
|
|
441
441
|
};
|
|
442
442
|
Date.prototype.set = function(i, r) {
|
|
443
|
-
return
|
|
443
|
+
return G(this).set(i, r).toDate();
|
|
444
444
|
};
|
|
445
445
|
Date.prototype.diff = function(i, r) {
|
|
446
|
-
return
|
|
446
|
+
return G(this).diff(i, r);
|
|
447
447
|
};
|
|
448
448
|
String.prototype.capitalize = function() {
|
|
449
449
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
@@ -451,16 +451,19 @@ String.prototype.capitalize = function() {
|
|
|
451
451
|
String.prototype.isNumber = function() {
|
|
452
452
|
return !isNaN(Number(this)) && this.trim() !== "";
|
|
453
453
|
};
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
454
|
+
String.prototype.isEmpty = function() {
|
|
455
|
+
return this === void 0 || !this || this.length === 0;
|
|
456
|
+
};
|
|
457
|
+
var V = /* @__PURE__ */ ((i) => (i.opera = "opera", i.firefox = "firefox", i.safari = "safari", i.ie = "ie", i.edge = "edge", i.edg = "edg", i.electron = "electron", i.chrome = "chrome", i.iOsSafari = "iOsSafari", i.edgiOs = "edgiOs", i.headlessChrome = "headlessChrome", i))(V || {});
|
|
458
|
+
const de = {
|
|
459
|
+
xs: 0,
|
|
460
|
+
sm: 576,
|
|
461
|
+
md: 768,
|
|
462
|
+
lg: 992,
|
|
463
|
+
xl: 1200,
|
|
464
|
+
xxl: 1400,
|
|
465
|
+
xxxl: 1600
|
|
466
|
+
};
|
|
464
467
|
class Ve {
|
|
465
468
|
screenWidth = 0;
|
|
466
469
|
lastBreakpoint;
|
|
@@ -476,7 +479,7 @@ class Ve {
|
|
|
476
479
|
pendingBreakpoint;
|
|
477
480
|
duplicateThresholdMs = 60;
|
|
478
481
|
constructor() {
|
|
479
|
-
typeof window < "u" && (this.screenWidth = window.innerWidth, this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }), this.lastBreakpoint = this.
|
|
482
|
+
typeof window < "u" && (this.screenWidth = window.innerWidth, this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }), this.lastBreakpoint = this.getBreakpointByScreenWidth(this.screenWidth));
|
|
480
483
|
}
|
|
481
484
|
destroy() {
|
|
482
485
|
typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.breakpointChangeCallbacks.clear(), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
@@ -501,35 +504,36 @@ class Ve {
|
|
|
501
504
|
}
|
|
502
505
|
getCurrentBrowser() {
|
|
503
506
|
const r = navigator.userAgent.toLowerCase();
|
|
504
|
-
if (this.isOpera()) return
|
|
505
|
-
if (this.isFirefox()) return
|
|
506
|
-
if (this.isSafari()) return
|
|
507
|
-
if (this.isIE()) return
|
|
508
|
-
if (this.isEdge()) return
|
|
509
|
-
if (this.isEdg()) return
|
|
510
|
-
if (this.isElectron(r)) return
|
|
511
|
-
if (this.isChrome()) return
|
|
512
|
-
if (this.isIOsSafari(r)) return
|
|
513
|
-
if (this.isEdgiOs(r)) return
|
|
514
|
-
if (this.isHeadlessChrome(r)) return
|
|
507
|
+
if (this.isOpera()) return V.opera;
|
|
508
|
+
if (this.isFirefox()) return V.firefox;
|
|
509
|
+
if (this.isSafari()) return V.safari;
|
|
510
|
+
if (this.isIE()) return V.ie;
|
|
511
|
+
if (this.isEdge()) return V.edge;
|
|
512
|
+
if (this.isEdg()) return V.edg;
|
|
513
|
+
if (this.isElectron(r)) return V.electron;
|
|
514
|
+
if (this.isChrome()) return V.chrome;
|
|
515
|
+
if (this.isIOsSafari(r)) return V.iOsSafari;
|
|
516
|
+
if (this.isEdgiOs(r)) return V.edgiOs;
|
|
517
|
+
if (this.isHeadlessChrome(r)) return V.headlessChrome;
|
|
515
518
|
throw new Error("Browser could not be detected: " + r);
|
|
516
519
|
}
|
|
517
|
-
|
|
518
|
-
let s =
|
|
519
|
-
for (const l of
|
|
520
|
-
l
|
|
521
|
-
return s;
|
|
520
|
+
getBreakpointByScreenWidth(r = this.screenWidth) {
|
|
521
|
+
let s = "xs";
|
|
522
|
+
for (const l of Object.keys(de))
|
|
523
|
+
de[l] <= r && (s = l);
|
|
524
|
+
return { breakpoint: s, screenWidth: de[s] };
|
|
522
525
|
}
|
|
523
526
|
isScreenGreaterThan(r) {
|
|
524
|
-
|
|
525
|
-
return this.screenWidth > (s?.screenWidth ?? 0);
|
|
527
|
+
return this.screenWidth > de[r];
|
|
526
528
|
}
|
|
527
529
|
isScreenSmallerThan(r) {
|
|
528
|
-
|
|
529
|
-
return this.screenWidth < (s?.screenWidth ?? 0);
|
|
530
|
+
return this.screenWidth < de[r];
|
|
530
531
|
}
|
|
531
532
|
getBreakpoint(r) {
|
|
532
|
-
return
|
|
533
|
+
return {
|
|
534
|
+
breakpoint: r,
|
|
535
|
+
screenWidth: de[r]
|
|
536
|
+
};
|
|
533
537
|
}
|
|
534
538
|
isOpera() {
|
|
535
539
|
return typeof window < "u" && (!!window.opr && !!window.opr.addons || !!window.opera || navigator.userAgent.includes("OPR/"));
|
|
@@ -568,7 +572,7 @@ class Ve {
|
|
|
568
572
|
}
|
|
569
573
|
onResize = () => {
|
|
570
574
|
if (typeof window > "u") return;
|
|
571
|
-
const r = window.innerWidth, s = this.
|
|
575
|
+
const r = window.innerWidth, s = this.getBreakpointByScreenWidth(r);
|
|
572
576
|
this.lastBreakpoint?.breakpoint !== s?.breakpoint && (this.lastBreakpoint = s, s && this.breakpointChangeCallbacks.forEach((l) => l(s))), this.pendingWidth = r, this.pendingBreakpoint = s, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
573
577
|
this.pendingBreakpoint && this.onResizeCallbacks.forEach((l) => l(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
|
|
574
578
|
}, this.duplicateThresholdMs);
|
|
@@ -579,24 +583,24 @@ class Ze {
|
|
|
579
583
|
return navigator.clipboard.writeText(r);
|
|
580
584
|
}
|
|
581
585
|
}
|
|
582
|
-
var
|
|
586
|
+
var we = { exports: {} };
|
|
583
587
|
/* @license
|
|
584
588
|
Papa Parse
|
|
585
589
|
v5.5.3
|
|
586
590
|
https://github.com/mholt/PapaParse
|
|
587
591
|
License: MIT
|
|
588
592
|
*/
|
|
589
|
-
var Ke =
|
|
593
|
+
var Ke = we.exports, Oe;
|
|
590
594
|
function Je() {
|
|
591
|
-
return
|
|
595
|
+
return Oe || (Oe = 1, (function(i, r) {
|
|
592
596
|
((s, l) => {
|
|
593
597
|
i.exports = l();
|
|
594
598
|
})(Ke, function s() {
|
|
595
|
-
var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {}, $, C = !l.document && !!l.postMessage,
|
|
599
|
+
var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {}, $, C = !l.document && !!l.postMessage, j = l.IS_PAPA_WORKER || !1, H = {}, q = 0, w = {};
|
|
596
600
|
function P(e) {
|
|
597
601
|
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) {
|
|
598
|
-
var n =
|
|
599
|
-
n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new
|
|
602
|
+
var n = se(t);
|
|
603
|
+
n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new ee(n), (this._handle.streamer = this)._config = n;
|
|
600
604
|
}).call(this, e), this.parseChunk = function(t, n) {
|
|
601
605
|
var o = parseInt(this._config.skipFirstNLines) || 0;
|
|
602
606
|
if (this.isFirstChunk && 0 < o) {
|
|
@@ -606,7 +610,7 @@ function Je() {
|
|
|
606
610
|
this.isFirstChunk && R(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
|
|
607
611
|
var o = this._partialLine + t, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
|
|
608
612
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
609
|
-
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),
|
|
613
|
+
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), j) l.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
|
|
610
614
|
else if (R(this._config.chunk) && !n) {
|
|
611
615
|
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
612
616
|
this._completeResults = g = void 0;
|
|
@@ -615,10 +619,10 @@ function Je() {
|
|
|
615
619
|
}
|
|
616
620
|
this._halted = !0;
|
|
617
621
|
}, this._sendError = function(t) {
|
|
618
|
-
R(this._config.error) ? this._config.error(t) :
|
|
622
|
+
R(this._config.error) ? this._config.error(t) : j && this._config.error && l.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
|
|
619
623
|
};
|
|
620
624
|
}
|
|
621
|
-
function
|
|
625
|
+
function W(e) {
|
|
622
626
|
var t;
|
|
623
627
|
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), P.call(this, e), this._nextChunk = C ? function() {
|
|
624
628
|
this._readChunk(), this._chunkLoaded();
|
|
@@ -648,7 +652,7 @@ function Je() {
|
|
|
648
652
|
n = t.statusText || n, this._sendError(new Error(n));
|
|
649
653
|
};
|
|
650
654
|
}
|
|
651
|
-
function
|
|
655
|
+
function X(e) {
|
|
652
656
|
(e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize), P.call(this, e);
|
|
653
657
|
var t, n, o = typeof FileReader < "u";
|
|
654
658
|
this.stream = function(g) {
|
|
@@ -700,55 +704,55 @@ function Je() {
|
|
|
700
704
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
701
705
|
}, this);
|
|
702
706
|
}
|
|
703
|
-
function
|
|
704
|
-
var t, n, o, g, b = Math.pow(2, 53), m = -b,
|
|
707
|
+
function ee(e) {
|
|
708
|
+
var t, n, o, g, b = Math.pow(2, 53), m = -b, f = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, c = /^((\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, h = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
|
|
705
709
|
function x(k) {
|
|
706
710
|
return e.skipEmptyLines === "greedy" ? k.join("").trim() === "" : k.length === 1 && k[0].length === 0;
|
|
707
711
|
}
|
|
708
712
|
function M() {
|
|
709
|
-
if (
|
|
713
|
+
if (d && o && (B("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), e.skipEmptyLines && (d.data = d.data.filter(function(v) {
|
|
710
714
|
return !x(v);
|
|
711
715
|
})), T()) {
|
|
712
716
|
let v = function(L, F) {
|
|
713
717
|
R(e.transformHeader) && (L = e.transformHeader(L, F)), _.push(L);
|
|
714
718
|
};
|
|
715
|
-
if (
|
|
716
|
-
for (var k = 0; T() && k <
|
|
717
|
-
|
|
718
|
-
} else
|
|
719
|
+
if (d) if (Array.isArray(d.data[0])) {
|
|
720
|
+
for (var k = 0; T() && k < d.data.length; k++) d.data[k].forEach(v);
|
|
721
|
+
d.data.splice(0, 1);
|
|
722
|
+
} else d.data.forEach(v);
|
|
719
723
|
}
|
|
720
724
|
function E(v, L) {
|
|
721
725
|
for (var F = e.header ? {} : [], A = 0; A < v.length; A++) {
|
|
722
|
-
var I = A, D = v[A], D = ((
|
|
723
|
-
if (
|
|
726
|
+
var I = A, D = v[A], D = ((Z, S) => ((z) => (e.dynamicTypingFunction && e.dynamicTyping[z] === void 0 && (e.dynamicTyping[z] = e.dynamicTypingFunction(z)), (e.dynamicTyping[z] || e.dynamicTyping) === !0))(Z) ? S === "true" || S === "TRUE" || S !== "false" && S !== "FALSE" && (((z) => {
|
|
727
|
+
if (f.test(z) && (z = parseFloat(z), m < z && z < b))
|
|
724
728
|
return 1;
|
|
725
729
|
})(S) ? parseFloat(S) : c.test(S) ? new Date(S) : S === "" ? null : S) : S)(I = e.header ? A >= _.length ? "__parsed_extra" : _[A] : I, D = e.transform ? e.transform(D, I) : D);
|
|
726
730
|
I === "__parsed_extra" ? (F[I] = F[I] || [], F[I].push(D)) : F[I] = D;
|
|
727
731
|
}
|
|
728
|
-
return e.header && (A > _.length ?
|
|
732
|
+
return e.header && (A > _.length ? B("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + A, h + L) : A < _.length && B("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + A, h + L)), F;
|
|
729
733
|
}
|
|
730
734
|
var O;
|
|
731
|
-
|
|
735
|
+
d && (e.header || e.dynamicTyping || e.transform) && (O = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(E), O = d.data.length) : d.data = E(d.data, 0), e.header && d.meta && (d.meta.fields = _), h += O);
|
|
732
736
|
}
|
|
733
737
|
function T() {
|
|
734
738
|
return e.header && _.length === 0;
|
|
735
739
|
}
|
|
736
|
-
function
|
|
737
|
-
k = { type: k, code: E, message: O }, v !== void 0 && (k.row = v),
|
|
740
|
+
function B(k, E, O, v) {
|
|
741
|
+
k = { type: k, code: E, message: O }, v !== void 0 && (k.row = v), d.errors.push(k);
|
|
738
742
|
}
|
|
739
743
|
R(e.step) && (g = e.step, e.step = function(k) {
|
|
740
|
-
|
|
744
|
+
d = k, T() ? M() : (M(), d.data.length !== 0 && (u += k.data.length, e.preview && u > e.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
|
|
741
745
|
}), this.parse = function(k, E, O) {
|
|
742
|
-
var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(k, v)), o = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(k),
|
|
743
|
-
var
|
|
746
|
+
var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(k, v)), o = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(k), d.meta.delimiter = e.delimiter) : ((v = ((L, F, A, I, D) => {
|
|
747
|
+
var Z, S, z, ue;
|
|
744
748
|
D = D || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
|
|
745
|
-
for (var
|
|
746
|
-
for (var
|
|
747
|
-
0 < J.data.length && (
|
|
749
|
+
for (var ce = 0; ce < D.length; ce++) {
|
|
750
|
+
for (var te, pe = D[ce], N = 0, re = 0, U = 0, J = (z = void 0, new he({ comments: I, delimiter: pe, newline: F, preview: 10 }).parse(L)), ae = 0; ae < J.data.length; ae++) A && x(J.data[ae]) ? U++ : (te = J.data[ae].length, re += te, z === void 0 ? z = te : 0 < te && (N += Math.abs(te - z), z = te));
|
|
751
|
+
0 < J.data.length && (re /= J.data.length - U), (S === void 0 || N <= S) && (ue === void 0 || ue < re) && 1.99 < re && (S = N, Z = pe, ue = re);
|
|
748
752
|
}
|
|
749
|
-
return { successful: !!(e.delimiter =
|
|
750
|
-
})(k, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = v.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter),
|
|
751
|
-
return e.preview && e.header && v.preview++, t = k, n = new
|
|
753
|
+
return { successful: !!(e.delimiter = Z), bestDelimiter: Z };
|
|
754
|
+
})(k, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = v.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), d.meta.delimiter = e.delimiter), se(e));
|
|
755
|
+
return e.preview && e.header && v.preview++, t = k, n = new he(v), d = n.parse(t, E, O), M(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
|
|
752
756
|
}, this.paused = function() {
|
|
753
757
|
return y;
|
|
754
758
|
}, this.pause = function() {
|
|
@@ -758,10 +762,10 @@ function Je() {
|
|
|
758
762
|
}, this.aborted = function() {
|
|
759
763
|
return p;
|
|
760
764
|
}, this.abort = function() {
|
|
761
|
-
p = !0, n.abort(),
|
|
765
|
+
p = !0, n.abort(), d.meta.aborted = !0, R(e.complete) && e.complete(d), t = "";
|
|
762
766
|
}, this.guessLineEndings = function(L, v) {
|
|
763
767
|
L = L.substring(0, 1048576);
|
|
764
|
-
var v = new RegExp(
|
|
768
|
+
var v = new RegExp(ie(v) + "([^]*?)" + ie(v), "gm"), O = (L = L.replace(v, "")).split("\r"), v = L.split(`
|
|
765
769
|
`), L = 1 < v.length && v[0].length < O[0].length;
|
|
766
770
|
if (O.length === 1 || L) return `
|
|
767
771
|
`;
|
|
@@ -771,94 +775,94 @@ function Je() {
|
|
|
771
775
|
` : "\r";
|
|
772
776
|
};
|
|
773
777
|
}
|
|
774
|
-
function
|
|
778
|
+
function ie(e) {
|
|
775
779
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
776
780
|
}
|
|
777
|
-
function
|
|
778
|
-
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, b = e.preview, m = e.fastMode,
|
|
781
|
+
function he(e) {
|
|
782
|
+
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, b = e.preview, m = e.fastMode, f = null, c = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
|
|
779
783
|
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");
|
|
780
784
|
o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
|
|
781
785
|
` && n !== "\r" && n !== `\r
|
|
782
786
|
` && (n = `
|
|
783
787
|
`);
|
|
784
788
|
var h = 0, y = !1;
|
|
785
|
-
this.parse = function(p, _,
|
|
789
|
+
this.parse = function(p, _, d) {
|
|
786
790
|
if (typeof p != "string") throw new Error("Input must be a string");
|
|
787
|
-
var x = p.length, M = t.length, T = n.length,
|
|
791
|
+
var x = p.length, M = t.length, T = n.length, B = o.length, k = R(g), E = [], O = [], v = [], L = h = 0;
|
|
788
792
|
if (!p) return N();
|
|
789
793
|
if (m || m !== !1 && p.indexOf(a) === -1) {
|
|
790
794
|
for (var F = p.split(n), A = 0; A < F.length; A++) {
|
|
791
795
|
if (v = F[A], h += v.length, A !== F.length - 1) h += n.length;
|
|
792
|
-
else if (
|
|
793
|
-
if (!o || v.substring(0,
|
|
796
|
+
else if (d) return N();
|
|
797
|
+
if (!o || v.substring(0, B) !== o) {
|
|
794
798
|
if (k) {
|
|
795
|
-
if (E = [],
|
|
796
|
-
} else
|
|
799
|
+
if (E = [], ue(v.split(t)), re(), y) return N();
|
|
800
|
+
} else ue(v.split(t));
|
|
797
801
|
if (b && b <= A) return E = E.slice(0, b), N(!0);
|
|
798
802
|
}
|
|
799
803
|
}
|
|
800
804
|
return N();
|
|
801
805
|
}
|
|
802
|
-
for (var I = p.indexOf(t, h), D = p.indexOf(n, h),
|
|
803
|
-
if ((S = p.indexOf(a, S + 1)) === -1) return
|
|
804
|
-
if (S === x - 1) return
|
|
806
|
+
for (var I = p.indexOf(t, h), D = p.indexOf(n, h), Z = new RegExp(ie(u) + ie(a), "g"), S = p.indexOf(a, h); ; ) if (p[h] === a) for (S = h, h++; ; ) {
|
|
807
|
+
if ((S = p.indexOf(a, S + 1)) === -1) return d || O.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: E.length, index: h }), te();
|
|
808
|
+
if (S === x - 1) return te(p.substring(h, S).replace(Z, a));
|
|
805
809
|
if (a === u && p[S + 1] === u) S++;
|
|
806
810
|
else if (a === u || S === 0 || p[S - 1] !== u) {
|
|
807
811
|
I !== -1 && I < S + 1 && (I = p.indexOf(t, S + 1));
|
|
808
|
-
var
|
|
809
|
-
if (p.substr(S + 1 +
|
|
810
|
-
v.push(p.substring(h, S).replace(
|
|
812
|
+
var z = ce((D = D !== -1 && D < S + 1 ? p.indexOf(n, S + 1) : D) === -1 ? I : Math.min(I, D));
|
|
813
|
+
if (p.substr(S + 1 + z, M) === t) {
|
|
814
|
+
v.push(p.substring(h, S).replace(Z, a)), p[h = S + 1 + z + M] !== a && (S = p.indexOf(a, h)), I = p.indexOf(t, h), D = p.indexOf(n, h);
|
|
811
815
|
break;
|
|
812
816
|
}
|
|
813
|
-
if (
|
|
814
|
-
if (v.push(p.substring(h, S).replace(
|
|
817
|
+
if (z = ce(D), p.substring(S + 1 + z, S + 1 + z + T) === n) {
|
|
818
|
+
if (v.push(p.substring(h, S).replace(Z, a)), pe(S + 1 + z + T), I = p.indexOf(t, h), S = p.indexOf(a, h), k && (re(), y)) return N();
|
|
815
819
|
if (b && E.length >= b) return N(!0);
|
|
816
820
|
break;
|
|
817
821
|
}
|
|
818
822
|
O.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: E.length, index: h }), S++;
|
|
819
823
|
}
|
|
820
824
|
}
|
|
821
|
-
else if (o && v.length === 0 && p.substring(h, h +
|
|
825
|
+
else if (o && v.length === 0 && p.substring(h, h + B) === o) {
|
|
822
826
|
if (D === -1) return N();
|
|
823
827
|
h = D + T, D = p.indexOf(n, h), I = p.indexOf(t, h);
|
|
824
828
|
} else if (I !== -1 && (I < D || D === -1)) v.push(p.substring(h, I)), h = I + M, I = p.indexOf(t, h);
|
|
825
829
|
else {
|
|
826
830
|
if (D === -1) break;
|
|
827
|
-
if (v.push(p.substring(h, D)),
|
|
831
|
+
if (v.push(p.substring(h, D)), pe(D + T), k && (re(), y)) return N();
|
|
828
832
|
if (b && E.length >= b) return N(!0);
|
|
829
833
|
}
|
|
830
|
-
return
|
|
831
|
-
function
|
|
834
|
+
return te();
|
|
835
|
+
function ue(U) {
|
|
832
836
|
E.push(U), L = h;
|
|
833
837
|
}
|
|
834
|
-
function
|
|
838
|
+
function ce(U) {
|
|
835
839
|
var J = 0;
|
|
836
840
|
return J = U !== -1 && (U = p.substring(S + 1, U)) && U.trim() === "" ? U.length : J;
|
|
837
841
|
}
|
|
838
|
-
function
|
|
839
|
-
return
|
|
842
|
+
function te(U) {
|
|
843
|
+
return d || (U === void 0 && (U = p.substring(h)), v.push(U), h = x, ue(v), k && re()), N();
|
|
840
844
|
}
|
|
841
|
-
function
|
|
842
|
-
h = U,
|
|
845
|
+
function pe(U) {
|
|
846
|
+
h = U, ue(v), v = [], D = p.indexOf(n, h);
|
|
843
847
|
}
|
|
844
848
|
function N(U) {
|
|
845
849
|
if (e.header && !_ && E.length && !c) {
|
|
846
|
-
var J = E[0],
|
|
847
|
-
let
|
|
848
|
-
for (let
|
|
849
|
-
let
|
|
850
|
-
if (
|
|
851
|
-
let
|
|
852
|
-
for (;
|
|
853
|
-
|
|
854
|
-
} else
|
|
855
|
-
|
|
850
|
+
var J = E[0], ae = /* @__PURE__ */ Object.create(null), ve = new Set(J);
|
|
851
|
+
let ke = !1;
|
|
852
|
+
for (let fe = 0; fe < J.length; fe++) {
|
|
853
|
+
let ne = J[fe];
|
|
854
|
+
if (ae[ne = R(e.transformHeader) ? e.transformHeader(ne, fe) : ne]) {
|
|
855
|
+
let ge, be = ae[ne];
|
|
856
|
+
for (; ge = ne + "_" + be, be++, ve.has(ge); ) ;
|
|
857
|
+
ve.add(ge), J[fe] = ge, ae[ne]++, ke = !0, (f = f === null ? {} : f)[ge] = ne;
|
|
858
|
+
} else ae[ne] = 1, J[fe] = ne;
|
|
859
|
+
ve.add(ne);
|
|
856
860
|
}
|
|
857
|
-
|
|
861
|
+
ke && console.warn("Duplicate headers found and renamed."), c = !0;
|
|
858
862
|
}
|
|
859
|
-
return { data: E, errors: O, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: L + (_ || 0), renamedHeaders:
|
|
863
|
+
return { data: E, errors: O, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: L + (_ || 0), renamedHeaders: f } };
|
|
860
864
|
}
|
|
861
|
-
function
|
|
865
|
+
function re() {
|
|
862
866
|
g(N()), E = [], O = [];
|
|
863
867
|
}
|
|
864
868
|
}, this.abort = function() {
|
|
@@ -867,31 +871,31 @@ function Je() {
|
|
|
867
871
|
return h;
|
|
868
872
|
};
|
|
869
873
|
}
|
|
870
|
-
function
|
|
874
|
+
function le(e) {
|
|
871
875
|
var t = e.data, n = H[t.workerId], o = !1;
|
|
872
876
|
if (t.error) n.userError(t.error, t.file);
|
|
873
877
|
else if (t.results && t.results.data) {
|
|
874
878
|
var g = { abort: function() {
|
|
875
|
-
o = !0,
|
|
876
|
-
}, pause:
|
|
879
|
+
o = !0, oe(t.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
880
|
+
}, pause: me, resume: me };
|
|
877
881
|
if (R(n.userStep)) {
|
|
878
882
|
for (var b = 0; b < t.results.data.length && (n.userStep({ data: t.results.data[b], errors: t.results.errors, meta: t.results.meta }, g), !o); b++) ;
|
|
879
883
|
delete t.results;
|
|
880
884
|
} else R(n.userChunk) && (n.userChunk(t.results, g, t.file), delete t.results);
|
|
881
885
|
}
|
|
882
|
-
t.finished && !o &&
|
|
886
|
+
t.finished && !o && oe(t.workerId, t.results);
|
|
883
887
|
}
|
|
884
|
-
function
|
|
888
|
+
function oe(e, t) {
|
|
885
889
|
var n = H[e];
|
|
886
890
|
R(n.userComplete) && n.userComplete(t), n.terminate(), delete H[e];
|
|
887
891
|
}
|
|
888
|
-
function
|
|
892
|
+
function me() {
|
|
889
893
|
throw new Error("Not implemented.");
|
|
890
894
|
}
|
|
891
|
-
function
|
|
895
|
+
function se(e) {
|
|
892
896
|
if (typeof e != "object" || e === null) return e;
|
|
893
897
|
var t, n = Array.isArray(e) ? [] : {};
|
|
894
|
-
for (t in e) n[t] =
|
|
898
|
+
for (t in e) n[t] = se(e[t]);
|
|
895
899
|
return n;
|
|
896
900
|
}
|
|
897
901
|
function Y(e, t) {
|
|
@@ -904,17 +908,17 @@ function Je() {
|
|
|
904
908
|
}
|
|
905
909
|
return w.parse = function(e, t) {
|
|
906
910
|
var n = (t = t || {}).dynamicTyping || !1;
|
|
907
|
-
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 ?
|
|
911
|
+
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 Q(t) : (l.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
|
|
908
912
|
(n = (() => {
|
|
909
913
|
var o;
|
|
910
914
|
return !!w.WORKERS_SUPPORTED && (o = (() => {
|
|
911
915
|
var g = l.URL || l.webkitURL || null, b = s.toString();
|
|
912
916
|
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; ", "(", b, ")();"], { type: "text/javascript" })));
|
|
913
|
-
})(), (o = new l.Worker(o)).onmessage =
|
|
917
|
+
})(), (o = new l.Worker(o)).onmessage = le, o.id = q++, H[o.id] = o);
|
|
914
918
|
})()).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 });
|
|
915
919
|
}, w.unparse = function(e, t) {
|
|
916
920
|
var n = !1, o = !0, g = ",", b = `\r
|
|
917
|
-
`, m = '"',
|
|
921
|
+
`, m = '"', f = m + m, c = !1, a = null, u = !1, h = ((() => {
|
|
918
922
|
if (typeof t == "object") {
|
|
919
923
|
if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
|
|
920
924
|
return t.delimiter.indexOf(_) !== -1;
|
|
@@ -922,49 +926,49 @@ function Je() {
|
|
|
922
926
|
if (t.columns.length === 0) throw new Error("Option columns is empty");
|
|
923
927
|
a = t.columns;
|
|
924
928
|
}
|
|
925
|
-
t.escapeChar !== void 0 && (
|
|
929
|
+
t.escapeChar !== void 0 && (f = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
|
|
926
930
|
}
|
|
927
|
-
})(), new RegExp(
|
|
931
|
+
})(), new RegExp(ie(m), "g"));
|
|
928
932
|
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
929
933
|
if (!e.length || Array.isArray(e[0])) return y(null, e, c);
|
|
930
934
|
if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, c);
|
|
931
935
|
} 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 || [], c);
|
|
932
936
|
throw new Error("Unable to serialize unrecognized input");
|
|
933
|
-
function y(_,
|
|
934
|
-
var M = "", T = (typeof _ == "string" && (_ = JSON.parse(_)), typeof
|
|
937
|
+
function y(_, d, x) {
|
|
938
|
+
var M = "", T = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), B = !Array.isArray(d[0]);
|
|
935
939
|
if (T && o) {
|
|
936
940
|
for (var k = 0; k < _.length; k++) 0 < k && (M += g), M += p(_[k], k);
|
|
937
|
-
0 <
|
|
941
|
+
0 < d.length && (M += b);
|
|
938
942
|
}
|
|
939
|
-
for (var E = 0; E <
|
|
940
|
-
var O = (T ? _ :
|
|
941
|
-
if (x && !T && (v = x === "greedy" ?
|
|
943
|
+
for (var E = 0; E < d.length; E++) {
|
|
944
|
+
var O = (T ? _ : d[E]).length, v = !1, L = T ? Object.keys(d[E]).length === 0 : d[E].length === 0;
|
|
945
|
+
if (x && !T && (v = x === "greedy" ? d[E].join("").trim() === "" : d[E].length === 1 && d[E][0].length === 0), x === "greedy" && T) {
|
|
942
946
|
for (var F = [], A = 0; A < O; A++) {
|
|
943
|
-
var I =
|
|
944
|
-
F.push(
|
|
947
|
+
var I = B ? _[A] : A;
|
|
948
|
+
F.push(d[E][I]);
|
|
945
949
|
}
|
|
946
950
|
v = F.join("").trim() === "";
|
|
947
951
|
}
|
|
948
952
|
if (!v) {
|
|
949
953
|
for (var D = 0; D < O; D++) {
|
|
950
954
|
0 < D && !L && (M += g);
|
|
951
|
-
var
|
|
952
|
-
M += p(
|
|
955
|
+
var Z = T && B ? _[D] : D;
|
|
956
|
+
M += p(d[E][Z], D);
|
|
953
957
|
}
|
|
954
|
-
E <
|
|
958
|
+
E < d.length - 1 && (!x || 0 < O && !L) && (M += b);
|
|
955
959
|
}
|
|
956
960
|
}
|
|
957
961
|
return M;
|
|
958
962
|
}
|
|
959
|
-
function p(_,
|
|
963
|
+
function p(_, d) {
|
|
960
964
|
var x, M;
|
|
961
|
-
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (M = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, M = !0), x = _.toString().replace(h,
|
|
962
|
-
for (var k = 0; k <
|
|
965
|
+
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (M = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, M = !0), x = _.toString().replace(h, f), (M = M || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((T, B) => {
|
|
966
|
+
for (var k = 0; k < B.length; k++) if (-1 < T.indexOf(B[k])) return !0;
|
|
963
967
|
return !1;
|
|
964
968
|
})(x, w.BAD_DELIMITERS) || -1 < x.indexOf(g) || x.charAt(0) === " " || x.charAt(x.length - 1) === " ") ? m + x + m : x);
|
|
965
969
|
}
|
|
966
970
|
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
967
|
-
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !C && !!l.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser =
|
|
971
|
+
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !C && !!l.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = he, w.ParserHandle = ee, w.NetworkStreamer = W, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = Q, l.jQuery && (($ = l.jQuery).fn.parse = function(e) {
|
|
968
972
|
var t = e.config || {}, n = [];
|
|
969
973
|
return this.each(function(b) {
|
|
970
974
|
if (!($(this).prop("tagName").toUpperCase() === "INPUT" && $(this).attr("type").toLowerCase() === "file" && l.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
@@ -973,11 +977,11 @@ function Je() {
|
|
|
973
977
|
function o() {
|
|
974
978
|
if (n.length === 0) R(e.complete) && e.complete();
|
|
975
979
|
else {
|
|
976
|
-
var b, m,
|
|
980
|
+
var b, m, f, c, a = n[0];
|
|
977
981
|
if (R(e.before)) {
|
|
978
982
|
var u = e.before(a.file, a.inputElem);
|
|
979
983
|
if (typeof u == "object") {
|
|
980
|
-
if (u.action === "abort") return b = "AbortError", m = a.file,
|
|
984
|
+
if (u.action === "abort") return b = "AbortError", m = a.file, f = a.inputElem, c = u.reason, void (R(e.error) && e.error({ name: b }, m, f, c));
|
|
981
985
|
if (u.action === "skip") return void g();
|
|
982
986
|
typeof u.config == "object" && (a.instanceConfig = $.extend(a.instanceConfig, u.config));
|
|
983
987
|
} else if (u === "skip") return void g();
|
|
@@ -991,13 +995,13 @@ function Je() {
|
|
|
991
995
|
function g() {
|
|
992
996
|
n.splice(0, 1), o();
|
|
993
997
|
}
|
|
994
|
-
}),
|
|
998
|
+
}), j && (l.onmessage = function(e) {
|
|
995
999
|
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 });
|
|
996
|
-
}), (
|
|
1000
|
+
}), (W.prototype = Object.create(P.prototype)).constructor = W, (X.prototype = Object.create(P.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (Q.prototype = Object.create(P.prototype)).constructor = Q, w;
|
|
997
1001
|
});
|
|
998
|
-
}(
|
|
1002
|
+
})(we)), we.exports;
|
|
999
1003
|
}
|
|
1000
|
-
var
|
|
1004
|
+
var xe = Je();
|
|
1001
1005
|
class Ge {
|
|
1002
1006
|
readAsText(r) {
|
|
1003
1007
|
const s = new FileReader();
|
|
@@ -1028,11 +1032,11 @@ class Ge {
|
|
|
1028
1032
|
});
|
|
1029
1033
|
}
|
|
1030
1034
|
unparse(r, s) {
|
|
1031
|
-
return
|
|
1035
|
+
return xe.unparse(r, s);
|
|
1032
1036
|
}
|
|
1033
1037
|
parse(r) {
|
|
1034
1038
|
return new Promise((s, l) => {
|
|
1035
|
-
|
|
1039
|
+
xe.parse(r, {
|
|
1036
1040
|
header: !0,
|
|
1037
1041
|
complete: ($) => s($),
|
|
1038
1042
|
error: ($) => l($)
|
|
@@ -1045,7 +1049,7 @@ class Ge {
|
|
|
1045
1049
|
}
|
|
1046
1050
|
save(r, s, l) {
|
|
1047
1051
|
const $ = new Blob([r], { type: l });
|
|
1048
|
-
|
|
1052
|
+
$e($, s);
|
|
1049
1053
|
}
|
|
1050
1054
|
}
|
|
1051
1055
|
class Xe {
|
|
@@ -1068,9 +1072,9 @@ class Xe {
|
|
|
1068
1072
|
return Object.keys(localStorage).filter((s) => s.startsWith(r));
|
|
1069
1073
|
}
|
|
1070
1074
|
}
|
|
1071
|
-
var
|
|
1075
|
+
var Me = /* @__PURE__ */ ((i) => (i.log = "log", i.info = "info", i.warn = "warn", i.debug = "debug", i.error = "error", i))(Me || {});
|
|
1072
1076
|
class et {
|
|
1073
|
-
logType =
|
|
1077
|
+
logType = Me;
|
|
1074
1078
|
log(...r) {
|
|
1075
1079
|
this._doLog(this.logType.log, r.join(" "));
|
|
1076
1080
|
}
|
|
@@ -1106,15 +1110,13 @@ class tt {
|
|
|
1106
1110
|
}
|
|
1107
1111
|
export {
|
|
1108
1112
|
Ve as BrowserService,
|
|
1109
|
-
qe as BrowserType,
|
|
1110
1113
|
Ze as ClipboardService,
|
|
1111
1114
|
Qe as EnumHelper,
|
|
1112
1115
|
Ge as FileService,
|
|
1113
1116
|
Xe as LocalService,
|
|
1114
|
-
|
|
1117
|
+
Me as LogType,
|
|
1115
1118
|
et as LoggerService,
|
|
1116
|
-
we as ScreenBreakpoints,
|
|
1117
1119
|
tt as TokenService,
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
+
$e as saveAs,
|
|
1121
|
+
Be as sortHelper
|
|
1120
1122
|
};
|