UNPKG

yk-element-components-v2

Version:

1,524 lines (1,523 loc) 63.8 kB
function pe(t, e) { return function() { return t.apply(e, arguments); }; } const { toString: me } = Object.prototype, { getPrototypeOf: Q } = Object, Z = ((t) => (e) => { const i = me.call(e); return t[i] || (t[i] = i.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), E = (t) => (t = t.toLowerCase(), (e) => Z(e) === t), I = (t) => (e) => typeof e === t, { isArray: _ } = Array, R = I("undefined"); function ke(t) { return t !== null && !R(t) && t.constructor !== null && !R(t.constructor) && U(t.constructor.isBuffer) && t.constructor.isBuffer(t); } const ge = E("ArrayBuffer"); function De(t) { let e; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ge(t.buffer), e; } const Pe = I("string"), U = I("function"), Ae = I("number"), Y = (t) => t !== null && typeof t == "object", He = (t) => t === !0 || t === !1, B = (t) => { if (Z(t) !== "object") return !1; const e = Q(t); return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t); }, Ie = E("Date"), je = E("File"), Je = E("Blob"), Me = E("FileList"), We = (t) => Y(t) && U(t.pipe), qe = (t) => { const e = "[object FormData]"; return t && (typeof FormData == "function" && t instanceof FormData || me.call(t) === e || U(t.toString) && t.toString() === e); }, Ve = E("URLSearchParams"), Ke = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function T(t, e, { allOwnKeys: i = !1 } = {}) { if (t === null || typeof t > "u") return; let s, r; if (typeof t != "object" && (t = [t]), _(t)) for (s = 0, r = t.length; s < r; s++) e.call(null, t[s], s, t); else { const o = i ? Object.getOwnPropertyNames(t) : Object.keys(t), n = o.length; let c; for (s = 0; s < n; s++) c = o[s], e.call(null, t[c], c, t); } } function ye(t, e) { e = e.toLowerCase(); const i = Object.keys(t); let s = i.length, r; for (; s-- > 0; ) if (r = i[s], e === r.toLowerCase()) return r; return null; } const be = typeof self > "u" ? typeof global > "u" ? globalThis : global : self, we = (t) => !R(t) && t !== be; function K() { const { caseless: t } = we(this) && this || {}, e = {}, i = (s, r) => { const o = t && ye(e, r) || r; B(e[o]) && B(s) ? e[o] = K(e[o], s) : B(s) ? e[o] = K({}, s) : _(s) ? e[o] = s.slice() : e[o] = s; }; for (let s = 0, r = arguments.length; s < r; s++) arguments[s] && T(arguments[s], i); return e; } const Xe = (t, e, i, { allOwnKeys: s } = {}) => (T(e, (r, o) => { i && U(r) ? t[o] = pe(r, i) : t[o] = r; }, { allOwnKeys: s }), t), Ge = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Qe = (t, e, i, s) => { t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), i && Object.assign(t.prototype, i); }, Ze = (t, e, i, s) => { let r, o, n; const c = {}; if (e = e || {}, t == null) return e; do { for (r = Object.getOwnPropertyNames(t), o = r.length; o-- > 0; ) n = r[o], (!s || s(n, t, e)) && !c[n] && (e[n] = t[n], c[n] = !0); t = i !== !1 && Q(t); } while (t && (!i || i(t, e)) && t !== Object.prototype); return e; }, Ye = (t, e, i) => { t = String(t), (i === void 0 || i > t.length) && (i = t.length), i -= e.length; const s = t.indexOf(e, i); return s !== -1 && s === i; }, $e = (t) => { if (!t) return null; if (_(t)) return t; let e = t.length; if (!Ae(e)) return null; const i = new Array(e); for (; e-- > 0; ) i[e] = t[e]; return i; }, et = ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Q(Uint8Array)), tt = (t, e) => { const s = (t && t[Symbol.iterator]).call(t); let r; for (; (r = s.next()) && !r.done; ) { const o = r.value; e.call(t, o[0], o[1]); } }, it = (t, e) => { let i; const s = []; for (; (i = t.exec(e)) !== null; ) s.push(i); return s; }, st = E("HTMLFormElement"), rt = (t) => t.toLowerCase().replace( /[_-\s]([a-z\d])(\w*)/g, function(i, s, r) { return s.toUpperCase() + r; } ), se = (({ hasOwnProperty: t }) => (e, i) => t.call(e, i))(Object.prototype), nt = E("RegExp"), ve = (t, e) => { const i = Object.getOwnPropertyDescriptors(t), s = {}; T(i, (r, o) => { e(r, o, t) !== !1 && (s[o] = r); }), Object.defineProperties(t, s); }, ot = (t) => { ve(t, (e, i) => { if (U(t) && ["arguments", "caller", "callee"].indexOf(i) !== -1) return !1; const s = t[i]; if (!!U(s)) { if (e.enumerable = !1, "writable" in e) { e.writable = !1; return; } e.set || (e.set = () => { throw Error("Can not rewrite read-only method '" + i + "'"); }); } }); }, at = (t, e) => { const i = {}, s = (r) => { r.forEach((o) => { i[o] = !0; }); }; return _(t) ? s(t) : s(String(t).split(e)), i; }, lt = () => { }, ct = (t, e) => (t = +t, Number.isFinite(t) ? t : e), ut = (t) => { const e = new Array(10), i = (s, r) => { if (Y(s)) { if (e.indexOf(s) >= 0) return; if (!("toJSON" in s)) { e[r] = s; const o = _(s) ? [] : {}; return T(s, (n, c) => { const u = i(n, r + 1); !R(u) && (o[c] = u); }), e[r] = void 0, o; } } return s; }; return i(t, 0); }, a = { isArray: _, isArrayBuffer: ge, isBuffer: ke, isFormData: qe, isArrayBufferView: De, isString: Pe, isNumber: Ae, isBoolean: He, isObject: Y, isPlainObject: B, isUndefined: R, isDate: Ie, isFile: je, isBlob: Je, isRegExp: nt, isFunction: U, isStream: We, isURLSearchParams: Ve, isTypedArray: et, isFileList: Me, forEach: T, merge: K, extend: Xe, trim: Ke, stripBOM: Ge, inherits: Qe, toFlatObject: Ze, kindOf: Z, kindOfTest: E, endsWith: Ye, toArray: $e, forEachEntry: tt, matchAll: it, isHTMLForm: st, hasOwnProperty: se, hasOwnProp: se, reduceDescriptors: ve, freezeMethods: ot, toObjectSet: at, toCamelCase: rt, noop: lt, toFiniteNumber: ct, findKey: ye, global: be, isContextDefined: we, toJSONObject: ut }; function m(t, e, i, s, r) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), i && (this.config = i), s && (this.request = s), r && (this.response = r); } a.inherits(m, Error, { toJSON: function() { return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: a.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); const Se = m.prototype, Ee = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" ].forEach((t) => { Ee[t] = { value: t }; }); Object.defineProperties(m, Ee); Object.defineProperty(Se, "isAxiosError", { value: !0 }); m.from = (t, e, i, s, r, o) => { const n = Object.create(Se); return a.toFlatObject(t, n, function(u) { return u !== Error.prototype; }, (c) => c !== "isAxiosError"), m.call(n, t.message, e, i, s, r), n.cause = t, n.name = t.name, o && Object.assign(n, o), n; }; var dt = typeof self == "object" ? self.FormData : window.FormData; const ht = dt; function X(t) { return a.isPlainObject(t) || a.isArray(t); } function xe(t) { return a.endsWith(t, "[]") ? t.slice(0, -2) : t; } function re(t, e, i) { return t ? t.concat(e).map(function(r, o) { return r = xe(r), !i && o ? "[" + r + "]" : r; }).join(i ? "." : "") : e; } function ft(t) { return a.isArray(t) && !t.some(X); } const pt = a.toFlatObject(a, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function mt(t) { return t && a.isFunction(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]; } function j(t, e, i) { if (!a.isObject(t)) throw new TypeError("target must be an object"); e = e || new (ht || FormData)(), i = a.toFlatObject(i, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(p, w) { return !a.isUndefined(w[p]); }); const s = i.metaTokens, r = i.visitor || d, o = i.dots, n = i.indexes, u = (i.Blob || typeof Blob < "u" && Blob) && mt(e); if (!a.isFunction(r)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (a.isDate(h)) return h.toISOString(); if (!u && a.isBlob(h)) throw new m("Blob is not supported. Use a Buffer instead."); return a.isArrayBuffer(h) || a.isTypedArray(h) ? u && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function d(h, p, w) { let b = h; if (h && !w && typeof h == "object") { if (a.endsWith(p, "{}")) p = s ? p : p.slice(0, -2), h = JSON.stringify(h); else if (a.isArray(h) && ft(h) || a.isFileList(h) || a.endsWith(p, "[]") && (b = a.toArray(h))) return p = xe(p), b.forEach(function(N, ze) { !(a.isUndefined(N) || N === null) && e.append( n === !0 ? re([p], ze, o) : n === null ? p : p + "[]", l(N) ); }), !1; } return X(h) ? !0 : (e.append(re(w, p, o), l(h)), !1); } const f = [], g = Object.assign(pt, { defaultVisitor: d, convertValue: l, isVisitable: X }); function A(h, p) { if (!a.isUndefined(h)) { if (f.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); f.push(h), a.forEach(h, function(b, C) { (!(a.isUndefined(b) || b === null) && r.call( e, b, a.isString(C) ? C.trim() : C, p, g )) === !0 && A(b, p ? p.concat(C) : [C]); }), f.pop(); } } if (!a.isObject(t)) throw new TypeError("data must be an object"); return A(t), e; } function ne(t) { const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(s) { return e[s]; }); } function $(t, e) { this._pairs = [], t && j(t, this, e); } const Ue = $.prototype; Ue.append = function(e, i) { this._pairs.push([e, i]); }; Ue.toString = function(e) { const i = e ? function(s) { return e.call(this, s, ne); } : ne; return this._pairs.map(function(r) { return i(r[0]) + "=" + i(r[1]); }, "").join("&"); }; function gt(t) { return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function Ce(t, e, i) { if (!e) return t; const s = i && i.encode || gt, r = i && i.serialize; let o; if (r ? o = r(e, i) : o = a.isURLSearchParams(e) ? e.toString() : new $(e, i).toString(s), o) { const n = t.indexOf("#"); n !== -1 && (t = t.slice(0, n)), t += (t.indexOf("?") === -1 ? "?" : "&") + o; } return t; } class At { constructor() { this.handlers = []; } use(e, i, s) { return this.handlers.push({ fulfilled: e, rejected: i, synchronous: s ? s.synchronous : !1, runWhen: s ? s.runWhen : null }), this.handlers.length - 1; } eject(e) { this.handlers[e] && (this.handlers[e] = null); } clear() { this.handlers && (this.handlers = []); } forEach(e) { a.forEach(this.handlers, function(s) { s !== null && e(s); }); } } const oe = At, _e = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, yt = typeof URLSearchParams < "u" ? URLSearchParams : $, bt = FormData, wt = (() => { let t; return typeof navigator < "u" && ((t = navigator.product) === "ReactNative" || t === "NativeScript" || t === "NS") ? !1 : typeof window < "u" && typeof document < "u"; })(), v = { isBrowser: !0, classes: { URLSearchParams: yt, FormData: bt, Blob }, isStandardBrowserEnv: wt, protocols: ["http", "https", "file", "blob", "url", "data"] }; function vt(t, e) { return j(t, new v.classes.URLSearchParams(), Object.assign({ visitor: function(i, s, r, o) { return v.isNode && a.isBuffer(i) ? (this.append(s, i.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, e)); } function St(t) { return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]); } function Et(t) { const e = {}, i = Object.keys(t); let s; const r = i.length; let o; for (s = 0; s < r; s++) o = i[s], e[o] = t[o]; return e; } function Oe(t) { function e(i, s, r, o) { let n = i[o++]; const c = Number.isFinite(+n), u = o >= i.length; return n = !n && a.isArray(r) ? r.length : n, u ? (a.hasOwnProp(r, n) ? r[n] = [r[n], s] : r[n] = s, !c) : ((!r[n] || !a.isObject(r[n])) && (r[n] = []), e(i, s, r[n], o) && a.isArray(r[n]) && (r[n] = Et(r[n])), !c); } if (a.isFormData(t) && a.isFunction(t.entries)) { const i = {}; return a.forEachEntry(t, (s, r) => { e(St(s), r, i, 0); }), i; } return null; } const xt = { "Content-Type": void 0 }; function Ut(t, e, i) { if (a.isString(t)) try { return (e || JSON.parse)(t), a.trim(t); } catch (s) { if (s.name !== "SyntaxError") throw s; } return (i || JSON.stringify)(t); } const J = { transitional: _e, adapter: ["xhr", "http"], transformRequest: [function(e, i) { const s = i.getContentType() || "", r = s.indexOf("application/json") > -1, o = a.isObject(e); if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e)) return r && r ? JSON.stringify(Oe(e)) : e; if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e)) return e; if (a.isArrayBufferView(e)) return e.buffer; if (a.isURLSearchParams(e)) return i.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let c; if (o) { if (s.indexOf("application/x-www-form-urlencoded") > -1) return vt(e, this.formSerializer).toString(); if ((c = a.isFileList(e)) || s.indexOf("multipart/form-data") > -1) { const u = this.env && this.env.FormData; return j( c ? { "files[]": e } : e, u && new u(), this.formSerializer ); } } return o || r ? (i.setContentType("application/json", !1), Ut(e)) : e; }], transformResponse: [function(e) { const i = this.transitional || J.transitional, s = i && i.forcedJSONParsing, r = this.responseType === "json"; if (e && a.isString(e) && (s && !this.responseType || r)) { const n = !(i && i.silentJSONParsing) && r; try { return JSON.parse(e); } catch (c) { if (n) throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c; } } return e; }], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: v.classes.FormData, Blob: v.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*" } } }; a.forEach(["delete", "get", "head"], function(e) { J.headers[e] = {}; }); a.forEach(["post", "put", "patch"], function(e) { J.headers[e] = a.merge(xt); }); const ee = J, Ct = a.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), _t = (t) => { const e = {}; let i, s, r; return t && t.split(` `).forEach(function(n) { r = n.indexOf(":"), i = n.substring(0, r).trim().toLowerCase(), s = n.substring(r + 1).trim(), !(!i || e[i] && Ct[i]) && (i === "set-cookie" ? e[i] ? e[i].push(s) : e[i] = [s] : e[i] = e[i] ? e[i] + ", " + s : s); }), e; }, ae = Symbol("internals"); function O(t) { return t && String(t).trim().toLowerCase(); } function z(t) { return t === !1 || t == null ? t : a.isArray(t) ? t.map(z) : String(t); } function Ot(t) { const e = /* @__PURE__ */ Object.create(null), i = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let s; for (; s = i.exec(t); ) e[s[1]] = s[2]; return e; } function Rt(t) { return /^[-_a-zA-Z]+$/.test(t.trim()); } function le(t, e, i, s) { if (a.isFunction(s)) return s.call(this, e, i); if (!!a.isString(e)) { if (a.isString(s)) return e.indexOf(s) !== -1; if (a.isRegExp(s)) return s.test(e); } } function Ft(t) { return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, i, s) => i.toUpperCase() + s); } function Tt(t, e) { const i = a.toCamelCase(" " + e); ["get", "set", "has"].forEach((s) => { Object.defineProperty(t, s + i, { value: function(r, o, n) { return this[s].call(this, e, r, o, n); }, configurable: !0 }); }); } class M { constructor(e) { e && this.set(e); } set(e, i, s) { const r = this; function o(c, u, l) { const d = O(u); if (!d) throw new Error("header name must be a non-empty string"); const f = a.findKey(r, d); (!f || r[f] === void 0 || l === !0 || l === void 0 && r[f] !== !1) && (r[f || u] = z(c)); } const n = (c, u) => a.forEach(c, (l, d) => o(l, d, u)); return a.isPlainObject(e) || e instanceof this.constructor ? n(e, i) : a.isString(e) && (e = e.trim()) && !Rt(e) ? n(_t(e), i) : e != null && o(i, e, s), this; } get(e, i) { if (e = O(e), e) { const s = a.findKey(this, e); if (s) { const r = this[s]; if (!i) return r; if (i === !0) return Ot(r); if (a.isFunction(i)) return i.call(this, r, s); if (a.isRegExp(i)) return i.exec(r); throw new TypeError("parser must be boolean|regexp|function"); } } } has(e, i) { if (e = O(e), e) { const s = a.findKey(this, e); return !!(s && (!i || le(this, this[s], s, i))); } return !1; } delete(e, i) { const s = this; let r = !1; function o(n) { if (n = O(n), n) { const c = a.findKey(s, n); c && (!i || le(s, s[c], c, i)) && (delete s[c], r = !0); } } return a.isArray(e) ? e.forEach(o) : o(e), r; } clear() { return Object.keys(this).forEach(this.delete.bind(this)); } normalize(e) { const i = this, s = {}; return a.forEach(this, (r, o) => { const n = a.findKey(s, o); if (n) { i[n] = z(r), delete i[o]; return; } const c = e ? Ft(o) : String(o).trim(); c !== o && delete i[o], i[c] = z(r), s[c] = !0; }), this; } concat(...e) { return this.constructor.concat(this, ...e); } toJSON(e) { const i = /* @__PURE__ */ Object.create(null); return a.forEach(this, (s, r) => { s != null && s !== !1 && (i[r] = e && a.isArray(s) ? s.join(", ") : s); }), i; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([e, i]) => e + ": " + i).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(e) { return e instanceof this ? e : new this(e); } static concat(e, ...i) { const s = new this(e); return i.forEach((r) => s.set(r)), s; } static accessor(e) { const s = (this[ae] = this[ae] = { accessors: {} }).accessors, r = this.prototype; function o(n) { const c = O(n); s[c] || (Tt(r, n), s[c] = !0); } return a.isArray(e) ? e.forEach(o) : o(e), this; } } M.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent"]); a.freezeMethods(M.prototype); a.freezeMethods(M); const S = M; function q(t, e) { const i = this || ee, s = e || i, r = S.from(s.headers); let o = s.data; return a.forEach(t, function(c) { o = c.call(i, o, r.normalize(), e ? e.status : void 0); }), r.normalize(), o; } function Re(t) { return !!(t && t.__CANCEL__); } function L(t, e, i) { m.call(this, t == null ? "canceled" : t, m.ERR_CANCELED, e, i), this.name = "CanceledError"; } a.inherits(L, m, { __CANCEL__: !0 }); const Lt = null; function Nt(t, e, i) { const s = i.config.validateStatus; !i.status || !s || s(i.status) ? t(i) : e(new m( "Request failed with status code " + i.status, [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(i.status / 100) - 4], i.config, i.request, i )); } const Bt = v.isStandardBrowserEnv ? function() { return { write: function(i, s, r, o, n, c) { const u = []; u.push(i + "=" + encodeURIComponent(s)), a.isNumber(r) && u.push("expires=" + new Date(r).toGMTString()), a.isString(o) && u.push("path=" + o), a.isString(n) && u.push("domain=" + n), c === !0 && u.push("secure"), document.cookie = u.join("; "); }, read: function(i) { const s = document.cookie.match(new RegExp("(^|;\\s*)(" + i + ")=([^;]*)")); return s ? decodeURIComponent(s[3]) : null; }, remove: function(i) { this.write(i, "", Date.now() - 864e5); } }; }() : function() { return { write: function() { }, read: function() { return null; }, remove: function() { } }; }(); function zt(t) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t); } function kt(t, e) { return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t; } function Fe(t, e) { return t && !zt(e) ? kt(t, e) : e; } const Dt = v.isStandardBrowserEnv ? function() { const e = /(msie|trident)/i.test(navigator.userAgent), i = document.createElement("a"); let s; function r(o) { let n = o; return e && (i.setAttribute("href", n), n = i.href), i.setAttribute("href", n), { href: i.href, protocol: i.protocol ? i.protocol.replace(/:$/, "") : "", host: i.host, search: i.search ? i.search.replace(/^\?/, "") : "", hash: i.hash ? i.hash.replace(/^#/, "") : "", hostname: i.hostname, port: i.port, pathname: i.pathname.charAt(0) === "/" ? i.pathname : "/" + i.pathname }; } return s = r(window.location.href), function(n) { const c = a.isString(n) ? r(n) : n; return c.protocol === s.protocol && c.host === s.host; }; }() : function() { return function() { return !0; }; }(); function Pt(t) { const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t); return e && e[1] || ""; } function Ht(t, e) { t = t || 10; const i = new Array(t), s = new Array(t); let r = 0, o = 0, n; return e = e !== void 0 ? e : 1e3, function(u) { const l = Date.now(), d = s[o]; n || (n = l), i[r] = u, s[r] = l; let f = o, g = 0; for (; f !== r; ) g += i[f++], f = f % t; if (r = (r + 1) % t, r === o && (o = (o + 1) % t), l - n < e) return; const A = d && l - d; return A ? Math.round(g * 1e3 / A) : void 0; }; } function ce(t, e) { let i = 0; const s = Ht(50, 250); return (r) => { const o = r.loaded, n = r.lengthComputable ? r.total : void 0, c = o - i, u = s(c), l = o <= n; i = o; const d = { loaded: o, total: n, progress: n ? o / n : void 0, bytes: c, rate: u || void 0, estimated: u && n && l ? (n - o) / u : void 0, event: r }; d[e ? "download" : "upload"] = !0, t(d); }; } const It = typeof XMLHttpRequest < "u", jt = It && function(t) { return new Promise(function(i, s) { let r = t.data; const o = S.from(t.headers).normalize(), n = t.responseType; let c; function u() { t.cancelToken && t.cancelToken.unsubscribe(c), t.signal && t.signal.removeEventListener("abort", c); } a.isFormData(r) && v.isStandardBrowserEnv && o.setContentType(!1); let l = new XMLHttpRequest(); if (t.auth) { const A = t.auth.username || "", h = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : ""; o.set("Authorization", "Basic " + btoa(A + ":" + h)); } const d = Fe(t.baseURL, t.url); l.open(t.method.toUpperCase(), Ce(d, t.params, t.paramsSerializer), !0), l.timeout = t.timeout; function f() { if (!l) return; const A = S.from( "getAllResponseHeaders" in l && l.getAllResponseHeaders() ), p = { data: !n || n === "text" || n === "json" ? l.responseText : l.response, status: l.status, statusText: l.statusText, headers: A, config: t, request: l }; Nt(function(b) { i(b), u(); }, function(b) { s(b), u(); }, p), l = null; } if ("onloadend" in l ? l.onloadend = f : l.onreadystatechange = function() { !l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(f); }, l.onabort = function() { !l || (s(new m("Request aborted", m.ECONNABORTED, t, l)), l = null); }, l.onerror = function() { s(new m("Network Error", m.ERR_NETWORK, t, l)), l = null; }, l.ontimeout = function() { let h = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded"; const p = t.transitional || _e; t.timeoutErrorMessage && (h = t.timeoutErrorMessage), s(new m( h, p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED, t, l )), l = null; }, v.isStandardBrowserEnv) { const A = (t.withCredentials || Dt(d)) && t.xsrfCookieName && Bt.read(t.xsrfCookieName); A && o.set(t.xsrfHeaderName, A); } r === void 0 && o.setContentType(null), "setRequestHeader" in l && a.forEach(o.toJSON(), function(h, p) { l.setRequestHeader(p, h); }), a.isUndefined(t.withCredentials) || (l.withCredentials = !!t.withCredentials), n && n !== "json" && (l.responseType = t.responseType), typeof t.onDownloadProgress == "function" && l.addEventListener("progress", ce(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", ce(t.onUploadProgress)), (t.cancelToken || t.signal) && (c = (A) => { !l || (s(!A || A.type ? new L(null, t, l) : A), l.abort(), l = null); }, t.cancelToken && t.cancelToken.subscribe(c), t.signal && (t.signal.aborted ? c() : t.signal.addEventListener("abort", c))); const g = Pt(d); if (g && v.protocols.indexOf(g) === -1) { s(new m("Unsupported protocol " + g + ":", m.ERR_BAD_REQUEST, t)); return; } l.send(r || null); }); }, k = { http: Lt, xhr: jt }; a.forEach(k, (t, e) => { if (t) { try { Object.defineProperty(t, "name", { value: e }); } catch { } Object.defineProperty(t, "adapterName", { value: e }); } }); const Jt = { getAdapter: (t) => { t = a.isArray(t) ? t : [t]; const { length: e } = t; let i, s; for (let r = 0; r < e && (i = t[r], !(s = a.isString(i) ? k[i.toLowerCase()] : i)); r++) ; if (!s) throw s === !1 ? new m( `Adapter ${i} is not supported by the environment`, "ERR_NOT_SUPPORT" ) : new Error( a.hasOwnProp(k, i) ? `Adapter '${i}' is not available in the build` : `Unknown adapter '${i}'` ); if (!a.isFunction(s)) throw new TypeError("adapter is not a function"); return s; }, adapters: k }; function V(t) { if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new L(); } function ue(t) { return V(t), t.headers = S.from(t.headers), t.data = q.call( t, t.transformRequest ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Jt.getAdapter(t.adapter || ee.adapter)(t).then(function(s) { return V(t), s.data = q.call( t, t.transformResponse, s ), s.headers = S.from(s.headers), s; }, function(s) { return Re(s) || (V(t), s && s.response && (s.response.data = q.call( t, t.transformResponse, s.response ), s.response.headers = S.from(s.response.headers))), Promise.reject(s); }); } const de = (t) => t instanceof S ? t.toJSON() : t; function F(t, e) { e = e || {}; const i = {}; function s(l, d, f) { return a.isPlainObject(l) && a.isPlainObject(d) ? a.merge.call({ caseless: f }, l, d) : a.isPlainObject(d) ? a.merge({}, d) : a.isArray(d) ? d.slice() : d; } function r(l, d, f) { if (a.isUndefined(d)) { if (!a.isUndefined(l)) return s(void 0, l, f); } else return s(l, d, f); } function o(l, d) { if (!a.isUndefined(d)) return s(void 0, d); } function n(l, d) { if (a.isUndefined(d)) { if (!a.isUndefined(l)) return s(void 0, l); } else return s(void 0, d); } function c(l, d, f) { if (f in e) return s(l, d); if (f in t) return s(void 0, l); } const u = { url: o, method: o, data: o, baseURL: n, transformRequest: n, transformResponse: n, paramsSerializer: n, timeout: n, timeoutMessage: n, withCredentials: n, adapter: n, responseType: n, xsrfCookieName: n, xsrfHeaderName: n, onUploadProgress: n, onDownloadProgress: n, decompress: n, maxContentLength: n, maxBodyLength: n, beforeRedirect: n, transport: n, httpAgent: n, httpsAgent: n, cancelToken: n, socketPath: n, responseEncoding: n, validateStatus: c, headers: (l, d) => r(de(l), de(d), !0) }; return a.forEach(Object.keys(t).concat(Object.keys(e)), function(d) { const f = u[d] || r, g = f(t[d], e[d], d); a.isUndefined(g) && f !== c || (i[d] = g); }), i; } const Te = "1.2.0", te = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => { te[t] = function(s) { return typeof s === t || "a" + (e < 1 ? "n " : " ") + t; }; }); const he = {}; te.transitional = function(e, i, s) { function r(o, n) { return "[Axios v" + Te + "] Transitional option '" + o + "'" + n + (s ? ". " + s : ""); } return (o, n, c) => { if (e === !1) throw new m( r(n, " has been removed" + (i ? " in " + i : "")), m.ERR_DEPRECATED ); return i && !he[n] && (he[n] = !0, console.warn( r( n, " has been deprecated since v" + i + " and will be removed in the near future" ) )), e ? e(o, n, c) : !0; }; }; function Mt(t, e, i) { if (typeof t != "object") throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE); const s = Object.keys(t); let r = s.length; for (; r-- > 0; ) { const o = s[r], n = e[o]; if (n) { const c = t[o], u = c === void 0 || n(c, o, t); if (u !== !0) throw new m("option " + o + " must be " + u, m.ERR_BAD_OPTION_VALUE); continue; } if (i !== !0) throw new m("Unknown option " + o, m.ERR_BAD_OPTION); } } const G = { assertOptions: Mt, validators: te }, x = G.validators; class P { constructor(e) { this.defaults = e, this.interceptors = { request: new oe(), response: new oe() }; } request(e, i) { typeof e == "string" ? (i = i || {}, i.url = e) : i = e || {}, i = F(this.defaults, i); const { transitional: s, paramsSerializer: r, headers: o } = i; s !== void 0 && G.assertOptions(s, { silentJSONParsing: x.transitional(x.boolean), forcedJSONParsing: x.transitional(x.boolean), clarifyTimeoutError: x.transitional(x.boolean) }, !1), r !== void 0 && G.assertOptions(r, { encode: x.function, serialize: x.function }, !0), i.method = (i.method || this.defaults.method || "get").toLowerCase(); let n; n = o && a.merge( o.common, o[i.method] ), n && a.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (h) => { delete o[h]; } ), i.headers = S.concat(n, o); const c = []; let u = !0; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(i) === !1 || (u = u && p.synchronous, c.unshift(p.fulfilled, p.rejected)); }); const l = []; this.interceptors.response.forEach(function(p) { l.push(p.fulfilled, p.rejected); }); let d, f = 0, g; if (!u) { const h = [ue.bind(this), void 0]; for (h.unshift.apply(h, c), h.push.apply(h, l), g = h.length, d = Promise.resolve(i); f < g; ) d = d.then(h[f++], h[f++]); return d; } g = c.length; let A = i; for (f = 0; f < g; ) { const h = c[f++], p = c[f++]; try { A = h(A); } catch (w) { p.call(this, w); break; } } try { d = ue.call(this, A); } catch (h) { return Promise.reject(h); } for (f = 0, g = l.length; f < g; ) d = d.then(l[f++], l[f++]); return d; } getUri(e) { e = F(this.defaults, e); const i = Fe(e.baseURL, e.url); return Ce(i, e.params, e.paramsSerializer); } } a.forEach(["delete", "get", "head", "options"], function(e) { P.prototype[e] = function(i, s) { return this.request(F(s || {}, { method: e, url: i, data: (s || {}).data })); }; }); a.forEach(["post", "put", "patch"], function(e) { function i(s) { return function(o, n, c) { return this.request(F(c || {}, { method: e, headers: s ? { "Content-Type": "multipart/form-data" } : {}, url: o, data: n })); }; } P.prototype[e] = i(), P.prototype[e + "Form"] = i(!0); }); const D = P; class ie { constructor(e) { if (typeof e != "function") throw new TypeError("executor must be a function."); let i; this.promise = new Promise(function(o) { i = o; }); const s = this; this.promise.then((r) => { if (!s._listeners) return; let o = s._listeners.length; for (; o-- > 0; ) s._listeners[o](r); s._listeners = null; }), this.promise.then = (r) => { let o; const n = new Promise((c) => { s.subscribe(c), o = c; }).then(r); return n.cancel = function() { s.unsubscribe(o); }, n; }, e(function(o, n, c) { s.reason || (s.reason = new L(o, n, c), i(s.reason)); }); } throwIfRequested() { if (this.reason) throw this.reason; } subscribe(e) { if (this.reason) { e(this.reason); return; } this._listeners ? this._listeners.push(e) : this._listeners = [e]; } unsubscribe(e) { if (!this._listeners) return; const i = this._listeners.indexOf(e); i !== -1 && this._listeners.splice(i, 1); } static source() { let e; return { token: new ie(function(r) { e = r; }), cancel: e }; } } const Wt = ie; function qt(t) { return function(i) { return t.apply(null, i); }; } function Vt(t) { return a.isObject(t) && t.isAxiosError === !0; } function Le(t) { const e = new D(t), i = pe(D.prototype.request, e); return a.extend(i, D.prototype, e, { allOwnKeys: !0 }), a.extend(i, e, null, { allOwnKeys: !0 }), i.create = function(r) { return Le(F(t, r)); }, i; } const y = Le(ee); y.Axios = D; y.CanceledError = L; y.CancelToken = Wt; y.isCancel = Re; y.VERSION = Te; y.toFormData = j; y.AxiosError = m; y.Cancel = y.CanceledError; y.all = function(e) { return Promise.all(e); }; y.spread = qt; y.isAxiosError = Vt; y.AxiosHeaders = S; y.formToJSON = (t) => Oe(a.isHTMLForm(t) ? new FormData(t) : t); y.default = y; const H = y; function W(t, e, i, s, r, o, n, c) { var u = typeof t == "function" ? t.options : t; e && (u.render = e, u.staticRenderFns = i, u._compiled = !0), s && (u.functional = !0), o && (u._scopeId = "data-v-" + o); var l; if (n ? (l = function(g) { g = g || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !g && typeof __VUE_SSR_CONTEXT__ < "u" && (g = __VUE_SSR_CONTEXT__), r && r.call(this, g), g && g._registeredComponents && g._registeredComponents.add(n); }, u._ssrRegister = l) : r && (l = c ? function() { r.call( this, (u.functional ? this.parent : this).$root.$options.shadowRoot ); } : r), l) if (u.functional) { u._injectStyles = l; var d = u.render; u.render = function(A, h) { return l.call(h), d(A, h); }; } else { var f = u.beforeCreate; u.beforeCreate = f ? [].concat(f, l) : [l]; } return { exports: t, options: u }; } const Kt = { props: { validateCover: { type: Boolean, default: !1 }, orCropper: { type: Boolean, default: !1 }, value: { type: Array, default() { return []; } }, accept: { type: String, default: ".jpg,.jpeg,.png" }, maxSize: { type: String, default: "300k" }, coverWidth: { type: Number, default: 750 }, coverHeight: { type: Number, default: 422 }, cropBoxResizable: { type: Boolean, default: !1 }, guides: { type: Boolean, default: !1 }, aspectRatio: { type: String, default: "750/422" }, getCoverUploadInfo: Function, uploadService: { type: String, default: "huawei" } }, data() { return { loading: null, fileList: [], uploadImgUrl: "", viewUrl: "", sendContentType: "", sendAuthorization: "", sendXAmzDate: "" }; }, mounted() { this.fileList = this.value; }, methods: { handleSize() { const t = this.maxSize.toLowerCase(); let e = 0; return t.indexOf("k") >= 0 && (e = Number(t.substr(0, t.indexOf("k")))), t.indexOf("m") >= 0 && (e = Number(t.substr(0, t.indexOf("m"))) * 1024), e; }, getPath(t) { let i = new URL(t).pathname; return i.substring(1, i.length); }, handleUploadSuccess(t, e) { this.fileList = [{ path: this.getPath(this.viewUrl), url: this.viewUrl, id: e.file.uid, name: e.file.name }], this.$emit("input", this.fileList), this.loading.close(); }, async handleBeforeUpload(t) { const i = this.accept.replaceAll(".", "").split(","); if (!i.find((u) => t.type.indexOf(u) != -1) && this.accept != "") { let u = ""; return i.forEach((l, d) => { u += d + 1 == i.length ? l : l + "/"; }), this.$message.error(`\u4E0A\u4F20\u89C6\u9891\u53EA\u80FD\u662F ${u} \u683C\u5F0F!`), !1; } const r = this.handleSize(); if (!(t.size / 1024 < r)) return this.$message.error(`\u4E0A\u4F20\u5C01\u9762\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7${this.maxSize}!`), !1; if (this.validateCover) { let u = await this.getSize(t); if (u.width != this.coverWidth || u.height != this.coverHeight) return this.$message.error(`\u4E0A\u4F20\u5C01\u9762\u56FE\u7247\u7684\u5BBD\u9AD8\u5E94\u4E3A${this.coverWidth}*${this.coverHeight}\u50CF\u7D20!`), !1; } const n = t.type.replace("image/", ""), c = await this.getCoverUploadInfo(n, t); if (!c) return !1; this.uploadService === "huawei" ? (this.uploadImgUrl = c.data.signedUrl, this.viewUrl = c.data.viewUrl) : this.uploadService === "huayun" && (this.uploadImgUrl = c.data.viewUrl, this.viewUrl = c.data.viewUrl, this.sendContentType = c.data.contentType, this.sendAuthorization = c.data.amzSignature, this.sendXAmzDate = c.data.amzDate), this.loading = this.$loading({ lock: !0, text: "\u4E0A\u4F20\u4E2D", background: "rgba(0, 0, 0, 0.7)" }); }, handleUploadError() { this.$message({ type: "error", message: "\u5C01\u9762\u4E0A\u4F20\u5931\u8D25" }), this.loading.close(); }, upload(t) { if (this.uploadService === "huayun") { const e = { "Content-Type": this.sendContentType, Authorization: this.sendAuthorization, "x-chinac-date": this.sendXAmzDate }; H.put(this.uploadImgUrl, t.file, { headers: e }).then((i) => { this.handleUploadSuccess(i, t); }).catch(function(i) { console.log(i); }); } else this.uploadService === "huawei" && H.put(this.uploadImgUrl, t.file, { headers: { "Content-Type": t.file.type } }).then((e) => { this.loading.close(), this.handleUploadSuccess(e, t); }); }, async getSize(t) { return new Promise((e, i) => { const s = new FileReader(); s.onload = function(r) { const o = r.target.result, n = document.createElement("img"); n.src = o, n.onload = function() { e({ width: n.width, height: n.height }); }; }, s.readAsDataURL(t); }); } } }; var Xt = function() { var e = this, i = e._self._c; return i("div", { staticClass: "compose_cover_upload_box" }, [i("yk-upload", { ref: "upload", attrs: { action: "#", "show-file-list": !1, "on-success": e.handleUploadSuccess, "before-upload": e.handleBeforeUpload, "on-error": e.handleUploadError, name: "file", "file-list": e.value, accept: e.accept, "or-cropper": e.orCropper, "http-request": e.upload, cropperWidth: e.coverWidth, cropperHeight: e.coverHeight, cropBoxResizable: e.cropBoxResizable, guides: e.guides, aspectRatio: e.aspectRatio } }, [i("div", { staticClass: "cover_upload_button" }, [i("i", { staticClass: "el-icon-picture-outline" })])])], 1); }, Gt = [], Qt = /* @__PURE__ */ W( Kt, Xt, Gt, !1, null, null, null, null ); const Zt = Qt.exports, Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABSCAYAAADD2VOmAAAAAXNSR0IArs4c6QAAAbZJREFUeF7t2jFKQ1EQheEzYGlhp42V7sKNuAFLV2PpBtyIu9DKRjsLS2EkoATB+xLumUyC/KkzeZPvnXnMDQnxsgTCqqZYAJohABBAU8AsJ4EAmgJmOQkE0BQwy0kggKaAWU4CATQFzHISeCiAmXkl6U7S+aCnF0m3EfFo9rxY3t1HWQIz80nSxQac54i43DFgax+VgLkNTESUXfOv62Vmax9l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CYII=", Be = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAP5JREFUWEftltEJwkAMhr84hvuIjiG4gTqGjiA4huJAbmHk4PpS7mwSsVehfTySP1/TP9cIjR9pXJ8ZYJodUNUlsAfuIvL4xiequgLWwFlEnn2tYgdU9QQcgBewE5FrBEJVt8AFWGSAoxUgUd9yYgiiVzxpbErdrHqgIGDuhCf3owk9Ql1rvTmDU+AR9MR2wIMAKdAibIkpGdkEMAQRLZ50zQA1iPxW3ai5J8YFUIFIx2nO3cXdHag4PR2Hiv8nQMFw432CkttHM+GnUfv5GFoKWGJCF5FH2BNruoojgt6caf6O8xrVbiGZwkrWdimNLKDRHPffMFqoljcDNO/AG+KX5CFfO43qAAAAAElFTkSuQmCC"; const $t = { props: { visible: { type: Boolean, default: !1 }, videoUrl: { type: String, default: "" }, videoPoster: { type: String, default: "" } }, computed: { orVisible() { return this.visible; } }, watch: { visible(t) { t && this.getVideoMsg(); } }, data() { return { palyIng: !0, sHeight: 0, sWidth: 0 }; }, methods: { getVideoMsg() { this.$nextTick(() => { var t = document.getElementById("video_upload_video"); t.addEventListener("loadedmetadata", () => { let e = 1200, i = 800, s = e / i, r = t.videoWidth / t.videoHeight; r < s ? (this.sHeight = i, this.sWidth = i * r) : (this.sWidth = e, this.sHeight = e / r); }), t.addEventListener("ended", () => { this.palyIng = !1; }, !1); }); }, close() { this.palyIng = !0, this.$emit("update:visible", !1); }, pause() { var t = document.getElementById("video_upload_video"); t.paused ? (this.palyIng = !0, t.play()) : t.play() && (this.palyIng = !1, t.pause()); } } }; var ei = function() { var e = this, i = e._self._c; return i("el-dialog", { attrs: { "custom-class": "video_upload_box", visible: e.orVisible, "show-close": !1, "append-to-body": "", "destroy-on-close": !0, width: e.sWidth + "px", height: e.sHeight + "px" }, on: { "update:visible": function(s) { e.orVisible = s; } } }, [i("div", { staticClass: "video_pop_box" }, [e.visible ? i("video", { staticStyle: { width: "100%", height: "100%" }, attrs: { id: "video_upload_video", src: e.videoUrl, poster: e.videoPoster, autoplay: "" } }) : e._e(), i("div", { staticClass: "video_operation" }, [e.palyIng ? i("img", { staticClass: "video_recess", attrs: { src: Yt }, on: { click: e.pause } }) : i("img", { staticClass: "video_recess", attrs: { src: Ne }, on: { click: e.pause } }), i("img", { staticClass: "video_close", attrs: { src: Be }, on: { click: e.close } })])])]); }, ti = [], ii = /* @__PURE__ */ W( $t, ei, ti, !1, null, null, null, null ); const si = ii.exports; const ri = { props: { visible: { type: Boolean, default: !1 }, imageUrl: { type: String, default: "" } }, computed: { orVisible() { return this.visible; } }, data() { return { sHeight: 0, sWidth: 0 }; }, watch: { visible(t) { t && this.getImgaeMsg(); } }, mounted() {