vue-wiguet-chatweb 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Widget.vue.d.ts +11 -1
- package/dist/main.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/vue-wiguet-chatweb.js +668 -659
- package/dist/vue-wiguet-chatweb.umd.cjs +4 -4
- package/package.json +1 -1
- package/src/components/Chat.vue +1 -2
- package/src/components/MessageList.vue +56 -52
- package/src/components/Widget.vue +17 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { openBlock as L, createElementBlock as V, createElementVNode as
|
1
|
+
import { openBlock as L, createElementBlock as V, createElementVNode as E, getCurrentScope as Fr, onScopeDispose as Rr, unref as us, computed as ls, ref as z, watch as Xt, getCurrentInstance as Lr, onMounted as ds, defineComponent as en, onBeforeMount as Vr, Fragment as gn, renderList as Wr, normalizeClass as nt, createVNode as fe, createCommentVNode as tn, toDisplayString as Le, pushScopeId as Ur, popScopeId as $r, nextTick as wn, withModifiers as Br, withDirectives as Ht, vModelText as Hr, createStaticVNode as Pr, vShow as Sn } from "vue";
|
2
2
|
let qe;
|
3
3
|
const zr = new Uint8Array(16);
|
4
4
|
function Zr() {
|
@@ -12,12 +12,12 @@ for (let t = 0; t < 256; ++t)
|
|
12
12
|
function qr(t, e = 0) {
|
13
13
|
return F[t[e + 0]] + F[t[e + 1]] + F[t[e + 2]] + F[t[e + 3]] + "-" + F[t[e + 4]] + F[t[e + 5]] + "-" + F[t[e + 6]] + F[t[e + 7]] + "-" + F[t[e + 8]] + F[t[e + 9]] + "-" + F[t[e + 10]] + F[t[e + 11]] + F[t[e + 12]] + F[t[e + 13]] + F[t[e + 14]] + F[t[e + 15]];
|
14
14
|
}
|
15
|
-
const jr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
15
|
+
const jr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), bn = {
|
16
16
|
randomUUID: jr
|
17
17
|
};
|
18
18
|
function Gr(t, e, n) {
|
19
|
-
if (
|
20
|
-
return
|
19
|
+
if (bn.randomUUID && !e && !t)
|
20
|
+
return bn.randomUUID();
|
21
21
|
t = t || {};
|
22
22
|
const s = t.random || (t.rng || Zr)();
|
23
23
|
if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, e) {
|
@@ -144,7 +144,7 @@ class ae {
|
|
144
144
|
`).replace(/\\c/g, ":").replace(/\\\\/g, "\\");
|
145
145
|
}
|
146
146
|
}
|
147
|
-
const
|
147
|
+
const kn = 0, je = 10, Ge = 13, Qr = 58;
|
148
148
|
class Xr {
|
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 Xr {
|
|
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 !== kn && e !== Ge) {
|
167
167
|
if (e === je) {
|
168
168
|
this.onIncomingPing();
|
169
169
|
return;
|
@@ -216,7 +216,7 @@ class Xr {
|
|
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 === kn) {
|
220
220
|
this._retrievedBody();
|
221
221
|
return;
|
222
222
|
}
|
@@ -933,7 +933,7 @@ class si {
|
|
933
933
|
this.client.publish({ destination: `/queue/${this.queue}`, body: JSON.stringify({ data: e }) });
|
934
934
|
}
|
935
935
|
}
|
936
|
-
var
|
936
|
+
var hs = /* @__PURE__ */ ((t) => (t.NEW_MESSAGE = "new_message", t))(hs || {});
|
937
937
|
const ue = (t, e) => {
|
938
938
|
const n = t.__vccOpts || t;
|
939
939
|
for (const [s, r] of e)
|
@@ -945,11 +945,11 @@ const ue = (t, e) => {
|
|
945
945
|
viewBox: "0 0 32 32",
|
946
946
|
fill: "none",
|
947
947
|
xmlns: "http://www.w3.org/2000/svg"
|
948
|
-
}, oi = /* @__PURE__ */
|
948
|
+
}, oi = /* @__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), ai = /* @__PURE__ */
|
952
|
+
}, null, -1), ai = /* @__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), ci = [
|
@@ -962,7 +962,7 @@ function ui(t, e) {
|
|
962
962
|
const li = /* @__PURE__ */ ue(ri, [["render", ui]]), di = {}, hi = {
|
963
963
|
xmlns: "http://www.w3.org/2000/svg",
|
964
964
|
viewBox: "0 0 512 512"
|
965
|
-
}, fi = /* @__PURE__ */
|
965
|
+
}, fi = /* @__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), mi = [
|
@@ -972,31 +972,31 @@ function yi(t, e) {
|
|
972
972
|
return L(), V("svg", hi, mi);
|
973
973
|
}
|
974
974
|
const pi = /* @__PURE__ */ ue(di, [["render", yi]]);
|
975
|
-
function
|
975
|
+
function fs(t, e) {
|
976
976
|
return function() {
|
977
977
|
return t.apply(e, arguments);
|
978
978
|
};
|
979
979
|
}
|
980
|
-
const { toString: gi } = Object.prototype, { getPrototypeOf:
|
980
|
+
const { toString: gi } = Object.prototype, { getPrototypeOf: nn } = Object, mt = ((t) => (e) => {
|
981
981
|
const n = gi.call(e);
|
982
982
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
983
|
-
})(/* @__PURE__ */ Object.create(null)), X = (t) => (t = t.toLowerCase(), (e) =>
|
983
|
+
})(/* @__PURE__ */ Object.create(null)), X = (t) => (t = t.toLowerCase(), (e) => mt(e) === t), yt = (t) => (e) => typeof e === t, { isArray: Oe } = Array, We = yt("undefined");
|
984
984
|
function wi(t) {
|
985
985
|
return t !== null && !We(t) && t.constructor !== null && !We(t.constructor) && j(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
986
986
|
}
|
987
|
-
const
|
987
|
+
const ms = X("ArrayBuffer");
|
988
988
|
function Si(t) {
|
989
989
|
let e;
|
990
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
990
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ms(t.buffer), e;
|
991
991
|
}
|
992
|
-
const bi =
|
993
|
-
if (
|
992
|
+
const bi = yt("string"), j = yt("function"), ys = yt("number"), pt = (t) => t !== null && typeof t == "object", ki = (t) => t === !0 || t === !1, st = (t) => {
|
993
|
+
if (mt(t) !== "object")
|
994
994
|
return !1;
|
995
|
-
const e =
|
995
|
+
const e = nn(t);
|
996
996
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
997
|
-
}, Ti = X("Date"), _i = X("File"), Oi = X("Blob"), Ei = X("FileList"), vi = (t) =>
|
997
|
+
}, Ti = X("Date"), _i = X("File"), Oi = X("Blob"), Ei = X("FileList"), vi = (t) => pt(t) && j(t.pipe), Ci = (t) => {
|
998
998
|
let e;
|
999
|
-
return t && (typeof FormData == "function" && t instanceof FormData || j(t.append) && ((e =
|
999
|
+
return t && (typeof FormData == "function" && t instanceof FormData || j(t.append) && ((e = mt(t)) === "formdata" || // detect form-data instance
|
1000
1000
|
e === "object" && j(t.toString) && t.toString() === "[object FormData]"));
|
1001
1001
|
}, Ni = X("URLSearchParams"), Ii = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
1002
1002
|
function $e(t, e, { allOwnKeys: n = !1 } = {}) {
|
@@ -1013,7 +1013,7 @@ function $e(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
1013
1013
|
a = i[s], e.call(null, t[a], a, t);
|
1014
1014
|
}
|
1015
1015
|
}
|
1016
|
-
function
|
1016
|
+
function ps(t, e) {
|
1017
1017
|
e = e.toLowerCase();
|
1018
1018
|
const n = Object.keys(t);
|
1019
1019
|
let s = n.length, r;
|
@@ -1022,18 +1022,18 @@ function ys(t, e) {
|
|
1022
1022
|
return r;
|
1023
1023
|
return null;
|
1024
1024
|
}
|
1025
|
-
const
|
1026
|
-
function
|
1027
|
-
const { caseless: t } =
|
1028
|
-
const i = t &&
|
1029
|
-
|
1025
|
+
const gs = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ws = (t) => !We(t) && t !== gs;
|
1026
|
+
function Pt() {
|
1027
|
+
const { caseless: t } = ws(this) && this || {}, e = {}, n = (s, r) => {
|
1028
|
+
const i = t && ps(e, r) || r;
|
1029
|
+
st(e[i]) && st(s) ? e[i] = Pt(e[i], s) : st(s) ? e[i] = Pt({}, s) : Oe(s) ? e[i] = s.slice() : e[i] = s;
|
1030
1030
|
};
|
1031
1031
|
for (let s = 0, r = arguments.length; s < r; s++)
|
1032
1032
|
arguments[s] && $e(arguments[s], n);
|
1033
1033
|
return e;
|
1034
1034
|
}
|
1035
1035
|
const Di = (t, e, n, { allOwnKeys: s } = {}) => ($e(e, (r, i) => {
|
1036
|
-
n && j(r) ? t[i] =
|
1036
|
+
n && j(r) ? t[i] = fs(r, n) : t[i] = r;
|
1037
1037
|
}, { allOwnKeys: s }), t), xi = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Mi = (t, e, n, s) => {
|
1038
1038
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
1039
1039
|
value: e.prototype
|
@@ -1046,7 +1046,7 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => ($e(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 && nn(t);
|
1050
1050
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
1051
1051
|
return e;
|
1052
1052
|
}, Fi = (t, e, n) => {
|
@@ -1059,13 +1059,13 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => ($e(e, (r, i) => {
|
|
1059
1059
|
if (Oe(t))
|
1060
1060
|
return t;
|
1061
1061
|
let e = t.length;
|
1062
|
-
if (!
|
1062
|
+
if (!ys(e))
|
1063
1063
|
return null;
|
1064
1064
|
const n = new Array(e);
|
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" && nn(Uint8Array)), Vi = (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,13 +1083,13 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => ($e(e, (r, i) => {
|
|
1083
1083
|
function(n, s, r) {
|
1084
1084
|
return s.toUpperCase() + r;
|
1085
1085
|
}
|
1086
|
-
),
|
1086
|
+
), Tn = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Bi = X("RegExp"), Ss = (t, e) => {
|
1087
1087
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
1088
1088
|
$e(n, (r, i) => {
|
1089
1089
|
e(r, i, t) !== !1 && (s[i] = r);
|
1090
1090
|
}), Object.defineProperties(t, s);
|
1091
|
-
},
|
1092
|
-
|
1091
|
+
}, Hi = (t) => {
|
1092
|
+
Ss(t, (e, n) => {
|
1093
1093
|
if (j(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
1094
1094
|
return !1;
|
1095
1095
|
const s = t[n];
|
@@ -1111,11 +1111,11 @@ const Di = (t, e, n, { allOwnKeys: s } = {}) => ($e(e, (r, i) => {
|
|
1111
1111
|
};
|
1112
1112
|
return Oe(t) ? s(t) : s(String(t).split(e)), n;
|
1113
1113
|
}, zi = () => {
|
1114
|
-
}, Zi = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Nt = "abcdefghijklmnopqrstuvwxyz",
|
1115
|
-
DIGIT:
|
1114
|
+
}, Zi = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Nt = "abcdefghijklmnopqrstuvwxyz", _n = "0123456789", bs = {
|
1115
|
+
DIGIT: _n,
|
1116
1116
|
ALPHA: Nt,
|
1117
|
-
ALPHA_DIGIT: Nt + Nt.toUpperCase() +
|
1118
|
-
}, qi = (t = 16, e =
|
1117
|
+
ALPHA_DIGIT: Nt + Nt.toUpperCase() + _n
|
1118
|
+
}, qi = (t = 16, e = bs.ALPHA_DIGIT) => {
|
1119
1119
|
let n = "";
|
1120
1120
|
const { length: s } = e;
|
1121
1121
|
for (; t--; )
|
@@ -1127,7 +1127,7 @@ function ji(t) {
|
|
1127
1127
|
}
|
1128
1128
|
const Gi = (t) => {
|
1129
1129
|
const e = new Array(10), n = (s, r) => {
|
1130
|
-
if (
|
1130
|
+
if (pt(s)) {
|
1131
1131
|
if (e.indexOf(s) >= 0)
|
1132
1132
|
return;
|
1133
1133
|
if (!("toJSON" in s)) {
|
@@ -1142,54 +1142,54 @@ const Gi = (t) => {
|
|
1142
1142
|
return s;
|
1143
1143
|
};
|
1144
1144
|
return n(t, 0);
|
1145
|
-
}, Yi = X("AsyncFunction"), Ji = (t) => t && (
|
1145
|
+
}, Yi = X("AsyncFunction"), Ji = (t) => t && (pt(t) || j(t)) && j(t.then) && j(t.catch), d = {
|
1146
1146
|
isArray: Oe,
|
1147
|
-
isArrayBuffer:
|
1147
|
+
isArrayBuffer: ms,
|
1148
1148
|
isBuffer: wi,
|
1149
1149
|
isFormData: Ci,
|
1150
1150
|
isArrayBufferView: Si,
|
1151
1151
|
isString: bi,
|
1152
|
-
isNumber:
|
1152
|
+
isNumber: ys,
|
1153
1153
|
isBoolean: ki,
|
1154
|
-
isObject:
|
1155
|
-
isPlainObject:
|
1154
|
+
isObject: pt,
|
1155
|
+
isPlainObject: st,
|
1156
1156
|
isUndefined: We,
|
1157
1157
|
isDate: Ti,
|
1158
1158
|
isFile: _i,
|
1159
1159
|
isBlob: Oi,
|
1160
|
-
isRegExp:
|
1160
|
+
isRegExp: Bi,
|
1161
1161
|
isFunction: j,
|
1162
1162
|
isStream: vi,
|
1163
1163
|
isURLSearchParams: Ni,
|
1164
1164
|
isTypedArray: Li,
|
1165
1165
|
isFileList: Ei,
|
1166
1166
|
forEach: $e,
|
1167
|
-
merge:
|
1167
|
+
merge: Pt,
|
1168
1168
|
extend: Di,
|
1169
1169
|
trim: Ii,
|
1170
1170
|
stripBOM: xi,
|
1171
1171
|
inherits: Mi,
|
1172
1172
|
toFlatObject: Ai,
|
1173
|
-
kindOf:
|
1173
|
+
kindOf: mt,
|
1174
1174
|
kindOfTest: X,
|
1175
1175
|
endsWith: Fi,
|
1176
1176
|
toArray: Ri,
|
1177
1177
|
forEachEntry: Vi,
|
1178
1178
|
matchAll: Wi,
|
1179
1179
|
isHTMLForm: Ui,
|
1180
|
-
hasOwnProperty:
|
1181
|
-
hasOwnProp:
|
1180
|
+
hasOwnProperty: Tn,
|
1181
|
+
hasOwnProp: Tn,
|
1182
1182
|
// an alias to avoid ESLint no-prototype-builtins detection
|
1183
|
-
reduceDescriptors:
|
1184
|
-
freezeMethods:
|
1183
|
+
reduceDescriptors: Ss,
|
1184
|
+
freezeMethods: Hi,
|
1185
1185
|
toObjectSet: Pi,
|
1186
1186
|
toCamelCase: $i,
|
1187
1187
|
noop: zi,
|
1188
1188
|
toFiniteNumber: Zi,
|
1189
|
-
findKey:
|
1190
|
-
global:
|
1191
|
-
isContextDefined:
|
1192
|
-
ALPHABET:
|
1189
|
+
findKey: ps,
|
1190
|
+
global: gs,
|
1191
|
+
isContextDefined: ws,
|
1192
|
+
ALPHABET: bs,
|
1193
1193
|
generateString: qi,
|
1194
1194
|
isSpecCompliantForm: ji,
|
1195
1195
|
toJSONObject: Gi,
|
@@ -1220,7 +1220,7 @@ d.inherits(_, Error, {
|
|
1220
1220
|
};
|
1221
1221
|
}
|
1222
1222
|
});
|
1223
|
-
const
|
1223
|
+
const ks = _.prototype, Ts = {};
|
1224
1224
|
[
|
1225
1225
|
"ERR_BAD_OPTION_VALUE",
|
1226
1226
|
"ERR_BAD_OPTION",
|
@@ -1236,35 +1236,35 @@ const bs = _.prototype, ks = {};
|
|
1236
1236
|
"ERR_INVALID_URL"
|
1237
1237
|
// eslint-disable-next-line func-names
|
1238
1238
|
].forEach((t) => {
|
1239
|
-
|
1239
|
+
Ts[t] = { value: t };
|
1240
1240
|
});
|
1241
|
-
Object.defineProperties(_,
|
1242
|
-
Object.defineProperty(
|
1241
|
+
Object.defineProperties(_, Ts);
|
1242
|
+
Object.defineProperty(ks, "isAxiosError", { value: !0 });
|
1243
1243
|
_.from = (t, e, n, s, r, i) => {
|
1244
|
-
const o = Object.create(
|
1244
|
+
const o = Object.create(ks);
|
1245
1245
|
return d.toFlatObject(t, o, function(c) {
|
1246
1246
|
return c !== Error.prototype;
|
1247
1247
|
}, (a) => a !== "isAxiosError"), _.call(o, t.message, e, n, s, r), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
1248
1248
|
};
|
1249
1249
|
const Ki = null;
|
1250
|
-
function
|
1250
|
+
function zt(t) {
|
1251
1251
|
return d.isPlainObject(t) || d.isArray(t);
|
1252
1252
|
}
|
1253
|
-
function
|
1253
|
+
function _s(t) {
|
1254
1254
|
return d.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
1255
1255
|
}
|
1256
|
-
function
|
1256
|
+
function On(t, e, n) {
|
1257
1257
|
return t ? t.concat(e).map(function(r, i) {
|
1258
|
-
return r =
|
1258
|
+
return r = _s(r), !n && i ? "[" + r + "]" : r;
|
1259
1259
|
}).join(n ? "." : "") : e;
|
1260
1260
|
}
|
1261
1261
|
function Qi(t) {
|
1262
|
-
return d.isArray(t) && !t.some(
|
1262
|
+
return d.isArray(t) && !t.some(zt);
|
1263
1263
|
}
|
1264
1264
|
const Xi = d.toFlatObject(d, {}, null, function(e) {
|
1265
1265
|
return /^is[A-Z]/.test(e);
|
1266
1266
|
});
|
1267
|
-
function
|
1267
|
+
function gt(t, e, n) {
|
1268
1268
|
if (!d.isObject(t))
|
1269
1269
|
throw new TypeError("target must be an object");
|
1270
1270
|
e = e || new FormData(), n = d.toFlatObject(n, {
|
@@ -1292,20 +1292,20 @@ function pt(t, e, n) {
|
|
1292
1292
|
if (d.endsWith(p, "{}"))
|
1293
1293
|
p = s ? p : p.slice(0, -2), f = JSON.stringify(f);
|
1294
1294
|
else if (d.isArray(f) && Qi(f) || (d.isFileList(f) || d.endsWith(p, "[]")) && (b = d.toArray(f)))
|
1295
|
-
return p =
|
1295
|
+
return p = _s(p), b.forEach(function(N, D) {
|
1296
1296
|
!(d.isUndefined(N) || N === null) && e.append(
|
1297
1297
|
// eslint-disable-next-line no-nested-ternary
|
1298
|
-
o === !0 ?
|
1298
|
+
o === !0 ? On([p], D, i) : o === null ? p : p + "[]",
|
1299
1299
|
u(N)
|
1300
1300
|
);
|
1301
1301
|
}), !1;
|
1302
1302
|
}
|
1303
|
-
return
|
1303
|
+
return zt(f) ? !0 : (e.append(On(C, p, i), u(f)), !1);
|
1304
1304
|
}
|
1305
1305
|
const h = [], g = Object.assign(Xi, {
|
1306
1306
|
defaultVisitor: l,
|
1307
1307
|
convertValue: u,
|
1308
|
-
isVisitable:
|
1308
|
+
isVisitable: zt
|
1309
1309
|
});
|
1310
1310
|
function m(f, p) {
|
1311
1311
|
if (!d.isUndefined(f)) {
|
@@ -1326,7 +1326,7 @@ function pt(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 En(t) {
|
1330
1330
|
const e = {
|
1331
1331
|
"!": "%21",
|
1332
1332
|
"'": "%27",
|
@@ -1340,17 +1340,17 @@ function _n(t) {
|
|
1340
1340
|
return e[s];
|
1341
1341
|
});
|
1342
1342
|
}
|
1343
|
-
function
|
1344
|
-
this._pairs = [], t &&
|
1343
|
+
function sn(t, e) {
|
1344
|
+
this._pairs = [], t && gt(t, this, e);
|
1345
1345
|
}
|
1346
|
-
const
|
1347
|
-
|
1346
|
+
const Os = sn.prototype;
|
1347
|
+
Os.append = function(e, n) {
|
1348
1348
|
this._pairs.push([e, n]);
|
1349
1349
|
};
|
1350
|
-
|
1350
|
+
Os.toString = function(e) {
|
1351
1351
|
const n = e ? function(s) {
|
1352
|
-
return e.call(this, s,
|
1353
|
-
} :
|
1352
|
+
return e.call(this, s, En);
|
1353
|
+
} : En;
|
1354
1354
|
return this._pairs.map(function(r) {
|
1355
1355
|
return n(r[0]) + "=" + n(r[1]);
|
1356
1356
|
}, "").join("&");
|
@@ -1358,12 +1358,12 @@ _s.toString = function(e) {
|
|
1358
1358
|
function eo(t) {
|
1359
1359
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
1360
1360
|
}
|
1361
|
-
function
|
1361
|
+
function Es(t, e, n) {
|
1362
1362
|
if (!e)
|
1363
1363
|
return t;
|
1364
1364
|
const s = n && n.encode || eo, 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 sn(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 to {
|
|
1423
1423
|
});
|
1424
1424
|
}
|
1425
1425
|
}
|
1426
|
-
const
|
1426
|
+
const vn = to, vs = {
|
1427
1427
|
silentJSONParsing: !0,
|
1428
1428
|
forcedJSONParsing: !0,
|
1429
1429
|
clarifyTimeoutError: !1
|
1430
|
-
}, no = typeof URLSearchParams < "u" ? URLSearchParams :
|
1430
|
+
}, no = typeof URLSearchParams < "u" ? URLSearchParams : sn, so = typeof FormData < "u" ? FormData : null, ro = typeof Blob < "u" ? Blob : null, io = (() => {
|
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
|
})(), oo = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
@@ -1443,7 +1443,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
1443
1443
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
1444
1444
|
};
|
1445
1445
|
function ao(t, e) {
|
1446
|
-
return
|
1446
|
+
return gt(t, new Q.classes.URLSearchParams(), Object.assign({
|
1447
1447
|
visitor: function(n, s, r, i) {
|
1448
1448
|
return Q.isNode && d.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
1449
1449
|
}
|
@@ -1461,7 +1461,7 @@ function uo(t) {
|
|
1461
1461
|
i = n[s], e[i] = t[i];
|
1462
1462
|
return e;
|
1463
1463
|
}
|
1464
|
-
function
|
1464
|
+
function Cs(t) {
|
1465
1465
|
function e(n, s, r, i) {
|
1466
1466
|
let o = n[i++];
|
1467
1467
|
const a = Number.isFinite(+o), c = i >= n.length;
|
@@ -1488,13 +1488,13 @@ function ho(t, e, n) {
|
|
1488
1488
|
}
|
1489
1489
|
return (n || JSON.stringify)(t);
|
1490
1490
|
}
|
1491
|
-
const
|
1492
|
-
transitional:
|
1491
|
+
const wt = {
|
1492
|
+
transitional: vs,
|
1493
1493
|
adapter: ["xhr", "http"],
|
1494
1494
|
transformRequest: [function(e, n) {
|
1495
1495
|
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, i = d.isObject(e);
|
1496
1496
|
if (i && d.isHTMLForm(e) && (e = new FormData(e)), d.isFormData(e))
|
1497
|
-
return r && r ? JSON.stringify(
|
1497
|
+
return r && r ? JSON.stringify(Cs(e)) : e;
|
1498
1498
|
if (d.isArrayBuffer(e) || d.isBuffer(e) || d.isStream(e) || d.isFile(e) || d.isBlob(e))
|
1499
1499
|
return e;
|
1500
1500
|
if (d.isArrayBufferView(e))
|
@@ -1507,7 +1507,7 @@ const gt = {
|
|
1507
1507
|
return ao(e, this.formSerializer).toString();
|
1508
1508
|
if ((a = d.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
1509
1509
|
const c = this.env && this.env.FormData;
|
1510
|
-
return
|
1510
|
+
return gt(
|
1511
1511
|
a ? { "files[]": e } : e,
|
1512
1512
|
c && new c(),
|
1513
1513
|
this.formSerializer
|
@@ -1517,7 +1517,7 @@ const gt = {
|
|
1517
1517
|
return i || r ? (n.setContentType("application/json", !1), ho(e)) : e;
|
1518
1518
|
}],
|
1519
1519
|
transformResponse: [function(e) {
|
1520
|
-
const n = this.transitional ||
|
1520
|
+
const n = this.transitional || wt.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
1521
1521
|
if (e && d.isString(e) && (s && !this.responseType || r)) {
|
1522
1522
|
const o = !(n && n.silentJSONParsing) && r;
|
1523
1523
|
try {
|
@@ -1552,12 +1552,12 @@ const gt = {
|
|
1552
1552
|
}
|
1553
1553
|
};
|
1554
1554
|
d.forEach(["delete", "get", "head"], function(e) {
|
1555
|
-
|
1555
|
+
wt.headers[e] = {};
|
1556
1556
|
});
|
1557
1557
|
d.forEach(["post", "put", "patch"], function(e) {
|
1558
|
-
|
1558
|
+
wt.headers[e] = d.merge(lo);
|
1559
1559
|
});
|
1560
|
-
const
|
1560
|
+
const rn = wt, fo = d.toObjectSet([
|
1561
1561
|
"age",
|
1562
1562
|
"authorization",
|
1563
1563
|
"content-length",
|
@@ -1582,12 +1582,12 @@ const sn = gt, fo = 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] && fo[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
|
+
}, Cn = Symbol("internals");
|
1586
1586
|
function xe(t) {
|
1587
1587
|
return t && String(t).trim().toLowerCase();
|
1588
1588
|
}
|
1589
|
-
function
|
1590
|
-
return t === !1 || t == null ? t : d.isArray(t) ? t.map(
|
1589
|
+
function rt(t) {
|
1590
|
+
return t === !1 || t == null ? t : d.isArray(t) ? t.map(rt) : String(t);
|
1591
1591
|
}
|
1592
1592
|
function yo(t) {
|
1593
1593
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
@@ -1621,7 +1621,7 @@ function wo(t, e) {
|
|
1621
1621
|
});
|
1622
1622
|
});
|
1623
1623
|
}
|
1624
|
-
class
|
1624
|
+
class St {
|
1625
1625
|
constructor(e) {
|
1626
1626
|
e && this.set(e);
|
1627
1627
|
}
|
@@ -1632,7 +1632,7 @@ class wt {
|
|
1632
1632
|
if (!l)
|
1633
1633
|
throw new Error("header name must be a non-empty string");
|
1634
1634
|
const h = d.findKey(r, l);
|
1635
|
-
(!h || r[h] === void 0 || u === !0 || u === void 0 && r[h] !== !1) && (r[h || c] =
|
1635
|
+
(!h || r[h] === void 0 || u === !0 || u === void 0 && r[h] !== !1) && (r[h || c] = rt(a));
|
1636
1636
|
}
|
1637
1637
|
const o = (a, c) => d.forEach(a, (u, l) => i(u, l, c));
|
1638
1638
|
return d.isPlainObject(e) || e instanceof this.constructor ? o(e, n) : d.isString(e) && (e = e.trim()) && !po(e) ? o(mo(e), n) : e != null && i(n, e, s), this;
|
@@ -1686,11 +1686,11 @@ class wt {
|
|
1686
1686
|
return d.forEach(this, (r, i) => {
|
1687
1687
|
const o = d.findKey(s, i);
|
1688
1688
|
if (o) {
|
1689
|
-
n[o] =
|
1689
|
+
n[o] = rt(r), delete n[i];
|
1690
1690
|
return;
|
1691
1691
|
}
|
1692
1692
|
const a = e ? go(i) : String(i).trim();
|
1693
|
-
a !== i && delete n[i], n[a] =
|
1693
|
+
a !== i && delete n[i], n[a] = rt(r), s[a] = !0;
|
1694
1694
|
}), this;
|
1695
1695
|
}
|
1696
1696
|
concat(...e) {
|
@@ -1720,7 +1720,7 @@ class wt {
|
|
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[Cn] = this[Cn] = {
|
1724
1724
|
accessors: {}
|
1725
1725
|
}).accessors, r = this.prototype;
|
1726
1726
|
function i(o) {
|
@@ -1730,24 +1730,24 @@ class wt {
|
|
1730
1730
|
return d.isArray(e) ? e.forEach(i) : i(e), this;
|
1731
1731
|
}
|
1732
1732
|
}
|
1733
|
-
|
1734
|
-
d.freezeMethods(
|
1735
|
-
d.freezeMethods(
|
1736
|
-
const te =
|
1733
|
+
St.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
1734
|
+
d.freezeMethods(St.prototype);
|
1735
|
+
d.freezeMethods(St);
|
1736
|
+
const te = St;
|
1737
1737
|
function Dt(t, e) {
|
1738
|
-
const n = this ||
|
1738
|
+
const n = this || rn, s = e || n, r = te.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);
|
1742
1742
|
}), r.normalize(), i;
|
1743
1743
|
}
|
1744
|
-
function
|
1744
|
+
function Ns(t) {
|
1745
1745
|
return !!(t && t.__CANCEL__);
|
1746
1746
|
}
|
1747
|
-
function
|
1747
|
+
function Be(t, e, n) {
|
1748
1748
|
_.call(this, t ?? "canceled", _.ERR_CANCELED, e, n), this.name = "CanceledError";
|
1749
1749
|
}
|
1750
|
-
d.inherits(
|
1750
|
+
d.inherits(Be, _, {
|
1751
1751
|
__CANCEL__: !0
|
1752
1752
|
});
|
1753
1753
|
function So(t, e, n) {
|
@@ -1797,7 +1797,7 @@ function ko(t) {
|
|
1797
1797
|
function To(t, e) {
|
1798
1798
|
return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
1799
1799
|
}
|
1800
|
-
function
|
1800
|
+
function Is(t, e) {
|
1801
1801
|
return t && !ko(e) ? To(t, e) : e;
|
1802
1802
|
}
|
1803
1803
|
const _o = Q.isStandardBrowserEnv ? (
|
@@ -1852,7 +1852,7 @@ function Eo(t, e) {
|
|
1852
1852
|
return m ? Math.round(g * 1e3 / m) : void 0;
|
1853
1853
|
};
|
1854
1854
|
}
|
1855
|
-
function
|
1855
|
+
function Nn(t, e) {
|
1856
1856
|
let n = 0;
|
1857
1857
|
const s = Eo(50, 250);
|
1858
1858
|
return (r) => {
|
@@ -1884,8 +1884,8 @@ const vo = typeof XMLHttpRequest < "u", Co = vo && function(t) {
|
|
1884
1884
|
const m = t.auth.username || "", f = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
|
1885
1885
|
i.set("Authorization", "Basic " + btoa(m + ":" + f));
|
1886
1886
|
}
|
1887
|
-
const l =
|
1888
|
-
u.open(t.method.toUpperCase(),
|
1887
|
+
const l = Is(t.baseURL, t.url);
|
1888
|
+
u.open(t.method.toUpperCase(), Es(l, t.params, t.paramsSerializer), !0), u.timeout = t.timeout;
|
1889
1889
|
function h() {
|
1890
1890
|
if (!u)
|
1891
1891
|
return;
|
@@ -1913,7 +1913,7 @@ const vo = typeof XMLHttpRequest < "u", Co = vo && function(t) {
|
|
1913
1913
|
s(new _("Network Error", _.ERR_NETWORK, t, u)), u = null;
|
1914
1914
|
}, u.ontimeout = function() {
|
1915
1915
|
let f = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
|
1916
|
-
const p = t.transitional ||
|
1916
|
+
const p = t.transitional || vs;
|
1917
1917
|
t.timeoutErrorMessage && (f = t.timeoutErrorMessage), s(new _(
|
1918
1918
|
f,
|
1919
1919
|
p.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
|
@@ -1926,8 +1926,8 @@ const vo = typeof XMLHttpRequest < "u", Co = vo && function(t) {
|
|
1926
1926
|
}
|
1927
1927
|
r === void 0 && i.setContentType(null), "setRequestHeader" in u && d.forEach(i.toJSON(), function(f, p) {
|
1928
1928
|
u.setRequestHeader(p, f);
|
1929
|
-
}), d.isUndefined(t.withCredentials) || (u.withCredentials = !!t.withCredentials), o && o !== "json" && (u.responseType = t.responseType), typeof t.onDownloadProgress == "function" && u.addEventListener("progress",
|
1930
|
-
u && (s(!m || m.type ? new
|
1929
|
+
}), d.isUndefined(t.withCredentials) || (u.withCredentials = !!t.withCredentials), o && o !== "json" && (u.responseType = t.responseType), typeof t.onDownloadProgress == "function" && u.addEventListener("progress", Nn(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Nn(t.onUploadProgress)), (t.cancelToken || t.signal) && (a = (m) => {
|
1930
|
+
u && (s(!m || m.type ? new Be(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 g = Oo(l);
|
1933
1933
|
if (g && Q.protocols.indexOf(g) === -1) {
|
@@ -1936,11 +1936,11 @@ const vo = typeof XMLHttpRequest < "u", Co = vo && function(t) {
|
|
1936
1936
|
}
|
1937
1937
|
u.send(r || null);
|
1938
1938
|
});
|
1939
|
-
},
|
1939
|
+
}, it = {
|
1940
1940
|
http: Ki,
|
1941
1941
|
xhr: Co
|
1942
1942
|
};
|
1943
|
-
d.forEach(
|
1943
|
+
d.forEach(it, (t, e) => {
|
1944
1944
|
if (t) {
|
1945
1945
|
try {
|
1946
1946
|
Object.defineProperty(t, "name", { value: e });
|
@@ -1954,44 +1954,44 @@ const No = {
|
|
1954
1954
|
t = d.isArray(t) ? t : [t];
|
1955
1955
|
const { length: e } = t;
|
1956
1956
|
let n, s;
|
1957
|
-
for (let r = 0; r < e && (n = t[r], !(s = d.isString(n) ?
|
1957
|
+
for (let r = 0; r < e && (n = t[r], !(s = d.isString(n) ? it[n.toLowerCase()] : n)); r++)
|
1958
1958
|
;
|
1959
1959
|
if (!s)
|
1960
1960
|
throw s === !1 ? new _(
|
1961
1961
|
`Adapter ${n} is not supported by the environment`,
|
1962
1962
|
"ERR_NOT_SUPPORT"
|
1963
1963
|
) : new Error(
|
1964
|
-
d.hasOwnProp(
|
1964
|
+
d.hasOwnProp(it, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
1965
1965
|
);
|
1966
1966
|
if (!d.isFunction(s))
|
1967
1967
|
throw new TypeError("adapter is not a function");
|
1968
1968
|
return s;
|
1969
1969
|
},
|
1970
|
-
adapters:
|
1970
|
+
adapters: it
|
1971
1971
|
};
|
1972
1972
|
function xt(t) {
|
1973
1973
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
1974
|
-
throw new
|
1974
|
+
throw new Be(null, t);
|
1975
1975
|
}
|
1976
|
-
function
|
1976
|
+
function In(t) {
|
1977
1977
|
return xt(t), t.headers = te.from(t.headers), t.data = Dt.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), No.getAdapter(t.adapter ||
|
1980
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), No.getAdapter(t.adapter || rn.adapter)(t).then(function(s) {
|
1981
1981
|
return xt(t), s.data = Dt.call(
|
1982
1982
|
t,
|
1983
1983
|
t.transformResponse,
|
1984
1984
|
s
|
1985
1985
|
), s.headers = te.from(s.headers), s;
|
1986
1986
|
}, function(s) {
|
1987
|
-
return
|
1987
|
+
return Ns(s) || (xt(t), s && s.response && (s.response.data = Dt.call(
|
1988
1988
|
t,
|
1989
1989
|
t.transformResponse,
|
1990
1990
|
s.response
|
1991
1991
|
), s.response.headers = te.from(s.response.headers))), Promise.reject(s);
|
1992
1992
|
});
|
1993
1993
|
}
|
1994
|
-
const
|
1994
|
+
const Dn = (t) => t instanceof te ? t.toJSON() : t;
|
1995
1995
|
function Te(t, e) {
|
1996
1996
|
e = e || {};
|
1997
1997
|
const n = {};
|
@@ -2050,23 +2050,23 @@ function Te(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, g = h(t[l], e[l], l);
|
2057
2057
|
d.isUndefined(g) && h !== a || (n[l] = g);
|
2058
2058
|
}), n;
|
2059
2059
|
}
|
2060
|
-
const
|
2060
|
+
const Ds = "1.4.0", on = {};
|
2061
2061
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
2062
|
-
|
2062
|
+
on[t] = function(s) {
|
2063
2063
|
return typeof s === t || "a" + (e < 1 ? "n " : " ") + t;
|
2064
2064
|
};
|
2065
2065
|
});
|
2066
|
-
const
|
2067
|
-
|
2066
|
+
const xn = {};
|
2067
|
+
on.transitional = function(e, n, s) {
|
2068
2068
|
function r(i, o) {
|
2069
|
-
return "[Axios v" +
|
2069
|
+
return "[Axios v" + Ds + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
2070
2070
|
}
|
2071
2071
|
return (i, o, a) => {
|
2072
2072
|
if (e === !1)
|
@@ -2074,7 +2074,7 @@ rn.transitional = function(e, n, s) {
|
|
2074
2074
|
r(o, " has been removed" + (n ? " in " + n : "")),
|
2075
2075
|
_.ERR_DEPRECATED
|
2076
2076
|
);
|
2077
|
-
return n && !
|
2077
|
+
return n && !xn[o] && (xn[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"
|
@@ -2099,15 +2099,15 @@ function Io(t, e, n) {
|
|
2099
2099
|
throw new _("Unknown option " + i, _.ERR_BAD_OPTION);
|
2100
2100
|
}
|
2101
2101
|
}
|
2102
|
-
const
|
2102
|
+
const Zt = {
|
2103
2103
|
assertOptions: Io,
|
2104
|
-
validators:
|
2105
|
-
}, se =
|
2106
|
-
class
|
2104
|
+
validators: on
|
2105
|
+
}, se = Zt.validators;
|
2106
|
+
class ut {
|
2107
2107
|
constructor(e) {
|
2108
2108
|
this.defaults = e, this.interceptors = {
|
2109
|
-
request: new
|
2110
|
-
response: new
|
2109
|
+
request: new vn(),
|
2110
|
+
response: new vn()
|
2111
2111
|
};
|
2112
2112
|
}
|
2113
2113
|
/**
|
@@ -2121,13 +2121,13 @@ class ct {
|
|
2121
2121
|
request(e, n) {
|
2122
2122
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = Te(this.defaults, n);
|
2123
2123
|
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
2124
|
-
s !== void 0 &&
|
2124
|
+
s !== void 0 && Zt.assertOptions(s, {
|
2125
2125
|
silentJSONParsing: se.transitional(se.boolean),
|
2126
2126
|
forcedJSONParsing: se.transitional(se.boolean),
|
2127
2127
|
clarifyTimeoutError: se.transitional(se.boolean)
|
2128
2128
|
}, !1), r != null && (d.isFunction(r) ? n.paramsSerializer = {
|
2129
2129
|
serialize: r
|
2130
|
-
} :
|
2130
|
+
} : Zt.assertOptions(r, {
|
2131
2131
|
encode: se.function,
|
2132
2132
|
serialize: se.function
|
2133
2133
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
@@ -2152,7 +2152,7 @@ class ct {
|
|
2152
2152
|
});
|
2153
2153
|
let l, h = 0, g;
|
2154
2154
|
if (!c) {
|
2155
|
-
const f = [
|
2155
|
+
const f = [In.bind(this), void 0];
|
2156
2156
|
for (f.unshift.apply(f, a), f.push.apply(f, u), g = f.length, l = Promise.resolve(n); h < g; )
|
2157
2157
|
l = l.then(f[h++], f[h++]);
|
2158
2158
|
return l;
|
@@ -2169,7 +2169,7 @@ class ct {
|
|
2169
2169
|
}
|
2170
2170
|
}
|
2171
2171
|
try {
|
2172
|
-
l =
|
2172
|
+
l = In.call(this, m);
|
2173
2173
|
} catch (f) {
|
2174
2174
|
return Promise.reject(f);
|
2175
2175
|
}
|
@@ -2179,12 +2179,12 @@ class ct {
|
|
2179
2179
|
}
|
2180
2180
|
getUri(e) {
|
2181
2181
|
e = Te(this.defaults, e);
|
2182
|
-
const n =
|
2183
|
-
return
|
2182
|
+
const n = Is(e.baseURL, e.url);
|
2183
|
+
return Es(n, e.params, e.paramsSerializer);
|
2184
2184
|
}
|
2185
2185
|
}
|
2186
2186
|
d.forEach(["delete", "get", "head", "options"], function(e) {
|
2187
|
-
|
2187
|
+
ut.prototype[e] = function(n, s) {
|
2188
2188
|
return this.request(Te(s || {}, {
|
2189
2189
|
method: e,
|
2190
2190
|
url: n,
|
@@ -2205,10 +2205,10 @@ d.forEach(["post", "put", "patch"], function(e) {
|
|
2205
2205
|
}));
|
2206
2206
|
};
|
2207
2207
|
}
|
2208
|
-
|
2208
|
+
ut.prototype[e] = n(), ut.prototype[e + "Form"] = n(!0);
|
2209
2209
|
});
|
2210
|
-
const
|
2211
|
-
class
|
2210
|
+
const ot = ut;
|
2211
|
+
class an {
|
2212
2212
|
constructor(e) {
|
2213
2213
|
if (typeof e != "function")
|
2214
2214
|
throw new TypeError("executor must be a function.");
|
@@ -2233,7 +2233,7 @@ class on {
|
|
2233
2233
|
s.unsubscribe(i);
|
2234
2234
|
}, o;
|
2235
2235
|
}, e(function(i, o, a) {
|
2236
|
-
s.reason || (s.reason = new
|
2236
|
+
s.reason || (s.reason = new Be(i, o, a), n(s.reason));
|
2237
2237
|
});
|
2238
2238
|
}
|
2239
2239
|
/**
|
@@ -2269,14 +2269,14 @@ class on {
|
|
2269
2269
|
static source() {
|
2270
2270
|
let e;
|
2271
2271
|
return {
|
2272
|
-
token: new
|
2272
|
+
token: new an(function(r) {
|
2273
2273
|
e = r;
|
2274
2274
|
}),
|
2275
2275
|
cancel: e
|
2276
2276
|
};
|
2277
2277
|
}
|
2278
2278
|
}
|
2279
|
-
const Do =
|
2279
|
+
const Do = an;
|
2280
2280
|
function xo(t) {
|
2281
2281
|
return function(n) {
|
2282
2282
|
return t.apply(null, n);
|
@@ -2285,7 +2285,7 @@ function xo(t) {
|
|
2285
2285
|
function Mo(t) {
|
2286
2286
|
return d.isObject(t) && t.isAxiosError === !0;
|
2287
2287
|
}
|
2288
|
-
const
|
2288
|
+
const qt = {
|
2289
2289
|
Continue: 100,
|
2290
2290
|
SwitchingProtocols: 101,
|
2291
2291
|
Processing: 102,
|
@@ -2350,23 +2350,23 @@ const Zt = {
|
|
2350
2350
|
NotExtended: 510,
|
2351
2351
|
NetworkAuthenticationRequired: 511
|
2352
2352
|
};
|
2353
|
-
Object.entries(
|
2354
|
-
|
2353
|
+
Object.entries(qt).forEach(([t, e]) => {
|
2354
|
+
qt[e] = t;
|
2355
2355
|
});
|
2356
|
-
const Ao =
|
2357
|
-
function
|
2358
|
-
const e = new
|
2359
|
-
return d.extend(n,
|
2360
|
-
return
|
2356
|
+
const Ao = qt;
|
2357
|
+
function xs(t) {
|
2358
|
+
const e = new ot(t), n = fs(ot.prototype.request, e);
|
2359
|
+
return d.extend(n, ot.prototype, e, { allOwnKeys: !0 }), d.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(r) {
|
2360
|
+
return xs(Te(t, r));
|
2361
2361
|
}, n;
|
2362
2362
|
}
|
2363
|
-
const A =
|
2364
|
-
A.Axios =
|
2365
|
-
A.CanceledError =
|
2363
|
+
const A = xs(rn);
|
2364
|
+
A.Axios = ot;
|
2365
|
+
A.CanceledError = Be;
|
2366
2366
|
A.CancelToken = Do;
|
2367
|
-
A.isCancel =
|
2368
|
-
A.VERSION =
|
2369
|
-
A.toFormData =
|
2367
|
+
A.isCancel = Ns;
|
2368
|
+
A.VERSION = Ds;
|
2369
|
+
A.toFormData = gt;
|
2370
2370
|
A.AxiosError = _;
|
2371
2371
|
A.Cancel = A.CanceledError;
|
2372
2372
|
A.all = function(e) {
|
@@ -2376,10 +2376,10 @@ A.spread = xo;
|
|
2376
2376
|
A.isAxiosError = Mo;
|
2377
2377
|
A.mergeConfig = Te;
|
2378
2378
|
A.AxiosHeaders = te;
|
2379
|
-
A.formToJSON = (t) =>
|
2379
|
+
A.formToJSON = (t) => Cs(d.isHTMLForm(t) ? new FormData(t) : t);
|
2380
2380
|
A.HttpStatusCode = Ao;
|
2381
2381
|
A.default = A;
|
2382
|
-
const Fo = A,
|
2382
|
+
const Fo = A, cn = async function(t) {
|
2383
2383
|
const e = t, n = window.VITE_BACKEND_URL ? window.VITE_BACKEND_URL : "http://172.27.39.27:3000", s = {
|
2384
2384
|
method: e.method,
|
2385
2385
|
url: `${n}${e.url}`,
|
@@ -2402,17 +2402,17 @@ const Fo = A, an = async function(t) {
|
|
2402
2402
|
data: t.body,
|
2403
2403
|
token: t.token
|
2404
2404
|
};
|
2405
|
-
return await
|
2405
|
+
return await cn(e).then((n) => n.response).catch((n) => {
|
2406
2406
|
console.error(n);
|
2407
2407
|
});
|
2408
|
-
}, Lo = async (t, e) => await
|
2408
|
+
}, Lo = async (t, e) => await cn({
|
2409
2409
|
url: "/v1/message/send-message",
|
2410
2410
|
method: "POST",
|
2411
2411
|
data: t,
|
2412
2412
|
token: e
|
2413
2413
|
}).then((s) => s).catch((s) => {
|
2414
2414
|
console.error(s);
|
2415
|
-
}),
|
2415
|
+
}), Mn = async (t) => cn({
|
2416
2416
|
url: "/v1/app-chats/web-chat",
|
2417
2417
|
method: "GET",
|
2418
2418
|
token: t
|
@@ -2420,10 +2420,10 @@ const Fo = A, an = async function(t) {
|
|
2420
2420
|
console.error(n);
|
2421
2421
|
});
|
2422
2422
|
function Vo(t) {
|
2423
|
-
return
|
2423
|
+
return Fr() ? (Rr(t), !0) : !1;
|
2424
2424
|
}
|
2425
|
-
function
|
2426
|
-
return typeof t == "function" ? t() :
|
2425
|
+
function Ms(t) {
|
2426
|
+
return typeof t == "function" ? t() : us(t);
|
2427
2427
|
}
|
2428
2428
|
const Wo = typeof window < "u" && typeof document < "u";
|
2429
2429
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
@@ -2431,19 +2431,19 @@ const Uo = (t) => t != null, Mt = () => {
|
|
2431
2431
|
};
|
2432
2432
|
function At(t) {
|
2433
2433
|
var e;
|
2434
|
-
const n =
|
2434
|
+
const n = Ms(t);
|
2435
2435
|
return (e = n == null ? void 0 : n.$el) != null ? e : n;
|
2436
2436
|
}
|
2437
2437
|
const $o = Wo ? window : void 0;
|
2438
|
-
function
|
2439
|
-
const t = z(!1), e =
|
2440
|
-
return e &&
|
2438
|
+
function Bo() {
|
2439
|
+
const t = z(!1), e = Lr();
|
2440
|
+
return e && ds(() => {
|
2441
2441
|
t.value = !0;
|
2442
2442
|
}, e), t;
|
2443
2443
|
}
|
2444
|
-
function
|
2445
|
-
const e =
|
2446
|
-
return
|
2444
|
+
function Ho(t) {
|
2445
|
+
const e = Bo();
|
2446
|
+
return ls(() => (e.value, !!t()));
|
2447
2447
|
}
|
2448
2448
|
function Po(t, e, n = {}) {
|
2449
2449
|
const {
|
@@ -2452,12 +2452,12 @@ function Po(t, e, n = {}) {
|
|
2452
2452
|
threshold: i = 0.1,
|
2453
2453
|
window: o = $o,
|
2454
2454
|
immediate: a = !0
|
2455
|
-
} = n, c =
|
2456
|
-
const f =
|
2455
|
+
} = n, c = Ho(() => o && "IntersectionObserver" in o), u = ls(() => {
|
2456
|
+
const f = Ms(t);
|
2457
2457
|
return (Array.isArray(f) ? f : [f]).map(At).filter(Uo);
|
2458
2458
|
});
|
2459
2459
|
let l = Mt;
|
2460
|
-
const h = z(a), g = c.value ?
|
2460
|
+
const h = z(a), g = c.value ? Xt(
|
2461
2461
|
() => [u.value, At(s), h.value],
|
2462
2462
|
([f, p]) => {
|
2463
2463
|
if (l(), !h.value || !f.length)
|
@@ -2509,7 +2509,7 @@ class qo extends pe {
|
|
2509
2509
|
}
|
2510
2510
|
class Se extends pe {
|
2511
2511
|
}
|
2512
|
-
class
|
2512
|
+
class As extends pe {
|
2513
2513
|
constructor(e) {
|
2514
2514
|
super(`Invalid unit ${e}`);
|
2515
2515
|
}
|
@@ -2521,11 +2521,11 @@ class re extends pe {
|
|
2521
2521
|
super("Zone is an abstract class");
|
2522
2522
|
}
|
2523
2523
|
}
|
2524
|
-
const y = "numeric", K = "short",
|
2524
|
+
const y = "numeric", K = "short", B = "long", lt = {
|
2525
2525
|
year: y,
|
2526
2526
|
month: y,
|
2527
2527
|
day: y
|
2528
|
-
},
|
2528
|
+
}, Fs = {
|
2529
2529
|
year: y,
|
2530
2530
|
month: K,
|
2531
2531
|
day: y
|
@@ -2534,33 +2534,33 @@ const y = "numeric", K = "short", H = "long", ut = {
|
|
2534
2534
|
month: K,
|
2535
2535
|
day: y,
|
2536
2536
|
weekday: K
|
2537
|
-
},
|
2537
|
+
}, Rs = {
|
2538
2538
|
year: y,
|
2539
|
-
month:
|
2539
|
+
month: B,
|
2540
2540
|
day: y
|
2541
|
-
},
|
2541
|
+
}, Ls = {
|
2542
2542
|
year: y,
|
2543
|
-
month:
|
2543
|
+
month: B,
|
2544
2544
|
day: y,
|
2545
|
-
weekday:
|
2546
|
-
},
|
2545
|
+
weekday: B
|
2546
|
+
}, Vs = {
|
2547
2547
|
hour: y,
|
2548
2548
|
minute: y
|
2549
|
-
},
|
2549
|
+
}, Ws = {
|
2550
2550
|
hour: y,
|
2551
2551
|
minute: y,
|
2552
2552
|
second: y
|
2553
|
-
},
|
2553
|
+
}, Us = {
|
2554
2554
|
hour: y,
|
2555
2555
|
minute: y,
|
2556
2556
|
second: y,
|
2557
2557
|
timeZoneName: K
|
2558
|
-
},
|
2558
|
+
}, $s = {
|
2559
2559
|
hour: y,
|
2560
2560
|
minute: y,
|
2561
2561
|
second: y,
|
2562
|
-
timeZoneName:
|
2563
|
-
},
|
2562
|
+
timeZoneName: B
|
2563
|
+
}, Bs = {
|
2564
2564
|
hour: y,
|
2565
2565
|
minute: y,
|
2566
2566
|
hourCycle: "h23"
|
@@ -2569,38 +2569,38 @@ const y = "numeric", K = "short", H = "long", ut = {
|
|
2569
2569
|
minute: y,
|
2570
2570
|
second: y,
|
2571
2571
|
hourCycle: "h23"
|
2572
|
-
},
|
2572
|
+
}, Ps = {
|
2573
2573
|
hour: y,
|
2574
2574
|
minute: y,
|
2575
2575
|
second: y,
|
2576
2576
|
hourCycle: "h23",
|
2577
2577
|
timeZoneName: K
|
2578
|
-
},
|
2578
|
+
}, zs = {
|
2579
2579
|
hour: y,
|
2580
2580
|
minute: y,
|
2581
2581
|
second: y,
|
2582
2582
|
hourCycle: "h23",
|
2583
|
-
timeZoneName:
|
2584
|
-
},
|
2583
|
+
timeZoneName: B
|
2584
|
+
}, Zs = {
|
2585
2585
|
year: y,
|
2586
2586
|
month: y,
|
2587
2587
|
day: y,
|
2588
2588
|
hour: y,
|
2589
2589
|
minute: y
|
2590
|
-
},
|
2590
|
+
}, qs = {
|
2591
2591
|
year: y,
|
2592
2592
|
month: y,
|
2593
2593
|
day: y,
|
2594
2594
|
hour: y,
|
2595
2595
|
minute: y,
|
2596
2596
|
second: y
|
2597
|
-
},
|
2597
|
+
}, js = {
|
2598
2598
|
year: y,
|
2599
2599
|
month: K,
|
2600
2600
|
day: y,
|
2601
2601
|
hour: y,
|
2602
2602
|
minute: y
|
2603
|
-
},
|
2603
|
+
}, Gs = {
|
2604
2604
|
year: y,
|
2605
2605
|
month: K,
|
2606
2606
|
day: y,
|
@@ -2614,40 +2614,40 @@ const y = "numeric", K = "short", H = "long", ut = {
|
|
2614
2614
|
weekday: K,
|
2615
2615
|
hour: y,
|
2616
2616
|
minute: y
|
2617
|
-
},
|
2617
|
+
}, Ys = {
|
2618
2618
|
year: y,
|
2619
|
-
month:
|
2619
|
+
month: B,
|
2620
2620
|
day: y,
|
2621
2621
|
hour: y,
|
2622
2622
|
minute: y,
|
2623
2623
|
timeZoneName: K
|
2624
|
-
},
|
2624
|
+
}, Js = {
|
2625
2625
|
year: y,
|
2626
|
-
month:
|
2626
|
+
month: B,
|
2627
2627
|
day: y,
|
2628
2628
|
hour: y,
|
2629
2629
|
minute: y,
|
2630
2630
|
second: y,
|
2631
2631
|
timeZoneName: K
|
2632
|
-
},
|
2632
|
+
}, Ks = {
|
2633
2633
|
year: y,
|
2634
|
-
month:
|
2634
|
+
month: B,
|
2635
2635
|
day: y,
|
2636
|
-
weekday:
|
2636
|
+
weekday: B,
|
2637
2637
|
hour: y,
|
2638
2638
|
minute: y,
|
2639
|
-
timeZoneName:
|
2640
|
-
},
|
2639
|
+
timeZoneName: B
|
2640
|
+
}, Qs = {
|
2641
2641
|
year: y,
|
2642
|
-
month:
|
2642
|
+
month: B,
|
2643
2643
|
day: y,
|
2644
|
-
weekday:
|
2644
|
+
weekday: B,
|
2645
2645
|
hour: y,
|
2646
2646
|
minute: y,
|
2647
2647
|
second: y,
|
2648
|
-
timeZoneName:
|
2648
|
+
timeZoneName: B
|
2649
2649
|
};
|
2650
|
-
class
|
2650
|
+
class He {
|
2651
2651
|
/**
|
2652
2652
|
* The type of zone
|
2653
2653
|
* @abstract
|
@@ -2726,13 +2726,13 @@ class Be {
|
|
2726
2726
|
}
|
2727
2727
|
}
|
2728
2728
|
let Ft = null;
|
2729
|
-
class
|
2729
|
+
class bt extends He {
|
2730
2730
|
/**
|
2731
2731
|
* Get a singleton instance of the local zone
|
2732
2732
|
* @return {SystemZone}
|
2733
2733
|
*/
|
2734
2734
|
static get instance() {
|
2735
|
-
return Ft === null && (Ft = new
|
2735
|
+
return Ft === null && (Ft = new bt()), Ft;
|
2736
2736
|
}
|
2737
2737
|
/** @override **/
|
2738
2738
|
get type() {
|
@@ -2748,7 +2748,7 @@ class St extends Be {
|
|
2748
2748
|
}
|
2749
2749
|
/** @override **/
|
2750
2750
|
offsetName(e, { format: n, locale: s }) {
|
2751
|
-
return
|
2751
|
+
return ar(e, n, s);
|
2752
2752
|
}
|
2753
2753
|
/** @override **/
|
2754
2754
|
formatOffset(e, n) {
|
@@ -2767,9 +2767,9 @@ class St extends Be {
|
|
2767
2767
|
return !0;
|
2768
2768
|
}
|
2769
2769
|
}
|
2770
|
-
let
|
2770
|
+
let at = {};
|
2771
2771
|
function Yo(t) {
|
2772
|
-
return
|
2772
|
+
return at[t] || (at[t] = new Intl.DateTimeFormat("en-US", {
|
2773
2773
|
hour12: !1,
|
2774
2774
|
timeZone: t,
|
2775
2775
|
year: "numeric",
|
@@ -2779,7 +2779,7 @@ function Yo(t) {
|
|
2779
2779
|
minute: "2-digit",
|
2780
2780
|
second: "2-digit",
|
2781
2781
|
era: "short"
|
2782
|
-
})),
|
2782
|
+
})), at[t];
|
2783
2783
|
}
|
2784
2784
|
const Jo = {
|
2785
2785
|
year: 0,
|
@@ -2803,7 +2803,7 @@ function Qo(t, e) {
|
|
2803
2803
|
return s;
|
2804
2804
|
}
|
2805
2805
|
let Ye = {};
|
2806
|
-
class ne extends
|
2806
|
+
class ne extends He {
|
2807
2807
|
/**
|
2808
2808
|
* @param {string} name - Zone name
|
2809
2809
|
* @return {IANAZone}
|
@@ -2816,7 +2816,7 @@ class ne extends Be {
|
|
2816
2816
|
* @return {void}
|
2817
2817
|
*/
|
2818
2818
|
static resetCache() {
|
2819
|
-
Ye = {},
|
2819
|
+
Ye = {}, at = {};
|
2820
2820
|
}
|
2821
2821
|
/**
|
2822
2822
|
* 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.
|
@@ -2863,7 +2863,7 @@ class ne extends Be {
|
|
2863
2863
|
}
|
2864
2864
|
/** @override **/
|
2865
2865
|
offsetName(e, { format: n, locale: s }) {
|
2866
|
-
return
|
2866
|
+
return ar(e, n, s, this.name);
|
2867
2867
|
}
|
2868
2868
|
/** @override **/
|
2869
2869
|
formatOffset(e, n) {
|
@@ -2877,7 +2877,7 @@ class ne extends Be {
|
|
2877
2877
|
const s = Yo(this.name);
|
2878
2878
|
let [r, i, o, a, c, u, l] = s.formatToParts ? Qo(s, n) : Ko(s, n);
|
2879
2879
|
a === "BC" && (r = -Math.abs(r) + 1);
|
2880
|
-
const g =
|
2880
|
+
const g = Tt({
|
2881
2881
|
year: r,
|
2882
2882
|
month: i,
|
2883
2883
|
day: o,
|
@@ -2899,40 +2899,40 @@ class ne extends Be {
|
|
2899
2899
|
return this.valid;
|
2900
2900
|
}
|
2901
2901
|
}
|
2902
|
-
let
|
2902
|
+
let An = {};
|
2903
2903
|
function Xo(t, e = {}) {
|
2904
2904
|
const n = JSON.stringify([t, e]);
|
2905
|
-
let s =
|
2906
|
-
return s || (s = new Intl.ListFormat(t, e),
|
2905
|
+
let s = An[n];
|
2906
|
+
return s || (s = new Intl.ListFormat(t, e), An[n] = s), s;
|
2907
2907
|
}
|
2908
|
-
let
|
2909
|
-
function
|
2908
|
+
let jt = {};
|
2909
|
+
function Gt(t, e = {}) {
|
2910
2910
|
const n = JSON.stringify([t, e]);
|
2911
|
-
let s =
|
2912
|
-
return s || (s = new Intl.DateTimeFormat(t, e),
|
2911
|
+
let s = jt[n];
|
2912
|
+
return s || (s = new Intl.DateTimeFormat(t, e), jt[n] = s), s;
|
2913
2913
|
}
|
2914
|
-
let
|
2914
|
+
let Yt = {};
|
2915
2915
|
function ea(t, e = {}) {
|
2916
2916
|
const n = JSON.stringify([t, e]);
|
2917
|
-
let s =
|
2918
|
-
return s || (s = new Intl.NumberFormat(t, e),
|
2917
|
+
let s = Yt[n];
|
2918
|
+
return s || (s = new Intl.NumberFormat(t, e), Yt[n] = s), s;
|
2919
2919
|
}
|
2920
|
-
let
|
2920
|
+
let Jt = {};
|
2921
2921
|
function ta(t, e = {}) {
|
2922
2922
|
const { base: n, ...s } = e, r = JSON.stringify([t, s]);
|
2923
|
-
let i =
|
2924
|
-
return i || (i = new Intl.RelativeTimeFormat(t, e),
|
2923
|
+
let i = Jt[r];
|
2924
|
+
return i || (i = new Intl.RelativeTimeFormat(t, e), Jt[r] = i), i;
|
2925
2925
|
}
|
2926
2926
|
let Re = null;
|
2927
2927
|
function na() {
|
2928
2928
|
return Re || (Re = new Intl.DateTimeFormat().resolvedOptions().locale, Re);
|
2929
2929
|
}
|
2930
|
-
let
|
2930
|
+
let Fn = {};
|
2931
2931
|
function sa(t) {
|
2932
|
-
let e =
|
2932
|
+
let e = Fn[t];
|
2933
2933
|
if (!e) {
|
2934
2934
|
const n = new Intl.Locale(t);
|
2935
|
-
e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo,
|
2935
|
+
e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo, Fn[t] = e;
|
2936
2936
|
}
|
2937
2937
|
return e;
|
2938
2938
|
}
|
@@ -2945,10 +2945,10 @@ function ra(t) {
|
|
2945
2945
|
{
|
2946
2946
|
let s, r;
|
2947
2947
|
try {
|
2948
|
-
s =
|
2948
|
+
s = Gt(t).resolvedOptions(), r = t;
|
2949
2949
|
} catch {
|
2950
2950
|
const c = t.substring(0, n);
|
2951
|
-
s =
|
2951
|
+
s = Gt(c).resolvedOptions(), r = c;
|
2952
2952
|
}
|
2953
2953
|
const { numberingSystem: i, calendar: o } = s;
|
2954
2954
|
return [r, i, o];
|
@@ -2994,7 +2994,7 @@ class ua {
|
|
2994
2994
|
const n = this.floor ? Math.floor(e) : e;
|
2995
2995
|
return this.inf.format(n);
|
2996
2996
|
} else {
|
2997
|
-
const n = this.floor ? Math.floor(e) :
|
2997
|
+
const n = this.floor ? Math.floor(e) : hn(e, 3);
|
2998
2998
|
return M(n, this.padTo);
|
2999
2999
|
}
|
3000
3000
|
}
|
@@ -3011,7 +3011,7 @@ class la {
|
|
3011
3011
|
} else
|
3012
3012
|
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);
|
3013
3013
|
const i = { ...this.opts };
|
3014
|
-
i.timeZone = i.timeZone || r, this.dtf =
|
3014
|
+
i.timeZone = i.timeZone || r, this.dtf = Gt(n, i);
|
3015
3015
|
}
|
3016
3016
|
format() {
|
3017
3017
|
return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
|
@@ -3038,7 +3038,7 @@ class la {
|
|
3038
3038
|
}
|
3039
3039
|
class da {
|
3040
3040
|
constructor(e, n, s) {
|
3041
|
-
this.opts = { style: "long", ...s }, !n &&
|
3041
|
+
this.opts = { style: "long", ...s }, !n && ir() && (this.rtf = ta(e, s));
|
3042
3042
|
}
|
3043
3043
|
format(e, n) {
|
3044
3044
|
return this.rtf ? this.rtf.format(e, n) : xa(n, e, this.opts.numeric, this.opts.style !== "long");
|
@@ -3052,9 +3052,9 @@ const ha = {
|
|
3052
3052
|
minimalDays: 4,
|
3053
3053
|
weekend: [6, 7]
|
3054
3054
|
};
|
3055
|
-
class
|
3055
|
+
class v {
|
3056
3056
|
static fromOpts(e) {
|
3057
|
-
return
|
3057
|
+
return v.create(
|
3058
3058
|
e.locale,
|
3059
3059
|
e.numberingSystem,
|
3060
3060
|
e.outputCalendar,
|
@@ -3063,14 +3063,14 @@ class E {
|
|
3063
3063
|
);
|
3064
3064
|
}
|
3065
3065
|
static create(e, n, s, r, i = !1) {
|
3066
|
-
const o = e || x.defaultLocale, a = o || (i ? "en-US" : na()), c = n || x.defaultNumberingSystem, u = s || x.defaultOutputCalendar, l =
|
3067
|
-
return new
|
3066
|
+
const o = e || x.defaultLocale, a = o || (i ? "en-US" : na()), c = n || x.defaultNumberingSystem, u = s || x.defaultOutputCalendar, l = Kt(r) || x.defaultWeekSettings;
|
3067
|
+
return new v(a, c, u, l, o);
|
3068
3068
|
}
|
3069
3069
|
static resetCache() {
|
3070
|
-
Re = null,
|
3070
|
+
Re = null, jt = {}, Yt = {}, Jt = {};
|
3071
3071
|
}
|
3072
3072
|
static fromObject({ locale: e, numberingSystem: n, outputCalendar: s, weekSettings: r } = {}) {
|
3073
|
-
return
|
3073
|
+
return v.create(e, n, s, r);
|
3074
3074
|
}
|
3075
3075
|
constructor(e, n, s, r, i) {
|
3076
3076
|
const [o, a, c] = ra(e);
|
@@ -3084,11 +3084,11 @@ class E {
|
|
3084
3084
|
return e && n ? "en" : "intl";
|
3085
3085
|
}
|
3086
3086
|
clone(e) {
|
3087
|
-
return !e || Object.getOwnPropertyNames(e).length === 0 ? this :
|
3087
|
+
return !e || Object.getOwnPropertyNames(e).length === 0 ? this : v.create(
|
3088
3088
|
e.locale || this.specifiedLocale,
|
3089
3089
|
e.numberingSystem || this.numberingSystem,
|
3090
3090
|
e.outputCalendar || this.outputCalendar,
|
3091
|
-
|
3091
|
+
Kt(e.weekSettings) || this.weekSettings,
|
3092
3092
|
e.defaultToEN || !1
|
3093
3093
|
);
|
3094
3094
|
}
|
@@ -3099,13 +3099,13 @@ class E {
|
|
3099
3099
|
return this.clone({ ...e, defaultToEN: !1 });
|
3100
3100
|
}
|
3101
3101
|
months(e, n = !1) {
|
3102
|
-
return Je(this, e,
|
3102
|
+
return Je(this, e, lr, () => {
|
3103
3103
|
const s = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone";
|
3104
3104
|
return this.monthsCache[r][e] || (this.monthsCache[r][e] = oa((i) => this.extract(i, s, "month"))), this.monthsCache[r][e];
|
3105
3105
|
});
|
3106
3106
|
}
|
3107
3107
|
weekdays(e, n = !1) {
|
3108
|
-
return Je(this, e,
|
3108
|
+
return Je(this, e, fr, () => {
|
3109
3109
|
const s = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone";
|
3110
3110
|
return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = aa(
|
3111
3111
|
(i) => this.extract(i, s, "weekday")
|
@@ -3116,7 +3116,7 @@ class E {
|
|
3116
3116
|
return Je(
|
3117
3117
|
this,
|
3118
3118
|
void 0,
|
3119
|
-
() =>
|
3119
|
+
() => mr,
|
3120
3120
|
() => {
|
3121
3121
|
if (!this.meridiemCache) {
|
3122
3122
|
const e = { hour: "numeric", hourCycle: "h12" };
|
@@ -3129,7 +3129,7 @@ class E {
|
|
3129
3129
|
);
|
3130
3130
|
}
|
3131
3131
|
eras(e) {
|
3132
|
-
return Je(this, e,
|
3132
|
+
return Je(this, e, yr, () => {
|
3133
3133
|
const n = { era: e };
|
3134
3134
|
return this.eraCache[e] || (this.eraCache[e] = [S.utc(-40, 1, 1), S.utc(2017, 1, 1)].map(
|
3135
3135
|
(s) => this.extract(s, n, "era")
|
@@ -3156,7 +3156,7 @@ class E {
|
|
3156
3156
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
|
3157
3157
|
}
|
3158
3158
|
getWeekSettings() {
|
3159
|
-
return this.weekSettings ? this.weekSettings :
|
3159
|
+
return this.weekSettings ? this.weekSettings : or() ? sa(this.locale) : ha;
|
3160
3160
|
}
|
3161
3161
|
getStartOfWeek() {
|
3162
3162
|
return this.getWeekSettings().firstDay;
|
@@ -3172,7 +3172,7 @@ class E {
|
|
3172
3172
|
}
|
3173
3173
|
}
|
3174
3174
|
let Rt = null;
|
3175
|
-
class U extends
|
3175
|
+
class U extends He {
|
3176
3176
|
/**
|
3177
3177
|
* Get a singleton instance of UTC
|
3178
3178
|
* @return {FixedOffsetZone}
|
@@ -3200,7 +3200,7 @@ class U extends Be {
|
|
3200
3200
|
if (e) {
|
3201
3201
|
const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
|
3202
3202
|
if (n)
|
3203
|
-
return new U(
|
3203
|
+
return new U(_t(n[1], n[2]));
|
3204
3204
|
}
|
3205
3205
|
return null;
|
3206
3206
|
}
|
@@ -3243,7 +3243,7 @@ class U extends Be {
|
|
3243
3243
|
return !0;
|
3244
3244
|
}
|
3245
3245
|
}
|
3246
|
-
class fa extends
|
3246
|
+
class fa extends He {
|
3247
3247
|
constructor(e) {
|
3248
3248
|
super(), this.zoneName = e;
|
3249
3249
|
}
|
@@ -3283,22 +3283,22 @@ class fa extends Be {
|
|
3283
3283
|
function ce(t, e) {
|
3284
3284
|
if (w(t) || t === null)
|
3285
3285
|
return e;
|
3286
|
-
if (t instanceof
|
3286
|
+
if (t instanceof He)
|
3287
3287
|
return t;
|
3288
3288
|
if (pa(t)) {
|
3289
3289
|
const n = t.toLowerCase();
|
3290
|
-
return n === "default" ? e : n === "local" || n === "system" ?
|
3290
|
+
return n === "default" ? e : n === "local" || n === "system" ? bt.instance : n === "utc" || n === "gmt" ? U.utcInstance : U.parseSpecifier(n) || ne.create(t);
|
3291
3291
|
} else
|
3292
3292
|
return ye(t) ? U.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new fa(t);
|
3293
3293
|
}
|
3294
|
-
let
|
3294
|
+
let Rn = () => Date.now(), Ln = "system", Vn = null, Wn = null, Un = null, $n = 60, Bn, Hn = null;
|
3295
3295
|
class x {
|
3296
3296
|
/**
|
3297
3297
|
* Get the callback for returning the current timestamp.
|
3298
3298
|
* @type {function}
|
3299
3299
|
*/
|
3300
3300
|
static get now() {
|
3301
|
-
return
|
3301
|
+
return Rn;
|
3302
3302
|
}
|
3303
3303
|
/**
|
3304
3304
|
* Set the callback for returning the current timestamp.
|
@@ -3308,7 +3308,7 @@ class x {
|
|
3308
3308
|
* @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
|
3309
3309
|
*/
|
3310
3310
|
static set now(e) {
|
3311
|
-
|
3311
|
+
Rn = e;
|
3312
3312
|
}
|
3313
3313
|
/**
|
3314
3314
|
* Set the default time zone to create DateTimes in. Does not affect existing instances.
|
@@ -3316,7 +3316,7 @@ class x {
|
|
3316
3316
|
* @type {string}
|
3317
3317
|
*/
|
3318
3318
|
static set defaultZone(e) {
|
3319
|
-
|
3319
|
+
Ln = e;
|
3320
3320
|
}
|
3321
3321
|
/**
|
3322
3322
|
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
|
@@ -3324,49 +3324,49 @@ class x {
|
|
3324
3324
|
* @type {Zone}
|
3325
3325
|
*/
|
3326
3326
|
static get defaultZone() {
|
3327
|
-
return ce(
|
3327
|
+
return ce(Ln, bt.instance);
|
3328
3328
|
}
|
3329
3329
|
/**
|
3330
3330
|
* Get the default locale to create DateTimes with. Does not affect existing instances.
|
3331
3331
|
* @type {string}
|
3332
3332
|
*/
|
3333
3333
|
static get defaultLocale() {
|
3334
|
-
return
|
3334
|
+
return Vn;
|
3335
3335
|
}
|
3336
3336
|
/**
|
3337
3337
|
* Set the default locale to create DateTimes with. Does not affect existing instances.
|
3338
3338
|
* @type {string}
|
3339
3339
|
*/
|
3340
3340
|
static set defaultLocale(e) {
|
3341
|
-
|
3341
|
+
Vn = e;
|
3342
3342
|
}
|
3343
3343
|
/**
|
3344
3344
|
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
|
3345
3345
|
* @type {string}
|
3346
3346
|
*/
|
3347
3347
|
static get defaultNumberingSystem() {
|
3348
|
-
return
|
3348
|
+
return Wn;
|
3349
3349
|
}
|
3350
3350
|
/**
|
3351
3351
|
* Set the default numbering system to create DateTimes with. Does not affect existing instances.
|
3352
3352
|
* @type {string}
|
3353
3353
|
*/
|
3354
3354
|
static set defaultNumberingSystem(e) {
|
3355
|
-
|
3355
|
+
Wn = e;
|
3356
3356
|
}
|
3357
3357
|
/**
|
3358
3358
|
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
|
3359
3359
|
* @type {string}
|
3360
3360
|
*/
|
3361
3361
|
static get defaultOutputCalendar() {
|
3362
|
-
return
|
3362
|
+
return Un;
|
3363
3363
|
}
|
3364
3364
|
/**
|
3365
3365
|
* Set the default output calendar to create DateTimes with. Does not affect existing instances.
|
3366
3366
|
* @type {string}
|
3367
3367
|
*/
|
3368
3368
|
static set defaultOutputCalendar(e) {
|
3369
|
-
|
3369
|
+
Un = e;
|
3370
3370
|
}
|
3371
3371
|
/**
|
3372
3372
|
* @typedef {Object} WeekSettings
|
@@ -3378,7 +3378,7 @@ class x {
|
|
3378
3378
|
* @return {WeekSettings|null}
|
3379
3379
|
*/
|
3380
3380
|
static get defaultWeekSettings() {
|
3381
|
-
return
|
3381
|
+
return Hn;
|
3382
3382
|
}
|
3383
3383
|
/**
|
3384
3384
|
* Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
|
@@ -3388,14 +3388,14 @@ class x {
|
|
3388
3388
|
* @param {WeekSettings|null} weekSettings
|
3389
3389
|
*/
|
3390
3390
|
static set defaultWeekSettings(e) {
|
3391
|
-
|
3391
|
+
Hn = Kt(e);
|
3392
3392
|
}
|
3393
3393
|
/**
|
3394
3394
|
* Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
|
3395
3395
|
* @type {number}
|
3396
3396
|
*/
|
3397
3397
|
static get twoDigitCutoffYear() {
|
3398
|
-
return
|
3398
|
+
return $n;
|
3399
3399
|
}
|
3400
3400
|
/**
|
3401
3401
|
* Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
|
@@ -3406,28 +3406,28 @@ class x {
|
|
3406
3406
|
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
|
3407
3407
|
*/
|
3408
3408
|
static set twoDigitCutoffYear(e) {
|
3409
|
-
|
3409
|
+
$n = e % 100;
|
3410
3410
|
}
|
3411
3411
|
/**
|
3412
3412
|
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
3413
3413
|
* @type {boolean}
|
3414
3414
|
*/
|
3415
3415
|
static get throwOnInvalid() {
|
3416
|
-
return
|
3416
|
+
return Bn;
|
3417
3417
|
}
|
3418
3418
|
/**
|
3419
3419
|
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
3420
3420
|
* @type {boolean}
|
3421
3421
|
*/
|
3422
3422
|
static set throwOnInvalid(e) {
|
3423
|
-
|
3423
|
+
Bn = e;
|
3424
3424
|
}
|
3425
3425
|
/**
|
3426
3426
|
* Reset Luxon's global caches. Should only be necessary in testing scenarios.
|
3427
3427
|
* @return {void}
|
3428
3428
|
*/
|
3429
3429
|
static resetCaches() {
|
3430
|
-
|
3430
|
+
v.resetCache(), ne.resetCache();
|
3431
3431
|
}
|
3432
3432
|
}
|
3433
3433
|
class J {
|
@@ -3438,50 +3438,50 @@ class J {
|
|
3438
3438
|
return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
|
3439
3439
|
}
|
3440
3440
|
}
|
3441
|
-
const
|
3441
|
+
const Xs = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], er = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
3442
3442
|
function Z(t, e) {
|
3443
3443
|
return new J(
|
3444
3444
|
"unit out of range",
|
3445
3445
|
`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
|
3446
3446
|
);
|
3447
3447
|
}
|
3448
|
-
function
|
3448
|
+
function un(t, e, n) {
|
3449
3449
|
const s = new Date(Date.UTC(t, e - 1, n));
|
3450
3450
|
t < 100 && t >= 0 && s.setUTCFullYear(s.getUTCFullYear() - 1900);
|
3451
3451
|
const r = s.getUTCDay();
|
3452
3452
|
return r === 0 ? 7 : r;
|
3453
3453
|
}
|
3454
|
-
function
|
3455
|
-
return n + (Pe(t) ?
|
3454
|
+
function tr(t, e, n) {
|
3455
|
+
return n + (Pe(t) ? er : Xs)[e - 1];
|
3456
3456
|
}
|
3457
|
-
function
|
3458
|
-
const n = Pe(t) ?
|
3457
|
+
function nr(t, e) {
|
3458
|
+
const n = Pe(t) ? er : Xs, s = n.findIndex((i) => i < e), r = e - n[s];
|
3459
3459
|
return { month: s + 1, day: r };
|
3460
3460
|
}
|
3461
|
-
function
|
3461
|
+
function ln(t, e) {
|
3462
3462
|
return (t - e + 7) % 7 + 1;
|
3463
3463
|
}
|
3464
|
-
function
|
3465
|
-
const { year: s, month: r, day: i } = t, o =
|
3464
|
+
function dt(t, e = 4, n = 1) {
|
3465
|
+
const { year: s, month: r, day: i } = t, o = tr(s, r, i), a = ln(un(s, r, i), n);
|
3466
3466
|
let c = Math.floor((o - a + 14 - e) / 7), u;
|
3467
|
-
return c < 1 ? (u = s - 1, c = Ue(u, e, n)) : c > Ue(s, e, n) ? (u = s + 1, c = 1) : u = s, { weekYear: u, weekNumber: c, weekday: a, ...
|
3467
|
+
return c < 1 ? (u = s - 1, c = Ue(u, e, n)) : c > Ue(s, e, n) ? (u = s + 1, c = 1) : u = s, { weekYear: u, weekNumber: c, weekday: a, ...Ot(t) };
|
3468
3468
|
}
|
3469
|
-
function
|
3470
|
-
const { weekYear: s, weekNumber: r, weekday: i } = t, o = un(
|
3469
|
+
function Pn(t, e = 4, n = 1) {
|
3470
|
+
const { weekYear: s, weekNumber: r, weekday: i } = t, o = ln(un(s, 1, e), n), a = be(s);
|
3471
3471
|
let c = r * 7 + i - o - 7 + e, u;
|
3472
3472
|
c < 1 ? (u = s - 1, c += be(u)) : c > a ? (u = s + 1, c -= be(s)) : u = s;
|
3473
|
-
const { month: l, day: h } =
|
3474
|
-
return { year: u, month: l, day: h, ...
|
3473
|
+
const { month: l, day: h } = nr(u, c);
|
3474
|
+
return { year: u, month: l, day: h, ...Ot(t) };
|
3475
3475
|
}
|
3476
3476
|
function Lt(t) {
|
3477
|
-
const { year: e, month: n, day: s } = t, r =
|
3478
|
-
return { year: e, ordinal: r, ...
|
3477
|
+
const { year: e, month: n, day: s } = t, r = tr(e, n, s);
|
3478
|
+
return { year: e, ordinal: r, ...Ot(t) };
|
3479
3479
|
}
|
3480
|
-
function
|
3481
|
-
const { year: e, ordinal: n } = t, { month: s, day: r } =
|
3482
|
-
return { year: e, month: s, day: r, ...
|
3480
|
+
function zn(t) {
|
3481
|
+
const { year: e, ordinal: n } = t, { month: s, day: r } = nr(e, n);
|
3482
|
+
return { year: e, month: s, day: r, ...Ot(t) };
|
3483
3483
|
}
|
3484
|
-
function
|
3484
|
+
function Zn(t, e) {
|
3485
3485
|
if (!w(t.localWeekday) || !w(t.localWeekNumber) || !w(t.localWeekYear)) {
|
3486
3486
|
if (!w(t.weekday) || !w(t.weekNumber) || !w(t.weekYear))
|
3487
3487
|
throw new Se(
|
@@ -3495,7 +3495,7 @@ function Pn(t, e) {
|
|
3495
3495
|
return { minDaysInFirstWeek: 4, startOfWeek: 1 };
|
3496
3496
|
}
|
3497
3497
|
function ma(t, e = 4, n = 1) {
|
3498
|
-
const s =
|
3498
|
+
const s = kt(t.weekYear), r = q(
|
3499
3499
|
t.weekNumber,
|
3500
3500
|
1,
|
3501
3501
|
Ue(t.weekYear, e, n)
|
@@ -3503,14 +3503,14 @@ function ma(t, e = 4, n = 1) {
|
|
3503
3503
|
return s ? r ? i ? !1 : Z("weekday", t.weekday) : Z("week", t.weekNumber) : Z("weekYear", t.weekYear);
|
3504
3504
|
}
|
3505
3505
|
function ya(t) {
|
3506
|
-
const e =
|
3506
|
+
const e = kt(t.year), n = q(t.ordinal, 1, be(t.year));
|
3507
3507
|
return e ? n ? !1 : Z("ordinal", t.ordinal) : Z("year", t.year);
|
3508
3508
|
}
|
3509
|
-
function
|
3510
|
-
const e =
|
3509
|
+
function sr(t) {
|
3510
|
+
const e = kt(t.year), n = q(t.month, 1, 12), s = q(t.day, 1, ht(t.year, t.month));
|
3511
3511
|
return e ? n ? s ? !1 : Z("day", t.day) : Z("month", t.month) : Z("year", t.year);
|
3512
3512
|
}
|
3513
|
-
function
|
3513
|
+
function rr(t) {
|
3514
3514
|
const { hour: e, minute: n, second: s, millisecond: r } = t, i = q(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, o = q(n, 0, 59), a = q(s, 0, 59), c = q(r, 0, 999);
|
3515
3515
|
return i ? o ? a ? c ? !1 : Z("millisecond", r) : Z("second", s) : Z("minute", n) : Z("hour", e);
|
3516
3516
|
}
|
@@ -3520,7 +3520,7 @@ function w(t) {
|
|
3520
3520
|
function ye(t) {
|
3521
3521
|
return typeof t == "number";
|
3522
3522
|
}
|
3523
|
-
function
|
3523
|
+
function kt(t) {
|
3524
3524
|
return typeof t == "number" && t % 1 === 0;
|
3525
3525
|
}
|
3526
3526
|
function pa(t) {
|
@@ -3529,14 +3529,14 @@ function pa(t) {
|
|
3529
3529
|
function ga(t) {
|
3530
3530
|
return Object.prototype.toString.call(t) === "[object Date]";
|
3531
3531
|
}
|
3532
|
-
function
|
3532
|
+
function ir() {
|
3533
3533
|
try {
|
3534
3534
|
return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
|
3535
3535
|
} catch {
|
3536
3536
|
return !1;
|
3537
3537
|
}
|
3538
3538
|
}
|
3539
|
-
function
|
3539
|
+
function or() {
|
3540
3540
|
try {
|
3541
3541
|
return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
|
3542
3542
|
} catch {
|
@@ -3546,7 +3546,7 @@ function ir() {
|
|
3546
3546
|
function wa(t) {
|
3547
3547
|
return Array.isArray(t) ? t : [t];
|
3548
3548
|
}
|
3549
|
-
function
|
3549
|
+
function qn(t, e, n) {
|
3550
3550
|
if (t.length !== 0)
|
3551
3551
|
return t.reduce((s, r) => {
|
3552
3552
|
const i = [e(r), r];
|
@@ -3559,7 +3559,7 @@ function Sa(t, e) {
|
|
3559
3559
|
function _e(t, e) {
|
3560
3560
|
return Object.prototype.hasOwnProperty.call(t, e);
|
3561
3561
|
}
|
3562
|
-
function
|
3562
|
+
function Kt(t) {
|
3563
3563
|
if (t == null)
|
3564
3564
|
return null;
|
3565
3565
|
if (typeof t != "object")
|
@@ -3573,7 +3573,7 @@ function Jt(t) {
|
|
3573
3573
|
};
|
3574
3574
|
}
|
3575
3575
|
function q(t, e, n) {
|
3576
|
-
return
|
3576
|
+
return kt(t) && t >= e && t <= n;
|
3577
3577
|
}
|
3578
3578
|
function ba(t, e) {
|
3579
3579
|
return t - e * Math.floor(t / e);
|
@@ -3591,13 +3591,13 @@ function de(t) {
|
|
3591
3591
|
if (!(w(t) || t === null || t === ""))
|
3592
3592
|
return parseFloat(t);
|
3593
3593
|
}
|
3594
|
-
function
|
3594
|
+
function dn(t) {
|
3595
3595
|
if (!(w(t) || t === null || t === "")) {
|
3596
3596
|
const e = parseFloat("0." + t) * 1e3;
|
3597
3597
|
return Math.floor(e);
|
3598
3598
|
}
|
3599
3599
|
}
|
3600
|
-
function
|
3600
|
+
function hn(t, e, n = !1) {
|
3601
3601
|
const s = 10 ** e;
|
3602
3602
|
return (n ? Math.trunc : Math.round)(t * s) / s;
|
3603
3603
|
}
|
@@ -3607,11 +3607,11 @@ function Pe(t) {
|
|
3607
3607
|
function be(t) {
|
3608
3608
|
return Pe(t) ? 366 : 365;
|
3609
3609
|
}
|
3610
|
-
function
|
3610
|
+
function ht(t, e) {
|
3611
3611
|
const n = ba(e - 1, 12) + 1, s = t + (e - n) / 12;
|
3612
3612
|
return n === 2 ? Pe(s) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
|
3613
3613
|
}
|
3614
|
-
function
|
3614
|
+
function Tt(t) {
|
3615
3615
|
let e = Date.UTC(
|
3616
3616
|
t.year,
|
3617
3617
|
t.month - 1,
|
@@ -3623,17 +3623,17 @@ function kt(t) {
|
|
3623
3623
|
);
|
3624
3624
|
return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
|
3625
3625
|
}
|
3626
|
-
function
|
3627
|
-
return -un(
|
3626
|
+
function jn(t, e, n) {
|
3627
|
+
return -ln(un(t, 1, e), n) + e - 1;
|
3628
3628
|
}
|
3629
3629
|
function Ue(t, e = 4, n = 1) {
|
3630
|
-
const s =
|
3630
|
+
const s = jn(t, e, n), r = jn(t + 1, e, n);
|
3631
3631
|
return (be(t) - s + r) / 7;
|
3632
3632
|
}
|
3633
|
-
function
|
3633
|
+
function Qt(t) {
|
3634
3634
|
return t > 99 ? t : t > x.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
|
3635
3635
|
}
|
3636
|
-
function
|
3636
|
+
function ar(t, e, n, s = null) {
|
3637
3637
|
const r = new Date(t), i = {
|
3638
3638
|
hourCycle: "h23",
|
3639
3639
|
year: "numeric",
|
@@ -3646,26 +3646,26 @@ function or(t, e, n, s = null) {
|
|
3646
3646
|
const o = { timeZoneName: e, ...i }, a = new Intl.DateTimeFormat(n, o).formatToParts(r).find((c) => c.type.toLowerCase() === "timezonename");
|
3647
3647
|
return a ? a.value : null;
|
3648
3648
|
}
|
3649
|
-
function
|
3649
|
+
function _t(t, e) {
|
3650
3650
|
let n = parseInt(t, 10);
|
3651
3651
|
Number.isNaN(n) && (n = 0);
|
3652
3652
|
const s = parseInt(e, 10) || 0, r = n < 0 || Object.is(n, -0) ? -s : s;
|
3653
3653
|
return n * 60 + r;
|
3654
3654
|
}
|
3655
|
-
function
|
3655
|
+
function cr(t) {
|
3656
3656
|
const e = Number(t);
|
3657
3657
|
if (typeof t == "boolean" || t === "" || Number.isNaN(e))
|
3658
3658
|
throw new $(`Invalid unit value ${t}`);
|
3659
3659
|
return e;
|
3660
3660
|
}
|
3661
|
-
function
|
3661
|
+
function ft(t, e) {
|
3662
3662
|
const n = {};
|
3663
3663
|
for (const s in t)
|
3664
3664
|
if (_e(t, s)) {
|
3665
3665
|
const r = t[s];
|
3666
3666
|
if (r == null)
|
3667
3667
|
continue;
|
3668
|
-
n[e(s)] =
|
3668
|
+
n[e(s)] = cr(r);
|
3669
3669
|
}
|
3670
3670
|
return n;
|
3671
3671
|
}
|
@@ -3682,7 +3682,7 @@ function Ve(t, e) {
|
|
3682
3682
|
throw new RangeError(`Value format ${e} is out of range for property format`);
|
3683
3683
|
}
|
3684
3684
|
}
|
3685
|
-
function
|
3685
|
+
function Ot(t) {
|
3686
3686
|
return Sa(t, ["hour", "minute", "second", "millisecond"]);
|
3687
3687
|
}
|
3688
3688
|
const ka = [
|
@@ -3698,7 +3698,7 @@ const ka = [
|
|
3698
3698
|
"October",
|
3699
3699
|
"November",
|
3700
3700
|
"December"
|
3701
|
-
],
|
3701
|
+
], ur = [
|
3702
3702
|
"Jan",
|
3703
3703
|
"Feb",
|
3704
3704
|
"Mar",
|
@@ -3712,12 +3712,12 @@ const ka = [
|
|
3712
3712
|
"Nov",
|
3713
3713
|
"Dec"
|
3714
3714
|
], Ta = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
|
3715
|
-
function
|
3715
|
+
function lr(t) {
|
3716
3716
|
switch (t) {
|
3717
3717
|
case "narrow":
|
3718
3718
|
return [...Ta];
|
3719
3719
|
case "short":
|
3720
|
-
return [...
|
3720
|
+
return [...ur];
|
3721
3721
|
case "long":
|
3722
3722
|
return [...ka];
|
3723
3723
|
case "numeric":
|
@@ -3728,7 +3728,7 @@ function ur(t) {
|
|
3728
3728
|
return null;
|
3729
3729
|
}
|
3730
3730
|
}
|
3731
|
-
const
|
3731
|
+
const dr = [
|
3732
3732
|
"Monday",
|
3733
3733
|
"Tuesday",
|
3734
3734
|
"Wednesday",
|
@@ -3736,23 +3736,23 @@ const lr = [
|
|
3736
3736
|
"Friday",
|
3737
3737
|
"Saturday",
|
3738
3738
|
"Sunday"
|
3739
|
-
],
|
3740
|
-
function
|
3739
|
+
], hr = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], _a = ["M", "T", "W", "T", "F", "S", "S"];
|
3740
|
+
function fr(t) {
|
3741
3741
|
switch (t) {
|
3742
3742
|
case "narrow":
|
3743
3743
|
return [..._a];
|
3744
3744
|
case "short":
|
3745
|
-
return [...
|
3745
|
+
return [...hr];
|
3746
3746
|
case "long":
|
3747
|
-
return [...
|
3747
|
+
return [...dr];
|
3748
3748
|
case "numeric":
|
3749
3749
|
return ["1", "2", "3", "4", "5", "6", "7"];
|
3750
3750
|
default:
|
3751
3751
|
return null;
|
3752
3752
|
}
|
3753
3753
|
}
|
3754
|
-
const
|
3755
|
-
function
|
3754
|
+
const mr = ["AM", "PM"], Oa = ["Before Christ", "Anno Domini"], Ea = ["BC", "AD"], va = ["B", "A"];
|
3755
|
+
function yr(t) {
|
3756
3756
|
switch (t) {
|
3757
3757
|
case "narrow":
|
3758
3758
|
return [...va];
|
@@ -3765,16 +3765,16 @@ function mr(t) {
|
|
3765
3765
|
}
|
3766
3766
|
}
|
3767
3767
|
function Ca(t) {
|
3768
|
-
return
|
3768
|
+
return mr[t.hour < 12 ? 0 : 1];
|
3769
3769
|
}
|
3770
3770
|
function Na(t, e) {
|
3771
|
-
return
|
3771
|
+
return fr(e)[t.weekday - 1];
|
3772
3772
|
}
|
3773
3773
|
function Ia(t, e) {
|
3774
|
-
return
|
3774
|
+
return lr(e)[t.month - 1];
|
3775
3775
|
}
|
3776
3776
|
function Da(t, e) {
|
3777
|
-
return
|
3777
|
+
return yr(e)[t.year < 0 ? 0 : 1];
|
3778
3778
|
}
|
3779
3779
|
function xa(t, e, n = "always", s = !1) {
|
3780
3780
|
const r = {
|
@@ -3801,33 +3801,33 @@ function xa(t, e, n = "always", s = !1) {
|
|
3801
3801
|
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;
|
3802
3802
|
return o ? `${a} ${l} ago` : `in ${a} ${l}`;
|
3803
3803
|
}
|
3804
|
-
function
|
3804
|
+
function Gn(t, e) {
|
3805
3805
|
let n = "";
|
3806
3806
|
for (const s of t)
|
3807
3807
|
s.literal ? n += s.val : n += e(s.val);
|
3808
3808
|
return n;
|
3809
3809
|
}
|
3810
3810
|
const Ma = {
|
3811
|
-
D:
|
3812
|
-
DD:
|
3813
|
-
DDD:
|
3814
|
-
DDDD:
|
3815
|
-
t:
|
3816
|
-
tt:
|
3817
|
-
ttt:
|
3818
|
-
tttt:
|
3819
|
-
T:
|
3811
|
+
D: lt,
|
3812
|
+
DD: Fs,
|
3813
|
+
DDD: Rs,
|
3814
|
+
DDDD: Ls,
|
3815
|
+
t: Vs,
|
3816
|
+
tt: Ws,
|
3817
|
+
ttt: Us,
|
3818
|
+
tttt: $s,
|
3819
|
+
T: Bs,
|
3820
3820
|
TT: Hs,
|
3821
|
-
TTT:
|
3822
|
-
TTTT:
|
3823
|
-
f:
|
3824
|
-
ff:
|
3825
|
-
fff:
|
3826
|
-
ffff:
|
3827
|
-
F:
|
3828
|
-
FF:
|
3829
|
-
FFF:
|
3830
|
-
FFFF:
|
3821
|
+
TTT: Ps,
|
3822
|
+
TTTT: zs,
|
3823
|
+
f: Zs,
|
3824
|
+
ff: js,
|
3825
|
+
fff: Ys,
|
3826
|
+
ffff: Ks,
|
3827
|
+
F: qs,
|
3828
|
+
FF: Gs,
|
3829
|
+
FFF: Js,
|
3830
|
+
FFFF: Qs
|
3831
3831
|
};
|
3832
3832
|
class R {
|
3833
3833
|
static create(e, n = {}) {
|
@@ -4006,7 +4006,7 @@ class R {
|
|
4006
4006
|
return l(m);
|
4007
4007
|
}
|
4008
4008
|
};
|
4009
|
-
return
|
4009
|
+
return Gn(R.parseFormat(n), g);
|
4010
4010
|
}
|
4011
4011
|
formatDurationFromString(e, n) {
|
4012
4012
|
const s = (c) => {
|
@@ -4037,10 +4037,10 @@ class R {
|
|
4037
4037
|
(c, { literal: u, val: l }) => u ? c : c.concat(l),
|
4038
4038
|
[]
|
4039
4039
|
), a = e.shiftTo(...o.map(s).filter((c) => c));
|
4040
|
-
return
|
4040
|
+
return Gn(i, r(a));
|
4041
4041
|
}
|
4042
4042
|
}
|
4043
|
-
const
|
4043
|
+
const pr = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
4044
4044
|
function Ee(...t) {
|
4045
4045
|
const e = t.reduce((n, s) => n + s.source, "");
|
4046
4046
|
return RegExp(`^${e}$`);
|
@@ -4064,7 +4064,7 @@ function Ce(t, ...e) {
|
|
4064
4064
|
}
|
4065
4065
|
return [null, null];
|
4066
4066
|
}
|
4067
|
-
function
|
4067
|
+
function gr(...t) {
|
4068
4068
|
return (e, n) => {
|
4069
4069
|
const s = {};
|
4070
4070
|
let r;
|
@@ -4073,14 +4073,14 @@ function pr(...t) {
|
|
4073
4073
|
return [s, null, n + r];
|
4074
4074
|
};
|
4075
4075
|
}
|
4076
|
-
const
|
4077
|
-
`${
|
4078
|
-
), $a = RegExp(`(?: ${
|
4076
|
+
const wr = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Aa = `(?:${wr.source}?(?:\\[(${pr.source})\\])?)?`, fn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Sr = RegExp(`${fn.source}${Aa}`), mn = RegExp(`(?:T${Sr.source})?`), Fa = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Ra = /(\d{4})-?W(\d\d)(?:-?(\d))?/, La = /(\d{4})-?(\d{3})/, Va = gr("weekYear", "weekNumber", "weekDay"), Wa = gr("year", "ordinal"), Ua = /(\d{4})-(\d\d)-(\d\d)/, br = RegExp(
|
4077
|
+
`${fn.source} ?(?:${wr.source}|(${pr.source}))?`
|
4078
|
+
), $a = RegExp(`(?: ${br.source})?`);
|
4079
4079
|
function ke(t, e, n) {
|
4080
4080
|
const s = t[e];
|
4081
4081
|
return w(s) ? n : oe(s);
|
4082
4082
|
}
|
4083
|
-
function
|
4083
|
+
function Ba(t, e) {
|
4084
4084
|
return [{
|
4085
4085
|
year: ke(t, e),
|
4086
4086
|
month: ke(t, e + 1, 1),
|
@@ -4092,18 +4092,18 @@ function Ne(t, e) {
|
|
4092
4092
|
hours: ke(t, e, 0),
|
4093
4093
|
minutes: ke(t, e + 1, 0),
|
4094
4094
|
seconds: ke(t, e + 2, 0),
|
4095
|
-
milliseconds:
|
4095
|
+
milliseconds: dn(t[e + 3])
|
4096
4096
|
}, null, e + 4];
|
4097
4097
|
}
|
4098
4098
|
function ze(t, e) {
|
4099
|
-
const n = !t[e] && !t[e + 1], s =
|
4099
|
+
const n = !t[e] && !t[e + 1], s = _t(t[e + 1], t[e + 2]), r = n ? null : U.instance(s);
|
4100
4100
|
return [{}, r, e + 3];
|
4101
4101
|
}
|
4102
4102
|
function Ze(t, e) {
|
4103
4103
|
const n = t[e] ? ne.create(t[e]) : null;
|
4104
4104
|
return [{}, n, e + 1];
|
4105
4105
|
}
|
4106
|
-
const
|
4106
|
+
const Ha = RegExp(`^T?${fn.source}$`), Pa = /^-?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)?)?)$/;
|
4107
4107
|
function za(t) {
|
4108
4108
|
const [e, n, s, r, i, o, a, c, u] = t, l = e[0] === "-", h = c && c[0] === "-", g = (m, f = !1) => m !== void 0 && (f || m && l) ? -m : m;
|
4109
4109
|
return [
|
@@ -4115,7 +4115,7 @@ function za(t) {
|
|
4115
4115
|
hours: g(de(o)),
|
4116
4116
|
minutes: g(de(a)),
|
4117
4117
|
seconds: g(de(c), c === "-0"),
|
4118
|
-
milliseconds: g(
|
4118
|
+
milliseconds: g(dn(u), h)
|
4119
4119
|
}
|
4120
4120
|
];
|
4121
4121
|
}
|
@@ -4130,15 +4130,15 @@ const Za = {
|
|
4130
4130
|
PDT: -7 * 60,
|
4131
4131
|
PST: -8 * 60
|
4132
4132
|
};
|
4133
|
-
function
|
4133
|
+
function yn(t, e, n, s, r, i, o) {
|
4134
4134
|
const a = {
|
4135
|
-
year: e.length === 2 ?
|
4136
|
-
month:
|
4135
|
+
year: e.length === 2 ? Qt(oe(e)) : oe(e),
|
4136
|
+
month: ur.indexOf(n) + 1,
|
4137
4137
|
day: oe(s),
|
4138
4138
|
hour: oe(r),
|
4139
4139
|
minute: oe(i)
|
4140
4140
|
};
|
4141
|
-
return o && (a.second = oe(o)), t && (a.weekday = t.length > 3 ?
|
4141
|
+
return o && (a.second = oe(o)), t && (a.weekday = t.length > 3 ? dr.indexOf(t) + 1 : hr.indexOf(t) + 1), a;
|
4142
4142
|
}
|
4143
4143
|
const qa = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
4144
4144
|
function ja(t) {
|
@@ -4155,24 +4155,24 @@ function ja(t) {
|
|
4155
4155
|
u,
|
4156
4156
|
l,
|
4157
4157
|
h
|
4158
|
-
] = t, g =
|
4158
|
+
] = t, g = yn(e, r, s, n, i, o, a);
|
4159
4159
|
let m;
|
4160
|
-
return c ? m = Za[c] : u ? m = 0 : m =
|
4160
|
+
return c ? m = Za[c] : u ? m = 0 : m = _t(l, h), [g, new U(m)];
|
4161
4161
|
}
|
4162
4162
|
function Ga(t) {
|
4163
4163
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
4164
4164
|
}
|
4165
4165
|
const Ya = /^(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$/, Ja = /^(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$/, Ka = /^(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})$/;
|
4166
|
-
function
|
4166
|
+
function Yn(t) {
|
4167
4167
|
const [, e, n, s, r, i, o, a] = t;
|
4168
|
-
return [
|
4168
|
+
return [yn(e, r, s, n, i, o, a), U.utcInstance];
|
4169
4169
|
}
|
4170
4170
|
function Qa(t) {
|
4171
4171
|
const [, e, n, s, r, i, o, a] = t;
|
4172
|
-
return [
|
4172
|
+
return [yn(e, a, n, s, r, i, o), U.utcInstance];
|
4173
4173
|
}
|
4174
|
-
const Xa = Ee(Fa,
|
4175
|
-
|
4174
|
+
const Xa = Ee(Fa, mn), ec = Ee(Ra, mn), tc = Ee(La, mn), nc = Ee(Sr), kr = ve(
|
4175
|
+
Ba,
|
4176
4176
|
Ne,
|
4177
4177
|
ze,
|
4178
4178
|
Ze
|
@@ -4194,7 +4194,7 @@ const Xa = Ee(Fa, fn), ec = Ee(Ra, fn), tc = Ee(La, fn), nc = Ee(wr), br = ve(
|
|
4194
4194
|
function oc(t) {
|
4195
4195
|
return Ce(
|
4196
4196
|
t,
|
4197
|
-
[Xa,
|
4197
|
+
[Xa, kr],
|
4198
4198
|
[ec, sc],
|
4199
4199
|
[tc, rc],
|
4200
4200
|
[nc, ic]
|
@@ -4206,8 +4206,8 @@ function ac(t) {
|
|
4206
4206
|
function cc(t) {
|
4207
4207
|
return Ce(
|
4208
4208
|
t,
|
4209
|
-
[Ya,
|
4210
|
-
[Ja,
|
4209
|
+
[Ya, Yn],
|
4210
|
+
[Ja, Yn],
|
4211
4211
|
[Ka, Qa]
|
4212
4212
|
);
|
4213
4213
|
}
|
@@ -4216,9 +4216,9 @@ function uc(t) {
|
|
4216
4216
|
}
|
4217
4217
|
const lc = ve(Ne);
|
4218
4218
|
function dc(t) {
|
4219
|
-
return Ce(t, [
|
4219
|
+
return Ce(t, [Ha, lc]);
|
4220
4220
|
}
|
4221
|
-
const hc = Ee(Ua, $a), fc = Ee(
|
4221
|
+
const hc = Ee(Ua, $a), fc = Ee(br), mc = ve(
|
4222
4222
|
Ne,
|
4223
4223
|
ze,
|
4224
4224
|
Ze
|
@@ -4226,11 +4226,11 @@ const hc = Ee(Ua, $a), fc = Ee(Sr), mc = ve(
|
|
4226
4226
|
function yc(t) {
|
4227
4227
|
return Ce(
|
4228
4228
|
t,
|
4229
|
-
[hc,
|
4229
|
+
[hc, kr],
|
4230
4230
|
[fc, mc]
|
4231
4231
|
);
|
4232
4232
|
}
|
4233
|
-
const
|
4233
|
+
const Jn = "Invalid Duration", Tr = {
|
4234
4234
|
weeks: {
|
4235
4235
|
days: 7,
|
4236
4236
|
hours: 7 * 24,
|
@@ -4275,26 +4275,26 @@ const Gn = "Invalid Duration", kr = {
|
|
4275
4275
|
seconds: 30 * 24 * 60 * 60,
|
4276
4276
|
milliseconds: 30 * 24 * 60 * 60 * 1e3
|
4277
4277
|
},
|
4278
|
-
...
|
4279
|
-
},
|
4278
|
+
...Tr
|
4279
|
+
}, H = 146097 / 400, ge = 146097 / 4800, gc = {
|
4280
4280
|
years: {
|
4281
4281
|
quarters: 4,
|
4282
4282
|
months: 12,
|
4283
|
-
weeks:
|
4284
|
-
days:
|
4285
|
-
hours:
|
4286
|
-
minutes:
|
4287
|
-
seconds:
|
4288
|
-
milliseconds:
|
4283
|
+
weeks: H / 7,
|
4284
|
+
days: H,
|
4285
|
+
hours: H * 24,
|
4286
|
+
minutes: H * 24 * 60,
|
4287
|
+
seconds: H * 24 * 60 * 60,
|
4288
|
+
milliseconds: H * 24 * 60 * 60 * 1e3
|
4289
4289
|
},
|
4290
4290
|
quarters: {
|
4291
4291
|
months: 3,
|
4292
|
-
weeks:
|
4293
|
-
days:
|
4294
|
-
hours:
|
4295
|
-
minutes:
|
4296
|
-
seconds:
|
4297
|
-
milliseconds:
|
4292
|
+
weeks: H / 28,
|
4293
|
+
days: H / 4,
|
4294
|
+
hours: H * 24 / 4,
|
4295
|
+
minutes: H * 24 * 60 / 4,
|
4296
|
+
seconds: H * 24 * 60 * 60 / 4,
|
4297
|
+
milliseconds: H * 24 * 60 * 60 * 1e3 / 4
|
4298
4298
|
},
|
4299
4299
|
months: {
|
4300
4300
|
weeks: ge / 7,
|
@@ -4304,7 +4304,7 @@ const Gn = "Invalid Duration", kr = {
|
|
4304
4304
|
seconds: ge * 24 * 60 * 60,
|
4305
4305
|
milliseconds: ge * 24 * 60 * 60 * 1e3
|
4306
4306
|
},
|
4307
|
-
...
|
4307
|
+
...Tr
|
4308
4308
|
}, me = [
|
4309
4309
|
"years",
|
4310
4310
|
"quarters",
|
@@ -4325,14 +4325,14 @@ function ie(t, e, n = !1) {
|
|
4325
4325
|
};
|
4326
4326
|
return new T(s);
|
4327
4327
|
}
|
4328
|
-
function
|
4328
|
+
function _r(t, e) {
|
4329
4329
|
let n = e.milliseconds ?? 0;
|
4330
4330
|
for (const s of wc.slice(1))
|
4331
4331
|
e[s] && (n += e[s] * t[s].milliseconds);
|
4332
4332
|
return n;
|
4333
4333
|
}
|
4334
|
-
function
|
4335
|
-
const n =
|
4334
|
+
function Kn(t, e) {
|
4335
|
+
const n = _r(t, e) < 0 ? -1 : 1;
|
4336
4336
|
me.reduceRight((s, r) => {
|
4337
4337
|
if (w(e[r]))
|
4338
4338
|
return s;
|
@@ -4364,7 +4364,7 @@ class T {
|
|
4364
4364
|
constructor(e) {
|
4365
4365
|
const n = e.conversionAccuracy === "longterm" || !1;
|
4366
4366
|
let s = n ? gc : pc;
|
4367
|
-
e.matrix && (s = e.matrix), this.values = e.values, this.loc = e.loc ||
|
4367
|
+
e.matrix && (s = e.matrix), this.values = e.values, this.loc = e.loc || v.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = s, this.isLuxonDuration = !0;
|
4368
4368
|
}
|
4369
4369
|
/**
|
4370
4370
|
* Create Duration from a number of milliseconds.
|
@@ -4404,8 +4404,8 @@ class T {
|
|
4404
4404
|
`Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
|
4405
4405
|
);
|
4406
4406
|
return new T({
|
4407
|
-
values:
|
4408
|
-
loc:
|
4407
|
+
values: ft(e, T.normalizeUnit),
|
4408
|
+
loc: v.fromObject(n),
|
4409
4409
|
conversionAccuracy: n.conversionAccuracy,
|
4410
4410
|
matrix: n.matrix
|
4411
4411
|
});
|
@@ -4508,7 +4508,7 @@ class T {
|
|
4508
4508
|
milliseconds: "milliseconds"
|
4509
4509
|
}[e && e.toLowerCase()];
|
4510
4510
|
if (!n)
|
4511
|
-
throw new
|
4511
|
+
throw new As(e);
|
4512
4512
|
return n;
|
4513
4513
|
}
|
4514
4514
|
/**
|
@@ -4561,7 +4561,7 @@ class T {
|
|
4561
4561
|
...n,
|
4562
4562
|
floor: n.round !== !1 && n.floor !== !1
|
4563
4563
|
};
|
4564
|
-
return this.isValid ? R.create(this.loc, s).formatDurationFromString(this, e) :
|
4564
|
+
return this.isValid ? R.create(this.loc, s).formatDurationFromString(this, e) : Jn;
|
4565
4565
|
}
|
4566
4566
|
/**
|
4567
4567
|
* Returns a string representation of a Duration with all units included.
|
@@ -4579,7 +4579,7 @@ class T {
|
|
4579
4579
|
*/
|
4580
4580
|
toHuman(e = {}) {
|
4581
4581
|
if (!this.isValid)
|
4582
|
-
return
|
4582
|
+
return Jn;
|
4583
4583
|
const n = me.map((s) => {
|
4584
4584
|
const r = this.values[s];
|
4585
4585
|
return w(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: s.slice(0, -1) }).format(r);
|
@@ -4608,7 +4608,7 @@ class T {
|
|
4608
4608
|
if (!this.isValid)
|
4609
4609
|
return null;
|
4610
4610
|
let e = "P";
|
4611
|
-
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 +=
|
4611
|
+
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 += hn(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
4612
4612
|
}
|
4613
4613
|
/**
|
4614
4614
|
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
|
@@ -4665,7 +4665,7 @@ class T {
|
|
4665
4665
|
* @return {number}
|
4666
4666
|
*/
|
4667
4667
|
toMillis() {
|
4668
|
-
return this.isValid ?
|
4668
|
+
return this.isValid ? _r(this.matrix, this.values) : NaN;
|
4669
4669
|
}
|
4670
4670
|
/**
|
4671
4671
|
* Returns an milliseconds value of this Duration. Alias of {@link toMillis}
|
@@ -4710,7 +4710,7 @@ class T {
|
|
4710
4710
|
return this;
|
4711
4711
|
const n = {};
|
4712
4712
|
for (const s of Object.keys(this.values))
|
4713
|
-
n[s] =
|
4713
|
+
n[s] = cr(e(this.values[s], s));
|
4714
4714
|
return ie(this, { values: n }, !0);
|
4715
4715
|
}
|
4716
4716
|
/**
|
@@ -4734,7 +4734,7 @@ class T {
|
|
4734
4734
|
set(e) {
|
4735
4735
|
if (!this.isValid)
|
4736
4736
|
return this;
|
4737
|
-
const n = { ...this.values, ...
|
4737
|
+
const n = { ...this.values, ...ft(e, T.normalizeUnit) };
|
4738
4738
|
return ie(this, { values: n });
|
4739
4739
|
}
|
4740
4740
|
/**
|
@@ -4776,7 +4776,7 @@ class T {
|
|
4776
4776
|
if (!this.isValid)
|
4777
4777
|
return this;
|
4778
4778
|
const e = this.toObject();
|
4779
|
-
return
|
4779
|
+
return Kn(this.matrix, e), ie(this, { values: e }, !0);
|
4780
4780
|
}
|
4781
4781
|
/**
|
4782
4782
|
* Rescale units to its largest representation
|
@@ -4815,7 +4815,7 @@ class T {
|
|
4815
4815
|
ye(r[o]) && (s[o] = r[o]);
|
4816
4816
|
for (const o in s)
|
4817
4817
|
s[o] !== 0 && (n[i] += o === i ? s[o] : s[o] / this.matrix[i][o]);
|
4818
|
-
return
|
4818
|
+
return Kn(this.matrix, n), ie(this, { values: n }, !0);
|
4819
4819
|
}
|
4820
4820
|
/**
|
4821
4821
|
* Shift this Duration to all available units.
|
@@ -5339,7 +5339,7 @@ class I {
|
|
5339
5339
|
* @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
|
5340
5340
|
* @return {string}
|
5341
5341
|
*/
|
5342
|
-
toLocaleString(e =
|
5342
|
+
toLocaleString(e = lt, n = {}) {
|
5343
5343
|
return this.isValid ? R.create(this.s.loc.clone(n), e).formatInterval(this) : we;
|
5344
5344
|
}
|
5345
5345
|
/**
|
@@ -5453,7 +5453,7 @@ class Ke {
|
|
5453
5453
|
* @returns {number} the start of the week, 1 for Monday through 7 for Sunday
|
5454
5454
|
*/
|
5455
5455
|
static getStartOfWeek({ locale: e = null, locObj: n = null } = {}) {
|
5456
|
-
return (n ||
|
5456
|
+
return (n || v.create(e)).getStartOfWeek();
|
5457
5457
|
}
|
5458
5458
|
/**
|
5459
5459
|
* Get the minimum number of days necessary in a week before it is considered part of the next year according
|
@@ -5464,7 +5464,7 @@ class Ke {
|
|
5464
5464
|
* @returns {number}
|
5465
5465
|
*/
|
5466
5466
|
static getMinimumDaysInFirstWeek({ locale: e = null, locObj: n = null } = {}) {
|
5467
|
-
return (n ||
|
5467
|
+
return (n || v.create(e)).getMinDaysInFirstWeek();
|
5468
5468
|
}
|
5469
5469
|
/**
|
5470
5470
|
* Get the weekdays, which are considered the weekend according to the given locale
|
@@ -5474,7 +5474,7 @@ class Ke {
|
|
5474
5474
|
* @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday
|
5475
5475
|
*/
|
5476
5476
|
static getWeekendWeekdays({ locale: e = null, locObj: n = null } = {}) {
|
5477
|
-
return (n ||
|
5477
|
+
return (n || v.create(e)).getWeekendDays().slice();
|
5478
5478
|
}
|
5479
5479
|
/**
|
5480
5480
|
* Return an array of standalone month names.
|
@@ -5494,7 +5494,7 @@ class Ke {
|
|
5494
5494
|
* @return {Array}
|
5495
5495
|
*/
|
5496
5496
|
static months(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null, outputCalendar: i = "gregory" } = {}) {
|
5497
|
-
return (r ||
|
5497
|
+
return (r || v.create(n, s, i)).months(e);
|
5498
5498
|
}
|
5499
5499
|
/**
|
5500
5500
|
* Return an array of format month names.
|
@@ -5510,7 +5510,7 @@ class Ke {
|
|
5510
5510
|
* @return {Array}
|
5511
5511
|
*/
|
5512
5512
|
static monthsFormat(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null, outputCalendar: i = "gregory" } = {}) {
|
5513
|
-
return (r ||
|
5513
|
+
return (r || v.create(n, s, i)).months(e, !0);
|
5514
5514
|
}
|
5515
5515
|
/**
|
5516
5516
|
* Return an array of standalone week names.
|
@@ -5527,7 +5527,7 @@ class Ke {
|
|
5527
5527
|
* @return {Array}
|
5528
5528
|
*/
|
5529
5529
|
static weekdays(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null } = {}) {
|
5530
|
-
return (r ||
|
5530
|
+
return (r || v.create(n, s, null)).weekdays(e);
|
5531
5531
|
}
|
5532
5532
|
/**
|
5533
5533
|
* Return an array of format week names.
|
@@ -5542,7 +5542,7 @@ class Ke {
|
|
5542
5542
|
* @return {Array}
|
5543
5543
|
*/
|
5544
5544
|
static weekdaysFormat(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null } = {}) {
|
5545
|
-
return (r ||
|
5545
|
+
return (r || v.create(n, s, null)).weekdays(e, !0);
|
5546
5546
|
}
|
5547
5547
|
/**
|
5548
5548
|
* Return an array of meridiems.
|
@@ -5553,7 +5553,7 @@ class Ke {
|
|
5553
5553
|
* @return {Array}
|
5554
5554
|
*/
|
5555
5555
|
static meridiems({ locale: e = null } = {}) {
|
5556
|
-
return
|
5556
|
+
return v.create(e).meridiems();
|
5557
5557
|
}
|
5558
5558
|
/**
|
5559
5559
|
* Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
|
@@ -5566,7 +5566,7 @@ class Ke {
|
|
5566
5566
|
* @return {Array}
|
5567
5567
|
*/
|
5568
5568
|
static eras(e = "short", { locale: n = null } = {}) {
|
5569
|
-
return
|
5569
|
+
return v.create(n, null, "gregory").eras(e);
|
5570
5570
|
}
|
5571
5571
|
/**
|
5572
5572
|
* Return the set of available features in this environment.
|
@@ -5578,10 +5578,10 @@ class Ke {
|
|
5578
5578
|
* @return {Object}
|
5579
5579
|
*/
|
5580
5580
|
static features() {
|
5581
|
-
return { relative:
|
5581
|
+
return { relative: ir(), localeWeek: or() };
|
5582
5582
|
}
|
5583
5583
|
}
|
5584
|
-
function
|
5584
|
+
function Qn(t, e) {
|
5585
5585
|
const n = (r) => r.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), s = n(e) - n(t);
|
5586
5586
|
return Math.floor(T.fromMillis(s).as("days"));
|
5587
5587
|
}
|
@@ -5593,11 +5593,11 @@ function kc(t, e, n) {
|
|
5593
5593
|
[
|
5594
5594
|
"weeks",
|
5595
5595
|
(c, u) => {
|
5596
|
-
const l =
|
5596
|
+
const l = Qn(c, u);
|
5597
5597
|
return (l - l % 7) / 7;
|
5598
5598
|
}
|
5599
5599
|
],
|
5600
|
-
["days",
|
5600
|
+
["days", Qn]
|
5601
5601
|
], r = {}, i = t;
|
5602
5602
|
let o, a;
|
5603
5603
|
for (const [c, u] of s)
|
@@ -5613,7 +5613,7 @@ function Tc(t, e, n, s) {
|
|
5613
5613
|
const l = T.fromObject(i, s);
|
5614
5614
|
return u.length > 0 ? T.fromMillis(c, s).shiftTo(...u).plus(l) : l;
|
5615
5615
|
}
|
5616
|
-
const
|
5616
|
+
const pn = {
|
5617
5617
|
arab: "[٠-٩]",
|
5618
5618
|
arabext: "[۰-۹]",
|
5619
5619
|
bali: "[᭐-᭙]",
|
@@ -5635,7 +5635,7 @@ const yn = {
|
|
5635
5635
|
thai: "[๐-๙]",
|
5636
5636
|
tibt: "[༠-༩]",
|
5637
5637
|
latn: "\\d"
|
5638
|
-
},
|
5638
|
+
}, Xn = {
|
5639
5639
|
arab: [1632, 1641],
|
5640
5640
|
arabext: [1776, 1785],
|
5641
5641
|
bali: [6992, 7001],
|
@@ -5655,18 +5655,18 @@ const yn = {
|
|
5655
5655
|
telu: [3174, 3183],
|
5656
5656
|
thai: [3664, 3673],
|
5657
5657
|
tibt: [3872, 3881]
|
5658
|
-
}, _c =
|
5658
|
+
}, _c = pn.hanidec.replace(/[\[|\]]/g, "").split("");
|
5659
5659
|
function Oc(t) {
|
5660
5660
|
let e = parseInt(t, 10);
|
5661
5661
|
if (isNaN(e)) {
|
5662
5662
|
e = "";
|
5663
5663
|
for (let n = 0; n < t.length; n++) {
|
5664
5664
|
const s = t.charCodeAt(n);
|
5665
|
-
if (t[n].search(
|
5665
|
+
if (t[n].search(pn.hanidec) !== -1)
|
5666
5666
|
e += _c.indexOf(t[n]);
|
5667
5667
|
else
|
5668
|
-
for (const r in
|
5669
|
-
const [i, o] =
|
5668
|
+
for (const r in Xn) {
|
5669
|
+
const [i, o] = Xn[r];
|
5670
5670
|
s >= i && s <= o && (e += s - i);
|
5671
5671
|
}
|
5672
5672
|
}
|
@@ -5675,27 +5675,27 @@ function Oc(t) {
|
|
5675
5675
|
return e;
|
5676
5676
|
}
|
5677
5677
|
function G({ numberingSystem: t }, e = "") {
|
5678
|
-
return new RegExp(`${
|
5678
|
+
return new RegExp(`${pn[t || "latn"]}${e}`);
|
5679
5679
|
}
|
5680
5680
|
const Ec = "missing Intl.DateTimeFormat.formatToParts support";
|
5681
5681
|
function O(t, e = (n) => n) {
|
5682
5682
|
return { regex: t, deser: ([n]) => e(Oc(n)) };
|
5683
5683
|
}
|
5684
|
-
const vc = String.fromCharCode(160),
|
5684
|
+
const vc = String.fromCharCode(160), Or = `[ ${vc}]`, Er = new RegExp(Or, "g");
|
5685
5685
|
function Cc(t) {
|
5686
|
-
return t.replace(/\./g, "\\.?").replace(
|
5686
|
+
return t.replace(/\./g, "\\.?").replace(Er, Or);
|
5687
5687
|
}
|
5688
|
-
function
|
5689
|
-
return t.replace(/\./g, "").replace(
|
5688
|
+
function es(t) {
|
5689
|
+
return t.replace(/\./g, "").replace(Er, " ").toLowerCase();
|
5690
5690
|
}
|
5691
5691
|
function Y(t, e) {
|
5692
5692
|
return t === null ? null : {
|
5693
5693
|
regex: RegExp(t.map(Cc).join("|")),
|
5694
|
-
deser: ([n]) => t.findIndex((s) =>
|
5694
|
+
deser: ([n]) => t.findIndex((s) => es(n) === es(s)) + e
|
5695
5695
|
};
|
5696
5696
|
}
|
5697
|
-
function
|
5698
|
-
return { regex: t, deser: ([, n, s]) =>
|
5697
|
+
function ts(t, e) {
|
5698
|
+
return { regex: t, deser: ([, n, s]) => _t(n, s), groups: e };
|
5699
5699
|
}
|
5700
5700
|
function Qe(t) {
|
5701
5701
|
return { regex: t, deser: ([e]) => e };
|
@@ -5715,7 +5715,7 @@ function Ic(t, e) {
|
|
5715
5715
|
case "y":
|
5716
5716
|
return O(u);
|
5717
5717
|
case "yy":
|
5718
|
-
return O(h,
|
5718
|
+
return O(h, Qt);
|
5719
5719
|
case "yyyy":
|
5720
5720
|
return O(i);
|
5721
5721
|
case "yyyyy":
|
@@ -5781,7 +5781,7 @@ function Ic(t, e) {
|
|
5781
5781
|
case "kkkk":
|
5782
5782
|
return O(i);
|
5783
5783
|
case "kk":
|
5784
|
-
return O(h,
|
5784
|
+
return O(h, Qt);
|
5785
5785
|
case "W":
|
5786
5786
|
return O(a);
|
5787
5787
|
case "WW":
|
@@ -5799,9 +5799,9 @@ function Ic(t, e) {
|
|
5799
5799
|
return Y(e.weekdays("long", !0), 1);
|
5800
5800
|
case "Z":
|
5801
5801
|
case "ZZ":
|
5802
|
-
return
|
5802
|
+
return ts(new RegExp(`([+-]${a.source})(?::(${s.source}))?`), 2);
|
5803
5803
|
case "ZZZ":
|
5804
|
-
return
|
5804
|
+
return ts(new RegExp(`([+-]${a.source})(${s.source})?`), 2);
|
5805
5805
|
case "z":
|
5806
5806
|
return Qe(/[a-z_+-/]{1,256}?/i);
|
5807
5807
|
case " ":
|
@@ -5927,7 +5927,7 @@ function Fc(t) {
|
|
5927
5927
|
}
|
5928
5928
|
};
|
5929
5929
|
let n = null, s;
|
5930
|
-
return w(t.z) || (n = ne.create(t.z)), w(t.Z) || (n || (n = new U(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 =
|
5930
|
+
return w(t.z) || (n = ne.create(t.z)), w(t.Z) || (n || (n = new U(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 = dn(t.u)), [Object.keys(t).reduce((i, o) => {
|
5931
5931
|
const a = e(o);
|
5932
5932
|
return a && (i[a] = t[o]), i;
|
5933
5933
|
}, {}), n, s];
|
@@ -5939,14 +5939,14 @@ function Rc() {
|
|
5939
5939
|
function Lc(t, e) {
|
5940
5940
|
if (t.literal)
|
5941
5941
|
return t;
|
5942
|
-
const n = R.macroTokenToFormatOpts(t.val), s =
|
5942
|
+
const n = R.macroTokenToFormatOpts(t.val), s = Nr(n, e);
|
5943
5943
|
return s == null || s.includes(void 0) ? t : s;
|
5944
5944
|
}
|
5945
|
-
function
|
5945
|
+
function vr(t, e) {
|
5946
5946
|
return Array.prototype.concat(...t.map((n) => Lc(n, e)));
|
5947
5947
|
}
|
5948
|
-
function
|
5949
|
-
const s =
|
5948
|
+
function Cr(t, e, n) {
|
5949
|
+
const s = vr(R.parseFormat(n), t), r = s.map((o) => Ic(o, t)), i = r.find((o) => o.invalidReason);
|
5950
5950
|
if (i)
|
5951
5951
|
return { input: e, tokens: s, invalidReason: i.invalidReason };
|
5952
5952
|
{
|
@@ -5959,24 +5959,24 @@ function vr(t, e, n) {
|
|
5959
5959
|
}
|
5960
5960
|
}
|
5961
5961
|
function Vc(t, e, n) {
|
5962
|
-
const { result: s, zone: r, specificOffset: i, invalidReason: o } =
|
5962
|
+
const { result: s, zone: r, specificOffset: i, invalidReason: o } = Cr(t, e, n);
|
5963
5963
|
return [s, r, i, o];
|
5964
5964
|
}
|
5965
|
-
function
|
5965
|
+
function Nr(t, e) {
|
5966
5966
|
if (!t)
|
5967
5967
|
return null;
|
5968
5968
|
const s = R.create(e, t).dtFormatter(Rc()), r = s.formatToParts(), i = s.resolvedOptions();
|
5969
5969
|
return r.map((o) => xc(o, t, i));
|
5970
5970
|
}
|
5971
|
-
const Wt = "Invalid DateTime",
|
5971
|
+
const Wt = "Invalid DateTime", ns = 864e13;
|
5972
5972
|
function Xe(t) {
|
5973
5973
|
return new J("unsupported zone", `the zone "${t.name}" is not supported`);
|
5974
5974
|
}
|
5975
5975
|
function Ut(t) {
|
5976
|
-
return t.weekData === null && (t.weekData =
|
5976
|
+
return t.weekData === null && (t.weekData = dt(t.c)), t.weekData;
|
5977
5977
|
}
|
5978
5978
|
function $t(t) {
|
5979
|
-
return t.localWeekData === null && (t.localWeekData =
|
5979
|
+
return t.localWeekData === null && (t.localWeekData = dt(
|
5980
5980
|
t.c,
|
5981
5981
|
t.loc.getMinDaysInFirstWeek(),
|
5982
5982
|
t.loc.getStartOfWeek()
|
@@ -5993,7 +5993,7 @@ function he(t, e) {
|
|
5993
5993
|
};
|
5994
5994
|
return new S({ ...n, ...e, old: n });
|
5995
5995
|
}
|
5996
|
-
function
|
5996
|
+
function Ir(t, e, n) {
|
5997
5997
|
let s = t - e * 60 * 1e3;
|
5998
5998
|
const r = n.offset(s);
|
5999
5999
|
if (e === r)
|
@@ -6015,15 +6015,15 @@ function et(t, e) {
|
|
6015
6015
|
millisecond: n.getUTCMilliseconds()
|
6016
6016
|
};
|
6017
6017
|
}
|
6018
|
-
function
|
6019
|
-
return
|
6018
|
+
function ct(t, e, n) {
|
6019
|
+
return Ir(Tt(t), e, n);
|
6020
6020
|
}
|
6021
|
-
function
|
6021
|
+
function ss(t, e) {
|
6022
6022
|
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 = {
|
6023
6023
|
...t.c,
|
6024
6024
|
year: s,
|
6025
6025
|
month: r,
|
6026
|
-
day: Math.min(t.c.day,
|
6026
|
+
day: Math.min(t.c.day, ht(s, r)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7
|
6027
6027
|
}, o = T.fromObject({
|
6028
6028
|
years: e.years - Math.trunc(e.years),
|
6029
6029
|
quarters: e.quarters - Math.trunc(e.quarters),
|
@@ -6034,8 +6034,8 @@ function ts(t, e) {
|
|
6034
6034
|
minutes: e.minutes,
|
6035
6035
|
seconds: e.seconds,
|
6036
6036
|
milliseconds: e.milliseconds
|
6037
|
-
}).as("milliseconds"), a =
|
6038
|
-
let [c, u] =
|
6037
|
+
}).as("milliseconds"), a = Tt(i);
|
6038
|
+
let [c, u] = Ir(a, n, t.zone);
|
6039
6039
|
return o !== 0 && (c += o, u = t.zone.offset(c)), { ts: c, o: u };
|
6040
6040
|
}
|
6041
6041
|
function Me(t, e, n, s, r, i) {
|
@@ -6053,21 +6053,21 @@ function Me(t, e, n, s, r, i) {
|
|
6053
6053
|
);
|
6054
6054
|
}
|
6055
6055
|
function tt(t, e, n = !0) {
|
6056
|
-
return t.isValid ? R.create(
|
6056
|
+
return t.isValid ? R.create(v.create("en-US"), {
|
6057
6057
|
allowZ: n,
|
6058
6058
|
forceSimple: !0
|
6059
6059
|
}).formatDateTimeFromString(t, e) : null;
|
6060
6060
|
}
|
6061
|
-
function
|
6061
|
+
function Bt(t, e) {
|
6062
6062
|
const n = t.c.year > 9999 || t.c.year < 0;
|
6063
6063
|
let s = "";
|
6064
6064
|
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;
|
6065
6065
|
}
|
6066
|
-
function
|
6066
|
+
function rs(t, e, n, s, r, i) {
|
6067
6067
|
let o = M(t.c.hour);
|
6068
6068
|
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;
|
6069
6069
|
}
|
6070
|
-
const
|
6070
|
+
const Dr = {
|
6071
6071
|
month: 1,
|
6072
6072
|
day: 1,
|
6073
6073
|
hour: 0,
|
@@ -6087,7 +6087,7 @@ const Ir = {
|
|
6087
6087
|
minute: 0,
|
6088
6088
|
second: 0,
|
6089
6089
|
millisecond: 0
|
6090
|
-
},
|
6090
|
+
}, xr = ["year", "month", "day", "hour", "minute", "second", "millisecond"], $c = [
|
6091
6091
|
"weekYear",
|
6092
6092
|
"weekNumber",
|
6093
6093
|
"weekday",
|
@@ -6095,8 +6095,8 @@ const Ir = {
|
|
6095
6095
|
"minute",
|
6096
6096
|
"second",
|
6097
6097
|
"millisecond"
|
6098
|
-
],
|
6099
|
-
function
|
6098
|
+
], Bc = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
|
6099
|
+
function Hc(t) {
|
6100
6100
|
const e = {
|
6101
6101
|
year: "year",
|
6102
6102
|
years: "year",
|
@@ -6124,10 +6124,10 @@ function Bc(t) {
|
|
6124
6124
|
ordinal: "ordinal"
|
6125
6125
|
}[t.toLowerCase()];
|
6126
6126
|
if (!e)
|
6127
|
-
throw new
|
6127
|
+
throw new As(t);
|
6128
6128
|
return e;
|
6129
6129
|
}
|
6130
|
-
function
|
6130
|
+
function is(t) {
|
6131
6131
|
switch (t.toLowerCase()) {
|
6132
6132
|
case "localweekday":
|
6133
6133
|
case "localweekdays":
|
@@ -6139,27 +6139,27 @@ function ss(t) {
|
|
6139
6139
|
case "localweekyears":
|
6140
6140
|
return "localWeekYear";
|
6141
6141
|
default:
|
6142
|
-
return
|
6142
|
+
return Hc(t);
|
6143
6143
|
}
|
6144
6144
|
}
|
6145
|
-
function
|
6146
|
-
const n = ce(e.zone, x.defaultZone), s =
|
6145
|
+
function os(t, e) {
|
6146
|
+
const n = ce(e.zone, x.defaultZone), s = v.fromObject(e), r = x.now();
|
6147
6147
|
let i, o;
|
6148
6148
|
if (w(t.year))
|
6149
6149
|
i = r;
|
6150
6150
|
else {
|
6151
|
-
for (const u of
|
6152
|
-
w(t[u]) && (t[u] =
|
6153
|
-
const a =
|
6151
|
+
for (const u of xr)
|
6152
|
+
w(t[u]) && (t[u] = Dr[u]);
|
6153
|
+
const a = sr(t) || rr(t);
|
6154
6154
|
if (a)
|
6155
6155
|
return S.invalid(a);
|
6156
6156
|
const c = n.offset(r);
|
6157
|
-
[i, o] =
|
6157
|
+
[i, o] = ct(t, c, n);
|
6158
6158
|
}
|
6159
6159
|
return new S({ ts: i, zone: n, loc: s, o });
|
6160
6160
|
}
|
6161
|
-
function
|
6162
|
-
const s = w(n.round) ? !0 : n.round, r = (o, a) => (o =
|
6161
|
+
function as(t, e, n) {
|
6162
|
+
const s = w(n.round) ? !0 : n.round, r = (o, a) => (o = hn(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);
|
6163
6163
|
if (n.unit)
|
6164
6164
|
return r(i(n.unit), n.unit);
|
6165
6165
|
for (const o of n.units) {
|
@@ -6169,7 +6169,7 @@ function is(t, e, n) {
|
|
6169
6169
|
}
|
6170
6170
|
return r(t > e ? -0 : 0, n.units[n.units.length - 1]);
|
6171
6171
|
}
|
6172
|
-
function
|
6172
|
+
function cs(t) {
|
6173
6173
|
let e = {}, n;
|
6174
6174
|
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];
|
6175
6175
|
}
|
@@ -6189,7 +6189,7 @@ class S {
|
|
6189
6189
|
const a = n.offset(this.ts);
|
6190
6190
|
r = et(this.ts, a), s = Number.isNaN(r.year) ? new J("invalid input") : null, r = s ? null : r, i = s ? null : a;
|
6191
6191
|
}
|
6192
|
-
this._zone = n, this.loc = e.loc ||
|
6192
|
+
this._zone = n, this.loc = e.loc || v.create(), this.invalid = s, this.weekData = null, this.localWeekData = null, this.c = r, this.o = i, this.isLuxonDateTime = !0;
|
6193
6193
|
}
|
6194
6194
|
// CONSTRUCT
|
6195
6195
|
/**
|
@@ -6224,8 +6224,8 @@ class S {
|
|
6224
6224
|
* @return {DateTime}
|
6225
6225
|
*/
|
6226
6226
|
static local() {
|
6227
|
-
const [e, n] =
|
6228
|
-
return
|
6227
|
+
const [e, n] = cs(arguments), [s, r, i, o, a, c, u] = n;
|
6228
|
+
return os({ year: s, month: r, day: i, hour: o, minute: a, second: c, millisecond: u }, e);
|
6229
6229
|
}
|
6230
6230
|
/**
|
6231
6231
|
* Create a DateTime in UTC
|
@@ -6252,8 +6252,8 @@ class S {
|
|
6252
6252
|
* @return {DateTime}
|
6253
6253
|
*/
|
6254
6254
|
static utc() {
|
6255
|
-
const [e, n] =
|
6256
|
-
return e.zone = U.utcInstance,
|
6255
|
+
const [e, n] = cs(arguments), [s, r, i, o, a, c, u] = n;
|
6256
|
+
return e.zone = U.utcInstance, os({ year: s, month: r, day: i, hour: o, minute: a, second: c, millisecond: u }, e);
|
6257
6257
|
}
|
6258
6258
|
/**
|
6259
6259
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
@@ -6270,7 +6270,7 @@ class S {
|
|
6270
6270
|
return r.isValid ? new S({
|
6271
6271
|
ts: s,
|
6272
6272
|
zone: r,
|
6273
|
-
loc:
|
6273
|
+
loc: v.fromObject(n)
|
6274
6274
|
}) : S.invalid(Xe(r));
|
6275
6275
|
}
|
6276
6276
|
/**
|
@@ -6285,10 +6285,10 @@ class S {
|
|
6285
6285
|
*/
|
6286
6286
|
static fromMillis(e, n = {}) {
|
6287
6287
|
if (ye(e))
|
6288
|
-
return e < -
|
6288
|
+
return e < -ns || e > ns ? S.invalid("Timestamp out of range") : new S({
|
6289
6289
|
ts: e,
|
6290
6290
|
zone: ce(n.zone, x.defaultZone),
|
6291
|
-
loc:
|
6291
|
+
loc: v.fromObject(n)
|
6292
6292
|
});
|
6293
6293
|
throw new $(
|
6294
6294
|
`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
|
@@ -6309,7 +6309,7 @@ class S {
|
|
6309
6309
|
return new S({
|
6310
6310
|
ts: e * 1e3,
|
6311
6311
|
zone: ce(n.zone, x.defaultZone),
|
6312
|
-
loc:
|
6312
|
+
loc: v.fromObject(n)
|
6313
6313
|
});
|
6314
6314
|
throw new $("fromSeconds requires a numerical input");
|
6315
6315
|
}
|
@@ -6350,7 +6350,7 @@ class S {
|
|
6350
6350
|
const s = ce(n.zone, x.defaultZone);
|
6351
6351
|
if (!s.isValid)
|
6352
6352
|
return S.invalid(Xe(s));
|
6353
|
-
const r =
|
6353
|
+
const r = v.fromObject(n), i = ft(e, is), { minDaysInFirstWeek: o, startOfWeek: a } = Zn(i, r), c = x.now(), u = w(n.specificOffset) ? s.offset(c) : n.specificOffset, l = !w(i.ordinal), h = !w(i.year), g = !w(i.month) || !w(i.day), m = h || g, f = i.weekYear || i.weekNumber;
|
6354
6354
|
if ((m || l) && f)
|
6355
6355
|
throw new Se(
|
6356
6356
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -6359,25 +6359,25 @@ class S {
|
|
6359
6359
|
throw new Se("Can't mix ordinal dates with month/day");
|
6360
6360
|
const p = f || i.weekday && !m;
|
6361
6361
|
let C, b, k = et(c, u);
|
6362
|
-
p ? (C = $c, b = Wc, k =
|
6362
|
+
p ? (C = $c, b = Wc, k = dt(k, o, a)) : l ? (C = Bc, b = Uc, k = Lt(k)) : (C = xr, b = Dr);
|
6363
6363
|
let N = !1;
|
6364
6364
|
for (const De of C) {
|
6365
|
-
const
|
6366
|
-
w(
|
6365
|
+
const Ar = i[De];
|
6366
|
+
w(Ar) ? N ? i[De] = b[De] : i[De] = k[De] : N = !0;
|
6367
6367
|
}
|
6368
|
-
const D = p ? ma(i, o, a) : l ? ya(i) :
|
6368
|
+
const D = p ? ma(i, o, a) : l ? ya(i) : sr(i), le = D || rr(i);
|
6369
6369
|
if (le)
|
6370
6370
|
return S.invalid(le);
|
6371
|
-
const Ie = p ?
|
6372
|
-
ts:
|
6371
|
+
const Ie = p ? Pn(i, o, a) : l ? zn(i) : i, [Et, vt] = ct(Ie, u, s), Ct = new S({
|
6372
|
+
ts: Et,
|
6373
6373
|
zone: s,
|
6374
|
-
o:
|
6374
|
+
o: vt,
|
6375
6375
|
loc: r
|
6376
6376
|
});
|
6377
|
-
return i.weekday && m && e.weekday !==
|
6377
|
+
return i.weekday && m && e.weekday !== Ct.weekday ? S.invalid(
|
6378
6378
|
"mismatched weekday",
|
6379
|
-
`you can't specify both a weekday of ${i.weekday} and a date of ${
|
6380
|
-
) :
|
6379
|
+
`you can't specify both a weekday of ${i.weekday} and a date of ${Ct.toISO()}`
|
6380
|
+
) : Ct;
|
6381
6381
|
}
|
6382
6382
|
/**
|
6383
6383
|
* Create a DateTime from an ISO 8601 string
|
@@ -6452,7 +6452,7 @@ class S {
|
|
6452
6452
|
static fromFormat(e, n, s = {}) {
|
6453
6453
|
if (w(e) || w(n))
|
6454
6454
|
throw new $("fromFormat requires an input string and a format");
|
6455
|
-
const { locale: r = null, numberingSystem: i = null } = s, o =
|
6455
|
+
const { locale: r = null, numberingSystem: i = null } = s, o = v.fromOpts({
|
6456
6456
|
locale: r,
|
6457
6457
|
numberingSystem: i,
|
6458
6458
|
defaultToEN: !0
|
@@ -6518,7 +6518,7 @@ class S {
|
|
6518
6518
|
* @returns {string}
|
6519
6519
|
*/
|
6520
6520
|
static parseFormatForOpts(e, n = {}) {
|
6521
|
-
const s =
|
6521
|
+
const s = Nr(e, v.fromObject(n));
|
6522
6522
|
return s ? s.map((r) => r ? r.val : null).join("") : null;
|
6523
6523
|
}
|
6524
6524
|
/**
|
@@ -6529,7 +6529,7 @@ class S {
|
|
6529
6529
|
* @returns {string}
|
6530
6530
|
*/
|
6531
6531
|
static expandFormat(e, n = {}) {
|
6532
|
-
return
|
6532
|
+
return vr(R.parseFormat(e), v.fromObject(n)).map((r) => r.val).join("");
|
6533
6533
|
}
|
6534
6534
|
// INFO
|
6535
6535
|
/**
|
@@ -6827,7 +6827,7 @@ class S {
|
|
6827
6827
|
getPossibleOffsets() {
|
6828
6828
|
if (!this.isValid || this.isOffsetFixed)
|
6829
6829
|
return [this];
|
6830
|
-
const e = 864e5, n = 6e4, s =
|
6830
|
+
const e = 864e5, n = 6e4, s = Tt(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);
|
6831
6831
|
if (o === a)
|
6832
6832
|
return [this];
|
6833
6833
|
const c = s - o * n, u = s - a * n, l = et(c, o), h = et(u, a);
|
@@ -6849,7 +6849,7 @@ class S {
|
|
6849
6849
|
* @type {number}
|
6850
6850
|
*/
|
6851
6851
|
get daysInMonth() {
|
6852
|
-
return
|
6852
|
+
return ht(this.year, this.month);
|
6853
6853
|
}
|
6854
6854
|
/**
|
6855
6855
|
* Returns the number of days in this DateTime's year
|
@@ -6933,7 +6933,7 @@ class S {
|
|
6933
6933
|
let r = this.ts;
|
6934
6934
|
if (n || s) {
|
6935
6935
|
const i = e.offset(this.ts), o = this.toObject();
|
6936
|
-
[r] =
|
6936
|
+
[r] = ct(o, i, e);
|
6937
6937
|
}
|
6938
6938
|
return he(this, { ts: r, zone: e });
|
6939
6939
|
} else
|
@@ -6974,7 +6974,7 @@ class S {
|
|
6974
6974
|
set(e) {
|
6975
6975
|
if (!this.isValid)
|
6976
6976
|
return this;
|
6977
|
-
const n =
|
6977
|
+
const n = ft(e, is), { minDaysInFirstWeek: s, startOfWeek: r } = Zn(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;
|
6978
6978
|
if ((u || o) && l)
|
6979
6979
|
throw new Se(
|
6980
6980
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -6982,12 +6982,12 @@ class S {
|
|
6982
6982
|
if (c && o)
|
6983
6983
|
throw new Se("Can't mix ordinal dates with month/day");
|
6984
6984
|
let h;
|
6985
|
-
i ? h =
|
6986
|
-
{ ...
|
6985
|
+
i ? h = Pn(
|
6986
|
+
{ ...dt(this.c, s, r), ...n },
|
6987
6987
|
s,
|
6988
6988
|
r
|
6989
|
-
) : w(n.ordinal) ? (h = { ...this.toObject(), ...n }, w(n.day) && (h.day = Math.min(
|
6990
|
-
const [g, m] =
|
6989
|
+
) : w(n.ordinal) ? (h = { ...this.toObject(), ...n }, w(n.day) && (h.day = Math.min(ht(h.year, h.month), h.day))) : h = zn({ ...Lt(this.c), ...n });
|
6990
|
+
const [g, m] = ct(h, this.o, this.zone);
|
6991
6991
|
return he(this, { ts: g, o: m });
|
6992
6992
|
}
|
6993
6993
|
/**
|
@@ -7007,7 +7007,7 @@ class S {
|
|
7007
7007
|
if (!this.isValid)
|
7008
7008
|
return this;
|
7009
7009
|
const n = T.fromDurationLike(e);
|
7010
|
-
return he(this,
|
7010
|
+
return he(this, ss(this, n));
|
7011
7011
|
}
|
7012
7012
|
/**
|
7013
7013
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
@@ -7019,7 +7019,7 @@ class S {
|
|
7019
7019
|
if (!this.isValid)
|
7020
7020
|
return this;
|
7021
7021
|
const n = T.fromDurationLike(e).negate();
|
7022
|
-
return he(this,
|
7022
|
+
return he(this, ss(this, n));
|
7023
7023
|
}
|
7024
7024
|
/**
|
7025
7025
|
* "Set" this DateTime to the beginning of a unit of time.
|
@@ -7116,7 +7116,7 @@ class S {
|
|
7116
7116
|
* @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
|
7117
7117
|
* @return {string}
|
7118
7118
|
*/
|
7119
|
-
toLocaleString(e =
|
7119
|
+
toLocaleString(e = lt, n = {}) {
|
7120
7120
|
return this.isValid ? R.create(this.loc.clone(n), e).formatDateTime(this) : Wt;
|
7121
7121
|
}
|
7122
7122
|
/**
|
@@ -7159,8 +7159,8 @@ class S {
|
|
7159
7159
|
if (!this.isValid)
|
7160
7160
|
return null;
|
7161
7161
|
const o = e === "extended";
|
7162
|
-
let a =
|
7163
|
-
return a += "T", a +=
|
7162
|
+
let a = Bt(this, o);
|
7163
|
+
return a += "T", a += rs(this, o, n, s, r, i), a;
|
7164
7164
|
}
|
7165
7165
|
/**
|
7166
7166
|
* Returns an ISO 8601-compliant string representation of this DateTime's date component
|
@@ -7171,7 +7171,7 @@ class S {
|
|
7171
7171
|
* @return {string}
|
7172
7172
|
*/
|
7173
7173
|
toISODate({ format: e = "extended" } = {}) {
|
7174
|
-
return this.isValid ?
|
7174
|
+
return this.isValid ? Bt(this, e === "extended") : null;
|
7175
7175
|
}
|
7176
7176
|
/**
|
7177
7177
|
* Returns an ISO 8601-compliant string representation of this DateTime's week date
|
@@ -7204,7 +7204,7 @@ class S {
|
|
7204
7204
|
extendedZone: i = !1,
|
7205
7205
|
format: o = "extended"
|
7206
7206
|
} = {}) {
|
7207
|
-
return this.isValid ? (r ? "T" : "") +
|
7207
|
+
return this.isValid ? (r ? "T" : "") + rs(
|
7208
7208
|
this,
|
7209
7209
|
o === "extended",
|
7210
7210
|
n,
|
@@ -7239,7 +7239,7 @@ class S {
|
|
7239
7239
|
* @return {string}
|
7240
7240
|
*/
|
7241
7241
|
toSQLDate() {
|
7242
|
-
return this.isValid ?
|
7242
|
+
return this.isValid ? Bt(this, !0) : null;
|
7243
7243
|
}
|
7244
7244
|
/**
|
7245
7245
|
* Returns a string representation of this DateTime appropriate for use in SQL Time
|
@@ -7439,7 +7439,7 @@ class S {
|
|
7439
7439
|
return null;
|
7440
7440
|
const n = e.base || S.fromObject({}, { zone: this.zone }), s = e.padding ? this < n ? -e.padding : e.padding : 0;
|
7441
7441
|
let r = ["years", "months", "days", "hours", "minutes", "seconds"], i = e.unit;
|
7442
|
-
return Array.isArray(e.unit) && (r = e.unit, i = void 0),
|
7442
|
+
return Array.isArray(e.unit) && (r = e.unit, i = void 0), as(n, this.plus(s), {
|
7443
7443
|
...e,
|
7444
7444
|
numeric: "always",
|
7445
7445
|
units: r,
|
@@ -7460,7 +7460,7 @@ class S {
|
|
7460
7460
|
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
|
7461
7461
|
*/
|
7462
7462
|
toRelativeCalendar(e = {}) {
|
7463
|
-
return this.isValid ?
|
7463
|
+
return this.isValid ? as(e.base || S.fromObject({}, { zone: this.zone }), this, {
|
7464
7464
|
...e,
|
7465
7465
|
numeric: "auto",
|
7466
7466
|
units: ["years", "months", "days"],
|
@@ -7475,7 +7475,7 @@ class S {
|
|
7475
7475
|
static min(...e) {
|
7476
7476
|
if (!e.every(S.isDateTime))
|
7477
7477
|
throw new $("min requires all arguments be DateTimes");
|
7478
|
-
return
|
7478
|
+
return qn(e, (n) => n.valueOf(), Math.min);
|
7479
7479
|
}
|
7480
7480
|
/**
|
7481
7481
|
* Return the max of several date times
|
@@ -7485,7 +7485,7 @@ class S {
|
|
7485
7485
|
static max(...e) {
|
7486
7486
|
if (!e.every(S.isDateTime))
|
7487
7487
|
throw new $("max requires all arguments be DateTimes");
|
7488
|
-
return
|
7488
|
+
return qn(e, (n) => n.valueOf(), Math.max);
|
7489
7489
|
}
|
7490
7490
|
// MISC
|
7491
7491
|
/**
|
@@ -7496,12 +7496,12 @@ class S {
|
|
7496
7496
|
* @return {Object}
|
7497
7497
|
*/
|
7498
7498
|
static fromFormatExplain(e, n, s = {}) {
|
7499
|
-
const { locale: r = null, numberingSystem: i = null } = s, o =
|
7499
|
+
const { locale: r = null, numberingSystem: i = null } = s, o = v.fromOpts({
|
7500
7500
|
locale: r,
|
7501
7501
|
numberingSystem: i,
|
7502
7502
|
defaultToEN: !0
|
7503
7503
|
});
|
7504
|
-
return
|
7504
|
+
return Cr(o, e, n);
|
7505
7505
|
}
|
7506
7506
|
/**
|
7507
7507
|
* @deprecated use fromFormatExplain instead
|
@@ -7515,14 +7515,14 @@ class S {
|
|
7515
7515
|
* @type {Object}
|
7516
7516
|
*/
|
7517
7517
|
static get DATE_SHORT() {
|
7518
|
-
return
|
7518
|
+
return lt;
|
7519
7519
|
}
|
7520
7520
|
/**
|
7521
7521
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
|
7522
7522
|
* @type {Object}
|
7523
7523
|
*/
|
7524
7524
|
static get DATE_MED() {
|
7525
|
-
return
|
7525
|
+
return Fs;
|
7526
7526
|
}
|
7527
7527
|
/**
|
7528
7528
|
* {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
|
@@ -7536,49 +7536,49 @@ class S {
|
|
7536
7536
|
* @type {Object}
|
7537
7537
|
*/
|
7538
7538
|
static get DATE_FULL() {
|
7539
|
-
return
|
7539
|
+
return Rs;
|
7540
7540
|
}
|
7541
7541
|
/**
|
7542
7542
|
* {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
|
7543
7543
|
* @type {Object}
|
7544
7544
|
*/
|
7545
7545
|
static get DATE_HUGE() {
|
7546
|
-
return
|
7546
|
+
return Ls;
|
7547
7547
|
}
|
7548
7548
|
/**
|
7549
7549
|
* {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
|
7550
7550
|
* @type {Object}
|
7551
7551
|
*/
|
7552
7552
|
static get TIME_SIMPLE() {
|
7553
|
-
return
|
7553
|
+
return Vs;
|
7554
7554
|
}
|
7555
7555
|
/**
|
7556
7556
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
|
7557
7557
|
* @type {Object}
|
7558
7558
|
*/
|
7559
7559
|
static get TIME_WITH_SECONDS() {
|
7560
|
-
return
|
7560
|
+
return Ws;
|
7561
7561
|
}
|
7562
7562
|
/**
|
7563
7563
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
|
7564
7564
|
* @type {Object}
|
7565
7565
|
*/
|
7566
7566
|
static get TIME_WITH_SHORT_OFFSET() {
|
7567
|
-
return
|
7567
|
+
return Us;
|
7568
7568
|
}
|
7569
7569
|
/**
|
7570
7570
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
7571
7571
|
* @type {Object}
|
7572
7572
|
*/
|
7573
7573
|
static get TIME_WITH_LONG_OFFSET() {
|
7574
|
-
return
|
7574
|
+
return $s;
|
7575
7575
|
}
|
7576
7576
|
/**
|
7577
7577
|
* {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
|
7578
7578
|
* @type {Object}
|
7579
7579
|
*/
|
7580
7580
|
static get TIME_24_SIMPLE() {
|
7581
|
-
return
|
7581
|
+
return Bs;
|
7582
7582
|
}
|
7583
7583
|
/**
|
7584
7584
|
* {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
|
@@ -7592,42 +7592,42 @@ class S {
|
|
7592
7592
|
* @type {Object}
|
7593
7593
|
*/
|
7594
7594
|
static get TIME_24_WITH_SHORT_OFFSET() {
|
7595
|
-
return
|
7595
|
+
return Ps;
|
7596
7596
|
}
|
7597
7597
|
/**
|
7598
7598
|
* {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
|
7599
7599
|
* @type {Object}
|
7600
7600
|
*/
|
7601
7601
|
static get TIME_24_WITH_LONG_OFFSET() {
|
7602
|
-
return
|
7602
|
+
return zs;
|
7603
7603
|
}
|
7604
7604
|
/**
|
7605
7605
|
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
|
7606
7606
|
* @type {Object}
|
7607
7607
|
*/
|
7608
7608
|
static get DATETIME_SHORT() {
|
7609
|
-
return
|
7609
|
+
return Zs;
|
7610
7610
|
}
|
7611
7611
|
/**
|
7612
7612
|
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
7613
7613
|
* @type {Object}
|
7614
7614
|
*/
|
7615
7615
|
static get DATETIME_SHORT_WITH_SECONDS() {
|
7616
|
-
return
|
7616
|
+
return qs;
|
7617
7617
|
}
|
7618
7618
|
/**
|
7619
7619
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
|
7620
7620
|
* @type {Object}
|
7621
7621
|
*/
|
7622
7622
|
static get DATETIME_MED() {
|
7623
|
-
return
|
7623
|
+
return js;
|
7624
7624
|
}
|
7625
7625
|
/**
|
7626
7626
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
7627
7627
|
* @type {Object}
|
7628
7628
|
*/
|
7629
7629
|
static get DATETIME_MED_WITH_SECONDS() {
|
7630
|
-
return
|
7630
|
+
return Gs;
|
7631
7631
|
}
|
7632
7632
|
/**
|
7633
7633
|
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
@@ -7641,28 +7641,28 @@ class S {
|
|
7641
7641
|
* @type {Object}
|
7642
7642
|
*/
|
7643
7643
|
static get DATETIME_FULL() {
|
7644
|
-
return
|
7644
|
+
return Ys;
|
7645
7645
|
}
|
7646
7646
|
/**
|
7647
7647
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
|
7648
7648
|
* @type {Object}
|
7649
7649
|
*/
|
7650
7650
|
static get DATETIME_FULL_WITH_SECONDS() {
|
7651
|
-
return
|
7651
|
+
return Js;
|
7652
7652
|
}
|
7653
7653
|
/**
|
7654
7654
|
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
7655
7655
|
* @type {Object}
|
7656
7656
|
*/
|
7657
7657
|
static get DATETIME_HUGE() {
|
7658
|
-
return
|
7658
|
+
return Ks;
|
7659
7659
|
}
|
7660
7660
|
/**
|
7661
7661
|
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
7662
7662
|
* @type {Object}
|
7663
7663
|
*/
|
7664
7664
|
static get DATETIME_HUGE_WITH_SECONDS() {
|
7665
|
-
return
|
7665
|
+
return Qs;
|
7666
7666
|
}
|
7667
7667
|
}
|
7668
7668
|
function Ae(t) {
|
@@ -7679,7 +7679,7 @@ function Ae(t) {
|
|
7679
7679
|
const Pc = {}, zc = {
|
7680
7680
|
xmlns: "http://www.w3.org/2000/svg",
|
7681
7681
|
viewBox: "0 0 512 512"
|
7682
|
-
}, Zc = /* @__PURE__ */
|
7682
|
+
}, Zc = /* @__PURE__ */ E("path", {
|
7683
7683
|
fill: "rgb(248 113 113)",
|
7684
7684
|
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"
|
7685
7685
|
}, null, -1), qc = [
|
@@ -7688,16 +7688,16 @@ const Pc = {}, zc = {
|
|
7688
7688
|
function jc(t, e) {
|
7689
7689
|
return L(), V("svg", zc, qc);
|
7690
7690
|
}
|
7691
|
-
const Gc = /* @__PURE__ */ ue(Pc, [["render", jc]]), Yc = { class: "
|
7691
|
+
const Gc = /* @__PURE__ */ ue(Pc, [["render", jc]]), Yc = { class: "messages-container-list" }, Jc = { class: "message-container" }, Kc = {
|
7692
7692
|
key: 0,
|
7693
7693
|
class: "btn-container"
|
7694
|
-
},
|
7694
|
+
}, Qc = ["onClick"], Xc = { class: "chat-message" }, eu = { class: "message-text" }, tu = { class: "detail-message flex justify-content-between" }, nu = {
|
7695
7695
|
key: 0,
|
7696
7696
|
class: "mr-5"
|
7697
|
-
},
|
7697
|
+
}, su = {
|
7698
7698
|
key: 1,
|
7699
7699
|
class: "mr-5"
|
7700
|
-
},
|
7700
|
+
}, ru = /* @__PURE__ */ en({
|
7701
7701
|
__name: "MessageList",
|
7702
7702
|
props: {
|
7703
7703
|
messages: {
|
@@ -7717,9 +7717,9 @@ const Gc = /* @__PURE__ */ ue(Pc, [["render", jc]]), Yc = { class: "message-cont
|
|
7717
7717
|
o && e("loadMore");
|
7718
7718
|
}
|
7719
7719
|
);
|
7720
|
-
return
|
7720
|
+
return Vr(() => {
|
7721
7721
|
n.canLoadMoreMessages || r();
|
7722
|
-
}),
|
7722
|
+
}), Xt(
|
7723
7723
|
() => n.canLoadMoreMessages,
|
7724
7724
|
(o) => {
|
7725
7725
|
if (o) {
|
@@ -7728,87 +7728,88 @@ const Gc = /* @__PURE__ */ ue(Pc, [["render", jc]]), Yc = { class: "message-cont
|
|
7728
7728
|
}
|
7729
7729
|
r();
|
7730
7730
|
}
|
7731
|
-
), (o, a) => (L(), V(
|
7732
|
-
|
7731
|
+
), (o, a) => (L(), V(gn, null, [
|
7732
|
+
E("div", {
|
7733
7733
|
ref_key: "target",
|
7734
7734
|
ref: s,
|
7735
7735
|
class: "target"
|
7736
7736
|
}, null, 512),
|
7737
|
-
(
|
7738
|
-
|
7739
|
-
|
7740
|
-
|
7741
|
-
|
7742
|
-
|
7743
|
-
|
7744
|
-
|
7745
|
-
|
7746
|
-
|
7747
|
-
|
7748
|
-
|
7749
|
-
|
7750
|
-
|
7751
|
-
|
7752
|
-
|
7753
|
-
|
7754
|
-
|
7755
|
-
|
7756
|
-
|
7757
|
-
|
7758
|
-
|
7759
|
-
|
7760
|
-
}, [
|
7761
|
-
v("div", {
|
7762
|
-
class: Ct(c.esCliente ? "content-left" : "content-right")
|
7737
|
+
E("div", Yc, [
|
7738
|
+
(L(!0), V(gn, null, Wr(n.messages, (c) => {
|
7739
|
+
var u, l;
|
7740
|
+
return L(), V("div", {
|
7741
|
+
key: c.id,
|
7742
|
+
class: nt(["message", c.esCliente ? "message-left" : "message-right"])
|
7743
|
+
}, [
|
7744
|
+
E("div", Jc, [
|
7745
|
+
c.error && c.esCliente ? (L(), V("div", Kc, [
|
7746
|
+
E("button", {
|
7747
|
+
text: "",
|
7748
|
+
rounded: "",
|
7749
|
+
class: "btn-danger",
|
7750
|
+
icon: "fa-solid fa-circle-exclamation",
|
7751
|
+
"aria-label": "Cancel",
|
7752
|
+
onClick: (h) => e("retry", c)
|
7753
|
+
}, [
|
7754
|
+
fe(Gc)
|
7755
|
+
], 8, Qc)
|
7756
|
+
])) : tn("", !0),
|
7757
|
+
E("div", Xc, [
|
7758
|
+
E("div", {
|
7759
|
+
class: nt(["bubble", c.esCliente ? "left" : "right"])
|
7763
7760
|
}, [
|
7764
|
-
|
7765
|
-
|
7766
|
-
|
7767
|
-
|
7768
|
-
|
7769
|
-
|
7770
|
-
|
7761
|
+
E("div", {
|
7762
|
+
class: nt(c.esCliente ? "content-left" : "content-right")
|
7763
|
+
}, [
|
7764
|
+
E("div", eu, Le(c.message), 1),
|
7765
|
+
E("div", tu, [
|
7766
|
+
(u = c.sender) != null && u.nombreCompleto ? (L(), V("span", nu, Le((l = c.sender) == null ? void 0 : l.nombreCompleto), 1)) : (L(), V("span", su)),
|
7767
|
+
E("span", null, Le(us(S).fromISO(c.createdAt).toFormat(
|
7768
|
+
"dd-MM-yyyy HH:mm"
|
7769
|
+
)), 1)
|
7770
|
+
])
|
7771
|
+
], 2)
|
7771
7772
|
], 2)
|
7772
|
-
]
|
7773
|
+
])
|
7773
7774
|
])
|
7774
|
-
])
|
7775
|
-
|
7776
|
-
|
7775
|
+
], 2);
|
7776
|
+
}), 128))
|
7777
|
+
])
|
7777
7778
|
], 64));
|
7778
7779
|
}
|
7779
7780
|
});
|
7780
|
-
const
|
7781
|
-
const
|
7781
|
+
const iu = /* @__PURE__ */ ue(ru, [["__scopeId", "data-v-3e307a49"]]);
|
7782
|
+
const ou = {}, Mr = (t) => (Ur("data-v-d9a6b2b7"), t = t(), $r(), t), au = {
|
7782
7783
|
viewBox: "0 0 24 24",
|
7783
7784
|
xmlns: "http://www.w3.org/2000/svg",
|
7784
7785
|
style: { width: "28px", height: "28px" }
|
7785
|
-
},
|
7786
|
+
}, cu = /* @__PURE__ */ Mr(() => /* @__PURE__ */ E("path", {
|
7786
7787
|
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",
|
7787
7788
|
opacity: ".25"
|
7788
|
-
}, null, -1)),
|
7789
|
+
}, null, -1)), uu = /* @__PURE__ */ Mr(() => /* @__PURE__ */ E("path", {
|
7789
7790
|
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",
|
7790
7791
|
class: "spinner_ajPY"
|
7791
|
-
}, null, -1)),
|
7792
|
-
|
7793
|
-
|
7792
|
+
}, null, -1)), lu = [
|
7793
|
+
cu,
|
7794
|
+
uu
|
7794
7795
|
];
|
7795
|
-
function
|
7796
|
-
return L(), V("svg",
|
7796
|
+
function du(t, e) {
|
7797
|
+
return L(), V("svg", au, lu);
|
7797
7798
|
}
|
7798
|
-
const
|
7799
|
-
function
|
7799
|
+
const hu = /* @__PURE__ */ ue(ou, [["render", du], ["__scopeId", "data-v-d9a6b2b7"]]);
|
7800
|
+
function fu(t, e, n) {
|
7800
7801
|
for (let s = t.length - 1; s >= 0; s--)
|
7801
7802
|
if (t[s][e] === n)
|
7802
7803
|
return s;
|
7803
7804
|
return -1;
|
7804
7805
|
}
|
7805
|
-
const
|
7806
|
+
const mu = { class: "widget" }, yu = { class: "header-widget" }, pu = { class: "title-chat" }, gu = {
|
7806
7807
|
key: 0,
|
7807
7808
|
class: "loader"
|
7808
|
-
},
|
7809
|
+
}, wu = { class: "w-full" }, Su = ["onSubmit"], bu = { class: "form-message" }, ku = { class: "jl-inputgroup-chat" }, Tu = {
|
7809
7810
|
type: "submit",
|
7810
7811
|
class: "pointer btn-primary"
|
7811
|
-
},
|
7812
|
+
}, _u = /* @__PURE__ */ en({
|
7812
7813
|
__name: "Chat",
|
7813
7814
|
props: {
|
7814
7815
|
titlePrincipal: {
|
@@ -7834,20 +7835,20 @@ const fu = { class: "widget" }, mu = { class: "header-widget" }, yu = { class: "
|
|
7834
7835
|
data: [],
|
7835
7836
|
canLoadMoreMessages: !1
|
7836
7837
|
}), o = z({ virtualhost: "" }), a = z(""), c = z(!1), u = z(null);
|
7837
|
-
|
7838
|
+
Xt(
|
7838
7839
|
() => n.visible,
|
7839
7840
|
async (b) => {
|
7840
7841
|
if (b) {
|
7841
7842
|
if (e("clear-new-messages"), !o.value || !a.value) {
|
7842
|
-
const N = (await
|
7843
|
+
const N = (await Mn(n.tokenAuth)).response.data;
|
7843
7844
|
o.value = N.virtualHost, a.value = N.appChat.id, f();
|
7844
7845
|
}
|
7845
7846
|
i.value.data.length === 0 && g();
|
7846
7847
|
}
|
7847
7848
|
}
|
7848
|
-
),
|
7849
|
+
), ds(async () => {
|
7849
7850
|
if (!o.value || !a.value) {
|
7850
|
-
const k = (await
|
7851
|
+
const k = (await Mn(n.tokenAuth)).response.data;
|
7851
7852
|
o.value = k.virtualHost, a.value = k.appChat.id, f();
|
7852
7853
|
}
|
7853
7854
|
});
|
@@ -7916,7 +7917,7 @@ const fu = { class: "widget" }, mu = { class: "header-widget" }, yu = { class: "
|
|
7916
7917
|
appChatId: a.value
|
7917
7918
|
}, Ie = await Ro({ body: le, token: n.tokenAuth });
|
7918
7919
|
i.value.data.unshift(
|
7919
|
-
...Ie.data.sort((
|
7920
|
+
...Ie.data.sort((Et, vt) => -vt.createdAt.localeCompare(Et.createdAt))
|
7920
7921
|
), i.value.canLoadMoreMessages = Ie.pagination.total > Ie.pagination.limit, D && ((k = u.value) != null && k.scrollHeight) && C((N = u.value) == null ? void 0 : N.scrollHeight), D || p();
|
7921
7922
|
} catch (D) {
|
7922
7923
|
throw c.value = !1, D;
|
@@ -7929,7 +7930,7 @@ const fu = { class: "widget" }, mu = { class: "header-widget" }, yu = { class: "
|
|
7929
7930
|
try {
|
7930
7931
|
if (!((k = b.error) != null && k.id))
|
7931
7932
|
return;
|
7932
|
-
const N = await h(b.message, a.value), D =
|
7933
|
+
const N = await h(b.message, a.value), D = fu(
|
7933
7934
|
i.value.data,
|
7934
7935
|
"id",
|
7935
7936
|
b.error.id
|
@@ -7956,83 +7957,83 @@ const fu = { class: "widget" }, mu = { class: "header-widget" }, yu = { class: "
|
|
7956
7957
|
`${k}`,
|
7957
7958
|
`widget_chat_${sessionStorage.getItem("tabBrowser")}`
|
7958
7959
|
), s.value.connect(), s.value.subscribe(async (D) => {
|
7959
|
-
D.event && D.event ===
|
7960
|
+
D.event && D.event === hs.NEW_MESSAGE && !D.message.esCliente && (i.value.data.push(D.message), n.visible === !1 && e("new-message"));
|
7960
7961
|
});
|
7961
7962
|
}, p = () => {
|
7962
|
-
|
7963
|
+
wn(() => {
|
7963
7964
|
u.value && (u.value.scrollTop = u.value.scrollHeight);
|
7964
7965
|
});
|
7965
7966
|
}, C = (b) => {
|
7966
|
-
|
7967
|
+
wn(() => {
|
7967
7968
|
const k = u.value;
|
7968
7969
|
k && (k.scrollTop = k.scrollHeight - b);
|
7969
7970
|
});
|
7970
7971
|
};
|
7971
|
-
return (b, k) => (L(), V("div",
|
7972
|
-
|
7973
|
-
|
7974
|
-
|
7972
|
+
return (b, k) => (L(), V("div", mu, [
|
7973
|
+
E("div", yu, [
|
7974
|
+
E("h4", pu, Le(t.titlePrincipal), 1),
|
7975
|
+
E("button", {
|
7975
7976
|
onClick: k[0] || (k[0] = () => t.toggleChat()),
|
7976
7977
|
class: "btn-close"
|
7977
7978
|
}, [
|
7978
7979
|
fe(li, { class: "pointer" })
|
7979
7980
|
])
|
7980
7981
|
]),
|
7981
|
-
|
7982
|
+
E("div", {
|
7982
7983
|
class: "messages-container",
|
7983
7984
|
ref_key: "messageContainerRef",
|
7984
7985
|
ref: u
|
7985
7986
|
}, [
|
7986
|
-
c.value ? (L(), V("div",
|
7987
|
-
fe(
|
7988
|
-
])) :
|
7989
|
-
fe(
|
7987
|
+
c.value ? (L(), V("div", gu, [
|
7988
|
+
fe(hu)
|
7989
|
+
])) : tn("", !0),
|
7990
|
+
fe(iu, {
|
7990
7991
|
messages: i.value.data,
|
7991
7992
|
canLoadMoreMessages: i.value.canLoadMoreMessages,
|
7992
7993
|
onLoadMore: g,
|
7993
7994
|
onRetry: m
|
7994
7995
|
}, null, 8, ["messages", "canLoadMoreMessages"])
|
7995
7996
|
], 512),
|
7996
|
-
|
7997
|
-
|
7997
|
+
E("div", wu, [
|
7998
|
+
E("form", {
|
7998
7999
|
class: "message-send",
|
7999
|
-
onSubmit:
|
8000
|
+
onSubmit: Br(l, ["prevent"])
|
8000
8001
|
}, [
|
8001
|
-
|
8002
|
-
|
8003
|
-
|
8002
|
+
E("div", bu, [
|
8003
|
+
E("div", ku, [
|
8004
|
+
Ht(E("input", {
|
8004
8005
|
"onUpdate:modelValue": k[1] || (k[1] = (N) => r.value = N),
|
8005
8006
|
class: "jl2-input-chat",
|
8006
8007
|
required: ""
|
8007
8008
|
}, null, 512), [
|
8008
8009
|
[Hr, r.value]
|
8009
8010
|
]),
|
8010
|
-
|
8011
|
+
E("button", Tu, [
|
8011
8012
|
fe(pi, { style: { width: "20px", height: "20px" } })
|
8012
8013
|
])
|
8013
8014
|
])
|
8014
8015
|
])
|
8015
|
-
], 40,
|
8016
|
+
], 40, Su)
|
8016
8017
|
])
|
8017
8018
|
]));
|
8018
8019
|
}
|
8019
8020
|
});
|
8020
|
-
const
|
8021
|
+
const Ou = /* @__PURE__ */ ue(_u, [["__scopeId", "data-v-adddbb91"]]), Eu = {}, vu = {
|
8021
8022
|
width: "87",
|
8022
8023
|
height: "87",
|
8023
8024
|
viewBox: "0 0 87 87",
|
8024
8025
|
fill: "none",
|
8025
8026
|
xmlns: "http://www.w3.org/2000/svg"
|
8026
|
-
},
|
8027
|
-
|
8027
|
+
}, Cu = /* @__PURE__ */ Pr('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="#F28B0C" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="#F28B0C"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="#F28B0C"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="#F28B0C"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="#F28B0C"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>', 2), Nu = [
|
8028
|
+
Cu
|
8028
8029
|
];
|
8029
|
-
function
|
8030
|
-
return L(), V("svg",
|
8030
|
+
function Iu(t, e) {
|
8031
|
+
return L(), V("svg", vu, Nu);
|
8031
8032
|
}
|
8032
|
-
const
|
8033
|
+
const Du = /* @__PURE__ */ ue(Eu, [["render", Iu]]), xu = {
|
8033
8034
|
key: 0,
|
8034
8035
|
class: "new-message-badge"
|
8035
|
-
},
|
8036
|
+
}, Mu = { class: "chat-box" }, Au = /* @__PURE__ */ en({
|
8036
8037
|
__name: "Widget",
|
8037
8038
|
props: {
|
8038
8039
|
tokenAuth: { type: String, required: !0 },
|
@@ -8040,6 +8041,10 @@ const Iu = /* @__PURE__ */ ue(Ou, [["render", Nu]]), Du = {
|
|
8040
8041
|
user: {
|
8041
8042
|
type: Object,
|
8042
8043
|
required: !0
|
8044
|
+
},
|
8045
|
+
isDarkMode: {
|
8046
|
+
type: Boolean,
|
8047
|
+
default: !1
|
8043
8048
|
}
|
8044
8049
|
},
|
8045
8050
|
emits: ["show-toast", "show-confirm"],
|
@@ -8047,17 +8052,21 @@ const Iu = /* @__PURE__ */ ue(Ou, [["render", Nu]]), Du = {
|
|
8047
8052
|
const n = z(!1), s = z(0), r = () => {
|
8048
8053
|
n.value = !n.value;
|
8049
8054
|
};
|
8050
|
-
return (i, o) => (L(), V("div",
|
8051
|
-
|
8055
|
+
return (i, o) => (L(), V("div", {
|
8056
|
+
class: nt(["widget-css-reset widget-container", t.isDarkMode ? "chat-dark-mode" : ""])
|
8057
|
+
}, [
|
8058
|
+
Ht(E("div", {
|
8052
8059
|
id: "chat-circle",
|
8053
8060
|
onClick: r,
|
8054
8061
|
class: "widget-container"
|
8055
8062
|
}, [
|
8056
|
-
s.value ? (L(), V("div",
|
8057
|
-
fe(
|
8063
|
+
s.value ? (L(), V("div", xu, Le(s.value > 9 ? "9+" : s.value), 1)) : tn("", !0),
|
8064
|
+
fe(Du)
|
8065
|
+
], 512), [
|
8066
|
+
[Sn, !n.value]
|
8058
8067
|
]),
|
8059
|
-
|
8060
|
-
fe(
|
8068
|
+
Ht(E("div", Mu, [
|
8069
|
+
fe(Ou, {
|
8061
8070
|
visible: n.value,
|
8062
8071
|
titlePrincipal: t.titlePrincipal,
|
8063
8072
|
toggleChat: r,
|
@@ -8069,17 +8078,17 @@ const Iu = /* @__PURE__ */ ue(Ou, [["render", Nu]]), Du = {
|
|
8069
8078
|
onNewMessage: o[3] || (o[3] = () => s.value++)
|
8070
8079
|
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])
|
8071
8080
|
], 512), [
|
8072
|
-
[
|
8081
|
+
[Sn, n.value]
|
8073
8082
|
])
|
8074
|
-
]));
|
8083
|
+
], 2));
|
8075
8084
|
}
|
8076
8085
|
});
|
8077
|
-
const
|
8086
|
+
const Ru = /* @__PURE__ */ ue(Au, [["__scopeId", "data-v-88f4149c"]]), Lu = {
|
8078
8087
|
install(t, e) {
|
8079
8088
|
window.VITE_BACKEND_URL = e.VITE_BACKEND_URL, window.VITE_BROKER_URL = e.VITE_BROKER_URL, window.VITE_USERNAME = e.VITE_USERNAME, window.VITE_PASSWORD = e.VITE_PASSWORD;
|
8080
8089
|
}
|
8081
8090
|
};
|
8082
8091
|
export {
|
8083
|
-
|
8084
|
-
|
8092
|
+
Ru as Widget,
|
8093
|
+
Lu as default
|
8085
8094
|
};
|