trap-ui
Version:
基于elementPlus表格进行二次封装的组件库
1,512 lines (1,510 loc) • 996 kB
JavaScript
import './trap-ui.css';
var _b = Object.defineProperty, Sb = Object.defineProperties;
var bb = Object.getOwnPropertyDescriptors;
var zc = Object.getOwnPropertySymbols;
var wb = Object.prototype.hasOwnProperty, xb = Object.prototype.propertyIsEnumerable;
var Hc = (r) => {
throw TypeError(r);
};
var Gc = (r, e, t) => e in r ? _b(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ze = (r, e) => {
for (var t in e || (e = {}))
wb.call(e, t) && Gc(r, t, e[t]);
if (zc)
for (var t of zc(e))
xb.call(e, t) && Gc(r, t, e[t]);
return r;
}, va = (r, e) => Sb(r, bb(e));
var Wc = (r, e, t) => e.has(r) || Hc("Cannot " + t);
var hi = (r, e, t) => (Wc(r, e, "read from private field"), t ? t.call(r) : e.get(r)), uu = (r, e, t) => e.has(r) ? Hc("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Uc = (r, e, t, n) => (Wc(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t);
var ca = (r, e, t) => new Promise((n, i) => {
var a = (l) => {
try {
s(t.next(l));
} catch (u) {
i(u);
}
}, o = (l) => {
try {
s(t.throw(l));
} catch (u) {
i(u);
}
}, s = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(a, o);
s((t = t.apply(r, e)).next());
});
import { shallowReactive as Tb, shallowRef as Am, useAttrs as Cb, onBeforeUnmount as Em, defineComponent as xl, toRefs as Db, onMounted as mv, watch as qn, nextTick as Im, createElementBlock as me, openBlock as Z, ref as Xe, reactive as Zf, onBeforeMount as _v, resolveComponent as Re, resolveDirective as Mb, createVNode as gt, withModifiers as Vs, withCtx as Ce, withDirectives as Ab, createElementVNode as pt, createBlock as Ie, unref as Eb, mergeProps as rt, toHandlers as Vn, Fragment as Tt, renderList as en, createCommentVNode as nt, renderSlot as zn, resolveDynamicComponent as Yc, toDisplayString as qt, createTextVNode as Mr, normalizeStyle as Bs, toRaw as Fs, computed as qf, withKeys as Ib, createSlots as Lb, onUnmounted as Pb, normalizeClass as $c, Transition as kb } from "vue";
import fu from "axios";
import { ElTable as Ob, ElMessage as Xc } from "element-plus";
import { createPopper as Rb } from "@popperjs/core";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var Kf = function(r, e) {
return Kf = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
t.__proto__ = n;
} || function(t, n) {
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
}, Kf(r, e);
};
function F(r, e) {
if (typeof e != "function" && e !== null)
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
Kf(r, e);
function t() {
this.constructor = r;
}
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
}
var Nb = /* @__PURE__ */ function() {
function r() {
this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
}
return r;
}(), Vb = /* @__PURE__ */ function() {
function r() {
this.browser = new Nb(), this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = typeof window != "undefined";
}
return r;
}(), te = new Vb();
typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (te.wxa = !0, te.touchEventsSupported = !0) : typeof document == "undefined" && typeof self != "undefined" ? te.worker = !0 : !te.hasGlobalWindow || "Deno" in window ? (te.node = !0, te.svgSupported = !0) : Bb(navigator.userAgent, te);
function Bb(r, e) {
var t = e.browser, n = r.match(/Firefox\/([\d.]+)/), i = r.match(/MSIE\s([\d.]+)/) || r.match(/Trident\/.+?rv:(([\d.]+))/), a = r.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(r);
n && (t.firefox = !0, t.version = n[1]), i && (t.ie = !0, t.version = i[1]), a && (t.edge = !0, t.version = a[1], t.newEdge = +a[1].split(".")[0] > 18), o && (t.weChat = !0), e.svgSupported = typeof SVGRect != "undefined", e.touchEventsSupported = "ontouchstart" in window && !t.ie && !t.edge, e.pointerEventsSupported = "onpointerdown" in window && (t.edge || t.ie && +t.version >= 11), e.domSupported = typeof document != "undefined";
var s = document.documentElement.style;
e.transform3dSupported = (t.ie && "transition" in s || t.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || t.ie && +t.version >= 9;
}
var Sv = 12, Fb = "sans-serif", Kn = Sv + "px " + Fb, zb = 20, Gb = 100, Hb = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
function Wb(r) {
var e = {};
if (typeof JSON == "undefined")
return e;
for (var t = 0; t < r.length; t++) {
var n = String.fromCharCode(t + 32), i = (r.charCodeAt(t) - zb) / Gb;
e[n] = i;
}
return e;
}
var Ub = Wb(Hb), ea = {
createCanvas: function() {
return typeof document != "undefined" && document.createElement("canvas");
},
measureText: /* @__PURE__ */ function() {
var r, e;
return function(t, n) {
if (!r) {
var i = ea.createCanvas();
r = i && i.getContext("2d");
}
if (r)
return e !== n && (e = r.font = n || Kn), r.measureText(t);
t = t || "", n = n || Kn;
var a = /((?:\d+)?\.?\d*)px/.exec(n), o = a && +a[1] || Sv, s = 0;
if (n.indexOf("mono") >= 0)
s = o * t.length;
else
for (var l = 0; l < t.length; l++) {
var u = Ub[t[l]];
s += u == null ? o : u * o;
}
return { width: s };
};
}(),
loadImage: function(r, e, t) {
var n = new Image();
return n.onload = e, n.onerror = t, n.src = r, n;
}
}, Lm = ln([
"Function",
"RegExp",
"Date",
"Error",
"CanvasGradient",
"CanvasPattern",
"Image",
"Canvas"
], function(r, e) {
return r["[object " + e + "]"] = !0, r;
}, {}), Pm = ln([
"Int8",
"Uint8",
"Uint8Clamped",
"Int16",
"Uint16",
"Int32",
"Uint32",
"Float32",
"Float64"
], function(r, e) {
return r["[object " + e + "Array]"] = !0, r;
}, {}), ta = Object.prototype.toString, Tl = Array.prototype, Yb = Tl.forEach, $b = Tl.filter, bv = Tl.slice, Xb = Tl.map, Zc = function() {
}.constructor, Io = Zc ? Zc.prototype : null, wv = "__proto__", Zb = 2311;
function km() {
return Zb++;
}
function tn() {
for (var r = [], e = 0; e < arguments.length; e++)
r[e] = arguments[e];
typeof console != "undefined" && console.error.apply(console, r);
}
function ie(r) {
if (r == null || typeof r != "object")
return r;
var e = r, t = ta.call(r);
if (t === "[object Array]") {
if (!Ya(r)) {
e = [];
for (var n = 0, i = r.length; n < i; n++)
e[n] = ie(r[n]);
}
} else if (Pm[t]) {
if (!Ya(r)) {
var a = r.constructor;
if (a.from)
e = a.from(r);
else {
e = new a(r.length);
for (var n = 0, i = r.length; n < i; n++)
e[n] = r[n];
}
}
} else if (!Lm[t] && !Ya(r) && !Qn(r)) {
e = {};
for (var o in r)
r.hasOwnProperty(o) && o !== wv && (e[o] = ie(r[o]));
}
return e;
}
function le(r, e, t) {
if (!q(e) || !q(r))
return t ? ie(e) : r;
for (var n in e)
if (e.hasOwnProperty(n) && n !== wv) {
var i = r[n], a = e[n];
q(a) && q(i) && !H(a) && !H(i) && !Qn(a) && !Qn(i) && !qc(a) && !qc(i) && !Ya(a) && !Ya(i) ? le(i, a, t) : (t || !(n in r)) && (r[n] = ie(e[n]));
}
return r;
}
function qb(r, e) {
for (var t = r[0], n = 1, i = r.length; n < i; n++)
t = le(t, r[n], e);
return t;
}
function z(r, e) {
if (Object.assign)
Object.assign(r, e);
else
for (var t in e)
e.hasOwnProperty(t) && t !== wv && (r[t] = e[t]);
return r;
}
function ue(r, e, t) {
for (var n = Me(e), i = 0, a = n.length; i < a; i++) {
var o = n[i];
r[o] == null && (r[o] = e[o]);
}
return r;
}
function ve(r, e) {
if (r) {
if (r.indexOf)
return r.indexOf(e);
for (var t = 0, n = r.length; t < n; t++)
if (r[t] === e)
return t;
}
return -1;
}
function Kb(r, e) {
var t = r.prototype;
function n() {
}
n.prototype = e.prototype, r.prototype = new n();
for (var i in t)
t.hasOwnProperty(i) && (r.prototype[i] = t[i]);
r.prototype.constructor = r, r.superClass = e;
}
function Jt(r, e, t) {
if (r = "prototype" in r ? r.prototype : r, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
for (var n = Object.getOwnPropertyNames(e), i = 0; i < n.length; i++) {
var a = n[i];
a !== "constructor" && r[a] == null && (r[a] = e[a]);
}
else
ue(r, e);
}
function ut(r) {
return !r || typeof r == "string" ? !1 : typeof r.length == "number";
}
function I(r, e, t) {
if (r && e)
if (r.forEach && r.forEach === Yb)
r.forEach(e, t);
else if (r.length === +r.length)
for (var n = 0, i = r.length; n < i; n++)
e.call(t, r[n], n, r);
else
for (var a in r)
r.hasOwnProperty(a) && e.call(t, r[a], a, r);
}
function U(r, e, t) {
if (!r)
return [];
if (!e)
return xv(r);
if (r.map && r.map === Xb)
return r.map(e, t);
for (var n = [], i = 0, a = r.length; i < a; i++)
n.push(e.call(t, r[i], i, r));
return n;
}
function ln(r, e, t, n) {
if (r && e) {
for (var i = 0, a = r.length; i < a; i++)
t = e.call(n, t, r[i], i, r);
return t;
}
}
function De(r, e, t) {
if (!r)
return [];
if (!e)
return xv(r);
if (r.filter && r.filter === $b)
return r.filter(e, t);
for (var n = [], i = 0, a = r.length; i < a; i++)
e.call(t, r[i], i, r) && n.push(r[i]);
return n;
}
function Me(r) {
if (!r)
return [];
if (Object.keys)
return Object.keys(r);
var e = [];
for (var t in r)
r.hasOwnProperty(t) && e.push(t);
return e;
}
function Qb(r, e) {
for (var t = [], n = 2; n < arguments.length; n++)
t[n - 2] = arguments[n];
return function() {
return r.apply(e, t.concat(bv.call(arguments)));
};
}
var Te = Io && X(Io.bind) ? Io.call.bind(Io.bind) : Qb;
function se(r) {
for (var e = [], t = 1; t < arguments.length; t++)
e[t - 1] = arguments[t];
return function() {
return r.apply(this, e.concat(bv.call(arguments)));
};
}
function H(r) {
return Array.isArray ? Array.isArray(r) : ta.call(r) === "[object Array]";
}
function X(r) {
return typeof r == "function";
}
function $(r) {
return typeof r == "string";
}
function zs(r) {
return ta.call(r) === "[object String]";
}
function _e(r) {
return typeof r == "number";
}
function q(r) {
var e = typeof r;
return e === "function" || !!r && e === "object";
}
function qc(r) {
return !!Lm[ta.call(r)];
}
function ft(r) {
return !!Pm[ta.call(r)];
}
function Qn(r) {
return typeof r == "object" && typeof r.nodeType == "number" && typeof r.ownerDocument == "object";
}
function Cl(r) {
return r.colorStops != null;
}
function jb(r) {
return r.image != null;
}
function Om(r) {
return ta.call(r) === "[object RegExp]";
}
function ao(r) {
return r !== r;
}
function Nt() {
for (var r = [], e = 0; e < arguments.length; e++)
r[e] = arguments[e];
for (var t = 0, n = r.length; t < n; t++)
if (r[t] != null)
return r[t];
}
function re(r, e) {
return r != null ? r : e;
}
function Yn(r, e, t) {
return r != null ? r : e != null ? e : t;
}
function xv(r) {
for (var e = [], t = 1; t < arguments.length; t++)
e[t - 1] = arguments[t];
return bv.apply(r, e);
}
function Rm(r) {
if (typeof r == "number")
return [r, r, r, r];
var e = r.length;
return e === 2 ? [r[0], r[1], r[0], r[1]] : e === 3 ? [r[0], r[1], r[2], r[1]] : r;
}
function J(r, e) {
if (!r)
throw new Error(e);
}
function fr(r) {
return r == null ? null : typeof r.trim == "function" ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
var Nm = "__ec_primitive__";
function Gs(r) {
r[Nm] = !0;
}
function Ya(r) {
return r[Nm];
}
var Jb = function() {
function r() {
this.data = {};
}
return r.prototype.delete = function(e) {
var t = this.has(e);
return t && delete this.data[e], t;
}, r.prototype.has = function(e) {
return this.data.hasOwnProperty(e);
}, r.prototype.get = function(e) {
return this.data[e];
}, r.prototype.set = function(e, t) {
return this.data[e] = t, this;
}, r.prototype.keys = function() {
return Me(this.data);
}, r.prototype.forEach = function(e) {
var t = this.data;
for (var n in t)
t.hasOwnProperty(n) && e(t[n], n);
}, r;
}(), Vm = typeof Map == "function";
function ew() {
return Vm ? /* @__PURE__ */ new Map() : new Jb();
}
var tw = function() {
function r(e) {
var t = H(e);
this.data = ew();
var n = this;
e instanceof r ? e.each(i) : e && I(e, i);
function i(a, o) {
t ? n.set(a, o) : n.set(o, a);
}
}
return r.prototype.hasKey = function(e) {
return this.data.has(e);
}, r.prototype.get = function(e) {
return this.data.get(e);
}, r.prototype.set = function(e, t) {
return this.data.set(e, t), t;
}, r.prototype.each = function(e, t) {
this.data.forEach(function(n, i) {
e.call(t, n, i);
});
}, r.prototype.keys = function() {
var e = this.data.keys();
return Vm ? Array.from(e) : e;
}, r.prototype.removeKey = function(e) {
this.data.delete(e);
}, r;
}();
function j(r) {
return new tw(r);
}
function rw(r, e) {
for (var t = new r.constructor(r.length + e.length), n = 0; n < r.length; n++)
t[n] = r[n];
for (var i = r.length, n = 0; n < e.length; n++)
t[n + i] = e[n];
return t;
}
function Dl(r, e) {
var t;
if (Object.create)
t = Object.create(r);
else {
var n = function() {
};
n.prototype = r, t = new n();
}
return e && z(t, e), t;
}
function Bm(r) {
var e = r.style;
e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
}
function mr(r, e) {
return r.hasOwnProperty(e);
}
function lt() {
}
var nw = 180 / Math.PI;
function ra(r, e) {
return r == null && (r = 0), e == null && (e = 0), [r, e];
}
function iw(r) {
return [r[0], r[1]];
}
function Kc(r, e, t) {
return r[0] = e[0] + t[0], r[1] = e[1] + t[1], r;
}
function Fm(r, e, t) {
return r[0] = e[0] - t[0], r[1] = e[1] - t[1], r;
}
function aw(r) {
return Math.sqrt(ow(r));
}
function ow(r) {
return r[0] * r[0] + r[1] * r[1];
}
function hu(r, e, t) {
return r[0] = e[0] * t, r[1] = e[1] * t, r;
}
function Tv(r, e) {
var t = aw(e);
return t === 0 ? (r[0] = 0, r[1] = 0) : (r[0] = e[0] / t, r[1] = e[1] / t), r;
}
function Qf(r, e) {
return Math.sqrt((r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]));
}
var jf = Qf;
function sw(r, e) {
return (r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]);
}
var Fi = sw;
function xs(r, e, t, n) {
return r[0] = e[0] + n * (t[0] - e[0]), r[1] = e[1] + n * (t[1] - e[1]), r;
}
function Bt(r, e, t) {
var n = e[0], i = e[1];
return r[0] = t[0] * n + t[2] * i + t[4], r[1] = t[1] * n + t[3] * i + t[5], r;
}
function ki(r, e, t) {
return r[0] = Math.min(e[0], t[0]), r[1] = Math.min(e[1], t[1]), r;
}
function Oi(r, e, t) {
return r[0] = Math.max(e[0], t[0]), r[1] = Math.max(e[1], t[1]), r;
}
var vi = /* @__PURE__ */ function() {
function r(e, t) {
this.target = e, this.topTarget = t && t.topTarget;
}
return r;
}(), lw = function() {
function r(e) {
this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
}
return r.prototype._dragStart = function(e) {
for (var t = e.target; t && !t.draggable; )
t = t.parent || t.__hostTarget;
t && (this._draggingTarget = t, t.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new vi(t, e), "dragstart", e.event));
}, r.prototype._drag = function(e) {
var t = this._draggingTarget;
if (t) {
var n = e.offsetX, i = e.offsetY, a = n - this._x, o = i - this._y;
this._x = n, this._y = i, t.drift(a, o, e), this.handler.dispatchToElement(new vi(t, e), "drag", e.event);
var s = this.handler.findHover(n, i, t).target, l = this._dropTarget;
this._dropTarget = s, t !== s && (l && s !== l && this.handler.dispatchToElement(new vi(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new vi(s, e), "dragenter", e.event));
}
}, r.prototype._dragEnd = function(e) {
var t = this._draggingTarget;
t && (t.dragging = !1), this.handler.dispatchToElement(new vi(t, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new vi(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
}, r;
}(), er = function() {
function r(e) {
e && (this._$eventProcessor = e);
}
return r.prototype.on = function(e, t, n, i) {
this._$handlers || (this._$handlers = {});
var a = this._$handlers;
if (typeof t == "function" && (i = n, n = t, t = null), !n || !e)
return this;
var o = this._$eventProcessor;
t != null && o && o.normalizeQuery && (t = o.normalizeQuery(t)), a[e] || (a[e] = []);
for (var s = 0; s < a[e].length; s++)
if (a[e][s].h === n)
return this;
var l = {
h: n,
query: t,
ctx: i || this,
callAtLast: n.zrEventfulCallAtLast
}, u = a[e].length - 1, f = a[e][u];
return f && f.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
}, r.prototype.isSilent = function(e) {
var t = this._$handlers;
return !t || !t[e] || !t[e].length;
}, r.prototype.off = function(e, t) {
var n = this._$handlers;
if (!n)
return this;
if (!e)
return this._$handlers = {}, this;
if (t) {
if (n[e]) {
for (var i = [], a = 0, o = n[e].length; a < o; a++)
n[e][a].h !== t && i.push(n[e][a]);
n[e] = i;
}
n[e] && n[e].length === 0 && delete n[e];
} else
delete n[e];
return this;
}, r.prototype.trigger = function(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
if (!this._$handlers)
return this;
var i = this._$handlers[e], a = this._$eventProcessor;
if (i)
for (var o = t.length, s = i.length, l = 0; l < s; l++) {
var u = i[l];
if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
switch (o) {
case 0:
u.h.call(u.ctx);
break;
case 1:
u.h.call(u.ctx, t[0]);
break;
case 2:
u.h.call(u.ctx, t[0], t[1]);
break;
default:
u.h.apply(u.ctx, t);
break;
}
}
return a && a.afterTrigger && a.afterTrigger(e), this;
}, r.prototype.triggerWithContext = function(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
if (!this._$handlers)
return this;
var i = this._$handlers[e], a = this._$eventProcessor;
if (i)
for (var o = t.length, s = t[o - 1], l = i.length, u = 0; u < l; u++) {
var f = i[u];
if (!(a && a.filter && f.query != null && !a.filter(e, f.query)))
switch (o) {
case 0:
f.h.call(s);
break;
case 1:
f.h.call(s, t[0]);
break;
case 2:
f.h.call(s, t[0], t[1]);
break;
default:
f.h.apply(s, t.slice(1, o - 1));
break;
}
}
return a && a.afterTrigger && a.afterTrigger(e), this;
}, r;
}(), uw = Math.log(2);
function Jf(r, e, t, n, i, a) {
var o = n + "-" + i, s = r.length;
if (a.hasOwnProperty(o))
return a[o];
if (e === 1) {
var l = Math.round(Math.log((1 << s) - 1 & ~i) / uw);
return r[t][l];
}
for (var u = n | 1 << t, f = t + 1; n & 1 << f; )
f++;
for (var h = 0, c = 0, v = 0; c < s; c++) {
var d = 1 << c;
d & i || (h += (v % 2 ? -1 : 1) * r[t][c] * Jf(r, e - 1, f, u, i | d, a), v++);
}
return a[o] = h, h;
}
function Qc(r, e) {
var t = [
[r[0], r[1], 1, 0, 0, 0, -e[0] * r[0], -e[0] * r[1]],
[0, 0, 0, r[0], r[1], 1, -e[1] * r[0], -e[1] * r[1]],
[r[2], r[3], 1, 0, 0, 0, -e[2] * r[2], -e[2] * r[3]],
[0, 0, 0, r[2], r[3], 1, -e[3] * r[2], -e[3] * r[3]],
[r[4], r[5], 1, 0, 0, 0, -e[4] * r[4], -e[4] * r[5]],
[0, 0, 0, r[4], r[5], 1, -e[5] * r[4], -e[5] * r[5]],
[r[6], r[7], 1, 0, 0, 0, -e[6] * r[6], -e[6] * r[7]],
[0, 0, 0, r[6], r[7], 1, -e[7] * r[6], -e[7] * r[7]]
], n = {}, i = Jf(t, 8, 0, 0, 0, n);
if (i !== 0) {
for (var a = [], o = 0; o < 8; o++)
for (var s = 0; s < 8; s++)
a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * Jf(t, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, n) / i * e[o];
return function(l, u, f) {
var h = u * a[6] + f * a[7] + 1;
l[0] = (u * a[0] + f * a[1] + a[2]) / h, l[1] = (u * a[3] + f * a[4] + a[5]) / h;
};
}
}
var jc = "___zrEVENTSAVED", vu = [];
function fw(r, e, t, n, i) {
return eh(vu, e, n, i, !0) && eh(r, t, vu[0], vu[1]);
}
function eh(r, e, t, n, i) {
if (e.getBoundingClientRect && te.domSupported && !zm(e)) {
var a = e[jc] || (e[jc] = {}), o = hw(e, a), s = vw(o, a, i);
if (s)
return s(r, t, n), !0;
}
return !1;
}
function hw(r, e) {
var t = e.markers;
if (t)
return t;
t = e.markers = [];
for (var n = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
s.cssText = [
"position: absolute",
"visibility: hidden",
"padding: 0",
"margin: 0",
"border-width: 0",
"user-select: none",
"width:0",
"height:0",
n[l] + ":0",
i[u] + ":0",
n[1 - l] + ":auto",
i[1 - u] + ":auto",
""
].join("!important;"), r.appendChild(o), t.push(o);
}
return t;
}
function vw(r, e, t) {
for (var n = t ? "invTrans" : "trans", i = e[n], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
var f = r[u].getBoundingClientRect(), h = 2 * u, c = f.left, v = f.top;
o.push(c, v), l = l && a && c === a[h] && v === a[h + 1], s.push(r[u].offsetLeft, r[u].offsetTop);
}
return l && i ? i : (e.srcCoords = o, e[n] = t ? Qc(s, o) : Qc(o, s));
}
function zm(r) {
return r.nodeName.toUpperCase() === "CANVAS";
}
var cw = /([&<>"'])/g, dw = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
};
function yt(r) {
return r == null ? "" : (r + "").replace(cw, function(e, t) {
return dw[t];
});
}
var pw = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, cu = [], gw = te.browser.firefox && +te.browser.version.split(".")[0] < 39;
function th(r, e, t, n) {
return t = t || {}, n ? Jc(r, e, t) : gw && e.layerX != null && e.layerX !== e.offsetX ? (t.zrX = e.layerX, t.zrY = e.layerY) : e.offsetX != null ? (t.zrX = e.offsetX, t.zrY = e.offsetY) : Jc(r, e, t), t;
}
function Jc(r, e, t) {
if (te.domSupported && r.getBoundingClientRect) {
var n = e.clientX, i = e.clientY;
if (zm(r)) {
var a = r.getBoundingClientRect();
t.zrX = n - a.left, t.zrY = i - a.top;
return;
} else if (eh(cu, r, n, i)) {
t.zrX = cu[0], t.zrY = cu[1];
return;
}
}
t.zrX = t.zrY = 0;
}
function Cv(r) {
return r || window.event;
}
function Lt(r, e, t) {
if (e = Cv(e), e.zrX != null)
return e;
var n = e.type, i = n && n.indexOf("touch") >= 0;
if (i) {
var o = n !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
o && th(r, o, e, t);
} else {
th(r, e, e, t);
var a = yw(e);
e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
}
var s = e.button;
return e.which == null && s !== void 0 && pw.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
}
function yw(r) {
var e = r.wheelDelta;
if (e)
return e;
var t = r.deltaX, n = r.deltaY;
if (t == null || n == null)
return e;
var i = Math.abs(n !== 0 ? n : t), a = n > 0 ? -1 : n < 0 ? 1 : t > 0 ? -1 : 1;
return 3 * i * a;
}
function rh(r, e, t, n) {
r.addEventListener(e, t, n);
}
function mw(r, e, t, n) {
r.removeEventListener(e, t, n);
}
var Gm = function(r) {
r.preventDefault(), r.stopPropagation(), r.cancelBubble = !0;
}, _w = function() {
function r() {
this._track = [];
}
return r.prototype.recognize = function(e, t, n) {
return this._doTrack(e, t, n), this._recognize(e);
}, r.prototype.clear = function() {
return this._track.length = 0, this;
}, r.prototype._doTrack = function(e, t, n) {
var i = e.touches;
if (i) {
for (var a = {
points: [],
touches: [],
target: t,
event: e
}, o = 0, s = i.length; o < s; o++) {
var l = i[o], u = th(n, l, {});
a.points.push([u.zrX, u.zrY]), a.touches.push(l);
}
this._track.push(a);
}
}, r.prototype._recognize = function(e) {
for (var t in du)
if (du.hasOwnProperty(t)) {
var n = du[t](this._track, e);
if (n)
return n;
}
}, r;
}();
function ed(r) {
var e = r[1][0] - r[0][0], t = r[1][1] - r[0][1];
return Math.sqrt(e * e + t * t);
}
function Sw(r) {
return [
(r[0][0] + r[1][0]) / 2,
(r[0][1] + r[1][1]) / 2
];
}
var du = {
pinch: function(r, e) {
var t = r.length;
if (t) {
var n = (r[t - 1] || {}).points, i = (r[t - 2] || {}).points || n;
if (i && i.length > 1 && n && n.length > 1) {
var a = ed(n) / ed(i);
!isFinite(a) && (a = 1), e.pinchScale = a;
var o = Sw(n);
return e.pinchX = o[0], e.pinchY = o[1], {
type: "pinch",
target: r[0].target,
event: e
};
}
}
}
};
function zi() {
return [1, 0, 0, 1, 0, 0];
}
function Dv(r) {
return r[0] = 1, r[1] = 0, r[2] = 0, r[3] = 1, r[4] = 0, r[5] = 0, r;
}
function bw(r, e) {
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r;
}
function Gi(r, e, t) {
var n = e[0] * t[0] + e[2] * t[1], i = e[1] * t[0] + e[3] * t[1], a = e[0] * t[2] + e[2] * t[3], o = e[1] * t[2] + e[3] * t[3], s = e[0] * t[4] + e[2] * t[5] + e[4], l = e[1] * t[4] + e[3] * t[5] + e[5];
return r[0] = n, r[1] = i, r[2] = a, r[3] = o, r[4] = s, r[5] = l, r;
}
function nh(r, e, t) {
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4] + t[0], r[5] = e[5] + t[1], r;
}
function Mv(r, e, t, n) {
n === void 0 && (n = [0, 0]);
var i = e[0], a = e[2], o = e[4], s = e[1], l = e[3], u = e[5], f = Math.sin(t), h = Math.cos(t);
return r[0] = i * h + s * f, r[1] = -i * f + s * h, r[2] = a * h + l * f, r[3] = -a * f + h * l, r[4] = h * (o - n[0]) + f * (u - n[1]) + n[0], r[5] = h * (u - n[1]) - f * (o - n[0]) + n[1], r;
}
function ww(r, e, t) {
var n = t[0], i = t[1];
return r[0] = e[0] * n, r[1] = e[1] * i, r[2] = e[2] * n, r[3] = e[3] * i, r[4] = e[4] * n, r[5] = e[5] * i, r;
}
function Ml(r, e) {
var t = e[0], n = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = t * o - a * n;
return l ? (l = 1 / l, r[0] = o * l, r[1] = -a * l, r[2] = -n * l, r[3] = t * l, r[4] = (n * s - o * i) * l, r[5] = (a * i - t * s) * l, r) : null;
}
var K = function() {
function r(e, t) {
this.x = e || 0, this.y = t || 0;
}
return r.prototype.copy = function(e) {
return this.x = e.x, this.y = e.y, this;
}, r.prototype.clone = function() {
return new r(this.x, this.y);
}, r.prototype.set = function(e, t) {
return this.x = e, this.y = t, this;
}, r.prototype.equal = function(e) {
return e.x === this.x && e.y === this.y;
}, r.prototype.add = function(e) {
return this.x += e.x, this.y += e.y, this;
}, r.prototype.scale = function(e) {
this.x *= e, this.y *= e;
}, r.prototype.scaleAndAdd = function(e, t) {
this.x += e.x * t, this.y += e.y * t;
}, r.prototype.sub = function(e) {
return this.x -= e.x, this.y -= e.y, this;
}, r.prototype.dot = function(e) {
return this.x * e.x + this.y * e.y;
}, r.prototype.len = function() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}, r.prototype.lenSquare = function() {
return this.x * this.x + this.y * this.y;
}, r.prototype.normalize = function() {
var e = this.len();
return this.x /= e, this.y /= e, this;
}, r.prototype.distance = function(e) {
var t = this.x - e.x, n = this.y - e.y;
return Math.sqrt(t * t + n * n);
}, r.prototype.distanceSquare = function(e) {
var t = this.x - e.x, n = this.y - e.y;
return t * t + n * n;
}, r.prototype.negate = function() {
return this.x = -this.x, this.y = -this.y, this;
}, r.prototype.transform = function(e) {
if (e) {
var t = this.x, n = this.y;
return this.x = e[0] * t + e[2] * n + e[4], this.y = e[1] * t + e[3] * n + e[5], this;
}
}, r.prototype.toArray = function(e) {
return e[0] = this.x, e[1] = this.y, e;
}, r.prototype.fromArray = function(e) {
this.x = e[0], this.y = e[1];
}, r.set = function(e, t, n) {
e.x = t, e.y = n;
}, r.copy = function(e, t) {
e.x = t.x, e.y = t.y;
}, r.len = function(e) {
return Math.sqrt(e.x * e.x + e.y * e.y);
}, r.lenSquare = function(e) {
return e.x * e.x + e.y * e.y;
}, r.dot = function(e, t) {
return e.x * t.x + e.y * t.y;
}, r.add = function(e, t, n) {
e.x = t.x + n.x, e.y = t.y + n.y;
}, r.sub = function(e, t, n) {
e.x = t.x - n.x, e.y = t.y - n.y;
}, r.scale = function(e, t, n) {
e.x = t.x * n, e.y = t.y * n;
}, r.scaleAndAdd = function(e, t, n, i) {
e.x = t.x + n.x * i, e.y = t.y + n.y * i;
}, r.lerp = function(e, t, n, i) {
var a = 1 - i;
e.x = a * t.x + i * n.x, e.y = a * t.y + i * n.y;
}, r;
}(), Lo = Math.min, Po = Math.max, dn = new K(), pn = new K(), gn = new K(), yn = new K(), da = new K(), pa = new K(), ye = function() {
function r(e, t, n, i) {
n < 0 && (e = e + n, n = -n), i < 0 && (t = t + i, i = -i), this.x = e, this.y = t, this.width = n, this.height = i;
}
return r.prototype.union = function(e) {
var t = Lo(e.x, this.x), n = Lo(e.y, this.y);
isFinite(this.x) && isFinite(this.width) ? this.width = Po(e.x + e.width, this.x + this.width) - t : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = Po(e.y + e.height, this.y + this.height) - n : this.height = e.height, this.x = t, this.y = n;
}, r.prototype.applyTransform = function(e) {
r.applyTransform(this, this, e);
}, r.prototype.calculateTransform = function(e) {
var t = this, n = e.width / t.width, i = e.height / t.height, a = zi();
return nh(a, a, [-t.x, -t.y]), ww(a, a, [n, i]), nh(a, a, [e.x, e.y]), a;
}, r.prototype.intersect = function(e, t) {
if (!e)
return !1;
e instanceof r || (e = r.create(e));
var n = this, i = n.x, a = n.x + n.width, o = n.y, s = n.y + n.height, l = e.x, u = e.x + e.width, f = e.y, h = e.y + e.height, c = !(a < l || u < i || s < f || h < o);
if (t) {
var v = 1 / 0, d = 0, p = Math.abs(a - l), g = Math.abs(u - i), y = Math.abs(s - f), m = Math.abs(h - o), _ = Math.min(p, g), S = Math.min(y, m);
a < l || u < i ? _ > d && (d = _, p < g ? K.set(pa, -p, 0) : K.set(pa, g, 0)) : _ < v && (v = _, p < g ? K.set(da, p, 0) : K.set(da, -g, 0)), s < f || h < o ? S > d && (d = S, y < m ? K.set(pa, 0, -y) : K.set(pa, 0, m)) : _ < v && (v = _, y < m ? K.set(da, 0, y) : K.set(da, 0, -m));
}
return t && K.copy(t, c ? da : pa), c;
}, r.prototype.contain = function(e, t) {
var n = this;
return e >= n.x && e <= n.x + n.width && t >= n.y && t <= n.y + n.height;
}, r.prototype.clone = function() {
return new r(this.x, this.y, this.width, this.height);
}, r.prototype.copy = function(e) {
r.copy(this, e);
}, r.prototype.plain = function() {
return {
x: this.x,
y: this.y,
width: this.width,
height: this.height
};
}, r.prototype.isFinite = function() {
return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
}, r.prototype.isZero = function() {
return this.width === 0 || this.height === 0;
}, r.create = function(e) {
return new r(e.x, e.y, e.width, e.height);
}, r.copy = function(e, t) {
e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height;
}, r.applyTransform = function(e, t, n) {
if (!n) {
e !== t && r.copy(e, t);
return;
}
if (n[1] < 1e-5 && n[1] > -1e-5 && n[2] < 1e-5 && n[2] > -1e-5) {
var i = n[0], a = n[3], o = n[4], s = n[5];
e.x = t.x * i + o, e.y = t.y * a + s, e.width = t.width * i, e.height = t.height * a, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
return;
}
dn.x = gn.x = t.x, dn.y = yn.y = t.y, pn.x = yn.x = t.x + t.width, pn.y = gn.y = t.y + t.height, dn.transform(n), yn.transform(n), pn.transform(n), gn.transform(n), e.x = Lo(dn.x, pn.x, gn.x, yn.x), e.y = Lo(dn.y, pn.y, gn.y, yn.y);
var l = Po(dn.x, pn.x, gn.x, yn.x), u = Po(dn.y, pn.y, gn.y, yn.y);
e.width = l - e.x, e.height = u - e.y;
}, r;
}(), Hm = "silent";
function xw(r, e, t) {
return {
type: r,
event: t,
target: e.target,
topTarget: e.topTarget,
cancelBubble: !1,
offsetX: t.zrX,
offsetY: t.zrY,
gestureEvent: t.gestureEvent,
pinchX: t.pinchX,
pinchY: t.pinchY,
pinchScale: t.pinchScale,
wheelDelta: t.zrDelta,
zrByTouch: t.zrByTouch,
which: t.which,
stop: Tw
};
}
function Tw() {
Gm(this.event);
}
var Cw = function(r) {
F(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.handler = null, t;
}
return e.prototype.dispose = function() {
}, e.prototype.setCursor = function() {
}, e;
}(er), ga = /* @__PURE__ */ function() {
function r(e, t) {
this.x = e, this.y = t;
}
return r;
}(), Dw = [
"click",
"dblclick",
"mousewheel",
"mouseout",
"mouseup",
"mousedown",
"mousemove",
"contextmenu"
], pu = new ye(0, 0, 0, 0), Wm = function(r) {
F(e, r);
function e(t, n, i, a, o) {
var s = r.call(this) || this;
return s._hovered = new ga(0, 0), s.storage = t, s.painter = n, s.painterRoot = a, s._pointerSize = o, i = i || new Cw(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new lw(s), s;
}
return e.prototype.setHandlerProxy = function(t) {
this.proxy && this.proxy.dispose(), t && (I(Dw, function(n) {
t.on && t.on(n, this[n], this);
}, this), t.handler = this), this.proxy = t;
}, e.prototype.mousemove = function(t) {
var n = t.zrX, i = t.zrY, a = Um(this, n, i), o = this._hovered, s = o.target;
s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
var l = this._hovered = a ? new ga(n, i) : this.findHover(n, i), u = l.target, f = this.proxy;
f.setCursor && f.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", t), this.dispatchToElement(l, "mousemove", t), u && u !== s && this.dispatchToElement(l, "mouseover", t);
}, e.prototype.mouseout = function(t) {
var n = t.zrEventControl;
n !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", t), n !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: t });
}, e.prototype.resize = function() {
this._hovered = new ga(0, 0);
}, e.prototype.dispatch = function(t, n) {
var i = this[t];
i && i.call(this, n);
}, e.prototype.dispose = function() {
this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
}, e.prototype.setCursorStyle = function(t) {
var n = this.proxy;
n.setCursor && n.setCursor(t);
}, e.prototype.dispatchToElement = function(t, n, i) {
t = t || {};
var a = t.target;
if (!(a && a.silent)) {
for (var o = "on" + n, s = xw(n, t, i); a && (a[o] && (s.cancelBubble = !!a[o].call(a, s)), a.trigger(n, s), a = a.__hostTarget ? a.__hostTarget : a.parent, !s.cancelBubble); )
;
s.cancelBubble || (this.trigger(n, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(n, s);
}));
}
}, e.prototype.findHover = function(t, n, i) {
var a = this.storage.getDisplayList(), o = new ga(t, n);
if (td(a, o, t, n, i), this._pointerSize && !o.target) {
for (var s = [], l = this._pointerSize, u = l / 2, f = new ye(t - u, n - u, l, l), h = a.length - 1; h >= 0; h--) {
var c = a[h];
c !== i && !c.ignore && !c.ignoreCoarsePointer && (!c.parent || !c.parent.ignoreCoarsePointer) && (pu.copy(c.getBoundingRect()), c.transform && pu.applyTransform(c.transform), pu.intersect(f) && s.push(c));
}
if (s.length)
for (var v = 4, d = Math.PI / 12, p = Math.PI * 2, g = 0; g < u; g += v)
for (var y = 0; y < p; y += d) {
var m = t + g * Math.cos(y), _ = n + g * Math.sin(y);
if (td(s, o, m, _, i), o.target)
return o;
}
}
return o;
}, e.prototype.processGesture = function(t, n) {
this._gestureMgr || (this._gestureMgr = new _w());
var i = this._gestureMgr;
n === "start" && i.clear();
var a = i.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
if (n === "end" && i.clear(), a) {
var o = a.type;
t.gestureEvent = o;
var s = new ga();
s.target = a.target, this.dispatchToElement(s, o, a.event);
}
}, e;
}(er);
I(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(r) {
Wm.prototype[r] = function(e) {
var t = e.zrX, n = e.zrY, i = Um(this, t, n), a, o;
if ((r !== "mouseup" || !i) && (a = this.findHover(t, n), o = a.target), r === "mousedown")
this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
else if (r === "mouseup")
this._upEl = o;
else if (r === "click") {
if (this._downEl !== this._upEl || !this._downPoint || jf(this._downPoint, [e.zrX, e.zrY]) > 4)
return;
this._downPoint = null;
}
this.dispatchToElement(a, r, e);
};
});
function Mw(r, e, t) {
if (r[r.rectHover ? "rectContain" : "contain"](e, t)) {
for (var n = r, i = void 0, a = !1; n; ) {
if (n.ignoreClip && (a = !0), !a) {
var o = n.getClipPath();
if (o && !o.contain(e, t))
return !1;
}
n.silent && (i = !0);
var s = n.__hostTarget;
n = s || n.parent;
}
return i ? Hm : !0;
}
return !1;
}
function td(r, e, t, n, i) {
for (var a = r.length - 1; a >= 0; a--) {
var o = r[a], s = void 0;
if (o !== i && !o.ignore && (s = Mw(o, t, n)) && (!e.topTarget && (e.topTarget = o), s !== Hm)) {
e.target = o;
break;
}
}
}
function Um(r, e, t) {
var n = r.painter;
return e < 0 || e > n.getWidth() || t < 0 || t > n.getHeight();
}
var Ym = 32, ya = 7;
function Aw(r) {
for (var e = 0; r >= Ym; )
e |= r & 1, r >>= 1;
return r + e;
}
function rd(r, e, t, n) {
var i = e + 1;
if (i === t)
return 1;
if (n(r[i++], r[e]) < 0) {
for (; i < t && n(r[i], r[i - 1]) < 0; )
i++;
Ew(r, e, i);
} else
for (; i < t && n(r[i], r[i - 1]) >= 0; )
i++;
return i - e;
}
function Ew(r, e, t) {
for (t--; e < t; ) {
var n = r[e];
r[e++] = r[t], r[t--] = n;
}
}
function nd(r, e, t, n, i) {
for (n === e && n++; n < t; n++) {
for (var a = r[n], o = e, s = n, l; o < s; )
l = o + s >>> 1, i(a, r[l]) < 0 ? s = l : o = l + 1;
var u = n - o;
switch (u) {
case 3:
r[o + 3] = r[o + 2];
case 2:
r[o + 2] = r[o + 1];
case 1:
r[o + 1] = r[o];
break;
default:
for (; u > 0; )
r[o + u] = r[o + u - 1], u--;
}
r[o] = a;
}
}
function gu(r, e, t, n, i, a) {
var o = 0, s = 0, l = 1;
if (a(r, e[t + i]) > 0) {
for (s = n - i; l < s && a(r, e[t + i + l]) > 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s), o += i, l += i;
} else {
for (s = i + 1; l < s && a(r, e[t + i - l]) <= 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s);
var u = o;
o = i - l, l = i - u;
}
for (o++; o < l; ) {
var f = o + (l - o >>> 1);
a(r, e[t + f]) > 0 ? o = f + 1 : l = f;
}
return l;
}
function yu(r, e, t, n, i, a) {
var o = 0, s = 0, l = 1;
if (a(r, e[t + i]) < 0) {
for (s = i + 1; l < s && a(r, e[t + i - l]) < 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s);
var u = o;
o = i - l, l = i - u;
} else {
for (s = n - i; l < s && a(r, e[t + i + l]) >= 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s), o += i, l += i;
}
for (o++; o < l; ) {
var f = o + (l - o >>> 1);
a(r, e[t + f]) < 0 ? l = f : o = f + 1;
}
return l;
}
function Iw(r, e) {
var t = ya, n, i, a = 0, o = [];
n = [], i = [];
function s(v, d) {
n[a] = v, i[a] = d, a += 1;
}
function l() {
for (; a > 1; ) {
var v = a - 2;
if (v >= 1 && i[v - 1] <= i[v] + i[v + 1] || v >= 2 && i[v - 2] <= i[v] + i[v - 1])
i[v - 1] < i[v + 1] && v--;
else if (i[v] > i[v + 1])
break;
f(v);
}
}
function u() {
for (; a > 1; ) {
var v = a - 2;
v > 0 && i[v - 1] < i[v + 1] && v--, f(v);
}
}
function f(v) {
var d = n[v], p = i[v], g = n[v + 1], y = i[v + 1];
i[v] = p + y, v === a - 3 && (n[v + 1] = n[v + 2], i[v + 1] = i[v + 2]), a--;
var m = yu(r[g], r, d, p, 0, e);
d += m, p -= m, p !== 0 && (y = gu(r[d + p - 1], r, g, y, y - 1, e), y !== 0 && (p <= y ? h(d, p, g, y) : c(d, p, g, y)));
}
function h(v, d, p, g) {
var y = 0;
for (y = 0; y < d; y++)
o[y] = r[v + y];
var m = 0, _ = p, S = v;
if (r[S++] = r[_++], --g === 0) {
for (y = 0; y < d; y++)
r[S + y] = o[m + y];
return;
}
if (d === 1) {
for (y = 0; y < g; y++)
r[S + y] = r[_ + y];
r[S + g] = o[m];
return;
}
for (var w = t, b, x, T; ; ) {
b = 0, x = 0, T = !1;
do
if (e(r[_], o[m]) < 0) {
if (r[S++] = r[_++], x++, b = 0, --g === 0) {
T = !0;
break;
}
} else if (r[S++] = o[m++], b++, x = 0, --d === 1) {
T = !0;
break;
}
while ((b | x) < w);
if (T)
break;
do {
if (b = yu(r[_], o, m, d, 0, e), b !== 0) {
for (y = 0; y < b; y++)
r[S + y] = o[m + y];
if (S += b, m += b, d -= b, d <= 1) {
T = !0;
break;
}
}
if (r[S++] = r[_++], --g === 0) {
T = !0;
break;
}
if (x = gu(o[m], r, _, g, 0, e), x !== 0) {
for (y = 0; y < x; y++)
r[S + y] = r[_ + y];
if (S += x, _ += x, g -= x, g === 0) {
T = !0;
break;
}
}
if (r[S++] = o[m++], --d === 1) {
T = !0;
break;
}
w--;
} while (b >= ya || x >= ya);
if (T)
break;
w < 0 && (w = 0), w += 2;
}
if (t = w, t < 1 && (t = 1), d === 1) {
for (y = 0; y < g; y++)
r[S + y] = r[_ + y];
r[S + g] = o[m];
} else {
if (d === 0)
throw new Error();
for (y = 0; y < d; y++)
r[S + y] = o[m + y];
}
}
function c(v, d, p, g) {
var y = 0;
for (y = 0; y < g; y++)
o[y] = r[p + y];
var m = v + d - 1, _ = g - 1, S = p + g - 1, w = 0, b = 0;
if (r[S--] = r[m--], --d === 0) {
for (w = S - (g - 1), y = 0; y < g; y++)
r[w + y] = o[y];
return;
}
if (g === 1) {
for (S -= d, m -= d, b = S + 1, w = m + 1, y = d - 1; y >= 0; y--)
r[b + y] = r[w + y];
r[S] = o[_];
return;
}
for (var x = t; ; ) {
var T = 0, C = 0, D = !1;
do
if (e(o[_], r[m]) < 0) {
if (r[S--] = r[m--], T++, C = 0, --d === 0) {
D = !0;
break;
}
} else if (r[S--] = o[_--], C++, T = 0, --g === 1) {
D = !0;
break;
}
while ((T | C) < x);
if (D)
break;
do {
if (T = d - yu(o[_], r, v, d, d - 1, e), T !== 0) {
for (S -= T, m -= T, d -= T, b = S + 1, w = m + 1, y = T - 1; y >= 0; y--)
r[b + y] = r[w + y];
if (d === 0) {
D = !0;
break;
}
}
if (r[S--] = o[_--], --g === 1) {
D = !0;
break;
}
if (C = g - gu(r[m], o, 0, g, g - 1, e), C !== 0) {
for (S -= C, _ -= C, g -= C, b = S + 1, w = _ + 1, y = 0; y < C; y++)
r[b + y] = o[w + y];
if (g <= 1) {
D = !0;
break;
}
}
if (r[S--] = r[m--], --d === 0) {
D = !0;
break;
}
x--;
} while (T >= ya || C >= ya);
if (D)
break;
x < 0 && (x = 0), x += 2;
}
if (t = x, t < 1 && (t = 1), g === 1) {
for (S -= d, m -= d, b = S + 1, w = m + 1, y = d - 1; y >= 0; y--)
r[b + y] = r[w + y];
r[S] = o[_];
} else {
if (g === 0)
throw new Error();
for (w = S - (g - 1), y = 0; y < g; y++)
r[w + y] = o[y];
}
}
return {
mergeRuns: l,
forceMergeRuns: u,
pushRun: s
};
}
function Ts(r, e, t, n) {
t || (t = 0), n || (n = r.length);
var i = n - t;
if (!(i < 2)) {
var a = 0;
if (i < Ym) {
a = rd(r, t, n, e), nd(r, t, n, t + a, e);
return;
}
var o = Iw(r, e), s = Aw(i);
do {
if (a = rd(r, t, n, e), a < s) {
var l = i;
l > s && (l = s), nd(r, t, t + l, t + a, e), a = l;
}
o.pushRun(t, a), o.mergeRuns(), i -= a, t += a;
} while (i !== 0);
o.forceMergeRuns();
}
}
var dr = 1, Cs = 2, Na = 4, id = !1;
function mu() {
id || (id = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
}
function ad(r, e) {
return r.zlevel === e.zlevel ? r.z === e.z ? r.z2 - e.z2 : r.z - e.z : r.zlevel - e.zlevel;
}
var Lw = function() {
function r() {
this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = ad;
}
return r.prototype.traverse = function(e, t) {
for (var n = 0; n < this._roots.length; n++)
this._roots[n].traverse(e, t);
}, r.prototype.getDisplayList = function(e, t) {
t = t || !1;
var n = this._displayList;
return (e || !n.length) && this.updateDisplayList(t), n;
}, r.prototype.updateDisplayList = function(e) {
this._displayListLen = 0;
for (var t = this._roots, n = this._displayList, i = 0, a = t.length; i < a; i++)
this._updateAndAddDisplayable(t[i], null, e);
n.length = this._displayListLen, Ts(n, ad);
}, r.prototype._updateAndAddDisplayable = function(e, t, n) {
if (!(e.ignore && !n)) {
e.beforeUpdate(), e.update(), e.afterUpdate();
var i = e.getClipPath();
if (e.ignoreClip)
t = null;
else if (i) {
t ? t = t.slice() : t = [];
for (var a = i, o = e; a; )
a.parent = o, a.updateTransform(), t.push(a), o = a, a = a.getClipPath();
}
if (e.childrenRef) {
for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
var u = s[l];
e.__dirty && (u.__dirty |= dr), this._updateAndAddDisplayable(u, t, n);
}
e.__dirty = 0;
} else {
var f = e;
t && t.length ? f.__clipPaths = t : f.__clipPaths && f.__clipPaths.length > 0 && (f.__clipPaths = []), isNaN(f.z) && (mu(), f.z = 0), isNaN(f.z2) && (mu(), f.z2 = 0), isNaN(f.zlevel) && (mu(), f.zlevel = 0), this._displayList[this._displayListLen++] = f;
}
var h = e.getDecalElement && e.getDecalElement();
h && this._updateAndAddDisplayable(h, t, n);
var c = e.getTextGuideLine();
c && this._updateAndAddDisplayable(c, t, n);
var v = e.getTextContent();
v && this._updateAndAddDisplayable(v, t, n);
}
}, r.prototype.addRoot = function(e) {
e.__zr && e.__zr.storage === this || this._roots.push(e);
}, r.prototype.delRoot = function(e) {
if (e instanceof Array) {
for (var t = 0, n = e.length; t < n; t++)
this.delRoot(e[t]);
return;
}
var i = ve(this._roots, e);
i >= 0 && this._roots.splice(i, 1);
}, r.prototype.delAllRoots = function() {
this._roots = [], this._displayList = [], this._displayListLen = 0;
}, r.prototype.getRoots = function() {
return this._roots;
}, r.prototype.dispose = function() {
this._displayList = null, this._roots = null;
}, r;
}(), Hs;
Hs = te