@oardi/ts-utils 0.0.41 → 0.0.44

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