@ysolve/ocity-heritage-visualizer 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var Qt = Object.defineProperty;
|
|
2
|
+
var Kt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Ae = (e, t, n) => Kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsxs as F, jsx as w, Fragment as Ge } from "react/jsx-runtime";
|
|
5
|
+
import { useState as v, useRef as I, useEffect as j } from "react";
|
|
6
|
+
const Xt = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_DEBUG_MODE: "true", VITE_DEFAULT_IMAGE_URL: "https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png", VITE_GOOGLE_TRANSLATE_BASE: "https://translate.googleapis.com/translate_a/single", VITE_IMAGE_BASE_URL: "https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/", VITE_QWEN_TTS_API_URL: "http://localhost:3010" };
|
|
7
|
+
function ue(e, t = !0) {
|
|
8
|
+
const n = Xt[e];
|
|
6
9
|
if (!n && t)
|
|
7
10
|
throw new Error(`❌ Missing required env variable: ${e}`);
|
|
8
11
|
return n ?? "";
|
|
9
12
|
}
|
|
10
|
-
const
|
|
13
|
+
const Fe = {
|
|
11
14
|
NODE_ENV: "production",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
DEFAULT_IMAGE_URL: se("VITE_DEFAULT_IMAGE_URL")
|
|
15
|
+
QWEN_TTS_API_URL: ue("VITE_QWEN_TTS_API_URL"),
|
|
16
|
+
DEBUG_MODE: !0,
|
|
17
|
+
GOOGLE_TRANSLATE_BASE: ue("VITE_GOOGLE_TRANSLATE_BASE"),
|
|
18
|
+
IMAGE_BASE_URL: ue("VITE_IMAGE_BASE_URL"),
|
|
19
|
+
DEFAULT_IMAGE_URL: ue("VITE_DEFAULT_IMAGE_URL")
|
|
18
20
|
};
|
|
19
|
-
async function
|
|
21
|
+
async function Qe(e, t) {
|
|
20
22
|
if (!e.trim()) return e;
|
|
21
23
|
try {
|
|
22
|
-
const n = `${
|
|
24
|
+
const n = `${Fe.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`, r = await fetch(n);
|
|
23
25
|
if (!r.ok)
|
|
24
26
|
throw new Error(`Error en la traducción: ${r.status}`);
|
|
25
27
|
const s = await r.json();
|
|
@@ -28,38 +30,72 @@ async function Ke(e, t) {
|
|
|
28
30
|
return console.error("Error al traducir:", n), e;
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
|
-
function
|
|
33
|
+
function Ie(e) {
|
|
34
|
+
return new Promise((t, n) => {
|
|
35
|
+
e.oncomplete = e.onsuccess = () => t(e.result), e.onabort = e.onerror = () => n(e.error);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function Zt(e, t) {
|
|
39
|
+
let n;
|
|
40
|
+
const r = () => {
|
|
41
|
+
if (n)
|
|
42
|
+
return n;
|
|
43
|
+
const s = indexedDB.open(e);
|
|
44
|
+
return s.onupgradeneeded = () => s.result.createObjectStore(t), n = Ie(s), n.then((i) => {
|
|
45
|
+
i.onclose = () => n = void 0;
|
|
46
|
+
}, () => {
|
|
47
|
+
}), n;
|
|
48
|
+
};
|
|
49
|
+
return (s, i) => r().then((o) => i(o.transaction(t, s).objectStore(t)));
|
|
50
|
+
}
|
|
51
|
+
let Oe;
|
|
52
|
+
function ut() {
|
|
53
|
+
return Oe || (Oe = Zt("keyval-store", "keyval")), Oe;
|
|
54
|
+
}
|
|
55
|
+
function Yt(e, t = ut()) {
|
|
56
|
+
return t("readonly", (n) => Ie(n.get(e)));
|
|
57
|
+
}
|
|
58
|
+
function en(e, t, n = ut()) {
|
|
59
|
+
return n("readwrite", (r) => (r.put(t, e), Ie(r.transaction)));
|
|
60
|
+
}
|
|
61
|
+
async function tn(e) {
|
|
62
|
+
return await Yt(e) ?? null;
|
|
63
|
+
}
|
|
64
|
+
async function nn(e, t) {
|
|
65
|
+
await en(e, t);
|
|
66
|
+
}
|
|
67
|
+
function dt(e, t) {
|
|
32
68
|
return function() {
|
|
33
69
|
return e.apply(t, arguments);
|
|
34
70
|
};
|
|
35
71
|
}
|
|
36
|
-
const { toString:
|
|
37
|
-
const n =
|
|
72
|
+
const { toString: rn } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: we, toStringTag: ft } = Symbol, ge = /* @__PURE__ */ ((e) => (t) => {
|
|
73
|
+
const n = rn.call(t);
|
|
38
74
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
39
|
-
})(/* @__PURE__ */ Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) =>
|
|
40
|
-
function
|
|
41
|
-
return e !== null && !
|
|
75
|
+
})(/* @__PURE__ */ Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) => ge(t) === e), ye = (e) => (t) => typeof t === e, { isArray: Z } = Array, se = ye("undefined");
|
|
76
|
+
function sn(e) {
|
|
77
|
+
return e !== null && !se(e) && e.constructor !== null && !se(e.constructor) && B(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
42
78
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
79
|
+
const pt = M("ArrayBuffer");
|
|
80
|
+
function on(e) {
|
|
45
81
|
let t;
|
|
46
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
82
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && pt(e.buffer), t;
|
|
47
83
|
}
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
84
|
+
const an = ye("string"), B = ye("function"), ht = ye("number"), Ee = (e) => e !== null && typeof e == "object", cn = (e) => e === !0 || e === !1, de = (e) => {
|
|
85
|
+
if (ge(e) !== "object")
|
|
50
86
|
return !1;
|
|
51
|
-
const t =
|
|
52
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
53
|
-
},
|
|
87
|
+
const t = De(e);
|
|
88
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ft in e) && !(we in e);
|
|
89
|
+
}, ln = M("Date"), un = M("File"), dn = M("Blob"), fn = M("FileList"), pn = (e) => Ee(e) && B(e.pipe), hn = (e) => {
|
|
54
90
|
let t;
|
|
55
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
56
|
-
t === "object" &&
|
|
57
|
-
},
|
|
58
|
-
function
|
|
91
|
+
return e && (typeof FormData == "function" && e instanceof FormData || B(e.append) && ((t = ge(e)) === "formdata" || // detect form-data instance
|
|
92
|
+
t === "object" && B(e.toString) && e.toString() === "[object FormData]"));
|
|
93
|
+
}, mn = M("URLSearchParams"), [wn, gn, yn, En] = ["ReadableStream", "Request", "Response", "Headers"].map(M), bn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
94
|
+
function oe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
59
95
|
if (e === null || typeof e > "u")
|
|
60
96
|
return;
|
|
61
97
|
let r, s;
|
|
62
|
-
if (typeof e != "object" && (e = [e]),
|
|
98
|
+
if (typeof e != "object" && (e = [e]), Z(e))
|
|
63
99
|
for (r = 0, s = e.length; r < s; r++)
|
|
64
100
|
t.call(null, e[r], r, e);
|
|
65
101
|
else {
|
|
@@ -69,7 +105,7 @@ function le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
69
105
|
c = i[r], t.call(null, e[c], c, e);
|
|
70
106
|
}
|
|
71
107
|
}
|
|
72
|
-
function
|
|
108
|
+
function mt(e, t) {
|
|
73
109
|
t = t.toLowerCase();
|
|
74
110
|
const n = Object.keys(e);
|
|
75
111
|
let r = n.length, s;
|
|
@@ -78,75 +114,75 @@ function ht(e, t) {
|
|
|
78
114
|
return s;
|
|
79
115
|
return null;
|
|
80
116
|
}
|
|
81
|
-
const
|
|
82
|
-
function
|
|
83
|
-
const { caseless: e } =
|
|
84
|
-
const i = e &&
|
|
85
|
-
|
|
117
|
+
const G = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, wt = (e) => !se(e) && e !== G;
|
|
118
|
+
function Ne() {
|
|
119
|
+
const { caseless: e } = wt(this) && this || {}, t = {}, n = (r, s) => {
|
|
120
|
+
const i = e && mt(t, s) || s;
|
|
121
|
+
de(t[i]) && de(r) ? t[i] = Ne(t[i], r) : de(r) ? t[i] = Ne({}, r) : Z(r) ? t[i] = r.slice() : t[i] = r;
|
|
86
122
|
};
|
|
87
123
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
88
|
-
arguments[r] &&
|
|
124
|
+
arguments[r] && oe(arguments[r], n);
|
|
89
125
|
return t;
|
|
90
126
|
}
|
|
91
|
-
const
|
|
92
|
-
n &&
|
|
93
|
-
}, { allOwnKeys: r }), e),
|
|
127
|
+
const Tn = (e, t, n, { allOwnKeys: r } = {}) => (oe(t, (s, i) => {
|
|
128
|
+
n && B(s) ? e[i] = dt(s, n) : e[i] = s;
|
|
129
|
+
}, { allOwnKeys: r }), e), Sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), _n = (e, t, n, r) => {
|
|
94
130
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
95
131
|
value: t.prototype
|
|
96
132
|
}), n && Object.assign(e.prototype, n);
|
|
97
|
-
},
|
|
133
|
+
}, Rn = (e, t, n, r) => {
|
|
98
134
|
let s, i, o;
|
|
99
135
|
const c = {};
|
|
100
136
|
if (t = t || {}, e == null) return t;
|
|
101
137
|
do {
|
|
102
138
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
103
139
|
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
104
|
-
e = n !== !1 &&
|
|
140
|
+
e = n !== !1 && De(e);
|
|
105
141
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
106
142
|
return t;
|
|
107
|
-
},
|
|
143
|
+
}, An = (e, t, n) => {
|
|
108
144
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
109
145
|
const r = e.indexOf(t, n);
|
|
110
146
|
return r !== -1 && r === n;
|
|
111
|
-
},
|
|
147
|
+
}, On = (e) => {
|
|
112
148
|
if (!e) return null;
|
|
113
|
-
if (
|
|
149
|
+
if (Z(e)) return e;
|
|
114
150
|
let t = e.length;
|
|
115
|
-
if (!
|
|
151
|
+
if (!ht(t)) return null;
|
|
116
152
|
const n = new Array(t);
|
|
117
153
|
for (; t-- > 0; )
|
|
118
154
|
n[t] = e[t];
|
|
119
155
|
return n;
|
|
120
|
-
},
|
|
121
|
-
const r = (e && e[
|
|
156
|
+
}, xn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Cn = (e, t) => {
|
|
157
|
+
const r = (e && e[we]).call(e);
|
|
122
158
|
let s;
|
|
123
159
|
for (; (s = r.next()) && !s.done; ) {
|
|
124
160
|
const i = s.value;
|
|
125
161
|
t.call(e, i[0], i[1]);
|
|
126
162
|
}
|
|
127
|
-
},
|
|
163
|
+
}, vn = (e, t) => {
|
|
128
164
|
let n;
|
|
129
165
|
const r = [];
|
|
130
166
|
for (; (n = e.exec(t)) !== null; )
|
|
131
167
|
r.push(n);
|
|
132
168
|
return r;
|
|
133
|
-
},
|
|
169
|
+
}, Nn = M("HTMLFormElement"), Ln = (e) => e.toLowerCase().replace(
|
|
134
170
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
135
171
|
function(n, r, s) {
|
|
136
172
|
return r.toUpperCase() + s;
|
|
137
173
|
}
|
|
138
|
-
),
|
|
174
|
+
), Ke = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), kn = M("RegExp"), gt = (e, t) => {
|
|
139
175
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
140
|
-
|
|
176
|
+
oe(n, (s, i) => {
|
|
141
177
|
let o;
|
|
142
178
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
143
179
|
}), Object.defineProperties(e, r);
|
|
144
|
-
},
|
|
180
|
+
}, Bn = (e) => {
|
|
145
181
|
gt(e, (t, n) => {
|
|
146
|
-
if (
|
|
182
|
+
if (B(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
147
183
|
return !1;
|
|
148
184
|
const r = e[n];
|
|
149
|
-
if (
|
|
185
|
+
if (B(r)) {
|
|
150
186
|
if (t.enumerable = !1, "writable" in t) {
|
|
151
187
|
t.writable = !1;
|
|
152
188
|
return;
|
|
@@ -156,100 +192,100 @@ const dn = (e, t, n, { allOwnKeys: r } = {}) => (le(t, (s, i) => {
|
|
|
156
192
|
});
|
|
157
193
|
}
|
|
158
194
|
});
|
|
159
|
-
},
|
|
195
|
+
}, Pn = (e, t) => {
|
|
160
196
|
const n = {}, r = (s) => {
|
|
161
197
|
s.forEach((i) => {
|
|
162
198
|
n[i] = !0;
|
|
163
199
|
});
|
|
164
200
|
};
|
|
165
|
-
return
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
function
|
|
169
|
-
return !!(e &&
|
|
201
|
+
return Z(e) ? r(e) : r(String(e).split(t)), n;
|
|
202
|
+
}, Un = () => {
|
|
203
|
+
}, Fn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
204
|
+
function In(e) {
|
|
205
|
+
return !!(e && B(e.append) && e[ft] === "FormData" && e[we]);
|
|
170
206
|
}
|
|
171
|
-
const
|
|
207
|
+
const Dn = (e) => {
|
|
172
208
|
const t = new Array(10), n = (r, s) => {
|
|
173
|
-
if (
|
|
209
|
+
if (Ee(r)) {
|
|
174
210
|
if (t.indexOf(r) >= 0)
|
|
175
211
|
return;
|
|
176
212
|
if (!("toJSON" in r)) {
|
|
177
213
|
t[s] = r;
|
|
178
|
-
const i =
|
|
179
|
-
return
|
|
214
|
+
const i = Z(r) ? [] : {};
|
|
215
|
+
return oe(r, (o, c) => {
|
|
180
216
|
const l = n(o, s + 1);
|
|
181
|
-
!
|
|
217
|
+
!se(l) && (i[c] = l);
|
|
182
218
|
}), t[s] = void 0, i;
|
|
183
219
|
}
|
|
184
220
|
}
|
|
185
221
|
return r;
|
|
186
222
|
};
|
|
187
223
|
return n(e, 0);
|
|
188
|
-
},
|
|
189
|
-
s ===
|
|
224
|
+
}, jn = M("AsyncFunction"), Mn = (e) => e && (Ee(e) || B(e)) && B(e.then) && B(e.catch), yt = ((e, t) => e ? setImmediate : t ? ((n, r) => (G.addEventListener("message", ({ source: s, data: i }) => {
|
|
225
|
+
s === G && i === n && r.length && r.shift()();
|
|
190
226
|
}, !1), (s) => {
|
|
191
|
-
r.push(s),
|
|
227
|
+
r.push(s), G.postMessage(n, "*");
|
|
192
228
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
193
229
|
typeof setImmediate == "function",
|
|
194
|
-
|
|
195
|
-
),
|
|
196
|
-
isArray:
|
|
197
|
-
isArrayBuffer:
|
|
198
|
-
isBuffer:
|
|
199
|
-
isFormData:
|
|
200
|
-
isArrayBufferView:
|
|
201
|
-
isString:
|
|
202
|
-
isNumber:
|
|
203
|
-
isBoolean:
|
|
204
|
-
isObject:
|
|
205
|
-
isPlainObject:
|
|
206
|
-
isReadableStream:
|
|
207
|
-
isRequest:
|
|
208
|
-
isResponse:
|
|
209
|
-
isHeaders:
|
|
210
|
-
isUndefined:
|
|
211
|
-
isDate:
|
|
212
|
-
isFile:
|
|
213
|
-
isBlob:
|
|
214
|
-
isRegExp:
|
|
215
|
-
isFunction:
|
|
216
|
-
isStream:
|
|
217
|
-
isURLSearchParams:
|
|
218
|
-
isTypedArray:
|
|
219
|
-
isFileList:
|
|
220
|
-
forEach:
|
|
221
|
-
merge:
|
|
222
|
-
extend:
|
|
223
|
-
trim:
|
|
224
|
-
stripBOM:
|
|
225
|
-
inherits:
|
|
226
|
-
toFlatObject:
|
|
227
|
-
kindOf:
|
|
230
|
+
B(G.postMessage)
|
|
231
|
+
), $n = typeof queueMicrotask < "u" ? queueMicrotask.bind(G) : typeof process < "u" && process.nextTick || yt, qn = (e) => e != null && B(e[we]), a = {
|
|
232
|
+
isArray: Z,
|
|
233
|
+
isArrayBuffer: pt,
|
|
234
|
+
isBuffer: sn,
|
|
235
|
+
isFormData: hn,
|
|
236
|
+
isArrayBufferView: on,
|
|
237
|
+
isString: an,
|
|
238
|
+
isNumber: ht,
|
|
239
|
+
isBoolean: cn,
|
|
240
|
+
isObject: Ee,
|
|
241
|
+
isPlainObject: de,
|
|
242
|
+
isReadableStream: wn,
|
|
243
|
+
isRequest: gn,
|
|
244
|
+
isResponse: yn,
|
|
245
|
+
isHeaders: En,
|
|
246
|
+
isUndefined: se,
|
|
247
|
+
isDate: ln,
|
|
248
|
+
isFile: un,
|
|
249
|
+
isBlob: dn,
|
|
250
|
+
isRegExp: kn,
|
|
251
|
+
isFunction: B,
|
|
252
|
+
isStream: pn,
|
|
253
|
+
isURLSearchParams: mn,
|
|
254
|
+
isTypedArray: xn,
|
|
255
|
+
isFileList: fn,
|
|
256
|
+
forEach: oe,
|
|
257
|
+
merge: Ne,
|
|
258
|
+
extend: Tn,
|
|
259
|
+
trim: bn,
|
|
260
|
+
stripBOM: Sn,
|
|
261
|
+
inherits: _n,
|
|
262
|
+
toFlatObject: Rn,
|
|
263
|
+
kindOf: ge,
|
|
228
264
|
kindOfTest: M,
|
|
229
|
-
endsWith:
|
|
230
|
-
toArray:
|
|
231
|
-
forEachEntry:
|
|
232
|
-
matchAll:
|
|
233
|
-
isHTMLForm:
|
|
234
|
-
hasOwnProperty:
|
|
235
|
-
hasOwnProp:
|
|
265
|
+
endsWith: An,
|
|
266
|
+
toArray: On,
|
|
267
|
+
forEachEntry: Cn,
|
|
268
|
+
matchAll: vn,
|
|
269
|
+
isHTMLForm: Nn,
|
|
270
|
+
hasOwnProperty: Ke,
|
|
271
|
+
hasOwnProp: Ke,
|
|
236
272
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
237
273
|
reduceDescriptors: gt,
|
|
238
|
-
freezeMethods:
|
|
239
|
-
toObjectSet:
|
|
240
|
-
toCamelCase:
|
|
241
|
-
noop:
|
|
242
|
-
toFiniteNumber:
|
|
243
|
-
findKey:
|
|
244
|
-
global:
|
|
245
|
-
isContextDefined:
|
|
246
|
-
isSpecCompliantForm:
|
|
247
|
-
toJSONObject:
|
|
248
|
-
isAsyncFn:
|
|
249
|
-
isThenable:
|
|
250
|
-
setImmediate:
|
|
251
|
-
asap:
|
|
252
|
-
isIterable:
|
|
274
|
+
freezeMethods: Bn,
|
|
275
|
+
toObjectSet: Pn,
|
|
276
|
+
toCamelCase: Ln,
|
|
277
|
+
noop: Un,
|
|
278
|
+
toFiniteNumber: Fn,
|
|
279
|
+
findKey: mt,
|
|
280
|
+
global: G,
|
|
281
|
+
isContextDefined: wt,
|
|
282
|
+
isSpecCompliantForm: In,
|
|
283
|
+
toJSONObject: Dn,
|
|
284
|
+
isAsyncFn: jn,
|
|
285
|
+
isThenable: Mn,
|
|
286
|
+
setImmediate: yt,
|
|
287
|
+
asap: $n,
|
|
288
|
+
isIterable: qn
|
|
253
289
|
};
|
|
254
290
|
function g(e, t, n, r, s) {
|
|
255
291
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -275,7 +311,7 @@ a.inherits(g, Error, {
|
|
|
275
311
|
};
|
|
276
312
|
}
|
|
277
313
|
});
|
|
278
|
-
const
|
|
314
|
+
const Et = g.prototype, bt = {};
|
|
279
315
|
[
|
|
280
316
|
"ERR_BAD_OPTION_VALUE",
|
|
281
317
|
"ERR_BAD_OPTION",
|
|
@@ -291,35 +327,35 @@ const yt = g.prototype, Et = {};
|
|
|
291
327
|
"ERR_INVALID_URL"
|
|
292
328
|
// eslint-disable-next-line func-names
|
|
293
329
|
].forEach((e) => {
|
|
294
|
-
|
|
330
|
+
bt[e] = { value: e };
|
|
295
331
|
});
|
|
296
|
-
Object.defineProperties(g,
|
|
297
|
-
Object.defineProperty(
|
|
332
|
+
Object.defineProperties(g, bt);
|
|
333
|
+
Object.defineProperty(Et, "isAxiosError", { value: !0 });
|
|
298
334
|
g.from = (e, t, n, r, s, i) => {
|
|
299
|
-
const o = Object.create(
|
|
335
|
+
const o = Object.create(Et);
|
|
300
336
|
return a.toFlatObject(e, o, function(l) {
|
|
301
337
|
return l !== Error.prototype;
|
|
302
338
|
}, (c) => c !== "isAxiosError"), g.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
303
339
|
};
|
|
304
|
-
const
|
|
305
|
-
function
|
|
340
|
+
const zn = null;
|
|
341
|
+
function Le(e) {
|
|
306
342
|
return a.isPlainObject(e) || a.isArray(e);
|
|
307
343
|
}
|
|
308
|
-
function
|
|
344
|
+
function Tt(e) {
|
|
309
345
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
310
346
|
}
|
|
311
|
-
function
|
|
347
|
+
function Xe(e, t, n) {
|
|
312
348
|
return e ? e.concat(t).map(function(s, i) {
|
|
313
|
-
return s =
|
|
349
|
+
return s = Tt(s), !n && i ? "[" + s + "]" : s;
|
|
314
350
|
}).join(n ? "." : "") : t;
|
|
315
351
|
}
|
|
316
|
-
function
|
|
317
|
-
return a.isArray(e) && !e.some(
|
|
352
|
+
function Hn(e) {
|
|
353
|
+
return a.isArray(e) && !e.some(Le);
|
|
318
354
|
}
|
|
319
|
-
const
|
|
355
|
+
const Vn = a.toFlatObject(a, {}, null, function(t) {
|
|
320
356
|
return /^is[A-Z]/.test(t);
|
|
321
357
|
});
|
|
322
|
-
function
|
|
358
|
+
function be(e, t, n) {
|
|
323
359
|
if (!a.isObject(e))
|
|
324
360
|
throw new TypeError("target must be an object");
|
|
325
361
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -332,57 +368,57 @@ function Se(e, t, n) {
|
|
|
332
368
|
const r = n.metaTokens, s = n.visitor || d, i = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
333
369
|
if (!a.isFunction(s))
|
|
334
370
|
throw new TypeError("visitor must be a function");
|
|
335
|
-
function u(
|
|
336
|
-
if (
|
|
337
|
-
if (a.isDate(
|
|
338
|
-
return
|
|
339
|
-
if (a.isBoolean(
|
|
340
|
-
return
|
|
341
|
-
if (!l && a.isBlob(
|
|
371
|
+
function u(p) {
|
|
372
|
+
if (p === null) return "";
|
|
373
|
+
if (a.isDate(p))
|
|
374
|
+
return p.toISOString();
|
|
375
|
+
if (a.isBoolean(p))
|
|
376
|
+
return p.toString();
|
|
377
|
+
if (!l && a.isBlob(p))
|
|
342
378
|
throw new g("Blob is not supported. Use a Buffer instead.");
|
|
343
|
-
return a.isArrayBuffer(
|
|
379
|
+
return a.isArrayBuffer(p) || a.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
344
380
|
}
|
|
345
|
-
function d(
|
|
346
|
-
let
|
|
347
|
-
if (
|
|
381
|
+
function d(p, m, h) {
|
|
382
|
+
let S = p;
|
|
383
|
+
if (p && !h && typeof p == "object") {
|
|
348
384
|
if (a.endsWith(m, "{}"))
|
|
349
|
-
m = r ? m : m.slice(0, -2),
|
|
350
|
-
else if (a.isArray(
|
|
351
|
-
return m =
|
|
352
|
-
!(a.isUndefined(
|
|
385
|
+
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
386
|
+
else if (a.isArray(p) && Hn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (S = a.toArray(p)))
|
|
387
|
+
return m = Tt(m), S.forEach(function(T, N) {
|
|
388
|
+
!(a.isUndefined(T) || T === null) && t.append(
|
|
353
389
|
// eslint-disable-next-line no-nested-ternary
|
|
354
|
-
o === !0 ?
|
|
355
|
-
u(
|
|
390
|
+
o === !0 ? Xe([m], N, i) : o === null ? m : m + "[]",
|
|
391
|
+
u(T)
|
|
356
392
|
);
|
|
357
393
|
}), !1;
|
|
358
394
|
}
|
|
359
|
-
return
|
|
395
|
+
return Le(p) ? !0 : (t.append(Xe(h, m, i), u(p)), !1);
|
|
360
396
|
}
|
|
361
|
-
const
|
|
397
|
+
const f = [], y = Object.assign(Vn, {
|
|
362
398
|
defaultVisitor: d,
|
|
363
399
|
convertValue: u,
|
|
364
|
-
isVisitable:
|
|
400
|
+
isVisitable: Le
|
|
365
401
|
});
|
|
366
|
-
function
|
|
367
|
-
if (!a.isUndefined(
|
|
368
|
-
if (
|
|
402
|
+
function b(p, m) {
|
|
403
|
+
if (!a.isUndefined(p)) {
|
|
404
|
+
if (f.indexOf(p) !== -1)
|
|
369
405
|
throw Error("Circular reference detected in " + m.join("."));
|
|
370
|
-
|
|
371
|
-
(!(a.isUndefined(
|
|
406
|
+
f.push(p), a.forEach(p, function(S, _) {
|
|
407
|
+
(!(a.isUndefined(S) || S === null) && s.call(
|
|
372
408
|
t,
|
|
373
|
-
|
|
374
|
-
a.isString(
|
|
409
|
+
S,
|
|
410
|
+
a.isString(_) ? _.trim() : _,
|
|
375
411
|
m,
|
|
376
412
|
y
|
|
377
|
-
)) === !0 &&
|
|
378
|
-
}),
|
|
413
|
+
)) === !0 && b(S, m ? m.concat(_) : [_]);
|
|
414
|
+
}), f.pop();
|
|
379
415
|
}
|
|
380
416
|
}
|
|
381
417
|
if (!a.isObject(e))
|
|
382
418
|
throw new TypeError("data must be an object");
|
|
383
|
-
return
|
|
419
|
+
return b(e), t;
|
|
384
420
|
}
|
|
385
|
-
function
|
|
421
|
+
function Ze(e) {
|
|
386
422
|
const t = {
|
|
387
423
|
"!": "%21",
|
|
388
424
|
"'": "%27",
|
|
@@ -396,40 +432,40 @@ function Ye(e) {
|
|
|
396
432
|
return t[r];
|
|
397
433
|
});
|
|
398
434
|
}
|
|
399
|
-
function
|
|
400
|
-
this._pairs = [], e &&
|
|
435
|
+
function je(e, t) {
|
|
436
|
+
this._pairs = [], e && be(e, this, t);
|
|
401
437
|
}
|
|
402
|
-
const
|
|
403
|
-
|
|
438
|
+
const St = je.prototype;
|
|
439
|
+
St.append = function(t, n) {
|
|
404
440
|
this._pairs.push([t, n]);
|
|
405
441
|
};
|
|
406
|
-
|
|
442
|
+
St.toString = function(t) {
|
|
407
443
|
const n = t ? function(r) {
|
|
408
|
-
return t.call(this, r,
|
|
409
|
-
} :
|
|
444
|
+
return t.call(this, r, Ze);
|
|
445
|
+
} : Ze;
|
|
410
446
|
return this._pairs.map(function(s) {
|
|
411
447
|
return n(s[0]) + "=" + n(s[1]);
|
|
412
448
|
}, "").join("&");
|
|
413
449
|
};
|
|
414
|
-
function
|
|
450
|
+
function Wn(e) {
|
|
415
451
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
416
452
|
}
|
|
417
|
-
function
|
|
453
|
+
function _t(e, t, n) {
|
|
418
454
|
if (!t)
|
|
419
455
|
return e;
|
|
420
|
-
const r = n && n.encode ||
|
|
456
|
+
const r = n && n.encode || Wn;
|
|
421
457
|
a.isFunction(n) && (n = {
|
|
422
458
|
serialize: n
|
|
423
459
|
});
|
|
424
460
|
const s = n && n.serialize;
|
|
425
461
|
let i;
|
|
426
|
-
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
462
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new je(t, n).toString(r), i) {
|
|
427
463
|
const o = e.indexOf("#");
|
|
428
464
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
429
465
|
}
|
|
430
466
|
return e;
|
|
431
467
|
}
|
|
432
|
-
class
|
|
468
|
+
class Ye {
|
|
433
469
|
constructor() {
|
|
434
470
|
this.handlers = [];
|
|
435
471
|
}
|
|
@@ -487,37 +523,37 @@ const Rt = {
|
|
|
487
523
|
silentJSONParsing: !0,
|
|
488
524
|
forcedJSONParsing: !0,
|
|
489
525
|
clarifyTimeoutError: !1
|
|
490
|
-
},
|
|
526
|
+
}, Jn = typeof URLSearchParams < "u" ? URLSearchParams : je, Gn = typeof FormData < "u" ? FormData : null, Qn = typeof Blob < "u" ? Blob : null, Kn = {
|
|
491
527
|
isBrowser: !0,
|
|
492
528
|
classes: {
|
|
493
|
-
URLSearchParams:
|
|
494
|
-
FormData:
|
|
495
|
-
Blob:
|
|
529
|
+
URLSearchParams: Jn,
|
|
530
|
+
FormData: Gn,
|
|
531
|
+
Blob: Qn
|
|
496
532
|
},
|
|
497
533
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
498
|
-
},
|
|
499
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
534
|
+
}, Me = typeof window < "u" && typeof document < "u", ke = typeof navigator == "object" && navigator || void 0, Xn = Me && (!ke || ["ReactNative", "NativeScript", "NS"].indexOf(ke.product) < 0), Zn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
535
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Yn = Me && window.location.href || "http://localhost", er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
500
536
|
__proto__: null,
|
|
501
|
-
hasBrowserEnv:
|
|
502
|
-
hasStandardBrowserEnv:
|
|
503
|
-
hasStandardBrowserWebWorkerEnv:
|
|
504
|
-
navigator:
|
|
505
|
-
origin:
|
|
506
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
507
|
-
...
|
|
508
|
-
...
|
|
537
|
+
hasBrowserEnv: Me,
|
|
538
|
+
hasStandardBrowserEnv: Xn,
|
|
539
|
+
hasStandardBrowserWebWorkerEnv: Zn,
|
|
540
|
+
navigator: ke,
|
|
541
|
+
origin: Yn
|
|
542
|
+
}, Symbol.toStringTag, { value: "Module" })), L = {
|
|
543
|
+
...er,
|
|
544
|
+
...Kn
|
|
509
545
|
};
|
|
510
|
-
function
|
|
511
|
-
return
|
|
546
|
+
function tr(e, t) {
|
|
547
|
+
return be(e, new L.classes.URLSearchParams(), Object.assign({
|
|
512
548
|
visitor: function(n, r, s, i) {
|
|
513
|
-
return
|
|
549
|
+
return L.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
514
550
|
}
|
|
515
551
|
}, t));
|
|
516
552
|
}
|
|
517
|
-
function
|
|
553
|
+
function nr(e) {
|
|
518
554
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
519
555
|
}
|
|
520
|
-
function
|
|
556
|
+
function rr(e) {
|
|
521
557
|
const t = {}, n = Object.keys(e);
|
|
522
558
|
let r;
|
|
523
559
|
const s = n.length;
|
|
@@ -526,22 +562,22 @@ function Gn(e) {
|
|
|
526
562
|
i = n[r], t[i] = e[i];
|
|
527
563
|
return t;
|
|
528
564
|
}
|
|
529
|
-
function
|
|
565
|
+
function At(e) {
|
|
530
566
|
function t(n, r, s, i) {
|
|
531
567
|
let o = n[i++];
|
|
532
568
|
if (o === "__proto__") return !0;
|
|
533
569
|
const c = Number.isFinite(+o), l = i >= n.length;
|
|
534
|
-
return o = !o && a.isArray(s) ? s.length : o, l ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
570
|
+
return o = !o && a.isArray(s) ? s.length : o, l ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = rr(s[o])), !c);
|
|
535
571
|
}
|
|
536
572
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
537
573
|
const n = {};
|
|
538
574
|
return a.forEachEntry(e, (r, s) => {
|
|
539
|
-
t(
|
|
575
|
+
t(nr(r), s, n, 0);
|
|
540
576
|
}), n;
|
|
541
577
|
}
|
|
542
578
|
return null;
|
|
543
579
|
}
|
|
544
|
-
function
|
|
580
|
+
function sr(e, t, n) {
|
|
545
581
|
if (a.isString(e))
|
|
546
582
|
try {
|
|
547
583
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -551,13 +587,13 @@ function Wn(e, t, n) {
|
|
|
551
587
|
}
|
|
552
588
|
return (n || JSON.stringify)(e);
|
|
553
589
|
}
|
|
554
|
-
const
|
|
590
|
+
const ie = {
|
|
555
591
|
transitional: Rt,
|
|
556
592
|
adapter: ["xhr", "http", "fetch"],
|
|
557
593
|
transformRequest: [function(t, n) {
|
|
558
594
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
559
595
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
560
|
-
return s ? JSON.stringify(
|
|
596
|
+
return s ? JSON.stringify(At(t)) : t;
|
|
561
597
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
562
598
|
return t;
|
|
563
599
|
if (a.isArrayBufferView(t))
|
|
@@ -567,20 +603,20 @@ const ue = {
|
|
|
567
603
|
let c;
|
|
568
604
|
if (i) {
|
|
569
605
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
570
|
-
return
|
|
606
|
+
return tr(t, this.formSerializer).toString();
|
|
571
607
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
572
608
|
const l = this.env && this.env.FormData;
|
|
573
|
-
return
|
|
609
|
+
return be(
|
|
574
610
|
c ? { "files[]": t } : t,
|
|
575
611
|
l && new l(),
|
|
576
612
|
this.formSerializer
|
|
577
613
|
);
|
|
578
614
|
}
|
|
579
615
|
}
|
|
580
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
616
|
+
return i || s ? (n.setContentType("application/json", !1), sr(t)) : t;
|
|
581
617
|
}],
|
|
582
618
|
transformResponse: [function(t) {
|
|
583
|
-
const n = this.transitional ||
|
|
619
|
+
const n = this.transitional || ie.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
584
620
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
585
621
|
return t;
|
|
586
622
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -604,8 +640,8 @@ const ue = {
|
|
|
604
640
|
maxContentLength: -1,
|
|
605
641
|
maxBodyLength: -1,
|
|
606
642
|
env: {
|
|
607
|
-
FormData:
|
|
608
|
-
Blob:
|
|
643
|
+
FormData: L.classes.FormData,
|
|
644
|
+
Blob: L.classes.Blob
|
|
609
645
|
},
|
|
610
646
|
validateStatus: function(t) {
|
|
611
647
|
return t >= 200 && t < 300;
|
|
@@ -618,9 +654,9 @@ const ue = {
|
|
|
618
654
|
}
|
|
619
655
|
};
|
|
620
656
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
621
|
-
|
|
657
|
+
ie.headers[e] = {};
|
|
622
658
|
});
|
|
623
|
-
const
|
|
659
|
+
const or = a.toObjectSet([
|
|
624
660
|
"age",
|
|
625
661
|
"authorization",
|
|
626
662
|
"content-length",
|
|
@@ -638,28 +674,28 @@ const Kn = a.toObjectSet([
|
|
|
638
674
|
"referer",
|
|
639
675
|
"retry-after",
|
|
640
676
|
"user-agent"
|
|
641
|
-
]),
|
|
677
|
+
]), ir = (e) => {
|
|
642
678
|
const t = {};
|
|
643
679
|
let n, r, s;
|
|
644
680
|
return e && e.split(`
|
|
645
681
|
`).forEach(function(o) {
|
|
646
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
682
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && or[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
647
683
|
}), t;
|
|
648
684
|
}, et = Symbol("internals");
|
|
649
|
-
function
|
|
685
|
+
function ne(e) {
|
|
650
686
|
return e && String(e).trim().toLowerCase();
|
|
651
687
|
}
|
|
652
|
-
function
|
|
653
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
688
|
+
function fe(e) {
|
|
689
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(fe) : String(e);
|
|
654
690
|
}
|
|
655
|
-
function
|
|
691
|
+
function ar(e) {
|
|
656
692
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
657
693
|
let r;
|
|
658
694
|
for (; r = n.exec(e); )
|
|
659
695
|
t[r[1]] = r[2];
|
|
660
696
|
return t;
|
|
661
697
|
}
|
|
662
|
-
const
|
|
698
|
+
const cr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
663
699
|
function xe(e, t, n, r, s) {
|
|
664
700
|
if (a.isFunction(r))
|
|
665
701
|
return r.call(this, t, n);
|
|
@@ -670,10 +706,10 @@ function xe(e, t, n, r, s) {
|
|
|
670
706
|
return r.test(t);
|
|
671
707
|
}
|
|
672
708
|
}
|
|
673
|
-
function
|
|
709
|
+
function lr(e) {
|
|
674
710
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
675
711
|
}
|
|
676
|
-
function
|
|
712
|
+
function ur(e, t) {
|
|
677
713
|
const n = a.toCamelCase(" " + t);
|
|
678
714
|
["get", "set", "has"].forEach((r) => {
|
|
679
715
|
Object.defineProperty(e, r + n, {
|
|
@@ -684,24 +720,24 @@ function er(e, t) {
|
|
|
684
720
|
});
|
|
685
721
|
});
|
|
686
722
|
}
|
|
687
|
-
let
|
|
723
|
+
let P = class {
|
|
688
724
|
constructor(t) {
|
|
689
725
|
t && this.set(t);
|
|
690
726
|
}
|
|
691
727
|
set(t, n, r) {
|
|
692
728
|
const s = this;
|
|
693
729
|
function i(c, l, u) {
|
|
694
|
-
const d =
|
|
730
|
+
const d = ne(l);
|
|
695
731
|
if (!d)
|
|
696
732
|
throw new Error("header name must be a non-empty string");
|
|
697
|
-
const
|
|
698
|
-
(!
|
|
733
|
+
const f = a.findKey(s, d);
|
|
734
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || l] = fe(c));
|
|
699
735
|
}
|
|
700
736
|
const o = (c, l) => a.forEach(c, (u, d) => i(u, d, l));
|
|
701
737
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
702
738
|
o(t, n);
|
|
703
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
704
|
-
o(
|
|
739
|
+
else if (a.isString(t) && (t = t.trim()) && !cr(t))
|
|
740
|
+
o(ir(t), n);
|
|
705
741
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
706
742
|
let c = {}, l, u;
|
|
707
743
|
for (const d of t) {
|
|
@@ -715,14 +751,14 @@ let U = class {
|
|
|
715
751
|
return this;
|
|
716
752
|
}
|
|
717
753
|
get(t, n) {
|
|
718
|
-
if (t =
|
|
754
|
+
if (t = ne(t), t) {
|
|
719
755
|
const r = a.findKey(this, t);
|
|
720
756
|
if (r) {
|
|
721
757
|
const s = this[r];
|
|
722
758
|
if (!n)
|
|
723
759
|
return s;
|
|
724
760
|
if (n === !0)
|
|
725
|
-
return
|
|
761
|
+
return ar(s);
|
|
726
762
|
if (a.isFunction(n))
|
|
727
763
|
return n.call(this, s, r);
|
|
728
764
|
if (a.isRegExp(n))
|
|
@@ -732,7 +768,7 @@ let U = class {
|
|
|
732
768
|
}
|
|
733
769
|
}
|
|
734
770
|
has(t, n) {
|
|
735
|
-
if (t =
|
|
771
|
+
if (t = ne(t), t) {
|
|
736
772
|
const r = a.findKey(this, t);
|
|
737
773
|
return !!(r && this[r] !== void 0 && (!n || xe(this, this[r], r, n)));
|
|
738
774
|
}
|
|
@@ -742,7 +778,7 @@ let U = class {
|
|
|
742
778
|
const r = this;
|
|
743
779
|
let s = !1;
|
|
744
780
|
function i(o) {
|
|
745
|
-
if (o =
|
|
781
|
+
if (o = ne(o), o) {
|
|
746
782
|
const c = a.findKey(r, o);
|
|
747
783
|
c && (!n || xe(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
748
784
|
}
|
|
@@ -763,11 +799,11 @@ let U = class {
|
|
|
763
799
|
return a.forEach(this, (s, i) => {
|
|
764
800
|
const o = a.findKey(r, i);
|
|
765
801
|
if (o) {
|
|
766
|
-
n[o] =
|
|
802
|
+
n[o] = fe(s), delete n[i];
|
|
767
803
|
return;
|
|
768
804
|
}
|
|
769
|
-
const c = t ?
|
|
770
|
-
c !== i && delete n[i], n[c] =
|
|
805
|
+
const c = t ? lr(i) : String(i).trim();
|
|
806
|
+
c !== i && delete n[i], n[c] = fe(s), r[c] = !0;
|
|
771
807
|
}), this;
|
|
772
808
|
}
|
|
773
809
|
concat(...t) {
|
|
@@ -804,14 +840,14 @@ let U = class {
|
|
|
804
840
|
accessors: {}
|
|
805
841
|
}).accessors, s = this.prototype;
|
|
806
842
|
function i(o) {
|
|
807
|
-
const c =
|
|
808
|
-
r[c] || (
|
|
843
|
+
const c = ne(o);
|
|
844
|
+
r[c] || (ur(s, o), r[c] = !0);
|
|
809
845
|
}
|
|
810
846
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
811
847
|
}
|
|
812
848
|
};
|
|
813
|
-
|
|
814
|
-
a.reduceDescriptors(
|
|
849
|
+
P.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
850
|
+
a.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
|
815
851
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
816
852
|
return {
|
|
817
853
|
get: () => e,
|
|
@@ -820,24 +856,24 @@ a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
|
820
856
|
}
|
|
821
857
|
};
|
|
822
858
|
});
|
|
823
|
-
a.freezeMethods(
|
|
824
|
-
function
|
|
825
|
-
const n = this ||
|
|
859
|
+
a.freezeMethods(P);
|
|
860
|
+
function Ce(e, t) {
|
|
861
|
+
const n = this || ie, r = t || n, s = P.from(r.headers);
|
|
826
862
|
let i = r.data;
|
|
827
863
|
return a.forEach(e, function(c) {
|
|
828
864
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
829
865
|
}), s.normalize(), i;
|
|
830
866
|
}
|
|
831
|
-
function
|
|
867
|
+
function Ot(e) {
|
|
832
868
|
return !!(e && e.__CANCEL__);
|
|
833
869
|
}
|
|
834
|
-
function
|
|
870
|
+
function Y(e, t, n) {
|
|
835
871
|
g.call(this, e ?? "canceled", g.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
836
872
|
}
|
|
837
|
-
a.inherits(
|
|
873
|
+
a.inherits(Y, g, {
|
|
838
874
|
__CANCEL__: !0
|
|
839
875
|
});
|
|
840
|
-
function
|
|
876
|
+
function xt(e, t, n) {
|
|
841
877
|
const r = n.config.validateStatus;
|
|
842
878
|
!n.status || !r || r(n.status) ? e(n) : t(new g(
|
|
843
879
|
"Request failed with status code " + n.status,
|
|
@@ -847,45 +883,45 @@ function Ot(e, t, n) {
|
|
|
847
883
|
n
|
|
848
884
|
));
|
|
849
885
|
}
|
|
850
|
-
function
|
|
886
|
+
function dr(e) {
|
|
851
887
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
852
888
|
return t && t[1] || "";
|
|
853
889
|
}
|
|
854
|
-
function
|
|
890
|
+
function fr(e, t) {
|
|
855
891
|
e = e || 10;
|
|
856
892
|
const n = new Array(e), r = new Array(e);
|
|
857
893
|
let s = 0, i = 0, o;
|
|
858
894
|
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
859
895
|
const u = Date.now(), d = r[i];
|
|
860
896
|
o || (o = u), n[s] = l, r[s] = u;
|
|
861
|
-
let
|
|
862
|
-
for (;
|
|
863
|
-
y += n[
|
|
897
|
+
let f = i, y = 0;
|
|
898
|
+
for (; f !== s; )
|
|
899
|
+
y += n[f++], f = f % e;
|
|
864
900
|
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
|
|
865
901
|
return;
|
|
866
|
-
const
|
|
867
|
-
return
|
|
902
|
+
const b = d && u - d;
|
|
903
|
+
return b ? Math.round(y * 1e3 / b) : void 0;
|
|
868
904
|
};
|
|
869
905
|
}
|
|
870
|
-
function
|
|
906
|
+
function pr(e, t) {
|
|
871
907
|
let n = 0, r = 1e3 / t, s, i;
|
|
872
908
|
const o = (u, d = Date.now()) => {
|
|
873
909
|
n = d, s = null, i && (clearTimeout(i), i = null), e.apply(null, u);
|
|
874
910
|
};
|
|
875
911
|
return [(...u) => {
|
|
876
|
-
const d = Date.now(),
|
|
877
|
-
|
|
912
|
+
const d = Date.now(), f = d - n;
|
|
913
|
+
f >= r ? o(u, d) : (s = u, i || (i = setTimeout(() => {
|
|
878
914
|
i = null, o(s);
|
|
879
|
-
}, r -
|
|
915
|
+
}, r - f)));
|
|
880
916
|
}, () => s && o(s)];
|
|
881
917
|
}
|
|
882
|
-
const
|
|
918
|
+
const he = (e, t, n = 3) => {
|
|
883
919
|
let r = 0;
|
|
884
|
-
const s =
|
|
885
|
-
return
|
|
920
|
+
const s = fr(50, 250);
|
|
921
|
+
return pr((i) => {
|
|
886
922
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, l = o - r, u = s(l), d = o <= c;
|
|
887
923
|
r = o;
|
|
888
|
-
const
|
|
924
|
+
const f = {
|
|
889
925
|
loaded: o,
|
|
890
926
|
total: c,
|
|
891
927
|
progress: c ? o / c : void 0,
|
|
@@ -896,7 +932,7 @@ const ge = (e, t, n = 3) => {
|
|
|
896
932
|
lengthComputable: c != null,
|
|
897
933
|
[t ? "download" : "upload"]: !0
|
|
898
934
|
};
|
|
899
|
-
e(
|
|
935
|
+
e(f);
|
|
900
936
|
}, n);
|
|
901
937
|
}, tt = (e, t) => {
|
|
902
938
|
const n = e != null;
|
|
@@ -905,10 +941,10 @@ const ge = (e, t, n = 3) => {
|
|
|
905
941
|
total: e,
|
|
906
942
|
loaded: r
|
|
907
943
|
}), t[1]];
|
|
908
|
-
}, nt = (e) => (...t) => a.asap(() => e(...t)),
|
|
909
|
-
new URL(
|
|
910
|
-
|
|
911
|
-
) : () => !0,
|
|
944
|
+
}, nt = (e) => (...t) => a.asap(() => e(...t)), hr = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, L.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
945
|
+
new URL(L.origin),
|
|
946
|
+
L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
|
|
947
|
+
) : () => !0, mr = L.hasStandardBrowserEnv ? (
|
|
912
948
|
// Standard browser envs support document.cookie
|
|
913
949
|
{
|
|
914
950
|
write(e, t, n, r, s, i) {
|
|
@@ -935,28 +971,28 @@ const ge = (e, t, n = 3) => {
|
|
|
935
971
|
}
|
|
936
972
|
}
|
|
937
973
|
);
|
|
938
|
-
function
|
|
974
|
+
function wr(e) {
|
|
939
975
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
940
976
|
}
|
|
941
|
-
function
|
|
977
|
+
function gr(e, t) {
|
|
942
978
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
943
979
|
}
|
|
944
|
-
function
|
|
945
|
-
let r = !
|
|
946
|
-
return e && (r || n == !1) ?
|
|
980
|
+
function Ct(e, t, n) {
|
|
981
|
+
let r = !wr(t);
|
|
982
|
+
return e && (r || n == !1) ? gr(e, t) : t;
|
|
947
983
|
}
|
|
948
|
-
const rt = (e) => e instanceof
|
|
949
|
-
function
|
|
984
|
+
const rt = (e) => e instanceof P ? { ...e } : e;
|
|
985
|
+
function K(e, t) {
|
|
950
986
|
t = t || {};
|
|
951
987
|
const n = {};
|
|
952
|
-
function r(u, d,
|
|
988
|
+
function r(u, d, f, y) {
|
|
953
989
|
return a.isPlainObject(u) && a.isPlainObject(d) ? a.merge.call({ caseless: y }, u, d) : a.isPlainObject(d) ? a.merge({}, d) : a.isArray(d) ? d.slice() : d;
|
|
954
990
|
}
|
|
955
|
-
function s(u, d,
|
|
991
|
+
function s(u, d, f, y) {
|
|
956
992
|
if (a.isUndefined(d)) {
|
|
957
993
|
if (!a.isUndefined(u))
|
|
958
|
-
return r(void 0, u,
|
|
959
|
-
} else return r(u, d,
|
|
994
|
+
return r(void 0, u, f, y);
|
|
995
|
+
} else return r(u, d, f, y);
|
|
960
996
|
}
|
|
961
997
|
function i(u, d) {
|
|
962
998
|
if (!a.isUndefined(d))
|
|
@@ -968,10 +1004,10 @@ function Y(e, t) {
|
|
|
968
1004
|
return r(void 0, u);
|
|
969
1005
|
} else return r(void 0, d);
|
|
970
1006
|
}
|
|
971
|
-
function c(u, d,
|
|
972
|
-
if (
|
|
1007
|
+
function c(u, d, f) {
|
|
1008
|
+
if (f in t)
|
|
973
1009
|
return r(u, d);
|
|
974
|
-
if (
|
|
1010
|
+
if (f in e)
|
|
975
1011
|
return r(void 0, u);
|
|
976
1012
|
}
|
|
977
1013
|
const l = {
|
|
@@ -1003,66 +1039,66 @@ function Y(e, t) {
|
|
|
1003
1039
|
socketPath: o,
|
|
1004
1040
|
responseEncoding: o,
|
|
1005
1041
|
validateStatus: c,
|
|
1006
|
-
headers: (u, d,
|
|
1042
|
+
headers: (u, d, f) => s(rt(u), rt(d), f, !0)
|
|
1007
1043
|
};
|
|
1008
1044
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
|
|
1009
|
-
const
|
|
1010
|
-
a.isUndefined(y) &&
|
|
1045
|
+
const f = l[d] || s, y = f(e[d], t[d], d);
|
|
1046
|
+
a.isUndefined(y) && f !== c || (n[d] = y);
|
|
1011
1047
|
}), n;
|
|
1012
1048
|
}
|
|
1013
|
-
const
|
|
1014
|
-
const t =
|
|
1049
|
+
const vt = (e) => {
|
|
1050
|
+
const t = K({}, e);
|
|
1015
1051
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1016
|
-
t.headers = o =
|
|
1052
|
+
t.headers = o = P.from(o), t.url = _t(Ct(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1017
1053
|
"Authorization",
|
|
1018
1054
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1019
1055
|
);
|
|
1020
1056
|
let l;
|
|
1021
1057
|
if (a.isFormData(n)) {
|
|
1022
|
-
if (
|
|
1058
|
+
if (L.hasStandardBrowserEnv || L.hasStandardBrowserWebWorkerEnv)
|
|
1023
1059
|
o.setContentType(void 0);
|
|
1024
1060
|
else if ((l = o.getContentType()) !== !1) {
|
|
1025
|
-
const [u, ...d] = l ? l.split(";").map((
|
|
1061
|
+
const [u, ...d] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1026
1062
|
o.setContentType([u || "multipart/form-data", ...d].join("; "));
|
|
1027
1063
|
}
|
|
1028
1064
|
}
|
|
1029
|
-
if (
|
|
1030
|
-
const u = s && i &&
|
|
1065
|
+
if (L.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && hr(t.url))) {
|
|
1066
|
+
const u = s && i && mr.read(i);
|
|
1031
1067
|
u && o.set(s, u);
|
|
1032
1068
|
}
|
|
1033
1069
|
return t;
|
|
1034
|
-
},
|
|
1070
|
+
}, yr = typeof XMLHttpRequest < "u", Er = yr && function(e) {
|
|
1035
1071
|
return new Promise(function(n, r) {
|
|
1036
|
-
const s =
|
|
1072
|
+
const s = vt(e);
|
|
1037
1073
|
let i = s.data;
|
|
1038
|
-
const o =
|
|
1039
|
-
let { responseType: c, onUploadProgress: l, onDownloadProgress: u } = s, d,
|
|
1074
|
+
const o = P.from(s.headers).normalize();
|
|
1075
|
+
let { responseType: c, onUploadProgress: l, onDownloadProgress: u } = s, d, f, y, b, p;
|
|
1040
1076
|
function m() {
|
|
1041
|
-
|
|
1077
|
+
b && b(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(d), s.signal && s.signal.removeEventListener("abort", d);
|
|
1042
1078
|
}
|
|
1043
1079
|
let h = new XMLHttpRequest();
|
|
1044
1080
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1045
|
-
function
|
|
1081
|
+
function S() {
|
|
1046
1082
|
if (!h)
|
|
1047
1083
|
return;
|
|
1048
|
-
const
|
|
1084
|
+
const T = P.from(
|
|
1049
1085
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1050
1086
|
), O = {
|
|
1051
1087
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1052
1088
|
status: h.status,
|
|
1053
1089
|
statusText: h.statusText,
|
|
1054
|
-
headers:
|
|
1090
|
+
headers: T,
|
|
1055
1091
|
config: e,
|
|
1056
1092
|
request: h
|
|
1057
1093
|
};
|
|
1058
|
-
|
|
1094
|
+
xt(function(D) {
|
|
1059
1095
|
n(D), m();
|
|
1060
1096
|
}, function(D) {
|
|
1061
1097
|
r(D), m();
|
|
1062
1098
|
}, O), h = null;
|
|
1063
1099
|
}
|
|
1064
|
-
"onloadend" in h ? h.onloadend =
|
|
1065
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1100
|
+
"onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
|
|
1101
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1066
1102
|
}, h.onabort = function() {
|
|
1067
1103
|
h && (r(new g("Request aborted", g.ECONNABORTED, e, h)), h = null);
|
|
1068
1104
|
}, h.onerror = function() {
|
|
@@ -1078,17 +1114,17 @@ const Lt = (e) => {
|
|
|
1078
1114
|
)), h = null;
|
|
1079
1115
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(N, O) {
|
|
1080
1116
|
h.setRequestHeader(O, N);
|
|
1081
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([y,
|
|
1082
|
-
h && (r(!
|
|
1117
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([y, p] = he(u, !0), h.addEventListener("progress", y)), l && h.upload && ([f, b] = he(l), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (d = (T) => {
|
|
1118
|
+
h && (r(!T || T.type ? new Y(null, e, h) : T), h.abort(), h = null);
|
|
1083
1119
|
}, s.cancelToken && s.cancelToken.subscribe(d), s.signal && (s.signal.aborted ? d() : s.signal.addEventListener("abort", d)));
|
|
1084
|
-
const
|
|
1085
|
-
if (
|
|
1086
|
-
r(new g("Unsupported protocol " +
|
|
1120
|
+
const _ = dr(s.url);
|
|
1121
|
+
if (_ && L.protocols.indexOf(_) === -1) {
|
|
1122
|
+
r(new g("Unsupported protocol " + _ + ":", g.ERR_BAD_REQUEST, e));
|
|
1087
1123
|
return;
|
|
1088
1124
|
}
|
|
1089
1125
|
h.send(i || null);
|
|
1090
1126
|
});
|
|
1091
|
-
},
|
|
1127
|
+
}, br = (e, t) => {
|
|
1092
1128
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1093
1129
|
if (t || n) {
|
|
1094
1130
|
let r = new AbortController(), s;
|
|
@@ -1096,7 +1132,7 @@ const Lt = (e) => {
|
|
|
1096
1132
|
if (!s) {
|
|
1097
1133
|
s = !0, c();
|
|
1098
1134
|
const d = u instanceof Error ? u : this.reason;
|
|
1099
|
-
r.abort(d instanceof g ? d : new
|
|
1135
|
+
r.abort(d instanceof g ? d : new Y(d instanceof Error ? d.message : d));
|
|
1100
1136
|
}
|
|
1101
1137
|
};
|
|
1102
1138
|
let o = t && setTimeout(() => {
|
|
@@ -1111,7 +1147,7 @@ const Lt = (e) => {
|
|
|
1111
1147
|
const { signal: l } = r;
|
|
1112
1148
|
return l.unsubscribe = () => a.asap(c), l;
|
|
1113
1149
|
}
|
|
1114
|
-
},
|
|
1150
|
+
}, Tr = function* (e, t) {
|
|
1115
1151
|
let n = e.byteLength;
|
|
1116
1152
|
if (n < t) {
|
|
1117
1153
|
yield e;
|
|
@@ -1120,10 +1156,10 @@ const Lt = (e) => {
|
|
|
1120
1156
|
let r = 0, s;
|
|
1121
1157
|
for (; r < n; )
|
|
1122
1158
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1123
|
-
},
|
|
1124
|
-
for await (const n of
|
|
1125
|
-
yield*
|
|
1126
|
-
},
|
|
1159
|
+
}, Sr = async function* (e, t) {
|
|
1160
|
+
for await (const n of _r(e))
|
|
1161
|
+
yield* Tr(n, t);
|
|
1162
|
+
}, _r = async function* (e) {
|
|
1127
1163
|
if (e[Symbol.asyncIterator]) {
|
|
1128
1164
|
yield* e;
|
|
1129
1165
|
return;
|
|
@@ -1140,7 +1176,7 @@ const Lt = (e) => {
|
|
|
1140
1176
|
await t.cancel();
|
|
1141
1177
|
}
|
|
1142
1178
|
}, st = (e, t, n, r) => {
|
|
1143
|
-
const s =
|
|
1179
|
+
const s = Sr(e, t);
|
|
1144
1180
|
let i = 0, o, c = (l) => {
|
|
1145
1181
|
o || (o = !0, r && r(l));
|
|
1146
1182
|
};
|
|
@@ -1152,9 +1188,9 @@ const Lt = (e) => {
|
|
|
1152
1188
|
c(), l.close();
|
|
1153
1189
|
return;
|
|
1154
1190
|
}
|
|
1155
|
-
let
|
|
1191
|
+
let f = d.byteLength;
|
|
1156
1192
|
if (n) {
|
|
1157
|
-
let y = i +=
|
|
1193
|
+
let y = i += f;
|
|
1158
1194
|
n(y);
|
|
1159
1195
|
}
|
|
1160
1196
|
l.enqueue(new Uint8Array(d));
|
|
@@ -1168,15 +1204,15 @@ const Lt = (e) => {
|
|
|
1168
1204
|
}, {
|
|
1169
1205
|
highWaterMark: 2
|
|
1170
1206
|
});
|
|
1171
|
-
},
|
|
1207
|
+
}, Te = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Nt = Te && typeof ReadableStream == "function", Rr = Te && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Lt = (e, ...t) => {
|
|
1172
1208
|
try {
|
|
1173
1209
|
return !!e(...t);
|
|
1174
1210
|
} catch {
|
|
1175
1211
|
return !1;
|
|
1176
1212
|
}
|
|
1177
|
-
},
|
|
1213
|
+
}, Ar = Nt && Lt(() => {
|
|
1178
1214
|
let e = !1;
|
|
1179
|
-
const t = new Request(
|
|
1215
|
+
const t = new Request(L.origin, {
|
|
1180
1216
|
body: new ReadableStream(),
|
|
1181
1217
|
method: "POST",
|
|
1182
1218
|
get duplex() {
|
|
@@ -1184,34 +1220,34 @@ const Lt = (e) => {
|
|
|
1184
1220
|
}
|
|
1185
1221
|
}).headers.has("Content-Type");
|
|
1186
1222
|
return e && !t;
|
|
1187
|
-
}), ot = 64 * 1024,
|
|
1188
|
-
stream:
|
|
1223
|
+
}), ot = 64 * 1024, Be = Nt && Lt(() => a.isReadableStream(new Response("").body)), me = {
|
|
1224
|
+
stream: Be && ((e) => e.body)
|
|
1189
1225
|
};
|
|
1190
|
-
|
|
1226
|
+
Te && ((e) => {
|
|
1191
1227
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1192
|
-
!
|
|
1228
|
+
!me[t] && (me[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1193
1229
|
throw new g(`Response type '${t}' is not supported`, g.ERR_NOT_SUPPORT, r);
|
|
1194
1230
|
});
|
|
1195
1231
|
});
|
|
1196
1232
|
})(new Response());
|
|
1197
|
-
const
|
|
1233
|
+
const Or = async (e) => {
|
|
1198
1234
|
if (e == null)
|
|
1199
1235
|
return 0;
|
|
1200
1236
|
if (a.isBlob(e))
|
|
1201
1237
|
return e.size;
|
|
1202
1238
|
if (a.isSpecCompliantForm(e))
|
|
1203
|
-
return (await new Request(
|
|
1239
|
+
return (await new Request(L.origin, {
|
|
1204
1240
|
method: "POST",
|
|
1205
1241
|
body: e
|
|
1206
1242
|
}).arrayBuffer()).byteLength;
|
|
1207
1243
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1208
1244
|
return e.byteLength;
|
|
1209
1245
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1210
|
-
return (await
|
|
1211
|
-
},
|
|
1246
|
+
return (await Rr(e)).byteLength;
|
|
1247
|
+
}, xr = async (e, t) => {
|
|
1212
1248
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1213
|
-
return n ??
|
|
1214
|
-
},
|
|
1249
|
+
return n ?? Or(t);
|
|
1250
|
+
}, Cr = Te && (async (e) => {
|
|
1215
1251
|
let {
|
|
1216
1252
|
url: t,
|
|
1217
1253
|
method: n,
|
|
@@ -1223,85 +1259,85 @@ const gr = async (e) => {
|
|
|
1223
1259
|
onUploadProgress: l,
|
|
1224
1260
|
responseType: u,
|
|
1225
1261
|
headers: d,
|
|
1226
|
-
withCredentials:
|
|
1262
|
+
withCredentials: f = "same-origin",
|
|
1227
1263
|
fetchOptions: y
|
|
1228
|
-
} =
|
|
1264
|
+
} = vt(e);
|
|
1229
1265
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1230
|
-
let
|
|
1231
|
-
const m =
|
|
1232
|
-
|
|
1266
|
+
let b = br([s, i && i.toAbortSignal()], o), p;
|
|
1267
|
+
const m = b && b.unsubscribe && (() => {
|
|
1268
|
+
b.unsubscribe();
|
|
1233
1269
|
});
|
|
1234
1270
|
let h;
|
|
1235
1271
|
try {
|
|
1236
|
-
if (l &&
|
|
1272
|
+
if (l && Ar && n !== "get" && n !== "head" && (h = await xr(d, r)) !== 0) {
|
|
1237
1273
|
let O = new Request(t, {
|
|
1238
1274
|
method: "POST",
|
|
1239
1275
|
body: r,
|
|
1240
1276
|
duplex: "half"
|
|
1241
|
-
}),
|
|
1242
|
-
if (a.isFormData(r) && (
|
|
1243
|
-
const [D,
|
|
1277
|
+
}), k;
|
|
1278
|
+
if (a.isFormData(r) && (k = O.headers.get("content-type")) && d.setContentType(k), O.body) {
|
|
1279
|
+
const [D, q] = tt(
|
|
1244
1280
|
h,
|
|
1245
|
-
|
|
1281
|
+
he(nt(l))
|
|
1246
1282
|
);
|
|
1247
|
-
r = st(O.body, ot, D,
|
|
1283
|
+
r = st(O.body, ot, D, q);
|
|
1248
1284
|
}
|
|
1249
1285
|
}
|
|
1250
|
-
a.isString(
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1286
|
+
a.isString(f) || (f = f ? "include" : "omit");
|
|
1287
|
+
const S = "credentials" in Request.prototype;
|
|
1288
|
+
p = new Request(t, {
|
|
1253
1289
|
...y,
|
|
1254
|
-
signal:
|
|
1290
|
+
signal: b,
|
|
1255
1291
|
method: n.toUpperCase(),
|
|
1256
1292
|
headers: d.normalize().toJSON(),
|
|
1257
1293
|
body: r,
|
|
1258
1294
|
duplex: "half",
|
|
1259
|
-
credentials:
|
|
1295
|
+
credentials: S ? f : void 0
|
|
1260
1296
|
});
|
|
1261
|
-
let
|
|
1262
|
-
const
|
|
1263
|
-
if (
|
|
1297
|
+
let _ = await fetch(p, y);
|
|
1298
|
+
const T = Be && (u === "stream" || u === "response");
|
|
1299
|
+
if (Be && (c || T && m)) {
|
|
1264
1300
|
const O = {};
|
|
1265
|
-
["status", "statusText", "headers"].forEach((
|
|
1266
|
-
O[
|
|
1301
|
+
["status", "statusText", "headers"].forEach((E) => {
|
|
1302
|
+
O[E] = _[E];
|
|
1267
1303
|
});
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1270
|
-
|
|
1304
|
+
const k = a.toFiniteNumber(_.headers.get("content-length")), [D, q] = c && tt(
|
|
1305
|
+
k,
|
|
1306
|
+
he(nt(c), !0)
|
|
1271
1307
|
) || [];
|
|
1272
|
-
|
|
1273
|
-
st(
|
|
1274
|
-
|
|
1308
|
+
_ = new Response(
|
|
1309
|
+
st(_.body, ot, D, () => {
|
|
1310
|
+
q && q(), m && m();
|
|
1275
1311
|
}),
|
|
1276
1312
|
O
|
|
1277
1313
|
);
|
|
1278
1314
|
}
|
|
1279
1315
|
u = u || "text";
|
|
1280
|
-
let N = await
|
|
1281
|
-
return !
|
|
1282
|
-
|
|
1316
|
+
let N = await me[a.findKey(me, u) || "text"](_, e);
|
|
1317
|
+
return !T && m && m(), await new Promise((O, k) => {
|
|
1318
|
+
xt(O, k, {
|
|
1283
1319
|
data: N,
|
|
1284
|
-
headers:
|
|
1285
|
-
status:
|
|
1286
|
-
statusText:
|
|
1320
|
+
headers: P.from(_.headers),
|
|
1321
|
+
status: _.status,
|
|
1322
|
+
statusText: _.statusText,
|
|
1287
1323
|
config: e,
|
|
1288
|
-
request:
|
|
1324
|
+
request: p
|
|
1289
1325
|
});
|
|
1290
1326
|
});
|
|
1291
|
-
} catch (
|
|
1292
|
-
throw m && m(),
|
|
1293
|
-
new g("Network Error", g.ERR_NETWORK, e,
|
|
1327
|
+
} catch (S) {
|
|
1328
|
+
throw m && m(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1329
|
+
new g("Network Error", g.ERR_NETWORK, e, p),
|
|
1294
1330
|
{
|
|
1295
|
-
cause:
|
|
1331
|
+
cause: S.cause || S
|
|
1296
1332
|
}
|
|
1297
|
-
) : g.from(
|
|
1333
|
+
) : g.from(S, S && S.code, e, p);
|
|
1298
1334
|
}
|
|
1299
|
-
}),
|
|
1300
|
-
http:
|
|
1301
|
-
xhr:
|
|
1302
|
-
fetch:
|
|
1335
|
+
}), Pe = {
|
|
1336
|
+
http: zn,
|
|
1337
|
+
xhr: Er,
|
|
1338
|
+
fetch: Cr
|
|
1303
1339
|
};
|
|
1304
|
-
a.forEach(
|
|
1340
|
+
a.forEach(Pe, (e, t) => {
|
|
1305
1341
|
if (e) {
|
|
1306
1342
|
try {
|
|
1307
1343
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1310,7 +1346,7 @@ a.forEach(Ue, (e, t) => {
|
|
|
1310
1346
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1311
1347
|
}
|
|
1312
1348
|
});
|
|
1313
|
-
const it = (e) => `- ${e}`,
|
|
1349
|
+
const it = (e) => `- ${e}`, vr = (e) => a.isFunction(e) || e === null || e === !1, kt = {
|
|
1314
1350
|
getAdapter: (e) => {
|
|
1315
1351
|
e = a.isArray(e) ? e : [e];
|
|
1316
1352
|
const { length: t } = e;
|
|
@@ -1319,7 +1355,7 @@ const it = (e) => `- ${e}`, Er = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1319
1355
|
for (let i = 0; i < t; i++) {
|
|
1320
1356
|
n = e[i];
|
|
1321
1357
|
let o;
|
|
1322
|
-
if (r = n, !
|
|
1358
|
+
if (r = n, !vr(n) && (r = Pe[(o = String(n)).toLowerCase()], r === void 0))
|
|
1323
1359
|
throw new g(`Unknown adapter '${o}'`);
|
|
1324
1360
|
if (r)
|
|
1325
1361
|
break;
|
|
@@ -1339,38 +1375,38 @@ const it = (e) => `- ${e}`, Er = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1339
1375
|
}
|
|
1340
1376
|
return r;
|
|
1341
1377
|
},
|
|
1342
|
-
adapters:
|
|
1378
|
+
adapters: Pe
|
|
1343
1379
|
};
|
|
1344
|
-
function
|
|
1380
|
+
function ve(e) {
|
|
1345
1381
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1346
|
-
throw new
|
|
1382
|
+
throw new Y(null, e);
|
|
1347
1383
|
}
|
|
1348
1384
|
function at(e) {
|
|
1349
|
-
return
|
|
1385
|
+
return ve(e), e.headers = P.from(e.headers), e.data = Ce.call(
|
|
1350
1386
|
e,
|
|
1351
1387
|
e.transformRequest
|
|
1352
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), kt.getAdapter(e.adapter ||
|
|
1353
|
-
return
|
|
1388
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), kt.getAdapter(e.adapter || ie.adapter)(e).then(function(r) {
|
|
1389
|
+
return ve(e), r.data = Ce.call(
|
|
1354
1390
|
e,
|
|
1355
1391
|
e.transformResponse,
|
|
1356
1392
|
r
|
|
1357
|
-
), r.headers =
|
|
1393
|
+
), r.headers = P.from(r.headers), r;
|
|
1358
1394
|
}, function(r) {
|
|
1359
|
-
return
|
|
1395
|
+
return Ot(r) || (ve(e), r && r.response && (r.response.data = Ce.call(
|
|
1360
1396
|
e,
|
|
1361
1397
|
e.transformResponse,
|
|
1362
1398
|
r.response
|
|
1363
|
-
), r.response.headers =
|
|
1399
|
+
), r.response.headers = P.from(r.response.headers))), Promise.reject(r);
|
|
1364
1400
|
});
|
|
1365
1401
|
}
|
|
1366
|
-
const Bt = "1.10.0",
|
|
1402
|
+
const Bt = "1.10.0", Se = {};
|
|
1367
1403
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1368
|
-
|
|
1404
|
+
Se[e] = function(r) {
|
|
1369
1405
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1370
1406
|
};
|
|
1371
1407
|
});
|
|
1372
1408
|
const ct = {};
|
|
1373
|
-
|
|
1409
|
+
Se.transitional = function(t, n, r) {
|
|
1374
1410
|
function s(i, o) {
|
|
1375
1411
|
return "[Axios v" + Bt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1376
1412
|
}
|
|
@@ -1388,10 +1424,10 @@ Te.transitional = function(t, n, r) {
|
|
|
1388
1424
|
)), t ? t(i, o, c) : !0;
|
|
1389
1425
|
};
|
|
1390
1426
|
};
|
|
1391
|
-
|
|
1427
|
+
Se.spelling = function(t) {
|
|
1392
1428
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1393
1429
|
};
|
|
1394
|
-
function
|
|
1430
|
+
function Nr(e, t, n) {
|
|
1395
1431
|
if (typeof e != "object")
|
|
1396
1432
|
throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
|
|
1397
1433
|
const r = Object.keys(e);
|
|
@@ -1408,15 +1444,15 @@ function br(e, t, n) {
|
|
|
1408
1444
|
throw new g("Unknown option " + i, g.ERR_BAD_OPTION);
|
|
1409
1445
|
}
|
|
1410
1446
|
}
|
|
1411
|
-
const
|
|
1412
|
-
assertOptions:
|
|
1413
|
-
validators:
|
|
1414
|
-
},
|
|
1415
|
-
let
|
|
1447
|
+
const pe = {
|
|
1448
|
+
assertOptions: Nr,
|
|
1449
|
+
validators: Se
|
|
1450
|
+
}, $ = pe.validators;
|
|
1451
|
+
let Q = class {
|
|
1416
1452
|
constructor(t) {
|
|
1417
1453
|
this.defaults = t || {}, this.interceptors = {
|
|
1418
|
-
request: new
|
|
1419
|
-
response: new
|
|
1454
|
+
request: new Ye(),
|
|
1455
|
+
response: new Ye()
|
|
1420
1456
|
};
|
|
1421
1457
|
}
|
|
1422
1458
|
/**
|
|
@@ -1445,20 +1481,20 @@ let Z = class {
|
|
|
1445
1481
|
}
|
|
1446
1482
|
}
|
|
1447
1483
|
_request(t, n) {
|
|
1448
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1484
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = K(this.defaults, n);
|
|
1449
1485
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1450
|
-
r !== void 0 &&
|
|
1451
|
-
silentJSONParsing:
|
|
1452
|
-
forcedJSONParsing:
|
|
1453
|
-
clarifyTimeoutError:
|
|
1486
|
+
r !== void 0 && pe.assertOptions(r, {
|
|
1487
|
+
silentJSONParsing: $.transitional($.boolean),
|
|
1488
|
+
forcedJSONParsing: $.transitional($.boolean),
|
|
1489
|
+
clarifyTimeoutError: $.transitional($.boolean)
|
|
1454
1490
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1455
1491
|
serialize: s
|
|
1456
|
-
} :
|
|
1457
|
-
encode:
|
|
1458
|
-
serialize:
|
|
1459
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1460
|
-
baseUrl:
|
|
1461
|
-
withXsrfToken:
|
|
1492
|
+
} : pe.assertOptions(s, {
|
|
1493
|
+
encode: $.function,
|
|
1494
|
+
serialize: $.function
|
|
1495
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), pe.assertOptions(n, {
|
|
1496
|
+
baseUrl: $.spelling("baseURL"),
|
|
1497
|
+
withXsrfToken: $.spelling("withXSRFToken")
|
|
1462
1498
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1463
1499
|
let o = i && a.merge(
|
|
1464
1500
|
i.common,
|
|
@@ -1466,10 +1502,10 @@ let Z = class {
|
|
|
1466
1502
|
);
|
|
1467
1503
|
i && a.forEach(
|
|
1468
1504
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1469
|
-
(
|
|
1470
|
-
delete i[
|
|
1505
|
+
(p) => {
|
|
1506
|
+
delete i[p];
|
|
1471
1507
|
}
|
|
1472
|
-
), n.headers =
|
|
1508
|
+
), n.headers = P.concat(o, i);
|
|
1473
1509
|
const c = [];
|
|
1474
1510
|
let l = !0;
|
|
1475
1511
|
this.interceptors.request.forEach(function(m) {
|
|
@@ -1479,42 +1515,42 @@ let Z = class {
|
|
|
1479
1515
|
this.interceptors.response.forEach(function(m) {
|
|
1480
1516
|
u.push(m.fulfilled, m.rejected);
|
|
1481
1517
|
});
|
|
1482
|
-
let d,
|
|
1518
|
+
let d, f = 0, y;
|
|
1483
1519
|
if (!l) {
|
|
1484
|
-
const
|
|
1485
|
-
for (
|
|
1486
|
-
d = d.then(f
|
|
1520
|
+
const p = [at.bind(this), void 0];
|
|
1521
|
+
for (p.unshift.apply(p, c), p.push.apply(p, u), y = p.length, d = Promise.resolve(n); f < y; )
|
|
1522
|
+
d = d.then(p[f++], p[f++]);
|
|
1487
1523
|
return d;
|
|
1488
1524
|
}
|
|
1489
1525
|
y = c.length;
|
|
1490
|
-
let
|
|
1491
|
-
for (
|
|
1492
|
-
const
|
|
1526
|
+
let b = n;
|
|
1527
|
+
for (f = 0; f < y; ) {
|
|
1528
|
+
const p = c[f++], m = c[f++];
|
|
1493
1529
|
try {
|
|
1494
|
-
|
|
1530
|
+
b = p(b);
|
|
1495
1531
|
} catch (h) {
|
|
1496
1532
|
m.call(this, h);
|
|
1497
1533
|
break;
|
|
1498
1534
|
}
|
|
1499
1535
|
}
|
|
1500
1536
|
try {
|
|
1501
|
-
d = at.call(this,
|
|
1502
|
-
} catch (
|
|
1503
|
-
return Promise.reject(
|
|
1537
|
+
d = at.call(this, b);
|
|
1538
|
+
} catch (p) {
|
|
1539
|
+
return Promise.reject(p);
|
|
1504
1540
|
}
|
|
1505
|
-
for (
|
|
1506
|
-
d = d.then(u[
|
|
1541
|
+
for (f = 0, y = u.length; f < y; )
|
|
1542
|
+
d = d.then(u[f++], u[f++]);
|
|
1507
1543
|
return d;
|
|
1508
1544
|
}
|
|
1509
1545
|
getUri(t) {
|
|
1510
|
-
t =
|
|
1511
|
-
const n =
|
|
1512
|
-
return
|
|
1546
|
+
t = K(this.defaults, t);
|
|
1547
|
+
const n = Ct(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1548
|
+
return _t(n, t.params, t.paramsSerializer);
|
|
1513
1549
|
}
|
|
1514
1550
|
};
|
|
1515
1551
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1516
|
-
|
|
1517
|
-
return this.request(
|
|
1552
|
+
Q.prototype[t] = function(n, r) {
|
|
1553
|
+
return this.request(K(r || {}, {
|
|
1518
1554
|
method: t,
|
|
1519
1555
|
url: n,
|
|
1520
1556
|
data: (r || {}).data
|
|
@@ -1524,7 +1560,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1524
1560
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1525
1561
|
function n(r) {
|
|
1526
1562
|
return function(i, o, c) {
|
|
1527
|
-
return this.request(
|
|
1563
|
+
return this.request(K(c || {}, {
|
|
1528
1564
|
method: t,
|
|
1529
1565
|
headers: r ? {
|
|
1530
1566
|
"Content-Type": "multipart/form-data"
|
|
@@ -1534,9 +1570,9 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1534
1570
|
}));
|
|
1535
1571
|
};
|
|
1536
1572
|
}
|
|
1537
|
-
|
|
1573
|
+
Q.prototype[t] = n(), Q.prototype[t + "Form"] = n(!0);
|
|
1538
1574
|
});
|
|
1539
|
-
let
|
|
1575
|
+
let Lr = class Pt {
|
|
1540
1576
|
constructor(t) {
|
|
1541
1577
|
if (typeof t != "function")
|
|
1542
1578
|
throw new TypeError("executor must be a function.");
|
|
@@ -1560,7 +1596,7 @@ let _r = class vt {
|
|
|
1560
1596
|
r.unsubscribe(i);
|
|
1561
1597
|
}, o;
|
|
1562
1598
|
}, t(function(i, o, c) {
|
|
1563
|
-
r.reason || (r.reason = new
|
|
1599
|
+
r.reason || (r.reason = new Y(i, o, c), n(r.reason));
|
|
1564
1600
|
});
|
|
1565
1601
|
}
|
|
1566
1602
|
/**
|
|
@@ -1602,22 +1638,22 @@ let _r = class vt {
|
|
|
1602
1638
|
static source() {
|
|
1603
1639
|
let t;
|
|
1604
1640
|
return {
|
|
1605
|
-
token: new
|
|
1641
|
+
token: new Pt(function(s) {
|
|
1606
1642
|
t = s;
|
|
1607
1643
|
}),
|
|
1608
1644
|
cancel: t
|
|
1609
1645
|
};
|
|
1610
1646
|
}
|
|
1611
1647
|
};
|
|
1612
|
-
function
|
|
1648
|
+
function kr(e) {
|
|
1613
1649
|
return function(n) {
|
|
1614
1650
|
return e.apply(null, n);
|
|
1615
1651
|
};
|
|
1616
1652
|
}
|
|
1617
|
-
function
|
|
1653
|
+
function Br(e) {
|
|
1618
1654
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1619
1655
|
}
|
|
1620
|
-
const
|
|
1656
|
+
const Ue = {
|
|
1621
1657
|
Continue: 100,
|
|
1622
1658
|
SwitchingProtocols: 101,
|
|
1623
1659
|
Processing: 102,
|
|
@@ -1682,269 +1718,262 @@ const Ie = {
|
|
|
1682
1718
|
NotExtended: 510,
|
|
1683
1719
|
NetworkAuthenticationRequired: 511
|
|
1684
1720
|
};
|
|
1685
|
-
Object.entries(
|
|
1686
|
-
|
|
1721
|
+
Object.entries(Ue).forEach(([e, t]) => {
|
|
1722
|
+
Ue[t] = e;
|
|
1687
1723
|
});
|
|
1688
|
-
function
|
|
1689
|
-
const t = new
|
|
1690
|
-
return a.extend(n,
|
|
1691
|
-
return
|
|
1724
|
+
function Ut(e) {
|
|
1725
|
+
const t = new Q(e), n = dt(Q.prototype.request, t);
|
|
1726
|
+
return a.extend(n, Q.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1727
|
+
return Ut(K(e, s));
|
|
1692
1728
|
}, n;
|
|
1693
1729
|
}
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1730
|
+
const C = Ut(ie);
|
|
1731
|
+
C.Axios = Q;
|
|
1732
|
+
C.CanceledError = Y;
|
|
1733
|
+
C.CancelToken = Lr;
|
|
1734
|
+
C.isCancel = Ot;
|
|
1735
|
+
C.VERSION = Bt;
|
|
1736
|
+
C.toFormData = be;
|
|
1737
|
+
C.AxiosError = g;
|
|
1738
|
+
C.Cancel = C.CanceledError;
|
|
1739
|
+
C.all = function(t) {
|
|
1704
1740
|
return Promise.all(t);
|
|
1705
1741
|
};
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1742
|
+
C.spread = kr;
|
|
1743
|
+
C.isAxiosError = Br;
|
|
1744
|
+
C.mergeConfig = K;
|
|
1745
|
+
C.AxiosHeaders = P;
|
|
1746
|
+
C.formToJSON = (e) => At(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1747
|
+
C.getAdapter = kt.getAdapter;
|
|
1748
|
+
C.HttpStatusCode = Ue;
|
|
1749
|
+
C.default = C;
|
|
1714
1750
|
const {
|
|
1715
|
-
Axios:
|
|
1716
|
-
AxiosError:
|
|
1717
|
-
CanceledError:
|
|
1718
|
-
isCancel:
|
|
1719
|
-
CancelToken:
|
|
1720
|
-
VERSION:
|
|
1721
|
-
all:
|
|
1722
|
-
Cancel:
|
|
1723
|
-
isAxiosError:
|
|
1724
|
-
spread:
|
|
1725
|
-
toFormData:
|
|
1726
|
-
AxiosHeaders:
|
|
1727
|
-
HttpStatusCode:
|
|
1728
|
-
formToJSON:
|
|
1729
|
-
getAdapter:
|
|
1730
|
-
mergeConfig:
|
|
1731
|
-
} =
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1751
|
+
Axios: Cs,
|
|
1752
|
+
AxiosError: vs,
|
|
1753
|
+
CanceledError: Ns,
|
|
1754
|
+
isCancel: Ls,
|
|
1755
|
+
CancelToken: ks,
|
|
1756
|
+
VERSION: Bs,
|
|
1757
|
+
all: Ps,
|
|
1758
|
+
Cancel: Us,
|
|
1759
|
+
isAxiosError: Fs,
|
|
1760
|
+
spread: Is,
|
|
1761
|
+
toFormData: Ds,
|
|
1762
|
+
AxiosHeaders: js,
|
|
1763
|
+
HttpStatusCode: Ms,
|
|
1764
|
+
formToJSON: $s,
|
|
1765
|
+
getAdapter: qs,
|
|
1766
|
+
mergeConfig: zs
|
|
1767
|
+
} = C;
|
|
1768
|
+
class Pr {
|
|
1769
|
+
// 30 segundos
|
|
1770
|
+
constructor() {
|
|
1771
|
+
Ae(this, "apiUrl");
|
|
1772
|
+
Ae(this, "timeout", 3e4);
|
|
1773
|
+
this.apiUrl = Fe.QWEN_TTS_API_URL;
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* Sintetiza texto a voz usando Qwen3-TTS-Flash a través de ocity_tts API
|
|
1777
|
+
* @param options Opciones de síntesis
|
|
1778
|
+
* @returns Blob de audio en formato WAV
|
|
1779
|
+
* @throws Error si la síntesis falla
|
|
1780
|
+
*/
|
|
1781
|
+
async synthesizeSpeech(t) {
|
|
1782
|
+
var n, r, s, i, o, c, l, u, d;
|
|
1783
|
+
try {
|
|
1784
|
+
const {
|
|
1785
|
+
text: f,
|
|
1786
|
+
voice: y = "Peter",
|
|
1787
|
+
languageType: b = "English",
|
|
1788
|
+
emotion: p,
|
|
1789
|
+
speed: m,
|
|
1790
|
+
pitch: h,
|
|
1791
|
+
purpose: S
|
|
1792
|
+
} = t;
|
|
1793
|
+
if (!f || f.trim().length === 0)
|
|
1794
|
+
throw new Error("[Qwen TTS] Text cannot be empty");
|
|
1795
|
+
if (f.length > 512)
|
|
1796
|
+
throw new Error(
|
|
1797
|
+
"[Qwen TTS] Text must not exceed 512 characters (Qwen3-TTS limit)"
|
|
1798
|
+
);
|
|
1799
|
+
console.log(
|
|
1800
|
+
`[Qwen TTS] Processing request: text="${f.substring(0, 50)}..." voice=${y}`
|
|
1801
|
+
);
|
|
1802
|
+
const _ = {
|
|
1803
|
+
text: f,
|
|
1804
|
+
voice: y,
|
|
1805
|
+
languageType: b
|
|
1806
|
+
};
|
|
1807
|
+
p && (_.emotion = p, console.log(`[Qwen TTS] Emotion: ${p}`)), m !== void 0 && (_.speed = m, console.log(`[Qwen TTS] Speed: ${m}`)), h !== void 0 && (_.pitch = h, console.log(`[Qwen TTS] Pitch: ${h}`)), S && (_.purpose = S, console.log(`[Qwen TTS] Purpose: ${S}`));
|
|
1808
|
+
const T = _;
|
|
1809
|
+
console.log(
|
|
1810
|
+
`[Qwen TTS] Sending request to ${this.apiUrl}/api/v1/tts/audio`
|
|
1811
|
+
);
|
|
1812
|
+
const O = (await C.post(
|
|
1813
|
+
`${this.apiUrl}/api/v1/tts/audio`,
|
|
1814
|
+
T,
|
|
1815
|
+
{
|
|
1816
|
+
headers: {
|
|
1817
|
+
"Content-Type": "application/json"
|
|
1818
|
+
},
|
|
1819
|
+
responseType: "blob",
|
|
1820
|
+
timeout: this.timeout
|
|
1821
|
+
}
|
|
1822
|
+
)).data;
|
|
1823
|
+
if (!O || O.size === 0)
|
|
1824
|
+
throw new Error("[Qwen TTS] No audio content received from server");
|
|
1825
|
+
return console.log(
|
|
1826
|
+
`[Qwen TTS] Successfully received audio (${O.size} bytes)`
|
|
1827
|
+
), {
|
|
1828
|
+
audio: O,
|
|
1829
|
+
mimeType: "audio/wav"
|
|
1830
|
+
};
|
|
1831
|
+
} catch (f) {
|
|
1832
|
+
const y = f instanceof Error ? f.message : String(f);
|
|
1833
|
+
if (console.error(`[Qwen TTS] Error: ${y}`), f instanceof C.AxiosError) {
|
|
1834
|
+
if (((n = f.response) == null ? void 0 : n.status) === 401 || ((r = f.response) == null ? void 0 : r.status) === 403)
|
|
1835
|
+
throw new Error(
|
|
1836
|
+
"[Qwen TTS] Unauthorized: Invalid credentials or API key on server"
|
|
1837
|
+
);
|
|
1838
|
+
if (f.code === "ECONNABORTED")
|
|
1839
|
+
throw new Error(
|
|
1840
|
+
"[Qwen TTS] Request timeout: Qwen TTS service not responding"
|
|
1841
|
+
);
|
|
1842
|
+
if (((s = f.response) == null ? void 0 : s.status) === 400) {
|
|
1843
|
+
const b = ((o = (i = f.response) == null ? void 0 : i.data) == null ? void 0 : o.message) || "Bad request parameters";
|
|
1844
|
+
throw new Error(`[Qwen TTS] Bad Request: ${b}`);
|
|
1845
|
+
}
|
|
1846
|
+
throw ((c = f.response) == null ? void 0 : c.status) === 429 ? new Error(
|
|
1847
|
+
"[Qwen TTS] Rate limit exceeded: Too many requests to Qwen API"
|
|
1848
|
+
) : f.code === "ERR_NETWORK" ? new Error(
|
|
1849
|
+
`[Qwen TTS] Network error: Cannot reach Qwen TTS service at ${this.apiUrl}`
|
|
1850
|
+
) : new Error(
|
|
1851
|
+
`[Qwen TTS] API Error (${(l = f.response) == null ? void 0 : l.status}): ${((d = (u = f.response) == null ? void 0 : u.data) == null ? void 0 : d.message) || y}`
|
|
1852
|
+
);
|
|
1853
|
+
}
|
|
1854
|
+
throw f;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1765
1857
|
}
|
|
1766
|
-
|
|
1767
|
-
|
|
1858
|
+
const Ur = new Pr();
|
|
1859
|
+
function Fr(e) {
|
|
1860
|
+
const [t, n] = v({
|
|
1768
1861
|
isPlaying: !1,
|
|
1769
1862
|
isPaused: !1,
|
|
1770
1863
|
progress: 0,
|
|
1771
1864
|
currentPNGTuber: 0,
|
|
1772
1865
|
avatars: e.avatars,
|
|
1773
1866
|
error: null
|
|
1774
|
-
}), [r, s] =
|
|
1775
|
-
e.autoAdvance || !1
|
|
1776
|
-
), [i, o] = C(!1), [, c] = C(0), l = F(null), u = F(null), d = F(r), p = F(!1), y = F(null);
|
|
1867
|
+
}), [r, s] = v(e.autoAdvance || !1), [i, o] = v(!1), [, c] = v(0), l = I(null), u = I(null), d = I(r), f = I(!1), y = I(null);
|
|
1777
1868
|
j(() => {
|
|
1778
1869
|
d.current = r;
|
|
1779
1870
|
}, [r]);
|
|
1780
|
-
const
|
|
1871
|
+
const b = (E) => {
|
|
1781
1872
|
if (e.avatars.length <= 1) return 0;
|
|
1782
|
-
const A = e.avatars.length,
|
|
1783
|
-
return Math.min(Math.floor(
|
|
1784
|
-
},
|
|
1873
|
+
const A = e.avatars.length, U = 100 / A;
|
|
1874
|
+
return Math.min(Math.floor(E / U), A - 1);
|
|
1875
|
+
}, p = () => {
|
|
1785
1876
|
u.current && (clearInterval(u.current), u.current = null);
|
|
1786
1877
|
}, m = () => {
|
|
1787
1878
|
l.current && (u.current = setInterval(() => {
|
|
1788
1879
|
if (l.current && l.current.duration) {
|
|
1789
|
-
const
|
|
1790
|
-
n((
|
|
1791
|
-
...
|
|
1792
|
-
progress: Math.min(
|
|
1793
|
-
currentPNGTuber:
|
|
1880
|
+
const E = l.current.currentTime, A = l.current.duration, U = E / A * 100;
|
|
1881
|
+
n((V) => ({
|
|
1882
|
+
...V,
|
|
1883
|
+
progress: Math.min(U, 100),
|
|
1884
|
+
currentPNGTuber: b(U)
|
|
1794
1885
|
}));
|
|
1795
1886
|
}
|
|
1796
1887
|
}, 100));
|
|
1797
1888
|
}, h = () => {
|
|
1798
|
-
var
|
|
1799
|
-
l.current && !t.isPaused && (l.current.pause(),
|
|
1800
|
-
|
|
1801
|
-
isPlaying: !1,
|
|
1802
|
-
isPaused: !0
|
|
1803
|
-
})), (b = e.onPause) == null || b.call(e));
|
|
1804
|
-
}, _ = async () => {
|
|
1889
|
+
var E;
|
|
1890
|
+
l.current && !t.isPaused && (l.current.pause(), p(), n((A) => ({ ...A, isPlaying: !1, isPaused: !0 })), (E = e.onPause) == null || E.call(e));
|
|
1891
|
+
}, S = async () => {
|
|
1805
1892
|
if (l.current && t.isPaused)
|
|
1806
1893
|
try {
|
|
1807
|
-
await l.current.play(), m(), n((
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
isPaused: !1
|
|
1811
|
-
}));
|
|
1812
|
-
} catch (b) {
|
|
1813
|
-
console.error("Error al reanudar audio:", b), n((A) => ({
|
|
1894
|
+
await l.current.play(), m(), n((E) => ({ ...E, isPlaying: !0, isPaused: !1 }));
|
|
1895
|
+
} catch (E) {
|
|
1896
|
+
console.error("Error al reanudar audio:", E), n((A) => ({
|
|
1814
1897
|
...A,
|
|
1815
|
-
error: {
|
|
1816
|
-
type: "audio",
|
|
1817
|
-
message: "Error al reanudar la reproducción"
|
|
1818
|
-
}
|
|
1898
|
+
error: { type: "audio", message: "Error al reanudar la reproducción" }
|
|
1819
1899
|
}));
|
|
1820
1900
|
}
|
|
1821
|
-
},
|
|
1822
|
-
|
|
1823
|
-
}, S = () => {
|
|
1824
|
-
s((b) => !b);
|
|
1825
|
-
}, N = (b = !1) => {
|
|
1826
|
-
f(), l.current && (y.current && (l.current.removeEventListener(
|
|
1827
|
-
"ended",
|
|
1828
|
-
y.current
|
|
1829
|
-
), y.current = null), l.current.removeEventListener("error", O), l.current.removeEventListener("pause", B), l.current.pause(), l.current.currentTime = 0, l.current.src = "", l.current.load(), l.current = null), n((A) => ({
|
|
1901
|
+
}, _ = () => N(!0), T = () => s((E) => !E), N = (E = !1) => {
|
|
1902
|
+
p(), l.current && (y.current && (l.current.removeEventListener("ended", y.current), y.current = null), l.current.removeEventListener("error", O), l.current.removeEventListener("pause", k), l.current.pause(), l.current.currentTime = 0, l.current.src = "", l.current.load(), l.current = null), n((A) => ({
|
|
1830
1903
|
...A,
|
|
1831
1904
|
isPlaying: !1,
|
|
1832
1905
|
isPaused: !1,
|
|
1833
1906
|
progress: 0,
|
|
1834
1907
|
currentPNGTuber: 0
|
|
1835
|
-
})), d.current && !
|
|
1908
|
+
})), d.current && !f.current && (f.current = !0, c((A) => A + 1)), E || setTimeout(() => {
|
|
1836
1909
|
var A;
|
|
1837
|
-
(A = e.onStop) == null
|
|
1910
|
+
return (A = e.onStop) == null ? void 0 : A.call(e);
|
|
1838
1911
|
}, 50);
|
|
1839
1912
|
}, O = () => {
|
|
1840
|
-
n((
|
|
1841
|
-
...
|
|
1842
|
-
error: {
|
|
1843
|
-
type: "audio",
|
|
1844
|
-
message: "Error al reproducir el audio"
|
|
1845
|
-
}
|
|
1913
|
+
n((E) => ({
|
|
1914
|
+
...E,
|
|
1915
|
+
error: { type: "audio", message: "Error al reproducir el audio" }
|
|
1846
1916
|
})), N();
|
|
1847
|
-
},
|
|
1848
|
-
l.current && l.current.currentTime < l.current.duration && n((
|
|
1849
|
-
...b,
|
|
1850
|
-
isPlaying: !1,
|
|
1851
|
-
isPaused: !0
|
|
1852
|
-
}));
|
|
1917
|
+
}, k = () => {
|
|
1918
|
+
l.current && l.current.currentTime < l.current.duration && n((E) => ({ ...E, isPlaying: !1, isPaused: !0 }));
|
|
1853
1919
|
}, D = async () => {
|
|
1854
|
-
var A, $, Q;
|
|
1855
1920
|
if (!e.text.trim()) {
|
|
1856
|
-
n((
|
|
1857
|
-
...
|
|
1858
|
-
error: {
|
|
1859
|
-
type: "synthesis",
|
|
1860
|
-
message: "No hay contenido para reproducir"
|
|
1861
|
-
}
|
|
1921
|
+
n((E) => ({
|
|
1922
|
+
...E,
|
|
1923
|
+
error: { type: "synthesis", message: "No hay contenido para reproducir" }
|
|
1862
1924
|
}));
|
|
1863
1925
|
return;
|
|
1864
1926
|
}
|
|
1865
|
-
|
|
1866
|
-
const b = `${e.voiceId}-${e.lang ?? "auto"}-${e.model ?? "multilingual"}-${e.text}`;
|
|
1927
|
+
f.current = !1, N(!0);
|
|
1867
1928
|
try {
|
|
1868
|
-
o(!0), n((
|
|
1869
|
-
...
|
|
1929
|
+
o(!0), n((U) => ({
|
|
1930
|
+
...U,
|
|
1870
1931
|
isPlaying: !1,
|
|
1871
1932
|
progress: 0,
|
|
1872
1933
|
currentPNGTuber: 0,
|
|
1873
1934
|
error: null
|
|
1874
1935
|
}));
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
similarity_boost: e.similarityBoost ?? 0.8,
|
|
1886
|
-
style: 0,
|
|
1887
|
-
use_speaker_boost: !0
|
|
1888
|
-
}
|
|
1889
|
-
},
|
|
1890
|
-
{
|
|
1891
|
-
headers: {
|
|
1892
|
-
"xi-api-key": e.apiKey,
|
|
1893
|
-
"Content-Type": "application/json"
|
|
1894
|
-
},
|
|
1895
|
-
responseType: "blob"
|
|
1896
|
-
}
|
|
1897
|
-
)).data, L && await Lr(b, L);
|
|
1898
|
-
}
|
|
1899
|
-
if (L) {
|
|
1900
|
-
const I = URL.createObjectURL(L);
|
|
1901
|
-
l.current = new Audio(I);
|
|
1902
|
-
const J = () => {
|
|
1903
|
-
N(!1), URL.revokeObjectURL(I);
|
|
1904
|
-
};
|
|
1905
|
-
y.current = J, l.current.addEventListener("ended", J), l.current.addEventListener("error", O), l.current.addEventListener("pause", B), l.current.addEventListener("canplaythrough", async () => {
|
|
1906
|
-
var de;
|
|
1907
|
-
o(!1), n((G) => ({
|
|
1908
|
-
...G,
|
|
1909
|
-
isPlaying: !0
|
|
1910
|
-
})), m();
|
|
1911
|
-
try {
|
|
1912
|
-
await ((de = l.current) == null ? void 0 : de.play());
|
|
1913
|
-
} catch (G) {
|
|
1914
|
-
console.error("Error al iniciar reproducción:", G), n((H) => ({
|
|
1915
|
-
...H,
|
|
1916
|
-
error: {
|
|
1917
|
-
type: "audio",
|
|
1918
|
-
message: "Error al iniciar la reproducción"
|
|
1919
|
-
}
|
|
1920
|
-
})), N();
|
|
1921
|
-
}
|
|
1922
|
-
});
|
|
1923
|
-
}
|
|
1924
|
-
} catch (L) {
|
|
1925
|
-
console.error("Error al reproducir TTS:", L), n((I) => ({
|
|
1926
|
-
...I,
|
|
1936
|
+
const E = `qwen-${e.voiceId}-${e.lang ?? "auto"}-${e.text}`;
|
|
1937
|
+
let A = await tn(E);
|
|
1938
|
+
A ? console.log("[TTS] Cache hit") : (A = (await Ur.synthesizeSpeech({
|
|
1939
|
+
text: e.text,
|
|
1940
|
+
voice: e.voiceId,
|
|
1941
|
+
languageType: e.lang ?? "Spanish"
|
|
1942
|
+
})).audio, await nn(E, A)), q(A);
|
|
1943
|
+
} catch (E) {
|
|
1944
|
+
console.error("Error al reproducir TTS:", E), n((A) => ({
|
|
1945
|
+
...A,
|
|
1927
1946
|
error: {
|
|
1928
1947
|
type: "network",
|
|
1929
|
-
message: `Error en la
|
|
1948
|
+
message: `Error en la síntesis: ${E.message}`
|
|
1930
1949
|
},
|
|
1931
1950
|
isPlaying: !1
|
|
1932
|
-
})),
|
|
1933
|
-
console.error("Respuesta de error (texto):", I);
|
|
1934
|
-
try {
|
|
1935
|
-
const J = JSON.parse(I);
|
|
1936
|
-
console.error("Respuesta de error (JSON):", J);
|
|
1937
|
-
} catch {
|
|
1938
|
-
console.error("No es JSON válido");
|
|
1939
|
-
}
|
|
1940
|
-
}) : console.error("Respuesta de error:", (Q = L.response) == null ? void 0 : Q.data)) : console.error("Error inesperado:", L);
|
|
1951
|
+
})), p(), o(!1);
|
|
1941
1952
|
}
|
|
1953
|
+
}, q = (E) => {
|
|
1954
|
+
const A = URL.createObjectURL(E);
|
|
1955
|
+
l.current = new Audio(A);
|
|
1956
|
+
const U = () => {
|
|
1957
|
+
N(!1), URL.revokeObjectURL(A);
|
|
1958
|
+
};
|
|
1959
|
+
y.current = U, l.current.addEventListener("ended", U), l.current.addEventListener("error", O), l.current.addEventListener("pause", k), l.current.addEventListener("canplaythrough", async () => {
|
|
1960
|
+
var V;
|
|
1961
|
+
o(!1), n((ee) => ({ ...ee, isPlaying: !0 })), m();
|
|
1962
|
+
try {
|
|
1963
|
+
await ((V = l.current) == null ? void 0 : V.play());
|
|
1964
|
+
} catch (ee) {
|
|
1965
|
+
console.error("Error al iniciar reproducción:", ee), n((ae) => ({
|
|
1966
|
+
...ae,
|
|
1967
|
+
error: { type: "audio", message: "Error al iniciar la reproducción" }
|
|
1968
|
+
})), N();
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1942
1971
|
};
|
|
1943
1972
|
return j(() => () => {
|
|
1944
|
-
|
|
1973
|
+
p(), l.current && (l.current.pause(), l.current.src = "", l.current.load(), l.current = null);
|
|
1945
1974
|
}, []), j(() => {
|
|
1946
|
-
e.voiceId && (l.current && (l.current.pause(), l.current.src = "", l.current.load(), l.current = null),
|
|
1947
|
-
...
|
|
1975
|
+
e.voiceId && (l.current && (l.current.pause(), l.current.src = "", l.current.load(), l.current = null), p(), n((E) => ({
|
|
1976
|
+
...E,
|
|
1948
1977
|
isPlaying: !1,
|
|
1949
1978
|
isPaused: !1,
|
|
1950
1979
|
progress: 0,
|
|
@@ -1954,36 +1983,36 @@ function Cr(e) {
|
|
|
1954
1983
|
...t,
|
|
1955
1984
|
play: D,
|
|
1956
1985
|
pause: h,
|
|
1957
|
-
resume:
|
|
1958
|
-
stop:
|
|
1959
|
-
toggleAutoAdvance:
|
|
1986
|
+
resume: S,
|
|
1987
|
+
stop: _,
|
|
1988
|
+
toggleAutoAdvance: T,
|
|
1960
1989
|
isAutoAdvancing: r,
|
|
1961
1990
|
isLoadingAudio: i,
|
|
1962
1991
|
avatars: e.avatars
|
|
1963
1992
|
};
|
|
1964
1993
|
}
|
|
1965
|
-
const
|
|
1966
|
-
selectorWrapper:
|
|
1967
|
-
iconButton:
|
|
1968
|
-
dropdown:
|
|
1969
|
-
dropdownItem:
|
|
1970
|
-
active:
|
|
1971
|
-
},
|
|
1994
|
+
const Ir = "_selectorWrapper_1kmif_1", Dr = "_iconButton_1kmif_6", jr = "_dropdown_1kmif_18", Mr = "_dropdownItem_1kmif_31", $r = "_active_1kmif_44", re = {
|
|
1995
|
+
selectorWrapper: Ir,
|
|
1996
|
+
iconButton: Dr,
|
|
1997
|
+
dropdown: jr,
|
|
1998
|
+
dropdownItem: Mr,
|
|
1999
|
+
active: $r
|
|
2000
|
+
}, qr = ({
|
|
1972
2001
|
languages: e,
|
|
1973
2002
|
current: t,
|
|
1974
2003
|
onChange: n
|
|
1975
2004
|
}) => {
|
|
1976
|
-
const [r, s] =
|
|
2005
|
+
const [r, s] = v(!1), [i, o] = v(t || e[0].code), c = I(null);
|
|
1977
2006
|
return j(() => {
|
|
1978
2007
|
const l = (u) => {
|
|
1979
2008
|
c.current && !c.current.contains(u.target) && s(!1);
|
|
1980
2009
|
};
|
|
1981
2010
|
return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
|
|
1982
|
-
}, []), /* @__PURE__ */
|
|
2011
|
+
}, []), /* @__PURE__ */ F("div", { className: re.selectorWrapper, ref: c, children: [
|
|
1983
2012
|
/* @__PURE__ */ w(
|
|
1984
2013
|
"button",
|
|
1985
2014
|
{
|
|
1986
|
-
className:
|
|
2015
|
+
className: re.iconButton,
|
|
1987
2016
|
title: "Cambiar idioma",
|
|
1988
2017
|
onClick: () => s(!r),
|
|
1989
2018
|
children: /* @__PURE__ */ w(
|
|
@@ -1999,10 +2028,10 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
1999
2028
|
)
|
|
2000
2029
|
}
|
|
2001
2030
|
),
|
|
2002
|
-
r && /* @__PURE__ */ w("div", { className:
|
|
2031
|
+
r && /* @__PURE__ */ w("div", { className: re.dropdown, children: e.map((l) => /* @__PURE__ */ w(
|
|
2003
2032
|
"button",
|
|
2004
2033
|
{
|
|
2005
|
-
className: `${
|
|
2034
|
+
className: `${re.dropdownItem} ${l.code === i ? re.active : ""}`,
|
|
2006
2035
|
onClick: () => {
|
|
2007
2036
|
o(l.code), n == null || n(l.code), s(!1);
|
|
2008
2037
|
},
|
|
@@ -2011,45 +2040,45 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2011
2040
|
l.code
|
|
2012
2041
|
)) })
|
|
2013
2042
|
] });
|
|
2014
|
-
},
|
|
2015
|
-
controlsRow:
|
|
2016
|
-
select:
|
|
2017
|
-
autoAdvanceButton:
|
|
2018
|
-
section:
|
|
2019
|
-
textarea:
|
|
2020
|
-
input:
|
|
2021
|
-
error:
|
|
2022
|
-
buttonPrimary:
|
|
2023
|
-
buttonSuccess:
|
|
2024
|
-
infoBox:
|
|
2025
|
-
viewer:
|
|
2026
|
-
viewerTopBar:
|
|
2027
|
-
topRightControls:
|
|
2028
|
-
itemCounter:
|
|
2029
|
-
iconButton:
|
|
2030
|
-
navButton:
|
|
2031
|
-
navButtonLeft:
|
|
2032
|
-
navButtonRight:
|
|
2033
|
-
backgroundImage:
|
|
2034
|
-
avatar:
|
|
2035
|
-
caption:
|
|
2036
|
-
captionTitle:
|
|
2037
|
-
captionText:
|
|
2038
|
-
loadingOverlay:
|
|
2039
|
-
loadingSpinner:
|
|
2040
|
-
spin:
|
|
2041
|
-
loadingButton:
|
|
2042
|
-
spinner:
|
|
2043
|
-
progressBar:
|
|
2044
|
-
progressFill:
|
|
2045
|
-
playbackControls:
|
|
2046
|
-
playButton:
|
|
2047
|
-
pauseButton:
|
|
2048
|
-
},
|
|
2049
|
-
{ id: "
|
|
2050
|
-
|
|
2051
|
-
{ id: "
|
|
2052
|
-
], lt =
|
|
2043
|
+
}, zr = "_controlsRow_8wakc_1", Hr = "_select_8wakc_9", Vr = "_autoAdvanceButton_8wakc_15", Wr = "_section_8wakc_26", Jr = "_textarea_8wakc_36", Gr = "_input_8wakc_46", Qr = "_error_8wakc_54", Kr = "_buttonPrimary_8wakc_59", Xr = "_buttonSuccess_8wakc_69", Zr = "_infoBox_8wakc_78", Yr = "_viewer_8wakc_86", es = "_viewerTopBar_8wakc_97", ts = "_topRightControls_8wakc_110", ns = "_itemCounter_8wakc_118", rs = "_iconButton_8wakc_126", ss = "_navButton_8wakc_146", os = "_navButtonLeft_8wakc_163", is = "_navButtonRight_8wakc_167", as = "_backgroundImage_8wakc_171", cs = "_avatar_8wakc_178", ls = "_caption_8wakc_188", us = "_captionTitle_8wakc_201", ds = "_captionText_8wakc_211", fs = "_loadingOverlay_8wakc_217", ps = "_loadingSpinner_8wakc_232", hs = "_spin_8wakc_251", ms = "_loadingButton_8wakc_242", ws = "_spinner_8wakc_251", gs = "_progressBar_8wakc_264", ys = "_progressFill_8wakc_273", Es = "_playbackControls_8wakc_279", bs = "_playButton_8wakc_292", Ts = "_pauseButton_8wakc_293", R = {
|
|
2044
|
+
controlsRow: zr,
|
|
2045
|
+
select: Hr,
|
|
2046
|
+
autoAdvanceButton: Vr,
|
|
2047
|
+
section: Wr,
|
|
2048
|
+
textarea: Jr,
|
|
2049
|
+
input: Gr,
|
|
2050
|
+
error: Qr,
|
|
2051
|
+
buttonPrimary: Kr,
|
|
2052
|
+
buttonSuccess: Xr,
|
|
2053
|
+
infoBox: Zr,
|
|
2054
|
+
viewer: Yr,
|
|
2055
|
+
viewerTopBar: es,
|
|
2056
|
+
topRightControls: ts,
|
|
2057
|
+
itemCounter: ns,
|
|
2058
|
+
iconButton: rs,
|
|
2059
|
+
navButton: ss,
|
|
2060
|
+
navButtonLeft: os,
|
|
2061
|
+
navButtonRight: is,
|
|
2062
|
+
backgroundImage: as,
|
|
2063
|
+
avatar: cs,
|
|
2064
|
+
caption: ls,
|
|
2065
|
+
captionTitle: us,
|
|
2066
|
+
captionText: ds,
|
|
2067
|
+
loadingOverlay: fs,
|
|
2068
|
+
loadingSpinner: ps,
|
|
2069
|
+
spin: hs,
|
|
2070
|
+
loadingButton: ms,
|
|
2071
|
+
spinner: ws,
|
|
2072
|
+
progressBar: gs,
|
|
2073
|
+
progressFill: ys,
|
|
2074
|
+
playbackControls: Es,
|
|
2075
|
+
playButton: bs,
|
|
2076
|
+
pauseButton: Ts
|
|
2077
|
+
}, Ss = [
|
|
2078
|
+
{ id: "Ebona", name: "Voz Mujer" },
|
|
2079
|
+
{ id: "Bodega", name: "Voz Hombre" },
|
|
2080
|
+
{ id: "Peter", name: "Voz Narrador" }
|
|
2081
|
+
], lt = Fe.DEFAULT_IMAGE_URL, Hs = ({
|
|
2053
2082
|
heritageItems: e = [],
|
|
2054
2083
|
targetLanguage: t = "es",
|
|
2055
2084
|
descriptionLength: n = "extended",
|
|
@@ -2057,15 +2086,15 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2057
2086
|
voiceIds: s = [],
|
|
2058
2087
|
avatars: i = []
|
|
2059
2088
|
}) => {
|
|
2060
|
-
const [o] =
|
|
2089
|
+
const [o] = v(e), [c, l] = v(0), [u, d] = v(n), [f, y] = v(
|
|
2061
2090
|
t
|
|
2062
|
-
), [
|
|
2091
|
+
), [b, p] = v(""), [m, h] = v([]), [S, _] = v(0), [T, N] = v(r), [O, k] = v(!1), [D, q] = v(
|
|
2063
2092
|
s.length > 0 ? s[0] : ""
|
|
2064
|
-
),
|
|
2093
|
+
), E = D || (s.length > 0 ? s[c % s.length] : ""), A = i[c % i.length], [U, V] = v(!1), [ee, ae] = v(!1), [Ft, ce] = v(!0), W = I(null), $e = I(T), qe = I(c), _e = I(o), J = I(null), le = I(!1);
|
|
2065
2094
|
j(() => {
|
|
2066
|
-
$e.current =
|
|
2067
|
-
}, [
|
|
2068
|
-
const
|
|
2095
|
+
$e.current = T, qe.current = c, _e.current = o;
|
|
2096
|
+
}, [T, c, o]);
|
|
2097
|
+
const X = o[c] || {
|
|
2069
2098
|
id: "default",
|
|
2070
2099
|
name: "Patrimonio Cultural",
|
|
2071
2100
|
description: {
|
|
@@ -2076,100 +2105,145 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2076
2105
|
},
|
|
2077
2106
|
imageUrl: ""
|
|
2078
2107
|
}, {
|
|
2079
|
-
isPlaying:
|
|
2080
|
-
isPaused:
|
|
2108
|
+
isPlaying: H,
|
|
2109
|
+
isPaused: ze,
|
|
2081
2110
|
isLoadingAudio: It,
|
|
2082
|
-
progress:
|
|
2083
|
-
play:
|
|
2084
|
-
pause:
|
|
2085
|
-
resume:
|
|
2086
|
-
stop:
|
|
2087
|
-
} =
|
|
2088
|
-
text:
|
|
2089
|
-
lang:
|
|
2111
|
+
progress: He,
|
|
2112
|
+
play: Dt,
|
|
2113
|
+
pause: jt,
|
|
2114
|
+
resume: Mt,
|
|
2115
|
+
stop: $t
|
|
2116
|
+
} = Fr({
|
|
2117
|
+
text: b,
|
|
2118
|
+
lang: f,
|
|
2090
2119
|
onStop: () => {
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
const
|
|
2094
|
-
l(
|
|
2095
|
-
}, 100),
|
|
2120
|
+
ce(!0), $e.current && _e.current.length > 1 && !le.current && setTimeout(() => {
|
|
2121
|
+
k(!0);
|
|
2122
|
+
const x = (qe.current + 1) % _e.current.length;
|
|
2123
|
+
l(x);
|
|
2124
|
+
}, 100), le.current = !1;
|
|
2096
2125
|
},
|
|
2097
|
-
voiceId:
|
|
2098
|
-
avatars: [
|
|
2099
|
-
apiKey: ae.ELEVENLABS_API_KEY
|
|
2126
|
+
voiceId: E,
|
|
2127
|
+
avatars: [A]
|
|
2100
2128
|
});
|
|
2101
2129
|
j(() => {
|
|
2102
|
-
if (O &&
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2130
|
+
if (O && b && !b.includes("JSON válido")) {
|
|
2131
|
+
const x = setTimeout(() => {
|
|
2132
|
+
H || Ve(), k(!1);
|
|
2105
2133
|
}, 500);
|
|
2106
|
-
return () => clearTimeout(
|
|
2134
|
+
return () => clearTimeout(x);
|
|
2107
2135
|
}
|
|
2108
|
-
}, [O,
|
|
2136
|
+
}, [O, b, H]), j(() => {
|
|
2109
2137
|
(async () => {
|
|
2110
|
-
const z =
|
|
2138
|
+
const z = X.description.local[u];
|
|
2111
2139
|
if (z)
|
|
2112
2140
|
try {
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2115
|
-
} catch (
|
|
2116
|
-
console.error("Error en traducción:",
|
|
2141
|
+
const te = await Qe(X.name, f), Gt = await Qe(z, f);
|
|
2142
|
+
p(`${te}. ${Gt}`);
|
|
2143
|
+
} catch (te) {
|
|
2144
|
+
console.error("Error en traducción:", te), p(`${X.name}. ${z}`);
|
|
2117
2145
|
}
|
|
2118
2146
|
})();
|
|
2119
|
-
}, [
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2122
|
-
|
|
2147
|
+
}, [X, u, f]);
|
|
2148
|
+
const Re = () => {
|
|
2149
|
+
ce(!0), J.current && clearTimeout(J.current), J.current = setTimeout(() => {
|
|
2150
|
+
ce(!1);
|
|
2123
2151
|
}, 4e3);
|
|
2124
2152
|
}, Ve = () => {
|
|
2125
|
-
if (!
|
|
2153
|
+
if (!b.trim() || b.includes("JSON válido")) {
|
|
2126
2154
|
alert("No hay contenido para reproducir");
|
|
2127
2155
|
return;
|
|
2128
2156
|
}
|
|
2129
|
-
|
|
2130
|
-
}, $t = () => {
|
|
2131
|
-
Dt();
|
|
2157
|
+
Dt(), Re();
|
|
2132
2158
|
}, qt = () => {
|
|
2133
|
-
jt()
|
|
2134
|
-
}, Je = () => {
|
|
2135
|
-
Mt(), B(!1), H.current && clearTimeout(H.current), K.current && clearTimeout(K.current), G(!0);
|
|
2136
|
-
}, Ht = () => {
|
|
2137
|
-
fe.current = !0, Je(), c > 0 && l((v) => v - 1);
|
|
2159
|
+
jt();
|
|
2138
2160
|
}, zt = () => {
|
|
2139
|
-
|
|
2161
|
+
Mt(), Re();
|
|
2162
|
+
}, We = () => {
|
|
2163
|
+
$t(), k(!1), W.current && clearTimeout(W.current), J.current && clearTimeout(J.current), ce(!0);
|
|
2164
|
+
}, Ht = () => {
|
|
2165
|
+
le.current = !0, We(), c > 0 && l((x) => x - 1);
|
|
2166
|
+
}, Vt = () => {
|
|
2167
|
+
le.current = !0, We(), c < o.length - 1 && l((x) => x + 1);
|
|
2140
2168
|
};
|
|
2141
2169
|
j(() => () => {
|
|
2142
|
-
|
|
2170
|
+
W.current && clearTimeout(W.current), J.current && clearTimeout(J.current);
|
|
2143
2171
|
}, []), j(() => {
|
|
2144
|
-
if (
|
|
2145
|
-
const
|
|
2146
|
-
h(
|
|
2172
|
+
if (b) {
|
|
2173
|
+
const x = b.split(new RegExp("(?<=[.!?])\\s+", "g")).map((z) => z.trim()).filter((z) => z.length > 0);
|
|
2174
|
+
h(x), _(0);
|
|
2147
2175
|
}
|
|
2148
|
-
}, [
|
|
2149
|
-
if (!
|
|
2150
|
-
|
|
2151
|
-
const z = 1500 + m[
|
|
2152
|
-
|
|
2153
|
-
|
|
2176
|
+
}, [b]), j(() => {
|
|
2177
|
+
if (!H || m.length === 0) return;
|
|
2178
|
+
W.current && clearTimeout(W.current);
|
|
2179
|
+
const z = 1500 + m[S].length * 50;
|
|
2180
|
+
W.current = setTimeout(() => {
|
|
2181
|
+
_((te) => (te + 1) % m.length);
|
|
2154
2182
|
}, z);
|
|
2155
|
-
}, [
|
|
2156
|
-
const [
|
|
2183
|
+
}, [H, m, S]);
|
|
2184
|
+
const [Je, Wt] = v(!1), Jt = (x) => {
|
|
2185
|
+
q(x), Wt(!0);
|
|
2186
|
+
};
|
|
2157
2187
|
return j(() => {
|
|
2158
|
-
!
|
|
2159
|
-
}, [c, s,
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2188
|
+
!Je && s.length > 0 && q(s[c % s.length]);
|
|
2189
|
+
}, [c, s, Je]), /* @__PURE__ */ F("div", { children: [
|
|
2190
|
+
/* @__PURE__ */ F("div", { className: R.controlsRow, children: [
|
|
2191
|
+
/* @__PURE__ */ F(
|
|
2192
|
+
"select",
|
|
2193
|
+
{
|
|
2194
|
+
value: u,
|
|
2195
|
+
onChange: (x) => d(x.target.value),
|
|
2196
|
+
className: R.select,
|
|
2197
|
+
children: [
|
|
2198
|
+
/* @__PURE__ */ w("option", { value: "short", children: "Descripción Corta" }),
|
|
2199
|
+
/* @__PURE__ */ w("option", { value: "extended", children: "Descripción Extendida" })
|
|
2200
|
+
]
|
|
2201
|
+
}
|
|
2202
|
+
),
|
|
2203
|
+
/* @__PURE__ */ F(
|
|
2204
|
+
"select",
|
|
2205
|
+
{
|
|
2206
|
+
value: f,
|
|
2207
|
+
onChange: (x) => y(x.target.value),
|
|
2208
|
+
className: R.select,
|
|
2209
|
+
children: [
|
|
2210
|
+
/* @__PURE__ */ w("option", { value: "en", children: "Inglés" }),
|
|
2211
|
+
/* @__PURE__ */ w("option", { value: "es", children: "Español" }),
|
|
2212
|
+
/* @__PURE__ */ w("option", { value: "fr", children: "Francés" })
|
|
2213
|
+
]
|
|
2214
|
+
}
|
|
2215
|
+
),
|
|
2216
|
+
/* @__PURE__ */ w(
|
|
2217
|
+
"select",
|
|
2218
|
+
{
|
|
2219
|
+
value: E,
|
|
2220
|
+
onChange: (x) => Jt(x.target.value),
|
|
2221
|
+
className: R.select,
|
|
2222
|
+
children: Ss.map((x) => /* @__PURE__ */ w("option", { value: x.id, children: x.name }, x.id))
|
|
2223
|
+
}
|
|
2224
|
+
),
|
|
2225
|
+
/* @__PURE__ */ w(
|
|
2226
|
+
"button",
|
|
2227
|
+
{
|
|
2228
|
+
onClick: () => N(!T),
|
|
2229
|
+
className: R.autoAdvanceButton,
|
|
2230
|
+
style: { backgroundColor: T ? "#34a853" : "#ea4335" },
|
|
2231
|
+
children: T ? "⏩ AUTO ON" : "⏩ AUTO OFF"
|
|
2232
|
+
}
|
|
2233
|
+
)
|
|
2234
|
+
] }),
|
|
2235
|
+
/* @__PURE__ */ F("div", { className: R.viewer, onClick: Re, children: [
|
|
2236
|
+
/* @__PURE__ */ F("div", { className: R.viewerTopBar, children: [
|
|
2237
|
+
/* @__PURE__ */ w("div", { className: R.itemCounter, children: o.length > 0 ? `${c + 1}/${o.length}` : "0/0" }),
|
|
2238
|
+
/* @__PURE__ */ F("div", { className: R.topRightControls, children: [
|
|
2165
2239
|
/* @__PURE__ */ w(
|
|
2166
2240
|
"button",
|
|
2167
2241
|
{
|
|
2168
|
-
onClick: () => N(!
|
|
2169
|
-
className:
|
|
2242
|
+
onClick: () => N(!T),
|
|
2243
|
+
className: R.iconButton,
|
|
2170
2244
|
title: "Autoplay",
|
|
2171
2245
|
style: {
|
|
2172
|
-
backgroundColor:
|
|
2246
|
+
backgroundColor: T ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)"
|
|
2173
2247
|
},
|
|
2174
2248
|
children: /* @__PURE__ */ w(
|
|
2175
2249
|
"svg",
|
|
@@ -2181,7 +2255,7 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2181
2255
|
children: /* @__PURE__ */ w(
|
|
2182
2256
|
"path",
|
|
2183
2257
|
{
|
|
2184
|
-
style: { fill:
|
|
2258
|
+
style: { fill: T ? "black" : "white" },
|
|
2185
2259
|
d: "M5.23331,0.493645 C6.8801,-0.113331 8.6808,-0.161915 10.3579,0.355379 C11.4019,0.6773972 12.361984,1.20757325 13.1838415,1.90671757 L13.4526,2.14597 L14.2929,1.30564 C14.8955087,0.703065739 15.9071843,1.0850774 15.994017,1.89911843 L16,2.01275 L16,6.00002 L12.0127,6.00002 C11.1605348,6.00002 10.7153321,5.01450817 11.2294893,4.37749065 L11.3056,4.29291 L12.0372,3.56137 C11.389,2.97184 10.6156,2.52782 9.76845,2.26653 C8.5106,1.87856 7.16008,1.915 5.92498,2.37023 C4.68989,2.82547 3.63877,3.67423 2.93361,4.78573 C2.22844,5.89723 1.90836,7.20978 2.02268,8.52112 C2.13701,9.83246 2.6794,11.0698 3.56627,12.0425 C4.45315,13.0152 5.63528,13.6693 6.93052,13.9039 C8.22576,14.1385 9.56221,13.9407 10.7339,13.3409 C11.9057,12.7412 12.8476,11.7727 13.4147,10.5848 C13.6526,10.0864 14.2495,9.8752 14.748,10.1131 C15.2464,10.351 15.4575,10.948 15.2196,11.4464 C14.4635,13.0302 13.2076,14.3215 11.6453,15.1213 C10.0829,15.921 8.30101,16.1847 6.57402,15.8719 C4.84704,15.559 3.27086,14.687 2.08836,13.39 C0.905861,12.0931 0.182675,10.4433 0.0302394,8.69483 C-0.122195,6.94637 0.304581,5.1963 1.2448,3.7143 C2.18503,2.2323 3.58652,1.10062 5.23331,0.493645 Z M6,5.46077 C6,5.09472714 6.37499031,4.86235811 6.69509872,5.0000726 L6.7678,5.03853 L10.7714,7.57776 C11.0528545,7.75626909 11.0784413,8.14585256 10.8481603,8.36273881 L10.7714,8.42224 L6.7678,10.9615 C6.45867857,11.1575214 6.06160816,10.965274 6.00646097,10.6211914 L6,10.5392 L6,5.46077 Z"
|
|
2186
2260
|
}
|
|
2187
2261
|
)
|
|
@@ -2190,7 +2264,7 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2190
2264
|
}
|
|
2191
2265
|
),
|
|
2192
2266
|
/* @__PURE__ */ w(
|
|
2193
|
-
|
|
2267
|
+
qr,
|
|
2194
2268
|
{
|
|
2195
2269
|
languages: [
|
|
2196
2270
|
{ code: "es", label: "Español" },
|
|
@@ -2198,7 +2272,7 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2198
2272
|
{ code: "fr", label: "Français" }
|
|
2199
2273
|
],
|
|
2200
2274
|
current: "es",
|
|
2201
|
-
onChange: (
|
|
2275
|
+
onChange: (x) => y(x)
|
|
2202
2276
|
}
|
|
2203
2277
|
)
|
|
2204
2278
|
] })
|
|
@@ -2208,10 +2282,10 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2208
2282
|
{
|
|
2209
2283
|
onClick: Ht,
|
|
2210
2284
|
disabled: o.length === 0,
|
|
2211
|
-
className: `${
|
|
2285
|
+
className: `${R.navButton} ${R.navButtonLeft}`,
|
|
2212
2286
|
title: "Anterior",
|
|
2213
|
-
onMouseOver: () =>
|
|
2214
|
-
onMouseOut: () =>
|
|
2287
|
+
onMouseOver: () => V(!0),
|
|
2288
|
+
onMouseOut: () => V(!1),
|
|
2215
2289
|
children: /* @__PURE__ */ w(
|
|
2216
2290
|
"svg",
|
|
2217
2291
|
{
|
|
@@ -2228,7 +2302,7 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2228
2302
|
width: "24px",
|
|
2229
2303
|
height: "24px",
|
|
2230
2304
|
transition: "transform 0.2s ease-in-out",
|
|
2231
|
-
transform:
|
|
2305
|
+
transform: U ? "scale(1.5)" : "scale(1)"
|
|
2232
2306
|
},
|
|
2233
2307
|
children: /* @__PURE__ */ w("path", { d: "M15 18l-6-6 6-6" })
|
|
2234
2308
|
}
|
|
@@ -2238,12 +2312,12 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2238
2312
|
/* @__PURE__ */ w(
|
|
2239
2313
|
"button",
|
|
2240
2314
|
{
|
|
2241
|
-
onClick:
|
|
2315
|
+
onClick: Vt,
|
|
2242
2316
|
disabled: o.length === 0,
|
|
2243
|
-
className: `${
|
|
2317
|
+
className: `${R.navButton} ${R.navButtonRight}`,
|
|
2244
2318
|
title: "Siguiente",
|
|
2245
|
-
onMouseOver: () =>
|
|
2246
|
-
onMouseOut: () =>
|
|
2319
|
+
onMouseOver: () => ae(!0),
|
|
2320
|
+
onMouseOut: () => ae(!1),
|
|
2247
2321
|
children: /* @__PURE__ */ w(
|
|
2248
2322
|
"svg",
|
|
2249
2323
|
{
|
|
@@ -2260,7 +2334,7 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2260
2334
|
width: "24px",
|
|
2261
2335
|
height: "24px",
|
|
2262
2336
|
transition: "transform 0.2s ease-in-out",
|
|
2263
|
-
transform:
|
|
2337
|
+
transform: ee ? "scale(1.5)" : "scale(1)"
|
|
2264
2338
|
},
|
|
2265
2339
|
children: /* @__PURE__ */ w("path", { d: "M9 6l6 6-6 6" })
|
|
2266
2340
|
}
|
|
@@ -2270,36 +2344,36 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2270
2344
|
/* @__PURE__ */ w(
|
|
2271
2345
|
"img",
|
|
2272
2346
|
{
|
|
2273
|
-
src:
|
|
2347
|
+
src: X.imageUrl || lt,
|
|
2274
2348
|
alt: "Background",
|
|
2275
|
-
className:
|
|
2276
|
-
style: { opacity:
|
|
2277
|
-
onError: (
|
|
2349
|
+
className: R.backgroundImage,
|
|
2350
|
+
style: { opacity: H ? 1 : 0.7 },
|
|
2351
|
+
onError: (x) => x.currentTarget.src = lt
|
|
2278
2352
|
}
|
|
2279
2353
|
),
|
|
2280
|
-
|
|
2354
|
+
H && /* @__PURE__ */ w(Ge, { children: /* @__PURE__ */ w(
|
|
2281
2355
|
"img",
|
|
2282
2356
|
{
|
|
2283
|
-
src:
|
|
2357
|
+
src: A,
|
|
2284
2358
|
alt: "Avatar",
|
|
2285
|
-
className:
|
|
2286
|
-
style: { transform: `scale(${
|
|
2359
|
+
className: R.avatar,
|
|
2360
|
+
style: { transform: `scale(${He % 10 < 5 ? 4 : 4.05})` }
|
|
2287
2361
|
}
|
|
2288
2362
|
) }),
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
/* @__PURE__ */ w("h4", { className:
|
|
2291
|
-
|
|
2363
|
+
/* @__PURE__ */ F("div", { className: R.caption, children: [
|
|
2364
|
+
/* @__PURE__ */ w("h4", { className: R.captionTitle, children: X.name }),
|
|
2365
|
+
H && /* @__PURE__ */ w(Ge, { children: /* @__PURE__ */ w("p", { className: R.captionText, children: m.length > 0 && m[S] }) })
|
|
2292
2366
|
] }),
|
|
2293
|
-
O && /* @__PURE__ */
|
|
2294
|
-
/* @__PURE__ */ w("div", { className:
|
|
2367
|
+
O && /* @__PURE__ */ F("div", { className: R.loadingOverlay, children: [
|
|
2368
|
+
/* @__PURE__ */ w("div", { className: R.loadingSpinner }),
|
|
2295
2369
|
/* @__PURE__ */ w("p", { children: "Cargando siguiente patrimonio..." })
|
|
2296
2370
|
] }),
|
|
2297
|
-
|
|
2371
|
+
Ft && /* @__PURE__ */ w("div", { className: R.playbackControls, children: It ? (
|
|
2298
2372
|
// Loading spinner
|
|
2299
|
-
/* @__PURE__ */ w("button", { disabled: !0, className:
|
|
2373
|
+
/* @__PURE__ */ w("button", { disabled: !0, className: R.loadingButton, children: /* @__PURE__ */ F(
|
|
2300
2374
|
"svg",
|
|
2301
2375
|
{
|
|
2302
|
-
className:
|
|
2376
|
+
className: R.spinner,
|
|
2303
2377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2304
2378
|
fill: "none",
|
|
2305
2379
|
viewBox: "0 0 24 24",
|
|
@@ -2326,14 +2400,14 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2326
2400
|
]
|
|
2327
2401
|
}
|
|
2328
2402
|
) })
|
|
2329
|
-
) : !
|
|
2403
|
+
) : !H && !ze ? (
|
|
2330
2404
|
// Play (desde cero)
|
|
2331
2405
|
/* @__PURE__ */ w(
|
|
2332
2406
|
"button",
|
|
2333
2407
|
{
|
|
2334
2408
|
onClick: Ve,
|
|
2335
2409
|
disabled: o.length === 0 || O,
|
|
2336
|
-
className:
|
|
2410
|
+
className: R.playButton,
|
|
2337
2411
|
children: /* @__PURE__ */ w(
|
|
2338
2412
|
"svg",
|
|
2339
2413
|
{
|
|
@@ -2351,9 +2425,9 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2351
2425
|
)
|
|
2352
2426
|
}
|
|
2353
2427
|
)
|
|
2354
|
-
) :
|
|
2428
|
+
) : ze ? (
|
|
2355
2429
|
// Resume
|
|
2356
|
-
/* @__PURE__ */ w("button", { onClick:
|
|
2430
|
+
/* @__PURE__ */ w("button", { onClick: zt, className: R.playButton, children: /* @__PURE__ */ w(
|
|
2357
2431
|
"svg",
|
|
2358
2432
|
{
|
|
2359
2433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2370,7 +2444,7 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2370
2444
|
) })
|
|
2371
2445
|
) : (
|
|
2372
2446
|
// Pause
|
|
2373
|
-
/* @__PURE__ */ w("button", { onClick:
|
|
2447
|
+
/* @__PURE__ */ w("button", { onClick: qt, className: R.pauseButton, children: /* @__PURE__ */ F(
|
|
2374
2448
|
"svg",
|
|
2375
2449
|
{
|
|
2376
2450
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2389,21 +2463,21 @@ const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdo
|
|
|
2389
2463
|
}
|
|
2390
2464
|
) })
|
|
2391
2465
|
) }),
|
|
2392
|
-
/* @__PURE__ */ w("div", { className:
|
|
2466
|
+
/* @__PURE__ */ w("div", { className: R.progressBar, children: /* @__PURE__ */ w(
|
|
2393
2467
|
"div",
|
|
2394
2468
|
{
|
|
2395
|
-
className:
|
|
2396
|
-
style: { width: `${
|
|
2469
|
+
className: R.progressFill,
|
|
2470
|
+
style: { width: `${He}%` }
|
|
2397
2471
|
}
|
|
2398
2472
|
) })
|
|
2399
2473
|
] })
|
|
2400
2474
|
] });
|
|
2401
2475
|
};
|
|
2402
2476
|
export {
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2477
|
+
qr as LanguageSelector,
|
|
2478
|
+
re as LanguageSelectorStyles,
|
|
2479
|
+
Hs as StoryVisualizer,
|
|
2480
|
+
R as StoryVisualizerStyles,
|
|
2481
|
+
Ss as voices
|
|
2408
2482
|
};
|
|
2409
2483
|
//# sourceMappingURL=ocity-heritage-visualizer.es.js.map
|