@feedmepos/mf-media 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
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
3
|
import { useDialog as Ht } from "@feedmepos/ui-library";
|
|
4
4
|
function Jt(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
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
10
|
let n = e;
|
|
11
11
|
const a = [];
|
|
12
12
|
for (; n != null && n !== Object.prototype; ) {
|
|
@@ -14,47 +14,47 @@ const { toString: Tn } = Object.prototype, { getPrototypeOf: Te } = Object, { it
|
|
|
14
14
|
return !1;
|
|
15
15
|
if (a.push(n), He(n, t))
|
|
16
16
|
return !0;
|
|
17
|
-
n =
|
|
17
|
+
n = Re(n);
|
|
18
18
|
}
|
|
19
19
|
return !1;
|
|
20
|
-
},
|
|
21
|
-
const n =
|
|
20
|
+
}, Tn = (e, t) => e != null && Ue(e, t) ? e[t] : void 0, ft = ((e) => (t) => {
|
|
21
|
+
const n = Rn.call(t);
|
|
22
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,
|
|
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
24
|
function _e(e) {
|
|
25
|
-
return e !== null && !
|
|
25
|
+
return e !== null && !Te(e) && e.constructor !== null && !Te(e.constructor) && W(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
26
26
|
}
|
|
27
27
|
const Kt = te("ArrayBuffer");
|
|
28
28
|
function _n(e) {
|
|
29
29
|
let t;
|
|
30
30
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Kt(e.buffer), t;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
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
34
|
return !1;
|
|
35
|
-
const t =
|
|
36
|
-
return (t === null || t === Object.prototype ||
|
|
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
37
|
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
38
38
|
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
39
39
|
!Ue(e, Wt) && !Ue(e, je);
|
|
40
|
-
},
|
|
41
|
-
if (!
|
|
40
|
+
}, Cn = (e) => {
|
|
41
|
+
if (!Ae(e) || _e(e))
|
|
42
42
|
return !1;
|
|
43
43
|
try {
|
|
44
44
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
45
45
|
} catch {
|
|
46
46
|
return !1;
|
|
47
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) =>
|
|
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
49
|
function In() {
|
|
50
50
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Rt = In(), Tt = typeof Rt.FormData < "u" ? Rt.FormData : void 0, zn = (e) => {
|
|
53
53
|
if (!e)
|
|
54
54
|
return !1;
|
|
55
|
-
if (
|
|
55
|
+
if (Tt && e instanceof Tt)
|
|
56
56
|
return !0;
|
|
57
|
-
const t =
|
|
57
|
+
const t = Re(e);
|
|
58
58
|
if (!t || t === Object.prototype || !W(e.append))
|
|
59
59
|
return !1;
|
|
60
60
|
const n = ft(e);
|
|
@@ -93,13 +93,13 @@ function Qt(e, t) {
|
|
|
93
93
|
return o;
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
|
-
const he = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(),
|
|
96
|
+
const he = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Zt = (e) => !Te(e) && e !== he;
|
|
97
97
|
function lt(...e) {
|
|
98
|
-
const { caseless: t, skipUndefined: n } =
|
|
98
|
+
const { caseless: t, skipUndefined: n } = Zt(this) && this || {}, a = {}, o = (r, s) => {
|
|
99
99
|
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
100
100
|
return;
|
|
101
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 || !
|
|
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
103
|
};
|
|
104
104
|
for (let r = 0, s = e.length; r < s; r++) {
|
|
105
105
|
const i = e[r];
|
|
@@ -152,14 +152,14 @@ const Wn = (e, t, n, { allOwnKeys: a } = {}) => (Me(
|
|
|
152
152
|
do {
|
|
153
153
|
for (o = Object.getOwnPropertyNames(e), r = o.length; r-- > 0; )
|
|
154
154
|
s = o[r], (!a || a(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0);
|
|
155
|
-
e = n !== !1 &&
|
|
155
|
+
e = n !== !1 && Re(e);
|
|
156
156
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
157
157
|
return t;
|
|
158
|
-
},
|
|
158
|
+
}, Zn = (e, t, n) => {
|
|
159
159
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
160
160
|
const a = e.indexOf(t, n);
|
|
161
161
|
return a !== -1 && a === n;
|
|
162
|
-
},
|
|
162
|
+
}, Yn = (e) => {
|
|
163
163
|
if (!e)
|
|
164
164
|
return null;
|
|
165
165
|
if (ve(e))
|
|
@@ -171,7 +171,7 @@ const Wn = (e, t, n, { allOwnKeys: a } = {}) => (Me(
|
|
|
171
171
|
for (; t-- > 0; )
|
|
172
172
|
n[t] = e[t];
|
|
173
173
|
return n;
|
|
174
|
-
}, ea = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
174
|
+
}, ea = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Re(Uint8Array)), ta = (e, t) => {
|
|
175
175
|
const n = (e && e[je]).call(e);
|
|
176
176
|
let a;
|
|
177
177
|
for (; (a = n.next()) && !a.done; ) {
|
|
@@ -186,14 +186,14 @@ const Wn = (e, t, n, { allOwnKeys: a } = {}) => (Me(
|
|
|
186
186
|
return a;
|
|
187
187
|
}, aa = te("HTMLFormElement"), oa = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, n, a) {
|
|
188
188
|
return n.toUpperCase() + a;
|
|
189
|
-
}), { propertyIsEnumerable: ra } = Object.prototype, sa = te("RegExp"),
|
|
189
|
+
}), { propertyIsEnumerable: ra } = Object.prototype, sa = te("RegExp"), Yt = (e, t) => {
|
|
190
190
|
const n = Object.getOwnPropertyDescriptors(e), a = {};
|
|
191
191
|
Me(n, (o, r) => {
|
|
192
192
|
let s;
|
|
193
193
|
(s = t(o, r, e)) !== !1 && (a[r] = s || o);
|
|
194
194
|
}), Object.defineProperties(e, a);
|
|
195
195
|
}, ia = (e) => {
|
|
196
|
-
|
|
196
|
+
Yt(e, (t, n) => {
|
|
197
197
|
if (W(e) && ["arguments", "caller", "callee"].includes(n))
|
|
198
198
|
return !1;
|
|
199
199
|
const a = e[n];
|
|
@@ -221,7 +221,7 @@ function da(e) {
|
|
|
221
221
|
}
|
|
222
222
|
const pa = (e) => {
|
|
223
223
|
const t = /* @__PURE__ */ new WeakSet(), n = (a) => {
|
|
224
|
-
if (
|
|
224
|
+
if (Ae(a)) {
|
|
225
225
|
if (t.has(a))
|
|
226
226
|
return;
|
|
227
227
|
if (_e(a))
|
|
@@ -231,14 +231,14 @@ const pa = (e) => {
|
|
|
231
231
|
const o = ve(a) ? [] : {};
|
|
232
232
|
return Me(a, (r, s) => {
|
|
233
233
|
const i = n(r);
|
|
234
|
-
!
|
|
234
|
+
!Te(i) && (o[s] = i);
|
|
235
235
|
}), t.delete(a), o;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
return a;
|
|
239
239
|
};
|
|
240
240
|
return n(e);
|
|
241
|
-
}, fa = te("AsyncFunction"), ma = (e) => 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
242
|
"message",
|
|
243
243
|
({ source: o, data: r }) => {
|
|
244
244
|
o === he && r === n && a.length && a.shift()();
|
|
@@ -252,17 +252,17 @@ const pa = (e) => {
|
|
|
252
252
|
isBuffer: _e,
|
|
253
253
|
isFormData: zn,
|
|
254
254
|
isArrayBufferView: _n,
|
|
255
|
-
isString:
|
|
255
|
+
isString: An,
|
|
256
256
|
isNumber: Xt,
|
|
257
|
-
isBoolean:
|
|
258
|
-
isObject:
|
|
257
|
+
isBoolean: Bn,
|
|
258
|
+
isObject: Ae,
|
|
259
259
|
isPlainObject: Ve,
|
|
260
|
-
isEmptyObject:
|
|
260
|
+
isEmptyObject: Cn,
|
|
261
261
|
isReadableStream: qn,
|
|
262
262
|
isRequest: $n,
|
|
263
263
|
isResponse: Gn,
|
|
264
264
|
isHeaders: Hn,
|
|
265
|
-
isUndefined:
|
|
265
|
+
isUndefined: Te,
|
|
266
266
|
isDate: Dn,
|
|
267
267
|
isFile: Nn,
|
|
268
268
|
isReactNativeBlob: Fn,
|
|
@@ -283,8 +283,8 @@ const pa = (e) => {
|
|
|
283
283
|
toFlatObject: Qn,
|
|
284
284
|
kindOf: ft,
|
|
285
285
|
kindOfTest: te,
|
|
286
|
-
endsWith:
|
|
287
|
-
toArray:
|
|
286
|
+
endsWith: Zn,
|
|
287
|
+
toArray: Yn,
|
|
288
288
|
forEachEntry: ta,
|
|
289
289
|
matchAll: na,
|
|
290
290
|
isHTMLForm: aa,
|
|
@@ -292,8 +292,8 @@ const pa = (e) => {
|
|
|
292
292
|
hasOwnProp: He,
|
|
293
293
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
294
294
|
hasOwnInPrototypeChain: Ue,
|
|
295
|
-
getSafeProp:
|
|
296
|
-
reduceDescriptors:
|
|
295
|
+
getSafeProp: Tn,
|
|
296
|
+
reduceDescriptors: Yt,
|
|
297
297
|
freezeMethods: ia,
|
|
298
298
|
toObjectSet: la,
|
|
299
299
|
toCamelCase: oa,
|
|
@@ -301,7 +301,7 @@ const pa = (e) => {
|
|
|
301
301
|
toFiniteNumber: ca,
|
|
302
302
|
findKey: Qt,
|
|
303
303
|
global: he,
|
|
304
|
-
isContextDefined:
|
|
304
|
+
isContextDefined: Zt,
|
|
305
305
|
isSpecCompliantForm: da,
|
|
306
306
|
toJSONObject: pa,
|
|
307
307
|
isAsyncFn: fa,
|
|
@@ -356,11 +356,11 @@ const va = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), xa = new
|
|
|
356
356
|
function mt(e, t) {
|
|
357
357
|
return l.isArray(e) ? e.map((n) => mt(n, t)) : wa(String(e).replace(t, ""));
|
|
358
358
|
}
|
|
359
|
-
const
|
|
359
|
+
const Sa = (e) => mt(e, va), Ea = (e) => mt(e, xa);
|
|
360
360
|
function nn(e) {
|
|
361
361
|
const t = /* @__PURE__ */ Object.create(null);
|
|
362
362
|
return l.forEach(e.toJSON(), (n, a) => {
|
|
363
|
-
t[a] =
|
|
363
|
+
t[a] = Ea(n);
|
|
364
364
|
}), t;
|
|
365
365
|
}
|
|
366
366
|
const _t = Symbol("internals");
|
|
@@ -368,7 +368,7 @@ function Le(e) {
|
|
|
368
368
|
return e && String(e).trim().toLowerCase();
|
|
369
369
|
}
|
|
370
370
|
function qe(e) {
|
|
371
|
-
return e === !1 || e == null ? e : l.isArray(e) ? e.map(qe) :
|
|
371
|
+
return e === !1 || e == null ? e : l.isArray(e) ? e.map(qe) : Sa(String(e));
|
|
372
372
|
}
|
|
373
373
|
function ka(e) {
|
|
374
374
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -388,10 +388,10 @@ function ot(e, t, n, a, o) {
|
|
|
388
388
|
return a.test(t);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Oa(e) {
|
|
392
392
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, a) => n.toUpperCase() + a);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function Ra(e, t) {
|
|
395
395
|
const n = l.toCamelCase(" " + t);
|
|
396
396
|
["get", "set", "has"].forEach((a) => {
|
|
397
397
|
Object.defineProperty(e, a + n, {
|
|
@@ -487,7 +487,7 @@ class Qe {
|
|
|
487
487
|
n[s] = qe(o), delete n[r];
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
|
-
const i = t ?
|
|
490
|
+
const i = t ? Oa(r) : String(r).trim();
|
|
491
491
|
i !== r && delete n[r], n[i] = qe(o), a[i] = !0;
|
|
492
492
|
}), this;
|
|
493
493
|
}
|
|
@@ -526,7 +526,7 @@ class Qe {
|
|
|
526
526
|
}).accessors, a = this.prototype;
|
|
527
527
|
function o(r) {
|
|
528
528
|
const s = Le(r);
|
|
529
|
-
n[s] || (
|
|
529
|
+
n[s] || (Ra(a, r), n[s] = !0);
|
|
530
530
|
}
|
|
531
531
|
return l.isArray(t) ? t.forEach(o) : o(t), this;
|
|
532
532
|
}
|
|
@@ -549,7 +549,7 @@ l.reduceDescriptors(Qe.prototype, ({ value: e }, t) => {
|
|
|
549
549
|
};
|
|
550
550
|
});
|
|
551
551
|
l.freezeMethods(Qe);
|
|
552
|
-
const
|
|
552
|
+
const Z = Qe, Ta = "[REDACTED ****]";
|
|
553
553
|
function _a(e) {
|
|
554
554
|
if (l.hasOwnProp(e, "toJSON"))
|
|
555
555
|
return !0;
|
|
@@ -561,13 +561,13 @@ function _a(e) {
|
|
|
561
561
|
}
|
|
562
562
|
return !1;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Aa(e, t) {
|
|
565
565
|
const n = new Set(t.map((r) => String(r).toLowerCase())), a = [], o = (r) => {
|
|
566
566
|
if (r === null || typeof r != "object" || l.isBuffer(r))
|
|
567
567
|
return r;
|
|
568
568
|
if (a.indexOf(r) !== -1)
|
|
569
569
|
return;
|
|
570
|
-
r instanceof
|
|
570
|
+
r instanceof Z && (r = r.toJSON()), a.push(r);
|
|
571
571
|
let s;
|
|
572
572
|
if (l.isArray(r))
|
|
573
573
|
s = [], r.forEach((i, u) => {
|
|
@@ -579,7 +579,7 @@ function Ca(e, t) {
|
|
|
579
579
|
return a.pop(), r;
|
|
580
580
|
s = /* @__PURE__ */ Object.create(null);
|
|
581
581
|
for (const [i, u] of Object.entries(r)) {
|
|
582
|
-
const p = n.has(i.toLowerCase()) ?
|
|
582
|
+
const p = n.has(i.toLowerCase()) ? Ta : o(u);
|
|
583
583
|
l.isUndefined(p) || (s[i] = p);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
@@ -621,7 +621,7 @@ class q extends Error {
|
|
|
621
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
622
|
}
|
|
623
623
|
toJSON() {
|
|
624
|
-
const t = this.config, n = t && l.hasOwnProp(t, "redact") ? t.redact : void 0, a = l.isArray(n) && n.length > 0 ?
|
|
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
625
|
return {
|
|
626
626
|
// Standard
|
|
627
627
|
message: this.message,
|
|
@@ -655,7 +655,7 @@ q.ERR_CANCELED = "ERR_CANCELED";
|
|
|
655
655
|
q.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
656
656
|
q.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
657
657
|
q.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
658
|
-
const
|
|
658
|
+
const S = q, Ba = null, an = 100;
|
|
659
659
|
function ut(e) {
|
|
660
660
|
return l.isPlainObject(e) || l.isArray(e);
|
|
661
661
|
}
|
|
@@ -667,13 +667,13 @@ function rt(e, t, n) {
|
|
|
667
667
|
return a = on(a), !n && o ? "[" + a + "]" : a;
|
|
668
668
|
}).join(n ? "." : "") : t;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Ca(e) {
|
|
671
671
|
return l.isArray(e) && !e.some(ut);
|
|
672
672
|
}
|
|
673
673
|
const Da = l.toFlatObject(l, {}, null, function(e) {
|
|
674
674
|
return /^is[A-Z]/.test(e);
|
|
675
675
|
});
|
|
676
|
-
function
|
|
676
|
+
function Ze(e, t, n) {
|
|
677
677
|
if (!l.isObject(e))
|
|
678
678
|
throw new TypeError("target must be an object");
|
|
679
679
|
t = t || new FormData(), n = l.toFlatObject(
|
|
@@ -699,28 +699,28 @@ function Ye(e, t, n) {
|
|
|
699
699
|
if (l.isBoolean(c))
|
|
700
700
|
return c.toString();
|
|
701
701
|
if (!p && l.isBlob(c))
|
|
702
|
-
throw new
|
|
702
|
+
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
703
703
|
if (l.isArrayBuffer(c) || l.isTypedArray(c)) {
|
|
704
704
|
if (p && typeof i == "function")
|
|
705
705
|
return new i([c]);
|
|
706
706
|
if (typeof Buffer < "u")
|
|
707
707
|
return Buffer.from(c);
|
|
708
|
-
throw new
|
|
708
|
+
throw new S("Blob is not supported. Use a Buffer instead.", S.ERR_NOT_SUPPORT);
|
|
709
709
|
}
|
|
710
710
|
return c;
|
|
711
711
|
}
|
|
712
712
|
function b(c) {
|
|
713
713
|
if (c > u)
|
|
714
|
-
throw new
|
|
714
|
+
throw new S(
|
|
715
715
|
"Object is too deeply nested (" + c + " levels). Max depth: " + u,
|
|
716
|
-
|
|
716
|
+
S.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
717
717
|
);
|
|
718
718
|
}
|
|
719
719
|
function w(c, m) {
|
|
720
720
|
if (u === 1 / 0)
|
|
721
721
|
return JSON.stringify(c);
|
|
722
722
|
const v = [];
|
|
723
|
-
return JSON.stringify(c, function(
|
|
723
|
+
return JSON.stringify(c, function(E, x) {
|
|
724
724
|
if (!l.isObject(x))
|
|
725
725
|
return x;
|
|
726
726
|
for (; v.length && v[v.length - 1] !== this; )
|
|
@@ -729,17 +729,17 @@ function Ye(e, t, n) {
|
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
731
|
function g(c, m, v) {
|
|
732
|
-
let
|
|
732
|
+
let E = c;
|
|
733
733
|
if (l.isReactNative(t) && l.isReactNativeBlob(c))
|
|
734
734
|
return t.append(rt(v, m, r), f(c)), !1;
|
|
735
735
|
if (c && !v && typeof c == "object") {
|
|
736
736
|
if (l.endsWith(m, "{}"))
|
|
737
737
|
m = a ? m : m.slice(0, -2), c = w(c, 1);
|
|
738
|
-
else if (l.isArray(c) &&
|
|
739
|
-
return m = on(m),
|
|
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
740
|
!(l.isUndefined(x) || x === null) && t.append(
|
|
741
741
|
// eslint-disable-next-line no-nested-ternary
|
|
742
|
-
s === !0 ? rt([m],
|
|
742
|
+
s === !0 ? rt([m], B, r) : s === null ? m : m + "[]",
|
|
743
743
|
f(x)
|
|
744
744
|
);
|
|
745
745
|
}), !1;
|
|
@@ -755,8 +755,8 @@ function Ye(e, t, n) {
|
|
|
755
755
|
if (!l.isUndefined(c)) {
|
|
756
756
|
if (b(v), d.indexOf(c) !== -1)
|
|
757
757
|
throw new Error("Circular reference detected in " + m.join("."));
|
|
758
|
-
d.push(c), l.forEach(c, function(
|
|
759
|
-
(!(l.isUndefined(
|
|
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
760
|
}), d.pop();
|
|
761
761
|
}
|
|
762
762
|
}
|
|
@@ -764,7 +764,7 @@ function Ye(e, t, n) {
|
|
|
764
764
|
throw new TypeError("data must be an object");
|
|
765
765
|
return U(e), t;
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function At(e) {
|
|
768
768
|
const t = {
|
|
769
769
|
"!": "%21",
|
|
770
770
|
"'": "%27",
|
|
@@ -778,14 +778,14 @@ function Ct(e) {
|
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
780
|
function gt(e, t) {
|
|
781
|
-
this._pairs = [], e &&
|
|
781
|
+
this._pairs = [], e && Ze(e, this, t);
|
|
782
782
|
}
|
|
783
783
|
const rn = gt.prototype;
|
|
784
784
|
rn.append = function(e, t) {
|
|
785
785
|
this._pairs.push([e, t]);
|
|
786
786
|
};
|
|
787
787
|
rn.toString = function(e) {
|
|
788
|
-
const t = e ? (n) => e.call(this, n,
|
|
788
|
+
const t = e ? (n) => e.call(this, n, At) : At;
|
|
789
789
|
return this._pairs.map(function(n) {
|
|
790
790
|
return t(n[0]) + "=" + t(n[1]);
|
|
791
791
|
}, "").join("&");
|
|
@@ -862,7 +862,7 @@ class Fa {
|
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
|
-
const
|
|
865
|
+
const Bt = Fa, ht = {
|
|
866
866
|
silentJSONParsing: !0,
|
|
867
867
|
forcedJSONParsing: !0,
|
|
868
868
|
clarifyTimeoutError: !1,
|
|
@@ -890,19 +890,19 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
|
890
890
|
...Ma
|
|
891
891
|
};
|
|
892
892
|
function $a(e, t) {
|
|
893
|
-
return
|
|
893
|
+
return Ze(e, new V.classes.URLSearchParams(), {
|
|
894
894
|
visitor: function(n, a, o, r) {
|
|
895
895
|
return V.isNode && l.isBuffer(n) ? (this.append(a, n.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
896
896
|
},
|
|
897
897
|
...t
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
|
-
const
|
|
900
|
+
const Ct = an;
|
|
901
901
|
function ln(e) {
|
|
902
|
-
if (e >
|
|
903
|
-
throw new
|
|
904
|
-
"FormData field is too deeply nested (" + e + " levels). Max depth: " +
|
|
905
|
-
|
|
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
906
|
);
|
|
907
907
|
}
|
|
908
908
|
function Ga(e) {
|
|
@@ -970,7 +970,7 @@ const yt = {
|
|
|
970
970
|
return $a(e, s).toString();
|
|
971
971
|
if ((r = l.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
972
972
|
const i = Pe(this, "env"), u = i && i.FormData;
|
|
973
|
-
return
|
|
973
|
+
return Ze(
|
|
974
974
|
r ? { "files[]": e } : e,
|
|
975
975
|
u && new u(),
|
|
976
976
|
s
|
|
@@ -991,7 +991,7 @@ const yt = {
|
|
|
991
991
|
return JSON.parse(e, Pe(this, "parseReviver"));
|
|
992
992
|
} catch (s) {
|
|
993
993
|
if (r)
|
|
994
|
-
throw s.name === "SyntaxError" ?
|
|
994
|
+
throw s.name === "SyntaxError" ? S.from(s, S.ERR_BAD_RESPONSE, this, null, Pe(this, "response")) : s;
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
return e;
|
|
@@ -1025,7 +1025,7 @@ l.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (e) => {
|
|
|
1025
1025
|
});
|
|
1026
1026
|
const wt = yt;
|
|
1027
1027
|
function st(e, t) {
|
|
1028
|
-
const n = this || wt, a = t || n, o =
|
|
1028
|
+
const n = this || wt, a = t || n, o = Z.from(a.headers);
|
|
1029
1029
|
let r = a.data;
|
|
1030
1030
|
return l.forEach(e, function(s) {
|
|
1031
1031
|
r = s.call(n, r, o.normalize(), t ? t.status : void 0);
|
|
@@ -1034,7 +1034,7 @@ function st(e, t) {
|
|
|
1034
1034
|
function cn(e) {
|
|
1035
1035
|
return !!(e && e.__CANCEL__);
|
|
1036
1036
|
}
|
|
1037
|
-
class Wa extends
|
|
1037
|
+
class Wa extends S {
|
|
1038
1038
|
/**
|
|
1039
1039
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1040
1040
|
*
|
|
@@ -1045,15 +1045,15 @@ class Wa extends E {
|
|
|
1045
1045
|
* @returns {CanceledError} The created error.
|
|
1046
1046
|
*/
|
|
1047
1047
|
constructor(t, n, a) {
|
|
1048
|
-
super(t ?? "canceled",
|
|
1048
|
+
super(t ?? "canceled", S.ERR_CANCELED, n, a), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
const Ie = Wa;
|
|
1052
1052
|
function dn(e, t, n) {
|
|
1053
1053
|
const a = n.config.validateStatus;
|
|
1054
|
-
!n.status || !a || a(n.status) ? e(n) : t(new
|
|
1054
|
+
!n.status || !a || a(n.status) ? e(n) : t(new S(
|
|
1055
1055
|
"Request failed with status code " + n.status,
|
|
1056
|
-
n.status >= 400 && n.status < 500 ?
|
|
1056
|
+
n.status >= 400 && n.status < 500 ? S.ERR_BAD_REQUEST : S.ERR_BAD_RESPONSE,
|
|
1057
1057
|
n.config,
|
|
1058
1058
|
n.request,
|
|
1059
1059
|
n
|
|
@@ -1122,10 +1122,10 @@ const Je = (e, t, n = 3) => {
|
|
|
1122
1122
|
}),
|
|
1123
1123
|
t[1]
|
|
1124
1124
|
];
|
|
1125
|
-
}, Nt = (e) => (...t) => l.asap(() => e(...t)),
|
|
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
1126
|
new URL(V.origin),
|
|
1127
1127
|
V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)
|
|
1128
|
-
) : () => !0,
|
|
1128
|
+
) : () => !0, Ya = V.hasStandardBrowserEnv ? (
|
|
1129
1129
|
// Standard browser envs support document.cookie
|
|
1130
1130
|
{
|
|
1131
1131
|
write(e, t, n, a, o, r, s) {
|
|
@@ -1183,9 +1183,9 @@ function ro(e) {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
function Ft(e, t) {
|
|
1185
1185
|
if (typeof e == "string" && no.test(ro(e)))
|
|
1186
|
-
throw new
|
|
1186
|
+
throw new S(
|
|
1187
1187
|
'Invalid URL: missing "//" after protocol',
|
|
1188
|
-
|
|
1188
|
+
S.ERR_INVALID_URL,
|
|
1189
1189
|
t
|
|
1190
1190
|
);
|
|
1191
1191
|
}
|
|
@@ -1194,7 +1194,7 @@ function pn(e, t, n, a) {
|
|
|
1194
1194
|
let o = !eo(t);
|
|
1195
1195
|
return e && (o || n === !1) ? (Ft(e, a), to(e, t)) : t;
|
|
1196
1196
|
}
|
|
1197
|
-
const Lt = (e) => e instanceof
|
|
1197
|
+
const Lt = (e) => e instanceof Z ? { ...e } : e;
|
|
1198
1198
|
function xe(e, t) {
|
|
1199
1199
|
e = e || {}, t = t || {};
|
|
1200
1200
|
const n = /* @__PURE__ */ Object.create(null);
|
|
@@ -1305,7 +1305,7 @@ function fn(e) {
|
|
|
1305
1305
|
const r = n("xsrfHeaderName"), s = n("xsrfCookieName");
|
|
1306
1306
|
let i = n("headers");
|
|
1307
1307
|
const u = n("auth"), p = n("baseURL"), d = n("allowAbsoluteUrls"), f = n("url");
|
|
1308
|
-
if (t.headers = i =
|
|
1308
|
+
if (t.headers = i = Z.from(i), t.url = sn(
|
|
1309
1309
|
pn(p, f, d, t),
|
|
1310
1310
|
n("params"),
|
|
1311
1311
|
n("paramsSerializer")
|
|
@@ -1317,11 +1317,11 @@ function fn(e) {
|
|
|
1317
1317
|
"Basic " + btoa(b + ":" + (w ? lo(w) : ""))
|
|
1318
1318
|
);
|
|
1319
1319
|
} catch (g) {
|
|
1320
|
-
throw
|
|
1320
|
+
throw S.from(g, S.ERR_BAD_OPTION_VALUE, e);
|
|
1321
1321
|
}
|
|
1322
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 &&
|
|
1324
|
-
const b = r && s &&
|
|
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
1325
|
b && i.set(r, b);
|
|
1326
1326
|
}
|
|
1327
1327
|
return t;
|
|
@@ -1330,7 +1330,7 @@ const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
|
1330
1330
|
return new Promise(function(t, n) {
|
|
1331
1331
|
const a = fn(e);
|
|
1332
1332
|
let o = a.data;
|
|
1333
|
-
const r =
|
|
1333
|
+
const r = Z.from(a.headers).normalize();
|
|
1334
1334
|
let { responseType: s, onUploadProgress: i, onDownloadProgress: u } = a, p, d, f, b, w;
|
|
1335
1335
|
function g() {
|
|
1336
1336
|
b && b(), w && w(), a.cancelToken && a.cancelToken.unsubscribe(p), a.signal && a.signal.removeEventListener("abort", p);
|
|
@@ -1340,7 +1340,7 @@ const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
|
1340
1340
|
function U() {
|
|
1341
1341
|
if (!y)
|
|
1342
1342
|
return;
|
|
1343
|
-
const m =
|
|
1343
|
+
const m = Z.from(
|
|
1344
1344
|
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
1345
1345
|
), v = {
|
|
1346
1346
|
data: !s || s === "text" || s === "json" ? y.responseText : y.response,
|
|
@@ -1351,11 +1351,11 @@ const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
|
1351
1351
|
request: y
|
|
1352
1352
|
};
|
|
1353
1353
|
dn(
|
|
1354
|
-
function(
|
|
1355
|
-
t(
|
|
1354
|
+
function(E) {
|
|
1355
|
+
t(E), g();
|
|
1356
1356
|
},
|
|
1357
|
-
function(
|
|
1358
|
-
n(
|
|
1357
|
+
function(E) {
|
|
1358
|
+
n(E), g();
|
|
1359
1359
|
},
|
|
1360
1360
|
v
|
|
1361
1361
|
), y = null;
|
|
@@ -1363,17 +1363,17 @@ const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
|
1363
1363
|
"onloadend" in y ? y.onloadend = U : y.onreadystatechange = function() {
|
|
1364
1364
|
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.startsWith("file:")) || setTimeout(U);
|
|
1365
1365
|
}, y.onabort = function() {
|
|
1366
|
-
y && (n(new
|
|
1366
|
+
y && (n(new S("Request aborted", S.ECONNABORTED, e, y)), g(), y = null);
|
|
1367
1367
|
}, y.onerror = function(m) {
|
|
1368
|
-
const v = m && m.message ? m.message : "Network Error",
|
|
1369
|
-
|
|
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
1370
|
}, y.ontimeout = function() {
|
|
1371
1371
|
let m = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1372
1372
|
const v = a.transitional || ht;
|
|
1373
1373
|
a.timeoutErrorMessage && (m = a.timeoutErrorMessage), n(
|
|
1374
|
-
new
|
|
1374
|
+
new S(
|
|
1375
1375
|
m,
|
|
1376
|
-
v.clarifyTimeoutError ?
|
|
1376
|
+
v.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1377
1377
|
e,
|
|
1378
1378
|
y
|
|
1379
1379
|
)
|
|
@@ -1386,9 +1386,9 @@ const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
|
1386
1386
|
const c = Ka(a.url);
|
|
1387
1387
|
if (c && !V.protocols.includes(c)) {
|
|
1388
1388
|
n(
|
|
1389
|
-
new
|
|
1389
|
+
new S(
|
|
1390
1390
|
"Unsupported protocol " + c + ":",
|
|
1391
|
-
|
|
1391
|
+
S.ERR_BAD_REQUEST,
|
|
1392
1392
|
e
|
|
1393
1393
|
)
|
|
1394
1394
|
), g();
|
|
@@ -1406,12 +1406,12 @@ const uo = typeof XMLHttpRequest < "u", co = uo && function(e) {
|
|
|
1406
1406
|
a = !0, s();
|
|
1407
1407
|
const p = u instanceof Error ? u : this.reason;
|
|
1408
1408
|
n.abort(
|
|
1409
|
-
p instanceof
|
|
1409
|
+
p instanceof S ? p : new Ie(p instanceof Error ? p.message : p)
|
|
1410
1410
|
);
|
|
1411
1411
|
}
|
|
1412
1412
|
};
|
|
1413
1413
|
let r = t && setTimeout(() => {
|
|
1414
|
-
r = null, o(new
|
|
1414
|
+
r = null, o(new S(`timeout of ${t}ms exceeded`, S.ETIMEDOUT));
|
|
1415
1415
|
}, t);
|
|
1416
1416
|
const s = () => {
|
|
1417
1417
|
e && (r && clearTimeout(r), r = null, e.forEach((u) => {
|
|
@@ -1573,12 +1573,12 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1573
1573
|
};
|
|
1574
1574
|
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
|
|
1575
1575
|
!g[c] && (g[c] = (m, v) => {
|
|
1576
|
-
let
|
|
1577
|
-
if (
|
|
1578
|
-
return
|
|
1579
|
-
throw new
|
|
1576
|
+
let E = m && m[c];
|
|
1577
|
+
if (E)
|
|
1578
|
+
return E.call(m);
|
|
1579
|
+
throw new S(
|
|
1580
1580
|
`Response type '${c}' is not supported`,
|
|
1581
|
-
|
|
1581
|
+
S.ERR_NOT_SUPPORT,
|
|
1582
1582
|
v
|
|
1583
1583
|
);
|
|
1584
1584
|
});
|
|
@@ -1602,13 +1602,13 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1602
1602
|
let {
|
|
1603
1603
|
url: m,
|
|
1604
1604
|
method: v,
|
|
1605
|
-
data:
|
|
1605
|
+
data: E,
|
|
1606
1606
|
signal: x,
|
|
1607
|
-
cancelToken:
|
|
1608
|
-
timeout:
|
|
1607
|
+
cancelToken: B,
|
|
1608
|
+
timeout: C,
|
|
1609
1609
|
onDownloadProgress: de,
|
|
1610
1610
|
onUploadProgress: oe,
|
|
1611
|
-
responseType:
|
|
1611
|
+
responseType: Y,
|
|
1612
1612
|
headers: F,
|
|
1613
1613
|
withCredentials: re = "same-origin",
|
|
1614
1614
|
fetchOptions: ke,
|
|
@@ -1616,19 +1616,19 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1616
1616
|
maxBodyLength: ne
|
|
1617
1617
|
} = fn(c);
|
|
1618
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
|
|
1620
|
-
|
|
1621
|
-
let
|
|
1622
|
-
[x,
|
|
1623
|
-
|
|
1619
|
+
let A = o || fetch;
|
|
1620
|
+
Y = Y ? (Y + "").toLowerCase() : "text";
|
|
1621
|
+
let R = fo(
|
|
1622
|
+
[x, B && B.toAbortSignal()],
|
|
1623
|
+
C
|
|
1624
1624
|
), j = null;
|
|
1625
|
-
const se =
|
|
1626
|
-
|
|
1625
|
+
const se = R && R.unsubscribe && (() => {
|
|
1626
|
+
R.unsubscribe();
|
|
1627
1627
|
});
|
|
1628
1628
|
let pe, fe = null;
|
|
1629
|
-
const z = () => new
|
|
1629
|
+
const z = () => new S(
|
|
1630
1630
|
"Request body larger than maxBodyLength limit",
|
|
1631
|
-
|
|
1631
|
+
S.ERR_BAD_REQUEST,
|
|
1632
1632
|
c,
|
|
1633
1633
|
j
|
|
1634
1634
|
);
|
|
@@ -1657,18 +1657,18 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1657
1657
|
"Authorization",
|
|
1658
1658
|
"Basic " + btoa(wo((D.username || "") + ":" + (D.password || "")))
|
|
1659
1659
|
)), K && typeof m == "string" && m.startsWith("data:") && yo(m) > G)
|
|
1660
|
-
throw new
|
|
1660
|
+
throw new S(
|
|
1661
1661
|
"maxContentLength size of " + G + " exceeded",
|
|
1662
|
-
|
|
1662
|
+
S.ERR_BAD_RESPONSE,
|
|
1663
1663
|
c,
|
|
1664
1664
|
j
|
|
1665
1665
|
);
|
|
1666
1666
|
if (Ne && v !== "get" && v !== "head") {
|
|
1667
|
-
const _ = await y(
|
|
1667
|
+
const _ = await y(E);
|
|
1668
1668
|
if (typeof _ == "number" && isFinite(_) && (pe = _, _ > ne))
|
|
1669
1669
|
throw z();
|
|
1670
1670
|
}
|
|
1671
|
-
const me = Ne && (l.isReadableStream(
|
|
1671
|
+
const me = Ne && (l.isReadableStream(E) || l.isStream(E)), Et = (_, X, ce) => Ut(
|
|
1672
1672
|
_,
|
|
1673
1673
|
jt,
|
|
1674
1674
|
(ge) => {
|
|
@@ -1679,59 +1679,59 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1679
1679
|
ce
|
|
1680
1680
|
);
|
|
1681
1681
|
if (b && v !== "get" && v !== "head" && (oe || me)) {
|
|
1682
|
-
if (pe = pe ?? await U(F,
|
|
1682
|
+
if (pe = pe ?? await U(F, E), pe !== 0 || me) {
|
|
1683
1683
|
let _ = new r(m, {
|
|
1684
1684
|
method: "POST",
|
|
1685
|
-
body:
|
|
1685
|
+
body: E,
|
|
1686
1686
|
duplex: "half"
|
|
1687
1687
|
}), X;
|
|
1688
|
-
if (l.isFormData(
|
|
1688
|
+
if (l.isFormData(E) && (X = _.headers.get("content-type")) && F.setContentType(X), _.body) {
|
|
1689
1689
|
const [ce, ge] = oe && Dt(
|
|
1690
1690
|
pe,
|
|
1691
1691
|
Je(Nt(oe))
|
|
1692
1692
|
) || [];
|
|
1693
|
-
|
|
1693
|
+
E = Et(_.body, ce, ge);
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
1696
|
} else if (me && !u && d && v !== "get" && v !== "head")
|
|
1697
|
-
|
|
1697
|
+
E = Et(E);
|
|
1698
1698
|
else if (me && u && !b && v !== "get" && v !== "head")
|
|
1699
|
-
throw new
|
|
1699
|
+
throw new S(
|
|
1700
1700
|
"Stream request bodies are not supported by the current fetch implementation",
|
|
1701
|
-
|
|
1701
|
+
S.ERR_NOT_SUPPORT,
|
|
1702
1702
|
c,
|
|
1703
1703
|
j
|
|
1704
1704
|
);
|
|
1705
1705
|
l.isString(re) || (re = re ? "include" : "omit");
|
|
1706
1706
|
const xn = u && "credentials" in r.prototype;
|
|
1707
|
-
if (l.isFormData(
|
|
1707
|
+
if (l.isFormData(E)) {
|
|
1708
1708
|
const _ = F.getContentType();
|
|
1709
1709
|
_ && /^multipart\/form-data/i.test(_) && !/boundary=/i.test(_) && F.delete("content-type");
|
|
1710
1710
|
}
|
|
1711
1711
|
F.set("User-Agent", "axios/" + vt, !1);
|
|
1712
1712
|
const kt = {
|
|
1713
1713
|
...ke,
|
|
1714
|
-
signal:
|
|
1714
|
+
signal: R,
|
|
1715
1715
|
method: v.toUpperCase(),
|
|
1716
1716
|
headers: nn(F.normalize()),
|
|
1717
|
-
body:
|
|
1717
|
+
body: E,
|
|
1718
1718
|
duplex: "half",
|
|
1719
1719
|
credentials: xn ? re : void 0
|
|
1720
1720
|
};
|
|
1721
1721
|
j = u && new r(m, kt);
|
|
1722
|
-
let ie = await (u ?
|
|
1723
|
-
const Pt =
|
|
1722
|
+
let ie = await (u ? A(j, ke) : A(m, kt));
|
|
1723
|
+
const Pt = Z.from(ie.headers);
|
|
1724
1724
|
if (K) {
|
|
1725
1725
|
const _ = l.toFiniteNumber(Pt.getContentLength());
|
|
1726
1726
|
if (_ != null && _ > G)
|
|
1727
|
-
throw new
|
|
1727
|
+
throw new S(
|
|
1728
1728
|
"maxContentLength size of " + G + " exceeded",
|
|
1729
|
-
|
|
1729
|
+
S.ERR_BAD_RESPONSE,
|
|
1730
1730
|
c,
|
|
1731
1731
|
j
|
|
1732
1732
|
);
|
|
1733
1733
|
}
|
|
1734
|
-
const nt = w && (
|
|
1734
|
+
const nt = w && (Y === "stream" || Y === "response");
|
|
1735
1735
|
if (w && ie.body && (de || K || nt && se)) {
|
|
1736
1736
|
const _ = {};
|
|
1737
1737
|
["status", "statusText", "headers"].forEach((Fe) => {
|
|
@@ -1741,35 +1741,35 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1741
1741
|
X,
|
|
1742
1742
|
Je(Nt(de), !0)
|
|
1743
1743
|
) || [];
|
|
1744
|
-
let
|
|
1745
|
-
const
|
|
1746
|
-
if (K && (
|
|
1747
|
-
throw new
|
|
1744
|
+
let Ot = 0;
|
|
1745
|
+
const Sn = (Fe) => {
|
|
1746
|
+
if (K && (Ot = Fe, Ot > G))
|
|
1747
|
+
throw new S(
|
|
1748
1748
|
"maxContentLength size of " + G + " exceeded",
|
|
1749
|
-
|
|
1749
|
+
S.ERR_BAD_RESPONSE,
|
|
1750
1750
|
c,
|
|
1751
1751
|
j
|
|
1752
1752
|
);
|
|
1753
1753
|
ce && ce(Fe);
|
|
1754
1754
|
};
|
|
1755
1755
|
ie = new s(
|
|
1756
|
-
Ut(ie.body, jt,
|
|
1756
|
+
Ut(ie.body, jt, Sn, () => {
|
|
1757
1757
|
ge && ge(), se && se();
|
|
1758
1758
|
}),
|
|
1759
1759
|
_
|
|
1760
1760
|
);
|
|
1761
1761
|
}
|
|
1762
|
-
|
|
1763
|
-
let le = await g[l.findKey(g,
|
|
1762
|
+
Y = Y || "text";
|
|
1763
|
+
let le = await g[l.findKey(g, Y) || "text"](
|
|
1764
1764
|
ie,
|
|
1765
1765
|
c
|
|
1766
1766
|
);
|
|
1767
1767
|
if (K && !w && !nt) {
|
|
1768
1768
|
let _;
|
|
1769
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
|
|
1770
|
+
throw new S(
|
|
1771
1771
|
"maxContentLength size of " + G + " exceeded",
|
|
1772
|
-
|
|
1772
|
+
S.ERR_BAD_RESPONSE,
|
|
1773
1773
|
c,
|
|
1774
1774
|
j
|
|
1775
1775
|
);
|
|
@@ -1777,7 +1777,7 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1777
1777
|
return !nt && se && se(), await new Promise((_, X) => {
|
|
1778
1778
|
dn(_, X, {
|
|
1779
1779
|
data: le,
|
|
1780
|
-
headers:
|
|
1780
|
+
headers: Z.from(ie.headers),
|
|
1781
1781
|
status: ie.status,
|
|
1782
1782
|
statusText: ie.statusText,
|
|
1783
1783
|
config: c,
|
|
@@ -1785,8 +1785,8 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1785
1785
|
});
|
|
1786
1786
|
});
|
|
1787
1787
|
} catch (D) {
|
|
1788
|
-
if (se && se(),
|
|
1789
|
-
const J =
|
|
1788
|
+
if (se && se(), R && R.aborted && R.reason instanceof S) {
|
|
1789
|
+
const J = R.reason;
|
|
1790
1790
|
throw J.config = c, j && (J.request = j), D !== J && Object.defineProperty(J, "cause", {
|
|
1791
1791
|
__proto__: null,
|
|
1792
1792
|
value: D,
|
|
@@ -1797,12 +1797,12 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1797
1797
|
}
|
|
1798
1798
|
if (fe)
|
|
1799
1799
|
throw j && !fe.request && (fe.request = j), fe;
|
|
1800
|
-
if (D instanceof
|
|
1800
|
+
if (D instanceof S)
|
|
1801
1801
|
throw j && !D.request && (D.request = j), D;
|
|
1802
1802
|
if (D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message)) {
|
|
1803
|
-
const J = new
|
|
1803
|
+
const J = new S(
|
|
1804
1804
|
"Network Error",
|
|
1805
|
-
|
|
1805
|
+
S.ERR_NETWORK,
|
|
1806
1806
|
c,
|
|
1807
1807
|
j,
|
|
1808
1808
|
D && D.response
|
|
@@ -1815,20 +1815,20 @@ const vt = "1.18.1", jt = 64 * 1024, { isFunction: ze } = l, wo = (e) => encodeU
|
|
|
1815
1815
|
configurable: !0
|
|
1816
1816
|
}), J;
|
|
1817
1817
|
}
|
|
1818
|
-
throw
|
|
1818
|
+
throw S.from(D, D && D.code, c, j, D && D.response);
|
|
1819
1819
|
}
|
|
1820
1820
|
};
|
|
1821
|
-
},
|
|
1821
|
+
}, So = /* @__PURE__ */ new Map(), mn = (e) => {
|
|
1822
1822
|
let t = e && e.env || {};
|
|
1823
1823
|
const { fetch: n, Request: a, Response: o } = t, r = [a, o, n];
|
|
1824
|
-
let s = r.length, i = s, u, p, d =
|
|
1824
|
+
let s = r.length, i = s, u, p, d = So;
|
|
1825
1825
|
for (; i--; )
|
|
1826
1826
|
u = r[i], p = d.get(u), p === void 0 && d.set(u, p = i ? /* @__PURE__ */ new Map() : xo(t)), d = p;
|
|
1827
1827
|
return p;
|
|
1828
1828
|
};
|
|
1829
1829
|
mn();
|
|
1830
1830
|
const xt = {
|
|
1831
|
-
http:
|
|
1831
|
+
http: Ba,
|
|
1832
1832
|
xhr: co,
|
|
1833
1833
|
fetch: {
|
|
1834
1834
|
get: mn
|
|
@@ -1843,7 +1843,7 @@ l.forEach(xt, (e, t) => {
|
|
|
1843
1843
|
Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
|
|
1844
1844
|
}
|
|
1845
1845
|
});
|
|
1846
|
-
const zt = (e) => `- ${e}`,
|
|
1846
|
+
const zt = (e) => `- ${e}`, Eo = (e) => l.isFunction(e) || e === null || e === !1;
|
|
1847
1847
|
function ko(e, t) {
|
|
1848
1848
|
e = l.isArray(e) ? e : [e];
|
|
1849
1849
|
const { length: n } = e;
|
|
@@ -1852,8 +1852,8 @@ function ko(e, t) {
|
|
|
1852
1852
|
for (let s = 0; s < n; s++) {
|
|
1853
1853
|
a = e[s];
|
|
1854
1854
|
let i;
|
|
1855
|
-
if (o = a, !
|
|
1856
|
-
throw new
|
|
1855
|
+
if (o = a, !Eo(a) && (o = xt[(i = String(a)).toLowerCase()], o === void 0))
|
|
1856
|
+
throw new S(`Unknown adapter '${i}'`);
|
|
1857
1857
|
if (o && (l.isFunction(o) || (o = o.get(t))))
|
|
1858
1858
|
break;
|
|
1859
1859
|
r[i || "#" + s] = o;
|
|
@@ -1865,9 +1865,9 @@ function ko(e, t) {
|
|
|
1865
1865
|
let i = n ? s.length > 1 ? `since :
|
|
1866
1866
|
` + s.map(zt).join(`
|
|
1867
1867
|
`) : " " + zt(s[0]) : "as no adapter specified";
|
|
1868
|
-
throw new
|
|
1868
|
+
throw new S(
|
|
1869
1869
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1870
|
-
|
|
1870
|
+
S.ERR_NOT_SUPPORT
|
|
1871
1871
|
);
|
|
1872
1872
|
}
|
|
1873
1873
|
return o;
|
|
@@ -1889,7 +1889,7 @@ function it(e) {
|
|
|
1889
1889
|
throw new Ie(null, e);
|
|
1890
1890
|
}
|
|
1891
1891
|
function Vt(e) {
|
|
1892
|
-
return it(e), e.headers =
|
|
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
1893
|
function(t) {
|
|
1894
1894
|
it(e), e.response = t;
|
|
1895
1895
|
try {
|
|
@@ -1897,7 +1897,7 @@ function Vt(e) {
|
|
|
1897
1897
|
} finally {
|
|
1898
1898
|
delete e.response;
|
|
1899
1899
|
}
|
|
1900
|
-
return t.headers =
|
|
1900
|
+
return t.headers = Z.from(t.headers), t;
|
|
1901
1901
|
},
|
|
1902
1902
|
function(t) {
|
|
1903
1903
|
if (!cn(t) && (it(e), t && t.response)) {
|
|
@@ -1911,28 +1911,28 @@ function Vt(e) {
|
|
|
1911
1911
|
} finally {
|
|
1912
1912
|
delete e.response;
|
|
1913
1913
|
}
|
|
1914
|
-
t.response.headers =
|
|
1914
|
+
t.response.headers = Z.from(t.response.headers);
|
|
1915
1915
|
}
|
|
1916
1916
|
return Promise.reject(t);
|
|
1917
1917
|
}
|
|
1918
1918
|
);
|
|
1919
1919
|
}
|
|
1920
|
-
const
|
|
1920
|
+
const Ye = {};
|
|
1921
1921
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1922
|
-
|
|
1922
|
+
Ye[e] = function(n) {
|
|
1923
1923
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1924
1924
|
};
|
|
1925
1925
|
});
|
|
1926
1926
|
const qt = {};
|
|
1927
|
-
|
|
1927
|
+
Ye.transitional = function(e, t, n) {
|
|
1928
1928
|
function a(o, r) {
|
|
1929
1929
|
return "[Axios v" + vt + "] Transitional option '" + o + "'" + r + (n ? ". " + n : "");
|
|
1930
1930
|
}
|
|
1931
1931
|
return (o, r, s) => {
|
|
1932
1932
|
if (e === !1)
|
|
1933
|
-
throw new
|
|
1933
|
+
throw new S(
|
|
1934
1934
|
a(r, " has been removed" + (t ? " in " + t : "")),
|
|
1935
|
-
|
|
1935
|
+
S.ERR_DEPRECATED
|
|
1936
1936
|
);
|
|
1937
1937
|
return t && !qt[r] && (qt[r] = !0, console.warn(
|
|
1938
1938
|
a(
|
|
@@ -1942,12 +1942,12 @@ Ze.transitional = function(e, t, n) {
|
|
|
1942
1942
|
)), e ? e(o, r, s) : !0;
|
|
1943
1943
|
};
|
|
1944
1944
|
};
|
|
1945
|
-
|
|
1945
|
+
Ye.spelling = function(e) {
|
|
1946
1946
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1947
1947
|
};
|
|
1948
1948
|
function Po(e, t, n) {
|
|
1949
1949
|
if (typeof e != "object" || e === null)
|
|
1950
|
-
throw new
|
|
1950
|
+
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
1951
1951
|
const a = Object.keys(e);
|
|
1952
1952
|
let o = a.length;
|
|
1953
1953
|
for (; o-- > 0; ) {
|
|
@@ -1955,25 +1955,25 @@ function Po(e, t, n) {
|
|
|
1955
1955
|
if (s) {
|
|
1956
1956
|
const i = e[r], u = i === void 0 || s(i, r, e);
|
|
1957
1957
|
if (u !== !0)
|
|
1958
|
-
throw new
|
|
1958
|
+
throw new S(
|
|
1959
1959
|
"option " + r + " must be " + u,
|
|
1960
|
-
|
|
1960
|
+
S.ERR_BAD_OPTION_VALUE
|
|
1961
1961
|
);
|
|
1962
1962
|
continue;
|
|
1963
1963
|
}
|
|
1964
1964
|
if (n !== !0)
|
|
1965
|
-
throw new
|
|
1965
|
+
throw new S("Unknown option " + r, S.ERR_BAD_OPTION);
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
const $e = {
|
|
1969
1969
|
assertOptions: Po,
|
|
1970
|
-
validators:
|
|
1970
|
+
validators: Ye
|
|
1971
1971
|
}, $ = $e.validators;
|
|
1972
1972
|
class Ke {
|
|
1973
1973
|
constructor(t) {
|
|
1974
1974
|
this.defaults = t || {}, this.interceptors = {
|
|
1975
|
-
request: new
|
|
1976
|
-
response: new
|
|
1975
|
+
request: new Bt(),
|
|
1976
|
+
response: new Bt()
|
|
1977
1977
|
};
|
|
1978
1978
|
}
|
|
1979
1979
|
/**
|
|
@@ -2048,7 +2048,7 @@ class Ke {
|
|
|
2048
2048
|
let s = r && l.merge(r.common, r[n.method]);
|
|
2049
2049
|
r && l.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (g) => {
|
|
2050
2050
|
delete r[g];
|
|
2051
|
-
}), n.headers =
|
|
2051
|
+
}), n.headers = Z.concat(s, r);
|
|
2052
2052
|
const i = [];
|
|
2053
2053
|
let u = !0;
|
|
2054
2054
|
this.interceptors.request.forEach(function(g) {
|
|
@@ -2124,7 +2124,7 @@ l.forEach(["post", "put", "patch", "query"], function(e) {
|
|
|
2124
2124
|
Ke.prototype[e] = t(), e !== "query" && (Ke.prototype[e + "Form"] = t(!0));
|
|
2125
2125
|
});
|
|
2126
2126
|
const Ge = Ke;
|
|
2127
|
-
class
|
|
2127
|
+
class St {
|
|
2128
2128
|
constructor(t) {
|
|
2129
2129
|
if (typeof t != "function")
|
|
2130
2130
|
throw new TypeError("executor must be a function.");
|
|
@@ -2191,20 +2191,20 @@ class Et {
|
|
|
2191
2191
|
static source() {
|
|
2192
2192
|
let t;
|
|
2193
2193
|
return {
|
|
2194
|
-
token: new
|
|
2194
|
+
token: new St(function(n) {
|
|
2195
2195
|
t = n;
|
|
2196
2196
|
}),
|
|
2197
2197
|
cancel: t
|
|
2198
2198
|
};
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
2201
|
-
const
|
|
2202
|
-
function
|
|
2201
|
+
const Oo = St;
|
|
2202
|
+
function Ro(e) {
|
|
2203
2203
|
return function(t) {
|
|
2204
2204
|
return e.apply(null, t);
|
|
2205
2205
|
};
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function To(e) {
|
|
2208
2208
|
return l.isObject(e) && e.isAxiosError === !0;
|
|
2209
2209
|
}
|
|
2210
2210
|
const dt = {
|
|
@@ -2291,71 +2291,74 @@ function hn(e) {
|
|
|
2291
2291
|
const I = hn(wt);
|
|
2292
2292
|
I.Axios = Ge;
|
|
2293
2293
|
I.CanceledError = Ie;
|
|
2294
|
-
I.CancelToken =
|
|
2294
|
+
I.CancelToken = Oo;
|
|
2295
2295
|
I.isCancel = cn;
|
|
2296
2296
|
I.VERSION = vt;
|
|
2297
|
-
I.toFormData =
|
|
2298
|
-
I.AxiosError =
|
|
2297
|
+
I.toFormData = Ze;
|
|
2298
|
+
I.AxiosError = S;
|
|
2299
2299
|
I.Cancel = I.CanceledError;
|
|
2300
2300
|
I.all = function(e) {
|
|
2301
2301
|
return Promise.all(e);
|
|
2302
2302
|
};
|
|
2303
|
-
I.spread =
|
|
2304
|
-
I.isAxiosError =
|
|
2303
|
+
I.spread = Ro;
|
|
2304
|
+
I.isAxiosError = To;
|
|
2305
2305
|
I.mergeConfig = xe;
|
|
2306
|
-
I.AxiosHeaders =
|
|
2306
|
+
I.AxiosHeaders = Z;
|
|
2307
2307
|
I.formToJSON = (e) => un(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
2308
2308
|
I.getAdapter = gn.getAdapter;
|
|
2309
2309
|
I.HttpStatusCode = _o;
|
|
2310
2310
|
I.default = I;
|
|
2311
|
-
const
|
|
2312
|
-
function
|
|
2313
|
-
|
|
2314
|
-
return
|
|
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
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function Co(e, t) {
|
|
2317
|
+
return Bo(e, t);
|
|
2318
|
+
}
|
|
2319
|
+
function Be() {
|
|
2317
2320
|
var e;
|
|
2318
|
-
const t = (e =
|
|
2319
|
-
return
|
|
2320
|
-
baseURL:
|
|
2321
|
-
headers:
|
|
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}` } : {}
|
|
2322
2325
|
});
|
|
2323
2326
|
}
|
|
2324
|
-
function
|
|
2327
|
+
function Ce(e) {
|
|
2325
2328
|
return `/media-v1/businesses/${e}/assets`;
|
|
2326
2329
|
}
|
|
2327
2330
|
async function et(e) {
|
|
2328
|
-
const { businessId: t, ...n } = e, { data: a } = await
|
|
2331
|
+
const { businessId: t, ...n } = e, { data: a } = await Be().get(Ce(t), { params: n });
|
|
2329
2332
|
return a;
|
|
2330
2333
|
}
|
|
2331
2334
|
async function bn(e) {
|
|
2332
2335
|
const { resources: t } = await et({ businessId: e, limit: 200 }), n = /* @__PURE__ */ new Set();
|
|
2333
2336
|
return t.forEach((a) => a.tags.forEach((o) => n.add(o))), [...n].sort();
|
|
2334
2337
|
}
|
|
2335
|
-
async function
|
|
2338
|
+
async function Do(e) {
|
|
2336
2339
|
const { resources: t } = await et({ businessId: e, limit: 200 }), n = /* @__PURE__ */ new Map();
|
|
2337
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 };
|
|
2338
2341
|
}
|
|
2339
|
-
async function
|
|
2340
|
-
const { data: n } = await
|
|
2342
|
+
async function No(e, t) {
|
|
2343
|
+
const { data: n } = await Be().post(`${Ce(e)}/upload-intent`, t);
|
|
2341
2344
|
return n;
|
|
2342
2345
|
}
|
|
2343
|
-
async function No(e, t, n) {
|
|
2344
|
-
const { data: a } = await Ae().post(`${Be(e)}/${t}/confirm`, n);
|
|
2345
|
-
return a;
|
|
2346
|
-
}
|
|
2347
2346
|
async function Fo(e, t, n) {
|
|
2348
|
-
const { data: a } = await
|
|
2347
|
+
const { data: a } = await Be().post(`${Ce(e)}/${t}/confirm`, n);
|
|
2349
2348
|
return a;
|
|
2350
2349
|
}
|
|
2351
2350
|
async function Lo(e, t, n) {
|
|
2352
|
-
const { data: a } = await
|
|
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 });
|
|
2353
2356
|
return a;
|
|
2354
2357
|
}
|
|
2355
2358
|
async function pt(e, t) {
|
|
2356
|
-
await
|
|
2359
|
+
await Be().delete(`${Ce(e)}/${t}`);
|
|
2357
2360
|
}
|
|
2358
|
-
const
|
|
2361
|
+
const jo = {
|
|
2359
2362
|
assetGrid: {
|
|
2360
2363
|
loading: "Loading…",
|
|
2361
2364
|
empty: "No assets yet",
|
|
@@ -2415,9 +2418,9 @@ const Uo = {
|
|
|
2415
2418
|
uploadSubmitButton: "Upload {count}",
|
|
2416
2419
|
confirmButton: "Confirm"
|
|
2417
2420
|
}
|
|
2418
|
-
}, jo = {
|
|
2419
|
-
mediaPicker: Uo
|
|
2420
2421
|
}, Mo = {
|
|
2422
|
+
mediaPicker: jo
|
|
2423
|
+
}, Io = {
|
|
2421
2424
|
assetGrid: {
|
|
2422
2425
|
loading: "Chargement…",
|
|
2423
2426
|
empty: "Aucun média",
|
|
@@ -2477,9 +2480,9 @@ const Uo = {
|
|
|
2477
2480
|
uploadSubmitButton: "Importer {count}",
|
|
2478
2481
|
confirmButton: "Confirmer"
|
|
2479
2482
|
}
|
|
2480
|
-
}, Io = {
|
|
2481
|
-
mediaPicker: Mo
|
|
2482
2483
|
}, zo = {
|
|
2484
|
+
mediaPicker: Io
|
|
2485
|
+
}, Vo = {
|
|
2483
2486
|
assetGrid: {
|
|
2484
2487
|
loading: "Memuat…",
|
|
2485
2488
|
empty: "Belum ada media",
|
|
@@ -2539,9 +2542,9 @@ const Uo = {
|
|
|
2539
2542
|
uploadSubmitButton: "Unggah {count}",
|
|
2540
2543
|
confirmButton: "Konfirmasi"
|
|
2541
2544
|
}
|
|
2542
|
-
}, Vo = {
|
|
2543
|
-
mediaPicker: zo
|
|
2544
2545
|
}, qo = {
|
|
2546
|
+
mediaPicker: Vo
|
|
2547
|
+
}, $o = {
|
|
2545
2548
|
assetGrid: {
|
|
2546
2549
|
loading: "読み込み中…",
|
|
2547
2550
|
empty: "素材がありません",
|
|
@@ -2601,9 +2604,9 @@ const Uo = {
|
|
|
2601
2604
|
uploadSubmitButton: "{count} 件をアップロード",
|
|
2602
2605
|
confirmButton: "確定"
|
|
2603
2606
|
}
|
|
2604
|
-
}, $o = {
|
|
2605
|
-
mediaPicker: qo
|
|
2606
2607
|
}, Go = {
|
|
2608
|
+
mediaPicker: $o
|
|
2609
|
+
}, Ho = {
|
|
2607
2610
|
assetGrid: {
|
|
2608
2611
|
loading: "กำลังโหลด…",
|
|
2609
2612
|
empty: "ยังไม่มีสื่อ",
|
|
@@ -2663,9 +2666,9 @@ const Uo = {
|
|
|
2663
2666
|
uploadSubmitButton: "อัปโหลด {count} รายการ",
|
|
2664
2667
|
confirmButton: "ยืนยัน"
|
|
2665
2668
|
}
|
|
2666
|
-
}, Ho = {
|
|
2667
|
-
mediaPicker: Go
|
|
2668
2669
|
}, Jo = {
|
|
2670
|
+
mediaPicker: Ho
|
|
2671
|
+
}, Wo = {
|
|
2669
2672
|
assetGrid: {
|
|
2670
2673
|
loading: "加载中…",
|
|
2671
2674
|
empty: "暂无素材",
|
|
@@ -2725,9 +2728,9 @@ const Uo = {
|
|
|
2725
2728
|
uploadSubmitButton: "上传 {count} 张",
|
|
2726
2729
|
confirmButton: "确定"
|
|
2727
2730
|
}
|
|
2728
|
-
}, Wo = {
|
|
2729
|
-
mediaPicker: Jo
|
|
2730
2731
|
}, Ko = {
|
|
2732
|
+
mediaPicker: Wo
|
|
2733
|
+
}, Xo = {
|
|
2731
2734
|
assetGrid: {
|
|
2732
2735
|
loading: "載入中…",
|
|
2733
2736
|
empty: "暫無素材",
|
|
@@ -2787,29 +2790,29 @@ const Uo = {
|
|
|
2787
2790
|
uploadSubmitButton: "上傳 {count} 張",
|
|
2788
2791
|
confirmButton: "確定"
|
|
2789
2792
|
}
|
|
2790
|
-
}, Xo = {
|
|
2791
|
-
mediaPicker: Ko
|
|
2792
|
-
}, De = {
|
|
2793
|
-
"en-US": jo,
|
|
2794
|
-
"zh-CN": Wo,
|
|
2795
|
-
"zh-Hant": Xo,
|
|
2796
|
-
"th-TH": Ho,
|
|
2797
|
-
"ja-JP": $o,
|
|
2798
|
-
"id-ID": Vo,
|
|
2799
|
-
"fr-MA": Io
|
|
2800
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 = {
|
|
2801
2804
|
key: 0,
|
|
2802
2805
|
class: "py-64 text-center text-sm text-gray-400"
|
|
2803
2806
|
}, Yo = {
|
|
2804
2807
|
key: 1,
|
|
2805
2808
|
class: "py-64 text-center text-sm text-gray-400"
|
|
2806
|
-
},
|
|
2809
|
+
}, er = {
|
|
2807
2810
|
key: 2,
|
|
2808
2811
|
class: "bg-white border border-fm-color-neutral-gray-200 rounded-lg overflow-hidden"
|
|
2809
|
-
},
|
|
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 = {
|
|
2810
2813
|
key: 3,
|
|
2811
2814
|
class: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-16"
|
|
2812
|
-
},
|
|
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({
|
|
2813
2816
|
__name: "AssetGrid",
|
|
2814
2817
|
props: {
|
|
2815
2818
|
assets: {},
|
|
@@ -2820,7 +2823,7 @@ const Uo = {
|
|
|
2820
2823
|
},
|
|
2821
2824
|
emits: ["open", "toggle", "delete"],
|
|
2822
2825
|
setup(e, { emit: t }) {
|
|
2823
|
-
const { t: n } =
|
|
2826
|
+
const { t: n } = Ee({ messages: De }), a = t;
|
|
2824
2827
|
function o(i) {
|
|
2825
2828
|
var u;
|
|
2826
2829
|
return ((u = i.split("/")[1]) == null ? void 0 : u.toUpperCase()) ?? i;
|
|
@@ -2843,23 +2846,23 @@ const Uo = {
|
|
|
2843
2846
|
}
|
|
2844
2847
|
return (i, u) => {
|
|
2845
2848
|
const p = M("FmIcon"), d = M("FmThumbnail"), f = M("FmAvatar"), b = M("FmButton");
|
|
2846
|
-
return e.loading ? (P(),
|
|
2847
|
-
h("div",
|
|
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, [
|
|
2848
2851
|
u[0] || (u[0] = h("span", null, null, -1)),
|
|
2849
2852
|
u[1] || (u[1] = h("span", null, null, -1)),
|
|
2850
|
-
h("span", null, k(
|
|
2851
|
-
h("span", null, k(
|
|
2852
|
-
h("span", null, k(
|
|
2853
|
-
h("span", null, k(
|
|
2854
|
-
h("span", null, k(
|
|
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),
|
|
2855
2858
|
u[2] || (u[2] = h("span", null, null, -1))
|
|
2856
2859
|
]),
|
|
2857
|
-
(P(!0),
|
|
2860
|
+
(P(!0), T(ee, null, we(e.assets, (w) => (P(), T("div", {
|
|
2858
2861
|
key: w.id,
|
|
2859
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"]),
|
|
2860
2863
|
onClick: (g) => a("open", w)
|
|
2861
2864
|
}, [
|
|
2862
|
-
e.selectable ? (P(),
|
|
2865
|
+
e.selectable ? (P(), T("button", {
|
|
2863
2866
|
key: 0,
|
|
2864
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"]),
|
|
2865
2868
|
onClick: at((g) => a("toggle", w), ["stop"])
|
|
@@ -2870,28 +2873,28 @@ const Uo = {
|
|
|
2870
2873
|
size: "sm",
|
|
2871
2874
|
color: "white"
|
|
2872
2875
|
})) : H("", !0)
|
|
2873
|
-
], 10,
|
|
2874
|
-
h("div",
|
|
2876
|
+
], 10, ar)) : (P(), T("span", or)),
|
|
2877
|
+
h("div", rr, [
|
|
2875
2878
|
N(d, {
|
|
2876
2879
|
src: w.url,
|
|
2877
2880
|
size: "sm",
|
|
2878
2881
|
class: "!w-full !h-full"
|
|
2879
2882
|
}, null, 8, ["src"])
|
|
2880
2883
|
]),
|
|
2881
|
-
h("div",
|
|
2882
|
-
h("span",
|
|
2883
|
-
h("span",
|
|
2884
|
+
h("div", sr, [
|
|
2885
|
+
h("span", ir, k(w.fileName), 1),
|
|
2886
|
+
h("span", lr, k(o(w.mimeType)), 1)
|
|
2884
2887
|
]),
|
|
2885
|
-
h("span",
|
|
2886
|
-
h("span",
|
|
2887
|
-
h("div",
|
|
2888
|
+
h("span", ur, k(w.width) + "×" + k(w.height), 1),
|
|
2889
|
+
h("span", cr, k(r(w.fileSizeBytes)), 1),
|
|
2890
|
+
h("div", dr, [
|
|
2888
2891
|
N(f, {
|
|
2889
2892
|
name: w.uploadedBy,
|
|
2890
2893
|
size: "sm"
|
|
2891
2894
|
}, null, 8, ["name"]),
|
|
2892
|
-
h("span",
|
|
2895
|
+
h("span", pr, k(w.uploadedBy), 1)
|
|
2893
2896
|
]),
|
|
2894
|
-
h("span",
|
|
2897
|
+
h("span", fr, k(s(w.createdAt)), 1),
|
|
2895
2898
|
N(b, {
|
|
2896
2899
|
variant: "tertiary",
|
|
2897
2900
|
size: "md",
|
|
@@ -2899,20 +2902,20 @@ const Uo = {
|
|
|
2899
2902
|
label: "",
|
|
2900
2903
|
onClick: at((g) => a("delete", w), ["stop"])
|
|
2901
2904
|
}, null, 8, ["onClick"])
|
|
2902
|
-
], 10,
|
|
2903
|
-
])) : (P(),
|
|
2904
|
-
(P(!0),
|
|
2905
|
+
], 10, nr))), 128))
|
|
2906
|
+
])) : (P(), T("div", mr, [
|
|
2907
|
+
(P(!0), T(ee, null, we(e.assets, (w) => (P(), T("div", {
|
|
2905
2908
|
key: w.id,
|
|
2906
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"]),
|
|
2907
2910
|
onClick: (g) => a("open", w)
|
|
2908
2911
|
}, [
|
|
2909
|
-
h("div",
|
|
2912
|
+
h("div", hr, [
|
|
2910
2913
|
N(d, {
|
|
2911
2914
|
src: w.url,
|
|
2912
2915
|
size: "xl",
|
|
2913
2916
|
class: "w-full h-full"
|
|
2914
2917
|
}, null, 8, ["src"]),
|
|
2915
|
-
e.selectable ? (P(),
|
|
2918
|
+
e.selectable ? (P(), T("button", {
|
|
2916
2919
|
key: 0,
|
|
2917
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"]),
|
|
2918
2921
|
onClick: at((g) => a("toggle", w), ["stop"])
|
|
@@ -2923,18 +2926,18 @@ const Uo = {
|
|
|
2923
2926
|
size: "sm",
|
|
2924
2927
|
color: "white"
|
|
2925
2928
|
})) : H("", !0)
|
|
2926
|
-
], 10,
|
|
2927
|
-
h("span",
|
|
2929
|
+
], 10, br)) : H("", !0),
|
|
2930
|
+
h("span", yr, k(o(w.mimeType)), 1)
|
|
2928
2931
|
]),
|
|
2929
|
-
h("div",
|
|
2930
|
-
h("div",
|
|
2931
|
-
h("span",
|
|
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)
|
|
2932
2935
|
])
|
|
2933
|
-
], 10,
|
|
2936
|
+
], 10, gr))), 128))
|
|
2934
2937
|
]));
|
|
2935
2938
|
};
|
|
2936
2939
|
}
|
|
2937
|
-
}),
|
|
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({
|
|
2938
2941
|
__name: "TagFilterTabs",
|
|
2939
2942
|
props: {
|
|
2940
2943
|
tags: {},
|
|
@@ -2943,10 +2946,10 @@ const Uo = {
|
|
|
2943
2946
|
},
|
|
2944
2947
|
emits: ["update:modelValue"],
|
|
2945
2948
|
setup(e, { emit: t }) {
|
|
2946
|
-
const { t: n } =
|
|
2949
|
+
const { t: n } = Ee({ messages: De }), a = t;
|
|
2947
2950
|
return (o, r) => {
|
|
2948
2951
|
const s = M("FmChip");
|
|
2949
|
-
return P(),
|
|
2952
|
+
return P(), T("div", Sr, [
|
|
2950
2953
|
N(s, {
|
|
2951
2954
|
selectable: "",
|
|
2952
2955
|
selected: e.modelValue === null,
|
|
@@ -2954,7 +2957,7 @@ const Uo = {
|
|
|
2954
2957
|
}, {
|
|
2955
2958
|
default: ae(() => [
|
|
2956
2959
|
h("span", Er, [
|
|
2957
|
-
be(k(
|
|
2960
|
+
be(k(O(n)("mediaPicker.tagFilterTabs.all")) + " ", 1),
|
|
2958
2961
|
h("span", {
|
|
2959
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"])
|
|
2960
2963
|
}, k(e.total), 3)
|
|
@@ -2962,14 +2965,14 @@ const Uo = {
|
|
|
2962
2965
|
]),
|
|
2963
2966
|
_: 1
|
|
2964
2967
|
}, 8, ["selected"]),
|
|
2965
|
-
(P(!0),
|
|
2968
|
+
(P(!0), T(ee, null, we(e.tags, (i) => (P(), Q(s, {
|
|
2966
2969
|
key: i.tag,
|
|
2967
2970
|
selectable: "",
|
|
2968
2971
|
selected: e.modelValue === i.tag,
|
|
2969
2972
|
onClick: (u) => a("update:modelValue", i.tag)
|
|
2970
2973
|
}, {
|
|
2971
2974
|
default: ae(() => [
|
|
2972
|
-
h("span",
|
|
2975
|
+
h("span", kr, [
|
|
2973
2976
|
be(k(i.tag) + " ", 1),
|
|
2974
2977
|
h("span", {
|
|
2975
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"])
|
|
@@ -2988,10 +2991,10 @@ function $t(e) {
|
|
|
2988
2991
|
n.onload = () => t({ width: n.naturalWidth || 480, height: n.naturalHeight || 360 }), n.onerror = () => t({ width: 480, height: 360 }), n.src = e;
|
|
2989
2992
|
});
|
|
2990
2993
|
}
|
|
2991
|
-
const
|
|
2994
|
+
const Or = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
2992
2995
|
key: 1,
|
|
2993
2996
|
class: "inline-flex items-center gap-4 border rounded-full border-gray-300 pl-8 pr-4 h-[28px]"
|
|
2994
|
-
}, Tr = ["placeholder"], wn = /* @__PURE__ */
|
|
2997
|
+
}, Tr = ["placeholder"], wn = /* @__PURE__ */ Se({
|
|
2995
2998
|
__name: "TagFilterBar",
|
|
2996
2999
|
props: {
|
|
2997
3000
|
tags: {},
|
|
@@ -3000,7 +3003,7 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3000
3003
|
},
|
|
3001
3004
|
emits: ["update:modelValue", "tag-created"],
|
|
3002
3005
|
setup(e, { emit: t }) {
|
|
3003
|
-
const { t: n } =
|
|
3006
|
+
const { t: n } = Ee({ messages: De }), a = e, o = t;
|
|
3004
3007
|
function r(u) {
|
|
3005
3008
|
o("update:modelValue", a.modelValue.includes(u) ? a.modelValue.filter((p) => p !== u) : [...a.modelValue, u]);
|
|
3006
3009
|
}
|
|
@@ -3011,25 +3014,25 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3011
3014
|
}
|
|
3012
3015
|
return (u, p) => {
|
|
3013
3016
|
const d = M("FmChip"), f = M("FmIcon");
|
|
3014
|
-
return P(),
|
|
3017
|
+
return P(), T("div", Or, [
|
|
3015
3018
|
e.mode === "filter" ? (P(), Q(d, {
|
|
3016
3019
|
key: 0,
|
|
3017
|
-
label:
|
|
3020
|
+
label: O(n)("mediaPicker.tagFilterBar.all"),
|
|
3018
3021
|
selected: e.modelValue.length === 0,
|
|
3019
3022
|
selectable: "",
|
|
3020
3023
|
onClick: p[0] || (p[0] = (b) => o("update:modelValue", []))
|
|
3021
3024
|
}, null, 8, ["label", "selected"])) : H("", !0),
|
|
3022
|
-
(P(!0),
|
|
3025
|
+
(P(!0), T(ee, null, we(e.tags, (b) => (P(), Q(d, {
|
|
3023
3026
|
key: b,
|
|
3024
3027
|
label: b,
|
|
3025
3028
|
selected: e.modelValue.includes(b),
|
|
3026
3029
|
selectable: "",
|
|
3027
3030
|
onClick: (w) => r(b)
|
|
3028
3031
|
}, null, 8, ["label", "selected", "onClick"]))), 128)),
|
|
3029
|
-
e.mode === "assign" ? (P(),
|
|
3030
|
-
|
|
3032
|
+
e.mode === "assign" ? (P(), T("div", Rr, [
|
|
3033
|
+
En(h("input", {
|
|
3031
3034
|
"onUpdate:modelValue": p[1] || (p[1] = (b) => s.value = b),
|
|
3032
|
-
placeholder:
|
|
3035
|
+
placeholder: O(n)("mediaPicker.tagFilterBar.newTagPlaceholder"),
|
|
3033
3036
|
class: "text-xs outline-none w-[88px]",
|
|
3034
3037
|
onKeyup: kn(i, ["enter"])
|
|
3035
3038
|
}, null, 40, Tr), [
|
|
@@ -3048,19 +3051,19 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3048
3051
|
]);
|
|
3049
3052
|
};
|
|
3050
3053
|
}
|
|
3051
|
-
}),
|
|
3054
|
+
}), _r = { class: "space-y-16" }, Ar = {
|
|
3052
3055
|
key: 0,
|
|
3053
3056
|
class: "space-y-8"
|
|
3054
|
-
},
|
|
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 = {
|
|
3055
3058
|
key: 0,
|
|
3056
3059
|
class: "text-[11px] text-red-600"
|
|
3057
|
-
},
|
|
3060
|
+
}, Lr = {
|
|
3058
3061
|
key: 1,
|
|
3059
3062
|
class: "text-[11px] text-gray-500"
|
|
3060
|
-
},
|
|
3063
|
+
}, Ur = ["onClick"], jr = { class: "space-y-8" }, Mr = { class: "text-xs font-semibold text-gray-500" }, Ir = {
|
|
3061
3064
|
key: 0,
|
|
3062
3065
|
class: "flex flex-wrap items-center gap-8"
|
|
3063
|
-
},
|
|
3066
|
+
}, zr = { class: "text-[11px] text-gray-400" }, Vr = ["onClick"], vn = /* @__PURE__ */ Se({
|
|
3064
3067
|
__name: "UploadPanel",
|
|
3065
3068
|
props: {
|
|
3066
3069
|
businessId: {},
|
|
@@ -3069,7 +3072,7 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3069
3072
|
},
|
|
3070
3073
|
emits: ["tag-created", "uploaded"],
|
|
3071
3074
|
setup(e, { expose: t, emit: n }) {
|
|
3072
|
-
const { t: a } =
|
|
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));
|
|
3073
3076
|
function f() {
|
|
3074
3077
|
s.value.forEach((c) => URL.revokeObjectURL(c.previewUrl)), s.value = [], i.value = [];
|
|
3075
3078
|
}
|
|
@@ -3085,58 +3088,58 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3085
3088
|
return c >= 1024 * 1024 ? `${(c / 1024 / 1024).toFixed(1)} MB` : `${Math.round(c / 1024)} KB`;
|
|
3086
3089
|
}
|
|
3087
3090
|
async function y(c) {
|
|
3088
|
-
const m = c.dimensions ?? await $t(c.previewUrl), v = c.file.type || "image/jpeg",
|
|
3091
|
+
const m = c.dimensions ?? await $t(c.previewUrl), v = c.file.type || "image/jpeg", E = await No(o.businessId, {
|
|
3089
3092
|
restaurantId: o.restaurantId,
|
|
3090
3093
|
fileName: c.file.name,
|
|
3091
3094
|
contentType: v,
|
|
3092
3095
|
fileSize: c.file.size
|
|
3093
|
-
}), x = await fetch(
|
|
3096
|
+
}), x = await fetch(E.uploadUrl, { method: "PUT", headers: { "Content-Type": v }, body: c.file });
|
|
3094
3097
|
if (!x.ok)
|
|
3095
3098
|
throw new Error(a("mediaPicker.uploadPanel.uploadFailedError", { status: x.status }));
|
|
3096
|
-
const
|
|
3097
|
-
return i.value.length && await
|
|
3099
|
+
const B = await Fo(o.businessId, E.assetId, m);
|
|
3100
|
+
return i.value.length && await Uo(o.businessId, B.id, i.value), B;
|
|
3098
3101
|
}
|
|
3099
3102
|
async function U() {
|
|
3100
3103
|
if (!(!s.value.length || !o.businessId)) {
|
|
3101
3104
|
u.value = !0;
|
|
3102
3105
|
try {
|
|
3103
|
-
const c = s.value, m = await Promise.allSettled(c.map(y)), v = /* @__PURE__ */ new Set(),
|
|
3104
|
-
m.forEach((x,
|
|
3105
|
-
x.status === "rejected" ? (v.add(c[
|
|
3106
|
-
}), s.value = c.filter((x) => v.has(x.id)),
|
|
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);
|
|
3107
3110
|
} finally {
|
|
3108
3111
|
u.value = !1;
|
|
3109
3112
|
}
|
|
3110
3113
|
}
|
|
3111
3114
|
}
|
|
3112
3115
|
return t({ stagedCount: p, uploading: u, upload: U, reset: f }), (c, m) => {
|
|
3113
|
-
const v = M("FmDropField"),
|
|
3114
|
-
return P(),
|
|
3116
|
+
const v = M("FmDropField"), E = M("FmIcon");
|
|
3117
|
+
return P(), T("div", _r, [
|
|
3115
3118
|
N(v, {
|
|
3116
|
-
label:
|
|
3119
|
+
label: O(a)("mediaPicker.uploadPanel.dropLabel"),
|
|
3117
3120
|
accept: "image/jpeg,image/png,image/webp",
|
|
3118
3121
|
"max-file-size": 10 * 1024 * 1024,
|
|
3119
3122
|
onFileUpload: b
|
|
3120
3123
|
}, {
|
|
3121
3124
|
"helper-text": ae(() => [
|
|
3122
|
-
be(k(
|
|
3125
|
+
be(k(O(a)("mediaPicker.uploadPanel.helperText")), 1)
|
|
3123
3126
|
]),
|
|
3124
3127
|
_: 1
|
|
3125
3128
|
}, 8, ["label"]),
|
|
3126
|
-
s.value.length ? (P(),
|
|
3127
|
-
h("div",
|
|
3128
|
-
(P(!0),
|
|
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", {
|
|
3129
3132
|
key: x.id,
|
|
3130
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"])
|
|
3131
3134
|
}, [
|
|
3132
3135
|
h("img", {
|
|
3133
3136
|
src: x.previewUrl,
|
|
3134
3137
|
class: "w-[44px] h-[44px] rounded flex-shrink-0 object-cover"
|
|
3135
|
-
}, null, 8,
|
|
3136
|
-
h("div",
|
|
3137
|
-
h("span",
|
|
3138
|
-
x.error ? (P(),
|
|
3139
|
-
x.dimensions ? (P(),
|
|
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 }, [
|
|
3140
3143
|
be(k(x.dimensions.width) + "×" + k(x.dimensions.height) + " · ", 1)
|
|
3141
3144
|
], 64)) : H("", !0),
|
|
3142
3145
|
be(k(g(x.file.size)), 1)
|
|
@@ -3144,17 +3147,17 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3144
3147
|
]),
|
|
3145
3148
|
h("button", {
|
|
3146
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",
|
|
3147
|
-
onClick: (
|
|
3150
|
+
onClick: (B) => w(x.id)
|
|
3148
3151
|
}, [
|
|
3149
|
-
N(
|
|
3152
|
+
N(E, {
|
|
3150
3153
|
name: "close",
|
|
3151
3154
|
size: "sm"
|
|
3152
3155
|
})
|
|
3153
|
-
], 8,
|
|
3156
|
+
], 8, Ur)
|
|
3154
3157
|
], 2))), 128))
|
|
3155
3158
|
])) : H("", !0),
|
|
3156
|
-
h("div",
|
|
3157
|
-
h("div",
|
|
3159
|
+
h("div", jr, [
|
|
3160
|
+
h("div", Mr, k(O(a)("mediaPicker.uploadPanel.tagsLabel")), 1),
|
|
3158
3161
|
N(wn, {
|
|
3159
3162
|
modelValue: i.value,
|
|
3160
3163
|
"onUpdate:modelValue": m[0] || (m[0] = (x) => i.value = x),
|
|
@@ -3162,22 +3165,22 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3162
3165
|
mode: "assign",
|
|
3163
3166
|
onTagCreated: m[1] || (m[1] = (x) => r("tag-created", x))
|
|
3164
3167
|
}, null, 8, ["modelValue", "tags"]),
|
|
3165
|
-
d.value.length ? (P(),
|
|
3166
|
-
h("span",
|
|
3167
|
-
(P(!0),
|
|
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", {
|
|
3168
3171
|
key: x,
|
|
3169
3172
|
class: "h-[26px] px-12 rounded-full border border-dashed border-fm-color-neutral-gray-300 text-[11px] font-semibold text-gray-500",
|
|
3170
|
-
onClick: (
|
|
3171
|
-
}, " + " + k(x), 9,
|
|
3173
|
+
onClick: (B) => i.value.push(x)
|
|
3174
|
+
}, " + " + k(x), 9, Vr))), 128))
|
|
3172
3175
|
])) : H("", !0)
|
|
3173
3176
|
])
|
|
3174
3177
|
]);
|
|
3175
3178
|
};
|
|
3176
3179
|
}
|
|
3177
|
-
}),
|
|
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 = {
|
|
3178
3181
|
key: 0,
|
|
3179
3182
|
class: "text-xs text-fm-color-typo-secondary"
|
|
3180
|
-
},
|
|
3183
|
+
}, Wr = { key: 1 }, Kr = { class: "flex gap-8" }, Xr = /* @__PURE__ */ Se({
|
|
3181
3184
|
__name: "MediaPickerModal",
|
|
3182
3185
|
props: {
|
|
3183
3186
|
open: { type: Boolean },
|
|
@@ -3187,12 +3190,12 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3187
3190
|
},
|
|
3188
3191
|
emits: ["update:open", "select", "confirm"],
|
|
3189
3192
|
setup(e, { emit: t }) {
|
|
3190
|
-
const { t: n } =
|
|
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);
|
|
3191
3194
|
async function w() {
|
|
3192
3195
|
if (a.businessId) {
|
|
3193
3196
|
b.value = !0;
|
|
3194
3197
|
try {
|
|
3195
|
-
const
|
|
3198
|
+
const B = await et({
|
|
3196
3199
|
businessId: a.businessId,
|
|
3197
3200
|
restaurantId: a.restaurantId,
|
|
3198
3201
|
search: s.value || void 0,
|
|
@@ -3201,7 +3204,7 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3201
3204
|
sortBy: "createdAt",
|
|
3202
3205
|
descending: !0
|
|
3203
3206
|
});
|
|
3204
|
-
u.value =
|
|
3207
|
+
u.value = B.resources;
|
|
3205
3208
|
} finally {
|
|
3206
3209
|
b.value = !1;
|
|
3207
3210
|
}
|
|
@@ -3210,14 +3213,14 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3210
3213
|
async function g() {
|
|
3211
3214
|
if (!a.businessId)
|
|
3212
3215
|
return;
|
|
3213
|
-
const [
|
|
3214
|
-
p.value =
|
|
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;
|
|
3215
3218
|
}
|
|
3216
3219
|
ye(
|
|
3217
3220
|
() => a.open,
|
|
3218
|
-
(
|
|
3219
|
-
var
|
|
3220
|
-
|
|
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());
|
|
3221
3224
|
}
|
|
3222
3225
|
), ye(i, w);
|
|
3223
3226
|
let y;
|
|
@@ -3225,44 +3228,44 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3225
3228
|
clearTimeout(y), y = setTimeout(w, 250);
|
|
3226
3229
|
});
|
|
3227
3230
|
const U = L(/* @__PURE__ */ new Set());
|
|
3228
|
-
function c(
|
|
3229
|
-
const
|
|
3230
|
-
|
|
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;
|
|
3231
3234
|
}
|
|
3232
|
-
function m(
|
|
3235
|
+
function m(B) {
|
|
3233
3236
|
if (a.selectionMode === "single") {
|
|
3234
|
-
o("select",
|
|
3237
|
+
o("select", B), o("update:open", !1);
|
|
3235
3238
|
return;
|
|
3236
3239
|
}
|
|
3237
|
-
c(
|
|
3240
|
+
c(B);
|
|
3238
3241
|
}
|
|
3239
3242
|
function v() {
|
|
3240
|
-
const
|
|
3241
|
-
o("confirm",
|
|
3243
|
+
const B = u.value.filter((C) => U.value.has(C.id));
|
|
3244
|
+
o("confirm", B), o("update:open", !1);
|
|
3242
3245
|
}
|
|
3243
|
-
const
|
|
3246
|
+
const E = L(null);
|
|
3244
3247
|
async function x() {
|
|
3245
|
-
var
|
|
3246
|
-
(
|
|
3248
|
+
var B;
|
|
3249
|
+
(B = E.value) != null && B.stagedCount || (r.value = "browse"), await Promise.all([w(), g()]);
|
|
3247
3250
|
}
|
|
3248
|
-
return (
|
|
3249
|
-
const de = M("FmSearch"), oe = M("FmButton"),
|
|
3250
|
-
return P(), Q(
|
|
3251
|
+
return (B, C) => {
|
|
3252
|
+
const de = M("FmSearch"), oe = M("FmButton"), Y = M("FmDialog");
|
|
3253
|
+
return P(), Q(Y, {
|
|
3251
3254
|
"model-value": e.open,
|
|
3252
3255
|
"max-width": 900,
|
|
3253
|
-
"onUpdate:modelValue":
|
|
3256
|
+
"onUpdate:modelValue": C[7] || (C[7] = (F) => !F && o("update:open", !1))
|
|
3254
3257
|
}, {
|
|
3255
3258
|
"dialog-header": ae(() => [
|
|
3256
|
-
h("div",
|
|
3259
|
+
h("div", qr, [
|
|
3257
3260
|
h("div", null, [
|
|
3258
|
-
h("div", null, k(
|
|
3259
|
-
h("div",
|
|
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)
|
|
3260
3263
|
]),
|
|
3261
3264
|
r.value === "browse" ? (P(), Q(de, {
|
|
3262
3265
|
key: 0,
|
|
3263
3266
|
modelValue: s.value,
|
|
3264
|
-
"onUpdate:modelValue":
|
|
3265
|
-
placeholder:
|
|
3267
|
+
"onUpdate:modelValue": C[0] || (C[0] = (F) => s.value = F),
|
|
3268
|
+
placeholder: O(n)("mediaPicker.pickerModal.searchPlaceholder"),
|
|
3266
3269
|
class: "w-[200px] shrink-0"
|
|
3267
3270
|
}, null, 8, ["modelValue", "placeholder"])) : H("", !0)
|
|
3268
3271
|
])
|
|
@@ -3270,32 +3273,32 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3270
3273
|
"dialog-footer": ae(() => {
|
|
3271
3274
|
var F, re;
|
|
3272
3275
|
return [
|
|
3273
|
-
h("div",
|
|
3274
|
-
r.value === "browse" && e.selectionMode === "multiple" ? (P(),
|
|
3275
|
-
U.value.size ? (P(),
|
|
3276
|
-
be(k(
|
|
3277
|
-
], 64)) : (P(),
|
|
3278
|
-
be(k(
|
|
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)
|
|
3279
3282
|
], 64))
|
|
3280
|
-
])) : (P(),
|
|
3281
|
-
h("div",
|
|
3283
|
+
])) : (P(), T("span", Wr)),
|
|
3284
|
+
h("div", Kr, [
|
|
3282
3285
|
N(oe, {
|
|
3283
|
-
label:
|
|
3286
|
+
label: O(n)("mediaPicker.pickerModal.cancelButton"),
|
|
3284
3287
|
variant: "tertiary",
|
|
3285
|
-
onClick:
|
|
3288
|
+
onClick: C[5] || (C[5] = (ke) => o("update:open", !1))
|
|
3286
3289
|
}, null, 8, ["label"]),
|
|
3287
3290
|
r.value === "upload" ? (P(), Q(oe, {
|
|
3288
3291
|
key: 0,
|
|
3289
|
-
label:
|
|
3292
|
+
label: O(n)("mediaPicker.pickerModal.uploadSubmitButton", { count: ((F = E.value) == null ? void 0 : F.stagedCount) ?? 0 }),
|
|
3290
3293
|
variant: "primary",
|
|
3291
|
-
disabled: !((re =
|
|
3292
|
-
onClick:
|
|
3294
|
+
disabled: !((re = E.value) != null && re.stagedCount) || E.value.uploading,
|
|
3295
|
+
onClick: C[6] || (C[6] = (ke) => {
|
|
3293
3296
|
var G;
|
|
3294
|
-
return (G =
|
|
3297
|
+
return (G = E.value) == null ? void 0 : G.upload();
|
|
3295
3298
|
})
|
|
3296
3299
|
}, null, 8, ["label", "disabled"])) : e.selectionMode === "multiple" ? (P(), Q(oe, {
|
|
3297
3300
|
key: 1,
|
|
3298
|
-
label:
|
|
3301
|
+
label: O(n)("mediaPicker.pickerModal.confirmButton"),
|
|
3299
3302
|
variant: "primary",
|
|
3300
3303
|
disabled: U.value.size === 0,
|
|
3301
3304
|
onClick: v
|
|
@@ -3305,21 +3308,21 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3305
3308
|
];
|
|
3306
3309
|
}),
|
|
3307
3310
|
default: ae(() => [
|
|
3308
|
-
h("div",
|
|
3311
|
+
h("div", Gr, [
|
|
3309
3312
|
h("button", {
|
|
3310
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"]),
|
|
3311
|
-
onClick:
|
|
3312
|
-
}, k(
|
|
3314
|
+
onClick: C[1] || (C[1] = (F) => r.value = "browse")
|
|
3315
|
+
}, k(O(n)("mediaPicker.pickerModal.browseTab")), 3),
|
|
3313
3316
|
h("button", {
|
|
3314
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"]),
|
|
3315
|
-
onClick:
|
|
3316
|
-
}, k(
|
|
3318
|
+
onClick: C[2] || (C[2] = (F) => r.value = "upload")
|
|
3319
|
+
}, k(O(n)("mediaPicker.pickerModal.uploadTab")), 3)
|
|
3317
3320
|
]),
|
|
3318
|
-
r.value === "browse" ? (P(),
|
|
3319
|
-
p.value.length ? (P(), Q(
|
|
3321
|
+
r.value === "browse" ? (P(), T(ee, { key: 0 }, [
|
|
3322
|
+
p.value.length ? (P(), Q(Pr, {
|
|
3320
3323
|
key: 0,
|
|
3321
3324
|
modelValue: i.value,
|
|
3322
|
-
"onUpdate:modelValue":
|
|
3325
|
+
"onUpdate:modelValue": C[3] || (C[3] = (F) => i.value = F),
|
|
3323
3326
|
tags: p.value,
|
|
3324
3327
|
total: d.value,
|
|
3325
3328
|
class: "mb-12"
|
|
@@ -3335,11 +3338,11 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3335
3338
|
], 64)) : (P(), Q(vn, {
|
|
3336
3339
|
key: 1,
|
|
3337
3340
|
ref_key: "uploadPanelRef",
|
|
3338
|
-
ref:
|
|
3341
|
+
ref: E,
|
|
3339
3342
|
"business-id": e.businessId,
|
|
3340
3343
|
"restaurant-id": e.restaurantId,
|
|
3341
3344
|
"available-tags": f.value,
|
|
3342
|
-
onTagCreated:
|
|
3345
|
+
onTagCreated: C[4] || (C[4] = (F) => f.value.push(F)),
|
|
3343
3346
|
onUploaded: x
|
|
3344
3347
|
}, null, 8, ["business-id", "restaurant-id", "available-tags"]))
|
|
3345
3348
|
]),
|
|
@@ -3347,19 +3350,19 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3347
3350
|
}, 8, ["model-value"]);
|
|
3348
3351
|
};
|
|
3349
3352
|
}
|
|
3350
|
-
}),
|
|
3353
|
+
}), Qr = {
|
|
3351
3354
|
key: 0,
|
|
3352
3355
|
class: "flex h-[620px]"
|
|
3353
|
-
},
|
|
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 = {
|
|
3354
3357
|
key: 0,
|
|
3355
3358
|
class: "flex items-start gap-8"
|
|
3356
|
-
},
|
|
3359
|
+
}, os = { class: "flex-1 text-sm font-semibold break-all" }, rs = {
|
|
3357
3360
|
key: 1,
|
|
3358
3361
|
class: "flex gap-8"
|
|
3359
|
-
},
|
|
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 = {
|
|
3360
3363
|
key: 2,
|
|
3361
3364
|
class: "flex flex-wrap gap-4"
|
|
3362
|
-
},
|
|
3365
|
+
}, ms = { class: "flex gap-8 border-t pt-12" }, gs = /* @__PURE__ */ Se({
|
|
3363
3366
|
__name: "AssetDetailDialog",
|
|
3364
3367
|
props: {
|
|
3365
3368
|
asset: {},
|
|
@@ -3367,7 +3370,7 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3367
3370
|
},
|
|
3368
3371
|
emits: ["close", "renamed", "deleted"],
|
|
3369
3372
|
setup(e, { emit: t }) {
|
|
3370
|
-
const n = Ht(), { t: a } =
|
|
3373
|
+
const n = Ht(), { t: a } = Ee({ messages: De }), o = e, r = t, s = L(!1), i = L("");
|
|
3371
3374
|
ye(
|
|
3372
3375
|
() => o.asset,
|
|
3373
3376
|
(g) => {
|
|
@@ -3379,7 +3382,7 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3379
3382
|
i.value = ((g = o.asset) == null ? void 0 : g.fileName) ?? "", s.value = !0;
|
|
3380
3383
|
}
|
|
3381
3384
|
async function p() {
|
|
3382
|
-
o.asset && (await
|
|
3385
|
+
o.asset && (await Lo(o.businessId, o.asset.id, i.value), s.value = !1, r("renamed"));
|
|
3383
3386
|
}
|
|
3384
3387
|
function d() {
|
|
3385
3388
|
if (!o.asset)
|
|
@@ -3416,23 +3419,23 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3416
3419
|
"max-height": "620px",
|
|
3417
3420
|
"content-class": "!p-0 asset-preview-dialog-content",
|
|
3418
3421
|
"close-button": !1,
|
|
3419
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
3422
|
+
"onUpdate:modelValue": y[2] || (y[2] = (E) => !E && r("close"))
|
|
3420
3423
|
}, {
|
|
3421
3424
|
default: ae(() => [
|
|
3422
|
-
e.asset ? (P(),
|
|
3423
|
-
h("div",
|
|
3425
|
+
e.asset ? (P(), T("div", Qr, [
|
|
3426
|
+
h("div", Zr, [
|
|
3424
3427
|
h("img", {
|
|
3425
3428
|
src: e.asset.url,
|
|
3426
3429
|
alt: e.asset.fileName,
|
|
3427
3430
|
class: "max-w-full max-h-full object-contain"
|
|
3428
3431
|
}, null, 8, Yr)
|
|
3429
3432
|
]),
|
|
3430
|
-
h("div",
|
|
3431
|
-
h("div",
|
|
3432
|
-
h("span",
|
|
3433
|
+
h("div", es, [
|
|
3434
|
+
h("div", ts, [
|
|
3435
|
+
h("span", ns, k(O(a)("mediaPicker.assetDetailDialog.previewTitle")), 1),
|
|
3433
3436
|
h("button", {
|
|
3434
3437
|
class: "w-[32px] h-[32px] rounded-lg bg-fm-color-neutral-gray-100 flex items-center justify-center flex-shrink-0",
|
|
3435
|
-
onClick: y[0] || (y[0] = (
|
|
3438
|
+
onClick: y[0] || (y[0] = (E) => r("close"))
|
|
3436
3439
|
}, [
|
|
3437
3440
|
N(U, {
|
|
3438
3441
|
name: "close",
|
|
@@ -3440,18 +3443,18 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3440
3443
|
})
|
|
3441
3444
|
])
|
|
3442
3445
|
]),
|
|
3443
|
-
s.value ? (P(),
|
|
3446
|
+
s.value ? (P(), T("div", rs, [
|
|
3444
3447
|
N(c, {
|
|
3445
3448
|
modelValue: i.value,
|
|
3446
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
3449
|
+
"onUpdate:modelValue": y[1] || (y[1] = (E) => i.value = E)
|
|
3447
3450
|
}, null, 8, ["modelValue"]),
|
|
3448
3451
|
N(m, {
|
|
3449
|
-
label:
|
|
3452
|
+
label: O(a)("mediaPicker.assetDetailDialog.saveButton"),
|
|
3450
3453
|
size: "md",
|
|
3451
3454
|
onClick: p
|
|
3452
3455
|
}, null, 8, ["label"])
|
|
3453
|
-
])) : (P(),
|
|
3454
|
-
h("span",
|
|
3456
|
+
])) : (P(), T("div", as, [
|
|
3457
|
+
h("span", os, k(e.asset.fileName), 1),
|
|
3455
3458
|
h("button", { onClick: u }, [
|
|
3456
3459
|
N(U, {
|
|
3457
3460
|
name: "edit",
|
|
@@ -3459,30 +3462,30 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3459
3462
|
})
|
|
3460
3463
|
])
|
|
3461
3464
|
])),
|
|
3462
|
-
h("div",
|
|
3463
|
-
h("div",
|
|
3464
|
-
h("span",
|
|
3465
|
+
h("div", ss, [
|
|
3466
|
+
h("div", is, [
|
|
3467
|
+
h("span", ls, k(O(a)("mediaPicker.assetDetailDialog.dimensionsLabel")), 1),
|
|
3465
3468
|
h("span", null, k(e.asset.width) + "×" + k(e.asset.height), 1)
|
|
3466
3469
|
]),
|
|
3467
|
-
h("div",
|
|
3468
|
-
h("span",
|
|
3470
|
+
h("div", us, [
|
|
3471
|
+
h("span", cs, k(O(a)("mediaPicker.assetDetailDialog.sizeLabel")), 1),
|
|
3469
3472
|
h("span", null, k(w(e.asset.fileSizeBytes)), 1)
|
|
3470
3473
|
]),
|
|
3471
|
-
h("div",
|
|
3472
|
-
h("span",
|
|
3474
|
+
h("div", ds, [
|
|
3475
|
+
h("span", ps, k(O(a)("mediaPicker.assetDetailDialog.formatLabel")), 1),
|
|
3473
3476
|
h("span", null, k(b(e.asset.mimeType)), 1)
|
|
3474
3477
|
])
|
|
3475
3478
|
]),
|
|
3476
|
-
e.asset.tags.length ? (P(),
|
|
3477
|
-
(P(!0),
|
|
3478
|
-
key:
|
|
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,
|
|
3479
3482
|
class: "text-[11px] bg-gray-100 rounded-full px-8 py-[2px]"
|
|
3480
|
-
}, " # " + k(
|
|
3483
|
+
}, " # " + k(E), 1))), 128))
|
|
3481
3484
|
])) : H("", !0),
|
|
3482
3485
|
y[3] || (y[3] = h("div", { class: "flex-1" }, null, -1)),
|
|
3483
|
-
h("div",
|
|
3486
|
+
h("div", ms, [
|
|
3484
3487
|
N(m, {
|
|
3485
|
-
label:
|
|
3488
|
+
label: O(a)("mediaPicker.assetDetailDialog.copyLinkButton"),
|
|
3486
3489
|
variant: "tertiary",
|
|
3487
3490
|
size: "md",
|
|
3488
3491
|
"prepend-icon": "link",
|
|
@@ -3490,7 +3493,7 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3490
3493
|
onClick: f
|
|
3491
3494
|
}, null, 8, ["label"]),
|
|
3492
3495
|
N(m, {
|
|
3493
|
-
label:
|
|
3496
|
+
label: O(a)("mediaPicker.assetDetailDialog.deleteButton"),
|
|
3494
3497
|
variant: "destructive",
|
|
3495
3498
|
size: "md",
|
|
3496
3499
|
"prepend-icon": "delete",
|
|
@@ -3504,38 +3507,38 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3504
3507
|
}, 8, ["model-value"]);
|
|
3505
3508
|
};
|
|
3506
3509
|
}
|
|
3507
|
-
}),
|
|
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 = {
|
|
3508
3511
|
key: 0,
|
|
3509
3512
|
class: "text-fm-color-typo-primary font-semibold"
|
|
3510
|
-
},
|
|
3513
|
+
}, ks = { key: 1 }, Ps = {
|
|
3511
3514
|
key: 0,
|
|
3512
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"
|
|
3513
|
-
},
|
|
3516
|
+
}, Os = { class: "text-sm font-semibold" }, Rs = { class: "flex justify-end gap-8 w-full" }, Bs = /* @__PURE__ */ Se({
|
|
3514
3517
|
__name: "AssetLibrary",
|
|
3515
3518
|
setup(e) {
|
|
3516
|
-
const t = Gt(), { t: n } =
|
|
3517
|
-
var
|
|
3518
|
-
return ((
|
|
3519
|
-
}), o =
|
|
3520
|
-
var
|
|
3521
|
-
return (
|
|
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;
|
|
3522
3525
|
}), r = Ht(), s = L(!1);
|
|
3523
|
-
function i(
|
|
3524
|
-
console.log("[media-debug] MediaPickerModal selected",
|
|
3526
|
+
function i(A) {
|
|
3527
|
+
console.log("[media-debug] MediaPickerModal selected", A), v();
|
|
3525
3528
|
}
|
|
3526
3529
|
const u = L(""), p = L([]), d = L([]), f = L([]), b = L(!1), w = L("recent"), g = {
|
|
3527
3530
|
recent: { sortBy: "createdAt", descending: !0 },
|
|
3528
3531
|
name: { sortBy: "fileName", descending: !1 },
|
|
3529
3532
|
size: { sortBy: "fileSizeBytes", descending: !0 }
|
|
3530
|
-
}, y = [{ icon: "grid_view" }, { icon: "view_list" }], U = L(y[0]), c =
|
|
3531
|
-
const
|
|
3532
|
-
return
|
|
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`;
|
|
3533
3536
|
});
|
|
3534
3537
|
async function v() {
|
|
3535
3538
|
if (a.value) {
|
|
3536
3539
|
d.value.length === 0 && (b.value = !0);
|
|
3537
3540
|
try {
|
|
3538
|
-
const [
|
|
3541
|
+
const [A, R] = await Promise.all([
|
|
3539
3542
|
et({
|
|
3540
3543
|
businessId: a.value,
|
|
3541
3544
|
restaurantId: o.value,
|
|
@@ -3545,59 +3548,59 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3545
3548
|
}),
|
|
3546
3549
|
bn(a.value)
|
|
3547
3550
|
]);
|
|
3548
|
-
d.value =
|
|
3551
|
+
d.value = A.resources, f.value = R;
|
|
3549
3552
|
} finally {
|
|
3550
3553
|
b.value = !1;
|
|
3551
3554
|
}
|
|
3552
3555
|
}
|
|
3553
3556
|
}
|
|
3554
|
-
|
|
3555
|
-
let
|
|
3557
|
+
On(v), ye(a, v), ye([p, w], v);
|
|
3558
|
+
let E;
|
|
3556
3559
|
ye(u, () => {
|
|
3557
|
-
clearTimeout(
|
|
3560
|
+
clearTimeout(E), E = setTimeout(v, 250);
|
|
3558
3561
|
});
|
|
3559
3562
|
const x = L(/* @__PURE__ */ new Set());
|
|
3560
|
-
function A
|
|
3561
|
-
const
|
|
3562
|
-
|
|
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;
|
|
3563
3566
|
}
|
|
3564
|
-
function
|
|
3567
|
+
function C() {
|
|
3565
3568
|
x.value = /* @__PURE__ */ new Set();
|
|
3566
3569
|
}
|
|
3567
3570
|
function de() {
|
|
3568
|
-
x.value = new Set(d.value.map((
|
|
3571
|
+
x.value = new Set(d.value.map((A) => A.id));
|
|
3569
3572
|
}
|
|
3570
3573
|
function oe() {
|
|
3571
|
-
const
|
|
3574
|
+
const A = x.value.size;
|
|
3572
3575
|
r.open({
|
|
3573
3576
|
title: n("media.library.deleteBulkTitle"),
|
|
3574
|
-
message: n("media.library.deleteBulkMessage", { count:
|
|
3577
|
+
message: n("media.library.deleteBulkMessage", { count: A, disclaimer: n("media.library.deleteDisclaimer") }),
|
|
3575
3578
|
primaryActions: { text: n("media.library.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3576
3579
|
secondaryActions: { text: n("media.library.cancelButton"), close: !0 }
|
|
3577
3580
|
}).onPrimary(async () => {
|
|
3578
|
-
await Promise.all([...x.value].map((
|
|
3581
|
+
await Promise.all([...x.value].map((R) => pt(a.value, R))), C(), await v(), r.close();
|
|
3579
3582
|
});
|
|
3580
3583
|
}
|
|
3581
|
-
function
|
|
3584
|
+
function Y(A) {
|
|
3582
3585
|
r.open({
|
|
3583
3586
|
title: n("media.library.deleteOneTitle"),
|
|
3584
|
-
message: n("media.library.deleteOneMessage", { fileName:
|
|
3587
|
+
message: n("media.library.deleteOneMessage", { fileName: A.fileName, disclaimer: n("media.library.deleteDisclaimer") }),
|
|
3585
3588
|
primaryActions: { text: n("media.library.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3586
3589
|
secondaryActions: { text: n("media.library.cancelButton"), close: !0 }
|
|
3587
3590
|
}).onPrimary(async () => {
|
|
3588
|
-
await pt(a.value,
|
|
3589
|
-
const
|
|
3590
|
-
|
|
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();
|
|
3591
3594
|
});
|
|
3592
3595
|
}
|
|
3593
3596
|
const F = L(null);
|
|
3594
|
-
function re(
|
|
3595
|
-
F.value =
|
|
3597
|
+
function re(A) {
|
|
3598
|
+
F.value = A;
|
|
3596
3599
|
}
|
|
3597
3600
|
async function ke() {
|
|
3598
|
-
await v(), F.value && (F.value = d.value.find((
|
|
3599
|
-
var
|
|
3600
|
-
return
|
|
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);
|
|
3601
3604
|
}) ?? null);
|
|
3602
3605
|
}
|
|
3603
3606
|
async function G() {
|
|
@@ -3605,124 +3608,124 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3605
3608
|
}
|
|
3606
3609
|
const ne = L(!1), K = L(null);
|
|
3607
3610
|
function Ne() {
|
|
3608
|
-
var
|
|
3609
|
-
(
|
|
3611
|
+
var A;
|
|
3612
|
+
(A = K.value) == null || A.reset(), ne.value = !0;
|
|
3610
3613
|
}
|
|
3611
3614
|
async function tt() {
|
|
3612
|
-
var
|
|
3613
|
-
(
|
|
3615
|
+
var A;
|
|
3616
|
+
(A = K.value) != null && A.stagedCount || (ne.value = !1), await v();
|
|
3614
3617
|
}
|
|
3615
|
-
return (
|
|
3618
|
+
return (A, R) => {
|
|
3616
3619
|
const j = M("FmButton"), se = M("FmSearch"), pe = M("FmButtonGroup"), fe = M("FmDialog");
|
|
3617
|
-
return P(),
|
|
3618
|
-
h("div",
|
|
3619
|
-
h("h1",
|
|
3620
|
-
h("div",
|
|
3620
|
+
return P(), T("div", hs, [
|
|
3621
|
+
h("div", bs, [
|
|
3622
|
+
h("h1", ys, k(O(n)("media.title")), 1),
|
|
3623
|
+
h("div", ws, [
|
|
3621
3624
|
N(j, {
|
|
3622
|
-
label:
|
|
3625
|
+
label: O(n)("media.library.testPickerButton"),
|
|
3623
3626
|
variant: "tertiary",
|
|
3624
|
-
onClick:
|
|
3627
|
+
onClick: R[0] || (R[0] = (z) => s.value = !0)
|
|
3625
3628
|
}, null, 8, ["label"]),
|
|
3626
3629
|
N(j, {
|
|
3627
|
-
label:
|
|
3630
|
+
label: O(n)("media.library.uploadButton"),
|
|
3628
3631
|
"prepend-icon": "add",
|
|
3629
3632
|
variant: "primary",
|
|
3630
3633
|
onClick: Ne
|
|
3631
3634
|
}, null, 8, ["label"])
|
|
3632
3635
|
])
|
|
3633
3636
|
]),
|
|
3634
|
-
h("div",
|
|
3637
|
+
h("div", vs, [
|
|
3635
3638
|
N(se, {
|
|
3636
3639
|
modelValue: u.value,
|
|
3637
|
-
"onUpdate:modelValue":
|
|
3638
|
-
placeholder:
|
|
3640
|
+
"onUpdate:modelValue": R[1] || (R[1] = (z) => u.value = z),
|
|
3641
|
+
placeholder: O(n)("media.library.searchPlaceholder"),
|
|
3639
3642
|
class: "max-w-[280px]"
|
|
3640
3643
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
3641
|
-
f.value.length ? (P(), Q(
|
|
3644
|
+
f.value.length ? (P(), Q(O(wn), {
|
|
3642
3645
|
key: 0,
|
|
3643
3646
|
modelValue: p.value,
|
|
3644
|
-
"onUpdate:modelValue":
|
|
3647
|
+
"onUpdate:modelValue": R[2] || (R[2] = (z) => p.value = z),
|
|
3645
3648
|
tags: f.value
|
|
3646
3649
|
}, null, 8, ["modelValue", "tags"])) : H("", !0),
|
|
3647
|
-
h("div",
|
|
3648
|
-
h("div",
|
|
3649
|
-
x.value.size > 0 ? (P(),
|
|
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))
|
|
3650
3653
|
]),
|
|
3651
3654
|
N(j, {
|
|
3652
|
-
label:
|
|
3655
|
+
label: O(n)("media.library.selectAllButton"),
|
|
3653
3656
|
variant: "tertiary",
|
|
3654
3657
|
size: "md",
|
|
3655
3658
|
onClick: de
|
|
3656
3659
|
}, null, 8, ["label"]),
|
|
3657
3660
|
N(pe, {
|
|
3658
3661
|
modelValue: U.value,
|
|
3659
|
-
"onUpdate:modelValue":
|
|
3662
|
+
"onUpdate:modelValue": R[3] || (R[3] = (z) => U.value = z),
|
|
3660
3663
|
items: y
|
|
3661
3664
|
}, null, 8, ["modelValue"])
|
|
3662
3665
|
])
|
|
3663
3666
|
]),
|
|
3664
|
-
N(
|
|
3667
|
+
N(O(yn), {
|
|
3665
3668
|
assets: d.value,
|
|
3666
3669
|
loading: b.value,
|
|
3667
3670
|
view: c.value,
|
|
3668
3671
|
selectable: "",
|
|
3669
3672
|
"selected-ids": x.value,
|
|
3670
3673
|
onOpen: re,
|
|
3671
|
-
onToggle:
|
|
3672
|
-
onDelete:
|
|
3674
|
+
onToggle: B,
|
|
3675
|
+
onDelete: Y
|
|
3673
3676
|
}, null, 8, ["assets", "loading", "view", "selected-ids"]),
|
|
3674
|
-
x.value.size > 0 ? (P(),
|
|
3675
|
-
h("span",
|
|
3677
|
+
x.value.size > 0 ? (P(), T("div", Ps, [
|
|
3678
|
+
h("span", Os, k(O(n)("media.library.selectedCount", { count: x.value.size })), 1),
|
|
3676
3679
|
N(j, {
|
|
3677
|
-
label:
|
|
3680
|
+
label: O(n)("media.library.cancelButton"),
|
|
3678
3681
|
variant: "tertiary",
|
|
3679
3682
|
size: "md",
|
|
3680
|
-
onClick:
|
|
3683
|
+
onClick: C
|
|
3681
3684
|
}, null, 8, ["label"]),
|
|
3682
3685
|
N(j, {
|
|
3683
|
-
label:
|
|
3686
|
+
label: O(n)("media.library.deleteSelectedButton"),
|
|
3684
3687
|
variant: "destructive",
|
|
3685
3688
|
size: "md",
|
|
3686
3689
|
"prepend-icon": "delete",
|
|
3687
3690
|
onClick: oe
|
|
3688
3691
|
}, null, 8, ["label"])
|
|
3689
3692
|
])) : H("", !0),
|
|
3690
|
-
N(
|
|
3693
|
+
N(O(gs), {
|
|
3691
3694
|
asset: F.value,
|
|
3692
3695
|
"business-id": a.value,
|
|
3693
|
-
onClose:
|
|
3696
|
+
onClose: R[4] || (R[4] = (z) => F.value = null),
|
|
3694
3697
|
onRenamed: ke,
|
|
3695
3698
|
onDeleted: G
|
|
3696
3699
|
}, null, 8, ["asset", "business-id"]),
|
|
3697
|
-
N(
|
|
3700
|
+
N(O(Xr), {
|
|
3698
3701
|
open: s.value,
|
|
3699
|
-
"onUpdate:open":
|
|
3702
|
+
"onUpdate:open": R[5] || (R[5] = (z) => s.value = z),
|
|
3700
3703
|
"business-id": a.value,
|
|
3701
3704
|
"restaurant-id": o.value,
|
|
3702
3705
|
onSelect: i
|
|
3703
3706
|
}, null, 8, ["open", "business-id", "restaurant-id"]),
|
|
3704
3707
|
N(fe, {
|
|
3705
3708
|
modelValue: ne.value,
|
|
3706
|
-
"onUpdate:modelValue":
|
|
3709
|
+
"onUpdate:modelValue": R[9] || (R[9] = (z) => ne.value = z),
|
|
3707
3710
|
"max-width": 480
|
|
3708
3711
|
}, {
|
|
3709
3712
|
"dialog-header": ae(() => [
|
|
3710
|
-
h("div", null, k(
|
|
3713
|
+
h("div", null, k(O(n)("media.library.uploadDialogTitle")), 1)
|
|
3711
3714
|
]),
|
|
3712
3715
|
"dialog-footer": ae(() => {
|
|
3713
3716
|
var z, D;
|
|
3714
3717
|
return [
|
|
3715
3718
|
h("div", Rs, [
|
|
3716
3719
|
N(j, {
|
|
3717
|
-
label:
|
|
3720
|
+
label: O(n)("media.library.cancelButton"),
|
|
3718
3721
|
variant: "tertiary",
|
|
3719
|
-
onClick:
|
|
3722
|
+
onClick: R[7] || (R[7] = (J) => ne.value = !1)
|
|
3720
3723
|
}, null, 8, ["label"]),
|
|
3721
3724
|
N(j, {
|
|
3722
|
-
label:
|
|
3725
|
+
label: O(n)("media.library.uploadSubmitButton", { count: ((z = K.value) == null ? void 0 : z.stagedCount) ?? 0 }),
|
|
3723
3726
|
variant: "primary",
|
|
3724
3727
|
disabled: !((D = K.value) != null && D.stagedCount) || K.value.uploading,
|
|
3725
|
-
onClick:
|
|
3728
|
+
onClick: R[8] || (R[8] = (J) => {
|
|
3726
3729
|
var me;
|
|
3727
3730
|
return (me = K.value) == null ? void 0 : me.upload();
|
|
3728
3731
|
})
|
|
@@ -3731,13 +3734,13 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3731
3734
|
];
|
|
3732
3735
|
}),
|
|
3733
3736
|
default: ae(() => [
|
|
3734
|
-
N(
|
|
3737
|
+
N(O(vn), {
|
|
3735
3738
|
ref_key: "uploadPanelRef",
|
|
3736
3739
|
ref: K,
|
|
3737
3740
|
"business-id": a.value,
|
|
3738
3741
|
"restaurant-id": o.value,
|
|
3739
3742
|
"available-tags": f.value,
|
|
3740
|
-
onTagCreated:
|
|
3743
|
+
onTagCreated: R[6] || (R[6] = (z) => f.value.push(z)),
|
|
3741
3744
|
onUploaded: tt
|
|
3742
3745
|
}, null, 8, ["business-id", "restaurant-id", "available-tags"])
|
|
3743
3746
|
]),
|
|
@@ -3748,5 +3751,5 @@ const Pr = { class: "flex flex-wrap items-center gap-8" }, Rr = {
|
|
|
3748
3751
|
}
|
|
3749
3752
|
});
|
|
3750
3753
|
export {
|
|
3751
|
-
|
|
3754
|
+
Bs as default
|
|
3752
3755
|
};
|