@oardi/ts-utils 0.0.13 → 0.0.14

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