vue2-color-picker-gradient
Version:
vue2,颜色选择器,线性(纯色)、渐变选择器,支持角度、多点渐变
1,249 lines (1,248 loc) • 279 kB
JavaScript
import ht from "vue";
var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function ge(M) {
return M && M.__esModule && Object.prototype.hasOwnProperty.call(M, "default") ? M.default : M;
}
var pt = {}, Ut;
function me() {
if (Ut) return pt;
Ut = 1, Object.defineProperty(pt, "__esModule", { value: !0 }), pt.validateAlphaValue = pt.validateColorStops = pt.validateMinMaxValues = void 0;
function M(r, t) {
if (r === t)
throw new Error("The minimum value cannot be equal to the maximum value.");
if (r > t)
throw new Error("The minimum value must be less than the maximum value.");
}
pt.validateMinMaxValues = M;
function y(r) {
if (r.length < 2)
throw new Error("At least two colors must be provided.");
}
pt.validateColorStops = y;
function i(r) {
if (r < 0 || r > 1)
throw new Error("The alpha value must be between 0 and 1.");
}
return pt.validateAlphaValue = i, pt;
}
var $t, Wt;
function _e() {
if (Wt) return $t;
Wt = 1;
const M = me();
function y(t) {
const n = t.toString(16);
return n.length === 1 ? "0" + n : n;
}
function i(t) {
const n = Math.floor(t.r * t.a), o = Math.floor(t.g * t.a), a = Math.floor(t.b * t.a);
return `#${y(n)}${y(o)}${y(a)}`;
}
class r {
constructor(n, o, a, e = 1) {
M.validateAlphaValue(e), this.r = n, this.g = o, this.b = a, this.a = e;
}
toRGBString() {
return `rgb(${Math.floor(this.r * this.a)},${Math.floor(this.g * this.a)},${Math.floor(this.b * this.a)})`;
}
toRGBAString() {
return `rgba(${this.r},${this.g},${this.b},${this.a})`;
}
toHexString() {
return i(this);
}
}
return $t = r, $t;
}
var It, Xt;
function we() {
if (Xt) return It;
Xt = 1;
const M = _e(), y = me();
function i(t, n) {
const o = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
if (o)
return new M(parseInt(o[1], 16), parseInt(o[2], 16), parseInt(o[3], 16), n);
throw new Error(`${t} is not a valid hex value.`);
}
class r {
constructor(n, o, a, e = 1) {
y.validateMinMaxValues(n, o), y.validateColorStops(a), y.validateAlphaValue(e), this.min = n, this.max = o, this.alpha = e, this.colorStops = a.map((c) => i(c, e));
}
getColor(n) {
const o = this.colorStops.length;
if (n < this.min)
return this.colorStops[0];
if (n > this.max)
return this.colorStops[o - 1];
const a = this.max - this.min;
let e = (n - this.min) / a;
const c = Math.max(Math.ceil(e * (o - 1)), 1), s = this.colorStops[c - 1], u = this.colorStops[c];
e = e * (o - 1) - (c - 1);
const h = Math.floor(e * u.r + (1 - e) * s.r), f = Math.floor(e * u.g + (1 - e) * s.g), C = Math.floor(e * u.b + (1 - e) * s.b);
return new M(h, f, C, this.alpha);
}
}
return It = r, It;
}
var Dt, Gt;
function Ce() {
return Gt || (Gt = 1, Dt = we()), Dt;
}
var Se = Ce();
const ke = /* @__PURE__ */ ge(Se);
function Ft(M) {
let y;
if (Array.isArray(M))
y = [], M.forEach((i) => {
y.push(Ft(i));
});
else if (typeof M == "object" && M !== null) {
y = {};
for (const i in M)
Object.hasOwnProperty.call(M, i) && (y[i] = Ft(M[i]));
} else
y = M;
return y;
}
function Ee(M) {
if (!M || typeof M != "string")
return {
deg: 90,
colors: []
};
const y = M.match(/(\d+)deg/), i = y ? parseInt(y[1]) : 90, r = /(rgba?\([^)]+\)|#[0-9a-fA-F]{3,8})\s+(\d+(?:\.\d+)?)%/g, t = [];
let n;
for (; (n = r.exec(M)) !== null; ) {
const o = n[1], a = parseFloat(n[2]), e = be(o);
t.push({
...e,
pst: a
});
}
return { deg: i, colors: t };
}
function be(M) {
if (!M)
return {
color: "",
hex: "",
rgba: { r: 0, g: 0, b: 0, a: 0 }
};
let y = 0, i = 0, r = 0, t = 1;
if (M.startsWith("#")) {
const o = M.replace("#", "");
o.length === 3 ? (y = parseInt(o[0] + o[0], 16), i = parseInt(o[1] + o[1], 16), r = parseInt(o[2] + o[2], 16)) : o.length === 6 ? (y = parseInt(o.substring(0, 2), 16), i = parseInt(o.substring(2, 4), 16), r = parseInt(o.substring(4, 6), 16)) : o.length === 8 && (y = parseInt(o.substring(0, 2), 16), i = parseInt(o.substring(2, 4), 16), r = parseInt(o.substring(4, 6), 16), t = parseInt(o.substring(6, 8), 16) / 255);
} else if (M.startsWith("rgb")) {
const o = M.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
o && (y = parseInt(o[1]), i = parseInt(o[2]), r = parseInt(o[3]), t = o[4] ? parseFloat(o[4]) : 1);
} else if (M.startsWith("hsl")) {
const o = M.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*([\d.]+))?\)/);
if (o) {
const a = parseInt(o[1]) / 360, e = parseInt(o[2]) / 100, c = parseInt(o[3]) / 100;
t = o[4] ? parseFloat(o[4]) : 1;
let s, u, h;
if (e === 0)
s = u = h = c;
else {
const f = (k, b, d) => (d < 0 && (d += 1), d > 1 && (d -= 1), d < 0.16666666666666666 ? k + (b - k) * 6 * d : d < 0.5 ? b : d < 0.6666666666666666 ? k + (b - k) * (0.6666666666666666 - d) * 6 : k), C = c < 0.5 ? c * (1 + e) : c + e - c * e, F = 2 * c - C;
s = f(F, C, a + 1 / 3), u = f(F, C, a), h = f(F, C, a - 1 / 3);
}
y = Math.round(s * 255), i = Math.round(u * 255), r = Math.round(h * 255);
}
}
const n = `#${((1 << 24) + (y << 16) + (i << 8) + r).toString(16).slice(1)}`;
return {
color: `rgba(${y}, ${i}, ${r}, ${t})`,
hex: n,
rgba: { r: y, g: i, b: r, a: t }
};
}
function Tt(M, y = "hex") {
const { r: i, g: r, b: t, a: n } = M, o = isNaN(i) ? 0 : i, a = isNaN(r) ? 0 : r, e = isNaN(t) ? 0 : t, c = isNaN(n) ? 1 : n;
if (y === "hex") {
if (c < 1) {
const s = Math.round(c * 255).toString(16).padStart(2, "0");
return `#${((1 << 24) + (o << 16) + (a << 8) + e).toString(16).slice(1)}${s}`;
}
return `#${((1 << 24) + (o << 16) + (a << 8) + e).toString(16).slice(1)}`;
}
if (y === "rgb")
return `rgb(${o}, ${a}, ${e})`;
if (y === "rgba")
return `rgba(${o}, ${a}, ${e}, ${c})`;
if (y === "hsl" || y === "hsla") {
const s = o / 255, u = a / 255, h = e / 255, f = Math.max(s, u, h), C = Math.min(s, u, h);
let F = 0, k = 0;
const b = (f + C) / 2;
if (f !== C) {
const S = f - C;
switch (k = b > 0.5 ? S / (2 - f - C) : S / (f + C), f) {
case s:
F = ((u - h) / S + (u < h ? 6 : 0)) / 6;
break;
case u:
F = ((h - s) / S + 2) / 6;
break;
case h:
F = ((s - u) / S + 4) / 6;
break;
}
}
const d = Math.round(F * 360), l = Math.round(k * 100), m = Math.round(b * 100);
return y === "hsla" ? `hsla(${d}, ${l}%, ${m}%, ${c})` : `hsl(${d}, ${l}%, ${m}%)`;
}
return `rgba(${o}, ${a}, ${e}, ${c})`;
}
function Me(M, y = 2) {
const i = new RegExp(`^\\d+(?:\\.\\d{0,${y}})?`, "g");
return M.match(i) ? M.match(i) : "";
}
function Yt(M, y) {
for (; M; ) {
if (M.matches(y))
return M;
M = M.parentElement;
}
return null;
}
var Lt = { exports: {} }, Rt = { exports: {} }, Vt, Jt;
function Oe() {
return Jt || (Jt = 1, Vt = function(M, y, i, r) {
var t, n = 0;
typeof y != "boolean" && (r = i, i = y, y = void 0);
function o() {
var a = this, e = Number(/* @__PURE__ */ new Date()) - n, c = arguments;
function s() {
n = Number(/* @__PURE__ */ new Date()), i.apply(a, c);
}
function u() {
t = void 0;
}
r && !t && s(), t && clearTimeout(t), r === void 0 && e > M ? s() : y !== !0 && (t = setTimeout(r ? u : s, r === void 0 ? M - e : M));
}
return o;
}), Vt;
}
var jt, Kt;
function Pe() {
if (Kt) return jt;
Kt = 1;
var M = Oe();
return jt = function(y, i, r) {
return r === void 0 ? M(y, i, !1) : M(y, r, i !== !1);
}, jt;
}
var Y = {}, Zt;
function At() {
if (Zt) return Y;
Zt = 1, Y.__esModule = !0, Y.isInContainer = Y.getScrollContainer = Y.isScroll = Y.getStyle = Y.once = Y.off = Y.on = void 0;
var M = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(d) {
return typeof d;
} : function(d) {
return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d;
};
Y.hasClass = h, Y.addClass = f, Y.removeClass = C, Y.setStyle = k;
var y = ht, i = r(y);
function r(d) {
return d && d.__esModule ? d : { default: d };
}
var t = i.default.prototype.$isServer, n = /([\:\-\_]+(.))/g, o = /^moz([A-Z])/, a = t ? 0 : Number(document.documentMode), e = function(l) {
return (l || "").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, "");
}, c = function(l) {
return l.replace(n, function(m, S, w, v) {
return v ? w.toUpperCase() : w;
}).replace(o, "Moz$1");
}, s = Y.on = function() {
return !t && document.addEventListener ? function(d, l, m) {
d && l && m && d.addEventListener(l, m, !1);
} : function(d, l, m) {
d && l && m && d.attachEvent("on" + l, m);
};
}(), u = Y.off = function() {
return !t && document.removeEventListener ? function(d, l, m) {
d && l && d.removeEventListener(l, m, !1);
} : function(d, l, m) {
d && l && d.detachEvent("on" + l, m);
};
}();
Y.once = function(l, m, S) {
var w = function v() {
S && S.apply(this, arguments), u(l, m, v);
};
s(l, m, w);
};
function h(d, l) {
if (!d || !l) return !1;
if (l.indexOf(" ") !== -1) throw new Error("className should not contain space.");
return d.classList ? d.classList.contains(l) : (" " + d.className + " ").indexOf(" " + l + " ") > -1;
}
function f(d, l) {
if (d) {
for (var m = d.className, S = (l || "").split(" "), w = 0, v = S.length; w < v; w++) {
var p = S[w];
p && (d.classList ? d.classList.add(p) : h(d, p) || (m += " " + p));
}
d.classList || d.setAttribute("class", m);
}
}
function C(d, l) {
if (!(!d || !l)) {
for (var m = l.split(" "), S = " " + d.className + " ", w = 0, v = m.length; w < v; w++) {
var p = m[w];
p && (d.classList ? d.classList.remove(p) : h(d, p) && (S = S.replace(" " + p + " ", " ")));
}
d.classList || d.setAttribute("class", e(S));
}
}
var F = Y.getStyle = a < 9 ? function(d, l) {
if (!t) {
if (!d || !l) return null;
l = c(l), l === "float" && (l = "styleFloat");
try {
switch (l) {
case "opacity":
try {
return d.filters.item("alpha").opacity / 100;
} catch {
return 1;
}
default:
return d.style[l] || d.currentStyle ? d.currentStyle[l] : null;
}
} catch {
return d.style[l];
}
}
} : function(d, l) {
if (!t) {
if (!d || !l) return null;
l = c(l), l === "float" && (l = "cssFloat");
try {
var m = document.defaultView.getComputedStyle(d, "");
return d.style[l] || m ? m[l] : null;
} catch {
return d.style[l];
}
}
};
function k(d, l, m) {
if (!(!d || !l))
if ((typeof l > "u" ? "undefined" : M(l)) === "object")
for (var S in l)
l.hasOwnProperty(S) && k(d, S, l[S]);
else
l = c(l), l === "opacity" && a < 9 ? d.style.filter = isNaN(m) ? "" : "alpha(opacity=" + m * 100 + ")" : d.style[l] = m;
}
var b = Y.isScroll = function(l, m) {
if (!t) {
var S = m != null, w = S ? m ? F(l, "overflow-y") : F(l, "overflow-x") : F(l, "overflow");
return w.match(/(scroll|auto|overlay)/);
}
};
return Y.getScrollContainer = function(l, m) {
if (!t) {
for (var S = l; S; ) {
if ([window, document, document.documentElement].includes(S))
return window;
if (b(S, m))
return S;
S = S.parentNode;
}
return S;
}
}, Y.isInContainer = function(l, m) {
if (t || !l || !m) return !1;
var S = l.getBoundingClientRect(), w = void 0;
return [window, document, document.documentElement, null, void 0].includes(m) ? w = {
top: 0,
right: window.innerWidth,
bottom: window.innerHeight,
left: 0
} : w = m.getBoundingClientRect(), S.top < w.bottom && S.bottom > w.top && S.right > w.left && S.left < w.right;
}, Y;
}
var N = {}, ut = {}, Qt;
function Fe() {
if (Qt) return ut;
Qt = 1, ut.__esModule = !0, ut.isDefined = ut.isUndefined = ut.isFunction = void 0;
var M = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
ut.isString = t, ut.isObject = n, ut.isHtmlElement = o;
var y = ht, i = r(y);
function r(e) {
return e && e.__esModule ? e : { default: e };
}
function t(e) {
return Object.prototype.toString.call(e) === "[object String]";
}
function n(e) {
return Object.prototype.toString.call(e) === "[object Object]";
}
function o(e) {
return e && e.nodeType === Node.ELEMENT_NODE;
}
var a = function(c) {
var s = {};
return c && s.toString.call(c) === "[object Function]";
};
return typeof /./ != "function" && (typeof Int8Array > "u" ? "undefined" : M(Int8Array)) !== "object" && (i.default.prototype.$isServer || typeof document.childNodes != "function") && (ut.isFunction = a = function(c) {
return typeof c == "function" || !1;
}), ut.isFunction = a, ut.isUndefined = function(c) {
return c === void 0;
}, ut.isDefined = function(c) {
return c != null;
}, ut;
}
var te;
function qt() {
if (te) return N;
te = 1, N.__esModule = !0, N.isMac = N.isEmpty = N.isEqual = N.arrayEquals = N.looseEqual = N.capitalize = N.kebabCase = N.autoprefixer = N.isFirefox = N.isEdge = N.isIE = N.coerceTruthyValueToArray = N.arrayFind = N.arrayFindIndex = N.escapeRegexpString = N.valueEquals = N.generateId = N.getValueByPath = void 0;
var M = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(b) {
return typeof b;
} : function(b) {
return b && typeof Symbol == "function" && b.constructor === Symbol && b !== Symbol.prototype ? "symbol" : typeof b;
};
N.noop = o, N.hasOwn = a, N.toObject = c, N.getPropByPath = s, N.rafThrottle = F, N.objToArray = k;
var y = ht, i = t(y), r = Fe();
function t(b) {
return b && b.__esModule ? b : { default: b };
}
var n = Object.prototype.hasOwnProperty;
function o() {
}
function a(b, d) {
return n.call(b, d);
}
function e(b, d) {
for (var l in d)
b[l] = d[l];
return b;
}
function c(b) {
for (var d = {}, l = 0; l < b.length; l++)
b[l] && e(d, b[l]);
return d;
}
N.getValueByPath = function(d, l) {
l = l || "";
for (var m = l.split("."), S = d, w = null, v = 0, p = m.length; v < p; v++) {
var x = m[v];
if (!S) break;
if (v === p - 1) {
w = S[x];
break;
}
S = S[x];
}
return w;
};
function s(b, d, l) {
var m = b;
d = d.replace(/\[(\w+)\]/g, ".$1"), d = d.replace(/^\./, "");
for (var S = d.split("."), w = 0, v = S.length; w < v - 1 && !(!m && !l); ++w) {
var p = S[w];
if (p in m)
m = m[p];
else {
if (l)
throw new Error("please transfer a valid prop path to form item!");
break;
}
}
return {
o: m,
k: S[w],
v: m ? m[S[w]] : null
};
}
N.generateId = function() {
return Math.floor(Math.random() * 1e4);
}, N.valueEquals = function(d, l) {
if (d === l) return !0;
if (!(d instanceof Array) || !(l instanceof Array) || d.length !== l.length) return !1;
for (var m = 0; m !== d.length; ++m)
if (d[m] !== l[m]) return !1;
return !0;
}, N.escapeRegexpString = function() {
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
return String(d).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
};
var u = N.arrayFindIndex = function(d, l) {
for (var m = 0; m !== d.length; ++m)
if (l(d[m]))
return m;
return -1;
};
N.arrayFind = function(d, l) {
var m = u(d, l);
return m !== -1 ? d[m] : void 0;
}, N.coerceTruthyValueToArray = function(d) {
return Array.isArray(d) ? d : d ? [d] : [];
}, N.isIE = function() {
return !i.default.prototype.$isServer && !isNaN(Number(document.documentMode));
}, N.isEdge = function() {
return !i.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
}, N.isFirefox = function() {
return !i.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
}, N.autoprefixer = function(d) {
if ((typeof d > "u" ? "undefined" : M(d)) !== "object") return d;
var l = ["transform", "transition", "animation"], m = ["ms-", "webkit-"];
return l.forEach(function(S) {
var w = d[S];
S && w && m.forEach(function(v) {
d[v + S] = w;
});
}), d;
}, N.kebabCase = function(d) {
var l = /([^-])([A-Z])/g;
return d.replace(l, "$1-$2").replace(l, "$1-$2").toLowerCase();
}, N.capitalize = function(d) {
return (0, r.isString)(d) ? d.charAt(0).toUpperCase() + d.slice(1) : d;
};
var h = N.looseEqual = function(d, l) {
var m = (0, r.isObject)(d), S = (0, r.isObject)(l);
return m && S ? JSON.stringify(d) === JSON.stringify(l) : !m && !S ? String(d) === String(l) : !1;
}, f = N.arrayEquals = function(d, l) {
if (d = d || [], l = l || [], d.length !== l.length)
return !1;
for (var m = 0; m < d.length; m++)
if (!h(d[m], l[m]))
return !1;
return !0;
};
N.isEqual = function(d, l) {
return Array.isArray(d) && Array.isArray(l) ? f(d, l) : h(d, l);
};
var C = N.isEmpty = function(d) {
if (d == null) return !0;
if (typeof d == "boolean") return !1;
if (typeof d == "number") return !d;
if (d instanceof Error) return d.message === "";
switch (Object.prototype.toString.call(d)) {
// String or Array
case "[object String]":
case "[object Array]":
return !d.length;
// Map or Set or File
case "[object File]":
case "[object Map]":
case "[object Set]":
return !d.size;
// Plain Object
case "[object Object]":
return !Object.keys(d).length;
}
return !1;
};
function F(b) {
var d = !1;
return function() {
for (var l = this, m = arguments.length, S = Array(m), w = 0; w < m; w++)
S[w] = arguments[w];
d || (d = !0, window.requestAnimationFrame(function(v) {
b.apply(l, S), d = !1;
}));
};
}
function k(b) {
return Array.isArray(b) ? b : C(b) ? [] : [b];
}
return N.isMac = function() {
return !i.default.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
}, N;
}
var yt = {}, gt = {}, _t = {}, ee;
function xe() {
return ee || (ee = 1, _t.__esModule = !0, _t.default = function(M) {
for (var y = 1, i = arguments.length; y < i; y++) {
var r = arguments[y] || {};
for (var t in r)
if (r.hasOwnProperty(t)) {
var n = r[t];
n !== void 0 && (M[t] = n);
}
}
return M;
}), _t;
}
var wt = {}, ne;
function Ae() {
if (ne) return wt;
ne = 1, wt.__esModule = !0;
var M = ht, y = r(M), i = At();
function r(u) {
return u && u.__esModule ? u : { default: u };
}
var t = !1, n = !1, o = void 0, a = function() {
if (!y.default.prototype.$isServer) {
var h = c.modalDom;
return h ? t = !0 : (t = !1, h = document.createElement("div"), c.modalDom = h, h.addEventListener("touchmove", function(f) {
f.preventDefault(), f.stopPropagation();
}), h.addEventListener("click", function() {
c.doOnModalClick && c.doOnModalClick();
})), h;
}
}, e = {}, c = {
modalFade: !0,
getInstance: function(h) {
return e[h];
},
register: function(h, f) {
h && f && (e[h] = f);
},
deregister: function(h) {
h && (e[h] = null, delete e[h]);
},
nextZIndex: function() {
return c.zIndex++;
},
modalStack: [],
doOnModalClick: function() {
var h = c.modalStack[c.modalStack.length - 1];
if (h) {
var f = c.getInstance(h.id);
f && f.closeOnClickModal && f.close();
}
},
openModal: function(h, f, C, F, k) {
if (!y.default.prototype.$isServer && !(!h || f === void 0)) {
this.modalFade = k;
for (var b = this.modalStack, d = 0, l = b.length; d < l; d++) {
var m = b[d];
if (m.id === h)
return;
}
var S = a();
if ((0, i.addClass)(S, "v-modal"), this.modalFade && !t && (0, i.addClass)(S, "v-modal-enter"), F) {
var w = F.trim().split(/\s+/);
w.forEach(function(v) {
return (0, i.addClass)(S, v);
});
}
setTimeout(function() {
(0, i.removeClass)(S, "v-modal-enter");
}, 200), C && C.parentNode && C.parentNode.nodeType !== 11 ? C.parentNode.appendChild(S) : document.body.appendChild(S), f && (S.style.zIndex = f), S.tabIndex = 0, S.style.display = "", this.modalStack.push({ id: h, zIndex: f, modalClass: F });
}
},
closeModal: function(h) {
var f = this.modalStack, C = a();
if (f.length > 0) {
var F = f[f.length - 1];
if (F.id === h) {
if (F.modalClass) {
var k = F.modalClass.trim().split(/\s+/);
k.forEach(function(d) {
return (0, i.removeClass)(C, d);
});
}
f.pop(), f.length > 0 && (C.style.zIndex = f[f.length - 1].zIndex);
} else
for (var b = f.length - 1; b >= 0; b--)
if (f[b].id === h) {
f.splice(b, 1);
break;
}
}
f.length === 0 && (this.modalFade && (0, i.addClass)(C, "v-modal-leave"), setTimeout(function() {
f.length === 0 && (C.parentNode && C.parentNode.removeChild(C), C.style.display = "none", c.modalDom = void 0), (0, i.removeClass)(C, "v-modal-leave");
}, 200));
}
};
Object.defineProperty(c, "zIndex", {
configurable: !0,
get: function() {
return n || (o = o || (y.default.prototype.$ELEMENT || {}).zIndex || 2e3, n = !0), o;
},
set: function(h) {
o = h;
}
});
var s = function() {
if (!y.default.prototype.$isServer && c.modalStack.length > 0) {
var h = c.modalStack[c.modalStack.length - 1];
if (!h) return;
var f = c.getInstance(h.id);
return f;
}
};
return y.default.prototype.$isServer || window.addEventListener("keydown", function(u) {
if (u.keyCode === 27) {
var h = s();
h && h.closeOnPressEscape && (h.handleClose ? h.handleClose() : h.handleAction ? h.handleAction("cancel") : h.close());
}
}), wt.default = c, wt;
}
var Ct = {}, re;
function $e() {
if (re) return Ct;
re = 1, Ct.__esModule = !0, Ct.default = function() {
if (y.default.prototype.$isServer) return 0;
if (r !== void 0) return r;
var t = document.createElement("div");
t.className = "el-scrollbar__wrap", t.style.visibility = "hidden", t.style.width = "100px", t.style.position = "absolute", t.style.top = "-9999px", document.body.appendChild(t);
var n = t.offsetWidth;
t.style.overflow = "scroll";
var o = document.createElement("div");
o.style.width = "100%", t.appendChild(o);
var a = o.offsetWidth;
return t.parentNode.removeChild(t), r = n - a, r;
};
var M = ht, y = i(M);
function i(t) {
return t && t.__esModule ? t : { default: t };
}
var r = void 0;
return Ct;
}
var ie;
function Ie() {
if (ie) return gt;
ie = 1, gt.__esModule = !0, gt.PopupManager = void 0;
var M = ht, y = c(M), i = xe(), r = c(i), t = Ae(), n = c(t), o = $e(), a = c(o), e = At();
function c(h) {
return h && h.__esModule ? h : { default: h };
}
var s = 1, u = void 0;
return gt.default = {
props: {
visible: {
type: Boolean,
default: !1
},
openDelay: {},
closeDelay: {},
zIndex: {},
modal: {
type: Boolean,
default: !1
},
modalFade: {
type: Boolean,
default: !0
},
modalClass: {},
modalAppendToBody: {
type: Boolean,
default: !1
},
lockScroll: {
type: Boolean,
default: !0
},
closeOnPressEscape: {
type: Boolean,
default: !1
},
closeOnClickModal: {
type: Boolean,
default: !1
}
},
beforeMount: function() {
this._popupId = "popup-" + s++, n.default.register(this._popupId, this);
},
beforeDestroy: function() {
n.default.deregister(this._popupId), n.default.closeModal(this._popupId), this.restoreBodyStyle();
},
data: function() {
return {
opened: !1,
bodyPaddingRight: null,
computedBodyPaddingRight: 0,
withoutHiddenClass: !0,
rendered: !1
};
},
watch: {
visible: function(f) {
var C = this;
if (f) {
if (this._opening) return;
this.rendered ? this.open() : (this.rendered = !0, y.default.nextTick(function() {
C.open();
}));
} else
this.close();
}
},
methods: {
open: function(f) {
var C = this;
this.rendered || (this.rendered = !0);
var F = (0, r.default)({}, this.$props || this, f);
this._closeTimer && (clearTimeout(this._closeTimer), this._closeTimer = null), clearTimeout(this._openTimer);
var k = Number(F.openDelay);
k > 0 ? this._openTimer = setTimeout(function() {
C._openTimer = null, C.doOpen(F);
}, k) : this.doOpen(F);
},
doOpen: function(f) {
if (!this.$isServer && !(this.willOpen && !this.willOpen()) && !this.opened) {
this._opening = !0;
var C = this.$el, F = f.modal, k = f.zIndex;
if (k && (n.default.zIndex = k), F && (this._closing && (n.default.closeModal(this._popupId), this._closing = !1), n.default.openModal(this._popupId, n.default.nextZIndex(), this.modalAppendToBody ? void 0 : C, f.modalClass, f.modalFade), f.lockScroll)) {
this.withoutHiddenClass = !(0, e.hasClass)(document.body, "el-popup-parent--hidden"), this.withoutHiddenClass && (this.bodyPaddingRight = document.body.style.paddingRight, this.computedBodyPaddingRight = parseInt((0, e.getStyle)(document.body, "paddingRight"), 10)), u = (0, a.default)();
var b = document.documentElement.clientHeight < document.body.scrollHeight, d = (0, e.getStyle)(document.body, "overflowY");
u > 0 && (b || d === "scroll") && this.withoutHiddenClass && (document.body.style.paddingRight = this.computedBodyPaddingRight + u + "px"), (0, e.addClass)(document.body, "el-popup-parent--hidden");
}
getComputedStyle(C).position === "static" && (C.style.position = "absolute"), C.style.zIndex = n.default.nextZIndex(), this.opened = !0, this.onOpen && this.onOpen(), this.doAfterOpen();
}
},
doAfterOpen: function() {
this._opening = !1;
},
close: function() {
var f = this;
if (!(this.willClose && !this.willClose())) {
this._openTimer !== null && (clearTimeout(this._openTimer), this._openTimer = null), clearTimeout(this._closeTimer);
var C = Number(this.closeDelay);
C > 0 ? this._closeTimer = setTimeout(function() {
f._closeTimer = null, f.doClose();
}, C) : this.doClose();
}
},
doClose: function() {
this._closing = !0, this.onClose && this.onClose(), this.lockScroll && setTimeout(this.restoreBodyStyle, 200), this.opened = !1, this.doAfterClose();
},
doAfterClose: function() {
n.default.closeModal(this._popupId), this._closing = !1;
},
restoreBodyStyle: function() {
this.modal && this.withoutHiddenClass && (document.body.style.paddingRight = this.bodyPaddingRight, (0, e.removeClass)(document.body, "el-popup-parent--hidden")), this.withoutHiddenClass = !0;
}
}
}, gt.PopupManager = n.default, gt;
}
var Bt = { exports: {} }, oe;
function De() {
return oe || (oe = 1, function(M) {
var y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
return typeof i;
} : function(i) {
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
};
(function(i, r) {
y(M) === "object" && M.exports ? M.exports = r() : i.Popper = r();
})(void 0, function() {
var i = window, r = {
// placement of the popper
placement: "bottom",
gpuAcceleration: !0,
// shift popper from its origin by the given amount of pixels (can be negative)
offset: 0,
// the element which will act as boundary of the popper
boundariesElement: "viewport",
// amount of pixel used to define a minimum distance between the boundaries and the popper
boundariesPadding: 5,
// popper will try to prevent overflow following this order,
// by default, then, it could overflow on the left and on top of the boundariesElement
preventOverflowOrder: ["left", "right", "top", "bottom"],
// the behavior used by flip to change the placement of the popper
flipBehavior: "flip",
arrowElement: "[x-arrow]",
arrowOffset: 0,
// list of functions used to modify the offsets before they are applied to the popper
modifiers: ["shift", "offset", "preventOverflow", "keepTogether", "arrow", "flip", "applyStyle"],
modifiersIgnored: [],
forceAbsolute: !1
};
function t(l, m, S) {
this._reference = l.jquery ? l[0] : l, this.state = {};
var w = typeof m > "u" || m === null, v = m && Object.prototype.toString.call(m) === "[object Object]";
return w || v ? this._popper = this.parse(v ? m : {}) : this._popper = m.jquery ? m[0] : m, this._options = Object.assign({}, r, S), this._options.modifiers = this._options.modifiers.map((function(p) {
if (this._options.modifiersIgnored.indexOf(p) === -1)
return p === "applyStyle" && this._popper.setAttribute("x-placement", this._options.placement), this.modifiers[p] || p;
}).bind(this)), this.state.position = this._getPosition(this._popper, this._reference), f(this._popper, { position: this.state.position, top: 0 }), this.update(), this._setupEventListeners(), this;
}
t.prototype.destroy = function() {
return this._popper.removeAttribute("x-placement"), this._popper.style.left = "", this._popper.style.position = "", this._popper.style.top = "", this._popper.style[d("transform")] = "", this._removeEventListeners(), this._options.removeOnDestroy && this._popper.remove(), this;
}, t.prototype.update = function() {
var l = { instance: this, styles: {} };
l.placement = this._options.placement, l._originalPlacement = this._options.placement, l.offsets = this._getOffsets(this._popper, this._reference, l.placement), l.boundaries = this._getBoundaries(l, this._options.boundariesPadding, this._options.boundariesElement), l = this.runModifiers(l, this._options.modifiers), typeof this.state.updateCallback == "function" && this.state.updateCallback(l);
}, t.prototype.onCreate = function(l) {
return l(this), this;
}, t.prototype.onUpdate = function(l) {
return this.state.updateCallback = l, this;
}, t.prototype.parse = function(l) {
var m = {
tagName: "div",
classNames: ["popper"],
attributes: [],
parent: i.document.body,
content: "",
contentType: "text",
arrowTagName: "div",
arrowClassNames: ["popper__arrow"],
arrowAttributes: ["x-arrow"]
};
l = Object.assign({}, m, l);
var S = i.document, w = S.createElement(l.tagName);
if (x(w, l.classNames), O(w, l.attributes), l.contentType === "node" ? w.appendChild(l.content.jquery ? l.content[0] : l.content) : l.contentType === "html" ? w.innerHTML = l.content : w.textContent = l.content, l.arrowTagName) {
var v = S.createElement(l.arrowTagName);
x(v, l.arrowClassNames), O(v, l.arrowAttributes), w.appendChild(v);
}
var p = l.parent.jquery ? l.parent[0] : l.parent;
if (typeof p == "string") {
if (p = S.querySelectorAll(l.parent), p.length > 1 && console.warn("WARNING: the given `parent` query(" + l.parent + ") matched more than one element, the first one will be used"), p.length === 0)
throw "ERROR: the given `parent` doesn't exists!";
p = p[0];
}
return p.length > 1 && !(p instanceof Element) && (console.warn("WARNING: you have passed as parent a list of elements, the first one will be used"), p = p[0]), p.appendChild(w), w;
function x(P, I) {
I.forEach(function(R) {
P.classList.add(R);
});
}
function O(P, I) {
I.forEach(function(R) {
P.setAttribute(R.split(":")[0], R.split(":")[1] || "");
});
}
}, t.prototype._getPosition = function(l, m) {
if (s(m), this._options.forceAbsolute)
return "absolute";
var S = h(m);
return S ? "fixed" : "absolute";
}, t.prototype._getOffsets = function(l, m, S) {
S = S.split("-")[0];
var w = {};
w.position = this.state.position;
var v = w.position === "fixed", p = b(m, s(l), v), x = n(l);
return ["right", "left"].indexOf(S) !== -1 ? (w.top = p.top + p.height / 2 - x.height / 2, S === "left" ? w.left = p.left - x.width : w.left = p.right) : (w.left = p.left + p.width / 2 - x.width / 2, S === "top" ? w.top = p.top - x.height : w.top = p.bottom), w.width = x.width, w.height = x.height, {
popper: w,
reference: p
};
}, t.prototype._setupEventListeners = function() {
if (this.state.updateBound = this.update.bind(this), i.addEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window") {
var l = u(this._reference);
(l === i.document.body || l === i.document.documentElement) && (l = i), l.addEventListener("scroll", this.state.updateBound), this.state.scrollTarget = l;
}
}, t.prototype._removeEventListeners = function() {
i.removeEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window" && this.state.scrollTarget && (this.state.scrollTarget.removeEventListener("scroll", this.state.updateBound), this.state.scrollTarget = null), this.state.updateBound = null;
}, t.prototype._getBoundaries = function(l, m, S) {
var w = {}, v, p;
if (S === "window") {
var x = i.document.body, O = i.document.documentElement;
p = Math.max(x.scrollHeight, x.offsetHeight, O.clientHeight, O.scrollHeight, O.offsetHeight), v = Math.max(x.scrollWidth, x.offsetWidth, O.clientWidth, O.scrollWidth, O.offsetWidth), w = {
top: 0,
right: v,
bottom: p,
left: 0
};
} else if (S === "viewport") {
var P = s(this._popper), I = u(this._popper), R = F(P), q = function(W) {
return W == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : W.scrollTop;
}, T = function(W) {
return W == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : W.scrollLeft;
}, z = l.offsets.popper.position === "fixed" ? 0 : q(I), H = l.offsets.popper.position === "fixed" ? 0 : T(I);
w = {
top: 0 - (R.top - z),
right: i.document.documentElement.clientWidth - (R.left - H),
bottom: i.document.documentElement.clientHeight - (R.top - z),
left: 0 - (R.left - H)
};
} else
s(this._popper) === S ? w = {
top: 0,
left: 0,
right: S.clientWidth,
bottom: S.clientHeight
} : w = F(S);
return w.left += m, w.right -= m, w.top = w.top + m, w.bottom = w.bottom - m, w;
}, t.prototype.runModifiers = function(l, m, S) {
var w = m.slice();
return S !== void 0 && (w = this._options.modifiers.slice(0, e(this._options.modifiers, S))), w.forEach((function(v) {
C(v) && (l = v.call(this, l));
}).bind(this)), l;
}, t.prototype.isModifierRequired = function(l, m) {
var S = e(this._options.modifiers, l);
return !!this._options.modifiers.slice(0, S).filter(function(w) {
return w === m;
}).length;
}, t.prototype.modifiers = {}, t.prototype.modifiers.applyStyle = function(l) {
var m = {
position: l.offsets.popper.position
}, S = Math.round(l.offsets.popper.left), w = Math.round(l.offsets.popper.top), v;
return this._options.gpuAcceleration && (v = d("transform")) ? (m[v] = "translate3d(" + S + "px, " + w + "px, 0)", m.top = 0, m.left = 0) : (m.left = S, m.top = w), Object.assign(m, l.styles), f(this._popper, m), this._popper.setAttribute("x-placement", l.placement), this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && l.offsets.arrow && f(l.arrowElement, l.offsets.arrow), l;
}, t.prototype.modifiers.shift = function(l) {
var m = l.placement, S = m.split("-")[0], w = m.split("-")[1];
if (w) {
var v = l.offsets.reference, p = a(l.offsets.popper), x = {
y: {
start: { top: v.top },
end: { top: v.top + v.height - p.height }
},
x: {
start: { left: v.left },
end: { left: v.left + v.width - p.width }
}
}, O = ["bottom", "top"].indexOf(S) !== -1 ? "x" : "y";
l.offsets.popper = Object.assign(p, x[O][w]);
}
return l;
}, t.prototype.modifiers.preventOverflow = function(l) {
var m = this._options.preventOverflowOrder, S = a(l.offsets.popper), w = {
left: function() {
var p = S.left;
return S.left < l.boundaries.left && (p = Math.max(S.left, l.boundaries.left)), { left: p };
},
right: function() {
var p = S.left;
return S.right > l.boundaries.right && (p = Math.min(S.left, l.boundaries.right - S.width)), { left: p };
},
top: function() {
var p = S.top;
return S.top < l.boundaries.top && (p = Math.max(S.top, l.boundaries.top)), { top: p };
},
bottom: function() {
var p = S.top;
return S.bottom > l.boundaries.bottom && (p = Math.min(S.top, l.boundaries.bottom - S.height)), { top: p };
}
};
return m.forEach(function(v) {
l.offsets.popper = Object.assign(S, w[v]());
}), l;
}, t.prototype.modifiers.keepTogether = function(l) {
var m = a(l.offsets.popper), S = l.offsets.reference, w = Math.floor;
return m.right < w(S.left) && (l.offsets.popper.left = w(S.left) - m.width), m.left > w(S.right) && (l.offsets.popper.left = w(S.right)), m.bottom < w(S.top) && (l.offsets.popper.top = w(S.top) - m.height), m.top > w(S.bottom) && (l.offsets.popper.top = w(S.bottom)), l;
}, t.prototype.modifiers.flip = function(l) {
if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow))
return console.warn("WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!"), l;
if (l.flipped && l.placement === l._originalPlacement)
return l;
var m = l.placement.split("-")[0], S = o(m), w = l.placement.split("-")[1] || "", v = [];
return this._options.flipBehavior === "flip" ? v = [m, S] : v = this._options.flipBehavior, v.forEach((function(p, x) {
if (!(m !== p || v.length === x + 1)) {
m = l.placement.split("-")[0], S = o(m);
var O = a(l.offsets.popper), P = ["right", "bottom"].indexOf(m) !== -1;
(P && Math.floor(l.offsets.reference[m]) > Math.floor(O[S]) || !P && Math.floor(l.offsets.reference[m]) < Math.floor(O[S])) && (l.flipped = !0, l.placement = v[x + 1], w && (l.placement += "-" + w), l.offsets.popper = this._getOffsets(this._popper, this._reference, l.placement).popper, l = this.runModifiers(l, this._options.modifiers, this._flip));
}
}).bind(this)), l;
}, t.prototype.modifiers.offset = function(l) {
var m = this._options.offset, S = l.offsets.popper;
return l.placement.indexOf("left") !== -1 ? S.top -= m : l.placement.indexOf("right") !== -1 ? S.top += m : l.placement.indexOf("top") !== -1 ? S.left -= m : l.placement.indexOf("bottom") !== -1 && (S.left += m), l;
}, t.prototype.modifiers.arrow = function(l) {
var m = this._options.arrowElement, S = this._options.arrowOffset;
if (typeof m == "string" && (m = this._popper.querySelector(m)), !m)
return l;
if (!this._popper.contains(m))
return console.warn("WARNING: `arrowElement` must be child of its popper element!"), l;
if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether))
return console.warn("WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!"), l;
var w = {}, v = l.placement.split("-")[0], p = a(l.offsets.popper), x = l.offsets.reference, O = ["left", "right"].indexOf(v) !== -1, P = O ? "height" : "width", I = O ? "top" : "left", R = O ? "left" : "top", q = O ? "bottom" : "right", T = n(m)[P];
x[q] - T < p[I] && (l.offsets.popper[I] -= p[I] - (x[q] - T)), x[I] + T > p[q] && (l.offsets.popper[I] += x[I] + T - p[q]);
var z = x[I] + (S || x[P] / 2 - T / 2), H = z - p[I];
return H = Math.max(Math.min(p[P] - T - 8, H), 8), w[I] = H, w[R] = "", l.offsets.arrow = w, l.arrowElement = m, l;
};
function n(l) {
var m = l.style.display, S = l.style.visibility;
l.style.display = "block", l.style.visibility = "hidden", l.offsetWidth;
var w = i.getComputedStyle(l), v = parseFloat(w.marginTop) + parseFloat(w.marginBottom), p = parseFloat(w.marginLeft) + parseFloat(w.marginRight), x = { width: l.offsetWidth + p, height: l.offsetHeight + v };
return l.style.display = m, l.style.visibility = S, x;
}
function o(l) {
var m = { left: "right", right: "left", bottom: "top", top: "bottom" };
return l.replace(/left|right|bottom|top/g, function(S) {
return m[S];
});
}
function a(l) {
var m = Object.assign({}, l);
return m.right = m.left + m.width, m.bottom = m.top + m.height, m;
}
function e(l, m) {
var S = 0, w;
for (w in l) {
if (l[w] === m)
return S;
S++;
}
return null;
}
function c(l, m) {
var S = i.getComputedStyle(l, null);
return S[m];
}
function s(l) {
var m = l.offsetParent;
return m === i.document.body || !m ? i.document.documentElement : m;
}
function u(l) {
var m = l.parentNode;
return m ? m === i.document ? i.document.body.scrollTop || i.document.body.scrollLeft ? i.document.body : i.document.documentElement : ["scroll", "auto"].indexOf(c(m, "overflow")) !== -1 || ["scroll", "auto"].indexOf(c(m, "overflow-x")) !== -1 || ["scroll", "auto"].indexOf(c(m, "overflow-y")) !== -1 ? m : u(l.parentNode) : l;
}
function h(l) {
return l === i.document.body ? !1 : c(l, "position") === "fixed" ? !0 : l.parentNode ? h(l.parentNode) : l;
}
function f(l, m) {
function S(w) {
return w !== "" && !isNaN(parseFloat(w)) && isFinite(w);
}
Object.keys(m).forEach(function(w) {
var v = "";
["width", "height", "top", "right", "bottom", "left"].indexOf(w) !== -1 && S(m[w]) && (v = "px"), l.style[w] = m[w] + v;
});
}
function C(l) {
var m = {};
return l && m.toString.call(l) === "[object Function]";
}
function F(l) {
var m = {
width: l.offsetWidth,
height: l.offsetHeight,
left: l.offsetLeft,
top: l.offsetTop
};
return m.right = m.left + m.width, m.bottom = m.top + m.height, m;
}
function k(l) {
var m = l.getBoundingClientRect(), S = navigator.userAgent.indexOf("MSIE") != -1, w = S && l.tagName === "HTML" ? -l.scrollTop : m.top;
return {
left: m.left,
top: w,
right: m.right,
bottom: m.bottom,
width: m.right - m.left,
height: m.bottom - w
};
}
function b(l, m, S) {
var w = k(l), v = k(m);
if (S) {
var p = u(m);
v.top += p.scrollTop, v.bottom += p.scrollTop, v.left += p.scrollLeft, v.right += p.scrollLeft;
}
var x = {
top: w.top - v.top,
left: w.left - v.left,
bottom: w.top - v.top + w.height,
right: w.left - v.left + w.width,
width: w.width,
height: w.height
};
return x;
}
function d(l) {
for (var m = ["", "ms", "webkit", "moz", "o"], S = 0; S < m.length; S++) {
var w = m[S] ? m[S] + l.charAt(0).toUpperCase() + l.slice(1) : l;
if (typeof i.document.body.style[w] < "u")
return w;
}
return null;
}
return Object.assign || Object.defineProperty(Object, "assign", {
enumerable: !1,
configurable: !0,
writable: !0,
value: function(m) {
if (m == null)
throw new TypeError("Cannot convert first argument to object");
for (var S = Object(m), w = 1; w < arguments.length; w++) {
var v = arguments[w];
if (v != null) {
v = Object(v);
for (var p = Object.keys(v), x = 0, O = p.length; x < O; x++) {
var P = p[x], I = Object.getOwnPropertyDescriptor(v, P);
I !== void 0 && I.enumerable && (S[P] = v[P]);
}
}
}
return S;
}
}), t;
});
}(Bt)), Bt.exports;
}
var se;
function Te() {
if (se) return yt;
se = 1, yt.__esModule = !0;
var M = ht, y = r(M), i = Ie();
function r(o) {
return o && o.__esModule ? o : { default: o };
}
var t = y.default.prototype.$isServer ? function() {
} : De(), n = function(a) {
return a.stopPropagation();
};
return yt.default = {
props: {
transformOrigin: {
type: [Boolean, String],
default: !0
},
placement: {
type: String,
default: "bottom"
},
boundariesPadding: {
type: Number,
default: 5
},
reference: {},
popper: {},
offset: {
default: 0
},
value: Boolean,
visibleArrow: Boolean,
arrowOffset: {
type: Number,
default: 35
},
appendToBody: {
type: Boolean,
default: !0
},
popperOptions: {
type: Object,
default: function() {
return {
gpuAcceleration: !1
};
}
}
},
data: function() {
return {
showPopper: !1,
currentPlacement: ""
};
},
watch: {
value: {
immediate: !0,
handler: function(a) {
this.showPopper = a, this.$emit("input", a);
}
},
showPopper: function(a) {
this.disabled || (a ? this.updatePopper() : this.destroyPopper(), this.$emit("input", a));
}
},
methods: {
createPopper: function() {
var a = this;
if (!this.$isServer && (this.currentPlacement = this.currentPlacement || this.placement, !!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))) {
var e = this.popperOptions, c = this.popperElm = this.popperElm || this.popper || this.$refs.popper, s = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
!s && this.$slots.reference && this.$slots.reference[0] && (s = this.referenceElm = this.$slots.reference[0].elm), !(!c || !s) && (this.visibleArrow && this.appendArrow(c), this.appendToBody && document.body.appendChild(this.popperElm), this.popperJS && this.popperJS.destroy && this.popperJS.destroy(), e.placement = this.currentPlacement, e.offset = this.offset, e.arrowOffset = this.arrowOffset, this.popperJS = new t(s, c, e), this.popperJS.onCreate(function(u) {
a.$emit("created", a), a.resetTransformOrigin(), a.$nextTick(a.updatePopper);
}), typeof e.onUpdate == "function" && this.popperJS.onUpdate(e.onUpdate), this.popperJS._popper.style.zIndex = i.PopupManager.nextZIndex(), this.popperElm.addEventListener("click", n));
}
},
updatePopper: function() {
var a = this.popperJS;
a ? (a.update(), a._popper && (a._popper.style.zIndex = i.PopupManager.nextZIndex())) : this.createPopper();
},
doDestroy: function(a) {
!this.popperJS || this.showPopper && !a || (this.popperJS.destroy(), this.popperJS = null);
},
destroyPopper: function() {
this.popperJS && this.resetTransformOrigin();
},
resetTransformOrigin: function() {