@oardi/ts-utils 0.0.24 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.es.js CHANGED
@@ -14,10 +14,10 @@ License: MIT
14
14
  var $e = _e.exports, De;
15
15
  function Ce() {
16
16
  return De || (De = 1, (function(s, r) {
17
- ((i, l) => {
18
- s.exports = l();
17
+ ((i, c) => {
18
+ s.exports = c();
19
19
  })($e, function i() {
20
- var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {}, v, M = !l.document && !!l.postMessage, T = l.IS_PAPA_WORKER || !1, P = {}, Y = 0, w = {};
20
+ var c = typeof self < "u" ? self : typeof window < "u" ? window : c !== void 0 ? c : {}, v, $ = !c.document && !!c.postMessage, L = c.IS_PAPA_WORKER || !1, P = {}, Y = 0, w = {};
21
21
  function N(e) {
22
22
  this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(t) {
23
23
  var n = se(t);
@@ -31,7 +31,7 @@ function Ce() {
31
31
  this.isFirstChunk && R(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
32
32
  var o = this._partialLine + t, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
33
33
  if (!this._handle.paused() && !this._handle.aborted()) {
34
- if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), T) l.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
34
+ if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), L) c.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
35
35
  else if (R(this._config.chunk) && !n) {
36
36
  if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
37
37
  this._completeResults = g = void 0;
@@ -40,12 +40,12 @@ function Ce() {
40
40
  }
41
41
  this._halted = !0;
42
42
  }, this._sendError = function(t) {
43
- R(this._config.error) ? this._config.error(t) : T && this._config.error && l.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
43
+ R(this._config.error) ? this._config.error(t) : L && this._config.error && c.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
44
44
  };
45
45
  }
46
46
  function W(e) {
47
47
  var t;
48
- (e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk = M ? function() {
48
+ (e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk = $ ? function() {
49
49
  this._readChunk(), this._chunkLoaded();
50
50
  } : function() {
51
51
  this._readChunk();
@@ -54,7 +54,7 @@ function Ce() {
54
54
  }, this._readChunk = function() {
55
55
  if (this._finished) this._chunkLoaded();
56
56
  else {
57
- if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), M || (t.onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !M), this._config.downloadRequestHeaders) {
57
+ if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), $ || (t.onload = q(this._chunkLoaded, this), t.onerror = q(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !$), this._config.downloadRequestHeaders) {
58
58
  var n, o = this._config.downloadRequestHeaders;
59
59
  for (n in o) t.setRequestHeader(n, o[n]);
60
60
  }
@@ -65,7 +65,7 @@ function Ce() {
65
65
  } catch (S) {
66
66
  this._chunkError(S.message);
67
67
  }
68
- M && t.status === 0 && this._chunkError();
68
+ $ && t.status === 0 && this._chunkError();
69
69
  }
70
70
  }, this._chunkLoaded = function() {
71
71
  t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((n) => (n = n.getResponseHeader("Content-Range")) !== null ? parseInt(n.substring(n.lastIndexOf("/") + 1)) : -1)(t), this.parseChunk(t.responseText)));
@@ -126,7 +126,7 @@ function Ce() {
126
126
  }, this);
127
127
  }
128
128
  function ee(e) {
129
- var t, n, o, g, S = Math.pow(2, 53), m = -S, f = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, h = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, a = this, u = 0, c = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
129
+ var t, n, o, g, S = Math.pow(2, 53), m = -S, f = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\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: {} };
130
130
  function O(b) {
131
131
  return e.skipEmptyLines === "greedy" ? b.join("").trim() === "" : b.length === 1 && b[0].length === 0;
132
132
  }
@@ -143,17 +143,17 @@ function Ce() {
143
143
  } else d.data.forEach(k);
144
144
  }
145
145
  function D(k, A) {
146
- for (var F = e.header ? {} : [], I = 0; I < k.length; I++) {
147
- var L = I, $ = k[I], $ = ((G, x) => ((z) => (e.dynamicTypingFunction && e.dynamicTyping[z] === void 0 && (e.dynamicTyping[z] = e.dynamicTypingFunction(z)), (e.dynamicTyping[z] || e.dynamicTyping) === !0))(G) ? x === "true" || x === "TRUE" || x !== "false" && x !== "FALSE" && (((z) => {
146
+ for (var F = e.header ? {} : [], T = 0; T < k.length; T++) {
147
+ var I = T, M = k[T], M = ((G, x) => ((z) => (e.dynamicTypingFunction && e.dynamicTyping[z] === void 0 && (e.dynamicTyping[z] = e.dynamicTypingFunction(z)), (e.dynamicTyping[z] || e.dynamicTyping) === !0))(G) ? x === "true" || x === "TRUE" || x !== "false" && x !== "FALSE" && (((z) => {
148
148
  if (f.test(z) && (z = parseFloat(z), m < z && z < S))
149
149
  return 1;
150
- })(x) ? parseFloat(x) : h.test(x) ? new Date(x) : x === "" ? null : x) : x)(L = e.header ? I >= _.length ? "__parsed_extra" : _[I] : L, $ = e.transform ? e.transform($, L) : $);
151
- L === "__parsed_extra" ? (F[L] = F[L] || [], F[L].push($)) : F[L] = $;
150
+ })(x) ? parseFloat(x) : l.test(x) ? new Date(x) : x === "" ? null : x) : x)(I = e.header ? T >= _.length ? "__parsed_extra" : _[T] : I, M = e.transform ? e.transform(M, I) : M);
151
+ I === "__parsed_extra" ? (F[I] = F[I] || [], F[I].push(M)) : F[I] = M;
152
152
  }
153
- return e.header && (I > _.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + I, c + A) : I < _.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + I, c + A)), F;
153
+ return e.header && (T > _.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + T, h + A) : T < _.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + T, h + A)), F;
154
154
  }
155
155
  var E;
156
- d && (e.header || e.dynamicTyping || e.transform) && (E = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(D), E = d.data.length) : d.data = D(d.data, 0), e.header && d.meta && (d.meta.fields = _), c += E);
156
+ d && (e.header || e.dynamicTyping || e.transform) && (E = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(D), E = d.data.length) : d.data = D(d.data, 0), e.header && d.meta && (d.meta.fields = _), h += E);
157
157
  }
158
158
  function B() {
159
159
  return e.header && _.length === 0;
@@ -164,16 +164,16 @@ function Ce() {
164
164
  R(e.step) && (g = e.step, e.step = function(b) {
165
165
  d = b, B() ? C() : (C(), d.data.length !== 0 && (u += b.data.length, e.preview && u > e.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
166
166
  }), this.parse = function(b, D, E) {
167
- var k = e.quoteChar || '"', k = (e.newline || (e.newline = this.guessLineEndings(b, k)), o = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(b), d.meta.delimiter = e.delimiter) : ((k = ((A, F, I, L, $) => {
167
+ var k = e.quoteChar || '"', k = (e.newline || (e.newline = this.guessLineEndings(b, k)), o = !1, e.delimiter ? R(e.delimiter) && (e.delimiter = e.delimiter(b), d.meta.delimiter = e.delimiter) : ((k = ((A, F, T, I, M) => {
168
168
  var G, x, z, ue;
169
- $ = $ || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
170
- for (var he = 0; he < $.length; he++) {
171
- for (var te, pe = $[he], H = 0, re = 0, U = 0, Q = (z = void 0, new ce({ comments: L, delimiter: pe, newline: F, preview: 10 }).parse(A)), ae = 0; ae < Q.data.length; ae++) I && O(Q.data[ae]) ? U++ : (te = Q.data[ae].length, re += te, z === void 0 ? z = te : 0 < te && (H += Math.abs(te - z), z = te));
169
+ M = M || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
170
+ for (var ce = 0; ce < M.length; ce++) {
171
+ for (var te, pe = M[ce], H = 0, re = 0, U = 0, Q = (z = void 0, new he({ comments: I, delimiter: pe, newline: F, preview: 10 }).parse(A)), ae = 0; ae < Q.data.length; ae++) T && O(Q.data[ae]) ? U++ : (te = Q.data[ae].length, re += te, z === void 0 ? z = te : 0 < te && (H += Math.abs(te - z), z = te));
172
172
  0 < Q.data.length && (re /= Q.data.length - U), (x === void 0 || H <= x) && (ue === void 0 || ue < re) && 1.99 < re && (x = H, G = pe, ue = re);
173
173
  }
174
174
  return { successful: !!(e.delimiter = G), bestDelimiter: G };
175
175
  })(b, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = k.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), d.meta.delimiter = e.delimiter), se(e));
176
- return e.preview && e.header && k.preview++, t = b, n = new ce(k), d = n.parse(t, D, E), C(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
176
+ return e.preview && e.header && k.preview++, t = b, n = new he(k), d = n.parse(t, D, E), C(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
177
177
  }, this.paused = function() {
178
178
  return y;
179
179
  }, this.pause = function() {
@@ -190,7 +190,7 @@ function Ce() {
190
190
  `), A = 1 < k.length && k[0].length < E[0].length;
191
191
  if (E.length === 1 || A) return `
192
192
  `;
193
- for (var F = 0, I = 0; I < E.length; I++) E[I][0] === `
193
+ for (var F = 0, T = 0; T < E.length; T++) E[T][0] === `
194
194
  ` && F++;
195
195
  return F >= E.length / 2 ? `\r
196
196
  ` : "\r";
@@ -199,75 +199,75 @@ function Ce() {
199
199
  function ie(e) {
200
200
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
201
201
  }
202
- function ce(e) {
203
- var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, S = e.preview, m = e.fastMode, f = null, h = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
202
+ function he(e) {
203
+ var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, S = e.preview, m = e.fastMode, f = null, l = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
204
204
  if (e.escapeChar !== void 0 && (u = e.escapeChar), (typeof t != "string" || -1 < w.BAD_DELIMITERS.indexOf(t)) && (t = ","), o === t) throw new Error("Comment character same as delimiter");
205
205
  o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
206
206
  ` && n !== "\r" && n !== `\r
207
207
  ` && (n = `
208
208
  `);
209
- var c = 0, y = !1;
209
+ var h = 0, y = !1;
210
210
  this.parse = function(p, _, d) {
211
211
  if (typeof p != "string") throw new Error("Input must be a string");
212
- var O = p.length, C = t.length, B = n.length, j = o.length, b = R(g), D = [], E = [], k = [], A = c = 0;
212
+ var O = p.length, C = t.length, B = n.length, j = o.length, b = R(g), D = [], E = [], k = [], A = h = 0;
213
213
  if (!p) return H();
214
214
  if (m || m !== !1 && p.indexOf(a) === -1) {
215
- for (var F = p.split(n), I = 0; I < F.length; I++) {
216
- if (k = F[I], c += k.length, I !== F.length - 1) c += n.length;
215
+ for (var F = p.split(n), T = 0; T < F.length; T++) {
216
+ if (k = F[T], h += k.length, T !== F.length - 1) h += n.length;
217
217
  else if (d) return H();
218
218
  if (!o || k.substring(0, j) !== o) {
219
219
  if (b) {
220
220
  if (D = [], ue(k.split(t)), re(), y) return H();
221
221
  } else ue(k.split(t));
222
- if (S && S <= I) return D = D.slice(0, S), H(!0);
222
+ if (S && S <= T) return D = D.slice(0, S), H(!0);
223
223
  }
224
224
  }
225
225
  return H();
226
226
  }
227
- for (var L = p.indexOf(t, c), $ = p.indexOf(n, c), G = new RegExp(ie(u) + ie(a), "g"), x = p.indexOf(a, c); ; ) if (p[c] === a) for (x = c, c++; ; ) {
228
- if ((x = p.indexOf(a, x + 1)) === -1) return d || E.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: D.length, index: c }), te();
229
- if (x === O - 1) return te(p.substring(c, x).replace(G, a));
227
+ for (var I = p.indexOf(t, h), M = p.indexOf(n, h), G = new RegExp(ie(u) + ie(a), "g"), x = p.indexOf(a, h); ; ) if (p[h] === a) for (x = h, h++; ; ) {
228
+ if ((x = p.indexOf(a, x + 1)) === -1) return d || E.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: D.length, index: h }), te();
229
+ if (x === O - 1) return te(p.substring(h, x).replace(G, a));
230
230
  if (a === u && p[x + 1] === u) x++;
231
231
  else if (a === u || x === 0 || p[x - 1] !== u) {
232
- L !== -1 && L < x + 1 && (L = p.indexOf(t, x + 1));
233
- var z = he(($ = $ !== -1 && $ < x + 1 ? p.indexOf(n, x + 1) : $) === -1 ? L : Math.min(L, $));
232
+ I !== -1 && I < x + 1 && (I = p.indexOf(t, x + 1));
233
+ var z = ce((M = M !== -1 && M < x + 1 ? p.indexOf(n, x + 1) : M) === -1 ? I : Math.min(I, M));
234
234
  if (p.substr(x + 1 + z, C) === t) {
235
- k.push(p.substring(c, x).replace(G, a)), p[c = x + 1 + z + C] !== a && (x = p.indexOf(a, c)), L = p.indexOf(t, c), $ = p.indexOf(n, c);
235
+ k.push(p.substring(h, x).replace(G, a)), p[h = x + 1 + z + C] !== a && (x = p.indexOf(a, h)), I = p.indexOf(t, h), M = p.indexOf(n, h);
236
236
  break;
237
237
  }
238
- if (z = he($), p.substring(x + 1 + z, x + 1 + z + B) === n) {
239
- if (k.push(p.substring(c, x).replace(G, a)), pe(x + 1 + z + B), L = p.indexOf(t, c), x = p.indexOf(a, c), b && (re(), y)) return H();
238
+ if (z = ce(M), p.substring(x + 1 + z, x + 1 + z + B) === n) {
239
+ if (k.push(p.substring(h, x).replace(G, a)), pe(x + 1 + z + B), I = p.indexOf(t, h), x = p.indexOf(a, h), b && (re(), y)) return H();
240
240
  if (S && D.length >= S) return H(!0);
241
241
  break;
242
242
  }
243
- E.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: D.length, index: c }), x++;
243
+ E.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: D.length, index: h }), x++;
244
244
  }
245
245
  }
246
- else if (o && k.length === 0 && p.substring(c, c + j) === o) {
247
- if ($ === -1) return H();
248
- c = $ + B, $ = p.indexOf(n, c), L = p.indexOf(t, c);
249
- } else if (L !== -1 && (L < $ || $ === -1)) k.push(p.substring(c, L)), c = L + C, L = p.indexOf(t, c);
246
+ else if (o && k.length === 0 && p.substring(h, h + j) === o) {
247
+ if (M === -1) return H();
248
+ h = M + B, M = p.indexOf(n, h), I = p.indexOf(t, h);
249
+ } else if (I !== -1 && (I < M || M === -1)) k.push(p.substring(h, I)), h = I + C, I = p.indexOf(t, h);
250
250
  else {
251
- if ($ === -1) break;
252
- if (k.push(p.substring(c, $)), pe($ + B), b && (re(), y)) return H();
251
+ if (M === -1) break;
252
+ if (k.push(p.substring(h, M)), pe(M + B), b && (re(), y)) return H();
253
253
  if (S && D.length >= S) return H(!0);
254
254
  }
255
255
  return te();
256
256
  function ue(U) {
257
- D.push(U), A = c;
257
+ D.push(U), A = h;
258
258
  }
259
- function he(U) {
259
+ function ce(U) {
260
260
  var Q = 0;
261
261
  return Q = U !== -1 && (U = p.substring(x + 1, U)) && U.trim() === "" ? U.length : Q;
262
262
  }
263
263
  function te(U) {
264
- return d || (U === void 0 && (U = p.substring(c)), k.push(U), c = O, ue(k), b && re()), H();
264
+ return d || (U === void 0 && (U = p.substring(h)), k.push(U), h = O, ue(k), b && re()), H();
265
265
  }
266
266
  function pe(U) {
267
- c = U, ue(k), k = [], $ = p.indexOf(n, c);
267
+ h = U, ue(k), k = [], M = p.indexOf(n, h);
268
268
  }
269
269
  function H(U) {
270
- if (e.header && !_ && D.length && !h) {
270
+ if (e.header && !_ && D.length && !l) {
271
271
  var Q = D[0], ae = /* @__PURE__ */ Object.create(null), ve = new Set(Q);
272
272
  let Se = !1;
273
273
  for (let le = 0; le < Q.length; le++) {
@@ -279,7 +279,7 @@ function Ce() {
279
279
  } else ae[ne] = 1, Q[le] = ne;
280
280
  ve.add(ne);
281
281
  }
282
- Se && console.warn("Duplicate headers found and renamed."), h = !0;
282
+ Se && console.warn("Duplicate headers found and renamed."), l = !0;
283
283
  }
284
284
  return { data: D, errors: E, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: A + (_ || 0), renamedHeaders: f } };
285
285
  }
@@ -289,7 +289,7 @@ function Ce() {
289
289
  }, this.abort = function() {
290
290
  y = !0;
291
291
  }, this.getCharIndex = function() {
292
- return c;
292
+ return h;
293
293
  };
294
294
  }
295
295
  function de(e) {
@@ -329,21 +329,21 @@ function Ce() {
329
329
  }
330
330
  return w.parse = function(e, t) {
331
331
  var n = (t = t || {}).dynamicTyping || !1;
332
- if (R(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!R(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && R(e.read) && R(e.on) ? n = new V(t) : (l.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
332
+ if (R(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!R(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && R(e.read) && R(e.on) ? n = new V(t) : (c.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
333
333
  (n = (() => {
334
334
  var o;
335
335
  return !!w.WORKERS_SUPPORTED && (o = (() => {
336
- var g = l.URL || l.webkitURL || null, S = i.toString();
336
+ var g = c.URL || c.webkitURL || null, S = i.toString();
337
337
  return w.BLOB_URL || (w.BLOB_URL = g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", S, ")();"], { type: "text/javascript" })));
338
- })(), (o = new l.Worker(o)).onmessage = de, o.id = Y++, P[o.id] = o);
338
+ })(), (o = new c.Worker(o)).onmessage = de, o.id = Y++, P[o.id] = o);
339
339
  })()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = R(t.step), t.chunk = R(t.chunk), t.complete = R(t.complete), t.error = R(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
340
340
  }, w.unparse = function(e, t) {
341
341
  var n = !1, o = !0, g = ",", S = `\r
342
- `, m = '"', f = m + m, h = !1, a = null, u = !1, c = ((() => {
342
+ `, m = '"', f = m + m, l = !1, a = null, u = !1, h = ((() => {
343
343
  if (typeof t == "object") {
344
344
  if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
345
345
  return t.delimiter.indexOf(_) !== -1;
346
- }).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (h = t.skipEmptyLines), typeof t.newline == "string" && (S = t.newline), typeof t.quoteChar == "string" && (m = t.quoteChar), typeof t.header == "boolean" && (o = t.header), Array.isArray(t.columns)) {
346
+ }).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (l = t.skipEmptyLines), typeof t.newline == "string" && (S = t.newline), typeof t.quoteChar == "string" && (m = t.quoteChar), typeof t.header == "boolean" && (o = t.header), Array.isArray(t.columns)) {
347
347
  if (t.columns.length === 0) throw new Error("Option columns is empty");
348
348
  a = t.columns;
349
349
  }
@@ -351,9 +351,9 @@ function Ce() {
351
351
  }
352
352
  })(), new RegExp(ie(m), "g"));
353
353
  if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
354
- if (!e.length || Array.isArray(e[0])) return y(null, e, h);
355
- if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, h);
356
- } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || a), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), y(e.fields || [], e.data || [], h);
354
+ if (!e.length || Array.isArray(e[0])) return y(null, e, l);
355
+ if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, l);
356
+ } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || a), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), y(e.fields || [], e.data || [], l);
357
357
  throw new Error("Unable to serialize unrecognized input");
358
358
  function y(_, d, O) {
359
359
  var C = "", B = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), j = !Array.isArray(d[0]);
@@ -364,17 +364,17 @@ function Ce() {
364
364
  for (var D = 0; D < d.length; D++) {
365
365
  var E = (B ? _ : d[D]).length, k = !1, A = B ? Object.keys(d[D]).length === 0 : d[D].length === 0;
366
366
  if (O && !B && (k = O === "greedy" ? d[D].join("").trim() === "" : d[D].length === 1 && d[D][0].length === 0), O === "greedy" && B) {
367
- for (var F = [], I = 0; I < E; I++) {
368
- var L = j ? _[I] : I;
369
- F.push(d[D][L]);
367
+ for (var F = [], T = 0; T < E; T++) {
368
+ var I = j ? _[T] : T;
369
+ F.push(d[D][I]);
370
370
  }
371
371
  k = F.join("").trim() === "";
372
372
  }
373
373
  if (!k) {
374
- for (var $ = 0; $ < E; $++) {
375
- 0 < $ && !A && (C += g);
376
- var G = B && j ? _[$] : $;
377
- C += p(d[D][G], $);
374
+ for (var M = 0; M < E; M++) {
375
+ 0 < M && !A && (C += g);
376
+ var G = B && j ? _[M] : M;
377
+ C += p(d[D][G], M);
378
378
  }
379
379
  D < d.length - 1 && (!O || 0 < E && !A) && (C += S);
380
380
  }
@@ -383,41 +383,41 @@ function Ce() {
383
383
  }
384
384
  function p(_, d) {
385
385
  var O, C;
386
- return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (C = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, C = !0), O = _.toString().replace(c, f), (C = C || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((B, j) => {
386
+ return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (C = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, C = !0), O = _.toString().replace(h, f), (C = C || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((B, j) => {
387
387
  for (var b = 0; b < j.length; b++) if (-1 < B.indexOf(j[b])) return !0;
388
388
  return !1;
389
389
  })(O, w.BAD_DELIMITERS) || -1 < O.indexOf(g) || O.charAt(0) === " " || O.charAt(O.length - 1) === " ") ? m + O + m : O);
390
390
  }
391
391
  }, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
392
- `, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !M && !!l.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = ce, w.ParserHandle = ee, w.NetworkStreamer = W, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = V, l.jQuery && ((v = l.jQuery).fn.parse = function(e) {
392
+ `, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !$ && !!c.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 = V, c.jQuery && ((v = c.jQuery).fn.parse = function(e) {
393
393
  var t = e.config || {}, n = [];
394
394
  return this.each(function(S) {
395
- if (!(v(this).prop("tagName").toUpperCase() === "INPUT" && v(this).attr("type").toLowerCase() === "file" && l.FileReader) || !this.files || this.files.length === 0) return !0;
395
+ if (!(v(this).prop("tagName").toUpperCase() === "INPUT" && v(this).attr("type").toLowerCase() === "file" && c.FileReader) || !this.files || this.files.length === 0) return !0;
396
396
  for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: v.extend({}, t) });
397
397
  }), o(), this;
398
398
  function o() {
399
399
  if (n.length === 0) R(e.complete) && e.complete();
400
400
  else {
401
- var S, m, f, h, a = n[0];
401
+ var S, m, f, l, a = n[0];
402
402
  if (R(e.before)) {
403
403
  var u = e.before(a.file, a.inputElem);
404
404
  if (typeof u == "object") {
405
- if (u.action === "abort") return S = "AbortError", m = a.file, f = a.inputElem, h = u.reason, void (R(e.error) && e.error({ name: S }, m, f, h));
405
+ if (u.action === "abort") return S = "AbortError", m = a.file, f = a.inputElem, l = u.reason, void (R(e.error) && e.error({ name: S }, m, f, l));
406
406
  if (u.action === "skip") return void g();
407
407
  typeof u.config == "object" && (a.instanceConfig = v.extend(a.instanceConfig, u.config));
408
408
  } else if (u === "skip") return void g();
409
409
  }
410
- var c = a.instanceConfig.complete;
410
+ var h = a.instanceConfig.complete;
411
411
  a.instanceConfig.complete = function(y) {
412
- R(c) && c(y, a.file, a.inputElem), g();
412
+ R(h) && h(y, a.file, a.inputElem), g();
413
413
  }, w.parse(a.file, a.instanceConfig);
414
414
  }
415
415
  }
416
416
  function g() {
417
417
  n.splice(0, 1), o();
418
418
  }
419
- }), T && (l.onmessage = function(e) {
420
- e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? l.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (l.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && l.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
419
+ }), L && (c.onmessage = function(e) {
420
+ e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? c.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (c.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && c.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
421
421
  }), (W.prototype = Object.create(N.prototype)).constructor = W, (X.prototype = Object.create(N.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (V.prototype = Object.create(N.prototype)).constructor = V, w;
422
422
  });
423
423
  })(_e)), _e.exports;
@@ -429,31 +429,31 @@ class et {
429
429
  return Ie(r, i);
430
430
  }
431
431
  static parse(r) {
432
- return new Promise((i, l) => {
432
+ return new Promise((i, c) => {
433
433
  Te(r, {
434
434
  header: !0,
435
435
  complete: (v) => i(v),
436
- error: (v) => l(v)
436
+ error: (v) => c(v)
437
437
  });
438
438
  });
439
439
  }
440
440
  }
441
441
  async function Le(s, r, i) {
442
- const l = i?.mimeType ?? Fe(r), v = Be(s, l);
442
+ const c = i?.mimeType ?? Fe(r), v = Be(s, c);
443
443
  if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
444
444
  try {
445
445
  const Y = await (await window.showSaveFilePicker({
446
446
  suggestedName: r,
447
- types: [{ description: "Datei", accept: { [l]: [`.${Me(r)}`] } }]
447
+ types: [{ description: "Datei", accept: { [c]: [`.${Me(r)}`] } }]
448
448
  })).createWritable();
449
449
  await Y.write(v), await Y.close();
450
450
  return;
451
451
  } catch {
452
452
  }
453
- const M = URL.createObjectURL(v), T = document.createElement("a");
454
- T.href = M, T.download = r, T.rel = "noopener", T.style.display = "none", document.body.appendChild(T), ze(T), window.setTimeout(() => {
455
- document.body.removeChild(T), URL.revokeObjectURL(M);
456
- }, 0), je() && window.open(M, "_blank", "noopener,noreferrer");
453
+ const $ = URL.createObjectURL(v), L = document.createElement("a");
454
+ L.href = $, L.download = r, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L), ze(L), window.setTimeout(() => {
455
+ document.body.removeChild(L), URL.revokeObjectURL($);
456
+ }, 0), je() && window.open($, "_blank", "noopener,noreferrer");
457
457
  }
458
458
  function Be(s, r) {
459
459
  if (s instanceof Blob)
@@ -515,57 +515,57 @@ class tt {
515
515
  class rt {
516
516
  static getFileExtension(r) {
517
517
  let i = "";
518
- const l = r.lastIndexOf(".");
519
- return l > 0 && l < r.length - 1 && (i = `.${r.substring(l + 1).toLowerCase()}`), i;
518
+ const c = r.lastIndexOf(".");
519
+ return c > 0 && c < r.length - 1 && (i = `.${r.substring(c + 1).toLowerCase()}`), i;
520
520
  }
521
521
  /**
522
522
  * read content from a file or blob
523
523
  */
524
524
  static readAsText(r) {
525
525
  const i = new FileReader();
526
- return new Promise((l, v) => {
526
+ return new Promise((c, v) => {
527
527
  i.onload = () => {
528
- i.onload = null, i.onerror = null, typeof i.result == "string" ? l(i.result) : v(new Error("Unexpected result type"));
528
+ i.onload = null, i.onerror = null, typeof i.result == "string" ? c(i.result) : v(new Error("Unexpected result type"));
529
529
  }, i.onerror = () => {
530
- const M = i.error ?? new Error("FileReader error");
531
- i.onload = null, i.onerror = null, v(M);
530
+ const $ = i.error ?? new Error("FileReader error");
531
+ i.onload = null, i.onerror = null, v($);
532
532
  }, i.readAsText(r);
533
533
  });
534
534
  }
535
535
  static readAsArrayBuffer(r) {
536
536
  const i = new FileReader();
537
- return new Promise((l, v) => {
537
+ return new Promise((c, v) => {
538
538
  i.onload = () => {
539
- i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? l(i.result) : v(new Error("Unexpected result type"));
539
+ i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? c(i.result) : v(new Error("Unexpected result type"));
540
540
  }, i.onerror = () => {
541
- const M = i.error ?? new Error("FileReader error");
542
- i.onload = null, i.onerror = null, v(M);
541
+ const $ = i.error ?? new Error("FileReader error");
542
+ i.onload = null, i.onerror = null, v($);
543
543
  }, i.readAsArrayBuffer(r);
544
544
  });
545
545
  }
546
546
  static readAsDataUrl(r) {
547
547
  const i = new FileReader();
548
- return new Promise((l, v) => {
549
- i.onload = (M) => {
550
- l(M);
551
- }, i.onerror = (M) => v(M), i.readAsDataURL(r);
548
+ return new Promise((c, v) => {
549
+ i.onload = ($) => {
550
+ c($);
551
+ }, i.onerror = ($) => v($), i.readAsDataURL(r);
552
552
  });
553
553
  }
554
554
  /** usage:
555
555
  * const file = new File(['Hello'], 'test.txt');
556
556
  * FileHelper.formatFileSize(file.size);
557
557
  * */
558
- static formatFileSize(r, i = 2, l) {
558
+ static formatFileSize(r, i = 2, c) {
559
559
  if (r === 0)
560
560
  return "0 Bytes";
561
- const v = 1024, M = ["Bytes", "KB", "MB", "GB", "TB"];
562
- let T = Math.floor(Math.log(r) / Math.log(v));
563
- l && M.includes(l) && (T = M.indexOf(l));
564
- const P = r / Math.pow(v, T);
565
- return `${parseFloat(P.toFixed(i))} ${M[T]}`;
561
+ const v = 1024, $ = ["Bytes", "KB", "MB", "GB", "TB"];
562
+ let L = Math.floor(Math.log(r) / Math.log(v));
563
+ c && $.includes(c) && (L = $.indexOf(c));
564
+ const P = r / Math.pow(v, L);
565
+ return `${parseFloat(P.toFixed(i))} ${$[L]}`;
566
566
  }
567
- static save(r, i, l) {
568
- const v = new Blob([r], { type: l });
567
+ static save(r, i, c) {
568
+ const v = new Blob([r], { type: c });
569
569
  Le(v, i);
570
570
  }
571
571
  }
@@ -575,8 +575,8 @@ class me {
575
575
  }
576
576
  static get(r) {
577
577
  let i = null;
578
- const l = localStorage.getItem(r);
579
- return l && (i = JSON.parse(l)), i;
578
+ const c = localStorage.getItem(r);
579
+ return c && (i = JSON.parse(c)), i;
580
580
  }
581
581
  static remove(r) {
582
582
  let i = !!me.get(r);
@@ -616,14 +616,14 @@ class J {
616
616
  }
617
617
  static doLog(r, i) {
618
618
  if (!J.enabled) return;
619
- const l = {
619
+ const c = {
620
620
  type: r,
621
621
  args: i,
622
622
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
623
623
  };
624
624
  for (const v of J.listeners)
625
625
  try {
626
- if (v(l) === !1)
626
+ if (v(c) === !1)
627
627
  return;
628
628
  } catch {
629
629
  }
@@ -631,24 +631,24 @@ class J {
631
631
  }
632
632
  static onLog(r, i = !1) {
633
633
  if (i) {
634
- const l = (v) => {
634
+ const c = (v) => {
635
635
  try {
636
636
  return r(v);
637
637
  } finally {
638
- J.listeners.delete(l);
638
+ J.listeners.delete(c);
639
639
  }
640
640
  };
641
- return J.listeners.add(l), () => J.listeners.delete(l);
641
+ return J.listeners.add(c), () => J.listeners.delete(c);
642
642
  }
643
643
  return J.listeners.add(r), () => J.listeners.delete(r);
644
644
  }
645
645
  }
646
646
  const We = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), Ue = (s, r) => s < r ? -1 : s === r ? 0 : 1, Pe = (s, r, i) => Ue(s, r) * (i ? 1 : -1), Ye = (s, r, i) => {
647
- let l = 0;
648
- return typeof s == "string" && typeof r == "string" ? l = We(s, r, i) : l = Pe(s, r, i), l;
649
- }, Ne = (s, r, i, l) => {
650
- const v = i(s), M = i(r);
651
- return Ye(v, M, l);
647
+ let c = 0;
648
+ return typeof s == "string" && typeof r == "string" ? c = We(s, r, i) : c = Pe(s, r, i), c;
649
+ }, Ne = (s, r, i, c) => {
650
+ const v = i(s), $ = i(r);
651
+ return Ye(v, $, c);
652
652
  };
653
653
  class nt {
654
654
  static get(r) {
@@ -662,23 +662,22 @@ class nt {
662
662
  }
663
663
  }
664
664
  Array.prototype.distinct = function(s) {
665
- const r = this;
666
- return s ? r.filter((l, v, M) => M.findIndex((T) => s(T, l)) === v) : r.filter((l, v, M) => M.indexOf(l) === v);
665
+ return s ? this.filter((i, c, v) => v.findIndex(($) => s($, i)) === c) : this.filter((i, c, v) => v.indexOf(i) === c);
667
666
  };
668
667
  Array.prototype.filterBy = function(s) {
669
668
  return this.filter((r) => s(r));
670
669
  };
671
670
  Array.prototype.first = function() {
672
- return this?.length > 0 ? this[0] : null;
671
+ return this.length > 0 ? this[0] : null;
673
672
  };
674
673
  Array.prototype.groupBy = function(s) {
675
674
  return this.reduce((r, i) => {
676
- const l = s(i);
677
- return (r[l] = r[l] || []).push(i), r;
675
+ const c = s(i);
676
+ return r[c] || (r[c] = []), r[c].push(i), r;
678
677
  }, {});
679
678
  };
680
679
  Array.prototype.orderBy = function(s, r = !0) {
681
- return this?.sort((i, l) => Ne(i, l, s, r)), this;
680
+ return this?.sort((i, c) => Ne(i, c, s, r)), this;
682
681
  };
683
682
  Array.prototype.removeBy = function(s, r) {
684
683
  return this.filter((i) => s(i) !== r);
@@ -686,38 +685,38 @@ Array.prototype.removeBy = function(s, r) {
686
685
  var we = { exports: {} }, qe = we.exports, Ee;
687
686
  function He() {
688
687
  return Ee || (Ee = 1, (function(s, r) {
689
- (function(i, l) {
690
- s.exports = l();
688
+ (function(i, c) {
689
+ s.exports = c();
691
690
  })(qe, (function() {
692
- var i = 1e3, l = 6e4, v = 36e5, M = "millisecond", T = "second", P = "minute", Y = "hour", w = "day", N = "week", W = "month", X = "quarter", K = "year", V = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ce = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, de = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
693
- var f = ["th", "st", "nd", "rd"], h = m % 100;
694
- return "[" + m + (f[(h - 20) % 10] || f[h] || f[0]) + "]";
695
- } }, oe = function(m, f, h) {
691
+ var i = 1e3, c = 6e4, v = 36e5, $ = "millisecond", L = "second", P = "minute", Y = "hour", w = "day", N = "week", W = "month", X = "quarter", K = "year", V = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, 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, de = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
692
+ var f = ["th", "st", "nd", "rd"], l = m % 100;
693
+ return "[" + m + (f[(l - 20) % 10] || f[l] || f[0]) + "]";
694
+ } }, oe = function(m, f, l) {
696
695
  var a = String(m);
697
- return !a || a.length >= f ? m : "" + Array(f + 1 - a.length).join(h) + m;
696
+ return !a || a.length >= f ? m : "" + Array(f + 1 - a.length).join(l) + m;
698
697
  }, ye = { s: oe, z: function(m) {
699
- var f = -m.utcOffset(), h = Math.abs(f), a = Math.floor(h / 60), u = h % 60;
698
+ var f = -m.utcOffset(), l = Math.abs(f), a = Math.floor(l / 60), u = l % 60;
700
699
  return (f <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
701
- }, m: function m(f, h) {
702
- if (f.date() < h.date()) return -m(h, f);
703
- var a = 12 * (h.year() - f.year()) + (h.month() - f.month()), u = f.clone().add(a, W), c = h - u < 0, y = f.clone().add(a + (c ? -1 : 1), W);
704
- return +(-(a + (h - u) / (c ? u - y : y - u)) || 0);
700
+ }, m: function m(f, l) {
701
+ if (f.date() < l.date()) return -m(l, f);
702
+ var a = 12 * (l.year() - f.year()) + (l.month() - f.month()), u = f.clone().add(a, W), h = l - u < 0, y = f.clone().add(a + (h ? -1 : 1), W);
703
+ return +(-(a + (l - u) / (h ? u - y : y - u)) || 0);
705
704
  }, a: function(m) {
706
705
  return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
707
706
  }, p: function(m) {
708
- return { M: W, y: K, w: N, d: w, D: V, h: Y, m: P, s: T, ms: M, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
707
+ return { M: W, y: K, w: N, d: w, D: V, h: Y, m: P, s: L, ms: $, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
709
708
  }, u: function(m) {
710
709
  return m === void 0;
711
710
  } }, se = "en", q = {};
712
711
  q[se] = de;
713
712
  var R = "$isDayjsObject", e = function(m) {
714
713
  return m instanceof g || !(!m || !m[R]);
715
- }, t = function m(f, h, a) {
714
+ }, t = function m(f, l, a) {
716
715
  var u;
717
716
  if (!f) return se;
718
717
  if (typeof f == "string") {
719
- var c = f.toLowerCase();
720
- q[c] && (u = c), h && (q[c] = h, u = c);
718
+ var h = f.toLowerCase();
719
+ q[h] && (u = h), l && (q[h] = l, u = h);
721
720
  var y = f.split("-");
722
721
  if (!u && y.length > 1) return m(y[0]);
723
722
  } else {
@@ -727,20 +726,20 @@ function He() {
727
726
  return !a && u && (se = u), u || !a && se;
728
727
  }, n = function(m, f) {
729
728
  if (e(m)) return m.clone();
730
- var h = typeof f == "object" ? f : {};
731
- return h.date = m, h.args = arguments, new g(h);
729
+ var l = typeof f == "object" ? f : {};
730
+ return l.date = m, l.args = arguments, new g(l);
732
731
  }, o = ye;
733
732
  o.l = t, o.i = e, o.w = function(m, f) {
734
733
  return n(m, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
735
734
  };
736
735
  var g = (function() {
737
- function m(h) {
738
- this.$L = t(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[R] = !0;
736
+ function m(l) {
737
+ this.$L = t(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[R] = !0;
739
738
  }
740
739
  var f = m.prototype;
741
- return f.parse = function(h) {
740
+ return f.parse = function(l) {
742
741
  this.$d = (function(a) {
743
- var u = a.date, c = a.utc;
742
+ var u = a.date, h = a.utc;
744
743
  if (u === null) return /* @__PURE__ */ new Date(NaN);
745
744
  if (o.u(u)) return /* @__PURE__ */ new Date();
746
745
  if (u instanceof Date) return new Date(u);
@@ -748,46 +747,46 @@ function He() {
748
747
  var y = u.match(ie);
749
748
  if (y) {
750
749
  var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
751
- return c ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _);
750
+ 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, _);
752
751
  }
753
752
  }
754
753
  return new Date(u);
755
- })(h), this.init();
754
+ })(l), this.init();
756
755
  }, f.init = function() {
757
- var h = this.$d;
758
- this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
756
+ var l = this.$d;
757
+ this.$y = l.getFullYear(), this.$M = l.getMonth(), this.$D = l.getDate(), this.$W = l.getDay(), this.$H = l.getHours(), this.$m = l.getMinutes(), this.$s = l.getSeconds(), this.$ms = l.getMilliseconds();
759
758
  }, f.$utils = function() {
760
759
  return o;
761
760
  }, f.isValid = function() {
762
761
  return this.$d.toString() !== ee;
763
- }, f.isSame = function(h, a) {
764
- var u = n(h);
762
+ }, f.isSame = function(l, a) {
763
+ var u = n(l);
765
764
  return this.startOf(a) <= u && u <= this.endOf(a);
766
- }, f.isAfter = function(h, a) {
767
- return n(h) < this.startOf(a);
768
- }, f.isBefore = function(h, a) {
769
- return this.endOf(a) < n(h);
770
- }, f.$g = function(h, a, u) {
771
- return o.u(h) ? this[a] : this.set(u, h);
765
+ }, f.isAfter = function(l, a) {
766
+ return n(l) < this.startOf(a);
767
+ }, f.isBefore = function(l, a) {
768
+ return this.endOf(a) < n(l);
769
+ }, f.$g = function(l, a, u) {
770
+ return o.u(l) ? this[a] : this.set(u, l);
772
771
  }, f.unix = function() {
773
772
  return Math.floor(this.valueOf() / 1e3);
774
773
  }, f.valueOf = function() {
775
774
  return this.$d.getTime();
776
- }, f.startOf = function(h, a) {
777
- var u = this, c = !!o.u(a) || a, y = o.p(h), p = function(D, E) {
775
+ }, f.startOf = function(l, a) {
776
+ var u = this, h = !!o.u(a) || a, y = o.p(l), p = function(D, E) {
778
777
  var k = o.w(u.$u ? Date.UTC(u.$y, E, D) : new Date(u.$y, E, D), u);
779
- return c ? k : k.endOf(w);
778
+ return h ? k : k.endOf(w);
780
779
  }, _ = function(D, E) {
781
- return o.w(u.toDate()[D].apply(u.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(E)), u);
780
+ return o.w(u.toDate()[D].apply(u.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(E)), u);
782
781
  }, d = this.$W, O = this.$M, C = this.$D, B = "set" + (this.$u ? "UTC" : "");
783
782
  switch (y) {
784
783
  case K:
785
- return c ? p(1, 0) : p(31, 11);
784
+ return h ? p(1, 0) : p(31, 11);
786
785
  case W:
787
- return c ? p(1, O) : p(0, O + 1);
786
+ return h ? p(1, O) : p(0, O + 1);
788
787
  case N:
789
788
  var j = this.$locale().weekStart || 0, b = (d < j ? d + 7 : d) - j;
790
- return p(c ? C - b : C + (6 - b), O);
789
+ return p(h ? C - b : C + (6 - b), O);
791
790
  case w:
792
791
  case V:
793
792
  return _(B + "Hours", 0);
@@ -795,51 +794,51 @@ function He() {
795
794
  return _(B + "Minutes", 1);
796
795
  case P:
797
796
  return _(B + "Seconds", 2);
798
- case T:
797
+ case L:
799
798
  return _(B + "Milliseconds", 3);
800
799
  default:
801
800
  return this.clone();
802
801
  }
803
- }, f.endOf = function(h) {
804
- return this.startOf(h, !1);
805
- }, f.$set = function(h, a) {
806
- var u, c = o.p(h), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[Y] = y + "Hours", u[P] = y + "Minutes", u[T] = y + "Seconds", u[M] = y + "Milliseconds", u)[c], _ = c === w ? this.$D + (a - this.$W) : a;
807
- if (c === W || c === K) {
802
+ }, f.endOf = function(l) {
803
+ return this.startOf(l, !1);
804
+ }, f.$set = function(l, a) {
805
+ var u, h = o.p(l), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[V] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[Y] = y + "Hours", u[P] = y + "Minutes", u[L] = y + "Seconds", u[$] = y + "Milliseconds", u)[h], _ = h === w ? this.$D + (a - this.$W) : a;
806
+ if (h === W || h === K) {
808
807
  var d = this.clone().set(V, 1);
809
808
  d.$d[p](_), d.init(), this.$d = d.set(V, Math.min(this.$D, d.daysInMonth())).$d;
810
809
  } else p && this.$d[p](_);
811
810
  return this.init(), this;
812
- }, f.set = function(h, a) {
813
- return this.clone().$set(h, a);
814
- }, f.get = function(h) {
815
- return this[o.p(h)]();
816
- }, f.add = function(h, a) {
817
- var u, c = this;
818
- h = Number(h);
811
+ }, f.set = function(l, a) {
812
+ return this.clone().$set(l, a);
813
+ }, f.get = function(l) {
814
+ return this[o.p(l)]();
815
+ }, f.add = function(l, a) {
816
+ var u, h = this;
817
+ l = Number(l);
819
818
  var y = o.p(a), p = function(O) {
820
- var C = n(c);
821
- return o.w(C.date(C.date() + Math.round(O * h)), c);
819
+ var C = n(h);
820
+ return o.w(C.date(C.date() + Math.round(O * l)), h);
822
821
  };
823
- if (y === W) return this.set(W, this.$M + h);
824
- if (y === K) return this.set(K, this.$y + h);
822
+ if (y === W) return this.set(W, this.$M + l);
823
+ if (y === K) return this.set(K, this.$y + l);
825
824
  if (y === w) return p(1);
826
825
  if (y === N) return p(7);
827
- var _ = (u = {}, u[P] = l, u[Y] = v, u[T] = i, u)[y] || 1, d = this.$d.getTime() + h * _;
826
+ var _ = (u = {}, u[P] = c, u[Y] = v, u[L] = i, u)[y] || 1, d = this.$d.getTime() + l * _;
828
827
  return o.w(d, this);
829
- }, f.subtract = function(h, a) {
830
- return this.add(-1 * h, a);
831
- }, f.format = function(h) {
828
+ }, f.subtract = function(l, a) {
829
+ return this.add(-1 * l, a);
830
+ }, f.format = function(l) {
832
831
  var a = this, u = this.$locale();
833
832
  if (!this.isValid()) return u.invalidDate || ee;
834
- var c = h || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, O = u.weekdays, C = u.months, B = u.meridiem, j = function(E, k, A, F) {
835
- return E && (E[k] || E(a, c)) || A[k].slice(0, F);
833
+ var h = l || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, O = u.weekdays, C = u.months, B = u.meridiem, j = function(E, k, A, F) {
834
+ return E && (E[k] || E(a, h)) || A[k].slice(0, F);
836
835
  }, b = function(E) {
837
836
  return o.s(p % 12 || 12, E, "0");
838
837
  }, D = B || function(E, k, A) {
839
838
  var F = E < 12 ? "AM" : "PM";
840
839
  return A ? F.toLowerCase() : F;
841
840
  };
842
- return c.replace(ce, (function(E, k) {
841
+ return h.replace(he, (function(E, k) {
843
842
  return k || (function(A) {
844
843
  switch (A) {
845
844
  case "YY":
@@ -896,47 +895,47 @@ function He() {
896
895
  }));
897
896
  }, f.utcOffset = function() {
898
897
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
899
- }, f.diff = function(h, a, u) {
900
- var c, y = this, p = o.p(a), _ = n(h), d = (_.utcOffset() - this.utcOffset()) * l, O = this - _, C = function() {
898
+ }, f.diff = function(l, a, u) {
899
+ var h, y = this, p = o.p(a), _ = n(l), d = (_.utcOffset() - this.utcOffset()) * c, O = this - _, C = function() {
901
900
  return o.m(y, _);
902
901
  };
903
902
  switch (p) {
904
903
  case K:
905
- c = C() / 12;
904
+ h = C() / 12;
906
905
  break;
907
906
  case W:
908
- c = C();
907
+ h = C();
909
908
  break;
910
909
  case X:
911
- c = C() / 3;
910
+ h = C() / 3;
912
911
  break;
913
912
  case N:
914
- c = (O - d) / 6048e5;
913
+ h = (O - d) / 6048e5;
915
914
  break;
916
915
  case w:
917
- c = (O - d) / 864e5;
916
+ h = (O - d) / 864e5;
918
917
  break;
919
918
  case Y:
920
- c = O / v;
919
+ h = O / v;
921
920
  break;
922
921
  case P:
923
- c = O / l;
922
+ h = O / c;
924
923
  break;
925
- case T:
926
- c = O / i;
924
+ case L:
925
+ h = O / i;
927
926
  break;
928
927
  default:
929
- c = O;
928
+ h = O;
930
929
  }
931
- return u ? c : o.a(c);
930
+ return u ? h : o.a(h);
932
931
  }, f.daysInMonth = function() {
933
932
  return this.endOf(W).$D;
934
933
  }, f.$locale = function() {
935
934
  return q[this.$L];
936
- }, f.locale = function(h, a) {
937
- if (!h) return this.$L;
938
- var u = this.clone(), c = t(h, a, !0);
939
- return c && (u.$L = c), u;
935
+ }, f.locale = function(l, a) {
936
+ if (!l) return this.$L;
937
+ var u = this.clone(), h = t(l, a, !0);
938
+ return h && (u.$L = h), u;
940
939
  }, f.clone = function() {
941
940
  return o.w(this.$d, this);
942
941
  }, f.toDate = function() {
@@ -949,7 +948,7 @@ function He() {
949
948
  return this.$d.toUTCString();
950
949
  }, m;
951
950
  })(), S = g.prototype;
952
- return n.prototype = S, [["$ms", M], ["$s", T], ["$m", P], ["$H", Y], ["$W", w], ["$M", W], ["$y", K], ["$D", V]].forEach((function(m) {
951
+ return n.prototype = S, [["$ms", $], ["$s", L], ["$m", P], ["$H", Y], ["$W", w], ["$M", W], ["$y", K], ["$D", V]].forEach((function(m) {
953
952
  S[m[1]] = function(f) {
954
953
  return this.$g(f, m[0], m[1]);
955
954
  };
@@ -966,18 +965,18 @@ const Z = /* @__PURE__ */ be(Ke);
966
965
  var ke = { exports: {} }, Je = ke.exports, Oe;
967
966
  function Qe() {
968
967
  return Oe || (Oe = 1, (function(s, r) {
969
- (function(i, l) {
970
- s.exports = l();
968
+ (function(i, c) {
969
+ s.exports = c();
971
970
  })(Je, (function() {
972
971
  var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
973
- return function(l, v, M) {
974
- var T = v.prototype, P = T.format;
975
- M.en.formats = i, T.format = function(Y) {
972
+ return function(c, v, $) {
973
+ var L = v.prototype, P = L.format;
974
+ $.en.formats = i, L.format = function(Y) {
976
975
  Y === void 0 && (Y = "YYYY-MM-DDTHH:mm:ssZ");
977
976
  var w = this.$locale().formats, N = (function(W, X) {
978
977
  return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V, ee) {
979
978
  var ie = ee && ee.toUpperCase();
980
- return V || X[ee] || i[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ce, de, oe) {
979
+ return V || X[ee] || i[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(he, de, oe) {
981
980
  return de || oe.slice(1);
982
981
  }));
983
982
  }));
@@ -1086,8 +1085,8 @@ class it {
1086
1085
  }
1087
1086
  getBreakpointByScreenWidth(r = this.screenWidth) {
1088
1087
  let i = "xs";
1089
- for (const l of Object.keys(this.screenBreakpoints))
1090
- this.screenBreakpoints[l] <= r && (i = l);
1088
+ for (const c of Object.keys(this.screenBreakpoints))
1089
+ this.screenBreakpoints[c] <= r && (i = c);
1091
1090
  return { breakpoint: i, screenWidth: this.screenBreakpoints[i] };
1092
1091
  }
1093
1092
  isScreenGreaterThan(r) {
@@ -1105,8 +1104,8 @@ class it {
1105
1104
  onResize = () => {
1106
1105
  if (typeof window > "u") return;
1107
1106
  const r = window.innerWidth, i = this.getBreakpointByScreenWidth(r);
1108
- this.lastBreakpoint?.breakpoint !== i?.breakpoint && (this.lastBreakpoint = i, i && this.breakpointChangeCallbacks.forEach((l) => l(i))), this.pendingWidth = r, this.pendingBreakpoint = i, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
1109
- this.pendingBreakpoint && this.onResizeCallbacks.forEach((l) => l(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
1107
+ this.lastBreakpoint?.breakpoint !== i?.breakpoint && (this.lastBreakpoint = i, i && this.breakpointChangeCallbacks.forEach((c) => c(i))), this.pendingWidth = r, this.pendingBreakpoint = i, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
1108
+ this.pendingBreakpoint && this.onResizeCallbacks.forEach((c) => c(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
1110
1109
  }, this.duplicateThresholdMs);
1111
1110
  };
1112
1111
  }