vue-wiguet-chatweb 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/vue-wiguet-chatweb.js +522 -523
- package/dist/vue-wiguet-chatweb.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/Widget.vue +1 -1
@@ -1,10 +1,10 @@
|
|
1
|
-
import { openBlock as
|
2
|
-
let
|
1
|
+
import { openBlock as L, createElementBlock as $, createElementVNode as g, getCurrentScope as Fi, onScopeDispose as Vi, unref as Js, computed as Gs, ref as z, watch as En, getCurrentInstance as Bi, onMounted as Ks, defineComponent as On, onBeforeMount as $i, Fragment as zn, renderList as Ui, normalizeClass as Me, createVNode as he, createCommentVNode as Ge, toDisplayString as Nt, pushScopeId as Pi, popScopeId as Wi, nextTick as Zn, onUnmounted as qi, withModifiers as jn, withDirectives as an, withKeys as Yn, vModelText as Hi, createStaticVNode as zi, vShow as Jn, createBlock as Zi } from "vue";
|
2
|
+
let at;
|
3
3
|
const ji = new Uint8Array(16);
|
4
4
|
function Yi() {
|
5
|
-
if (!
|
5
|
+
if (!at && (at = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !at))
|
6
6
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
7
|
-
return
|
7
|
+
return at(ji);
|
8
8
|
}
|
9
9
|
const P = [];
|
10
10
|
for (let t = 0; t < 256; ++t)
|
@@ -45,7 +45,7 @@ const oe = (t, e) => {
|
|
45
45
|
to
|
46
46
|
];
|
47
47
|
function so(t, e) {
|
48
|
-
return
|
48
|
+
return L(), $("svg", Qi, no);
|
49
49
|
}
|
50
50
|
const ro = /* @__PURE__ */ oe(Xi, [["render", so]]), io = {}, oo = {
|
51
51
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -57,7 +57,7 @@ const ro = /* @__PURE__ */ oe(Xi, [["render", so]]), io = {}, oo = {
|
|
57
57
|
ao
|
58
58
|
];
|
59
59
|
function uo(t, e) {
|
60
|
-
return
|
60
|
+
return L(), $("svg", oo, co);
|
61
61
|
}
|
62
62
|
const lo = /* @__PURE__ */ oe(io, [["render", uo]]);
|
63
63
|
function Xs(t, e) {
|
@@ -65,29 +65,29 @@ function Xs(t, e) {
|
|
65
65
|
return t.apply(e, arguments);
|
66
66
|
};
|
67
67
|
}
|
68
|
-
const { toString: fo } = Object.prototype, { getPrototypeOf:
|
68
|
+
const { toString: fo } = Object.prototype, { getPrototypeOf: Cn } = Object, It = /* @__PURE__ */ ((t) => (e) => {
|
69
69
|
const n = fo.call(e);
|
70
70
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
71
|
-
})(/* @__PURE__ */ Object.create(null)), fe = (t) => (t = t.toLowerCase(), (e) =>
|
71
|
+
})(/* @__PURE__ */ Object.create(null)), fe = (t) => (t = t.toLowerCase(), (e) => It(e) === t), Dt = (t) => (e) => typeof e === t, { isArray: Fe } = Array, Xe = Dt("undefined");
|
72
72
|
function ho(t) {
|
73
|
-
return t !== null && !
|
73
|
+
return t !== null && !Xe(t) && t.constructor !== null && !Xe(t.constructor) && Q(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
74
74
|
}
|
75
75
|
const Qs = fe("ArrayBuffer");
|
76
76
|
function mo(t) {
|
77
77
|
let e;
|
78
78
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Qs(t.buffer), e;
|
79
79
|
}
|
80
|
-
const po =
|
81
|
-
if (
|
80
|
+
const po = Dt("string"), Q = Dt("function"), er = Dt("number"), Lt = (t) => t !== null && typeof t == "object", yo = (t) => t === !0 || t === !1, wt = (t) => {
|
81
|
+
if (It(t) !== "object")
|
82
82
|
return !1;
|
83
|
-
const e =
|
83
|
+
const e = Cn(t);
|
84
84
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
85
|
-
}, go = fe("Date"), wo = fe("File"), So = fe("Blob"), vo = fe("FileList"),
|
85
|
+
}, go = fe("Date"), wo = fe("File"), So = fe("Blob"), vo = fe("FileList"), ko = (t) => Lt(t) && Q(t.pipe), bo = (t) => {
|
86
86
|
let e;
|
87
|
-
return t && (typeof FormData == "function" && t instanceof FormData || Q(t.append) && ((e =
|
87
|
+
return t && (typeof FormData == "function" && t instanceof FormData || Q(t.append) && ((e = It(t)) === "formdata" || // detect form-data instance
|
88
88
|
e === "object" && Q(t.toString) && t.toString() === "[object FormData]"));
|
89
89
|
}, To = fe("URLSearchParams"), Eo = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
90
|
-
function
|
90
|
+
function et(t, e, { allOwnKeys: n = !1 } = {}) {
|
91
91
|
if (t === null || typeof t > "u")
|
92
92
|
return;
|
93
93
|
let s, r;
|
@@ -110,17 +110,17 @@ function tr(t, e) {
|
|
110
110
|
return r;
|
111
111
|
return null;
|
112
112
|
}
|
113
|
-
const nr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, sr = (t) => !
|
114
|
-
function
|
113
|
+
const nr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, sr = (t) => !Xe(t) && t !== nr;
|
114
|
+
function cn() {
|
115
115
|
const { caseless: t } = sr(this) && this || {}, e = {}, n = (s, r) => {
|
116
116
|
const i = t && tr(e, r) || r;
|
117
|
-
wt(e[i]) && wt(s) ? e[i] =
|
117
|
+
wt(e[i]) && wt(s) ? e[i] = cn(e[i], s) : wt(s) ? e[i] = cn({}, s) : Fe(s) ? e[i] = s.slice() : e[i] = s;
|
118
118
|
};
|
119
119
|
for (let s = 0, r = arguments.length; s < r; s++)
|
120
|
-
arguments[s] &&
|
120
|
+
arguments[s] && et(arguments[s], n);
|
121
121
|
return e;
|
122
122
|
}
|
123
|
-
const Oo = (t, e, n, { allOwnKeys: s } = {}) => (
|
123
|
+
const Oo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
124
124
|
n && Q(r) ? t[i] = Xs(r, n) : t[i] = r;
|
125
125
|
}, { allOwnKeys: s }), t), Co = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), xo = (t, e, n, s) => {
|
126
126
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
@@ -133,7 +133,7 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (Qe(e, (r, i) => {
|
|
133
133
|
do {
|
134
134
|
for (r = Object.getOwnPropertyNames(t), i = r.length; i-- > 0; )
|
135
135
|
o = r[i], (!s || s(o, t, e)) && !a[o] && (e[o] = t[o], a[o] = !0);
|
136
|
-
t = n !== !1 &&
|
136
|
+
t = n !== !1 && Cn(t);
|
137
137
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
138
138
|
return e;
|
139
139
|
}, _o = (t, e, n) => {
|
@@ -149,7 +149,7 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (Qe(e, (r, i) => {
|
|
149
149
|
for (; e-- > 0; )
|
150
150
|
n[e] = t[e];
|
151
151
|
return n;
|
152
|
-
}, Mo = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" &&
|
152
|
+
}, Mo = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Cn(Uint8Array)), Ro = (t, e) => {
|
153
153
|
const s = (t && t[Symbol.iterator]).call(t);
|
154
154
|
let r;
|
155
155
|
for (; (r = s.next()) && !r.done; ) {
|
@@ -169,7 +169,7 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (Qe(e, (r, i) => {
|
|
169
169
|
}
|
170
170
|
), Kn = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Fo = fe("RegExp"), rr = (t, e) => {
|
171
171
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
172
|
-
|
172
|
+
et(n, (r, i) => {
|
173
173
|
e(r, i, t) !== !1 && (s[i] = r);
|
174
174
|
}), Object.defineProperties(t, s);
|
175
175
|
}, Vo = (t) => {
|
@@ -195,10 +195,10 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (Qe(e, (r, i) => {
|
|
195
195
|
};
|
196
196
|
return Fe(t) ? s(t) : s(String(t).split(e)), n;
|
197
197
|
}, $o = () => {
|
198
|
-
}, Uo = (t, e) => (t = +t, Number.isFinite(t) ? t : e),
|
198
|
+
}, Uo = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Ht = "abcdefghijklmnopqrstuvwxyz", Xn = "0123456789", ir = {
|
199
199
|
DIGIT: Xn,
|
200
|
-
ALPHA:
|
201
|
-
ALPHA_DIGIT:
|
200
|
+
ALPHA: Ht,
|
201
|
+
ALPHA_DIGIT: Ht + Ht.toUpperCase() + Xn
|
202
202
|
}, Po = (t = 16, e = ir.ALPHA_DIGIT) => {
|
203
203
|
let n = "";
|
204
204
|
const { length: s } = e;
|
@@ -211,50 +211,50 @@ function Wo(t) {
|
|
211
211
|
}
|
212
212
|
const qo = (t) => {
|
213
213
|
const e = new Array(10), n = (s, r) => {
|
214
|
-
if (
|
214
|
+
if (Lt(s)) {
|
215
215
|
if (e.indexOf(s) >= 0)
|
216
216
|
return;
|
217
217
|
if (!("toJSON" in s)) {
|
218
218
|
e[r] = s;
|
219
219
|
const i = Fe(s) ? [] : {};
|
220
|
-
return
|
220
|
+
return et(s, (o, a) => {
|
221
221
|
const u = n(o, r + 1);
|
222
|
-
!
|
222
|
+
!Xe(u) && (i[a] = u);
|
223
223
|
}), e[r] = void 0, i;
|
224
224
|
}
|
225
225
|
}
|
226
226
|
return s;
|
227
227
|
};
|
228
228
|
return n(t, 0);
|
229
|
-
}, Ho = fe("AsyncFunction"), zo = (t) => t && (
|
229
|
+
}, Ho = fe("AsyncFunction"), zo = (t) => t && (Lt(t) || Q(t)) && Q(t.then) && Q(t.catch), f = {
|
230
230
|
isArray: Fe,
|
231
231
|
isArrayBuffer: Qs,
|
232
232
|
isBuffer: ho,
|
233
|
-
isFormData:
|
233
|
+
isFormData: bo,
|
234
234
|
isArrayBufferView: mo,
|
235
235
|
isString: po,
|
236
236
|
isNumber: er,
|
237
237
|
isBoolean: yo,
|
238
|
-
isObject:
|
238
|
+
isObject: Lt,
|
239
239
|
isPlainObject: wt,
|
240
|
-
isUndefined:
|
240
|
+
isUndefined: Xe,
|
241
241
|
isDate: go,
|
242
242
|
isFile: wo,
|
243
243
|
isBlob: So,
|
244
244
|
isRegExp: Fo,
|
245
245
|
isFunction: Q,
|
246
|
-
isStream:
|
246
|
+
isStream: ko,
|
247
247
|
isURLSearchParams: To,
|
248
248
|
isTypedArray: Mo,
|
249
249
|
isFileList: vo,
|
250
|
-
forEach:
|
251
|
-
merge:
|
250
|
+
forEach: et,
|
251
|
+
merge: cn,
|
252
252
|
extend: Oo,
|
253
253
|
trim: Eo,
|
254
254
|
stripBOM: Co,
|
255
255
|
inherits: xo,
|
256
256
|
toFlatObject: No,
|
257
|
-
kindOf:
|
257
|
+
kindOf: It,
|
258
258
|
kindOfTest: fe,
|
259
259
|
endsWith: _o,
|
260
260
|
toArray: Ao,
|
@@ -331,7 +331,7 @@ C.from = (t, e, n, s, r, i) => {
|
|
331
331
|
}, (a) => a !== "isAxiosError"), C.call(o, t.message, e, n, s, r), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
332
332
|
};
|
333
333
|
const Zo = null;
|
334
|
-
function
|
334
|
+
function un(t) {
|
335
335
|
return f.isPlainObject(t) || f.isArray(t);
|
336
336
|
}
|
337
337
|
function cr(t) {
|
@@ -343,12 +343,12 @@ function Qn(t, e, n) {
|
|
343
343
|
}).join(n ? "." : "") : e;
|
344
344
|
}
|
345
345
|
function jo(t) {
|
346
|
-
return f.isArray(t) && !t.some(
|
346
|
+
return f.isArray(t) && !t.some(un);
|
347
347
|
}
|
348
348
|
const Yo = f.toFlatObject(f, {}, null, function(e) {
|
349
349
|
return /^is[A-Z]/.test(e);
|
350
350
|
});
|
351
|
-
function
|
351
|
+
function Ft(t, e, n) {
|
352
352
|
if (!f.isObject(t))
|
353
353
|
throw new TypeError("target must be an object");
|
354
354
|
e = e || new FormData(), n = f.toFlatObject(n, {
|
@@ -383,12 +383,12 @@ function Vt(t, e, n) {
|
|
383
383
|
);
|
384
384
|
}), !1;
|
385
385
|
}
|
386
|
-
return
|
386
|
+
return un(d) ? !0 : (e.append(Qn(T, w, i), c(d)), !1);
|
387
387
|
}
|
388
388
|
const h = [], y = Object.assign(Yo, {
|
389
389
|
defaultVisitor: l,
|
390
390
|
convertValue: c,
|
391
|
-
isVisitable:
|
391
|
+
isVisitable: un
|
392
392
|
});
|
393
393
|
function m(d, w) {
|
394
394
|
if (!f.isUndefined(d)) {
|
@@ -423,10 +423,10 @@ function es(t) {
|
|
423
423
|
return e[s];
|
424
424
|
});
|
425
425
|
}
|
426
|
-
function
|
427
|
-
this._pairs = [], t &&
|
426
|
+
function xn(t, e) {
|
427
|
+
this._pairs = [], t && Ft(t, this, e);
|
428
428
|
}
|
429
|
-
const ur =
|
429
|
+
const ur = xn.prototype;
|
430
430
|
ur.append = function(e, n) {
|
431
431
|
this._pairs.push([e, n]);
|
432
432
|
};
|
@@ -446,7 +446,7 @@ function lr(t, e, n) {
|
|
446
446
|
return t;
|
447
447
|
const s = n && n.encode || Jo, r = n && n.serialize;
|
448
448
|
let i;
|
449
|
-
if (r ? i = r(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new
|
449
|
+
if (r ? i = r(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new xn(e, n).toString(s), i) {
|
450
450
|
const o = t.indexOf("#");
|
451
451
|
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
452
452
|
}
|
@@ -510,7 +510,7 @@ const fr = {
|
|
510
510
|
silentJSONParsing: !0,
|
511
511
|
forcedJSONParsing: !0,
|
512
512
|
clarifyTimeoutError: !1
|
513
|
-
}, Go = typeof URLSearchParams < "u" ? URLSearchParams :
|
513
|
+
}, Go = typeof URLSearchParams < "u" ? URLSearchParams : xn, Ko = typeof FormData < "u" ? FormData : null, Xo = typeof Blob < "u" ? Blob : null, Qo = (() => {
|
514
514
|
let t;
|
515
515
|
return typeof navigator < "u" && ((t = navigator.product) === "ReactNative" || t === "NativeScript" || t === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
516
516
|
})(), ea = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
@@ -526,7 +526,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ce
|
|
526
526
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
527
527
|
};
|
528
528
|
function ta(t, e) {
|
529
|
-
return
|
529
|
+
return Ft(t, new ce.classes.URLSearchParams(), Object.assign({
|
530
530
|
visitor: function(n, s, r, i) {
|
531
531
|
return ce.isNode && f.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
532
532
|
}
|
@@ -590,7 +590,7 @@ const Ve = {
|
|
590
590
|
return ta(e, this.formSerializer).toString();
|
591
591
|
if ((a = f.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
592
592
|
const u = this.env && this.env.FormData;
|
593
|
-
return
|
593
|
+
return Ft(
|
594
594
|
a ? { "files[]": e } : e,
|
595
595
|
u && new u(),
|
596
596
|
this.formSerializer
|
@@ -680,7 +680,7 @@ function ca(t) {
|
|
680
680
|
return e;
|
681
681
|
}
|
682
682
|
const ua = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
683
|
-
function
|
683
|
+
function zt(t, e, n, s, r) {
|
684
684
|
if (f.isFunction(s))
|
685
685
|
return s.call(this, e, n);
|
686
686
|
if (r && (e = n), !!f.isString(e)) {
|
@@ -740,7 +740,7 @@ class ee {
|
|
740
740
|
has(e, n) {
|
741
741
|
if (e = He(e), e) {
|
742
742
|
const s = f.findKey(this, e);
|
743
|
-
return !!(s && this[s] !== void 0 && (!n ||
|
743
|
+
return !!(s && this[s] !== void 0 && (!n || zt(this, this[s], s, n)));
|
744
744
|
}
|
745
745
|
return !1;
|
746
746
|
}
|
@@ -750,7 +750,7 @@ class ee {
|
|
750
750
|
function i(o) {
|
751
751
|
if (o = He(o), o) {
|
752
752
|
const a = f.findKey(s, o);
|
753
|
-
a && (!n ||
|
753
|
+
a && (!n || zt(s, s[a], a, n)) && (delete s[a], r = !0);
|
754
754
|
}
|
755
755
|
}
|
756
756
|
return f.isArray(e) ? e.forEach(i) : i(e), r;
|
@@ -760,7 +760,7 @@ class ee {
|
|
760
760
|
let s = n.length, r = !1;
|
761
761
|
for (; s--; ) {
|
762
762
|
const i = n[s];
|
763
|
-
(!e ||
|
763
|
+
(!e || zt(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
764
764
|
}
|
765
765
|
return r;
|
766
766
|
}
|
@@ -816,7 +816,7 @@ class ee {
|
|
816
816
|
ee.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
817
817
|
f.freezeMethods(ee.prototype);
|
818
818
|
f.freezeMethods(ee);
|
819
|
-
function
|
819
|
+
function Zt(t, e) {
|
820
820
|
const n = this || Ve, s = e || n, r = ee.from(s.headers);
|
821
821
|
let i = s.data;
|
822
822
|
return f.forEach(t, function(a) {
|
@@ -826,10 +826,10 @@ function Yt(t, e) {
|
|
826
826
|
function dr(t) {
|
827
827
|
return !!(t && t.__CANCEL__);
|
828
828
|
}
|
829
|
-
function
|
829
|
+
function tt(t, e, n) {
|
830
830
|
C.call(this, t ?? "canceled", C.ERR_CANCELED, e, n), this.name = "CanceledError";
|
831
831
|
}
|
832
|
-
f.inherits(
|
832
|
+
f.inherits(tt, C, {
|
833
833
|
__CANCEL__: !0
|
834
834
|
});
|
835
835
|
function ha(t, e, n) {
|
@@ -1009,7 +1009,7 @@ const Sa = typeof XMLHttpRequest < "u", va = Sa && function(t) {
|
|
1009
1009
|
r === void 0 && i.setContentType(null), "setRequestHeader" in c && f.forEach(i.toJSON(), function(d, w) {
|
1010
1010
|
c.setRequestHeader(w, d);
|
1011
1011
|
}), f.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress", ss(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", ss(t.onUploadProgress)), (t.cancelToken || t.signal) && (a = (m) => {
|
1012
|
-
c && (s(!m || m.type ? new
|
1012
|
+
c && (s(!m || m.type ? new tt(null, t, c) : m), c.abort(), c = null);
|
1013
1013
|
}, t.cancelToken && t.cancelToken.subscribe(a), t.signal && (t.signal.aborted ? a() : t.signal.addEventListener("abort", a)));
|
1014
1014
|
const y = ga(l);
|
1015
1015
|
if (y && ce.protocols.indexOf(y) === -1) {
|
@@ -1031,7 +1031,7 @@ f.forEach(vt, (t, e) => {
|
|
1031
1031
|
Object.defineProperty(t, "adapterName", { value: e });
|
1032
1032
|
}
|
1033
1033
|
});
|
1034
|
-
const
|
1034
|
+
const ka = {
|
1035
1035
|
getAdapter: (t) => {
|
1036
1036
|
t = f.isArray(t) ? t : [t];
|
1037
1037
|
const { length: e } = t;
|
@@ -1051,22 +1051,22 @@ const ba = {
|
|
1051
1051
|
},
|
1052
1052
|
adapters: vt
|
1053
1053
|
};
|
1054
|
-
function
|
1054
|
+
function jt(t) {
|
1055
1055
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
1056
|
-
throw new
|
1056
|
+
throw new tt(null, t);
|
1057
1057
|
}
|
1058
1058
|
function rs(t) {
|
1059
|
-
return
|
1059
|
+
return jt(t), t.headers = ee.from(t.headers), t.data = Zt.call(
|
1060
1060
|
t,
|
1061
1061
|
t.transformRequest
|
1062
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
1063
|
-
return
|
1062
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ka.getAdapter(t.adapter || Ve.adapter)(t).then(function(s) {
|
1063
|
+
return jt(t), s.data = Zt.call(
|
1064
1064
|
t,
|
1065
1065
|
t.transformResponse,
|
1066
1066
|
s
|
1067
1067
|
), s.headers = ee.from(s.headers), s;
|
1068
1068
|
}, function(s) {
|
1069
|
-
return dr(s) || (
|
1069
|
+
return dr(s) || (jt(t), s && s.response && (s.response.data = Zt.call(
|
1070
1070
|
t,
|
1071
1071
|
t.transformResponse,
|
1072
1072
|
s.response
|
@@ -1137,14 +1137,14 @@ function De(t, e) {
|
|
1137
1137
|
f.isUndefined(y) && h !== a || (n[l] = y);
|
1138
1138
|
}), n;
|
1139
1139
|
}
|
1140
|
-
const pr = "1.4.0",
|
1140
|
+
const pr = "1.4.0", Nn = {};
|
1141
1141
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
1142
|
-
|
1142
|
+
Nn[t] = function(s) {
|
1143
1143
|
return typeof s === t || "a" + (e < 1 ? "n " : " ") + t;
|
1144
1144
|
};
|
1145
1145
|
});
|
1146
1146
|
const os = {};
|
1147
|
-
|
1147
|
+
Nn.transitional = function(e, n, s) {
|
1148
1148
|
function r(i, o) {
|
1149
1149
|
return "[Axios v" + pr + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
1150
1150
|
}
|
@@ -1162,7 +1162,7 @@ _n.transitional = function(e, n, s) {
|
|
1162
1162
|
)), e ? e(i, o, a) : !0;
|
1163
1163
|
};
|
1164
1164
|
};
|
1165
|
-
function
|
1165
|
+
function ba(t, e, n) {
|
1166
1166
|
if (typeof t != "object")
|
1167
1167
|
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
1168
1168
|
const s = Object.keys(t);
|
@@ -1179,10 +1179,10 @@ function ka(t, e, n) {
|
|
1179
1179
|
throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
|
1180
1180
|
}
|
1181
1181
|
}
|
1182
|
-
const
|
1183
|
-
assertOptions:
|
1184
|
-
validators:
|
1185
|
-
}, me =
|
1182
|
+
const ln = {
|
1183
|
+
assertOptions: ba,
|
1184
|
+
validators: Nn
|
1185
|
+
}, me = ln.validators;
|
1186
1186
|
class Te {
|
1187
1187
|
constructor(e) {
|
1188
1188
|
this.defaults = e, this.interceptors = {
|
@@ -1201,13 +1201,13 @@ class Te {
|
|
1201
1201
|
request(e, n) {
|
1202
1202
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = De(this.defaults, n);
|
1203
1203
|
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
1204
|
-
s !== void 0 &&
|
1204
|
+
s !== void 0 && ln.assertOptions(s, {
|
1205
1205
|
silentJSONParsing: me.transitional(me.boolean),
|
1206
1206
|
forcedJSONParsing: me.transitional(me.boolean),
|
1207
1207
|
clarifyTimeoutError: me.transitional(me.boolean)
|
1208
1208
|
}, !1), r != null && (f.isFunction(r) ? n.paramsSerializer = {
|
1209
1209
|
serialize: r
|
1210
|
-
} :
|
1210
|
+
} : ln.assertOptions(r, {
|
1211
1211
|
encode: me.function,
|
1212
1212
|
serialize: me.function
|
1213
1213
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
@@ -1287,7 +1287,7 @@ f.forEach(["post", "put", "patch"], function(e) {
|
|
1287
1287
|
}
|
1288
1288
|
Te.prototype[e] = n(), Te.prototype[e + "Form"] = n(!0);
|
1289
1289
|
});
|
1290
|
-
class
|
1290
|
+
class _n {
|
1291
1291
|
constructor(e) {
|
1292
1292
|
if (typeof e != "function")
|
1293
1293
|
throw new TypeError("executor must be a function.");
|
@@ -1311,7 +1311,7 @@ class An {
|
|
1311
1311
|
s.unsubscribe(i);
|
1312
1312
|
}, o;
|
1313
1313
|
}, e(function(i, o, a) {
|
1314
|
-
s.reason || (s.reason = new
|
1314
|
+
s.reason || (s.reason = new tt(i, o, a), n(s.reason));
|
1315
1315
|
});
|
1316
1316
|
}
|
1317
1317
|
/**
|
@@ -1347,7 +1347,7 @@ class An {
|
|
1347
1347
|
static source() {
|
1348
1348
|
let e;
|
1349
1349
|
return {
|
1350
|
-
token: new
|
1350
|
+
token: new _n(function(r) {
|
1351
1351
|
e = r;
|
1352
1352
|
}),
|
1353
1353
|
cancel: e
|
@@ -1362,7 +1362,7 @@ function Ta(t) {
|
|
1362
1362
|
function Ea(t) {
|
1363
1363
|
return f.isObject(t) && t.isAxiosError === !0;
|
1364
1364
|
}
|
1365
|
-
const
|
1365
|
+
const fn = {
|
1366
1366
|
Continue: 100,
|
1367
1367
|
SwitchingProtocols: 101,
|
1368
1368
|
Processing: 102,
|
@@ -1427,8 +1427,8 @@ const hn = {
|
|
1427
1427
|
NotExtended: 510,
|
1428
1428
|
NetworkAuthenticationRequired: 511
|
1429
1429
|
};
|
1430
|
-
Object.entries(
|
1431
|
-
|
1430
|
+
Object.entries(fn).forEach(([t, e]) => {
|
1431
|
+
fn[e] = t;
|
1432
1432
|
});
|
1433
1433
|
function yr(t) {
|
1434
1434
|
const e = new Te(t), n = Xs(Te.prototype.request, e);
|
@@ -1436,26 +1436,26 @@ function yr(t) {
|
|
1436
1436
|
return yr(De(t, r));
|
1437
1437
|
}, n;
|
1438
1438
|
}
|
1439
|
-
const
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1439
|
+
const U = yr(Ve);
|
1440
|
+
U.Axios = Te;
|
1441
|
+
U.CanceledError = tt;
|
1442
|
+
U.CancelToken = _n;
|
1443
|
+
U.isCancel = dr;
|
1444
|
+
U.VERSION = pr;
|
1445
|
+
U.toFormData = Ft;
|
1446
|
+
U.AxiosError = C;
|
1447
|
+
U.Cancel = U.CanceledError;
|
1448
|
+
U.all = function(e) {
|
1449
1449
|
return Promise.all(e);
|
1450
1450
|
};
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
const
|
1451
|
+
U.spread = Ta;
|
1452
|
+
U.isAxiosError = Ea;
|
1453
|
+
U.mergeConfig = De;
|
1454
|
+
U.AxiosHeaders = ee;
|
1455
|
+
U.formToJSON = (t) => hr(f.isHTMLForm(t) ? new FormData(t) : t);
|
1456
|
+
U.HttpStatusCode = fn;
|
1457
|
+
U.default = U;
|
1458
|
+
const Vt = async function(t) {
|
1459
1459
|
const e = t, n = window.VITE_BACKEND_URL ? window.VITE_BACKEND_URL : "https://chatadmin-gw.dev.mp.gob.bo", s = {
|
1460
1460
|
method: e.method,
|
1461
1461
|
url: `${n}${e.url}`,
|
@@ -1466,7 +1466,7 @@ const Bt = async function(t) {
|
|
1466
1466
|
},
|
1467
1467
|
data: e.data
|
1468
1468
|
};
|
1469
|
-
return await
|
1469
|
+
return await U(s).then(async function(r) {
|
1470
1470
|
return await r.data;
|
1471
1471
|
}).catch(async function(r) {
|
1472
1472
|
console.error(r);
|
@@ -1483,7 +1483,7 @@ async function Oa(t) {
|
|
1483
1483
|
method: "post",
|
1484
1484
|
data: t.body,
|
1485
1485
|
token: t.token
|
1486
|
-
}, n = await
|
1486
|
+
}, n = await Vt(e).catch((r) => (console.error(r), null)), s = n == null ? void 0 : n.response;
|
1487
1487
|
return s != null && s.data ? {
|
1488
1488
|
data: s.data,
|
1489
1489
|
pagination: s.pagination
|
@@ -1494,7 +1494,7 @@ async function Oa(t) {
|
|
1494
1494
|
}
|
1495
1495
|
async function Ca(t, e) {
|
1496
1496
|
var r;
|
1497
|
-
const s = await
|
1497
|
+
const s = await Vt({
|
1498
1498
|
url: "/v1/message/send-message",
|
1499
1499
|
method: "POST",
|
1500
1500
|
data: t,
|
@@ -1504,7 +1504,7 @@ async function Ca(t, e) {
|
|
1504
1504
|
}
|
1505
1505
|
async function as(t) {
|
1506
1506
|
var s;
|
1507
|
-
const n = await
|
1507
|
+
const n = await Vt({
|
1508
1508
|
url: "/v1/app-chats/web-chat",
|
1509
1509
|
method: "get",
|
1510
1510
|
token: t
|
@@ -1522,7 +1522,7 @@ async function cs(t, e) {
|
|
1522
1522
|
method: "PATCH",
|
1523
1523
|
data: n,
|
1524
1524
|
token: e
|
1525
|
-
}, r = await
|
1525
|
+
}, r = await Vt(s).catch((o) => (console.error(o), null));
|
1526
1526
|
return (i = r == null ? void 0 : r.response) == null ? void 0 : i.data;
|
1527
1527
|
}
|
1528
1528
|
function xa(t) {
|
@@ -1533,9 +1533,9 @@ function gr(t) {
|
|
1533
1533
|
}
|
1534
1534
|
const Na = typeof window < "u" && typeof document < "u";
|
1535
1535
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
1536
|
-
const _a = (t) => t != null,
|
1536
|
+
const _a = (t) => t != null, Yt = () => {
|
1537
1537
|
};
|
1538
|
-
function
|
1538
|
+
function Jt(t) {
|
1539
1539
|
var e;
|
1540
1540
|
const n = gr(t);
|
1541
1541
|
return (e = n == null ? void 0 : n.$el) != null ? e : n;
|
@@ -1560,28 +1560,28 @@ function Ia(t, e, n = {}) {
|
|
1560
1560
|
immediate: a = !0
|
1561
1561
|
} = n, u = Ra(() => o && "IntersectionObserver" in o), c = Gs(() => {
|
1562
1562
|
const d = gr(t);
|
1563
|
-
return (Array.isArray(d) ? d : [d]).map(
|
1563
|
+
return (Array.isArray(d) ? d : [d]).map(Jt).filter(_a);
|
1564
1564
|
});
|
1565
|
-
let l =
|
1566
|
-
const h = z(a), y = u.value ?
|
1567
|
-
() => [c.value,
|
1565
|
+
let l = Yt;
|
1566
|
+
const h = z(a), y = u.value ? En(
|
1567
|
+
() => [c.value, Jt(s), h.value],
|
1568
1568
|
([d, w]) => {
|
1569
1569
|
if (l(), !h.value || !d.length)
|
1570
1570
|
return;
|
1571
1571
|
const T = new IntersectionObserver(
|
1572
1572
|
e,
|
1573
1573
|
{
|
1574
|
-
root:
|
1574
|
+
root: Jt(w),
|
1575
1575
|
rootMargin: r,
|
1576
1576
|
threshold: i
|
1577
1577
|
}
|
1578
1578
|
);
|
1579
1579
|
d.forEach((_) => _ && T.observe(_)), l = () => {
|
1580
|
-
T.disconnect(), l =
|
1580
|
+
T.disconnect(), l = Yt;
|
1581
1581
|
};
|
1582
1582
|
},
|
1583
1583
|
{ immediate: a, flush: "post" }
|
1584
|
-
) :
|
1584
|
+
) : Yt, m = () => {
|
1585
1585
|
l(), y(), h.value = !1;
|
1586
1586
|
};
|
1587
1587
|
return xa(m), {
|
@@ -1627,7 +1627,7 @@ class pe extends Ee {
|
|
1627
1627
|
super("Zone is an abstract class");
|
1628
1628
|
}
|
1629
1629
|
}
|
1630
|
-
const p = "numeric", ie = "short", Y = "long",
|
1630
|
+
const p = "numeric", ie = "short", Y = "long", _t = {
|
1631
1631
|
year: p,
|
1632
1632
|
month: p,
|
1633
1633
|
day: p
|
@@ -1644,12 +1644,12 @@ const p = "numeric", ie = "short", Y = "long", At = {
|
|
1644
1644
|
year: p,
|
1645
1645
|
month: Y,
|
1646
1646
|
day: p
|
1647
|
-
},
|
1647
|
+
}, kr = {
|
1648
1648
|
year: p,
|
1649
1649
|
month: Y,
|
1650
1650
|
day: p,
|
1651
1651
|
weekday: Y
|
1652
|
-
},
|
1652
|
+
}, br = {
|
1653
1653
|
hour: p,
|
1654
1654
|
minute: p
|
1655
1655
|
}, Tr = {
|
@@ -1753,7 +1753,7 @@ const p = "numeric", ie = "short", Y = "long", At = {
|
|
1753
1753
|
second: p,
|
1754
1754
|
timeZoneName: Y
|
1755
1755
|
};
|
1756
|
-
class
|
1756
|
+
class nt {
|
1757
1757
|
/**
|
1758
1758
|
* The type of zone
|
1759
1759
|
* @abstract
|
@@ -1837,14 +1837,14 @@ class tt {
|
|
1837
1837
|
throw new pe();
|
1838
1838
|
}
|
1839
1839
|
}
|
1840
|
-
let
|
1841
|
-
class
|
1840
|
+
let Gt = null;
|
1841
|
+
class Bt extends nt {
|
1842
1842
|
/**
|
1843
1843
|
* Get a singleton instance of the local zone
|
1844
1844
|
* @return {SystemZone}
|
1845
1845
|
*/
|
1846
1846
|
static get instance() {
|
1847
|
-
return
|
1847
|
+
return Gt === null && (Gt = new Bt()), Gt;
|
1848
1848
|
}
|
1849
1849
|
/** @override **/
|
1850
1850
|
get type() {
|
@@ -1864,7 +1864,7 @@ class $t extends tt {
|
|
1864
1864
|
}
|
1865
1865
|
/** @override **/
|
1866
1866
|
formatOffset(e, n) {
|
1867
|
-
return
|
1867
|
+
return Ke(this.offset(e), n);
|
1868
1868
|
}
|
1869
1869
|
/** @override **/
|
1870
1870
|
offset(e) {
|
@@ -1879,9 +1879,9 @@ class $t extends tt {
|
|
1879
1879
|
return !0;
|
1880
1880
|
}
|
1881
1881
|
}
|
1882
|
-
let
|
1882
|
+
let kt = {};
|
1883
1883
|
function $a(t) {
|
1884
|
-
return
|
1884
|
+
return kt[t] || (kt[t] = new Intl.DateTimeFormat("en-US", {
|
1885
1885
|
hour12: !1,
|
1886
1886
|
timeZone: t,
|
1887
1887
|
year: "numeric",
|
@@ -1891,7 +1891,7 @@ function $a(t) {
|
|
1891
1891
|
minute: "2-digit",
|
1892
1892
|
second: "2-digit",
|
1893
1893
|
era: "short"
|
1894
|
-
})),
|
1894
|
+
})), kt[t];
|
1895
1895
|
}
|
1896
1896
|
const Ua = {
|
1897
1897
|
year: 0,
|
@@ -1910,25 +1910,25 @@ function Wa(t, e) {
|
|
1910
1910
|
const n = t.formatToParts(e), s = [];
|
1911
1911
|
for (let r = 0; r < n.length; r++) {
|
1912
1912
|
const { type: i, value: o } = n[r], a = Ua[i];
|
1913
|
-
i === "era" ? s[a] = o :
|
1913
|
+
i === "era" ? s[a] = o : k(a) || (s[a] = parseInt(o, 10));
|
1914
1914
|
}
|
1915
1915
|
return s;
|
1916
1916
|
}
|
1917
|
-
let
|
1918
|
-
class de extends
|
1917
|
+
let ct = {};
|
1918
|
+
class de extends nt {
|
1919
1919
|
/**
|
1920
1920
|
* @param {string} name - Zone name
|
1921
1921
|
* @return {IANAZone}
|
1922
1922
|
*/
|
1923
1923
|
static create(e) {
|
1924
|
-
return
|
1924
|
+
return ct[e] || (ct[e] = new de(e)), ct[e];
|
1925
1925
|
}
|
1926
1926
|
/**
|
1927
1927
|
* Reset local caches. Should only be necessary in testing scenarios.
|
1928
1928
|
* @return {void}
|
1929
1929
|
*/
|
1930
1930
|
static resetCache() {
|
1931
|
-
|
1931
|
+
ct = {}, kt = {};
|
1932
1932
|
}
|
1933
1933
|
/**
|
1934
1934
|
* Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
|
@@ -2007,7 +2007,7 @@ class de extends tt {
|
|
2007
2007
|
* @return {string}
|
2008
2008
|
*/
|
2009
2009
|
formatOffset(e, n) {
|
2010
|
-
return
|
2010
|
+
return Ke(this.offset(e), n);
|
2011
2011
|
}
|
2012
2012
|
/**
|
2013
2013
|
* Return the offset in minutes for this zone at the specified timestamp.
|
@@ -2021,7 +2021,7 @@ class de extends tt {
|
|
2021
2021
|
const s = $a(this.name);
|
2022
2022
|
let [r, i, o, a, u, c, l] = s.formatToParts ? Wa(s, n) : Pa(s, n);
|
2023
2023
|
a === "BC" && (r = -Math.abs(r) + 1);
|
2024
|
-
const y =
|
2024
|
+
const y = Ut({
|
2025
2025
|
year: r,
|
2026
2026
|
month: i,
|
2027
2027
|
day: o,
|
@@ -2058,23 +2058,23 @@ function qa(t, e = {}) {
|
|
2058
2058
|
let s = us[n];
|
2059
2059
|
return s || (s = new Intl.ListFormat(t, e), us[n] = s), s;
|
2060
2060
|
}
|
2061
|
-
let
|
2062
|
-
function
|
2061
|
+
let hn = {};
|
2062
|
+
function dn(t, e = {}) {
|
2063
2063
|
const n = JSON.stringify([t, e]);
|
2064
|
-
let s =
|
2065
|
-
return s || (s = new Intl.DateTimeFormat(t, e),
|
2064
|
+
let s = hn[n];
|
2065
|
+
return s || (s = new Intl.DateTimeFormat(t, e), hn[n] = s), s;
|
2066
2066
|
}
|
2067
|
-
let
|
2067
|
+
let mn = {};
|
2068
2068
|
function Ha(t, e = {}) {
|
2069
2069
|
const n = JSON.stringify([t, e]);
|
2070
|
-
let s =
|
2071
|
-
return s || (s = new Intl.NumberFormat(t, e),
|
2070
|
+
let s = mn[n];
|
2071
|
+
return s || (s = new Intl.NumberFormat(t, e), mn[n] = s), s;
|
2072
2072
|
}
|
2073
|
-
let
|
2073
|
+
let pn = {};
|
2074
2074
|
function za(t, e = {}) {
|
2075
2075
|
const { base: n, ...s } = e, r = JSON.stringify([t, s]);
|
2076
|
-
let i =
|
2077
|
-
return i || (i = new Intl.RelativeTimeFormat(t, e),
|
2076
|
+
let i = pn[r];
|
2077
|
+
return i || (i = new Intl.RelativeTimeFormat(t, e), pn[r] = i), i;
|
2078
2078
|
}
|
2079
2079
|
let je = null;
|
2080
2080
|
function Za() {
|
@@ -2098,10 +2098,10 @@ function Ya(t) {
|
|
2098
2098
|
{
|
2099
2099
|
let s, r;
|
2100
2100
|
try {
|
2101
|
-
s =
|
2101
|
+
s = dn(t).resolvedOptions(), r = t;
|
2102
2102
|
} catch {
|
2103
2103
|
const u = t.substring(0, n);
|
2104
|
-
s =
|
2104
|
+
s = dn(u).resolvedOptions(), r = u;
|
2105
2105
|
}
|
2106
2106
|
const { numberingSystem: i, calendar: o } = s;
|
2107
2107
|
return [r, i, o];
|
@@ -2126,7 +2126,7 @@ function Ka(t) {
|
|
2126
2126
|
}
|
2127
2127
|
return e;
|
2128
2128
|
}
|
2129
|
-
function
|
2129
|
+
function ut(t, e, n, s) {
|
2130
2130
|
const r = t.listingMode();
|
2131
2131
|
return r === "error" ? null : r === "en" ? n(e) : s(e);
|
2132
2132
|
}
|
@@ -2147,7 +2147,7 @@ class Qa {
|
|
2147
2147
|
const n = this.floor ? Math.floor(e) : e;
|
2148
2148
|
return this.inf.format(n);
|
2149
2149
|
} else {
|
2150
|
-
const n = this.floor ? Math.floor(e) :
|
2150
|
+
const n = this.floor ? Math.floor(e) : Dn(e, 3);
|
2151
2151
|
return D(n, this.padTo);
|
2152
2152
|
}
|
2153
2153
|
}
|
@@ -2163,7 +2163,7 @@ class ec {
|
|
2163
2163
|
e.offset !== 0 && de.create(a).valid ? (r = a, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
2164
2164
|
} else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
2165
2165
|
const i = { ...this.opts };
|
2166
|
-
i.timeZone = i.timeZone || r, this.dtf =
|
2166
|
+
i.timeZone = i.timeZone || r, this.dtf = dn(n, i);
|
2167
2167
|
}
|
2168
2168
|
format() {
|
2169
2169
|
return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
|
@@ -2215,11 +2215,11 @@ class N {
|
|
2215
2215
|
);
|
2216
2216
|
}
|
2217
2217
|
static create(e, n, s, r, i = !1) {
|
2218
|
-
const o = e || I.defaultLocale, a = o || (i ? "en-US" : Za()), u = n || I.defaultNumberingSystem, c = s || I.defaultOutputCalendar, l =
|
2218
|
+
const o = e || I.defaultLocale, a = o || (i ? "en-US" : Za()), u = n || I.defaultNumberingSystem, c = s || I.defaultOutputCalendar, l = yn(r) || I.defaultWeekSettings;
|
2219
2219
|
return new N(a, u, c, l, o);
|
2220
2220
|
}
|
2221
2221
|
static resetCache() {
|
2222
|
-
je = null,
|
2222
|
+
je = null, hn = {}, mn = {}, pn = {};
|
2223
2223
|
}
|
2224
2224
|
static fromObject({ locale: e, numberingSystem: n, outputCalendar: s, weekSettings: r } = {}) {
|
2225
2225
|
return N.create(e, n, s, r);
|
@@ -2240,7 +2240,7 @@ class N {
|
|
2240
2240
|
e.locale || this.specifiedLocale,
|
2241
2241
|
e.numberingSystem || this.numberingSystem,
|
2242
2242
|
e.outputCalendar || this.outputCalendar,
|
2243
|
-
|
2243
|
+
yn(e.weekSettings) || this.weekSettings,
|
2244
2244
|
e.defaultToEN || !1
|
2245
2245
|
);
|
2246
2246
|
}
|
@@ -2251,13 +2251,13 @@ class N {
|
|
2251
2251
|
return this.clone({ ...e, defaultToEN: !1 });
|
2252
2252
|
}
|
2253
2253
|
months(e, n = !1) {
|
2254
|
-
return
|
2254
|
+
return ut(this, e, Jr, () => {
|
2255
2255
|
const s = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone";
|
2256
2256
|
return this.monthsCache[r][e] || (this.monthsCache[r][e] = Ga((i) => this.extract(i, s, "month"))), this.monthsCache[r][e];
|
2257
2257
|
});
|
2258
2258
|
}
|
2259
2259
|
weekdays(e, n = !1) {
|
2260
|
-
return
|
2260
|
+
return ut(this, e, Xr, () => {
|
2261
2261
|
const s = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone";
|
2262
2262
|
return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = Ka(
|
2263
2263
|
(i) => this.extract(i, s, "weekday")
|
@@ -2265,7 +2265,7 @@ class N {
|
|
2265
2265
|
});
|
2266
2266
|
}
|
2267
2267
|
meridiems() {
|
2268
|
-
return
|
2268
|
+
return ut(
|
2269
2269
|
this,
|
2270
2270
|
void 0,
|
2271
2271
|
() => Qr,
|
@@ -2281,7 +2281,7 @@ class N {
|
|
2281
2281
|
);
|
2282
2282
|
}
|
2283
2283
|
eras(e) {
|
2284
|
-
return
|
2284
|
+
return ut(this, e, ei, () => {
|
2285
2285
|
const n = { era: e };
|
2286
2286
|
return this.eraCache[e] || (this.eraCache[e] = [v.utc(-40, 1, 1), v.utc(2017, 1, 1)].map(
|
2287
2287
|
(s) => this.extract(s, n, "era")
|
@@ -2326,14 +2326,14 @@ class N {
|
|
2326
2326
|
return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;
|
2327
2327
|
}
|
2328
2328
|
}
|
2329
|
-
let
|
2330
|
-
class Z extends
|
2329
|
+
let Kt = null;
|
2330
|
+
class Z extends nt {
|
2331
2331
|
/**
|
2332
2332
|
* Get a singleton instance of UTC
|
2333
2333
|
* @return {FixedOffsetZone}
|
2334
2334
|
*/
|
2335
2335
|
static get utcInstance() {
|
2336
|
-
return
|
2336
|
+
return Kt === null && (Kt = new Z(0)), Kt;
|
2337
2337
|
}
|
2338
2338
|
/**
|
2339
2339
|
* Get an instance with a specified offset
|
@@ -2355,7 +2355,7 @@ class Z extends tt {
|
|
2355
2355
|
if (e) {
|
2356
2356
|
const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
2357
2357
|
if (n)
|
2358
|
-
return new Z(
|
2358
|
+
return new Z(Pt(n[1], n[2]));
|
2359
2359
|
}
|
2360
2360
|
return null;
|
2361
2361
|
}
|
@@ -2377,7 +2377,7 @@ class Z extends tt {
|
|
2377
2377
|
* @type {string}
|
2378
2378
|
*/
|
2379
2379
|
get name() {
|
2380
|
-
return this.fixed === 0 ? "UTC" : `UTC${
|
2380
|
+
return this.fixed === 0 ? "UTC" : `UTC${Ke(this.fixed, "narrow")}`;
|
2381
2381
|
}
|
2382
2382
|
/**
|
2383
2383
|
* The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
|
@@ -2386,7 +2386,7 @@ class Z extends tt {
|
|
2386
2386
|
* @type {string}
|
2387
2387
|
*/
|
2388
2388
|
get ianaName() {
|
2389
|
-
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${
|
2389
|
+
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${Ke(-this.fixed, "narrow")}`;
|
2390
2390
|
}
|
2391
2391
|
/**
|
2392
2392
|
* Returns the offset's common name at the specified timestamp.
|
@@ -2406,7 +2406,7 @@ class Z extends tt {
|
|
2406
2406
|
* @return {string}
|
2407
2407
|
*/
|
2408
2408
|
formatOffset(e, n) {
|
2409
|
-
return
|
2409
|
+
return Ke(this.fixed, n);
|
2410
2410
|
}
|
2411
2411
|
/**
|
2412
2412
|
* Returns whether the offset is known to be fixed for the whole year:
|
@@ -2446,7 +2446,7 @@ class Z extends tt {
|
|
2446
2446
|
return !0;
|
2447
2447
|
}
|
2448
2448
|
}
|
2449
|
-
class sc extends
|
2449
|
+
class sc extends nt {
|
2450
2450
|
constructor(e) {
|
2451
2451
|
super(), this.zoneName = e;
|
2452
2452
|
}
|
@@ -2484,16 +2484,16 @@ class sc extends tt {
|
|
2484
2484
|
}
|
2485
2485
|
}
|
2486
2486
|
function we(t, e) {
|
2487
|
-
if (
|
2487
|
+
if (k(t) || t === null)
|
2488
2488
|
return e;
|
2489
|
-
if (t instanceof
|
2489
|
+
if (t instanceof nt)
|
2490
2490
|
return t;
|
2491
2491
|
if (uc(t)) {
|
2492
2492
|
const n = t.toLowerCase();
|
2493
|
-
return n === "default" ? e : n === "local" || n === "system" ?
|
2493
|
+
return n === "default" ? e : n === "local" || n === "system" ? Bt.instance : n === "utc" || n === "gmt" ? Z.utcInstance : Z.parseSpecifier(n) || de.create(t);
|
2494
2494
|
} else return Se(t) ? Z.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new sc(t);
|
2495
2495
|
}
|
2496
|
-
const
|
2496
|
+
const An = {
|
2497
2497
|
arab: "[٠-٩]",
|
2498
2498
|
arabext: "[۰-۹]",
|
2499
2499
|
bali: "[᭐-᭙]",
|
@@ -2535,14 +2535,14 @@ const Mn = {
|
|
2535
2535
|
telu: [3174, 3183],
|
2536
2536
|
thai: [3664, 3673],
|
2537
2537
|
tibt: [3872, 3881]
|
2538
|
-
}, rc =
|
2538
|
+
}, rc = An.hanidec.replace(/[\[|\]]/g, "").split("");
|
2539
2539
|
function ic(t) {
|
2540
2540
|
let e = parseInt(t, 10);
|
2541
2541
|
if (isNaN(e)) {
|
2542
2542
|
e = "";
|
2543
2543
|
for (let n = 0; n < t.length; n++) {
|
2544
2544
|
const s = t.charCodeAt(n);
|
2545
|
-
if (t[n].search(
|
2545
|
+
if (t[n].search(An.hanidec) !== -1)
|
2546
2546
|
e += rc.indexOf(t[n]);
|
2547
2547
|
else
|
2548
2548
|
for (const r in fs) {
|
@@ -2560,7 +2560,7 @@ function oc() {
|
|
2560
2560
|
}
|
2561
2561
|
function te({ numberingSystem: t }, e = "") {
|
2562
2562
|
const n = t || "latn";
|
2563
|
-
return Ne[n] || (Ne[n] = {}), Ne[n][e] || (Ne[n][e] = new RegExp(`${
|
2563
|
+
return Ne[n] || (Ne[n] = {}), Ne[n][e] || (Ne[n][e] = new RegExp(`${An[n]}${e}`)), Ne[n][e];
|
2564
2564
|
}
|
2565
2565
|
let hs = () => Date.now(), ds = "system", ms = null, ps = null, ys = null, gs = 60, ws, Ss = null;
|
2566
2566
|
class I {
|
@@ -2595,7 +2595,7 @@ class I {
|
|
2595
2595
|
* @type {Zone}
|
2596
2596
|
*/
|
2597
2597
|
static get defaultZone() {
|
2598
|
-
return we(ds,
|
2598
|
+
return we(ds, Bt.instance);
|
2599
2599
|
}
|
2600
2600
|
/**
|
2601
2601
|
* Get the default locale to create DateTimes with. Does not affect existing instances.
|
@@ -2659,7 +2659,7 @@ class I {
|
|
2659
2659
|
* @param {WeekSettings|null} weekSettings
|
2660
2660
|
*/
|
2661
2661
|
static set defaultWeekSettings(e) {
|
2662
|
-
Ss =
|
2662
|
+
Ss = yn(e);
|
2663
2663
|
}
|
2664
2664
|
/**
|
2665
2665
|
* Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
|
@@ -2717,49 +2717,49 @@ function K(t, e) {
|
|
2717
2717
|
`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
|
2718
2718
|
);
|
2719
2719
|
}
|
2720
|
-
function
|
2720
|
+
function Mn(t, e, n) {
|
2721
2721
|
const s = new Date(Date.UTC(t, e - 1, n));
|
2722
2722
|
t < 100 && t >= 0 && s.setUTCFullYear(s.getUTCFullYear() - 1900);
|
2723
2723
|
const r = s.getUTCDay();
|
2724
2724
|
return r === 0 ? 7 : r;
|
2725
2725
|
}
|
2726
2726
|
function Ur(t, e, n) {
|
2727
|
-
return n + (
|
2727
|
+
return n + (st(t) ? $r : Br)[e - 1];
|
2728
2728
|
}
|
2729
2729
|
function Pr(t, e) {
|
2730
|
-
const n =
|
2730
|
+
const n = st(t) ? $r : Br, s = n.findIndex((i) => i < e), r = e - n[s];
|
2731
2731
|
return { month: s + 1, day: r };
|
2732
2732
|
}
|
2733
|
-
function
|
2733
|
+
function Rn(t, e) {
|
2734
2734
|
return (t - e + 7) % 7 + 1;
|
2735
2735
|
}
|
2736
|
-
function
|
2737
|
-
const { year: s, month: r, day: i } = t, o = Ur(s, r, i), a =
|
2736
|
+
function At(t, e = 4, n = 1) {
|
2737
|
+
const { year: s, month: r, day: i } = t, o = Ur(s, r, i), a = Rn(Mn(s, r, i), n);
|
2738
2738
|
let u = Math.floor((o - a + 14 - e) / 7), c;
|
2739
|
-
return u < 1 ? (c = s - 1, u =
|
2739
|
+
return u < 1 ? (c = s - 1, u = Qe(c, e, n)) : u > Qe(s, e, n) ? (c = s + 1, u = 1) : c = s, { weekYear: c, weekNumber: u, weekday: a, ...Wt(t) };
|
2740
2740
|
}
|
2741
2741
|
function vs(t, e = 4, n = 1) {
|
2742
|
-
const { weekYear: s, weekNumber: r, weekday: i } = t, o =
|
2742
|
+
const { weekYear: s, weekNumber: r, weekday: i } = t, o = Rn(Mn(s, 1, e), n), a = Re(s);
|
2743
2743
|
let u = r * 7 + i - o - 7 + e, c;
|
2744
2744
|
u < 1 ? (c = s - 1, u += Re(c)) : u > a ? (c = s + 1, u -= Re(s)) : c = s;
|
2745
2745
|
const { month: l, day: h } = Pr(c, u);
|
2746
|
-
return { year: c, month: l, day: h, ...
|
2746
|
+
return { year: c, month: l, day: h, ...Wt(t) };
|
2747
2747
|
}
|
2748
|
-
function
|
2748
|
+
function Xt(t) {
|
2749
2749
|
const { year: e, month: n, day: s } = t, r = Ur(e, n, s);
|
2750
|
-
return { year: e, ordinal: r, ...
|
2750
|
+
return { year: e, ordinal: r, ...Wt(t) };
|
2751
2751
|
}
|
2752
|
-
function
|
2752
|
+
function ks(t) {
|
2753
2753
|
const { year: e, ordinal: n } = t, { month: s, day: r } = Pr(e, n);
|
2754
|
-
return { year: e, month: s, day: r, ...
|
2754
|
+
return { year: e, month: s, day: r, ...Wt(t) };
|
2755
2755
|
}
|
2756
|
-
function
|
2757
|
-
if (!
|
2758
|
-
if (!
|
2756
|
+
function bs(t, e) {
|
2757
|
+
if (!k(t.localWeekday) || !k(t.localWeekNumber) || !k(t.localWeekYear)) {
|
2758
|
+
if (!k(t.weekday) || !k(t.weekNumber) || !k(t.weekYear))
|
2759
2759
|
throw new Ae(
|
2760
2760
|
"Cannot mix locale-based week fields with ISO-based week fields"
|
2761
2761
|
);
|
2762
|
-
return
|
2762
|
+
return k(t.localWeekday) || (t.weekday = t.localWeekday), k(t.localWeekNumber) || (t.weekNumber = t.localWeekNumber), k(t.localWeekYear) || (t.weekYear = t.localWeekYear), delete t.localWeekday, delete t.localWeekNumber, delete t.localWeekYear, {
|
2763
2763
|
minDaysInFirstWeek: e.getMinDaysInFirstWeek(),
|
2764
2764
|
startOfWeek: e.getStartOfWeek()
|
2765
2765
|
};
|
@@ -2767,32 +2767,32 @@ function ks(t, e) {
|
|
2767
2767
|
return { minDaysInFirstWeek: 4, startOfWeek: 1 };
|
2768
2768
|
}
|
2769
2769
|
function ac(t, e = 4, n = 1) {
|
2770
|
-
const s =
|
2770
|
+
const s = $t(t.weekYear), r = X(
|
2771
2771
|
t.weekNumber,
|
2772
2772
|
1,
|
2773
|
-
|
2773
|
+
Qe(t.weekYear, e, n)
|
2774
2774
|
), i = X(t.weekday, 1, 7);
|
2775
2775
|
return s ? r ? i ? !1 : K("weekday", t.weekday) : K("week", t.weekNumber) : K("weekYear", t.weekYear);
|
2776
2776
|
}
|
2777
2777
|
function cc(t) {
|
2778
|
-
const e =
|
2778
|
+
const e = $t(t.year), n = X(t.ordinal, 1, Re(t.year));
|
2779
2779
|
return e ? n ? !1 : K("ordinal", t.ordinal) : K("year", t.year);
|
2780
2780
|
}
|
2781
2781
|
function Wr(t) {
|
2782
|
-
const e =
|
2782
|
+
const e = $t(t.year), n = X(t.month, 1, 12), s = X(t.day, 1, Mt(t.year, t.month));
|
2783
2783
|
return e ? n ? s ? !1 : K("day", t.day) : K("month", t.month) : K("year", t.year);
|
2784
2784
|
}
|
2785
2785
|
function qr(t) {
|
2786
2786
|
const { hour: e, minute: n, second: s, millisecond: r } = t, i = X(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, o = X(n, 0, 59), a = X(s, 0, 59), u = X(r, 0, 999);
|
2787
2787
|
return i ? o ? a ? u ? !1 : K("millisecond", r) : K("second", s) : K("minute", n) : K("hour", e);
|
2788
2788
|
}
|
2789
|
-
function
|
2789
|
+
function k(t) {
|
2790
2790
|
return typeof t > "u";
|
2791
2791
|
}
|
2792
2792
|
function Se(t) {
|
2793
2793
|
return typeof t == "number";
|
2794
2794
|
}
|
2795
|
-
function
|
2795
|
+
function $t(t) {
|
2796
2796
|
return typeof t == "number" && t % 1 === 0;
|
2797
2797
|
}
|
2798
2798
|
function uc(t) {
|
@@ -2831,7 +2831,7 @@ function hc(t, e) {
|
|
2831
2831
|
function Le(t, e) {
|
2832
2832
|
return Object.prototype.hasOwnProperty.call(t, e);
|
2833
2833
|
}
|
2834
|
-
function
|
2834
|
+
function yn(t) {
|
2835
2835
|
if (t == null)
|
2836
2836
|
return null;
|
2837
2837
|
if (typeof t != "object")
|
@@ -2845,7 +2845,7 @@ function gn(t) {
|
|
2845
2845
|
};
|
2846
2846
|
}
|
2847
2847
|
function X(t, e, n) {
|
2848
|
-
return
|
2848
|
+
return $t(t) && t >= e && t <= n;
|
2849
2849
|
}
|
2850
2850
|
function dc(t, e) {
|
2851
2851
|
return t - e * Math.floor(t / e);
|
@@ -2856,34 +2856,34 @@ function D(t, e = 2) {
|
|
2856
2856
|
return n ? s = "-" + ("" + -t).padStart(e, "0") : s = ("" + t).padStart(e, "0"), s;
|
2857
2857
|
}
|
2858
2858
|
function ge(t) {
|
2859
|
-
if (!(
|
2859
|
+
if (!(k(t) || t === null || t === ""))
|
2860
2860
|
return parseInt(t, 10);
|
2861
2861
|
}
|
2862
2862
|
function ve(t) {
|
2863
|
-
if (!(
|
2863
|
+
if (!(k(t) || t === null || t === ""))
|
2864
2864
|
return parseFloat(t);
|
2865
2865
|
}
|
2866
|
-
function
|
2867
|
-
if (!(
|
2866
|
+
function In(t) {
|
2867
|
+
if (!(k(t) || t === null || t === "")) {
|
2868
2868
|
const e = parseFloat("0." + t) * 1e3;
|
2869
2869
|
return Math.floor(e);
|
2870
2870
|
}
|
2871
2871
|
}
|
2872
|
-
function
|
2872
|
+
function Dn(t, e, n = !1) {
|
2873
2873
|
const s = 10 ** e;
|
2874
2874
|
return (n ? Math.trunc : Math.round)(t * s) / s;
|
2875
2875
|
}
|
2876
|
-
function
|
2876
|
+
function st(t) {
|
2877
2877
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
2878
2878
|
}
|
2879
2879
|
function Re(t) {
|
2880
|
-
return
|
2880
|
+
return st(t) ? 366 : 365;
|
2881
2881
|
}
|
2882
|
-
function
|
2882
|
+
function Mt(t, e) {
|
2883
2883
|
const n = dc(e - 1, 12) + 1, s = t + (e - n) / 12;
|
2884
|
-
return n === 2 ?
|
2884
|
+
return n === 2 ? st(s) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
|
2885
2885
|
}
|
2886
|
-
function
|
2886
|
+
function Ut(t) {
|
2887
2887
|
let e = Date.UTC(
|
2888
2888
|
t.year,
|
2889
2889
|
t.month - 1,
|
@@ -2896,13 +2896,13 @@ function Pt(t) {
|
|
2896
2896
|
return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
|
2897
2897
|
}
|
2898
2898
|
function Es(t, e, n) {
|
2899
|
-
return -
|
2899
|
+
return -Rn(Mn(t, 1, e), n) + e - 1;
|
2900
2900
|
}
|
2901
|
-
function
|
2901
|
+
function Qe(t, e = 4, n = 1) {
|
2902
2902
|
const s = Es(t, e, n), r = Es(t + 1, e, n);
|
2903
2903
|
return (Re(t) - s + r) / 7;
|
2904
2904
|
}
|
2905
|
-
function
|
2905
|
+
function gn(t) {
|
2906
2906
|
return t > 99 ? t : t > I.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
|
2907
2907
|
}
|
2908
2908
|
function Zr(t, e, n, s = null) {
|
@@ -2918,7 +2918,7 @@ function Zr(t, e, n, s = null) {
|
|
2918
2918
|
const o = { timeZoneName: e, ...i }, a = new Intl.DateTimeFormat(n, o).formatToParts(r).find((u) => u.type.toLowerCase() === "timezonename");
|
2919
2919
|
return a ? a.value : null;
|
2920
2920
|
}
|
2921
|
-
function
|
2921
|
+
function Pt(t, e) {
|
2922
2922
|
let n = parseInt(t, 10);
|
2923
2923
|
Number.isNaN(n) && (n = 0);
|
2924
2924
|
const s = parseInt(e, 10) || 0, r = n < 0 || Object.is(n, -0) ? -s : s;
|
@@ -2930,7 +2930,7 @@ function jr(t) {
|
|
2930
2930
|
throw new q(`Invalid unit value ${t}`);
|
2931
2931
|
return e;
|
2932
2932
|
}
|
2933
|
-
function
|
2933
|
+
function Rt(t, e) {
|
2934
2934
|
const n = {};
|
2935
2935
|
for (const s in t)
|
2936
2936
|
if (Le(t, s)) {
|
@@ -2940,7 +2940,7 @@ function It(t, e) {
|
|
2940
2940
|
}
|
2941
2941
|
return n;
|
2942
2942
|
}
|
2943
|
-
function
|
2943
|
+
function Ke(t, e) {
|
2944
2944
|
const n = Math.trunc(Math.abs(t / 60)), s = Math.trunc(Math.abs(t % 60)), r = t >= 0 ? "+" : "-";
|
2945
2945
|
switch (e) {
|
2946
2946
|
case "short":
|
@@ -2953,7 +2953,7 @@ function Ge(t, e) {
|
|
2953
2953
|
throw new RangeError(`Value format ${e} is out of range for property format`);
|
2954
2954
|
}
|
2955
2955
|
}
|
2956
|
-
function
|
2956
|
+
function Wt(t) {
|
2957
2957
|
return hc(t, ["hour", "minute", "second", "millisecond"]);
|
2958
2958
|
}
|
2959
2959
|
const mc = [
|
@@ -3038,10 +3038,10 @@ function ei(t) {
|
|
3038
3038
|
function vc(t) {
|
3039
3039
|
return Qr[t.hour < 12 ? 0 : 1];
|
3040
3040
|
}
|
3041
|
-
function
|
3041
|
+
function kc(t, e) {
|
3042
3042
|
return Xr(e)[t.weekday - 1];
|
3043
3043
|
}
|
3044
|
-
function
|
3044
|
+
function bc(t, e) {
|
3045
3045
|
return Jr(e)[t.month - 1];
|
3046
3046
|
}
|
3047
3047
|
function Tc(t, e) {
|
@@ -3079,11 +3079,11 @@ function Os(t, e) {
|
|
3079
3079
|
return n;
|
3080
3080
|
}
|
3081
3081
|
const Oc = {
|
3082
|
-
D:
|
3082
|
+
D: _t,
|
3083
3083
|
DD: Sr,
|
3084
3084
|
DDD: vr,
|
3085
|
-
DDDD:
|
3086
|
-
t:
|
3085
|
+
DDDD: kr,
|
3086
|
+
t: br,
|
3087
3087
|
tt: Tr,
|
3088
3088
|
ttt: Er,
|
3089
3089
|
tttt: Or,
|
@@ -3144,7 +3144,7 @@ class H {
|
|
3144
3144
|
return n > 0 && (s.padTo = n), this.loc.numberFormatter(s).format(e);
|
3145
3145
|
}
|
3146
3146
|
formatDateTimeFromString(e, n) {
|
3147
|
-
const s = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (m, d) => this.loc.extract(e, m, d), o = (m) => e.isOffsetFixed && e.offset === 0 && m.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, m.format) : "", a = () => s ? vc(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), u = (m, d) => s ?
|
3147
|
+
const s = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (m, d) => this.loc.extract(e, m, d), o = (m) => e.isOffsetFixed && e.offset === 0 && m.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, m.format) : "", a = () => s ? vc(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), u = (m, d) => s ? bc(e, m) : i(d ? { month: m } : { month: m, day: "numeric" }, "month"), c = (m, d) => s ? kc(e, m) : i(
|
3148
3148
|
d ? { weekday: m } : { weekday: m, month: "long", day: "numeric" },
|
3149
3149
|
"weekday"
|
3150
3150
|
), l = (m) => {
|
@@ -3344,12 +3344,12 @@ function ni(...t) {
|
|
3344
3344
|
return [s, null, n + r];
|
3345
3345
|
};
|
3346
3346
|
}
|
3347
|
-
const si = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Cc = `(?:${si.source}?(?:\\[(${ti.source})\\])?)?`,
|
3348
|
-
`${
|
3347
|
+
const si = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Cc = `(?:${si.source}?(?:\\[(${ti.source})\\])?)?`, Ln = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, ri = RegExp(`${Ln.source}${Cc}`), Fn = RegExp(`(?:T${ri.source})?`), xc = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Nc = /(\d{4})-?W(\d\d)(?:-?(\d))?/, _c = /(\d{4})-?(\d{3})/, Ac = ni("weekYear", "weekNumber", "weekDay"), Mc = ni("year", "ordinal"), Rc = /(\d{4})-(\d\d)-(\d\d)/, ii = RegExp(
|
3348
|
+
`${Ln.source} ?(?:${si.source}|(${ti.source}))?`
|
3349
3349
|
), Ic = RegExp(`(?: ${ii.source})?`);
|
3350
3350
|
function Ie(t, e, n) {
|
3351
3351
|
const s = t[e];
|
3352
|
-
return
|
3352
|
+
return k(s) ? n : ge(s);
|
3353
3353
|
}
|
3354
3354
|
function Dc(t, e) {
|
3355
3355
|
return [{
|
@@ -3363,18 +3363,18 @@ function Pe(t, e) {
|
|
3363
3363
|
hours: Ie(t, e, 0),
|
3364
3364
|
minutes: Ie(t, e + 1, 0),
|
3365
3365
|
seconds: Ie(t, e + 2, 0),
|
3366
|
-
milliseconds:
|
3366
|
+
milliseconds: In(t[e + 3])
|
3367
3367
|
}, null, e + 4];
|
3368
3368
|
}
|
3369
|
-
function
|
3370
|
-
const n = !t[e] && !t[e + 1], s =
|
3369
|
+
function rt(t, e) {
|
3370
|
+
const n = !t[e] && !t[e + 1], s = Pt(t[e + 1], t[e + 2]), r = n ? null : Z.instance(s);
|
3371
3371
|
return [{}, r, e + 3];
|
3372
3372
|
}
|
3373
|
-
function
|
3373
|
+
function it(t, e) {
|
3374
3374
|
const n = t[e] ? de.create(t[e]) : null;
|
3375
3375
|
return [{}, n, e + 1];
|
3376
3376
|
}
|
3377
|
-
const Lc = RegExp(`^T?${
|
3377
|
+
const Lc = RegExp(`^T?${Ln.source}$`), Fc = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
3378
3378
|
function Vc(t) {
|
3379
3379
|
const [e, n, s, r, i, o, a, u, c] = t, l = e[0] === "-", h = u && u[0] === "-", y = (m, d = !1) => m !== void 0 && (d || m && l) ? -m : m;
|
3380
3380
|
return [
|
@@ -3386,7 +3386,7 @@ function Vc(t) {
|
|
3386
3386
|
hours: y(ve(o)),
|
3387
3387
|
minutes: y(ve(a)),
|
3388
3388
|
seconds: y(ve(u), u === "-0"),
|
3389
|
-
milliseconds: y(
|
3389
|
+
milliseconds: y(In(c), h)
|
3390
3390
|
}
|
3391
3391
|
];
|
3392
3392
|
}
|
@@ -3401,9 +3401,9 @@ const Bc = {
|
|
3401
3401
|
PDT: -7 * 60,
|
3402
3402
|
PST: -8 * 60
|
3403
3403
|
};
|
3404
|
-
function
|
3404
|
+
function Vn(t, e, n, s, r, i, o) {
|
3405
3405
|
const a = {
|
3406
|
-
year: e.length === 2 ?
|
3406
|
+
year: e.length === 2 ? gn(ge(e)) : ge(e),
|
3407
3407
|
month: Yr.indexOf(n) + 1,
|
3408
3408
|
day: ge(s),
|
3409
3409
|
hour: ge(r),
|
@@ -3426,9 +3426,9 @@ function Uc(t) {
|
|
3426
3426
|
c,
|
3427
3427
|
l,
|
3428
3428
|
h
|
3429
|
-
] = t, y =
|
3429
|
+
] = t, y = Vn(e, r, s, n, i, o, a);
|
3430
3430
|
let m;
|
3431
|
-
return u ? m = Bc[u] : c ? m = 0 : m =
|
3431
|
+
return u ? m = Bc[u] : c ? m = 0 : m = Pt(l, h), [y, new Z(m)];
|
3432
3432
|
}
|
3433
3433
|
function Pc(t) {
|
3434
3434
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
@@ -3436,31 +3436,31 @@ function Pc(t) {
|
|
3436
3436
|
const Wc = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, qc = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, Hc = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
3437
3437
|
function Cs(t) {
|
3438
3438
|
const [, e, n, s, r, i, o, a] = t;
|
3439
|
-
return [
|
3439
|
+
return [Vn(e, r, s, n, i, o, a), Z.utcInstance];
|
3440
3440
|
}
|
3441
3441
|
function zc(t) {
|
3442
3442
|
const [, e, n, s, r, i, o, a] = t;
|
3443
|
-
return [
|
3443
|
+
return [Vn(e, a, n, s, r, i, o), Z.utcInstance];
|
3444
3444
|
}
|
3445
|
-
const Zc = Be(xc,
|
3445
|
+
const Zc = Be(xc, Fn), jc = Be(Nc, Fn), Yc = Be(_c, Fn), Jc = Be(ri), oi = $e(
|
3446
3446
|
Dc,
|
3447
3447
|
Pe,
|
3448
|
-
|
3449
|
-
|
3448
|
+
rt,
|
3449
|
+
it
|
3450
3450
|
), Gc = $e(
|
3451
3451
|
Ac,
|
3452
3452
|
Pe,
|
3453
|
-
|
3454
|
-
|
3453
|
+
rt,
|
3454
|
+
it
|
3455
3455
|
), Kc = $e(
|
3456
3456
|
Mc,
|
3457
3457
|
Pe,
|
3458
|
-
|
3459
|
-
|
3458
|
+
rt,
|
3459
|
+
it
|
3460
3460
|
), Xc = $e(
|
3461
3461
|
Pe,
|
3462
|
-
|
3463
|
-
|
3462
|
+
rt,
|
3463
|
+
it
|
3464
3464
|
);
|
3465
3465
|
function Qc(t) {
|
3466
3466
|
return Ue(
|
@@ -3491,8 +3491,8 @@ function ru(t) {
|
|
3491
3491
|
}
|
3492
3492
|
const iu = Be(Rc, Ic), ou = Be(ii), au = $e(
|
3493
3493
|
Pe,
|
3494
|
-
|
3495
|
-
|
3494
|
+
rt,
|
3495
|
+
it
|
3496
3496
|
);
|
3497
3497
|
function cu(t) {
|
3498
3498
|
return Ue(
|
@@ -3576,7 +3576,7 @@ const xs = "Invalid Duration", ai = {
|
|
3576
3576
|
milliseconds: Oe * 24 * 60 * 60 * 1e3
|
3577
3577
|
},
|
3578
3578
|
...ai
|
3579
|
-
},
|
3579
|
+
}, be = [
|
3580
3580
|
"years",
|
3581
3581
|
"quarters",
|
3582
3582
|
"months",
|
@@ -3586,7 +3586,7 @@ const xs = "Invalid Duration", ai = {
|
|
3586
3586
|
"minutes",
|
3587
3587
|
"seconds",
|
3588
3588
|
"milliseconds"
|
3589
|
-
], fu =
|
3589
|
+
], fu = be.slice(0).reverse();
|
3590
3590
|
function ye(t, e, n = !1) {
|
3591
3591
|
const s = {
|
3592
3592
|
values: n ? e.values : { ...t.values, ...e.values || {} },
|
@@ -3604,16 +3604,16 @@ function ci(t, e) {
|
|
3604
3604
|
}
|
3605
3605
|
function Ns(t, e) {
|
3606
3606
|
const n = ci(t, e) < 0 ? -1 : 1;
|
3607
|
-
|
3608
|
-
if (
|
3607
|
+
be.reduceRight((s, r) => {
|
3608
|
+
if (k(e[r]))
|
3609
3609
|
return s;
|
3610
3610
|
if (s) {
|
3611
3611
|
const i = e[s] * n, o = t[r][s], a = Math.floor(i / o);
|
3612
3612
|
e[r] += a * n, e[s] -= a * o * n;
|
3613
3613
|
}
|
3614
3614
|
return r;
|
3615
|
-
}, null),
|
3616
|
-
if (
|
3615
|
+
}, null), be.reduce((s, r) => {
|
3616
|
+
if (k(e[r]))
|
3617
3617
|
return s;
|
3618
3618
|
if (s) {
|
3619
3619
|
const i = e[s] % 1;
|
@@ -3675,7 +3675,7 @@ class O {
|
|
3675
3675
|
`Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
|
3676
3676
|
);
|
3677
3677
|
return new O({
|
3678
|
-
values:
|
3678
|
+
values: Rt(e, O.normalizeUnit),
|
3679
3679
|
loc: N.fromObject(n),
|
3680
3680
|
conversionAccuracy: n.conversionAccuracy,
|
3681
3681
|
matrix: n.matrix
|
@@ -3849,9 +3849,9 @@ class O {
|
|
3849
3849
|
*/
|
3850
3850
|
toHuman(e = {}) {
|
3851
3851
|
if (!this.isValid) return xs;
|
3852
|
-
const n =
|
3852
|
+
const n = be.map((s) => {
|
3853
3853
|
const r = this.values[s];
|
3854
|
-
return
|
3854
|
+
return k(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: s.slice(0, -1) }).format(r);
|
3855
3855
|
}).filter((s) => s);
|
3856
3856
|
return this.loc.listFormatter({ type: "conjunction", style: e.listStyle || "narrow", ...e }).format(n);
|
3857
3857
|
}
|
@@ -3876,7 +3876,7 @@ class O {
|
|
3876
3876
|
toISO() {
|
3877
3877
|
if (!this.isValid) return null;
|
3878
3878
|
let e = "P";
|
3879
|
-
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e +=
|
3879
|
+
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += Dn(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
3880
3880
|
}
|
3881
3881
|
/**
|
3882
3882
|
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
|
@@ -3949,7 +3949,7 @@ class O {
|
|
3949
3949
|
plus(e) {
|
3950
3950
|
if (!this.isValid) return this;
|
3951
3951
|
const n = O.fromDurationLike(e), s = {};
|
3952
|
-
for (const r of
|
3952
|
+
for (const r of be)
|
3953
3953
|
(Le(n.values, r) || Le(this.values, r)) && (s[r] = n.get(r) + this.get(r));
|
3954
3954
|
return ye(this, { values: s }, !0);
|
3955
3955
|
}
|
@@ -3997,7 +3997,7 @@ class O {
|
|
3997
3997
|
*/
|
3998
3998
|
set(e) {
|
3999
3999
|
if (!this.isValid) return this;
|
4000
|
-
const n = { ...this.values, ...
|
4000
|
+
const n = { ...this.values, ...Rt(e, O.normalizeUnit) };
|
4001
4001
|
return ye(this, { values: n });
|
4002
4002
|
}
|
4003
4003
|
/**
|
@@ -4062,7 +4062,7 @@ class O {
|
|
4062
4062
|
e = e.map((o) => O.normalizeUnit(o));
|
4063
4063
|
const n = {}, s = {}, r = this.toObject();
|
4064
4064
|
let i;
|
4065
|
-
for (const o of
|
4065
|
+
for (const o of be)
|
4066
4066
|
if (e.indexOf(o) >= 0) {
|
4067
4067
|
i = o;
|
4068
4068
|
let a = 0;
|
@@ -4202,7 +4202,7 @@ class O {
|
|
4202
4202
|
function n(s, r) {
|
4203
4203
|
return s === void 0 || s === 0 ? r === void 0 || r === 0 : s === r;
|
4204
4204
|
}
|
4205
|
-
for (const s of
|
4205
|
+
for (const s of be)
|
4206
4206
|
if (!n(this.values[s], e.values[s]))
|
4207
4207
|
return !1;
|
4208
4208
|
return !0;
|
@@ -4593,7 +4593,7 @@ class R {
|
|
4593
4593
|
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p
|
4594
4594
|
* @return {string}
|
4595
4595
|
*/
|
4596
|
-
toLocaleString(e =
|
4596
|
+
toLocaleString(e = _t, n = {}) {
|
4597
4597
|
return this.isValid ? H.create(this.s.loc.clone(n), e).formatInterval(this) : Ce;
|
4598
4598
|
}
|
4599
4599
|
/**
|
@@ -4664,7 +4664,7 @@ class R {
|
|
4664
4664
|
return R.fromDateTimes(e(this.s), e(this.e));
|
4665
4665
|
}
|
4666
4666
|
}
|
4667
|
-
class
|
4667
|
+
class lt {
|
4668
4668
|
/**
|
4669
4669
|
* Return whether the specified zone contains a DST.
|
4670
4670
|
* @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
|
@@ -4885,9 +4885,9 @@ function ne(t, e) {
|
|
4885
4885
|
};
|
4886
4886
|
}
|
4887
4887
|
function Ms(t, e) {
|
4888
|
-
return { regex: t, deser: ([, n, s]) =>
|
4888
|
+
return { regex: t, deser: ([, n, s]) => Pt(n, s), groups: e };
|
4889
4889
|
}
|
4890
|
-
function
|
4890
|
+
function ft(t) {
|
4891
4891
|
return { regex: t, deser: ([e]) => e };
|
4892
4892
|
}
|
4893
4893
|
function Su(t) {
|
@@ -4905,7 +4905,7 @@ function vu(t, e) {
|
|
4905
4905
|
case "y":
|
4906
4906
|
return x(c);
|
4907
4907
|
case "yy":
|
4908
|
-
return x(h,
|
4908
|
+
return x(h, gn);
|
4909
4909
|
case "yyyy":
|
4910
4910
|
return x(i);
|
4911
4911
|
case "yyyyy":
|
@@ -4961,9 +4961,9 @@ function vu(t, e) {
|
|
4961
4961
|
case "SSS":
|
4962
4962
|
return x(r);
|
4963
4963
|
case "u":
|
4964
|
-
return
|
4964
|
+
return ft(l);
|
4965
4965
|
case "uu":
|
4966
|
-
return
|
4966
|
+
return ft(a);
|
4967
4967
|
case "uuu":
|
4968
4968
|
return x(n);
|
4969
4969
|
case "a":
|
@@ -4971,7 +4971,7 @@ function vu(t, e) {
|
|
4971
4971
|
case "kkkk":
|
4972
4972
|
return x(i);
|
4973
4973
|
case "kk":
|
4974
|
-
return x(h,
|
4974
|
+
return x(h, gn);
|
4975
4975
|
case "W":
|
4976
4976
|
return x(a);
|
4977
4977
|
case "WW":
|
@@ -4993,9 +4993,9 @@ function vu(t, e) {
|
|
4993
4993
|
case "ZZZ":
|
4994
4994
|
return Ms(new RegExp(`([+-]${a.source})(${s.source})?`), 2);
|
4995
4995
|
case "z":
|
4996
|
-
return
|
4996
|
+
return ft(/[a-z_+-/]{1,256}?/i);
|
4997
4997
|
case " ":
|
4998
|
-
return
|
4998
|
+
return ft(/[^\S\n\r]/);
|
4999
4999
|
default:
|
5000
5000
|
return m(T);
|
5001
5001
|
}
|
@@ -5004,7 +5004,7 @@ function vu(t, e) {
|
|
5004
5004
|
};
|
5005
5005
|
return w.token = t, w;
|
5006
5006
|
}
|
5007
|
-
const
|
5007
|
+
const ku = {
|
5008
5008
|
year: {
|
5009
5009
|
"2-digit": "yy",
|
5010
5010
|
numeric: "yyyyy"
|
@@ -5046,7 +5046,7 @@ const bu = {
|
|
5046
5046
|
short: "ZZZ"
|
5047
5047
|
}
|
5048
5048
|
};
|
5049
|
-
function
|
5049
|
+
function bu(t, e, n) {
|
5050
5050
|
const { type: s, value: r } = t;
|
5051
5051
|
if (s === "literal") {
|
5052
5052
|
const u = /^\s+$/.test(r);
|
@@ -5058,7 +5058,7 @@ function ku(t, e, n) {
|
|
5058
5058
|
const i = e[s];
|
5059
5059
|
let o = s;
|
5060
5060
|
s === "hour" && (e.hour12 != null ? o = e.hour12 ? "hour12" : "hour24" : e.hourCycle != null ? e.hourCycle === "h11" || e.hourCycle === "h12" ? o = "hour12" : o = "hour24" : o = n.hour12 ? "hour12" : "hour24");
|
5061
|
-
let a =
|
5061
|
+
let a = ku[o];
|
5062
5062
|
if (typeof a == "object" && (a = a[i]), a)
|
5063
5063
|
return {
|
5064
5064
|
literal: !1,
|
@@ -5117,14 +5117,14 @@ function Ou(t) {
|
|
5117
5117
|
}
|
5118
5118
|
};
|
5119
5119
|
let n = null, s;
|
5120
|
-
return
|
5120
|
+
return k(t.z) || (n = de.create(t.z)), k(t.Z) || (n || (n = new Z(t.Z)), s = t.Z), k(t.q) || (t.M = (t.q - 1) * 3 + 1), k(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), k(t.u) || (t.S = In(t.u)), [Object.keys(t).reduce((i, o) => {
|
5121
5121
|
const a = e(o);
|
5122
5122
|
return a && (i[a] = t[o]), i;
|
5123
5123
|
}, {}), n, s];
|
5124
5124
|
}
|
5125
|
-
let
|
5125
|
+
let Qt = null;
|
5126
5126
|
function Cu() {
|
5127
|
-
return
|
5127
|
+
return Qt || (Qt = v.fromMillis(1555555555555)), Qt;
|
5128
5128
|
}
|
5129
5129
|
function xu(t, e) {
|
5130
5130
|
if (t.literal)
|
@@ -5180,23 +5180,23 @@ function mi(t, e) {
|
|
5180
5180
|
if (!t)
|
5181
5181
|
return null;
|
5182
5182
|
const s = H.create(e, t).dtFormatter(Cu()), r = s.formatToParts(), i = s.resolvedOptions();
|
5183
|
-
return r.map((o) =>
|
5183
|
+
return r.map((o) => bu(o, t, i));
|
5184
5184
|
}
|
5185
|
-
const
|
5185
|
+
const en = "Invalid DateTime", Rs = 864e13;
|
5186
5186
|
function Ye(t) {
|
5187
5187
|
return new re("unsupported zone", `the zone "${t.name}" is not supported`);
|
5188
5188
|
}
|
5189
|
-
function
|
5190
|
-
return t.weekData === null && (t.weekData =
|
5189
|
+
function tn(t) {
|
5190
|
+
return t.weekData === null && (t.weekData = At(t.c)), t.weekData;
|
5191
5191
|
}
|
5192
|
-
function
|
5193
|
-
return t.localWeekData === null && (t.localWeekData =
|
5192
|
+
function nn(t) {
|
5193
|
+
return t.localWeekData === null && (t.localWeekData = At(
|
5194
5194
|
t.c,
|
5195
5195
|
t.loc.getMinDaysInFirstWeek(),
|
5196
5196
|
t.loc.getStartOfWeek()
|
5197
5197
|
)), t.localWeekData;
|
5198
5198
|
}
|
5199
|
-
function
|
5199
|
+
function ke(t, e) {
|
5200
5200
|
const n = {
|
5201
5201
|
ts: t.ts,
|
5202
5202
|
zone: t.zone,
|
@@ -5216,7 +5216,7 @@ function pi(t, e, n) {
|
|
5216
5216
|
const i = n.offset(s);
|
5217
5217
|
return r === i ? [s, r] : [t - Math.min(r, i) * 60 * 1e3, Math.max(r, i)];
|
5218
5218
|
}
|
5219
|
-
function
|
5219
|
+
function ht(t, e) {
|
5220
5220
|
t += e * 60 * 1e3;
|
5221
5221
|
const n = new Date(t);
|
5222
5222
|
return {
|
@@ -5229,15 +5229,15 @@ function ft(t, e) {
|
|
5229
5229
|
millisecond: n.getUTCMilliseconds()
|
5230
5230
|
};
|
5231
5231
|
}
|
5232
|
-
function
|
5233
|
-
return pi(
|
5232
|
+
function bt(t, e, n) {
|
5233
|
+
return pi(Ut(t), e, n);
|
5234
5234
|
}
|
5235
5235
|
function Is(t, e) {
|
5236
5236
|
const n = t.o, s = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, i = {
|
5237
5237
|
...t.c,
|
5238
5238
|
year: s,
|
5239
5239
|
month: r,
|
5240
|
-
day: Math.min(t.c.day,
|
5240
|
+
day: Math.min(t.c.day, Mt(s, r)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7
|
5241
5241
|
}, o = O.fromObject({
|
5242
5242
|
years: e.years - Math.trunc(e.years),
|
5243
5243
|
quarters: e.quarters - Math.trunc(e.quarters),
|
@@ -5248,7 +5248,7 @@ function Is(t, e) {
|
|
5248
5248
|
minutes: e.minutes,
|
5249
5249
|
seconds: e.seconds,
|
5250
5250
|
milliseconds: e.milliseconds
|
5251
|
-
}).as("milliseconds"), a =
|
5251
|
+
}).as("milliseconds"), a = Ut(i);
|
5252
5252
|
let [u, c] = pi(a, n, t.zone);
|
5253
5253
|
return o !== 0 && (u += o, c = t.zone.offset(u)), { ts: u, o: c };
|
5254
5254
|
}
|
@@ -5266,13 +5266,13 @@ function xe(t, e, n, s, r, i) {
|
|
5266
5266
|
new re("unparsable", `the input "${r}" can't be parsed as ${s}`)
|
5267
5267
|
);
|
5268
5268
|
}
|
5269
|
-
function
|
5269
|
+
function dt(t, e, n = !0) {
|
5270
5270
|
return t.isValid ? H.create(N.create("en-US"), {
|
5271
5271
|
allowZ: n,
|
5272
5272
|
forceSimple: !0
|
5273
5273
|
}).formatDateTimeFromString(t, e) : null;
|
5274
5274
|
}
|
5275
|
-
function
|
5275
|
+
function sn(t, e) {
|
5276
5276
|
const n = t.c.year > 9999 || t.c.year < 0;
|
5277
5277
|
let s = "";
|
5278
5278
|
return n && t.c.year >= 0 && (s += "+"), s += D(t.c.year, n ? 6 : 4), e ? (s += "-", s += D(t.c.month), s += "-", s += D(t.c.day)) : (s += D(t.c.month), s += D(t.c.day)), s;
|
@@ -5364,21 +5364,21 @@ function Fs(t, e) {
|
|
5364
5364
|
return v.invalid(Ye(n));
|
5365
5365
|
const s = N.fromObject(e);
|
5366
5366
|
let r, i;
|
5367
|
-
if (
|
5367
|
+
if (k(t.year))
|
5368
5368
|
r = I.now();
|
5369
5369
|
else {
|
5370
5370
|
for (const u of gi)
|
5371
|
-
|
5371
|
+
k(t[u]) && (t[u] = yi[u]);
|
5372
5372
|
const o = Wr(t) || qr(t);
|
5373
5373
|
if (o)
|
5374
5374
|
return v.invalid(o);
|
5375
5375
|
const a = Du(n);
|
5376
|
-
[r, i] =
|
5376
|
+
[r, i] = bt(t, a, n);
|
5377
5377
|
}
|
5378
5378
|
return new v({ ts: r, zone: n, loc: s, o: i });
|
5379
5379
|
}
|
5380
5380
|
function Vs(t, e, n) {
|
5381
|
-
const s =
|
5381
|
+
const s = k(n.round) ? !0 : n.round, r = (o, a) => (o = Dn(o, s || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(o, a)), i = (o) => n.calendary ? e.hasSame(t, o) ? 0 : e.startOf(o).diff(t.startOf(o), o).get(o) : e.diff(t, o).get(o);
|
5382
5382
|
if (n.unit)
|
5383
5383
|
return r(i(n.unit), n.unit);
|
5384
5384
|
for (const o of n.units) {
|
@@ -5400,14 +5400,14 @@ class v {
|
|
5400
5400
|
constructor(e) {
|
5401
5401
|
const n = e.zone || I.defaultZone;
|
5402
5402
|
let s = e.invalid || (Number.isNaN(e.ts) ? new re("invalid input") : null) || (n.isValid ? null : Ye(n));
|
5403
|
-
this.ts =
|
5403
|
+
this.ts = k(e.ts) ? I.now() : e.ts;
|
5404
5404
|
let r = null, i = null;
|
5405
5405
|
if (!s)
|
5406
5406
|
if (e.old && e.old.ts === this.ts && e.old.zone.equals(n))
|
5407
5407
|
[r, i] = [e.old.c, e.old.o];
|
5408
5408
|
else {
|
5409
5409
|
const a = Se(e.o) && !e.old ? e.o : n.offset(this.ts);
|
5410
|
-
r =
|
5410
|
+
r = ht(this.ts, a), s = Number.isNaN(r.year) ? new re("invalid input") : null, r = s ? null : r, i = s ? null : a;
|
5411
5411
|
}
|
5412
5412
|
this._zone = n, this.loc = e.loc || N.create(), this.invalid = s, this.weekData = null, this.localWeekData = null, this.c = r, this.o = i, this.isLuxonDateTime = !0;
|
5413
5413
|
}
|
@@ -5574,7 +5574,7 @@ class v {
|
|
5574
5574
|
const s = we(n.zone, I.defaultZone);
|
5575
5575
|
if (!s.isValid)
|
5576
5576
|
return v.invalid(Ye(s));
|
5577
|
-
const r = N.fromObject(n), i =
|
5577
|
+
const r = N.fromObject(n), i = Rt(e, Ls), { minDaysInFirstWeek: o, startOfWeek: a } = bs(i, r), u = I.now(), c = k(n.specificOffset) ? s.offset(u) : n.specificOffset, l = !k(i.ordinal), h = !k(i.year), y = !k(i.month) || !k(i.day), m = h || y, d = i.weekYear || i.weekNumber;
|
5578
5578
|
if ((m || l) && d)
|
5579
5579
|
throw new Ae(
|
5580
5580
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -5582,18 +5582,18 @@ class v {
|
|
5582
5582
|
if (y && l)
|
5583
5583
|
throw new Ae("Can't mix ordinal dates with month/day");
|
5584
5584
|
const w = d || i.weekday && !m;
|
5585
|
-
let T, _, A =
|
5586
|
-
w ? (T = Mu, _ = _u, A =
|
5585
|
+
let T, _, A = ht(u, c);
|
5586
|
+
w ? (T = Mu, _ = _u, A = At(A, o, a)) : l ? (T = Ru, _ = Au, A = Xt(A)) : (T = gi, _ = yi);
|
5587
5587
|
let W = !1;
|
5588
|
-
for (const
|
5589
|
-
const ae = i[
|
5590
|
-
|
5588
|
+
for (const B of T) {
|
5589
|
+
const ae = i[B];
|
5590
|
+
k(ae) ? W ? i[B] = _[B] : i[B] = A[B] : W = !0;
|
5591
5591
|
}
|
5592
5592
|
const qe = w ? ac(i, o, a) : l ? cc(i) : Wr(i), S = qe || qr(i);
|
5593
5593
|
if (S)
|
5594
5594
|
return v.invalid(S);
|
5595
|
-
const E = w ? vs(i, o, a) : l ?
|
5596
|
-
ts:
|
5595
|
+
const E = w ? vs(i, o, a) : l ? ks(i) : i, [V, j] = bt(E, c, s), M = new v({
|
5596
|
+
ts: V,
|
5597
5597
|
zone: s,
|
5598
5598
|
o: j,
|
5599
5599
|
loc: r
|
@@ -5678,7 +5678,7 @@ class v {
|
|
5678
5678
|
* @return {DateTime}
|
5679
5679
|
*/
|
5680
5680
|
static fromFormat(e, n, s = {}) {
|
5681
|
-
if (
|
5681
|
+
if (k(e) || k(n))
|
5682
5682
|
throw new q("fromFormat requires an input string and a format");
|
5683
5683
|
const { locale: r = null, numberingSystem: i = null } = s, o = N.fromOpts({
|
5684
5684
|
locale: r,
|
@@ -5906,7 +5906,7 @@ class v {
|
|
5906
5906
|
* @type {number}
|
5907
5907
|
*/
|
5908
5908
|
get weekYear() {
|
5909
|
-
return this.isValid ?
|
5909
|
+
return this.isValid ? tn(this).weekYear : NaN;
|
5910
5910
|
}
|
5911
5911
|
/**
|
5912
5912
|
* Get the week number of the week year (1-52ish).
|
@@ -5915,7 +5915,7 @@ class v {
|
|
5915
5915
|
* @type {number}
|
5916
5916
|
*/
|
5917
5917
|
get weekNumber() {
|
5918
|
-
return this.isValid ?
|
5918
|
+
return this.isValid ? tn(this).weekNumber : NaN;
|
5919
5919
|
}
|
5920
5920
|
/**
|
5921
5921
|
* Get the day of the week.
|
@@ -5925,7 +5925,7 @@ class v {
|
|
5925
5925
|
* @type {number}
|
5926
5926
|
*/
|
5927
5927
|
get weekday() {
|
5928
|
-
return this.isValid ?
|
5928
|
+
return this.isValid ? tn(this).weekday : NaN;
|
5929
5929
|
}
|
5930
5930
|
/**
|
5931
5931
|
* Returns true if this date is on a weekend according to the locale, false otherwise
|
@@ -5941,7 +5941,7 @@ class v {
|
|
5941
5941
|
* @returns {number}
|
5942
5942
|
*/
|
5943
5943
|
get localWeekday() {
|
5944
|
-
return this.isValid ?
|
5944
|
+
return this.isValid ? nn(this).weekday : NaN;
|
5945
5945
|
}
|
5946
5946
|
/**
|
5947
5947
|
* Get the week number of the week year according to the locale. Different locales assign week numbers differently,
|
@@ -5950,7 +5950,7 @@ class v {
|
|
5950
5950
|
* @returns {number}
|
5951
5951
|
*/
|
5952
5952
|
get localWeekNumber() {
|
5953
|
-
return this.isValid ?
|
5953
|
+
return this.isValid ? nn(this).weekNumber : NaN;
|
5954
5954
|
}
|
5955
5955
|
/**
|
5956
5956
|
* Get the week year according to the locale. Different locales assign week numbers (and therefor week years)
|
@@ -5958,7 +5958,7 @@ class v {
|
|
5958
5958
|
* @returns {number}
|
5959
5959
|
*/
|
5960
5960
|
get localWeekYear() {
|
5961
|
-
return this.isValid ?
|
5961
|
+
return this.isValid ? nn(this).weekYear : NaN;
|
5962
5962
|
}
|
5963
5963
|
/**
|
5964
5964
|
* Get the ordinal (meaning the day of the year)
|
@@ -5966,7 +5966,7 @@ class v {
|
|
5966
5966
|
* @type {number|DateTime}
|
5967
5967
|
*/
|
5968
5968
|
get ordinal() {
|
5969
|
-
return this.isValid ?
|
5969
|
+
return this.isValid ? Xt(this.c).ordinal : NaN;
|
5970
5970
|
}
|
5971
5971
|
/**
|
5972
5972
|
* Get the human readable short month name, such as 'Oct'.
|
@@ -5975,7 +5975,7 @@ class v {
|
|
5975
5975
|
* @type {string}
|
5976
5976
|
*/
|
5977
5977
|
get monthShort() {
|
5978
|
-
return this.isValid ?
|
5978
|
+
return this.isValid ? lt.months("short", { locObj: this.loc })[this.month - 1] : null;
|
5979
5979
|
}
|
5980
5980
|
/**
|
5981
5981
|
* Get the human readable long month name, such as 'October'.
|
@@ -5984,7 +5984,7 @@ class v {
|
|
5984
5984
|
* @type {string}
|
5985
5985
|
*/
|
5986
5986
|
get monthLong() {
|
5987
|
-
return this.isValid ?
|
5987
|
+
return this.isValid ? lt.months("long", { locObj: this.loc })[this.month - 1] : null;
|
5988
5988
|
}
|
5989
5989
|
/**
|
5990
5990
|
* Get the human readable short weekday, such as 'Mon'.
|
@@ -5993,7 +5993,7 @@ class v {
|
|
5993
5993
|
* @type {string}
|
5994
5994
|
*/
|
5995
5995
|
get weekdayShort() {
|
5996
|
-
return this.isValid ?
|
5996
|
+
return this.isValid ? lt.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
|
5997
5997
|
}
|
5998
5998
|
/**
|
5999
5999
|
* Get the human readable long weekday, such as 'Monday'.
|
@@ -6002,7 +6002,7 @@ class v {
|
|
6002
6002
|
* @type {string}
|
6003
6003
|
*/
|
6004
6004
|
get weekdayLong() {
|
6005
|
-
return this.isValid ?
|
6005
|
+
return this.isValid ? lt.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
|
6006
6006
|
}
|
6007
6007
|
/**
|
6008
6008
|
* Get the UTC offset of this DateTime in minutes
|
@@ -6059,11 +6059,11 @@ class v {
|
|
6059
6059
|
getPossibleOffsets() {
|
6060
6060
|
if (!this.isValid || this.isOffsetFixed)
|
6061
6061
|
return [this];
|
6062
|
-
const e = 864e5, n = 6e4, s =
|
6062
|
+
const e = 864e5, n = 6e4, s = Ut(this.c), r = this.zone.offset(s - e), i = this.zone.offset(s + e), o = this.zone.offset(s - r * n), a = this.zone.offset(s - i * n);
|
6063
6063
|
if (o === a)
|
6064
6064
|
return [this];
|
6065
|
-
const u = s - o * n, c = s - a * n, l =
|
6066
|
-
return l.hour === h.hour && l.minute === h.minute && l.second === h.second && l.millisecond === h.millisecond ? [
|
6065
|
+
const u = s - o * n, c = s - a * n, l = ht(u, o), h = ht(c, a);
|
6066
|
+
return l.hour === h.hour && l.minute === h.minute && l.second === h.second && l.millisecond === h.millisecond ? [ke(this, { ts: u }), ke(this, { ts: c })] : [this];
|
6067
6067
|
}
|
6068
6068
|
/**
|
6069
6069
|
* Returns true if this DateTime is in a leap year, false otherwise
|
@@ -6072,7 +6072,7 @@ class v {
|
|
6072
6072
|
* @type {boolean}
|
6073
6073
|
*/
|
6074
6074
|
get isInLeapYear() {
|
6075
|
-
return
|
6075
|
+
return st(this.year);
|
6076
6076
|
}
|
6077
6077
|
/**
|
6078
6078
|
* Returns the number of days in this DateTime's month
|
@@ -6081,7 +6081,7 @@ class v {
|
|
6081
6081
|
* @type {number}
|
6082
6082
|
*/
|
6083
6083
|
get daysInMonth() {
|
6084
|
-
return
|
6084
|
+
return Mt(this.year, this.month);
|
6085
6085
|
}
|
6086
6086
|
/**
|
6087
6087
|
* Returns the number of days in this DateTime's year
|
@@ -6100,7 +6100,7 @@ class v {
|
|
6100
6100
|
* @type {number}
|
6101
6101
|
*/
|
6102
6102
|
get weeksInWeekYear() {
|
6103
|
-
return this.isValid ?
|
6103
|
+
return this.isValid ? Qe(this.weekYear) : NaN;
|
6104
6104
|
}
|
6105
6105
|
/**
|
6106
6106
|
* Returns the number of weeks in this DateTime's local week year
|
@@ -6109,7 +6109,7 @@ class v {
|
|
6109
6109
|
* @type {number}
|
6110
6110
|
*/
|
6111
6111
|
get weeksInLocalWeekYear() {
|
6112
|
-
return this.isValid ?
|
6112
|
+
return this.isValid ? Qe(
|
6113
6113
|
this.localWeekYear,
|
6114
6114
|
this.loc.getMinDaysInFirstWeek(),
|
6115
6115
|
this.loc.getStartOfWeek()
|
@@ -6165,9 +6165,9 @@ class v {
|
|
6165
6165
|
let r = this.ts;
|
6166
6166
|
if (n || s) {
|
6167
6167
|
const i = e.offset(this.ts), o = this.toObject();
|
6168
|
-
[r] =
|
6168
|
+
[r] = bt(o, i, e);
|
6169
6169
|
}
|
6170
|
-
return
|
6170
|
+
return ke(this, { ts: r, zone: e });
|
6171
6171
|
} else
|
6172
6172
|
return v.invalid(Ye(e));
|
6173
6173
|
}
|
@@ -6179,7 +6179,7 @@ class v {
|
|
6179
6179
|
*/
|
6180
6180
|
reconfigure({ locale: e, numberingSystem: n, outputCalendar: s } = {}) {
|
6181
6181
|
const r = this.loc.clone({ locale: e, numberingSystem: n, outputCalendar: s });
|
6182
|
-
return
|
6182
|
+
return ke(this, { loc: r });
|
6183
6183
|
}
|
6184
6184
|
/**
|
6185
6185
|
* "Set" the locale. Returns a newly-constructed DateTime.
|
@@ -6205,7 +6205,7 @@ class v {
|
|
6205
6205
|
*/
|
6206
6206
|
set(e) {
|
6207
6207
|
if (!this.isValid) return this;
|
6208
|
-
const n =
|
6208
|
+
const n = Rt(e, Ls), { minDaysInFirstWeek: s, startOfWeek: r } = bs(n, this.loc), i = !k(n.weekYear) || !k(n.weekNumber) || !k(n.weekday), o = !k(n.ordinal), a = !k(n.year), u = !k(n.month) || !k(n.day), c = a || u, l = n.weekYear || n.weekNumber;
|
6209
6209
|
if ((c || o) && l)
|
6210
6210
|
throw new Ae(
|
6211
6211
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -6214,12 +6214,12 @@ class v {
|
|
6214
6214
|
throw new Ae("Can't mix ordinal dates with month/day");
|
6215
6215
|
let h;
|
6216
6216
|
i ? h = vs(
|
6217
|
-
{ ...
|
6217
|
+
{ ...At(this.c, s, r), ...n },
|
6218
6218
|
s,
|
6219
6219
|
r
|
6220
|
-
) :
|
6221
|
-
const [y, m] =
|
6222
|
-
return
|
6220
|
+
) : k(n.ordinal) ? (h = { ...this.toObject(), ...n }, k(n.day) && (h.day = Math.min(Mt(h.year, h.month), h.day))) : h = ks({ ...Xt(this.c), ...n });
|
6221
|
+
const [y, m] = bt(h, this.o, this.zone);
|
6222
|
+
return ke(this, { ts: y, o: m });
|
6223
6223
|
}
|
6224
6224
|
/**
|
6225
6225
|
* Add a period of time to this DateTime and return the resulting DateTime
|
@@ -6237,7 +6237,7 @@ class v {
|
|
6237
6237
|
plus(e) {
|
6238
6238
|
if (!this.isValid) return this;
|
6239
6239
|
const n = O.fromDurationLike(e);
|
6240
|
-
return
|
6240
|
+
return ke(this, Is(this, n));
|
6241
6241
|
}
|
6242
6242
|
/**
|
6243
6243
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
@@ -6248,7 +6248,7 @@ class v {
|
|
6248
6248
|
minus(e) {
|
6249
6249
|
if (!this.isValid) return this;
|
6250
6250
|
const n = O.fromDurationLike(e).negate();
|
6251
|
-
return
|
6251
|
+
return ke(this, Is(this, n));
|
6252
6252
|
}
|
6253
6253
|
/**
|
6254
6254
|
* "Set" this DateTime to the beginning of a unit of time.
|
@@ -6323,7 +6323,7 @@ class v {
|
|
6323
6323
|
* @return {string}
|
6324
6324
|
*/
|
6325
6325
|
toFormat(e, n = {}) {
|
6326
|
-
return this.isValid ? H.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) :
|
6326
|
+
return this.isValid ? H.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : en;
|
6327
6327
|
}
|
6328
6328
|
/**
|
6329
6329
|
* Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
|
@@ -6344,8 +6344,8 @@ class v {
|
|
6344
6344
|
* @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
|
6345
6345
|
* @return {string}
|
6346
6346
|
*/
|
6347
|
-
toLocaleString(e =
|
6348
|
-
return this.isValid ? H.create(this.loc.clone(n), e).formatDateTime(this) :
|
6347
|
+
toLocaleString(e = _t, n = {}) {
|
6348
|
+
return this.isValid ? H.create(this.loc.clone(n), e).formatDateTime(this) : en;
|
6349
6349
|
}
|
6350
6350
|
/**
|
6351
6351
|
* Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
|
@@ -6387,7 +6387,7 @@ class v {
|
|
6387
6387
|
if (!this.isValid)
|
6388
6388
|
return null;
|
6389
6389
|
const o = e === "extended";
|
6390
|
-
let a =
|
6390
|
+
let a = sn(this, o);
|
6391
6391
|
return a += "T", a += Ds(this, o, n, s, r, i), a;
|
6392
6392
|
}
|
6393
6393
|
/**
|
@@ -6399,7 +6399,7 @@ class v {
|
|
6399
6399
|
* @return {string}
|
6400
6400
|
*/
|
6401
6401
|
toISODate({ format: e = "extended" } = {}) {
|
6402
|
-
return this.isValid ?
|
6402
|
+
return this.isValid ? sn(this, e === "extended") : null;
|
6403
6403
|
}
|
6404
6404
|
/**
|
6405
6405
|
* Returns an ISO 8601-compliant string representation of this DateTime's week date
|
@@ -6407,7 +6407,7 @@ class v {
|
|
6407
6407
|
* @return {string}
|
6408
6408
|
*/
|
6409
6409
|
toISOWeekDate() {
|
6410
|
-
return
|
6410
|
+
return dt(this, "kkkk-'W'WW-c");
|
6411
6411
|
}
|
6412
6412
|
/**
|
6413
6413
|
* Returns an ISO 8601-compliant string representation of this DateTime's time component
|
@@ -6448,7 +6448,7 @@ class v {
|
|
6448
6448
|
* @return {string}
|
6449
6449
|
*/
|
6450
6450
|
toRFC2822() {
|
6451
|
-
return
|
6451
|
+
return dt(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
|
6452
6452
|
}
|
6453
6453
|
/**
|
6454
6454
|
* Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
|
@@ -6459,7 +6459,7 @@ class v {
|
|
6459
6459
|
* @return {string}
|
6460
6460
|
*/
|
6461
6461
|
toHTTP() {
|
6462
|
-
return
|
6462
|
+
return dt(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
|
6463
6463
|
}
|
6464
6464
|
/**
|
6465
6465
|
* Returns a string representation of this DateTime appropriate for use in SQL Date
|
@@ -6467,7 +6467,7 @@ class v {
|
|
6467
6467
|
* @return {string}
|
6468
6468
|
*/
|
6469
6469
|
toSQLDate() {
|
6470
|
-
return this.isValid ?
|
6470
|
+
return this.isValid ? sn(this, !0) : null;
|
6471
6471
|
}
|
6472
6472
|
/**
|
6473
6473
|
* Returns a string representation of this DateTime appropriate for use in SQL Time
|
@@ -6483,7 +6483,7 @@ class v {
|
|
6483
6483
|
*/
|
6484
6484
|
toSQLTime({ includeOffset: e = !0, includeZone: n = !1, includeOffsetSpace: s = !0 } = {}) {
|
6485
6485
|
let r = "HH:mm:ss.SSS";
|
6486
|
-
return (n || e) && (s && (r += " "), n ? r += "z" : e && (r += "ZZ")),
|
6486
|
+
return (n || e) && (s && (r += " "), n ? r += "z" : e && (r += "ZZ")), dt(this, r, !0);
|
6487
6487
|
}
|
6488
6488
|
/**
|
6489
6489
|
* Returns a string representation of this DateTime appropriate for use in SQL DateTime
|
@@ -6505,7 +6505,7 @@ class v {
|
|
6505
6505
|
* @return {string}
|
6506
6506
|
*/
|
6507
6507
|
toString() {
|
6508
|
-
return this.isValid ? this.toISO() :
|
6508
|
+
return this.isValid ? this.toISO() : en;
|
6509
6509
|
}
|
6510
6510
|
/**
|
6511
6511
|
* Returns a string representation of this DateTime appropriate for the REPL.
|
@@ -6765,7 +6765,7 @@ class v {
|
|
6765
6765
|
* @returns {DateTime}
|
6766
6766
|
*/
|
6767
6767
|
static fromFormatParser(e, n, s = {}) {
|
6768
|
-
if (
|
6768
|
+
if (k(e) || k(n))
|
6769
6769
|
throw new q(
|
6770
6770
|
"fromFormatParser requires an input string and a format parser"
|
6771
6771
|
);
|
@@ -6794,7 +6794,7 @@ class v {
|
|
6794
6794
|
* @type {Object}
|
6795
6795
|
*/
|
6796
6796
|
static get DATE_SHORT() {
|
6797
|
-
return
|
6797
|
+
return _t;
|
6798
6798
|
}
|
6799
6799
|
/**
|
6800
6800
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
|
@@ -6822,14 +6822,14 @@ class v {
|
|
6822
6822
|
* @type {Object}
|
6823
6823
|
*/
|
6824
6824
|
static get DATE_HUGE() {
|
6825
|
-
return
|
6825
|
+
return kr;
|
6826
6826
|
}
|
6827
6827
|
/**
|
6828
6828
|
* {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
|
6829
6829
|
* @type {Object}
|
6830
6830
|
*/
|
6831
6831
|
static get TIME_SIMPLE() {
|
6832
|
-
return
|
6832
|
+
return br;
|
6833
6833
|
}
|
6834
6834
|
/**
|
6835
6835
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
|
@@ -6965,7 +6965,7 @@ const Lu = {}, Fu = {
|
|
6965
6965
|
Vu
|
6966
6966
|
];
|
6967
6967
|
function $u(t, e) {
|
6968
|
-
return
|
6968
|
+
return L(), $("svg", Fu, Bu);
|
6969
6969
|
}
|
6970
6970
|
const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-container-list" }, Wu = { class: "message-container" }, qu = {
|
6971
6971
|
key: 0,
|
@@ -6976,7 +6976,7 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
6976
6976
|
}, Ju = {
|
6977
6977
|
key: 1,
|
6978
6978
|
class: "mr-5"
|
6979
|
-
}, Gu = /* @__PURE__ */
|
6979
|
+
}, Gu = /* @__PURE__ */ On({
|
6980
6980
|
__name: "MessageList",
|
6981
6981
|
props: {
|
6982
6982
|
messages: {
|
@@ -6998,7 +6998,7 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
6998
6998
|
);
|
6999
6999
|
$i(() => {
|
7000
7000
|
n.canLoadMoreMessages || r();
|
7001
|
-
}),
|
7001
|
+
}), En(
|
7002
7002
|
() => n.canLoadMoreMessages,
|
7003
7003
|
(a) => {
|
7004
7004
|
if (a) {
|
@@ -7012,21 +7012,21 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7012
7012
|
const u = /(https?:\/\/[^\s]+)/g;
|
7013
7013
|
return a.replace(u, (c) => `<a href="${c}" target="_blank">${c}</a>`);
|
7014
7014
|
}
|
7015
|
-
return (a, u) => (
|
7015
|
+
return (a, u) => (L(), $(zn, null, [
|
7016
7016
|
g("div", {
|
7017
7017
|
ref_key: "target",
|
7018
7018
|
ref: s,
|
7019
7019
|
class: "target"
|
7020
7020
|
}, null, 512),
|
7021
7021
|
g("div", Pu, [
|
7022
|
-
(
|
7022
|
+
(L(!0), $(zn, null, Ui(n.messages, (c) => {
|
7023
7023
|
var l, h;
|
7024
|
-
return
|
7024
|
+
return L(), $("div", {
|
7025
7025
|
key: c.id,
|
7026
7026
|
class: Me(["message", c.esCliente ? "message-right" : "message-left"])
|
7027
7027
|
}, [
|
7028
7028
|
g("div", Wu, [
|
7029
|
-
c.error && c.esCliente ? (
|
7029
|
+
c.error && c.esCliente ? (L(), $("div", qu, [
|
7030
7030
|
g("button", {
|
7031
7031
|
text: "",
|
7032
7032
|
rounded: "",
|
@@ -7037,7 +7037,7 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7037
7037
|
}, [
|
7038
7038
|
he(Uu)
|
7039
7039
|
], 8, Hu)
|
7040
|
-
])) :
|
7040
|
+
])) : Ge("", !0),
|
7041
7041
|
g("div", zu, [
|
7042
7042
|
g("div", {
|
7043
7043
|
class: Me(["bubble", c.esCliente ? "right" : "left"])
|
@@ -7051,8 +7051,8 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7051
7051
|
innerHTML: o(c.message)
|
7052
7052
|
}, null, 8, Zu),
|
7053
7053
|
g("div", ju, [
|
7054
|
-
(l = c.sender) != null && l.nombreCompleto ? (
|
7055
|
-
g("span", null,
|
7054
|
+
(l = c.sender) != null && l.nombreCompleto ? (L(), $("span", Yu, Nt(c.esCliente ? (h = c.sender) == null ? void 0 : h.nombreCompleto : "ECOSISTEMA JL"), 1)) : (L(), $("span", Ju)),
|
7055
|
+
g("span", null, Nt(Js(v).fromISO(c.createdAt).toFormat(
|
7056
7056
|
"dd-MM-yyyy HH:mm"
|
7057
7057
|
)), 1)
|
7058
7058
|
])
|
@@ -7080,7 +7080,7 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7080
7080
|
tl
|
7081
7081
|
];
|
7082
7082
|
function sl(t, e) {
|
7083
|
-
return
|
7083
|
+
return L(), $("svg", Qu, nl);
|
7084
7084
|
}
|
7085
7085
|
const rl = /* @__PURE__ */ oe(Xu, [["render", sl], ["__scopeId", "data-v-d9a6b2b7"]]);
|
7086
7086
|
function il(t, e, n) {
|
@@ -7100,7 +7100,7 @@ const Ot = /* @__PURE__ */ Object.create(null);
|
|
7100
7100
|
Object.keys(le).forEach((t) => {
|
7101
7101
|
Ot[le[t]] = t;
|
7102
7102
|
});
|
7103
|
-
const
|
7103
|
+
const wn = { type: "error", data: "parser error" }, Si = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", vi = typeof ArrayBuffer == "function", ki = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, Bn = ({ type: t, data: e }, n, s) => Si && e instanceof Blob ? n ? s(e) : $s(e, s) : vi && (e instanceof ArrayBuffer || ki(e)) ? n ? s(e) : $s(new Blob([e]), s) : s(le[t] + (e || "")), $s = (t, e) => {
|
7104
7104
|
const n = new FileReader();
|
7105
7105
|
return n.onload = function() {
|
7106
7106
|
const s = n.result.split(",")[1];
|
@@ -7110,14 +7110,14 @@ const Sn = { type: "error", data: "parser error" }, Si = typeof Blob == "functio
|
|
7110
7110
|
function Us(t) {
|
7111
7111
|
return t instanceof Uint8Array ? t : t instanceof ArrayBuffer ? new Uint8Array(t) : new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
|
7112
7112
|
}
|
7113
|
-
let
|
7113
|
+
let rn;
|
7114
7114
|
function ol(t, e) {
|
7115
7115
|
if (Si && t.data instanceof Blob)
|
7116
7116
|
return t.data.arrayBuffer().then(Us).then(e);
|
7117
|
-
if (vi && (t.data instanceof ArrayBuffer ||
|
7117
|
+
if (vi && (t.data instanceof ArrayBuffer || ki(t.data)))
|
7118
7118
|
return e(Us(t.data));
|
7119
|
-
|
7120
|
-
|
7119
|
+
Bn(t, !1, (n) => {
|
7120
|
+
rn || (rn = new TextEncoder()), e(rn.encode(n));
|
7121
7121
|
});
|
7122
7122
|
}
|
7123
7123
|
const Ps = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Je = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
@@ -7130,11 +7130,11 @@ const al = (t) => {
|
|
7130
7130
|
for (s = 0; s < n; s += 4)
|
7131
7131
|
i = Je[t.charCodeAt(s)], o = Je[t.charCodeAt(s + 1)], a = Je[t.charCodeAt(s + 2)], u = Je[t.charCodeAt(s + 3)], l[r++] = i << 2 | o >> 4, l[r++] = (o & 15) << 4 | a >> 2, l[r++] = (a & 3) << 6 | u & 63;
|
7132
7132
|
return c;
|
7133
|
-
}, cl = typeof ArrayBuffer == "function",
|
7133
|
+
}, cl = typeof ArrayBuffer == "function", $n = (t, e) => {
|
7134
7134
|
if (typeof t != "string")
|
7135
7135
|
return {
|
7136
7136
|
type: "message",
|
7137
|
-
data:
|
7137
|
+
data: bi(t, e)
|
7138
7138
|
};
|
7139
7139
|
const n = t.charAt(0);
|
7140
7140
|
return n === "b" ? {
|
@@ -7145,14 +7145,14 @@ const al = (t) => {
|
|
7145
7145
|
data: t.substring(1)
|
7146
7146
|
} : {
|
7147
7147
|
type: Ot[n]
|
7148
|
-
} :
|
7148
|
+
} : wn;
|
7149
7149
|
}, ul = (t, e) => {
|
7150
7150
|
if (cl) {
|
7151
7151
|
const n = al(t);
|
7152
|
-
return
|
7152
|
+
return bi(n, e);
|
7153
7153
|
} else
|
7154
7154
|
return { base64: !0, data: t };
|
7155
|
-
},
|
7155
|
+
}, bi = (t, e) => {
|
7156
7156
|
switch (e) {
|
7157
7157
|
case "blob":
|
7158
7158
|
return t instanceof Blob ? t : new Blob([t]);
|
@@ -7164,14 +7164,14 @@ const al = (t) => {
|
|
7164
7164
|
const n = t.length, s = new Array(n);
|
7165
7165
|
let r = 0;
|
7166
7166
|
t.forEach((i, o) => {
|
7167
|
-
|
7167
|
+
Bn(i, !1, (a) => {
|
7168
7168
|
s[o] = a, ++r === n && e(s.join(Ti));
|
7169
7169
|
});
|
7170
7170
|
});
|
7171
7171
|
}, fl = (t, e) => {
|
7172
7172
|
const n = t.split(Ti), s = [];
|
7173
7173
|
for (let r = 0; r < n.length; r++) {
|
7174
|
-
const i =
|
7174
|
+
const i = $n(n[r], e);
|
7175
7175
|
if (s.push(i), i.type === "error")
|
7176
7176
|
break;
|
7177
7177
|
}
|
@@ -7199,11 +7199,11 @@ function hl() {
|
|
7199
7199
|
}
|
7200
7200
|
});
|
7201
7201
|
}
|
7202
|
-
let
|
7203
|
-
function
|
7202
|
+
let on;
|
7203
|
+
function mt(t) {
|
7204
7204
|
return t.reduce((e, n) => e + n.length, 0);
|
7205
7205
|
}
|
7206
|
-
function
|
7206
|
+
function pt(t, e) {
|
7207
7207
|
if (t[0].length === e)
|
7208
7208
|
return t.shift();
|
7209
7209
|
const n = new Uint8Array(e);
|
@@ -7213,39 +7213,39 @@ function mt(t, e) {
|
|
7213
7213
|
return t.length && s < t[0].length && (t[0] = t[0].slice(s)), n;
|
7214
7214
|
}
|
7215
7215
|
function dl(t, e) {
|
7216
|
-
|
7216
|
+
on || (on = new TextDecoder());
|
7217
7217
|
const n = [];
|
7218
7218
|
let s = 0, r = -1, i = !1;
|
7219
7219
|
return new TransformStream({
|
7220
7220
|
transform(o, a) {
|
7221
7221
|
for (n.push(o); ; ) {
|
7222
7222
|
if (s === 0) {
|
7223
|
-
if (
|
7223
|
+
if (mt(n) < 1)
|
7224
7224
|
break;
|
7225
|
-
const u =
|
7225
|
+
const u = pt(n, 1);
|
7226
7226
|
i = (u[0] & 128) === 128, r = u[0] & 127, r < 126 ? s = 3 : r === 126 ? s = 1 : s = 2;
|
7227
7227
|
} else if (s === 1) {
|
7228
|
-
if (
|
7228
|
+
if (mt(n) < 2)
|
7229
7229
|
break;
|
7230
|
-
const u =
|
7230
|
+
const u = pt(n, 2);
|
7231
7231
|
r = new DataView(u.buffer, u.byteOffset, u.length).getUint16(0), s = 3;
|
7232
7232
|
} else if (s === 2) {
|
7233
|
-
if (
|
7233
|
+
if (mt(n) < 8)
|
7234
7234
|
break;
|
7235
|
-
const u =
|
7235
|
+
const u = pt(n, 8), c = new DataView(u.buffer, u.byteOffset, u.length), l = c.getUint32(0);
|
7236
7236
|
if (l > Math.pow(2, 21) - 1) {
|
7237
|
-
a.enqueue(
|
7237
|
+
a.enqueue(wn);
|
7238
7238
|
break;
|
7239
7239
|
}
|
7240
7240
|
r = l * Math.pow(2, 32) + c.getUint32(4), s = 3;
|
7241
7241
|
} else {
|
7242
|
-
if (
|
7242
|
+
if (mt(n) < r)
|
7243
7243
|
break;
|
7244
|
-
const u =
|
7245
|
-
a.enqueue(
|
7244
|
+
const u = pt(n, r);
|
7245
|
+
a.enqueue($n(i ? u : on.decode(u), e)), s = 0;
|
7246
7246
|
}
|
7247
7247
|
if (r === 0 || r > t) {
|
7248
|
-
a.enqueue(
|
7248
|
+
a.enqueue(wn);
|
7249
7249
|
break;
|
7250
7250
|
}
|
7251
7251
|
}
|
@@ -7253,24 +7253,24 @@ function dl(t, e) {
|
|
7253
7253
|
});
|
7254
7254
|
}
|
7255
7255
|
const Ei = 4;
|
7256
|
-
function
|
7256
|
+
function F(t) {
|
7257
7257
|
if (t) return ml(t);
|
7258
7258
|
}
|
7259
7259
|
function ml(t) {
|
7260
|
-
for (var e in
|
7261
|
-
t[e] =
|
7260
|
+
for (var e in F.prototype)
|
7261
|
+
t[e] = F.prototype[e];
|
7262
7262
|
return t;
|
7263
7263
|
}
|
7264
|
-
|
7264
|
+
F.prototype.on = F.prototype.addEventListener = function(t, e) {
|
7265
7265
|
return this._callbacks = this._callbacks || {}, (this._callbacks["$" + t] = this._callbacks["$" + t] || []).push(e), this;
|
7266
7266
|
};
|
7267
|
-
|
7267
|
+
F.prototype.once = function(t, e) {
|
7268
7268
|
function n() {
|
7269
7269
|
this.off(t, n), e.apply(this, arguments);
|
7270
7270
|
}
|
7271
7271
|
return n.fn = e, this.on(t, n), this;
|
7272
7272
|
};
|
7273
|
-
|
7273
|
+
F.prototype.off = F.prototype.removeListener = F.prototype.removeAllListeners = F.prototype.removeEventListener = function(t, e) {
|
7274
7274
|
if (this._callbacks = this._callbacks || {}, arguments.length == 0)
|
7275
7275
|
return this._callbacks = {}, this;
|
7276
7276
|
var n = this._callbacks["$" + t];
|
@@ -7284,7 +7284,7 @@ L.prototype.off = L.prototype.removeListener = L.prototype.removeAllListeners =
|
|
7284
7284
|
}
|
7285
7285
|
return n.length === 0 && delete this._callbacks["$" + t], this;
|
7286
7286
|
};
|
7287
|
-
|
7287
|
+
F.prototype.emit = function(t) {
|
7288
7288
|
this._callbacks = this._callbacks || {};
|
7289
7289
|
for (var e = new Array(arguments.length - 1), n = this._callbacks["$" + t], s = 1; s < arguments.length; s++)
|
7290
7290
|
e[s - 1] = arguments[s];
|
@@ -7295,11 +7295,11 @@ L.prototype.emit = function(t) {
|
|
7295
7295
|
}
|
7296
7296
|
return this;
|
7297
7297
|
};
|
7298
|
-
|
7299
|
-
|
7298
|
+
F.prototype.emitReserved = F.prototype.emit;
|
7299
|
+
F.prototype.listeners = function(t) {
|
7300
7300
|
return this._callbacks = this._callbacks || {}, this._callbacks["$" + t] || [];
|
7301
7301
|
};
|
7302
|
-
|
7302
|
+
F.prototype.hasListeners = function(t) {
|
7303
7303
|
return !!this.listeners(t).length;
|
7304
7304
|
};
|
7305
7305
|
const G = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
@@ -7307,7 +7307,7 @@ function Oi(t, ...e) {
|
|
7307
7307
|
return e.reduce((n, s) => (t.hasOwnProperty(s) && (n[s] = t[s]), n), {});
|
7308
7308
|
}
|
7309
7309
|
const pl = G.setTimeout, yl = G.clearTimeout;
|
7310
|
-
function
|
7310
|
+
function qt(t, e) {
|
7311
7311
|
e.useNativeTimers ? (t.setTimeoutFn = pl.bind(G), t.clearTimeoutFn = yl.bind(G)) : (t.setTimeoutFn = G.setTimeout.bind(G), t.clearTimeoutFn = G.clearTimeout.bind(G));
|
7312
7312
|
}
|
7313
7313
|
const gl = 1.33;
|
@@ -7326,7 +7326,7 @@ function vl(t) {
|
|
7326
7326
|
t.hasOwnProperty(n) && (e.length && (e += "&"), e += encodeURIComponent(n) + "=" + encodeURIComponent(t[n]));
|
7327
7327
|
return e;
|
7328
7328
|
}
|
7329
|
-
function
|
7329
|
+
function kl(t) {
|
7330
7330
|
let e = {}, n = t.split("&");
|
7331
7331
|
for (let s = 0, r = n.length; s < r; s++) {
|
7332
7332
|
let i = n[s].split("=");
|
@@ -7334,12 +7334,12 @@ function bl(t) {
|
|
7334
7334
|
}
|
7335
7335
|
return e;
|
7336
7336
|
}
|
7337
|
-
class
|
7337
|
+
class bl extends Error {
|
7338
7338
|
constructor(e, n, s) {
|
7339
7339
|
super(e), this.description = n, this.context = s, this.type = "TransportError";
|
7340
7340
|
}
|
7341
7341
|
}
|
7342
|
-
class
|
7342
|
+
class Un extends F {
|
7343
7343
|
/**
|
7344
7344
|
* Transport abstract constructor.
|
7345
7345
|
*
|
@@ -7347,7 +7347,7 @@ class Pn extends L {
|
|
7347
7347
|
* @protected
|
7348
7348
|
*/
|
7349
7349
|
constructor(e) {
|
7350
|
-
super(), this.writable = !1,
|
7350
|
+
super(), this.writable = !1, qt(this, e), this.opts = e, this.query = e.query, this.socket = e.socket;
|
7351
7351
|
}
|
7352
7352
|
/**
|
7353
7353
|
* Emits an error.
|
@@ -7359,7 +7359,7 @@ class Pn extends L {
|
|
7359
7359
|
* @protected
|
7360
7360
|
*/
|
7361
7361
|
onError(e, n, s) {
|
7362
|
-
return super.emitReserved("error", new
|
7362
|
+
return super.emitReserved("error", new bl(e, n, s)), this;
|
7363
7363
|
}
|
7364
7364
|
/**
|
7365
7365
|
* Opens the transport.
|
@@ -7396,7 +7396,7 @@ class Pn extends L {
|
|
7396
7396
|
* @protected
|
7397
7397
|
*/
|
7398
7398
|
onData(e) {
|
7399
|
-
const n =
|
7399
|
+
const n = $n(e, this.socket.binaryType);
|
7400
7400
|
this.onPacket(n);
|
7401
7401
|
}
|
7402
7402
|
/**
|
@@ -7437,12 +7437,12 @@ class Pn extends L {
|
|
7437
7437
|
return n.length ? "?" + n : "";
|
7438
7438
|
}
|
7439
7439
|
}
|
7440
|
-
const Ci = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),
|
7441
|
-
let Ws = 0,
|
7440
|
+
const Ci = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Sn = 64, Tl = {};
|
7441
|
+
let Ws = 0, yt = 0, qs;
|
7442
7442
|
function Hs(t) {
|
7443
7443
|
let e = "";
|
7444
7444
|
do
|
7445
|
-
e = Ci[t %
|
7445
|
+
e = Ci[t % Sn] + e, t = Math.floor(t / Sn);
|
7446
7446
|
while (t > 0);
|
7447
7447
|
return e;
|
7448
7448
|
}
|
@@ -7450,8 +7450,8 @@ function xi() {
|
|
7450
7450
|
const t = Hs(+/* @__PURE__ */ new Date());
|
7451
7451
|
return t !== qs ? (Ws = 0, qs = t) : t + "." + Hs(Ws++);
|
7452
7452
|
}
|
7453
|
-
for (;
|
7454
|
-
Tl[Ci[
|
7453
|
+
for (; yt < Sn; yt++)
|
7454
|
+
Tl[Ci[yt]] = yt;
|
7455
7455
|
let Ni = !1;
|
7456
7456
|
try {
|
7457
7457
|
Ni = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
@@ -7478,7 +7478,7 @@ const Cl = function() {
|
|
7478
7478
|
xdomain: !1
|
7479
7479
|
}).responseType != null;
|
7480
7480
|
}();
|
7481
|
-
class xl extends
|
7481
|
+
class xl extends Un {
|
7482
7482
|
/**
|
7483
7483
|
* XHR Polling constructor.
|
7484
7484
|
*
|
@@ -7618,7 +7618,7 @@ class xl extends Pn {
|
|
7618
7618
|
}), this.pollXhr = e;
|
7619
7619
|
}
|
7620
7620
|
}
|
7621
|
-
class ue extends
|
7621
|
+
class ue extends F {
|
7622
7622
|
/**
|
7623
7623
|
* Request constructor
|
7624
7624
|
*
|
@@ -7626,7 +7626,7 @@ class ue extends L {
|
|
7626
7626
|
* @package
|
7627
7627
|
*/
|
7628
7628
|
constructor(e, n) {
|
7629
|
-
super(),
|
7629
|
+
super(), qt(this, n), this.opts = n, this.method = n.method || "GET", this.uri = e, this.data = n.data !== void 0 ? n.data : null, this.create();
|
7630
7630
|
}
|
7631
7631
|
/**
|
7632
7632
|
* Creates the XHR object and sends the request.
|
@@ -7726,8 +7726,8 @@ function zs() {
|
|
7726
7726
|
for (let t in ue.requests)
|
7727
7727
|
ue.requests.hasOwnProperty(t) && ue.requests[t].abort();
|
7728
7728
|
}
|
7729
|
-
const
|
7730
|
-
class _l extends
|
7729
|
+
const Pn = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, n) => n(e, 0), gt = G.WebSocket || G.MozWebSocket, Zs = !0, Nl = "arraybuffer", js = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
7730
|
+
class _l extends Un {
|
7731
7731
|
/**
|
7732
7732
|
* WebSocket transport constructor.
|
7733
7733
|
*
|
@@ -7746,7 +7746,7 @@ class _l extends Pn {
|
|
7746
7746
|
const e = this.uri(), n = this.opts.protocols, s = js ? {} : Oi(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
7747
7747
|
this.opts.extraHeaders && (s.headers = this.opts.extraHeaders);
|
7748
7748
|
try {
|
7749
|
-
this.ws = Zs && !js ? n ? new
|
7749
|
+
this.ws = Zs && !js ? n ? new gt(e, n) : new gt(e) : new gt(e, n, s);
|
7750
7750
|
} catch (r) {
|
7751
7751
|
return this.emitReserved("error", r);
|
7752
7752
|
}
|
@@ -7769,13 +7769,13 @@ class _l extends Pn {
|
|
7769
7769
|
this.writable = !1;
|
7770
7770
|
for (let n = 0; n < e.length; n++) {
|
7771
7771
|
const s = e[n], r = n === e.length - 1;
|
7772
|
-
|
7772
|
+
Bn(s, this.supportsBinary, (i) => {
|
7773
7773
|
const o = {};
|
7774
7774
|
try {
|
7775
7775
|
Zs && this.ws.send(i);
|
7776
7776
|
} catch {
|
7777
7777
|
}
|
7778
|
-
r &&
|
7778
|
+
r && Pn(() => {
|
7779
7779
|
this.writable = !0, this.emitReserved("drain");
|
7780
7780
|
}, this.setTimeoutFn);
|
7781
7781
|
});
|
@@ -7800,10 +7800,10 @@ class _l extends Pn {
|
|
7800
7800
|
* @private
|
7801
7801
|
*/
|
7802
7802
|
check() {
|
7803
|
-
return !!
|
7803
|
+
return !!gt;
|
7804
7804
|
}
|
7805
7805
|
}
|
7806
|
-
class Al extends
|
7806
|
+
class Al extends Un {
|
7807
7807
|
get name() {
|
7808
7808
|
return "webtransport";
|
7809
7809
|
}
|
@@ -7833,7 +7833,7 @@ class Al extends Pn {
|
|
7833
7833
|
for (let n = 0; n < e.length; n++) {
|
7834
7834
|
const s = e[n], r = n === e.length - 1;
|
7835
7835
|
this.writer.write(s).then(() => {
|
7836
|
-
r &&
|
7836
|
+
r && Pn(() => {
|
7837
7837
|
this.writable = !0, this.emitReserved("drain");
|
7838
7838
|
}, this.setTimeoutFn);
|
7839
7839
|
});
|
@@ -7864,7 +7864,7 @@ const Ml = {
|
|
7864
7864
|
"query",
|
7865
7865
|
"anchor"
|
7866
7866
|
];
|
7867
|
-
function
|
7867
|
+
function vn(t) {
|
7868
7868
|
const e = t, n = t.indexOf("["), s = t.indexOf("]");
|
7869
7869
|
n != -1 && s != -1 && (t = t.substring(0, n) + t.substring(n, s).replace(/:/g, ";") + t.substring(s, t.length));
|
7870
7870
|
let r = Rl.exec(t || ""), i = {}, o = 14;
|
@@ -7882,7 +7882,7 @@ function Ll(t, e) {
|
|
7882
7882
|
r && (n[r] = i);
|
7883
7883
|
}), n;
|
7884
7884
|
}
|
7885
|
-
let Ai = class _e extends
|
7885
|
+
let Ai = class _e extends F {
|
7886
7886
|
/**
|
7887
7887
|
* Socket constructor.
|
7888
7888
|
*
|
@@ -7890,7 +7890,7 @@ let Ai = class _e extends L {
|
|
7890
7890
|
* @param {Object} opts - options
|
7891
7891
|
*/
|
7892
7892
|
constructor(e, n = {}) {
|
7893
|
-
super(), this.binaryType = Nl, this.writeBuffer = [], e && typeof e == "object" && (n = e, e = null), e ? (e =
|
7893
|
+
super(), this.binaryType = Nl, this.writeBuffer = [], e && typeof e == "object" && (n = e, e = null), e ? (e = vn(e), n.hostname = e.host, n.secure = e.protocol === "https" || e.protocol === "wss", n.port = e.port, e.query && (n.query = e.query)) : n.host && (n.hostname = vn(n.host).host), qt(this, n), this.secure = n.secure != null ? n.secure : typeof location < "u" && location.protocol === "https:", n.hostname && !n.port && (n.port = this.secure ? "443" : "80"), this.hostname = n.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = n.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = n.transports || [
|
7894
7894
|
"polling",
|
7895
7895
|
"websocket",
|
7896
7896
|
"webtransport"
|
@@ -7908,7 +7908,7 @@ let Ai = class _e extends L {
|
|
7908
7908
|
},
|
7909
7909
|
transportOptions: {},
|
7910
7910
|
closeOnBeforeunload: !1
|
7911
|
-
}, n), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query =
|
7911
|
+
}, n), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = kl(this.opts.query)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingTimeoutTimer = null, typeof addEventListener == "function" && (this.opts.closeOnBeforeunload && (this.beforeunloadEventListener = () => {
|
7912
7912
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
7913
7913
|
}, addEventListener("beforeunload", this.beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this.offlineEventListener = () => {
|
7914
7914
|
this.onClose("transport close", {
|
@@ -8190,12 +8190,12 @@ let Ai = class _e extends L {
|
|
8190
8190
|
Ai.protocol = Ei;
|
8191
8191
|
function Fl(t, e = "", n) {
|
8192
8192
|
let s = t;
|
8193
|
-
n = n || typeof location < "u" && location, t == null && (t = n.protocol + "//" + n.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = n.protocol + t : t = n.host + t), /^(https?|wss?):\/\//.test(t) || (typeof n < "u" ? t = n.protocol + "//" + t : t = "https://" + t), s =
|
8193
|
+
n = n || typeof location < "u" && location, t == null && (t = n.protocol + "//" + n.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = n.protocol + t : t = n.host + t), /^(https?|wss?):\/\//.test(t) || (typeof n < "u" ? t = n.protocol + "//" + t : t = "https://" + t), s = vn(t)), s.port || (/^(http|ws)$/.test(s.protocol) ? s.port = "80" : /^(http|ws)s$/.test(s.protocol) && (s.port = "443")), s.path = s.path || "/";
|
8194
8194
|
const i = s.host.indexOf(":") !== -1 ? "[" + s.host + "]" : s.host;
|
8195
8195
|
return s.id = s.protocol + "://" + i + ":" + s.port + e, s.href = s.protocol + "://" + i + (n && n.port === s.port ? "" : ":" + s.port), s;
|
8196
8196
|
}
|
8197
8197
|
const Vl = typeof ArrayBuffer == "function", Bl = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer, Mi = Object.prototype.toString, $l = typeof Blob == "function" || typeof Blob < "u" && Mi.call(Blob) === "[object BlobConstructor]", Ul = typeof File == "function" || typeof File < "u" && Mi.call(File) === "[object FileConstructor]";
|
8198
|
-
function
|
8198
|
+
function Wn(t) {
|
8199
8199
|
return Vl && (t instanceof ArrayBuffer || Bl(t)) || $l && t instanceof Blob || Ul && t instanceof File;
|
8200
8200
|
}
|
8201
8201
|
function Ct(t, e) {
|
@@ -8207,7 +8207,7 @@ function Ct(t, e) {
|
|
8207
8207
|
return !0;
|
8208
8208
|
return !1;
|
8209
8209
|
}
|
8210
|
-
if (
|
8210
|
+
if (Wn(t))
|
8211
8211
|
return !0;
|
8212
8212
|
if (t.toJSON && typeof t.toJSON == "function" && arguments.length === 1)
|
8213
8213
|
return Ct(t.toJSON(), !0);
|
@@ -8223,7 +8223,7 @@ function Pl(t) {
|
|
8223
8223
|
function kn(t, e) {
|
8224
8224
|
if (!t)
|
8225
8225
|
return t;
|
8226
|
-
if (
|
8226
|
+
if (Wn(t)) {
|
8227
8227
|
const n = { _placeholder: !0, num: e.length };
|
8228
8228
|
return e.push(t), n;
|
8229
8229
|
} else if (Array.isArray(t)) {
|
@@ -8240,9 +8240,9 @@ function kn(t, e) {
|
|
8240
8240
|
return t;
|
8241
8241
|
}
|
8242
8242
|
function Wl(t, e) {
|
8243
|
-
return t.data =
|
8243
|
+
return t.data = bn(t.data, e), delete t.attachments, t;
|
8244
8244
|
}
|
8245
|
-
function
|
8245
|
+
function bn(t, e) {
|
8246
8246
|
if (!t)
|
8247
8247
|
return t;
|
8248
8248
|
if (t && t._placeholder === !0) {
|
@@ -8251,10 +8251,10 @@ function Tn(t, e) {
|
|
8251
8251
|
throw new Error("illegal attachments");
|
8252
8252
|
} else if (Array.isArray(t))
|
8253
8253
|
for (let n = 0; n < t.length; n++)
|
8254
|
-
t[n] =
|
8254
|
+
t[n] = bn(t[n], e);
|
8255
8255
|
else if (typeof t == "object")
|
8256
8256
|
for (const n in t)
|
8257
|
-
Object.prototype.hasOwnProperty.call(t, n) && (t[n] =
|
8257
|
+
Object.prototype.hasOwnProperty.call(t, n) && (t[n] = bn(t[n], e));
|
8258
8258
|
return t;
|
8259
8259
|
}
|
8260
8260
|
const ql = [
|
@@ -8266,10 +8266,10 @@ const ql = [
|
|
8266
8266
|
"removeListener"
|
8267
8267
|
// used by the Node.js EventEmitter
|
8268
8268
|
], Hl = 5;
|
8269
|
-
var
|
8269
|
+
var b;
|
8270
8270
|
(function(t) {
|
8271
8271
|
t[t.CONNECT = 0] = "CONNECT", t[t.DISCONNECT = 1] = "DISCONNECT", t[t.EVENT = 2] = "EVENT", t[t.ACK = 3] = "ACK", t[t.CONNECT_ERROR = 4] = "CONNECT_ERROR", t[t.BINARY_EVENT = 5] = "BINARY_EVENT", t[t.BINARY_ACK = 6] = "BINARY_ACK";
|
8272
|
-
})(
|
8272
|
+
})(b || (b = {}));
|
8273
8273
|
class zl {
|
8274
8274
|
/**
|
8275
8275
|
* Encoder constructor
|
@@ -8286,8 +8286,8 @@ class zl {
|
|
8286
8286
|
* @param {Object} obj - packet object
|
8287
8287
|
*/
|
8288
8288
|
encode(e) {
|
8289
|
-
return (e.type ===
|
8290
|
-
type: e.type ===
|
8289
|
+
return (e.type === b.EVENT || e.type === b.ACK) && Ct(e) ? this.encodeAsBinary({
|
8290
|
+
type: e.type === b.EVENT ? b.BINARY_EVENT : b.BINARY_ACK,
|
8291
8291
|
nsp: e.nsp,
|
8292
8292
|
data: e.data,
|
8293
8293
|
id: e.id
|
@@ -8298,7 +8298,7 @@ class zl {
|
|
8298
8298
|
*/
|
8299
8299
|
encodeAsString(e) {
|
8300
8300
|
let n = "" + e.type;
|
8301
|
-
return (e.type ===
|
8301
|
+
return (e.type === b.BINARY_EVENT || e.type === b.BINARY_ACK) && (n += e.attachments + "-"), e.nsp && e.nsp !== "/" && (n += e.nsp + ","), e.id != null && (n += e.id), e.data != null && (n += JSON.stringify(e.data, this.replacer)), n;
|
8302
8302
|
}
|
8303
8303
|
/**
|
8304
8304
|
* Encode packet as 'buffer sequence' by removing blobs, and
|
@@ -8313,7 +8313,7 @@ class zl {
|
|
8313
8313
|
function Ys(t) {
|
8314
8314
|
return Object.prototype.toString.call(t) === "[object Object]";
|
8315
8315
|
}
|
8316
|
-
class
|
8316
|
+
class qn extends F {
|
8317
8317
|
/**
|
8318
8318
|
* Decoder constructor
|
8319
8319
|
*
|
@@ -8333,9 +8333,9 @@ class Hn extends L {
|
|
8333
8333
|
if (this.reconstructor)
|
8334
8334
|
throw new Error("got plaintext data when reconstructing a packet");
|
8335
8335
|
n = this.decodeString(e);
|
8336
|
-
const s = n.type ===
|
8337
|
-
s || n.type ===
|
8338
|
-
} else if (
|
8336
|
+
const s = n.type === b.BINARY_EVENT;
|
8337
|
+
s || n.type === b.BINARY_ACK ? (n.type = s ? b.EVENT : b.ACK, this.reconstructor = new Zl(n), n.attachments === 0 && super.emitReserved("decoded", n)) : super.emitReserved("decoded", n);
|
8338
|
+
} else if (Wn(e) || e.base64)
|
8339
8339
|
if (this.reconstructor)
|
8340
8340
|
n = this.reconstructor.takeBinaryData(e), n && (this.reconstructor = null, super.emitReserved("decoded", n));
|
8341
8341
|
else
|
@@ -8354,9 +8354,9 @@ class Hn extends L {
|
|
8354
8354
|
const s = {
|
8355
8355
|
type: Number(e.charAt(0))
|
8356
8356
|
};
|
8357
|
-
if (
|
8357
|
+
if (b[s.type] === void 0)
|
8358
8358
|
throw new Error("unknown packet type " + s.type);
|
8359
|
-
if (s.type ===
|
8359
|
+
if (s.type === b.BINARY_EVENT || s.type === b.BINARY_ACK) {
|
8360
8360
|
const i = n + 1;
|
8361
8361
|
for (; e.charAt(++n) !== "-" && n != e.length; )
|
8362
8362
|
;
|
@@ -8388,7 +8388,7 @@ class Hn extends L {
|
|
8388
8388
|
}
|
8389
8389
|
if (e.charAt(++n)) {
|
8390
8390
|
const i = this.tryParse(e.substr(n));
|
8391
|
-
if (
|
8391
|
+
if (qn.isPayloadValid(s.type, i))
|
8392
8392
|
s.data = i;
|
8393
8393
|
else
|
8394
8394
|
throw new Error("invalid payload");
|
@@ -8404,17 +8404,17 @@ class Hn extends L {
|
|
8404
8404
|
}
|
8405
8405
|
static isPayloadValid(e, n) {
|
8406
8406
|
switch (e) {
|
8407
|
-
case
|
8407
|
+
case b.CONNECT:
|
8408
8408
|
return Ys(n);
|
8409
|
-
case
|
8409
|
+
case b.DISCONNECT:
|
8410
8410
|
return n === void 0;
|
8411
|
-
case
|
8411
|
+
case b.CONNECT_ERROR:
|
8412
8412
|
return typeof n == "string" || Ys(n);
|
8413
|
-
case
|
8414
|
-
case
|
8413
|
+
case b.EVENT:
|
8414
|
+
case b.BINARY_EVENT:
|
8415
8415
|
return Array.isArray(n) && (typeof n[0] == "number" || typeof n[0] == "string" && ql.indexOf(n[0]) === -1);
|
8416
|
-
case
|
8417
|
-
case
|
8416
|
+
case b.ACK:
|
8417
|
+
case b.BINARY_ACK:
|
8418
8418
|
return Array.isArray(n);
|
8419
8419
|
}
|
8420
8420
|
}
|
@@ -8453,10 +8453,10 @@ class Zl {
|
|
8453
8453
|
}
|
8454
8454
|
const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
8455
8455
|
__proto__: null,
|
8456
|
-
Decoder:
|
8456
|
+
Decoder: qn,
|
8457
8457
|
Encoder: zl,
|
8458
8458
|
get PacketType() {
|
8459
|
-
return
|
8459
|
+
return b;
|
8460
8460
|
},
|
8461
8461
|
protocol: Hl
|
8462
8462
|
}, Symbol.toStringTag, { value: "Module" }));
|
@@ -8474,7 +8474,7 @@ const Yl = Object.freeze({
|
|
8474
8474
|
newListener: 1,
|
8475
8475
|
removeListener: 1
|
8476
8476
|
});
|
8477
|
-
class Ri extends
|
8477
|
+
class Ri extends F {
|
8478
8478
|
/**
|
8479
8479
|
* `Socket` constructor.
|
8480
8480
|
*/
|
@@ -8594,7 +8594,7 @@ class Ri extends L {
|
|
8594
8594
|
if (n.unshift(e), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
8595
8595
|
return this._addToQueue(n), this;
|
8596
8596
|
const s = {
|
8597
|
-
type:
|
8597
|
+
type: b.EVENT,
|
8598
8598
|
data: n
|
8599
8599
|
};
|
8600
8600
|
if (s.options = {}, s.options.compress = this.flags.compress !== !1, typeof n[n.length - 1] == "function") {
|
@@ -8702,7 +8702,7 @@ class Ri extends L {
|
|
8702
8702
|
*/
|
8703
8703
|
_sendConnectPacket(e) {
|
8704
8704
|
this.packet({
|
8705
|
-
type:
|
8705
|
+
type: b.CONNECT,
|
8706
8706
|
data: this._pid ? Object.assign({ pid: this._pid, offset: this._lastOffset }, e) : e
|
8707
8707
|
});
|
8708
8708
|
}
|
@@ -8734,21 +8734,21 @@ class Ri extends L {
|
|
8734
8734
|
onpacket(e) {
|
8735
8735
|
if (e.nsp === this.nsp)
|
8736
8736
|
switch (e.type) {
|
8737
|
-
case
|
8737
|
+
case b.CONNECT:
|
8738
8738
|
e.data && e.data.sid ? this.onconnect(e.data.sid, e.data.pid) : this.emitReserved("connect_error", new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));
|
8739
8739
|
break;
|
8740
|
-
case
|
8741
|
-
case
|
8740
|
+
case b.EVENT:
|
8741
|
+
case b.BINARY_EVENT:
|
8742
8742
|
this.onevent(e);
|
8743
8743
|
break;
|
8744
|
-
case
|
8745
|
-
case
|
8744
|
+
case b.ACK:
|
8745
|
+
case b.BINARY_ACK:
|
8746
8746
|
this.onack(e);
|
8747
8747
|
break;
|
8748
|
-
case
|
8748
|
+
case b.DISCONNECT:
|
8749
8749
|
this.ondisconnect();
|
8750
8750
|
break;
|
8751
|
-
case
|
8751
|
+
case b.CONNECT_ERROR:
|
8752
8752
|
this.destroy();
|
8753
8753
|
const s = new Error(e.data.message);
|
8754
8754
|
s.data = e.data.data, this.emitReserved("connect_error", s);
|
@@ -8783,7 +8783,7 @@ class Ri extends L {
|
|
8783
8783
|
let s = !1;
|
8784
8784
|
return function(...r) {
|
8785
8785
|
s || (s = !0, n.packet({
|
8786
|
-
type:
|
8786
|
+
type: b.ACK,
|
8787
8787
|
id: e,
|
8788
8788
|
data: r
|
8789
8789
|
}));
|
@@ -8852,7 +8852,7 @@ class Ri extends L {
|
|
8852
8852
|
* @return self
|
8853
8853
|
*/
|
8854
8854
|
disconnect() {
|
8855
|
-
return this.connected && this.packet({ type:
|
8855
|
+
return this.connected && this.packet({ type: b.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
|
8856
8856
|
}
|
8857
8857
|
/**
|
8858
8858
|
* Alias for {@link disconnect()}.
|
@@ -9074,10 +9074,10 @@ We.prototype.setMax = function(t) {
|
|
9074
9074
|
We.prototype.setJitter = function(t) {
|
9075
9075
|
this.jitter = t;
|
9076
9076
|
};
|
9077
|
-
class
|
9077
|
+
class Tn extends F {
|
9078
9078
|
constructor(e, n) {
|
9079
9079
|
var s;
|
9080
|
-
super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (n = e, e = void 0), n = n || {}, n.path = n.path || "/socket.io", this.opts = n,
|
9080
|
+
super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (n = e, e = void 0), n = n || {}, n.path = n.path || "/socket.io", this.opts = n, qt(this, n), this.reconnection(n.reconnection !== !1), this.reconnectionAttempts(n.reconnectionAttempts || 1 / 0), this.reconnectionDelay(n.reconnectionDelay || 1e3), this.reconnectionDelayMax(n.reconnectionDelayMax || 5e3), this.randomizationFactor((s = n.randomizationFactor) !== null && s !== void 0 ? s : 0.5), this.backoff = new We({
|
9081
9081
|
min: this.reconnectionDelay(),
|
9082
9082
|
max: this.reconnectionDelayMax(),
|
9083
9083
|
jitter: this.randomizationFactor()
|
@@ -9188,7 +9188,7 @@ class En extends L {
|
|
9188
9188
|
* @private
|
9189
9189
|
*/
|
9190
9190
|
ondecoded(e) {
|
9191
|
-
|
9191
|
+
Pn(() => {
|
9192
9192
|
this.emitReserved("packet", e);
|
9193
9193
|
}, this.setTimeoutFn);
|
9194
9194
|
}
|
@@ -9305,10 +9305,10 @@ function xt(t, e) {
|
|
9305
9305
|
typeof t == "object" && (e = t, t = void 0), e = e || {};
|
9306
9306
|
const n = Fl(t, e.path || "/socket.io"), s = n.source, r = n.id, i = n.path, o = Ze[r] && i in Ze[r].nsps, a = e.forceNew || e["force new connection"] || e.multiplex === !1 || o;
|
9307
9307
|
let u;
|
9308
|
-
return a ? u = new
|
9308
|
+
return a ? u = new Tn(s, e) : (Ze[r] || (Ze[r] = new Tn(s, e)), u = Ze[r]), n.query && !e.query && (e.query = n.queryKey), u.socket(n.path, e);
|
9309
9309
|
}
|
9310
9310
|
Object.assign(xt, {
|
9311
|
-
Manager:
|
9311
|
+
Manager: Tn,
|
9312
9312
|
Socket: Ri,
|
9313
9313
|
io: xt,
|
9314
9314
|
connect: xt
|
@@ -9320,7 +9320,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9320
9320
|
}, Ql = { class: "w-full" }, ef = ["onSubmit"], tf = { class: "form-message" }, nf = { class: "jl-inputgroup-chat" }, sf = ["onKeyup"], rf = {
|
9321
9321
|
type: "submit",
|
9322
9322
|
class: "pointer btn-primary"
|
9323
|
-
}, of = 14, af = /* @__PURE__ */
|
9323
|
+
}, of = 14, af = /* @__PURE__ */ On({
|
9324
9324
|
__name: "Chat",
|
9325
9325
|
props: {
|
9326
9326
|
titlePrincipal: {
|
@@ -9347,7 +9347,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9347
9347
|
data: [],
|
9348
9348
|
canLoadMoreMessages: !1
|
9349
9349
|
}), o = z(""), a = z(!1), u = z(null);
|
9350
|
-
|
9350
|
+
En(
|
9351
9351
|
() => n.visible,
|
9352
9352
|
async (S) => {
|
9353
9353
|
if (!S || (e("clear-new-messages"), d(), r.value > 0 && cs(o.value, n.tokenAuth), o.value)) return;
|
@@ -9358,15 +9358,15 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9358
9358
|
function c(S) {
|
9359
9359
|
var E;
|
9360
9360
|
if (S.key === "Enter" && S.shiftKey) {
|
9361
|
-
const
|
9362
|
-
S.target.value =
|
9361
|
+
const V = ((E = S.target) == null ? void 0 : E.value) || "";
|
9362
|
+
S.target.value = V + `
|
9363
9363
|
`, _();
|
9364
9364
|
return;
|
9365
9365
|
}
|
9366
9366
|
l();
|
9367
9367
|
}
|
9368
9368
|
const l = async (S) => {
|
9369
|
-
var j, M,
|
9369
|
+
var j, M, B;
|
9370
9370
|
if (((j = s.value) == null ? void 0 : j.length) > 300) {
|
9371
9371
|
e("show-toast", {
|
9372
9372
|
severity: "warn",
|
@@ -9387,7 +9387,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9387
9387
|
}
|
9388
9388
|
const E = {
|
9389
9389
|
id: Ki(),
|
9390
|
-
chatId: (
|
9390
|
+
chatId: (B = (M = W.value) == null ? void 0 : M.chat) == null ? void 0 : B.id,
|
9391
9391
|
message: s.value,
|
9392
9392
|
visto: !0,
|
9393
9393
|
multimedia: !1,
|
@@ -9400,11 +9400,11 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9400
9400
|
ci: n.user.ci,
|
9401
9401
|
msPersonaId: n.user.msPersonaId
|
9402
9402
|
}
|
9403
|
-
},
|
9403
|
+
}, V = i.value.data.push(E) - 1;
|
9404
9404
|
h(s.value, o.value).then((ae) => {
|
9405
|
-
var
|
9405
|
+
var ot, Hn;
|
9406
9406
|
if (!ae)
|
9407
|
-
i.value.data[
|
9407
|
+
i.value.data[V].error = {
|
9408
9408
|
error: !0,
|
9409
9409
|
id: E.id
|
9410
9410
|
}, e("show-toast", {
|
@@ -9414,11 +9414,11 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9414
9414
|
life: 5e3
|
9415
9415
|
});
|
9416
9416
|
else {
|
9417
|
-
i.value.data[
|
9417
|
+
i.value.data[V] = ae;
|
9418
9418
|
const Di = { ...ae, chatId: E.chatId };
|
9419
|
-
(
|
9419
|
+
(Hn = A.value) == null || Hn.emit(
|
9420
9420
|
"sendMessage",
|
9421
|
-
{ roomId: (
|
9421
|
+
{ roomId: (ot = W == null ? void 0 : W.value) == null ? void 0 : ot.appChat.id, message: Di },
|
9422
9422
|
(Li) => {
|
9423
9423
|
console.log("🚀 ~ socketService.value.emit ~ response:", Li);
|
9424
9424
|
}
|
@@ -9430,21 +9430,21 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9430
9430
|
message: S,
|
9431
9431
|
appChatId: E
|
9432
9432
|
}, n.tokenAuth), y = async () => {
|
9433
|
-
var j, M,
|
9433
|
+
var j, M, B;
|
9434
9434
|
const S = (j = i.value.data[0]) == null ? void 0 : j.id, E = {
|
9435
9435
|
lastMessagesId: S,
|
9436
9436
|
appChatId: o.value,
|
9437
9437
|
limit: 10
|
9438
9438
|
};
|
9439
9439
|
a.value = !0;
|
9440
|
-
const
|
9440
|
+
const V = await Oa({ body: E, token: n.tokenAuth });
|
9441
9441
|
a.value = !1, i.value.data.unshift(
|
9442
|
-
...
|
9443
|
-
), i.value.canLoadMoreMessages =
|
9442
|
+
...V.data.sort((ae, ot) => -ot.createdAt.localeCompare(ae.createdAt))
|
9443
|
+
), i.value.canLoadMoreMessages = V.pagination.total > V.pagination.size, S && ((M = u.value) != null && M.scrollHeight) && w((B = u.value) == null ? void 0 : B.scrollHeight), S || d();
|
9444
9444
|
}, m = async (S) => {
|
9445
9445
|
e("show-confirm", async () => {
|
9446
|
-
var
|
9447
|
-
if (!((
|
9446
|
+
var V, j, M;
|
9447
|
+
if (!((V = S.error) != null && V.id)) return;
|
9448
9448
|
const E = await h(S.message, o.value);
|
9449
9449
|
if (!E)
|
9450
9450
|
e("show-toast", {
|
@@ -9454,12 +9454,12 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9454
9454
|
life: 5e3
|
9455
9455
|
});
|
9456
9456
|
else {
|
9457
|
-
const
|
9457
|
+
const B = il(
|
9458
9458
|
i.value.data,
|
9459
9459
|
"id",
|
9460
9460
|
S.error.id
|
9461
9461
|
);
|
9462
|
-
i.value.data[
|
9462
|
+
i.value.data[B] = { ...E, error: void 0 }, (M = A.value) == null || M.emit(
|
9463
9463
|
"sendMessage",
|
9464
9464
|
{ roomId: (j = W == null ? void 0 : W.value) == null ? void 0 : j.appChat.id, message: S }
|
9465
9465
|
);
|
@@ -9467,11 +9467,11 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9467
9467
|
d();
|
9468
9468
|
});
|
9469
9469
|
}, d = () => {
|
9470
|
-
|
9470
|
+
Zn(() => {
|
9471
9471
|
u.value && (u.value.scrollTop = u.value.scrollHeight);
|
9472
9472
|
});
|
9473
9473
|
}, w = (S) => {
|
9474
|
-
|
9474
|
+
Zn(() => {
|
9475
9475
|
const E = u.value;
|
9476
9476
|
E && (E.scrollTop = E.scrollHeight - S);
|
9477
9477
|
});
|
@@ -9481,26 +9481,26 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9481
9481
|
}
|
9482
9482
|
const A = z(), W = z();
|
9483
9483
|
function qe(S, E = Ii.WEBCHAT) {
|
9484
|
-
var
|
9484
|
+
var V, j;
|
9485
9485
|
if (!S) throw new Error("user chat is required");
|
9486
9486
|
A.value = xt(window.VITE_SOCKET_URI, {
|
9487
9487
|
query: {
|
9488
9488
|
// TODO: confirmar si se quita o no
|
9489
|
-
usuarioId: `${(j = (
|
9489
|
+
usuarioId: `${(j = (V = S == null ? void 0 : S.chat) == null ? void 0 : V.persona) == null ? void 0 : j.funcionarioId}`,
|
9490
9490
|
aplicacion: E
|
9491
9491
|
},
|
9492
9492
|
extraHeaders: { Authorization: n.tokenAuth }
|
9493
9493
|
}), A.value.removeAllListeners(), A.value.on("connect", () => {
|
9494
|
-
var M,
|
9495
|
-
console.log("Conectado al servidor de sockets"), (
|
9494
|
+
var M, B;
|
9495
|
+
console.log("Conectado al servidor de sockets"), (B = A.value) == null || B.emit(
|
9496
9496
|
"joinRoom",
|
9497
9497
|
`${(M = S == null ? void 0 : S.appChat) == null ? void 0 : M.id}`
|
9498
9498
|
);
|
9499
9499
|
}), A.value.on("disconnect", () => {
|
9500
9500
|
console.log("Desconectado del servidor de sockets");
|
9501
9501
|
}), A.value.on("receiveMessage", (M) => {
|
9502
|
-
var
|
9503
|
-
console.log("Mensaje recibido:", M.message, S), M.message.sender.msPersonaId !== ((ae = (
|
9502
|
+
var B, ae;
|
9503
|
+
console.log("Mensaje recibido:", M.message, S), M.message.sender.msPersonaId !== ((ae = (B = S == null ? void 0 : S.chat) == null ? void 0 : B.persona) == null ? void 0 : ae.msPersonaId) && (i.value.data.push(M.message), cs(M.message.appChatId, n.tokenAuth), d(), !n.visible && e("new-message"));
|
9504
9504
|
});
|
9505
9505
|
}
|
9506
9506
|
return Ks(async () => {
|
@@ -9510,9 +9510,9 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9510
9510
|
}), qi(() => {
|
9511
9511
|
var S;
|
9512
9512
|
(S = A.value) == null || S.off();
|
9513
|
-
}), (S, E) => (
|
9513
|
+
}), (S, E) => (L(), $("div", Jl, [
|
9514
9514
|
g("div", Gl, [
|
9515
|
-
g("h4", Kl,
|
9515
|
+
g("h4", Kl, Nt(t.titlePrincipal), 1),
|
9516
9516
|
g("button", {
|
9517
9517
|
onClick: E[0] || (E[0] = () => t.toggleChat()),
|
9518
9518
|
class: "btn-close"
|
@@ -9525,9 +9525,9 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9525
9525
|
ref_key: "messageContainerRef",
|
9526
9526
|
ref: u
|
9527
9527
|
}, [
|
9528
|
-
a.value ? (
|
9528
|
+
a.value ? (L(), $("div", Xl, [
|
9529
9529
|
he(rl)
|
9530
|
-
])) :
|
9530
|
+
])) : Ge("", !0),
|
9531
9531
|
he(Ku, {
|
9532
9532
|
messages: i.value.data,
|
9533
9533
|
canLoadMoreMessages: i.value.canLoadMoreMessages,
|
@@ -9538,20 +9538,20 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9538
9538
|
g("div", Ql, [
|
9539
9539
|
g("form", {
|
9540
9540
|
class: "message-send",
|
9541
|
-
onSubmit:
|
9541
|
+
onSubmit: jn(l, ["prevent"])
|
9542
9542
|
}, [
|
9543
9543
|
g("div", tf, [
|
9544
9544
|
g("div", nf, [
|
9545
|
-
|
9546
|
-
"onUpdate:modelValue": E[1] || (E[1] = (
|
9545
|
+
an(g("textarea", {
|
9546
|
+
"onUpdate:modelValue": E[1] || (E[1] = (V) => s.value = V),
|
9547
9547
|
class: "jl2-input-chat",
|
9548
9548
|
required: "",
|
9549
9549
|
ref_key: "textAreaRef",
|
9550
9550
|
ref: T,
|
9551
9551
|
onInput: E[2] || (E[2] = () => _()),
|
9552
|
-
onKeydown: E[3] || (E[3] =
|
9552
|
+
onKeydown: E[3] || (E[3] = Yn(jn(() => {
|
9553
9553
|
}, ["prevent"]), ["enter"])),
|
9554
|
-
onKeyup:
|
9554
|
+
onKeyup: Yn(c, ["enter"])
|
9555
9555
|
}, null, 40, sf), [
|
9556
9556
|
[Hi, s.value]
|
9557
9557
|
]),
|
@@ -9574,7 +9574,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9574
9574
|
ff
|
9575
9575
|
];
|
9576
9576
|
function df(t, e) {
|
9577
|
-
return
|
9577
|
+
return L(), $("svg", lf, hf);
|
9578
9578
|
}
|
9579
9579
|
const mf = /* @__PURE__ */ oe(uf, [["render", df]]), pf = {}, yf = {
|
9580
9580
|
viewBox: "0 0 256 256",
|
@@ -9603,9 +9603,9 @@ const mf = /* @__PURE__ */ oe(uf, [["render", df]]), pf = {}, yf = {
|
|
9603
9603
|
gf
|
9604
9604
|
];
|
9605
9605
|
function Sf(t, e) {
|
9606
|
-
return
|
9606
|
+
return L(), $("svg", yf, wf);
|
9607
9607
|
}
|
9608
|
-
const vf = /* @__PURE__ */ oe(pf, [["render", Sf]]),
|
9608
|
+
const vf = /* @__PURE__ */ oe(pf, [["render", Sf]]), kf = {}, bf = {
|
9609
9609
|
version: "1.1",
|
9610
9610
|
id: "Capa_1",
|
9611
9611
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -9643,9 +9643,9 @@ const vf = /* @__PURE__ */ oe(pf, [["render", Sf]]), bf = {}, kf = {
|
|
9643
9643
|
Tf
|
9644
9644
|
];
|
9645
9645
|
function Of(t, e) {
|
9646
|
-
return
|
9646
|
+
return L(), $("svg", bf, Ef);
|
9647
9647
|
}
|
9648
|
-
const Cf = /* @__PURE__ */ oe(
|
9648
|
+
const Cf = /* @__PURE__ */ oe(kf, [["render", Of]]), xf = {}, Nf = {
|
9649
9649
|
version: "1.1",
|
9650
9650
|
id: "Capa_1",
|
9651
9651
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -9682,7 +9682,7 @@ const Cf = /* @__PURE__ */ oe(bf, [["render", Of]]), xf = {}, Nf = {
|
|
9682
9682
|
_f
|
9683
9683
|
];
|
9684
9684
|
function Mf(t, e) {
|
9685
|
-
return
|
9685
|
+
return L(), $("svg", Nf, Af);
|
9686
9686
|
}
|
9687
9687
|
const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
9688
9688
|
id: "chat-circle",
|
@@ -9690,7 +9690,7 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9690
9690
|
}, Df = {
|
9691
9691
|
key: 0,
|
9692
9692
|
class: "new-message-badge"
|
9693
|
-
}, Lf = { class: "chat-box" }, Ff = /* @__PURE__ */
|
9693
|
+
}, Lf = { class: "chat-box" }, Ff = /* @__PURE__ */ On({
|
9694
9694
|
__name: "Widget",
|
9695
9695
|
props: {
|
9696
9696
|
tokenAuth: { type: String, required: !0 },
|
@@ -9725,10 +9725,10 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9725
9725
|
const r = z(!1), i = z(0), o = z(!1), a = () => {
|
9726
9726
|
r.value = !r.value;
|
9727
9727
|
};
|
9728
|
-
return (u, c) => (
|
9728
|
+
return (u, c) => (L(), $("div", {
|
9729
9729
|
class: Me(["widget-css-reset widget-container", t.isDarkMode ? "chat-dark-mode" : ""])
|
9730
9730
|
}, [
|
9731
|
-
|
9731
|
+
an(g("div", If, [
|
9732
9732
|
g("div", {
|
9733
9733
|
class: Me(["container-buttons-chat", { active: o.value }])
|
9734
9734
|
}, [
|
@@ -9761,20 +9761,19 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9761
9761
|
he(Rf)
|
9762
9762
|
], 2)
|
9763
9763
|
], 2),
|
9764
|
-
i.value ? (
|
9765
|
-
|
9764
|
+
i.value ? (L(), $("div", Df, Nt(i.value > 9 ? "9+" : i.value), 1)) : Ge("", !0),
|
9765
|
+
n.tokenAuth.length > 10 ? (L(), $("a", {
|
9766
|
+
key: 1,
|
9766
9767
|
href: "javascript:;",
|
9767
9768
|
onClick: c[3] || (c[3] = (l) => n.tokenAuth.length > 10 && a())
|
9768
9769
|
}, [
|
9769
9770
|
he(mf)
|
9770
|
-
],
|
9771
|
-
[zt, !r.value]
|
9772
|
-
])
|
9771
|
+
])) : Ge("", !0)
|
9773
9772
|
], 512), [
|
9774
|
-
[
|
9773
|
+
[Jn, !r.value]
|
9775
9774
|
]),
|
9776
|
-
|
9777
|
-
t.tokenAuth ? (
|
9775
|
+
an(g("div", Lf, [
|
9776
|
+
t.tokenAuth ? (L(), Zi(cf, {
|
9778
9777
|
key: 0,
|
9779
9778
|
visible: r.value,
|
9780
9779
|
titlePrincipal: t.titlePrincipal,
|
@@ -9786,13 +9785,13 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9786
9785
|
onClearNewMessages: c[6] || (c[6] = (l) => i.value = 0),
|
9787
9786
|
onNewMessage: c[7] || (c[7] = () => i.value++),
|
9788
9787
|
onNotViewedTotal: c[8] || (c[8] = (l) => i.value = l)
|
9789
|
-
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])) :
|
9788
|
+
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])) : Ge("", !0)
|
9790
9789
|
], 512), [
|
9791
|
-
[
|
9790
|
+
[Jn, r.value]
|
9792
9791
|
])
|
9793
9792
|
], 2));
|
9794
9793
|
}
|
9795
|
-
}), Bf = /* @__PURE__ */ oe(Ff, [["__scopeId", "data-v-
|
9794
|
+
}), Bf = /* @__PURE__ */ oe(Ff, [["__scopeId", "data-v-26d282c6"]]), $f = {
|
9796
9795
|
install(t, e) {
|
9797
9796
|
window.VITE_BACKEND_URL = e.VITE_BACKEND_URL, window.VITE_SOCKET_URI = e.VITE_SOCKET_URI, window.VITE_CELLPHONE_NUMBERS = e.VITE_CELLPHONE_NUMBERS;
|
9798
9797
|
}
|