vue-wiguet-chatweb 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { openBlock as
|
1
|
+
import { openBlock as W, createElementBlock as U, createElementVNode as E, getCurrentScope as Rr, onScopeDispose as Vr, unref as ds, computed as hs, ref as B, watch as tn, getCurrentInstance as Lr, onMounted as fs, defineComponent as nn, onBeforeMount as Wr, Fragment as wn, renderList as Ur, normalizeClass as it, createVNode as ge, createCommentVNode as sn, toDisplayString as Ue, pushScopeId as $r, popScopeId as Hr, nextTick as Sn, withModifiers as Br, withDirectives as zt, vModelText as Pr, createStaticVNode as zr, vShow as bn } from "vue";
|
2
2
|
let Ye;
|
3
3
|
const Zr = new Uint8Array(16);
|
4
4
|
function qr() {
|
@@ -12,12 +12,12 @@ for (let t = 0; t < 256; ++t)
|
|
12
12
|
function jr(t, e = 0) {
|
13
13
|
return V[t[e + 0]] + V[t[e + 1]] + V[t[e + 2]] + V[t[e + 3]] + "-" + V[t[e + 4]] + V[t[e + 5]] + "-" + V[t[e + 6]] + V[t[e + 7]] + "-" + V[t[e + 8]] + V[t[e + 9]] + "-" + V[t[e + 10]] + V[t[e + 11]] + V[t[e + 12]] + V[t[e + 13]] + V[t[e + 14]] + V[t[e + 15]];
|
14
14
|
}
|
15
|
-
const Gr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
15
|
+
const Gr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), kn = {
|
16
16
|
randomUUID: Gr
|
17
17
|
};
|
18
18
|
function Yr(t, e, n) {
|
19
|
-
if (
|
20
|
-
return
|
19
|
+
if (kn.randomUUID && !e && !t)
|
20
|
+
return kn.randomUUID();
|
21
21
|
t = t || {};
|
22
22
|
const s = t.random || (t.rng || qr)();
|
23
23
|
if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, e) {
|
@@ -144,7 +144,7 @@ class le {
|
|
144
144
|
`).replace(/\\c/g, ":").replace(/\\\\/g, "\\");
|
145
145
|
}
|
146
146
|
}
|
147
|
-
const
|
147
|
+
const Tn = 0, Je = 10, Ke = 13, Xr = 58;
|
148
148
|
class ei {
|
149
149
|
constructor(e, n) {
|
150
150
|
this.onFrame = e, this.onIncomingPing = n, this._encoder = new TextEncoder(), this._decoder = new TextDecoder(), this._token = [], this._initState();
|
@@ -163,7 +163,7 @@ class ei {
|
|
163
163
|
// The following implements a simple Rec Descent Parser.
|
164
164
|
// The grammar is simple and just one byte tells what should be the next state
|
165
165
|
_collectFrame(e) {
|
166
|
-
if (e !==
|
166
|
+
if (e !== Tn && e !== Ke) {
|
167
167
|
if (e === Je) {
|
168
168
|
this.onIncomingPing();
|
169
169
|
return;
|
@@ -216,7 +216,7 @@ class ei {
|
|
216
216
|
e ? (this._bodyBytesRemaining = parseInt(e[1], 10), this._onByte = this._collectBodyFixedSize) : this._onByte = this._collectBodyNullTerminated;
|
217
217
|
}
|
218
218
|
_collectBodyNullTerminated(e) {
|
219
|
-
if (e ===
|
219
|
+
if (e === Tn) {
|
220
220
|
this._retrievedBody();
|
221
221
|
return;
|
222
222
|
}
|
@@ -265,7 +265,7 @@ var q;
|
|
265
265
|
(function(t) {
|
266
266
|
t[t.ACTIVE = 0] = "ACTIVE", t[t.DEACTIVATING = 1] = "DEACTIVATING", t[t.INACTIVE = 2] = "INACTIVE";
|
267
267
|
})(q = q || (q = {}));
|
268
|
-
class
|
268
|
+
class $ {
|
269
269
|
/**
|
270
270
|
* Takes an array of versions, typical elements '1.2', '1.1', or '1.0'
|
271
271
|
*
|
@@ -288,13 +288,13 @@ class W {
|
|
288
288
|
return this.versions.map((e) => `v${e.replace(".", "")}.stomp`);
|
289
289
|
}
|
290
290
|
}
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
291
|
+
$.V1_0 = "1.0";
|
292
|
+
$.V1_1 = "1.1";
|
293
|
+
$.V1_2 = "1.2";
|
294
|
+
$.default = new $([
|
295
|
+
$.V1_2,
|
296
|
+
$.V1_1,
|
297
|
+
$.V1_0
|
298
298
|
]);
|
299
299
|
function ti(t, e) {
|
300
300
|
t.terminate = function() {
|
@@ -317,11 +317,11 @@ class ni {
|
|
317
317
|
this._client = e, this._webSocket = n, this._connected = !1, this._serverFrameHandlers = {
|
318
318
|
// [CONNECTED Frame](https://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)
|
319
319
|
CONNECTED: (r) => {
|
320
|
-
this.debug(`connected to server ${r.headers.server}`), this._connected = !0, this._connectedVersion = r.headers.version, this._connectedVersion ===
|
320
|
+
this.debug(`connected to server ${r.headers.server}`), this._connected = !0, this._connectedVersion = r.headers.version, this._connectedVersion === $.V1_2 && (this._escapeHeaderValues = !0), this._setupHeartbeat(r.headers), this.onConnect(r);
|
321
321
|
},
|
322
322
|
// [MESSAGE Frame](https://stomp.github.com/stomp-specification-1.2.html#MESSAGE)
|
323
323
|
MESSAGE: (r) => {
|
324
|
-
const i = r.headers.subscription, o = this._subscriptions[i] || this.onUnhandledMessage, a = r, c = this, u = this._connectedVersion ===
|
324
|
+
const i = r.headers.subscription, o = this._subscriptions[i] || this.onUnhandledMessage, a = r, c = this, u = this._connectedVersion === $.V1_2 ? a.headers.ack : a.headers["message-id"];
|
325
325
|
a.ack = (l = {}) => c.ack(u, i, l), a.nack = (l = {}) => c.nack(u, i, l), o(a);
|
326
326
|
},
|
327
327
|
// [RECEIPT Frame](https://stomp.github.com/stomp-specification-1.2.html#RECEIPT)
|
@@ -372,7 +372,7 @@ class ni {
|
|
372
372
|
};
|
373
373
|
}
|
374
374
|
_setupHeartbeat(e) {
|
375
|
-
if (e.version !==
|
375
|
+
if (e.version !== $.V1_1 && e.version !== $.V1_2 || !e["heart-beat"])
|
376
376
|
return;
|
377
377
|
const [n, s] = e["heart-beat"].split(",").map((r) => parseInt(r, 10));
|
378
378
|
if (this.heartbeatOutgoing !== 0 && s !== 0) {
|
@@ -500,10 +500,10 @@ class ni {
|
|
500
500
|
});
|
501
501
|
}
|
502
502
|
ack(e, n, s = {}) {
|
503
|
-
s = Object.assign({}, s), this._connectedVersion ===
|
503
|
+
s = Object.assign({}, s), this._connectedVersion === $.V1_2 ? s.id = e : s["message-id"] = e, s.subscription = n, this._transmit({ command: "ACK", headers: s });
|
504
504
|
}
|
505
505
|
nack(e, n, s = {}) {
|
506
|
-
return s = Object.assign({}, s), this._connectedVersion ===
|
506
|
+
return s = Object.assign({}, s), this._connectedVersion === $.V1_2 ? s.id = e : s["message-id"] = e, s.subscription = n, this._transmit({ command: "NACK", headers: s });
|
507
507
|
}
|
508
508
|
}
|
509
509
|
class si {
|
@@ -511,7 +511,7 @@ class si {
|
|
511
511
|
* Create an instance.
|
512
512
|
*/
|
513
513
|
constructor(e = {}) {
|
514
|
-
this.stompVersions =
|
514
|
+
this.stompVersions = $.default, this.connectionTimeout = 0, this.reconnectDelay = 5e3, this.heartbeatIncoming = 1e4, this.heartbeatOutgoing = 1e4, this.splitLargeFrames = !1, this.maxWebSocketChunkSize = 8 * 1024, this.forceBinaryWSFrames = !1, this.appendMissingNULLonIncoming = !1, this.discardWebsocketOnCommFailure = !1, this.state = q.INACTIVE;
|
515
515
|
const n = () => {
|
516
516
|
};
|
517
517
|
this.debug = n, this.beforeConnect = n, this.onConnect = n, this.onDisconnect = n, this.onUnhandledMessage = n, this.onUnhandledReceipt = n, this.onUnhandledFrame = n, this.onStompError = n, this.onWebSocketClose = n, this.onWebSocketError = n, this.logRawCommunication = !1, this.onChangeState = n, this.connectHeaders = {}, this._disconnectHeaders = {}, this.configure(e);
|
@@ -945,11 +945,11 @@ const he = (t, e) => {
|
|
945
945
|
viewBox: "0 0 32 32",
|
946
946
|
fill: "none",
|
947
947
|
xmlns: "http://www.w3.org/2000/svg"
|
948
|
-
}, ai = /* @__PURE__ */
|
948
|
+
}, ai = /* @__PURE__ */ E("path", {
|
949
949
|
d: "M16 31C24.2843 31 31 24.2843 31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31Z",
|
950
950
|
stroke: "#B3B3B3",
|
951
951
|
"stroke-miterlimit": "10"
|
952
|
-
}, null, -1), ci = /* @__PURE__ */
|
952
|
+
}, null, -1), ci = /* @__PURE__ */ E("path", {
|
953
953
|
d: "M19.78 22.3L15.98 16.63H15.9601L12.2001 22.3H11.0701L15.37 15.8899L11.25 9.69995H12.38L15.98 15.08H16L19.67 9.69995H20.8L16.55 15.82L20.92 22.3H19.77H19.78Z",
|
954
954
|
fill: "#B3B3B3"
|
955
955
|
}, null, -1), ui = [
|
@@ -957,19 +957,19 @@ const he = (t, e) => {
|
|
957
957
|
ci
|
958
958
|
];
|
959
959
|
function li(t, e) {
|
960
|
-
return
|
960
|
+
return W(), U("svg", oi, ui);
|
961
961
|
}
|
962
962
|
const di = /* @__PURE__ */ he(ii, [["render", li]]), hi = {}, fi = {
|
963
963
|
xmlns: "http://www.w3.org/2000/svg",
|
964
964
|
viewBox: "0 0 512 512"
|
965
|
-
}, mi = /* @__PURE__ */
|
965
|
+
}, mi = /* @__PURE__ */ E("path", {
|
966
966
|
fill: "#F28B0C",
|
967
967
|
d: "M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376V479.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"
|
968
968
|
}, null, -1), yi = [
|
969
969
|
mi
|
970
970
|
];
|
971
971
|
function pi(t, e) {
|
972
|
-
return
|
972
|
+
return W(), U("svg", fi, yi);
|
973
973
|
}
|
974
974
|
const gi = /* @__PURE__ */ he(hi, [["render", pi]]);
|
975
975
|
function ys(t, e) {
|
@@ -977,7 +977,7 @@ function ys(t, e) {
|
|
977
977
|
return t.apply(e, arguments);
|
978
978
|
};
|
979
979
|
}
|
980
|
-
const { toString: wi } = Object.prototype, { getPrototypeOf:
|
980
|
+
const { toString: wi } = Object.prototype, { getPrototypeOf: rn } = Object, gt = ((t) => (e) => {
|
981
981
|
const n = wi.call(e);
|
982
982
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
983
983
|
})(/* @__PURE__ */ Object.create(null)), te = (t) => (t = t.toLowerCase(), (e) => gt(e) === t), wt = (t) => (e) => typeof e === t, { isArray: Ie } = Array, He = wt("undefined");
|
@@ -992,7 +992,7 @@ function bi(t) {
|
|
992
992
|
const ki = wt("string"), Y = wt("function"), gs = wt("number"), St = (t) => t !== null && typeof t == "object", Ti = (t) => t === !0 || t === !1, ot = (t) => {
|
993
993
|
if (gt(t) !== "object")
|
994
994
|
return !1;
|
995
|
-
const e =
|
995
|
+
const e = rn(t);
|
996
996
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
997
997
|
}, _i = te("Date"), Oi = te("File"), Ei = te("Blob"), vi = te("FileList"), Ci = (t) => St(t) && Y(t.pipe), Ni = (t) => {
|
998
998
|
let e;
|
@@ -1046,7 +1046,7 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (r, i) => {
|
|
1046
1046
|
do {
|
1047
1047
|
for (r = Object.getOwnPropertyNames(t), i = r.length; i-- > 0; )
|
1048
1048
|
o = r[i], (!s || s(o, t, e)) && !a[o] && (e[o] = t[o], a[o] = !0);
|
1049
|
-
t = n !== !1 &&
|
1049
|
+
t = n !== !1 && rn(t);
|
1050
1050
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
1051
1051
|
return e;
|
1052
1052
|
}, Ri = (t, e, n) => {
|
@@ -1065,7 +1065,7 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (r, i) => {
|
|
1065
1065
|
for (; e-- > 0; )
|
1066
1066
|
n[e] = t[e];
|
1067
1067
|
return n;
|
1068
|
-
}, Li = ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" &&
|
1068
|
+
}, Li = ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rn(Uint8Array)), Wi = (t, e) => {
|
1069
1069
|
const s = (t && t[Symbol.iterator]).call(t);
|
1070
1070
|
let r;
|
1071
1071
|
for (; (r = s.next()) && !r.done; ) {
|
@@ -1083,7 +1083,7 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (r, i) => {
|
|
1083
1083
|
function(n, s, r) {
|
1084
1084
|
return s.toUpperCase() + r;
|
1085
1085
|
}
|
1086
|
-
),
|
1086
|
+
), _n = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Bi = te("RegExp"), ks = (t, e) => {
|
1087
1087
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
1088
1088
|
Pe(n, (r, i) => {
|
1089
1089
|
e(r, i, t) !== !1 && (s[i] = r);
|
@@ -1111,10 +1111,10 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (r, i) => {
|
|
1111
1111
|
};
|
1112
1112
|
return Ie(t) ? s(t) : s(String(t).split(e)), n;
|
1113
1113
|
}, Zi = () => {
|
1114
|
-
}, qi = (t, e) => (t = +t, Number.isFinite(t) ? t : e), xt = "abcdefghijklmnopqrstuvwxyz",
|
1115
|
-
DIGIT:
|
1114
|
+
}, qi = (t, e) => (t = +t, Number.isFinite(t) ? t : e), xt = "abcdefghijklmnopqrstuvwxyz", On = "0123456789", Ts = {
|
1115
|
+
DIGIT: On,
|
1116
1116
|
ALPHA: xt,
|
1117
|
-
ALPHA_DIGIT: xt + xt.toUpperCase() +
|
1117
|
+
ALPHA_DIGIT: xt + xt.toUpperCase() + On
|
1118
1118
|
}, ji = (t = 16, e = Ts.ALPHA_DIGIT) => {
|
1119
1119
|
let n = "";
|
1120
1120
|
const { length: s } = e;
|
@@ -1177,8 +1177,8 @@ const Yi = (t) => {
|
|
1177
1177
|
forEachEntry: Wi,
|
1178
1178
|
matchAll: Ui,
|
1179
1179
|
isHTMLForm: $i,
|
1180
|
-
hasOwnProperty:
|
1181
|
-
hasOwnProp:
|
1180
|
+
hasOwnProperty: _n,
|
1181
|
+
hasOwnProp: _n,
|
1182
1182
|
// an alias to avoid ESLint no-prototype-builtins detection
|
1183
1183
|
reduceDescriptors: ks,
|
1184
1184
|
freezeMethods: Pi,
|
@@ -1253,7 +1253,7 @@ function qt(t) {
|
|
1253
1253
|
function Es(t) {
|
1254
1254
|
return d.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
1255
1255
|
}
|
1256
|
-
function
|
1256
|
+
function En(t, e, n) {
|
1257
1257
|
return t ? t.concat(e).map(function(r, i) {
|
1258
1258
|
return r = Es(r), !n && i ? "[" + r + "]" : r;
|
1259
1259
|
}).join(n ? "." : "") : e;
|
@@ -1271,8 +1271,8 @@ function bt(t, e, n) {
|
|
1271
1271
|
metaTokens: !0,
|
1272
1272
|
dots: !1,
|
1273
1273
|
indexes: !1
|
1274
|
-
}, !1, function(g,
|
1275
|
-
return !d.isUndefined(
|
1274
|
+
}, !1, function(g, O) {
|
1275
|
+
return !d.isUndefined(O[g]);
|
1276
1276
|
});
|
1277
1277
|
const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(e);
|
1278
1278
|
if (!d.isFunction(r))
|
@@ -1286,21 +1286,21 @@ function bt(t, e, n) {
|
|
1286
1286
|
throw new k("Blob is not supported. Use a Buffer instead.");
|
1287
1287
|
return d.isArrayBuffer(f) || d.isTypedArray(f) ? c && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
1288
1288
|
}
|
1289
|
-
function l(f, g,
|
1289
|
+
function l(f, g, O) {
|
1290
1290
|
let C = f;
|
1291
|
-
if (f && !
|
1291
|
+
if (f && !O && typeof f == "object") {
|
1292
1292
|
if (d.endsWith(g, "{}"))
|
1293
1293
|
g = s ? g : g.slice(0, -2), f = JSON.stringify(f);
|
1294
1294
|
else if (d.isArray(f) && Xi(f) || (d.isFileList(f) || d.endsWith(g, "[]")) && (C = d.toArray(f)))
|
1295
1295
|
return g = Es(g), C.forEach(function(ne, I) {
|
1296
1296
|
!(d.isUndefined(ne) || ne === null) && e.append(
|
1297
1297
|
// eslint-disable-next-line no-nested-ternary
|
1298
|
-
o === !0 ?
|
1298
|
+
o === !0 ? En([g], I, i) : o === null ? g : g + "[]",
|
1299
1299
|
u(ne)
|
1300
1300
|
);
|
1301
1301
|
}), !1;
|
1302
1302
|
}
|
1303
|
-
return qt(f) ? !0 : (e.append(
|
1303
|
+
return qt(f) ? !0 : (e.append(En(O, g, i), u(f)), !1);
|
1304
1304
|
}
|
1305
1305
|
const h = [], p = Object.assign(eo, {
|
1306
1306
|
defaultVisitor: l,
|
@@ -1326,7 +1326,7 @@ function bt(t, e, n) {
|
|
1326
1326
|
throw new TypeError("data must be an object");
|
1327
1327
|
return m(t), e;
|
1328
1328
|
}
|
1329
|
-
function
|
1329
|
+
function vn(t) {
|
1330
1330
|
const e = {
|
1331
1331
|
"!": "%21",
|
1332
1332
|
"'": "%27",
|
@@ -1340,17 +1340,17 @@ function En(t) {
|
|
1340
1340
|
return e[s];
|
1341
1341
|
});
|
1342
1342
|
}
|
1343
|
-
function
|
1343
|
+
function on(t, e) {
|
1344
1344
|
this._pairs = [], t && bt(t, this, e);
|
1345
1345
|
}
|
1346
|
-
const vs =
|
1346
|
+
const vs = on.prototype;
|
1347
1347
|
vs.append = function(e, n) {
|
1348
1348
|
this._pairs.push([e, n]);
|
1349
1349
|
};
|
1350
1350
|
vs.toString = function(e) {
|
1351
1351
|
const n = e ? function(s) {
|
1352
|
-
return e.call(this, s,
|
1353
|
-
} :
|
1352
|
+
return e.call(this, s, vn);
|
1353
|
+
} : vn;
|
1354
1354
|
return this._pairs.map(function(r) {
|
1355
1355
|
return n(r[0]) + "=" + n(r[1]);
|
1356
1356
|
}, "").join("&");
|
@@ -1363,7 +1363,7 @@ function Cs(t, e, n) {
|
|
1363
1363
|
return t;
|
1364
1364
|
const s = n && n.encode || to, r = n && n.serialize;
|
1365
1365
|
let i;
|
1366
|
-
if (r ? i = r(e, n) : i = d.isURLSearchParams(e) ? e.toString() : new
|
1366
|
+
if (r ? i = r(e, n) : i = d.isURLSearchParams(e) ? e.toString() : new on(e, n).toString(s), i) {
|
1367
1367
|
const o = t.indexOf("#");
|
1368
1368
|
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
1369
1369
|
}
|
@@ -1423,11 +1423,11 @@ class no {
|
|
1423
1423
|
});
|
1424
1424
|
}
|
1425
1425
|
}
|
1426
|
-
const
|
1426
|
+
const Cn = no, Ns = {
|
1427
1427
|
silentJSONParsing: !0,
|
1428
1428
|
forcedJSONParsing: !0,
|
1429
1429
|
clarifyTimeoutError: !1
|
1430
|
-
}, so = typeof URLSearchParams < "u" ? URLSearchParams :
|
1430
|
+
}, so = typeof URLSearchParams < "u" ? URLSearchParams : on, ro = typeof FormData < "u" ? FormData : null, io = typeof Blob < "u" ? Blob : null, oo = (() => {
|
1431
1431
|
let t;
|
1432
1432
|
return typeof navigator < "u" && ((t = navigator.product) === "ReactNative" || t === "NativeScript" || t === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
1433
1433
|
})(), ao = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
@@ -1557,7 +1557,7 @@ d.forEach(["delete", "get", "head"], function(e) {
|
|
1557
1557
|
d.forEach(["post", "put", "patch"], function(e) {
|
1558
1558
|
kt.headers[e] = d.merge(ho);
|
1559
1559
|
});
|
1560
|
-
const
|
1560
|
+
const an = kt, mo = d.toObjectSet([
|
1561
1561
|
"age",
|
1562
1562
|
"authorization",
|
1563
1563
|
"content-length",
|
@@ -1582,7 +1582,7 @@ const on = kt, mo = d.toObjectSet([
|
|
1582
1582
|
`).forEach(function(o) {
|
1583
1583
|
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || e[n] && mo[n]) && (n === "set-cookie" ? e[n] ? e[n].push(s) : e[n] = [s] : e[n] = e[n] ? e[n] + ", " + s : s);
|
1584
1584
|
}), e;
|
1585
|
-
},
|
1585
|
+
}, Nn = Symbol("internals");
|
1586
1586
|
function Fe(t) {
|
1587
1587
|
return t && String(t).trim().toLowerCase();
|
1588
1588
|
}
|
@@ -1720,7 +1720,7 @@ class Tt {
|
|
1720
1720
|
return n.forEach((r) => s.set(r)), s;
|
1721
1721
|
}
|
1722
1722
|
static accessor(e) {
|
1723
|
-
const s = (this[
|
1723
|
+
const s = (this[Nn] = this[Nn] = {
|
1724
1724
|
accessors: {}
|
1725
1725
|
}).accessors, r = this.prototype;
|
1726
1726
|
function i(o) {
|
@@ -1735,7 +1735,7 @@ d.freezeMethods(Tt.prototype);
|
|
1735
1735
|
d.freezeMethods(Tt);
|
1736
1736
|
const re = Tt;
|
1737
1737
|
function Mt(t, e) {
|
1738
|
-
const n = this ||
|
1738
|
+
const n = this || an, s = e || n, r = re.from(s.headers);
|
1739
1739
|
let i = s.data;
|
1740
1740
|
return d.forEach(t, function(a) {
|
1741
1741
|
i = a.call(n, i, r.normalize(), e ? e.status : void 0);
|
@@ -1852,7 +1852,7 @@ function vo(t, e) {
|
|
1852
1852
|
return m ? Math.round(p * 1e3 / m) : void 0;
|
1853
1853
|
};
|
1854
1854
|
}
|
1855
|
-
function
|
1855
|
+
function In(t, e) {
|
1856
1856
|
let n = 0;
|
1857
1857
|
const s = vo(50, 250);
|
1858
1858
|
return (r) => {
|
@@ -1926,7 +1926,7 @@ const Co = typeof XMLHttpRequest < "u", No = Co && function(t) {
|
|
1926
1926
|
}
|
1927
1927
|
r === void 0 && i.setContentType(null), "setRequestHeader" in u && d.forEach(i.toJSON(), function(f, g) {
|
1928
1928
|
u.setRequestHeader(g, f);
|
1929
|
-
}), d.isUndefined(t.withCredentials) || (u.withCredentials = !!t.withCredentials), o && o !== "json" && (u.responseType = t.responseType), typeof t.onDownloadProgress == "function" && u.addEventListener("progress",
|
1929
|
+
}), d.isUndefined(t.withCredentials) || (u.withCredentials = !!t.withCredentials), o && o !== "json" && (u.responseType = t.responseType), typeof t.onDownloadProgress == "function" && u.addEventListener("progress", In(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", In(t.onUploadProgress)), (t.cancelToken || t.signal) && (a = (m) => {
|
1930
1930
|
u && (s(!m || m.type ? new ze(null, t, u) : m), u.abort(), u = null);
|
1931
1931
|
}, t.cancelToken && t.cancelToken.subscribe(a), t.signal && (t.signal.aborted ? a() : t.signal.addEventListener("abort", a)));
|
1932
1932
|
const p = Eo(l);
|
@@ -1973,11 +1973,11 @@ function At(t) {
|
|
1973
1973
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
1974
1974
|
throw new ze(null, t);
|
1975
1975
|
}
|
1976
|
-
function
|
1976
|
+
function xn(t) {
|
1977
1977
|
return At(t), t.headers = re.from(t.headers), t.data = Mt.call(
|
1978
1978
|
t,
|
1979
1979
|
t.transformRequest
|
1980
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Io.getAdapter(t.adapter ||
|
1980
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Io.getAdapter(t.adapter || an.adapter)(t).then(function(s) {
|
1981
1981
|
return At(t), s.data = Mt.call(
|
1982
1982
|
t,
|
1983
1983
|
t.transformResponse,
|
@@ -1991,7 +1991,7 @@ function In(t) {
|
|
1991
1991
|
), s.response.headers = re.from(s.response.headers))), Promise.reject(s);
|
1992
1992
|
});
|
1993
1993
|
}
|
1994
|
-
const
|
1994
|
+
const Dn = (t) => t instanceof re ? t.toJSON() : t;
|
1995
1995
|
function Ce(t, e) {
|
1996
1996
|
e = e || {};
|
1997
1997
|
const n = {};
|
@@ -2050,21 +2050,21 @@ function Ce(t, e) {
|
|
2050
2050
|
socketPath: o,
|
2051
2051
|
responseEncoding: o,
|
2052
2052
|
validateStatus: a,
|
2053
|
-
headers: (u, l) => r(
|
2053
|
+
headers: (u, l) => r(Dn(u), Dn(l), !0)
|
2054
2054
|
};
|
2055
2055
|
return d.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
2056
2056
|
const h = c[l] || r, p = h(t[l], e[l], l);
|
2057
2057
|
d.isUndefined(p) && h !== a || (n[l] = p);
|
2058
2058
|
}), n;
|
2059
2059
|
}
|
2060
|
-
const Ms = "1.4.0",
|
2060
|
+
const Ms = "1.4.0", cn = {};
|
2061
2061
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
2062
|
-
|
2062
|
+
cn[t] = function(s) {
|
2063
2063
|
return typeof s === t || "a" + (e < 1 ? "n " : " ") + t;
|
2064
2064
|
};
|
2065
2065
|
});
|
2066
|
-
const
|
2067
|
-
|
2066
|
+
const Mn = {};
|
2067
|
+
cn.transitional = function(e, n, s) {
|
2068
2068
|
function r(i, o) {
|
2069
2069
|
return "[Axios v" + Ms + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
2070
2070
|
}
|
@@ -2074,7 +2074,7 @@ an.transitional = function(e, n, s) {
|
|
2074
2074
|
r(o, " has been removed" + (n ? " in " + n : "")),
|
2075
2075
|
k.ERR_DEPRECATED
|
2076
2076
|
);
|
2077
|
-
return n && !
|
2077
|
+
return n && !Mn[o] && (Mn[o] = !0, console.warn(
|
2078
2078
|
r(
|
2079
2079
|
o,
|
2080
2080
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
@@ -2101,13 +2101,13 @@ function xo(t, e, n) {
|
|
2101
2101
|
}
|
2102
2102
|
const jt = {
|
2103
2103
|
assertOptions: xo,
|
2104
|
-
validators:
|
2104
|
+
validators: cn
|
2105
2105
|
}, oe = jt.validators;
|
2106
2106
|
class ht {
|
2107
2107
|
constructor(e) {
|
2108
2108
|
this.defaults = e, this.interceptors = {
|
2109
|
-
request: new
|
2110
|
-
response: new
|
2109
|
+
request: new Cn(),
|
2110
|
+
response: new Cn()
|
2111
2111
|
};
|
2112
2112
|
}
|
2113
2113
|
/**
|
@@ -2152,7 +2152,7 @@ class ht {
|
|
2152
2152
|
});
|
2153
2153
|
let l, h = 0, p;
|
2154
2154
|
if (!c) {
|
2155
|
-
const f = [
|
2155
|
+
const f = [xn.bind(this), void 0];
|
2156
2156
|
for (f.unshift.apply(f, a), f.push.apply(f, u), p = f.length, l = Promise.resolve(n); h < p; )
|
2157
2157
|
l = l.then(f[h++], f[h++]);
|
2158
2158
|
return l;
|
@@ -2163,13 +2163,13 @@ class ht {
|
|
2163
2163
|
const f = a[h++], g = a[h++];
|
2164
2164
|
try {
|
2165
2165
|
m = f(m);
|
2166
|
-
} catch (
|
2167
|
-
g.call(this,
|
2166
|
+
} catch (O) {
|
2167
|
+
g.call(this, O);
|
2168
2168
|
break;
|
2169
2169
|
}
|
2170
2170
|
}
|
2171
2171
|
try {
|
2172
|
-
l =
|
2172
|
+
l = xn.call(this, m);
|
2173
2173
|
} catch (f) {
|
2174
2174
|
return Promise.reject(f);
|
2175
2175
|
}
|
@@ -2208,7 +2208,7 @@ d.forEach(["post", "put", "patch"], function(e) {
|
|
2208
2208
|
ht.prototype[e] = n(), ht.prototype[e + "Form"] = n(!0);
|
2209
2209
|
});
|
2210
2210
|
const ut = ht;
|
2211
|
-
class
|
2211
|
+
class un {
|
2212
2212
|
constructor(e) {
|
2213
2213
|
if (typeof e != "function")
|
2214
2214
|
throw new TypeError("executor must be a function.");
|
@@ -2269,14 +2269,14 @@ class cn {
|
|
2269
2269
|
static source() {
|
2270
2270
|
let e;
|
2271
2271
|
return {
|
2272
|
-
token: new
|
2272
|
+
token: new un(function(r) {
|
2273
2273
|
e = r;
|
2274
2274
|
}),
|
2275
2275
|
cancel: e
|
2276
2276
|
};
|
2277
2277
|
}
|
2278
2278
|
}
|
2279
|
-
const Do =
|
2279
|
+
const Do = un;
|
2280
2280
|
function Mo(t) {
|
2281
2281
|
return function(n) {
|
2282
2282
|
return t.apply(null, n);
|
@@ -2360,7 +2360,7 @@ function As(t) {
|
|
2360
2360
|
return As(Ce(t, r));
|
2361
2361
|
}, n;
|
2362
2362
|
}
|
2363
|
-
const F = As(
|
2363
|
+
const F = As(an);
|
2364
2364
|
F.Axios = ut;
|
2365
2365
|
F.CanceledError = ze;
|
2366
2366
|
F.CancelToken = Do;
|
@@ -2412,13 +2412,13 @@ const Ro = F, _t = async function(t) {
|
|
2412
2412
|
token: e
|
2413
2413
|
}).then((s) => s).catch((s) => {
|
2414
2414
|
console.error(s);
|
2415
|
-
}),
|
2415
|
+
}), An = async (t) => _t({
|
2416
2416
|
url: "/v1/app-chats/web-chat",
|
2417
2417
|
method: "GET",
|
2418
2418
|
token: t
|
2419
2419
|
}).then((n) => n).catch((n) => {
|
2420
2420
|
console.error(n);
|
2421
|
-
}),
|
2421
|
+
}), Fn = async (t, e) => {
|
2422
2422
|
const n = {
|
2423
2423
|
totalNoVistosCliente: 0,
|
2424
2424
|
esCliente: !1
|
@@ -2436,7 +2436,7 @@ function Wo(t) {
|
|
2436
2436
|
return Rr() ? (Vr(t), !0) : !1;
|
2437
2437
|
}
|
2438
2438
|
function Fs(t) {
|
2439
|
-
return typeof t == "function" ? t() :
|
2439
|
+
return typeof t == "function" ? t() : ds(t);
|
2440
2440
|
}
|
2441
2441
|
const Uo = typeof window < "u" && typeof document < "u";
|
2442
2442
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
@@ -2449,14 +2449,14 @@ function Rt(t) {
|
|
2449
2449
|
}
|
2450
2450
|
const Ho = Uo ? window : void 0;
|
2451
2451
|
function Bo() {
|
2452
|
-
const t =
|
2453
|
-
return e &&
|
2452
|
+
const t = B(!1), e = Lr();
|
2453
|
+
return e && fs(() => {
|
2454
2454
|
t.value = !0;
|
2455
2455
|
}, e), t;
|
2456
2456
|
}
|
2457
2457
|
function Po(t) {
|
2458
2458
|
const e = Bo();
|
2459
|
-
return
|
2459
|
+
return hs(() => (e.value, !!t()));
|
2460
2460
|
}
|
2461
2461
|
function zo(t, e, n = {}) {
|
2462
2462
|
const {
|
@@ -2465,17 +2465,17 @@ function zo(t, e, n = {}) {
|
|
2465
2465
|
threshold: i = 0.1,
|
2466
2466
|
window: o = Ho,
|
2467
2467
|
immediate: a = !0
|
2468
|
-
} = n, c = Po(() => o && "IntersectionObserver" in o), u =
|
2468
|
+
} = n, c = Po(() => o && "IntersectionObserver" in o), u = hs(() => {
|
2469
2469
|
const f = Fs(t);
|
2470
2470
|
return (Array.isArray(f) ? f : [f]).map(Rt).filter($o);
|
2471
2471
|
});
|
2472
2472
|
let l = Ft;
|
2473
|
-
const h =
|
2473
|
+
const h = B(a), p = c.value ? tn(
|
2474
2474
|
() => [u.value, Rt(s), h.value],
|
2475
2475
|
([f, g]) => {
|
2476
2476
|
if (l(), !h.value || !f.length)
|
2477
2477
|
return;
|
2478
|
-
const
|
2478
|
+
const O = new IntersectionObserver(
|
2479
2479
|
e,
|
2480
2480
|
{
|
2481
2481
|
root: Rt(g),
|
@@ -2483,8 +2483,8 @@ function zo(t, e, n = {}) {
|
|
2483
2483
|
threshold: i
|
2484
2484
|
}
|
2485
2485
|
);
|
2486
|
-
f.forEach((C) => C &&
|
2487
|
-
|
2486
|
+
f.forEach((C) => C && O.observe(C)), l = () => {
|
2487
|
+
O.disconnect(), l = Ft;
|
2488
2488
|
};
|
2489
2489
|
},
|
2490
2490
|
{ immediate: a, flush: "post" }
|
@@ -2527,7 +2527,7 @@ class Rs extends be {
|
|
2527
2527
|
super(`Invalid unit ${e}`);
|
2528
2528
|
}
|
2529
2529
|
}
|
2530
|
-
class
|
2530
|
+
class P extends be {
|
2531
2531
|
}
|
2532
2532
|
class ae extends be {
|
2533
2533
|
constructor() {
|
@@ -2912,11 +2912,11 @@ class ie extends Ze {
|
|
2912
2912
|
return this.valid;
|
2913
2913
|
}
|
2914
2914
|
}
|
2915
|
-
let
|
2915
|
+
let Rn = {};
|
2916
2916
|
function ea(t, e = {}) {
|
2917
2917
|
const n = JSON.stringify([t, e]);
|
2918
|
-
let s =
|
2919
|
-
return s || (s = new Intl.ListFormat(t, e),
|
2918
|
+
let s = Rn[n];
|
2919
|
+
return s || (s = new Intl.ListFormat(t, e), Rn[n] = s), s;
|
2920
2920
|
}
|
2921
2921
|
let Yt = {};
|
2922
2922
|
function Jt(t, e = {}) {
|
@@ -2940,12 +2940,12 @@ let We = null;
|
|
2940
2940
|
function sa() {
|
2941
2941
|
return We || (We = new Intl.DateTimeFormat().resolvedOptions().locale, We);
|
2942
2942
|
}
|
2943
|
-
let
|
2943
|
+
let Vn = {};
|
2944
2944
|
function ra(t) {
|
2945
|
-
let e =
|
2945
|
+
let e = Vn[t];
|
2946
2946
|
if (!e) {
|
2947
2947
|
const n = new Intl.Locale(t);
|
2948
|
-
e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo,
|
2948
|
+
e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo, Vn[t] = e;
|
2949
2949
|
}
|
2950
2950
|
return e;
|
2951
2951
|
}
|
@@ -3007,7 +3007,7 @@ class la {
|
|
3007
3007
|
const n = this.floor ? Math.floor(e) : e;
|
3008
3008
|
return this.inf.format(n);
|
3009
3009
|
} else {
|
3010
|
-
const n = this.floor ? Math.floor(e) :
|
3010
|
+
const n = this.floor ? Math.floor(e) : fn(e, 3);
|
3011
3011
|
return M(n, this.padTo);
|
3012
3012
|
}
|
3013
3013
|
}
|
@@ -3185,13 +3185,13 @@ class v {
|
|
3185
3185
|
}
|
3186
3186
|
}
|
3187
3187
|
let Lt = null;
|
3188
|
-
class
|
3188
|
+
class H extends Ze {
|
3189
3189
|
/**
|
3190
3190
|
* Get a singleton instance of UTC
|
3191
3191
|
* @return {FixedOffsetZone}
|
3192
3192
|
*/
|
3193
3193
|
static get utcInstance() {
|
3194
|
-
return Lt === null && (Lt = new
|
3194
|
+
return Lt === null && (Lt = new H(0)), Lt;
|
3195
3195
|
}
|
3196
3196
|
/**
|
3197
3197
|
* Get an instance with a specified offset
|
@@ -3199,7 +3199,7 @@ class U extends Ze {
|
|
3199
3199
|
* @return {FixedOffsetZone}
|
3200
3200
|
*/
|
3201
3201
|
static instance(e) {
|
3202
|
-
return e === 0 ?
|
3202
|
+
return e === 0 ? H.utcInstance : new H(e);
|
3203
3203
|
}
|
3204
3204
|
/**
|
3205
3205
|
* Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
|
@@ -3213,7 +3213,7 @@ class U extends Ze {
|
|
3213
3213
|
if (e) {
|
3214
3214
|
const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
3215
3215
|
if (n)
|
3216
|
-
return new
|
3216
|
+
return new H(Ct(n[1], n[2]));
|
3217
3217
|
}
|
3218
3218
|
return null;
|
3219
3219
|
}
|
@@ -3300,18 +3300,18 @@ function de(t, e) {
|
|
3300
3300
|
return t;
|
3301
3301
|
if (ga(t)) {
|
3302
3302
|
const n = t.toLowerCase();
|
3303
|
-
return n === "default" ? e : n === "local" || n === "system" ? Ot.instance : n === "utc" || n === "gmt" ?
|
3303
|
+
return n === "default" ? e : n === "local" || n === "system" ? Ot.instance : n === "utc" || n === "gmt" ? H.utcInstance : H.parseSpecifier(n) || ie.create(t);
|
3304
3304
|
} else
|
3305
|
-
return Se(t) ?
|
3305
|
+
return Se(t) ? H.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new ma(t);
|
3306
3306
|
}
|
3307
|
-
let
|
3307
|
+
let Ln = () => Date.now(), Wn = "system", Un = null, $n = null, Hn = null, Bn = 60, Pn, zn = null;
|
3308
3308
|
class x {
|
3309
3309
|
/**
|
3310
3310
|
* Get the callback for returning the current timestamp.
|
3311
3311
|
* @type {function}
|
3312
3312
|
*/
|
3313
3313
|
static get now() {
|
3314
|
-
return
|
3314
|
+
return Ln;
|
3315
3315
|
}
|
3316
3316
|
/**
|
3317
3317
|
* Set the callback for returning the current timestamp.
|
@@ -3321,7 +3321,7 @@ class x {
|
|
3321
3321
|
* @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
|
3322
3322
|
*/
|
3323
3323
|
static set now(e) {
|
3324
|
-
|
3324
|
+
Ln = e;
|
3325
3325
|
}
|
3326
3326
|
/**
|
3327
3327
|
* Set the default time zone to create DateTimes in. Does not affect existing instances.
|
@@ -3329,7 +3329,7 @@ class x {
|
|
3329
3329
|
* @type {string}
|
3330
3330
|
*/
|
3331
3331
|
static set defaultZone(e) {
|
3332
|
-
|
3332
|
+
Wn = e;
|
3333
3333
|
}
|
3334
3334
|
/**
|
3335
3335
|
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
|
@@ -3337,49 +3337,49 @@ class x {
|
|
3337
3337
|
* @type {Zone}
|
3338
3338
|
*/
|
3339
3339
|
static get defaultZone() {
|
3340
|
-
return de(
|
3340
|
+
return de(Wn, Ot.instance);
|
3341
3341
|
}
|
3342
3342
|
/**
|
3343
3343
|
* Get the default locale to create DateTimes with. Does not affect existing instances.
|
3344
3344
|
* @type {string}
|
3345
3345
|
*/
|
3346
3346
|
static get defaultLocale() {
|
3347
|
-
return
|
3347
|
+
return Un;
|
3348
3348
|
}
|
3349
3349
|
/**
|
3350
3350
|
* Set the default locale to create DateTimes with. Does not affect existing instances.
|
3351
3351
|
* @type {string}
|
3352
3352
|
*/
|
3353
3353
|
static set defaultLocale(e) {
|
3354
|
-
|
3354
|
+
Un = e;
|
3355
3355
|
}
|
3356
3356
|
/**
|
3357
3357
|
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
|
3358
3358
|
* @type {string}
|
3359
3359
|
*/
|
3360
3360
|
static get defaultNumberingSystem() {
|
3361
|
-
return
|
3361
|
+
return $n;
|
3362
3362
|
}
|
3363
3363
|
/**
|
3364
3364
|
* Set the default numbering system to create DateTimes with. Does not affect existing instances.
|
3365
3365
|
* @type {string}
|
3366
3366
|
*/
|
3367
3367
|
static set defaultNumberingSystem(e) {
|
3368
|
-
|
3368
|
+
$n = e;
|
3369
3369
|
}
|
3370
3370
|
/**
|
3371
3371
|
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
|
3372
3372
|
* @type {string}
|
3373
3373
|
*/
|
3374
3374
|
static get defaultOutputCalendar() {
|
3375
|
-
return
|
3375
|
+
return Hn;
|
3376
3376
|
}
|
3377
3377
|
/**
|
3378
3378
|
* Set the default output calendar to create DateTimes with. Does not affect existing instances.
|
3379
3379
|
* @type {string}
|
3380
3380
|
*/
|
3381
3381
|
static set defaultOutputCalendar(e) {
|
3382
|
-
|
3382
|
+
Hn = e;
|
3383
3383
|
}
|
3384
3384
|
/**
|
3385
3385
|
* @typedef {Object} WeekSettings
|
@@ -3391,7 +3391,7 @@ class x {
|
|
3391
3391
|
* @return {WeekSettings|null}
|
3392
3392
|
*/
|
3393
3393
|
static get defaultWeekSettings() {
|
3394
|
-
return
|
3394
|
+
return zn;
|
3395
3395
|
}
|
3396
3396
|
/**
|
3397
3397
|
* Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
|
@@ -3401,14 +3401,14 @@ class x {
|
|
3401
3401
|
* @param {WeekSettings|null} weekSettings
|
3402
3402
|
*/
|
3403
3403
|
static set defaultWeekSettings(e) {
|
3404
|
-
|
3404
|
+
zn = Xt(e);
|
3405
3405
|
}
|
3406
3406
|
/**
|
3407
3407
|
* Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
|
3408
3408
|
* @type {number}
|
3409
3409
|
*/
|
3410
3410
|
static get twoDigitCutoffYear() {
|
3411
|
-
return
|
3411
|
+
return Bn;
|
3412
3412
|
}
|
3413
3413
|
/**
|
3414
3414
|
* Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
|
@@ -3419,21 +3419,21 @@ class x {
|
|
3419
3419
|
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
|
3420
3420
|
*/
|
3421
3421
|
static set twoDigitCutoffYear(e) {
|
3422
|
-
|
3422
|
+
Bn = e % 100;
|
3423
3423
|
}
|
3424
3424
|
/**
|
3425
3425
|
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
3426
3426
|
* @type {boolean}
|
3427
3427
|
*/
|
3428
3428
|
static get throwOnInvalid() {
|
3429
|
-
return
|
3429
|
+
return Pn;
|
3430
3430
|
}
|
3431
3431
|
/**
|
3432
3432
|
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
3433
3433
|
* @type {boolean}
|
3434
3434
|
*/
|
3435
3435
|
static set throwOnInvalid(e) {
|
3436
|
-
|
3436
|
+
Pn = e;
|
3437
3437
|
}
|
3438
3438
|
/**
|
3439
3439
|
* Reset Luxon's global caches. Should only be necessary in testing scenarios.
|
@@ -3458,7 +3458,7 @@ function j(t, e) {
|
|
3458
3458
|
`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
|
3459
3459
|
);
|
3460
3460
|
}
|
3461
|
-
function
|
3461
|
+
function ln(t, e, n) {
|
3462
3462
|
const s = new Date(Date.UTC(t, e - 1, n));
|
3463
3463
|
t < 100 && t >= 0 && s.setUTCFullYear(s.getUTCFullYear() - 1900);
|
3464
3464
|
const r = s.getUTCDay();
|
@@ -3471,16 +3471,16 @@ function rr(t, e) {
|
|
3471
3471
|
const n = qe(t) ? nr : tr, s = n.findIndex((i) => i < e), r = e - n[s];
|
3472
3472
|
return { month: s + 1, day: r };
|
3473
3473
|
}
|
3474
|
-
function
|
3474
|
+
function dn(t, e) {
|
3475
3475
|
return (t - e + 7) % 7 + 1;
|
3476
3476
|
}
|
3477
3477
|
function mt(t, e = 4, n = 1) {
|
3478
|
-
const { year: s, month: r, day: i } = t, o = sr(s, r, i), a = ln(
|
3478
|
+
const { year: s, month: r, day: i } = t, o = sr(s, r, i), a = dn(ln(s, r, i), n);
|
3479
3479
|
let c = Math.floor((o - a + 14 - e) / 7), u;
|
3480
3480
|
return c < 1 ? (u = s - 1, c = Be(u, e, n)) : c > Be(s, e, n) ? (u = s + 1, c = 1) : u = s, { weekYear: u, weekNumber: c, weekday: a, ...Nt(t) };
|
3481
3481
|
}
|
3482
|
-
function
|
3483
|
-
const { weekYear: s, weekNumber: r, weekday: i } = t, o = ln(
|
3482
|
+
function Zn(t, e = 4, n = 1) {
|
3483
|
+
const { weekYear: s, weekNumber: r, weekday: i } = t, o = dn(ln(s, 1, e), n), a = Ee(s);
|
3484
3484
|
let c = r * 7 + i - o - 7 + e, u;
|
3485
3485
|
c < 1 ? (u = s - 1, c += Ee(u)) : c > a ? (u = s + 1, c -= Ee(s)) : u = s;
|
3486
3486
|
const { month: l, day: h } = rr(u, c);
|
@@ -3490,11 +3490,11 @@ function Wt(t) {
|
|
3490
3490
|
const { year: e, month: n, day: s } = t, r = sr(e, n, s);
|
3491
3491
|
return { year: e, ordinal: r, ...Nt(t) };
|
3492
3492
|
}
|
3493
|
-
function
|
3493
|
+
function qn(t) {
|
3494
3494
|
const { year: e, ordinal: n } = t, { month: s, day: r } = rr(e, n);
|
3495
3495
|
return { year: e, month: s, day: r, ...Nt(t) };
|
3496
3496
|
}
|
3497
|
-
function
|
3497
|
+
function jn(t, e) {
|
3498
3498
|
if (!w(t.localWeekday) || !w(t.localWeekNumber) || !w(t.localWeekYear)) {
|
3499
3499
|
if (!w(t.weekday) || !w(t.weekNumber) || !w(t.weekYear))
|
3500
3500
|
throw new Oe(
|
@@ -3559,7 +3559,7 @@ function cr() {
|
|
3559
3559
|
function Sa(t) {
|
3560
3560
|
return Array.isArray(t) ? t : [t];
|
3561
3561
|
}
|
3562
|
-
function
|
3562
|
+
function Gn(t, e, n) {
|
3563
3563
|
if (t.length !== 0)
|
3564
3564
|
return t.reduce((s, r) => {
|
3565
3565
|
const i = [e(r), r];
|
@@ -3576,9 +3576,9 @@ function Xt(t) {
|
|
3576
3576
|
if (t == null)
|
3577
3577
|
return null;
|
3578
3578
|
if (typeof t != "object")
|
3579
|
-
throw new
|
3579
|
+
throw new P("Week settings must be an object");
|
3580
3580
|
if (!G(t.firstDay, 1, 7) || !G(t.minimalDays, 1, 7) || !Array.isArray(t.weekend) || t.weekend.some((e) => !G(e, 1, 7)))
|
3581
|
-
throw new
|
3581
|
+
throw new P("Invalid week settings");
|
3582
3582
|
return {
|
3583
3583
|
firstDay: t.firstDay,
|
3584
3584
|
minimalDays: t.minimalDays,
|
@@ -3604,13 +3604,13 @@ function ye(t) {
|
|
3604
3604
|
if (!(w(t) || t === null || t === ""))
|
3605
3605
|
return parseFloat(t);
|
3606
3606
|
}
|
3607
|
-
function
|
3607
|
+
function hn(t) {
|
3608
3608
|
if (!(w(t) || t === null || t === "")) {
|
3609
3609
|
const e = parseFloat("0." + t) * 1e3;
|
3610
3610
|
return Math.floor(e);
|
3611
3611
|
}
|
3612
3612
|
}
|
3613
|
-
function
|
3613
|
+
function fn(t, e, n = !1) {
|
3614
3614
|
const s = 10 ** e;
|
3615
3615
|
return (n ? Math.trunc : Math.round)(t * s) / s;
|
3616
3616
|
}
|
@@ -3636,11 +3636,11 @@ function vt(t) {
|
|
3636
3636
|
);
|
3637
3637
|
return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
|
3638
3638
|
}
|
3639
|
-
function
|
3640
|
-
return -ln(
|
3639
|
+
function Yn(t, e, n) {
|
3640
|
+
return -dn(ln(t, 1, e), n) + e - 1;
|
3641
3641
|
}
|
3642
3642
|
function Be(t, e = 4, n = 1) {
|
3643
|
-
const s =
|
3643
|
+
const s = Yn(t, e, n), r = Yn(t + 1, e, n);
|
3644
3644
|
return (Ee(t) - s + r) / 7;
|
3645
3645
|
}
|
3646
3646
|
function en(t) {
|
@@ -3668,7 +3668,7 @@ function Ct(t, e) {
|
|
3668
3668
|
function lr(t) {
|
3669
3669
|
const e = Number(t);
|
3670
3670
|
if (typeof t == "boolean" || t === "" || Number.isNaN(e))
|
3671
|
-
throw new
|
3671
|
+
throw new P(`Invalid unit value ${t}`);
|
3672
3672
|
return e;
|
3673
3673
|
}
|
3674
3674
|
function pt(t, e) {
|
@@ -3814,7 +3814,7 @@ function Ma(t, e, n = "always", s = !1) {
|
|
3814
3814
|
const o = Object.is(e, -0) || e < 0, a = Math.abs(e), c = a === 1, u = r[t], l = s ? c ? u[1] : u[2] || u[1] : c ? r[t][0] : t;
|
3815
3815
|
return o ? `${a} ${l} ago` : `in ${a} ${l}`;
|
3816
3816
|
}
|
3817
|
-
function
|
3817
|
+
function Jn(t, e) {
|
3818
3818
|
let n = "";
|
3819
3819
|
for (const s of t)
|
3820
3820
|
s.literal ? n += s.val : n += e(s.val);
|
@@ -4019,7 +4019,7 @@ class L {
|
|
4019
4019
|
return l(m);
|
4020
4020
|
}
|
4021
4021
|
};
|
4022
|
-
return
|
4022
|
+
return Jn(L.parseFormat(n), p);
|
4023
4023
|
}
|
4024
4024
|
formatDurationFromString(e, n) {
|
4025
4025
|
const s = (c) => {
|
@@ -4050,7 +4050,7 @@ class L {
|
|
4050
4050
|
(c, { literal: u, val: l }) => u ? c : c.concat(l),
|
4051
4051
|
[]
|
4052
4052
|
), a = e.shiftTo(...o.map(s).filter((c) => c));
|
4053
|
-
return
|
4053
|
+
return Jn(i, r(a));
|
4054
4054
|
}
|
4055
4055
|
}
|
4056
4056
|
const wr = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
@@ -4086,8 +4086,8 @@ function Sr(...t) {
|
|
4086
4086
|
return [s, null, n + r];
|
4087
4087
|
};
|
4088
4088
|
}
|
4089
|
-
const br = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Fa = `(?:${br.source}?(?:\\[(${wr.source})\\])?)?`,
|
4090
|
-
`${
|
4089
|
+
const br = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Fa = `(?:${br.source}?(?:\\[(${wr.source})\\])?)?`, mn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, kr = RegExp(`${mn.source}${Fa}`), yn = RegExp(`(?:T${kr.source})?`), Ra = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Va = /(\d{4})-?W(\d\d)(?:-?(\d))?/, La = /(\d{4})-?(\d{3})/, Wa = Sr("weekYear", "weekNumber", "weekDay"), Ua = Sr("year", "ordinal"), $a = /(\d{4})-(\d\d)-(\d\d)/, Tr = RegExp(
|
4090
|
+
`${mn.source} ?(?:${br.source}|(${wr.source}))?`
|
4091
4091
|
), Ha = RegExp(`(?: ${Tr.source})?`);
|
4092
4092
|
function ve(t, e, n) {
|
4093
4093
|
const s = t[e];
|
@@ -4105,18 +4105,18 @@ function Ae(t, e) {
|
|
4105
4105
|
hours: ve(t, e, 0),
|
4106
4106
|
minutes: ve(t, e + 1, 0),
|
4107
4107
|
seconds: ve(t, e + 2, 0),
|
4108
|
-
milliseconds:
|
4108
|
+
milliseconds: hn(t[e + 3])
|
4109
4109
|
}, null, e + 4];
|
4110
4110
|
}
|
4111
4111
|
function je(t, e) {
|
4112
|
-
const n = !t[e] && !t[e + 1], s = Ct(t[e + 1], t[e + 2]), r = n ? null :
|
4112
|
+
const n = !t[e] && !t[e + 1], s = Ct(t[e + 1], t[e + 2]), r = n ? null : H.instance(s);
|
4113
4113
|
return [{}, r, e + 3];
|
4114
4114
|
}
|
4115
4115
|
function Ge(t, e) {
|
4116
4116
|
const n = t[e] ? ie.create(t[e]) : null;
|
4117
4117
|
return [{}, n, e + 1];
|
4118
4118
|
}
|
4119
|
-
const Pa = RegExp(`^T?${
|
4119
|
+
const Pa = RegExp(`^T?${mn.source}$`), za = /^-?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)?)?)$/;
|
4120
4120
|
function Za(t) {
|
4121
4121
|
const [e, n, s, r, i, o, a, c, u] = t, l = e[0] === "-", h = c && c[0] === "-", p = (m, f = !1) => m !== void 0 && (f || m && l) ? -m : m;
|
4122
4122
|
return [
|
@@ -4128,7 +4128,7 @@ function Za(t) {
|
|
4128
4128
|
hours: p(ye(o)),
|
4129
4129
|
minutes: p(ye(a)),
|
4130
4130
|
seconds: p(ye(c), c === "-0"),
|
4131
|
-
milliseconds: p(
|
4131
|
+
milliseconds: p(hn(u), h)
|
4132
4132
|
}
|
4133
4133
|
];
|
4134
4134
|
}
|
@@ -4143,7 +4143,7 @@ const qa = {
|
|
4143
4143
|
PDT: -7 * 60,
|
4144
4144
|
PST: -8 * 60
|
4145
4145
|
};
|
4146
|
-
function
|
4146
|
+
function pn(t, e, n, s, r, i, o) {
|
4147
4147
|
const a = {
|
4148
4148
|
year: e.length === 2 ? en(ue(e)) : ue(e),
|
4149
4149
|
month: dr.indexOf(n) + 1,
|
@@ -4168,23 +4168,23 @@ function Ga(t) {
|
|
4168
4168
|
u,
|
4169
4169
|
l,
|
4170
4170
|
h
|
4171
|
-
] = t, p =
|
4171
|
+
] = t, p = pn(e, r, s, n, i, o, a);
|
4172
4172
|
let m;
|
4173
|
-
return c ? m = qa[c] : u ? m = 0 : m = Ct(l, h), [p, new
|
4173
|
+
return c ? m = qa[c] : u ? m = 0 : m = Ct(l, h), [p, new H(m)];
|
4174
4174
|
}
|
4175
4175
|
function Ya(t) {
|
4176
4176
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
4177
4177
|
}
|
4178
4178
|
const Ja = /^(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$/, Ka = /^(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$/, Qa = /^(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})$/;
|
4179
|
-
function
|
4179
|
+
function Kn(t) {
|
4180
4180
|
const [, e, n, s, r, i, o, a] = t;
|
4181
|
-
return [
|
4181
|
+
return [pn(e, r, s, n, i, o, a), H.utcInstance];
|
4182
4182
|
}
|
4183
4183
|
function Xa(t) {
|
4184
4184
|
const [, e, n, s, r, i, o, a] = t;
|
4185
|
-
return [
|
4185
|
+
return [pn(e, a, n, s, r, i, o), H.utcInstance];
|
4186
4186
|
}
|
4187
|
-
const ec = xe(Ra,
|
4187
|
+
const ec = xe(Ra, yn), tc = xe(Va, yn), nc = xe(La, yn), sc = xe(kr), _r = De(
|
4188
4188
|
Ba,
|
4189
4189
|
Ae,
|
4190
4190
|
je,
|
@@ -4219,8 +4219,8 @@ function cc(t) {
|
|
4219
4219
|
function uc(t) {
|
4220
4220
|
return Me(
|
4221
4221
|
t,
|
4222
|
-
[Ja,
|
4223
|
-
[Ka,
|
4222
|
+
[Ja, Kn],
|
4223
|
+
[Ka, Kn],
|
4224
4224
|
[Qa, Xa]
|
4225
4225
|
);
|
4226
4226
|
}
|
@@ -4243,7 +4243,7 @@ function pc(t) {
|
|
4243
4243
|
[mc, yc]
|
4244
4244
|
);
|
4245
4245
|
}
|
4246
|
-
const
|
4246
|
+
const Qn = "Invalid Duration", Or = {
|
4247
4247
|
weeks: {
|
4248
4248
|
days: 7,
|
4249
4249
|
hours: 7 * 24,
|
@@ -4344,7 +4344,7 @@ function Er(t, e) {
|
|
4344
4344
|
e[s] && (n += e[s] * t[s].milliseconds);
|
4345
4345
|
return n;
|
4346
4346
|
}
|
4347
|
-
function
|
4347
|
+
function Xn(t, e) {
|
4348
4348
|
const n = Er(t, e) < 0 ? -1 : 1;
|
4349
4349
|
we.reduceRight((s, r) => {
|
4350
4350
|
if (w(e[r]))
|
@@ -4413,7 +4413,7 @@ class b {
|
|
4413
4413
|
*/
|
4414
4414
|
static fromObject(e, n = {}) {
|
4415
4415
|
if (e == null || typeof e != "object")
|
4416
|
-
throw new
|
4416
|
+
throw new P(
|
4417
4417
|
`Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
|
4418
4418
|
);
|
4419
4419
|
return new b({
|
@@ -4440,7 +4440,7 @@ class b {
|
|
4440
4440
|
return e;
|
4441
4441
|
if (typeof e == "object")
|
4442
4442
|
return b.fromObject(e);
|
4443
|
-
throw new
|
4443
|
+
throw new P(
|
4444
4444
|
`Unknown duration argument ${e} of type ${typeof e}`
|
4445
4445
|
);
|
4446
4446
|
}
|
@@ -4490,7 +4490,7 @@ class b {
|
|
4490
4490
|
*/
|
4491
4491
|
static invalid(e, n = null) {
|
4492
4492
|
if (!e)
|
4493
|
-
throw new
|
4493
|
+
throw new P("need to specify a reason the Duration is invalid");
|
4494
4494
|
const s = e instanceof Q ? e : new Q(e, n);
|
4495
4495
|
if (x.throwOnInvalid)
|
4496
4496
|
throw new jo(s);
|
@@ -4574,7 +4574,7 @@ class b {
|
|
4574
4574
|
...n,
|
4575
4575
|
floor: n.round !== !1 && n.floor !== !1
|
4576
4576
|
};
|
4577
|
-
return this.isValid ? L.create(this.loc, s).formatDurationFromString(this, e) :
|
4577
|
+
return this.isValid ? L.create(this.loc, s).formatDurationFromString(this, e) : Qn;
|
4578
4578
|
}
|
4579
4579
|
/**
|
4580
4580
|
* Returns a string representation of a Duration with all units included.
|
@@ -4592,7 +4592,7 @@ class b {
|
|
4592
4592
|
*/
|
4593
4593
|
toHuman(e = {}) {
|
4594
4594
|
if (!this.isValid)
|
4595
|
-
return
|
4595
|
+
return Qn;
|
4596
4596
|
const n = we.map((s) => {
|
4597
4597
|
const r = this.values[s];
|
4598
4598
|
return w(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: s.slice(0, -1) }).format(r);
|
@@ -4621,7 +4621,7 @@ class b {
|
|
4621
4621
|
if (!this.isValid)
|
4622
4622
|
return null;
|
4623
4623
|
let e = "P";
|
4624
|
-
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 +=
|
4624
|
+
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 += fn(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
4625
4625
|
}
|
4626
4626
|
/**
|
4627
4627
|
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
|
@@ -4789,7 +4789,7 @@ class b {
|
|
4789
4789
|
if (!this.isValid)
|
4790
4790
|
return this;
|
4791
4791
|
const e = this.toObject();
|
4792
|
-
return
|
4792
|
+
return Xn(this.matrix, e), ce(this, { values: e }, !0);
|
4793
4793
|
}
|
4794
4794
|
/**
|
4795
4795
|
* Rescale units to its largest representation
|
@@ -4828,7 +4828,7 @@ class b {
|
|
4828
4828
|
Se(r[o]) && (s[o] = r[o]);
|
4829
4829
|
for (const o in s)
|
4830
4830
|
s[o] !== 0 && (n[i] += o === i ? s[o] : s[o] / this.matrix[i][o]);
|
4831
|
-
return
|
4831
|
+
return Xn(this.matrix, n), ce(this, { values: n }, !0);
|
4832
4832
|
}
|
4833
4833
|
/**
|
4834
4834
|
* Shift this Duration to all available units.
|
@@ -4985,7 +4985,7 @@ class N {
|
|
4985
4985
|
*/
|
4986
4986
|
static invalid(e, n = null) {
|
4987
4987
|
if (!e)
|
4988
|
-
throw new
|
4988
|
+
throw new P("need to specify a reason the Interval is invalid");
|
4989
4989
|
const s = e instanceof Q ? e : new Q(e, n);
|
4990
4990
|
if (x.throwOnInvalid)
|
4991
4991
|
throw new qo(s);
|
@@ -5594,7 +5594,7 @@ class et {
|
|
5594
5594
|
return { relative: ar(), localeWeek: cr() };
|
5595
5595
|
}
|
5596
5596
|
}
|
5597
|
-
function
|
5597
|
+
function es(t, e) {
|
5598
5598
|
const n = (r) => r.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), s = n(e) - n(t);
|
5599
5599
|
return Math.floor(b.fromMillis(s).as("days"));
|
5600
5600
|
}
|
@@ -5606,11 +5606,11 @@ function Tc(t, e, n) {
|
|
5606
5606
|
[
|
5607
5607
|
"weeks",
|
5608
5608
|
(c, u) => {
|
5609
|
-
const l =
|
5609
|
+
const l = es(c, u);
|
5610
5610
|
return (l - l % 7) / 7;
|
5611
5611
|
}
|
5612
5612
|
],
|
5613
|
-
["days",
|
5613
|
+
["days", es]
|
5614
5614
|
], r = {}, i = t;
|
5615
5615
|
let o, a;
|
5616
5616
|
for (const [c, u] of s)
|
@@ -5626,7 +5626,7 @@ function _c(t, e, n, s) {
|
|
5626
5626
|
const l = b.fromObject(i, s);
|
5627
5627
|
return u.length > 0 ? b.fromMillis(c, s).shiftTo(...u).plus(l) : l;
|
5628
5628
|
}
|
5629
|
-
const
|
5629
|
+
const gn = {
|
5630
5630
|
arab: "[٠-٩]",
|
5631
5631
|
arabext: "[۰-۹]",
|
5632
5632
|
bali: "[᭐-᭙]",
|
@@ -5648,7 +5648,7 @@ const pn = {
|
|
5648
5648
|
thai: "[๐-๙]",
|
5649
5649
|
tibt: "[༠-༩]",
|
5650
5650
|
latn: "\\d"
|
5651
|
-
},
|
5651
|
+
}, ts = {
|
5652
5652
|
arab: [1632, 1641],
|
5653
5653
|
arabext: [1776, 1785],
|
5654
5654
|
bali: [6992, 7001],
|
@@ -5668,18 +5668,18 @@ const pn = {
|
|
5668
5668
|
telu: [3174, 3183],
|
5669
5669
|
thai: [3664, 3673],
|
5670
5670
|
tibt: [3872, 3881]
|
5671
|
-
}, Oc =
|
5671
|
+
}, Oc = gn.hanidec.replace(/[\[|\]]/g, "").split("");
|
5672
5672
|
function Ec(t) {
|
5673
5673
|
let e = parseInt(t, 10);
|
5674
5674
|
if (isNaN(e)) {
|
5675
5675
|
e = "";
|
5676
5676
|
for (let n = 0; n < t.length; n++) {
|
5677
5677
|
const s = t.charCodeAt(n);
|
5678
|
-
if (t[n].search(
|
5678
|
+
if (t[n].search(gn.hanidec) !== -1)
|
5679
5679
|
e += Oc.indexOf(t[n]);
|
5680
5680
|
else
|
5681
|
-
for (const r in
|
5682
|
-
const [i, o] =
|
5681
|
+
for (const r in ts) {
|
5682
|
+
const [i, o] = ts[r];
|
5683
5683
|
s >= i && s <= o && (e += s - i);
|
5684
5684
|
}
|
5685
5685
|
}
|
@@ -5688,7 +5688,7 @@ function Ec(t) {
|
|
5688
5688
|
return e;
|
5689
5689
|
}
|
5690
5690
|
function J({ numberingSystem: t }, e = "") {
|
5691
|
-
return new RegExp(`${
|
5691
|
+
return new RegExp(`${gn[t || "latn"]}${e}`);
|
5692
5692
|
}
|
5693
5693
|
const vc = "missing Intl.DateTimeFormat.formatToParts support";
|
5694
5694
|
function _(t, e = (n) => n) {
|
@@ -5698,16 +5698,16 @@ const Cc = String.fromCharCode(160), vr = `[ ${Cc}]`, Cr = new RegExp(vr, "g");
|
|
5698
5698
|
function Nc(t) {
|
5699
5699
|
return t.replace(/\./g, "\\.?").replace(Cr, vr);
|
5700
5700
|
}
|
5701
|
-
function
|
5701
|
+
function ns(t) {
|
5702
5702
|
return t.replace(/\./g, "").replace(Cr, " ").toLowerCase();
|
5703
5703
|
}
|
5704
5704
|
function K(t, e) {
|
5705
5705
|
return t === null ? null : {
|
5706
5706
|
regex: RegExp(t.map(Nc).join("|")),
|
5707
|
-
deser: ([n]) => t.findIndex((s) =>
|
5707
|
+
deser: ([n]) => t.findIndex((s) => ns(n) === ns(s)) + e
|
5708
5708
|
};
|
5709
5709
|
}
|
5710
|
-
function
|
5710
|
+
function ss(t, e) {
|
5711
5711
|
return { regex: t, deser: ([, n, s]) => Ct(n, s), groups: e };
|
5712
5712
|
}
|
5713
5713
|
function tt(t) {
|
@@ -5717,10 +5717,10 @@ function Ic(t) {
|
|
5717
5717
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
5718
5718
|
}
|
5719
5719
|
function xc(t, e) {
|
5720
|
-
const n = J(e), s = J(e, "{2}"), r = J(e, "{3}"), i = J(e, "{4}"), o = J(e, "{6}"), a = J(e, "{1,2}"), c = J(e, "{1,3}"), u = J(e, "{1,6}"), l = J(e, "{1,9}"), h = J(e, "{2,4}"), p = J(e, "{4,6}"), m = (
|
5720
|
+
const n = J(e), s = J(e, "{2}"), r = J(e, "{3}"), i = J(e, "{4}"), o = J(e, "{6}"), a = J(e, "{1,2}"), c = J(e, "{1,3}"), u = J(e, "{1,6}"), l = J(e, "{1,9}"), h = J(e, "{2,4}"), p = J(e, "{4,6}"), m = (O) => ({ regex: RegExp(Ic(O.val)), deser: ([C]) => C, literal: !0 }), g = ((O) => {
|
5721
5721
|
if (t.literal)
|
5722
|
-
return m(
|
5723
|
-
switch (
|
5722
|
+
return m(O);
|
5723
|
+
switch (O.val) {
|
5724
5724
|
case "G":
|
5725
5725
|
return K(e.eras("short"), 0);
|
5726
5726
|
case "GG":
|
@@ -5812,15 +5812,15 @@ function xc(t, e) {
|
|
5812
5812
|
return K(e.weekdays("long", !0), 1);
|
5813
5813
|
case "Z":
|
5814
5814
|
case "ZZ":
|
5815
|
-
return
|
5815
|
+
return ss(new RegExp(`([+-]${a.source})(?::(${s.source}))?`), 2);
|
5816
5816
|
case "ZZZ":
|
5817
|
-
return
|
5817
|
+
return ss(new RegExp(`([+-]${a.source})(${s.source})?`), 2);
|
5818
5818
|
case "z":
|
5819
5819
|
return tt(/[a-z_+-/]{1,256}?/i);
|
5820
5820
|
case " ":
|
5821
5821
|
return tt(/[^\S\n\r]/);
|
5822
5822
|
default:
|
5823
|
-
return m(
|
5823
|
+
return m(O);
|
5824
5824
|
}
|
5825
5825
|
})(t) || {
|
5826
5826
|
invalidReason: vc
|
@@ -5940,7 +5940,7 @@ function Rc(t) {
|
|
5940
5940
|
}
|
5941
5941
|
};
|
5942
5942
|
let n = null, s;
|
5943
|
-
return w(t.z) || (n = ie.create(t.z)), w(t.Z) || (n || (n = new
|
5943
|
+
return w(t.z) || (n = ie.create(t.z)), w(t.Z) || (n || (n = new H(t.Z)), s = t.Z), w(t.q) || (t.M = (t.q - 1) * 3 + 1), w(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), w(t.u) || (t.S = hn(t.u)), [Object.keys(t).reduce((i, o) => {
|
5944
5944
|
const a = e(o);
|
5945
5945
|
return a && (i[a] = t[o]), i;
|
5946
5946
|
}, {}), n, s];
|
@@ -5981,7 +5981,7 @@ function xr(t, e) {
|
|
5981
5981
|
const s = L.create(e, t).dtFormatter(Vc()), r = s.formatToParts(), i = s.resolvedOptions();
|
5982
5982
|
return r.map((o) => Mc(o, t, i));
|
5983
5983
|
}
|
5984
|
-
const $t = "Invalid DateTime",
|
5984
|
+
const $t = "Invalid DateTime", rs = 864e13;
|
5985
5985
|
function nt(t) {
|
5986
5986
|
return new Q("unsupported zone", `the zone "${t.name}" is not supported`);
|
5987
5987
|
}
|
@@ -6031,7 +6031,7 @@ function st(t, e) {
|
|
6031
6031
|
function dt(t, e, n) {
|
6032
6032
|
return Dr(vt(t), e, n);
|
6033
6033
|
}
|
6034
|
-
function
|
6034
|
+
function is(t, e) {
|
6035
6035
|
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 = {
|
6036
6036
|
...t.c,
|
6037
6037
|
year: s,
|
@@ -6076,7 +6076,7 @@ function Pt(t, e) {
|
|
6076
6076
|
let s = "";
|
6077
6077
|
return n && t.c.year >= 0 && (s += "+"), s += M(t.c.year, n ? 6 : 4), e ? (s += "-", s += M(t.c.month), s += "-", s += M(t.c.day)) : (s += M(t.c.month), s += M(t.c.day)), s;
|
6078
6078
|
}
|
6079
|
-
function
|
6079
|
+
function os(t, e, n, s, r, i) {
|
6080
6080
|
let o = M(t.c.hour);
|
6081
6081
|
return e ? (o += ":", o += M(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += ":")) : o += M(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += M(t.c.second), (t.c.millisecond !== 0 || !s) && (o += ".", o += M(t.c.millisecond, 3))), r && (t.isOffsetFixed && t.offset === 0 && !i ? o += "Z" : t.o < 0 ? (o += "-", o += M(Math.trunc(-t.o / 60)), o += ":", o += M(Math.trunc(-t.o % 60))) : (o += "+", o += M(Math.trunc(t.o / 60)), o += ":", o += M(Math.trunc(t.o % 60)))), i && (o += "[" + t.zone.ianaName + "]"), o;
|
6082
6082
|
}
|
@@ -6140,7 +6140,7 @@ function Pc(t) {
|
|
6140
6140
|
throw new Rs(t);
|
6141
6141
|
return e;
|
6142
6142
|
}
|
6143
|
-
function
|
6143
|
+
function as(t) {
|
6144
6144
|
switch (t.toLowerCase()) {
|
6145
6145
|
case "localweekday":
|
6146
6146
|
case "localweekdays":
|
@@ -6155,7 +6155,7 @@ function os(t) {
|
|
6155
6155
|
return Pc(t);
|
6156
6156
|
}
|
6157
6157
|
}
|
6158
|
-
function
|
6158
|
+
function cs(t, e) {
|
6159
6159
|
const n = de(e.zone, x.defaultZone), s = v.fromObject(e), r = x.now();
|
6160
6160
|
let i, o;
|
6161
6161
|
if (w(t.year))
|
@@ -6171,8 +6171,8 @@ function as(t, e) {
|
|
6171
6171
|
}
|
6172
6172
|
return new S({ ts: i, zone: n, loc: s, o });
|
6173
6173
|
}
|
6174
|
-
function
|
6175
|
-
const s = w(n.round) ? !0 : n.round, r = (o, a) => (o =
|
6174
|
+
function us(t, e, n) {
|
6175
|
+
const s = w(n.round) ? !0 : n.round, r = (o, a) => (o = fn(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);
|
6176
6176
|
if (n.unit)
|
6177
6177
|
return r(i(n.unit), n.unit);
|
6178
6178
|
for (const o of n.units) {
|
@@ -6182,7 +6182,7 @@ function cs(t, e, n) {
|
|
6182
6182
|
}
|
6183
6183
|
return r(t > e ? -0 : 0, n.units[n.units.length - 1]);
|
6184
6184
|
}
|
6185
|
-
function
|
6185
|
+
function ls(t) {
|
6186
6186
|
let e = {}, n;
|
6187
6187
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
|
6188
6188
|
}
|
@@ -6237,8 +6237,8 @@ class S {
|
|
6237
6237
|
* @return {DateTime}
|
6238
6238
|
*/
|
6239
6239
|
static local() {
|
6240
|
-
const [e, n] =
|
6241
|
-
return
|
6240
|
+
const [e, n] = ls(arguments), [s, r, i, o, a, c, u] = n;
|
6241
|
+
return cs({ year: s, month: r, day: i, hour: o, minute: a, second: c, millisecond: u }, e);
|
6242
6242
|
}
|
6243
6243
|
/**
|
6244
6244
|
* Create a DateTime in UTC
|
@@ -6265,8 +6265,8 @@ class S {
|
|
6265
6265
|
* @return {DateTime}
|
6266
6266
|
*/
|
6267
6267
|
static utc() {
|
6268
|
-
const [e, n] =
|
6269
|
-
return e.zone =
|
6268
|
+
const [e, n] = ls(arguments), [s, r, i, o, a, c, u] = n;
|
6269
|
+
return e.zone = H.utcInstance, cs({ year: s, month: r, day: i, hour: o, minute: a, second: c, millisecond: u }, e);
|
6270
6270
|
}
|
6271
6271
|
/**
|
6272
6272
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
@@ -6298,12 +6298,12 @@ class S {
|
|
6298
6298
|
*/
|
6299
6299
|
static fromMillis(e, n = {}) {
|
6300
6300
|
if (Se(e))
|
6301
|
-
return e < -
|
6301
|
+
return e < -rs || e > rs ? S.invalid("Timestamp out of range") : new S({
|
6302
6302
|
ts: e,
|
6303
6303
|
zone: de(n.zone, x.defaultZone),
|
6304
6304
|
loc: v.fromObject(n)
|
6305
6305
|
});
|
6306
|
-
throw new
|
6306
|
+
throw new P(
|
6307
6307
|
`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
|
6308
6308
|
);
|
6309
6309
|
}
|
@@ -6324,7 +6324,7 @@ class S {
|
|
6324
6324
|
zone: de(n.zone, x.defaultZone),
|
6325
6325
|
loc: v.fromObject(n)
|
6326
6326
|
});
|
6327
|
-
throw new
|
6327
|
+
throw new P("fromSeconds requires a numerical input");
|
6328
6328
|
}
|
6329
6329
|
/**
|
6330
6330
|
* Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
|
@@ -6363,7 +6363,7 @@ class S {
|
|
6363
6363
|
const s = de(n.zone, x.defaultZone);
|
6364
6364
|
if (!s.isValid)
|
6365
6365
|
return S.invalid(nt(s));
|
6366
|
-
const r = v.fromObject(n), i = pt(e,
|
6366
|
+
const r = v.fromObject(n), i = pt(e, as), { minDaysInFirstWeek: o, startOfWeek: a } = jn(i, r), c = x.now(), u = w(n.specificOffset) ? s.offset(c) : n.specificOffset, l = !w(i.ordinal), h = !w(i.year), p = !w(i.month) || !w(i.day), m = h || p, f = i.weekYear || i.weekNumber;
|
6367
6367
|
if ((m || l) && f)
|
6368
6368
|
throw new Oe(
|
6369
6369
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -6371,17 +6371,17 @@ class S {
|
|
6371
6371
|
if (p && l)
|
6372
6372
|
throw new Oe("Can't mix ordinal dates with month/day");
|
6373
6373
|
const g = f || i.weekday && !m;
|
6374
|
-
let
|
6375
|
-
g ? (
|
6374
|
+
let O, C, D = st(c, u);
|
6375
|
+
g ? (O = Hc, C = Uc, D = mt(D, o, a)) : l ? (O = Bc, C = $c, D = Wt(D)) : (O = Ar, C = Mr);
|
6376
6376
|
let ne = !1;
|
6377
|
-
for (const me of
|
6377
|
+
for (const me of O) {
|
6378
6378
|
const It = i[me];
|
6379
6379
|
w(It) ? ne ? i[me] = C[me] : i[me] = D[me] : ne = !0;
|
6380
6380
|
}
|
6381
6381
|
const I = g ? ya(i, o, a) : l ? pa(i) : ir(i), T = I || or(i);
|
6382
6382
|
if (T)
|
6383
6383
|
return S.invalid(T);
|
6384
|
-
const R = g ?
|
6384
|
+
const R = g ? Zn(i, o, a) : l ? qn(i) : i, [A, ke] = dt(R, u, s), fe = new S({
|
6385
6385
|
ts: A,
|
6386
6386
|
zone: s,
|
6387
6387
|
o: ke,
|
@@ -6464,7 +6464,7 @@ class S {
|
|
6464
6464
|
*/
|
6465
6465
|
static fromFormat(e, n, s = {}) {
|
6466
6466
|
if (w(e) || w(n))
|
6467
|
-
throw new
|
6467
|
+
throw new P("fromFormat requires an input string and a format");
|
6468
6468
|
const { locale: r = null, numberingSystem: i = null } = s, o = v.fromOpts({
|
6469
6469
|
locale: r,
|
6470
6470
|
numberingSystem: i,
|
@@ -6510,7 +6510,7 @@ class S {
|
|
6510
6510
|
*/
|
6511
6511
|
static invalid(e, n = null) {
|
6512
6512
|
if (!e)
|
6513
|
-
throw new
|
6513
|
+
throw new P("need to specify a reason the DateTime is invalid");
|
6514
6514
|
const s = e instanceof Q ? e : new Q(e, n);
|
6515
6515
|
if (x.throwOnInvalid)
|
6516
6516
|
throw new Zo(s);
|
@@ -6919,7 +6919,7 @@ class S {
|
|
6919
6919
|
* @return {DateTime}
|
6920
6920
|
*/
|
6921
6921
|
toUTC(e = 0, n = {}) {
|
6922
|
-
return this.setZone(
|
6922
|
+
return this.setZone(H.instance(e), n);
|
6923
6923
|
}
|
6924
6924
|
/**
|
6925
6925
|
* "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
|
@@ -6987,7 +6987,7 @@ class S {
|
|
6987
6987
|
set(e) {
|
6988
6988
|
if (!this.isValid)
|
6989
6989
|
return this;
|
6990
|
-
const n = pt(e,
|
6990
|
+
const n = pt(e, as), { minDaysInFirstWeek: s, startOfWeek: r } = jn(n, this.loc), i = !w(n.weekYear) || !w(n.weekNumber) || !w(n.weekday), o = !w(n.ordinal), a = !w(n.year), c = !w(n.month) || !w(n.day), u = a || c, l = n.weekYear || n.weekNumber;
|
6991
6991
|
if ((u || o) && l)
|
6992
6992
|
throw new Oe(
|
6993
6993
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -6995,11 +6995,11 @@ class S {
|
|
6995
6995
|
if (c && o)
|
6996
6996
|
throw new Oe("Can't mix ordinal dates with month/day");
|
6997
6997
|
let h;
|
6998
|
-
i ? h =
|
6998
|
+
i ? h = Zn(
|
6999
6999
|
{ ...mt(this.c, s, r), ...n },
|
7000
7000
|
s,
|
7001
7001
|
r
|
7002
|
-
) : w(n.ordinal) ? (h = { ...this.toObject(), ...n }, w(n.day) && (h.day = Math.min(yt(h.year, h.month), h.day))) : h =
|
7002
|
+
) : w(n.ordinal) ? (h = { ...this.toObject(), ...n }, w(n.day) && (h.day = Math.min(yt(h.year, h.month), h.day))) : h = qn({ ...Wt(this.c), ...n });
|
7003
7003
|
const [p, m] = dt(h, this.o, this.zone);
|
7004
7004
|
return pe(this, { ts: p, o: m });
|
7005
7005
|
}
|
@@ -7020,7 +7020,7 @@ class S {
|
|
7020
7020
|
if (!this.isValid)
|
7021
7021
|
return this;
|
7022
7022
|
const n = b.fromDurationLike(e);
|
7023
|
-
return pe(this,
|
7023
|
+
return pe(this, is(this, n));
|
7024
7024
|
}
|
7025
7025
|
/**
|
7026
7026
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
@@ -7032,7 +7032,7 @@ class S {
|
|
7032
7032
|
if (!this.isValid)
|
7033
7033
|
return this;
|
7034
7034
|
const n = b.fromDurationLike(e).negate();
|
7035
|
-
return pe(this,
|
7035
|
+
return pe(this, is(this, n));
|
7036
7036
|
}
|
7037
7037
|
/**
|
7038
7038
|
* "Set" this DateTime to the beginning of a unit of time.
|
@@ -7173,7 +7173,7 @@ class S {
|
|
7173
7173
|
return null;
|
7174
7174
|
const o = e === "extended";
|
7175
7175
|
let a = Pt(this, o);
|
7176
|
-
return a += "T", a +=
|
7176
|
+
return a += "T", a += os(this, o, n, s, r, i), a;
|
7177
7177
|
}
|
7178
7178
|
/**
|
7179
7179
|
* Returns an ISO 8601-compliant string representation of this DateTime's date component
|
@@ -7217,7 +7217,7 @@ class S {
|
|
7217
7217
|
extendedZone: i = !1,
|
7218
7218
|
format: o = "extended"
|
7219
7219
|
} = {}) {
|
7220
|
-
return this.isValid ? (r ? "T" : "") +
|
7220
|
+
return this.isValid ? (r ? "T" : "") + os(
|
7221
7221
|
this,
|
7222
7222
|
o === "extended",
|
7223
7223
|
n,
|
@@ -7452,7 +7452,7 @@ class S {
|
|
7452
7452
|
return null;
|
7453
7453
|
const n = e.base || S.fromObject({}, { zone: this.zone }), s = e.padding ? this < n ? -e.padding : e.padding : 0;
|
7454
7454
|
let r = ["years", "months", "days", "hours", "minutes", "seconds"], i = e.unit;
|
7455
|
-
return Array.isArray(e.unit) && (r = e.unit, i = void 0),
|
7455
|
+
return Array.isArray(e.unit) && (r = e.unit, i = void 0), us(n, this.plus(s), {
|
7456
7456
|
...e,
|
7457
7457
|
numeric: "always",
|
7458
7458
|
units: r,
|
@@ -7473,7 +7473,7 @@ class S {
|
|
7473
7473
|
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
|
7474
7474
|
*/
|
7475
7475
|
toRelativeCalendar(e = {}) {
|
7476
|
-
return this.isValid ?
|
7476
|
+
return this.isValid ? us(e.base || S.fromObject({}, { zone: this.zone }), this, {
|
7477
7477
|
...e,
|
7478
7478
|
numeric: "auto",
|
7479
7479
|
units: ["years", "months", "days"],
|
@@ -7487,8 +7487,8 @@ class S {
|
|
7487
7487
|
*/
|
7488
7488
|
static min(...e) {
|
7489
7489
|
if (!e.every(S.isDateTime))
|
7490
|
-
throw new
|
7491
|
-
return
|
7490
|
+
throw new P("min requires all arguments be DateTimes");
|
7491
|
+
return Gn(e, (n) => n.valueOf(), Math.min);
|
7492
7492
|
}
|
7493
7493
|
/**
|
7494
7494
|
* Return the max of several date times
|
@@ -7497,8 +7497,8 @@ class S {
|
|
7497
7497
|
*/
|
7498
7498
|
static max(...e) {
|
7499
7499
|
if (!e.every(S.isDateTime))
|
7500
|
-
throw new
|
7501
|
-
return
|
7500
|
+
throw new P("max requires all arguments be DateTimes");
|
7501
|
+
return Gn(e, (n) => n.valueOf(), Math.max);
|
7502
7502
|
}
|
7503
7503
|
// MISC
|
7504
7504
|
/**
|
@@ -7685,23 +7685,26 @@ function Ve(t) {
|
|
7685
7685
|
return S.fromJSDate(t);
|
7686
7686
|
if (t && typeof t == "object")
|
7687
7687
|
return S.fromObject(t);
|
7688
|
-
throw new
|
7688
|
+
throw new P(
|
7689
7689
|
`Unknown datetime argument: ${t}, of type ${typeof t}`
|
7690
7690
|
);
|
7691
7691
|
}
|
7692
7692
|
const zc = {}, Zc = {
|
7693
7693
|
xmlns: "http://www.w3.org/2000/svg",
|
7694
7694
|
viewBox: "0 0 512 512"
|
7695
|
-
}, qc = /* @__PURE__ */
|
7695
|
+
}, qc = /* @__PURE__ */ E("path", {
|
7696
7696
|
fill: "rgb(248 113 113)",
|
7697
7697
|
d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"
|
7698
7698
|
}, null, -1), jc = [
|
7699
7699
|
qc
|
7700
7700
|
];
|
7701
7701
|
function Gc(t, e) {
|
7702
|
-
return
|
7702
|
+
return W(), U("svg", Zc, jc);
|
7703
7703
|
}
|
7704
|
-
const Yc = /* @__PURE__ */ he(zc, [["render", Gc]]), Jc = { class: "messages-container-list" }, Kc = { class: "message-container" }, Qc = {
|
7704
|
+
const Yc = /* @__PURE__ */ he(zc, [["render", Gc]]), Jc = { class: "messages-container-list" }, Kc = { class: "message-container" }, Qc = {
|
7705
|
+
key: 0,
|
7706
|
+
class: "btn-container-widget"
|
7707
|
+
}, Xc = ["onClick"], eu = { class: "chat-message" }, tu = { class: "message-text" }, nu = { class: "detail-message flex justify-content-between" }, su = {
|
7705
7708
|
key: 0,
|
7706
7709
|
class: "mr-5"
|
7707
7710
|
}, ru = {
|
@@ -7721,7 +7724,7 @@ const Yc = /* @__PURE__ */ he(zc, [["render", Gc]]), Jc = { class: "messages-con
|
|
7721
7724
|
},
|
7722
7725
|
emits: ["loadMore", "retry"],
|
7723
7726
|
setup(t, { emit: e }) {
|
7724
|
-
const n = t, s =
|
7727
|
+
const n = t, s = B(), { pause: r, resume: i } = zo(
|
7725
7728
|
s,
|
7726
7729
|
([{ isIntersecting: o }]) => {
|
7727
7730
|
o && e("loadMore");
|
@@ -7738,22 +7741,22 @@ const Yc = /* @__PURE__ */ he(zc, [["render", Gc]]), Jc = { class: "messages-con
|
|
7738
7741
|
}
|
7739
7742
|
r();
|
7740
7743
|
}
|
7741
|
-
), (o, a) => (
|
7742
|
-
|
7744
|
+
), (o, a) => (W(), U(wn, null, [
|
7745
|
+
E("div", {
|
7743
7746
|
ref_key: "target",
|
7744
7747
|
ref: s,
|
7745
7748
|
class: "target"
|
7746
7749
|
}, null, 512),
|
7747
|
-
|
7748
|
-
(
|
7750
|
+
E("div", Jc, [
|
7751
|
+
(W(!0), U(wn, null, Ur(n.messages, (c) => {
|
7749
7752
|
var u, l;
|
7750
|
-
return
|
7753
|
+
return W(), U("div", {
|
7751
7754
|
key: c.id,
|
7752
7755
|
class: it(["message", c.esCliente ? "message-left" : "message-right"])
|
7753
7756
|
}, [
|
7754
|
-
|
7755
|
-
|
7756
|
-
|
7757
|
+
E("div", Kc, [
|
7758
|
+
c.error && c.esCliente ? (W(), U("div", Qc, [
|
7759
|
+
E("button", {
|
7757
7760
|
text: "",
|
7758
7761
|
rounded: "",
|
7759
7762
|
class: "btn-danger",
|
@@ -7763,18 +7766,18 @@ const Yc = /* @__PURE__ */ he(zc, [["render", Gc]]), Jc = { class: "messages-con
|
|
7763
7766
|
}, [
|
7764
7767
|
ge(Yc)
|
7765
7768
|
], 8, Xc)
|
7766
|
-
]),
|
7767
|
-
|
7768
|
-
|
7769
|
+
])) : sn("", !0),
|
7770
|
+
E("div", eu, [
|
7771
|
+
E("div", {
|
7769
7772
|
class: it(["bubble", c.esCliente ? "left" : "right"])
|
7770
7773
|
}, [
|
7771
|
-
|
7774
|
+
E("div", {
|
7772
7775
|
class: it(c.esCliente ? "content-left" : "content-right")
|
7773
7776
|
}, [
|
7774
|
-
|
7775
|
-
|
7776
|
-
(u = c.sender) != null && u.nombreCompleto ? (
|
7777
|
-
|
7777
|
+
E("div", tu, Ue(c.message), 1),
|
7778
|
+
E("div", nu, [
|
7779
|
+
(u = c.sender) != null && u.nombreCompleto ? (W(), U("span", su, Ue((l = c.sender) == null ? void 0 : l.nombreCompleto), 1)) : (W(), U("span", ru)),
|
7780
|
+
E("span", null, Ue(ds(S).fromISO(c.createdAt).toFormat(
|
7778
7781
|
"dd-MM-yyyy HH:mm"
|
7779
7782
|
)), 1)
|
7780
7783
|
])
|
@@ -7788,15 +7791,15 @@ const Yc = /* @__PURE__ */ he(zc, [["render", Gc]]), Jc = { class: "messages-con
|
|
7788
7791
|
], 64));
|
7789
7792
|
}
|
7790
7793
|
});
|
7791
|
-
const ou = /* @__PURE__ */ he(iu, [["__scopeId", "data-v-
|
7794
|
+
const ou = /* @__PURE__ */ he(iu, [["__scopeId", "data-v-306b8452"]]);
|
7792
7795
|
const au = {}, Fr = (t) => ($r("data-v-d9a6b2b7"), t = t(), Hr(), t), cu = {
|
7793
7796
|
viewBox: "0 0 24 24",
|
7794
7797
|
xmlns: "http://www.w3.org/2000/svg",
|
7795
7798
|
style: { width: "28px", height: "28px" }
|
7796
|
-
}, uu = /* @__PURE__ */ Fr(() => /* @__PURE__ */
|
7799
|
+
}, uu = /* @__PURE__ */ Fr(() => /* @__PURE__ */ E("path", {
|
7797
7800
|
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
7798
7801
|
opacity: ".25"
|
7799
|
-
}, null, -1)), lu = /* @__PURE__ */ Fr(() => /* @__PURE__ */
|
7802
|
+
}, null, -1)), lu = /* @__PURE__ */ Fr(() => /* @__PURE__ */ E("path", {
|
7800
7803
|
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",
|
7801
7804
|
class: "spinner_ajPY"
|
7802
7805
|
}, null, -1)), du = [
|
@@ -7804,7 +7807,7 @@ const au = {}, Fr = (t) => ($r("data-v-d9a6b2b7"), t = t(), Hr(), t), cu = {
|
|
7804
7807
|
lu
|
7805
7808
|
];
|
7806
7809
|
function hu(t, e) {
|
7807
|
-
return
|
7810
|
+
return W(), U("svg", cu, du);
|
7808
7811
|
}
|
7809
7812
|
const fu = /* @__PURE__ */ he(au, [["render", hu], ["__scopeId", "data-v-d9a6b2b7"]]);
|
7810
7813
|
function mu(t, e, n) {
|
@@ -7842,24 +7845,24 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
7842
7845
|
"not-viewed-total"
|
7843
7846
|
],
|
7844
7847
|
setup(t, { emit: e }) {
|
7845
|
-
const n = t, s =
|
7848
|
+
const n = t, s = B(null), r = B(""), i = B(0), o = B({
|
7846
7849
|
data: [],
|
7847
7850
|
canLoadMoreMessages: !1
|
7848
|
-
}), a =
|
7851
|
+
}), a = B({ virtualhost: "" }), c = B(""), u = B(!1), l = B(null);
|
7849
7852
|
tn(
|
7850
7853
|
() => n.visible,
|
7851
7854
|
async (I) => {
|
7852
7855
|
if (I) {
|
7853
|
-
if (e("clear-new-messages"),
|
7854
|
-
const R = (await
|
7856
|
+
if (e("clear-new-messages"), O(), !a.value || !c.value) {
|
7857
|
+
const R = (await An(n.tokenAuth)).response.data;
|
7855
7858
|
a.value = R.virtualHost, c.value = R.appChat.id, g();
|
7856
7859
|
}
|
7857
|
-
i.value > 0 &&
|
7860
|
+
i.value > 0 && Fn(c.value, n.tokenAuth);
|
7858
7861
|
}
|
7859
7862
|
}
|
7860
|
-
),
|
7863
|
+
), fs(async () => {
|
7861
7864
|
if (!a.value || !c.value) {
|
7862
|
-
const T = (await
|
7865
|
+
const T = (await An(n.tokenAuth)).response.data;
|
7863
7866
|
a.value = T.virtualHost, c.value = T.appChat.id, e("not-viewed-total", T.appChat.totalNoVistosCliente), i.value = T.appChat.totalNoVistosCliente, m(), g();
|
7864
7867
|
}
|
7865
7868
|
});
|
@@ -7912,7 +7915,7 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
7912
7915
|
life: 5e3
|
7913
7916
|
});
|
7914
7917
|
} finally {
|
7915
|
-
r.value = "",
|
7918
|
+
r.value = "", O();
|
7916
7919
|
}
|
7917
7920
|
}, p = async (I, T) => Lo({
|
7918
7921
|
esCliente: !0,
|
@@ -7929,7 +7932,7 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
7929
7932
|
}, fe = await Vo({ body: ke, token: n.tokenAuth });
|
7930
7933
|
o.value.data.unshift(
|
7931
7934
|
...fe.data.sort((me, It) => -It.createdAt.localeCompare(me.createdAt))
|
7932
|
-
), o.value.canLoadMoreMessages = fe.pagination.total > fe.pagination.limit, A && ((T = l.value) != null && T.scrollHeight) && C((R = l.value) == null ? void 0 : R.scrollHeight), A ||
|
7935
|
+
), o.value.canLoadMoreMessages = fe.pagination.total > fe.pagination.limit, A && ((T = l.value) != null && T.scrollHeight) && C((R = l.value) == null ? void 0 : R.scrollHeight), A || O();
|
7933
7936
|
} catch (A) {
|
7934
7937
|
throw u.value = !1, A;
|
7935
7938
|
} finally {
|
@@ -7955,7 +7958,7 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
7955
7958
|
life: 5e3
|
7956
7959
|
});
|
7957
7960
|
} finally {
|
7958
|
-
|
7961
|
+
O();
|
7959
7962
|
}
|
7960
7963
|
});
|
7961
7964
|
}, g = (I = "webchat") => {
|
@@ -7968,39 +7971,39 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
7968
7971
|
`${T}`,
|
7969
7972
|
`widget_chat_${sessionStorage.getItem("tabBrowser")}`
|
7970
7973
|
), s.value.connect(), s.value.subscribe(async (A) => {
|
7971
|
-
A.event && A.event === ms.NEW_MESSAGE && !A.message.esCliente && (o.value.data.push(A.message), n.visible === !0 &&
|
7974
|
+
A.event && A.event === ms.NEW_MESSAGE && !A.message.esCliente && (o.value.data.push(A.message), n.visible === !0 && Fn(c.value, n.tokenAuth), n.visible === !1 && (i.value = i.value + 1, e("new-message")));
|
7972
7975
|
});
|
7973
|
-
},
|
7974
|
-
|
7976
|
+
}, O = () => {
|
7977
|
+
Sn(() => {
|
7975
7978
|
l.value && (l.value.scrollTop = l.value.scrollHeight);
|
7976
7979
|
});
|
7977
7980
|
}, C = (I) => {
|
7978
|
-
|
7981
|
+
Sn(() => {
|
7979
7982
|
const T = l.value;
|
7980
7983
|
T && (T.scrollTop = T.scrollHeight - I);
|
7981
7984
|
});
|
7982
|
-
}, D =
|
7985
|
+
}, D = B();
|
7983
7986
|
function ne() {
|
7984
7987
|
D.value && (D.value.style.height = "auto", D.value.style.height = D.value.scrollHeight === 54 ? D.value.scrollHeight - 12 + "px" : D.value.scrollHeight + "px");
|
7985
7988
|
}
|
7986
|
-
return (I, T) => (
|
7987
|
-
|
7988
|
-
|
7989
|
-
|
7989
|
+
return (I, T) => (W(), U("div", yu, [
|
7990
|
+
E("div", pu, [
|
7991
|
+
E("h4", gu, Ue(t.titlePrincipal), 1),
|
7992
|
+
E("button", {
|
7990
7993
|
onClick: T[0] || (T[0] = () => t.toggleChat()),
|
7991
7994
|
class: "btn-close"
|
7992
7995
|
}, [
|
7993
7996
|
ge(di, { class: "pointer" })
|
7994
7997
|
])
|
7995
7998
|
]),
|
7996
|
-
|
7999
|
+
E("div", {
|
7997
8000
|
class: "messages-container",
|
7998
8001
|
ref_key: "messageContainerRef",
|
7999
8002
|
ref: l
|
8000
8003
|
}, [
|
8001
|
-
u.value ? (
|
8004
|
+
u.value ? (W(), U("div", wu, [
|
8002
8005
|
ge(fu)
|
8003
|
-
])) :
|
8006
|
+
])) : sn("", !0),
|
8004
8007
|
ge(ou, {
|
8005
8008
|
messages: o.value.data,
|
8006
8009
|
canLoadMoreMessages: o.value.canLoadMoreMessages,
|
@@ -8008,14 +8011,14 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
8008
8011
|
onRetry: f
|
8009
8012
|
}, null, 8, ["messages", "canLoadMoreMessages"])
|
8010
8013
|
], 512),
|
8011
|
-
|
8012
|
-
|
8014
|
+
E("div", Su, [
|
8015
|
+
E("form", {
|
8013
8016
|
class: "message-send",
|
8014
8017
|
onSubmit: Br(h, ["prevent"])
|
8015
8018
|
}, [
|
8016
|
-
|
8017
|
-
|
8018
|
-
zt(
|
8019
|
+
E("div", ku, [
|
8020
|
+
E("div", Tu, [
|
8021
|
+
zt(E("textarea", {
|
8019
8022
|
"onUpdate:modelValue": T[1] || (T[1] = (R) => r.value = R),
|
8020
8023
|
class: "jl2-input-chat",
|
8021
8024
|
required: "",
|
@@ -8025,7 +8028,7 @@ const yu = { class: "widget" }, pu = { class: "header-widget" }, gu = { class: "
|
|
8025
8028
|
}, null, 544), [
|
8026
8029
|
[Pr, r.value]
|
8027
8030
|
]),
|
8028
|
-
|
8031
|
+
E("button", _u, [
|
8029
8032
|
ge(gi, { style: { width: "20px", height: "20px" } })
|
8030
8033
|
])
|
8031
8034
|
])
|
@@ -8045,7 +8048,7 @@ const Eu = /* @__PURE__ */ he(Ou, [["__scopeId", "data-v-ce8f6ad6"]]), vu = {},
|
|
8045
8048
|
Nu
|
8046
8049
|
];
|
8047
8050
|
function xu(t, e) {
|
8048
|
-
return
|
8051
|
+
return W(), U("svg", Cu, Iu);
|
8049
8052
|
}
|
8050
8053
|
const Du = /* @__PURE__ */ he(vu, [["render", xu]]), Mu = {
|
8051
8054
|
key: 0,
|
@@ -8066,23 +8069,23 @@ const Du = /* @__PURE__ */ he(vu, [["render", xu]]), Mu = {
|
|
8066
8069
|
},
|
8067
8070
|
emits: ["show-toast", "show-confirm"],
|
8068
8071
|
setup(t, { emit: e }) {
|
8069
|
-
const n =
|
8072
|
+
const n = B(!1), s = B(0), r = () => {
|
8070
8073
|
n.value = !n.value;
|
8071
8074
|
};
|
8072
|
-
return (i, o) => (
|
8075
|
+
return (i, o) => (W(), U("div", {
|
8073
8076
|
class: it(["widget-css-reset widget-container", t.isDarkMode ? "chat-dark-mode" : ""])
|
8074
8077
|
}, [
|
8075
|
-
zt(
|
8078
|
+
zt(E("div", {
|
8076
8079
|
id: "chat-circle",
|
8077
8080
|
onClick: r,
|
8078
8081
|
class: "widget-container"
|
8079
8082
|
}, [
|
8080
|
-
s.value ? (
|
8083
|
+
s.value ? (W(), U("div", Mu, Ue(s.value > 9 ? "9+" : s.value), 1)) : sn("", !0),
|
8081
8084
|
ge(Du)
|
8082
8085
|
], 512), [
|
8083
|
-
[
|
8086
|
+
[bn, !n.value]
|
8084
8087
|
]),
|
8085
|
-
zt(
|
8088
|
+
zt(E("div", Au, [
|
8086
8089
|
ge(Eu, {
|
8087
8090
|
visible: n.value,
|
8088
8091
|
titlePrincipal: t.titlePrincipal,
|
@@ -8096,7 +8099,7 @@ const Du = /* @__PURE__ */ he(vu, [["render", xu]]), Mu = {
|
|
8096
8099
|
onNotViewedTotal: o[4] || (o[4] = (a) => s.value = a)
|
8097
8100
|
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])
|
8098
8101
|
], 512), [
|
8099
|
-
[
|
8102
|
+
[bn, n.value]
|
8100
8103
|
])
|
8101
8104
|
], 2));
|
8102
8105
|
}
|