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