el-select-v2
Version:
基于 Element UI 适用于 Vue 2 版本的虚拟列表选择器组件。
1,543 lines • 66.7 kB
JavaScript
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(".vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.el-select-v2__popper .el-select-dropdown__wrap{max-height:unset}.el-select-v2__popper .el-select-dropdown__wrap .el-select-dropdown__list{padding:0}.el-select-v2__popper .el-select-dropdown__wrap .el-select-dropdown__list .el-select-dropdown__header{padding:10px;border-bottom:1px solid #e4e7ed}.el-select-v2__popper .el-select-dropdown__wrap .el-select-dropdown__list .el-select-dropdown__footer{padding:10px;border-top:1px solid #e4e7ed}.el-select-v2__popper .scroller{padding:6px 0;max-height:238px}.el-select-v2__popper .scroller::-webkit-scrollbar{width:6px;height:6px;background-color:transparent}.el-select-v2__popper .scroller::-webkit-scrollbar-thumb{border-radius:4px;background-color:#9093994d}.el-select-v2__popper .scroller::-webkit-scrollbar-thumb:hover{background-color:#90939980}.el-select-v2__popper .el-scrollbar__bar{display:none}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
var Mt = Object.defineProperty, Lt = Object.defineProperties;
var Vt = Object.getOwnPropertyDescriptors;
var Ie = Object.getOwnPropertySymbols;
var Ft = Object.prototype.hasOwnProperty, Ut = Object.prototype.propertyIsEnumerable;
var Pe = (e, t, r) => t in e ? Mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, j = (e, t) => {
for (var r in t || (t = {}))
Ft.call(t, r) && Pe(e, r, t[r]);
if (Ie)
for (var r of Ie(t))
Ut.call(t, r) && Pe(e, r, t[r]);
return e;
}, H = (e, t) => Lt(e, Vt(t));
var Ce = (e, t, r) => new Promise((i, s) => {
var a = (o) => {
try {
l(r.next(o));
} catch (c) {
s(c);
}
}, n = (o) => {
try {
l(r.throw(o));
} catch (c) {
s(c);
}
}, l = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(a, n);
l((r = r.apply(e, t)).next());
});
import "vue";
const Nt = {
computed: {
optionsAllDisabled() {
return this.localOptions.every((e) => e[this.aliasProps.disabled]);
}
},
methods: {
navigateOptions(e) {
if (!this.$refs.select.visible) {
this.$refs.select.visible = !0;
return;
}
if (this.localOptions.length && !this.optionsAllDisabled) {
let t;
if (e === "next" ? this.localIndex >= this.localOptions.length - 1 ? this.localIndex = 0 : this.localIndex++ : e === "prev" && (this.localIndex <= 0 ? this.localIndex = this.localOptions.length - 1 : this.localIndex--), t = this.localOptions[this.localIndex], t[this.aliasProps.disabled] || t._isGroup) {
this.navigateOptions(e);
return;
}
this.$refs.scroller.scrollToItem(this.localIndex);
}
},
updateHoverIndex() {
this.$refs.select && this.$watch(() => this.$refs.select.options, () => {
this.$refs.select.hoverIndex = -1;
const e = this.localOptions[this.localIndex];
e && (this.$refs.select.hoverIndex = this.$refs.select.options.findLastIndex((t) => this.isSameValue(t.value, e[this.aliasProps.value])));
}, {
immediate: !0
});
},
hoverItem(e) {
e[this.aliasProps.disabled] || (this.localIndex = this.localOptions.indexOf(e));
}
}
};
function Ht() {
var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
if (t > 0)
return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
var r = e.indexOf("Trident/");
if (r > 0) {
var i = e.indexOf("rv:");
return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10);
}
var s = e.indexOf("Edge/");
return s > 0 ? parseInt(e.substring(s + 5, e.indexOf(".", s)), 10) : -1;
}
var W = void 0;
function he() {
he.init || (he.init = !0, W = Ht() !== -1);
}
var pe = {
render: function() {
var t = this, r = t.$createElement, i = t._self._c || r;
return i("div", { staticClass: "resize-observer", attrs: { tabindex: "-1" } });
},
staticRenderFns: [],
_scopeId: "data-v-b329ee4c",
name: "resize-observer",
methods: {
compareAndNotify: function() {
(this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.$emit("notify"));
},
addResizeHandlers: function() {
this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
},
removeResizeHandlers: function() {
this._resizeObject && this._resizeObject.onload && (!W && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), delete this._resizeObject.onload);
}
},
mounted: function() {
var t = this;
he(), this.$nextTick(function() {
t._w = t.$el.offsetWidth, t._h = t.$el.offsetHeight;
});
var r = document.createElement("object");
this._resizeObject = r, r.setAttribute("aria-hidden", "true"), r.setAttribute("tabindex", -1), r.onload = this.addResizeHandlers, r.type = "text/html", W && this.$el.appendChild(r), r.data = "about:blank", W || this.$el.appendChild(r);
},
beforeDestroy: function() {
this.removeResizeHandlers();
}
};
function Bt(e) {
e.component("resize-observer", pe), e.component("ResizeObserver", pe);
}
var kt = {
// eslint-disable-next-line no-undef
version: "0.4.5",
install: Bt
}, X = null;
typeof window != "undefined" ? X = window.Vue : typeof global != "undefined" && (X = global.Vue);
X && X.use(kt);
function Y(e) {
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Y = function(t) {
return typeof t;
} : Y = function(t) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, Y(e);
}
function Gt(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function");
}
function qt(e, t) {
for (var r = 0; r < t.length; r++) {
var i = t[r];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
}
}
function Kt(e, t, r) {
return t && qt(e.prototype, t), e;
}
function je(e) {
return Wt(e) || Yt(e) || Xt();
}
function Wt(e) {
if (Array.isArray(e)) {
for (var t = 0, r = new Array(e.length); t < e.length; t++) r[t] = e[t];
return r;
}
}
function Yt(e) {
if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]") return Array.from(e);
}
function Xt() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function Jt(e) {
var t;
return typeof e == "function" ? t = {
callback: e
} : t = e, t;
}
function Zt(e, t) {
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, s, a, n = function(o) {
for (var c = arguments.length, f = new Array(c > 1 ? c - 1 : 0), m = 1; m < c; m++)
f[m - 1] = arguments[m];
if (a = f, !(i && o === s)) {
var v = r.leading;
typeof v == "function" && (v = v(o, s)), (!i || o !== s) && v && e.apply(void 0, [o].concat(je(a))), s = o, clearTimeout(i), i = setTimeout(function() {
e.apply(void 0, [o].concat(je(a))), i = 0;
}, t);
}
};
return n._clear = function() {
clearTimeout(i), i = null;
}, n;
}
function ut(e, t) {
if (e === t) return !0;
if (Y(e) === "object") {
for (var r in e)
if (!ut(e[r], t[r]))
return !1;
return !0;
}
return !1;
}
var Qt = /* @__PURE__ */ function() {
function e(t, r, i) {
Gt(this, e), this.el = t, this.observer = null, this.frozen = !1, this.createObserver(r, i);
}
return Kt(e, [{
key: "createObserver",
value: function(r, i) {
var s = this;
if (this.observer && this.destroyObserver(), !this.frozen) {
if (this.options = Jt(r), this.callback = function(l, o) {
s.options.callback(l, o), l && s.options.once && (s.frozen = !0, s.destroyObserver());
}, this.callback && this.options.throttle) {
var a = this.options.throttleOptions || {}, n = a.leading;
this.callback = Zt(this.callback, this.options.throttle, {
leading: function(o) {
return n === "both" || n === "visible" && o || n === "hidden" && !o;
}
});
}
this.oldResult = void 0, this.observer = new IntersectionObserver(function(l) {
var o = l[0];
if (l.length > 1) {
var c = l.find(function(m) {
return m.isIntersecting;
});
c && (o = c);
}
if (s.callback) {
var f = o.isIntersecting && o.intersectionRatio >= s.threshold;
if (f === s.oldResult) return;
s.oldResult = f, s.callback(f, o);
}
}, this.options.intersection), i.context.$nextTick(function() {
s.observer && s.observer.observe(s.el);
});
}
}
}, {
key: "destroyObserver",
value: function() {
this.observer && (this.observer.disconnect(), this.observer = null), this.callback && this.callback._clear && (this.callback._clear(), this.callback = null);
}
}, {
key: "threshold",
get: function() {
return this.options.intersection && this.options.intersection.threshold || 0;
}
}]), e;
}();
function dt(e, t, r) {
var i = t.value;
if (i)
if (typeof IntersectionObserver == "undefined")
console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");
else {
var s = new Qt(e, i, r);
e._vue_visibilityState = s;
}
}
function er(e, t, r) {
var i = t.value, s = t.oldValue;
if (!ut(i, s)) {
var a = e._vue_visibilityState;
if (!i) {
ft(e);
return;
}
a ? a.createObserver(i, r) : dt(e, {
value: i
}, r);
}
}
function ft(e) {
var t = e._vue_visibilityState;
t && (t.destroyObserver(), delete e._vue_visibilityState);
}
var ht = {
bind: dt,
update: er,
unbind: ft
};
function tr(e) {
e.directive("observe-visibility", ht);
}
var rr = {
// eslint-disable-next-line no-undef
version: "0.4.6",
install: tr
}, J = null;
typeof window != "undefined" ? J = window.Vue : typeof global != "undefined" && (J = global.Vue);
J && J.use(rr);
var k = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
function $e(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var pt = { exports: {} };
(function(e) {
(function(t, r) {
e.exports ? e.exports = r() : t.Scrollparent = r();
})(k, function() {
function t(i) {
var s = getComputedStyle(i, null).getPropertyValue("overflow");
return s.indexOf("scroll") > -1 || s.indexOf("auto") > -1;
}
function r(i) {
if (i instanceof HTMLElement || i instanceof SVGElement) {
for (var s = i.parentNode; s.parentNode; ) {
if (t(s))
return s;
s = s.parentNode;
}
return document.scrollingElement || document.documentElement;
}
}
return r;
});
})(pt);
var ir = pt.exports;
const De = /* @__PURE__ */ $e(ir);
var vt = {
itemsLimit: 1e3
};
const _t = {
items: {
type: Array,
required: !0
},
keyField: {
type: String,
default: "id"
},
direction: {
type: String,
default: "vertical",
validator: (e) => ["vertical", "horizontal"].includes(e)
},
listTag: {
type: String,
default: "div"
},
itemTag: {
type: String,
default: "div"
}
};
function mt() {
return this.items.length && typeof this.items[0] != "object";
}
let ve = !1;
if (typeof window != "undefined") {
ve = !1;
try {
var sr = Object.defineProperty({}, "passive", {
get() {
ve = !0;
}
});
window.addEventListener("test", null, sr);
} catch (e) {
}
}
let ar = 0;
var nr = {
name: "RecycleScroller",
components: {
ResizeObserver: pe
},
directives: {
ObserveVisibility: ht
},
props: H(j({}, _t), {
itemSize: {
type: Number,
default: null
},
gridItems: {
type: Number,
default: void 0
},
itemSecondarySize: {
type: Number,
default: void 0
},
minItemSize: {
type: [Number, String],
default: null
},
sizeField: {
type: String,
default: "size"
},
typeField: {
type: String,
default: "type"
},
buffer: {
type: Number,
default: 200
},
pageMode: {
type: Boolean,
default: !1
},
prerender: {
type: Number,
default: 0
},
emitUpdate: {
type: Boolean,
default: !1
},
skipHover: {
type: Boolean,
default: !1
},
listTag: {
type: String,
default: "div"
},
itemTag: {
type: String,
default: "div"
},
listClass: {
type: [String, Object, Array],
default: ""
},
itemClass: {
type: [String, Object, Array],
default: ""
}
}),
data() {
return {
pool: [],
totalSize: 0,
ready: !1,
hoverKey: null
};
},
computed: {
sizes() {
if (this.itemSize === null) {
const e = {
"-1": {
accumulator: 0
}
}, t = this.items, r = this.sizeField, i = this.minItemSize;
let s = 1e4, a = 0, n;
for (let l = 0, o = t.length; l < o; l++)
n = t[l][r] || i, n < s && (s = n), a += n, e[l] = {
accumulator: a,
size: n
};
return this.$_computedMinItemSize = s, e;
}
return [];
},
simpleArray: mt
},
watch: {
items() {
this.updateVisibleItems(!0);
},
pageMode() {
this.applyPageMode(), this.updateVisibleItems(!1);
},
sizes: {
handler() {
this.updateVisibleItems(!1);
},
deep: !0
},
gridItems() {
this.updateVisibleItems(!0);
},
itemSecondarySize() {
this.updateVisibleItems(!0);
}
},
created() {
this.$_startIndex = 0, this.$_endIndex = 0, this.$_views = /* @__PURE__ */ new Map(), this.$_unusedViews = /* @__PURE__ */ new Map(), this.$_scrollDirty = !1, this.$_lastUpdateScrollPosition = 0, this.prerender && (this.$_prerender = !0, this.updateVisibleItems(!1)), this.gridItems && !this.itemSize && console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems");
},
mounted() {
this.applyPageMode(), this.$nextTick(() => {
this.$_prerender = !1, this.updateVisibleItems(!0), this.ready = !0;
});
},
activated() {
const e = this.$_lastUpdateScrollPosition;
typeof e == "number" && this.$nextTick(() => {
this.scrollToPosition(e);
});
},
beforeDestroy() {
this.removeListeners();
},
methods: {
addView(e, t, r, i, s) {
const a = {
item: r,
position: 0
}, n = {
id: ar++,
index: t,
used: !0,
key: i,
type: s
};
return Object.defineProperty(a, "nr", {
configurable: !1,
value: n
}), e.push(a), a;
},
unuseView(e, t = !1) {
const r = this.$_unusedViews, i = e.nr.type;
let s = r.get(i);
s || (s = [], r.set(i, s)), s.push(e), t || (e.nr.used = !1, e.position = -9999, this.$_views.delete(e.nr.key));
},
handleResize() {
this.$emit("resize"), this.ready && this.updateVisibleItems(!1);
},
handleScroll(e) {
this.$_scrollDirty || (this.$_scrollDirty = !0, requestAnimationFrame(() => {
this.$_scrollDirty = !1;
const {
continuous: t
} = this.updateVisibleItems(!1, !0);
t || (clearTimeout(this.$_refreshTimout), this.$_refreshTimout = setTimeout(this.handleScroll, 100));
}));
},
handleVisibilityChange(e, t) {
this.ready && (e || t.boundingClientRect.width !== 0 || t.boundingClientRect.height !== 0 ? (this.$emit("visible"), requestAnimationFrame(() => {
this.updateVisibleItems(!1);
})) : this.$emit("hidden"));
},
updateVisibleItems(e, t = !1) {
const r = this.itemSize, i = this.gridItems || 1, s = this.itemSecondarySize || r, a = this.$_computedMinItemSize, n = this.typeField, l = this.simpleArray ? null : this.keyField, o = this.items, c = o.length, f = this.sizes, m = this.$_views, v = this.$_unusedViews, $ = this.pool;
let p, h, w, y, g;
if (!c)
p = h = y = g = w = 0;
else if (this.$_prerender)
p = y = 0, h = g = Math.min(this.prerender, o.length), w = null;
else {
const d = this.getScroll();
if (t) {
let T = d.start - this.$_lastUpdateScrollPosition;
if (T < 0 && (T = -T), r === null && T < a || T < r)
return {
continuous: !0
};
}
this.$_lastUpdateScrollPosition = d.start;
const S = this.buffer;
d.start -= S, d.end += S;
let R = 0;
if (this.$refs.before && (R = this.$refs.before.scrollHeight, d.start -= R), this.$refs.after) {
const T = this.$refs.after.scrollHeight;
d.end += T;
}
if (r === null) {
let T, ze = 0, Ae = c - 1, z = ~~(c / 2), xe;
do
xe = z, T = f[z].accumulator, T < d.start ? ze = z : z < c - 1 && f[z + 1].accumulator > d.start && (Ae = z), z = ~~((ze + Ae) / 2);
while (z !== xe);
for (z < 0 && (z = 0), p = z, w = f[c - 1].accumulator, h = z; h < c && f[h].accumulator < d.end; h++) ;
for (h === -1 ? h = o.length - 1 : (h++, h > c && (h = c)), y = p; y < c && R + f[y].accumulator < d.start; y++) ;
for (g = y; g < c && R + f[g].accumulator < d.end; g++) ;
} else {
p = ~~(d.start / r * i);
const T = p % i;
p -= T, h = Math.ceil(d.end / r * i), y = Math.max(0, Math.floor((d.start - R) / r * i)), g = Math.floor((d.end - R) / r * i), p < 0 && (p = 0), h > c && (h = c), y < 0 && (y = 0), g > c && (g = c), w = Math.ceil(c / i) * r;
}
}
h - p > vt.itemsLimit && this.itemsLimitError(), this.totalSize = w;
let u;
const O = p <= this.$_endIndex && h >= this.$_startIndex;
if (this.$_continuous !== O) {
if (O) {
m.clear(), v.clear();
for (let d = 0, S = $.length; d < S; d++)
u = $[d], this.unuseView(u);
}
this.$_continuous = O;
} else if (O)
for (let d = 0, S = $.length; d < S; d++)
u = $[d], u.nr.used && (e && (u.nr.index = o.indexOf(u.item)), (u.nr.index === -1 || u.nr.index < p || u.nr.index >= h) && this.unuseView(u));
const C = O ? null : /* @__PURE__ */ new Map();
let A, x, P, N;
for (let d = p; d < h; d++) {
A = o[d];
const S = l ? A[l] : A;
if (S == null)
throw new Error(`Key is ${S} on item (keyField is '${l}')`);
if (u = m.get(S), !r && !f[d].size) {
u && this.unuseView(u);
continue;
}
u ? (u.nr.used = !0, u.item = A) : (d === o.length - 1 && this.$emit("scroll-end"), d === 0 && this.$emit("scroll-start"), x = A[n], P = v.get(x), O ? P && P.length ? (u = P.pop(), u.item = A, u.nr.used = !0, u.nr.index = d, u.nr.key = S, u.nr.type = x) : u = this.addView($, d, A, S, x) : (N = C.get(x) || 0, (!P || N >= P.length) && (u = this.addView($, d, A, S, x), this.unuseView(u, !0), P = v.get(x)), u = P[N], u.item = A, u.nr.used = !0, u.nr.index = d, u.nr.key = S, u.nr.type = x, C.set(x, N + 1), N++), m.set(S, u)), r === null ? (u.position = f[d - 1].accumulator, u.offset = 0) : (u.position = Math.floor(d / i) * r, u.offset = d % i * s);
}
return this.$_startIndex = p, this.$_endIndex = h, this.emitUpdate && this.$emit("update", p, h, y, g), clearTimeout(this.$_sortTimer), this.$_sortTimer = setTimeout(this.sortViews, 300), {
continuous: O
};
},
getListenerTarget() {
let e = De(this.$el);
return window.document && (e === window.document.documentElement || e === window.document.body) && (e = window), e;
},
getScroll() {
const {
$el: e,
direction: t
} = this, r = t === "vertical";
let i;
if (this.pageMode) {
const s = e.getBoundingClientRect(), a = r ? s.height : s.width;
let n = -(r ? s.top : s.left), l = r ? window.innerHeight : window.innerWidth;
n < 0 && (l += n, n = 0), n + l > a && (l = a - n), i = {
start: n,
end: n + l
};
} else r ? i = {
start: e.scrollTop,
end: e.scrollTop + e.clientHeight
} : i = {
start: e.scrollLeft,
end: e.scrollLeft + e.clientWidth
};
return i;
},
applyPageMode() {
this.pageMode ? this.addListeners() : this.removeListeners();
},
addListeners() {
this.listenerTarget = this.getListenerTarget(), this.listenerTarget.addEventListener("scroll", this.handleScroll, ve ? {
passive: !0
} : !1), this.listenerTarget.addEventListener("resize", this.handleResize);
},
removeListeners() {
this.listenerTarget && (this.listenerTarget.removeEventListener("scroll", this.handleScroll), this.listenerTarget.removeEventListener("resize", this.handleResize), this.listenerTarget = null);
},
scrollToItem(e) {
let t;
this.itemSize === null ? t = e > 0 ? this.sizes[e - 1].accumulator : 0 : t = Math.floor(e / this.gridItems) * this.itemSize, this.scrollToPosition(t);
},
scrollToPosition(e) {
const t = this.direction === "vertical" ? {
scroll: "scrollTop",
start: "top"
} : {
scroll: "scrollLeft",
start: "left"
};
let r, i, s;
if (this.pageMode) {
const a = De(this.$el), n = a.tagName === "HTML" ? 0 : a[t.scroll], l = a.getBoundingClientRect(), c = this.$el.getBoundingClientRect()[t.start] - l[t.start];
r = a, i = t.scroll, s = e + n + c;
} else
r = this.$el, i = t.scroll, s = e;
r[i] = s;
},
itemsLimitError() {
throw setTimeout(() => {
console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", this.$el), console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
}), new Error("Rendered items limit reached");
},
sortViews() {
this.pool.sort((e, t) => e.nr.index - t.nr.index);
}
}
};
function Se(e, t, r, i, s, a, n, l, o, c) {
const f = typeof r == "function" ? r.options : r;
return e && e.render && (f.render = e.render, f.staticRenderFns = e.staticRenderFns, f._compiled = !0, s && (f.functional = !0)), r;
}
const or = nr;
var yt = function() {
var e, t, r = this, i = r.$createElement, s = r._self._c || i;
return s(
"div",
{
directives: [
{
name: "observe-visibility",
rawName: "v-observe-visibility",
value: r.handleVisibilityChange,
expression: "handleVisibilityChange"
}
],
staticClass: "vue-recycle-scroller",
class: (e = {
ready: r.ready,
"page-mode": r.pageMode
}, e["direction-" + r.direction] = !0, e),
on: {
"&scroll": function(a) {
return r.handleScroll.apply(null, arguments);
}
}
},
[
r.$slots.before ? s(
"div",
{ ref: "before", staticClass: "vue-recycle-scroller__slot" },
[r._t("before")],
2
) : r._e(),
r._v(" "),
s(
r.listTag,
{
ref: "wrapper",
tag: "component",
staticClass: "vue-recycle-scroller__item-wrapper",
class: r.listClass,
style: (t = {}, t[r.direction === "vertical" ? "minHeight" : "minWidth"] = r.totalSize + "px", t)
},
[
r._l(r.pool, function(a) {
return s(
r.itemTag,
r._g(
{
key: a.nr.id,
tag: "component",
staticClass: "vue-recycle-scroller__item-view",
class: [
r.itemClass,
{
hover: !r.skipHover && r.hoverKey === a.nr.key
}
],
style: r.ready ? {
transform: "translate" + (r.direction === "vertical" ? "Y" : "X") + "(" + a.position + "px) translate" + (r.direction === "vertical" ? "X" : "Y") + "(" + a.offset + "px)",
width: r.gridItems ? (r.direction === "vertical" && r.itemSecondarySize || r.itemSize) + "px" : void 0,
height: r.gridItems ? (r.direction === "horizontal" && r.itemSecondarySize || r.itemSize) + "px" : void 0
} : null
},
r.skipHover ? {} : {
mouseenter: function() {
r.hoverKey = a.nr.key;
},
mouseleave: function() {
r.hoverKey = null;
}
}
),
[
r._t("default", null, {
item: a.item,
index: a.nr.index,
active: a.nr.used
})
],
2
);
}),
r._v(" "),
r._t("empty")
],
2
),
r._v(" "),
r.$slots.after ? s(
"div",
{ ref: "after", staticClass: "vue-recycle-scroller__slot" },
[r._t("after")],
2
) : r._e(),
r._v(" "),
s("ResizeObserver", { on: { notify: r.handleResize } })
],
1
);
}, lr = [];
yt._withStripped = !0;
const cr = void 0, ur = void 0, dr = !1, Z = /* @__PURE__ */ Se(
{ render: yt, staticRenderFns: lr },
cr,
or,
ur,
dr
);
var fr = {
name: "DynamicScroller",
components: {
RecycleScroller: Z
},
provide() {
return typeof ResizeObserver != "undefined" && (this.$_resizeObserver = new ResizeObserver((e) => {
requestAnimationFrame(() => {
if (Array.isArray(e)) {
for (const t of e)
if (t.target) {
const r = new CustomEvent("resize", {
detail: {
contentRect: t.contentRect
}
});
t.target.dispatchEvent(r);
}
}
});
})), {
vscrollData: this.vscrollData,
vscrollParent: this,
vscrollResizeObserver: this.$_resizeObserver
};
},
inheritAttrs: !1,
props: H(j({}, _t), {
minItemSize: {
type: [Number, String],
required: !0
}
}),
data() {
return {
vscrollData: {
active: !0,
sizes: {},
validSizes: {},
keyField: this.keyField,
simpleArray: !1
}
};
},
computed: {
simpleArray: mt,
itemsWithSize() {
const e = [], {
items: t,
keyField: r,
simpleArray: i
} = this, s = this.vscrollData.sizes, a = t.length;
for (let n = 0; n < a; n++) {
const l = t[n], o = i ? n : l[r];
let c = s[o];
typeof c == "undefined" && !this.$_undefinedMap[o] && (c = 0), e.push({
item: l,
id: o,
size: c
});
}
return e;
},
listeners() {
const e = {};
for (const t in this.$listeners)
t !== "resize" && t !== "visible" && (e[t] = this.$listeners[t]);
return e;
}
},
watch: {
items() {
this.forceUpdate(!1);
},
simpleArray: {
handler(e) {
this.vscrollData.simpleArray = e;
},
immediate: !0
},
direction(e) {
this.forceUpdate(!0);
},
itemsWithSize(e, t) {
const r = this.$el.scrollTop;
let i = 0, s = 0;
const a = Math.min(e.length, t.length);
for (let l = 0; l < a && !(i >= r); l++)
i += t[l].size || this.minItemSize, s += e[l].size || this.minItemSize;
const n = s - i;
n !== 0 && (this.$el.scrollTop += n);
}
},
beforeCreate() {
this.$_updates = [], this.$_undefinedSizes = 0, this.$_undefinedMap = {};
},
activated() {
this.vscrollData.active = !0;
},
deactivated() {
this.vscrollData.active = !1;
},
methods: {
onScrollerResize() {
this.$refs.scroller && this.forceUpdate(), this.$emit("resize");
},
onScrollerVisible() {
this.$emit("vscroll:update", {
force: !1
}), this.$emit("visible");
},
forceUpdate(e = !0) {
(e || this.simpleArray) && (this.vscrollData.validSizes = {}), this.$emit("vscroll:update", {
force: !0
});
},
scrollToItem(e) {
const t = this.$refs.scroller;
t && t.scrollToItem(e);
},
getItemSize(e, t = void 0) {
const r = this.simpleArray ? t != null ? t : this.items.indexOf(e) : e[this.keyField];
return this.vscrollData.sizes[r] || 0;
},
scrollToBottom() {
if (this.$_scrollingToBottom) return;
this.$_scrollingToBottom = !0;
const e = this.$el;
this.$nextTick(() => {
e.scrollTop = e.scrollHeight + 5e3;
const t = () => {
e.scrollTop = e.scrollHeight + 5e3, requestAnimationFrame(() => {
e.scrollTop = e.scrollHeight + 5e3, this.$_undefinedSizes === 0 ? this.$_scrollingToBottom = !1 : requestAnimationFrame(t);
});
};
requestAnimationFrame(t);
});
}
}
};
const hr = fr;
var gt = function() {
var e = this, t = e.$createElement, r = e._self._c || t;
return r(
"RecycleScroller",
e._g(
e._b(
{
ref: "scroller",
attrs: {
items: e.itemsWithSize,
"min-item-size": e.minItemSize,
direction: e.direction,
"key-field": "id",
"list-tag": e.listTag,
"item-tag": e.itemTag
},
on: { resize: e.onScrollerResize, visible: e.onScrollerVisible },
scopedSlots: e._u(
[
{
key: "default",
fn: function(i) {
var s = i.item, a = i.index, n = i.active;
return [
e._t("default", null, null, {
item: s.item,
index: a,
active: n,
itemWithSize: s
})
];
}
}
],
null,
!0
)
},
"RecycleScroller",
e.$attrs,
!1
),
e.listeners
),
[
e._v(" "),
r("template", { slot: "before" }, [e._t("before")], 2),
e._v(" "),
r("template", { slot: "after" }, [e._t("after")], 2),
e._v(" "),
r("template", { slot: "empty" }, [e._t("empty")], 2)
],
2
);
}, pr = [];
gt._withStripped = !0;
const vr = void 0, _r = void 0, mr = !1, Re = /* @__PURE__ */ Se(
{ render: gt, staticRenderFns: pr },
vr,
hr,
_r,
mr
);
var yr = {
name: "DynamicScrollerItem",
inject: ["vscrollData", "vscrollParent", "vscrollResizeObserver"],
props: {
// eslint-disable-next-line vue/require-prop-types
item: {
required: !0
},
watchData: {
type: Boolean,
default: !1
},
/**
* Indicates if the view is actively used to display an item.
*/
active: {
type: Boolean,
required: !0
},
index: {
type: Number,
default: void 0
},
sizeDependencies: {
type: [Array, Object],
default: null
},
emitResize: {
type: Boolean,
default: !1
},
tag: {
type: String,
default: "div"
}
},
computed: {
id() {
if (this.vscrollData.simpleArray) return this.index;
if (this.item.hasOwnProperty(this.vscrollData.keyField)) return this.item[this.vscrollData.keyField];
throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`);
},
size() {
return this.vscrollData.validSizes[this.id] && this.vscrollData.sizes[this.id] || 0;
},
finalActive() {
return this.active && this.vscrollData.active;
}
},
watch: {
watchData: "updateWatchData",
id() {
this.size || this.onDataUpdate();
},
finalActive(e) {
this.size || (e ? this.vscrollParent.$_undefinedMap[this.id] || (this.vscrollParent.$_undefinedSizes++, this.vscrollParent.$_undefinedMap[this.id] = !0) : this.vscrollParent.$_undefinedMap[this.id] && (this.vscrollParent.$_undefinedSizes--, this.vscrollParent.$_undefinedMap[this.id] = !1)), this.vscrollResizeObserver ? e ? this.observeSize() : this.unobserveSize() : e && this.$_pendingVScrollUpdate === this.id && this.updateSize();
}
},
created() {
if (!this.$isServer && (this.$_forceNextVScrollUpdate = null, this.updateWatchData(), !this.vscrollResizeObserver)) {
for (const e in this.sizeDependencies)
this.$watch(() => this.sizeDependencies[e], this.onDataUpdate);
this.vscrollParent.$on("vscroll:update", this.onVscrollUpdate), this.vscrollParent.$on("vscroll:update-size", this.onVscrollUpdateSize);
}
},
mounted() {
this.vscrollData.active && (this.updateSize(), this.observeSize());
},
beforeDestroy() {
this.vscrollParent.$off("vscroll:update", this.onVscrollUpdate), this.vscrollParent.$off("vscroll:update-size", this.onVscrollUpdateSize), this.unobserveSize();
},
methods: {
updateSize() {
this.finalActive ? this.$_pendingSizeUpdate !== this.id && (this.$_pendingSizeUpdate = this.id, this.$_forceNextVScrollUpdate = null, this.$_pendingVScrollUpdate = null, this.computeSize(this.id)) : this.$_forceNextVScrollUpdate = this.id;
},
updateWatchData() {
this.watchData && !this.vscrollResizeObserver ? this.$_watchData = this.$watch("item", () => {
this.onDataUpdate();
}, {
deep: !0
}) : this.$_watchData && (this.$_watchData(), this.$_watchData = null);
},
onVscrollUpdate({
force: e
}) {
!this.finalActive && e && (this.$_pendingVScrollUpdate = this.id), (this.$_forceNextVScrollUpdate === this.id || e || !this.size) && this.updateSize();
},
onDataUpdate() {
this.updateSize();
},
computeSize(e) {
this.$nextTick(() => {
if (this.id === e) {
const t = this.$el.offsetWidth, r = this.$el.offsetHeight;
this.applySize(t, r);
}
this.$_pendingSizeUpdate = null;
});
},
applySize(e, t) {
const r = ~~(this.vscrollParent.direction === "vertical" ? t : e);
r && this.size !== r && (this.vscrollParent.$_undefinedMap[this.id] && (this.vscrollParent.$_undefinedSizes--, this.vscrollParent.$_undefinedMap[this.id] = void 0), this.$set(this.vscrollData.sizes, this.id, r), this.$set(this.vscrollData.validSizes, this.id, !0), this.emitResize && this.$emit("resize", this.id));
},
observeSize() {
!this.vscrollResizeObserver || !this.$el.parentNode || (this.vscrollResizeObserver.observe(this.$el.parentNode), this.$el.parentNode.addEventListener("resize", this.onResize));
},
unobserveSize() {
this.vscrollResizeObserver && (this.vscrollResizeObserver.unobserve(this.$el.parentNode), this.$el.parentNode.removeEventListener("resize", this.onResize));
},
onResize(e) {
const {
width: t,
height: r
} = e.detail.contentRect;
this.applySize(t, r);
}
},
render(e) {
return e(this.tag, this.$slots.default);
}
};
const gr = yr, br = void 0, $r = void 0, Sr = void 0, Ee = /* @__PURE__ */ Se(
{},
br,
gr,
$r,
Sr
);
function wr(e, t) {
e.component(`${t}recycle-scroller`, Z), e.component(`${t}RecycleScroller`, Z), e.component(`${t}dynamic-scroller`, Re), e.component(`${t}DynamicScroller`, Re), e.component(`${t}dynamic-scroller-item`, Ee), e.component(`${t}DynamicScrollerItem`, Ee);
}
const Or = {
// eslint-disable-next-line no-undef
version: "1.1.2",
install(e, t) {
const r = Object.assign({}, {
installComponents: !0,
componentsPrefix: ""
}, t);
for (const i in r)
typeof r[i] != "undefined" && (vt[i] = r[i]);
r.installComponents && wr(e, r.componentsPrefix);
}
};
let Q = null;
typeof window != "undefined" ? Q = window.Vue : typeof global != "undefined" && (Q = global.Vue);
Q && Q.use(Or);
function Tr() {
this.__data__ = [], this.size = 0;
}
var zr = Tr;
function Ar(e, t) {
return e === t || e !== e && t !== t;
}
var bt = Ar, xr = bt;
function Ir(e, t) {
for (var r = e.length; r--; )
if (xr(e[r][0], t))
return r;
return -1;
}
var ie = Ir, Pr = ie, Cr = Array.prototype, jr = Cr.splice;
function Dr(e) {
var t = this.__data__, r = Pr(t, e);
if (r < 0)
return !1;
var i = t.length - 1;
return r == i ? t.pop() : jr.call(t, r, 1), --this.size, !0;
}
var Rr = Dr, Er = ie;
function Mr(e) {
var t = this.__data__, r = Er(t, e);
return r < 0 ? void 0 : t[r][1];
}
var Lr = Mr, Vr = ie;
function Fr(e) {
return Vr(this.__data__, e) > -1;
}
var Ur = Fr, Nr = ie;
function Hr(e, t) {
var r = this.__data__, i = Nr(r, e);
return i < 0 ? (++this.size, r.push([e, t])) : r[i][1] = t, this;
}
var Br = Hr, kr = zr, Gr = Rr, qr = Lr, Kr = Ur, Wr = Br;
function E(e) {
var t = -1, r = e == null ? 0 : e.length;
for (this.clear(); ++t < r; ) {
var i = e[t];
this.set(i[0], i[1]);
}
}
E.prototype.clear = kr;
E.prototype.delete = Gr;
E.prototype.get = qr;
E.prototype.has = Kr;
E.prototype.set = Wr;
var se = E, Yr = se;
function Xr() {
this.__data__ = new Yr(), this.size = 0;
}
var Jr = Xr;
function Zr(e) {
var t = this.__data__, r = t.delete(e);
return this.size = t.size, r;
}
var Qr = Zr;
function ei(e) {
return this.__data__.get(e);
}
var ti = ei;
function ri(e) {
return this.__data__.has(e);
}
var ii = ri, si = typeof k == "object" && k && k.Object === Object && k, $t = si, ai = $t, ni = typeof self == "object" && self && self.Object === Object && self, oi = ai || ni || Function("return this")(), I = oi, li = I, ci = li.Symbol, we = ci, Me = we, St = Object.prototype, ui = St.hasOwnProperty, di = St.toString, B = Me ? Me.toStringTag : void 0;
function fi(e) {
var t = ui.call(e, B), r = e[B];
try {
e[B] = void 0;
var i = !0;
} catch (a) {
}
var s = di.call(e);
return i && (t ? e[B] = r : delete e[B]), s;
}
var hi = fi, pi = Object.prototype, vi = pi.toString;
function _i(e) {
return vi.call(e);
}
var mi = _i, Le = we, yi = hi, gi = mi, bi = "[object Null]", $i = "[object Undefined]", Ve = Le ? Le.toStringTag : void 0;
function Si(e) {
return e == null ? e === void 0 ? $i : bi : Ve && Ve in Object(e) ? yi(e) : gi(e);
}
var G = Si;
function wi(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
var wt = wi, Oi = G, Ti = wt, zi = "[object AsyncFunction]", Ai = "[object Function]", xi = "[object GeneratorFunction]", Ii = "[object Proxy]";
function Pi(e) {
if (!Ti(e))
return !1;
var t = Oi(e);
return t == Ai || t == xi || t == zi || t == Ii;
}
var Ot = Pi, Ci = I, ji = Ci["__core-js_shared__"], Di = ji, oe = Di, Fe = function() {
var e = /[^.]+$/.exec(oe && oe.keys && oe.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function Ri(e) {
return !!Fe && Fe in e;
}
var Ei = Ri, Mi = Function.prototype, Li = Mi.toString;
function Vi(e) {
if (e != null) {
try {
return Li.call(e);
} catch (t) {
}
try {
return e + "";
} catch (t) {
}
}
return "";
}
var Tt = Vi, Fi = Ot, Ui = Ei, Ni = wt, Hi = Tt, Bi = /[\\^$.*+?()[\]{}|]/g, ki = /^\[object .+?Constructor\]$/, Gi = Function.prototype, qi = Object.prototype, Ki = Gi.toString, Wi = qi.hasOwnProperty, Yi = RegExp(
"^" + Ki.call(Wi).replace(Bi, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Xi(e) {
if (!Ni(e) || Ui(e))
return !1;
var t = Fi(e) ? Yi : ki;
return t.test(Hi(e));
}
var Ji = Xi;
function Zi(e, t) {
return e == null ? void 0 : e[t];
}
var Qi = Zi, es = Ji, ts = Qi;
function rs(e, t) {
var r = ts(e, t);
return es(r) ? r : void 0;
}
var M = rs, is = M, ss = I, as = is(ss, "Map"), Oe = as, ns = M, os = ns(Object, "create"), ae = os, Ue = ae;
function ls() {
this.__data__ = Ue ? Ue(null) : {}, this.size = 0;
}
var cs = ls;
function us(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var ds = us, fs = ae, hs = "__lodash_hash_undefined__", ps = Object.prototype, vs = ps.hasOwnProperty;
function _s(e) {
var t = this.__data__;
if (fs) {
var r = t[e];
return r === hs ? void 0 : r;
}
return vs.call(t, e) ? t[e] : void 0;
}
var ms = _s, ys = ae, gs = Object.prototype, bs = gs.hasOwnProperty;
function $s(e) {
var t = this.__data__;
return ys ? t[e] !== void 0 : bs.call(t, e);
}
var Ss = $s, ws = ae, Os = "__lodash_hash_undefined__";
function Ts(e, t) {
var r = this.__data__;
return this.size += this.has(e) ? 0 : 1, r[e] = ws && t === void 0 ? Os : t, this;
}
var zs = Ts, As = cs, xs = ds, Is = ms, Ps = Ss, Cs = zs;
function L(e) {
var t = -1, r = e == null ? 0 : e.length;
for (this.clear(); ++t < r; ) {
var i = e[t];
this.set(i[0], i[1]);
}
}
L.prototype.clear = As;
L.prototype.delete = xs;
L.prototype.get = Is;
L.prototype.has = Ps;
L.prototype.set = Cs;
var js = L, Ne = js, Ds = se, Rs = Oe;
function Es() {
this.size = 0, this.__data__ = {
hash: new Ne(),
map: new (Rs || Ds)(),
string: new Ne()
};
}
var Ms = Es;
function Ls(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
var Vs = Ls, Fs = Vs;
function Us(e, t) {
var r = e.__data__;
return Fs(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
}
var ne = Us, Ns = ne;
function Hs(e) {
var t = Ns(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
var Bs = Hs, ks = ne;
function Gs(e) {
return ks(this, e).get(e);
}
var qs = Gs, Ks = ne;
function Ws(e) {
return Ks(this, e).has(e);
}
var Ys = Ws, Xs = ne;
function Js(e, t) {
var r = Xs(this, e), i = r.size;
return r.set(e, t), this.size += r.size == i ? 0 : 1, this;
}
var Zs = Js, Qs = Ms, ea = Bs, ta = qs, ra = Ys, ia = Zs;
function V(e) {
var t = -1, r = e == null ? 0 : e.length;
for (this.clear(); ++t < r; ) {
var i = e[t];
this.set(i[0], i[1]);
}
}
V.prototype.clear = Qs;
V.prototype.delete = ea;
V.prototype.get = ta;
V.prototype.has = ra;
V.prototype.set = ia;
var zt = V, sa = se, aa = Oe, na = zt, oa = 200;
function la(e, t) {
var r = this.__data__;
if (r instanceof sa) {
var i = r.__data__;
if (!aa || i.length < oa - 1)
return i.push([e, t]), this.size = ++r.size, this;
r = this.__data__ = new na(i);
}
return r.set(e, t), this.size = r.size, this;
}
var ca = la, ua = se, da = Jr, fa = Qr, ha = ti, pa = ii, va = ca;
function F(e) {
var t = this.__data__ = new ua(e);
this.size = t.size;
}
F.prototype.clear = da;
F.prototype.delete = fa;
F.prototype.get = ha;
F.prototype.has = pa;
F.prototype.set = va;
var _a = F, ma = "__lodash_hash_undefined__";
function ya(e) {
return this.__data__.set(e, ma), this;
}
var ga = ya;
function ba(e) {
return this.__data__.has(e);
}
var $a = ba, Sa = zt, wa = ga, Oa = $a;
function ee(e) {
var t = -1, r = e == null ? 0 : e.length;
for (this.__data__ = new Sa(); ++t < r; )
this.add(e[t]);
}
ee.prototype.add = ee.prototype.push = wa;
ee.prototype.has = Oa;
var Ta = ee;
function za(e, t) {
for (var r = -1, i = e == null ? 0 : e.length; ++r < i; )
if (t(e[r], r, e))
return !0;
return !1;
}
var Aa = za;
function xa(e, t) {
return e.has(t);
}
var Ia = xa, Pa = Ta, Ca = Aa, ja = Ia, Da = 1, Ra = 2;
function Ea(e, t, r, i, s, a) {
var n = r & Da, l = e.length, o = t.length;
if (l != o && !(n && o > l))
return !1;
var c = a.get(e), f = a.get(t);
if (c && f)
return c == t && f == e;
var m = -1, v = !0, $ = r & Ra ? new Pa() : void 0;
for (a.set(e, t), a.set(t, e); ++m < l; ) {
var p = e[m], h = t[m];
if (i)
var w = n ? i(h, p, m, t, e, a) : i(p, h, m, e, t, a);
if (w !== void 0) {
if (w)
continue;
v = !1;
break;
}
if ($) {
if (!Ca(t, function(y, g) {
if (!ja($, g) && (p === y || s(p, y, r, i, a)))
return $.push(g);
})) {
v = !1;
break;
}
} else if (!(p === h || s(p, h, r, i, a))) {
v = !1;
break;
}
}
return a.delete(e), a.delete(t), v;
}
var At = Ea, Ma = I, La = Ma.Uint8Array, Va = La;
function Fa(e) {
var t = -1, r = Array(e.size);
return e.forEach(function(i, s) {
r[++t] = [s, i];
}), r;
}
var Ua = Fa;
function Na(e) {
var t = -1, r = Array(e.size);
return e.forEach(function(i) {
r[++t] = i;
}), r;
}
var Ha = Na, He = we, Be = Va, Ba = bt, ka = At, Ga = Ua, qa = Ha, Ka = 1, Wa = 2, Ya = "[object Boolean]", Xa = "[object Date]", Ja = "[object Error]", Za = "[object Map]", Qa = "[object Number]", en = "[object RegExp]", tn = "[object Set]", rn = "[object String]", sn = "[object Symbol]", an = "[object ArrayBuffer]", nn = "[object DataView]", ke = He ? He.prototype : void 0, le = ke ? ke.valueOf : void 0;
function on(e, t, r, i, s, a, n) {
switch (r) {
case nn:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return !1;
e = e.buffer, t = t.buffer;
case an:
return !(e.byteLength != t.byteLength || !a(new Be(e), new Be(t)));
case Ya:
case Xa:
case Qa:
return Ba(+e, +t);
case Ja:
return e.name == t.name && e.message == t.message;
case en:
case rn:
return e == t + "";
case Za:
var l = Ga;
case tn:
var o = i & Ka;
if (l || (l = qa), e.size != t.size && !o)
return !1;
var c = n.get(e);
if (c)
return c == t;
i |= Wa, n.set(e, t);
var f = ka(l(e), l(t), i, s, a, n);
return n.delete(e), f;
case sn:
if (le)
return le.call(e) == le.call(t);
}
return !1;
}
var ln = on;
function cn(e, t) {
for (var r = -1, i = t.length, s = e.length; ++r < i; )
e[s + r] = t[r];
return e;
}
var un = cn, dn = Array.isArray, Te = dn, fn = un, hn = Te;
function pn(e, t, r) {
var i = t(e);
return hn(e) ? i : fn(i, r(e));
}
var vn = pn;
function _n(e, t) {
for (var r = -1, i = e == null ? 0 : e.length, s = 0, a = []; ++r < i; ) {
var n = e[r];
t(n, r, e) && (a[s++] = n);
}
return a;
}
var mn = _n;
function yn() {
return [];
}
var gn = yn, bn = mn, $n = gn, Sn = Object.prototype, wn = Sn.propertyIsEnumerable, Ge = Object.getOwnPropertySymbols, On = Ge ? function(e) {
return e == null ? [] : (e = Object(e), bn(Ge(e), function(t) {
return wn.call(e, t);
}));
} : $n, Tn = On;
function zn(e, t) {
for (var r = -1, i = Array(e); ++r < e; )
i[r] = t(r);
return i;
}
var An = zn;
function xn(e) {
return e != null && typeof e == "object";
}
var q = xn, In = G, Pn = q, Cn = "[object Arguments]";
function jn(e) {
return Pn(e) && In(e) == Cn;
}
var Dn = jn, qe = Dn, Rn = q, xt = Object.prototype, En = xt.hasOwnProperty, Mn = xt.propertyIsEnumerable, Ln = qe(/* @__PURE__ */ function() {
return arguments;
}()) ? qe : function(e) {
return Rn(e) && En.call(e, "callee") && !Mn.call(e, "callee");
}, Vn = Ln, te = { exports: {} };
function Fn() {
return !1;
}
var Un = Fn;
te.exports;
(function(e, t) {
var r = I, i = Un, s = t && !t.nodeType && t, a = s && !0 && e && !e.nodeType && e, n = a && a.exports === s, l = n ? r.Buffer : void 0, o = l ? l.isBuffer : void 0, c = o || i;
e.exports = c;
})(te, te.exports);
var It = te.exports, Nn = 9007199254740991, Hn = /^(?:0|[1-9]\d*)$/;
function Bn(e, t) {
var r = typeof e;
return t = t == null ? Nn : t, !!t && (r == "number" || r != "symbol" && Hn.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
var kn = Bn, Gn = 9007199254740991;
function qn(e) {
return typeof e == "number" && e > -1 && e % 1 == 0