@feedmepos/mf-media 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AssetLibrary-90b9985d.js +4193 -0
- package/dist/app.js +30 -30
- package/dist/src/app.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/AssetLibrary-df59d8b3.js +0 -3755
|
@@ -1,3755 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Se, resolveComponent as M, openBlock as P, createElementBlock as T, toDisplayString as k, unref as O, createElementVNode as h, Fragment as ee, renderList as we, normalizeClass as ue, withModifiers as at, createBlock as Q, createCommentVNode as H, createVNode as N, ref as L, withDirectives as En, withKeys as kn, vModelText as Pn, computed as Oe, withCtx as ae, createTextVNode as be, watch as ye, onMounted as On } from "vue";
|
|
2
|
-
import { useI18n as Ee, useCoreStore as Gt } from "@feedmepos/mf-common";
|
|
3
|
-
import { useDialog as Ht } from "@feedmepos/ui-library";
|
|
4
|
-
function Jt(e, t) {
|
|
5
|
-
return function() {
|
|
6
|
-
return e.apply(t, arguments);
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
const { toString: Rn } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: je, toStringTag: Wt } = Symbol, He = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ue = (e, t) => {
|
|
10
|
-
let n = e;
|
|
11
|
-
const a = [];
|
|
12
|
-
for (; n != null && n !== Object.prototype; ) {
|
|
13
|
-
if (a.indexOf(n) !== -1)
|
|
14
|
-
return !1;
|
|
15
|
-
if (a.push(n), He(n, t))
|
|
16
|
-
return !0;
|
|
17
|
-
n = Re(n);
|
|
18
|
-
}
|
|
19
|
-
return !1;
|
|
20
|
-
}, Tn = (e, t) => e != null && Ue(e, t) ? e[t] : void 0, ft = ((e) => (t) => {
|
|
21
|
-
const n = Rn.call(t);
|
|
22
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
23
|
-
})(/* @__PURE__ */ Object.create(null)), te = (e) => (e = e.toLowerCase(), (t) => ft(t) === e), Xe = (e) => (t) => typeof t === e, { isArray: ve } = Array, Te = Xe("undefined");
|
|
24
|
-
function _e(e) {
|
|
25
|
-
return e !== null && !Te(e) && e.constructor !== null && !Te(e.constructor) && W(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
26
|
-
}
|
|
27
|
-
const Kt = te("ArrayBuffer");
|
|
28
|
-
function _n(e) {
|
|
29
|
-
let t;
|
|
30
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Kt(e.buffer), t;
|
|
31
|
-
}
|
|
32
|
-
const An = Xe("string"), W = Xe("function"), Xt = Xe("number"), Ae = (e) => e !== null && typeof e == "object", Bn = (e) => e === !0 || e === !1, Ve = (e) => {
|
|
33
|
-
if (!Ae(e))
|
|
34
|
-
return !1;
|
|
35
|
-
const t = Re(e);
|
|
36
|
-
return (t === null || t === Object.prototype || Re(t) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
37
|
-
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
38
|
-
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
39
|
-
!Ue(e, Wt) && !Ue(e, je);
|
|
40
|
-
}, Cn = (e) => {
|
|
41
|
-
if (!Ae(e) || _e(e))
|
|
42
|
-
return !1;
|
|
43
|
-
try {
|
|
44
|
-
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
45
|
-
} catch {
|
|
46
|
-
return !1;
|
|
47
|
-
}
|
|
48
|
-
}, Dn = te("Date"), Nn = te("File"), Fn = (e) => !!(e && typeof e.uri < "u"), Ln = (e) => e && typeof e.getParts < "u", Un = te("Blob"), jn = te("FileList"), Mn = (e) => Ae(e) && W(e.pipe);
|
|
49
|
-
function In() {
|
|
50
|
-
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
51
|
-
}
|
|
52
|
-
const Rt = In(), Tt = typeof Rt.FormData < "u" ? Rt.FormData : void 0, zn = (e) => {
|
|
53
|
-
if (!e)
|
|
54
|
-
return !1;
|
|
55
|
-
if (Tt && e instanceof Tt)
|
|
56
|
-
return !0;
|
|
57
|
-
const t = Re(e);
|
|
58
|
-
if (!t || t === Object.prototype || !W(e.append))
|
|
59
|
-
return !1;
|
|
60
|
-
const n = ft(e);
|
|
61
|
-
return n === "formdata" || // detect form-data instance
|
|
62
|
-
n === "object" && W(e.toString) && e.toString() === "[object FormData]";
|
|
63
|
-
}, Vn = te("URLSearchParams"), [qn, $n, Gn, Hn] = [
|
|
64
|
-
"ReadableStream",
|
|
65
|
-
"Request",
|
|
66
|
-
"Response",
|
|
67
|
-
"Headers"
|
|
68
|
-
].map(te), Jn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
69
|
-
function Me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
70
|
-
if (e === null || typeof e > "u")
|
|
71
|
-
return;
|
|
72
|
-
let a, o;
|
|
73
|
-
if (typeof e != "object" && (e = [e]), ve(e))
|
|
74
|
-
for (a = 0, o = e.length; a < o; a++)
|
|
75
|
-
t.call(null, e[a], a, e);
|
|
76
|
-
else {
|
|
77
|
-
if (_e(e))
|
|
78
|
-
return;
|
|
79
|
-
const r = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = r.length;
|
|
80
|
-
let i;
|
|
81
|
-
for (a = 0; a < s; a++)
|
|
82
|
-
i = r[a], t.call(null, e[i], i, e);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function Qt(e, t) {
|
|
86
|
-
if (_e(e))
|
|
87
|
-
return null;
|
|
88
|
-
t = t.toLowerCase();
|
|
89
|
-
const n = Object.keys(e);
|
|
90
|
-
let a = n.length, o;
|
|
91
|
-
for (; a-- > 0; )
|
|
92
|
-
if (o = n[a], t === o.toLowerCase())
|
|
93
|
-
return o;
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
const he = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Zt = (e) => !Te(e) && e !== he;
|
|
97
|
-
function lt(...e) {
|
|
98
|
-
const { caseless: t, skipUndefined: n } = Zt(this) && this || {}, a = {}, o = (r, s) => {
|
|
99
|
-
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
100
|
-
return;
|
|
101
|
-
const i = t && typeof s == "string" && Qt(a, s) || s, u = He(a, i) ? a[i] : void 0;
|
|
102
|
-
Ve(u) && Ve(r) ? a[i] = lt(u, r) : Ve(r) ? a[i] = lt({}, r) : ve(r) ? a[i] = r.slice() : (!n || !Te(r)) && (a[i] = r);
|
|
103
|
-
};
|
|
104
|
-
for (let r = 0, s = e.length; r < s; r++) {
|
|
105
|
-
const i = e[r];
|
|
106
|
-
if (!i || _e(i) || (Me(i, o), typeof i != "object" || ve(i)))
|
|
107
|
-
continue;
|
|
108
|
-
const u = Object.getOwnPropertySymbols(i);
|
|
109
|
-
for (let p = 0; p < u.length; p++) {
|
|
110
|
-
const d = u[p];
|
|
111
|
-
ra.call(i, d) && o(i[d], d);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return a;
|
|
115
|
-
}
|
|
116
|
-
const Wn = (e, t, n, { allOwnKeys: a } = {}) => (Me(
|
|
117
|
-
t,
|
|
118
|
-
(o, r) => {
|
|
119
|
-
n && W(o) ? Object.defineProperty(e, r, {
|
|
120
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
121
|
-
// hijack defineProperty's accessor-vs-data resolution.
|
|
122
|
-
__proto__: null,
|
|
123
|
-
value: Jt(o, n),
|
|
124
|
-
writable: !0,
|
|
125
|
-
enumerable: !0,
|
|
126
|
-
configurable: !0
|
|
127
|
-
}) : Object.defineProperty(e, r, {
|
|
128
|
-
__proto__: null,
|
|
129
|
-
value: o,
|
|
130
|
-
writable: !0,
|
|
131
|
-
enumerable: !0,
|
|
132
|
-
configurable: !0
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
{ allOwnKeys: a }
|
|
136
|
-
), e), Kn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Xn = (e, t, n, a) => {
|
|
137
|
-
e.prototype = Object.create(t.prototype, a), Object.defineProperty(e.prototype, "constructor", {
|
|
138
|
-
__proto__: null,
|
|
139
|
-
value: e,
|
|
140
|
-
writable: !0,
|
|
141
|
-
enumerable: !1,
|
|
142
|
-
configurable: !0
|
|
143
|
-
}), Object.defineProperty(e, "super", {
|
|
144
|
-
__proto__: null,
|
|
145
|
-
value: t.prototype
|
|
146
|
-
}), n && Object.assign(e.prototype, n);
|
|
147
|
-
}, Qn = (e, t, n, a) => {
|
|
148
|
-
let o, r, s;
|
|
149
|
-
const i = {};
|
|
150
|
-
if (t = t || {}, e == null)
|
|
151
|
-
return t;
|
|
152
|
-
do {
|
|
153
|
-
for (o = Object.getOwnPropertyNames(e), r = o.length; r-- > 0; )
|
|
154
|
-
s = o[r], (!a || a(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0);
|
|
155
|
-
e = n !== !1 && Re(e);
|
|
156
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
157
|
-
return t;
|
|
158
|
-
}, Zn = (e, t, n) => {
|
|
159
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
160
|
-
const a = e.indexOf(t, n);
|
|
161
|
-
return a !== -1 && a === n;
|
|
162
|
-
}, Yn = (e) => {
|
|
163
|
-
if (!e)
|
|
164
|
-
return null;
|
|
165
|
-
if (ve(e))
|
|
166
|
-
return e;
|
|
167
|
-
let t = e.length;
|
|
168
|
-
if (!Xt(t))
|
|
169
|
-
return null;
|
|
170
|
-
const n = new Array(t);
|
|
171
|
-
for (; t-- > 0; )
|
|
172
|
-
n[t] = e[t];
|
|
173
|
-
return n;
|
|
174
|
-
}, ea = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Re(Uint8Array)), ta = (e, t) => {
|
|
175
|
-
const n = (e && e[je]).call(e);
|
|
176
|
-
let a;
|
|
177
|
-
for (; (a = n.next()) && !a.done; ) {
|
|
178
|
-
const o = a.value;
|
|
179
|
-
t.call(e, o[0], o[1]);
|
|
180
|
-
}
|
|
181
|
-
}, na = (e, t) => {
|
|
182
|
-
let n;
|
|
183
|
-
const a = [];
|
|
184
|
-
for (; (n = e.exec(t)) !== null; )
|
|
185
|
-
a.push(n);
|
|
186
|
-
return a;
|
|
187
|
-
}, aa = te("HTMLFormElement"), oa = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, n, a) {
|
|
188
|
-
return n.toUpperCase() + a;
|
|
189
|
-
}), { propertyIsEnumerable: ra } = Object.prototype, sa = te("RegExp"), Yt = (e, t) => {
|
|
190
|
-
const n = Object.getOwnPropertyDescriptors(e), a = {};
|
|
191
|
-
Me(n, (o, r) => {
|
|
192
|
-
let s;
|
|
193
|
-
(s = t(o, r, e)) !== !1 && (a[r] = s || o);
|
|
194
|
-
}), Object.defineProperties(e, a);
|
|
195
|
-
}, ia = (e) => {
|
|
196
|
-
Yt(e, (t, n) => {
|
|
197
|
-
if (W(e) && ["arguments", "caller", "callee"].includes(n))
|
|
198
|
-
return !1;
|
|
199
|
-
const a = e[n];
|
|
200
|
-
if (W(a)) {
|
|
201
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
202
|
-
t.writable = !1;
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
t.set || (t.set = () => {
|
|
206
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}, la = (e, t) => {
|
|
211
|
-
const n = {}, a = (o) => {
|
|
212
|
-
o.forEach((r) => {
|
|
213
|
-
n[r] = !0;
|
|
214
|
-
});
|
|
215
|
-
};
|
|
216
|
-
return ve(e) ? a(e) : a(String(e).split(t)), n;
|
|
217
|
-
}, ua = () => {
|
|
218
|
-
}, ca = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
219
|
-
function da(e) {
|
|
220
|
-
return !!(e && W(e.append) && e[Wt] === "FormData" && e[je]);
|
|
221
|
-
}
|
|
222
|
-
const pa = (e) => {
|
|
223
|
-
const t = /* @__PURE__ */ new WeakSet(), n = (a) => {
|
|
224
|
-
if (Ae(a)) {
|
|
225
|
-
if (t.has(a))
|
|
226
|
-
return;
|
|
227
|
-
if (_e(a))
|
|
228
|
-
return a;
|
|
229
|
-
if (!("toJSON" in a)) {
|
|
230
|
-
t.add(a);
|
|
231
|
-
const o = ve(a) ? [] : {};
|
|
232
|
-
return Me(a, (r, s) => {
|
|
233
|
-
const i = n(r);
|
|
234
|
-
!Te(i) && (o[s] = i);
|
|
235
|
-
}), t.delete(a), o;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
return a;
|
|
239
|
-
};
|
|
240
|
-
return n(e);
|
|
241
|
-
}, fa = te("AsyncFunction"), ma = (e) => e && (Ae(e) || W(e)) && W(e.then) && W(e.catch), en = ((e, t) => e ? setImmediate : t ? ((n, a) => (he.addEventListener(
|
|
242
|
-
"message",
|
|
243
|
-
({ source: o, data: r }) => {
|
|
244
|
-
o === he && r === n && a.length && a.shift()();
|
|
245
|
-
},
|
|
246
|
-
!1
|
|
247
|
-
), (o) => {
|
|
248
|
-
a.push(o), he.postMessage(n, "*");
|
|
249
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", W(he.postMessage)), ga = typeof queueMicrotask < "u" ? queueMicrotask.bind(he) : typeof process < "u" && process.nextTick || en, tn = (e) => e != null && W(e[je]), ha = (e) => e != null && Ue(e, je) && tn(e), l = {
|
|
250
|
-
isArray: ve,
|
|
251
|
-
isArrayBuffer: Kt,
|
|
252
|
-
isBuffer: _e,
|
|
253
|
-
isFormData: zn,
|
|
254
|
-
isArrayBufferView: _n,
|
|
255
|
-
isString: An,
|
|
256
|
-
isNumber: Xt,
|
|
257
|
-
isBoolean: Bn,
|
|
258
|
-
isObject: Ae,
|
|
259
|
-
isPlainObject: Ve,
|
|
260
|
-
isEmptyObject: Cn,
|
|
261
|
-
isReadableStream: qn,
|
|
262
|
-
isRequest: $n,
|
|
263
|
-
isResponse: Gn,
|
|
264
|
-
isHeaders: Hn,
|
|
265
|
-
isUndefined: Te,
|
|
266
|
-
isDate: Dn,
|
|
267
|
-
isFile: Nn,
|
|
268
|
-
isReactNativeBlob: Fn,
|
|
269
|
-
isReactNative: Ln,
|
|
270
|
-
isBlob: Un,
|
|
271
|
-
isRegExp: sa,
|
|
272
|
-
isFunction: W,
|
|
273
|
-
isStream: Mn,
|
|
274
|
-
isURLSearchParams: Vn,
|
|
275
|
-
isTypedArray: ea,
|
|
276
|
-
isFileList: jn,
|
|
277
|
-
forEach: Me,
|
|
278
|
-
merge: lt,
|
|
279
|
-
extend: Wn,
|
|
280
|
-
trim: Jn,
|
|
281
|
-
stripBOM: Kn,
|
|
282
|
-
inherits: Xn,
|
|
283
|
-
toFlatObject: Qn,
|
|
284
|
-
kindOf: ft,
|
|
285
|
-
kindOfTest: te,
|
|
286
|
-
endsWith: Zn,
|
|
287
|
-
toArray: Yn,
|
|
288
|
-
forEachEntry: ta,
|
|
289
|
-
matchAll: na,
|
|
290
|
-
isHTMLForm: aa,
|
|
291
|
-
hasOwnProperty: He,
|
|
292
|
-
hasOwnProp: He,
|
|
293
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
|
294
|
-
hasOwnInPrototypeChain: Ue,
|
|
295
|
-
getSafeProp: Tn,
|
|
296
|
-
reduceDescriptors: Yt,
|
|
297
|
-
freezeMethods: ia,
|
|
298
|
-
toObjectSet: la,
|
|
299
|
-
toCamelCase: oa,
|
|
300
|
-
noop: ua,
|
|
301
|
-
toFiniteNumber: ca,
|
|
302
|
-
findKey: Qt,
|
|
303
|
-
global: he,
|
|
304
|
-
isContextDefined: Zt,
|
|
305
|
-
isSpecCompliantForm: da,
|
|
306
|
-
toJSONObject: pa,
|
|
307
|
-
isAsyncFn: fa,
|
|
308
|
-
isThenable: ma,
|
|
309
|
-
setImmediate: en,
|
|
310
|
-
asap: ga,
|
|
311
|
-
isIterable: tn,
|
|
312
|
-
isSafeIterable: ha
|
|
313
|
-
}, ba = l.toObjectSet([
|
|
314
|
-
"age",
|
|
315
|
-
"authorization",
|
|
316
|
-
"content-length",
|
|
317
|
-
"content-type",
|
|
318
|
-
"etag",
|
|
319
|
-
"expires",
|
|
320
|
-
"from",
|
|
321
|
-
"host",
|
|
322
|
-
"if-modified-since",
|
|
323
|
-
"if-unmodified-since",
|
|
324
|
-
"last-modified",
|
|
325
|
-
"location",
|
|
326
|
-
"max-forwards",
|
|
327
|
-
"proxy-authorization",
|
|
328
|
-
"referer",
|
|
329
|
-
"retry-after",
|
|
330
|
-
"user-agent"
|
|
331
|
-
]), ya = (e) => {
|
|
332
|
-
const t = {};
|
|
333
|
-
let n, a, o;
|
|
334
|
-
return e && e.split(`
|
|
335
|
-
`).forEach(function(r) {
|
|
336
|
-
o = r.indexOf(":"), n = r.substring(0, o).trim().toLowerCase(), a = r.substring(o + 1).trim(), !(!n || t[n] && ba[n]) && (n === "set-cookie" ? t[n] ? t[n].push(a) : t[n] = [a] : t[n] = t[n] ? t[n] + ", " + a : a);
|
|
337
|
-
}), t;
|
|
338
|
-
};
|
|
339
|
-
function wa(e) {
|
|
340
|
-
let t = 0, n = e.length;
|
|
341
|
-
for (; t < n; ) {
|
|
342
|
-
const a = e.charCodeAt(t);
|
|
343
|
-
if (a !== 9 && a !== 32)
|
|
344
|
-
break;
|
|
345
|
-
t += 1;
|
|
346
|
-
}
|
|
347
|
-
for (; n > t; ) {
|
|
348
|
-
const a = e.charCodeAt(n - 1);
|
|
349
|
-
if (a !== 9 && a !== 32)
|
|
350
|
-
break;
|
|
351
|
-
n -= 1;
|
|
352
|
-
}
|
|
353
|
-
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
354
|
-
}
|
|
355
|
-
const va = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), xa = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
356
|
-
function mt(e, t) {
|
|
357
|
-
return l.isArray(e) ? e.map((n) => mt(n, t)) : wa(String(e).replace(t, ""));
|
|
358
|
-
}
|
|
359
|
-
const Sa = (e) => mt(e, va), Ea = (e) => mt(e, xa);
|
|
360
|
-
function nn(e) {
|
|
361
|
-
const t = /* @__PURE__ */ Object.create(null);
|
|
362
|
-
return l.forEach(e.toJSON(), (n, a) => {
|
|
363
|
-
t[a] = Ea(n);
|
|
364
|
-
}), t;
|
|
365
|
-
}
|
|
366
|
-
const _t = Symbol("internals");
|
|
367
|
-
function Le(e) {
|
|
368
|
-
return e && String(e).trim().toLowerCase();
|
|
369
|
-
}
|
|
370
|
-
function qe(e) {
|
|
371
|
-
return e === !1 || e == null ? e : l.isArray(e) ? e.map(qe) : Sa(String(e));
|
|
372
|
-
}
|
|
373
|
-
function ka(e) {
|
|
374
|
-
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
375
|
-
let a;
|
|
376
|
-
for (; a = n.exec(e); )
|
|
377
|
-
t[a[1]] = a[2];
|
|
378
|
-
return t;
|
|
379
|
-
}
|
|
380
|
-
const Pa = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
381
|
-
function ot(e, t, n, a, o) {
|
|
382
|
-
if (l.isFunction(a))
|
|
383
|
-
return a.call(this, t, n);
|
|
384
|
-
if (o && (t = n), !!l.isString(t)) {
|
|
385
|
-
if (l.isString(a))
|
|
386
|
-
return t.indexOf(a) !== -1;
|
|
387
|
-
if (l.isRegExp(a))
|
|
388
|
-
return a.test(t);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
function Oa(e) {
|
|
392
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, a) => n.toUpperCase() + a);
|
|
393
|
-
}
|
|
394
|
-
function Ra(e, t) {
|
|
395
|
-
const n = l.toCamelCase(" " + t);
|
|
396
|
-
["get", "set", "has"].forEach((a) => {
|
|
397
|
-
Object.defineProperty(e, a + n, {
|
|
398
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
399
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
400
|
-
__proto__: null,
|
|
401
|
-
value: function(o, r, s) {
|
|
402
|
-
return this[a].call(this, t, o, r, s);
|
|
403
|
-
},
|
|
404
|
-
configurable: !0
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
class Qe {
|
|
409
|
-
constructor(t) {
|
|
410
|
-
t && this.set(t);
|
|
411
|
-
}
|
|
412
|
-
set(t, n, a) {
|
|
413
|
-
const o = this;
|
|
414
|
-
function r(i, u, p) {
|
|
415
|
-
const d = Le(u);
|
|
416
|
-
if (!d)
|
|
417
|
-
return;
|
|
418
|
-
const f = l.findKey(o, d);
|
|
419
|
-
(!f || o[f] === void 0 || p === !0 || p === void 0 && o[f] !== !1) && (o[f || u] = qe(i));
|
|
420
|
-
}
|
|
421
|
-
const s = (i, u) => l.forEach(i, (p, d) => r(p, d, u));
|
|
422
|
-
if (l.isPlainObject(t) || t instanceof this.constructor)
|
|
423
|
-
s(t, n);
|
|
424
|
-
else if (l.isString(t) && (t = t.trim()) && !Pa(t))
|
|
425
|
-
s(ya(t), n);
|
|
426
|
-
else if (l.isObject(t) && l.isSafeIterable(t)) {
|
|
427
|
-
let i = /* @__PURE__ */ Object.create(null), u, p;
|
|
428
|
-
for (const d of t) {
|
|
429
|
-
if (!l.isArray(d))
|
|
430
|
-
throw new TypeError("Object iterator must return a key-value pair");
|
|
431
|
-
p = d[0], l.hasOwnProp(i, p) ? (u = i[p], i[p] = l.isArray(u) ? [...u, d[1]] : [u, d[1]]) : i[p] = d[1];
|
|
432
|
-
}
|
|
433
|
-
s(i, n);
|
|
434
|
-
} else
|
|
435
|
-
t != null && r(n, t, a);
|
|
436
|
-
return this;
|
|
437
|
-
}
|
|
438
|
-
get(t, n) {
|
|
439
|
-
if (t = Le(t), t) {
|
|
440
|
-
const a = l.findKey(this, t);
|
|
441
|
-
if (a) {
|
|
442
|
-
const o = this[a];
|
|
443
|
-
if (!n)
|
|
444
|
-
return o;
|
|
445
|
-
if (n === !0)
|
|
446
|
-
return ka(o);
|
|
447
|
-
if (l.isFunction(n))
|
|
448
|
-
return n.call(this, o, a);
|
|
449
|
-
if (l.isRegExp(n))
|
|
450
|
-
return n.exec(o);
|
|
451
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
has(t, n) {
|
|
456
|
-
if (t = Le(t), t) {
|
|
457
|
-
const a = l.findKey(this, t);
|
|
458
|
-
return !!(a && this[a] !== void 0 && (!n || ot(this, this[a], a, n)));
|
|
459
|
-
}
|
|
460
|
-
return !1;
|
|
461
|
-
}
|
|
462
|
-
delete(t, n) {
|
|
463
|
-
const a = this;
|
|
464
|
-
let o = !1;
|
|
465
|
-
function r(s) {
|
|
466
|
-
if (s = Le(s), s) {
|
|
467
|
-
const i = l.findKey(a, s);
|
|
468
|
-
i && (!n || ot(a, a[i], i, n)) && (delete a[i], o = !0);
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
return l.isArray(t) ? t.forEach(r) : r(t), o;
|
|
472
|
-
}
|
|
473
|
-
clear(t) {
|
|
474
|
-
const n = Object.keys(this);
|
|
475
|
-
let a = n.length, o = !1;
|
|
476
|
-
for (; a--; ) {
|
|
477
|
-
const r = n[a];
|
|
478
|
-
(!t || ot(this, this[r], r, t, !0)) && (delete this[r], o = !0);
|
|
479
|
-
}
|
|
480
|
-
return o;
|
|
481
|
-
}
|
|
482
|
-
normalize(t) {
|
|
483
|
-
const n = this, a = {};
|
|
484
|
-
return l.forEach(this, (o, r) => {
|
|
485
|
-
const s = l.findKey(a, r);
|
|
486
|
-
if (s) {
|
|
487
|
-
n[s] = qe(o), delete n[r];
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
const i = t ? Oa(r) : String(r).trim();
|
|
491
|
-
i !== r && delete n[r], n[i] = qe(o), a[i] = !0;
|
|
492
|
-
}), this;
|
|
493
|
-
}
|
|
494
|
-
concat(...t) {
|
|
495
|
-
return this.constructor.concat(this, ...t);
|
|
496
|
-
}
|
|
497
|
-
toJSON(t) {
|
|
498
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
499
|
-
return l.forEach(this, (a, o) => {
|
|
500
|
-
a != null && a !== !1 && (n[o] = t && l.isArray(a) ? a.join(", ") : a);
|
|
501
|
-
}), n;
|
|
502
|
-
}
|
|
503
|
-
[Symbol.iterator]() {
|
|
504
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
505
|
-
}
|
|
506
|
-
toString() {
|
|
507
|
-
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
508
|
-
`);
|
|
509
|
-
}
|
|
510
|
-
getSetCookie() {
|
|
511
|
-
return this.get("set-cookie") || [];
|
|
512
|
-
}
|
|
513
|
-
get [Symbol.toStringTag]() {
|
|
514
|
-
return "AxiosHeaders";
|
|
515
|
-
}
|
|
516
|
-
static from(t) {
|
|
517
|
-
return t instanceof this ? t : new this(t);
|
|
518
|
-
}
|
|
519
|
-
static concat(t, ...n) {
|
|
520
|
-
const a = new this(t);
|
|
521
|
-
return n.forEach((o) => a.set(o)), a;
|
|
522
|
-
}
|
|
523
|
-
static accessor(t) {
|
|
524
|
-
const n = (this[_t] = this[_t] = {
|
|
525
|
-
accessors: {}
|
|
526
|
-
}).accessors, a = this.prototype;
|
|
527
|
-
function o(r) {
|
|
528
|
-
const s = Le(r);
|
|
529
|
-
n[s] || (Ra(a, r), n[s] = !0);
|
|
530
|
-
}
|
|
531
|
-
return l.isArray(t) ? t.forEach(o) : o(t), this;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
Qe.accessor([
|
|
535
|
-
"Content-Type",
|
|
536
|
-
"Content-Length",
|
|
537
|
-
"Accept",
|
|
538
|
-
"Accept-Encoding",
|
|
539
|
-
"User-Agent",
|
|
540
|
-
"Authorization"
|
|
541
|
-
]);
|
|
542
|
-
l.reduceDescriptors(Qe.prototype, ({ value: e }, t) => {
|
|
543
|
-
let n = t[0].toUpperCase() + t.slice(1);
|
|
544
|
-
return {
|
|
545
|
-
get: () => e,
|
|
546
|
-
set(a) {
|
|
547
|
-
this[n] = a;
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
});
|
|
551
|
-
l.freezeMethods(Qe);
|
|
552
|
-
const Z = Qe, Ta = "[REDACTED ****]";
|
|
553
|
-
function _a(e) {
|
|
554
|
-
if (l.hasOwnProp(e, "toJSON"))
|
|
555
|
-
return !0;
|
|
556
|
-
let t = Object.getPrototypeOf(e);
|
|
557
|
-
for (; t && t !== Object.prototype; ) {
|
|
558
|
-
if (l.hasOwnProp(t, "toJSON"))
|
|
559
|
-
return !0;
|
|
560
|
-
t = Object.getPrototypeOf(t);
|
|
561
|
-
}
|
|
562
|
-
return !1;
|
|
563
|
-
}
|
|
564
|
-
function Aa(e, t) {
|
|
565
|
-
const n = new Set(t.map((r) => String(r).toLowerCase())), a = [], o = (r) => {
|
|
566
|
-
if (r === null || typeof r != "object" || l.isBuffer(r))
|
|
567
|
-
return r;
|
|
568
|
-
if (a.indexOf(r) !== -1)
|
|
569
|
-
return;
|
|
570
|
-
r instanceof Z && (r = r.toJSON()), a.push(r);
|
|
571
|
-
let s;
|
|
572
|
-
if (l.isArray(r))
|
|
573
|
-
s = [], r.forEach((i, u) => {
|
|
574
|
-
const p = o(i);
|
|
575
|
-
l.isUndefined(p) || (s[u] = p);
|
|
576
|
-
});
|
|
577
|
-
else {
|
|
578
|
-
if (!l.isPlainObject(r) && _a(r))
|
|
579
|
-
return a.pop(), r;
|
|
580
|
-
s = /* @__PURE__ */ Object.create(null);
|
|
581
|
-
for (const [i, u] of Object.entries(r)) {
|
|
582
|
-
const p = n.has(i.toLowerCase()) ? Ta : o(u);
|
|
583
|
-
l.isUndefined(p) || (s[i] = p);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
return a.pop(), s;
|
|
587
|
-
};
|
|
588
|
-
return o(e);
|
|
589
|
-
}
|
|
590
|
-
class q extends Error {
|
|
591
|
-
static from(t, n, a, o, r, s) {
|
|
592
|
-
const i = new q(t.message, n || t.code, a, o, r);
|
|
593
|
-
return Object.defineProperty(i, "cause", {
|
|
594
|
-
__proto__: null,
|
|
595
|
-
value: t,
|
|
596
|
-
writable: !0,
|
|
597
|
-
enumerable: !1,
|
|
598
|
-
configurable: !0
|
|
599
|
-
}), i.name = t.name, t.status != null && i.status == null && (i.status = t.status), s && Object.assign(i, s), i;
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* Create an Error with the specified message, config, error code, request and response.
|
|
603
|
-
*
|
|
604
|
-
* @param {string} message The error message.
|
|
605
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
606
|
-
* @param {Object} [config] The config.
|
|
607
|
-
* @param {Object} [request] The request.
|
|
608
|
-
* @param {Object} [response] The response.
|
|
609
|
-
*
|
|
610
|
-
* @returns {Error} The created error.
|
|
611
|
-
*/
|
|
612
|
-
constructor(t, n, a, o, r) {
|
|
613
|
-
super(t), Object.defineProperty(this, "message", {
|
|
614
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
615
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
616
|
-
__proto__: null,
|
|
617
|
-
value: t,
|
|
618
|
-
enumerable: !0,
|
|
619
|
-
writable: !0,
|
|
620
|
-
configurable: !0
|
|
621
|
-
}), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), a && (this.config = a), o && (this.request = o), r && (this.response = r, this.status = r.status);
|
|
622
|
-
}
|
|
623
|
-
toJSON() {
|
|
624
|
-
const t = this.config, n = t && l.hasOwnProp(t, "redact") ? t.redact : void 0, a = l.isArray(n) && n.length > 0 ? Aa(t, n) : l.toJSONObject(t);
|
|
625
|
-
return {
|
|
626
|
-
// Standard
|
|
627
|
-
message: this.message,
|
|
628
|
-
name: this.name,
|
|
629
|
-
// Microsoft
|
|
630
|
-
description: this.description,
|
|
631
|
-
number: this.number,
|
|
632
|
-
// Mozilla
|
|
633
|
-
fileName: this.fileName,
|
|
634
|
-
lineNumber: this.lineNumber,
|
|
635
|
-
columnNumber: this.columnNumber,
|
|
636
|
-
stack: this.stack,
|
|
637
|
-
// Axios
|
|
638
|
-
config: a,
|
|
639
|
-
code: this.code,
|
|
640
|
-
status: this.status
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
q.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
645
|
-
q.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
646
|
-
q.ECONNABORTED = "ECONNABORTED";
|
|
647
|
-
q.ETIMEDOUT = "ETIMEDOUT";
|
|
648
|
-
q.ECONNREFUSED = "ECONNREFUSED";
|
|
649
|
-
q.ERR_NETWORK = "ERR_NETWORK";
|
|
650
|
-
q.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
651
|
-
q.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
652
|
-
q.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
653
|
-
q.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
654
|
-
q.ERR_CANCELED = "ERR_CANCELED";
|
|
655
|
-
q.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
656
|
-
q.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
657
|
-
q.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
658
|
-
const S = q, Ba = null, an = 100;
|
|
659
|
-
function ut(e) {
|
|
660
|
-
return l.isPlainObject(e) || l.isArray(e);
|
|
661
|
-
}
|
|
662
|
-
function on(e) {
|
|
663
|
-
return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
664
|
-
}
|
|
665
|
-
function rt(e, t, n) {
|
|
666
|
-
return e ? e.concat(t).map(function(a, o) {
|
|
667
|
-
return a = on(a), !n && o ? "[" + a + "]" : a;
|
|
668
|
-
}).join(n ? "." : "") : t;
|
|
669
|
-
}
|
|
670
|
-
function Ca(e) {
|
|
671
|
-
return l.isArray(e) && !e.some(ut);
|
|
672
|
-
}
|
|
673
|
-
const Da = l.toFlatObject(l, {}, null, function(e) {
|
|
674
|
-
return /^is[A-Z]/.test(e);
|
|
675
|
-
});
|
|
676
|
-
function Ze(e, t, n) {
|
|
677
|
-
if (!l.isObject(e))
|
|
678
|
-
throw new TypeError("target must be an object");
|
|
679
|
-
t = t || new FormData(), n = l.toFlatObject(
|
|
680
|
-
n,
|
|
681
|
-
{
|
|
682
|
-
metaTokens: !0,
|
|
683
|
-
dots: !1,
|
|
684
|
-
indexes: !1
|
|
685
|
-
},
|
|
686
|
-
!1,
|
|
687
|
-
function(c, m) {
|
|
688
|
-
return !l.isUndefined(m[c]);
|
|
689
|
-
}
|
|
690
|
-
);
|
|
691
|
-
const a = n.metaTokens, o = n.visitor || g, r = n.dots, s = n.indexes, i = n.Blob || typeof Blob < "u" && Blob, u = n.maxDepth === void 0 ? an : n.maxDepth, p = i && l.isSpecCompliantForm(t), d = [];
|
|
692
|
-
if (!l.isFunction(o))
|
|
693
|
-
throw new TypeError("visitor must be a function");
|
|
694
|
-
function f(c) {
|
|
695
|
-
if (c === null)
|
|
696
|
-
return "";
|
|
697
|
-
if (l.isDate(c))
|
|
698
|
-
return c.toISOString();
|
|
699
|
-
if (l.isBoolean(c))
|
|
700
|
-
return c.toString();
|
|
701
|
-
if (!p && l.isBlob(c))
|
|
702
|
-
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
703
|
-
if (l.isArrayBuffer(c) || l.isTypedArray(c)) {
|
|
704
|
-
if (p && typeof i == "function")
|
|
705
|
-
return new i([c]);
|
|
706
|
-
if (typeof Buffer < "u")
|
|
707
|
-
return Buffer.from(c);
|
|
708
|
-
throw new S("Blob is not supported. Use a Buffer instead.", S.ERR_NOT_SUPPORT);
|
|
709
|
-
}
|
|
710
|
-
return c;
|
|
711
|
-
}
|
|
712
|
-
function b(c) {
|
|
713
|
-
if (c > u)
|
|
714
|
-
throw new S(
|
|
715
|
-
"Object is too deeply nested (" + c + " levels). Max depth: " + u,
|
|
716
|
-
S.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
function w(c, m) {
|
|
720
|
-
if (u === 1 / 0)
|
|
721
|
-
return JSON.stringify(c);
|
|
722
|
-
const v = [];
|
|
723
|
-
return JSON.stringify(c, function(E, x) {
|
|
724
|
-
if (!l.isObject(x))
|
|
725
|
-
return x;
|
|
726
|
-
for (; v.length && v[v.length - 1] !== this; )
|
|
727
|
-
v.pop();
|
|
728
|
-
return v.push(x), b(m + v.length - 1), x;
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
function g(c, m, v) {
|
|
732
|
-
let E = c;
|
|
733
|
-
if (l.isReactNative(t) && l.isReactNativeBlob(c))
|
|
734
|
-
return t.append(rt(v, m, r), f(c)), !1;
|
|
735
|
-
if (c && !v && typeof c == "object") {
|
|
736
|
-
if (l.endsWith(m, "{}"))
|
|
737
|
-
m = a ? m : m.slice(0, -2), c = w(c, 1);
|
|
738
|
-
else if (l.isArray(c) && Ca(c) || (l.isFileList(c) || l.endsWith(m, "[]")) && (E = l.toArray(c)))
|
|
739
|
-
return m = on(m), E.forEach(function(x, B) {
|
|
740
|
-
!(l.isUndefined(x) || x === null) && t.append(
|
|
741
|
-
// eslint-disable-next-line no-nested-ternary
|
|
742
|
-
s === !0 ? rt([m], B, r) : s === null ? m : m + "[]",
|
|
743
|
-
f(x)
|
|
744
|
-
);
|
|
745
|
-
}), !1;
|
|
746
|
-
}
|
|
747
|
-
return ut(c) ? !0 : (t.append(rt(v, m, r), f(c)), !1);
|
|
748
|
-
}
|
|
749
|
-
const y = Object.assign(Da, {
|
|
750
|
-
defaultVisitor: g,
|
|
751
|
-
convertValue: f,
|
|
752
|
-
isVisitable: ut
|
|
753
|
-
});
|
|
754
|
-
function U(c, m, v = 0) {
|
|
755
|
-
if (!l.isUndefined(c)) {
|
|
756
|
-
if (b(v), d.indexOf(c) !== -1)
|
|
757
|
-
throw new Error("Circular reference detected in " + m.join("."));
|
|
758
|
-
d.push(c), l.forEach(c, function(E, x) {
|
|
759
|
-
(!(l.isUndefined(E) || E === null) && o.call(t, E, l.isString(x) ? x.trim() : x, m, y)) === !0 && U(E, m ? m.concat(x) : [x], v + 1);
|
|
760
|
-
}), d.pop();
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
if (!l.isObject(e))
|
|
764
|
-
throw new TypeError("data must be an object");
|
|
765
|
-
return U(e), t;
|
|
766
|
-
}
|
|
767
|
-
function At(e) {
|
|
768
|
-
const t = {
|
|
769
|
-
"!": "%21",
|
|
770
|
-
"'": "%27",
|
|
771
|
-
"(": "%28",
|
|
772
|
-
")": "%29",
|
|
773
|
-
"~": "%7E",
|
|
774
|
-
"%20": "+"
|
|
775
|
-
};
|
|
776
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(n) {
|
|
777
|
-
return t[n];
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
function gt(e, t) {
|
|
781
|
-
this._pairs = [], e && Ze(e, this, t);
|
|
782
|
-
}
|
|
783
|
-
const rn = gt.prototype;
|
|
784
|
-
rn.append = function(e, t) {
|
|
785
|
-
this._pairs.push([e, t]);
|
|
786
|
-
};
|
|
787
|
-
rn.toString = function(e) {
|
|
788
|
-
const t = e ? (n) => e.call(this, n, At) : At;
|
|
789
|
-
return this._pairs.map(function(n) {
|
|
790
|
-
return t(n[0]) + "=" + t(n[1]);
|
|
791
|
-
}, "").join("&");
|
|
792
|
-
};
|
|
793
|
-
function Na(e) {
|
|
794
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
795
|
-
}
|
|
796
|
-
function sn(e, t, n) {
|
|
797
|
-
if (!t)
|
|
798
|
-
return e;
|
|
799
|
-
e = e || "";
|
|
800
|
-
const a = l.isFunction(n) ? {
|
|
801
|
-
serialize: n
|
|
802
|
-
} : n, o = l.getSafeProp(a, "encode") || Na, r = l.getSafeProp(a, "serialize");
|
|
803
|
-
let s;
|
|
804
|
-
if (r ? s = r(t, a) : s = l.isURLSearchParams(t) ? t.toString() : new gt(t, a).toString(o), s) {
|
|
805
|
-
const i = e.indexOf("#");
|
|
806
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
807
|
-
}
|
|
808
|
-
return e;
|
|
809
|
-
}
|
|
810
|
-
class Fa {
|
|
811
|
-
constructor() {
|
|
812
|
-
this.handlers = [];
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* Add a new interceptor to the stack
|
|
816
|
-
*
|
|
817
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
818
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
819
|
-
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
820
|
-
*
|
|
821
|
-
* @return {Number} An ID used to remove interceptor later
|
|
822
|
-
*/
|
|
823
|
-
use(t, n, a) {
|
|
824
|
-
return this.handlers.push({
|
|
825
|
-
fulfilled: t,
|
|
826
|
-
rejected: n,
|
|
827
|
-
synchronous: a ? a.synchronous : !1,
|
|
828
|
-
runWhen: a ? a.runWhen : null
|
|
829
|
-
}), this.handlers.length - 1;
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Remove an interceptor from the stack
|
|
833
|
-
*
|
|
834
|
-
* @param {Number} id The ID that was returned by `use`
|
|
835
|
-
*
|
|
836
|
-
* @returns {void}
|
|
837
|
-
*/
|
|
838
|
-
eject(t) {
|
|
839
|
-
this.handlers[t] && (this.handlers[t] = null);
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* Clear all interceptors from the stack
|
|
843
|
-
*
|
|
844
|
-
* @returns {void}
|
|
845
|
-
*/
|
|
846
|
-
clear() {
|
|
847
|
-
this.handlers && (this.handlers = []);
|
|
848
|
-
}
|
|
849
|
-
/**
|
|
850
|
-
* Iterate over all the registered interceptors
|
|
851
|
-
*
|
|
852
|
-
* This method is particularly useful for skipping over any
|
|
853
|
-
* interceptors that may have become `null` calling `eject`.
|
|
854
|
-
*
|
|
855
|
-
* @param {Function} fn The function to call for each interceptor
|
|
856
|
-
*
|
|
857
|
-
* @returns {void}
|
|
858
|
-
*/
|
|
859
|
-
forEach(t) {
|
|
860
|
-
l.forEach(this.handlers, function(n) {
|
|
861
|
-
n !== null && t(n);
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
const Bt = Fa, ht = {
|
|
866
|
-
silentJSONParsing: !0,
|
|
867
|
-
forcedJSONParsing: !0,
|
|
868
|
-
clarifyTimeoutError: !1,
|
|
869
|
-
legacyInterceptorReqResOrdering: !0,
|
|
870
|
-
advertiseZstdAcceptEncoding: !1,
|
|
871
|
-
validateStatusUndefinedResolves: !0
|
|
872
|
-
}, La = typeof URLSearchParams < "u" ? URLSearchParams : gt, Ua = typeof FormData < "u" ? FormData : null, ja = typeof Blob < "u" ? Blob : null, Ma = {
|
|
873
|
-
isBrowser: !0,
|
|
874
|
-
classes: {
|
|
875
|
-
URLSearchParams: La,
|
|
876
|
-
FormData: Ua,
|
|
877
|
-
Blob: ja
|
|
878
|
-
},
|
|
879
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
880
|
-
}, bt = typeof window < "u" && typeof document < "u", ct = typeof navigator == "object" && navigator || void 0, Ia = bt && (!ct || ["ReactNative", "NativeScript", "NS"].indexOf(ct.product) < 0), za = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
881
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Va = bt && window.location.href || "http://localhost", qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
882
|
-
__proto__: null,
|
|
883
|
-
hasBrowserEnv: bt,
|
|
884
|
-
hasStandardBrowserEnv: Ia,
|
|
885
|
-
hasStandardBrowserWebWorkerEnv: za,
|
|
886
|
-
navigator: ct,
|
|
887
|
-
origin: Va
|
|
888
|
-
}, Symbol.toStringTag, { value: "Module" })), V = {
|
|
889
|
-
...qa,
|
|
890
|
-
...Ma
|
|
891
|
-
};
|
|
892
|
-
function $a(e, t) {
|
|
893
|
-
return Ze(e, new V.classes.URLSearchParams(), {
|
|
894
|
-
visitor: function(n, a, o, r) {
|
|
895
|
-
return V.isNode && l.isBuffer(n) ? (this.append(a, n.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
896
|
-
},
|
|
897
|
-
...t
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
const Ct = an;
|
|
901
|
-
function ln(e) {
|
|
902
|
-
if (e > Ct)
|
|
903
|
-
throw new S(
|
|
904
|
-
"FormData field is too deeply nested (" + e + " levels). Max depth: " + Ct,
|
|
905
|
-
S.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
906
|
-
);
|
|
907
|
-
}
|
|
908
|
-
function Ga(e) {
|
|
909
|
-
const t = [], n = /\w+|\[(\w*)]/g;
|
|
910
|
-
let a;
|
|
911
|
-
for (; (a = n.exec(e)) !== null; )
|
|
912
|
-
ln(t.length), t.push(a[0] === "[]" ? "" : a[1] || a[0]);
|
|
913
|
-
return t;
|
|
914
|
-
}
|
|
915
|
-
function Ha(e) {
|
|
916
|
-
const t = {}, n = Object.keys(e);
|
|
917
|
-
let a;
|
|
918
|
-
const o = n.length;
|
|
919
|
-
let r;
|
|
920
|
-
for (a = 0; a < o; a++)
|
|
921
|
-
r = n[a], t[r] = e[r];
|
|
922
|
-
return t;
|
|
923
|
-
}
|
|
924
|
-
function un(e) {
|
|
925
|
-
function t(n, a, o, r) {
|
|
926
|
-
ln(r);
|
|
927
|
-
let s = n[r++];
|
|
928
|
-
if (s === "__proto__")
|
|
929
|
-
return !0;
|
|
930
|
-
const i = Number.isFinite(+s), u = r >= n.length;
|
|
931
|
-
return s = !s && l.isArray(o) ? o.length : s, u ? (l.hasOwnProp(o, s) ? o[s] = l.isArray(o[s]) ? o[s].concat(a) : [o[s], a] : o[s] = a, !i) : ((!l.hasOwnProp(o, s) || !l.isObject(o[s])) && (o[s] = []), t(n, a, o[s], r) && l.isArray(o[s]) && (o[s] = Ha(o[s])), !i);
|
|
932
|
-
}
|
|
933
|
-
if (l.isFormData(e) && l.isFunction(e.entries)) {
|
|
934
|
-
const n = {};
|
|
935
|
-
return l.forEachEntry(e, (a, o) => {
|
|
936
|
-
t(Ga(a), o, n, 0);
|
|
937
|
-
}), n;
|
|
938
|
-
}
|
|
939
|
-
return null;
|
|
940
|
-
}
|
|
941
|
-
const Pe = (e, t) => e != null && l.hasOwnProp(e, t) ? e[t] : void 0;
|
|
942
|
-
function Ja(e, t, n) {
|
|
943
|
-
if (l.isString(e))
|
|
944
|
-
try {
|
|
945
|
-
return (t || JSON.parse)(e), l.trim(e);
|
|
946
|
-
} catch (a) {
|
|
947
|
-
if (a.name !== "SyntaxError")
|
|
948
|
-
throw a;
|
|
949
|
-
}
|
|
950
|
-
return (n || JSON.stringify)(e);
|
|
951
|
-
}
|
|
952
|
-
const yt = {
|
|
953
|
-
transitional: ht,
|
|
954
|
-
adapter: ["xhr", "http", "fetch"],
|
|
955
|
-
transformRequest: [
|
|
956
|
-
function(e, t) {
|
|
957
|
-
const n = t.getContentType() || "", a = n.indexOf("application/json") > -1, o = l.isObject(e);
|
|
958
|
-
if (o && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
959
|
-
return a ? JSON.stringify(un(e)) : e;
|
|
960
|
-
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
961
|
-
return e;
|
|
962
|
-
if (l.isArrayBufferView(e))
|
|
963
|
-
return e.buffer;
|
|
964
|
-
if (l.isURLSearchParams(e))
|
|
965
|
-
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
966
|
-
let r;
|
|
967
|
-
if (o) {
|
|
968
|
-
const s = Pe(this, "formSerializer");
|
|
969
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
970
|
-
return $a(e, s).toString();
|
|
971
|
-
if ((r = l.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
972
|
-
const i = Pe(this, "env"), u = i && i.FormData;
|
|
973
|
-
return Ze(
|
|
974
|
-
r ? { "files[]": e } : e,
|
|
975
|
-
u && new u(),
|
|
976
|
-
s
|
|
977
|
-
);
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
return o || a ? (t.setContentType("application/json", !1), Ja(e)) : e;
|
|
981
|
-
}
|
|
982
|
-
],
|
|
983
|
-
transformResponse: [
|
|
984
|
-
function(e) {
|
|
985
|
-
const t = Pe(this, "transitional") || yt.transitional, n = t && t.forcedJSONParsing, a = Pe(this, "responseType"), o = a === "json";
|
|
986
|
-
if (l.isResponse(e) || l.isReadableStream(e))
|
|
987
|
-
return e;
|
|
988
|
-
if (e && l.isString(e) && (n && !a || o)) {
|
|
989
|
-
const r = !(t && t.silentJSONParsing) && o;
|
|
990
|
-
try {
|
|
991
|
-
return JSON.parse(e, Pe(this, "parseReviver"));
|
|
992
|
-
} catch (s) {
|
|
993
|
-
if (r)
|
|
994
|
-
throw s.name === "SyntaxError" ? S.from(s, S.ERR_BAD_RESPONSE, this, null, Pe(this, "response")) : s;
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
return e;
|
|
998
|
-
}
|
|
999
|
-
],
|
|
1000
|
-
/**
|
|
1001
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1002
|
-
* timeout is not created.
|
|
1003
|
-
*/
|
|
1004
|
-
timeout: 0,
|
|
1005
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
1006
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1007
|
-
maxContentLength: -1,
|
|
1008
|
-
maxBodyLength: -1,
|
|
1009
|
-
env: {
|
|
1010
|
-
FormData: V.classes.FormData,
|
|
1011
|
-
Blob: V.classes.Blob
|
|
1012
|
-
},
|
|
1013
|
-
validateStatus: function(e) {
|
|
1014
|
-
return e >= 200 && e < 300;
|
|
1015
|
-
},
|
|
1016
|
-
headers: {
|
|
1017
|
-
common: {
|
|
1018
|
-
Accept: "application/json, text/plain, */*",
|
|
1019
|
-
"Content-Type": void 0
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
};
|
|
1023
|
-
l.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (e) => {
|
|
1024
|
-
yt.headers[e] = {};
|
|
1025
|
-
});
|
|
1026
|
-
const wt = yt;
|
|
1027
|
-
function st(e, t) {
|
|
1028
|
-
const n = this || wt, a = t || n, o = Z.from(a.headers);
|
|
1029
|
-
let r = a.data;
|
|
1030
|
-
return l.forEach(e, function(s) {
|
|
1031
|
-
r = s.call(n, r, o.normalize(), t ? t.status : void 0);
|
|
1032
|
-
}), o.normalize(), r;
|
|
1033
|
-
}
|
|
1034
|
-
function cn(e) {
|
|
1035
|
-
return !!(e && e.__CANCEL__);
|
|
1036
|
-
}
|
|
1037
|
-
class Wa extends S {
|
|
1038
|
-
/**
|
|
1039
|
-
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1040
|
-
*
|
|
1041
|
-
* @param {string=} message The message.
|
|
1042
|
-
* @param {Object=} config The config.
|
|
1043
|
-
* @param {Object=} request The request.
|
|
1044
|
-
*
|
|
1045
|
-
* @returns {CanceledError} The created error.
|
|
1046
|
-
*/
|
|
1047
|
-
constructor(t, n, a) {
|
|
1048
|
-
super(t ?? "canceled", S.ERR_CANCELED, n, a), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
const Ie = Wa;
|
|
1052
|
-
function dn(e, t, n) {
|
|
1053
|
-
const a = n.config.validateStatus;
|
|
1054
|
-
!n.status || !a || a(n.status) ? e(n) : t(new S(
|
|
1055
|
-
"Request failed with status code " + n.status,
|
|
1056
|
-
n.status >= 400 && n.status < 500 ? S.ERR_BAD_REQUEST : S.ERR_BAD_RESPONSE,
|
|
1057
|
-
n.config,
|
|
1058
|
-
n.request,
|
|
1059
|
-
n
|
|
1060
|
-
));
|
|
1061
|
-
}
|
|
1062
|
-
function Ka(e) {
|
|
1063
|
-
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
|
|
1064
|
-
return t && t[1] || "";
|
|
1065
|
-
}
|
|
1066
|
-
function Xa(e, t) {
|
|
1067
|
-
e = e || 10;
|
|
1068
|
-
const n = new Array(e), a = new Array(e);
|
|
1069
|
-
let o = 0, r = 0, s;
|
|
1070
|
-
return t = t !== void 0 ? t : 1e3, function(i) {
|
|
1071
|
-
const u = Date.now(), p = a[r];
|
|
1072
|
-
s || (s = u), n[o] = i, a[o] = u;
|
|
1073
|
-
let d = r, f = 0;
|
|
1074
|
-
for (; d !== o; )
|
|
1075
|
-
f += n[d++], d = d % e;
|
|
1076
|
-
if (o = (o + 1) % e, o === r && (r = (r + 1) % e), u - s < t)
|
|
1077
|
-
return;
|
|
1078
|
-
const b = p && u - p;
|
|
1079
|
-
return b ? Math.round(f * 1e3 / b) : void 0;
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
function Qa(e, t) {
|
|
1083
|
-
let n = 0, a = 1e3 / t, o, r;
|
|
1084
|
-
const s = (i, u = Date.now()) => {
|
|
1085
|
-
n = u, o = null, r && (clearTimeout(r), r = null), e(...i);
|
|
1086
|
-
};
|
|
1087
|
-
return [(...i) => {
|
|
1088
|
-
const u = Date.now(), p = u - n;
|
|
1089
|
-
p >= a ? s(i, u) : (o = i, r || (r = setTimeout(() => {
|
|
1090
|
-
r = null, s(o);
|
|
1091
|
-
}, a - p)));
|
|
1092
|
-
}, () => o && s(o)];
|
|
1093
|
-
}
|
|
1094
|
-
const Je = (e, t, n = 3) => {
|
|
1095
|
-
let a = 0;
|
|
1096
|
-
const o = Xa(50, 250);
|
|
1097
|
-
return Qa((r) => {
|
|
1098
|
-
if (!r || typeof r.loaded != "number")
|
|
1099
|
-
return;
|
|
1100
|
-
const s = r.loaded, i = r.lengthComputable ? r.total : void 0, u = i != null ? Math.min(s, i) : s, p = Math.max(0, u - a), d = o(p);
|
|
1101
|
-
a = Math.max(a, u);
|
|
1102
|
-
const f = {
|
|
1103
|
-
loaded: u,
|
|
1104
|
-
total: i,
|
|
1105
|
-
progress: i ? u / i : void 0,
|
|
1106
|
-
bytes: p,
|
|
1107
|
-
rate: d || void 0,
|
|
1108
|
-
estimated: d && i ? (i - u) / d : void 0,
|
|
1109
|
-
event: r,
|
|
1110
|
-
lengthComputable: i != null,
|
|
1111
|
-
[t ? "download" : "upload"]: !0
|
|
1112
|
-
};
|
|
1113
|
-
e(f);
|
|
1114
|
-
}, n);
|
|
1115
|
-
}, Dt = (e, t) => {
|
|
1116
|
-
const n = e != null;
|
|
1117
|
-
return [
|
|
1118
|
-
(a) => t[0]({
|
|
1119
|
-
lengthComputable: n,
|
|
1120
|
-
total: e,
|
|
1121
|
-
loaded: a
|
|
1122
|
-
}),
|
|
1123
|
-
t[1]
|
|
1124
|
-
];
|
|
1125
|
-
}, Nt = (e) => (...t) => l.asap(() => e(...t)), Za = V.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, V.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1126
|
-
new URL(V.origin),
|
|
1127
|
-
V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)
|
|
1128
|
-
) : () => !0, Ya = V.hasStandardBrowserEnv ? (
|
|
1129
|
-
// Standard browser envs support document.cookie
|
|
1130
|
-
{
|
|
1131
|
-
write(e, t, n, a, o, r, s) {
|
|
1132
|
-
if (typeof document > "u")
|
|
1133
|
-
return;
|
|
1134
|
-
const i = [`${e}=${encodeURIComponent(t)}`];
|
|
1135
|
-
l.isNumber(n) && i.push(`expires=${new Date(n).toUTCString()}`), l.isString(a) && i.push(`path=${a}`), l.isString(o) && i.push(`domain=${o}`), r === !0 && i.push("secure"), l.isString(s) && i.push(`SameSite=${s}`), document.cookie = i.join("; ");
|
|
1136
|
-
},
|
|
1137
|
-
read(e) {
|
|
1138
|
-
if (typeof document > "u")
|
|
1139
|
-
return null;
|
|
1140
|
-
const t = document.cookie.split(";");
|
|
1141
|
-
for (let n = 0; n < t.length; n++) {
|
|
1142
|
-
const a = t[n].replace(/^\s+/, ""), o = a.indexOf("=");
|
|
1143
|
-
if (o !== -1 && a.slice(0, o) === e)
|
|
1144
|
-
try {
|
|
1145
|
-
return decodeURIComponent(a.slice(o + 1));
|
|
1146
|
-
} catch {
|
|
1147
|
-
return a.slice(o + 1);
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
return null;
|
|
1151
|
-
},
|
|
1152
|
-
remove(e) {
|
|
1153
|
-
this.write(e, "", Date.now() - 864e5, "/");
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
) : (
|
|
1157
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1158
|
-
{
|
|
1159
|
-
write() {
|
|
1160
|
-
},
|
|
1161
|
-
read() {
|
|
1162
|
-
return null;
|
|
1163
|
-
},
|
|
1164
|
-
remove() {
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
);
|
|
1168
|
-
function eo(e) {
|
|
1169
|
-
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1170
|
-
}
|
|
1171
|
-
function to(e, t) {
|
|
1172
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1173
|
-
}
|
|
1174
|
-
const no = /^https?:(?!\/\/)/i, ao = /[\t\n\r]/g;
|
|
1175
|
-
function oo(e) {
|
|
1176
|
-
let t = 0;
|
|
1177
|
-
for (; t < e.length && e.charCodeAt(t) <= 32; )
|
|
1178
|
-
t++;
|
|
1179
|
-
return e.slice(t);
|
|
1180
|
-
}
|
|
1181
|
-
function ro(e) {
|
|
1182
|
-
return oo(e).replace(ao, "");
|
|
1183
|
-
}
|
|
1184
|
-
function Ft(e, t) {
|
|
1185
|
-
if (typeof e == "string" && no.test(ro(e)))
|
|
1186
|
-
throw new S(
|
|
1187
|
-
'Invalid URL: missing "//" after protocol',
|
|
1188
|
-
S.ERR_INVALID_URL,
|
|
1189
|
-
t
|
|
1190
|
-
);
|
|
1191
|
-
}
|
|
1192
|
-
function pn(e, t, n, a) {
|
|
1193
|
-
Ft(t, a);
|
|
1194
|
-
let o = !eo(t);
|
|
1195
|
-
return e && (o || n === !1) ? (Ft(e, a), to(e, t)) : t;
|
|
1196
|
-
}
|
|
1197
|
-
const Lt = (e) => e instanceof Z ? { ...e } : e;
|
|
1198
|
-
function xe(e, t) {
|
|
1199
|
-
e = e || {}, t = t || {};
|
|
1200
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
1201
|
-
Object.defineProperty(n, "hasOwnProperty", {
|
|
1202
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
1203
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
1204
|
-
__proto__: null,
|
|
1205
|
-
value: Object.prototype.hasOwnProperty,
|
|
1206
|
-
enumerable: !1,
|
|
1207
|
-
writable: !0,
|
|
1208
|
-
configurable: !0
|
|
1209
|
-
});
|
|
1210
|
-
function a(d, f, b, w) {
|
|
1211
|
-
return l.isPlainObject(d) && l.isPlainObject(f) ? l.merge.call({ caseless: w }, d, f) : l.isPlainObject(f) ? l.merge({}, f) : l.isArray(f) ? f.slice() : f;
|
|
1212
|
-
}
|
|
1213
|
-
function o(d, f, b, w) {
|
|
1214
|
-
if (l.isUndefined(f)) {
|
|
1215
|
-
if (!l.isUndefined(d))
|
|
1216
|
-
return a(void 0, d, b, w);
|
|
1217
|
-
} else
|
|
1218
|
-
return a(d, f, b, w);
|
|
1219
|
-
}
|
|
1220
|
-
function r(d, f) {
|
|
1221
|
-
if (!l.isUndefined(f))
|
|
1222
|
-
return a(void 0, f);
|
|
1223
|
-
}
|
|
1224
|
-
function s(d, f) {
|
|
1225
|
-
if (l.isUndefined(f)) {
|
|
1226
|
-
if (!l.isUndefined(d))
|
|
1227
|
-
return a(void 0, d);
|
|
1228
|
-
} else
|
|
1229
|
-
return a(void 0, f);
|
|
1230
|
-
}
|
|
1231
|
-
function i(d) {
|
|
1232
|
-
const f = l.hasOwnProp(t, "transitional") ? t.transitional : void 0;
|
|
1233
|
-
if (!l.isUndefined(f))
|
|
1234
|
-
if (l.isPlainObject(f)) {
|
|
1235
|
-
if (l.hasOwnProp(f, d))
|
|
1236
|
-
return f[d];
|
|
1237
|
-
} else
|
|
1238
|
-
return;
|
|
1239
|
-
const b = l.hasOwnProp(e, "transitional") ? e.transitional : void 0;
|
|
1240
|
-
if (l.isPlainObject(b) && l.hasOwnProp(b, d))
|
|
1241
|
-
return b[d];
|
|
1242
|
-
}
|
|
1243
|
-
function u(d, f, b) {
|
|
1244
|
-
if (l.hasOwnProp(t, b))
|
|
1245
|
-
return a(d, f);
|
|
1246
|
-
if (l.hasOwnProp(e, b))
|
|
1247
|
-
return a(void 0, d);
|
|
1248
|
-
}
|
|
1249
|
-
const p = {
|
|
1250
|
-
url: r,
|
|
1251
|
-
method: r,
|
|
1252
|
-
data: r,
|
|
1253
|
-
baseURL: s,
|
|
1254
|
-
transformRequest: s,
|
|
1255
|
-
transformResponse: s,
|
|
1256
|
-
paramsSerializer: s,
|
|
1257
|
-
timeout: s,
|
|
1258
|
-
timeoutMessage: s,
|
|
1259
|
-
withCredentials: s,
|
|
1260
|
-
withXSRFToken: s,
|
|
1261
|
-
adapter: s,
|
|
1262
|
-
responseType: s,
|
|
1263
|
-
xsrfCookieName: s,
|
|
1264
|
-
xsrfHeaderName: s,
|
|
1265
|
-
onUploadProgress: s,
|
|
1266
|
-
onDownloadProgress: s,
|
|
1267
|
-
decompress: s,
|
|
1268
|
-
maxContentLength: s,
|
|
1269
|
-
maxBodyLength: s,
|
|
1270
|
-
beforeRedirect: s,
|
|
1271
|
-
transport: s,
|
|
1272
|
-
httpAgent: s,
|
|
1273
|
-
httpsAgent: s,
|
|
1274
|
-
cancelToken: s,
|
|
1275
|
-
socketPath: s,
|
|
1276
|
-
allowedSocketPaths: s,
|
|
1277
|
-
responseEncoding: s,
|
|
1278
|
-
validateStatus: u,
|
|
1279
|
-
headers: (d, f, b) => o(Lt(d), Lt(f), b, !0)
|
|
1280
|
-
};
|
|
1281
|
-
return l.forEach(Object.keys({ ...e, ...t }), function(d) {
|
|
1282
|
-
if (d === "__proto__" || d === "constructor" || d === "prototype")
|
|
1283
|
-
return;
|
|
1284
|
-
const f = l.hasOwnProp(p, d) ? p[d] : o, b = l.hasOwnProp(e, d) ? e[d] : void 0, w = l.hasOwnProp(t, d) ? t[d] : void 0, g = f(b, w, d);
|
|
1285
|
-
l.isUndefined(g) && f !== u || (n[d] = g);
|
|
1286
|
-
}), l.hasOwnProp(t, "validateStatus") && l.isUndefined(t.validateStatus) && i("validateStatusUndefinedResolves") === !1 && (l.hasOwnProp(e, "validateStatus") ? n.validateStatus = a(void 0, e.validateStatus) : delete n.validateStatus), n;
|
|
1287
|
-
}
|
|
1288
|
-
const so = ["content-type", "content-length"];
|
|
1289
|
-
function io(e, t, n) {
|
|
1290
|
-
if (n !== "content-only") {
|
|
1291
|
-
e.set(t);
|
|
1292
|
-
return;
|
|
1293
|
-
}
|
|
1294
|
-
Object.entries(t || {}).forEach(([a, o]) => {
|
|
1295
|
-
so.includes(a.toLowerCase()) && e.set(a, o);
|
|
1296
|
-
});
|
|
1297
|
-
}
|
|
1298
|
-
const lo = (e) => encodeURIComponent(e).replace(
|
|
1299
|
-
/%([0-9A-F]{2})/gi,
|
|
1300
|
-
(t, n) => String.fromCharCode(parseInt(n, 16))
|
|
1301
|
-
);
|
|
1302
|
-
function fn(e) {
|
|
1303
|
-
const t = xe({}, e), n = (b) => l.hasOwnProp(t, b) ? t[b] : void 0, a = n("data");
|
|
1304
|
-
let o = n("withXSRFToken");
|
|
1305
|
-
const r = n("xsrfHeaderName"), s = n("xsrfCookieName");
|
|
1306
|
-
let i = n("headers");
|
|
1307
|
-
const u = n("auth"), p = n("baseURL"), d = n("allowAbsoluteUrls"), f = n("url");
|
|
1308
|
-
if (t.headers = i = Z.from(i), t.url = sn(
|
|
1309
|
-
pn(p, f, d, t),
|
|
1310
|
-
n("params"),
|
|
1311
|
-
n("paramsSerializer")
|
|
1312
|
-
), u) {
|
|
1313
|
-
const b = l.getSafeProp(u, "username") || "", w = l.getSafeProp(u, "password") || "";
|
|
1314
|
-
try {
|
|
1315
|
-
i.set(
|
|
1316
|
-
"Authorization",
|
|
1317
|
-
"Basic " + btoa(b + ":" + (w ? lo(w) : ""))
|
|
1318
|
-
);
|
|
1319
|
-
} catch (g) {
|
|
1320
|
-
throw S.from(g, S.ERR_BAD_OPTION_VALUE, e);
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
if (l.isFormData(a) && (V.hasStandardBrowserEnv || V.hasStandardBrowserWebWorkerEnv || l.isReactNative(a) ? i.setContentType(void 0) : l.isFunction(a.getHeaders) && io(i, a.getHeaders(), n("formDataHeaderPolicy"))), V.hasStandardBrowserEnv && (l.isFunction(o) && (o = o(t)), o === !0 || o == null && Za(t.url))) {
|
|
1324
|
-
const b = r && s && Ya.read(s);
|
|
1325
|
-
b && i.set(r, b);
|
|
1326
|
-
}
|
|
1327
|
-
return t;
|
|
1328
|
-
}
|
|
1329
|
-
const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
1330
|
-
return new Promise(function(t, n) {
|
|
1331
|
-
const a = fn(e);
|
|
1332
|
-
let o = a.data;
|
|
1333
|
-
const r = Z.from(a.headers).normalize();
|
|
1334
|
-
let { responseType: s, onUploadProgress: i, onDownloadProgress: u } = a, p, d, f, b, w;
|
|
1335
|
-
function g() {
|
|
1336
|
-
b && b(), w && w(), a.cancelToken && a.cancelToken.unsubscribe(p), a.signal && a.signal.removeEventListener("abort", p);
|
|
1337
|
-
}
|
|
1338
|
-
let y = new XMLHttpRequest();
|
|
1339
|
-
y.open(a.method.toUpperCase(), a.url, !0), y.timeout = a.timeout;
|
|
1340
|
-
function U() {
|
|
1341
|
-
if (!y)
|
|
1342
|
-
return;
|
|
1343
|
-
const m = Z.from(
|
|
1344
|
-
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
1345
|
-
), v = {
|
|
1346
|
-
data: !s || s === "text" || s === "json" ? y.responseText : y.response,
|
|
1347
|
-
status: y.status,
|
|
1348
|
-
statusText: y.statusText,
|
|
1349
|
-
headers: m,
|
|
1350
|
-
config: e,
|
|
1351
|
-
request: y
|
|
1352
|
-
};
|
|
1353
|
-
dn(
|
|
1354
|
-
function(E) {
|
|
1355
|
-
t(E), g();
|
|
1356
|
-
},
|
|
1357
|
-
function(E) {
|
|
1358
|
-
n(E), g();
|
|
1359
|
-
},
|
|
1360
|
-
v
|
|
1361
|
-
), y = null;
|
|
1362
|
-
}
|
|
1363
|
-
"onloadend" in y ? y.onloadend = U : y.onreadystatechange = function() {
|
|
1364
|
-
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.startsWith("file:")) || setTimeout(U);
|
|
1365
|
-
}, y.onabort = function() {
|
|
1366
|
-
y && (n(new S("Request aborted", S.ECONNABORTED, e, y)), g(), y = null);
|
|
1367
|
-
}, y.onerror = function(m) {
|
|
1368
|
-
const v = m && m.message ? m.message : "Network Error", E = new S(v, S.ERR_NETWORK, e, y);
|
|
1369
|
-
E.event = m || null, n(E), g(), y = null;
|
|
1370
|
-
}, y.ontimeout = function() {
|
|
1371
|
-
let m = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1372
|
-
const v = a.transitional || ht;
|
|
1373
|
-
a.timeoutErrorMessage && (m = a.timeoutErrorMessage), n(
|
|
1374
|
-
new S(
|
|
1375
|
-
m,
|
|
1376
|
-
v.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1377
|
-
e,
|
|
1378
|
-
y
|
|
1379
|
-
)
|
|
1380
|
-
), g(), y = null;
|
|
1381
|
-
}, o === void 0 && r.setContentType(null), "setRequestHeader" in y && l.forEach(nn(r), function(m, v) {
|
|
1382
|
-
y.setRequestHeader(v, m);
|
|
1383
|
-
}), l.isUndefined(a.withCredentials) || (y.withCredentials = !!a.withCredentials), s && s !== "json" && (y.responseType = a.responseType), u && ([f, w] = Je(u, !0), y.addEventListener("progress", f)), i && y.upload && ([d, b] = Je(i), y.upload.addEventListener("progress", d), y.upload.addEventListener("loadend", b)), (a.cancelToken || a.signal) && (p = (m) => {
|
|
1384
|
-
y && (n(!m || m.type ? new Ie(null, e, y) : m), y.abort(), g(), y = null);
|
|
1385
|
-
}, a.cancelToken && a.cancelToken.subscribe(p), a.signal && (a.signal.aborted ? p() : a.signal.addEventListener("abort", p)));
|
|
1386
|
-
const c = Ka(a.url);
|
|
1387
|
-
if (c && !V.protocols.includes(c)) {
|
|
1388
|
-
n(
|
|
1389
|
-
new S(
|
|
1390
|
-
"Unsupported protocol " + c + ":",
|
|
1391
|
-
S.ERR_BAD_REQUEST,
|
|
1392
|
-
e
|
|
1393
|
-
)
|
|
1394
|
-
), g();
|
|
1395
|
-
return;
|
|
1396
|
-
}
|
|
1397
|
-
y.send(o || null);
|
|
1398
|
-
});
|
|
1399
|
-
}, po = (e, t) => {
|
|
1400
|
-
if (e = e ? e.filter(Boolean) : [], !t && !e.length)
|
|
1401
|
-
return;
|
|
1402
|
-
const n = new AbortController();
|
|
1403
|
-
let a = !1;
|
|
1404
|
-
const o = function(u) {
|
|
1405
|
-
if (!a) {
|
|
1406
|
-
a = !0, s();
|
|
1407
|
-
const p = u instanceof Error ? u : this.reason;
|
|
1408
|
-
n.abort(
|
|
1409
|
-
p instanceof S ? p : new Ie(p instanceof Error ? p.message : p)
|
|
1410
|
-
);
|
|
1411
|
-
}
|
|
1412
|
-
};
|
|
1413
|
-
let r = t && setTimeout(() => {
|
|
1414
|
-
r = null, o(new S(`timeout of ${t}ms exceeded`, S.ETIMEDOUT));
|
|
1415
|
-
}, t);
|
|
1416
|
-
const s = () => {
|
|
1417
|
-
e && (r && clearTimeout(r), r = null, e.forEach((u) => {
|
|
1418
|
-
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1419
|
-
}), e = null);
|
|
1420
|
-
};
|
|
1421
|
-
e.forEach((u) => u.addEventListener("abort", o, { once: !0 }));
|
|
1422
|
-
const { signal: i } = n;
|
|
1423
|
-
return i.unsubscribe = () => l.asap(s), i;
|
|
1424
|
-
}, fo = po, mo = function* (e, t) {
|
|
1425
|
-
let n = e.byteLength;
|
|
1426
|
-
if (!t || n < t) {
|
|
1427
|
-
yield e;
|
|
1428
|
-
return;
|
|
1429
|
-
}
|
|
1430
|
-
let a = 0, o;
|
|
1431
|
-
for (; a < n; )
|
|
1432
|
-
o = a + t, yield e.slice(a, o), a = o;
|
|
1433
|
-
}, go = async function* (e, t) {
|
|
1434
|
-
for await (const n of ho(e))
|
|
1435
|
-
yield* mo(n, t);
|
|
1436
|
-
}, ho = async function* (e) {
|
|
1437
|
-
if (e[Symbol.asyncIterator]) {
|
|
1438
|
-
yield* e;
|
|
1439
|
-
return;
|
|
1440
|
-
}
|
|
1441
|
-
const t = e.getReader();
|
|
1442
|
-
try {
|
|
1443
|
-
for (; ; ) {
|
|
1444
|
-
const { done: n, value: a } = await t.read();
|
|
1445
|
-
if (n)
|
|
1446
|
-
break;
|
|
1447
|
-
yield a;
|
|
1448
|
-
}
|
|
1449
|
-
} finally {
|
|
1450
|
-
await t.cancel();
|
|
1451
|
-
}
|
|
1452
|
-
}, Ut = (e, t, n, a) => {
|
|
1453
|
-
const o = go(e, t);
|
|
1454
|
-
let r = 0, s, i = (u) => {
|
|
1455
|
-
s || (s = !0, a && a(u));
|
|
1456
|
-
};
|
|
1457
|
-
return new ReadableStream(
|
|
1458
|
-
{
|
|
1459
|
-
async pull(u) {
|
|
1460
|
-
try {
|
|
1461
|
-
const { done: p, value: d } = await o.next();
|
|
1462
|
-
if (p) {
|
|
1463
|
-
i(), u.close();
|
|
1464
|
-
return;
|
|
1465
|
-
}
|
|
1466
|
-
let f = d.byteLength;
|
|
1467
|
-
if (n) {
|
|
1468
|
-
let b = r += f;
|
|
1469
|
-
n(b);
|
|
1470
|
-
}
|
|
1471
|
-
u.enqueue(new Uint8Array(d));
|
|
1472
|
-
} catch (p) {
|
|
1473
|
-
throw i(p), p;
|
|
1474
|
-
}
|
|
1475
|
-
},
|
|
1476
|
-
cancel(u) {
|
|
1477
|
-
return i(u), o.return();
|
|
1478
|
-
}
|
|
1479
|
-
},
|
|
1480
|
-
{
|
|
1481
|
-
highWaterMark: 2
|
|
1482
|
-
}
|
|
1483
|
-
);
|
|
1484
|
-
}, We = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, bo = (e, t, n) => t + 2 < n && We(e.charCodeAt(t + 1)) && We(e.charCodeAt(t + 2));
|
|
1485
|
-
function yo(e) {
|
|
1486
|
-
if (!e || typeof e != "string" || !e.startsWith("data:"))
|
|
1487
|
-
return 0;
|
|
1488
|
-
const t = e.indexOf(",");
|
|
1489
|
-
if (t < 0)
|
|
1490
|
-
return 0;
|
|
1491
|
-
const n = e.slice(5, t), a = e.slice(t + 1);
|
|
1492
|
-
if (/;base64/i.test(n)) {
|
|
1493
|
-
let r = a.length;
|
|
1494
|
-
const s = a.length;
|
|
1495
|
-
for (let f = 0; f < s; f++)
|
|
1496
|
-
if (a.charCodeAt(f) === 37 && f + 2 < s) {
|
|
1497
|
-
const b = a.charCodeAt(f + 1), w = a.charCodeAt(f + 2);
|
|
1498
|
-
We(b) && We(w) && (r -= 2, f += 2);
|
|
1499
|
-
}
|
|
1500
|
-
let i = 0, u = s - 1;
|
|
1501
|
-
const p = (f) => f >= 2 && a.charCodeAt(f - 2) === 37 && // '%'
|
|
1502
|
-
a.charCodeAt(f - 1) === 51 && // '3'
|
|
1503
|
-
(a.charCodeAt(f) === 68 || a.charCodeAt(f) === 100);
|
|
1504
|
-
u >= 0 && (a.charCodeAt(u) === 61 ? (i++, u--) : p(u) && (i++, u -= 3)), i === 1 && u >= 0 && (a.charCodeAt(u) === 61 || p(u)) && i++;
|
|
1505
|
-
const d = Math.floor(r / 4) * 3 - (i || 0);
|
|
1506
|
-
return d > 0 ? d : 0;
|
|
1507
|
-
}
|
|
1508
|
-
let o = 0;
|
|
1509
|
-
for (let r = 0, s = a.length; r < s; r++) {
|
|
1510
|
-
const i = a.charCodeAt(r);
|
|
1511
|
-
if (i === 37 && bo(a, r, s))
|
|
1512
|
-
o += 1, r += 2;
|
|
1513
|
-
else if (i < 128)
|
|
1514
|
-
o += 1;
|
|
1515
|
-
else if (i < 2048)
|
|
1516
|
-
o += 2;
|
|
1517
|
-
else if (i >= 55296 && i <= 56319 && r + 1 < s) {
|
|
1518
|
-
const u = a.charCodeAt(r + 1);
|
|
1519
|
-
u >= 56320 && u <= 57343 ? (o += 4, r++) : o += 3;
|
|
1520
|
-
} else
|
|
1521
|
-
o += 3;
|
|
1522
|
-
}
|
|
1523
|
-
return o;
|
|
1524
|
-
}
|
|
1525
|
-
const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeURIComponent(e).replace(
|
|
1526
|
-
/%([0-9A-F]{2})/gi,
|
|
1527
|
-
(t, n) => String.fromCharCode(parseInt(n, 16))
|
|
1528
|
-
), Mt = (e) => {
|
|
1529
|
-
if (!l.isString(e))
|
|
1530
|
-
return e;
|
|
1531
|
-
try {
|
|
1532
|
-
return decodeURIComponent(e);
|
|
1533
|
-
} catch {
|
|
1534
|
-
return e;
|
|
1535
|
-
}
|
|
1536
|
-
}, It = (e, ...t) => {
|
|
1537
|
-
try {
|
|
1538
|
-
return !!e(...t);
|
|
1539
|
-
} catch {
|
|
1540
|
-
return !1;
|
|
1541
|
-
}
|
|
1542
|
-
}, vo = (e) => {
|
|
1543
|
-
const t = e.indexOf("://");
|
|
1544
|
-
let n = e;
|
|
1545
|
-
return t !== -1 && (n = n.slice(t + 3)), n.includes("@") || n.includes(":");
|
|
1546
|
-
}, xo = (e) => {
|
|
1547
|
-
const t = l.global !== void 0 && l.global !== null ? l.global : globalThis, { ReadableStream: n, TextEncoder: a } = t;
|
|
1548
|
-
e = l.merge.call(
|
|
1549
|
-
{
|
|
1550
|
-
skipUndefined: !0
|
|
1551
|
-
},
|
|
1552
|
-
{
|
|
1553
|
-
Request: t.Request,
|
|
1554
|
-
Response: t.Response
|
|
1555
|
-
},
|
|
1556
|
-
e
|
|
1557
|
-
);
|
|
1558
|
-
const { fetch: o, Request: r, Response: s } = e, i = o ? ze(o) : typeof fetch == "function", u = ze(r), p = ze(s);
|
|
1559
|
-
if (!i)
|
|
1560
|
-
return !1;
|
|
1561
|
-
const d = i && ze(n), f = i && (typeof a == "function" ? ((c) => (m) => c.encode(m))(new a()) : async (c) => new Uint8Array(await new r(c).arrayBuffer())), b = u && d && It(() => {
|
|
1562
|
-
let c = !1;
|
|
1563
|
-
const m = new r(V.origin, {
|
|
1564
|
-
body: new n(),
|
|
1565
|
-
method: "POST",
|
|
1566
|
-
get duplex() {
|
|
1567
|
-
return c = !0, "half";
|
|
1568
|
-
}
|
|
1569
|
-
}), v = m.headers.has("Content-Type");
|
|
1570
|
-
return m.body != null && m.body.cancel(), c && !v;
|
|
1571
|
-
}), w = p && d && It(() => l.isReadableStream(new s("").body)), g = {
|
|
1572
|
-
stream: w && ((c) => c.body)
|
|
1573
|
-
};
|
|
1574
|
-
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
|
|
1575
|
-
!g[c] && (g[c] = (m, v) => {
|
|
1576
|
-
let E = m && m[c];
|
|
1577
|
-
if (E)
|
|
1578
|
-
return E.call(m);
|
|
1579
|
-
throw new S(
|
|
1580
|
-
`Response type '${c}' is not supported`,
|
|
1581
|
-
S.ERR_NOT_SUPPORT,
|
|
1582
|
-
v
|
|
1583
|
-
);
|
|
1584
|
-
});
|
|
1585
|
-
});
|
|
1586
|
-
const y = async (c) => {
|
|
1587
|
-
if (c == null)
|
|
1588
|
-
return 0;
|
|
1589
|
-
if (l.isBlob(c))
|
|
1590
|
-
return c.size;
|
|
1591
|
-
if (l.isSpecCompliantForm(c))
|
|
1592
|
-
return (await new r(V.origin, {
|
|
1593
|
-
method: "POST",
|
|
1594
|
-
body: c
|
|
1595
|
-
}).arrayBuffer()).byteLength;
|
|
1596
|
-
if (l.isArrayBufferView(c) || l.isArrayBuffer(c))
|
|
1597
|
-
return c.byteLength;
|
|
1598
|
-
if (l.isURLSearchParams(c) && (c = c + ""), l.isString(c))
|
|
1599
|
-
return (await f(c)).byteLength;
|
|
1600
|
-
}, U = async (c, m) => l.toFiniteNumber(c.getContentLength()) ?? y(m);
|
|
1601
|
-
return async (c) => {
|
|
1602
|
-
let {
|
|
1603
|
-
url: m,
|
|
1604
|
-
method: v,
|
|
1605
|
-
data: E,
|
|
1606
|
-
signal: x,
|
|
1607
|
-
cancelToken: B,
|
|
1608
|
-
timeout: C,
|
|
1609
|
-
onDownloadProgress: de,
|
|
1610
|
-
onUploadProgress: oe,
|
|
1611
|
-
responseType: Y,
|
|
1612
|
-
headers: F,
|
|
1613
|
-
withCredentials: re = "same-origin",
|
|
1614
|
-
fetchOptions: ke,
|
|
1615
|
-
maxContentLength: G,
|
|
1616
|
-
maxBodyLength: ne
|
|
1617
|
-
} = fn(c);
|
|
1618
|
-
const K = l.isNumber(G) && G > -1, Ne = l.isNumber(ne) && ne > -1, tt = (D) => l.hasOwnProp(c, D) ? c[D] : void 0;
|
|
1619
|
-
let A = o || fetch;
|
|
1620
|
-
Y = Y ? (Y + "").toLowerCase() : "text";
|
|
1621
|
-
let R = fo(
|
|
1622
|
-
[x, B && B.toAbortSignal()],
|
|
1623
|
-
C
|
|
1624
|
-
), j = null;
|
|
1625
|
-
const se = R && R.unsubscribe && (() => {
|
|
1626
|
-
R.unsubscribe();
|
|
1627
|
-
});
|
|
1628
|
-
let pe, fe = null;
|
|
1629
|
-
const z = () => new S(
|
|
1630
|
-
"Request body larger than maxBodyLength limit",
|
|
1631
|
-
S.ERR_BAD_REQUEST,
|
|
1632
|
-
c,
|
|
1633
|
-
j
|
|
1634
|
-
);
|
|
1635
|
-
try {
|
|
1636
|
-
let D;
|
|
1637
|
-
const J = tt("auth");
|
|
1638
|
-
if (J) {
|
|
1639
|
-
const _ = l.getSafeProp(J, "username") || "", X = l.getSafeProp(J, "password") || "";
|
|
1640
|
-
D = {
|
|
1641
|
-
username: _,
|
|
1642
|
-
password: X
|
|
1643
|
-
};
|
|
1644
|
-
}
|
|
1645
|
-
if (vo(m)) {
|
|
1646
|
-
const _ = new URL(m, V.origin);
|
|
1647
|
-
if (!D && (_.username || _.password)) {
|
|
1648
|
-
const X = Mt(_.username), ce = Mt(_.password);
|
|
1649
|
-
D = {
|
|
1650
|
-
username: X,
|
|
1651
|
-
password: ce
|
|
1652
|
-
};
|
|
1653
|
-
}
|
|
1654
|
-
(_.username || _.password) && (_.username = "", _.password = "", m = _.href);
|
|
1655
|
-
}
|
|
1656
|
-
if (D && (F.delete("authorization"), F.set(
|
|
1657
|
-
"Authorization",
|
|
1658
|
-
"Basic " + btoa(wo((D.username || "") + ":" + (D.password || "")))
|
|
1659
|
-
)), K && typeof m == "string" && m.startsWith("data:") && yo(m) > G)
|
|
1660
|
-
throw new S(
|
|
1661
|
-
"maxContentLength size of " + G + " exceeded",
|
|
1662
|
-
S.ERR_BAD_RESPONSE,
|
|
1663
|
-
c,
|
|
1664
|
-
j
|
|
1665
|
-
);
|
|
1666
|
-
if (Ne && v !== "get" && v !== "head") {
|
|
1667
|
-
const _ = await y(E);
|
|
1668
|
-
if (typeof _ == "number" && isFinite(_) && (pe = _, _ > ne))
|
|
1669
|
-
throw z();
|
|
1670
|
-
}
|
|
1671
|
-
const me = Ne && (l.isReadableStream(E) || l.isStream(E)), Et = (_, X, ce) => Ut(
|
|
1672
|
-
_,
|
|
1673
|
-
jt,
|
|
1674
|
-
(ge) => {
|
|
1675
|
-
if (Ne && ge > ne)
|
|
1676
|
-
throw fe = z();
|
|
1677
|
-
X && X(ge);
|
|
1678
|
-
},
|
|
1679
|
-
ce
|
|
1680
|
-
);
|
|
1681
|
-
if (b && v !== "get" && v !== "head" && (oe || me)) {
|
|
1682
|
-
if (pe = pe ?? await U(F, E), pe !== 0 || me) {
|
|
1683
|
-
let _ = new r(m, {
|
|
1684
|
-
method: "POST",
|
|
1685
|
-
body: E,
|
|
1686
|
-
duplex: "half"
|
|
1687
|
-
}), X;
|
|
1688
|
-
if (l.isFormData(E) && (X = _.headers.get("content-type")) && F.setContentType(X), _.body) {
|
|
1689
|
-
const [ce, ge] = oe && Dt(
|
|
1690
|
-
pe,
|
|
1691
|
-
Je(Nt(oe))
|
|
1692
|
-
) || [];
|
|
1693
|
-
E = Et(_.body, ce, ge);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
} else if (me && !u && d && v !== "get" && v !== "head")
|
|
1697
|
-
E = Et(E);
|
|
1698
|
-
else if (me && u && !b && v !== "get" && v !== "head")
|
|
1699
|
-
throw new S(
|
|
1700
|
-
"Stream request bodies are not supported by the current fetch implementation",
|
|
1701
|
-
S.ERR_NOT_SUPPORT,
|
|
1702
|
-
c,
|
|
1703
|
-
j
|
|
1704
|
-
);
|
|
1705
|
-
l.isString(re) || (re = re ? "include" : "omit");
|
|
1706
|
-
const xn = u && "credentials" in r.prototype;
|
|
1707
|
-
if (l.isFormData(E)) {
|
|
1708
|
-
const _ = F.getContentType();
|
|
1709
|
-
_ && /^multipart\/form-data/i.test(_) && !/boundary=/i.test(_) && F.delete("content-type");
|
|
1710
|
-
}
|
|
1711
|
-
F.set("User-Agent", "axios/" + vt, !1);
|
|
1712
|
-
const kt = {
|
|
1713
|
-
...ke,
|
|
1714
|
-
signal: R,
|
|
1715
|
-
method: v.toUpperCase(),
|
|
1716
|
-
headers: nn(F.normalize()),
|
|
1717
|
-
body: E,
|
|
1718
|
-
duplex: "half",
|
|
1719
|
-
credentials: xn ? re : void 0
|
|
1720
|
-
};
|
|
1721
|
-
j = u && new r(m, kt);
|
|
1722
|
-
let ie = await (u ? A(j, ke) : A(m, kt));
|
|
1723
|
-
const Pt = Z.from(ie.headers);
|
|
1724
|
-
if (K) {
|
|
1725
|
-
const _ = l.toFiniteNumber(Pt.getContentLength());
|
|
1726
|
-
if (_ != null && _ > G)
|
|
1727
|
-
throw new S(
|
|
1728
|
-
"maxContentLength size of " + G + " exceeded",
|
|
1729
|
-
S.ERR_BAD_RESPONSE,
|
|
1730
|
-
c,
|
|
1731
|
-
j
|
|
1732
|
-
);
|
|
1733
|
-
}
|
|
1734
|
-
const nt = w && (Y === "stream" || Y === "response");
|
|
1735
|
-
if (w && ie.body && (de || K || nt && se)) {
|
|
1736
|
-
const _ = {};
|
|
1737
|
-
["status", "statusText", "headers"].forEach((Fe) => {
|
|
1738
|
-
_[Fe] = ie[Fe];
|
|
1739
|
-
});
|
|
1740
|
-
const X = l.toFiniteNumber(Pt.getContentLength()), [ce, ge] = de && Dt(
|
|
1741
|
-
X,
|
|
1742
|
-
Je(Nt(de), !0)
|
|
1743
|
-
) || [];
|
|
1744
|
-
let Ot = 0;
|
|
1745
|
-
const Sn = (Fe) => {
|
|
1746
|
-
if (K && (Ot = Fe, Ot > G))
|
|
1747
|
-
throw new S(
|
|
1748
|
-
"maxContentLength size of " + G + " exceeded",
|
|
1749
|
-
S.ERR_BAD_RESPONSE,
|
|
1750
|
-
c,
|
|
1751
|
-
j
|
|
1752
|
-
);
|
|
1753
|
-
ce && ce(Fe);
|
|
1754
|
-
};
|
|
1755
|
-
ie = new s(
|
|
1756
|
-
Ut(ie.body, jt, Sn, () => {
|
|
1757
|
-
ge && ge(), se && se();
|
|
1758
|
-
}),
|
|
1759
|
-
_
|
|
1760
|
-
);
|
|
1761
|
-
}
|
|
1762
|
-
Y = Y || "text";
|
|
1763
|
-
let le = await g[l.findKey(g, Y) || "text"](
|
|
1764
|
-
ie,
|
|
1765
|
-
c
|
|
1766
|
-
);
|
|
1767
|
-
if (K && !w && !nt) {
|
|
1768
|
-
let _;
|
|
1769
|
-
if (le != null && (typeof le.byteLength == "number" ? _ = le.byteLength : typeof le.size == "number" ? _ = le.size : typeof le == "string" && (_ = typeof a == "function" ? new a().encode(le).byteLength : le.length)), typeof _ == "number" && _ > G)
|
|
1770
|
-
throw new S(
|
|
1771
|
-
"maxContentLength size of " + G + " exceeded",
|
|
1772
|
-
S.ERR_BAD_RESPONSE,
|
|
1773
|
-
c,
|
|
1774
|
-
j
|
|
1775
|
-
);
|
|
1776
|
-
}
|
|
1777
|
-
return !nt && se && se(), await new Promise((_, X) => {
|
|
1778
|
-
dn(_, X, {
|
|
1779
|
-
data: le,
|
|
1780
|
-
headers: Z.from(ie.headers),
|
|
1781
|
-
status: ie.status,
|
|
1782
|
-
statusText: ie.statusText,
|
|
1783
|
-
config: c,
|
|
1784
|
-
request: j
|
|
1785
|
-
});
|
|
1786
|
-
});
|
|
1787
|
-
} catch (D) {
|
|
1788
|
-
if (se && se(), R && R.aborted && R.reason instanceof S) {
|
|
1789
|
-
const J = R.reason;
|
|
1790
|
-
throw J.config = c, j && (J.request = j), D !== J && Object.defineProperty(J, "cause", {
|
|
1791
|
-
__proto__: null,
|
|
1792
|
-
value: D,
|
|
1793
|
-
writable: !0,
|
|
1794
|
-
enumerable: !1,
|
|
1795
|
-
configurable: !0
|
|
1796
|
-
}), J;
|
|
1797
|
-
}
|
|
1798
|
-
if (fe)
|
|
1799
|
-
throw j && !fe.request && (fe.request = j), fe;
|
|
1800
|
-
if (D instanceof S)
|
|
1801
|
-
throw j && !D.request && (D.request = j), D;
|
|
1802
|
-
if (D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message)) {
|
|
1803
|
-
const J = new S(
|
|
1804
|
-
"Network Error",
|
|
1805
|
-
S.ERR_NETWORK,
|
|
1806
|
-
c,
|
|
1807
|
-
j,
|
|
1808
|
-
D && D.response
|
|
1809
|
-
);
|
|
1810
|
-
throw Object.defineProperty(J, "cause", {
|
|
1811
|
-
__proto__: null,
|
|
1812
|
-
value: D.cause || D,
|
|
1813
|
-
writable: !0,
|
|
1814
|
-
enumerable: !1,
|
|
1815
|
-
configurable: !0
|
|
1816
|
-
}), J;
|
|
1817
|
-
}
|
|
1818
|
-
throw S.from(D, D && D.code, c, j, D && D.response);
|
|
1819
|
-
}
|
|
1820
|
-
};
|
|
1821
|
-
}, So = /* @__PURE__ */ new Map(), mn = (e) => {
|
|
1822
|
-
let t = e && e.env || {};
|
|
1823
|
-
const { fetch: n, Request: a, Response: o } = t, r = [a, o, n];
|
|
1824
|
-
let s = r.length, i = s, u, p, d = So;
|
|
1825
|
-
for (; i--; )
|
|
1826
|
-
u = r[i], p = d.get(u), p === void 0 && d.set(u, p = i ? /* @__PURE__ */ new Map() : xo(t)), d = p;
|
|
1827
|
-
return p;
|
|
1828
|
-
};
|
|
1829
|
-
mn();
|
|
1830
|
-
const xt = {
|
|
1831
|
-
http: Ba,
|
|
1832
|
-
xhr: co,
|
|
1833
|
-
fetch: {
|
|
1834
|
-
get: mn
|
|
1835
|
-
}
|
|
1836
|
-
};
|
|
1837
|
-
l.forEach(xt, (e, t) => {
|
|
1838
|
-
if (e) {
|
|
1839
|
-
try {
|
|
1840
|
-
Object.defineProperty(e, "name", { __proto__: null, value: t });
|
|
1841
|
-
} catch {
|
|
1842
|
-
}
|
|
1843
|
-
Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
|
|
1844
|
-
}
|
|
1845
|
-
});
|
|
1846
|
-
const zt = (e) => `- ${e}`, Eo = (e) => l.isFunction(e) || e === null || e === !1;
|
|
1847
|
-
function ko(e, t) {
|
|
1848
|
-
e = l.isArray(e) ? e : [e];
|
|
1849
|
-
const { length: n } = e;
|
|
1850
|
-
let a, o;
|
|
1851
|
-
const r = {};
|
|
1852
|
-
for (let s = 0; s < n; s++) {
|
|
1853
|
-
a = e[s];
|
|
1854
|
-
let i;
|
|
1855
|
-
if (o = a, !Eo(a) && (o = xt[(i = String(a)).toLowerCase()], o === void 0))
|
|
1856
|
-
throw new S(`Unknown adapter '${i}'`);
|
|
1857
|
-
if (o && (l.isFunction(o) || (o = o.get(t))))
|
|
1858
|
-
break;
|
|
1859
|
-
r[i || "#" + s] = o;
|
|
1860
|
-
}
|
|
1861
|
-
if (!o) {
|
|
1862
|
-
const s = Object.entries(r).map(
|
|
1863
|
-
([u, p]) => `adapter ${u} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1864
|
-
);
|
|
1865
|
-
let i = n ? s.length > 1 ? `since :
|
|
1866
|
-
` + s.map(zt).join(`
|
|
1867
|
-
`) : " " + zt(s[0]) : "as no adapter specified";
|
|
1868
|
-
throw new S(
|
|
1869
|
-
"There is no suitable adapter to dispatch the request " + i,
|
|
1870
|
-
S.ERR_NOT_SUPPORT
|
|
1871
|
-
);
|
|
1872
|
-
}
|
|
1873
|
-
return o;
|
|
1874
|
-
}
|
|
1875
|
-
const gn = {
|
|
1876
|
-
/**
|
|
1877
|
-
* Resolve an adapter from a list of adapter names or functions.
|
|
1878
|
-
* @type {Function}
|
|
1879
|
-
*/
|
|
1880
|
-
getAdapter: ko,
|
|
1881
|
-
/**
|
|
1882
|
-
* Exposes all known adapters
|
|
1883
|
-
* @type {Object<string, Function|Object>}
|
|
1884
|
-
*/
|
|
1885
|
-
adapters: xt
|
|
1886
|
-
};
|
|
1887
|
-
function it(e) {
|
|
1888
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1889
|
-
throw new Ie(null, e);
|
|
1890
|
-
}
|
|
1891
|
-
function Vt(e) {
|
|
1892
|
-
return it(e), e.headers = Z.from(e.headers), e.data = st.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gn.getAdapter(e.adapter || wt.adapter, e)(e).then(
|
|
1893
|
-
function(t) {
|
|
1894
|
-
it(e), e.response = t;
|
|
1895
|
-
try {
|
|
1896
|
-
t.data = st.call(e, e.transformResponse, t);
|
|
1897
|
-
} finally {
|
|
1898
|
-
delete e.response;
|
|
1899
|
-
}
|
|
1900
|
-
return t.headers = Z.from(t.headers), t;
|
|
1901
|
-
},
|
|
1902
|
-
function(t) {
|
|
1903
|
-
if (!cn(t) && (it(e), t && t.response)) {
|
|
1904
|
-
e.response = t.response;
|
|
1905
|
-
try {
|
|
1906
|
-
t.response.data = st.call(
|
|
1907
|
-
e,
|
|
1908
|
-
e.transformResponse,
|
|
1909
|
-
t.response
|
|
1910
|
-
);
|
|
1911
|
-
} finally {
|
|
1912
|
-
delete e.response;
|
|
1913
|
-
}
|
|
1914
|
-
t.response.headers = Z.from(t.response.headers);
|
|
1915
|
-
}
|
|
1916
|
-
return Promise.reject(t);
|
|
1917
|
-
}
|
|
1918
|
-
);
|
|
1919
|
-
}
|
|
1920
|
-
const Ye = {};
|
|
1921
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1922
|
-
Ye[e] = function(n) {
|
|
1923
|
-
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1924
|
-
};
|
|
1925
|
-
});
|
|
1926
|
-
const qt = {};
|
|
1927
|
-
Ye.transitional = function(e, t, n) {
|
|
1928
|
-
function a(o, r) {
|
|
1929
|
-
return "[Axios v" + vt + "] Transitional option '" + o + "'" + r + (n ? ". " + n : "");
|
|
1930
|
-
}
|
|
1931
|
-
return (o, r, s) => {
|
|
1932
|
-
if (e === !1)
|
|
1933
|
-
throw new S(
|
|
1934
|
-
a(r, " has been removed" + (t ? " in " + t : "")),
|
|
1935
|
-
S.ERR_DEPRECATED
|
|
1936
|
-
);
|
|
1937
|
-
return t && !qt[r] && (qt[r] = !0, console.warn(
|
|
1938
|
-
a(
|
|
1939
|
-
r,
|
|
1940
|
-
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
1941
|
-
)
|
|
1942
|
-
)), e ? e(o, r, s) : !0;
|
|
1943
|
-
};
|
|
1944
|
-
};
|
|
1945
|
-
Ye.spelling = function(e) {
|
|
1946
|
-
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1947
|
-
};
|
|
1948
|
-
function Po(e, t, n) {
|
|
1949
|
-
if (typeof e != "object" || e === null)
|
|
1950
|
-
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
1951
|
-
const a = Object.keys(e);
|
|
1952
|
-
let o = a.length;
|
|
1953
|
-
for (; o-- > 0; ) {
|
|
1954
|
-
const r = a[o], s = Object.prototype.hasOwnProperty.call(t, r) ? t[r] : void 0;
|
|
1955
|
-
if (s) {
|
|
1956
|
-
const i = e[r], u = i === void 0 || s(i, r, e);
|
|
1957
|
-
if (u !== !0)
|
|
1958
|
-
throw new S(
|
|
1959
|
-
"option " + r + " must be " + u,
|
|
1960
|
-
S.ERR_BAD_OPTION_VALUE
|
|
1961
|
-
);
|
|
1962
|
-
continue;
|
|
1963
|
-
}
|
|
1964
|
-
if (n !== !0)
|
|
1965
|
-
throw new S("Unknown option " + r, S.ERR_BAD_OPTION);
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
const $e = {
|
|
1969
|
-
assertOptions: Po,
|
|
1970
|
-
validators: Ye
|
|
1971
|
-
}, $ = $e.validators;
|
|
1972
|
-
class Ke {
|
|
1973
|
-
constructor(t) {
|
|
1974
|
-
this.defaults = t || {}, this.interceptors = {
|
|
1975
|
-
request: new Bt(),
|
|
1976
|
-
response: new Bt()
|
|
1977
|
-
};
|
|
1978
|
-
}
|
|
1979
|
-
/**
|
|
1980
|
-
* Dispatch a request
|
|
1981
|
-
*
|
|
1982
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1983
|
-
* @param {?Object} config
|
|
1984
|
-
*
|
|
1985
|
-
* @returns {Promise} The Promise to be fulfilled
|
|
1986
|
-
*/
|
|
1987
|
-
async request(t, n) {
|
|
1988
|
-
try {
|
|
1989
|
-
return await this._request(t, n);
|
|
1990
|
-
} catch (a) {
|
|
1991
|
-
if (a instanceof Error) {
|
|
1992
|
-
let o = {};
|
|
1993
|
-
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1994
|
-
const r = (() => {
|
|
1995
|
-
if (!o.stack)
|
|
1996
|
-
return "";
|
|
1997
|
-
const s = o.stack.indexOf(`
|
|
1998
|
-
`);
|
|
1999
|
-
return s === -1 ? "" : o.stack.slice(s + 1);
|
|
2000
|
-
})();
|
|
2001
|
-
try {
|
|
2002
|
-
if (!a.stack)
|
|
2003
|
-
a.stack = r;
|
|
2004
|
-
else if (r) {
|
|
2005
|
-
const s = r.indexOf(`
|
|
2006
|
-
`), i = s === -1 ? -1 : r.indexOf(`
|
|
2007
|
-
`, s + 1), u = i === -1 ? "" : r.slice(i + 1);
|
|
2008
|
-
String(a.stack).endsWith(u) || (a.stack += `
|
|
2009
|
-
` + r);
|
|
2010
|
-
}
|
|
2011
|
-
} catch {
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
throw a;
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
_request(t, n) {
|
|
2018
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = xe(this.defaults, n);
|
|
2019
|
-
const { transitional: a, paramsSerializer: o, headers: r } = n;
|
|
2020
|
-
a !== void 0 && $e.assertOptions(
|
|
2021
|
-
a,
|
|
2022
|
-
{
|
|
2023
|
-
silentJSONParsing: $.transitional($.boolean),
|
|
2024
|
-
forcedJSONParsing: $.transitional($.boolean),
|
|
2025
|
-
clarifyTimeoutError: $.transitional($.boolean),
|
|
2026
|
-
legacyInterceptorReqResOrdering: $.transitional($.boolean),
|
|
2027
|
-
advertiseZstdAcceptEncoding: $.transitional($.boolean),
|
|
2028
|
-
validateStatusUndefinedResolves: $.transitional($.boolean)
|
|
2029
|
-
},
|
|
2030
|
-
!1
|
|
2031
|
-
), o != null && (l.isFunction(o) ? n.paramsSerializer = {
|
|
2032
|
-
serialize: o
|
|
2033
|
-
} : $e.assertOptions(
|
|
2034
|
-
o,
|
|
2035
|
-
{
|
|
2036
|
-
encode: $.function,
|
|
2037
|
-
serialize: $.function
|
|
2038
|
-
},
|
|
2039
|
-
!0
|
|
2040
|
-
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), $e.assertOptions(
|
|
2041
|
-
n,
|
|
2042
|
-
{
|
|
2043
|
-
baseUrl: $.spelling("baseURL"),
|
|
2044
|
-
withXsrfToken: $.spelling("withXSRFToken")
|
|
2045
|
-
},
|
|
2046
|
-
!0
|
|
2047
|
-
), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2048
|
-
let s = r && l.merge(r.common, r[n.method]);
|
|
2049
|
-
r && l.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (g) => {
|
|
2050
|
-
delete r[g];
|
|
2051
|
-
}), n.headers = Z.concat(s, r);
|
|
2052
|
-
const i = [];
|
|
2053
|
-
let u = !0;
|
|
2054
|
-
this.interceptors.request.forEach(function(g) {
|
|
2055
|
-
if (typeof g.runWhen == "function" && g.runWhen(n) === !1)
|
|
2056
|
-
return;
|
|
2057
|
-
u = u && g.synchronous;
|
|
2058
|
-
const y = n.transitional || ht;
|
|
2059
|
-
y && y.legacyInterceptorReqResOrdering ? i.unshift(g.fulfilled, g.rejected) : i.push(g.fulfilled, g.rejected);
|
|
2060
|
-
});
|
|
2061
|
-
const p = [];
|
|
2062
|
-
this.interceptors.response.forEach(function(g) {
|
|
2063
|
-
p.push(g.fulfilled, g.rejected);
|
|
2064
|
-
});
|
|
2065
|
-
let d, f = 0, b;
|
|
2066
|
-
if (!u) {
|
|
2067
|
-
const g = [Vt.bind(this), void 0];
|
|
2068
|
-
for (g.unshift(...i), g.push(...p), b = g.length, d = Promise.resolve(n); f < b; )
|
|
2069
|
-
d = d.then(g[f++], g[f++]);
|
|
2070
|
-
return d;
|
|
2071
|
-
}
|
|
2072
|
-
b = i.length;
|
|
2073
|
-
let w = n;
|
|
2074
|
-
for (; f < b; ) {
|
|
2075
|
-
const g = i[f++], y = i[f++];
|
|
2076
|
-
try {
|
|
2077
|
-
w = g(w);
|
|
2078
|
-
} catch (U) {
|
|
2079
|
-
y.call(this, U);
|
|
2080
|
-
break;
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
try {
|
|
2084
|
-
d = Vt.call(this, w);
|
|
2085
|
-
} catch (g) {
|
|
2086
|
-
return Promise.reject(g);
|
|
2087
|
-
}
|
|
2088
|
-
for (f = 0, b = p.length; f < b; )
|
|
2089
|
-
d = d.then(p[f++], p[f++]);
|
|
2090
|
-
return d;
|
|
2091
|
-
}
|
|
2092
|
-
getUri(t) {
|
|
2093
|
-
t = xe(this.defaults, t);
|
|
2094
|
-
const n = pn(t.baseURL, t.url, t.allowAbsoluteUrls, t);
|
|
2095
|
-
return sn(n, t.params, t.paramsSerializer);
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2099
|
-
Ke.prototype[e] = function(t, n) {
|
|
2100
|
-
return this.request(
|
|
2101
|
-
xe(n || {}, {
|
|
2102
|
-
method: e,
|
|
2103
|
-
url: t,
|
|
2104
|
-
data: n && l.hasOwnProp(n, "data") ? n.data : void 0
|
|
2105
|
-
})
|
|
2106
|
-
);
|
|
2107
|
-
};
|
|
2108
|
-
});
|
|
2109
|
-
l.forEach(["post", "put", "patch", "query"], function(e) {
|
|
2110
|
-
function t(n) {
|
|
2111
|
-
return function(a, o, r) {
|
|
2112
|
-
return this.request(
|
|
2113
|
-
xe(r || {}, {
|
|
2114
|
-
method: e,
|
|
2115
|
-
headers: n ? {
|
|
2116
|
-
"Content-Type": "multipart/form-data"
|
|
2117
|
-
} : {},
|
|
2118
|
-
url: a,
|
|
2119
|
-
data: o
|
|
2120
|
-
})
|
|
2121
|
-
);
|
|
2122
|
-
};
|
|
2123
|
-
}
|
|
2124
|
-
Ke.prototype[e] = t(), e !== "query" && (Ke.prototype[e + "Form"] = t(!0));
|
|
2125
|
-
});
|
|
2126
|
-
const Ge = Ke;
|
|
2127
|
-
class St {
|
|
2128
|
-
constructor(t) {
|
|
2129
|
-
if (typeof t != "function")
|
|
2130
|
-
throw new TypeError("executor must be a function.");
|
|
2131
|
-
let n;
|
|
2132
|
-
this.promise = new Promise(function(o) {
|
|
2133
|
-
n = o;
|
|
2134
|
-
});
|
|
2135
|
-
const a = this;
|
|
2136
|
-
this.promise.then((o) => {
|
|
2137
|
-
if (!a._listeners)
|
|
2138
|
-
return;
|
|
2139
|
-
let r = a._listeners.length;
|
|
2140
|
-
for (; r-- > 0; )
|
|
2141
|
-
a._listeners[r](o);
|
|
2142
|
-
a._listeners = null;
|
|
2143
|
-
}), this.promise.then = (o) => {
|
|
2144
|
-
let r;
|
|
2145
|
-
const s = new Promise((i) => {
|
|
2146
|
-
a.subscribe(i), r = i;
|
|
2147
|
-
}).then(o);
|
|
2148
|
-
return s.cancel = function() {
|
|
2149
|
-
a.unsubscribe(r);
|
|
2150
|
-
}, s;
|
|
2151
|
-
}, t(function(o, r, s) {
|
|
2152
|
-
a.reason || (a.reason = new Ie(o, r, s), n(a.reason));
|
|
2153
|
-
});
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
|
2157
|
-
*/
|
|
2158
|
-
throwIfRequested() {
|
|
2159
|
-
if (this.reason)
|
|
2160
|
-
throw this.reason;
|
|
2161
|
-
}
|
|
2162
|
-
/**
|
|
2163
|
-
* Subscribe to the cancel signal
|
|
2164
|
-
*/
|
|
2165
|
-
subscribe(t) {
|
|
2166
|
-
if (this.reason) {
|
|
2167
|
-
t(this.reason);
|
|
2168
|
-
return;
|
|
2169
|
-
}
|
|
2170
|
-
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2171
|
-
}
|
|
2172
|
-
/**
|
|
2173
|
-
* Unsubscribe from the cancel signal
|
|
2174
|
-
*/
|
|
2175
|
-
unsubscribe(t) {
|
|
2176
|
-
if (!this._listeners)
|
|
2177
|
-
return;
|
|
2178
|
-
const n = this._listeners.indexOf(t);
|
|
2179
|
-
n !== -1 && this._listeners.splice(n, 1);
|
|
2180
|
-
}
|
|
2181
|
-
toAbortSignal() {
|
|
2182
|
-
const t = new AbortController(), n = (a) => {
|
|
2183
|
-
t.abort(a);
|
|
2184
|
-
};
|
|
2185
|
-
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2186
|
-
}
|
|
2187
|
-
/**
|
|
2188
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2189
|
-
* cancels the `CancelToken`.
|
|
2190
|
-
*/
|
|
2191
|
-
static source() {
|
|
2192
|
-
let t;
|
|
2193
|
-
return {
|
|
2194
|
-
token: new St(function(n) {
|
|
2195
|
-
t = n;
|
|
2196
|
-
}),
|
|
2197
|
-
cancel: t
|
|
2198
|
-
};
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
const Oo = St;
|
|
2202
|
-
function Ro(e) {
|
|
2203
|
-
return function(t) {
|
|
2204
|
-
return e.apply(null, t);
|
|
2205
|
-
};
|
|
2206
|
-
}
|
|
2207
|
-
function To(e) {
|
|
2208
|
-
return l.isObject(e) && e.isAxiosError === !0;
|
|
2209
|
-
}
|
|
2210
|
-
const dt = {
|
|
2211
|
-
Continue: 100,
|
|
2212
|
-
SwitchingProtocols: 101,
|
|
2213
|
-
Processing: 102,
|
|
2214
|
-
EarlyHints: 103,
|
|
2215
|
-
Ok: 200,
|
|
2216
|
-
Created: 201,
|
|
2217
|
-
Accepted: 202,
|
|
2218
|
-
NonAuthoritativeInformation: 203,
|
|
2219
|
-
NoContent: 204,
|
|
2220
|
-
ResetContent: 205,
|
|
2221
|
-
PartialContent: 206,
|
|
2222
|
-
MultiStatus: 207,
|
|
2223
|
-
AlreadyReported: 208,
|
|
2224
|
-
ImUsed: 226,
|
|
2225
|
-
MultipleChoices: 300,
|
|
2226
|
-
MovedPermanently: 301,
|
|
2227
|
-
Found: 302,
|
|
2228
|
-
SeeOther: 303,
|
|
2229
|
-
NotModified: 304,
|
|
2230
|
-
UseProxy: 305,
|
|
2231
|
-
Unused: 306,
|
|
2232
|
-
TemporaryRedirect: 307,
|
|
2233
|
-
PermanentRedirect: 308,
|
|
2234
|
-
BadRequest: 400,
|
|
2235
|
-
Unauthorized: 401,
|
|
2236
|
-
PaymentRequired: 402,
|
|
2237
|
-
Forbidden: 403,
|
|
2238
|
-
NotFound: 404,
|
|
2239
|
-
MethodNotAllowed: 405,
|
|
2240
|
-
NotAcceptable: 406,
|
|
2241
|
-
ProxyAuthenticationRequired: 407,
|
|
2242
|
-
RequestTimeout: 408,
|
|
2243
|
-
Conflict: 409,
|
|
2244
|
-
Gone: 410,
|
|
2245
|
-
LengthRequired: 411,
|
|
2246
|
-
PreconditionFailed: 412,
|
|
2247
|
-
PayloadTooLarge: 413,
|
|
2248
|
-
UriTooLong: 414,
|
|
2249
|
-
UnsupportedMediaType: 415,
|
|
2250
|
-
RangeNotSatisfiable: 416,
|
|
2251
|
-
ExpectationFailed: 417,
|
|
2252
|
-
ImATeapot: 418,
|
|
2253
|
-
MisdirectedRequest: 421,
|
|
2254
|
-
UnprocessableEntity: 422,
|
|
2255
|
-
Locked: 423,
|
|
2256
|
-
FailedDependency: 424,
|
|
2257
|
-
TooEarly: 425,
|
|
2258
|
-
UpgradeRequired: 426,
|
|
2259
|
-
PreconditionRequired: 428,
|
|
2260
|
-
TooManyRequests: 429,
|
|
2261
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
2262
|
-
UnavailableForLegalReasons: 451,
|
|
2263
|
-
InternalServerError: 500,
|
|
2264
|
-
NotImplemented: 501,
|
|
2265
|
-
BadGateway: 502,
|
|
2266
|
-
ServiceUnavailable: 503,
|
|
2267
|
-
GatewayTimeout: 504,
|
|
2268
|
-
HttpVersionNotSupported: 505,
|
|
2269
|
-
VariantAlsoNegotiates: 506,
|
|
2270
|
-
InsufficientStorage: 507,
|
|
2271
|
-
LoopDetected: 508,
|
|
2272
|
-
NotExtended: 510,
|
|
2273
|
-
NetworkAuthenticationRequired: 511,
|
|
2274
|
-
WebServerIsDown: 521,
|
|
2275
|
-
ConnectionTimedOut: 522,
|
|
2276
|
-
OriginIsUnreachable: 523,
|
|
2277
|
-
TimeoutOccurred: 524,
|
|
2278
|
-
SslHandshakeFailed: 525,
|
|
2279
|
-
InvalidSslCertificate: 526
|
|
2280
|
-
};
|
|
2281
|
-
Object.entries(dt).forEach(([e, t]) => {
|
|
2282
|
-
dt[t] = e;
|
|
2283
|
-
});
|
|
2284
|
-
const _o = dt;
|
|
2285
|
-
function hn(e) {
|
|
2286
|
-
const t = new Ge(e), n = Jt(Ge.prototype.request, t);
|
|
2287
|
-
return l.extend(n, Ge.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(a) {
|
|
2288
|
-
return hn(xe(e, a));
|
|
2289
|
-
}, n;
|
|
2290
|
-
}
|
|
2291
|
-
const I = hn(wt);
|
|
2292
|
-
I.Axios = Ge;
|
|
2293
|
-
I.CanceledError = Ie;
|
|
2294
|
-
I.CancelToken = Oo;
|
|
2295
|
-
I.isCancel = cn;
|
|
2296
|
-
I.VERSION = vt;
|
|
2297
|
-
I.toFormData = Ze;
|
|
2298
|
-
I.AxiosError = S;
|
|
2299
|
-
I.Cancel = I.CanceledError;
|
|
2300
|
-
I.all = function(e) {
|
|
2301
|
-
return Promise.all(e);
|
|
2302
|
-
};
|
|
2303
|
-
I.spread = Ro;
|
|
2304
|
-
I.isAxiosError = To;
|
|
2305
|
-
I.mergeConfig = xe;
|
|
2306
|
-
I.AxiosHeaders = Z;
|
|
2307
|
-
I.formToJSON = (e) => un(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
2308
|
-
I.getAdapter = gn.getAdapter;
|
|
2309
|
-
I.HttpStatusCode = _o;
|
|
2310
|
-
I.default = I;
|
|
2311
|
-
const Ao = I;
|
|
2312
|
-
function Bo(e, t) {
|
|
2313
|
-
const n = t && t.toUpperCase() !== "MY" ? `.${t.toLowerCase()}` : "";
|
|
2314
|
-
return `https://portal-v2${e === "dev" ? "-dev" : ""}${n}.feedmeapi.com`;
|
|
2315
|
-
}
|
|
2316
|
-
function Co(e, t) {
|
|
2317
|
-
return Bo(e, t);
|
|
2318
|
-
}
|
|
2319
|
-
function Be() {
|
|
2320
|
-
var e;
|
|
2321
|
-
const { sessionUser: t, namespace: n, currentCountry: a } = Gt(), o = (e = t.value) == null ? void 0 : e.token;
|
|
2322
|
-
return Ao.create({
|
|
2323
|
-
baseURL: Co(n.value, a.value),
|
|
2324
|
-
headers: o ? { Authorization: `Bearer ${o}` } : {}
|
|
2325
|
-
});
|
|
2326
|
-
}
|
|
2327
|
-
function Ce(e) {
|
|
2328
|
-
return `/media-v1/businesses/${e}/assets`;
|
|
2329
|
-
}
|
|
2330
|
-
async function et(e) {
|
|
2331
|
-
const { businessId: t, ...n } = e, { data: a } = await Be().get(Ce(t), { params: n });
|
|
2332
|
-
return a;
|
|
2333
|
-
}
|
|
2334
|
-
async function bn(e) {
|
|
2335
|
-
const { resources: t } = await et({ businessId: e, limit: 200 }), n = /* @__PURE__ */ new Set();
|
|
2336
|
-
return t.forEach((a) => a.tags.forEach((o) => n.add(o))), [...n].sort();
|
|
2337
|
-
}
|
|
2338
|
-
async function Do(e) {
|
|
2339
|
-
const { resources: t } = await et({ businessId: e, limit: 200 }), n = /* @__PURE__ */ new Map();
|
|
2340
|
-
return t.forEach((a) => a.tags.forEach((o) => n.set(o, (n.get(o) ?? 0) + 1))), { tags: [...n.entries()].map(([a, o]) => ({ tag: a, count: o })).sort((a, o) => a.tag.localeCompare(o.tag)), total: t.length };
|
|
2341
|
-
}
|
|
2342
|
-
async function No(e, t) {
|
|
2343
|
-
const { data: n } = await Be().post(`${Ce(e)}/upload-intent`, t);
|
|
2344
|
-
return n;
|
|
2345
|
-
}
|
|
2346
|
-
async function Fo(e, t, n) {
|
|
2347
|
-
const { data: a } = await Be().post(`${Ce(e)}/${t}/confirm`, n);
|
|
2348
|
-
return a;
|
|
2349
|
-
}
|
|
2350
|
-
async function Lo(e, t, n) {
|
|
2351
|
-
const { data: a } = await Be().patch(`${Ce(e)}/${t}`, { fileName: n });
|
|
2352
|
-
return a;
|
|
2353
|
-
}
|
|
2354
|
-
async function Uo(e, t, n) {
|
|
2355
|
-
const { data: a } = await Be().patch(`${Ce(e)}/${t}`, { tags: n });
|
|
2356
|
-
return a;
|
|
2357
|
-
}
|
|
2358
|
-
async function pt(e, t) {
|
|
2359
|
-
await Be().delete(`${Ce(e)}/${t}`);
|
|
2360
|
-
}
|
|
2361
|
-
const jo = {
|
|
2362
|
-
assetGrid: {
|
|
2363
|
-
loading: "Loading…",
|
|
2364
|
-
empty: "No assets yet",
|
|
2365
|
-
columns: {
|
|
2366
|
-
name: "Name",
|
|
2367
|
-
dimensions: "Dimensions",
|
|
2368
|
-
fileSize: "Size",
|
|
2369
|
-
uploader: "Uploaded By",
|
|
2370
|
-
uploadedAt: "Uploaded At"
|
|
2371
|
-
},
|
|
2372
|
-
time: {
|
|
2373
|
-
justNow: "Just now",
|
|
2374
|
-
minutesAgo: "{n} minutes ago",
|
|
2375
|
-
hoursAgo: "{n} hours ago",
|
|
2376
|
-
daysAgo: "{n} days ago"
|
|
2377
|
-
}
|
|
2378
|
-
},
|
|
2379
|
-
assetDetailDialog: {
|
|
2380
|
-
previewTitle: "Preview",
|
|
2381
|
-
saveButton: "Save",
|
|
2382
|
-
dimensionsLabel: "Dimensions",
|
|
2383
|
-
sizeLabel: "Size",
|
|
2384
|
-
formatLabel: "Format",
|
|
2385
|
-
copyLinkButton: "Copy Link",
|
|
2386
|
-
deleteButton: "Delete",
|
|
2387
|
-
deleteDisclaimer: "If any business module is still using this image, it will show as broken wherever it's referenced after deletion — make sure it's no longer needed.",
|
|
2388
|
-
deleteDialogTitle: "Delete Asset",
|
|
2389
|
-
deleteDialogMessage: 'Delete "{fileName}"? {disclaimer}',
|
|
2390
|
-
deleteConfirmButton: "Delete",
|
|
2391
|
-
cancelButton: "Cancel"
|
|
2392
|
-
},
|
|
2393
|
-
tagFilterBar: {
|
|
2394
|
-
all: "All",
|
|
2395
|
-
newTagPlaceholder: "New tag…"
|
|
2396
|
-
},
|
|
2397
|
-
tagFilterTabs: {
|
|
2398
|
-
all: "All"
|
|
2399
|
-
},
|
|
2400
|
-
uploadPanel: {
|
|
2401
|
-
dropLabel: "Drag images here, or click to choose",
|
|
2402
|
-
helperText: "Supports JPG, PNG, WEBP, up to 10MB each",
|
|
2403
|
-
stagedCount: "Pending · {count}",
|
|
2404
|
-
tagsLabel: "Tags (optional)",
|
|
2405
|
-
suggestedTagsLabel: "Common",
|
|
2406
|
-
uploadFailedError: "Upload failed: {status}"
|
|
2407
|
-
},
|
|
2408
|
-
pickerModal: {
|
|
2409
|
-
title: "Select Assets",
|
|
2410
|
-
subtitleMultiple: "Select multiple or upload — click an image to toggle selection",
|
|
2411
|
-
subtitleSingle: "Click an image to select it, or switch to Upload New",
|
|
2412
|
-
searchPlaceholder: "Search…",
|
|
2413
|
-
browseTab: "Browse",
|
|
2414
|
-
uploadTab: "Upload New",
|
|
2415
|
-
selectedCount: "{count} selected",
|
|
2416
|
-
selectPrompt: "Select an image",
|
|
2417
|
-
cancelButton: "Cancel",
|
|
2418
|
-
uploadSubmitButton: "Upload {count}",
|
|
2419
|
-
confirmButton: "Confirm"
|
|
2420
|
-
}
|
|
2421
|
-
}, Mo = {
|
|
2422
|
-
mediaPicker: jo
|
|
2423
|
-
}, Io = {
|
|
2424
|
-
assetGrid: {
|
|
2425
|
-
loading: "Chargement…",
|
|
2426
|
-
empty: "Aucun média",
|
|
2427
|
-
columns: {
|
|
2428
|
-
name: "Nom",
|
|
2429
|
-
dimensions: "Dimensions",
|
|
2430
|
-
fileSize: "Taille",
|
|
2431
|
-
uploader: "Importé par",
|
|
2432
|
-
uploadedAt: "Importé le"
|
|
2433
|
-
},
|
|
2434
|
-
time: {
|
|
2435
|
-
justNow: "À l'instant",
|
|
2436
|
-
minutesAgo: "il y a {n} min",
|
|
2437
|
-
hoursAgo: "il y a {n} h",
|
|
2438
|
-
daysAgo: "il y a {n} j"
|
|
2439
|
-
}
|
|
2440
|
-
},
|
|
2441
|
-
assetDetailDialog: {
|
|
2442
|
-
previewTitle: "Aperçu",
|
|
2443
|
-
saveButton: "Enregistrer",
|
|
2444
|
-
dimensionsLabel: "Dimensions",
|
|
2445
|
-
sizeLabel: "Taille",
|
|
2446
|
-
formatLabel: "Format",
|
|
2447
|
-
copyLinkButton: "Copier le lien",
|
|
2448
|
-
deleteButton: "Supprimer",
|
|
2449
|
-
deleteDisclaimer: "Après suppression, si un module métier utilise encore cette image, elle apparaîtra comme cassée à l'endroit où elle est référencée. Assurez-vous qu'elle n'est plus nécessaire.",
|
|
2450
|
-
deleteDialogTitle: "Supprimer le média",
|
|
2451
|
-
deleteDialogMessage: "Supprimer « {fileName} » ? {disclaimer}",
|
|
2452
|
-
deleteConfirmButton: "Supprimer",
|
|
2453
|
-
cancelButton: "Annuler"
|
|
2454
|
-
},
|
|
2455
|
-
tagFilterBar: {
|
|
2456
|
-
all: "Tous",
|
|
2457
|
-
newTagPlaceholder: "Nouveau tag…"
|
|
2458
|
-
},
|
|
2459
|
-
tagFilterTabs: {
|
|
2460
|
-
all: "Tous"
|
|
2461
|
-
},
|
|
2462
|
-
uploadPanel: {
|
|
2463
|
-
dropLabel: "Glissez des images ici, ou cliquez pour choisir",
|
|
2464
|
-
helperText: "JPG, PNG, WEBP acceptés, 10 Mo maximum par image",
|
|
2465
|
-
stagedCount: "En attente · {count}",
|
|
2466
|
-
tagsLabel: "Tags (facultatif)",
|
|
2467
|
-
suggestedTagsLabel: "Fréquents",
|
|
2468
|
-
uploadFailedError: "Échec de l'import : {status}"
|
|
2469
|
-
},
|
|
2470
|
-
pickerModal: {
|
|
2471
|
-
title: "Sélectionner des médias",
|
|
2472
|
-
subtitleMultiple: "Sélection multiple ou import — cliquez sur une image pour la sélectionner",
|
|
2473
|
-
subtitleSingle: "Cliquez sur une image pour la choisir, ou passez à l'onglet Importer",
|
|
2474
|
-
searchPlaceholder: "Rechercher…",
|
|
2475
|
-
browseTab: "Parcourir",
|
|
2476
|
-
uploadTab: "Importer",
|
|
2477
|
-
selectedCount: "{count} sélectionné(s)",
|
|
2478
|
-
selectPrompt: "Sélectionnez une image",
|
|
2479
|
-
cancelButton: "Annuler",
|
|
2480
|
-
uploadSubmitButton: "Importer {count}",
|
|
2481
|
-
confirmButton: "Confirmer"
|
|
2482
|
-
}
|
|
2483
|
-
}, zo = {
|
|
2484
|
-
mediaPicker: Io
|
|
2485
|
-
}, Vo = {
|
|
2486
|
-
assetGrid: {
|
|
2487
|
-
loading: "Memuat…",
|
|
2488
|
-
empty: "Belum ada media",
|
|
2489
|
-
columns: {
|
|
2490
|
-
name: "Nama",
|
|
2491
|
-
dimensions: "Dimensi",
|
|
2492
|
-
fileSize: "Ukuran",
|
|
2493
|
-
uploader: "Diunggah Oleh",
|
|
2494
|
-
uploadedAt: "Waktu Unggah"
|
|
2495
|
-
},
|
|
2496
|
-
time: {
|
|
2497
|
-
justNow: "Baru saja",
|
|
2498
|
-
minutesAgo: "{n} menit lalu",
|
|
2499
|
-
hoursAgo: "{n} jam lalu",
|
|
2500
|
-
daysAgo: "{n} hari lalu"
|
|
2501
|
-
}
|
|
2502
|
-
},
|
|
2503
|
-
assetDetailDialog: {
|
|
2504
|
-
previewTitle: "Pratinjau",
|
|
2505
|
-
saveButton: "Simpan",
|
|
2506
|
-
dimensionsLabel: "Dimensi",
|
|
2507
|
-
sizeLabel: "Ukuran",
|
|
2508
|
-
formatLabel: "Format",
|
|
2509
|
-
copyLinkButton: "Salin Tautan",
|
|
2510
|
-
deleteButton: "Hapus",
|
|
2511
|
-
deleteDisclaimer: "Setelah dihapus, jika ada modul bisnis yang masih menggunakan gambar ini, gambar akan tampil rusak di tempat penggunaannya. Pastikan gambar ini sudah tidak diperlukan lagi.",
|
|
2512
|
-
deleteDialogTitle: "Hapus Media",
|
|
2513
|
-
deleteDialogMessage: 'Hapus "{fileName}"? {disclaimer}',
|
|
2514
|
-
deleteConfirmButton: "Hapus",
|
|
2515
|
-
cancelButton: "Batal"
|
|
2516
|
-
},
|
|
2517
|
-
tagFilterBar: {
|
|
2518
|
-
all: "Semua",
|
|
2519
|
-
newTagPlaceholder: "Buat tag baru…"
|
|
2520
|
-
},
|
|
2521
|
-
tagFilterTabs: {
|
|
2522
|
-
all: "Semua"
|
|
2523
|
-
},
|
|
2524
|
-
uploadPanel: {
|
|
2525
|
-
dropLabel: "Seret gambar ke sini, atau klik untuk memilih",
|
|
2526
|
-
helperText: "Mendukung JPG, PNG, WEBP, maksimal 10MB per file",
|
|
2527
|
-
stagedCount: "Menunggu diunggah · {count}",
|
|
2528
|
-
tagsLabel: "Tag (opsional)",
|
|
2529
|
-
suggestedTagsLabel: "Sering digunakan",
|
|
2530
|
-
uploadFailedError: "Unggah gagal: {status}"
|
|
2531
|
-
},
|
|
2532
|
-
pickerModal: {
|
|
2533
|
-
title: "Pilih Media",
|
|
2534
|
-
subtitleMultiple: "Pilih beberapa atau unggah — klik gambar untuk mengubah pilihan",
|
|
2535
|
-
subtitleSingle: "Klik gambar untuk memilihnya, atau beralih ke Unggah Baru",
|
|
2536
|
-
searchPlaceholder: "Cari…",
|
|
2537
|
-
browseTab: "Jelajahi & Pilih",
|
|
2538
|
-
uploadTab: "Unggah Baru",
|
|
2539
|
-
selectedCount: "{count} dipilih",
|
|
2540
|
-
selectPrompt: "Pilih gambar",
|
|
2541
|
-
cancelButton: "Batal",
|
|
2542
|
-
uploadSubmitButton: "Unggah {count}",
|
|
2543
|
-
confirmButton: "Konfirmasi"
|
|
2544
|
-
}
|
|
2545
|
-
}, qo = {
|
|
2546
|
-
mediaPicker: Vo
|
|
2547
|
-
}, $o = {
|
|
2548
|
-
assetGrid: {
|
|
2549
|
-
loading: "読み込み中…",
|
|
2550
|
-
empty: "素材がありません",
|
|
2551
|
-
columns: {
|
|
2552
|
-
name: "名前",
|
|
2553
|
-
dimensions: "サイズ",
|
|
2554
|
-
fileSize: "容量",
|
|
2555
|
-
uploader: "アップロード者",
|
|
2556
|
-
uploadedAt: "アップロード日時"
|
|
2557
|
-
},
|
|
2558
|
-
time: {
|
|
2559
|
-
justNow: "たった今",
|
|
2560
|
-
minutesAgo: "{n} 分前",
|
|
2561
|
-
hoursAgo: "{n} 時間前",
|
|
2562
|
-
daysAgo: "{n} 日前"
|
|
2563
|
-
}
|
|
2564
|
-
},
|
|
2565
|
-
assetDetailDialog: {
|
|
2566
|
-
previewTitle: "プレビュー",
|
|
2567
|
-
saveButton: "保存",
|
|
2568
|
-
dimensionsLabel: "サイズ",
|
|
2569
|
-
sizeLabel: "容量",
|
|
2570
|
-
formatLabel: "形式",
|
|
2571
|
-
copyLinkButton: "リンクをコピー",
|
|
2572
|
-
deleteButton: "削除",
|
|
2573
|
-
deleteDisclaimer: "削除後、この画像を使用している業務モジュールがある場合、参照元では画像が表示されなくなります。不要であることを確認してください。",
|
|
2574
|
-
deleteDialogTitle: "素材を削除",
|
|
2575
|
-
deleteDialogMessage: "「{fileName}」を削除しますか?{disclaimer}",
|
|
2576
|
-
deleteConfirmButton: "削除",
|
|
2577
|
-
cancelButton: "キャンセル"
|
|
2578
|
-
},
|
|
2579
|
-
tagFilterBar: {
|
|
2580
|
-
all: "すべて",
|
|
2581
|
-
newTagPlaceholder: "新しいタグを作成…"
|
|
2582
|
-
},
|
|
2583
|
-
tagFilterTabs: {
|
|
2584
|
-
all: "すべて"
|
|
2585
|
-
},
|
|
2586
|
-
uploadPanel: {
|
|
2587
|
-
dropLabel: "ここに画像をドラッグ、またはクリックして選択",
|
|
2588
|
-
helperText: "JPG、PNG、WEBP に対応、1枚あたり10MBまで",
|
|
2589
|
-
stagedCount: "アップロード待ち · {count}",
|
|
2590
|
-
tagsLabel: "タグ(任意)",
|
|
2591
|
-
suggestedTagsLabel: "よく使うタグ",
|
|
2592
|
-
uploadFailedError: "アップロードに失敗しました:{status}"
|
|
2593
|
-
},
|
|
2594
|
-
pickerModal: {
|
|
2595
|
-
title: "素材を選択",
|
|
2596
|
-
subtitleMultiple: "複数選択またはアップロードが可能です。画像をクリックして選択を切り替えます",
|
|
2597
|
-
subtitleSingle: "画像をクリックして選択するか、「新規アップロード」に切り替えてください",
|
|
2598
|
-
searchPlaceholder: "検索…",
|
|
2599
|
-
browseTab: "選択して閲覧",
|
|
2600
|
-
uploadTab: "新規アップロード",
|
|
2601
|
-
selectedCount: "{count} 件選択中",
|
|
2602
|
-
selectPrompt: "画像を選択してください",
|
|
2603
|
-
cancelButton: "キャンセル",
|
|
2604
|
-
uploadSubmitButton: "{count} 件をアップロード",
|
|
2605
|
-
confirmButton: "確定"
|
|
2606
|
-
}
|
|
2607
|
-
}, Go = {
|
|
2608
|
-
mediaPicker: $o
|
|
2609
|
-
}, Ho = {
|
|
2610
|
-
assetGrid: {
|
|
2611
|
-
loading: "กำลังโหลด…",
|
|
2612
|
-
empty: "ยังไม่มีสื่อ",
|
|
2613
|
-
columns: {
|
|
2614
|
-
name: "ชื่อ",
|
|
2615
|
-
dimensions: "ขนาด (พิกเซล)",
|
|
2616
|
-
fileSize: "ขนาดไฟล์",
|
|
2617
|
-
uploader: "ผู้อัปโหลด",
|
|
2618
|
-
uploadedAt: "เวลาอัปโหลด"
|
|
2619
|
-
},
|
|
2620
|
-
time: {
|
|
2621
|
-
justNow: "เมื่อสักครู่",
|
|
2622
|
-
minutesAgo: "{n} นาทีที่แล้ว",
|
|
2623
|
-
hoursAgo: "{n} ชั่วโมงที่แล้ว",
|
|
2624
|
-
daysAgo: "{n} วันที่แล้ว"
|
|
2625
|
-
}
|
|
2626
|
-
},
|
|
2627
|
-
assetDetailDialog: {
|
|
2628
|
-
previewTitle: "ตัวอย่าง",
|
|
2629
|
-
saveButton: "บันทึก",
|
|
2630
|
-
dimensionsLabel: "ขนาด (พิกเซล)",
|
|
2631
|
-
sizeLabel: "ขนาดไฟล์",
|
|
2632
|
-
formatLabel: "รูปแบบ",
|
|
2633
|
-
copyLinkButton: "คัดลอกลิงก์",
|
|
2634
|
-
deleteButton: "ลบ",
|
|
2635
|
-
deleteDisclaimer: "หลังลบแล้ว หากมีโมดูลธุรกิจใดกำลังใช้รูปนี้อยู่ รูปจะแสดงเป็นลิงก์เสียในตำแหน่งที่ถูกใช้งาน กรุณายืนยันว่าไม่จำเป็นต้องใช้แล้ว",
|
|
2636
|
-
deleteDialogTitle: "ลบสื่อ",
|
|
2637
|
-
deleteDialogMessage: "ยืนยันลบ “{fileName}” ใช่หรือไม่? {disclaimer}",
|
|
2638
|
-
deleteConfirmButton: "ลบ",
|
|
2639
|
-
cancelButton: "ยกเลิก"
|
|
2640
|
-
},
|
|
2641
|
-
tagFilterBar: {
|
|
2642
|
-
all: "ทั้งหมด",
|
|
2643
|
-
newTagPlaceholder: "สร้างแท็กใหม่…"
|
|
2644
|
-
},
|
|
2645
|
-
tagFilterTabs: {
|
|
2646
|
-
all: "ทั้งหมด"
|
|
2647
|
-
},
|
|
2648
|
-
uploadPanel: {
|
|
2649
|
-
dropLabel: "ลากรูปภาพมาวางที่นี่ หรือคลิกเพื่อเลือก",
|
|
2650
|
-
helperText: "รองรับ JPG, PNG, WEBP ไฟล์ละไม่เกิน 10MB",
|
|
2651
|
-
stagedCount: "รอการอัปโหลด · {count}",
|
|
2652
|
-
tagsLabel: "แท็ก (ไม่บังคับ)",
|
|
2653
|
-
suggestedTagsLabel: "ที่ใช้บ่อย",
|
|
2654
|
-
uploadFailedError: "อัปโหลดล้มเหลว: {status}"
|
|
2655
|
-
},
|
|
2656
|
-
pickerModal: {
|
|
2657
|
-
title: "เลือกสื่อ",
|
|
2658
|
-
subtitleMultiple: "เลือกได้หลายรายการหรืออัปโหลด คลิกที่รูปเพื่อสลับการเลือก",
|
|
2659
|
-
subtitleSingle: "คลิกที่รูปเพื่อเลือก หรือสลับไปที่แท็บอัปโหลดรูปใหม่",
|
|
2660
|
-
searchPlaceholder: "ค้นหา…",
|
|
2661
|
-
browseTab: "เรียกดูและเลือก",
|
|
2662
|
-
uploadTab: "อัปโหลดรูปใหม่",
|
|
2663
|
-
selectedCount: "เลือกแล้ว {count} รายการ",
|
|
2664
|
-
selectPrompt: "กรุณาเลือกรูปภาพ",
|
|
2665
|
-
cancelButton: "ยกเลิก",
|
|
2666
|
-
uploadSubmitButton: "อัปโหลด {count} รายการ",
|
|
2667
|
-
confirmButton: "ยืนยัน"
|
|
2668
|
-
}
|
|
2669
|
-
}, Jo = {
|
|
2670
|
-
mediaPicker: Ho
|
|
2671
|
-
}, Wo = {
|
|
2672
|
-
assetGrid: {
|
|
2673
|
-
loading: "加载中…",
|
|
2674
|
-
empty: "暂无素材",
|
|
2675
|
-
columns: {
|
|
2676
|
-
name: "名称",
|
|
2677
|
-
dimensions: "尺寸",
|
|
2678
|
-
fileSize: "大小",
|
|
2679
|
-
uploader: "上传人",
|
|
2680
|
-
uploadedAt: "上传时间"
|
|
2681
|
-
},
|
|
2682
|
-
time: {
|
|
2683
|
-
justNow: "刚刚",
|
|
2684
|
-
minutesAgo: "{n} 分钟前",
|
|
2685
|
-
hoursAgo: "{n} 小时前",
|
|
2686
|
-
daysAgo: "{n} 天前"
|
|
2687
|
-
}
|
|
2688
|
-
},
|
|
2689
|
-
assetDetailDialog: {
|
|
2690
|
-
previewTitle: "预览",
|
|
2691
|
-
saveButton: "保存",
|
|
2692
|
-
dimensionsLabel: "尺寸",
|
|
2693
|
-
sizeLabel: "大小",
|
|
2694
|
-
formatLabel: "格式",
|
|
2695
|
-
copyLinkButton: "复制链接",
|
|
2696
|
-
deleteButton: "删除",
|
|
2697
|
-
deleteDisclaimer: "删除后如有业务模块正在使用这张图,图片会在原处显示失效,请确认已不再需要。",
|
|
2698
|
-
deleteDialogTitle: "删除素材",
|
|
2699
|
-
deleteDialogMessage: "确定删除「{fileName}」吗?{disclaimer}",
|
|
2700
|
-
deleteConfirmButton: "删除",
|
|
2701
|
-
cancelButton: "取消"
|
|
2702
|
-
},
|
|
2703
|
-
tagFilterBar: {
|
|
2704
|
-
all: "全部",
|
|
2705
|
-
newTagPlaceholder: "新建标签…"
|
|
2706
|
-
},
|
|
2707
|
-
tagFilterTabs: {
|
|
2708
|
-
all: "全部"
|
|
2709
|
-
},
|
|
2710
|
-
uploadPanel: {
|
|
2711
|
-
dropLabel: "拖拽图片到此处,或点击选择",
|
|
2712
|
-
helperText: "支持 JPG、PNG、WEBP,单张不超过 10MB",
|
|
2713
|
-
stagedCount: "待上传 · {count}",
|
|
2714
|
-
tagsLabel: "标签(可选)",
|
|
2715
|
-
suggestedTagsLabel: "常用",
|
|
2716
|
-
uploadFailedError: "上传失败:{status}"
|
|
2717
|
-
},
|
|
2718
|
-
pickerModal: {
|
|
2719
|
-
title: "选择素材",
|
|
2720
|
-
subtitleMultiple: "可多选或上传,点击图片切换选择",
|
|
2721
|
-
subtitleSingle: "点击图片完成选择,或切换到上传新图",
|
|
2722
|
-
searchPlaceholder: "搜索…",
|
|
2723
|
-
browseTab: "浏览选择",
|
|
2724
|
-
uploadTab: "上传新图",
|
|
2725
|
-
selectedCount: "已选择 {count} 张",
|
|
2726
|
-
selectPrompt: "请选择图片",
|
|
2727
|
-
cancelButton: "取消",
|
|
2728
|
-
uploadSubmitButton: "上传 {count} 张",
|
|
2729
|
-
confirmButton: "确定"
|
|
2730
|
-
}
|
|
2731
|
-
}, Ko = {
|
|
2732
|
-
mediaPicker: Wo
|
|
2733
|
-
}, Xo = {
|
|
2734
|
-
assetGrid: {
|
|
2735
|
-
loading: "載入中…",
|
|
2736
|
-
empty: "暫無素材",
|
|
2737
|
-
columns: {
|
|
2738
|
-
name: "名稱",
|
|
2739
|
-
dimensions: "尺寸",
|
|
2740
|
-
fileSize: "大小",
|
|
2741
|
-
uploader: "上傳人",
|
|
2742
|
-
uploadedAt: "上傳時間"
|
|
2743
|
-
},
|
|
2744
|
-
time: {
|
|
2745
|
-
justNow: "剛剛",
|
|
2746
|
-
minutesAgo: "{n} 分鐘前",
|
|
2747
|
-
hoursAgo: "{n} 小時前",
|
|
2748
|
-
daysAgo: "{n} 天前"
|
|
2749
|
-
}
|
|
2750
|
-
},
|
|
2751
|
-
assetDetailDialog: {
|
|
2752
|
-
previewTitle: "預覽",
|
|
2753
|
-
saveButton: "儲存",
|
|
2754
|
-
dimensionsLabel: "尺寸",
|
|
2755
|
-
sizeLabel: "大小",
|
|
2756
|
-
formatLabel: "格式",
|
|
2757
|
-
copyLinkButton: "複製連結",
|
|
2758
|
-
deleteButton: "刪除",
|
|
2759
|
-
deleteDisclaimer: "刪除後如有業務模組正在使用這張圖,圖片會在原處顯示失效,請確認已不再需要。",
|
|
2760
|
-
deleteDialogTitle: "刪除素材",
|
|
2761
|
-
deleteDialogMessage: "確定刪除「{fileName}」嗎?{disclaimer}",
|
|
2762
|
-
deleteConfirmButton: "刪除",
|
|
2763
|
-
cancelButton: "取消"
|
|
2764
|
-
},
|
|
2765
|
-
tagFilterBar: {
|
|
2766
|
-
all: "全部",
|
|
2767
|
-
newTagPlaceholder: "新增標籤…"
|
|
2768
|
-
},
|
|
2769
|
-
tagFilterTabs: {
|
|
2770
|
-
all: "全部"
|
|
2771
|
-
},
|
|
2772
|
-
uploadPanel: {
|
|
2773
|
-
dropLabel: "拖曳圖片到此處,或點擊選擇",
|
|
2774
|
-
helperText: "支援 JPG、PNG、WEBP,單張不超過 10MB",
|
|
2775
|
-
stagedCount: "待上傳 · {count}",
|
|
2776
|
-
tagsLabel: "標籤(可選)",
|
|
2777
|
-
suggestedTagsLabel: "常用",
|
|
2778
|
-
uploadFailedError: "上傳失敗:{status}"
|
|
2779
|
-
},
|
|
2780
|
-
pickerModal: {
|
|
2781
|
-
title: "選擇素材",
|
|
2782
|
-
subtitleMultiple: "可多選或上傳,點擊圖片切換選擇",
|
|
2783
|
-
subtitleSingle: "點擊圖片完成選擇,或切換到上傳新圖",
|
|
2784
|
-
searchPlaceholder: "搜尋…",
|
|
2785
|
-
browseTab: "瀏覽選擇",
|
|
2786
|
-
uploadTab: "上傳新圖",
|
|
2787
|
-
selectedCount: "已選擇 {count} 張",
|
|
2788
|
-
selectPrompt: "請選擇圖片",
|
|
2789
|
-
cancelButton: "取消",
|
|
2790
|
-
uploadSubmitButton: "上傳 {count} 張",
|
|
2791
|
-
confirmButton: "確定"
|
|
2792
|
-
}
|
|
2793
|
-
}, Qo = {
|
|
2794
|
-
mediaPicker: Xo
|
|
2795
|
-
}, De = {
|
|
2796
|
-
"en-US": Mo,
|
|
2797
|
-
"zh-CN": Ko,
|
|
2798
|
-
"zh-Hant": Qo,
|
|
2799
|
-
"th-TH": Jo,
|
|
2800
|
-
"ja-JP": Go,
|
|
2801
|
-
"id-ID": qo,
|
|
2802
|
-
"fr-MA": zo
|
|
2803
|
-
}, Zo = {
|
|
2804
|
-
key: 0,
|
|
2805
|
-
class: "py-64 text-center text-sm text-gray-400"
|
|
2806
|
-
}, Yo = {
|
|
2807
|
-
key: 1,
|
|
2808
|
-
class: "py-64 text-center text-sm text-gray-400"
|
|
2809
|
-
}, er = {
|
|
2810
|
-
key: 2,
|
|
2811
|
-
class: "bg-white border border-fm-color-neutral-gray-200 rounded-lg overflow-hidden"
|
|
2812
|
-
}, tr = { class: "grid grid-cols-[40px_56px_minmax(160px,2.2fr)_110px_90px_150px_120px_40px] items-center gap-8 px-16 h-40 bg-fm-color-neutral-gray-100 border-b border-fm-color-neutral-gray-200 text-xs font-semibold text-fm-color-typo-secondary" }, nr = ["onClick"], ar = ["onClick"], or = { key: 1 }, rr = { class: "w-[44px] h-[36px] rounded overflow-hidden" }, sr = { class: "min-w-0 flex flex-col gap-4" }, ir = { class: "text-xs font-semibold truncate" }, lr = { class: "text-[11px] text-fm-color-typo-tertiary" }, ur = { class: "text-xs text-fm-color-typo-primary" }, cr = { class: "text-xs text-fm-color-typo-primary" }, dr = { class: "flex items-center gap-8 min-w-0" }, pr = { class: "text-xs text-fm-color-typo-primary truncate" }, fr = { class: "text-xs text-fm-color-typo-secondary" }, mr = {
|
|
2813
|
-
key: 3,
|
|
2814
|
-
class: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-16"
|
|
2815
|
-
}, gr = ["onClick"], hr = { class: "relative aspect-[4/3]" }, br = ["onClick"], yr = { class: "absolute bottom-8 left-8 bg-black/70 text-white text-[11px] font-semibold px-[6px] py-[2px] rounded" }, wr = { class: "px-8 py-6 space-y-2" }, vr = { class: "text-xs font-semibold truncate" }, xr = { class: "text-[11px] text-gray-500 truncate" }, yn = /* @__PURE__ */ Se({
|
|
2816
|
-
__name: "AssetGrid",
|
|
2817
|
-
props: {
|
|
2818
|
-
assets: {},
|
|
2819
|
-
loading: { type: Boolean, default: !1 },
|
|
2820
|
-
selectable: { type: Boolean, default: !1 },
|
|
2821
|
-
selectedIds: { default: () => /* @__PURE__ */ new Set() },
|
|
2822
|
-
view: { default: "grid" }
|
|
2823
|
-
},
|
|
2824
|
-
emits: ["open", "toggle", "delete"],
|
|
2825
|
-
setup(e, { emit: t }) {
|
|
2826
|
-
const { t: n } = Ee({ messages: De }), a = t;
|
|
2827
|
-
function o(i) {
|
|
2828
|
-
var u;
|
|
2829
|
-
return ((u = i.split("/")[1]) == null ? void 0 : u.toUpperCase()) ?? i;
|
|
2830
|
-
}
|
|
2831
|
-
function r(i) {
|
|
2832
|
-
return i >= 1024 * 1024 ? `${(i / 1024 / 1024).toFixed(1)} MB` : `${Math.round(i / 1024)} KB`;
|
|
2833
|
-
}
|
|
2834
|
-
function s(i) {
|
|
2835
|
-
const u = Date.now() - new Date(i).getTime(), p = 6e4, d = 36e5, f = 864e5;
|
|
2836
|
-
if (u < p)
|
|
2837
|
-
return n("mediaPicker.assetGrid.time.justNow");
|
|
2838
|
-
if (u < d)
|
|
2839
|
-
return n("mediaPicker.assetGrid.time.minutesAgo", { n: Math.floor(u / p) });
|
|
2840
|
-
if (u < f)
|
|
2841
|
-
return n("mediaPicker.assetGrid.time.hoursAgo", { n: Math.floor(u / d) });
|
|
2842
|
-
if (u < f * 8)
|
|
2843
|
-
return n("mediaPicker.assetGrid.time.daysAgo", { n: Math.floor(u / f) });
|
|
2844
|
-
const b = new Date(i);
|
|
2845
|
-
return `${b.getFullYear()}-${String(b.getMonth() + 1).padStart(2, "0")}-${String(b.getDate()).padStart(2, "0")}`;
|
|
2846
|
-
}
|
|
2847
|
-
return (i, u) => {
|
|
2848
|
-
const p = M("FmIcon"), d = M("FmThumbnail"), f = M("FmAvatar"), b = M("FmButton");
|
|
2849
|
-
return e.loading ? (P(), T("div", Zo, k(O(n)("mediaPicker.assetGrid.loading")), 1)) : e.assets.length === 0 ? (P(), T("div", Yo, k(O(n)("mediaPicker.assetGrid.empty")), 1)) : e.view === "list" ? (P(), T("div", er, [
|
|
2850
|
-
h("div", tr, [
|
|
2851
|
-
u[0] || (u[0] = h("span", null, null, -1)),
|
|
2852
|
-
u[1] || (u[1] = h("span", null, null, -1)),
|
|
2853
|
-
h("span", null, k(O(n)("mediaPicker.assetGrid.columns.name")), 1),
|
|
2854
|
-
h("span", null, k(O(n)("mediaPicker.assetGrid.columns.dimensions")), 1),
|
|
2855
|
-
h("span", null, k(O(n)("mediaPicker.assetGrid.columns.fileSize")), 1),
|
|
2856
|
-
h("span", null, k(O(n)("mediaPicker.assetGrid.columns.uploader")), 1),
|
|
2857
|
-
h("span", null, k(O(n)("mediaPicker.assetGrid.columns.uploadedAt")), 1),
|
|
2858
|
-
u[2] || (u[2] = h("span", null, null, -1))
|
|
2859
|
-
]),
|
|
2860
|
-
(P(!0), T(ee, null, we(e.assets, (w) => (P(), T("div", {
|
|
2861
|
-
key: w.id,
|
|
2862
|
-
class: ue(["grid grid-cols-[40px_56px_minmax(160px,2.2fr)_110px_90px_150px_120px_40px] items-center gap-8 px-16 h-56 border-b border-fm-color-neutral-gray-200 last:border-b-0 cursor-pointer hover:bg-fm-color-neutral-gray-100", e.selectedIds.has(w.id) ? "bg-[#FFF7F0]" : "bg-white"]),
|
|
2863
|
-
onClick: (g) => a("open", w)
|
|
2864
|
-
}, [
|
|
2865
|
-
e.selectable ? (P(), T("button", {
|
|
2866
|
-
key: 0,
|
|
2867
|
-
class: ue(["w-[20px] h-[20px] rounded flex items-center justify-center", e.selectedIds.has(w.id) ? "bg-[--fm-color-brand-primary,#FF7823]" : "bg-white border border-fm-color-neutral-gray-200"]),
|
|
2868
|
-
onClick: at((g) => a("toggle", w), ["stop"])
|
|
2869
|
-
}, [
|
|
2870
|
-
e.selectedIds.has(w.id) ? (P(), Q(p, {
|
|
2871
|
-
key: 0,
|
|
2872
|
-
name: "check",
|
|
2873
|
-
size: "sm",
|
|
2874
|
-
color: "white"
|
|
2875
|
-
})) : H("", !0)
|
|
2876
|
-
], 10, ar)) : (P(), T("span", or)),
|
|
2877
|
-
h("div", rr, [
|
|
2878
|
-
N(d, {
|
|
2879
|
-
src: w.url,
|
|
2880
|
-
size: "sm",
|
|
2881
|
-
class: "!w-full !h-full"
|
|
2882
|
-
}, null, 8, ["src"])
|
|
2883
|
-
]),
|
|
2884
|
-
h("div", sr, [
|
|
2885
|
-
h("span", ir, k(w.fileName), 1),
|
|
2886
|
-
h("span", lr, k(o(w.mimeType)), 1)
|
|
2887
|
-
]),
|
|
2888
|
-
h("span", ur, k(w.width) + "×" + k(w.height), 1),
|
|
2889
|
-
h("span", cr, k(r(w.fileSizeBytes)), 1),
|
|
2890
|
-
h("div", dr, [
|
|
2891
|
-
N(f, {
|
|
2892
|
-
name: w.uploadedBy,
|
|
2893
|
-
size: "sm"
|
|
2894
|
-
}, null, 8, ["name"]),
|
|
2895
|
-
h("span", pr, k(w.uploadedBy), 1)
|
|
2896
|
-
]),
|
|
2897
|
-
h("span", fr, k(s(w.createdAt)), 1),
|
|
2898
|
-
N(b, {
|
|
2899
|
-
variant: "tertiary",
|
|
2900
|
-
size: "md",
|
|
2901
|
-
"prepend-icon": "delete",
|
|
2902
|
-
label: "",
|
|
2903
|
-
onClick: at((g) => a("delete", w), ["stop"])
|
|
2904
|
-
}, null, 8, ["onClick"])
|
|
2905
|
-
], 10, nr))), 128))
|
|
2906
|
-
])) : (P(), T("div", mr, [
|
|
2907
|
-
(P(!0), T(ee, null, we(e.assets, (w) => (P(), T("div", {
|
|
2908
|
-
key: w.id,
|
|
2909
|
-
class: ue(["cursor-pointer rounded-lg border bg-white overflow-hidden transition-shadow hover:shadow-lg", e.selectedIds.has(w.id) ? "border-2 border-[--fm-color-brand-primary,#FF7823]" : "border-gray-200"]),
|
|
2910
|
-
onClick: (g) => a("open", w)
|
|
2911
|
-
}, [
|
|
2912
|
-
h("div", hr, [
|
|
2913
|
-
N(d, {
|
|
2914
|
-
src: w.url,
|
|
2915
|
-
size: "xl",
|
|
2916
|
-
class: "w-full h-full"
|
|
2917
|
-
}, null, 8, ["src"]),
|
|
2918
|
-
e.selectable ? (P(), T("button", {
|
|
2919
|
-
key: 0,
|
|
2920
|
-
class: ue(["absolute top-8 left-8 z-10 w-24 h-24 rounded-full flex items-center justify-center", e.selectedIds.has(w.id) ? "bg-[--fm-color-brand-primary,#FF7823]" : "bg-black/30 border border-white/80"]),
|
|
2921
|
-
onClick: at((g) => a("toggle", w), ["stop"])
|
|
2922
|
-
}, [
|
|
2923
|
-
e.selectedIds.has(w.id) ? (P(), Q(p, {
|
|
2924
|
-
key: 0,
|
|
2925
|
-
name: "check",
|
|
2926
|
-
size: "sm",
|
|
2927
|
-
color: "white"
|
|
2928
|
-
})) : H("", !0)
|
|
2929
|
-
], 10, br)) : H("", !0),
|
|
2930
|
-
h("span", yr, k(o(w.mimeType)), 1)
|
|
2931
|
-
]),
|
|
2932
|
-
h("div", wr, [
|
|
2933
|
-
h("div", vr, k(w.fileName), 1),
|
|
2934
|
-
h("span", xr, k(w.width) + "×" + k(w.height) + " · " + k(r(w.fileSizeBytes)), 1)
|
|
2935
|
-
])
|
|
2936
|
-
], 10, gr))), 128))
|
|
2937
|
-
]));
|
|
2938
|
-
};
|
|
2939
|
-
}
|
|
2940
|
-
}), Sr = { class: "flex flex-wrap items-center gap-8" }, Er = { class: "flex items-center gap-6" }, kr = { class: "flex items-center gap-6" }, Pr = /* @__PURE__ */ Se({
|
|
2941
|
-
__name: "TagFilterTabs",
|
|
2942
|
-
props: {
|
|
2943
|
-
tags: {},
|
|
2944
|
-
total: {},
|
|
2945
|
-
modelValue: {}
|
|
2946
|
-
},
|
|
2947
|
-
emits: ["update:modelValue"],
|
|
2948
|
-
setup(e, { emit: t }) {
|
|
2949
|
-
const { t: n } = Ee({ messages: De }), a = t;
|
|
2950
|
-
return (o, r) => {
|
|
2951
|
-
const s = M("FmChip");
|
|
2952
|
-
return P(), T("div", Sr, [
|
|
2953
|
-
N(s, {
|
|
2954
|
-
selectable: "",
|
|
2955
|
-
selected: e.modelValue === null,
|
|
2956
|
-
onClick: r[0] || (r[0] = (i) => a("update:modelValue", null))
|
|
2957
|
-
}, {
|
|
2958
|
-
default: ae(() => [
|
|
2959
|
-
h("span", Er, [
|
|
2960
|
-
be(k(O(n)("mediaPicker.tagFilterTabs.all")) + " ", 1),
|
|
2961
|
-
h("span", {
|
|
2962
|
-
class: ue(["text-[11px] leading-none rounded-full px-6 py-2", e.modelValue === null ? "bg-white/25" : "bg-fm-color-neutral-gray-100"])
|
|
2963
|
-
}, k(e.total), 3)
|
|
2964
|
-
])
|
|
2965
|
-
]),
|
|
2966
|
-
_: 1
|
|
2967
|
-
}, 8, ["selected"]),
|
|
2968
|
-
(P(!0), T(ee, null, we(e.tags, (i) => (P(), Q(s, {
|
|
2969
|
-
key: i.tag,
|
|
2970
|
-
selectable: "",
|
|
2971
|
-
selected: e.modelValue === i.tag,
|
|
2972
|
-
onClick: (u) => a("update:modelValue", i.tag)
|
|
2973
|
-
}, {
|
|
2974
|
-
default: ae(() => [
|
|
2975
|
-
h("span", kr, [
|
|
2976
|
-
be(k(i.tag) + " ", 1),
|
|
2977
|
-
h("span", {
|
|
2978
|
-
class: ue(["text-[11px] leading-none rounded-full px-6 py-2", e.modelValue === i.tag ? "bg-white/25" : "bg-fm-color-neutral-gray-100"])
|
|
2979
|
-
}, k(i.count), 3)
|
|
2980
|
-
])
|
|
2981
|
-
]),
|
|
2982
|
-
_: 2
|
|
2983
|
-
}, 1032, ["selected", "onClick"]))), 128))
|
|
2984
|
-
]);
|
|
2985
|
-
};
|
|
2986
|
-
}
|
|
2987
|
-
});
|
|
2988
|
-
function $t(e) {
|
|
2989
|
-
return new Promise((t) => {
|
|
2990
|
-
const n = new Image();
|
|
2991
|
-
n.onload = () => t({ width: n.naturalWidth || 480, height: n.naturalHeight || 360 }), n.onerror = () => t({ width: 480, height: 360 }), n.src = e;
|
|
2992
|
-
});
|
|
2993
|
-
}
|
|
2994
|
-
const Or = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
2995
|
-
key: 1,
|
|
2996
|
-
class: "inline-flex items-center gap-4 border rounded-full border-gray-300 pl-8 pr-4 h-[28px]"
|
|
2997
|
-
}, Tr = ["placeholder"], wn = /* @__PURE__ */ Se({
|
|
2998
|
-
__name: "TagFilterBar",
|
|
2999
|
-
props: {
|
|
3000
|
-
tags: {},
|
|
3001
|
-
modelValue: {},
|
|
3002
|
-
mode: { default: "filter" }
|
|
3003
|
-
},
|
|
3004
|
-
emits: ["update:modelValue", "tag-created"],
|
|
3005
|
-
setup(e, { emit: t }) {
|
|
3006
|
-
const { t: n } = Ee({ messages: De }), a = e, o = t;
|
|
3007
|
-
function r(u) {
|
|
3008
|
-
o("update:modelValue", a.modelValue.includes(u) ? a.modelValue.filter((p) => p !== u) : [...a.modelValue, u]);
|
|
3009
|
-
}
|
|
3010
|
-
const s = L("");
|
|
3011
|
-
function i() {
|
|
3012
|
-
const u = s.value.trim();
|
|
3013
|
-
s.value = "", u && (a.modelValue.includes(u) || o("update:modelValue", [...a.modelValue, u]), a.tags.includes(u) || o("tag-created", u));
|
|
3014
|
-
}
|
|
3015
|
-
return (u, p) => {
|
|
3016
|
-
const d = M("FmChip"), f = M("FmIcon");
|
|
3017
|
-
return P(), T("div", Or, [
|
|
3018
|
-
e.mode === "filter" ? (P(), Q(d, {
|
|
3019
|
-
key: 0,
|
|
3020
|
-
label: O(n)("mediaPicker.tagFilterBar.all"),
|
|
3021
|
-
selected: e.modelValue.length === 0,
|
|
3022
|
-
selectable: "",
|
|
3023
|
-
onClick: p[0] || (p[0] = (b) => o("update:modelValue", []))
|
|
3024
|
-
}, null, 8, ["label", "selected"])) : H("", !0),
|
|
3025
|
-
(P(!0), T(ee, null, we(e.tags, (b) => (P(), Q(d, {
|
|
3026
|
-
key: b,
|
|
3027
|
-
label: b,
|
|
3028
|
-
selected: e.modelValue.includes(b),
|
|
3029
|
-
selectable: "",
|
|
3030
|
-
onClick: (w) => r(b)
|
|
3031
|
-
}, null, 8, ["label", "selected", "onClick"]))), 128)),
|
|
3032
|
-
e.mode === "assign" ? (P(), T("div", Rr, [
|
|
3033
|
-
En(h("input", {
|
|
3034
|
-
"onUpdate:modelValue": p[1] || (p[1] = (b) => s.value = b),
|
|
3035
|
-
placeholder: O(n)("mediaPicker.tagFilterBar.newTagPlaceholder"),
|
|
3036
|
-
class: "text-xs outline-none w-[88px]",
|
|
3037
|
-
onKeyup: kn(i, ["enter"])
|
|
3038
|
-
}, null, 40, Tr), [
|
|
3039
|
-
[Pn, s.value]
|
|
3040
|
-
]),
|
|
3041
|
-
h("button", {
|
|
3042
|
-
class: "p-2",
|
|
3043
|
-
onClick: i
|
|
3044
|
-
}, [
|
|
3045
|
-
N(f, {
|
|
3046
|
-
name: "add",
|
|
3047
|
-
size: "sm"
|
|
3048
|
-
})
|
|
3049
|
-
])
|
|
3050
|
-
])) : H("", !0)
|
|
3051
|
-
]);
|
|
3052
|
-
};
|
|
3053
|
-
}
|
|
3054
|
-
}), _r = { class: "space-y-16" }, Ar = {
|
|
3055
|
-
key: 0,
|
|
3056
|
-
class: "space-y-8"
|
|
3057
|
-
}, Br = { class: "text-xs font-semibold text-gray-500" }, Cr = ["src"], Dr = { class: "flex-1 min-w-0 flex flex-col gap-2" }, Nr = { class: "text-xs font-semibold truncate" }, Fr = {
|
|
3058
|
-
key: 0,
|
|
3059
|
-
class: "text-[11px] text-red-600"
|
|
3060
|
-
}, Lr = {
|
|
3061
|
-
key: 1,
|
|
3062
|
-
class: "text-[11px] text-gray-500"
|
|
3063
|
-
}, Ur = ["onClick"], jr = { class: "space-y-8" }, Mr = { class: "text-xs font-semibold text-gray-500" }, Ir = {
|
|
3064
|
-
key: 0,
|
|
3065
|
-
class: "flex flex-wrap items-center gap-8"
|
|
3066
|
-
}, zr = { class: "text-[11px] text-gray-400" }, Vr = ["onClick"], vn = /* @__PURE__ */ Se({
|
|
3067
|
-
__name: "UploadPanel",
|
|
3068
|
-
props: {
|
|
3069
|
-
businessId: {},
|
|
3070
|
-
restaurantId: {},
|
|
3071
|
-
availableTags: {}
|
|
3072
|
-
},
|
|
3073
|
-
emits: ["tag-created", "uploaded"],
|
|
3074
|
-
setup(e, { expose: t, emit: n }) {
|
|
3075
|
-
const { t: a } = Ee({ messages: De }), o = e, r = n, s = L([]), i = L([]), u = L(!1), p = Oe(() => s.value.length), d = Oe(() => o.availableTags.filter((c) => !i.value.includes(c)).slice(0, 6));
|
|
3076
|
-
function f() {
|
|
3077
|
-
s.value.forEach((c) => URL.revokeObjectURL(c.previewUrl)), s.value = [], i.value = [];
|
|
3078
|
-
}
|
|
3079
|
-
async function b(c) {
|
|
3080
|
-
const m = URL.createObjectURL(c), v = { id: crypto.randomUUID(), file: c, previewUrl: m, dimensions: null, error: null };
|
|
3081
|
-
s.value.push(v), v.dimensions = await $t(m);
|
|
3082
|
-
}
|
|
3083
|
-
function w(c) {
|
|
3084
|
-
const m = s.value.find((v) => v.id === c);
|
|
3085
|
-
m && URL.revokeObjectURL(m.previewUrl), s.value = s.value.filter((v) => v.id !== c);
|
|
3086
|
-
}
|
|
3087
|
-
function g(c) {
|
|
3088
|
-
return c >= 1024 * 1024 ? `${(c / 1024 / 1024).toFixed(1)} MB` : `${Math.round(c / 1024)} KB`;
|
|
3089
|
-
}
|
|
3090
|
-
async function y(c) {
|
|
3091
|
-
const m = c.dimensions ?? await $t(c.previewUrl), v = c.file.type || "image/jpeg", E = await No(o.businessId, {
|
|
3092
|
-
restaurantId: o.restaurantId,
|
|
3093
|
-
fileName: c.file.name,
|
|
3094
|
-
contentType: v,
|
|
3095
|
-
fileSize: c.file.size
|
|
3096
|
-
}), x = await fetch(E.uploadUrl, { method: "PUT", headers: { "Content-Type": v }, body: c.file });
|
|
3097
|
-
if (!x.ok)
|
|
3098
|
-
throw new Error(a("mediaPicker.uploadPanel.uploadFailedError", { status: x.status }));
|
|
3099
|
-
const B = await Fo(o.businessId, E.assetId, m);
|
|
3100
|
-
return i.value.length && await Uo(o.businessId, B.id, i.value), B;
|
|
3101
|
-
}
|
|
3102
|
-
async function U() {
|
|
3103
|
-
if (!(!s.value.length || !o.businessId)) {
|
|
3104
|
-
u.value = !0;
|
|
3105
|
-
try {
|
|
3106
|
-
const c = s.value, m = await Promise.allSettled(c.map(y)), v = /* @__PURE__ */ new Set(), E = [];
|
|
3107
|
-
m.forEach((x, B) => {
|
|
3108
|
-
x.status === "rejected" ? (v.add(c[B].id), c[B].error = x.reason instanceof Error ? x.reason.message : String(x.reason)) : E.push(x.value);
|
|
3109
|
-
}), s.value = c.filter((x) => v.has(x.id)), E.length > 0 && r("uploaded", E);
|
|
3110
|
-
} finally {
|
|
3111
|
-
u.value = !1;
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
return t({ stagedCount: p, uploading: u, upload: U, reset: f }), (c, m) => {
|
|
3116
|
-
const v = M("FmDropField"), E = M("FmIcon");
|
|
3117
|
-
return P(), T("div", _r, [
|
|
3118
|
-
N(v, {
|
|
3119
|
-
label: O(a)("mediaPicker.uploadPanel.dropLabel"),
|
|
3120
|
-
accept: "image/jpeg,image/png,image/webp",
|
|
3121
|
-
"max-file-size": 10 * 1024 * 1024,
|
|
3122
|
-
onFileUpload: b
|
|
3123
|
-
}, {
|
|
3124
|
-
"helper-text": ae(() => [
|
|
3125
|
-
be(k(O(a)("mediaPicker.uploadPanel.helperText")), 1)
|
|
3126
|
-
]),
|
|
3127
|
-
_: 1
|
|
3128
|
-
}, 8, ["label"]),
|
|
3129
|
-
s.value.length ? (P(), T("div", Ar, [
|
|
3130
|
-
h("div", Br, k(O(a)("mediaPicker.uploadPanel.stagedCount", { count: s.value.length })), 1),
|
|
3131
|
-
(P(!0), T(ee, null, we(s.value, (x) => (P(), T("div", {
|
|
3132
|
-
key: x.id,
|
|
3133
|
-
class: ue(["flex items-center gap-12 p-8 border rounded-lg", x.error ? "border-red-300 bg-red-50" : "border-fm-color-neutral-gray-200"])
|
|
3134
|
-
}, [
|
|
3135
|
-
h("img", {
|
|
3136
|
-
src: x.previewUrl,
|
|
3137
|
-
class: "w-[44px] h-[44px] rounded flex-shrink-0 object-cover"
|
|
3138
|
-
}, null, 8, Cr),
|
|
3139
|
-
h("div", Dr, [
|
|
3140
|
-
h("span", Nr, k(x.file.name), 1),
|
|
3141
|
-
x.error ? (P(), T("span", Fr, k(x.error), 1)) : (P(), T("span", Lr, [
|
|
3142
|
-
x.dimensions ? (P(), T(ee, { key: 0 }, [
|
|
3143
|
-
be(k(x.dimensions.width) + "×" + k(x.dimensions.height) + " · ", 1)
|
|
3144
|
-
], 64)) : H("", !0),
|
|
3145
|
-
be(k(g(x.file.size)), 1)
|
|
3146
|
-
]))
|
|
3147
|
-
]),
|
|
3148
|
-
h("button", {
|
|
3149
|
-
class: "w-[28px] h-[28px] rounded flex-shrink-0 flex items-center justify-center text-gray-500 hover:bg-red-50 hover:text-red-600",
|
|
3150
|
-
onClick: (B) => w(x.id)
|
|
3151
|
-
}, [
|
|
3152
|
-
N(E, {
|
|
3153
|
-
name: "close",
|
|
3154
|
-
size: "sm"
|
|
3155
|
-
})
|
|
3156
|
-
], 8, Ur)
|
|
3157
|
-
], 2))), 128))
|
|
3158
|
-
])) : H("", !0),
|
|
3159
|
-
h("div", jr, [
|
|
3160
|
-
h("div", Mr, k(O(a)("mediaPicker.uploadPanel.tagsLabel")), 1),
|
|
3161
|
-
N(wn, {
|
|
3162
|
-
modelValue: i.value,
|
|
3163
|
-
"onUpdate:modelValue": m[0] || (m[0] = (x) => i.value = x),
|
|
3164
|
-
tags: e.availableTags,
|
|
3165
|
-
mode: "assign",
|
|
3166
|
-
onTagCreated: m[1] || (m[1] = (x) => r("tag-created", x))
|
|
3167
|
-
}, null, 8, ["modelValue", "tags"]),
|
|
3168
|
-
d.value.length ? (P(), T("div", Ir, [
|
|
3169
|
-
h("span", zr, k(O(a)("mediaPicker.uploadPanel.suggestedTagsLabel")), 1),
|
|
3170
|
-
(P(!0), T(ee, null, we(d.value, (x) => (P(), T("button", {
|
|
3171
|
-
key: x,
|
|
3172
|
-
class: "h-[26px] px-12 rounded-full border border-dashed border-fm-color-neutral-gray-300 text-[11px] font-semibold text-gray-500",
|
|
3173
|
-
onClick: (B) => i.value.push(x)
|
|
3174
|
-
}, " + " + k(x), 9, Vr))), 128))
|
|
3175
|
-
])) : H("", !0)
|
|
3176
|
-
])
|
|
3177
|
-
]);
|
|
3178
|
-
};
|
|
3179
|
-
}
|
|
3180
|
-
}), qr = { class: "w-full flex items-center justify-between gap-16 pr-8" }, $r = { class: "text-xs font-normal text-fm-color-typo-secondary" }, Gr = { class: "flex gap-16 border-b border-fm-color-neutral-gray-200 mb-12" }, Hr = { class: "flex items-center justify-between w-full" }, Jr = {
|
|
3181
|
-
key: 0,
|
|
3182
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
3183
|
-
}, Wr = { key: 1 }, Kr = { class: "flex gap-8" }, Xr = /* @__PURE__ */ Se({
|
|
3184
|
-
__name: "MediaPickerModal",
|
|
3185
|
-
props: {
|
|
3186
|
-
open: { type: Boolean },
|
|
3187
|
-
businessId: {},
|
|
3188
|
-
restaurantId: {},
|
|
3189
|
-
selectionMode: { default: "single" }
|
|
3190
|
-
},
|
|
3191
|
-
emits: ["update:open", "select", "confirm"],
|
|
3192
|
-
setup(e, { emit: t }) {
|
|
3193
|
-
const { t: n } = Ee({ messages: De }), a = e, o = t, r = L("browse"), s = L(""), i = L(null), u = L([]), p = L([]), d = L(0), f = L([]), b = L(!1);
|
|
3194
|
-
async function w() {
|
|
3195
|
-
if (a.businessId) {
|
|
3196
|
-
b.value = !0;
|
|
3197
|
-
try {
|
|
3198
|
-
const B = await et({
|
|
3199
|
-
businessId: a.businessId,
|
|
3200
|
-
restaurantId: a.restaurantId,
|
|
3201
|
-
search: s.value || void 0,
|
|
3202
|
-
tags: i.value ? [i.value] : void 0,
|
|
3203
|
-
limit: 200,
|
|
3204
|
-
sortBy: "createdAt",
|
|
3205
|
-
descending: !0
|
|
3206
|
-
});
|
|
3207
|
-
u.value = B.resources;
|
|
3208
|
-
} finally {
|
|
3209
|
-
b.value = !1;
|
|
3210
|
-
}
|
|
3211
|
-
}
|
|
3212
|
-
}
|
|
3213
|
-
async function g() {
|
|
3214
|
-
if (!a.businessId)
|
|
3215
|
-
return;
|
|
3216
|
-
const [B, C] = await Promise.all([Do(a.businessId), bn(a.businessId)]);
|
|
3217
|
-
p.value = B.tags, d.value = B.total, f.value = C;
|
|
3218
|
-
}
|
|
3219
|
-
ye(
|
|
3220
|
-
() => a.open,
|
|
3221
|
-
(B) => {
|
|
3222
|
-
var C;
|
|
3223
|
-
B && (r.value = "browse", s.value = "", i.value = null, U.value = /* @__PURE__ */ new Set(), (C = E.value) == null || C.reset(), g(), w());
|
|
3224
|
-
}
|
|
3225
|
-
), ye(i, w);
|
|
3226
|
-
let y;
|
|
3227
|
-
ye(s, () => {
|
|
3228
|
-
clearTimeout(y), y = setTimeout(w, 250);
|
|
3229
|
-
});
|
|
3230
|
-
const U = L(/* @__PURE__ */ new Set());
|
|
3231
|
-
function c(B) {
|
|
3232
|
-
const C = new Set(U.value);
|
|
3233
|
-
C.has(B.id) ? C.delete(B.id) : C.add(B.id), U.value = C;
|
|
3234
|
-
}
|
|
3235
|
-
function m(B) {
|
|
3236
|
-
if (a.selectionMode === "single") {
|
|
3237
|
-
o("select", B), o("update:open", !1);
|
|
3238
|
-
return;
|
|
3239
|
-
}
|
|
3240
|
-
c(B);
|
|
3241
|
-
}
|
|
3242
|
-
function v() {
|
|
3243
|
-
const B = u.value.filter((C) => U.value.has(C.id));
|
|
3244
|
-
o("confirm", B), o("update:open", !1);
|
|
3245
|
-
}
|
|
3246
|
-
const E = L(null);
|
|
3247
|
-
async function x() {
|
|
3248
|
-
var B;
|
|
3249
|
-
(B = E.value) != null && B.stagedCount || (r.value = "browse"), await Promise.all([w(), g()]);
|
|
3250
|
-
}
|
|
3251
|
-
return (B, C) => {
|
|
3252
|
-
const de = M("FmSearch"), oe = M("FmButton"), Y = M("FmDialog");
|
|
3253
|
-
return P(), Q(Y, {
|
|
3254
|
-
"model-value": e.open,
|
|
3255
|
-
"max-width": 900,
|
|
3256
|
-
"onUpdate:modelValue": C[7] || (C[7] = (F) => !F && o("update:open", !1))
|
|
3257
|
-
}, {
|
|
3258
|
-
"dialog-header": ae(() => [
|
|
3259
|
-
h("div", qr, [
|
|
3260
|
-
h("div", null, [
|
|
3261
|
-
h("div", null, k(O(n)("mediaPicker.pickerModal.title")), 1),
|
|
3262
|
-
h("div", $r, k(e.selectionMode === "multiple" ? O(n)("mediaPicker.pickerModal.subtitleMultiple") : O(n)("mediaPicker.pickerModal.subtitleSingle")), 1)
|
|
3263
|
-
]),
|
|
3264
|
-
r.value === "browse" ? (P(), Q(de, {
|
|
3265
|
-
key: 0,
|
|
3266
|
-
modelValue: s.value,
|
|
3267
|
-
"onUpdate:modelValue": C[0] || (C[0] = (F) => s.value = F),
|
|
3268
|
-
placeholder: O(n)("mediaPicker.pickerModal.searchPlaceholder"),
|
|
3269
|
-
class: "w-[200px] shrink-0"
|
|
3270
|
-
}, null, 8, ["modelValue", "placeholder"])) : H("", !0)
|
|
3271
|
-
])
|
|
3272
|
-
]),
|
|
3273
|
-
"dialog-footer": ae(() => {
|
|
3274
|
-
var F, re;
|
|
3275
|
-
return [
|
|
3276
|
-
h("div", Hr, [
|
|
3277
|
-
r.value === "browse" && e.selectionMode === "multiple" ? (P(), T("span", Jr, [
|
|
3278
|
-
U.value.size ? (P(), T(ee, { key: 0 }, [
|
|
3279
|
-
be(k(O(n)("mediaPicker.pickerModal.selectedCount", { count: U.value.size })), 1)
|
|
3280
|
-
], 64)) : (P(), T(ee, { key: 1 }, [
|
|
3281
|
-
be(k(O(n)("mediaPicker.pickerModal.selectPrompt")), 1)
|
|
3282
|
-
], 64))
|
|
3283
|
-
])) : (P(), T("span", Wr)),
|
|
3284
|
-
h("div", Kr, [
|
|
3285
|
-
N(oe, {
|
|
3286
|
-
label: O(n)("mediaPicker.pickerModal.cancelButton"),
|
|
3287
|
-
variant: "tertiary",
|
|
3288
|
-
onClick: C[5] || (C[5] = (ke) => o("update:open", !1))
|
|
3289
|
-
}, null, 8, ["label"]),
|
|
3290
|
-
r.value === "upload" ? (P(), Q(oe, {
|
|
3291
|
-
key: 0,
|
|
3292
|
-
label: O(n)("mediaPicker.pickerModal.uploadSubmitButton", { count: ((F = E.value) == null ? void 0 : F.stagedCount) ?? 0 }),
|
|
3293
|
-
variant: "primary",
|
|
3294
|
-
disabled: !((re = E.value) != null && re.stagedCount) || E.value.uploading,
|
|
3295
|
-
onClick: C[6] || (C[6] = (ke) => {
|
|
3296
|
-
var G;
|
|
3297
|
-
return (G = E.value) == null ? void 0 : G.upload();
|
|
3298
|
-
})
|
|
3299
|
-
}, null, 8, ["label", "disabled"])) : e.selectionMode === "multiple" ? (P(), Q(oe, {
|
|
3300
|
-
key: 1,
|
|
3301
|
-
label: O(n)("mediaPicker.pickerModal.confirmButton"),
|
|
3302
|
-
variant: "primary",
|
|
3303
|
-
disabled: U.value.size === 0,
|
|
3304
|
-
onClick: v
|
|
3305
|
-
}, null, 8, ["label", "disabled"])) : H("", !0)
|
|
3306
|
-
])
|
|
3307
|
-
])
|
|
3308
|
-
];
|
|
3309
|
-
}),
|
|
3310
|
-
default: ae(() => [
|
|
3311
|
-
h("div", Gr, [
|
|
3312
|
-
h("button", {
|
|
3313
|
-
class: ue(["pb-8 px-4 text-sm", r.value === "browse" ? "font-semibold border-b-2 border-[--fm-color-brand-primary,#FF7823]" : "text-gray-500"]),
|
|
3314
|
-
onClick: C[1] || (C[1] = (F) => r.value = "browse")
|
|
3315
|
-
}, k(O(n)("mediaPicker.pickerModal.browseTab")), 3),
|
|
3316
|
-
h("button", {
|
|
3317
|
-
class: ue(["pb-8 px-4 text-sm", r.value === "upload" ? "font-semibold border-b-2 border-[--fm-color-brand-primary,#FF7823]" : "text-gray-500"]),
|
|
3318
|
-
onClick: C[2] || (C[2] = (F) => r.value = "upload")
|
|
3319
|
-
}, k(O(n)("mediaPicker.pickerModal.uploadTab")), 3)
|
|
3320
|
-
]),
|
|
3321
|
-
r.value === "browse" ? (P(), T(ee, { key: 0 }, [
|
|
3322
|
-
p.value.length ? (P(), Q(Pr, {
|
|
3323
|
-
key: 0,
|
|
3324
|
-
modelValue: i.value,
|
|
3325
|
-
"onUpdate:modelValue": C[3] || (C[3] = (F) => i.value = F),
|
|
3326
|
-
tags: p.value,
|
|
3327
|
-
total: d.value,
|
|
3328
|
-
class: "mb-12"
|
|
3329
|
-
}, null, 8, ["modelValue", "tags", "total"])) : H("", !0),
|
|
3330
|
-
N(yn, {
|
|
3331
|
-
assets: u.value,
|
|
3332
|
-
loading: b.value,
|
|
3333
|
-
selectable: e.selectionMode === "multiple",
|
|
3334
|
-
"selected-ids": U.value,
|
|
3335
|
-
onOpen: m,
|
|
3336
|
-
onToggle: c
|
|
3337
|
-
}, null, 8, ["assets", "loading", "selectable", "selected-ids"])
|
|
3338
|
-
], 64)) : (P(), Q(vn, {
|
|
3339
|
-
key: 1,
|
|
3340
|
-
ref_key: "uploadPanelRef",
|
|
3341
|
-
ref: E,
|
|
3342
|
-
"business-id": e.businessId,
|
|
3343
|
-
"restaurant-id": e.restaurantId,
|
|
3344
|
-
"available-tags": f.value,
|
|
3345
|
-
onTagCreated: C[4] || (C[4] = (F) => f.value.push(F)),
|
|
3346
|
-
onUploaded: x
|
|
3347
|
-
}, null, 8, ["business-id", "restaurant-id", "available-tags"]))
|
|
3348
|
-
]),
|
|
3349
|
-
_: 1
|
|
3350
|
-
}, 8, ["model-value"]);
|
|
3351
|
-
};
|
|
3352
|
-
}
|
|
3353
|
-
}), Qr = {
|
|
3354
|
-
key: 0,
|
|
3355
|
-
class: "flex h-[620px]"
|
|
3356
|
-
}, Zr = { class: "flex-1 min-w-0 bg-gray-900 flex items-center justify-center overflow-hidden" }, Yr = ["src", "alt"], es = { class: "w-[320px] flex-shrink-0 flex flex-col gap-12 p-16 overflow-y-auto" }, ts = { class: "flex items-center justify-between" }, ns = { class: "fm-typo-en-title-sm-600" }, as = {
|
|
3357
|
-
key: 0,
|
|
3358
|
-
class: "flex items-start gap-8"
|
|
3359
|
-
}, os = { class: "flex-1 text-sm font-semibold break-all" }, rs = {
|
|
3360
|
-
key: 1,
|
|
3361
|
-
class: "flex gap-8"
|
|
3362
|
-
}, ss = { class: "text-xs space-y-8 border-t pt-8" }, is = { class: "flex justify-between" }, ls = { class: "text-gray-500" }, us = { class: "flex justify-between" }, cs = { class: "text-gray-500" }, ds = { class: "flex justify-between" }, ps = { class: "text-gray-500" }, fs = {
|
|
3363
|
-
key: 2,
|
|
3364
|
-
class: "flex flex-wrap gap-4"
|
|
3365
|
-
}, ms = { class: "flex gap-8 border-t pt-12" }, gs = /* @__PURE__ */ Se({
|
|
3366
|
-
__name: "AssetDetailDialog",
|
|
3367
|
-
props: {
|
|
3368
|
-
asset: {},
|
|
3369
|
-
businessId: {}
|
|
3370
|
-
},
|
|
3371
|
-
emits: ["close", "renamed", "deleted"],
|
|
3372
|
-
setup(e, { emit: t }) {
|
|
3373
|
-
const n = Ht(), { t: a } = Ee({ messages: De }), o = e, r = t, s = L(!1), i = L("");
|
|
3374
|
-
ye(
|
|
3375
|
-
() => o.asset,
|
|
3376
|
-
(g) => {
|
|
3377
|
-
s.value = !1, i.value = (g == null ? void 0 : g.fileName) ?? "";
|
|
3378
|
-
}
|
|
3379
|
-
);
|
|
3380
|
-
function u() {
|
|
3381
|
-
var g;
|
|
3382
|
-
i.value = ((g = o.asset) == null ? void 0 : g.fileName) ?? "", s.value = !0;
|
|
3383
|
-
}
|
|
3384
|
-
async function p() {
|
|
3385
|
-
o.asset && (await Lo(o.businessId, o.asset.id, i.value), s.value = !1, r("renamed"));
|
|
3386
|
-
}
|
|
3387
|
-
function d() {
|
|
3388
|
-
if (!o.asset)
|
|
3389
|
-
return;
|
|
3390
|
-
const g = o.asset;
|
|
3391
|
-
n.open({
|
|
3392
|
-
title: a("mediaPicker.assetDetailDialog.deleteDialogTitle"),
|
|
3393
|
-
message: a("mediaPicker.assetDetailDialog.deleteDialogMessage", {
|
|
3394
|
-
fileName: g.fileName,
|
|
3395
|
-
disclaimer: a("mediaPicker.assetDetailDialog.deleteDisclaimer")
|
|
3396
|
-
}),
|
|
3397
|
-
primaryActions: { text: a("mediaPicker.assetDetailDialog.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3398
|
-
secondaryActions: { text: a("mediaPicker.assetDetailDialog.cancelButton"), close: !0 }
|
|
3399
|
-
}).onPrimary(async () => {
|
|
3400
|
-
await pt(o.businessId, g.id), r("deleted", g.id), n.close();
|
|
3401
|
-
});
|
|
3402
|
-
}
|
|
3403
|
-
function f() {
|
|
3404
|
-
var g;
|
|
3405
|
-
o.asset && ((g = navigator.clipboard) == null || g.writeText(o.asset.url));
|
|
3406
|
-
}
|
|
3407
|
-
function b(g) {
|
|
3408
|
-
var y;
|
|
3409
|
-
return ((y = g.split("/")[1]) == null ? void 0 : y.toUpperCase()) ?? g;
|
|
3410
|
-
}
|
|
3411
|
-
function w(g) {
|
|
3412
|
-
return g >= 1024 * 1024 ? `${(g / 1024 / 1024).toFixed(1)} MB` : `${Math.round(g / 1024)} KB`;
|
|
3413
|
-
}
|
|
3414
|
-
return (g, y) => {
|
|
3415
|
-
const U = M("FmIcon"), c = M("FmTextField"), m = M("FmButton"), v = M("FmDialog");
|
|
3416
|
-
return P(), Q(v, {
|
|
3417
|
-
"model-value": !!e.asset,
|
|
3418
|
-
"max-width": 920,
|
|
3419
|
-
"max-height": "620px",
|
|
3420
|
-
"content-class": "!p-0 asset-preview-dialog-content",
|
|
3421
|
-
"close-button": !1,
|
|
3422
|
-
"onUpdate:modelValue": y[2] || (y[2] = (E) => !E && r("close"))
|
|
3423
|
-
}, {
|
|
3424
|
-
default: ae(() => [
|
|
3425
|
-
e.asset ? (P(), T("div", Qr, [
|
|
3426
|
-
h("div", Zr, [
|
|
3427
|
-
h("img", {
|
|
3428
|
-
src: e.asset.url,
|
|
3429
|
-
alt: e.asset.fileName,
|
|
3430
|
-
class: "max-w-full max-h-full object-contain"
|
|
3431
|
-
}, null, 8, Yr)
|
|
3432
|
-
]),
|
|
3433
|
-
h("div", es, [
|
|
3434
|
-
h("div", ts, [
|
|
3435
|
-
h("span", ns, k(O(a)("mediaPicker.assetDetailDialog.previewTitle")), 1),
|
|
3436
|
-
h("button", {
|
|
3437
|
-
class: "w-[32px] h-[32px] rounded-lg bg-fm-color-neutral-gray-100 flex items-center justify-center flex-shrink-0",
|
|
3438
|
-
onClick: y[0] || (y[0] = (E) => r("close"))
|
|
3439
|
-
}, [
|
|
3440
|
-
N(U, {
|
|
3441
|
-
name: "close",
|
|
3442
|
-
size: "sm"
|
|
3443
|
-
})
|
|
3444
|
-
])
|
|
3445
|
-
]),
|
|
3446
|
-
s.value ? (P(), T("div", rs, [
|
|
3447
|
-
N(c, {
|
|
3448
|
-
modelValue: i.value,
|
|
3449
|
-
"onUpdate:modelValue": y[1] || (y[1] = (E) => i.value = E)
|
|
3450
|
-
}, null, 8, ["modelValue"]),
|
|
3451
|
-
N(m, {
|
|
3452
|
-
label: O(a)("mediaPicker.assetDetailDialog.saveButton"),
|
|
3453
|
-
size: "md",
|
|
3454
|
-
onClick: p
|
|
3455
|
-
}, null, 8, ["label"])
|
|
3456
|
-
])) : (P(), T("div", as, [
|
|
3457
|
-
h("span", os, k(e.asset.fileName), 1),
|
|
3458
|
-
h("button", { onClick: u }, [
|
|
3459
|
-
N(U, {
|
|
3460
|
-
name: "edit",
|
|
3461
|
-
size: "sm"
|
|
3462
|
-
})
|
|
3463
|
-
])
|
|
3464
|
-
])),
|
|
3465
|
-
h("div", ss, [
|
|
3466
|
-
h("div", is, [
|
|
3467
|
-
h("span", ls, k(O(a)("mediaPicker.assetDetailDialog.dimensionsLabel")), 1),
|
|
3468
|
-
h("span", null, k(e.asset.width) + "×" + k(e.asset.height), 1)
|
|
3469
|
-
]),
|
|
3470
|
-
h("div", us, [
|
|
3471
|
-
h("span", cs, k(O(a)("mediaPicker.assetDetailDialog.sizeLabel")), 1),
|
|
3472
|
-
h("span", null, k(w(e.asset.fileSizeBytes)), 1)
|
|
3473
|
-
]),
|
|
3474
|
-
h("div", ds, [
|
|
3475
|
-
h("span", ps, k(O(a)("mediaPicker.assetDetailDialog.formatLabel")), 1),
|
|
3476
|
-
h("span", null, k(b(e.asset.mimeType)), 1)
|
|
3477
|
-
])
|
|
3478
|
-
]),
|
|
3479
|
-
e.asset.tags.length ? (P(), T("div", fs, [
|
|
3480
|
-
(P(!0), T(ee, null, we(e.asset.tags, (E) => (P(), T("span", {
|
|
3481
|
-
key: E,
|
|
3482
|
-
class: "text-[11px] bg-gray-100 rounded-full px-8 py-[2px]"
|
|
3483
|
-
}, " # " + k(E), 1))), 128))
|
|
3484
|
-
])) : H("", !0),
|
|
3485
|
-
y[3] || (y[3] = h("div", { class: "flex-1" }, null, -1)),
|
|
3486
|
-
h("div", ms, [
|
|
3487
|
-
N(m, {
|
|
3488
|
-
label: O(a)("mediaPicker.assetDetailDialog.copyLinkButton"),
|
|
3489
|
-
variant: "tertiary",
|
|
3490
|
-
size: "md",
|
|
3491
|
-
"prepend-icon": "link",
|
|
3492
|
-
class: "flex-1",
|
|
3493
|
-
onClick: f
|
|
3494
|
-
}, null, 8, ["label"]),
|
|
3495
|
-
N(m, {
|
|
3496
|
-
label: O(a)("mediaPicker.assetDetailDialog.deleteButton"),
|
|
3497
|
-
variant: "destructive",
|
|
3498
|
-
size: "md",
|
|
3499
|
-
"prepend-icon": "delete",
|
|
3500
|
-
onClick: d
|
|
3501
|
-
}, null, 8, ["label"])
|
|
3502
|
-
])
|
|
3503
|
-
])
|
|
3504
|
-
])) : H("", !0)
|
|
3505
|
-
]),
|
|
3506
|
-
_: 1
|
|
3507
|
-
}, 8, ["model-value"]);
|
|
3508
|
-
};
|
|
3509
|
-
}
|
|
3510
|
-
}), hs = { class: "p-24 relative min-h-full" }, bs = { class: "flex items-center justify-between mb-16" }, ys = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, ws = { class: "flex gap-8" }, vs = { class: "flex flex-col gap-12 mb-16" }, xs = { class: "flex items-center gap-12" }, Ss = { class: "flex-1 text-xs text-fm-color-typo-secondary" }, Es = {
|
|
3511
|
-
key: 0,
|
|
3512
|
-
class: "text-fm-color-typo-primary font-semibold"
|
|
3513
|
-
}, ks = { key: 1 }, Ps = {
|
|
3514
|
-
key: 0,
|
|
3515
|
-
class: "fixed bottom-24 left-1/2 -translate-x-1/2 flex items-center gap-12 bg-white border rounded-lg shadow-lg px-16 py-8 z-30"
|
|
3516
|
-
}, Os = { class: "text-sm font-semibold" }, Rs = { class: "flex justify-end gap-8 w-full" }, Bs = /* @__PURE__ */ Se({
|
|
3517
|
-
__name: "AssetLibrary",
|
|
3518
|
-
setup(e) {
|
|
3519
|
-
const t = Gt(), { t: n } = Ee(), a = Oe(() => {
|
|
3520
|
-
var A;
|
|
3521
|
-
return ((A = t.currentBusiness.value) == null ? void 0 : A.id) ?? "";
|
|
3522
|
-
}), o = Oe(() => {
|
|
3523
|
-
var A;
|
|
3524
|
-
return (A = t.currentRestaurant.value) == null ? void 0 : A._id;
|
|
3525
|
-
}), r = Ht(), s = L(!1);
|
|
3526
|
-
function i(A) {
|
|
3527
|
-
console.log("[media-debug] MediaPickerModal selected", A), v();
|
|
3528
|
-
}
|
|
3529
|
-
const u = L(""), p = L([]), d = L([]), f = L([]), b = L(!1), w = L("recent"), g = {
|
|
3530
|
-
recent: { sortBy: "createdAt", descending: !0 },
|
|
3531
|
-
name: { sortBy: "fileName", descending: !1 },
|
|
3532
|
-
size: { sortBy: "fileSizeBytes", descending: !0 }
|
|
3533
|
-
}, y = [{ icon: "grid_view" }, { icon: "view_list" }], U = L(y[0]), c = Oe(() => U.value.icon === "grid_view" ? "grid" : "list"), m = Oe(() => {
|
|
3534
|
-
const A = d.value.reduce((R, j) => R + j.fileSizeBytes, 0);
|
|
3535
|
-
return A >= 1024 * 1024 ? `${(A / 1024 / 1024).toFixed(1)} MB` : `${Math.round(A / 1024)} KB`;
|
|
3536
|
-
});
|
|
3537
|
-
async function v() {
|
|
3538
|
-
if (a.value) {
|
|
3539
|
-
d.value.length === 0 && (b.value = !0);
|
|
3540
|
-
try {
|
|
3541
|
-
const [A, R] = await Promise.all([
|
|
3542
|
-
et({
|
|
3543
|
-
businessId: a.value,
|
|
3544
|
-
restaurantId: o.value,
|
|
3545
|
-
search: u.value || void 0,
|
|
3546
|
-
tags: p.value.length ? p.value : void 0,
|
|
3547
|
-
...g[w.value]
|
|
3548
|
-
}),
|
|
3549
|
-
bn(a.value)
|
|
3550
|
-
]);
|
|
3551
|
-
d.value = A.resources, f.value = R;
|
|
3552
|
-
} finally {
|
|
3553
|
-
b.value = !1;
|
|
3554
|
-
}
|
|
3555
|
-
}
|
|
3556
|
-
}
|
|
3557
|
-
On(v), ye(a, v), ye([p, w], v);
|
|
3558
|
-
let E;
|
|
3559
|
-
ye(u, () => {
|
|
3560
|
-
clearTimeout(E), E = setTimeout(v, 250);
|
|
3561
|
-
});
|
|
3562
|
-
const x = L(/* @__PURE__ */ new Set());
|
|
3563
|
-
function B(A) {
|
|
3564
|
-
const R = new Set(x.value);
|
|
3565
|
-
R.has(A.id) ? R.delete(A.id) : R.add(A.id), x.value = R;
|
|
3566
|
-
}
|
|
3567
|
-
function C() {
|
|
3568
|
-
x.value = /* @__PURE__ */ new Set();
|
|
3569
|
-
}
|
|
3570
|
-
function de() {
|
|
3571
|
-
x.value = new Set(d.value.map((A) => A.id));
|
|
3572
|
-
}
|
|
3573
|
-
function oe() {
|
|
3574
|
-
const A = x.value.size;
|
|
3575
|
-
r.open({
|
|
3576
|
-
title: n("media.library.deleteBulkTitle"),
|
|
3577
|
-
message: n("media.library.deleteBulkMessage", { count: A, disclaimer: n("media.library.deleteDisclaimer") }),
|
|
3578
|
-
primaryActions: { text: n("media.library.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3579
|
-
secondaryActions: { text: n("media.library.cancelButton"), close: !0 }
|
|
3580
|
-
}).onPrimary(async () => {
|
|
3581
|
-
await Promise.all([...x.value].map((R) => pt(a.value, R))), C(), await v(), r.close();
|
|
3582
|
-
});
|
|
3583
|
-
}
|
|
3584
|
-
function Y(A) {
|
|
3585
|
-
r.open({
|
|
3586
|
-
title: n("media.library.deleteOneTitle"),
|
|
3587
|
-
message: n("media.library.deleteOneMessage", { fileName: A.fileName, disclaimer: n("media.library.deleteDisclaimer") }),
|
|
3588
|
-
primaryActions: { text: n("media.library.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3589
|
-
secondaryActions: { text: n("media.library.cancelButton"), close: !0 }
|
|
3590
|
-
}).onPrimary(async () => {
|
|
3591
|
-
await pt(a.value, A.id);
|
|
3592
|
-
const R = new Set(x.value);
|
|
3593
|
-
R.delete(A.id), x.value = R, await v(), r.close();
|
|
3594
|
-
});
|
|
3595
|
-
}
|
|
3596
|
-
const F = L(null);
|
|
3597
|
-
function re(A) {
|
|
3598
|
-
F.value = A;
|
|
3599
|
-
}
|
|
3600
|
-
async function ke() {
|
|
3601
|
-
await v(), F.value && (F.value = d.value.find((A) => {
|
|
3602
|
-
var R;
|
|
3603
|
-
return A.id === ((R = F.value) == null ? void 0 : R.id);
|
|
3604
|
-
}) ?? null);
|
|
3605
|
-
}
|
|
3606
|
-
async function G() {
|
|
3607
|
-
F.value = null, await v();
|
|
3608
|
-
}
|
|
3609
|
-
const ne = L(!1), K = L(null);
|
|
3610
|
-
function Ne() {
|
|
3611
|
-
var A;
|
|
3612
|
-
(A = K.value) == null || A.reset(), ne.value = !0;
|
|
3613
|
-
}
|
|
3614
|
-
async function tt() {
|
|
3615
|
-
var A;
|
|
3616
|
-
(A = K.value) != null && A.stagedCount || (ne.value = !1), await v();
|
|
3617
|
-
}
|
|
3618
|
-
return (A, R) => {
|
|
3619
|
-
const j = M("FmButton"), se = M("FmSearch"), pe = M("FmButtonGroup"), fe = M("FmDialog");
|
|
3620
|
-
return P(), T("div", hs, [
|
|
3621
|
-
h("div", bs, [
|
|
3622
|
-
h("h1", ys, k(O(n)("media.title")), 1),
|
|
3623
|
-
h("div", ws, [
|
|
3624
|
-
N(j, {
|
|
3625
|
-
label: O(n)("media.library.testPickerButton"),
|
|
3626
|
-
variant: "tertiary",
|
|
3627
|
-
onClick: R[0] || (R[0] = (z) => s.value = !0)
|
|
3628
|
-
}, null, 8, ["label"]),
|
|
3629
|
-
N(j, {
|
|
3630
|
-
label: O(n)("media.library.uploadButton"),
|
|
3631
|
-
"prepend-icon": "add",
|
|
3632
|
-
variant: "primary",
|
|
3633
|
-
onClick: Ne
|
|
3634
|
-
}, null, 8, ["label"])
|
|
3635
|
-
])
|
|
3636
|
-
]),
|
|
3637
|
-
h("div", vs, [
|
|
3638
|
-
N(se, {
|
|
3639
|
-
modelValue: u.value,
|
|
3640
|
-
"onUpdate:modelValue": R[1] || (R[1] = (z) => u.value = z),
|
|
3641
|
-
placeholder: O(n)("media.library.searchPlaceholder"),
|
|
3642
|
-
class: "max-w-[280px]"
|
|
3643
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
3644
|
-
f.value.length ? (P(), Q(O(wn), {
|
|
3645
|
-
key: 0,
|
|
3646
|
-
modelValue: p.value,
|
|
3647
|
-
"onUpdate:modelValue": R[2] || (R[2] = (z) => p.value = z),
|
|
3648
|
-
tags: f.value
|
|
3649
|
-
}, null, 8, ["modelValue", "tags"])) : H("", !0),
|
|
3650
|
-
h("div", xs, [
|
|
3651
|
-
h("div", Ss, [
|
|
3652
|
-
x.value.size > 0 ? (P(), T("span", Es, k(O(n)("media.library.selectedCount", { count: x.value.size })), 1)) : (P(), T("span", ks, k(O(n)("media.library.totalSummary", { count: d.value.length, size: m.value })), 1))
|
|
3653
|
-
]),
|
|
3654
|
-
N(j, {
|
|
3655
|
-
label: O(n)("media.library.selectAllButton"),
|
|
3656
|
-
variant: "tertiary",
|
|
3657
|
-
size: "md",
|
|
3658
|
-
onClick: de
|
|
3659
|
-
}, null, 8, ["label"]),
|
|
3660
|
-
N(pe, {
|
|
3661
|
-
modelValue: U.value,
|
|
3662
|
-
"onUpdate:modelValue": R[3] || (R[3] = (z) => U.value = z),
|
|
3663
|
-
items: y
|
|
3664
|
-
}, null, 8, ["modelValue"])
|
|
3665
|
-
])
|
|
3666
|
-
]),
|
|
3667
|
-
N(O(yn), {
|
|
3668
|
-
assets: d.value,
|
|
3669
|
-
loading: b.value,
|
|
3670
|
-
view: c.value,
|
|
3671
|
-
selectable: "",
|
|
3672
|
-
"selected-ids": x.value,
|
|
3673
|
-
onOpen: re,
|
|
3674
|
-
onToggle: B,
|
|
3675
|
-
onDelete: Y
|
|
3676
|
-
}, null, 8, ["assets", "loading", "view", "selected-ids"]),
|
|
3677
|
-
x.value.size > 0 ? (P(), T("div", Ps, [
|
|
3678
|
-
h("span", Os, k(O(n)("media.library.selectedCount", { count: x.value.size })), 1),
|
|
3679
|
-
N(j, {
|
|
3680
|
-
label: O(n)("media.library.cancelButton"),
|
|
3681
|
-
variant: "tertiary",
|
|
3682
|
-
size: "md",
|
|
3683
|
-
onClick: C
|
|
3684
|
-
}, null, 8, ["label"]),
|
|
3685
|
-
N(j, {
|
|
3686
|
-
label: O(n)("media.library.deleteSelectedButton"),
|
|
3687
|
-
variant: "destructive",
|
|
3688
|
-
size: "md",
|
|
3689
|
-
"prepend-icon": "delete",
|
|
3690
|
-
onClick: oe
|
|
3691
|
-
}, null, 8, ["label"])
|
|
3692
|
-
])) : H("", !0),
|
|
3693
|
-
N(O(gs), {
|
|
3694
|
-
asset: F.value,
|
|
3695
|
-
"business-id": a.value,
|
|
3696
|
-
onClose: R[4] || (R[4] = (z) => F.value = null),
|
|
3697
|
-
onRenamed: ke,
|
|
3698
|
-
onDeleted: G
|
|
3699
|
-
}, null, 8, ["asset", "business-id"]),
|
|
3700
|
-
N(O(Xr), {
|
|
3701
|
-
open: s.value,
|
|
3702
|
-
"onUpdate:open": R[5] || (R[5] = (z) => s.value = z),
|
|
3703
|
-
"business-id": a.value,
|
|
3704
|
-
"restaurant-id": o.value,
|
|
3705
|
-
onSelect: i
|
|
3706
|
-
}, null, 8, ["open", "business-id", "restaurant-id"]),
|
|
3707
|
-
N(fe, {
|
|
3708
|
-
modelValue: ne.value,
|
|
3709
|
-
"onUpdate:modelValue": R[9] || (R[9] = (z) => ne.value = z),
|
|
3710
|
-
"max-width": 480
|
|
3711
|
-
}, {
|
|
3712
|
-
"dialog-header": ae(() => [
|
|
3713
|
-
h("div", null, k(O(n)("media.library.uploadDialogTitle")), 1)
|
|
3714
|
-
]),
|
|
3715
|
-
"dialog-footer": ae(() => {
|
|
3716
|
-
var z, D;
|
|
3717
|
-
return [
|
|
3718
|
-
h("div", Rs, [
|
|
3719
|
-
N(j, {
|
|
3720
|
-
label: O(n)("media.library.cancelButton"),
|
|
3721
|
-
variant: "tertiary",
|
|
3722
|
-
onClick: R[7] || (R[7] = (J) => ne.value = !1)
|
|
3723
|
-
}, null, 8, ["label"]),
|
|
3724
|
-
N(j, {
|
|
3725
|
-
label: O(n)("media.library.uploadSubmitButton", { count: ((z = K.value) == null ? void 0 : z.stagedCount) ?? 0 }),
|
|
3726
|
-
variant: "primary",
|
|
3727
|
-
disabled: !((D = K.value) != null && D.stagedCount) || K.value.uploading,
|
|
3728
|
-
onClick: R[8] || (R[8] = (J) => {
|
|
3729
|
-
var me;
|
|
3730
|
-
return (me = K.value) == null ? void 0 : me.upload();
|
|
3731
|
-
})
|
|
3732
|
-
}, null, 8, ["label", "disabled"])
|
|
3733
|
-
])
|
|
3734
|
-
];
|
|
3735
|
-
}),
|
|
3736
|
-
default: ae(() => [
|
|
3737
|
-
N(O(vn), {
|
|
3738
|
-
ref_key: "uploadPanelRef",
|
|
3739
|
-
ref: K,
|
|
3740
|
-
"business-id": a.value,
|
|
3741
|
-
"restaurant-id": o.value,
|
|
3742
|
-
"available-tags": f.value,
|
|
3743
|
-
onTagCreated: R[6] || (R[6] = (z) => f.value.push(z)),
|
|
3744
|
-
onUploaded: tt
|
|
3745
|
-
}, null, 8, ["business-id", "restaurant-id", "available-tags"])
|
|
3746
|
-
]),
|
|
3747
|
-
_: 1
|
|
3748
|
-
}, 8, ["modelValue"])
|
|
3749
|
-
]);
|
|
3750
|
-
};
|
|
3751
|
-
}
|
|
3752
|
-
});
|
|
3753
|
-
export {
|
|
3754
|
-
Bs as default
|
|
3755
|
-
};
|