import {
AnnotationService
} from "./chunk-NO2C2JJZ.js";
import {
defineStore,
mapState,
mapStores
} from "./chunk-EZG7MI55.js";
import {
hn,
wn
} from "./chunk-4PXRF7LI.js";
import {
$7,
M7,
V7,
z7
} from "./chunk-VSHHOTB7.js";
import "./chunk-GQENOT3W.js";
import {
Comment,
Fragment,
Teleport,
Text,
Transition,
cloneVNode,
computed,
createApp,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
createSlots,
createTextVNode,
createVNode,
defineComponent,
getCurrentInstance,
getCurrentScope,
h,
inject,
isRef,
isVNode,
markRaw,
mergeProps,
nextTick,
normalizeClass,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onDeactivated,
onMounted,
onScopeDispose,
onUnmounted,
onUpdated,
openBlock,
provide,
reactive,
readonly,
ref,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
shallowRef,
toDisplayString,
toHandlerKey,
toHandlers,
toRaw,
toRef,
toRefs,
unref,
useAttrs,
useSlots,
vModelRadio,
vModelText,
vShow,
warn,
watch,
watchEffect,
withCtx,
withDirectives,
withKeys,
withModifiers
} from "./chunk-HM42ZP2D.js";
import "./chunk-EWTE5DHJ.js";
// node_modules/@abi-software/scaffoldvuer/dist/scaffoldvuer.js
var Yi = (n, e, { checkForDefaultPrevented: t = true } = {}) => (r) => {
const s = n == null ? void 0 : n(r);
if (t === false || !s)
return e == null ? void 0 : e(r);
};
var aw = Object.defineProperty;
var lw = Object.defineProperties;
var cw = Object.getOwnPropertyDescriptors;
var bp = Object.getOwnPropertySymbols;
var uw = Object.prototype.hasOwnProperty;
var hw = Object.prototype.propertyIsEnumerable;
var xp = (n, e, t) => e in n ? aw(n, e, { enumerable: true, configurable: true, writable: true, value: t }) : n[e] = t;
var dw = (n, e) => {
for (var t in e || (e = {}))
uw.call(e, t) && xp(n, t, e[t]);
if (bp)
for (var t of bp(e))
hw.call(e, t) && xp(n, t, e[t]);
return n;
};
var fw = (n, e) => lw(n, cw(e));
function Mp(n, e) {
var t;
const i = shallowRef();
return watchEffect(() => {
i.value = n();
}, fw(dw({}, e), {
flush: (t = void 0) != null ? t : "sync"
})), readonly(i);
}
var wp;
var en = typeof window < "u";
var pw = (n) => typeof n == "string";
var Hv = () => {
};
var zh = en && ((wp = window == null ? void 0 : window.navigator) == null ? void 0 : wp.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Wv(n) {
return typeof n == "function" ? n() : unref(n);
}
function mw(n) {
return n;
}
function Yc(n) {
return getCurrentScope() ? (onScopeDispose(n), true) : false;
}
function gw(n, e = true) {
getCurrentInstance() ? onMounted(n) : e ? n() : nextTick(n);
}
function Qi(n) {
var e;
const t = Wv(n);
return (e = t == null ? void 0 : t.$el) != null ? e : t;
}
var tl = en ? window : void 0;
var vw = en ? window.document : void 0;
function un(...n) {
let e, t, i, r;
if (pw(n[0]) || Array.isArray(n[0]) ? ([t, i, r] = n, e = tl) : [e, t, i, r] = n, !e)
return Hv;
Array.isArray(t) || (t = [t]), Array.isArray(i) || (i = [i]);
const s = [], o = () => {
s.forEach((d) => d()), s.length = 0;
}, a = (d, h6, f, g) => (d.addEventListener(h6, f, g), () => d.removeEventListener(h6, f, g)), c = watch(() => [Qi(e), Wv(r)], ([d, h6]) => {
o(), d && s.push(...t.flatMap((f) => i.map((g) => a(d, f, g, h6))));
}, { immediate: true, flush: "post" }), l = () => {
c(), o();
};
return Yc(l), l;
}
var Ap = false;
function yw(n, e, t = {}) {
const { window: i = tl, ignore: r = [], capture: s = true, detectIframe: o = false } = t;
if (!i)
return;
zh && !Ap && (Ap = true, Array.from(i.document.body.children).forEach((f) => f.addEventListener("click", Hv)));
let a = true;
const c = (f) => r.some((g) => {
if (typeof g == "string")
return Array.from(i.document.querySelectorAll(g)).some((p) => p === f.target || f.composedPath().includes(p));
{
const p = Qi(g);
return p && (f.target === p || f.composedPath().includes(p));
}
}), d = [
un(i, "click", (f) => {
const g = Qi(n);
if (!(!g || g === f.target || f.composedPath().includes(g))) {
if (f.detail === 0 && (a = !c(f)), !a) {
a = true;
return;
}
e(f);
}
}, { passive: true, capture: s }),
un(i, "pointerdown", (f) => {
const g = Qi(n);
g && (a = !f.composedPath().includes(g) && !c(f));
}, { passive: true }),
o && un(i, "blur", (f) => {
var g;
const p = Qi(n);
((g = i.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(p != null && p.contains(i.document.activeElement)) && e(f);
})
].filter(Boolean);
return () => d.forEach((f) => f());
}
function jv(n, e = false) {
const t = ref(), i = () => t.value = !!n();
return i(), gw(i, e), t;
}
var Sp = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
var _p = "__vueuse_ssr_handlers__";
Sp[_p] = Sp[_p] || {};
function bw({ document: n = vw } = {}) {
if (!n)
return ref("visible");
const e = ref(n.visibilityState);
return un(n, "visibilitychange", () => {
e.value = n.visibilityState;
}), e;
}
var Tp = Object.getOwnPropertySymbols;
var xw = Object.prototype.hasOwnProperty;
var Mw = Object.prototype.propertyIsEnumerable;
var ww = (n, e) => {
var t = {};
for (var i in n)
xw.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
if (n != null && Tp)
for (var i of Tp(n))
e.indexOf(i) < 0 && Mw.call(n, i) && (t[i] = n[i]);
return t;
};
function Yn(n, e, t = {}) {
const i = t, { window: r = tl } = i, s = ww(i, ["window"]);
let o;
const a = jv(() => r && "ResizeObserver" in r), c = () => {
o && (o.disconnect(), o = void 0);
}, l = watch(() => Qi(n), (h6) => {
c(), a.value && r && h6 && (o = new ResizeObserver(e), o.observe(h6, s));
}, { immediate: true, flush: "post" }), d = () => {
c(), l();
};
return Yc(d), {
isSupported: a,
stop: d
};
}
var Ep = Object.getOwnPropertySymbols;
var Aw = Object.prototype.hasOwnProperty;
var Sw = Object.prototype.propertyIsEnumerable;
var _w = (n, e) => {
var t = {};
for (var i in n)
Aw.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
if (n != null && Ep)
for (var i of Ep(n))
e.indexOf(i) < 0 && Sw.call(n, i) && (t[i] = n[i]);
return t;
};
function Tw(n, e, t = {}) {
const i = t, { window: r = tl } = i, s = _w(i, ["window"]);
let o;
const a = jv(() => r && "MutationObserver" in r), c = () => {
o && (o.disconnect(), o = void 0);
}, l = watch(() => Qi(n), (h6) => {
c(), a.value && r && h6 && (o = new MutationObserver(e), o.observe(h6, s));
}, { immediate: true }), d = () => {
c(), l();
};
return Yc(d), {
isSupported: a,
stop: d
};
}
var Cp;
(function(n) {
n.UP = "UP", n.RIGHT = "RIGHT", n.DOWN = "DOWN", n.LEFT = "LEFT", n.NONE = "NONE";
})(Cp || (Cp = {}));
var Ew = Object.defineProperty;
var Lp = Object.getOwnPropertySymbols;
var Cw = Object.prototype.hasOwnProperty;
var Lw = Object.prototype.propertyIsEnumerable;
var Rp = (n, e, t) => e in n ? Ew(n, e, { enumerable: true, configurable: true, writable: true, value: t }) : n[e] = t;
var Rw = (n, e) => {
for (var t in e || (e = {}))
Cw.call(e, t) && Rp(n, t, e[t]);
if (Lp)
for (var t of Lp(e))
Lw.call(e, t) && Rp(n, t, e[t]);
return n;
};
var Fw = {
easeInSine: [0.12, 0, 0.39, 0],
easeOutSine: [0.61, 1, 0.88, 1],
easeInOutSine: [0.37, 0, 0.63, 1],
easeInQuad: [0.11, 0, 0.5, 0],
easeOutQuad: [0.5, 1, 0.89, 1],
easeInOutQuad: [0.45, 0, 0.55, 1],
easeInCubic: [0.32, 0, 0.67, 0],
easeOutCubic: [0.33, 1, 0.68, 1],
easeInOutCubic: [0.65, 0, 0.35, 1],
easeInQuart: [0.5, 0, 0.75, 0],
easeOutQuart: [0.25, 1, 0.5, 1],
easeInOutQuart: [0.76, 0, 0.24, 1],
easeInQuint: [0.64, 0, 0.78, 0],
easeOutQuint: [0.22, 1, 0.36, 1],
easeInOutQuint: [0.83, 0, 0.17, 1],
easeInExpo: [0.7, 0, 0.84, 0],
easeOutExpo: [0.16, 1, 0.3, 1],
easeInOutExpo: [0.87, 0, 0.13, 1],
easeInCirc: [0.55, 0, 1, 0.45],
easeOutCirc: [0, 0.55, 0.45, 1],
easeInOutCirc: [0.85, 0, 0.15, 1],
easeInBack: [0.36, 0, 0.66, -0.56],
easeOutBack: [0.34, 1.56, 0.64, 1],
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
Rw({
linear: mw
}, Fw);
function Pw({ window: n = tl } = {}) {
if (!n)
return ref(false);
const e = ref(n.document.hasFocus());
return un(n, "blur", () => {
e.value = false;
}), un(n, "focus", () => {
e.value = true;
}), e;
}
var Iw = () => en && /firefox/i.test(window.navigator.userAgent);
Object.freeze({});
Object.freeze([]);
var Oa = () => {
};
var Ow = Object.prototype.hasOwnProperty;
var Fp = (n, e) => Ow.call(n, e);
var Pn = Array.isArray;
var Sn = (n) => typeof n == "function";
var vn = (n) => typeof n == "string";
var Tn = (n) => n !== null && typeof n == "object";
var Dw = Object.prototype.toString;
var Nw = (n) => Dw.call(n);
var Pu = (n) => Nw(n).slice(8, -1);
var Vd = (n) => {
const e = /* @__PURE__ */ Object.create(null);
return (t) => e[t] || (e[t] = n(t));
};
var Bw = /-(\w)/g;
var Uw = Vd(
(n) => n.replace(Bw, (e, t) => t ? t.toUpperCase() : "")
);
var zw = /\B([A-Z])/g;
var Vw = Vd(
(n) => n.replace(zw, "-$1").toLowerCase()
);
var kw = Vd((n) => n.charAt(0).toUpperCase() + n.slice(1));
var $v = typeof global == "object" && global && global.Object === Object && global;
var Gw = typeof self == "object" && self && self.Object === Object && self;
var Bi = $v || Gw || Function("return this")();
var Pi = Bi.Symbol;
var Zv = Object.prototype;
var Hw = Zv.hasOwnProperty;
var Ww = Zv.toString;
var la = Pi ? Pi.toStringTag : void 0;
function jw(n) {
var e = Hw.call(n, la), t = n[la];
try {
n[la] = void 0;
var i = true;
} catch {
}
var r = Ww.call(n);
return i && (e ? n[la] = t : delete n[la]), r;
}
var $w = Object.prototype;
var Zw = $w.toString;
function Xw(n) {
return Zw.call(n);
}
var Yw = "[object Null]";
var Jw = "[object Undefined]";
var Pp = Pi ? Pi.toStringTag : void 0;
function Zo(n) {
return n == null ? n === void 0 ? Jw : Yw : Pp && Pp in Object(n) ? jw(n) : Xw(n);
}
function Mo(n) {
return n != null && typeof n == "object";
}
var Kw = "[object Symbol]";
function Jc(n) {
return typeof n == "symbol" || Mo(n) && Zo(n) == Kw;
}
function qw(n, e) {
for (var t = -1, i = n == null ? 0 : n.length, r = Array(i); ++t < i; )
r[t] = e(n[t], t, n);
return r;
}
var pi = Array.isArray;
var Qw = 1 / 0;
var Ip = Pi ? Pi.prototype : void 0;
var Op = Ip ? Ip.toString : void 0;
function Xv(n) {
if (typeof n == "string")
return n;
if (pi(n))
return qw(n, Xv) + "";
if (Jc(n))
return Op ? Op.call(n) : "";
var e = n + "";
return e == "0" && 1 / n == -Qw ? "-0" : e;
}
var e1 = /\s/;
function t1(n) {
for (var e = n.length; e-- && e1.test(n.charAt(e)); )
;
return e;
}
var n1 = /^\s+/;
function i1(n) {
return n && n.slice(0, t1(n) + 1).replace(n1, "");
}
function Ur(n) {
var e = typeof n;
return n != null && (e == "object" || e == "function");
}
var Dp = NaN;
var r1 = /^[-+]0x[0-9a-f]+$/i;
var s1 = /^0b[01]+$/i;
var o1 = /^0o[0-7]+$/i;
var a1 = parseInt;
function Np(n) {
if (typeof n == "number")
return n;
if (Jc(n))
return Dp;
if (Ur(n)) {
var e = typeof n.valueOf == "function" ? n.valueOf() : n;
n = Ur(e) ? e + "" : e;
}
if (typeof n != "string")
return n === 0 ? n : +n;
n = i1(n);
var t = s1.test(n);
return t || o1.test(n) ? a1(n.slice(2), t ? 2 : 8) : r1.test(n) ? Dp : +n;
}
function Yv(n) {
return n;
}
var l1 = "[object AsyncFunction]";
var c1 = "[object Function]";
var u1 = "[object GeneratorFunction]";
var h1 = "[object Proxy]";
function Jv(n) {
if (!Ur(n))
return false;
var e = Zo(n);
return e == c1 || e == u1 || e == l1 || e == h1;
}
var Iu = Bi["__core-js_shared__"];
var Bp = function() {
var n = /[^.]+$/.exec(Iu && Iu.keys && Iu.keys.IE_PROTO || "");
return n ? "Symbol(src)_1." + n : "";
}();
function d1(n) {
return !!Bp && Bp in n;
}
var f1 = Function.prototype;
var p1 = f1.toString;
function Os(n) {
if (n != null) {
try {
return p1.call(n);
} catch {
}
try {
return n + "";
} catch {
}
}
return "";
}
var m1 = /[\\^$.*+?()[\]{}|]/g;
var g1 = /^\[object .+?Constructor\]$/;
var v1 = Function.prototype;
var y1 = Object.prototype;
var b1 = v1.toString;
var x1 = y1.hasOwnProperty;
var M1 = RegExp(
"^" + b1.call(x1).replace(m1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function w1(n) {
if (!Ur(n) || d1(n))
return false;
var e = Jv(n) ? M1 : g1;
return e.test(Os(n));
}
function A1(n, e) {
return n == null ? void 0 : n[e];
}
function Ds(n, e) {
var t = A1(n, e);
return w1(t) ? t : void 0;
}
var Vh = Ds(Bi, "WeakMap");
function S1(n, e, t) {
switch (t.length) {
case 0:
return n.call(e);
case 1:
return n.call(e, t[0]);
case 2:
return n.call(e, t[0], t[1]);
case 3:
return n.call(e, t[0], t[1], t[2]);
}
return n.apply(e, t);
}
var _1 = 800;
var T1 = 16;
var E1 = Date.now;
function C1(n) {
var e = 0, t = 0;
return function() {
var i = E1(), r = T1 - (i - t);
if (t = i, r > 0) {
if (++e >= _1)
return arguments[0];
} else
e = 0;
return n.apply(void 0, arguments);
};
}
function L1(n) {
return function() {
return n;
};
}
var Fc = function() {
try {
var n = Ds(Object, "defineProperty");
return n({}, "", {}), n;
} catch {
}
}();
var R1 = Fc ? function(n, e) {
return Fc(n, "toString", {
configurable: true,
enumerable: false,
value: L1(e),
writable: true
});
} : Yv;
var F1 = C1(R1);
function P1(n, e, t, i) {
n.length;
for (var r = t + 1; r--; )
if (e(n[r], r, n))
return r;
return -1;
}
var I1 = 9007199254740991;
var O1 = /^(?:0|[1-9]\d*)$/;
function kd(n, e) {
var t = typeof n;
return e = e ?? I1, !!e && (t == "number" || t != "symbol" && O1.test(n)) && n > -1 && n % 1 == 0 && n < e;
}
function D1(n, e, t) {
e == "__proto__" && Fc ? Fc(n, e, {
configurable: true,
enumerable: true,
value: t,
writable: true
}) : n[e] = t;
}
function Gd(n, e) {
return n === e || n !== n && e !== e;
}
var N1 = Object.prototype;
var B1 = N1.hasOwnProperty;
function U1(n, e, t) {
var i = n[e];
(!(B1.call(n, e) && Gd(i, t)) || t === void 0 && !(e in n)) && D1(n, e, t);
}
var Up = Math.max;
function z1(n, e, t) {
return e = Up(e === void 0 ? n.length - 1 : e, 0), function() {
for (var i = arguments, r = -1, s = Up(i.length - e, 0), o = Array(s); ++r < s; )
o[r] = i[e + r];
r = -1;
for (var a = Array(e + 1); ++r < e; )
a[r] = i[r];
return a[e] = t(o), S1(n, this, a);
};
}
var V1 = 9007199254740991;
function Hd(n) {
return typeof n == "number" && n > -1 && n % 1 == 0 && n <= V1;
}
function k1(n) {
return n != null && Hd(n.length) && !Jv(n);
}
var G1 = Object.prototype;
function H1(n) {
var e = n && n.constructor, t = typeof e == "function" && e.prototype || G1;
return n === t;
}
function W1(n, e) {
for (var t = -1, i = Array(n); ++t < n; )
i[t] = e(t);
return i;
}
var j1 = "[object Arguments]";
function zp(n) {
return Mo(n) && Zo(n) == j1;
}
var Kv = Object.prototype;
var $1 = Kv.hasOwnProperty;
var Z1 = Kv.propertyIsEnumerable;
var Wd = zp(/* @__PURE__ */ function() {
return arguments;
}()) ? zp : function(n) {
return Mo(n) && $1.call(n, "callee") && !Z1.call(n, "callee");
};
function X1() {
return false;
}
var qv = typeof exports == "object" && exports && !exports.nodeType && exports;
var Vp = qv && typeof module == "object" && module && !module.nodeType && module;
var Y1 = Vp && Vp.exports === qv;
var kp = Y1 ? Bi.Buffer : void 0;
var J1 = kp ? kp.isBuffer : void 0;
var kh = J1 || X1;
var K1 = "[object Arguments]";
var q1 = "[object Array]";
var Q1 = "[object Boolean]";
var eA = "[object Date]";
var tA = "[object Error]";
var nA = "[object Function]";
var iA = "[object Map]";
var rA = "[object Number]";
var sA = "[object Object]";
var oA = "[object RegExp]";
var aA = "[object Set]";
var lA = "[object String]";
var cA = "[object WeakMap]";
var uA = "[object ArrayBuffer]";
var hA = "[object DataView]";
var dA = "[object Float32Array]";
var fA = "[object Float64Array]";
var pA = "[object Int8Array]";
var mA = "[object Int16Array]";
var gA = "[object Int32Array]";
var vA = "[object Uint8Array]";
var yA = "[object Uint8ClampedArray]";
var bA = "[object Uint16Array]";
var xA = "[object Uint32Array]";
var Et = {};
Et[dA] = Et[fA] = Et[pA] = Et[mA] = Et[gA] = Et[vA] = Et[yA] = Et[bA] = Et[xA] = true;
Et[K1] = Et[q1] = Et[uA] = Et[Q1] = Et[hA] = Et[eA] = Et[tA] = Et[nA] = Et[iA] = Et[rA] = Et[sA] = Et[oA] = Et[aA] = Et[lA] = Et[cA] = false;
function MA(n) {
return Mo(n) && Hd(n.length) && !!Et[Zo(n)];
}
function wA(n) {
return function(e) {
return n(e);
};
}
var Qv = typeof exports == "object" && exports && !exports.nodeType && exports;
var Ea = Qv && typeof module == "object" && module && !module.nodeType && module;
var AA = Ea && Ea.exports === Qv;
var Ou = AA && $v.process;
var Gp = function() {
try {
var n = Ea && Ea.require && Ea.require("util").types;
return n || Ou && Ou.binding && Ou.binding("util");
} catch {
}
}();
var Hp = Gp && Gp.isTypedArray;
var e0 = Hp ? wA(Hp) : MA;
var SA = Object.prototype;
var _A = SA.hasOwnProperty;
function TA(n, e) {
var t = pi(n), i = !t && Wd(n), r = !t && !i && kh(n), s = !t && !i && !r && e0(n), o = t || i || r || s, a = o ? W1(n.length, String) : [], c = a.length;
for (var l in n)
_A.call(n, l) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
r && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
s && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
kd(l, c))) && a.push(l);
return a;
}
function EA(n, e) {
return function(t) {
return n(e(t));
};
}
var CA = EA(Object.keys, Object);
var LA = Object.prototype;
var RA = LA.hasOwnProperty;
function FA(n) {
if (!H1(n))
return CA(n);
var e = [];
for (var t in Object(n))
RA.call(n, t) && t != "constructor" && e.push(t);
return e;
}
function t0(n) {
return k1(n) ? TA(n) : FA(n);
}
var PA = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var IA = /^\w*$/;
function jd(n, e) {
if (pi(n))
return false;
var t = typeof n;
return t == "number" || t == "symbol" || t == "boolean" || n == null || Jc(n) ? true : IA.test(n) || !PA.test(n) || e != null && n in Object(e);
}
var Da = Ds(Object, "create");
function OA() {
this.__data__ = Da ? Da(null) : {}, this.size = 0;
}
function DA(n) {
var e = this.has(n) && delete this.__data__[n];
return this.size -= e ? 1 : 0, e;
}
var NA = "__lodash_hash_undefined__";
var BA = Object.prototype;
var UA = BA.hasOwnProperty;
function zA(n) {
var e = this.__data__;
if (Da) {
var t = e[n];
return t === NA ? void 0 : t;
}
return UA.call(e, n) ? e[n] : void 0;
}
var VA = Object.prototype;
var kA = VA.hasOwnProperty;
function GA(n) {
var e = this.__data__;
return Da ? e[n] !== void 0 : kA.call(e, n);
}
var HA = "__lodash_hash_undefined__";
function WA(n, e) {
var t = this.__data__;
return this.size += this.has(n) ? 0 : 1, t[n] = Da && e === void 0 ? HA : e, this;
}
function _s(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var i = n[e];
this.set(i[0], i[1]);
}
}
_s.prototype.clear = OA;
_s.prototype.delete = DA;
_s.prototype.get = zA;
_s.prototype.has = GA;
_s.prototype.set = WA;
function jA() {
this.__data__ = [], this.size = 0;
}
function Kc(n, e) {
for (var t = n.length; t--; )
if (Gd(n[t][0], e))
return t;
return -1;
}
var $A = Array.prototype;
var ZA = $A.splice;
function XA(n) {
var e = this.__data__, t = Kc(e, n);
if (t < 0)
return false;
var i = e.length - 1;
return t == i ? e.pop() : ZA.call(e, t, 1), --this.size, true;
}
function YA(n) {
var e = this.__data__, t = Kc(e, n);
return t < 0 ? void 0 : e[t][1];
}
function JA(n) {
return Kc(this.__data__, n) > -1;
}
function KA(n, e) {
var t = this.__data__, i = Kc(t, n);
return i < 0 ? (++this.size, t.push([n, e])) : t[i][1] = e, this;
}
function lr(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var i = n[e];
this.set(i[0], i[1]);
}
}
lr.prototype.clear = jA;
lr.prototype.delete = XA;
lr.prototype.get = YA;
lr.prototype.has = JA;
lr.prototype.set = KA;
var Na = Ds(Bi, "Map");
function qA() {
this.size = 0, this.__data__ = {
hash: new _s(),
map: new (Na || lr)(),
string: new _s()
};
}
function QA(n) {
var e = typeof n;
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? n !== "__proto__" : n === null;
}
function qc(n, e) {
var t = n.__data__;
return QA(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
}
function eS(n) {
var e = qc(this, n).delete(n);
return this.size -= e ? 1 : 0, e;
}
function tS(n) {
return qc(this, n).get(n);
}
function nS(n) {
return qc(this, n).has(n);
}
function iS(n, e) {
var t = qc(this, n), i = t.size;
return t.set(n, e), this.size += t.size == i ? 0 : 1, this;
}
function cr(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var i = n[e];
this.set(i[0], i[1]);
}
}
cr.prototype.clear = qA;
cr.prototype.delete = eS;
cr.prototype.get = tS;
cr.prototype.has = nS;
cr.prototype.set = iS;
var rS = "Expected a function";
function $d(n, e) {
if (typeof n != "function" || e != null && typeof e != "function")
throw new TypeError(rS);
var t = function() {
var i = arguments, r = e ? e.apply(this, i) : i[0], s = t.cache;
if (s.has(r))
return s.get(r);
var o = n.apply(this, i);
return t.cache = s.set(r, o) || s, o;
};
return t.cache = new ($d.Cache || cr)(), t;
}
$d.Cache = cr;
var sS = 500;
function oS(n) {
var e = $d(n, function(i) {
return t.size === sS && t.clear(), i;
}), t = e.cache;
return e;
}
var aS = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var lS = /\\(\\)?/g;
var cS = oS(function(n) {
var e = [];
return n.charCodeAt(0) === 46 && e.push(""), n.replace(aS, function(t, i, r, s) {
e.push(r ? s.replace(lS, "$1") : i || t);
}), e;
});
function uS(n) {
return n == null ? "" : Xv(n);
}
function Qc(n, e) {
return pi(n) ? n : jd(n, e) ? [n] : cS(uS(n));
}
var hS = 1 / 0;
function nl(n) {
if (typeof n == "string" || Jc(n))
return n;
var e = n + "";
return e == "0" && 1 / n == -hS ? "-0" : e;
}
function Zd(n, e) {
e = Qc(e, n);
for (var t = 0, i = e.length; n != null && t < i; )
n = n[nl(e[t++])];
return t && t == i ? n : void 0;
}
function Ji(n, e, t) {
var i = n == null ? void 0 : Zd(n, e);
return i === void 0 ? t : i;
}
function n0(n, e) {
for (var t = -1, i = e.length, r = n.length; ++t < i; )
n[r + t] = e[t];
return n;
}
var Wp = Pi ? Pi.isConcatSpreadable : void 0;
function dS(n) {
return pi(n) || Wd(n) || !!(Wp && n && n[Wp]);
}
function fS(n, e, t, i, r) {
var s = -1, o = n.length;
for (t || (t = dS), r || (r = []); ++s < o; ) {
var a = n[s];
t(a) ? n0(r, a) : r[r.length] = a;
}
return r;
}
function pS(n) {
var e = n == null ? 0 : n.length;
return e ? fS(n) : [];
}
function mS(n) {
return F1(z1(n, void 0, pS), n + "");
}
function Si() {
if (!arguments.length)
return [];
var n = arguments[0];
return pi(n) ? n : [n];
}
function gS() {
this.__data__ = new lr(), this.size = 0;
}
function vS(n) {
var e = this.__data__, t = e.delete(n);
return this.size = e.size, t;
}
function yS(n) {
return this.__data__.get(n);
}
function bS(n) {
return this.__data__.has(n);
}
var xS = 200;
function MS(n, e) {
var t = this.__data__;
if (t instanceof lr) {
var i = t.__data__;
if (!Na || i.length < xS - 1)
return i.push([n, e]), this.size = ++t.size, this;
t = this.__data__ = new cr(i);
}
return t.set(n, e), this.size = t.size, this;
}
function er(n) {
var e = this.__data__ = new lr(n);
this.size = e.size;
}
er.prototype.clear = gS;
er.prototype.delete = vS;
er.prototype.get = yS;
er.prototype.has = bS;
er.prototype.set = MS;
function wS(n, e) {
for (var t = -1, i = n == null ? 0 : n.length, r = 0, s = []; ++t < i; ) {
var o = n[t];
e(o, t, n) && (s[r++] = o);
}
return s;
}
function AS() {
return [];
}
var SS = Object.prototype;
var _S = SS.propertyIsEnumerable;
var jp = Object.getOwnPropertySymbols;
var TS = jp ? function(n) {
return n == null ? [] : (n = Object(n), wS(jp(n), function(e) {
return _S.call(n, e);
}));
} : AS;
function ES(n, e, t) {
var i = e(n);
return pi(n) ? i : n0(i, t(n));
}
function $p(n) {
return ES(n, t0, TS);
}
var Gh = Ds(Bi, "DataView");
var Hh = Ds(Bi, "Promise");
var Wh = Ds(Bi, "Set");
var Zp = "[object Map]";
var CS = "[object Object]";
var Xp = "[object Promise]";
var Yp = "[object Set]";
var Jp = "[object WeakMap]";
var Kp = "[object DataView]";
var LS = Os(Gh);
var RS = Os(Na);
var FS = Os(Hh);
var PS = Os(Wh);
var IS = Os(Vh);
var Cr = Zo;
(Gh && Cr(new Gh(new ArrayBuffer(1))) != Kp || Na && Cr(new Na()) != Zp || Hh && Cr(Hh.resolve()) != Xp || Wh && Cr(new Wh()) != Yp || Vh && Cr(new Vh()) != Jp) && (Cr = function(n) {
var e = Zo(n), t = e == CS ? n.constructor : void 0, i = t ? Os(t) : "";
if (i)
switch (i) {
case LS:
return Kp;
case RS:
return Zp;
case FS:
return Xp;
case PS:
return Yp;
case IS:
return Jp;
}
return e;
});
var qp = Bi.Uint8Array;
var OS = "__lodash_hash_undefined__";
function DS(n) {
return this.__data__.set(n, OS), this;
}
function NS(n) {
return this.__data__.has(n);
}
function Pc(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.__data__ = new cr(); ++e < t; )
this.add(n[e]);
}
Pc.prototype.add = Pc.prototype.push = DS;
Pc.prototype.has = NS;
function BS(n, e) {
for (var t = -1, i = n == null ? 0 : n.length; ++t < i; )
if (e(n[t], t, n))
return true;
return false;
}
function US(n, e) {
return n.has(e);
}
var zS = 1;
var VS = 2;
function i0(n, e, t, i, r, s) {
var o = t & zS, a = n.length, c = e.length;
if (a != c && !(o && c > a))
return false;
var l = s.get(n), d = s.get(e);
if (l && d)
return l == e && d == n;
var h6 = -1, f = true, g = t & VS ? new Pc() : void 0;
for (s.set(n, e), s.set(e, n); ++h6 < a; ) {
var p = n[h6], u = e[h6];
if (i)
var y = o ? i(u, p, h6, e, n, s) : i(p, u, h6, n, e, s);
if (y !== void 0) {
if (y)
continue;
f = false;
break;
}
if (g) {
if (!BS(e, function(v, m) {
if (!US(g, m) && (p === v || r(p, v, t, i, s)))
return g.push(m);
})) {
f = false;
break;
}
} else if (!(p === u || r(p, u, t, i, s))) {
f = false;
break;
}
}
return s.delete(n), s.delete(e), f;
}
function kS(n) {
var e = -1, t = Array(n.size);
return n.forEach(function(i, r) {
t[++e] = [r, i];
}), t;
}
function GS(n) {
var e = -1, t = Array(n.size);
return n.forEach(function(i) {
t[++e] = i;
}), t;
}
var HS = 1;
var WS = 2;
var jS = "[object Boolean]";
var $S = "[object Date]";
var ZS = "[object Error]";
var XS = "[object Map]";
var YS = "[object Number]";
var JS = "[object RegExp]";
var KS = "[object Set]";
var qS = "[object String]";
var QS = "[object Symbol]";
var e_ = "[object ArrayBuffer]";
var t_ = "[object DataView]";
var Qp = Pi ? Pi.prototype : void 0;
var Du = Qp ? Qp.valueOf : void 0;
function n_(n, e, t, i, r, s, o) {
switch (t) {
case t_:
if (n.byteLength != e.byteLength || n.byteOffset != e.byteOffset)
return false;
n = n.buffer, e = e.buffer;
case e_:
return !(n.byteLength != e.byteLength || !s(new qp(n), new qp(e)));
case jS:
case $S:
case YS:
return Gd(+n, +e);
case ZS:
return n.name == e.name && n.message == e.message;
case JS:
case qS:
return n == e + "";
case XS:
var a = kS;
case KS:
var c = i & HS;
if (a || (a = GS), n.size != e.size && !c)
return false;
var l = o.get(n);
if (l)
return l == e;
i |= WS, o.set(n, e);
var d = i0(a(n), a(e), i, r, s, o);
return o.delete(n), d;
case QS:
if (Du)
return Du.call(n) == Du.call(e);
}
return false;
}
var i_ = 1;
var r_ = Object.prototype;
var s_ = r_.hasOwnProperty;
function o_(n, e, t, i, r, s) {
var o = t & i_, a = $p(n), c = a.length, l = $p(e), d = l.length;
if (c != d && !o)
return false;
for (var h6 = c; h6--; ) {
var f = a[h6];
if (!(o ? f in e : s_.call(e, f)))
return false;
}
var g = s.get(n), p = s.get(e);
if (g && p)
return g == e && p == n;
var u = true;
s.set(n, e), s.set(e, n);
for (var y = o; ++h6 < c; ) {
f = a[h6];
var v = n[f], m = e[f];
if (i)
var x = o ? i(m, v, f, e, n, s) : i(v, m, f, n, e, s);
if (!(x === void 0 ? v === m || r(v, m, t, i, s) : x)) {
u = false;
break;
}
y || (y = f == "constructor");
}
if (u && !y) {
var w = n.constructor, A = e.constructor;
w != A && "constructor" in n && "constructor" in e && !(typeof w == "function" && w instanceof w && typeof A == "function" && A instanceof A) && (u = false);
}
return s.delete(n), s.delete(e), u;
}
var a_ = 1;
var em = "[object Arguments]";
var tm = "[object Array]";
var _l = "[object Object]";
var l_ = Object.prototype;
var nm = l_.hasOwnProperty;
function c_(n, e, t, i, r, s) {
var o = pi(n), a = pi(e), c = o ? tm : Cr(n), l = a ? tm : Cr(e);
c = c == em ? _l : c, l = l == em ? _l : l;
var d = c == _l, h6 = l == _l, f = c == l;
if (f && kh(n)) {
if (!kh(e))
return false;
o = true, d = false;
}
if (f && !d)
return s || (s = new er()), o || e0(n) ? i0(n, e, t, i, r, s) : n_(n, e, c, t, i, r, s);
if (!(t & a_)) {
var g = d && nm.call(n, "__wrapped__"), p = h6 && nm.call(e, "__wrapped__");
if (g || p) {
var u = g ? n.value() : n, y = p ? e.value() : e;
return s || (s = new er()), r(u, y, t, i, s);
}
}
return f ? (s || (s = new er()), o_(n, e, t, i, r, s)) : false;
}
function eu(n, e, t, i, r) {
return n === e ? true : n == null || e == null || !Mo(n) && !Mo(e) ? n !== n && e !== e : c_(n, e, t, i, eu, r);
}
var u_ = 1;
var h_ = 2;
function d_(n, e, t, i) {
var r = t.length, s = r;
if (n == null)
return !s;
for (n = Object(n); r--; ) {
var o = t[r];
if (o[2] ? o[1] !== n[o[0]] : !(o[0] in n))
return false;
}
for (; ++r < s; ) {
o = t[r];
var a = o[0], c = n[a], l = o[1];
if (o[2]) {
if (c === void 0 && !(a in n))
return false;
} else {
var d = new er(), h6;
if (!(h6 === void 0 ? eu(l, c, u_ | h_, i, d) : h6))
return false;
}
}
return true;
}
function r0(n) {
return n === n && !Ur(n);
}
function f_(n) {
for (var e = t0(n), t = e.length; t--; ) {
var i = e[t], r = n[i];
e[t] = [i, r, r0(r)];
}
return e;
}
function s0(n, e) {
return function(t) {
return t == null ? false : t[n] === e && (e !== void 0 || n in Object(t));
};
}
function p_(n) {
var e = f_(n);
return e.length == 1 && e[0][2] ? s0(e[0][0], e[0][1]) : function(t) {
return t === n || d_(t, n, e);
};
}
function m_(n, e) {
return n != null && e in Object(n);
}
function g_(n, e, t) {
e = Qc(e, n);
for (var i = -1, r = e.length, s = false; ++i < r; ) {
var o = nl(e[i]);
if (!(s = n != null && t(n, o)))
break;
n = n[o];
}
return s || ++i != r ? s : (r = n == null ? 0 : n.length, !!r && Hd(r) && kd(o, r) && (pi(n) || Wd(n)));
}
function o0(n, e) {
return n != null && g_(n, e, m_);
}
var v_ = 1;
var y_ = 2;
function b_(n, e) {
return jd(n) && r0(e) ? s0(nl(n), e) : function(t) {
var i = Ji(t, n);
return i === void 0 && i === e ? o0(t, n) : eu(e, i, v_ | y_);
};
}
function x_(n) {
return function(e) {
return e == null ? void 0 : e[n];
};
}
function M_(n) {
return function(e) {
return Zd(e, n);
};
}
function w_(n) {
return jd(n) ? x_(nl(n)) : M_(n);
}
function A_(n) {
return typeof n == "function" ? n : n == null ? Yv : typeof n == "object" ? pi(n) ? b_(n[0], n[1]) : p_(n) : w_(n);
}
var Nu = function() {
return Bi.Date.now();
};
var S_ = "Expected a function";
var __ = Math.max;
var T_ = Math.min;
function jh(n, e, t) {
var i, r, s, o, a, c, l = 0, d = false, h6 = false, f = true;
if (typeof n != "function")
throw new TypeError(S_);
e = Np(e) || 0, Ur(t) && (d = !!t.leading, h6 = "maxWait" in t, s = h6 ? __(Np(t.maxWait) || 0, e) : s, f = "trailing" in t ? !!t.trailing : f);
function g(M) {
var R = i, L = r;
return i = r = void 0, l = M, o = n.apply(L, R), o;
}
function p(M) {
return l = M, a = setTimeout(v, e), d ? g(M) : o;
}
function u(M) {
var R = M - c, L = M - l, S = e - R;
return h6 ? T_(S, s - L) : S;
}
function y(M) {
var R = M - c, L = M - l;
return c === void 0 || R >= e || R < 0 || h6 && L >= s;
}
function v() {
var M = Nu();
if (y(M))
return m(M);
a = setTimeout(v, u(M));
}
function m(M) {
return a = void 0, f && i ? g(M) : (i = r = void 0, o);
}
function x() {
a !== void 0 && clearTimeout(a), l = 0, i = c = r = a = void 0;
}
function w() {
return a === void 0 ? o : m(Nu());
}
function A() {
var M = Nu(), R = y(M);
if (i = arguments, r = this, c = M, R) {
if (a === void 0)
return p(c);
if (h6)
return clearTimeout(a), a = setTimeout(v, e), g(c);
}
return a === void 0 && (a = setTimeout(v, e)), o;
}
return A.cancel = x, A.flush = w, A;
}
function E_(n, e, t) {
var i = n == null ? 0 : n.length;
if (!i)
return -1;
var r = i - 1;
return P1(n, A_(e), r);
}
function Ic(n) {
for (var e = -1, t = n == null ? 0 : n.length, i = {}; ++e < t; ) {
var r = n[e];
i[r[0]] = r[1];
}
return i;
}
function $h(n, e) {
return eu(n, e);
}
function Ci(n) {
return n == null;
}
function C_(n) {
return n === void 0;
}
function L_(n, e, t, i) {
if (!Ur(n))
return n;
e = Qc(e, n);
for (var r = -1, s = e.length, o = s - 1, a = n; a != null && ++r < s; ) {
var c = nl(e[r]), l = t;
if (c === "__proto__" || c === "constructor" || c === "prototype")
return n;
if (r != o) {
var d = a[c];
l = void 0, l === void 0 && (l = Ur(d) ? d : kd(e[r + 1]) ? [] : {});
}
U1(a, c, l), a = a[c];
}
return n;
}
function R_(n, e, t) {
for (var i = -1, r = e.length, s = {}; ++i < r; ) {
var o = e[i], a = Zd(n, o);
t(a, o) && L_(s, Qc(o, n), a);
}
return s;
}
function F_(n, e) {
return R_(n, e, function(t, i) {
return o0(n, i);
});
}
var P_ = mS(function(n, e) {
return n == null ? {} : F_(n, e);
});
var di = (n) => n === void 0;
var Ba = (n) => typeof n == "boolean";
var yt = (n) => typeof n == "number";
var ys = (n) => typeof Element > "u" ? false : n instanceof Element;
var im = (n) => Ci(n);
var I_ = (n) => vn(n) ? !Number.isNaN(Number(n)) : false;
var O_ = (n = "") => n.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
var Rr = (n) => kw(n);
var rm = (n) => Object.keys(n);
var a0 = class extends Error {
constructor(e) {
super(e), this.name = "ElementPlusError";
}
};
function Xo(n, e) {
throw new a0(`[${n}] ${e}`);
}
function Vt(n, e) {
if (true) {
const t = vn(n) ? new a0(`[${n}] ${e}`) : n;
console.warn(t);
}
}
var D_ = "utils/dom/style";
var l0 = (n = "") => n.split(" ").filter((e) => !!e.trim());
var sm = (n, e) => {
!n || !e.trim() || n.classList.add(...l0(e));
};
var Oc = (n, e) => {
!n || !e.trim() || n.classList.remove(...l0(e));
};
var ca = (n, e) => {
var t;
if (!en || !n || !e)
return "";
let i = Uw(e);
i === "float" && (i = "cssFloat");
try {
const r = n.style[i];
if (r)
return r;
const s = (t = document.defaultView) == null ? void 0 : t.getComputedStyle(n, "");
return s ? s[i] : "";
} catch {
return n.style[i];
}
};
function Dc(n, e = "px") {
if (!n)
return "";
if (yt(n) || I_(n))
return `${n}${e}`;
if (vn(n))
return n;
Vt(D_, "binding value must be a string or number");
}
function N_(n, e) {
if (!en)
return;
if (!e) {
n.scrollTop = 0;
return;
}
const t = [];
let i = e.offsetParent;
for (; i !== null && n !== i && n.contains(i); )
t.push(i), i = i.offsetParent;
const r = e.offsetTop + t.reduce((c, l) => c + l.offsetTop, 0), s = r + e.offsetHeight, o = n.scrollTop, a = o + n.clientHeight;
r < o ? n.scrollTop = r : s > a && (n.scrollTop = s - n.clientHeight);
}
var B_ = defineComponent({
name: "ArrowDown",
__name: "arrow-down",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
})
]));
}
});
var Xd = B_;
var U_ = defineComponent({
name: "ArrowLeft",
__name: "arrow-left",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"
})
]));
}
});
var zr = U_;
var z_ = defineComponent({
name: "ArrowRight",
__name: "arrow-right",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
})
]));
}
});
var Vr = z_;
var V_ = defineComponent({
name: "ArrowUp",
__name: "arrow-up",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
})
]));
}
});
var k_ = V_;
var G_ = defineComponent({
name: "CircleCheck",
__name: "circle-check",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
}),
createBaseVNode("path", {
fill: "currentColor",
d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
})
]));
}
});
var H_ = G_;
var W_ = defineComponent({
name: "CircleClose",
__name: "circle-close",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
}),
createBaseVNode("path", {
fill: "currentColor",
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
})
]));
}
});
var Yd = W_;
var j_ = defineComponent({
name: "Close",
__name: "close",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
})
]));
}
});
var Zh = j_;
var $_ = defineComponent({
name: "Delete",
__name: "delete",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
})
]));
}
});
var Nc = $_;
var Z_ = defineComponent({
name: "Hide",
__name: "hide",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
}),
createBaseVNode("path", {
fill: "currentColor",
d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
})
]));
}
});
var X_ = Z_;
var Y_ = defineComponent({
name: "Loading",
__name: "loading",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
})
]));
}
});
var c0 = Y_;
var J_ = defineComponent({
name: "Minus",
__name: "minus",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
})
]));
}
});
var K_ = J_;
var q_ = defineComponent({
name: "Plus",
__name: "plus",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
})
]));
}
});
var tu = q_;
var Q_ = defineComponent({
name: "View",
__name: "view",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
})
]));
}
});
var eT = Q_;
var tT = defineComponent({
name: "WarningFilled",
__name: "warning-filled",
setup(n) {
return (e, t) => (openBlock(), createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
createBaseVNode("path", {
fill: "currentColor",
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
})
]));
}
});
var u0 = tT;
var h0 = "__epPropKey";
var Je = (n) => n;
var nT = (n) => Tn(n) && !!n[h0];
var nu = (n, e) => {
if (!Tn(n) || nT(n))
return n;
const { values: t, required: i, default: r, type: s, validator: o } = n, c = {
type: s,
required: !!i,
validator: t || o ? (l) => {
let d = false, h6 = [];
if (t && (h6 = Array.from(t), Fp(n, "default") && h6.push(r), d || (d = h6.includes(l))), o && (d || (d = o(l))), !d && h6.length > 0) {
const f = [...new Set(h6)].map((g) => JSON.stringify(g)).join(", ");
warn(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`);
}
return d;
} : void 0,
[h0]: true
};
return Fp(n, "default") && (c.default = r), c;
};
var at = (n) => Ic(Object.entries(n).map(([e, t]) => [
e,
nu(t, e)
]));
var kr = Je([
String,
Object,
Function
]);
var d0 = {
validating: c0,
success: H_,
error: Yd
};
var on = (n, e) => {
if (n.install = (t) => {
for (const i of [n, ...Object.values(e ?? {})])
t.component(i.name, i);
}, e)
for (const [t, i] of Object.entries(e))
n[t] = i;
return n;
};
var iT = (n, e) => (n.install = (t) => {
t.directive(e, n);
}, n);
var vi = (n) => (n.install = Oa, n);
var Li = {
tab: "Tab",
enter: "Enter",
space: "Space",
left: "ArrowLeft",
up: "ArrowUp",
right: "ArrowRight",
down: "ArrowDown",
esc: "Escape",
delete: "Delete",
backspace: "Backspace",
numpadEnter: "NumpadEnter",
pageUp: "PageUp",
pageDown: "PageDown",
home: "Home",
end: "End"
};
var At = "update:modelValue";
var ur = "change";
var bs = "input";
var f0 = ["", "default", "small", "large"];
var Sc = (n) => {
const e = Pn(n) ? n : [n], t = [];
return e.forEach((i) => {
var r;
Pn(i) ? t.push(...Sc(i)) : isVNode(i) && Pn(i.children) ? t.push(...Sc(i.children)) : (t.push(i), isVNode(i) && ((r = i.component) != null && r.subTree) && t.push(...Sc(i.component.subTree)));
}), t;
};
var rT = (n) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(n);
var Ki = (n) => n;
var sT = ["class", "style"];
var oT = /^on[A-Z]/;
var aT = (n = {}) => {
const { excludeListeners: e = false, excludeKeys: t } = n, i = computed(() => ((t == null ? void 0 : t.value) || []).concat(sT)), r = getCurrentInstance();
return r ? computed(() => {
var s;
return Ic(Object.entries((s = r.proxy) == null ? void 0 : s.$attrs).filter(([o]) => !i.value.includes(o) && !(e && oT.test(o))));
}) : (Vt("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), computed(() => ({})));
};
var p0 = ({ from: n, replacement: e, scope: t, version: i, ref: r, type: s = "API" }, o) => {
watch(() => unref(o), (a) => {
a && Vt(t, `[${s}] ${n} is about to be deprecated in version ${i}, please use ${e} instead.
For more detail, please visit: ${r}
`);
}, {
immediate: true
});
};
var lT = {
name: "en",
el: {
breadcrumb: {
label: "Breadcrumb"
},
colorpicker: {
confirm: "OK",
clear: "Clear",
defaultLabel: "color picker",
description: "current color is {color}. press enter to select a new color.",
alphaLabel: "pick alpha value"
},
datepicker: {
now: "Now",
today: "Today",
cancel: "Cancel",
clear: "Clear",
confirm: "OK",
dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
monthTablePrompt: "Use the arrow keys and enter to select the month",
yearTablePrompt: "Use the arrow keys and enter to select the year",
selectedDate: "Selected date",
selectDate: "Select date",
selectTime: "Select time",
startDate: "Start Date",
startTime: "Start Time",
endDate: "End Date",
endTime: "End Time",
prevYear: "Previous Year",
nextYear: "Next Year",
prevMonth: "Previous Month",
nextMonth: "Next Month",
year: "",
month1: "January",
month2: "February",
month3: "March",
month4: "April",
month5: "May",
month6: "June",
month7: "July",
month8: "August",
month9: "September",
month10: "October",
month11: "November",
month12: "December",
week: "week",
weeks: {
sun: "Sun",
mon: "Mon",
tue: "Tue",
wed: "Wed",
thu: "Thu",
fri: "Fri",
sat: "Sat"
},
weeksFull: {
sun: "Sunday",
mon: "Monday",
tue: "Tuesday",
wed: "Wednesday",
thu: "Thursday",
fri: "Friday",
sat: "Saturday"
},
months: {
jan: "Jan",
feb: "Feb",
mar: "Mar",
apr: "Apr",
may: "May",
jun: "Jun",
jul: "Jul",
aug: "Aug",
sep: "Sep",
oct: "Oct",
nov: "Nov",
dec: "Dec"
}
},
inputNumber: {
decrease: "decrease number",
increase: "increase number"
},
select: {
loading: "Loading",
noMatch: "No matching data",
noData: "No data",
placeholder: "Select"
},
mention: {
loading: "Loading"
},
dropdown: {
toggleDropdown: "Toggle Dropdown"
},
cascader: {
noMatch: "No matching data",
loading: "Loading",
placeholder: "Select",
noData: "No data"
},
pagination: {
goto: "Go to",
pagesize: "/page",
total: "Total {total}",
pageClassifier: "",
page: "Page",
prev: "Go to previous page",
next: "Go to next page",
currentPage: "page {pager}",
prevPages: "Previous {pager} pages",
nextPages: "Next {pager} pages",
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
},
dialog: {
close: "Close this dialog"
},
drawer: {
close: "Close this dialog"
},
messagebox: {
title: "Message",
confirm: "OK",
cancel: "Cancel",
error: "Illegal input",
close: "Close this dialog"
},
upload: {
deleteTip: "press delete to remove",
delete: "Delete",
preview: "Preview",
continue: "Continue"
},
slider: {
defaultLabel: "slider between {min} and {max}",
defaultRangeStartLabel: "pick start value",
defaultRangeEndLabel: "pick end value"
},
table: {
emptyText: "No Data",
confirmFilter: "Confirm",
resetFilter: "Reset",
clearFilter: "All",
sumText: "Sum"
},
tour: {
next: "Next",
previous: "Previous",
finish: "Finish"
},
tree: {
emptyText: "No Data"
},
transfer: {
noMatch: "No matching data",
noData: "No data",
titles: ["List 1", "List 2"],
filterPlaceholder: "Enter keyword",
noCheckedFormat: "{total} items",
hasCheckedFormat: "{checked}/{total} checked"
},
image: {
error: "FAILED"
},
pageHeader: {
title: "Back"
},
popconfirm: {
confirmButtonText: "Yes",
cancelButtonText: "No"
},
carousel: {
leftArrow: "Carousel arrow left",
rightArrow: "Carousel arrow right",
indicator: "Carousel switch to index {index}"
}
}
};
var cT = (n) => (e, t) => uT(e, t, unref(n));
var uT = (n, e, t) => Ji(t, n, n).replace(/\{(\w+)\}/g, (i, r) => {
var s;
return `${(s = e == null ? void 0 : e[r]) != null ? s : `{${r}}`}`;
});
var hT = (n) => {
const e = computed(() => unref(n).name), t = isRef(n) ? n : ref(n);
return {
lang: e,
locale: t,
t: cT(n)
};
};
var m0 = Symbol("localeContextKey");
var iu = (n) => {
const e = n || inject(m0, ref());
return hT(computed(() => e.value || lT));
};
var _c = "el";
var dT = "is-";
var rs = (n, e, t, i, r) => {
let s = `${n}-${e}`;
return t && (s += `-${t}`), i && (s += `__${i}`), r && (s += `--${r}`), s;
};
var g0 = Symbol("namespaceContextKey");
var Jd = (n) => {
const e = n || (getCurrentInstance() ? inject(g0, ref(_c)) : ref(_c));
return computed(() => unref(e) || _c);
};
var nt = (n, e) => {
const t = Jd(e);
return {
namespace: t,
b: (u = "") => rs(t.value, n, u, "", ""),
e: (u) => u ? rs(t.value, n, "", u, "") : "",
m: (u) => u ? rs(t.value, n, "", "", u) : "",
be: (u, y) => u && y ? rs(t.value, n, u, y, "") : "",
em: (u, y) => u && y ? rs(t.value, n, "", u, y) : "",
bm: (u, y) => u && y ? rs(t.value, n, u, "", y) : "",
bem: (u, y, v) => u && y && v ? rs(t.value, n, u, y, v) : "",
is: (u, ...y) => {
const v = y.length >= 1 ? y[0] : true;
return u && v ? `${dT}${u}` : "";
},
cssVar: (u) => {
const y = {};
for (const v in u)
u[v] && (y[`--${t.value}-${v}`] = u[v]);
return y;
},
cssVarName: (u) => `--${t.value}-${u}`,
cssVarBlock: (u) => {
const y = {};
for (const v in u)
u[v] && (y[`--${t.value}-${n}-${v}`] = u[v]);
return y;
},
cssVarBlockName: (u) => `--${t.value}-${n}-${u}`
};
};
var fT = nu({
type: Je(Boolean),
default: null
});
var pT = nu({
type: Je(Function)
});
var mT = (n) => {
const e = `update:${n}`, t = `onUpdate:${n}`, i = [e], r = {
[n]: fT,
[t]: pT
};
return {
useModelToggle: ({
indicator: o,
toggleReason: a,
shouldHideWhenRouteChanges: c,
shouldProceed: l,
onShow: d,
onHide: h6
}) => {
const f = getCurrentInstance(), { emit: g } = f, p = f.props, u = computed(() => Sn(p[t])), y = computed(() => p[n] === null), v = (R) => {
o.value !== true && (o.value = true, a && (a.value = R), Sn(d) && d(R));
}, m = (R) => {
o.value !== false && (o.value = false, a && (a.value = R), Sn(h6) && h6(R));
}, x = (R) => {
if (p.disabled === true || Sn(l) && !l())
return;
const L = u.value && en;
L && g(e, true), (y.value || !L) && v(R);
}, w = (R) => {
if (p.disabled === true || !en)
return;
const L = u.value && en;
L && g(e, false), (y.value || !L) && m(R);
}, A = (R) => {
Ba(R) && (p.disabled && R ? u.value && g(e, false) : o.value !== R && (R ? v() : m()));
}, M = () => {
o.value ? w() : x();
};
return watch(() => p[n], A), c && f.appContext.config.globalProperties.$route !== void 0 && watch(() => ({
...f.proxy.$route
}), () => {
c.value && o.value && w();
}), onMounted(() => {
A(p[n]);
}), {
hide: w,
show: x,
toggle: M,
hasUpdateHandler: u
};
},
useModelToggleProps: r,
useModelToggleEmits: i
};
};
var v0 = (n) => {
const e = getCurrentInstance();
return computed(() => {
var t, i;
return (i = (t = e == null ? void 0 : e.proxy) == null ? void 0 : t.$props) == null ? void 0 : i[n];
});
};
var On = "top";
var qn = "bottom";
var Qn = "right";
var Dn = "left";
var Kd = "auto";
var il = [On, qn, Qn, Dn];
var wo = "start";
var Ua = "end";
var gT = "clippingParents";
var y0 = "viewport";
var ua = "popper";
var vT = "reference";
var om = il.reduce(function(n, e) {
return n.concat([e + "-" + wo, e + "-" + Ua]);
}, []);
var Yo = [].concat(il, [Kd]).reduce(function(n, e) {
return n.concat([e, e + "-" + wo, e + "-" + Ua]);
}, []);
var yT = "beforeRead";
var bT = "read";
var xT = "afterRead";
var MT = "beforeMain";
var wT = "main";
var AT = "afterMain";
var ST = "beforeWrite";
var _T = "write";
var TT = "afterWrite";
var ET = [yT, bT, xT, MT, wT, AT, ST, _T, TT];
function Ii(n) {
return n ? (n.nodeName || "").toLowerCase() : null;
}
function yi(n) {
if (n == null) return window;
if (n.toString() !== "[object Window]") {
var e = n.ownerDocument;
return e && e.defaultView || window;
}
return n;
}
function Ao(n) {
var e = yi(n).Element;
return n instanceof e || n instanceof Element;
}
function Kn(n) {
var e = yi(n).HTMLElement;
return n instanceof e || n instanceof HTMLElement;
}
function qd(n) {
if (typeof ShadowRoot > "u") return false;
var e = yi(n).ShadowRoot;
return n instanceof e || n instanceof ShadowRoot;
}
function CT(n) {
var e = n.state;
Object.keys(e.elements).forEach(function(t) {
var i = e.styles[t] || {}, r = e.attributes[t] || {}, s = e.elements[t];
!Kn(s) || !Ii(s) || (Object.assign(s.style, i), Object.keys(r).forEach(function(o) {
var a = r[o];
a === false ? s.removeAttribute(o) : s.setAttribute(o, a === true ? "" : a);
}));
});
}
function LT(n) {
var e = n.state, t = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
return Object.assign(e.elements.popper.style, t.popper), e.styles = t, e.elements.arrow && Object.assign(e.elements.arrow.style, t.arrow), function() {
Object.keys(e.elements).forEach(function(i) {
var r = e.elements[i], s = e.attributes[i] || {}, o = Object.keys(e.styles.hasOwnProperty(i) ? e.styles[i] : t[i]), a = o.reduce(function(c, l) {
return c[l] = "", c;
}, {});
!Kn(r) || !Ii(r) || (Object.assign(r.style, a), Object.keys(s).forEach(function(c) {
r.removeAttribute(c);
}));
});
};
}
var b0 = { name: "applyStyles", enabled: true, phase: "write", fn: CT, effect: LT, requires: ["computeStyles"] };
function Ri(n) {
return n.split("-")[0];
}
var xs = Math.max;
var Bc = Math.min;
var So = Math.round;
function _o(n, e) {
e === void 0 && (e = false);
var t = n.getBoundingClientRect(), i = 1, r = 1;
if (Kn(n) && e) {
var s = n.offsetHeight, o = n.offsetWidth;
o > 0 && (i = So(t.width) / o || 1), s > 0 && (r = So(t.height) / s || 1);
}
return { width: t.width / i, height: t.height / r, top: t.top / r, right: t.right / i, bottom: t.bottom / r, left: t.left / i, x: t.left / i, y: t.top / r };
}
function Qd(n) {
var e = _o(n), t = n.offsetWidth, i = n.offsetHeight;
return Math.abs(e.width - t) <= 1 && (t = e.width), Math.abs(e.height - i) <= 1 && (i = e.height), { x: n.offsetLeft, y: n.offsetTop, width: t, height: i };
}
function x0(n, e) {
var t = e.getRootNode && e.getRootNode();
if (n.contains(e)) return true;
if (t && qd(t)) {
var i = e;
do {
if (i && n.isSameNode(i)) return true;
i = i.parentNode || i.host;
} while (i);
}
return false;
}
function rr(n) {
return yi(n).getComputedStyle(n);
}
function RT(n) {
return ["table", "td", "th"].indexOf(Ii(n)) >= 0;
}
function Xr(n) {
return ((Ao(n) ? n.ownerDocument : n.document) || window.document).documentElement;
}
function ru(n) {
return Ii(n) === "html" ? n : n.assignedSlot || n.parentNode || (qd(n) ? n.host : null) || Xr(n);
}
function am(n) {
return !Kn(n) || rr(n).position === "fixed" ? null : n.offsetParent;
}
function FT(n) {
var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, t = navigator.userAgent.indexOf("Trident") !== -1;
if (t && Kn(n)) {
var i = rr(n);
if (i.position === "fixed") return null;
}
var r = ru(n);
for (qd(r) && (r = r.host); Kn(r) && ["html", "body"].indexOf(Ii(r)) < 0; ) {
var s = rr(r);
if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || e && s.willChange === "filter" || e && s.filter && s.filter !== "none") return r;
r = r.parentNode;
}
return null;
}
function rl(n) {
for (var e = yi(n), t = am(n); t && RT(t) && rr(t).position === "static"; ) t = am(t);
return t && (Ii(t) === "html" || Ii(t) === "body" && rr(t).position === "static") ? e : t || FT(n) || e;
}
function ef(n) {
return ["top", "bottom"].indexOf(n) >= 0 ? "x" : "y";
}
function Ca(n, e, t) {
return xs(n, Bc(e, t));
}
function PT(n, e, t) {
var i = Ca(n, e, t);
return i > t ? t : i;
}
function M0() {
return { top: 0, right: 0, bottom: 0, left: 0 };
}
function w0(n) {
return Object.assign({}, M0(), n);
}
function A0(n, e) {
return e.reduce(function(t, i) {
return t[i] = n, t;
}, {});
}
var IT = function(n, e) {
return n = typeof n == "function" ? n(Object.assign({}, e.rects, { placement: e.placement })) : n, w0(typeof n != "number" ? n : A0(n, il));
};
function OT(n) {
var e, t = n.state, i = n.name, r = n.options, s = t.elements.arrow, o = t.modifiersData.popperOffsets, a = Ri(t.placement), c = ef(a), l = [Dn, Qn].indexOf(a) >= 0, d = l ? "height" : "width";
if (!(!s || !o)) {
var h6 = IT(r.padding, t), f = Qd(s), g = c === "y" ? On : Dn, p = c === "y" ? qn : Qn, u = t.rects.reference[d] + t.rects.reference[c] - o[c] - t.rects.popper[d], y = o[c] - t.rects.reference[c], v = rl(s), m = v ? c === "y" ? v.clientHeight || 0 : v.clientWidth || 0 : 0, x = u / 2 - y / 2, w = h6[g], A = m - f[d] - h6[p], M = m / 2 - f[d] / 2 + x, R = Ca(w, M, A), L = c;
t.modifiersData[i] = (e = {}, e[L] = R, e.centerOffset = R - M, e);
}
}
function DT(n) {
var e = n.state, t = n.options, i = t.element, r = i === void 0 ? "[data-popper-arrow]" : i;
r != null && (typeof r == "string" && (r = e.elements.popper.querySelector(r), !r) || !x0(e.elements.popper, r) || (e.elements.arrow = r));
}
var NT = { name: "arrow", enabled: true, phase: "main", fn: OT, effect: DT, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function To(n) {
return n.split("-")[1];
}
var BT = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function UT(n) {
var e = n.x, t = n.y, i = window, r = i.devicePixelRatio || 1;
return { x: So(e * r) / r || 0, y: So(t * r) / r || 0 };
}
function lm(n) {
var e, t = n.popper, i = n.popperRect, r = n.placement, s = n.variation, o = n.offsets, a = n.position, c = n.gpuAcceleration, l = n.adaptive, d = n.roundOffsets, h6 = n.isFixed, f = o.x, g = f === void 0 ? 0 : f, p = o.y, u = p === void 0 ? 0 : p, y = typeof d == "function" ? d({ x: g, y: u }) : { x: g, y: u };
g = y.x, u = y.y;
var v = o.hasOwnProperty("x"), m = o.hasOwnProperty("y"), x = Dn, w = On, A = window;
if (l) {
var M = rl(t), R = "clientHeight", L = "clientWidth";
if (M === yi(t) && (M = Xr(t), rr(M).position !== "static" && a === "absolute" && (R = "scrollHeight", L = "scrollWidth")), M = M, r === On || (r === Dn || r === Qn) && s === Ua) {
w = qn;
var S = h6 && M === A && A.visualViewport ? A.visualViewport.height : M[R];
u -= S - i.height, u *= c ? 1 : -1;
}
if (r === Dn || (r === On || r === qn) && s === Ua) {
x = Qn;
var I = h6 && M === A && A.visualViewport ? A.visualViewport.width : M[L];
g -= I - i.width, g *= c ? 1 : -1;
}
}
var T = Object.assign({ position: a }, l && BT), _ = d === true ? UT({ x: g, y: u }) : { x: g, y: u };
if (g = _.x, u = _.y, c) {
var E;
return Object.assign({}, T, (E = {}, E[w] = m ? "0" : "", E[x] = v ? "0" : "", E.transform = (A.devicePixelRatio || 1) <= 1 ? "translate(" + g + "px, " + u + "px)" : "translate3d(" + g + "px, " + u + "px, 0)", E));
}
return Object.assign({}, T, (e = {}, e[w] = m ? u + "px" : "", e[x] = v ? g + "px" : "", e.transform = "", e));
}
function zT(n) {
var e = n.state, t = n.options, i = t.gpuAcceleration, r = i === void 0 ? true : i, s = t.adaptive, o = s === void 0 ? true : s, a = t.roundOffsets, c = a === void 0 ? true : a, l = { placement: Ri(e.placement), variation: To(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: r, isFixed: e.options.strategy === "fixed" };
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, lm(Object.assign({}, l, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: o, roundOffsets: c })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, lm(Object.assign({}, l, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: c })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
}
var S0 = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: zT, data: {} };
var Tl = { passive: true };
function VT(n) {
var e = n.state, t = n.instance, i = n.options, r = i.scroll, s = r === void 0 ? true : r, o = i.resize, a = o === void 0 ? true : o, c = yi(e.elements.popper), l = [].concat(e.scrollParents.reference, e.scrollParents.popper);
return s && l.forEach(function(d) {
d.addEventListener("scroll", t.update, Tl);
}), a && c.addEventListener("resize", t.update, Tl), function() {
s && l.forEach(function(d) {
d.removeEventListener("scroll", t.update, Tl);
}), a && c.removeEventListener("resize", t.update, Tl);
};
}
var _0 = { name: "eventListeners", enabled: true, phase: "write", fn: function() {
}, effect: VT, data: {} };
var kT = { left: "right", right: "left", bottom: "top", top: "bottom" };
function Tc(n) {
return n.replace(/left|right|bottom|top/g, function(e) {
return kT[e];
});
}
var GT = { start: "end", end: "start" };
function cm(n) {
return n.replace(/start|end/g, function(e) {
return GT[e];
});
}
function tf(n) {
var e = yi(n), t = e.pageXOffset, i = e.pageYOffset;
return { scrollLeft: t, scrollTop: i };
}
function nf(n) {
return _o(Xr(n)).left + tf(n).scrollLeft;
}
function HT(n) {
var e = yi(n), t = Xr(n), i = e.visualViewport, r = t.clientWidth, s = t.clientHeight, o = 0, a = 0;
return i && (r = i.width, s = i.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (o = i.offsetLeft, a = i.offsetTop)), { width: r, height: s, x: o + nf(n), y: a };
}
function WT(n) {
var e, t = Xr(n), i = tf(n), r = (e = n.ownerDocument) == null ? void 0 : e.body, s = xs(t.scrollWidth, t.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), o = xs(t.scrollHeight, t.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), a = -i.scrollLeft + nf(n), c = -i.scrollTop;
return rr(r || t).direction === "rtl" && (a += xs(t.clientWidth, r ? r.clientWidth : 0) - s), { width: s, height: o, x: a, y: c };
}
function rf(n) {
var e = rr(n), t = e.overflow, i = e.overflowX, r = e.overflowY;
return /auto|scroll|overlay|hidden/.test(t + r + i);
}
function T0(n) {
return ["html", "body", "#document"].indexOf(Ii(n)) >= 0 ? n.ownerDocument.body : Kn(n) && rf(n) ? n : T0(ru(n));
}
function La(n, e) {
var t;
e === void 0 && (e = []);
var i = T0(n), r = i === ((t = n.ownerDocument) == null ? void 0 : t.body), s = yi(i), o = r ? [s].concat(s.visualViewport || [], rf(i) ? i : []) : i, a = e.concat(o);
return r ? a : a.concat(La(ru(o)));
}
function Xh(n) {
return Object.assign({}, n, { left: n.x, top: n.y, right: n.x + n.width, bottom: n.y + n.height });
}
function jT(n) {
var e = _o(n);
return e.top = e.top + n.clientTop, e.left = e.left + n.clientLeft, e.bottom = e.top + n.clientHeight, e.right = e.left + n.clientWidth, e.width = n.clientWidth, e.height = n.clientHeight, e.x = e.left, e.y = e.top, e;
}
function um(n, e) {
return e === y0 ? Xh(HT(n)) : Ao(e) ? jT(e) : Xh(WT(Xr(n)));
}
function $T(n) {
var e = La(ru(n)), t = ["absolute", "fixed"].indexOf(rr(n).position) >= 0, i = t && Kn(n) ? rl(n) : n;
return Ao(i) ? e.filter(function(r) {
return Ao(r) && x0(r, i) && Ii(r) !== "body";
}) : [];
}
function ZT(n, e, t) {
var i = e === "clippingParents" ? $T(n) : [].concat(e), r = [].concat(i, [t]), s = r[0], o = r.reduce(function(a, c) {
var l = um(n, c);
return a.top = xs(l.top, a.top), a.right = Bc(l.right, a.right), a.bottom = Bc(l.bottom, a.bottom), a.left = xs(l.left, a.left), a;
}, um(n, s));
return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
}
function E0(n) {
var e = n.reference, t = n.element, i = n.placement, r = i ? Ri(i) : null, s = i ? To(i) : null, o = e.x + e.width / 2 - t.width / 2, a = e.y + e.height / 2 - t.height / 2, c;
switch (r) {
case On:
c = { x: o, y: e.y - t.height };
break;
case qn:
c = { x: o, y: e.y + e.height };
break;
case Qn:
c = { x: e.x + e.width, y: a };
break;
case Dn:
c = { x: e.x - t.width, y: a };
break;
default:
c = { x: e.x, y: e.y };
}
var l = r ? ef(r) : null;
if (l != null) {
var d = l === "y" ? "height" : "width";
switch (s) {
case wo:
c[l] = c[l] - (e[d] / 2 - t[d] / 2);
break;
case Ua:
c[l] = c[l] + (e[d] / 2 - t[d] / 2);
break;
}
}
return c;
}
function za(n, e) {
e === void 0 && (e = {});
var t = e, i = t.placement, r = i === void 0 ? n.placement : i, s = t.boundary, o = s === void 0 ? gT : s, a = t.rootBoundary, c = a === void 0 ? y0 : a, l = t.elementContext, d = l === void 0 ? ua : l, h6 = t.altBoundary, f = h6 === void 0 ? false : h6, g = t.padding, p = g === void 0 ? 0 : g, u = w0(typeof p != "number" ? p : A0(p, il)), y = d === ua ? vT : ua, v = n.rects.popper, m = n.elements[f ? y : d], x = ZT(Ao(m) ? m : m.contextElement || Xr(n.elements.popper), o, c), w = _o(n.elements.reference), A = E0({ reference: w, element: v, strategy: "absolute", placement: r }), M = Xh(Object.assign({}, v, A)), R = d === ua ? M : w, L = { top: x.top - R.top + u.top, bottom: R.bottom - x.bottom + u.bottom, left: x.left - R.left + u.left, right: R.right - x.right + u.right }, S = n.modifiersData.offset;
if (d === ua && S) {
var I = S[r];
Object.keys(L).forEach(function(T) {
var _ = [Qn, qn].indexOf(T) >= 0 ? 1 : -1, E = [On, qn].indexOf(T) >= 0 ? "y" : "x";
L[T] += I[E] * _;
});
}
return L;
}
function XT(n, e) {
e === void 0 && (e = {});
var t = e, i = t.placement, r = t.boundary, s = t.rootBoundary, o = t.padding, a = t.flipVariations, c = t.allowedAutoPlacements, l = c === void 0 ? Yo : c, d = To(i), h6 = d ? a ? om : om.filter(function(p) {
return To(p) === d;
}) : il, f = h6.filter(function(p) {
return l.indexOf(p) >= 0;
});
f.length === 0 && (f = h6);
var g = f.reduce(function(p, u) {
return p[u] = za(n, { placement: u, boundary: r, rootBoundary: s, padding: o })[Ri(u)], p;
}, {});
return Object.keys(g).sort(function(p, u) {
return g[p] - g[u];
});
}
function YT(n) {
if (Ri(n) === Kd) return [];
var e = Tc(n);
return [cm(n), e, cm(e)];
}
function JT(n) {
var e = n.state, t = n.options, i = n.name;
if (!e.modifiersData[i]._skip) {
for (var r = t.mainAxis, s = r === void 0 ? true : r, o = t.altAxis, a = o === void 0 ? true : o, c = t.fallbackPlacements, l = t.padding, d = t.boundary, h6 = t.rootBoundary, f = t.altBoundary, g = t.flipVariations, p = g === void 0 ? true : g, u = t.allowedAutoPlacements, y = e.options.placement, v = Ri(y), m = v === y, x = c || (m || !p ? [Tc(y)] : YT(y)), w = [y].concat(x).reduce(function(te, ae) {
return te.concat(Ri(ae) === Kd ? XT(e, { placement: ae, boundary: d, rootBoundary: h6, padding: l, flipVariations: p, allowedAutoPlacements: u }) : ae);
}, []), A = e.rects.reference, M = e.rects.popper, R = /* @__PURE__ */ new Map(), L = true, S = w[0], I = 0; I < w.length; I++) {
var T = w[I], _ = Ri(T), E = To(T) === wo, C = [On, qn].indexOf(_) >= 0, P = C ? "width" : "height", b = za(e, { placement: T, boundary: d, rootBoundary: h6, altBoundary: f, padding: l }), F = C ? E ? Qn : Dn : E ? qn : On;
A[P] > M[P] && (F = Tc(F));
var D = Tc(F), N = [];
if (s && N.push(b[_] <= 0), a && N.push(b[F] <= 0, b[D] <= 0), N.every(function(te) {
return te;
})) {
S = T, L = false;
break;
}
R.set(T, N);
}
if (L) for (var B = p ? 3 : 1, U = function(te) {
var ae = w.find(function(ie) {
var le = R.get(ie);
if (le) return le.slice(0, te).every(function(W) {
return W;
});
});
if (ae) return S = ae, "break";
}, G = B; G > 0; G--) {
var Y = U(G);
if (Y === "break") break;
}
e.placement !== S && (e.modifiersData[i]._skip = true, e.placement = S, e.reset = true);
}
}
var KT = { name: "flip", enabled: true, phase: "main", fn: JT, requiresIfExists: ["offset"], data: { _skip: false } };
function hm(n, e, t) {
return t === void 0 && (t = { x: 0, y: 0 }), { top: n.top - e.height - t.y, right: n.right - e.width + t.x, bottom: n.bottom - e.height + t.y, left: n.left - e.width - t.x };
}
function dm(n) {
return [On, Qn, qn, Dn].some(function(e) {
return n[e] >= 0;
});
}
function qT(n) {
var e = n.state, t = n.name, i = e.rects.reference, r = e.rects.popper, s = e.modifiersData.preventOverflow, o = za(e, { elementContext: "reference" }), a = za(e, { altBoundary: true }), c = hm(o, i), l = hm(a, r, s), d = dm(c), h6 = dm(l);
e.modifiersData[t] = { referenceClippingOffsets: c, popperEscapeOffsets: l, isReferenceHidden: d, hasPopperEscaped: h6 }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": d, "data-popper-escaped": h6 });
}
var QT = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: qT };
function eE(n, e, t) {
var i = Ri(n), r = [Dn, On].indexOf(i) >= 0 ? -1 : 1, s = typeof t == "function" ? t(Object.assign({}, e, { placement: n })) : t, o = s[0], a = s[1];
return o = o || 0, a = (a || 0) * r, [Dn, Qn].indexOf(i) >= 0 ? { x: a, y: o } : { x: o, y: a };
}
function tE(n) {
var e = n.state, t = n.options, i = n.name, r = t.offset, s = r === void 0 ? [0, 0] : r, o = Yo.reduce(function(d, h6) {
return d[h6] = eE(h6, e.rects, s), d;
}, {}), a = o[e.placement], c = a.x, l = a.y;
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += c, e.modifiersData.popperOffsets.y += l), e.modifiersData[i] = o;
}
var nE = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: tE };
function iE(n) {
var e = n.state, t = n.name;
e.modifiersData[t] = E0({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
}
var C0 = { name: "popperOffsets", enabled: true, phase: "read", fn: iE, data: {} };
function rE(n) {
return n === "x" ? "y" : "x";
}
function sE(n) {
var e = n.state, t = n.options, i = n.name, r = t.mainAxis, s = r === void 0 ? true : r, o = t.altAxis, a = o === void 0 ? false : o, c = t.boundary, l = t.rootBoundary, d = t.altBoundary, h6 = t.padding, f = t.tether, g = f === void 0 ? true : f, p = t.tetherOffset, u = p === void 0 ? 0 : p, y = za(e, { boundary: c, rootBoundary: l, padding: h6, altBoundary: d }), v = Ri(e.placement), m = To(e.placement), x = !m, w = ef(v), A = rE(w), M = e.modifiersData.popperOffsets, R = e.rects.reference, L = e.rects.popper, S = typeof u == "function" ? u(Object.assign({}, e.rects, { placement: e.placement })) : u, I = typeof S == "number" ? { mainAxis: S, altAxis: S } : Object.assign({ mainAxis: 0, altAxis: 0 }, S), T = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, _ = { x: 0, y: 0 };
if (M) {
if (s) {
var E, C = w === "y" ? On : Dn, P = w === "y" ? qn : Qn, b = w === "y" ? "height" : "width", F = M[w], D = F + y[C], N = F - y[P], B = g ? -L[b] / 2 : 0, U = m === wo ? R[b] : L[b], G = m === wo ? -L[b] : -R[b], Y = e.elements.arrow, te = g && Y ? Qd(Y) : { width: 0, height: 0 }, ae = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : M0(), ie = ae[C], le = ae[P], W = Ca(0, R[b], te[b]), $ = x ? R[b] / 2 - B - W - ie - I.mainAxis : U - W - ie - I.mainAxis, j = x ? -R[b] / 2 + B + W + le + I.mainAxis : G + W + le + I.mainAxis, re = e.elements.arrow && rl(e.elements.arrow), V = re ? w === "y" ? re.clientTop || 0 : re.clientLeft || 0 : 0, H = (E = T == null ? void 0 : T[w]) != null ? E : 0, K = F + $ - H - V, ce = F + j - H, se = Ca(g ? Bc(D, K) : D, F, g ? xs(N, ce) : N);
M[w] = se, _[w] = se - F;
}
if (a) {
var k, O = w === "x" ? On : Dn, Z = w === "x" ? qn : Qn, X = M[A], ee = A === "y" ? "height" : "width", fe = X + y[O], be = X - y[Z], Ae = [On, Dn].indexOf(v) !== -1, he = (k = T == null ? void 0 : T[A]) != null ? k : 0, xe = Ae ? fe : X - R[ee] - L[ee] - he + I.altAxis, ne = Ae ? X + R[ee] + L[ee] - he - I.altAxis : be, me = g && Ae ? PT(xe, X, ne) : Ca(g ? xe : fe, X, g ? ne : be);
M[A] = me, _[A] = me - X;
}
e.modifiersData[i] = _;
}
}
var oE = { name: "preventOverflow", enabled: true, phase: "main", fn: sE, requiresIfExists: ["offset"] };
function aE(n) {
return { scrollLeft: n.scrollLeft, scrollTop: n.scrollTop };
}
function lE(n) {
return n === yi(n) || !Kn(n) ? tf(n) : aE(n);
}
function cE(n) {
var e = n.getBoundingClientRect(), t = So(e.width) / n.offsetWidth || 1, i = So(e.height) / n.offsetHeight || 1;
return t !== 1 || i !== 1;
}
function uE(n, e, t) {
t === void 0 && (t = false);
var i = Kn(e), r = Kn(e) && cE(e), s = Xr(e), o = _o(n, r), a = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 };
return (i || !i && !t) && ((Ii(e) !== "body" || rf(s)) && (a = lE(e)), Kn(e) ? (c = _o(e, true), c.x += e.clientLeft, c.y += e.clientTop) : s && (c.x = nf(s))), { x: o.left + a.scrollLeft - c.x, y: o.top + a.scrollTop - c.y, width: o.width, height: o.height };
}
function hE(n) {
var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), i = [];
n.forEach(function(s) {
e.set(s.name, s);
});
function r(s) {
t.add(s.name);
var o = [].concat(s.requires || [], s.requiresIfExists || []);
o.forEach(function(a) {
if (!t.has(a)) {
var c = e.get(a);
c && r(c);
}
}), i.push(s);
}
return n.forEach(function(s) {
t.has(s.name) || r(s);
}), i;
}
function dE(n) {
var e = hE(n);
return ET.reduce(function(t, i) {
return t.concat(e.filter(function(r) {
return r.phase === i;
}));
}, []);
}
function fE(n) {
var e;
return function() {
return e || (e = new Promise(function(t) {
Promise.resolve().then(function() {
e = void 0, t(n());
});
})), e;
};
}
function pE(n) {
var e = n.reduce(function(t, i) {
var r = t[i.name];
return t[i.name] = r ? Object.assign({}, r, i, { options: Object.assign({}, r.options, i.options), data: Object.assign({}, r.data, i.data) }) : i, t;
}, {});
return Object.keys(e).map(function(t) {
return e[t];
});
}
var fm = { placement: "bottom", modifiers: [], strategy: "absolute" };
function pm() {
for (var n = arguments.length, e = new Array(n), t = 0; t < n; t++) e[t] = arguments[t];
return !e.some(function(i) {
return !(i && typeof i.getBoundingClientRect == "function");
});
}
function sf(n) {
n === void 0 && (n = {});
var e = n, t = e.defaultModifiers, i = t === void 0 ? [] : t, r = e.defaultOptions, s = r === void 0 ? fm : r;
return function(o, a, c) {
c === void 0 && (c = s);
var l = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, fm, s), modifiersData: {}, elements: { reference: o, popper: a }, attributes: {}, styles: {} }, d = [], h6 = false, f = { state: l, setOptions: function(u) {
var y = typeof u == "function" ? u(l.options) : u;
p(), l.options = Object.assign({}, s, l.options, y), l.scrollParents = { reference: Ao(o) ? La(o) : o.contextElement ? La(o.contextElement) : [], popper: La(a) };
var v = dE(pE([].concat(i, l.options.modifiers)));
return l.orderedModifiers = v.filter(function(m) {
return m.enabled;
}), g(), f.update();
}, forceUpdate: function() {
if (!h6) {
var u = l.elements, y = u.reference, v = u.popper;
if (pm(y, v)) {
l.rects = { reference: uE(y, rl(v), l.options.strategy === "fixed"), popper: Qd(v) }, l.reset = false, l.placement = l.options.placement, l.orderedModifiers.forEach(function(L) {
return l.modifiersData[L.name] = Object.assign({}, L.data);
});
for (var m = 0; m < l.orderedModifiers.length; m++) {
if (l.reset === true) {
l.reset = false, m = -1;
continue;
}
var x = l.orderedModifiers[m], w = x.fn, A = x.options, M = A === void 0 ? {} : A, R = x.name;
typeof w == "function" && (l = w({ state: l, options: M, name: R, instance: f }) || l);
}
}
}
}, update: fE(function() {
return new Promise(function(u) {
f.forceUpdate(), u(l);
});
}), destroy: function() {
p(), h6 = true;
} };
if (!pm(o, a)) return f;
f.setOptions(c).then(function(u) {
!h6 && c.onFirstUpdate && c.onFirstUpdate(u);
});
function g() {
l.orderedModifiers.forEach(function(u) {
var y = u.name, v = u.options, m = v === void 0 ? {} : v, x = u.effect;
if (typeof x == "function") {
var w = x({ state: l, name: y, instance: f, options: m }), A = function() {
};
d.push(w || A);
}
});
}
function p() {
d.forEach(function(u) {
return u();
}), d = [];
}
return f;
};
}
sf();
var mE = [_0, C0, S0, b0];
sf({ defaultModifiers: mE });
var gE = [_0, C0, S0, b0, nE, KT, oE, NT, QT];
var vE = sf({ defaultModifiers: gE });
var yE = (n, e, t = {}) => {
const i = {
name: "updateState",
enabled: true,
phase: "write",
fn: ({ state: c }) => {
const l = bE(c);
Object.assign(o.value, l);
},
requires: ["computeStyles"]
}, r = computed(() => {
const { onFirstUpdate: c, placement: l, strategy: d, modifiers: h6 } = unref(t);
return {
onFirstUpdate: c,
placement: l || "bottom",
strategy: d || "absolute",
modifiers: [
...h6 || [],
i,
{ name: "applyStyles", enabled: false }
]
};
}), s = shallowRef(), o = ref({
styles: {
popper: {
position: unref(r).strategy,
left: "0",
top: "0"
},
arrow: {
position: "absolute"
}
},
attributes: {}
}), a = () => {
s.value && (s.value.destroy(), s.value = void 0);
};
return watch(r, (c) => {
const l = unref(s);
l && l.setOptions(c);
}, {
deep: true
}), watch([n, e], ([c, l]) => {
a(), !(!c || !l) && (s.value = vE(c, l, unref(r)));
}), onBeforeUnmount(() => {
a();
}), {
state: computed(() => {
var c;
return { ...((c = unref(s)) == null ? void 0 : c.state) || {} };
}),
styles: computed(() => unref(o).styles),
attributes: computed(() => unref(o).attributes),
update: () => {
var c;
return (c = unref(s)) == null ? void 0 : c.update();
},
forceUpdate: () => {
var c;
return (c = unref(s)) == null ? void 0 : c.forceUpdate();
},
instanceRef: computed(() => unref(s))
};
};
function bE(n) {
const e = Object.keys(n.elements), t = Ic(e.map((r) => [r, n.styles[r] || {}])), i = Ic(e.map((r) => [r, n.attributes[r]]));
return {
styles: t,
attributes: i
};
}
function mm() {
let n;
const e = (i, r) => {
t(), n = window.setTimeout(i, r);
}, t = () => window.clearTimeout(n);
return Yc(() => t()), {
registerTimeout: e,
cancelTimeout: t
};
}
var Yh = {
prefix: Math.floor(Math.random() * 1e4),
current: 0
};
var xE = Symbol("elIdInjection");
var of = () => getCurrentInstance() ? inject(xE, Yh) : Yh;
var sl = (n) => {
const e = of();
!en && e === Yh && Vt("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
usage: app.provide(ID_INJECTION_KEY, {
prefix: number,
current: number,
})`);
const t = Jd();
return computed(() => unref(n) || `${t.value}-id-${e.prefix}-${e.current++}`);
};
var fo = [];
var gm = (n) => {
const e = n;
e.key === Li.esc && fo.forEach((t) => t(e));
};
var ME = (n) => {
onMounted(() => {
fo.length === 0 && document.addEventListener("keydown", gm), en && fo.push(n);
}), onBeforeUnmount(() => {
fo = fo.filter((e) => e !== n), fo.length === 0 && en && document.removeEventListener("keydown", gm);
});
};
var vm;
var L0 = () => {
const n = Jd(), e = of(), t = computed(() => `${n.value}-popper-container-${e.prefix}`), i = computed(() => `#${t.value}`);
return {
id: t,
selector: i
};
};
var wE = (n) => {
const e = document.createElement("div");
return e.id = n, document.body.appendChild(e), e;
};
var AE = () => {
const { id: n, selector: e } = L0();
return onBeforeMount(() => {
en && (!vm || !document.body.querySelector(e.value)) && (vm = wE(n.value));
}), {
id: n,
selector: e
};
};
var SE = at({
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
}
});
var _E = ({
showAfter: n,
hideAfter: e,
autoClose: t,
open: i,
close: r
}) => {
const { registerTimeout: s } = mm(), {
registerTimeout: o,
cancelTimeout: a
} = mm();
return {
onOpen: (d) => {
s(() => {
i(d);
const h6 = unref(t);
yt(h6) && h6 > 0 && o(() => {
r(d);
}, h6);
}, unref(n));
},
onClose: (d) => {
a(), s(() => {
r(d);
}, unref(e));
}
};
};
var R0 = Symbol("elForwardRef");
var TE = (n) => {
provide(R0, {
setForwardRef: (t) => {
n.value = t;
}
});
};
var EE = (n) => ({
mounted(e) {
n(e);
},
updated(e) {
n(e);
},
unmounted() {
n(null);
}
});
var ym = {
current: 0
};
var bm = ref(0);
var F0 = 2e3;
var xm = Symbol("elZIndexContextKey");
var P0 = Symbol("zIndexContextKey");
var I0 = (n) => {
const e = getCurrentInstance() ? inject(xm, ym) : ym, t = n || (getCurrentInstance() ? inject(P0, void 0) : void 0), i = computed(() => {
const o = unref(t);
return yt(o) ? o : F0;
}), r = computed(() => i.value + bm.value), s = () => (e.current++, bm.value = e.current, r.value);
return !en && !inject(xm) && Vt("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
initialZIndex: i,
currentZIndex: r,
nextZIndex: s
};
};
function CE(n) {
let e;
function t() {
if (n.value == null)
return;
const { selectionStart: r, selectionEnd: s, value: o } = n.value;
if (r == null || s == null)
return;
const a = o.slice(0, Math.max(0, r)), c = o.slice(Math.max(0, s));
e = {
selectionStart: r,
selectionEnd: s,
value: o,
beforeTxt: a,
afterTxt: c
};
}
function i() {
if (n.value == null || e == null)
return;
const { value: r } = n.value, { beforeTxt: s, afterTxt: o, selectionStart: a } = e;
if (s == null || o == null || a == null)
return;
let c = r.length;
if (r.endsWith(o))
c = r.length - o.length;
else if (r.startsWith(s))
c = s.length;
else {
const l = s[a - 1], d = r.indexOf(l, a - 1);
d !== -1 && (c = d + 1);
}
n.value.setSelectionRange(c, c);
}
return [t, i];
}
var LE = (n, e, t) => Sc(n.subTree).filter((s) => {
var o;
return isVNode(s) && ((o = s.type) == null ? void 0 : o.name) === e && !!s.component;
}).map((s) => s.component.uid).map((s) => t[s]).filter((s) => !!s);
var RE = (n, e) => {
const t = {}, i = shallowRef([]);
return {
children: i,
addChild: (o) => {
t[o.uid] = o, i.value = LE(n, e, t);
},
removeChild: (o) => {
delete t[o], i.value = i.value.filter((a) => a.uid !== o);
}
};
};
var Gr = nu({
type: String,
values: f0,
required: false
});
var O0 = Symbol("size");
var FE = () => {
const n = inject(O0, {});
return computed(() => unref(n.size) || "");
};
function D0(n, {
beforeFocus: e,
afterFocus: t,
beforeBlur: i,
afterBlur: r
} = {}) {
const s = getCurrentInstance(), { emit: o } = s, a = shallowRef(), c = ref(false), l = (f) => {
Sn(e) && e(f) || c.value || (c.value = true, o("focus", f), t == null || t());
}, d = (f) => {
var g;
Sn(i) && i(f) || f.relatedTarget && ((g = a.value) != null && g.contains(f.relatedTarget)) || (c.value = false, o("blur", f), r == null || r());
}, h6 = () => {
var f, g;
(f = a.value) != null && f.contains(document.activeElement) && a.value !== document.activeElement || (g = n.value) == null || g.focus();
};
return watch(a, (f) => {
f && f.setAttribute("tabindex", "-1");
}), un(a, "focus", l, true), un(a, "blur", d, true), un(a, "click", h6, true), false, {
isFocused: c,
wrapperRef: a,
handleFocus: l,
handleBlur: d
};
}
function N0({
afterComposition: n,
emit: e
}) {
const t = ref(false), i = (a) => {
e == null || e("compositionstart", a), t.value = true;
}, r = (a) => {
var c;
e == null || e("compositionupdate", a);
const l = (c = a.target) == null ? void 0 : c.value, d = l[l.length - 1] || "";
t.value = !rT(d);
}, s = (a) => {
e == null || e("compositionend", a), t.value && (t.value = false, nextTick(() => n(a)));
};
return {
isComposing: t,
handleComposition: (a) => {
a.type === "compositionend" ? s(a) : r(a);
},
handleCompositionStart: i,
handleCompositionUpdate: r,
handleCompositionEnd: s
};
}
var B0 = Symbol("emptyValuesContextKey");
var PE = "use-empty-values";
var IE = ["", void 0, null];
var OE = void 0;
var DE = at({
emptyValues: Array,
valueOnClear: {
type: [String, Number, Boolean, Function],
default: void 0,
validator: (n) => Sn(n) ? !n() : !n
}
});
var NE = (n, e) => {
const t = getCurrentInstance() ? inject(B0, ref({})) : ref({}), i = computed(() => n.emptyValues || t.value.emptyValues || IE), r = computed(() => Sn(n.valueOnClear) ? n.valueOnClear() : n.valueOnClear !== void 0 ? n.valueOnClear : Sn(t.value.valueOnClear) ? t.value.valueOnClear() : t.value.valueOnClear !== void 0 ? t.value.valueOnClear : OE), s = (o) => i.value.includes(o);
return i.value.includes(r.value) || Vt(PE, "value-on-clear should be a value of empty-values"), {
emptyValues: i,
valueOnClear: r,
isEmptyValue: s
};
};
var BE = at({
ariaLabel: String,
ariaOrientation: {
type: String,
values: ["horizontal", "vertical", "undefined"]
},
ariaControls: String
});
var Yr = (n) => P_(BE, n);
var U0 = Symbol();
var Uc = ref();
function af(n, e = void 0) {
const t = getCurrentInstance() ? inject(U0, Uc) : Uc;
return n ? computed(() => {
var i, r;
return (r = (i = t.value) == null ? void 0 : i[n]) != null ? r : e;
}) : t;
}
function UE(n, e) {
const t = af(), i = nt(n, computed(() => {
var a;
return ((a = t.value) == null ? void 0 : a.namespace) || _c;
})), r = iu(computed(() => {
var a;
return (a = t.value) == null ? void 0 : a.locale;
})), s = I0(computed(() => {
var a;
return ((a = t.value) == null ? void 0 : a.zIndex) || F0;
})), o = computed(() => {
var a;
return unref(e) || ((a = t.value) == null ? void 0 : a.size) || "";
});
return zE(computed(() => unref(t) || {})), {
ns: i,
locale: r,
zIndex: s,
size: o
};
}
var zE = (n, e, t = false) => {
var i;
const r = !!getCurrentInstance(), s = r ? af() : void 0, o = (i = void 0) != null ? i : r ? provide : void 0;
if (!o) {
Vt("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
return;
}
const a = computed(() => {
const c = unref(n);
return s != null && s.value ? VE(s.value, c) : c;
});
return o(U0, a), o(m0, computed(() => a.value.locale)), o(g0, computed(() => a.value.namespace)), o(P0, computed(() => a.value.zIndex)), o(O0, {
size: computed(() => a.value.size || "")
}), o(B0, computed(() => ({
emptyValues: a.value.emptyValues,
valueOnClear: a.value.valueOnClear
}))), (t || !Uc.value) && (Uc.value = a.value), a;
};
var VE = (n, e) => {
const t = [.../* @__PURE__ */ new Set([...rm(n), ...rm(e)])], i = {};
for (const r of t)
i[r] = e[r] !== void 0 ? e[r] : n[r];
return i;
};
var st = (n, e) => {
const t = n.__vccOpts || n;
for (const [i, r] of e)
t[i] = r;
return t;
};
var kE = at({
size: {
type: Je([Number, String])
},
color: {
type: String
}
});
var GE = defineComponent({
name: "ElIcon",
inheritAttrs: false
});
var HE = defineComponent({
...GE,
props: kE,
setup(n) {
const e = n, t = nt("icon"), i = computed(() => {
const { size: r, color: s } = e;
return !r && !s ? {} : {
fontSize: di(r) ? void 0 : Dc(r),
"--color": s
};
});
return (r, s) => (openBlock(), createElementBlock("i", mergeProps({
class: unref(t).b(),
style: unref(i)
}, r.$attrs), [
renderSlot(r.$slots, "default")
], 16));
}
});
var WE = st(HE, [["__file", "icon.vue"]]);
var It = on(WE);
var lf = Symbol("formContextKey");
var zc = Symbol("formItemContextKey");
var Ns = (n, e = {}) => {
const t = ref(void 0), i = e.prop ? t : v0("size"), r = e.global ? t : FE(), s = e.form ? { size: void 0 } : inject(lf, void 0), o = e.formItem ? { size: void 0 } : inject(zc, void 0);
return computed(() => i.value || unref(n) || (o == null ? void 0 : o.size) || (s == null ? void 0 : s.size) || r.value || "");
};
var ol = (n) => {
const e = v0("disabled"), t = inject(lf, void 0);
return computed(() => e.value || unref(n) || (t == null ? void 0 : t.disabled) || false);
};
var Jo = () => {
const n = inject(lf, void 0), e = inject(zc, void 0);
return {
form: n,
formItem: e
};
};
var su = (n, {
formItemContext: e,
disableIdGeneration: t,
disableIdManagement: i
}) => {
t || (t = ref(false)), i || (i = ref(false));
const r = ref();
let s;
const o = computed(() => {
var a;
return !!(!(n.label || n.ariaLabel) && e && e.inputIds && ((a = e.inputIds) == null ? void 0 : a.length) <= 1);
});
return onMounted(() => {
s = watch([toRef(n, "id"), t], ([a, c]) => {
const l = a ?? (c ? void 0 : sl().value);
l !== r.value && (e != null && e.removeInputId && (r.value && e.removeInputId(r.value), !(i != null && i.value) && !c && l && e.addInputId(l)), r.value = l);
}, { immediate: true });
}), onUnmounted(() => {
s && s(), e != null && e.removeInputId && r.value && e.removeInputId(r.value);
}), {
isLabeledByFormItem: o,
inputId: r
};
};
var ii;
var jE = `
height:0 !important;
visibility:hidden !important;
${Iw() ? "" : "overflow:hidden !important;"}
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
`;
var $E = [
"letter-spacing",
"line-height",
"padding-top",
"padding-bottom",
"font-family",
"font-weight",
"font-size",
"text-rendering",
"text-transform",
"width",
"text-indent",
"padding-left",
"padding-right",
"border-width",
"box-sizing"
];
function ZE(n) {
const e = window.getComputedStyle(n), t = e.getPropertyValue("box-sizing"), i = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), r = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width"));
return { contextStyle: $E.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: i, borderSize: r, boxSizing: t };
}
function Mm(n, e = 1, t) {
var i;
ii || (ii = document.createElement("textarea"), document.body.appendChild(ii));
const { paddingSize: r, borderSize: s, boxSizing: o, contextStyle: a } = ZE(n);
ii.setAttribute("style", `${a};${jE}`), ii.value = n.value || n.placeholder || "";
let c = ii.scrollHeight;
const l = {};
o === "border-box" ? c = c + s : o === "content-box" && (c = c - r), ii.value = "";
const d = ii.scrollHeight - r;
if (yt(e)) {
let h6 = d * e;
o === "border-box" && (h6 = h6 + r + s), c = Math.max(h6, c), l.minHeight = `${h6}px`;
}
if (yt(t)) {
let h6 = d * t;
o === "border-box" && (h6 = h6 + r + s), c = Math.min(h6, c);
}
return l.height = `${c}px`, (i = ii.parentNode) == null || i.removeChild(ii), ii = void 0, l;
}
var XE = at({
id: {
type: String,
default: void 0
},
size: Gr,
disabled: Boolean,
modelValue: {
type: Je([
String,
Number,
Object
]),
default: ""
},
maxlength: {
type: [String, Number]
},
minlength: {
type: [String, Number]
},
type: {
type: String,
default: "text"
},
resize: {
type: String,
values: ["none", "both", "horizontal", "vertical"]
},
autosize: {
type: Je([Boolean, Object]),
default: false
},
autocomplete: {
type: String,
default: "off"
},
formatter: {
type: Function
},
parser: {
type: Function
},
placeholder: {
type: String
},
form: {
type: String
},
readonly: Boolean,
clearable: Boolean,
showPassword: Boolean,
showWordLimit: Boolean,
suffixIcon: {
type: kr
},
prefixIcon: {
type: kr
},
containerRole: {
type: String,
default: void 0
},
tabindex: {
type: [String, Number],
default: 0
},
validateEvent: {
type: Boolean,
default: true
},
inputStyle: {
type: Je([Object, Array, String]),
default: () => Ki({})
},
autofocus: Boolean,
rows: {
type: Number,
default: 2
},
...Yr(["ariaLabel"])
});
var YE = {
[At]: (n) => vn(n),
input: (n) => vn(n),
change: (n) => vn(n),
focus: (n) => n instanceof FocusEvent,
blur: (n) => n instanceof FocusEvent,
clear: () => true,
mouseleave: (n) => n instanceof MouseEvent,
mouseenter: (n) => n instanceof MouseEvent,
keydown: (n) => n instanceof Event,
compositionstart: (n) => n instanceof CompositionEvent,
compositionupdate: (n) => n instanceof CompositionEvent,
compositionend: (n) => n instanceof CompositionEvent
};
var JE = defineComponent({
name: "ElInput",
inheritAttrs: false
});
var KE = defineComponent({
...JE,
props: XE,
emits: YE,
setup(n, { expose: e, emit: t }) {
const i = n, r = useAttrs(), s = useSlots(), o = computed(() => {
const he = {};
return i.containerRole === "combobox" && (he["aria-haspopup"] = r["aria-haspopup"], he["aria-owns"] = r["aria-owns"], he["aria-expanded"] = r["aria-expanded"]), he;
}), a = computed(() => [
i.type === "textarea" ? y.b() : u.b(),
u.m(g.value),
u.is("disabled", p.value),
u.is("exceed", Y.value),
{
[u.b("group")]: s.prepend || s.append,
[u.m("prefix")]: s.prefix || i.prefixIcon,
[u.m("suffix")]: s.suffix || i.suffixIcon || i.clearable || i.showPassword,
[u.bm("suffix", "password-clear")]: N.value && B.value,
[u.b("hidden")]: i.type === "hidden"
},
r.class
]), c = computed(() => [
u.e("wrapper"),
u.is("focus", S.value)
]), l = aT({
excludeKeys: computed(() => Object.keys(o.value))
}), { form: d, formItem: h6 } = Jo(), { inputId: f } = su(i, {
formItemContext: h6
}), g = Ns(), p = ol(), u = nt("input"), y = nt("textarea"), v = shallowRef(), m = shallowRef(), x = ref(false), w = ref(false), A = ref(), M = shallowRef(i.inputStyle), R = computed(() => v.value || m.value), { wrapperRef: L, isFocused: S, handleFocus: I, handleBlur: T } = D0(R, {
beforeFocus() {
return p.value;
},
afterBlur() {
var he;
i.validateEvent && ((he = h6 == null ? void 0 : h6.validate) == null || he.call(h6, "blur").catch((xe) => Vt(xe)));
}
}), _ = computed(() => {
var he;
return (he = d == null ? void 0 : d.statusIcon) != null ? he : false;
}), E = computed(() => (h6 == null ? void 0 : h6.validateState) || ""), C = computed(() => E.value && d0[E.value]), P = computed(() => w.value ? eT : X_), b = computed(() => [
r.style
]), F = computed(() => [
i.inputStyle,
M.value,
{ resize: i.resize }
]), D = computed(() => Ci(i.modelValue) ? "" : String(i.modelValue)), N = computed(() => i.clearable && !p.value && !i.readonly && !!D.value && (S.value || x.value)), B = computed(() => i.showPassword && !p.value && !i.readonly && !!D.value && (!!D.value || S.value)), U = computed(() => i.showWordLimit && !!i.maxlength && (i.type === "text" || i.type === "textarea") && !p.value && !i.readonly && !i.showPassword), G = computed(() => D.value.length), Y = computed(() => !!U.value && G.value > Number(i.maxlength)), te = computed(() => !!s.suffix || !!i.suffixIcon || N.value || i.showPassword || U.value || !!E.value && _.value), [ae, ie] = CE(v);
Yn(m, (he) => {
if ($(), !U.value || i.resize !== "both")
return;
const xe = he[0], { width: ne } = xe.contentRect;
A.value = {
right: `calc(100% - ${ne + 15 + 6}px)`
};
});
const le = () => {
const { type: he, autosize: xe } = i;
if (!(!en || he !== "textarea" || !m.value))
if (xe) {
const ne = Tn(xe) ? xe.minRows : void 0, me = Tn(xe) ? xe.maxRows : void 0, Me = Mm(m.value, ne, me);
M.value = {
overflowY: "hidden",
...Me
}, nextTick(() => {
m.value.offsetHeight, M.value = Me;
});
} else
M.value = {
minHeight: Mm(m.value).minHeight
};
}, $ = /* @__PURE__ */ ((he) => {
let xe = false;
return () => {
var ne;
if (xe || !i.autosize)
return;
((ne = m.value) == null ? void 0 : ne.offsetParent) === null || (he(), xe = true);
};
})(le), j = () => {
const he = R.value, xe = i.formatter ? i.formatter(D.value) : D.value;
!he || he.value === xe || (he.value = xe);
}, re = async (he) => {
ae();
let { value: xe } = he.target;
if (i.formatter && (xe = i.parser ? i.parser(xe) : xe), !H.value) {
if (xe === D.value) {
j();
return;
}
t(At, xe), t("input", xe), await nextTick(), j(), ie();
}
}, V = (he) => {
t("change", he.target.value);
}, {
isComposing: H,
handleCompositionStart: K,
handleCompositionUpdate: ce,
handleCompositionEnd: se
} = N0({ emit: t, afterComposition: re }), k = () => {
w.value = !w.value, O();
}, O = async () => {
var he;
await nextTick(), (he = R.value) == null || he.focus();
}, Z = () => {
var he;
return (he = R.value) == null ? void 0 : he.blur();
}, X = (he) => {
x.value = false, t("mouseleave", he);
}, ee = (he) => {
x.value = true, t("mouseenter", he);
}, fe = (he) => {
t("keydown", he);
}, be = () => {
var he;
(he = R.value) == null || he.select();
}, Ae = () => {
t(At, ""), t("change", ""), t("clear"), t("input", "");
};
return watch(() => i.modelValue, () => {
var he;
nextTick(() => le()), i.validateEvent && ((he = h6 == null ? void 0 : h6.validate) == null || he.call(h6, "change").catch((xe) => Vt(xe)));
}), watch(D, () => j()), watch(() => i.type, async () => {
await nextTick(), j(), le();
}), onMounted(() => {
!i.formatter && i.parser && Vt("ElInput", "If you set the parser, you also need to set the formatter."), j(), nextTick(le);
}), e({
input: v,
textarea: m,
ref: R,
textareaStyle: F,
autosize: toRef(i, "autosize"),
isComposing: H,
focus: O,
blur: Z,
select: be,
clear: Ae,
resizeTextarea: le
}), (he, xe) => (openBlock(), createElementBlock("div", mergeProps(unref(o), {
class: [
unref(a),
{
[unref(u).bm("group", "append")]: he.$slots.append,
[unref(u).bm("group", "prepend")]: he.$slots.prepend
}
],
style: unref(b),
role: he.containerRole,
onMouseenter: ee,
onMouseleave: X
}), [
createCommentVNode(" input "),
he.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createCommentVNode(" prepend slot "),
he.$slots.prepend ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(u).be("group", "prepend"))
}, [
renderSlot(he.$slots, "prepend")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
ref_key: "wrapperRef",
ref: L,
class: normalizeClass(unref(c))
}, [
createCommentVNode(" prefix slot "),
he.$slots.prefix || he.prefixIcon ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(u).e("prefix"))
}, [
createBaseVNode("span", {
class: normalizeClass(unref(u).e("prefix-inner"))
}, [
renderSlot(he.$slots, "prefix"),
he.prefixIcon ? (openBlock(), createBlock(unref(It), {
key: 0,
class: normalizeClass(unref(u).e("icon"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(he.prefixIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("input", mergeProps({
id: unref(f),
ref_key: "input",
ref: v,
class: unref(u).e("inner")
}, unref(l), {
minlength: he.minlength,
maxlength: he.maxlength,
type: he.showPassword ? w.value ? "text" : "password" : he.type,
disabled: unref(p),
readonly: he.readonly,
autocomplete: he.autocomplete,
tabindex: he.tabindex,
"aria-label": he.ariaLabel,
placeholder: he.placeholder,
style: he.inputStyle,
form: he.form,
autofocus: he.autofocus,
onCompositionstart: unref(K),
onCompositionupdate: unref(ce),
onCompositionend: unref(se),
onInput: re,
onChange: V,
onKeydown: fe
}), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
createCommentVNode(" suffix slot "),
unref(te) ? (openBlock(), createElementBlock("span", {
key: 1,
class: normalizeClass(unref(u).e("suffix"))
}, [
createBaseVNode("span", {
class: normalizeClass(unref(u).e("suffix-inner"))
}, [
!unref(N) || !unref(B) || !unref(U) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
renderSlot(he.$slots, "suffix"),
he.suffixIcon ? (openBlock(), createBlock(unref(It), {
key: 0,
class: normalizeClass(unref(u).e("icon"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(he.suffixIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 64)) : createCommentVNode("v-if", true),
unref(N) ? (openBlock(), createBlock(unref(It), {
key: 1,
class: normalizeClass([unref(u).e("icon"), unref(u).e("clear")]),
onMousedown: withModifiers(unref(Oa), ["prevent"]),
onClick: Ae
}, {
default: withCtx(() => [
createVNode(unref(Yd))
]),
_: 1
}, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
unref(B) ? (openBlock(), createBlock(unref(It), {
key: 2,
class: normalizeClass([unref(u).e("icon"), unref(u).e("password")]),
onClick: k
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(P))))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
unref(U) ? (openBlock(), createElementBlock("span", {
key: 3,
class: normalizeClass(unref(u).e("count"))
}, [
createBaseVNode("span", {
class: normalizeClass(unref(u).e("count-inner"))
}, toDisplayString(unref(G)) + " / " + toDisplayString(he.maxlength), 3)
], 2)) : createCommentVNode("v-if", true),
unref(E) && unref(C) && unref(_) ? (openBlock(), createBlock(unref(It), {
key: 4,
class: normalizeClass([
unref(u).e("icon"),
unref(u).e("validateIcon"),
unref(u).is("loading", unref(E) === "validating")
])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(C))))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 2)) : createCommentVNode("v-if", true)
], 2),
createCommentVNode(" append slot "),
he.$slots.append ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(u).be("group", "append"))
}, [
renderSlot(he.$slots, "append")
], 2)) : createCommentVNode("v-if", true)
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
createCommentVNode(" textarea "),
createBaseVNode("textarea", mergeProps({
id: unref(f),
ref_key: "textarea",
ref: m,
class: [unref(y).e("inner"), unref(u).is("focus", unref(S))]
}, unref(l), {
minlength: he.minlength,
maxlength: he.maxlength,
tabindex: he.tabindex,
disabled: unref(p),
readonly: he.readonly,
autocomplete: he.autocomplete,
style: unref(F),
"aria-label": he.ariaLabel,
placeholder: he.placeholder,
form: he.form,
autofocus: he.autofocus,
rows: he.rows,
onCompositionstart: unref(K),
onCompositionupdate: unref(ce),
onCompositionend: unref(se),
onInput: re,
onFocus: unref(I),
onBlur: unref(T),
onChange: V,
onKeydown: fe
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
unref(U) ? (openBlock(), createElementBlock("span", {
key: 0,
style: normalizeStyle(A.value),
class: normalizeClass(unref(u).e("count"))
}, toDisplayString(unref(G)) + " / " + toDisplayString(he.maxlength), 7)) : createCommentVNode("v-if", true)
], 64))
], 16, ["role"]));
}
});
var qE = st(KE, [["__file", "input.vue"]]);
var QE = on(qE);
var Hs = 4;
var e2 = {
vertical: {
offset: "offsetHeight",
scroll: "scrollTop",
scrollSize: "scrollHeight",
size: "height",
key: "vertical",
axis: "Y",
client: "clientY",
direction: "top"
},
horizontal: {
offset: "offsetWidth",
scroll: "scrollLeft",
scrollSize: "scrollWidth",
size: "width",
key: "horizontal",
axis: "X",
client: "clientX",
direction: "left"
}
};
var t2 = ({
move: n,
size: e,
bar: t
}) => ({
[t.size]: e,
transform: `translate${t.axis}(${n}%)`
});
var cf = Symbol("scrollbarContextKey");
var n2 = at({
vertical: Boolean,
size: String,
move: Number,
ratio: {
type: Number,
required: true
},
always: Boolean
});
var i2 = "Thumb";
var r2 = defineComponent({
__name: "thumb",
props: n2,
setup(n) {
const e = n, t = inject(cf), i = nt("scrollbar");
t || Xo(i2, "can not inject scrollbar context");
const r = ref(), s = ref(), o = ref({}), a = ref(false);
let c = false, l = false, d = en ? document.onselectstart : null;
const h6 = computed(() => e2[e.vertical ? "vertical" : "horizontal"]), f = computed(() => t2({
size: e.size,
move: e.move,
bar: h6.value
})), g = computed(() => r.value[h6.value.offset] ** 2 / t.wrapElement[h6.value.scrollSize] / e.ratio / s.value[h6.value.offset]), p = (M) => {
var R;
if (M.stopPropagation(), M.ctrlKey || [1, 2].includes(M.button))
return;
(R = window.getSelection()) == null || R.removeAllRanges(), y(M);
const L = M.currentTarget;
L && (o.value[h6.value.axis] = L[h6.value.offset] - (M[h6.value.client] - L.getBoundingClientRect()[h6.value.direction]));
}, u = (M) => {
if (!s.value || !r.value || !t.wrapElement)
return;
const R = Math.abs(M.target.getBoundingClientRect()[h6.value.direction] - M[h6.value.client]), L = s.value[h6.value.offset] / 2, S = (R - L) * 100 * g.value / r.value[h6.value.offset];
t.wrapElement[h6.value.scroll] = S * t.wrapElement[h6.value.scrollSize] / 100;
}, y = (M) => {
M.stopImmediatePropagation(), c = true, document.addEventListener("mousemove", v), document.addEventListener("mouseup", m), d = document.onselectstart, document.onselectstart = () => false;
}, v = (M) => {
if (!r.value || !s.value || c === false)
return;
const R = o.value[h6.value.axis];
if (!R)
return;
const L = (r.value.getBoundingClientRect()[h6.value.direction] - M[h6.value.client]) * -1, S = s.value[h6.value.offset] - R, I = (L - S) * 100 * g.value / r.value[h6.value.offset];
t.wrapElement[h6.value.scroll] = I * t.wrapElement[h6.value.scrollSize] / 100;
}, m = () => {
c = false, o.value[h6.value.axis] = 0, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", m), A(), l && (a.value = false);
}, x = () => {
l = false, a.value = !!e.size;
}, w = () => {
l = true, a.value = c;
};
onBeforeUnmount(() => {
A(), document.removeEventListener("mouseup", m);
});
const A = () => {
document.onselectstart !== d && (document.onselectstart = d);
};
return un(toRef(t, "scrollbarElement"), "mousemove", x), un(toRef(t, "scrollbarElement"), "mouseleave", w), (M, R) => (openBlock(), createBlock(Transition, {
name: unref(i).b("fade"),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
ref_key: "instance",
ref: r,
class: normalizeClass([unref(i).e("bar"), unref(i).is(unref(h6).key)]),
onMousedown: u
}, [
createBaseVNode("div", {
ref_key: "thumb",
ref: s,
class: normalizeClass(unref(i).e("thumb")),
style: normalizeStyle(unref(f)),
onMousedown: p
}, null, 38)
], 34), [
[vShow, M.always || a.value]
])
]),
_: 1
}, 8, ["name"]));
}
});
var wm = st(r2, [["__file", "thumb.vue"]]);
var s2 = at({
always: {
type: Boolean,
default: true
},
minSize: {
type: Number,
required: true
}
});
var o2 = defineComponent({
__name: "bar",
props: s2,
setup(n, { expose: e }) {
const t = n, i = inject(cf), r = ref(0), s = ref(0), o = ref(""), a = ref(""), c = ref(1), l = ref(1);
return e({
handleScroll: (f) => {
if (f) {
const g = f.offsetHeight - Hs, p = f.offsetWidth - Hs;
s.value = f.scrollTop * 100 / g * c.value, r.value = f.scrollLeft * 100 / p * l.value;
}
},
update: () => {
const f = i == null ? void 0 : i.wrapElement;
if (!f)
return;
const g = f.offsetHeight - Hs, p = f.offsetWidth - Hs, u = g ** 2 / f.scrollHeight, y = p ** 2 / f.scrollWidth, v = Math.max(u, t.minSize), m = Math.max(y, t.minSize);
c.value = u / (g - u) / (v / (g - v)), l.value = y / (p - y) / (m / (p - m)), a.value = v + Hs < g ? `${v}px` : "", o.value = m + Hs < p ? `${m}px` : "";
}
}), (f, g) => (openBlock(), createElementBlock(Fragment, null, [
createVNode(wm, {
move: r.value,
ratio: l.value,
size: o.value,
always: f.always
}, null, 8, ["move", "ratio", "size", "always"]),
createVNode(wm, {
move: s.value,
ratio: c.value,
size: a.value,
vertical: "",
always: f.always
}, null, 8, ["move", "ratio", "size", "always"])
], 64));
}
});
var a2 = st(o2, [["__file", "bar.vue"]]);
var l2 = at({
height: {
type: [String, Number],
default: ""
},
maxHeight: {
type: [String, Number],
default: ""
},
native: {
type: Boolean,
default: false
},
wrapStyle: {
type: Je([String, Object, Array]),
default: ""
},
wrapClass: {
type: [String, Array],
default: ""
},
viewClass: {
type: [String, Array],
default: ""
},
viewStyle: {
type: [String, Array, Object],
default: ""
},
noresize: Boolean,
tag: {
type: String,
default: "div"
},
always: Boolean,
minSize: {
type: Number,
default: 20
},
tabindex: {
type: [String, Number],
default: void 0
},
id: String,
role: String,
...Yr(["ariaLabel", "ariaOrientation"])
});
var c2 = {
scroll: ({
scrollTop: n,
scrollLeft: e
}) => [n, e].every(yt)
};
var Jh = "ElScrollbar";
var u2 = defineComponent({
name: Jh
});
var h2 = defineComponent({
...u2,
props: l2,
emits: c2,
setup(n, { expose: e, emit: t }) {
const i = n, r = nt("scrollbar");
let s, o, a = 0, c = 0;
const l = ref(), d = ref(), h6 = ref(), f = ref(), g = computed(() => {
const A = {};
return i.height && (A.height = Dc(i.height)), i.maxHeight && (A.maxHeight = Dc(i.maxHeight)), [i.wrapStyle, A];
}), p = computed(() => [
i.wrapClass,
r.e("wrap"),
{ [r.em("wrap", "hidden-default")]: !i.native }
]), u = computed(() => [r.e("view"), i.viewClass]), y = () => {
var A;
d.value && ((A = f.value) == null || A.handleScroll(d.value), a = d.value.scrollTop, c = d.value.scrollLeft, t("scroll", {
scrollTop: d.value.scrollTop,
scrollLeft: d.value.scrollLeft
}));
};
function v(A, M) {
Tn(A) ? d.value.scrollTo(A) : yt(A) && yt(M) && d.value.scrollTo(A, M);
}
const m = (A) => {
if (!yt(A)) {
Vt(Jh, "value must be a number");
return;
}
d.value.scrollTop = A;
}, x = (A) => {
if (!yt(A)) {
Vt(Jh, "value must be a number");
return;
}
d.value.scrollLeft = A;
}, w = () => {
var A;
(A = f.value) == null || A.update();
};
return watch(() => i.noresize, (A) => {
A ? (s == null || s(), o == null || o()) : ({ stop: s } = Yn(h6, w), o = un("resize", w));
}, { immediate: true }), watch(() => [i.maxHeight, i.height], () => {
i.native || nextTick(() => {
var A;
w(), d.value && ((A = f.value) == null || A.handleScroll(d.value));
});
}), provide(cf, reactive({
scrollbarElement: l,
wrapElement: d
})), onActivated(() => {
d.value && (d.value.scrollTop = a, d.value.scrollLeft = c);
}), onMounted(() => {
i.native || nextTick(() => {
w();
});
}), onUpdated(() => w()), e({
wrapRef: d,
update: w,
scrollTo: v,
setScrollTop: m,
setScrollLeft: x,
handleScroll: y
}), (A, M) => (openBlock(), createElementBlock("div", {
ref_key: "scrollbarRef",
ref: l,
class: normalizeClass(unref(r).b())
}, [
createBaseVNode("div", {
ref_key: "wrapRef",
ref: d,
class: normalizeClass(unref(p)),
style: normalizeStyle(unref(g)),
tabindex: A.tabindex,
onScroll: y
}, [
(openBlock(), createBlock(resolveDynamicComponent(A.tag), {
id: A.id,
ref_key: "resizeRef",
ref: h6,
class: normalizeClass(unref(u)),
style: normalizeStyle(A.viewStyle),
role: A.role,
"aria-label": A.ariaLabel,
"aria-orientation": A.ariaOrientation
}, {
default: withCtx(() => [
renderSlot(A.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
], 46, ["tabindex"]),
A.native ? createCommentVNode("v-if", true) : (openBlock(), createBlock(a2, {
key: 0,
ref_key: "barRef",
ref: f,
always: A.always,
"min-size": A.minSize
}, null, 8, ["always", "min-size"]))
], 2));
}
});
var d2 = st(h2, [["__file", "scrollbar.vue"]]);
var f2 = on(d2);
var uf = Symbol("popper");
var z0 = Symbol("popperContent");
var p2 = [
"dialog",
"grid",
"group",
"listbox",
"menu",
"navigation",
"tooltip",
"tree"
];
var V0 = at({
role: {
type: String,
values: p2,
default: "tooltip"
}
});
var m2 = defineComponent({
name: "ElPopper",
inheritAttrs: false
});
var g2 = defineComponent({
...m2,
props: V0,
setup(n, { expose: e }) {
const t = n, i = ref(), r = ref(), s = ref(), o = ref(), a = computed(() => t.role), c = {
triggerRef: i,
popperInstanceRef: r,
contentRef: s,
referenceRef: o,
role: a
};
return e(c), provide(uf, c), (l, d) => renderSlot(l.$slots, "default");
}
});
var v2 = st(g2, [["__file", "popper.vue"]]);
var k0 = at({
arrowOffset: {
type: Number,
default: 5
}
});
var y2 = defineComponent({
name: "ElPopperArrow",
inheritAttrs: false
});
var b2 = defineComponent({
...y2,
props: k0,
setup(n, { expose: e }) {
const t = n, i = nt("popper"), { arrowOffset: r, arrowRef: s, arrowStyle: o } = inject(z0, void 0);
return watch(() => t.arrowOffset, (a) => {
r.value = a;
}), onBeforeUnmount(() => {
s.value = void 0;
}), e({
arrowRef: s
}), (a, c) => (openBlock(), createElementBlock("span", {
ref_key: "arrowRef",
ref: s,
class: normalizeClass(unref(i).e("arrow")),
style: normalizeStyle(unref(o)),
"data-popper-arrow": ""
}, null, 6));
}
});
var x2 = st(b2, [["__file", "arrow.vue"]]);
var Bu = "ElOnlyChild";
var M2 = defineComponent({
name: Bu,
setup(n, {
slots: e,
attrs: t
}) {
var i;
const r = inject(R0), s = EE((i = r == null ? void 0 : r.setForwardRef) != null ? i : Oa);
return () => {
var o;
const a = (o = e.default) == null ? void 0 : o.call(e, t);
if (!a)
return null;
if (a.length > 1)
return Vt(Bu, "requires exact only one valid child."), null;
const c = G0(a);
return c ? withDirectives(cloneVNode(c, t), [[s]]) : (Vt(Bu, "no valid child node found"), null);
};
}
});
function G0(n) {
if (!n)
return null;
const e = n;
for (const t of e) {
if (Tn(t))
switch (t.type) {
case Comment:
continue;
case Text:
case "svg":
return Am(t);
case Fragment:
return G0(t.children);
default:
return t;
}
return Am(t);
}
return null;
}
function Am(n) {
const e = nt("only-child");
return createVNode("span", {
class: e.e("content")
}, [n]);
}
var H0 = at({
virtualRef: {
type: Je(Object)
},
virtualTriggering: Boolean,
onMouseenter: {
type: Je(Function)
},
onMouseleave: {
type: Je(Function)
},
onClick: {
type: Je(Function)
},
onKeydown: {
type: Je(Function)
},
onFocus: {
type: Je(Function)
},
onBlur: {
type: Je(Function)
},
onContextmenu: {
type: Je(Function)
},
id: String,
open: Boolean
});
var w2 = defineComponent({
name: "ElPopperTrigger",
inheritAttrs: false
});
var A2 = defineComponent({
...w2,
props: H0,
setup(n, { expose: e }) {
const t = n, { role: i, triggerRef: r } = inject(uf, void 0);
TE(r);
const s = computed(() => a.value ? t.id : void 0), o = computed(() => {
if (i && i.value === "tooltip")
return t.open && t.id ? t.id : void 0;
}), a = computed(() => {
if (i && i.value !== "tooltip")
return i.value;
}), c = computed(() => a.value ? `${t.open}` : void 0);
let l;
const d = [
"onMouseenter",
"onMouseleave",
"onClick",
"onKeydown",
"onFocus",
"onBlur",
"onContextmenu"
];
return onMounted(() => {
watch(() => t.virtualRef, (h6) => {
h6 && (r.value = Qi(h6));
}, {
immediate: true
}), watch(r, (h6, f) => {
l == null || l(), l = void 0, ys(h6) && (d.forEach((g) => {
var p;
const u = t[g];
u && (h6.addEventListener(g.slice(2).toLowerCase(), u), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, g.slice(2).toLowerCase(), u));
}), l = watch([s, o, a, c], (g) => {
[
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((p, u) => {
Ci(g[u]) ? h6.removeAttribute(p) : h6.setAttribute(p, g[u]);
});
}, { immediate: true })), ys(f) && [
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((g) => f.removeAttribute(g));
}, {
immediate: true
});
}), onBeforeUnmount(() => {
if (l == null || l(), l = void 0, r.value && ys(r.value)) {
const h6 = r.value;
d.forEach((f) => {
const g = t[f];
g && h6.removeEventListener(f.slice(2).toLowerCase(), g);
}), r.value = void 0;
}
}), e({
triggerRef: r
}), (h6, f) => h6.virtualTriggering ? createCommentVNode("v-if", true) : (openBlock(), createBlock(unref(M2), mergeProps({ key: 0 }, h6.$attrs, {
"aria-controls": unref(s),
"aria-describedby": unref(o),
"aria-expanded": unref(c),
"aria-haspopup": unref(a)
}), {
default: withCtx(() => [
renderSlot(h6.$slots, "default")
]),
_: 3
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
}
});
var S2 = st(A2, [["__file", "trigger.vue"]]);
var Uu = "focus-trap.focus-after-trapped";
var zu = "focus-trap.focus-after-released";
var _2 = "focus-trap.focusout-prevented";
var Sm = {
cancelable: true,
bubbles: false
};
var T2 = {
cancelable: true,
bubbles: false
};
var _m = "focusAfterTrapped";
var Tm = "focusAfterReleased";
var E2 = Symbol("elFocusTrap");
var hf = ref();
var ou = ref(0);
var df = ref(0);
var El = 0;
var W0 = (n) => {
const e = [], t = document.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, {
acceptNode: (i) => {
const r = i.tagName === "INPUT" && i.type === "hidden";
return i.disabled || i.hidden || r ? NodeFilter.FILTER_SKIP : i.tabIndex >= 0 || i === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}
});
for (; t.nextNode(); )
e.push(t.currentNode);
return e;
};
var Em = (n, e) => {
for (const t of n)
if (!C2(t, e))
return t;
};
var C2 = (n, e) => {
if (false)
return false;
if (getComputedStyle(n).visibility === "hidden")
return true;
for (; n; ) {
if (e && n === e)
return false;
if (getComputedStyle(n).display === "none")
return true;
n = n.parentElement;
}
return false;
};
var L2 = (n) => {
const e = W0(n), t = Em(e, n), i = Em(e.reverse(), n);
return [t, i];
};
var R2 = (n) => n instanceof HTMLInputElement && "select" in n;
var Tr = (n, e) => {
if (n && n.focus) {
const t = document.activeElement;
n.focus({ preventScroll: true }), df.value = window.performance.now(), n !== t && R2(n) && e && n.select();
}
};
function Cm(n, e) {
const t = [...n], i = n.indexOf(e);
return i !== -1 && t.splice(i, 1), t;
}
var F2 = () => {
let n = [];
return {
push: (i) => {
const r = n[0];
r && i !== r && r.pause(), n = Cm(n, i), n.unshift(i);
},
remove: (i) => {
var r, s;
n = Cm(n, i), (s = (r = n[0]) == null ? void 0 : r.resume) == null || s.call(r);
}
};
};
var P2 = (n, e = false) => {
const t = document.activeElement;
for (const i of n)
if (Tr(i, e), document.activeElement !== t)
return;
};
var Lm = F2();
var I2 = () => ou.value > df.value;
var Cl = () => {
hf.value = "pointer", ou.value = window.performance.now();
};
var Rm = () => {
hf.value = "keyboard", ou.value = window.performance.now();
};
var O2 = () => (onMounted(() => {
El === 0 && (document.addEventListener("mousedown", Cl), document.addEventListener("touchstart", Cl), document.addEventListener("keydown", Rm)), El++;
}), onBeforeUnmount(() => {
El--, El <= 0 && (document.removeEventListener("mousedown", Cl), document.removeEventListener("touchstart", Cl), document.removeEventListener("keydown", Rm));
}), {
focusReason: hf,
lastUserFocusTimestamp: ou,
lastAutomatedFocusTimestamp: df
});
var Ll = (n) => new CustomEvent(_2, {
...T2,
detail: n
});
var D2 = defineComponent({
name: "ElFocusTrap",
inheritAttrs: false,
props: {
loop: Boolean,
trapped: Boolean,
focusTrapEl: Object,
focusStartEl: {
type: [Object, String],
default: "first"
}
},
emits: [
_m,
Tm,
"focusin",
"focusout",
"focusout-prevented",
"release-requested"
],
setup(n, { emit: e }) {
const t = ref();
let i, r;
const { focusReason: s } = O2();
ME((p) => {
n.trapped && !o.paused && e("release-requested", p);
});
const o = {
paused: false,
pause() {
this.paused = true;
},
resume() {
this.paused = false;
}
}, a = (p) => {
if (!n.loop && !n.trapped || o.paused)
return;
const { key: u, altKey: y, ctrlKey: v, metaKey: m, currentTarget: x, shiftKey: w } = p, { loop: A } = n, M = u === Li.tab && !y && !v && !m, R = document.activeElement;
if (M && R) {
const L = x, [S, I] = L2(L);
if (S && I) {
if (!w && R === I) {
const _ = Ll({
focusReason: s.value
});
e("focusout-prevented", _), _.defaultPrevented || (p.preventDefault(), A && Tr(S, true));
} else if (w && [S, L].includes(R)) {
const _ = Ll({
focusReason: s.value
});
e("focusout-prevented", _), _.defaultPrevented || (p.preventDefault(), A && Tr(I, true));
}
} else if (R === L) {
const _ = Ll({
focusReason: s.value
});
e("focusout-prevented", _), _.defaultPrevented || p.preventDefault();
}
}
};
provide(E2, {
focusTrapRef: t,
onKeydown: a
}), watch(() => n.focusTrapEl, (p) => {
p && (t.value = p);
}, { immediate: true }), watch([t], ([p], [u]) => {
p && (p.addEventListener("keydown", a), p.addEventListener("focusin", d), p.addEventListener("focusout", h6)), u && (u.removeEventListener("keydown", a), u.removeEventListener("focusin", d), u.removeEventListener("focusout", h6));
});
const c = (p) => {
e(_m, p);
}, l = (p) => e(Tm, p), d = (p) => {
const u = unref(t);
if (!u)
return;
const y = p.target, v = p.relatedTarget, m = y && u.contains(y);
n.trapped || v && u.contains(v) || (i = v), m && e("focusin", p), !o.paused && n.trapped && (m ? r = y : Tr(r, true));
}, h6 = (p) => {
const u = unref(t);
if (!(o.paused || !u))
if (n.trapped) {
const y = p.relatedTarget;
!Ci(y) && !u.contains(y) && setTimeout(() => {
if (!o.paused && n.trapped) {
const v = Ll({
focusReason: s.value
});
e("focusout-prevented", v), v.defaultPrevented || Tr(r, true);
}
}, 0);
} else {
const y = p.target;
y && u.contains(y) || e("focusout", p);
}
};
async function f() {
await nextTick();
const p = unref(t);
if (p) {
Lm.push(o);
const u = p.contains(document.activeElement) ? i : document.activeElement;
if (i = u, !p.contains(u)) {
const v = new Event(Uu, Sm);
p.addEventListener(Uu, c), p.dispatchEvent(v), v.defaultPrevented || nextTick(() => {
let m = n.focusStartEl;
vn(m) || (Tr(m), document.activeElement !== m && (m = "first")), m === "first" && P2(W0(p), true), (document.activeElement === u || m === "container") && Tr(p);
});
}
}
}
function g() {
const p = unref(t);
if (p) {
p.removeEventListener(Uu, c);
const u = new CustomEvent(zu, {
...Sm,
detail: {
focusReason: s.value
}
});
p.addEventListener(zu, l), p.dispatchEvent(u), !u.defaultPrevented && (s.value == "keyboard" || !I2() || p.contains(document.activeElement)) && Tr(i ?? document.body), p.removeEventListener(zu, l), Lm.remove(o);
}
}
return onMounted(() => {
n.trapped && f(), watch(() => n.trapped, (p) => {
p ? f() : g();
});
}), onBeforeUnmount(() => {
n.trapped && g(), t.value && (t.value.removeEventListener("keydown", a), t.value.removeEventListener("focusin", d), t.value.removeEventListener("focusout", h6), t.value = void 0);
}), {
onKeydown: a
};
}
});
function N2(n, e, t, i, r, s) {
return renderSlot(n.$slots, "default", { handleKeydown: n.onKeydown });
}
var B2 = st(D2, [["render", N2], ["__file", "focus-trap.vue"]]);
var U2 = ["fixed", "absolute"];
var z2 = at({
boundariesPadding: {
type: Number,
default: 0
},
fallbackPlacements: {
type: Je(Array),
default: void 0
},
gpuAcceleration: {
type: Boolean,
default: true
},
offset: {
type: Number,
default: 12
},
placement: {
type: String,
values: Yo,
default: "bottom"
},
popperOptions: {
type: Je(Object),
default: () => ({})
},
strategy: {
type: String,
values: U2,
default: "absolute"
}
});
var j0 = at({
...z2,
id: String,
style: {
type: Je([String, Array, Object])
},
className: {
type: Je([String, Array, Object])
},
effect: {
type: Je(String),
default: "dark"
},
visible: Boolean,
enterable: {
type: Boolean,
default: true
},
pure: Boolean,
focusOnShow: {
type: Boolean,
default: false
},
trapping: {
type: Boolean,
default: false
},
popperClass: {
type: Je([String, Array, Object])
},
popperStyle: {
type: Je([String, Array, Object])
},
referenceEl: {
type: Je(Object)
},
triggerTargetEl: {
type: Je(Object)
},
stopPopperMouseEvent: {
type: Boolean,
default: true
},
virtualTriggering: Boolean,
zIndex: Number,
...Yr(["ariaLabel"])
});
var V2 = {
mouseenter: (n) => n instanceof MouseEvent,
mouseleave: (n) => n instanceof MouseEvent,
focus: () => true,
blur: () => true,
close: () => true
};
var k2 = (n, e = []) => {
const { placement: t, strategy: i, popperOptions: r } = n, s = {
placement: t,
strategy: i,
...r,
modifiers: [...H2(n), ...e]
};
return W2(s, r == null ? void 0 : r.modifiers), s;
};
var G2 = (n) => {
if (en)
return Qi(n);
};
function H2(n) {
const { offset: e, gpuAcceleration: t, fallbackPlacements: i } = n;
return [
{
name: "offset",
options: {
offset: [0, e ?? 12]
}
},
{
name: "preventOverflow",
options: {
padding: {
top: 2,
bottom: 2,
left: 5,
right: 5
}
}
},
{
name: "flip",
options: {
padding: 5,
fallbackPlacements: i
}
},
{
name: "computeStyles",
options: {
gpuAcceleration: t
}
}
];
}
function W2(n, e) {
e && (n.modifiers = [...n.modifiers, ...e ?? []]);
}
var j2 = 0;
var $2 = (n) => {
const { popperInstanceRef: e, contentRef: t, triggerRef: i, role: r } = inject(uf, void 0), s = ref(), o = ref(), a = computed(() => ({
name: "eventListeners",
enabled: !!n.visible
})), c = computed(() => {
var v;
const m = unref(s), x = (v = unref(o)) != null ? v : j2;
return {
name: "arrow",
enabled: !C_(m),
options: {
element: m,
padding: x
}
};
}), l = computed(() => ({
onFirstUpdate: () => {
p();
},
...k2(n, [
unref(c),
unref(a)
])
})), d = computed(() => G2(n.referenceEl) || unref(i)), { attributes: h6, state: f, styles: g, update: p, forceUpdate: u, instanceRef: y } = yE(d, t, l);
return watch(y, (v) => e.value = v), onMounted(() => {
watch(() => {
var v;
return (v = unref(d)) == null ? void 0 : v.getBoundingClientRect();
}, () => {
p();
});
}), {
attributes: h6,
arrowRef: s,
contentRef: t,
instanceRef: y,
state: f,
styles: g,
role: r,
forceUpdate: u,
update: p
};
};
var Z2 = (n, {
attributes: e,
styles: t,
role: i
}) => {
const { nextZIndex: r } = I0(), s = nt("popper"), o = computed(() => unref(e).popper), a = ref(yt(n.zIndex) ? n.zIndex : r()), c = computed(() => [
s.b(),
s.is("pure", n.pure),
s.is(n.effect),
n.popperClass
]), l = computed(() => [
{ zIndex: unref(a) },
unref(t).popper,
n.popperStyle || {}
]), d = computed(() => i.value === "dialog" ? "false" : void 0), h6 = computed(() => unref(t).arrow || {});
return {
ariaModal: d,
arrowStyle: h6,
contentAttrs: o,
contentClass: c,
contentStyle: l,
contentZIndex: a,
updateZIndex: () => {
a.value = yt(n.zIndex) ? n.zIndex : r();
}
};
};
var X2 = (n, e) => {
const t = ref(false), i = ref();
return {
focusStartRef: i,
trapped: t,
onFocusAfterReleased: (l) => {
var d;
((d = l.detail) == null ? void 0 : d.focusReason) !== "pointer" && (i.value = "first", e("blur"));
},
onFocusAfterTrapped: () => {
e("focus");
},
onFocusInTrap: (l) => {
n.visible && !t.value && (l.target && (i.value = l.target), t.value = true);
},
onFocusoutPrevented: (l) => {
n.trapping || (l.detail.focusReason === "pointer" && l.preventDefault(), t.value = false);
},
onReleaseRequested: () => {
t.value = false, e("close");
}
};
};
var Y2 = defineComponent({
name: "ElPopperContent"
});
var J2 = defineComponent({
...Y2,
props: j0,
emits: V2,
setup(n, { expose: e, emit: t }) {
const i = n, {
focusStartRef: r,
trapped: s,
onFocusAfterReleased: o,
onFocusAfterTrapped: a,
onFocusInTrap: c,
onFocusoutPrevented: l,
onReleaseRequested: d
} = X2(i, t), { attributes: h6, arrowRef: f, contentRef: g, styles: p, instanceRef: u, role: y, update: v } = $2(i), {
ariaModal: m,
arrowStyle: x,
contentAttrs: w,
contentClass: A,
contentStyle: M,
updateZIndex: R
} = Z2(i, {
styles: p,
attributes: h6,
role: y
}), L = inject(zc, void 0), S = ref();
provide(z0, {
arrowStyle: x,
arrowRef: f,
arrowOffset: S
}), L && provide(zc, {
...L,
addInputId: Oa,
removeInputId: Oa
});
let I;
const T = (E = true) => {
v(), E && R();
}, _ = () => {
T(false), i.visible && i.focusOnShow ? s.value = true : i.visible === false && (s.value = false);
};
return onMounted(() => {
watch(() => i.triggerTargetEl, (E, C) => {
I == null || I(), I = void 0;
const P = unref(E || g.value), b = unref(C || g.value);
ys(P) && (I = watch([y, () => i.ariaLabel, m, () => i.id], (F) => {
["role", "aria-label", "aria-modal", "id"].forEach((D, N) => {
Ci(F[N]) ? P.removeAttribute(D) : P.setAttribute(D, F[N]);
});
}, { immediate: true })), b !== P && ys(b) && ["role", "aria-label", "aria-modal", "id"].forEach((F) => {
b.removeAttribute(F);
});
}, { immediate: true }), watch(() => i.visible, _, { immediate: true });
}), onBeforeUnmount(() => {
I == null || I(), I = void 0;
}), e({
popperContentRef: g,
popperInstanceRef: u,
updatePopper: T,
contentStyle: M
}), (E, C) => (openBlock(), createElementBlock("div", mergeProps({
ref_key: "contentRef",
ref: g
}, unref(w), {
style: unref(M),
class: unref(A),
tabindex: "-1",
onMouseenter: (P) => E.$emit("mouseenter", P),
onMouseleave: (P) => E.$emit("mouseleave", P)
}), [
createVNode(unref(B2), {
trapped: unref(s),
"trap-on-focus-in": true,
"focus-trap-el": unref(g),
"focus-start-el": unref(r),
onFocusAfterTrapped: unref(a),
onFocusAfterReleased: unref(o),
onFocusin: unref(c),
onFocusoutPrevented: unref(l),
onReleaseRequested: unref(d)
}, {
default: withCtx(() => [
renderSlot(E.$slots, "default")
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
], 16, ["onMouseenter", "onMouseleave"]));
}
});
var K2 = st(J2, [["__file", "content.vue"]]);
var q2 = on(v2);
var ff = Symbol("elTooltip");
var Vn = at({
...SE,
...j0,
appendTo: {
type: Je([String, Object])
},
content: {
type: String,
default: ""
},
rawContent: Boolean,
persistent: Boolean,
visible: {
type: Je(Boolean),
default: null
},
transition: String,
teleported: {
type: Boolean,
default: true
},
disabled: Boolean,
...Yr(["ariaLabel"])
});
var Va = at({
...H0,
disabled: Boolean,
trigger: {
type: Je([String, Array]),
default: "hover"
},
triggerKeys: {
type: Je(Array),
default: () => [Li.enter, Li.space]
}
});
var {
useModelToggleProps: Q2,
useModelToggleEmits: eC,
useModelToggle: tC
} = mT("visible");
var nC = at({
...V0,
...Q2,
...Vn,
...Va,
...k0,
showArrow: {
type: Boolean,
default: true
}
});
var iC = [
...eC,
"before-show",
"before-hide",
"show",
"hide",
"open",
"close"
];
var rC = (n, e) => Pn(n) ? n.includes(e) : n === e;
var Ws = (n, e, t) => (i) => {
rC(unref(n), e) && t(i);
};
var sC = defineComponent({
name: "ElTooltipTrigger"
});
var oC = defineComponent({
...sC,
props: Va,
setup(n, { expose: e }) {
const t = n, i = nt("tooltip"), { controlled: r, id: s, open: o, onOpen: a, onClose: c, onToggle: l } = inject(ff, void 0), d = ref(null), h6 = () => {
if (unref(r) || t.disabled)
return true;
}, f = toRef(t, "trigger"), g = Yi(h6, Ws(f, "hover", a)), p = Yi(h6, Ws(f, "hover", c)), u = Yi(h6, Ws(f, "click", (w) => {
w.button === 0 && l(w);
})), y = Yi(h6, Ws(f, "focus", a)), v = Yi(h6, Ws(f, "focus", c)), m = Yi(h6, Ws(f, "contextmenu", (w) => {
w.preventDefault(), l(w);
})), x = Yi(h6, (w) => {
const { code: A } = w;
t.triggerKeys.includes(A) && (w.preventDefault(), l(w));
});
return e({
triggerRef: d
}), (w, A) => (openBlock(), createBlock(unref(S2), {
id: unref(s),
"virtual-ref": w.virtualRef,
open: unref(o),
"virtual-triggering": w.virtualTriggering,
class: normalizeClass(unref(i).e("trigger")),
onBlur: unref(v),
onClick: unref(u),
onContextmenu: unref(m),
onFocus: unref(y),
onMouseenter: unref(g),
onMouseleave: unref(p),
onKeydown: unref(x)
}, {
default: withCtx(() => [
renderSlot(w.$slots, "default")
]),
_: 3
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
}
});
var aC = st(oC, [["__file", "trigger.vue"]]);
var lC = at({
to: {
type: Je([String, Object]),
required: true
},
disabled: Boolean
});
var cC = defineComponent({
__name: "teleport",
props: lC,
setup(n) {
return (e, t) => e.disabled ? renderSlot(e.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, {
key: 1,
to: e.to
}, [
renderSlot(e.$slots, "default")
], 8, ["to"]));
}
});
var uC = st(cC, [["__file", "teleport.vue"]]);
var hC = on(uC);
var dC = defineComponent({
name: "ElTooltipContent",
inheritAttrs: false
});
var fC = defineComponent({
...dC,
props: Vn,
setup(n, { expose: e }) {
const t = n, { selector: i } = L0(), r = nt("tooltip"), s = ref(null);
let o;
const {
controlled: a,
id: c,
open: l,
trigger: d,
onClose: h6,
onOpen: f,
onShow: g,
onHide: p,
onBeforeShow: u,
onBeforeHide: y
} = inject(ff, void 0), v = computed(() => t.transition || `${r.namespace.value}-fade-in-linear`), m = computed(() => false ? true : t.persistent);
onBeforeUnmount(() => {
o == null || o();
});
const x = computed(() => unref(m) ? true : unref(l)), w = computed(() => t.disabled ? false : unref(l)), A = computed(() => t.appendTo || i.value), M = computed(() => {
var b;
return (b = t.style) != null ? b : {};
}), R = ref(true), L = () => {
p(), R.value = true;
}, S = () => {
if (unref(a))
return true;
}, I = Yi(S, () => {
t.enterable && unref(d) === "hover" && f();
}), T = Yi(S, () => {
unref(d) === "hover" && h6();
}), _ = () => {
var b, F;
(F = (b = s.value) == null ? void 0 : b.updatePopper) == null || F.call(b), u == null || u();
}, E = () => {
y == null || y();
}, C = () => {
g(), o = yw(computed(() => {
var b;
return (b = s.value) == null ? void 0 : b.popperContentRef;
}), () => {
if (unref(a))
return;
unref(d) !== "hover" && h6();
});
}, P = () => {
t.virtualTriggering || h6();
};
return watch(() => unref(l), (b) => {
b ? R.value = false : o == null || o();
}, {
flush: "post"
}), watch(() => t.content, () => {
var b, F;
(F = (b = s.value) == null ? void 0 : b.updatePopper) == null || F.call(b);
}), e({
contentRef: s
}), (b, F) => (openBlock(), createBlock(unref(hC), {
disabled: !b.teleported,
to: unref(A)
}, {
default: withCtx(() => [
createVNode(Transition, {
name: unref(v),
onAfterLeave: L,
onBeforeEnter: _,
onAfterEnter: C,
onBeforeLeave: E
}, {
default: withCtx(() => [
unref(x) ? withDirectives((openBlock(), createBlock(unref(K2), mergeProps({
key: 0,
id: unref(c),
ref_key: "contentRef",
ref: s
}, b.$attrs, {
"aria-label": b.ariaLabel,
"aria-hidden": R.value,
"boundaries-padding": b.boundariesPadding,
"fallback-placements": b.fallbackPlacements,
"gpu-acceleration": b.gpuAcceleration,
offset: b.offset,
placement: b.placement,
"popper-options": b.popperOptions,
strategy: b.strategy,
effect: b.effect,
enterable: b.enterable,
pure: b.pure,
"popper-class": b.popperClass,
"popper-style": [b.popperStyle, unref(M)],
"reference-el": b.referenceEl,
"trigger-target-el": b.triggerTargetEl,
visible: unref(w),
"z-index": b.zIndex,
onMouseenter: unref(I),
onMouseleave: unref(T),
onBlur: P,
onClose: unref(h6)
}), {
default: withCtx(() => [
renderSlot(b.$slots, "default")
]),
_: 3
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
[vShow, unref(w)]
]) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"])
]),
_: 3
}, 8, ["disabled", "to"]));
}
});
var pC = st(fC, [["__file", "content.vue"]]);
var mC = defineComponent({
name: "ElTooltip"
});
var gC = defineComponent({
...mC,
props: nC,
emits: iC,
setup(n, { expose: e, emit: t }) {
const i = n;
AE();
const r = sl(), s = ref(), o = ref(), a = () => {
var v;
const m = unref(s);
m && ((v = m.popperInstanceRef) == null || v.update());
}, c = ref(false), l = ref(), { show: d, hide: h6, hasUpdateHandler: f } = tC({
indicator: c,
toggleReason: l
}), { onOpen: g, onClose: p } = _E({
showAfter: toRef(i, "showAfter"),
hideAfter: toRef(i, "hideAfter"),
autoClose: toRef(i, "autoClose"),
open: d,
close: h6
}), u = computed(() => Ba(i.visible) && !f.value);
provide(ff, {
controlled: u,
id: r,
open: readonly(c),
trigger: toRef(i, "trigger"),
onOpen: (v) => {
g(v);
},
onClose: (v) => {
p(v);
},
onToggle: (v) => {
unref(c) ? p(v) : g(v);
},
onShow: () => {
t("show", l.value);
},
onHide: () => {
t("hide", l.value);
},
onBeforeShow: () => {
t("before-show", l.value);
},
onBeforeHide: () => {
t("before-hide", l.value);
},
updatePopper: a
}), watch(() => i.disabled, (v) => {
v && c.value && (c.value = false);
});
const y = (v) => {
var m, x;
const w = (x = (m = o.value) == null ? void 0 : m.contentRef) == null ? void 0 : x.popperContentRef, A = (v == null ? void 0 : v.relatedTarget) || document.activeElement;
return w && w.contains(A);
};
return onDeactivated(() => c.value && h6()), e({
popperRef: s,
contentRef: o,
isFocusInsideContent: y,
updatePopper: a,
onOpen: g,
onClose: p,
hide: h6
}), (v, m) => (openBlock(), createBlock(unref(q2), {
ref_key: "popperRef",
ref: s,
role: v.role
}, {
default: withCtx(() => [
createVNode(aC, {
disabled: v.disabled,
trigger: v.trigger,
"trigger-keys": v.triggerKeys,
"virtual-ref": v.virtualRef,
"virtual-triggering": v.virtualTriggering
}, {
default: withCtx(() => [
v.$slots.default ? renderSlot(v.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
createVNode(pC, {
ref_key: "contentRef",
ref: o,
"aria-label": v.ariaLabel,
"boundaries-padding": v.boundariesPadding,
content: v.content,
disabled: v.disabled,
effect: v.effect,
enterable: v.enterable,
"fallback-placements": v.fallbackPlacements,
"hide-after": v.hideAfter,
"gpu-acceleration": v.gpuAcceleration,
offset: v.offset,
persistent: v.persistent,
"popper-class": v.popperClass,
"popper-style": v.popperStyle,
placement: v.placement,
"popper-options": v.popperOptions,
pure: v.pure,
"raw-content": v.rawContent,
"reference-el": v.referenceEl,
"trigger-target-el": v.triggerTargetEl,
"show-after": v.showAfter,
strategy: v.strategy,
teleported: v.teleported,
transition: v.transition,
"virtual-triggering": v.virtualTriggering,
"z-index": v.zIndex,
"append-to": v.appendTo
}, {
default: withCtx(() => [
renderSlot(v.$slots, "content", {}, () => [
v.rawContent ? (openBlock(), createElementBlock("span", {
key: 0,
innerHTML: v.content
}, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(v.content), 1))
]),
v.showArrow ? (openBlock(), createBlock(unref(x2), {
key: 0,
"arrow-offset": v.arrowOffset
}, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
]),
_: 3
}, 8, ["role"]));
}
});
var vC = st(gC, [["__file", "tooltip.vue"]]);
var pf = on(vC);
var $0 = Symbol("buttonGroupContextKey");
var yC = (n, e) => {
p0({
from: "type.text",
replacement: "link",
version: "3.0.0",
scope: "props",
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
}, computed(() => n.type === "text"));
const t = inject($0, void 0), i = af("button"), { form: r } = Jo(), s = Ns(computed(() => t == null ? void 0 : t.size)), o = ol(), a = ref(), c = useSlots(), l = computed(() => n.type || (t == null ? void 0 : t.type) || ""), d = computed(() => {
var p, u, y;
return (y = (u = n.autoInsertSpace) != null ? u : (p = i.value) == null ? void 0 : p.autoInsertSpace) != null ? y : false;
}), h6 = computed(() => n.tag === "button" ? {
ariaDisabled: o.value || n.loading,
disabled: o.value || n.loading,
autofocus: n.autofocus,
type: n.nativeType
} : {}), f = computed(() => {
var p;
const u = (p = c.default) == null ? void 0 : p.call(c);
if (d.value && (u == null ? void 0 : u.length) === 1) {
const y = u[0];
if ((y == null ? void 0 : y.type) === Text) {
const v = y.children;
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(v.trim());
}
}
return false;
});
return {
_disabled: o,
_size: s,
_type: l,
_ref: a,
_props: h6,
shouldAddSpace: f,
handleClick: (p) => {
if (o.value || n.loading) {
p.stopPropagation();
return;
}
n.nativeType === "reset" && (r == null || r.resetFields()), e("click", p);
}
};
};
var bC = [
"default",
"primary",
"success",
"warning",
"info",
"danger",
"text",
""
];
var xC = ["button", "submit", "reset"];
var Kh = at({
size: Gr,
disabled: Boolean,
type: {
type: String,
values: bC,
default: ""
},
icon: {
type: kr
},
nativeType: {
type: String,
values: xC,
default: "button"
},
loading: Boolean,
loadingIcon: {
type: kr,
default: () => c0
},
plain: Boolean,
text: Boolean,
link: Boolean,
bg: Boolean,
autofocus: Boolean,
round: Boolean,
circle: Boolean,
color: String,
dark: Boolean,
autoInsertSpace: {
type: Boolean,
default: void 0
},
tag: {
type: Je([String, Object]),
default: "button"
}
});
var MC = {
click: (n) => n instanceof MouseEvent
};
function yn(n, e) {
wC(n) && (n = "100%");
var t = AC(n);
return n = e === 360 ? n : Math.min(e, Math.max(0, parseFloat(n))), t && (n = parseInt(String(n * e), 10) / 100), Math.abs(n - e) < 1e-6 ? 1 : (e === 360 ? n = (n < 0 ? n % e + e : n % e) / parseFloat(String(e)) : n = n % e / parseFloat(String(e)), n);
}
function Rl(n) {
return Math.min(1, Math.max(0, n));
}
function wC(n) {
return typeof n == "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
}
function AC(n) {
return typeof n == "string" && n.indexOf("%") !== -1;
}
function Z0(n) {
return n = parseFloat(n), (isNaN(n) || n < 0 || n > 1) && (n = 1), n;
}
function Fl(n) {
return n <= 1 ? "".concat(Number(n) * 100, "%") : n;
}
function ms(n) {
return n.length === 1 ? "0" + n : String(n);
}
function SC(n, e, t) {
return {
r: yn(n, 255) * 255,
g: yn(e, 255) * 255,
b: yn(t, 255) * 255
};
}
function Fm(n, e, t) {
n = yn(n, 255), e = yn(e, 255), t = yn(t, 255);
var i = Math.max(n, e, t), r = Math.min(n, e, t), s = 0, o = 0, a = (i + r) / 2;
if (i === r)
o = 0, s = 0;
else {
var c = i - r;
switch (o = a > 0.5 ? c / (2 - i - r) : c / (i + r), i) {
case n:
s = (e - t) / c + (e < t ? 6 : 0);
break;
case e:
s = (t - n) / c + 2;
break;
case t:
s = (n - e) / c + 4;
break;
}
s /= 6;
}
return { h: s, s: o, l: a };
}
function Vu(n, e, t) {
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * (6 * t) : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * (2 / 3 - t) * 6 : n;
}
function _C(n, e, t) {
var i, r, s;
if (n = yn(n, 360), e = yn(e, 100), t = yn(t, 100), e === 0)
r = t, s = t, i = t;
else {
var o = t < 0.5 ? t * (1 + e) : t + e - t * e, a = 2 * t - o;
i = Vu(a, o, n + 1 / 3), r = Vu(a, o, n), s = Vu(a, o, n - 1 / 3);
}
return { r: i * 255, g: r * 255, b: s * 255 };
}
function Pm(n, e, t) {
n = yn(n, 255), e = yn(e, 255), t = yn(t, 255);
var i = Math.max(n, e, t), r = Math.min(n, e, t), s = 0, o = i, a = i - r, c = i === 0 ? 0 : a / i;
if (i === r)
s = 0;
else {
switch (i) {
case n:
s = (e - t) / a + (e < t ? 6 : 0);
break;
case e:
s = (t - n) / a + 2;
break;
case t:
s = (n - e) / a + 4;
break;
}
s /= 6;
}
return { h: s, s: c, v: o };
}
function TC(n, e, t) {
n = yn(n, 360) * 6, e = yn(e, 100), t = yn(t, 100);
var i = Math.floor(n), r = n - i, s = t * (1 - e), o = t * (1 - r * e), a = t * (1 - (1 - r) * e), c = i % 6, l = [t, o, s, s, a, t][c], d = [a, t, t, o, s, s][c], h6 = [s, s, a, t, t, o][c];
return { r: l * 255, g: d * 255, b: h6 * 255 };
}
function Im(n, e, t, i) {
var r = [
ms(Math.round(n).toString(16)),
ms(Math.round(e).toString(16)),
ms(Math.round(t).toString(16))
];
return i && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
}
function EC(n, e, t, i, r) {
var s = [
ms(Math.round(n).toString(16)),
ms(Math.round(e).toString(16)),
ms(Math.round(t).toString(16)),
ms(CC(i))
];
return r && s[0].startsWith(s[0].charAt(1)) && s[1].startsWith(s[1].charAt(1)) && s[2].startsWith(s[2].charAt(1)) && s[3].startsWith(s[3].charAt(1)) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) + s[3].charAt(0) : s.join("");
}
function CC(n) {
return Math.round(parseFloat(n) * 255).toString(16);
}
function Om(n) {
return zn(n) / 255;
}
function zn(n) {
return parseInt(n, 16);
}
function LC(n) {
return {
r: n >> 16,
g: (n & 65280) >> 8,
b: n & 255
};
}
var qh = {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyan: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
goldenrod: "#daa520",
gold: "#ffd700",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavenderblush: "#fff0f5",
lavender: "#e6e6fa",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
steelblue: "#4682b4",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
tomato: "#ff6347",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
};
function RC(n) {
var e = { r: 0, g: 0, b: 0 }, t = 1, i = null, r = null, s = null, o = false, a = false;
return typeof n == "string" && (n = IC(n)), typeof n == "object" && (Gi(n.r) && Gi(n.g) && Gi(n.b) ? (e = SC(n.r, n.g, n.b), o = true, a = String(n.r).substr(-1) === "%" ? "prgb" : "rgb") : Gi(n.h) && Gi(n.s) && Gi(n.v) ? (i = Fl(n.s), r = Fl(n.v), e = TC(n.h, i, r), o = true, a = "hsv") : Gi(n.h) && Gi(n.s) && Gi(n.l) && (i = Fl(n.s), s = Fl(n.l), e = _C(n.h, i, s), o = true, a = "hsl"), Object.prototype.hasOwnProperty.call(n, "a") && (t = n.a)), t = Z0(t), {
ok: o,
format: n.format || a,
r: Math.min(255, Math.max(e.r, 0)),
g: Math.min(255, Math.max(e.g, 0)),
b: Math.min(255, Math.max(e.b, 0)),
a: t
};
}
var FC = "[-\\+]?\\d+%?";
var PC = "[-\\+]?\\d*\\.\\d+%?";
var Fr = "(?:".concat(PC, ")|(?:").concat(FC, ")");
var ku = "[\\s|\\(]+(".concat(Fr, ")[,|\\s]+(").concat(Fr, ")[,|\\s]+(").concat(Fr, ")\\s*\\)?");
var Gu = "[\\s|\\(]+(".concat(Fr, ")[,|\\s]+(").concat(Fr, ")[,|\\s]+(").concat(Fr, ")[,|\\s]+(").concat(Fr, ")\\s*\\)?");
var li = {
CSS_UNIT: new RegExp(Fr),
rgb: new RegExp("rgb" + ku),
rgba: new RegExp("rgba" + Gu),
hsl: new RegExp("hsl" + ku),
hsla: new RegExp("hsla" + Gu),
hsv: new RegExp("hsv" + ku),
hsva: new RegExp("hsva" + Gu),
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function IC(n) {
if (n = n.trim().toLowerCase(), n.length === 0)
return false;
var e = false;
if (qh[n])
n = qh[n], e = true;
else if (n === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
var t = li.rgb.exec(n);
return t ? { r: t[1], g: t[2], b: t[3] } : (t = li.rgba.exec(n), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = li.hsl.exec(n), t ? { h: t[1], s: t[2], l: t[3] } : (t = li.hsla.exec(n), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = li.hsv.exec(n), t ? { h: t[1], s: t[2], v: t[3] } : (t = li.hsva.exec(n), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = li.hex8.exec(n), t ? {
r: zn(t[1]),
g: zn(t[2]),
b: zn(t[3]),
a: Om(t[4]),
format: e ? "name" : "hex8"
} : (t = li.hex6.exec(n), t ? {
r: zn(t[1]),
g: zn(t[2]),
b: zn(t[3]),
format: e ? "name" : "hex"
} : (t = li.hex4.exec(n), t ? {
r: zn(t[1] + t[1]),
g: zn(t[2] + t[2]),
b: zn(t[3] + t[3]),
a: Om(t[4] + t[4]),
format: e ? "name" : "hex8"
} : (t = li.hex3.exec(n), t ? {
r: zn(t[1] + t[1]),
g: zn(t[2] + t[2]),
b: zn(t[3] + t[3]),
format: e ? "name" : "hex"
} : false)))))))));
}
function Gi(n) {
return !!li.CSS_UNIT.exec(String(n));
}
var OC = (
/** @class */
function() {
function n(e, t) {
e === void 0 && (e = ""), t === void 0 && (t = {});
var i;
if (e instanceof n)
return e;
typeof e == "number" && (e = LC(e)), this.originalInput = e;
var r = RC(e);
this.originalInput = e, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (i = t.format) !== null && i !== void 0 ? i : r.format, this.gradientType = t.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok;
}
return n.prototype.isDark = function() {
return this.getBrightness() < 128;
}, n.prototype.isLight = function() {
return !this.isDark();
}, n.prototype.getBrightness = function() {
var e = this.toRgb();
return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
}, n.prototype.getLuminance = function() {
var e = this.toRgb(), t, i, r, s = e.r / 255, o = e.g / 255, a = e.b / 255;
return s <= 0.03928 ? t = s / 12.92 : t = Math.pow((s + 0.055) / 1.055, 2.4), o <= 0.03928 ? i = o / 12.92 : i = Math.pow((o + 0.055) / 1.055, 2.4), a <= 0.03928 ? r = a / 12.92 : r = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * t + 0.7152 * i + 0.0722 * r;
}, n.prototype.getAlpha = function() {
return this.a;
}, n.prototype.setAlpha = function(e) {
return this.a = Z0(e), this.roundA = Math.round(100 * this.a) / 100, this;
}, n.prototype.isMonochrome = function() {
var e = this.toHsl().s;
return e === 0;
}, n.prototype.toHsv = function() {
var e = Pm(this.r, this.g, this.b);
return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
}, n.prototype.toHsvString = function() {
var e = Pm(this.r, this.g, this.b), t = Math.round(e.h * 360), i = Math.round(e.s * 100), r = Math.round(e.v * 100);
return this.a === 1 ? "hsv(".concat(t, ", ").concat(i, "%, ").concat(r, "%)") : "hsva(".concat(t, ", ").concat(i, "%, ").concat(r, "%, ").concat(this.roundA, ")");
}, n.prototype.toHsl = function() {
var e = Fm(this.r, this.g, this.b);
return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
}, n.prototype.toHslString = function() {
var e = Fm(this.r, this.g, this.b), t = Math.round(e.h * 360), i = Math.round(e.s * 100), r = Math.round(e.l * 100);
return this.a === 1 ? "hsl(".concat(t, ", ").concat(i, "%, ").concat(r, "%)") : "hsla(".concat(t, ", ").concat(i, "%, ").concat(r, "%, ").concat(this.roundA, ")");
}, n.prototype.toHex = function(e) {
return e === void 0 && (e = false), Im(this.r, this.g, this.b, e);
}, n.prototype.toHexString = function(e) {
return e === void 0 && (e = false), "#" + this.toHex(e);
}, n.prototype.toHex8 = function(e) {
return e === void 0 && (e = false), EC(this.r, this.g, this.b, this.a, e);
}, n.prototype.toHex8String = function(e) {
return e === void 0 && (e = false), "#" + this.toHex8(e);
}, n.prototype.toHexShortString = function(e) {
return e === void 0 && (e = false), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
}, n.prototype.toRgb = function() {
return {
r: Math.round(this.r),
g: Math.round(this.g),
b: Math.round(this.b),
a: this.a
};
}, n.prototype.toRgbString = function() {
var e = Math.round(this.r), t = Math.round(this.g), i = Math.round(this.b);
return this.a === 1 ? "rgb(".concat(e, ", ").concat(t, ", ").concat(i, ")") : "rgba(".concat(e, ", ").concat(t, ", ").concat(i, ", ").concat(this.roundA, ")");
}, n.prototype.toPercentageRgb = function() {
var e = function(t) {
return "".concat(Math.round(yn(t, 255) * 100), "%");
};
return {
r: e(this.r),
g: e(this.g),
b: e(this.b),
a: this.a
};
}, n.prototype.toPercentageRgbString = function() {
var e = function(t) {
return Math.round(yn(t, 255) * 100);
};
return this.a === 1 ? "rgb(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%)") : "rgba(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%, ").concat(this.roundA, ")");
}, n.prototype.toName = function() {
if (this.a === 0)
return "transparent";
if (this.a < 1)
return false;
for (var e = "#" + Im(this.r, this.g, this.b, false), t = 0, i = Object.entries(qh); t < i.length; t++) {
var r = i[t], s = r[0], o = r[1];
if (e === o)
return s;
}
return false;
}, n.prototype.toString = function(e) {
var t = !!e;
e = e ?? this.format;
var i = false, r = this.a < 1 && this.a >= 0, s = !t && r && (e.startsWith("hex") || e === "name");
return s ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (i = this.toRgbString()), e === "prgb" && (i = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (i = this.toHexString()), e === "hex3" && (i = this.toHexString(true)), e === "hex4" && (i = this.toHex8String(true)), e === "hex8" && (i = this.toHex8String()), e === "name" && (i = this.toName()), e === "hsl" && (i = this.toHslString()), e === "hsv" && (i = this.toHsvString()), i || this.toHexString());
}, n.prototype.toNumber = function() {
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
}, n.prototype.clone = function() {
return new n(this.toString());
}, n.prototype.lighten = function(e) {
e === void 0 && (e = 10);
var t = this.toHsl();
return t.l += e / 100, t.l = Rl(t.l), new n(t);
}, n.prototype.brighten = function(e) {
e === void 0 && (e = 10);
var t = this.toRgb();
return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(e / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(e / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(e / 100)))), new n(t);
}, n.prototype.darken = function(e) {
e === void 0 && (e = 10);
var t = this.toHsl();
return t.l -= e / 100, t.l = Rl(t.l), new n(t);
}, n.prototype.tint = function(e) {
return e === void 0 && (e = 10), this.mix("white", e);
}, n.prototype.shade = function(e) {
return e === void 0 && (e = 10), this.mix("black", e);
}, n.prototype.desaturate = function(e) {
e === void 0 && (e = 10);
var t = this.toHsl();
return t.s -= e / 100, t.s = Rl(t.s), new n(t);
}, n.prototype.saturate = function(e) {
e === void 0 && (e = 10);
var t = this.toHsl();
return t.s += e / 100, t.s = Rl(t.s), new n(t);
}, n.prototype.greyscale = function() {
return this.desaturate(100);
}, n.prototype.spin = function(e) {
var t = this.toHsl(), i = (t.h + e) % 360;
return t.h = i < 0 ? 360 + i : i, new n(t);
}, n.prototype.mix = function(e, t) {
t === void 0 && (t = 50);
var i = this.toRgb(), r = new n(e).toRgb(), s = t / 100, o = {
r: (r.r - i.r) * s + i.r,
g: (r.g - i.g) * s + i.g,
b: (r.b - i.b) * s + i.b,
a: (r.a - i.a) * s + i.a
};
return new n(o);
}, n.prototype.analogous = function(e, t) {
e === void 0 && (e = 6), t === void 0 && (t = 30);
var i = this.toHsl(), r = 360 / t, s = [this];
for (i.h = (i.h - (r * e >> 1) + 720) % 360; --e; )
i.h = (i.h + r) % 360, s.push(new n(i));
return s;
}, n.prototype.complement = function() {
var e = this.toHsl();
return e.h = (e.h + 180) % 360, new n(e);
}, n.prototype.monochromatic = function(e) {
e === void 0 && (e = 6);
for (var t = this.toHsv(), i = t.h, r = t.s, s = t.v, o = [], a = 1 / e; e--; )
o.push(new n({ h: i, s: r, v: s })), s = (s + a) % 1;
return o;
}, n.prototype.splitcomplement = function() {
var e = this.toHsl(), t = e.h;
return [
this,
new n({ h: (t + 72) % 360, s: e.s, l: e.l }),
new n({ h: (t + 216) % 360, s: e.s, l: e.l })
];
}, n.prototype.onBackground = function(e) {
var t = this.toRgb(), i = new n(e).toRgb(), r = t.a + i.a * (1 - t.a);
return new n({
r: (t.r * t.a + i.r * i.a * (1 - t.a)) / r,
g: (t.g * t.a + i.g * i.a * (1 - t.a)) / r,
b: (t.b * t.a + i.b * i.a * (1 - t.a)) / r,
a: r
});
}, n.prototype.triad = function() {
return this.polyad(3);
}, n.prototype.tetrad = function() {
return this.polyad(4);
}, n.prototype.polyad = function(e) {
for (var t = this.toHsl(), i = t.h, r = [this], s = 360 / e, o = 1; o < e; o++)
r.push(new n({ h: (i + o * s) % 360, s: t.s, l: t.l }));
return r;
}, n.prototype.equals = function(e) {
return this.toRgbString() === new n(e).toRgbString();
}, n;
}()
);
function gr(n, e = 20) {
return n.mix("#141414", e).toString();
}
function DC(n) {
const e = ol(), t = nt("button");
return computed(() => {
let i = {}, r = n.color;
if (r) {
const s = r.match(/var\((.*?)\)/);
s && (r = window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));
const o = new OC(r), a = n.dark ? o.tint(20).toString() : gr(o, 20);
if (n.plain)
i = t.cssVarBlock({
"bg-color": n.dark ? gr(o, 90) : o.tint(90).toString(),
"text-color": r,
"border-color": n.dark ? gr(o, 50) : o.tint(50).toString(),
"hover-text-color": `var(${t.cssVarName("color-white")})`,
"hover-bg-color": r,
"hover-border-color": r,
"active-bg-color": a,
"active-text-color": `var(${t.cssVarName("color-white")})`,
"active-border-color": a
}), e.value && (i[t.cssVarBlockName("disabled-bg-color")] = n.dark ? gr(o, 90) : o.tint(90).toString(), i[t.cssVarBlockName("disabled-text-color")] = n.dark ? gr(o, 50) : o.tint(50).toString(), i[t.cssVarBlockName("disabled-border-color")] = n.dark ? gr(o, 80) : o.tint(80).toString());
else {
const c = n.dark ? gr(o, 30) : o.tint(30).toString(), l = o.isDark() ? `var(${t.cssVarName("color-white")})` : `var(${t.cssVarName("color-black")})`;
if (i = t.cssVarBlock({
"bg-color": r,
"text-color": l,
"border-color": r,
"hover-bg-color": c,
"hover-text-color": l,
"hover-border-color": c,
"active-bg-color": a,
"active-border-color": a
}), e.value) {
const d = n.dark ? gr(o, 50) : o.tint(50).toString();
i[t.cssVarBlockName("disabled-bg-color")] = d, i[t.cssVarBlockName("disabled-text-color")] = n.dark ? "rgba(255, 255, 255, 0.5)" : `var(${t.cssVarName("color-white")})`, i[t.cssVarBlockName("disabled-border-color")] = d;
}
}
}
return i;
});
}
var NC = defineComponent({
name: "ElButton"
});
var BC = defineComponent({
...NC,
props: Kh,
emits: MC,
setup(n, { expose: e, emit: t }) {
const i = n, r = DC(i), s = nt("button"), { _ref: o, _size: a, _type: c, _disabled: l, _props: d, shouldAddSpace: h6, handleClick: f } = yC(i, t), g = computed(() => [
s.b(),
s.m(c.value),
s.m(a.value),
s.is("disabled", l.value),
s.is("loading", i.loading),
s.is("plain", i.plain),
s.is("round", i.round),
s.is("circle", i.circle),
s.is("text", i.text),
s.is("link", i.link),
s.is("has-bg", i.bg)
]);
return e({
ref: o,
size: a,
type: c,
disabled: l,
shouldAddSpace: h6
}), (p, u) => (openBlock(), createBlock(resolveDynamicComponent(p.tag), mergeProps({
ref_key: "_ref",
ref: o
}, unref(d), {
class: unref(g),
style: unref(r),
onClick: unref(f)
}), {
default: withCtx(() => [
p.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
p.$slots.loading ? renderSlot(p.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(It), {
key: 1,
class: normalizeClass(unref(s).is("loading"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(p.loadingIcon)))
]),
_: 1
}, 8, ["class"]))
], 64)) : p.icon || p.$slots.icon ? (openBlock(), createBlock(unref(It), { key: 1 }, {
default: withCtx(() => [
p.icon ? (openBlock(), createBlock(resolveDynamicComponent(p.icon), { key: 0 })) : renderSlot(p.$slots, "icon", { key: 1 })
]),
_: 3
})) : createCommentVNode("v-if", true),
p.$slots.default ? (openBlock(), createElementBlock("span", {
key: 2,
class: normalizeClass({ [unref(s).em("text", "expand")]: unref(h6) })
}, [
renderSlot(p.$slots, "default")
], 2)) : createCommentVNode("v-if", true)
]),
_: 3
}, 16, ["class", "style", "onClick"]));
}
});
var UC = st(BC, [["__file", "button.vue"]]);
var zC = {
size: Kh.size,
type: Kh.type
};
var VC = defineComponent({
name: "ElButtonGroup"
});
var kC = defineComponent({
...VC,
props: zC,
setup(n) {
const e = n;
provide($0, reactive({
size: toRef(e, "size"),
type: toRef(e, "type")
}));
const t = nt("button");
return (i, r) => (openBlock(), createElementBlock("div", {
class: normalizeClass(unref(t).b("group"))
}, [
renderSlot(i.$slots, "default")
], 2));
}
});
var X0 = st(kC, [["__file", "button-group.vue"]]);
var Ko = on(UC, {
ButtonGroup: X0
});
vi(X0);
var Lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function GC(n) {
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
}
function au(n) {
if (n.__esModule) return n;
var e = n.default;
if (typeof e == "function") {
var t = function i() {
return this instanceof i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
};
t.prototype = e.prototype;
} else t = {};
return Object.defineProperty(t, "__esModule", { value: true }), Object.keys(n).forEach(function(i) {
var r = Object.getOwnPropertyDescriptor(n, i);
Object.defineProperty(t, i, r.get ? r : {
enumerable: true,
get: function() {
return n[i];
}
});
}), t;
}
var Er = /* @__PURE__ */ new Map();
if (en) {
let n;
document.addEventListener("mousedown", (e) => n = e), document.addEventListener("mouseup", (e) => {
if (n) {
for (const t of Er.values())
for (const { documentHandler: i } of t)
i(e, n);
n = void 0;
}
});
}
function Dm(n, e) {
let t = [];
return Array.isArray(e.arg) ? t = e.arg : ys(e.arg) && t.push(e.arg), function(i, r) {
const s = e.instance.popperRef, o = i.target, a = r == null ? void 0 : r.target, c = !e || !e.instance, l = !o || !a, d = n.contains(o) || n.contains(a), h6 = n === o, f = t.length && t.some((p) => p == null ? void 0 : p.contains(o)) || t.length && t.includes(a), g = s && (s.contains(o) || s.contains(a));
c || l || d || h6 || f || g || e.value(i, r);
};
}
var HC = {
beforeMount(n, e) {
Er.has(n) || Er.set(n, []), Er.get(n).push({
documentHandler: Dm(n, e),
bindingFn: e.value
});
},
updated(n, e) {
Er.has(n) || Er.set(n, []);
const t = Er.get(n), i = t.findIndex((s) => s.bindingFn === e.oldValue), r = {
documentHandler: Dm(n, e),
bindingFn: e.value
};
i >= 0 ? t.splice(i, 1, r) : t.push(r);
},
unmounted(n) {
Er.delete(n);
}
};
var WC = 100;
var jC = 600;
var Nm = {
beforeMount(n, e) {
const t = e.value, { interval: i = WC, delay: r = jC } = Sn(t) ? {} : t;
let s, o;
const a = () => Sn(t) ? t() : t.handler(), c = () => {
o && (clearTimeout(o), o = void 0), s && (clearInterval(s), s = void 0);
};
n.addEventListener("mousedown", (l) => {
l.button === 0 && (c(), a(), document.addEventListener("mouseup", () => c(), {
once: true
}), o = setTimeout(() => {
s = setInterval(() => {
a();
}, i);
}, r));
});
}
};
var Y0 = at({
modelValue: {
type: [String, Number, Boolean],
default: void 0
},
size: Gr,
disabled: Boolean,
label: {
type: [String, Number, Boolean],
default: void 0
},
value: {
type: [String, Number, Boolean],
default: void 0
},
name: {
type: String,
default: void 0
}
});
var $C = at({
...Y0,
border: Boolean
});
var J0 = {
[At]: (n) => vn(n) || yt(n) || Ba(n),
[ur]: (n) => vn(n) || yt(n) || Ba(n)
};
var K0 = Symbol("radioGroupKey");
var q0 = (n, e) => {
const t = ref(), i = inject(K0, void 0), r = computed(() => !!i), s = computed(() => im(n.value) ? n.label : n.value), o = computed({
get() {
return r.value ? i.modelValue : n.modelValue;
},
set(h6) {
r.value ? i.changeEvent(h6) : e && e(At, h6), t.value.checked = n.modelValue === s.value;
}
}), a = Ns(computed(() => i == null ? void 0 : i.size)), c = ol(computed(() => i == null ? void 0 : i.disabled)), l = ref(false), d = computed(() => c.value || r.value && o.value !== s.value ? -1 : 0);
return p0({
from: "label act as value",
replacement: "value",
version: "3.0.0",
scope: "el-radio",
ref: "https://element-plus.org/en-US/component/radio.html"
}, computed(() => r.value && im(n.value))), {
radioRef: t,
isGroup: r,
radioGroup: i,
focus: l,
size: a,
disabled: c,
tabIndex: d,
modelValue: o,
actualValue: s
};
};
var ZC = defineComponent({
name: "ElRadio"
});
var XC = defineComponent({
...ZC,
props: $C,
emits: J0,
setup(n, { emit: e }) {
const t = n, i = nt("radio"), { radioRef: r, radioGroup: s, focus: o, size: a, disabled: c, modelValue: l, actualValue: d } = q0(t, e);
function h6() {
nextTick(() => e("change", l.value));
}
return (f, g) => {
var p;
return openBlock(), createElementBlock("label", {
class: normalizeClass([
unref(i).b(),
unref(i).is("disabled", unref(c)),
unref(i).is("focus", unref(o)),
unref(i).is("bordered", f.border),
unref(i).is("checked", unref(l) === unref(d)),
unref(i).m(unref(a))
])
}, [
createBaseVNode("span", {
class: normalizeClass([
unref(i).e("input"),
unref(i).is("disabled", unref(c)),
unref(i).is("checked", unref(l) === unref(d))
])
}, [
withDirectives(createBaseVNode("input", {
ref_key: "radioRef",
ref: r,
"onUpdate:modelValue": (u) => isRef(l) ? l.value = u : null,
class: normalizeClass(unref(i).e("original")),
value: unref(d),
name: f.name || ((p = unref(s)) == null ? void 0 : p.name),
disabled: unref(c),
checked: unref(l) === unref(d),
type: "radio",
onFocus: (u) => o.value = true,
onBlur: (u) => o.value = false,
onChange: h6,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
[vModelRadio, unref(l)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(i).e("inner"))
}, null, 2)
], 2),
createBaseVNode("span", {
class: normalizeClass(unref(i).e("label")),
onKeydown: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(f.$slots, "default", {}, () => [
createTextVNode(toDisplayString(f.label), 1)
])
], 42, ["onKeydown"])
], 2);
};
}
});
var YC = st(XC, [["__file", "radio.vue"]]);
var JC = at({
...Y0
});
var KC = defineComponent({
name: "ElRadioButton"
});
var qC = defineComponent({
...KC,
props: JC,
setup(n) {
const e = n, t = nt("radio"), { radioRef: i, focus: r, size: s, disabled: o, modelValue: a, radioGroup: c, actualValue: l } = q0(e), d = computed(() => ({
backgroundColor: (c == null ? void 0 : c.fill) || "",
borderColor: (c == null ? void 0 : c.fill) || "",
boxShadow: c != null && c.fill ? `-1px 0 0 0 ${c.fill}` : "",
color: (c == null ? void 0 : c.textColor) || ""
}));
return (h6, f) => {
var g;
return openBlock(), createElementBlock("label", {
class: normalizeClass([
unref(t).b("button"),
unref(t).is("active", unref(a) === unref(l)),
unref(t).is("disabled", unref(o)),
unref(t).is("focus", unref(r)),
unref(t).bm("button", unref(s))
])
}, [
withDirectives(createBaseVNode("input", {
ref_key: "radioRef",
ref: i,
"onUpdate:modelValue": (p) => isRef(a) ? a.value = p : null,
class: normalizeClass(unref(t).be("button", "original-radio")),
value: unref(l),
type: "radio",
name: h6.name || ((g = unref(c)) == null ? void 0 : g.name),
disabled: unref(o),
onFocus: (p) => r.value = true,
onBlur: (p) => r.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
[vModelRadio, unref(a)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(t).be("button", "inner")),
style: normalizeStyle(unref(a) === unref(l) ? unref(d) : {}),
onKeydown: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(h6.$slots, "default", {}, () => [
createTextVNode(toDisplayString(h6.label), 1)
])
], 46, ["onKeydown"])
], 2);
};
}
});
var Q0 = st(qC, [["__file", "radio-button.vue"]]);
var QC = at({
id: {
type: String,
default: void 0
},
size: Gr,
disabled: Boolean,
modelValue: {
type: [String, Number, Boolean],
default: void 0
},
fill: {
type: String,
default: ""
},
textColor: {
type: String,
default: ""
},
name: {
type: String,
default: void 0
},
validateEvent: {
type: Boolean,
default: true
},
...Yr(["ariaLabel"])
});
var eL = J0;
var tL = defineComponent({
name: "ElRadioGroup"
});
var nL = defineComponent({
...tL,
props: QC,
emits: eL,
setup(n, { emit: e }) {
const t = n, i = nt("radio"), r = sl(), s = ref(), { formItem: o } = Jo(), { inputId: a, isLabeledByFormItem: c } = su(t, {
formItemContext: o
}), l = (h6) => {
e(At, h6), nextTick(() => e("change", h6));
};
onMounted(() => {
const h6 = s.value.querySelectorAll("[type=radio]"), f = h6[0];
!Array.from(h6).some((g) => g.checked) && f && (f.tabIndex = 0);
});
const d = computed(() => t.name || r.value);
return provide(K0, reactive({
...toRefs(t),
changeEvent: l,
name: d
})), watch(() => t.modelValue, () => {
t.validateEvent && (o == null || o.validate("change").catch((h6) => Vt(h6)));
}), (h6, f) => (openBlock(), createElementBlock("div", {
id: unref(a),
ref_key: "radioGroupRef",
ref: s,
class: normalizeClass(unref(i).b("group")),
role: "radiogroup",
"aria-label": unref(c) ? void 0 : h6.ariaLabel || "radio-group",
"aria-labelledby": unref(c) ? unref(o).labelId : void 0
}, [
renderSlot(h6.$slots, "default")
], 10, ["id", "aria-label", "aria-labelledby"]));
}
});
var ey = st(nL, [["__file", "radio-group.vue"]]);
var ty = on(YC, {
RadioButton: Q0,
RadioGroup: ey
});
var ny = vi(ey);
vi(Q0);
var Qh = at({
type: {
type: String,
values: ["primary", "success", "info", "warning", "danger"],
default: "primary"
},
closable: Boolean,
disableTransitions: Boolean,
hit: Boolean,
color: String,
size: {
type: String,
values: f0
},
effect: {
type: String,
values: ["dark", "light", "plain"],
default: "light"
},
round: Boolean
});
var iL = {
close: (n) => n instanceof MouseEvent,
click: (n) => n instanceof MouseEvent
};
var rL = defineComponent({
name: "ElTag"
});
var sL = defineComponent({
...rL,
props: Qh,
emits: iL,
setup(n, { emit: e }) {
const t = n, i = Ns(), r = nt("tag"), s = computed(() => {
const { type: l, hit: d, effect: h6, closable: f, round: g } = t;
return [
r.b(),
r.is("closable", f),
r.m(l || "primary"),
r.m(i.value),
r.m(h6),
r.is("hit", d),
r.is("round", g)
];
}), o = (l) => {
e("close", l);
}, a = (l) => {
e("click", l);
}, c = (l) => {
l.component.subTree.component.bum = null;
};
return (l, d) => l.disableTransitions ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(s)),
style: normalizeStyle({ backgroundColor: l.color }),
onClick: a
}, [
createBaseVNode("span", {
class: normalizeClass(unref(r).e("content"))
}, [
renderSlot(l.$slots, "default")
], 2),
l.closable ? (openBlock(), createBlock(unref(It), {
key: 0,
class: normalizeClass(unref(r).e("close")),
onClick: withModifiers(o, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(Zh))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 6)) : (openBlock(), createBlock(Transition, {
key: 1,
name: `${unref(r).namespace.value}-zoom-in-center`,
appear: "",
onVnodeMounted: c
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(unref(s)),
style: normalizeStyle({ backgroundColor: l.color }),
onClick: a
}, [
createBaseVNode("span", {
class: normalizeClass(unref(r).e("content"))
}, [
renderSlot(l.$slots, "default")
], 2),
l.closable ? (openBlock(), createBlock(unref(It), {
key: 0,
class: normalizeClass(unref(r).e("close")),
onClick: withModifiers(o, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(Zh))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 6)
]),
_: 3
}, 8, ["name"]));
}
});
var oL = st(sL, [["__file", "tag.vue"]]);
var aL = on(oL);
var iy = Symbol("rowContextKey");
var lL = [
"start",
"center",
"end",
"space-around",
"space-between",
"space-evenly"
];
var cL = ["top", "middle", "bottom"];
var uL = at({
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: lL,
default: "start"
},
align: {
type: String,
values: cL
}
});
var hL = defineComponent({
name: "ElRow"
});
var dL = defineComponent({
...hL,
props: uL,
setup(n) {
const e = n, t = nt("row"), i = computed(() => e.gutter);
provide(iy, {
gutter: i
});
const r = computed(() => {
const o = {};
return e.gutter && (o.marginRight = o.marginLeft = `-${e.gutter / 2}px`), o;
}), s = computed(() => [
t.b(),
t.is(`justify-${e.justify}`, e.justify !== "start"),
t.is(`align-${e.align}`, !!e.align)
]);
return (o, a) => (openBlock(), createBlock(resolveDynamicComponent(o.tag), {
class: normalizeClass(unref(s)),
style: normalizeStyle(unref(r))
}, {
default: withCtx(() => [
renderSlot(o.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var fL = st(dL, [["__file", "row.vue"]]);
var Ui = on(fL);
var pL = at({
tag: {
type: String,
default: "div"
},
span: {
type: Number,
default: 24
},
offset: {
type: Number,
default: 0
},
pull: {
type: Number,
default: 0
},
push: {
type: Number,
default: 0
},
xs: {
type: Je([Number, Object]),
default: () => Ki({})
},
sm: {
type: Je([Number, Object]),
default: () => Ki({})
},
md: {
type: Je([Number, Object]),
default: () => Ki({})
},
lg: {
type: Je([Number, Object]),
default: () => Ki({})
},
xl: {
type: Je([Number, Object]),
default: () => Ki({})
}
});
var mL = defineComponent({
name: "ElCol"
});
var gL = defineComponent({
...mL,
props: pL,
setup(n) {
const e = n, { gutter: t } = inject(iy, { gutter: computed(() => 0) }), i = nt("col"), r = computed(() => {
const o = {};
return t.value && (o.paddingLeft = o.paddingRight = `${t.value / 2}px`), o;
}), s = computed(() => {
const o = [];
return ["span", "offset", "pull", "push"].forEach((l) => {
const d = e[l];
yt(d) && (l === "span" ? o.push(i.b(`${e[l]}`)) : d > 0 && o.push(i.b(`${l}-${e[l]}`)));
}), ["xs", "sm", "md", "lg", "xl"].forEach((l) => {
yt(e[l]) ? o.push(i.b(`${l}-${e[l]}`)) : Tn(e[l]) && Object.entries(e[l]).forEach(([d, h6]) => {
o.push(d !== "span" ? i.b(`${l}-${d}-${h6}`) : i.b(`${l}-${h6}`));
});
}), t.value && o.push(i.is("guttered")), [i.b(), o];
});
return (o, a) => (openBlock(), createBlock(resolveDynamicComponent(o.tag), {
class: normalizeClass(unref(s)),
style: normalizeStyle(unref(r))
}, {
default: withCtx(() => [
renderSlot(o.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var vL = st(gL, [["__file", "col.vue"]]);
var bi = on(vL);
var Bm = (n) => yt(n) || vn(n) || Pn(n);
var yL = at({
accordion: Boolean,
modelValue: {
type: Je([Array, String, Number]),
default: () => Ki([])
}
});
var bL = {
[At]: Bm,
[ur]: Bm
};
var ry = Symbol("collapseContextKey");
var xL = (n, e) => {
const t = ref(Si(n.modelValue)), i = (s) => {
t.value = s;
const o = n.accordion ? t.value[0] : t.value;
e(At, o), e(ur, o);
}, r = (s) => {
if (n.accordion)
i([t.value[0] === s ? "" : s]);
else {
const o = [...t.value], a = o.indexOf(s);
a > -1 ? o.splice(a, 1) : o.push(s), i(o);
}
};
return watch(() => n.modelValue, () => t.value = Si(n.modelValue), { deep: true }), provide(ry, {
activeNames: t,
handleItemClick: r
}), {
activeNames: t,
setActiveNames: i
};
};
var ML = () => {
const n = nt("collapse");
return {
rootKls: computed(() => n.b())
};
};
var wL = defineComponent({
name: "ElCollapse"
});
var AL = defineComponent({
...wL,
props: yL,
emits: bL,
setup(n, { expose: e, emit: t }) {
const i = n, { activeNames: r, setActiveNames: s } = xL(i, t), { rootKls: o } = ML();
return e({
activeNames: r,
setActiveNames: s
}), (a, c) => (openBlock(), createElementBlock("div", {
class: normalizeClass(unref(o))
}, [
renderSlot(a.$slots, "default")
], 2));
}
});
var SL = st(AL, [["__file", "collapse.vue"]]);
var _L = defineComponent({
name: "ElCollapseTransition"
});
var TL = defineComponent({
..._L,
setup(n) {
const e = nt("collapse-transition"), t = (r) => {
r.style.maxHeight = "", r.style.overflow = r.dataset.oldOverflow, r.style.paddingTop = r.dataset.oldPaddingTop, r.style.paddingBottom = r.dataset.oldPaddingBottom;
}, i = {
beforeEnter(r) {
r.dataset || (r.dataset = {}), r.dataset.oldPaddingTop = r.style.paddingTop, r.dataset.oldPaddingBottom = r.style.paddingBottom, r.style.height && (r.dataset.elExistsHeight = r.style.height), r.style.maxHeight = 0, r.style.paddingTop = 0, r.style.paddingBottom = 0;
},
enter(r) {
requestAnimationFrame(() => {
r.dataset.oldOverflow = r.style.overflow, r.dataset.elExistsHeight ? r.style.maxHeight = r.dataset.elExistsHeight : r.scrollHeight !== 0 ? r.style.maxHeight = `${r.scrollHeight}px` : r.style.maxHeight = 0, r.style.paddingTop = r.dataset.oldPaddingTop, r.style.paddingBottom = r.dataset.oldPaddingBottom, r.style.overflow = "hidden";
});
},
afterEnter(r) {
r.style.maxHeight = "", r.style.overflow = r.dataset.oldOverflow;
},
enterCancelled(r) {
t(r);
},
beforeLeave(r) {
r.dataset || (r.dataset = {}), r.dataset.oldPaddingTop = r.style.paddingTop, r.dataset.oldPaddingBottom = r.style.paddingBottom, r.dataset.oldOverflow = r.style.overflow, r.style.maxHeight = `${r.scrollHeight}px`, r.style.overflow = "hidden";
},
leave(r) {
r.scrollHeight !== 0 && (r.style.maxHeight = 0, r.style.paddingTop = 0, r.style.paddingBottom = 0);
},
afterLeave(r) {
t(r);
},
leaveCancelled(r) {
t(r);
}
};
return (r, s) => (openBlock(), createBlock(Transition, mergeProps({
name: unref(e).b()
}, toHandlers(i)), {
default: withCtx(() => [
renderSlot(r.$slots, "default")
]),
_: 3
}, 16, ["name"]));
}
});
var EL = st(TL, [["__file", "collapse-transition.vue"]]);
var CL = on(EL);
var LL = at({
title: {
type: String,
default: ""
},
name: {
type: Je([String, Number]),
default: void 0
},
icon: {
type: kr,
default: Vr
},
disabled: Boolean
});
var RL = (n) => {
const e = inject(ry), { namespace: t } = nt("collapse"), i = ref(false), r = ref(false), s = of(), o = computed(() => s.current++), a = computed(() => {
var f;
return (f = n.name) != null ? f : `${t.value}-id-${s.prefix}-${unref(o)}`;
}), c = computed(() => e == null ? void 0 : e.activeNames.value.includes(unref(a)));
return {
focusing: i,
id: o,
isActive: c,
handleFocus: () => {
setTimeout(() => {
r.value ? r.value = false : i.value = true;
}, 50);
},
handleHeaderClick: () => {
n.disabled || (e == null || e.handleItemClick(unref(a)), i.value = false, r.value = true);
},
handleEnterClick: () => {
e == null || e.handleItemClick(unref(a));
}
};
};
var FL = (n, { focusing: e, isActive: t, id: i }) => {
const r = nt("collapse"), s = computed(() => [
r.b("item"),
r.is("active", unref(t)),
r.is("disabled", n.disabled)
]), o = computed(() => [
r.be("item", "header"),
r.is("active", unref(t)),
{ focusing: unref(e) && !n.disabled }
]), a = computed(() => [
r.be("item", "arrow"),
r.is("active", unref(t))
]), c = computed(() => r.be("item", "wrap")), l = computed(() => r.be("item", "content")), d = computed(() => r.b(`content-${unref(i)}`)), h6 = computed(() => r.b(`head-${unref(i)}`));
return {
arrowKls: a,
headKls: o,
rootKls: s,
itemWrapperKls: c,
itemContentKls: l,
scopedContentId: d,
scopedHeadId: h6
};
};
var PL = defineComponent({
name: "ElCollapseItem"
});
var IL = defineComponent({
...PL,
props: LL,
setup(n, { expose: e }) {
const t = n, {
focusing: i,
id: r,
isActive: s,
handleFocus: o,
handleHeaderClick: a,
handleEnterClick: c
} = RL(t), {
arrowKls: l,
headKls: d,
rootKls: h6,
itemWrapperKls: f,
itemContentKls: g,
scopedContentId: p,
scopedHeadId: u
} = FL(t, { focusing: i, isActive: s, id: r });
return e({
isActive: s
}), (y, v) => (openBlock(), createElementBlock("div", {
class: normalizeClass(unref(h6))
}, [
createBaseVNode("button", {
id: unref(u),
class: normalizeClass(unref(d)),
"aria-expanded": unref(s),
"aria-controls": unref(p),
"aria-describedby": unref(p),
tabindex: y.disabled ? -1 : 0,
type: "button",
onClick: unref(a),
onKeydown: withKeys(withModifiers(unref(c), ["stop", "prevent"]), ["space", "enter"]),
onFocus: unref(o),
onBlur: (m) => i.value = false
}, [
renderSlot(y.$slots, "title", {}, () => [
createTextVNode(toDisplayString(y.title), 1)
]),
renderSlot(y.$slots, "icon", { isActive: unref(s) }, () => [
createVNode(unref(It), {
class: normalizeClass(unref(l))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(y.icon)))
]),
_: 1
}, 8, ["class"])
])
], 42, ["id", "aria-expanded", "aria-controls", "aria-describedby", "tabindex", "onClick", "onKeydown", "onFocus", "onBlur"]),
createVNode(unref(CL), null, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
id: unref(p),
role: "region",
class: normalizeClass(unref(f)),
"aria-hidden": !unref(s),
"aria-labelledby": unref(u)
}, [
createBaseVNode("div", {
class: normalizeClass(unref(g))
}, [
renderSlot(y.$slots, "default")
], 2)
], 10, ["id", "aria-hidden", "aria-labelledby"]), [
[vShow, unref(s)]
])
]),
_: 3
})
], 2));
}
});
var sy = st(IL, [["__file", "collapse-item.vue"]]);
var oy = on(SL, {
CollapseItem: sy
});
var ay = vi(sy);
var OL = defineComponent({
name: "ElContainer"
});
var DL = defineComponent({
...OL,
props: {
direction: {
type: String
}
},
setup(n) {
const e = n, t = useSlots(), i = nt("container"), r = computed(() => e.direction === "vertical" ? true : e.direction === "horizontal" ? false : t && t.default ? t.default().some((o) => {
const a = o.type.name;
return a === "ElHeader" || a === "ElFooter";
}) : false);
return (s, o) => (openBlock(), createElementBlock("section", {
class: normalizeClass([unref(i).b(), unref(i).is("vertical", unref(r))])
}, [
renderSlot(s.$slots, "default")
], 2));
}
});
var NL = st(DL, [["__file", "container.vue"]]);
var BL = defineComponent({
name: "ElAside"
});
var UL = defineComponent({
...BL,
props: {
width: {
type: String,
default: null
}
},
setup(n) {
const e = n, t = nt("aside"), i = computed(() => e.width ? t.cssVarBlock({ width: e.width }) : {});
return (r, s) => (openBlock(), createElementBlock("aside", {
class: normalizeClass(unref(t).b()),
style: normalizeStyle(unref(i))
}, [
renderSlot(r.$slots, "default")
], 6));
}
});
var ly = st(UL, [["__file", "aside.vue"]]);
var zL = defineComponent({
name: "ElFooter"
});
var VL = defineComponent({
...zL,
props: {
height: {
type: String,
default: null
}
},
setup(n) {
const e = n, t = nt("footer"), i = computed(() => e.height ? t.cssVarBlock({ height: e.height }) : {});
return (r, s) => (openBlock(), createElementBlock("footer", {
class: normalizeClass(unref(t).b()),
style: normalizeStyle(unref(i))
}, [
renderSlot(r.$slots, "default")
], 6));
}
});
var cy = st(VL, [["__file", "footer.vue"]]);
var kL = defineComponent({
name: "ElHeader"
});
var GL = defineComponent({
...kL,
props: {
height: {
type: String,
default: null
}
},
setup(n) {
const e = n, t = nt("header"), i = computed(() => e.height ? t.cssVarBlock({
height: e.height
}) : {});
return (r, s) => (openBlock(), createElementBlock("header", {
class: normalizeClass(unref(t).b()),
style: normalizeStyle(unref(i))
}, [
renderSlot(r.$slots, "default")
], 6));
}
});
var uy = st(GL, [["__file", "header.vue"]]);
var HL = defineComponent({
name: "ElMain"
});
var WL = defineComponent({
...HL,
setup(n) {
const e = nt("main");
return (t, i) => (openBlock(), createElementBlock("main", {
class: normalizeClass(unref(e).b())
}, [
renderSlot(t.$slots, "default")
], 2));
}
});
var hy = st(WL, [["__file", "main.vue"]]);
var zi = on(NL, {
Aside: ly,
Footer: cy,
Header: uy,
Main: hy
});
vi(ly);
var dy = vi(cy);
var jL = vi(uy);
var hr = vi(hy);
var $L = defineComponent({
inheritAttrs: false
});
function ZL(n, e, t, i, r, s) {
return renderSlot(n.$slots, "default");
}
var XL = st($L, [["render", ZL], ["__file", "collection.vue"]]);
var YL = defineComponent({
name: "ElCollectionItem",
inheritAttrs: false
});
function JL(n, e, t, i, r, s) {
return renderSlot(n.$slots, "default");
}
var KL = st(YL, [["render", JL], ["__file", "collection-item.vue"]]);
var qL = "data-el-collection-item";
var QL = (n) => {
const e = `El${n}Collection`, t = `${e}Item`, i = Symbol(e), r = Symbol(t), s = {
...XL,
name: e,
setup() {
const a = ref(null), c = /* @__PURE__ */ new Map();
provide(i, {
itemMap: c,
getItems: () => {
const d = unref(a);
if (!d)
return [];
const h6 = Array.from(d.querySelectorAll(`[${qL}]`));
return [...c.values()].sort((g, p) => h6.indexOf(g.ref) - h6.indexOf(p.ref));
},
collectionRef: a
});
}
}, o = {
...KL,
name: t,
setup(a, { attrs: c }) {
const l = ref(null), d = inject(i, void 0);
provide(r, {
collectionItemRef: l
}), onMounted(() => {
const h6 = unref(l);
h6 && d.itemMap.set(h6, {
ref: h6,
...c
});
}), onBeforeUnmount(() => {
const h6 = unref(l);
d.itemMap.delete(h6);
});
}
};
return {
COLLECTION_INJECTION_KEY: i,
COLLECTION_ITEM_INJECTION_KEY: r,
ElCollection: s,
ElCollectionItem: o
};
};
var Hu = at({
trigger: Va.trigger,
effect: {
...Vn.effect,
default: "light"
},
type: {
type: Je(String)
},
placement: {
type: Je(String),
default: "bottom"
},
popperOptions: {
type: Je(Object),
default: () => ({})
},
id: String,
size: {
type: String,
default: ""
},
splitButton: Boolean,
hideOnClick: {
type: Boolean,
default: true
},
loop: {
type: Boolean,
default: true
},
showTimeout: {
type: Number,
default: 150
},
hideTimeout: {
type: Number,
default: 150
},
tabindex: {
type: Je([Number, String]),
default: 0
},
maxHeight: {
type: Je([Number, String]),
default: ""
},
popperClass: {
type: String,
default: ""
},
disabled: Boolean,
role: {
type: String,
default: "menu"
},
buttonProps: {
type: Je(Object)
},
teleported: Vn.teleported
});
at({
command: {
type: [Object, String, Number],
default: () => ({})
},
disabled: Boolean,
divided: Boolean,
textValue: String,
icon: {
type: kr
}
});
at({
onKeydown: { type: Je(Function) }
});
QL("Dropdown");
var eR = at({
id: {
type: String,
default: void 0
},
step: {
type: Number,
default: 1
},
stepStrictly: Boolean,
max: {
type: Number,
default: Number.POSITIVE_INFINITY
},
min: {
type: Number,
default: Number.NEGATIVE_INFINITY
},
modelValue: Number,
readonly: Boolean,
disabled: Boolean,
size: Gr,
controls: {
type: Boolean,
default: true
},
controlsPosition: {
type: String,
default: "",
values: ["", "right"]
},
valueOnClear: {
type: [String, Number, null],
validator: (n) => n === null || yt(n) || ["min", "max"].includes(n),
default: null
},
name: String,
placeholder: String,
precision: {
type: Number,
validator: (n) => n >= 0 && n === Number.parseInt(`${n}`, 10)
},
validateEvent: {
type: Boolean,
default: true
},
...Yr(["ariaLabel"])
});
var tR = {
[ur]: (n, e) => e !== n,
blur: (n) => n instanceof FocusEvent,
focus: (n) => n instanceof FocusEvent,
[bs]: (n) => yt(n) || Ci(n),
[At]: (n) => yt(n) || Ci(n)
};
var nR = defineComponent({
name: "ElInputNumber"
});
var iR = defineComponent({
...nR,
props: eR,
emits: tR,
setup(n, { expose: e, emit: t }) {
const i = n, { t: r } = iu(), s = nt("input-number"), o = ref(), a = reactive({
currentValue: i.modelValue,
userInput: null
}), { formItem: c } = Jo(), l = computed(() => yt(i.modelValue) && i.modelValue <= i.min), d = computed(() => yt(i.modelValue) && i.modelValue >= i.max), h6 = computed(() => {
const P = v(i.step);
return di(i.precision) ? Math.max(v(i.modelValue), P) : (P > i.precision && Vt("InputNumber", "precision should not be less than the decimal places of step"), i.precision);
}), f = computed(() => i.controls && i.controlsPosition === "right"), g = Ns(), p = ol(), u = computed(() => {
if (a.userInput !== null)
return a.userInput;
let P = a.currentValue;
if (Ci(P))
return "";
if (yt(P)) {
if (Number.isNaN(P))
return "";
di(i.precision) || (P = P.toFixed(i.precision));
}
return P;
}), y = (P, b) => {
if (di(b) && (b = h6.value), b === 0)
return Math.round(P);
let F = String(P);
const D = F.indexOf(".");
if (D === -1 || !F.replace(".", "").split("")[D + b])
return P;
const U = F.length;
return F.charAt(U - 1) === "5" && (F = `${F.slice(0, Math.max(0, U - 1))}6`), Number.parseFloat(Number(F).toFixed(b));
}, v = (P) => {
if (Ci(P))
return 0;
const b = P.toString(), F = b.indexOf(".");
let D = 0;
return F !== -1 && (D = b.length - F - 1), D;
}, m = (P, b = 1) => yt(P) ? y(P + i.step * b) : a.currentValue, x = () => {
if (i.readonly || p.value || d.value)
return;
const P = Number(u.value) || 0, b = m(P);
M(b), t(bs, a.currentValue), E();
}, w = () => {
if (i.readonly || p.value || l.value)
return;
const P = Number(u.value) || 0, b = m(P, -1);
M(b), t(bs, a.currentValue), E();
}, A = (P, b) => {
const { max: F, min: D, step: N, precision: B, stepStrictly: U, valueOnClear: G } = i;
F < D && Xo("InputNumber", "min should not be greater than max.");
let Y = Number(P);
if (Ci(P) || Number.isNaN(Y))
return null;
if (P === "") {
if (G === null)
return null;
Y = vn(G) ? { min: D, max: F }[G] : G;
}
return U && (Y = y(Math.round(Y / N) * N, B), Y !== P && b && t(At, Y)), di(B) || (Y = y(Y, B)), (Y > F || Y < D) && (Y = Y > F ? F : D, b && t(At, Y)), Y;
}, M = (P, b = true) => {
var F;
const D = a.currentValue, N = A(P);
if (!b) {
t(At, N);
return;
}
D === N && P || (a.userInput = null, t(At, N), D !== N && t(ur, N, D), i.validateEvent && ((F = c == null ? void 0 : c.validate) == null || F.call(c, "change").catch((B) => Vt(B))), a.currentValue = N);
}, R = (P) => {
a.userInput = P;
const b = P === "" ? null : Number(P);
t(bs, b), M(b, false);
}, L = (P) => {
const b = P !== "" ? Number(P) : "";
(yt(b) && !Number.isNaN(b) || P === "") && M(b), E(), a.userInput = null;
}, S = () => {
var P, b;
(b = (P = o.value) == null ? void 0 : P.focus) == null || b.call(P);
}, I = () => {
var P, b;
(b = (P = o.value) == null ? void 0 : P.blur) == null || b.call(P);
}, T = (P) => {
t("focus", P);
}, _ = (P) => {
var b;
a.userInput = null, t("blur", P), i.validateEvent && ((b = c == null ? void 0 : c.validate) == null || b.call(c, "blur").catch((F) => Vt(F)));
}, E = () => {
a.currentValue !== i.modelValue && (a.currentValue = i.modelValue);
}, C = (P) => {
document.activeElement === P.target && P.preventDefault();
};
return watch(() => i.modelValue, (P, b) => {
const F = A(P, true);
a.userInput === null && F !== b && (a.currentValue = F);
}, { immediate: true }), onMounted(() => {
var P;
const { min: b, max: F, modelValue: D } = i, N = (P = o.value) == null ? void 0 : P.input;
if (N.setAttribute("role", "spinbutton"), Number.isFinite(F) ? N.setAttribute("aria-valuemax", String(F)) : N.removeAttribute("aria-valuemax"), Number.isFinite(b) ? N.setAttribute("aria-valuemin", String(b)) : N.removeAttribute("aria-valuemin"), N.setAttribute("aria-valuenow", a.currentValue || a.currentValue === 0 ? String(a.currentValue) : ""), N.setAttribute("aria-disabled", String(p.value)), !yt(D) && D != null) {
let B = Number(D);
Number.isNaN(B) && (B = null), t(At, B);
}
N.addEventListener("wheel", C, { passive: false });
}), onUpdated(() => {
var P, b;
const F = (P = o.value) == null ? void 0 : P.input;
F == null || F.setAttribute("aria-valuenow", `${(b = a.currentValue) != null ? b : ""}`);
}), e({
focus: S,
blur: I
}), (P, b) => (openBlock(), createElementBlock("div", {
class: normalizeClass([
unref(s).b(),
unref(s).m(unref(g)),
unref(s).is("disabled", unref(p)),
unref(s).is("without-controls", !P.controls),
unref(s).is("controls-right", unref(f))
]),
onDragstart: withModifiers(() => {
}, ["prevent"])
}, [
P.controls ? withDirectives((openBlock(), createElementBlock("span", {
key: 0,
role: "button",
"aria-label": unref(r)("el.inputNumber.decrease"),
class: normalizeClass([unref(s).e("decrease"), unref(s).is("disabled", unref(l))]),
onKeydown: withKeys(w, ["enter"])
}, [
renderSlot(P.$slots, "decrease-icon", {}, () => [
createVNode(unref(It), null, {
default: withCtx(() => [
unref(f) ? (openBlock(), createBlock(unref(Xd), { key: 0 })) : (openBlock(), createBlock(unref(K_), { key: 1 }))
]),
_: 1
})
])
], 42, ["aria-label", "onKeydown"])), [
[unref(Nm), w]
]) : createCommentVNode("v-if", true),
P.controls ? withDirectives((openBlock(), createElementBlock("span", {
key: 1,
role: "button",
"aria-label": unref(r)("el.inputNumber.increase"),
class: normalizeClass([unref(s).e("increase"), unref(s).is("disabled", unref(d))]),
onKeydown: withKeys(x, ["enter"])
}, [
renderSlot(P.$slots, "increase-icon", {}, () => [
createVNode(unref(It), null, {
default: withCtx(() => [
unref(f) ? (openBlock(), createBlock(unref(k_), { key: 0 })) : (openBlock(), createBlock(unref(tu), { key: 1 }))
]),
_: 1
})
])
], 42, ["aria-label", "onKeydown"])), [
[unref(Nm), x]
]) : createCommentVNode("v-if", true),
createVNode(unref(QE), {
id: P.id,
ref_key: "input",
ref: o,
type: "number",
step: P.step,
"model-value": unref(u),
placeholder: P.placeholder,
readonly: P.readonly,
disabled: unref(p),
size: unref(g),
max: P.max,
min: P.min,
name: P.name,
"aria-label": P.ariaLabel,
"validate-event": false,
onKeydown: [
withKeys(withModifiers(x, ["prevent"]), ["up"]),
withKeys(withModifiers(w, ["prevent"]), ["down"])
],
onBlur: _,
onFocus: T,
onInput: R,
onChange: L
}, createSlots({ _: 2 }, [
P.$slots.prefix ? {
name: "prefix",
fn: withCtx(() => [
renderSlot(P.$slots, "prefix")
])
} : void 0,
P.$slots.suffix ? {
name: "suffix",
fn: withCtx(() => [
renderSlot(P.$slots, "suffix")
])
} : void 0
]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "onKeydown"])
], 42, ["onDragstart"]));
}
});
var rR = st(iR, [["__file", "input-number.vue"]]);
var dr = on(rR);
var fy = Symbol("ElSelectGroup");
var lu = Symbol("ElSelect");
function sR(n, e) {
const t = inject(lu), i = inject(fy, { disabled: false }), r = computed(() => d(Si(t.props.modelValue), n.value)), s = computed(() => {
var g;
if (t.props.multiple) {
const p = Si((g = t.props.modelValue) != null ? g : []);
return !r.value && p.length >= t.props.multipleLimit && t.props.multipleLimit > 0;
} else
return false;
}), o = computed(() => n.label || (Tn(n.value) ? "" : n.value)), a = computed(() => n.value || n.label || ""), c = computed(() => n.disabled || e.groupDisabled || s.value), l = getCurrentInstance(), d = (g = [], p) => {
if (Tn(n.value)) {
const u = t.props.valueKey;
return g && g.some((y) => toRaw(Ji(y, u)) === Ji(p, u));
} else
return g && g.includes(p);
}, h6 = () => {
!n.disabled && !i.disabled && (t.states.hoveringIndex = t.optionsArray.indexOf(l.proxy));
}, f = (g) => {
const p = new RegExp(O_(g), "i");
e.visible = p.test(o.value) || n.created;
};
return watch(() => o.value, () => {
!n.created && !t.props.remote && t.setSelected();
}), watch(() => n.value, (g, p) => {
const { remote: u, valueKey: y } = t.props;
if (g !== p && (t.onOptionDestroy(p, l.proxy), t.onOptionCreate(l.proxy)), !n.created && !u) {
if (y && Tn(g) && Tn(p) && g[y] === p[y])
return;
t.setSelected();
}
}), watch(() => i.disabled, () => {
e.groupDisabled = i.disabled;
}, { immediate: true }), {
select: t,
currentLabel: o,
currentValue: a,
itemSelected: r,
isDisabled: c,
hoverItem: h6,
updateOption: f
};
}
var oR = defineComponent({
name: "ElOption",
componentName: "ElOption",
props: {
value: {
required: true,
type: [String, Number, Boolean, Object]
},
label: [String, Number],
created: Boolean,
disabled: Boolean
},
setup(n) {
const e = nt("select"), t = sl(), i = computed(() => [
e.be("dropdown", "item"),
e.is("disabled", unref(a)),
e.is("selected", unref(o)),
e.is("hovering", unref(f))
]), r = reactive({
index: -1,
groupDisabled: false,
visible: true,
hover: false
}), {
currentLabel: s,
itemSelected: o,
isDisabled: a,
select: c,
hoverItem: l,
updateOption: d
} = sR(n, r), { visible: h6, hover: f } = toRefs(r), g = getCurrentInstance().proxy;
c.onOptionCreate(g), onBeforeUnmount(() => {
const u = g.value, { selected: y } = c.states, m = (c.props.multiple ? y : [y]).some((x) => x.value === g.value);
nextTick(() => {
c.states.cachedOptions.get(u) === g && !m && c.states.cachedOptions.delete(u);
}), c.onOptionDestroy(u, g);
});
function p() {
a.value || c.handleOptionSelect(g);
}
return {
ns: e,
id: t,
containerKls: i,
currentLabel: s,
itemSelected: o,
isDisabled: a,
select: c,
hoverItem: l,
updateOption: d,
visible: h6,
hover: f,
selectOptionClick: p,
states: r
};
}
});
function aR(n, e, t, i, r, s) {
return withDirectives((openBlock(), createElementBlock("li", {
id: n.id,
class: normalizeClass(n.containerKls),
role: "option",
"aria-disabled": n.isDisabled || void 0,
"aria-selected": n.itemSelected,
onMouseenter: n.hoverItem,
onClick: withModifiers(n.selectOptionClick, ["stop"])
}, [
renderSlot(n.$slots, "default", {}, () => [
createBaseVNode("span", null, toDisplayString(n.currentLabel), 1)
])
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
[vShow, n.visible]
]);
}
var mf = st(oR, [["render", aR], ["__file", "option.vue"]]);
var lR = defineComponent({
name: "ElSelectDropdown",
componentName: "ElSelectDropdown",
setup() {
const n = inject(lu), e = nt("select"), t = computed(() => n.props.popperClass), i = computed(() => n.props.multiple), r = computed(() => n.props.fitInputWidth), s = ref("");
function o() {
var a;
s.value = `${(a = n.selectRef) == null ? void 0 : a.offsetWidth}px`;
}
return onMounted(() => {
o(), Yn(n.selectRef, o);
}), {
ns: e,
minWidth: s,
popperClass: t,
isMultiple: i,
isFitInputWidth: r
};
}
});
function cR(n, e, t, i, r, s) {
return openBlock(), createElementBlock("div", {
class: normalizeClass([n.ns.b("dropdown"), n.ns.is("multiple", n.isMultiple), n.popperClass]),
style: normalizeStyle({ [n.isFitInputWidth ? "width" : "minWidth"]: n.minWidth })
}, [
n.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(n.ns.be("dropdown", "header"))
}, [
renderSlot(n.$slots, "header")
], 2)) : createCommentVNode("v-if", true),
renderSlot(n.$slots, "default"),
n.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(n.ns.be("dropdown", "footer"))
}, [
renderSlot(n.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 6);
}
var uR = st(lR, [["render", cR], ["__file", "select-dropdown.vue"]]);
var hR = 11;
var dR = (n, e) => {
const { t } = iu(), i = sl(), r = nt("select"), s = nt("input"), o = reactive({
inputValue: "",
options: /* @__PURE__ */ new Map(),
cachedOptions: /* @__PURE__ */ new Map(),
disabledOptions: /* @__PURE__ */ new Map(),
optionValues: [],
selected: [],
selectionWidth: 0,
calculatorWidth: 0,
collapseItemWidth: 0,
selectedLabel: "",
hoveringIndex: -1,
previousQuery: null,
inputHovering: false,
menuVisibleOnFocus: false,
isBeforeHide: false
}), a = ref(null), c = ref(null), l = ref(null), d = ref(null), h6 = ref(null), f = ref(null), g = ref(null), p = ref(null), u = ref(null), y = ref(null), v = ref(null), m = ref(null), {
isComposing: x,
handleCompositionStart: w,
handleCompositionUpdate: A,
handleCompositionEnd: M
} = N0({
afterComposition: (ge) => ne(ge)
}), { wrapperRef: R, isFocused: L } = D0(h6, {
beforeFocus() {
return b.value;
},
afterFocus() {
n.automaticDropdown && !S.value && (S.value = true, o.menuVisibleOnFocus = true);
},
beforeBlur(ge) {
var Se, Fe;
return ((Se = l.value) == null ? void 0 : Se.isFocusInsideContent(ge)) || ((Fe = d.value) == null ? void 0 : Fe.isFocusInsideContent(ge));
},
afterBlur() {
S.value = false, o.menuVisibleOnFocus = false;
}
}), S = ref(false), I = ref(), { form: T, formItem: _ } = Jo(), { inputId: E } = su(n, {
formItemContext: _
}), { valueOnClear: C, isEmptyValue: P } = NE(n), b = computed(() => n.disabled || (T == null ? void 0 : T.disabled)), F = computed(() => Pn(n.modelValue) ? n.modelValue.length > 0 : !P(n.modelValue)), D = computed(() => n.clearable && !b.value && o.inputHovering && F.value), N = computed(() => n.remote && n.filterable && !n.remoteShowSuffix ? "" : n.suffixIcon), B = computed(() => r.is("reverse", N.value && S.value)), U = computed(() => (_ == null ? void 0 : _.validateState) || ""), G = computed(() => d0[U.value]), Y = computed(() => n.remote ? 300 : 0), te = computed(() => n.loading ? n.loadingText || t("el.select.loading") : n.remote && !o.inputValue && o.options.size === 0 ? false : n.filterable && o.inputValue && o.options.size > 0 && ae.value === 0 ? n.noMatchText || t("el.select.noMatch") : o.options.size === 0 ? n.noDataText || t("el.select.noData") : null), ae = computed(() => ie.value.filter((ge) => ge.visible).length), ie = computed(() => {
const ge = Array.from(o.options.values()), Se = [];
return o.optionValues.forEach((Fe) => {
const Ge = ge.findIndex((We) => We.value === Fe);
Ge > -1 && Se.push(ge[Ge]);
}), Se.length >= ge.length ? Se : ge;
}), le = computed(() => Array.from(o.cachedOptions.values())), W = computed(() => {
const ge = ie.value.filter((Se) => !Se.created).some((Se) => Se.currentLabel === o.inputValue);
return n.filterable && n.allowCreate && o.inputValue !== "" && !ge;
}), $ = () => {
n.filterable && Sn(n.filterMethod) || n.filterable && n.remote && Sn(n.remoteMethod) || ie.value.forEach((ge) => {
var Se;
(Se = ge.updateOption) == null || Se.call(ge, o.inputValue);
});
}, j = Ns(), re = computed(() => ["small"].includes(j.value) ? "small" : "default"), V = computed({
get() {
return S.value && te.value !== false;
},
set(ge) {
S.value = ge;
}
}), H = computed(() => {
if (n.multiple && !di(n.modelValue))
return Si(n.modelValue).length === 0 && !o.inputValue;
const ge = Pn(n.modelValue) ? n.modelValue[0] : n.modelValue;
return n.filterable || di(ge) ? !o.inputValue : true;
}), K = computed(() => {
var ge;
const Se = (ge = n.placeholder) != null ? ge : t("el.select.placeholder");
return n.multiple || !F.value ? Se : o.selectedLabel;
}), ce = computed(() => zh ? null : "mouseenter");
watch(() => n.modelValue, (ge, Se) => {
n.multiple && n.filterable && !n.reserveKeyword && (o.inputValue = "", se("")), O(), !$h(ge, Se) && n.validateEvent && (_ == null || _.validate("change").catch((Fe) => Vt(Fe)));
}, {
flush: "post",
deep: true
}), watch(() => S.value, (ge) => {
ge ? se(o.inputValue) : (o.inputValue = "", o.previousQuery = null, o.isBeforeHide = true), e("visible-change", ge);
}), watch(() => o.options.entries(), () => {
var ge;
if (!en)
return;
const Se = ((ge = a.value) == null ? void 0 : ge.querySelectorAll("input")) || [];
(!n.filterable && !n.defaultFirstOption && !di(n.modelValue) || !Array.from(Se).includes(document.activeElement)) && O(), n.defaultFirstOption && (n.filterable || n.remote) && ae.value && k();
}, {
flush: "post"
}), watch(() => o.hoveringIndex, (ge) => {
yt(ge) && ge > -1 ? I.value = ie.value[ge] || {} : I.value = {}, ie.value.forEach((Se) => {
Se.hover = I.value === Se;
});
}), watchEffect(() => {
o.isBeforeHide || $();
});
const se = (ge) => {
o.previousQuery === ge || x.value || (o.previousQuery = ge, n.filterable && Sn(n.filterMethod) ? n.filterMethod(ge) : n.filterable && n.remote && Sn(n.remoteMethod) && n.remoteMethod(ge), n.defaultFirstOption && (n.filterable || n.remote) && ae.value ? nextTick(k) : nextTick(X));
}, k = () => {
const ge = ie.value.filter((Ge) => Ge.visible && !Ge.disabled && !Ge.states.groupDisabled), Se = ge.find((Ge) => Ge.created), Fe = ge[0];
o.hoveringIndex = Mt(ie.value, Se || Fe);
}, O = () => {
if (n.multiple)
o.selectedLabel = "";
else {
const Se = Pn(n.modelValue) ? n.modelValue[0] : n.modelValue, Fe = Z(Se);
o.selectedLabel = Fe.currentLabel, o.selected = [Fe];
return;
}
const ge = [];
di(n.modelValue) || Si(n.modelValue).forEach((Se) => {
ge.push(Z(Se));
}), o.selected = ge;
}, Z = (ge) => {
let Se;
const Fe = Pu(ge).toLowerCase() === "object", Ge = Pu(ge).toLowerCase() === "null", We = Pu(ge).toLowerCase() === "undefined";
for (let ft = o.cachedOptions.size - 1; ft >= 0; ft--) {
const kt = le.value[ft];
if (Fe ? Ji(kt.value, n.valueKey) === Ji(ge, n.valueKey) : kt.value === ge) {
Se = {
value: ge,
currentLabel: kt.currentLabel,
get isDisabled() {
return kt.isDisabled;
}
};
break;
}
}
if (Se)
return Se;
const et = Fe ? ge.label : !Ge && !We ? ge : "";
return {
value: ge,
currentLabel: et
};
}, X = () => {
o.hoveringIndex = ie.value.findIndex((ge) => o.selected.some((Se) => _e(Se) === _e(ge)));
}, ee = () => {
o.selectionWidth = c.value.getBoundingClientRect().width;
}, fe = () => {
o.calculatorWidth = f.value.getBoundingClientRect().width;
}, be = () => {
o.collapseItemWidth = v.value.getBoundingClientRect().width;
}, Ae = () => {
var ge, Se;
(Se = (ge = l.value) == null ? void 0 : ge.updatePopper) == null || Se.call(ge);
}, he = () => {
var ge, Se;
(Se = (ge = d.value) == null ? void 0 : ge.updatePopper) == null || Se.call(ge);
}, xe = () => {
o.inputValue.length > 0 && !S.value && (S.value = true), se(o.inputValue);
}, ne = (ge) => {
if (o.inputValue = ge.target.value, n.remote)
me();
else
return xe();
}, me = jh(() => {
xe();
}, Y.value), Me = (ge) => {
$h(n.modelValue, ge) || e(ur, ge);
}, De = (ge) => E_(ge, (Se) => !o.disabledOptions.has(Se)), Ie = (ge) => {
if (n.multiple && ge.code !== Li.delete && ge.target.value.length <= 0) {
const Se = Si(n.modelValue).slice(), Fe = De(Se);
if (Fe < 0)
return;
const Ge = Se[Fe];
Se.splice(Fe, 1), e(At, Se), Me(Se), e("remove-tag", Ge);
}
}, $e = (ge, Se) => {
const Fe = o.selected.indexOf(Se);
if (Fe > -1 && !b.value) {
const Ge = Si(n.modelValue).slice();
Ge.splice(Fe, 1), e(At, Ge), Me(Ge), e("remove-tag", Se.value);
}
ge.stopPropagation(), Ft();
}, lt = (ge) => {
ge.stopPropagation();
const Se = n.multiple ? [] : C.value;
if (n.multiple)
for (const Fe of o.selected)
Fe.isDisabled && Se.push(Fe.value);
e(At, Se), Me(Se), o.hoveringIndex = -1, S.value = false, e("clear"), Ft();
}, qe = (ge) => {
var Se;
if (n.multiple) {
const Fe = Si((Se = n.modelValue) != null ? Se : []).slice(), Ge = Mt(Fe, ge.value);
Ge > -1 ? Fe.splice(Ge, 1) : (n.multipleLimit <= 0 || Fe.length < n.multipleLimit) && Fe.push(ge.value), e(At, Fe), Me(Fe), ge.created && se(""), n.filterable && !n.reserveKeyword && (o.inputValue = "");
} else
e(At, ge.value), Me(ge.value), S.value = false;
Ft(), !S.value && nextTick(() => {
Be(ge);
});
}, Mt = (ge = [], Se) => {
if (!Tn(Se))
return ge.indexOf(Se);
const Fe = n.valueKey;
let Ge = -1;
return ge.some((We, et) => toRaw(Ji(We, Fe)) === Ji(Se, Fe) ? (Ge = et, true) : false), Ge;
}, Be = (ge) => {
var Se, Fe, Ge, We, et;
const Ye = Pn(ge) ? ge[0] : ge;
let ft = null;
if (Ye != null && Ye.value) {
const kt = ie.value.filter((ln) => ln.value === Ye.value);
kt.length > 0 && (ft = kt[0].$el);
}
if (l.value && ft) {
const kt = (We = (Ge = (Fe = (Se = l.value) == null ? void 0 : Se.popperRef) == null ? void 0 : Fe.contentRef) == null ? void 0 : Ge.querySelector) == null ? void 0 : We.call(Ge, `.${r.be("dropdown", "wrap")}`);
kt && N_(kt, ft);
}
(et = m.value) == null || et.handleScroll();
}, it = (ge) => {
o.options.set(ge.value, ge), o.cachedOptions.set(ge.value, ge), ge.disabled && o.disabledOptions.set(ge.value, ge);
}, tt = (ge, Se) => {
o.options.get(ge) === Se && o.options.delete(ge);
}, qt = computed(() => {
var ge, Se;
return (Se = (ge = l.value) == null ? void 0 : ge.popperRef) == null ? void 0 : Se.contentRef;
}), Qt = () => {
o.isBeforeHide = false, nextTick(() => Be(o.selected));
}, Ft = () => {
var ge;
(ge = h6.value) == null || ge.focus();
}, Nt = () => {
var ge;
(ge = h6.value) == null || ge.blur();
}, Vi = (ge) => {
lt(ge);
}, ki = () => {
S.value = false, L.value && Nt();
}, ni = () => {
o.inputValue.length > 0 ? o.inputValue = "" : S.value = false;
}, ts = () => {
b.value || (zh && (o.inputHovering = true), o.menuVisibleOnFocus ? o.menuVisibleOnFocus = false : S.value = !S.value);
}, Q = () => {
S.value ? ie.value[o.hoveringIndex] && qe(ie.value[o.hoveringIndex]) : ts();
}, _e = (ge) => Tn(ge.value) ? Ji(ge.value, n.valueKey) : ge.value, Oe = computed(() => ie.value.filter((ge) => ge.visible).every((ge) => ge.disabled)), Ze = computed(() => n.multiple ? n.collapseTags ? o.selected.slice(0, n.maxCollapseTags) : o.selected : []), ht = computed(() => n.multiple ? n.collapseTags ? o.selected.slice(n.maxCollapseTags) : [] : []), J = (ge) => {
if (!S.value) {
S.value = true;
return;
}
if (!(o.options.size === 0 || o.filteredOptionsCount === 0 || x.value) && !Oe.value) {
ge === "next" ? (o.hoveringIndex++, o.hoveringIndex === o.options.size && (o.hoveringIndex = 0)) : ge === "prev" && (o.hoveringIndex--, o.hoveringIndex < 0 && (o.hoveringIndex = o.options.size - 1));
const Se = ie.value[o.hoveringIndex];
(Se.disabled === true || Se.states.groupDisabled === true || !Se.visible) && J(ge), nextTick(() => Be(I.value));
}
}, ye = () => {
if (!c.value)
return 0;
const ge = window.getComputedStyle(c.value);
return Number.parseFloat(ge.gap || "6px");
}, pe = computed(() => {
const ge = ye();
return { maxWidth: `${v.value && n.maxCollapseTags === 1 ? o.selectionWidth - o.collapseItemWidth - ge : o.selectionWidth}px` };
}), we = computed(() => ({ maxWidth: `${o.selectionWidth}px` })), Ce = computed(() => ({
width: `${Math.max(o.calculatorWidth, hR)}px`
}));
return Yn(c, ee), Yn(f, fe), Yn(u, Ae), Yn(R, Ae), Yn(y, he), Yn(v, be), onMounted(() => {
O();
}), {
inputId: E,
contentId: i,
nsSelect: r,
nsInput: s,
states: o,
isFocused: L,
expanded: S,
optionsArray: ie,
hoverOption: I,
selectSize: j,
filteredOptionsCount: ae,
resetCalculatorWidth: fe,
updateTooltip: Ae,
updateTagTooltip: he,
debouncedOnInputChange: me,
onInput: ne,
deletePrevTag: Ie,
deleteTag: $e,
deleteSelected: lt,
handleOptionSelect: qe,
scrollToOption: Be,
hasModelValue: F,
shouldShowPlaceholder: H,
currentPlaceholder: K,
mouseEnterEventName: ce,
showClose: D,
iconComponent: N,
iconReverse: B,
validateState: U,
validateIcon: G,
showNewOption: W,
updateOptions: $,
collapseTagSize: re,
setSelected: O,
selectDisabled: b,
emptyText: te,
handleCompositionStart: w,
handleCompositionUpdate: A,
handleCompositionEnd: M,
onOptionCreate: it,
onOptionDestroy: tt,
handleMenuEnter: Qt,
focus: Ft,
blur: Nt,
handleClearClick: Vi,
handleClickOutside: ki,
handleEsc: ni,
toggleMenu: ts,
selectOption: Q,
getValueKey: _e,
navigateOptions: J,
dropdownMenuVisible: V,
showTagList: Ze,
collapseTagList: ht,
tagStyle: pe,
collapseTagStyle: we,
inputStyle: Ce,
popperRef: qt,
inputRef: h6,
tooltipRef: l,
tagTooltipRef: d,
calculatorRef: f,
prefixRef: g,
suffixRef: p,
selectRef: a,
wrapperRef: R,
selectionRef: c,
scrollbarRef: m,
menuRef: u,
tagMenuRef: y,
collapseItemRef: v
};
};
var fR = defineComponent({
name: "ElOptions",
setup(n, { slots: e }) {
const t = inject(lu);
let i = [];
return () => {
var r, s;
const o = (r = e.default) == null ? void 0 : r.call(e), a = [];
function c(l) {
Pn(l) && l.forEach((d) => {
var h6, f, g, p;
const u = (h6 = (d == null ? void 0 : d.type) || {}) == null ? void 0 : h6.name;
u === "ElOptionGroup" ? c(!vn(d.children) && !Pn(d.children) && Sn((f = d.children) == null ? void 0 : f.default) ? (g = d.children) == null ? void 0 : g.default() : d.children) : u === "ElOption" ? a.push((p = d.props) == null ? void 0 : p.value) : Pn(d.children) && c(d.children);
});
}
return o.length && c((s = o[0]) == null ? void 0 : s.children), $h(a, i) || (i = a, t && (t.states.optionValues = a)), o;
};
}
});
var pR = at({
name: String,
id: String,
modelValue: {
type: [Array, String, Number, Boolean, Object],
default: void 0
},
autocomplete: {
type: String,
default: "off"
},
automaticDropdown: Boolean,
size: Gr,
effect: {
type: Je(String),
default: "light"
},
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
allowCreate: Boolean,
loading: Boolean,
popperClass: {
type: String,
default: ""
},
popperOptions: {
type: Je(Object),
default: () => ({})
},
remote: Boolean,
loadingText: String,
noMatchText: String,
noDataText: String,
remoteMethod: Function,
filterMethod: Function,
multiple: Boolean,
multipleLimit: {
type: Number,
default: 0
},
placeholder: {
type: String
},
defaultFirstOption: Boolean,
reserveKeyword: {
type: Boolean,
default: true
},
valueKey: {
type: String,
default: "value"
},
collapseTags: Boolean,
collapseTagsTooltip: Boolean,
maxCollapseTags: {
type: Number,
default: 1
},
teleported: Vn.teleported,
persistent: {
type: Boolean,
default: true
},
clearIcon: {
type: kr,
default: Yd
},
fitInputWidth: Boolean,
suffixIcon: {
type: kr,
default: Xd
},
tagType: { ...Qh.type, default: "info" },
tagEffect: { ...Qh.effect, default: "light" },
validateEvent: {
type: Boolean,
default: true
},
remoteShowSuffix: Boolean,
placement: {
type: Je(String),
values: Yo,
default: "bottom-start"
},
fallbackPlacements: {
type: Je(Array),
default: ["bottom-start", "top-start", "right", "left"]
},
appendTo: String,
...DE,
...Yr(["ariaLabel"])
});
var Um = "ElSelect";
var mR = defineComponent({
name: Um,
componentName: Um,
components: {
ElSelectMenu: uR,
ElOption: mf,
ElOptions: fR,
ElTag: aL,
ElScrollbar: f2,
ElTooltip: pf,
ElIcon: It
},
directives: { ClickOutside: HC },
props: pR,
emits: [
At,
ur,
"remove-tag",
"clear",
"visible-change",
"focus",
"blur"
],
setup(n, { emit: e }) {
const t = computed(() => {
const { modelValue: s, multiple: o } = n, a = o ? [] : void 0;
return Pn(s) ? o ? s : a : o ? a : s;
}), i = reactive({
...toRefs(n),
modelValue: t
}), r = dR(i, e);
return provide(lu, reactive({
props: i,
states: r.states,
optionsArray: r.optionsArray,
handleOptionSelect: r.handleOptionSelect,
onOptionCreate: r.onOptionCreate,
onOptionDestroy: r.onOptionDestroy,
selectRef: r.selectRef,
setSelected: r.setSelected
})), {
...r,
modelValue: t
};
}
});
function gR(n, e, t, i, r, s) {
const o = resolveComponent("el-tag"), a = resolveComponent("el-tooltip"), c = resolveComponent("el-icon"), l = resolveComponent("el-option"), d = resolveComponent("el-options"), h6 = resolveComponent("el-scrollbar"), f = resolveComponent("el-select-menu"), g = resolveDirective("click-outside");
return withDirectives((openBlock(), createElementBlock("div", {
ref: "selectRef",
class: normalizeClass([n.nsSelect.b(), n.nsSelect.m(n.selectSize)]),
[toHandlerKey(n.mouseEnterEventName)]: (p) => n.states.inputHovering = true,
onMouseleave: (p) => n.states.inputHovering = false
}, [
createVNode(a, {
ref: "tooltipRef",
visible: n.dropdownMenuVisible,
placement: n.placement,
teleported: n.teleported,
"popper-class": [n.nsSelect.e("popper"), n.popperClass],
"popper-options": n.popperOptions,
"fallback-placements": n.fallbackPlacements,
effect: n.effect,
pure: "",
trigger: "click",
transition: `${n.nsSelect.namespace.value}-zoom-in-top`,
"stop-popper-mouse-event": false,
"gpu-acceleration": false,
persistent: n.persistent,
"append-to": n.appendTo,
onBeforeShow: n.handleMenuEnter,
onHide: (p) => n.states.isBeforeHide = false
}, {
default: withCtx(() => {
var p;
return [
createBaseVNode("div", {
ref: "wrapperRef",
class: normalizeClass([
n.nsSelect.e("wrapper"),
n.nsSelect.is("focused", n.isFocused),
n.nsSelect.is("hovering", n.states.inputHovering),
n.nsSelect.is("filterable", n.filterable),
n.nsSelect.is("disabled", n.selectDisabled)
]),
onClick: withModifiers(n.toggleMenu, ["prevent"])
}, [
n.$slots.prefix ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "prefixRef",
class: normalizeClass(n.nsSelect.e("prefix"))
}, [
renderSlot(n.$slots, "prefix")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
ref: "selectionRef",
class: normalizeClass([
n.nsSelect.e("selection"),
n.nsSelect.is("near", n.multiple && !n.$slots.prefix && !!n.states.selected.length)
])
}, [
n.multiple ? renderSlot(n.$slots, "tag", { key: 0 }, () => [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.showTagList, (u) => (openBlock(), createElementBlock("div", {
key: n.getValueKey(u),
class: normalizeClass(n.nsSelect.e("selected-item"))
}, [
createVNode(o, {
closable: !n.selectDisabled && !u.isDisabled,
size: n.collapseTagSize,
type: n.tagType,
effect: n.tagEffect,
"disable-transitions": "",
style: normalizeStyle(n.tagStyle),
onClose: (y) => n.deleteTag(y, u)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(n.nsSelect.e("tags-text"))
}, [
renderSlot(n.$slots, "label", {
label: u.currentLabel,
value: u.value
}, () => [
createTextVNode(toDisplayString(u.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
], 2))), 128)),
n.collapseTags && n.states.selected.length > n.maxCollapseTags ? (openBlock(), createBlock(a, {
key: 0,
ref: "tagTooltipRef",
disabled: n.dropdownMenuVisible || !n.collapseTagsTooltip,
"fallback-placements": ["bottom", "top", "right", "left"],
effect: n.effect,
placement: "bottom",
teleported: n.teleported
}, {
default: withCtx(() => [
createBaseVNode("div", {
ref: "collapseItemRef",
class: normalizeClass(n.nsSelect.e("selected-item"))
}, [
createVNode(o, {
closable: false,
size: n.collapseTagSize,
type: n.tagType,
effect: n.tagEffect,
"disable-transitions": "",
style: normalizeStyle(n.collapseTagStyle)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(n.nsSelect.e("tags-text"))
}, " + " + toDisplayString(n.states.selected.length - n.maxCollapseTags), 3)
]),
_: 1
}, 8, ["size", "type", "effect", "style"])
], 2)
]),
content: withCtx(() => [
createBaseVNode("div", {
ref: "tagMenuRef",
class: normalizeClass(n.nsSelect.e("selection"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.collapseTagList, (u) => (openBlock(), createElementBlock("div", {
key: n.getValueKey(u),
class: normalizeClass(n.nsSelect.e("selected-item"))
}, [
createVNode(o, {
class: "in-tooltip",
closable: !n.selectDisabled && !u.isDisabled,
size: n.collapseTagSize,
type: n.tagType,
effect: n.tagEffect,
"disable-transitions": "",
onClose: (y) => n.deleteTag(y, u)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(n.nsSelect.e("tags-text"))
}, [
renderSlot(n.$slots, "label", {
label: u.currentLabel,
value: u.value
}, () => [
createTextVNode(toDisplayString(u.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "onClose"])
], 2))), 128))
], 2)
]),
_: 3
}, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true)
]) : createCommentVNode("v-if", true),
n.selectDisabled ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([
n.nsSelect.e("selected-item"),
n.nsSelect.e("input-wrapper"),
n.nsSelect.is("hidden", !n.filterable)
])
}, [
withDirectives(createBaseVNode("input", {
id: n.inputId,
ref: "inputRef",
"onUpdate:modelValue": (u) => n.states.inputValue = u,
type: "text",
name: n.name,
class: normalizeClass([n.nsSelect.e("input"), n.nsSelect.is(n.selectSize)]),
disabled: n.selectDisabled,
autocomplete: n.autocomplete,
style: normalizeStyle(n.inputStyle),
role: "combobox",
readonly: !n.filterable,
spellcheck: "false",
"aria-activedescendant": ((p = n.hoverOption) == null ? void 0 : p.id) || "",
"aria-controls": n.contentId,
"aria-expanded": n.dropdownMenuVisible,
"aria-label": n.ariaLabel,
"aria-autocomplete": "none",
"aria-haspopup": "listbox",
onKeydown: [
withKeys(withModifiers((u) => n.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
withKeys(withModifiers((u) => n.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
withKeys(withModifiers(n.handleEsc, ["stop", "prevent"]), ["esc"]),
withKeys(withModifiers(n.selectOption, ["stop", "prevent"]), ["enter"]),
withKeys(withModifiers(n.deletePrevTag, ["stop"]), ["delete"])
],
onCompositionstart: n.handleCompositionStart,
onCompositionupdate: n.handleCompositionUpdate,
onCompositionend: n.handleCompositionEnd,
onInput: n.onInput,
onClick: withModifiers(n.toggleMenu, ["stop"])
}, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
[vModelText, n.states.inputValue]
]),
n.filterable ? (openBlock(), createElementBlock("span", {
key: 0,
ref: "calculatorRef",
"aria-hidden": "true",
class: normalizeClass(n.nsSelect.e("input-calculator")),
textContent: toDisplayString(n.states.inputValue)
}, null, 10, ["textContent"])) : createCommentVNode("v-if", true)
], 2)),
n.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass([
n.nsSelect.e("selected-item"),
n.nsSelect.e("placeholder"),
n.nsSelect.is("transparent", !n.hasModelValue || n.expanded && !n.states.inputValue)
])
}, [
n.hasModelValue ? renderSlot(n.$slots, "label", {
key: 0,
label: n.currentPlaceholder,
value: n.modelValue
}, () => [
createBaseVNode("span", null, toDisplayString(n.currentPlaceholder), 1)
]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(n.currentPlaceholder), 1))
], 2)) : createCommentVNode("v-if", true)
], 2),
createBaseVNode("div", {
ref: "suffixRef",
class: normalizeClass(n.nsSelect.e("suffix"))
}, [
n.iconComponent && !n.showClose ? (openBlock(), createBlock(c, {
key: 0,
class: normalizeClass([n.nsSelect.e("caret"), n.nsSelect.e("icon"), n.iconReverse])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(n.iconComponent)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
n.showClose && n.clearIcon ? (openBlock(), createBlock(c, {
key: 1,
class: normalizeClass([
n.nsSelect.e("caret"),
n.nsSelect.e("icon"),
n.nsSelect.e("clear")
]),
onClick: n.handleClearClick
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(n.clearIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
n.validateState && n.validateIcon ? (openBlock(), createBlock(c, {
key: 2,
class: normalizeClass([n.nsInput.e("icon"), n.nsInput.e("validateIcon")])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(n.validateIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 10, ["onClick"])
];
}),
content: withCtx(() => [
createVNode(f, { ref: "menuRef" }, {
default: withCtx(() => [
n.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(n.nsSelect.be("dropdown", "header")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(n.$slots, "header")
], 10, ["onClick"])) : createCommentVNode("v-if", true),
withDirectives(createVNode(h6, {
id: n.contentId,
ref: "scrollbarRef",
tag: "ul",
"wrap-class": n.nsSelect.be("dropdown", "wrap"),
"view-class": n.nsSelect.be("dropdown", "list"),
class: normalizeClass([n.nsSelect.is("empty", n.filteredOptionsCount === 0)]),
role: "listbox",
"aria-label": n.ariaLabel,
"aria-orientation": "vertical"
}, {
default: withCtx(() => [
n.showNewOption ? (openBlock(), createBlock(l, {
key: 0,
value: n.states.inputValue,
created: true
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
createVNode(d, null, {
default: withCtx(() => [
renderSlot(n.$slots, "default")
]),
_: 3
})
]),
_: 3
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
[vShow, n.states.options.size > 0 && !n.loading]
]),
n.$slots.loading && n.loading ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(n.nsSelect.be("dropdown", "loading"))
}, [
renderSlot(n.$slots, "loading")
], 2)) : n.loading || n.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(n.nsSelect.be("dropdown", "empty"))
}, [
renderSlot(n.$slots, "empty", {}, () => [
createBaseVNode("span", null, toDisplayString(n.emptyText), 1)
])
], 2)) : createCommentVNode("v-if", true),
n.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 3,
class: normalizeClass(n.nsSelect.be("dropdown", "footer")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(n.$slots, "footer")
], 10, ["onClick"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 512)
]),
_: 3
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"])
], 16, ["onMouseleave"])), [
[g, n.handleClickOutside, n.popperRef]
]);
}
var vR = st(mR, [["render", gR], ["__file", "select.vue"]]);
var yR = defineComponent({
name: "ElOptionGroup",
componentName: "ElOptionGroup",
props: {
label: String,
disabled: Boolean
},
setup(n) {
const e = nt("select"), t = ref(null), i = getCurrentInstance(), r = ref([]);
provide(fy, reactive({
...toRefs(n)
}));
const s = computed(() => r.value.some((l) => l.visible === true)), o = (l) => {
var d, h6;
return ((d = l.type) == null ? void 0 : d.name) === "ElOption" && !!((h6 = l.component) != null && h6.proxy);
}, a = (l) => {
const d = Si(l), h6 = [];
return d.forEach((f) => {
var g, p;
o(f) ? h6.push(f.component.proxy) : (g = f.children) != null && g.length ? h6.push(...a(f.children)) : (p = f.component) != null && p.subTree && h6.push(...a(f.component.subTree));
}), h6;
}, c = () => {
r.value = a(i.subTree);
};
return onMounted(() => {
c();
}), Tw(t, c, {
attributes: true,
subtree: true,
childList: true
}), {
groupRef: t,
visible: s,
ns: e
};
}
});
function bR(n, e, t, i, r, s) {
return withDirectives((openBlock(), createElementBlock("ul", {
ref: "groupRef",
class: normalizeClass(n.ns.be("group", "wrap"))
}, [
createBaseVNode("li", {
class: normalizeClass(n.ns.be("group", "title"))
}, toDisplayString(n.label), 3),
createBaseVNode("li", null, [
createBaseVNode("ul", {
class: normalizeClass(n.ns.b("group"))
}, [
renderSlot(n.$slots, "default")
], 2)
])
], 2)), [
[vShow, n.visible]
]);
}
var py = st(yR, [["render", bR], ["__file", "option-group.vue"]]);
var qo = on(vR, {
Option: mf,
OptionGroup: py
});
var Qo = vi(mf);
vi(py);
var xR = at({
trigger: Va.trigger,
placement: Hu.placement,
disabled: Va.disabled,
visible: Vn.visible,
transition: Vn.transition,
popperOptions: Hu.popperOptions,
tabindex: Hu.tabindex,
content: Vn.content,
popperStyle: Vn.popperStyle,
popperClass: Vn.popperClass,
enterable: {
...Vn.enterable,
default: true
},
effect: {
...Vn.effect,
default: "light"
},
teleported: Vn.teleported,
title: String,
width: {
type: [String, Number],
default: 150
},
offset: {
type: Number,
default: void 0
},
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
},
showArrow: {
type: Boolean,
default: true
},
persistent: {
type: Boolean,
default: true
},
"onUpdate:visible": {
type: Function
}
});
var MR = {
"update:visible": (n) => Ba(n),
"before-enter": () => true,
"before-leave": () => true,
"after-enter": () => true,
"after-leave": () => true
};
var wR = "onUpdate:visible";
var AR = defineComponent({
name: "ElPopover"
});
var SR = defineComponent({
...AR,
props: xR,
emits: MR,
setup(n, { expose: e, emit: t }) {
const i = n, r = computed(() => i[wR]), s = nt("popover"), o = ref(), a = computed(() => {
var y;
return (y = unref(o)) == null ? void 0 : y.popperRef;
}), c = computed(() => [
{
width: Dc(i.width)
},
i.popperStyle
]), l = computed(() => [s.b(), i.popperClass, { [s.m("plain")]: !!i.content }]), d = computed(() => i.transition === `${s.namespace.value}-fade-in-linear`), h6 = () => {
var y;
(y = o.value) == null || y.hide();
}, f = () => {
t("before-enter");
}, g = () => {
t("before-leave");
}, p = () => {
t("after-enter");
}, u = () => {
t("update:visible", false), t("after-leave");
};
return e({
popperRef: a,
hide: h6
}), (y, v) => (openBlock(), createBlock(unref(pf), mergeProps({
ref_key: "tooltipRef",
ref: o
}, y.$attrs, {
trigger: y.trigger,
placement: y.placement,
disabled: y.disabled,
visible: y.visible,
transition: y.transition,
"popper-options": y.popperOptions,
tabindex: y.tabindex,
content: y.content,
offset: y.offset,
"show-after": y.showAfter,
"hide-after": y.hideAfter,
"auto-close": y.autoClose,
"show-arrow": y.showArrow,
"aria-label": y.title,
effect: y.effect,
enterable: y.enterable,
"popper-class": unref(l),
"popper-style": unref(c),
teleported: y.teleported,
persistent: y.persistent,
"gpu-acceleration": unref(d),
"onUpdate:visible": unref(r),
onBeforeShow: f,
onBeforeHide: g,
onShow: p,
onHide: u
}), {
content: withCtx(() => [
y.title ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(s).e("title")),
role: "title"
}, toDisplayString(y.title), 3)) : createCommentVNode("v-if", true),
renderSlot(y.$slots, "default", {}, () => [
createTextVNode(toDisplayString(y.content), 1)
])
]),
default: withCtx(() => [
y.$slots.reference ? renderSlot(y.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 3
}, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]));
}
});
var _R = st(SR, [["__file", "popover.vue"]]);
var zm = (n, e) => {
const t = e.arg || e.value, i = t == null ? void 0 : t.popperRef;
i && (i.triggerRef = n);
};
var TR = {
mounted(n, e) {
zm(n, e);
},
updated(n, e) {
zm(n, e);
}
};
var ER = "popover";
var CR = iT(TR, ER);
var cu = on(_R, {
directive: CR
});
var my = Symbol("sliderContextKey");
var LR = at({
modelValue: {
type: Je([Number, Array]),
default: 0
},
id: {
type: String,
default: void 0
},
min: {
type: Number,
default: 0
},
max: {
type: Number,
default: 100
},
step: {
type: Number,
default: 1
},
showInput: Boolean,
showInputControls: {
type: Boolean,
default: true
},
size: Gr,
inputSize: Gr,
showStops: Boolean,
showTooltip: {
type: Boolean,
default: true
},
formatTooltip: {
type: Je(Function),
default: void 0
},
disabled: Boolean,
range: Boolean,
vertical: Boolean,
height: String,
debounce: {
type: Number,
default: 300
},
rangeStartLabel: {
type: String,
default: void 0
},
rangeEndLabel: {
type: String,
default: void 0
},
formatValueText: {
type: Je(Function),
default: void 0
},
tooltipClass: {
type: String,
default: void 0
},
placement: {
type: String,
values: Yo,
default: "top"
},
marks: {
type: Je(Object)
},
validateEvent: {
type: Boolean,
default: true
},
...Yr(["ariaLabel"])
});
var Wu = (n) => yt(n) || Pn(n) && n.every(yt);
var RR = {
[At]: Wu,
[bs]: Wu,
[ur]: Wu
};
var FR = (n, e, t) => {
const i = ref();
return onMounted(async () => {
n.range ? (Array.isArray(n.modelValue) ? (e.firstValue = Math.max(n.min, n.modelValue[0]), e.secondValue = Math.min(n.max, n.modelValue[1])) : (e.firstValue = n.min, e.secondValue = n.max), e.oldValue = [e.firstValue, e.secondValue]) : (typeof n.modelValue != "number" || Number.isNaN(n.modelValue) ? e.firstValue = n.min : e.firstValue = Math.min(n.max, Math.max(n.min, n.modelValue)), e.oldValue = e.firstValue), un(window, "resize", t), await nextTick(), t();
}), {
sliderWrapper: i
};
};
var PR = (n) => computed(() => n.marks ? Object.keys(n.marks).map(Number.parseFloat).sort((t, i) => t - i).filter((t) => t <= n.max && t >= n.min).map((t) => ({
point: t,
position: (t - n.min) * 100 / (n.max - n.min),
mark: n.marks[t]
})) : []);
var IR = (n, e, t) => {
const { form: i, formItem: r } = Jo(), s = shallowRef(), o = ref(), a = ref(), c = {
firstButton: o,
secondButton: a
}, l = computed(() => n.disabled || (i == null ? void 0 : i.disabled) || false), d = computed(() => Math.min(e.firstValue, e.secondValue)), h6 = computed(() => Math.max(e.firstValue, e.secondValue)), f = computed(() => n.range ? `${100 * (h6.value - d.value) / (n.max - n.min)}%` : `${100 * (e.firstValue - n.min) / (n.max - n.min)}%`), g = computed(() => n.range ? `${100 * (d.value - n.min) / (n.max - n.min)}%` : "0%"), p = computed(() => n.vertical ? { height: n.height } : {}), u = computed(() => n.vertical ? {
height: f.value,
bottom: g.value
} : {
width: f.value,
left: g.value
}), y = () => {
s.value && (e.sliderSize = s.value[`client${n.vertical ? "Height" : "Width"}`]);
}, v = (_) => {
const E = n.min + _ * (n.max - n.min) / 100;
if (!n.range)
return o;
let C;
return Math.abs(d.value - E) < Math.abs(h6.value - E) ? C = e.firstValue < e.secondValue ? "firstButton" : "secondButton" : C = e.firstValue > e.secondValue ? "firstButton" : "secondButton", c[C];
}, m = (_) => {
const E = v(_);
return E.value.setPosition(_), E;
}, x = (_) => {
e.firstValue = _ ?? n.min, A(n.range ? [d.value, h6.value] : _ ?? n.min);
}, w = (_) => {
e.secondValue = _, n.range && A([d.value, h6.value]);
}, A = (_) => {
t(At, _), t(bs, _);
}, M = async () => {
await nextTick(), t(ur, n.range ? [d.value, h6.value] : n.modelValue);
}, R = (_) => {
var E, C, P, b, F, D;
if (l.value || e.dragging)
return;
y();
let N = 0;
if (n.vertical) {
const B = (P = (C = (E = _.touches) == null ? void 0 : E.item(0)) == null ? void 0 : C.clientY) != null ? P : _.clientY;
N = (s.value.getBoundingClientRect().bottom - B) / e.sliderSize * 100;
} else {
const B = (D = (F = (b = _.touches) == null ? void 0 : b.item(0)) == null ? void 0 : F.clientX) != null ? D : _.clientX, U = s.value.getBoundingClientRect().left;
N = (B - U) / e.sliderSize * 100;
}
if (!(N < 0 || N > 100))
return m(N);
};
return {
elFormItem: r,
slider: s,
firstButton: o,
secondButton: a,
sliderDisabled: l,
minValue: d,
maxValue: h6,
runwayStyle: p,
barStyle: u,
resetSize: y,
setPosition: m,
emitChange: M,
onSliderWrapperPrevent: (_) => {
var E, C;
((E = c.firstButton.value) != null && E.dragging || (C = c.secondButton.value) != null && C.dragging) && _.preventDefault();
},
onSliderClick: (_) => {
R(_) && M();
},
onSliderDown: async (_) => {
const E = R(_);
E && (await nextTick(), E.value.onButtonDown(_));
},
onSliderMarkerDown: (_) => {
l.value || e.dragging || m(_);
},
setFirstValue: x,
setSecondValue: w
};
};
var { left: OR, down: DR, right: NR, up: BR, home: UR, end: zR, pageUp: VR, pageDown: kR } = Li;
var GR = (n, e, t) => {
const i = ref(), r = ref(false), s = computed(() => e.value instanceof Function), o = computed(() => s.value && e.value(n.modelValue) || n.modelValue), a = jh(() => {
t.value && (r.value = true);
}, 50), c = jh(() => {
t.value && (r.value = false);
}, 50);
return {
tooltip: i,
tooltipVisible: r,
formatValue: o,
displayTooltip: a,
hideTooltip: c
};
};
var HR = (n, e, t) => {
const {
disabled: i,
min: r,
max: s,
step: o,
showTooltip: a,
precision: c,
sliderSize: l,
formatTooltip: d,
emitChange: h6,
resetSize: f,
updateDragging: g
} = inject(my), { tooltip: p, tooltipVisible: u, formatValue: y, displayTooltip: v, hideTooltip: m } = GR(n, d, a), x = ref(), w = computed(() => `${(n.modelValue - r.value) / (s.value - r.value) * 100}%`), A = computed(() => n.vertical ? { bottom: w.value } : { left: w.value }), M = () => {
e.hovering = true, v();
}, R = () => {
e.hovering = false, e.dragging || m();
}, L = (G) => {
i.value || (G.preventDefault(), D(G), window.addEventListener("mousemove", N), window.addEventListener("touchmove", N), window.addEventListener("mouseup", B), window.addEventListener("touchend", B), window.addEventListener("contextmenu", B), x.value.focus());
}, S = (G) => {
i.value || (e.newPosition = Number.parseFloat(w.value) + G / (s.value - r.value) * 100, U(e.newPosition), h6());
}, I = () => {
S(-o.value);
}, T = () => {
S(o.value);
}, _ = () => {
S(-o.value * 4);
}, E = () => {
S(o.value * 4);
}, C = () => {
i.value || (U(0), h6());
}, P = () => {
i.value || (U(100), h6());
}, b = (G) => {
let Y = true;
[OR, DR].includes(G.key) ? I() : [NR, BR].includes(G.key) ? T() : G.key === UR ? C() : G.key === zR ? P() : G.key === kR ? _() : G.key === VR ? E() : Y = false, Y && G.preventDefault();
}, F = (G) => {
let Y, te;
return G.type.startsWith("touch") ? (te = G.touches[0].clientY, Y = G.touches[0].clientX) : (te = G.clientY, Y = G.clientX), {
clientX: Y,
clientY: te
};
}, D = (G) => {
e.dragging = true, e.isClick = true;
const { clientX: Y, clientY: te } = F(G);
n.vertical ? e.startY = te : e.startX = Y, e.startPosition = Number.parseFloat(w.value), e.newPosition = e.startPosition;
}, N = (G) => {
if (e.dragging) {
e.isClick = false, v(), f();
let Y;
const { clientX: te, clientY: ae } = F(G);
n.vertical ? (e.currentY = ae, Y = (e.startY - e.currentY) / l.value * 100) : (e.currentX = te, Y = (e.currentX - e.startX) / l.value * 100), e.newPosition = e.startPosition + Y, U(e.newPosition);
}
}, B = () => {
e.dragging && (setTimeout(() => {
e.dragging = false, e.hovering || m(), e.isClick || U(e.newPosition), h6();
}, 0), window.removeEventListener("mousemove", N), window.removeEventListener("touchmove", N), window.removeEventListener("mouseup", B), window.removeEventListener("touchend", B), window.removeEventListener("contextmenu", B));
}, U = async (G) => {
if (G === null || Number.isNaN(+G))
return;
G < 0 ? G = 0 : G > 100 && (G = 100);
const Y = 100 / ((s.value - r.value) / o.value);
let ae = Math.round(G / Y) * Y * (s.value - r.value) * 0.01 + r.value;
ae = Number.parseFloat(ae.toFixed(c.value)), ae !== n.modelValue && t(At, ae), !e.dragging && n.modelValue !== e.oldValue && (e.oldValue = n.modelValue), await nextTick(), e.dragging && v(), p.value.updatePopper();
};
return watch(() => e.dragging, (G) => {
g(G);
}), un(x, "touchstart", L, { passive: false }), {
disabled: i,
button: x,
tooltip: p,
tooltipVisible: u,
showTooltip: a,
wrapperStyle: A,
formatValue: y,
handleMouseEnter: M,
handleMouseLeave: R,
onButtonDown: L,
onKeyDown: b,
setPosition: U
};
};
var WR = (n, e, t, i) => ({
stops: computed(() => {
if (!n.showStops || n.min > n.max)
return [];
if (n.step === 0)
return Vt("ElSlider", "step should not be 0."), [];
const o = (n.max - n.min) / n.step, a = 100 * n.step / (n.max - n.min), c = Array.from({ length: o - 1 }).map((l, d) => (d + 1) * a);
return n.range ? c.filter((l) => l < 100 * (t.value - n.min) / (n.max - n.min) || l > 100 * (i.value - n.min) / (n.max - n.min)) : c.filter((l) => l > 100 * (e.firstValue - n.min) / (n.max - n.min));
}),
getStopStyle: (o) => n.vertical ? { bottom: `${o}%` } : { left: `${o}%` }
});
var jR = (n, e, t, i, r, s) => {
const o = (l) => {
r(At, l), r(bs, l);
}, a = () => n.range ? ![t.value, i.value].every((l, d) => l === e.oldValue[d]) : n.modelValue !== e.oldValue, c = () => {
var l, d;
n.min > n.max && Xo("Slider", "min should not be greater than max.");
const h6 = n.modelValue;
n.range && Array.isArray(h6) ? h6[1] < n.min ? o([n.min, n.min]) : h6[0] > n.max ? o([n.max, n.max]) : h6[0] < n.min ? o([n.min, h6[1]]) : h6[1] > n.max ? o([h6[0], n.max]) : (e.firstValue = h6[0], e.secondValue = h6[1], a() && (n.validateEvent && ((l = s == null ? void 0 : s.validate) == null || l.call(s, "change").catch((f) => Vt(f))), e.oldValue = h6.slice())) : !n.range && typeof h6 == "number" && !Number.isNaN(h6) && (h6 < n.min ? o(n.min) : h6 > n.max ? o(n.max) : (e.firstValue = h6, a() && (n.validateEvent && ((d = s == null ? void 0 : s.validate) == null || d.call(s, "change").catch((f) => Vt(f))), e.oldValue = h6)));
};
c(), watch(() => e.dragging, (l) => {
l || c();
}), watch(() => n.modelValue, (l, d) => {
e.dragging || Array.isArray(l) && Array.isArray(d) && l.every((h6, f) => h6 === d[f]) && e.firstValue === l[0] && e.secondValue === l[1] || c();
}, {
deep: true
}), watch(() => [n.min, n.max], () => {
c();
});
};
var $R = at({
modelValue: {
type: Number,
default: 0
},
vertical: Boolean,
tooltipClass: String,
placement: {
type: String,
values: Yo,
default: "top"
}
});
var ZR = {
[At]: (n) => yt(n)
};
var XR = defineComponent({
name: "ElSliderButton"
});
var YR = defineComponent({
...XR,
props: $R,
emits: ZR,
setup(n, { expose: e, emit: t }) {
const i = n, r = nt("slider"), s = reactive({
hovering: false,
dragging: false,
isClick: false,
startX: 0,
currentX: 0,
startY: 0,
currentY: 0,
startPosition: 0,
newPosition: 0,
oldValue: i.modelValue
}), {
disabled: o,
button: a,
tooltip: c,
showTooltip: l,
tooltipVisible: d,
wrapperStyle: h6,
formatValue: f,
handleMouseEnter: g,
handleMouseLeave: p,
onButtonDown: u,
onKeyDown: y,
setPosition: v
} = HR(i, s, t), { hovering: m, dragging: x } = toRefs(s);
return e({
onButtonDown: u,
onKeyDown: y,
setPosition: v,
hovering: m,
dragging: x
}), (w, A) => (openBlock(), createElementBlock("div", {
ref_key: "button",
ref: a,
class: normalizeClass([unref(r).e("button-wrapper"), { hover: unref(m), dragging: unref(x) }]),
style: normalizeStyle(unref(h6)),
tabindex: unref(o) ? -1 : 0,
onMouseenter: unref(g),
onMouseleave: unref(p),
onMousedown: unref(u),
onFocus: unref(g),
onBlur: unref(p),
onKeydown: unref(y)
}, [
createVNode(unref(pf), {
ref_key: "tooltip",
ref: c,
visible: unref(d),
placement: w.placement,
"fallback-placements": ["top", "bottom", "right", "left"],
"stop-popper-mouse-event": false,
"popper-class": w.tooltipClass,
disabled: !unref(l),
persistent: ""
}, {
content: withCtx(() => [
createBaseVNode("span", null, toDisplayString(unref(f)), 1)
]),
default: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass([unref(r).e("button"), { hover: unref(m), dragging: unref(x) }])
}, null, 2)
]),
_: 1
}, 8, ["visible", "placement", "popper-class", "disabled"])
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]));
}
});
var Vm = st(YR, [["__file", "button.vue"]]);
var JR = at({
mark: {
type: Je([String, Object]),
default: void 0
}
});
var KR = defineComponent({
name: "ElSliderMarker",
props: JR,
setup(n) {
const e = nt("slider"), t = computed(() => vn(n.mark) ? n.mark : n.mark.label), i = computed(() => vn(n.mark) ? void 0 : n.mark.style);
return () => h("div", {
class: e.e("marks-text"),
style: i.value
}, t.value);
}
});
var qR = defineComponent({
name: "ElSlider"
});
var QR = defineComponent({
...qR,
props: LR,
emits: RR,
setup(n, { expose: e, emit: t }) {
const i = n, r = nt("slider"), { t: s } = iu(), o = reactive({
firstValue: 0,
secondValue: 0,
oldValue: 0,
dragging: false,
sliderSize: 1
}), {
elFormItem: a,
slider: c,
firstButton: l,
secondButton: d,
sliderDisabled: h6,
minValue: f,
maxValue: g,
runwayStyle: p,
barStyle: u,
resetSize: y,
emitChange: v,
onSliderWrapperPrevent: m,
onSliderClick: x,
onSliderDown: w,
onSliderMarkerDown: A,
setFirstValue: M,
setSecondValue: R
} = IR(i, o, t), { stops: L, getStopStyle: S } = WR(i, o, f, g), { inputId: I, isLabeledByFormItem: T } = su(i, {
formItemContext: a
}), _ = Ns(), E = computed(() => i.inputSize || _.value), C = computed(() => i.ariaLabel || s("el.slider.defaultLabel", {
min: i.min,
max: i.max
})), P = computed(() => i.range ? i.rangeStartLabel || s("el.slider.defaultRangeStartLabel") : C.value), b = computed(() => i.formatValueText ? i.formatValueText(Y.value) : `${Y.value}`), F = computed(() => i.rangeEndLabel || s("el.slider.defaultRangeEndLabel")), D = computed(() => i.formatValueText ? i.formatValueText(te.value) : `${te.value}`), N = computed(() => [
r.b(),
r.m(_.value),
r.is("vertical", i.vertical),
{ [r.m("with-input")]: i.showInput }
]), B = PR(i);
jR(i, o, f, g, t, a);
const U = computed(() => {
const le = [i.min, i.max, i.step].map((W) => {
const $ = `${W}`.split(".")[1];
return $ ? $.length : 0;
});
return Math.max.apply(null, le);
}), { sliderWrapper: G } = FR(i, o, y), { firstValue: Y, secondValue: te, sliderSize: ae } = toRefs(o), ie = (le) => {
o.dragging = le;
};
return un(G, "touchstart", m, {
passive: false
}), un(G, "touchmove", m, {
passive: false
}), provide(my, {
...toRefs(i),
sliderSize: ae,
disabled: h6,
precision: U,
emitChange: v,
resetSize: y,
updateDragging: ie
}), e({
onSliderClick: x
}), (le, W) => {
var $, j;
return openBlock(), createElementBlock("div", {
id: le.range ? unref(I) : void 0,
ref_key: "sliderWrapper",
ref: G,
class: normalizeClass(unref(N)),
role: le.range ? "group" : void 0,
"aria-label": le.range && !unref(T) ? unref(C) : void 0,
"aria-labelledby": le.range && unref(T) ? ($ = unref(a)) == null ? void 0 : $.labelId : void 0
}, [
createBaseVNode("div", {
ref_key: "slider",
ref: c,
class: normalizeClass([
unref(r).e("runway"),
{ "show-input": le.showInput && !le.range },
unref(r).is("disabled", unref(h6))
]),
style: normalizeStyle(unref(p)),
onMousedown: unref(w),
onTouchstartPassive: unref(w)
}, [
createBaseVNode("div", {
class: normalizeClass(unref(r).e("bar")),
style: normalizeStyle(unref(u))
}, null, 6),
createVNode(Vm, {
id: le.range ? void 0 : unref(I),
ref_key: "firstButton",
ref: l,
"model-value": unref(Y),
vertical: le.vertical,
"tooltip-class": le.tooltipClass,
placement: le.placement,
role: "slider",
"aria-label": le.range || !unref(T) ? unref(P) : void 0,
"aria-labelledby": !le.range && unref(T) ? (j = unref(a)) == null ? void 0 : j.labelId : void 0,
"aria-valuemin": le.min,
"aria-valuemax": le.range ? unref(te) : le.max,
"aria-valuenow": unref(Y),
"aria-valuetext": unref(b),
"aria-orientation": le.vertical ? "vertical" : "horizontal",
"aria-disabled": unref(h6),
"onUpdate:modelValue": unref(M)
}, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
le.range ? (openBlock(), createBlock(Vm, {
key: 0,
ref_key: "secondButton",
ref: d,
"model-value": unref(te),
vertical: le.vertical,
"tooltip-class": le.tooltipClass,
placement: le.placement,
role: "slider",
"aria-label": unref(F),
"aria-valuemin": unref(Y),
"aria-valuemax": le.max,
"aria-valuenow": unref(te),
"aria-valuetext": unref(D),
"aria-orientation": le.vertical ? "vertical" : "horizontal",
"aria-disabled": unref(h6),
"onUpdate:modelValue": unref(R)
}, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : createCommentVNode("v-if", true),
le.showStops ? (openBlock(), createElementBlock("div", { key: 1 }, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(L), (re, V) => (openBlock(), createElementBlock("div", {
key: V,
class: normalizeClass(unref(r).e("stop")),
style: normalizeStyle(unref(S)(re))
}, null, 6))), 128))
])) : createCommentVNode("v-if", true),
unref(B).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
createBaseVNode("div", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(B), (re, V) => (openBlock(), createElementBlock("div", {
key: V,
style: normalizeStyle(unref(S)(re.position)),
class: normalizeClass([unref(r).e("stop"), unref(r).e("marks-stop")])
}, null, 6))), 128))
]),
createBaseVNode("div", {
class: normalizeClass(unref(r).e("marks"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(B), (re, V) => (openBlock(), createBlock(unref(KR), {
key: V,
mark: re.mark,
style: normalizeStyle(unref(S)(re.position)),
onMousedown: withModifiers((H) => unref(A)(re.position), ["stop"])
}, null, 8, ["mark", "style", "onMousedown"]))), 128))
], 2)
], 64)) : createCommentVNode("v-if", true)
], 46, ["onMousedown", "onTouchstartPassive"]),
le.showInput && !le.range ? (openBlock(), createBlock(unref(dr), {
key: 0,
ref: "input",
"model-value": unref(Y),
class: normalizeClass(unref(r).e("input")),
step: le.step,
disabled: unref(h6),
controls: le.showInputControls,
min: le.min,
max: le.max,
precision: unref(U),
debounce: le.debounce,
size: unref(E),
"onUpdate:modelValue": unref(M),
onChange: unref(v)
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "debounce", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true)
], 10, ["id", "role", "aria-label", "aria-labelledby"]);
};
}
});
var e3 = st(QR, [["__file", "slider.vue"]]);
var ti = on(e3);
var uu = Symbol("tabsRootContextKey");
var t3 = at({
tabs: {
type: Je(Array),
default: () => Ki([])
}
});
var gy = "ElTabBar";
var n3 = defineComponent({
name: gy
});
var i3 = defineComponent({
...n3,
props: t3,
setup(n, { expose: e }) {
const t = n, i = getCurrentInstance(), r = inject(uu);
r || Xo(gy, "");
const s = nt("tabs"), o = ref(), a = ref(), c = () => {
let g = 0, p = 0;
const u = ["top", "bottom"].includes(r.props.tabPosition) ? "width" : "height", y = u === "width" ? "x" : "y", v = y === "x" ? "left" : "top";
return t.tabs.every((m) => {
var x, w;
const A = (w = (x = i.parent) == null ? void 0 : x.refs) == null ? void 0 : w[`tab-${m.uid}`];
if (!A)
return false;
if (!m.active)
return true;
g = A[`offset${Rr(v)}`], p = A[`client${Rr(u)}`];
const M = window.getComputedStyle(A);
return u === "width" && (p -= Number.parseFloat(M.paddingLeft) + Number.parseFloat(M.paddingRight), g += Number.parseFloat(M.paddingLeft)), false;
}), {
[u]: `${p}px`,
transform: `translate${Rr(y)}(${g}px)`
};
}, l = () => a.value = c(), d = [], h6 = () => {
var g;
d.forEach((u) => u.stop()), d.length = 0;
const p = (g = i.parent) == null ? void 0 : g.refs;
if (p) {
for (const u in p)
if (u.startsWith("tab-")) {
const y = p[u];
y && d.push(Yn(y, l));
}
}
};
watch(() => t.tabs, async () => {
await nextTick(), l(), h6();
}, { immediate: true });
const f = Yn(o, () => l());
return onBeforeUnmount(() => {
d.forEach((g) => g.stop()), d.length = 0, f.stop();
}), e({
ref: o,
update: l
}), (g, p) => (openBlock(), createElementBlock("div", {
ref_key: "barRef",
ref: o,
class: normalizeClass([unref(s).e("active-bar"), unref(s).is(unref(r).props.tabPosition)]),
style: normalizeStyle(a.value)
}, null, 6));
}
});
var r3 = st(i3, [["__file", "tab-bar.vue"]]);
var s3 = at({
panes: {
type: Je(Array),
default: () => Ki([])
},
currentName: {
type: [String, Number],
default: ""
},
editable: Boolean,
type: {
type: String,
values: ["card", "border-card", ""],
default: ""
},
stretch: Boolean
});
var o3 = {
tabClick: (n, e, t) => t instanceof Event,
tabRemove: (n, e) => e instanceof Event
};
var km = "ElTabNav";
var a3 = defineComponent({
name: km,
props: s3,
emits: o3,
setup(n, {
expose: e,
emit: t
}) {
const i = inject(uu);
i || Xo(km, "");
const r = nt("tabs"), s = bw(), o = Pw(), a = ref(), c = ref(), l = ref(), d = ref(), h6 = ref(false), f = ref(0), g = ref(false), p = ref(true), u = computed(() => ["top", "bottom"].includes(i.props.tabPosition) ? "width" : "height"), y = computed(() => ({
transform: `translate${u.value === "width" ? "X" : "Y"}(-${f.value}px)`
})), v = () => {
if (!a.value)
return;
const L = a.value[`offset${Rr(u.value)}`], S = f.value;
if (!S)
return;
const I = S > L ? S - L : 0;
f.value = I;
}, m = () => {
if (!a.value || !c.value)
return;
const L = c.value[`offset${Rr(u.value)}`], S = a.value[`offset${Rr(u.value)}`], I = f.value;
if (L - I <= S)
return;
const T = L - I > S * 2 ? I + S : L - S;
f.value = T;
}, x = async () => {
const L = c.value;
if (!h6.value || !l.value || !a.value || !L)
return;
await nextTick();
const S = l.value.querySelector(".is-active");
if (!S)
return;
const I = a.value, T = ["top", "bottom"].includes(i.props.tabPosition), _ = S.getBoundingClientRect(), E = I.getBoundingClientRect(), C = T ? L.offsetWidth - E.width : L.offsetHeight - E.height, P = f.value;
let b = P;
T ? (_.left < E.left && (b = P - (E.left - _.left)), _.right > E.right && (b = P + _.right - E.right)) : (_.top < E.top && (b = P - (E.top - _.top)), _.bottom > E.bottom && (b = P + (_.bottom - E.bottom))), b = Math.max(b, 0), f.value = Math.min(b, C);
}, w = () => {
var L;
if (!c.value || !a.value)
return;
n.stretch && ((L = d.value) == null || L.update());
const S = c.value[`offset${Rr(u.value)}`], I = a.value[`offset${Rr(u.value)}`], T = f.value;
I < S ? (h6.value = h6.value || {}, h6.value.prev = T, h6.value.next = T + I < S, S - T < I && (f.value = S - I)) : (h6.value = false, T > 0 && (f.value = 0));
}, A = (L) => {
const S = L.code, {
up: I,
down: T,
left: _,
right: E
} = Li;
if (![I, T, _, E].includes(S))
return;
const C = Array.from(L.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")), P = C.indexOf(L.target);
let b;
S === _ || S === I ? P === 0 ? b = C.length - 1 : b = P - 1 : P < C.length - 1 ? b = P + 1 : b = 0, C[b].focus({
preventScroll: true
}), C[b].click(), M();
}, M = () => {
p.value && (g.value = true);
}, R = () => g.value = false;
return watch(s, (L) => {
L === "hidden" ? p.value = false : L === "visible" && setTimeout(() => p.value = true, 50);
}), watch(o, (L) => {
L ? setTimeout(() => p.value = true, 50) : p.value = false;
}), Yn(l, w), onMounted(() => setTimeout(() => x(), 0)), onUpdated(() => w()), e({
scrollToActiveTab: x,
removeFocus: R
}), () => {
const L = h6.value ? [createVNode("span", {
class: [r.e("nav-prev"), r.is("disabled", !h6.value.prev)],
onClick: v
}, [createVNode(It, null, {
default: () => [createVNode(zr, null, null)]
})]), createVNode("span", {
class: [r.e("nav-next"), r.is("disabled", !h6.value.next)],
onClick: m
}, [createVNode(It, null, {
default: () => [createVNode(Vr, null, null)]
})])] : null, S = n.panes.map((I, T) => {
var _, E, C, P;
const b = I.uid, F = I.props.disabled, D = (E = (_ = I.props.name) != null ? _ : I.index) != null ? E : `${T}`, N = !F && (I.isClosable || n.editable);
I.index = `${T}`;
const B = N ? createVNode(It, {
class: "is-icon-close",
onClick: (Y) => t("tabRemove", I, Y)
}, {
default: () => [createVNode(Zh, null, null)]
}) : null, U = ((P = (C = I.slots).label) == null ? void 0 : P.call(C)) || I.props.label, G = !F && I.active ? 0 : -1;
return createVNode("div", {
ref: `tab-${b}`,
class: [r.e("item"), r.is(i.props.tabPosition), r.is("active", I.active), r.is("disabled", F), r.is("closable", N), r.is("focus", g.value)],
id: `tab-${D}`,
key: `tab-${b}`,
"aria-controls": `pane-${D}`,
role: "tab",
"aria-selected": I.active,
tabindex: G,
onFocus: () => M(),
onBlur: () => R(),
onClick: (Y) => {
R(), t("tabClick", I, D, Y);
},
onKeydown: (Y) => {
N && (Y.code === Li.delete || Y.code === Li.backspace) && t("tabRemove", I, Y);
}
}, [U, B]);
});
return createVNode("div", {
ref: l,
class: [r.e("nav-wrap"), r.is("scrollable", !!h6.value), r.is(i.props.tabPosition)]
}, [L, createVNode("div", {
class: r.e("nav-scroll"),
ref: a
}, [createVNode("div", {
class: [r.e("nav"), r.is(i.props.tabPosition), r.is("stretch", n.stretch && ["top", "bottom"].includes(i.props.tabPosition))],
ref: c,
style: y.value,
role: "tablist",
onKeydown: A
}, [n.type ? null : createVNode(r3, {
ref: d,
tabs: [...n.panes]
}, null), S])])]);
};
}
});
var l3 = at({
type: {
type: String,
values: ["card", "border-card", ""],
default: ""
},
closable: Boolean,
addable: Boolean,
modelValue: {
type: [String, Number]
},
editable: Boolean,
tabPosition: {
type: String,
values: ["top", "right", "bottom", "left"],
default: "top"
},
beforeLeave: {
type: Je(Function),
default: () => true
},
stretch: Boolean
});
var ju = (n) => vn(n) || yt(n);
var c3 = {
[At]: (n) => ju(n),
tabClick: (n, e) => e instanceof Event,
tabChange: (n) => ju(n),
edit: (n, e) => ["remove", "add"].includes(e),
tabRemove: (n) => ju(n),
tabAdd: () => true
};
var u3 = defineComponent({
name: "ElTabs",
props: l3,
emits: c3,
setup(n, {
emit: e,
slots: t,
expose: i
}) {
var r;
const s = nt("tabs"), o = computed(() => ["left", "right"].includes(n.tabPosition)), {
children: a,
addChild: c,
removeChild: l
} = RE(getCurrentInstance(), "ElTabPane"), d = ref(), h6 = ref((r = n.modelValue) != null ? r : "0"), f = async (v, m = false) => {
var x, w, A;
if (!(h6.value === v || di(v)))
try {
await ((x = n.beforeLeave) == null ? void 0 : x.call(n, v, h6.value)) !== false && (h6.value = v, m && (e(At, v), e("tabChange", v)), (A = (w = d.value) == null ? void 0 : w.removeFocus) == null || A.call(w));
} catch {
}
}, g = (v, m, x) => {
v.props.disabled || (f(m, true), e("tabClick", v, x));
}, p = (v, m) => {
v.props.disabled || di(v.props.name) || (m.stopPropagation(), e("edit", v.props.name, "remove"), e("tabRemove", v.props.name));
}, u = () => {
e("edit", void 0, "add"), e("tabAdd");
};
watch(() => n.modelValue, (v) => f(v)), watch(h6, async () => {
var v;
await nextTick(), (v = d.value) == null || v.scrollToActiveTab();
}), provide(uu, {
props: n,
currentName: h6,
registerPane: (v) => {
a.value.push(v);
},
sortPane: c,
unregisterPane: l
}), i({
currentName: h6
});
const y = ({
render: v
}) => v();
return () => {
const v = t["add-icon"], m = n.editable || n.addable ? createVNode("div", {
class: [s.e("new-tab"), o.value && s.e("new-tab-vertical")],
tabindex: "0",
onClick: u,
onKeydown: (A) => {
A.code === Li.enter && u();
}
}, [v ? renderSlot(t, "add-icon") : createVNode(It, {
class: s.is("icon-plus")
}, {
default: () => [createVNode(tu, null, null)]
})]) : null, x = createVNode("div", {
class: [s.e("header"), o.value && s.e("header-vertical"), s.is(n.tabPosition)]
}, [createVNode(y, {
render: () => {
const A = a.value.some((M) => M.slots.label);
return createVNode(a3, {
ref: d,
currentName: h6.value,
editable: n.editable,
type: n.type,
panes: a.value,
stretch: n.stretch,
onTabClick: g,
onTabRemove: p
}, {
$stable: !A
});
}
}, null), m]), w = createVNode("div", {
class: s.e("content")
}, [renderSlot(t, "default")]);
return createVNode("div", {
class: [s.b(), s.m(n.tabPosition), {
[s.m("card")]: n.type === "card",
[s.m("border-card")]: n.type === "border-card"
}]
}, [w, x]);
};
}
});
var h3 = at({
label: {
type: String,
default: ""
},
name: {
type: [String, Number]
},
closable: Boolean,
disabled: Boolean,
lazy: Boolean
});
var vy = "ElTabPane";
var d3 = defineComponent({
name: vy
});
var f3 = defineComponent({
...d3,
props: h3,
setup(n) {
const e = n, t = getCurrentInstance(), i = useSlots(), r = inject(uu);
r || Xo(vy, "usage: ");
const s = nt("tab-pane"), o = ref(), a = computed(() => e.closable || r.props.closable), c = Mp(() => {
var g;
return r.currentName.value === ((g = e.name) != null ? g : o.value);
}), l = ref(c.value), d = computed(() => {
var g;
return (g = e.name) != null ? g : o.value;
}), h6 = Mp(() => !e.lazy || l.value || c.value);
watch(c, (g) => {
g && (l.value = true);
});
const f = reactive({
uid: t.uid,
slots: i,
props: e,
paneName: d,
active: c,
index: o,
isClosable: a
});
return r.registerPane(f), onMounted(() => {
r.sortPane(f);
}), onUnmounted(() => {
r.unregisterPane(f.uid);
}), (g, p) => unref(h6) ? withDirectives((openBlock(), createElementBlock("div", {
key: 0,
id: `pane-${unref(d)}`,
class: normalizeClass(unref(s).b()),
role: "tabpanel",
"aria-hidden": !unref(c),
"aria-labelledby": `tab-${unref(d)}`
}, [
renderSlot(g.$slots, "default")
], 10, ["id", "aria-hidden", "aria-labelledby"])), [
[vShow, unref(c)]
]) : createCommentVNode("v-if", true);
}
});
var yy = st(f3, [["__file", "tab-pane.vue"]]);
var by = on(u3, {
TabPane: yy
});
var xy = vi(yy);
function p3(n) {
let e;
const t = ref(false), i = reactive({
...n,
originalPosition: "",
originalOverflow: "",
visible: false
});
function r(f) {
i.text = f;
}
function s() {
const f = i.parent, g = h6.ns;
if (!f.vLoadingAddClassList) {
let p = f.getAttribute("loading-number");
p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (Oc(f, g.bm("parent", "relative")), f.removeAttribute("loading-number")), Oc(f, g.bm("parent", "hidden"));
}
o(), d.unmount();
}
function o() {
var f, g;
(g = (f = h6.$el) == null ? void 0 : f.parentNode) == null || g.removeChild(h6.$el);
}
function a() {
var f;
n.beforeClose && !n.beforeClose() || (t.value = true, clearTimeout(e), e = setTimeout(c, 400), i.visible = false, (f = n.closed) == null || f.call(n));
}
function c() {
if (!t.value)
return;
const f = i.parent;
t.value = false, f.vLoadingAddClassList = void 0, s();
}
const l = defineComponent({
name: "ElLoading",
setup(f, { expose: g }) {
const { ns: p, zIndex: u } = UE("loading");
return g({
ns: p,
zIndex: u
}), () => {
const y = i.spinner || i.svg, v = h("svg", {
class: "circular",
viewBox: i.svgViewBox ? i.svgViewBox : "0 0 50 50",
...y ? { innerHTML: y } : {}
}, [
h("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]), m = i.text ? h("p", { class: p.b("text") }, [i.text]) : void 0;
return h(Transition, {
name: p.b("fade"),
onAfterLeave: c
}, {
default: withCtx(() => [
withDirectives(createVNode("div", {
style: {
backgroundColor: i.background || ""
},
class: [
p.b("mask"),
i.customClass,
i.fullscreen ? "is-fullscreen" : ""
]
}, [
h("div", {
class: p.b("spinner")
}, [v, m])
]), [[vShow, i.visible]])
])
});
};
}
}), d = createApp(l), h6 = d.mount(document.createElement("div"));
return {
...toRefs(i),
setText: r,
removeElLoadingChild: o,
close: a,
handleAfterLeave: c,
vm: h6,
get $el() {
return h6.$el;
}
};
}
var Pl;
var ed = function(n = {}) {
if (!en)
return;
const e = m3(n);
if (e.fullscreen && Pl)
return Pl;
const t = p3({
...e,
closed: () => {
var r;
(r = e.closed) == null || r.call(e), e.fullscreen && (Pl = void 0);
}
});
g3(e, e.parent, t), Gm(e, e.parent, t), e.parent.vLoadingAddClassList = () => Gm(e, e.parent, t);
let i = e.parent.getAttribute("loading-number");
return i ? i = `${Number.parseInt(i) + 1}` : i = "1", e.parent.setAttribute("loading-number", i), e.parent.appendChild(t.$el), nextTick(() => t.visible.value = e.visible), e.fullscreen && (Pl = t), t;
};
var m3 = (n) => {
var e, t, i, r;
let s;
return vn(n.target) ? s = (e = document.querySelector(n.target)) != null ? e : document.body : s = n.target || document.body, {
parent: s === document.body || n.body ? document.body : s,
background: n.background || "",
svg: n.svg || "",
svgViewBox: n.svgViewBox || "",
spinner: n.spinner || false,
text: n.text || "",
fullscreen: s === document.body && ((t = n.fullscreen) != null ? t : true),
lock: (i = n.lock) != null ? i : false,
customClass: n.customClass || "",
visible: (r = n.visible) != null ? r : true,
beforeClose: n.beforeClose,
closed: n.closed,
target: s
};
};
var g3 = async (n, e, t) => {
const { nextZIndex: i } = t.vm.zIndex || t.vm._.exposed.zIndex, r = {};
if (n.fullscreen)
t.originalPosition.value = ca(document.body, "position"), t.originalOverflow.value = ca(document.body, "overflow"), r.zIndex = i();
else if (n.parent === document.body) {
t.originalPosition.value = ca(document.body, "position"), await nextTick();
for (const s of ["top", "left"]) {
const o = s === "top" ? "scrollTop" : "scrollLeft";
r[s] = `${n.target.getBoundingClientRect()[s] + document.body[o] + document.documentElement[o] - Number.parseInt(ca(document.body, `margin-${s}`), 10)}px`;
}
for (const s of ["height", "width"])
r[s] = `${n.target.getBoundingClientRect()[s]}px`;
} else
t.originalPosition.value = ca(e, "position");
for (const [s, o] of Object.entries(r))
t.$el.style[s] = o;
};
var Gm = (n, e, t) => {
const i = t.vm.ns || t.vm._.exposed.ns;
["absolute", "fixed", "sticky"].includes(t.originalPosition.value) ? Oc(e, i.bm("parent", "relative")) : sm(e, i.bm("parent", "relative")), n.fullscreen && n.lock ? sm(e, i.bm("parent", "hidden")) : Oc(e, i.bm("parent", "hidden"));
};
var Ec = Symbol("ElLoading");
var Hm = (n, e) => {
var t, i, r, s;
const o = e.instance, a = (f) => Tn(e.value) ? e.value[f] : void 0, c = (f) => {
const g = vn(f) && (o == null ? void 0 : o[f]) || f;
return g && ref(g);
}, l = (f) => c(a(f) || n.getAttribute(`element-loading-${Vw(f)}`)), d = (t = a("fullscreen")) != null ? t : e.modifiers.fullscreen, h6 = {
text: l("text"),
svg: l("svg"),
svgViewBox: l("svgViewBox"),
spinner: l("spinner"),
background: l("background"),
customClass: l("customClass"),
fullscreen: d,
target: (i = a("target")) != null ? i : d ? void 0 : n,
body: (r = a("body")) != null ? r : e.modifiers.body,
lock: (s = a("lock")) != null ? s : e.modifiers.lock
};
n[Ec] = {
options: h6,
instance: ed(h6)
};
};
var v3 = (n, e) => {
for (const t of Object.keys(e))
isRef(e[t]) && (e[t].value = n[t]);
};
var td = {
mounted(n, e) {
e.value && Hm(n, e);
},
updated(n, e) {
const t = n[Ec];
e.oldValue !== e.value && (e.value && !e.oldValue ? Hm(n, e) : e.value && e.oldValue ? Tn(e.value) && v3(e.value, t.options) : t == null || t.instance.close());
},
unmounted(n) {
var e;
(e = n[Ec]) == null || e.instance.close(), n[Ec] = null;
}
};
var y3 = {
install(n) {
n.directive("loading", td), n.config.globalProperties.$loading = ed;
},
directive: td,
service: ed
};
var My = { exports: {} };
var Wm = {};
var jm;
function b3() {
return jm || (jm = 1, function(n) {
var e = function() {
try {
return !!Symbol.iterator;
} catch {
return false;
}
}, t = e(), i = function(l) {
var d = {
next: function() {
var h6 = l.shift();
return { done: h6 === void 0, value: h6 };
}
};
return t && (d[Symbol.iterator] = function() {
return d;
}), d;
}, r = function(l) {
return encodeURIComponent(l).replace(/%20/g, "+");
}, s = function(l) {
return decodeURIComponent(String(l).replace(/\+/g, " "));
}, o = function() {
var l = function(h6) {
Object.defineProperty(this, "_entries", { writable: true, value: {} });
var f = typeof h6;
if (f !== "undefined") if (f === "string")
h6 !== "" && this._fromString(h6);
else if (h6 instanceof l) {
var g = this;
h6.forEach(function(v, m) {
g.append(m, v);
});
} else if (h6 !== null && f === "object")
if (Object.prototype.toString.call(h6) === "[object Array]")
for (var p = 0; p < h6.length; p++) {
var u = h6[p];
if (Object.prototype.toString.call(u) === "[object Array]" || u.length !== 2)
this.append(u[0], u[1]);
else
throw new TypeError("Expected [string, any] as entry at index " + p + " of URLSearchParams's input");
}
else
for (var y in h6)
h6.hasOwnProperty(y) && this.append(y, h6[y]);
else
throw new TypeError("Unsupported input's type for URLSearchParams");
}, d = l.prototype;
d.append = function(h6, f) {
h6 in this._entries ? this._entries[h6].push(String(f)) : this._entries[h6] = [String(f)];
}, d.delete = function(h6) {
delete this._entries[h6];
}, d.get = function(h6) {
return h6 in this._entries ? this._entries[h6][0] : null;
}, d.getAll = function(h6) {
return h6 in this._entries ? this._entries[h6].slice(0) : [];
}, d.has = function(h6) {
return h6 in this._entries;
}, d.set = function(h6, f) {
this._entries[h6] = [String(f)];
}, d.forEach = function(h6, f) {
var g;
for (var p in this._entries)
if (this._entries.hasOwnProperty(p)) {
g = this._entries[p];
for (var u = 0; u < g.length; u++)
h6.call(f, g[u], p, this);
}
}, d.keys = function() {
var h6 = [];
return this.forEach(function(f, g) {
h6.push(g);
}), i(h6);
}, d.values = function() {
var h6 = [];
return this.forEach(function(f) {
h6.push(f);
}), i(h6);
}, d.entries = function() {
var h6 = [];
return this.forEach(function(f, g) {
h6.push([g, f]);
}), i(h6);
}, t && (d[Symbol.iterator] = d.entries), d.toString = function() {
var h6 = [];
return this.forEach(function(f, g) {
h6.push(r(g) + "=" + r(f));
}), h6.join("&");
}, n.URLSearchParams = l;
}, a = function() {
try {
var l = n.URLSearchParams;
return new l("?a=1").toString() === "a=1" && typeof l.prototype.set == "function" && typeof l.prototype.entries == "function";
} catch {
return false;
}
};
a() || o();
var c = n.URLSearchParams.prototype;
typeof c.sort != "function" && (c.sort = function() {
var l = this, d = [];
this.forEach(function(f, g) {
d.push([g, f]), l._entries || l.delete(g);
}), d.sort(function(f, g) {
return f[0] < g[0] ? -1 : f[0] > g[0] ? 1 : 0;
}), l._entries && (l._entries = {});
for (var h6 = 0; h6 < d.length; h6++)
this.append(d[h6][0], d[h6][1]);
}), typeof c._fromString != "function" && Object.defineProperty(c, "_fromString", {
enumerable: false,
configurable: false,
writable: false,
value: function(l) {
if (this._entries)
this._entries = {};
else {
var d = [];
this.forEach(function(p, u) {
d.push(u);
});
for (var h6 = 0; h6 < d.length; h6++)
this.delete(d[h6]);
}
l = l.replace(/^\?/, "");
for (var f = l.split("&"), g, h6 = 0; h6 < f.length; h6++)
g = f[h6].split("="), this.append(
s(g[0]),
g.length > 1 ? s(g[1]) : ""
);
}
});
}(
typeof Lr < "u" ? Lr : typeof window < "u" ? window : typeof self < "u" ? self : Lr
), function(n) {
var e = function() {
try {
var r = new n.URL("b", "http://a");
return r.pathname = "c d", r.href === "http://a/c%20d" && r.searchParams;
} catch {
return false;
}
}, t = function() {
var r = n.URL, s = function(c, l) {
typeof c != "string" && (c = String(c)), l && typeof l != "string" && (l = String(l));
var d = document, h6;
if (l && (n.location === void 0 || l !== n.location.href)) {
l = l.toLowerCase(), d = document.implementation.createHTMLDocument(""), h6 = d.createElement("base"), h6.href = l, d.head.appendChild(h6);
try {
if (h6.href.indexOf(l) !== 0) throw new Error(h6.href);
} catch (x) {
throw new Error("URL unable to set base " + l + " due to " + x);
}
}
var f = d.createElement("a");
f.href = c, h6 && (d.body.appendChild(f), f.href = f.href);
var g = d.createElement("input");
if (g.type = "url", g.value = c, f.protocol === ":" || !/:/.test(f.href) || !g.checkValidity() && !l)
throw new TypeError("Invalid URL");
Object.defineProperty(this, "_anchorElement", {
value: f
});
var p = new n.URLSearchParams(this.search), u = true, y = true, v = this;
["append", "delete", "set"].forEach(function(x) {
var w = p[x];
p[x] = function() {
w.apply(p, arguments), u && (y = false, v.search = p.toString(), y = true);
};
}), Object.defineProperty(this, "searchParams", {
value: p,
enumerable: true
});
var m = void 0;
Object.defineProperty(this, "_updateSearchParams", {
enumerable: false,
configurable: false,
writable: false,
value: function() {
this.search !== m && (m = this.search, y && (u = false, this.searchParams._fromString(this.search), u = true));
}
});
}, o = s.prototype, a = function(c) {
Object.defineProperty(o, c, {
get: function() {
return this._anchorElement[c];
},
set: function(l) {
this._anchorElement[c] = l;
},
enumerable: true
});
};
["hash", "host", "hostname", "port", "protocol"].forEach(function(c) {
a(c);
}), Object.defineProperty(o, "search", {
get: function() {
return this._anchorElement.search;
},
set: function(c) {
this._anchorElement.search = c, this._updateSearchParams();
},
enumerable: true
}), Object.defineProperties(o, {
toString: {
get: function() {
var c = this;
return function() {
return c.href;
};
}
},
href: {
get: function() {
return this._anchorElement.href.replace(/\?$/, "");
},
set: function(c) {
this._anchorElement.href = c, this._updateSearchParams();
},
enumerable: true
},
pathname: {
get: function() {
return this._anchorElement.pathname.replace(/(^\/?)/, "/");
},
set: function(c) {
this._anchorElement.pathname = c;
},
enumerable: true
},
origin: {
get: function() {
var c = { "http:": 80, "https:": 443, "ftp:": 21 }[this._anchorElement.protocol], l = this._anchorElement.port != c && this._anchorElement.port !== "";
return this._anchorElement.protocol + "//" + this._anchorElement.hostname + (l ? ":" + this._anchorElement.port : "");
},
enumerable: true
},
password: {
// TODO
get: function() {
return "";
},
set: function(c) {
},
enumerable: true
},
username: {
// TODO
get: function() {
return "";
},
set: function(c) {
},
enumerable: true
}
}), s.createObjectURL = function(c) {
return r.createObjectURL.apply(r, arguments);
}, s.revokeObjectURL = function(c) {
return r.revokeObjectURL.apply(r, arguments);
}, n.URL = s;
};
if (e() || t(), n.location !== void 0 && !("origin" in n.location)) {
var i = function() {
return n.location.protocol + "//" + n.location.hostname + (n.location.port ? ":" + n.location.port : "");
};
try {
Object.defineProperty(n.location, "origin", {
get: i,
enumerable: true
});
} catch {
setInterval(function() {
n.location.origin = i();
}, 100);
}
}
}(
typeof Lr < "u" ? Lr : typeof window < "u" ? window : typeof self < "u" ? self : Lr
)), Wm;
}
var gf = "130";
var x3 = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
var M3 = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
var wy = 0;
var nd = 1;
var Ay = 2;
var w3 = 3;
var A3 = 0;
var vf = 1;
var Sy = 2;
var po = 3;
var Hr = 0;
var jt = 1;
var Wr = 2;
var yf = 1;
var S3 = 2;
var tr = 0;
var vo = 1;
var id = 2;
var rd = 3;
var sd = 4;
var _y = 5;
var ps = 100;
var Ty = 101;
var Ey = 102;
var od = 103;
var ad = 104;
var Cy = 200;
var Ly = 201;
var Ry = 202;
var Fy = 203;
var bf = 204;
var xf = 205;
var Py = 206;
var Iy = 207;
var Oy = 208;
var Dy = 209;
var Ny = 210;
var By = 0;
var Uy = 1;
var zy = 2;
var Vc = 3;
var Vy = 4;
var ky = 5;
var Gy = 6;
var Hy = 7;
var al = 0;
var Wy = 1;
var jy = 2;
var Ir = 0;
var $y = 1;
var Zy = 2;
var Xy = 3;
var Yy = 4;
var Jy = 5;
var hu = 300;
var ll = 301;
var cl = 302;
var kc = 303;
var Gc = 304;
var ea = 306;
var ul = 307;
var jr = 1e3;
var hn2 = 1001;
var Eo = 1002;
var $t = 1003;
var ka = 1004;
var _3 = 1004;
var Ga = 1005;
var T3 = 1005;
var zt = 1006;
var du = 1007;
var E3 = 1007;
var fr = 1008;
var C3 = 1008;
var Ts = 1009;
var Ky = 1010;
var qy = 1011;
var Ha = 1012;
var Qy = 1013;
var Ra = 1014;
var qi = 1015;
var Ms = 1016;
var eb = 1017;
var tb = 1018;
var nb = 1019;
var yo = 1020;
var ib = 1021;
var nr = 1022;
var Gn = 1023;
var rb = 1024;
var sb = 1025;
var ob = Gn;
var ws = 1026;
var Co = 1027;
var ab = 1028;
var lb = 1029;
var cb = 1030;
var ub = 1031;
var hb = 1032;
var db = 1033;
var ld = 33776;
var cd = 33777;
var ud = 33778;
var hd = 33779;
var dd = 35840;
var fd = 35841;
var pd = 35842;
var md = 35843;
var fb = 36196;
var gd = 37492;
var vd = 37496;
var pb = 37808;
var mb = 37809;
var gb = 37810;
var vb = 37811;
var yb = 37812;
var bb = 37813;
var xb = 37814;
var Mb = 37815;
var wb = 37816;
var Ab = 37817;
var Sb = 37818;
var _b = 37819;
var Tb = 37820;
var Eb = 37821;
var Cb = 36492;
var Lb = 37840;
var Rb = 37841;
var Fb = 37842;
var Pb = 37843;
var Ib = 37844;
var Ob = 37845;
var Db = 37846;
var Nb = 37847;
var Bb = 37848;
var Ub = 37849;
var zb = 37850;
var Vb = 37851;
var kb = 37852;
var Gb = 37853;
var Hb = 2200;
var Wb = 2201;
var jb = 2202;
var Lo = 2300;
var Es = 2301;
var Cc = 2302;
var gs = 2400;
var vs = 2401;
var Wa = 2402;
var fu = 2500;
var Mf = 2501;
var $b = 0;
var Zb = 1;
var wf = 2;
var Cn = 3e3;
var Cs = 3001;
var pu = 3007;
var mu = 3002;
var Xb = 3003;
var Af = 3004;
var Sf = 3005;
var _f = 3006;
var Yb = 3200;
var Jb = 3201;
var Jr = 0;
var Kb = 1;
var L3 = 0;
var Lc = 7680;
var R3 = 7681;
var F3 = 7682;
var P3 = 7683;
var I3 = 34055;
var O3 = 34056;
var D3 = 5386;
var N3 = 512;
var B3 = 513;
var U3 = 514;
var z3 = 515;
var V3 = 516;
var k3 = 517;
var G3 = 518;
var qb = 519;
var Ro = 35044;
var Fo = 35048;
var H3 = 35040;
var W3 = 35045;
var j3 = 35049;
var $3 = 35041;
var Z3 = 35046;
var X3 = 35050;
var Y3 = 35042;
var J3 = "100";
var yd = "300 es";
var Kr = class {
addEventListener(e, t) {
this._listeners === void 0 && (this._listeners = {});
const i = this._listeners;
i[e] === void 0 && (i[e] = []), i[e].indexOf(t) === -1 && i[e].push(t);
}
hasEventListener(e, t) {
if (this._listeners === void 0) return false;
const i = this._listeners;
return i[e] !== void 0 && i[e].indexOf(t) !== -1;
}
removeEventListener(e, t) {
if (this._listeners === void 0) return;
const r = this._listeners[e];
if (r !== void 0) {
const s = r.indexOf(t);
s !== -1 && r.splice(s, 1);
}
}
dispatchEvent(e) {
if (this._listeners === void 0) return;
const i = this._listeners[e.type];
if (i !== void 0) {
e.target = this;
const r = i.slice(0);
for (let s = 0, o = r.length; s < o; s++)
r[s].call(this, e);
e.target = null;
}
}
};
var fn = [];
for (let n = 0; n < 256; n++)
fn[n] = (n < 16 ? "0" : "") + n.toString(16);
var Il = 1234567;
var As = Math.PI / 180;
var ja = 180 / Math.PI;
function Hn() {
const n = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
return (fn[n & 255] + fn[n >> 8 & 255] + fn[n >> 16 & 255] + fn[n >> 24 & 255] + "-" + fn[e & 255] + fn[e >> 8 & 255] + "-" + fn[e >> 16 & 15 | 64] + fn[e >> 24 & 255] + "-" + fn[t & 63 | 128] + fn[t >> 8 & 255] + "-" + fn[t >> 16 & 255] + fn[t >> 24 & 255] + fn[i & 255] + fn[i >> 8 & 255] + fn[i >> 16 & 255] + fn[i >> 24 & 255]).toUpperCase();
}
function gn(n, e, t) {
return Math.max(e, Math.min(t, n));
}
function Tf(n, e) {
return (n % e + e) % e;
}
function K3(n, e, t, i, r) {
return i + (n - e) * (r - i) / (t - e);
}
function q3(n, e, t) {
return n !== e ? (t - n) / (e - n) : 0;
}
function Fa(n, e, t) {
return (1 - t) * n + t * e;
}
function Q3(n, e, t, i) {
return Fa(n, e, 1 - Math.exp(-t * i));
}
function eF(n, e = 1) {
return e - Math.abs(Tf(n, e * 2) - e);
}
function tF(n, e, t) {
return n <= e ? 0 : n >= t ? 1 : (n = (n - e) / (t - e), n * n * (3 - 2 * n));
}
function nF(n, e, t) {
return n <= e ? 0 : n >= t ? 1 : (n = (n - e) / (t - e), n * n * n * (n * (n * 6 - 15) + 10));
}
function iF(n, e) {
return n + Math.floor(Math.random() * (e - n + 1));
}
function rF(n, e) {
return n + Math.random() * (e - n);
}
function sF(n) {
return n * (0.5 - Math.random());
}
function oF(n) {
return n !== void 0 && (Il = n % 2147483647), Il = Il * 16807 % 2147483647, (Il - 1) / 2147483646;
}
function aF(n) {
return n * As;
}
function lF(n) {
return n * ja;
}
function bd(n) {
return (n & n - 1) === 0 && n !== 0;
}
function Qb(n) {
return Math.pow(2, Math.ceil(Math.log(n) / Math.LN2));
}
function ex(n) {
return Math.pow(2, Math.floor(Math.log(n) / Math.LN2));
}
function cF(n, e, t, i, r) {
const s = Math.cos, o = Math.sin, a = s(t / 2), c = o(t / 2), l = s((e + i) / 2), d = o((e + i) / 2), h6 = s((e - i) / 2), f = o((e - i) / 2), g = s((i - e) / 2), p = o((i - e) / 2);
switch (r) {
case "XYX":
n.set(a * d, c * h6, c * f, a * l);
break;
case "YZY":
n.set(c * f, a * d, c * h6, a * l);
break;
case "ZXZ":
n.set(c * h6, c * f, a * d, a * l);
break;
case "XZX":
n.set(a * d, c * p, c * g, a * l);
break;
case "YXY":
n.set(c * g, a * d, c * p, a * l);
break;
case "ZYZ":
n.set(c * p, c * g, a * d, a * l);
break;
default:
console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + r);
}
}
var xd = Object.freeze({
__proto__: null,
DEG2RAD: As,
RAD2DEG: ja,
generateUUID: Hn,
clamp: gn,
euclideanModulo: Tf,
mapLinear: K3,
inverseLerp: q3,
lerp: Fa,
damp: Q3,
pingpong: eF,
smoothstep: tF,
smootherstep: nF,
randInt: iF,
randFloat: rF,
randFloatSpread: sF,
seededRandom: oF,
degToRad: aF,
radToDeg: lF,
isPowerOfTwo: bd,
ceilPowerOfTwo: Qb,
floorPowerOfTwo: ex,
setQuaternionFromProperEuler: cF
});
var Re = class {
constructor(e = 0, t = 0) {
this.x = e, this.y = t;
}
get width() {
return this.x;
}
set width(e) {
this.x = e;
}
get height() {
return this.y;
}
set height(e) {
this.y = e;
}
set(e, t) {
return this.x = e, this.y = t, this;
}
setScalar(e) {
return this.x = e, this.y = e, this;
}
setX(e) {
return this.x = e, this;
}
setY(e) {
return this.y = e, this;
}
setComponent(e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
default:
throw new Error("index is out of range: " + e);
}
return this;
}
getComponent(e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
default:
throw new Error("index is out of range: " + e);
}
}
clone() {
return new this.constructor(this.x, this.y);
}
copy(e) {
return this.x = e.x, this.y = e.y, this;
}
add(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : (this.x += e.x, this.y += e.y, this);
}
addScalar(e) {
return this.x += e, this.y += e, this;
}
addVectors(e, t) {
return this.x = e.x + t.x, this.y = e.y + t.y, this;
}
addScaledVector(e, t) {
return this.x += e.x * t, this.y += e.y * t, this;
}
sub(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : (this.x -= e.x, this.y -= e.y, this);
}
subScalar(e) {
return this.x -= e, this.y -= e, this;
}
subVectors(e, t) {
return this.x = e.x - t.x, this.y = e.y - t.y, this;
}
multiply(e) {
return this.x *= e.x, this.y *= e.y, this;
}
multiplyScalar(e) {
return this.x *= e, this.y *= e, this;
}
divide(e) {
return this.x /= e.x, this.y /= e.y, this;
}
divideScalar(e) {
return this.multiplyScalar(1 / e);
}
applyMatrix3(e) {
const t = this.x, i = this.y, r = e.elements;
return this.x = r[0] * t + r[3] * i + r[6], this.y = r[1] * t + r[4] * i + r[7], this;
}
min(e) {
return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this;
}
max(e) {
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this;
}
clamp(e, t) {
return this.x = Math.max(e.x, Math.min(t.x, this.x)), this.y = Math.max(e.y, Math.min(t.y, this.y)), this;
}
clampScalar(e, t) {
return this.x = Math.max(e, Math.min(t, this.x)), this.y = Math.max(e, Math.min(t, this.y)), this;
}
clampLength(e, t) {
const i = this.length();
return this.divideScalar(i || 1).multiplyScalar(Math.max(e, Math.min(t, i)));
}
floor() {
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
}
ceil() {
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
}
round() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
}
roundToZero() {
return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this;
}
negate() {
return this.x = -this.x, this.y = -this.y, this;
}
dot(e) {
return this.x * e.x + this.y * e.y;
}
cross(e) {
return this.x * e.y - this.y * e.x;
}
lengthSq() {
return this.x * this.x + this.y * this.y;
}
length() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}
manhattanLength() {
return Math.abs(this.x) + Math.abs(this.y);
}
normalize() {
return this.divideScalar(this.length() || 1);
}
angle() {
return Math.atan2(-this.y, -this.x) + Math.PI;
}
distanceTo(e) {
return Math.sqrt(this.distanceToSquared(e));
}
distanceToSquared(e) {
const t = this.x - e.x, i = this.y - e.y;
return t * t + i * i;
}
manhattanDistanceTo(e) {
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y);
}
setLength(e) {
return this.normalize().multiplyScalar(e);
}
lerp(e, t) {
return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this;
}
lerpVectors(e, t, i) {
return this.x = e.x + (t.x - e.x) * i, this.y = e.y + (t.y - e.y) * i, this;
}
equals(e) {
return e.x === this.x && e.y === this.y;
}
fromArray(e, t = 0) {
return this.x = e[t], this.y = e[t + 1], this;
}
toArray(e = [], t = 0) {
return e[t] = this.x, e[t + 1] = this.y, e;
}
fromBufferAttribute(e, t, i) {
return i !== void 0 && console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."), this.x = e.getX(t), this.y = e.getY(t), this;
}
rotateAround(e, t) {
const i = Math.cos(t), r = Math.sin(t), s = this.x - e.x, o = this.y - e.y;
return this.x = s * i - o * r + e.x, this.y = s * r + o * i + e.y, this;
}
random() {
return this.x = Math.random(), this.y = Math.random(), this;
}
};
Re.prototype.isVector2 = true;
var rn = class {
constructor() {
this.elements = [
1,
0,
0,
0,
1,
0,
0,
0,
1
], arguments.length > 0 && console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.");
}
set(e, t, i, r, s, o, a, c, l) {
const d = this.elements;
return d[0] = e, d[1] = r, d[2] = a, d[3] = t, d[4] = s, d[5] = c, d[6] = i, d[7] = o, d[8] = l, this;
}
identity() {
return this.set(
1,
0,
0,
0,
1,
0,
0,
0,
1
), this;
}
copy(e) {
const t = this.elements, i = e.elements;
return t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t[4] = i[4], t[5] = i[5], t[6] = i[6], t[7] = i[7], t[8] = i[8], this;
}
extractBasis(e, t, i) {
return e.setFromMatrix3Column(this, 0), t.setFromMatrix3Column(this, 1), i.setFromMatrix3Column(this, 2), this;
}
setFromMatrix4(e) {
const t = e.elements;
return this.set(
t[0],
t[4],
t[8],
t[1],
t[5],
t[9],
t[2],
t[6],
t[10]
), this;
}
multiply(e) {
return this.multiplyMatrices(this, e);
}
premultiply(e) {
return this.multiplyMatrices(e, this);
}
multiplyMatrices(e, t) {
const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[3], c = i[6], l = i[1], d = i[4], h6 = i[7], f = i[2], g = i[5], p = i[8], u = r[0], y = r[3], v = r[6], m = r[1], x = r[4], w = r[7], A = r[2], M = r[5], R = r[8];
return s[0] = o * u + a * m + c * A, s[3] = o * y + a * x + c * M, s[6] = o * v + a * w + c * R, s[1] = l * u + d * m + h6 * A, s[4] = l * y + d * x + h6 * M, s[7] = l * v + d * w + h6 * R, s[2] = f * u + g * m + p * A, s[5] = f * y + g * x + p * M, s[8] = f * v + g * w + p * R, this;
}
multiplyScalar(e) {
const t = this.elements;
return t[0] *= e, t[3] *= e, t[6] *= e, t[1] *= e, t[4] *= e, t[7] *= e, t[2] *= e, t[5] *= e, t[8] *= e, this;
}
determinant() {
const e = this.elements, t = e[0], i = e[1], r = e[2], s = e[3], o = e[4], a = e[5], c = e[6], l = e[7], d = e[8];
return t * o * d - t * a * l - i * s * d + i * a * c + r * s * l - r * o * c;
}
invert() {
const e = this.elements, t = e[0], i = e[1], r = e[2], s = e[3], o = e[4], a = e[5], c = e[6], l = e[7], d = e[8], h6 = d * o - a * l, f = a * c - d * s, g = l * s - o * c, p = t * h6 + i * f + r * g;
if (p === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
const u = 1 / p;
return e[0] = h6 * u, e[1] = (r * l - d * i) * u, e[2] = (a * i - r * o) * u, e[3] = f * u, e[4] = (d * t - r * c) * u, e[5] = (r * s - a * t) * u, e[6] = g * u, e[7] = (i * c - l * t) * u, e[8] = (o * t - i * s) * u, this;
}
transpose() {
let e;
const t = this.elements;
return e = t[1], t[1] = t[3], t[3] = e, e = t[2], t[2] = t[6], t[6] = e, e = t[5], t[5] = t[7], t[7] = e, this;
}
getNormalMatrix(e) {
return this.setFromMatrix4(e).invert().transpose();
}
transposeIntoArray(e) {
const t = this.elements;
return e[0] = t[0], e[1] = t[3], e[2] = t[6], e[3] = t[1], e[4] = t[4], e[5] = t[7], e[6] = t[2], e[7] = t[5], e[8] = t[8], this;
}
setUvTransform(e, t, i, r, s, o, a) {
const c = Math.cos(s), l = Math.sin(s);
return this.set(
i * c,
i * l,
-i * (c * o + l * a) + o + e,
-r * l,
r * c,
-r * (-l * o + c * a) + a + t,
0,
0,
1
), this;
}
scale(e, t) {
const i = this.elements;
return i[0] *= e, i[3] *= e, i[6] *= e, i[1] *= t, i[4] *= t, i[7] *= t, this;
}
rotate(e) {
const t = Math.cos(e), i = Math.sin(e), r = this.elements, s = r[0], o = r[3], a = r[6], c = r[1], l = r[4], d = r[7];
return r[0] = t * s + i * c, r[3] = t * o + i * l, r[6] = t * a + i * d, r[1] = -i * s + t * c, r[4] = -i * o + t * l, r[7] = -i * a + t * d, this;
}
translate(e, t) {
const i = this.elements;
return i[0] += e * i[2], i[3] += e * i[5], i[6] += e * i[8], i[1] += t * i[2], i[4] += t * i[5], i[7] += t * i[8], this;
}
equals(e) {
const t = this.elements, i = e.elements;
for (let r = 0; r < 9; r++)
if (t[r] !== i[r]) return false;
return true;
}
fromArray(e, t = 0) {
for (let i = 0; i < 9; i++)
this.elements[i] = e[i + t];
return this;
}
toArray(e = [], t = 0) {
const i = this.elements;
return e[t] = i[0], e[t + 1] = i[1], e[t + 2] = i[2], e[t + 3] = i[3], e[t + 4] = i[4], e[t + 5] = i[5], e[t + 6] = i[6], e[t + 7] = i[7], e[t + 8] = i[8], e;
}
clone() {
return new this.constructor().fromArray(this.elements);
}
};
rn.prototype.isMatrix3 = true;
var js;
var Bs = class {
static getDataURL(e) {
if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u")
return e.src;
let t;
if (e instanceof HTMLCanvasElement)
t = e;
else {
js === void 0 && (js = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")), js.width = e.width, js.height = e.height;
const i = js.getContext("2d");
e instanceof ImageData ? i.putImageData(e, 0, 0) : i.drawImage(e, 0, 0, e.width, e.height), t = js;
}
return t.width > 2048 || t.height > 2048 ? (console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons", e), t.toDataURL("image/jpeg", 0.6)) : t.toDataURL("image/png");
}
};
var uF = 0;
var Yt = class _Yt extends Kr {
constructor(e = _Yt.DEFAULT_IMAGE, t = _Yt.DEFAULT_MAPPING, i = hn2, r = hn2, s = zt, o = fr, a = Gn, c = Ts, l = 1, d = Cn) {
super(), Object.defineProperty(this, "id", { value: uF++ }), this.uuid = Hn(), this.name = "", this.image = e, this.mipmaps = [], this.mapping = t, this.wrapS = i, this.wrapT = r, this.magFilter = s, this.minFilter = o, this.anisotropy = l, this.format = a, this.internalFormat = null, this.type = c, this.offset = new Re(0, 0), this.repeat = new Re(1, 1), this.center = new Re(0, 0), this.rotation = 0, this.matrixAutoUpdate = true, this.matrix = new rn(), this.generateMipmaps = true, this.premultiplyAlpha = false, this.flipY = true, this.unpackAlignment = 4, this.encoding = d, this.version = 0, this.onUpdate = null;
}
updateMatrix() {
this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y);
}
clone() {
return new this.constructor().copy(this);
}
copy(e) {
return this.name = e.name, this.image = e.image, this.mipmaps = e.mipmaps.slice(0), this.mapping = e.mapping, this.wrapS = e.wrapS, this.wrapT = e.wrapT, this.magFilter = e.magFilter, this.minFilter = e.minFilter, this.anisotropy = e.anisotropy, this.format = e.format, this.internalFormat = e.internalFormat, this.type = e.type, this.offset.copy(e.offset), this.repeat.copy(e.repeat), this.center.copy(e.center), this.rotation = e.rotation, this.matrixAutoUpdate = e.matrixAutoUpdate, this.matrix.copy(e.matrix), this.generateMipmaps = e.generateMipmaps, this.premultiplyAlpha = e.premultiplyAlpha, this.flipY = e.flipY, this.unpackAlignment = e.unpackAlignment, this.encoding = e.encoding, this;
}
toJSON(e) {
const t = e === void 0 || typeof e == "string";
if (!t && e.textures[this.uuid] !== void 0)
return e.textures[this.uuid];
const i = {
metadata: {
version: 4.5,
type: "Texture",
generator: "Texture.toJSON"
},
uuid: this.uuid,
name: this.name,
mapping: this.mapping,
repeat: [this.repeat.x, this.repeat.y],
offset: [this.offset.x, this.offset.y],
center: [this.center.x, this.center.y],
rotation: this.rotation,
wrap: [this.wrapS, this.wrapT],
format: this.format,
type: this.type,
encoding: this.encoding,
minFilter: this.minFilter,
magFilter: this.magFilter,
anisotropy: this.anisotropy,
flipY: this.flipY,
premultiplyAlpha: this.premultiplyAlpha,
unpackAlignment: this.unpackAlignment
};
if (this.image !== void 0) {
const r = this.image;
if (r.uuid === void 0 && (r.uuid = Hn()), !t && e.images[r.uuid] === void 0) {
let s;
if (Array.isArray(r)) {
s = [];
for (let o = 0, a = r.length; o < a; o++)
r[o].isDataTexture ? s.push($u(r[o].image)) : s.push($u(r[o]));
} else
s = $u(r);
e.images[r.uuid] = {
uuid: r.uuid,
url: s
};
}
i.image = r.uuid;
}
return t || (e.textures[this.uuid] = i), i;
}
dispose() {
this.dispatchEvent({ type: "dispose" });
}
transformUv(e) {
if (this.mapping !== hu) return e;
if (e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1)
switch (this.wrapS) {
case jr:
e.x = e.x - Math.floor(e.x);
break;
case hn2:
e.x = e.x < 0 ? 0 : 1;
break;
case Eo:
Math.abs(Math.floor(e.x) % 2) === 1 ? e.x = Math.ceil(e.x) - e.x : e.x = e.x - Math.floor(e.x);
break;
}
if (e.y < 0 || e.y > 1)
switch (this.wrapT) {
case jr:
e.y = e.y - Math.floor(e.y);
break;
case hn2:
e.y = e.y < 0 ? 0 : 1;
break;
case Eo:
Math.abs(Math.floor(e.y) % 2) === 1 ? e.y = Math.ceil(e.y) - e.y : e.y = e.y - Math.floor(e.y);
break;
}
return this.flipY && (e.y = 1 - e.y), e;
}
set needsUpdate(e) {
e === true && this.version++;
}
};
Yt.DEFAULT_IMAGE = void 0;
Yt.DEFAULT_MAPPING = hu;
Yt.prototype.isTexture = true;
function $u(n) {
return typeof HTMLImageElement < "u" && n instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && n instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && n instanceof ImageBitmap ? Bs.getDataURL(n) : n.data ? {
data: Array.prototype.slice.call(n.data),
width: n.width,
height: n.height,
type: n.data.constructor.name
} : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
}
var xt = class {
constructor(e = 0, t = 0, i = 0, r = 1) {
this.x = e, this.y = t, this.z = i, this.w = r;
}
get width() {
return this.z;
}
set width(e) {
this.z = e;
}
get height() {
return this.w;
}
set height(e) {
this.w = e;
}
set(e, t, i, r) {
return this.x = e, this.y = t, this.z = i, this.w = r, this;
}
setScalar(e) {
return this.x = e, this.y = e, this.z = e, this.w = e, this;
}
setX(e) {
return this.x = e, this;
}
setY(e) {
return this.y = e, this;
}
setZ(e) {
return this.z = e, this;
}
setW(e) {
return this.w = e, this;
}
setComponent(e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
case 2:
this.z = t;
break;
case 3:
this.w = t;
break;
default:
throw new Error("index is out of range: " + e);
}
return this;
}
getComponent(e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
case 2:
return this.z;
case 3:
return this.w;
default:
throw new Error("index is out of range: " + e);
}
}
clone() {
return new this.constructor(this.x, this.y, this.z, this.w);
}
copy(e) {
return this.x = e.x, this.y = e.y, this.z = e.z, this.w = e.w !== void 0 ? e.w : 1, this;
}
add(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : (this.x += e.x, this.y += e.y, this.z += e.z, this.w += e.w, this);
}
addScalar(e) {
return this.x += e, this.y += e, this.z += e, this.w += e, this;
}
addVectors(e, t) {
return this.x = e.x + t.x, this.y = e.y + t.y, this.z = e.z + t.z, this.w = e.w + t.w, this;
}
addScaledVector(e, t) {
return this.x += e.x * t, this.y += e.y * t, this.z += e.z * t, this.w += e.w * t, this;
}
sub(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : (this.x -= e.x, this.y -= e.y, this.z -= e.z, this.w -= e.w, this);
}
subScalar(e) {
return this.x -= e, this.y -= e, this.z -= e, this.w -= e, this;
}
subVectors(e, t) {
return this.x = e.x - t.x, this.y = e.y - t.y, this.z = e.z - t.z, this.w = e.w - t.w, this;
}
multiply(e) {
return this.x *= e.x, this.y *= e.y, this.z *= e.z, this.w *= e.w, this;
}
multiplyScalar(e) {
return this.x *= e, this.y *= e, this.z *= e, this.w *= e, this;
}
applyMatrix4(e) {
const t = this.x, i = this.y, r = this.z, s = this.w, o = e.elements;
return this.x = o[0] * t + o[4] * i + o[8] * r + o[12] * s, this.y = o[1] * t + o[5] * i + o[9] * r + o[13] * s, this.z = o[2] * t + o[6] * i + o[10] * r + o[14] * s, this.w = o[3] * t + o[7] * i + o[11] * r + o[15] * s, this;
}
divideScalar(e) {
return this.multiplyScalar(1 / e);
}
setAxisAngleFromQuaternion(e) {
this.w = 2 * Math.acos(e.w);
const t = Math.sqrt(1 - e.w * e.w);
return t < 1e-4 ? (this.x = 1, this.y = 0, this.z = 0) : (this.x = e.x / t, this.y = e.y / t, this.z = e.z / t), this;
}
setAxisAngleFromRotationMatrix(e) {
let t, i, r, s;
const c = e.elements, l = c[0], d = c[4], h6 = c[8], f = c[1], g = c[5], p = c[9], u = c[2], y = c[6], v = c[10];
if (Math.abs(d - f) < 0.01 && Math.abs(h6 - u) < 0.01 && Math.abs(p - y) < 0.01) {
if (Math.abs(d + f) < 0.1 && Math.abs(h6 + u) < 0.1 && Math.abs(p + y) < 0.1 && Math.abs(l + g + v - 3) < 0.1)
return this.set(1, 0, 0, 0), this;
t = Math.PI;
const x = (l + 1) / 2, w = (g + 1) / 2, A = (v + 1) / 2, M = (d + f) / 4, R = (h6 + u) / 4, L = (p + y) / 4;
return x > w && x > A ? x < 0.01 ? (i = 0, r = 0.707106781, s = 0.707106781) : (i = Math.sqrt(x), r = M / i, s = R / i) : w > A ? w < 0.01 ? (i = 0.707106781, r = 0, s = 0.707106781) : (r = Math.sqrt(w), i = M / r, s = L / r) : A < 0.01 ? (i = 0.707106781, r = 0.707106781, s = 0) : (s = Math.sqrt(A), i = R / s, r = L / s), this.set(i, r, s, t), this;
}
let m = Math.sqrt((y - p) * (y - p) + (h6 - u) * (h6 - u) + (f - d) * (f - d));
return Math.abs(m) < 1e-3 && (m = 1), this.x = (y - p) / m, this.y = (h6 - u) / m, this.z = (f - d) / m, this.w = Math.acos((l + g + v - 1) / 2), this;
}
min(e) {
return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this.z = Math.min(this.z, e.z), this.w = Math.min(this.w, e.w), this;
}
max(e) {
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this.w = Math.max(this.w, e.w), this;
}
clamp(e, t) {
return this.x = Math.max(e.x, Math.min(t.x, this.x)), this.y = Math.max(e.y, Math.min(t.y, this.y)), this.z = Math.max(e.z, Math.min(t.z, this.z)), this.w = Math.max(e.w, Math.min(t.w, this.w)), this;
}
clampScalar(e, t) {
return this.x = Math.max(e, Math.min(t, this.x)), this.y = Math.max(e, Math.min(t, this.y)), this.z = Math.max(e, Math.min(t, this.z)), this.w = Math.max(e, Math.min(t, this.w)), this;
}
clampLength(e, t) {
const i = this.length();
return this.divideScalar(i || 1).multiplyScalar(Math.max(e, Math.min(t, i)));
}
floor() {
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this;
}
ceil() {
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this.w = Math.ceil(this.w), this;
}
round() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this.w = Math.round(this.w), this;
}
roundToZero() {
return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w), this;
}
negate() {
return this.x = -this.x, this.y = -this.y, this.z = -this.z, this.w = -this.w, this;
}
dot(e) {
return this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w;
}
lengthSq() {
return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;
}
length() {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);
}
manhattanLength() {
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);
}
normalize() {
return this.divideScalar(this.length() || 1);
}
setLength(e) {
return this.normalize().multiplyScalar(e);
}
lerp(e, t) {
return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this.z += (e.z - this.z) * t, this.w += (e.w - this.w) * t, this;
}
lerpVectors(e, t, i) {
return this.x = e.x + (t.x - e.x) * i, this.y = e.y + (t.y - e.y) * i, this.z = e.z + (t.z - e.z) * i, this.w = e.w + (t.w - e.w) * i, this;
}
equals(e) {
return e.x === this.x && e.y === this.y && e.z === this.z && e.w === this.w;
}
fromArray(e, t = 0) {
return this.x = e[t], this.y = e[t + 1], this.z = e[t + 2], this.w = e[t + 3], this;
}
toArray(e = [], t = 0) {
return e[t] = this.x, e[t + 1] = this.y, e[t + 2] = this.z, e[t + 3] = this.w, e;
}
fromBufferAttribute(e, t, i) {
return i !== void 0 && console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."), this.x = e.getX(t), this.y = e.getY(t), this.z = e.getZ(t), this.w = e.getW(t), this;
}
random() {
return this.x = Math.random(), this.y = Math.random(), this.z = Math.random(), this.w = Math.random(), this;
}
};
xt.prototype.isVector4 = true;
var fi = class extends Kr {
constructor(e, t, i = {}) {
super(), this.width = e, this.height = t, this.depth = 1, this.scissor = new xt(0, 0, e, t), this.scissorTest = false, this.viewport = new xt(0, 0, e, t), this.texture = new Yt(void 0, i.mapping, i.wrapS, i.wrapT, i.magFilter, i.minFilter, i.format, i.type, i.anisotropy, i.encoding), this.texture.image = { width: e, height: t, depth: 1 }, this.texture.generateMipmaps = i.generateMipmaps !== void 0 ? i.generateMipmaps : false, this.texture.minFilter = i.minFilter !== void 0 ? i.minFilter : zt, this.depthBuffer = i.depthBuffer !== void 0 ? i.depthBuffer : true, this.stencilBuffer = i.stencilBuffer !== void 0 ? i.stencilBuffer : false, this.depthTexture = i.depthTexture !== void 0 ? i.depthTexture : null;
}
setTexture(e) {
e.image = {
width: this.width,
height: this.height,
depth: this.depth
}, this.texture = e;
}
setSize(e, t, i = 1) {
(this.width !== e || this.height !== t || this.depth !== i) && (this.width = e, this.height = t, this.depth = i, this.texture.image.width = e, this.texture.image.height = t, this.texture.image.depth = i, this.dispose()), this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t);
}
clone() {
return new this.constructor().copy(this);
}
copy(e) {
return this.width = e.width, this.height = e.height, this.depth = e.depth, this.viewport.copy(e.viewport), this.texture = e.texture.clone(), this.texture.image = { ...this.texture.image }, this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.depthTexture = e.depthTexture, this;
}
dispose() {
this.dispatchEvent({ type: "dispose" });
}
};
fi.prototype.isWebGLRenderTarget = true;
var tx = class extends fi {
constructor(e, t, i) {
super(e, t);
const r = this.texture;
this.texture = [];
for (let s = 0; s < i; s++)
this.texture[s] = r.clone();
}
setSize(e, t, i = 1) {
if (this.width !== e || this.height !== t || this.depth !== i) {
this.width = e, this.height = t, this.depth = i;
for (let r = 0, s = this.texture.length; r < s; r++)
this.texture[r].image.width = e, this.texture[r].image.height = t, this.texture[r].image.depth = i;
this.dispose();
}
return this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t), this;
}
copy(e) {
this.dispose(), this.width = e.width, this.height = e.height, this.depth = e.depth, this.viewport.set(0, 0, this.width, this.height), this.scissor.set(0, 0, this.width, this.height), this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.depthTexture = e.depthTexture, this.texture.length = 0;
for (let t = 0, i = e.texture.length; t < i; t++)
this.texture[t] = e.texture[t].clone();
return this;
}
};
tx.prototype.isWebGLMultipleRenderTargets = true;
var Ef = class extends fi {
constructor(e, t, i) {
super(e, t, i), this.samples = 4;
}
copy(e) {
return super.copy.call(this, e), this.samples = e.samples, this;
}
};
Ef.prototype.isWebGLMultisampleRenderTarget = true;
var bn = class {
constructor(e = 0, t = 0, i = 0, r = 1) {
this._x = e, this._y = t, this._z = i, this._w = r;
}
static slerp(e, t, i, r) {
return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."), i.slerpQuaternions(e, t, r);
}
static slerpFlat(e, t, i, r, s, o, a) {
let c = i[r + 0], l = i[r + 1], d = i[r + 2], h6 = i[r + 3];
const f = s[o + 0], g = s[o + 1], p = s[o + 2], u = s[o + 3];
if (a === 0) {
e[t + 0] = c, e[t + 1] = l, e[t + 2] = d, e[t + 3] = h6;
return;
}
if (a === 1) {
e[t + 0] = f, e[t + 1] = g, e[t + 2] = p, e[t + 3] = u;
return;
}
if (h6 !== u || c !== f || l !== g || d !== p) {
let y = 1 - a;
const v = c * f + l * g + d * p + h6 * u, m = v >= 0 ? 1 : -1, x = 1 - v * v;
if (x > Number.EPSILON) {
const A = Math.sqrt(x), M = Math.atan2(A, v * m);
y = Math.sin(y * M) / A, a = Math.sin(a * M) / A;
}
const w = a * m;
if (c = c * y + f * w, l = l * y + g * w, d = d * y + p * w, h6 = h6 * y + u * w, y === 1 - a) {
const A = 1 / Math.sqrt(c * c + l * l + d * d + h6 * h6);
c *= A, l *= A, d *= A, h6 *= A;
}
}
e[t] = c, e[t + 1] = l, e[t + 2] = d, e[t + 3] = h6;
}
static multiplyQuaternionsFlat(e, t, i, r, s, o) {
const a = i[r], c = i[r + 1], l = i[r + 2], d = i[r + 3], h6 = s[o], f = s[o + 1], g = s[o + 2], p = s[o + 3];
return e[t] = a * p + d * h6 + c * g - l * f, e[t + 1] = c * p + d * f + l * h6 - a * g, e[t + 2] = l * p + d * g + a * f - c * h6, e[t + 3] = d * p - a * h6 - c * f - l * g, e;
}
get x() {
return this._x;
}
set x(e) {
this._x = e, this._onChangeCallback();
}
get y() {
return this._y;
}
set y(e) {
this._y = e, this._onChangeCallback();
}
get z() {
return this._z;
}
set z(e) {
this._z = e, this._onChangeCallback();
}
get w() {
return this._w;
}
set w(e) {
this._w = e, this._onChangeCallback();
}
set(e, t, i, r) {
return this._x = e, this._y = t, this._z = i, this._w = r, this._onChangeCallback(), this;
}
clone() {
return new this.constructor(this._x, this._y, this._z, this._w);
}
copy(e) {
return this._x = e.x, this._y = e.y, this._z = e.z, this._w = e.w, this._onChangeCallback(), this;
}
setFromEuler(e, t) {
if (!(e && e.isEuler))
throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");
const i = e._x, r = e._y, s = e._z, o = e._order, a = Math.cos, c = Math.sin, l = a(i / 2), d = a(r / 2), h6 = a(s / 2), f = c(i / 2), g = c(r / 2), p = c(s / 2);
switch (o) {
case "XYZ":
this._x = f * d * h6 + l * g * p, this._y = l * g * h6 - f * d * p, this._z = l * d * p + f * g * h6, this._w = l * d * h6 - f * g * p;
break;
case "YXZ":
this._x = f * d * h6 + l * g * p, this._y = l * g * h6 - f * d * p, this._z = l * d * p - f * g * h6, this._w = l * d * h6 + f * g * p;
break;
case "ZXY":
this._x = f * d * h6 - l * g * p, this._y = l * g * h6 + f * d * p, this._z = l * d * p + f * g * h6, this._w = l * d * h6 - f * g * p;
break;
case "ZYX":
this._x = f * d * h6 - l * g * p, this._y = l * g * h6 + f * d * p, this._z = l * d * p - f * g * h6, this._w = l * d * h6 + f * g * p;
break;
case "YZX":
this._x = f * d * h6 + l * g * p, this._y = l * g * h6 + f * d * p, this._z = l * d * p - f * g * h6, this._w = l * d * h6 - f * g * p;
break;
case "XZY":
this._x = f * d * h6 - l * g * p, this._y = l * g * h6 - f * d * p, this._z = l * d * p + f * g * h6, this._w = l * d * h6 + f * g * p;
break;
default:
console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: " + o);
}
return t !== false && this._onChangeCallback(), this;
}
setFromAxisAngle(e, t) {
const i = t / 2, r = Math.sin(i);
return this._x = e.x * r, this._y = e.y * r, this._z = e.z * r, this._w = Math.cos(i), this._onChangeCallback(), this;
}
setFromRotationMatrix(e) {
const t = e.elements, i = t[0], r = t[4], s = t[8], o = t[1], a = t[5], c = t[9], l = t[2], d = t[6], h6 = t[10], f = i + a + h6;
if (f > 0) {
const g = 0.5 / Math.sqrt(f + 1);
this._w = 0.25 / g, this._x = (d - c) * g, this._y = (s - l) * g, this._z = (o - r) * g;
} else if (i > a && i > h6) {
const g = 2 * Math.sqrt(1 + i - a - h6);
this._w = (d - c) / g, this._x = 0.25 * g, this._y = (r + o) / g, this._z = (s + l) / g;
} else if (a > h6) {
const g = 2 * Math.sqrt(1 + a - i - h6);
this._w = (s - l) / g, this._x = (r + o) / g, this._y = 0.25 * g, this._z = (c + d) / g;
} else {
const g = 2 * Math.sqrt(1 + h6 - i - a);
this._w = (o - r) / g, this._x = (s + l) / g, this._y = (c + d) / g, this._z = 0.25 * g;
}
return this._onChangeCallback(), this;
}
setFromUnitVectors(e, t) {
let i = e.dot(t) + 1;
return i < Number.EPSILON ? (i = 0, Math.abs(e.x) > Math.abs(e.z) ? (this._x = -e.y, this._y = e.x, this._z = 0, this._w = i) : (this._x = 0, this._y = -e.z, this._z = e.y, this._w = i)) : (this._x = e.y * t.z - e.z * t.y, this._y = e.z * t.x - e.x * t.z, this._z = e.x * t.y - e.y * t.x, this._w = i), this.normalize();
}
angleTo(e) {
return 2 * Math.acos(Math.abs(gn(this.dot(e), -1, 1)));
}
rotateTowards(e, t) {
const i = this.angleTo(e);
if (i === 0) return this;
const r = Math.min(1, t / i);
return this.slerp(e, r), this;
}
identity() {
return this.set(0, 0, 0, 1);
}
invert() {
return this.conjugate();
}
conjugate() {
return this._x *= -1, this._y *= -1, this._z *= -1, this._onChangeCallback(), this;
}
dot(e) {
return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w;
}
lengthSq() {
return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;
}
length() {
return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);
}
normalize() {
let e = this.length();
return e === 0 ? (this._x = 0, this._y = 0, this._z = 0, this._w = 1) : (e = 1 / e, this._x = this._x * e, this._y = this._y * e, this._z = this._z * e, this._w = this._w * e), this._onChangeCallback(), this;
}
multiply(e, t) {
return t !== void 0 ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(e, t)) : this.multiplyQuaternions(this, e);
}
premultiply(e) {
return this.multiplyQuaternions(e, this);
}
multiplyQuaternions(e, t) {
const i = e._x, r = e._y, s = e._z, o = e._w, a = t._x, c = t._y, l = t._z, d = t._w;
return this._x = i * d + o * a + r * l - s * c, this._y = r * d + o * c + s * a - i * l, this._z = s * d + o * l + i * c - r * a, this._w = o * d - i * a - r * c - s * l, this._onChangeCallback(), this;
}
slerp(e, t) {
if (t === 0) return this;
if (t === 1) return this.copy(e);
const i = this._x, r = this._y, s = this._z, o = this._w;
let a = o * e._w + i * e._x + r * e._y + s * e._z;
if (a < 0 ? (this._w = -e._w, this._x = -e._x, this._y = -e._y, this._z = -e._z, a = -a) : this.copy(e), a >= 1)
return this._w = o, this._x = i, this._y = r, this._z = s, this;
const c = 1 - a * a;
if (c <= Number.EPSILON) {
const g = 1 - t;
return this._w = g * o + t * this._w, this._x = g * i + t * this._x, this._y = g * r + t * this._y, this._z = g * s + t * this._z, this.normalize(), this._onChangeCallback(), this;
}
const l = Math.sqrt(c), d = Math.atan2(l, a), h6 = Math.sin((1 - t) * d) / l, f = Math.sin(t * d) / l;
return this._w = o * h6 + this._w * f, this._x = i * h6 + this._x * f, this._y = r * h6 + this._y * f, this._z = s * h6 + this._z * f, this._onChangeCallback(), this;
}
slerpQuaternions(e, t, i) {
this.copy(e).slerp(t, i);
}
equals(e) {
return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w;
}
fromArray(e, t = 0) {
return this._x = e[t], this._y = e[t + 1], this._z = e[t + 2], this._w = e[t + 3], this._onChangeCallback(), this;
}
toArray(e = [], t = 0) {
return e[t] = this._x, e[t + 1] = this._y, e[t + 2] = this._z, e[t + 3] = this._w, e;
}
fromBufferAttribute(e, t) {
return this._x = e.getX(t), this._y = e.getY(t), this._z = e.getZ(t), this._w = e.getW(t), this;
}
_onChange(e) {
return this._onChangeCallback = e, this;
}
_onChangeCallback() {
}
};
bn.prototype.isQuaternion = true;
var q = class {
constructor(e = 0, t = 0, i = 0) {
this.x = e, this.y = t, this.z = i;
}
set(e, t, i) {
return i === void 0 && (i = this.z), this.x = e, this.y = t, this.z = i, this;
}
setScalar(e) {
return this.x = e, this.y = e, this.z = e, this;
}
setX(e) {
return this.x = e, this;
}
setY(e) {
return this.y = e, this;
}
setZ(e) {
return this.z = e, this;
}
setComponent(e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
case 2:
this.z = t;
break;
default:
throw new Error("index is out of range: " + e);
}
return this;
}
getComponent(e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
case 2:
return this.z;
default:
throw new Error("index is out of range: " + e);
}
}
clone() {
return new this.constructor(this.x, this.y, this.z);
}
copy(e) {
return this.x = e.x, this.y = e.y, this.z = e.z, this;
}
add(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : (this.x += e.x, this.y += e.y, this.z += e.z, this);
}
addScalar(e) {
return this.x += e, this.y += e, this.z += e, this;
}
addVectors(e, t) {
return this.x = e.x + t.x, this.y = e.y + t.y, this.z = e.z + t.z, this;
}
addScaledVector(e, t) {
return this.x += e.x * t, this.y += e.y * t, this.z += e.z * t, this;
}
sub(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : (this.x -= e.x, this.y -= e.y, this.z -= e.z, this);
}
subScalar(e) {
return this.x -= e, this.y -= e, this.z -= e, this;
}
subVectors(e, t) {
return this.x = e.x - t.x, this.y = e.y - t.y, this.z = e.z - t.z, this;
}
multiply(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."), this.multiplyVectors(e, t)) : (this.x *= e.x, this.y *= e.y, this.z *= e.z, this);
}
multiplyScalar(e) {
return this.x *= e, this.y *= e, this.z *= e, this;
}
multiplyVectors(e, t) {
return this.x = e.x * t.x, this.y = e.y * t.y, this.z = e.z * t.z, this;
}
applyEuler(e) {
return e && e.isEuler || console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."), this.applyQuaternion($m.setFromEuler(e));
}
applyAxisAngle(e, t) {
return this.applyQuaternion($m.setFromAxisAngle(e, t));
}
applyMatrix3(e) {
const t = this.x, i = this.y, r = this.z, s = e.elements;
return this.x = s[0] * t + s[3] * i + s[6] * r, this.y = s[1] * t + s[4] * i + s[7] * r, this.z = s[2] * t + s[5] * i + s[8] * r, this;
}
applyNormalMatrix(e) {
return this.applyMatrix3(e).normalize();
}
applyMatrix4(e) {
const t = this.x, i = this.y, r = this.z, s = e.elements, o = 1 / (s[3] * t + s[7] * i + s[11] * r + s[15]);
return this.x = (s[0] * t + s[4] * i + s[8] * r + s[12]) * o, this.y = (s[1] * t + s[5] * i + s[9] * r + s[13]) * o, this.z = (s[2] * t + s[6] * i + s[10] * r + s[14]) * o, this;
}
applyQuaternion(e) {
const t = this.x, i = this.y, r = this.z, s = e.x, o = e.y, a = e.z, c = e.w, l = c * t + o * r - a * i, d = c * i + a * t - s * r, h6 = c * r + s * i - o * t, f = -s * t - o * i - a * r;
return this.x = l * c + f * -s + d * -a - h6 * -o, this.y = d * c + f * -o + h6 * -s - l * -a, this.z = h6 * c + f * -a + l * -o - d * -s, this;
}
project(e) {
return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix);
}
unproject(e) {
return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld);
}
transformDirection(e) {
const t = this.x, i = this.y, r = this.z, s = e.elements;
return this.x = s[0] * t + s[4] * i + s[8] * r, this.y = s[1] * t + s[5] * i + s[9] * r, this.z = s[2] * t + s[6] * i + s[10] * r, this.normalize();
}
divide(e) {
return this.x /= e.x, this.y /= e.y, this.z /= e.z, this;
}
divideScalar(e) {
return this.multiplyScalar(1 / e);
}
min(e) {
return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this.z = Math.min(this.z, e.z), this;
}
max(e) {
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this;
}
clamp(e, t) {
return this.x = Math.max(e.x, Math.min(t.x, this.x)), this.y = Math.max(e.y, Math.min(t.y, this.y)), this.z = Math.max(e.z, Math.min(t.z, this.z)), this;
}
clampScalar(e, t) {
return this.x = Math.max(e, Math.min(t, this.x)), this.y = Math.max(e, Math.min(t, this.y)), this.z = Math.max(e, Math.min(t, this.z)), this;
}
clampLength(e, t) {
const i = this.length();
return this.divideScalar(i || 1).multiplyScalar(Math.max(e, Math.min(t, i)));
}
floor() {
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this;
}
ceil() {
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this;
}
round() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this;
}
roundToZero() {
return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this;
}
negate() {
return this.x = -this.x, this.y = -this.y, this.z = -this.z, this;
}
dot(e) {
return this.x * e.x + this.y * e.y + this.z * e.z;
}
// TODO lengthSquared?
lengthSq() {
return this.x * this.x + this.y * this.y + this.z * this.z;
}
length() {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
}
manhattanLength() {
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);
}
normalize() {
return this.divideScalar(this.length() || 1);
}
setLength(e) {
return this.normalize().multiplyScalar(e);
}
lerp(e, t) {
return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this.z += (e.z - this.z) * t, this;
}
lerpVectors(e, t, i) {
return this.x = e.x + (t.x - e.x) * i, this.y = e.y + (t.y - e.y) * i, this.z = e.z + (t.z - e.z) * i, this;
}
cross(e, t) {
return t !== void 0 ? (console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."), this.crossVectors(e, t)) : this.crossVectors(this, e);
}
crossVectors(e, t) {
const i = e.x, r = e.y, s = e.z, o = t.x, a = t.y, c = t.z;
return this.x = r * c - s * a, this.y = s * o - i * c, this.z = i * a - r * o, this;
}
projectOnVector(e) {
const t = e.lengthSq();
if (t === 0) return this.set(0, 0, 0);
const i = e.dot(this) / t;
return this.copy(e).multiplyScalar(i);
}
projectOnPlane(e) {
return Zu.copy(this).projectOnVector(e), this.sub(Zu);
}
reflect(e) {
return this.sub(Zu.copy(e).multiplyScalar(2 * this.dot(e)));
}
angleTo(e) {
const t = Math.sqrt(this.lengthSq() * e.lengthSq());
if (t === 0) return Math.PI / 2;
const i = this.dot(e) / t;
return Math.acos(gn(i, -1, 1));
}
distanceTo(e) {
return Math.sqrt(this.distanceToSquared(e));
}
distanceToSquared(e) {
const t = this.x - e.x, i = this.y - e.y, r = this.z - e.z;
return t * t + i * i + r * r;
}
manhattanDistanceTo(e) {
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) + Math.abs(this.z - e.z);
}
setFromSpherical(e) {
return this.setFromSphericalCoords(e.radius, e.phi, e.theta);
}
setFromSphericalCoords(e, t, i) {
const r = Math.sin(t) * e;
return this.x = r * Math.sin(i), this.y = Math.cos(t) * e, this.z = r * Math.cos(i), this;
}
setFromCylindrical(e) {
return this.setFromCylindricalCoords(e.radius, e.theta, e.y);
}
setFromCylindricalCoords(e, t, i) {
return this.x = e * Math.sin(t), this.y = i, this.z = e * Math.cos(t), this;
}
setFromMatrixPosition(e) {
const t = e.elements;
return this.x = t[12], this.y = t[13], this.z = t[14], this;
}
setFromMatrixScale(e) {
const t = this.setFromMatrixColumn(e, 0).length(), i = this.setFromMatrixColumn(e, 1).length(), r = this.setFromMatrixColumn(e, 2).length();
return this.x = t, this.y = i, this.z = r, this;
}
setFromMatrixColumn(e, t) {
return this.fromArray(e.elements, t * 4);
}
setFromMatrix3Column(e, t) {
return this.fromArray(e.elements, t * 3);
}
equals(e) {
return e.x === this.x && e.y === this.y && e.z === this.z;
}
fromArray(e, t = 0) {
return this.x = e[t], this.y = e[t + 1], this.z = e[t + 2], this;
}
toArray(e = [], t = 0) {
return e[t] = this.x, e[t + 1] = this.y, e[t + 2] = this.z, e;
}
fromBufferAttribute(e, t, i) {
return i !== void 0 && console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."), this.x = e.getX(t), this.y = e.getY(t), this.z = e.getZ(t), this;
}
random() {
return this.x = Math.random(), this.y = Math.random(), this.z = Math.random(), this;
}
};
q.prototype.isVector3 = true;
var Zu = new q();
var $m = new bn();
var Nn = class {
constructor(e = new q(1 / 0, 1 / 0, 1 / 0), t = new q(-1 / 0, -1 / 0, -1 / 0)) {
this.min = e, this.max = t;
}
set(e, t) {
return this.min.copy(e), this.max.copy(t), this;
}
setFromArray(e) {
let t = 1 / 0, i = 1 / 0, r = 1 / 0, s = -1 / 0, o = -1 / 0, a = -1 / 0;
for (let c = 0, l = e.length; c < l; c += 3) {
const d = e[c], h6 = e[c + 1], f = e[c + 2];
d < t && (t = d), h6 < i && (i = h6), f < r && (r = f), d > s && (s = d), h6 > o && (o = h6), f > a && (a = f);
}
return this.min.set(t, i, r), this.max.set(s, o, a), this;
}
setFromBufferAttribute(e) {
let t = 1 / 0, i = 1 / 0, r = 1 / 0, s = -1 / 0, o = -1 / 0, a = -1 / 0;
for (let c = 0, l = e.count; c < l; c++) {
const d = e.getX(c), h6 = e.getY(c), f = e.getZ(c);
d < t && (t = d), h6 < i && (i = h6), f < r && (r = f), d > s && (s = d), h6 > o && (o = h6), f > a && (a = f);
}
return this.min.set(t, i, r), this.max.set(s, o, a), this;
}
setFromPoints(e) {
this.makeEmpty();
for (let t = 0, i = e.length; t < i; t++)
this.expandByPoint(e[t]);
return this;
}
setFromCenterAndSize(e, t) {
const i = ha.copy(t).multiplyScalar(0.5);
return this.min.copy(e).sub(i), this.max.copy(e).add(i), this;
}
setFromObject(e) {
return this.makeEmpty(), this.expandByObject(e);
}
clone() {
return new this.constructor().copy(this);
}
copy(e) {
return this.min.copy(e.min), this.max.copy(e.max), this;
}
makeEmpty() {
return this.min.x = this.min.y = this.min.z = 1 / 0, this.max.x = this.max.y = this.max.z = -1 / 0, this;
}
isEmpty() {
return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;
}
getCenter(e) {
return this.isEmpty() ? e.set(0, 0, 0) : e.addVectors(this.min, this.max).multiplyScalar(0.5);
}
getSize(e) {
return this.isEmpty() ? e.set(0, 0, 0) : e.subVectors(this.max, this.min);
}
expandByPoint(e) {
return this.min.min(e), this.max.max(e), this;
}
expandByVector(e) {
return this.min.sub(e), this.max.add(e), this;
}
expandByScalar(e) {
return this.min.addScalar(-e), this.max.addScalar(e), this;
}
expandByObject(e) {
e.updateWorldMatrix(false, false);
const t = e.geometry;
t !== void 0 && (t.boundingBox === null && t.computeBoundingBox(), Xu.copy(t.boundingBox), Xu.applyMatrix4(e.matrixWorld), this.union(Xu));
const i = e.children;
for (let r = 0, s = i.length; r < s; r++)
this.expandByObject(i[r]);
return this;
}
containsPoint(e) {
return !(e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y || e.z < this.min.z || e.z > this.max.z);
}
containsBox(e) {
return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y && this.min.z <= e.min.z && e.max.z <= this.max.z;
}
getParameter(e, t) {
return t.set(
(e.x - this.min.x) / (this.max.x - this.min.x),
(e.y - this.min.y) / (this.max.y - this.min.y),
(e.z - this.min.z) / (this.max.z - this.min.z)
);
}
intersectsBox(e) {
return !(e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y || e.max.z < this.min.z || e.min.z > this.max.z);
}
intersectsSphere(e) {
return this.clampPoint(e.center, ha), ha.distanceToSquared(e.center) <= e.radius * e.radius;
}
intersectsPlane(e) {
let t, i;
return e.normal.x > 0 ? (t = e.normal.x * this.min.x, i = e.normal.x * this.max.x) : (t = e.normal.x * this.max.x, i = e.normal.x * this.min.x), e.normal.y > 0 ? (t += e.normal.y * this.min.y, i += e.normal.y * this.max.y) : (t += e.normal.y * this.max.y, i += e.normal.y * this.min.y), e.normal.z > 0 ? (t += e.normal.z * this.min.z, i += e.normal.z * this.max.z) : (t += e.normal.z * this.max.z, i += e.normal.z * this.min.z), t <= -e.constant && i >= -e.constant;
}
intersectsTriangle(e) {
if (this.isEmpty())
return false;
this.getCenter(da), Ol.subVectors(this.max, da), $s.subVectors(e.a, da), Zs.subVectors(e.b, da), Xs.subVectors(e.c, da), vr.subVectors(Zs, $s), yr.subVectors(Xs, Zs), ss.subVectors($s, Xs);
let t = [
0,
-vr.z,
vr.y,
0,
-yr.z,
yr.y,
0,
-ss.z,
ss.y,
vr.z,
0,
-vr.x,
yr.z,
0,
-yr.x,
ss.z,
0,
-ss.x,
-vr.y,
vr.x,
0,
-yr.y,
yr.x,
0,
-ss.y,
ss.x,
0
];
return !Yu(t, $s, Zs, Xs, Ol) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !Yu(t, $s, Zs, Xs, Ol)) ? false : (Dl.crossVectors(vr, yr), t = [Dl.x, Dl.y, Dl.z], Yu(t, $s, Zs, Xs, Ol));
}
clampPoint(e, t) {
return t.copy(e).clamp(this.min, this.max);
}
distanceToPoint(e) {
return ha.copy(e).clamp(this.min, this.max).sub(e).length();
}
getBoundingSphere(e) {
return this.getCenter(e.center), e.radius = this.getSize(ha).length() * 0.5, e;
}
intersect(e) {
return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this;
}
union(e) {
return this.min.min(e.min), this.max.max(e.max), this;
}
applyMatrix4(e) {
return this.isEmpty() ? this : (Hi[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), Hi[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), Hi[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), Hi[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), Hi[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), Hi[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), Hi[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), Hi[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(Hi), this);
}
translate(e) {
return this.min.add(e), this.max.add(e), this;
}
equals(e) {
return e.min.equals(this.min) && e.max.equals(this.max);
}
};
Nn.prototype.isBox3 = true;
var Hi = [
new q(),
new q(),
new q(),
new q(),
new q(),
new q(),
new q(),
new q()
];
var ha = new q();
var Xu = new Nn();
var $s = new q();
var Zs = new q();
var Xs = new q();
var vr = new q();
var yr = new q();
var ss = new q();
var da = new q();
var Ol = new q();
var Dl = new q();
var os = new q();
function Yu(n, e, t, i, r) {
for (let s = 0, o = n.length - 3; s <= o; s += 3) {
os.fromArray(n, s);
const a = r.x * Math.abs(os.x) + r.y * Math.abs(os.y) + r.z * Math.abs(os.z), c = e.dot(os), l = t.dot(os), d = i.dot(os);
if (Math.max(-Math.max(c, l, d), Math.min(c, l, d)) > a)
return false;
}
return true;
}
var hF = new Nn();
var Zm = new q();
var Ju = new q();
var Ku = new q();
var pr = class {
constructor(e = new q(), t = -1) {
this.center = e, this.radius = t;
}
set(e, t) {
return this.center.copy(e), this.radius = t, this;
}
setFromPoints(e, t) {
const i = this.center;
t !== void 0 ? i.copy(t) : hF.setFromPoints(e).getCenter(i);
let r = 0;
for (let s = 0, o = e.length; s < o; s++)
r = Math.max(r, i.distanceToSquared(e[s]));
return this.radius = Math.sqrt(r), this;
}
copy(e) {
return this.center.copy(e.center), this.radius = e.radius, this;
}
isEmpty() {
return this.radius < 0;
}
makeEmpty() {
return this.center.set(0, 0, 0), this.radius = -1, this;
}
containsPoint(e) {
return e.distanceToSquared(this.center) <= this.radius * this.radius;
}
distanceToPoint(e) {
return e.distanceTo(this.center) - this.radius;
}
intersectsSphere(e) {
const t = this.radius + e.radius;
return e.center.distanceToSquared(this.center) <= t * t;
}
intersectsBox(e) {
return e.intersectsSphere(this);
}
intersectsPlane(e) {
return Math.abs(e.distanceToPoint(this.center)) <= this.radius;
}
clampPoint(e, t) {
const i = this.center.distanceToSquared(e);
return t.copy(e), i > this.radius * this.radius && (t.sub(this.center).normalize(), t.multiplyScalar(this.radius).add(this.center)), t;
}
getBoundingBox(e) {
return this.isEmpty() ? (e.makeEmpty(), e) : (e.set(this.center, this.center), e.expandByScalar(this.radius), e);
}
applyMatrix4(e) {
return this.center.applyMatrix4(e), this.radius = this.radius * e.getMaxScaleOnAxis(), this;
}
translate(e) {
return this.center.add(e), this;
}
expandByPoint(e) {
Ku.subVectors(e, this.center);
const t = Ku.lengthSq();
if (t > this.radius * this.radius) {
const i = Math.sqrt(t), r = (i - this.radius) * 0.5;
this.center.add(Ku.multiplyScalar(r / i)), this.radius += r;
}
return this;
}
union(e) {
return Ju.subVectors(e.center, this.center).normalize().multiplyScalar(e.radius), this.expandByPoint(Zm.copy(e.center).add(Ju)), this.expandByPoint(Zm.copy(e.center).sub(Ju)), this;
}
equals(e) {
return e.center.equals(this.center) && e.radius === this.radius;
}
clone() {
return new this.constructor().copy(this);
}
};
var Wi = new q();
var qu = new q();
var Nl = new q();
var br = new q();
var Qu = new q();
var Bl = new q();
var eh = new q();
var qr = class {
constructor(e = new q(), t = new q(0, 0, -1)) {
this.origin = e, this.direction = t;
}
set(e, t) {
return this.origin.copy(e), this.direction.copy(t), this;
}
copy(e) {
return this.origin.copy(e.origin), this.direction.copy(e.direction), this;
}
at(e, t) {
return t.copy(this.direction).multiplyScalar(e).add(this.origin);
}
lookAt(e) {
return this.direction.copy(e).sub(this.origin).normalize(), this;
}
recast(e) {
return this.origin.copy(this.at(e, Wi)), this;
}
closestPointToPoint(e, t) {
t.subVectors(e, this.origin);
const i = t.dot(this.direction);
return i < 0 ? t.copy(this.origin) : t.copy(this.direction).multiplyScalar(i).add(this.origin);
}
distanceToPoint(e) {
return Math.sqrt(this.distanceSqToPoint(e));
}
distanceSqToPoint(e) {
const t = Wi.subVectors(e, this.origin).dot(this.direction);
return t < 0 ? this.origin.distanceToSquared(e) : (Wi.copy(this.direction).multiplyScalar(t).add(this.origin), Wi.distanceToSquared(e));
}
distanceSqToSegment(e, t, i, r) {
qu.copy(e).add(t).multiplyScalar(0.5), Nl.copy(t).sub(e).normalize(), br.copy(this.origin).sub(qu);
const s = e.distanceTo(t) * 0.5, o = -this.direction.dot(Nl), a = br.dot(this.direction), c = -br.dot(Nl), l = br.lengthSq(), d = Math.abs(1 - o * o);
let h6, f, g, p;
if (d > 0)
if (h6 = o * c - a, f = o * a - c, p = s * d, h6 >= 0)
if (f >= -p)
if (f <= p) {
const u = 1 / d;
h6 *= u, f *= u, g = h6 * (h6 + o * f + 2 * a) + f * (o * h6 + f + 2 * c) + l;
} else
f = s, h6 = Math.max(0, -(o * f + a)), g = -h6 * h6 + f * (f + 2 * c) + l;
else
f = -s, h6 = Math.max(0, -(o * f + a)), g = -h6 * h6 + f * (f + 2 * c) + l;
else
f <= -p ? (h6 = Math.max(0, -(-o * s + a)), f = h6 > 0 ? -s : Math.min(Math.max(-s, -c), s), g = -h6 * h6 + f * (f + 2 * c) + l) : f <= p ? (h6 = 0, f = Math.min(Math.max(-s, -c), s), g = f * (f + 2 * c) + l) : (h6 = Math.max(0, -(o * s + a)), f = h6 > 0 ? s : Math.min(Math.max(-s, -c), s), g = -h6 * h6 + f * (f + 2 * c) + l);
else
f = o > 0 ? -s : s, h6 = Math.max(0, -(o * f + a)), g = -h6 * h6 + f * (f + 2 * c) + l;
return i && i.copy(this.direction).multiplyScalar(h6).add(this.origin), r && r.copy(Nl).multiplyScalar(f).add(qu), g;
}
intersectSphere(e, t) {
Wi.subVectors(e.center, this.origin);
const i = Wi.dot(this.direction), r = Wi.dot(Wi) - i * i, s = e.radius * e.radius;
if (r > s) return null;
const o = Math.sqrt(s - r), a = i - o, c = i + o;
return a < 0 && c < 0 ? null : a < 0 ? this.at(c, t) : this.at(a, t);
}
intersectsSphere(e) {
return this.distanceSqToPoint(e.center) <= e.radius * e.radius;
}
distanceToPlane(e) {
const t = e.normal.dot(this.direction);
if (t === 0)
return e.distanceToPoint(this.origin) === 0 ? 0 : null;
const i = -(this.origin.dot(e.normal) + e.constant) / t;
return i >= 0 ? i : null;
}
intersectPlane(e, t) {
const i = this.distanceToPlane(e);
return i === null ? null : this.at(i, t);
}
intersectsPlane(e) {
const t = e.distanceToPoint(this.origin);
return t === 0 || e.normal.dot(this.direction) * t < 0;
}
intersectBox(e, t) {
let i, r, s, o, a, c;
const l = 1 / this.direction.x, d = 1 / this.direction.y, h6 = 1 / this.direction.z, f = this.origin;
return l >= 0 ? (i = (e.min.x - f.x) * l, r = (e.max.x - f.x) * l) : (i = (e.max.x - f.x) * l, r = (e.min.x - f.x) * l), d >= 0 ? (s = (e.min.y - f.y) * d, o = (e.max.y - f.y) * d) : (s = (e.max.y - f.y) * d, o = (e.min.y - f.y) * d), i > o || s > r || ((s > i || i !== i) && (i = s), (o < r || r !== r) && (r = o), h6 >= 0 ? (a = (e.min.z - f.z) * h6, c = (e.max.z - f.z) * h6) : (a = (e.max.z - f.z) * h6, c = (e.min.z - f.z) * h6), i > c || a > r) || ((a > i || i !== i) && (i = a), (c < r || r !== r) && (r = c), r < 0) ? null : this.at(i >= 0 ? i : r, t);
}
intersectsBox(e) {
return this.intersectBox(e, Wi) !== null;
}
intersectTriangle(e, t, i, r, s) {
Qu.subVectors(t, e), Bl.subVectors(i, e), eh.crossVectors(Qu, Bl);
let o = this.direction.dot(eh), a;
if (o > 0) {
if (r) return null;
a = 1;
} else if (o < 0)
a = -1, o = -o;
else
return null;
br.subVectors(this.origin, e);
const c = a * this.direction.dot(Bl.crossVectors(br, Bl));
if (c < 0)
return null;
const l = a * this.direction.dot(Qu.cross(br));
if (l < 0 || c + l > o)
return null;
const d = -a * br.dot(eh);
return d < 0 ? null : this.at(d / o, s);
}
applyMatrix4(e) {
return this.origin.applyMatrix4(e), this.direction.transformDirection(e), this;
}
equals(e) {
return e.origin.equals(this.origin) && e.direction.equals(this.direction);
}
clone() {
return new this.constructor().copy(this);
}
};
var Xe = class _Xe {
constructor() {
this.elements = [
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1
], arguments.length > 0 && console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.");
}
set(e, t, i, r, s, o, a, c, l, d, h6, f, g, p, u, y) {
const v = this.elements;
return v[0] = e, v[4] = t, v[8] = i, v[12] = r, v[1] = s, v[5] = o, v[9] = a, v[13] = c, v[2] = l, v[6] = d, v[10] = h6, v[14] = f, v[3] = g, v[7] = p, v[11] = u, v[15] = y, this;
}
identity() {
return this.set(
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1
), this;
}
clone() {
return new _Xe().fromArray(this.elements);
}
copy(e) {
const t = this.elements, i = e.elements;
return t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t[4] = i[4], t[5] = i[5], t[6] = i[6], t[7] = i[7], t[8] = i[8], t[9] = i[9], t[10] = i[10], t[11] = i[11], t[12] = i[12], t[13] = i[13], t[14] = i[14], t[15] = i[15], this;
}
copyPosition(e) {
const t = this.elements, i = e.elements;
return t[12] = i[12], t[13] = i[13], t[14] = i[14], this;
}
setFromMatrix3(e) {
const t = e.elements;
return this.set(
t[0],
t[3],
t[6],
0,
t[1],
t[4],
t[7],
0,
t[2],
t[5],
t[8],
0,
0,
0,
0,
1
), this;
}
extractBasis(e, t, i) {
return e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), i.setFromMatrixColumn(this, 2), this;
}
makeBasis(e, t, i) {
return this.set(
e.x,
t.x,
i.x,
0,
e.y,
t.y,
i.y,
0,
e.z,
t.z,
i.z,
0,
0,
0,
0,
1
), this;
}
extractRotation(e) {
const t = this.elements, i = e.elements, r = 1 / Ys.setFromMatrixColumn(e, 0).length(), s = 1 / Ys.setFromMatrixColumn(e, 1).length(), o = 1 / Ys.setFromMatrixColumn(e, 2).length();
return t[0] = i[0] * r, t[1] = i[1] * r, t[2] = i[2] * r, t[3] = 0, t[4] = i[4] * s, t[5] = i[5] * s, t[6] = i[6] * s, t[7] = 0, t[8] = i[8] * o, t[9] = i[9] * o, t[10] = i[10] * o, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
}
makeRotationFromEuler(e) {
e && e.isEuler || console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");
const t = this.elements, i = e.x, r = e.y, s = e.z, o = Math.cos(i), a = Math.sin(i), c = Math.cos(r), l = Math.sin(r), d = Math.cos(s), h6 = Math.sin(s);
if (e.order === "XYZ") {
const f = o * d, g = o * h6, p = a * d, u = a * h6;
t[0] = c * d, t[4] = -c * h6, t[8] = l, t[1] = g + p * l, t[5] = f - u * l, t[9] = -a * c, t[2] = u - f * l, t[6] = p + g * l, t[10] = o * c;
} else if (e.order === "YXZ") {
const f = c * d, g = c * h6, p = l * d, u = l * h6;
t[0] = f + u * a, t[4] = p * a - g, t[8] = o * l, t[1] = o * h6, t[5] = o * d, t[9] = -a, t[2] = g * a - p, t[6] = u + f * a, t[10] = o * c;
} else if (e.order === "ZXY") {
const f = c * d, g = c * h6, p = l * d, u = l * h6;
t[0] = f - u * a, t[4] = -o * h6, t[8] = p + g * a, t[1] = g + p * a, t[5] = o * d, t[9] = u - f * a, t[2] = -o * l, t[6] = a, t[10] = o * c;
} else if (e.order === "ZYX") {
const f = o * d, g = o * h6, p = a * d, u = a * h6;
t[0] = c * d, t[4] = p * l - g, t[8] = f * l + u, t[1] = c * h6, t[5] = u * l + f, t[9] = g * l - p, t[2] = -l, t[6] = a * c, t[10] = o * c;
} else if (e.order === "YZX") {
const f = o * c, g = o * l, p = a * c, u = a * l;
t[0] = c * d, t[4] = u - f * h6, t[8] = p * h6 + g, t[1] = h6, t[5] = o * d, t[9] = -a * d, t[2] = -l * d, t[6] = g * h6 + p, t[10] = f - u * h6;
} else if (e.order === "XZY") {
const f = o * c, g = o * l, p = a * c, u = a * l;
t[0] = c * d, t[4] = -h6, t[8] = l * d, t[1] = f * h6 + u, t[5] = o * d, t[9] = g * h6 - p, t[2] = p * h6 - g, t[6] = a * d, t[10] = u * h6 + f;
}
return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
}
makeRotationFromQuaternion(e) {
return this.compose(dF, e, fF);
}
lookAt(e, t, i) {
const r = this.elements;
return Bn.subVectors(e, t), Bn.lengthSq() === 0 && (Bn.z = 1), Bn.normalize(), xr.crossVectors(i, Bn), xr.lengthSq() === 0 && (Math.abs(i.z) === 1 ? Bn.x += 1e-4 : Bn.z += 1e-4, Bn.normalize(), xr.crossVectors(i, Bn)), xr.normalize(), Ul.crossVectors(Bn, xr), r[0] = xr.x, r[4] = Ul.x, r[8] = Bn.x, r[1] = xr.y, r[5] = Ul.y, r[9] = Bn.y, r[2] = xr.z, r[6] = Ul.z, r[10] = Bn.z, this;
}
multiply(e, t) {
return t !== void 0 ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(e, t)) : this.multiplyMatrices(this, e);
}
premultiply(e) {
return this.multiplyMatrices(e, this);
}
multiplyMatrices(e, t) {
const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[4], c = i[8], l = i[12], d = i[1], h6 = i[5], f = i[9], g = i[13], p = i[2], u = i[6], y = i[10], v = i[14], m = i[3], x = i[7], w = i[11], A = i[15], M = r[0], R = r[4], L = r[8], S = r[12], I = r[1], T = r[5], _ = r[9], E = r[13], C = r[2], P = r[6], b = r[10], F = r[14], D = r[3], N = r[7], B = r[11], U = r[15];
return s[0] = o * M + a * I + c * C + l * D, s[4] = o * R + a * T + c * P + l * N, s[8] = o * L + a * _ + c * b + l * B, s[12] = o * S + a * E + c * F + l * U, s[1] = d * M + h6 * I + f * C + g * D, s[5] = d * R + h6 * T + f * P + g * N, s[9] = d * L + h6 * _ + f * b + g * B, s[13] = d * S + h6 * E + f * F + g * U, s[2] = p * M + u * I + y * C + v * D, s[6] = p * R + u * T + y * P + v * N, s[10] = p * L + u * _ + y * b + v * B, s[14] = p * S + u * E + y * F + v * U, s[3] = m * M + x * I + w * C + A * D, s[7] = m * R + x * T + w * P + A * N, s[11] = m * L + x * _ + w * b + A * B, s[15] = m * S + x * E + w * F + A * U, this;
}
multiplyScalar(e) {
const t = this.elements;
return t[0] *= e, t[4] *= e, t[8] *= e, t[12] *= e, t[1] *= e, t[5] *= e, t[9] *= e, t[13] *= e, t[2] *= e, t[6] *= e, t[10] *= e, t[14] *= e, t[3] *= e, t[7] *= e, t[11] *= e, t[15] *= e, this;
}
determinant() {
const e = this.elements, t = e[0], i = e[4], r = e[8], s = e[12], o = e[1], a = e[5], c = e[9], l = e[13], d = e[2], h6 = e[6], f = e[10], g = e[14], p = e[3], u = e[7], y = e[11], v = e[15];
return p * (+s * c * h6 - r * l * h6 - s * a * f + i * l * f + r * a * g - i * c * g) + u * (+t * c * g - t * l * f + s * o * f - r * o * g + r * l * d - s * c * d) + y * (+t * l * h6 - t * a * g - s * o * h6 + i * o * g + s * a * d - i * l * d) + v * (-r * a * d - t * c * h6 + t * a * f + r * o * h6 - i * o * f + i * c * d);
}
transpose() {
const e = this.elements;
let t;
return t = e[1], e[1] = e[4], e[4] = t, t = e[2], e[2] = e[8], e[8] = t, t = e[6], e[6] = e[9], e[9] = t, t = e[3], e[3] = e[12], e[12] = t, t = e[7], e[7] = e[13], e[13] = t, t = e[11], e[11] = e[14], e[14] = t, this;
}
setPosition(e, t, i) {
const r = this.elements;
return e.isVector3 ? (r[12] = e.x, r[13] = e.y, r[14] = e.z) : (r[12] = e, r[13] = t, r[14] = i), this;
}
invert() {
const e = this.elements, t = e[0], i = e[1], r = e[2], s = e[3], o = e[4], a = e[5], c = e[6], l = e[7], d = e[8], h6 = e[9], f = e[10], g = e[11], p = e[12], u = e[13], y = e[14], v = e[15], m = h6 * y * l - u * f * l + u * c * g - a * y * g - h6 * c * v + a * f * v, x = p * f * l - d * y * l - p * c * g + o * y * g + d * c * v - o * f * v, w = d * u * l - p * h6 * l + p * a * g - o * u * g - d * a * v + o * h6 * v, A = p * h6 * c - d * u * c - p * a * f + o * u * f + d * a * y - o * h6 * y, M = t * m + i * x + r * w + s * A;
if (M === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
const R = 1 / M;
return e[0] = m * R, e[1] = (u * f * s - h6 * y * s - u * r * g + i * y * g + h6 * r * v - i * f * v) * R, e[2] = (a * y * s - u * c * s + u * r * l - i * y * l - a * r * v + i * c * v) * R, e[3] = (h6 * c * s - a * f * s - h6 * r * l + i * f * l + a * r * g - i * c * g) * R, e[4] = x * R, e[5] = (d * y * s - p * f * s + p * r * g - t * y * g - d * r * v + t * f * v) * R, e[6] = (p * c * s - o * y * s - p * r * l + t * y * l + o * r * v - t * c * v) * R, e[7] = (o * f * s - d * c * s + d * r * l - t * f * l - o * r * g + t * c * g) * R, e[8] = w * R, e[9] = (p * h6 * s - d * u * s - p * i * g + t * u * g + d * i * v - t * h6 * v) * R, e[10] = (o * u * s - p * a * s + p * i * l - t * u * l - o * i * v + t * a * v) * R, e[11] = (d * a * s - o * h6 * s - d * i * l + t * h6 * l + o * i * g - t * a * g) * R, e[12] = A * R, e[13] = (d * u * r - p * h6 * r + p * i * f - t * u * f - d * i * y + t * h6 * y) * R, e[14] = (p * a * r - o * u * r - p * i * c + t * u * c + o * i * y - t * a * y) * R, e[15] = (o * h6 * r - d * a * r + d * i * c - t * h6 * c - o * i * f + t * a * f) * R, this;
}
scale(e) {
const t = this.elements, i = e.x, r = e.y, s = e.z;
return t[0] *= i, t[4] *= r, t[8] *= s, t[1] *= i, t[5] *= r, t[9] *= s, t[2] *= i, t[6] *= r, t[10] *= s, t[3] *= i, t[7] *= r, t[11] *= s, this;
}
getMaxScaleOnAxis() {
const e = this.elements, t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2], i = e[4] * e[4] + e[5] * e[5] + e[6] * e[6], r = e[8] * e[8] + e[9] * e[9] + e[10] * e[10];
return Math.sqrt(Math.max(t, i, r));
}
makeTranslation(e, t, i) {
return this.set(
1,
0,
0,
e,
0,
1,
0,
t,
0,
0,
1,
i,
0,
0,
0,
1
), this;
}
makeRotationX(e) {
const t = Math.cos(e), i = Math.sin(e);
return this.set(
1,
0,
0,
0,
0,
t,
-i,
0,
0,
i,
t,
0,
0,
0,
0,
1
), this;
}
makeRotationY(e) {
const t = Math.cos(e), i = Math.sin(e);
return this.set(
t,
0,
i,
0,
0,
1,
0,
0,
-i,
0,
t,
0,
0,
0,
0,
1
), this;
}
makeRotationZ(e) {
const t = Math.cos(e), i = Math.sin(e);
return this.set(
t,
-i,
0,
0,
i,
t,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1
), this;
}
makeRotationAxis(e, t) {
const i = Math.cos(t), r = Math.sin(t), s = 1 - i, o = e.x, a = e.y, c = e.z, l = s * o, d = s * a;
return this.set(
l * o + i,
l * a - r * c,
l * c + r * a,
0,
l * a + r * c,
d * a + i,
d * c - r * o,
0,
l * c - r * a,
d * c + r * o,
s * c * c + i,
0,
0,
0,
0,
1
), this;
}
makeScale(e, t, i) {
return this.set(
e,
0,
0,
0,
0,
t,
0,
0,
0,
0,
i,
0,
0,
0,
0,
1
), this;
}
makeShear(e, t, i, r, s, o) {
return this.set(
1,
i,
s,
0,
e,
1,
o,
0,
t,
r,
1,
0,
0,
0,
0,
1
), this;
}
compose(e, t, i) {
const r = this.elements, s = t._x, o = t._y, a = t._z, c = t._w, l = s + s, d = o + o, h6 = a + a, f = s * l, g = s * d, p = s * h6, u = o * d, y = o * h6, v = a * h6, m = c * l, x = c * d, w = c * h6, A = i.x, M = i.y, R = i.z;
return r[0] = (1 - (u + v)) * A, r[1] = (g + w) * A, r[2] = (p - x) * A, r[3] = 0, r[4] = (g - w) * M, r[5] = (1 - (f + v)) * M, r[6] = (y + m) * M, r[7] = 0, r[8] = (p + x) * R, r[9] = (y - m) * R, r[10] = (1 - (f + u)) * R, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
}
decompose(e, t, i) {
const r = this.elements;
let s = Ys.set(r[0], r[1], r[2]).length();
const o = Ys.set(r[4], r[5], r[6]).length(), a = Ys.set(r[8], r[9], r[10]).length();
this.determinant() < 0 && (s = -s), e.x = r[12], e.y = r[13], e.z = r[14], ri.copy(this);
const l = 1 / s, d = 1 / o, h6 = 1 / a;
return ri.elements[0] *= l, ri.elements[1] *= l, ri.elements[2] *= l, ri.elements[4] *= d, ri.elements[5] *= d, ri.elements[6] *= d, ri.elements[8] *= h6, ri.elements[9] *= h6, ri.elements[10] *= h6, t.setFromRotationMatrix(ri), i.x = s, i.y = o, i.z = a, this;
}
makePerspective(e, t, i, r, s, o) {
o === void 0 && console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");
const a = this.elements, c = 2 * s / (t - e), l = 2 * s / (i - r), d = (t + e) / (t - e), h6 = (i + r) / (i - r), f = -(o + s) / (o - s), g = -2 * o * s / (o - s);
return a[0] = c, a[4] = 0, a[8] = d, a[12] = 0, a[1] = 0, a[5] = l, a[9] = h6, a[13] = 0, a[2] = 0, a[6] = 0, a[10] = f, a[14] = g, a[3] = 0, a[7] = 0, a[11] = -1, a[15] = 0, this;
}
makeOrthographic(e, t, i, r, s, o) {
const a = this.elements, c = 1 / (t - e), l = 1 / (i - r), d = 1 / (o - s), h6 = (t + e) * c, f = (i + r) * l, g = (o + s) * d;
return a[0] = 2 * c, a[4] = 0, a[8] = 0, a[12] = -h6, a[1] = 0, a[5] = 2 * l, a[9] = 0, a[13] = -f, a[2] = 0, a[6] = 0, a[10] = -2 * d, a[14] = -g, a[3] = 0, a[7] = 0, a[11] = 0, a[15] = 1, this;
}
equals(e) {
const t = this.elements, i = e.elements;
for (let r = 0; r < 16; r++)
if (t[r] !== i[r]) return false;
return true;
}
fromArray(e, t = 0) {
for (let i = 0; i < 16; i++)
this.elements[i] = e[i + t];
return this;
}
toArray(e = [], t = 0) {
const i = this.elements;
return e[t] = i[0], e[t + 1] = i[1], e[t + 2] = i[2], e[t + 3] = i[3], e[t + 4] = i[4], e[t + 5] = i[5], e[t + 6] = i[6], e[t + 7] = i[7], e[t + 8] = i[8], e[t + 9] = i[9], e[t + 10] = i[10], e[t + 11] = i[11], e[t + 12] = i[12], e[t + 13] = i[13], e[t + 14] = i[14], e[t + 15] = i[15], e;
}
};
Xe.prototype.isMatrix4 = true;
var Ys = new q();
var ri = new Xe();
var dF = new q(0, 0, 0);
var fF = new q(1, 1, 1);
var xr = new q();
var Ul = new q();
var Bn = new q();
var Xm = new Xe();
var Ym = new bn();
var Us = class _Us {
constructor(e = 0, t = 0, i = 0, r = _Us.DefaultOrder) {
this._x = e, this._y = t, this._z = i, this._order = r;
}
get x() {
return this._x;
}
set x(e) {
this._x = e, this._onChangeCallback();
}
get y() {
return this._y;
}
set y(e) {
this._y = e, this._onChangeCallback();
}
get z() {
return this._z;
}
set z(e) {
this._z = e, this._onChangeCallback();
}
get order() {
return this._order;
}
set order(e) {
this._order = e, this._onChangeCallback();
}
set(e, t, i, r = this._order) {
return this._x = e, this._y = t, this._z = i, this._order = r, this._onChangeCallback(), this;
}
clone() {
return new this.constructor(this._x, this._y, this._z, this._order);
}
copy(e) {
return this._x = e._x, this._y = e._y, this._z = e._z, this._order = e._order, this._onChangeCallback(), this;
}
setFromRotationMatrix(e, t = this._order, i = true) {
const r = e.elements, s = r[0], o = r[4], a = r[8], c = r[1], l = r[5], d = r[9], h6 = r[2], f = r[6], g = r[10];
switch (t) {
case "XYZ":
this._y = Math.asin(gn(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(-d, g), this._z = Math.atan2(-o, s)) : (this._x = Math.atan2(f, l), this._z = 0);
break;
case "YXZ":
this._x = Math.asin(-gn(d, -1, 1)), Math.abs(d) < 0.9999999 ? (this._y = Math.atan2(a, g), this._z = Math.atan2(c, l)) : (this._y = Math.atan2(-h6, s), this._z = 0);
break;
case "ZXY":
this._x = Math.asin(gn(f, -1, 1)), Math.abs(f) < 0.9999999 ? (this._y = Math.atan2(-h6, g), this._z = Math.atan2(-o, l)) : (this._y = 0, this._z = Math.atan2(c, s));
break;
case "ZYX":
this._y = Math.asin(-gn(h6, -1, 1)), Math.abs(h6) < 0.9999999 ? (this._x = Math.atan2(f, g), this._z = Math.atan2(c, s)) : (this._x = 0, this._z = Math.atan2(-o, l));
break;
case "YZX":
this._z = Math.asin(gn(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._x = Math.atan2(-d, l), this._y = Math.atan2(-h6, s)) : (this._x = 0, this._y = Math.atan2(a, g));
break;
case "XZY":
this._z = Math.asin(-gn(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(f, l), this._y = Math.atan2(a, s)) : (this._x = Math.atan2(-d, g), this._y = 0);
break;
default:
console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
}
return this._order = t, i === true && this._onChangeCallback(), this;
}
setFromQuaternion(e, t, i) {
return Xm.makeRotationFromQuaternion(e), this.setFromRotationMatrix(Xm, t, i);
}
setFromVector3(e, t = this._order) {
return this.set(e.x, e.y, e.z, t);
}
reorder(e) {
return Ym.setFromEuler(this), this.setFromQuaternion(Ym, e);
}
equals(e) {
return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
}
fromArray(e) {
return this._x = e[0], this._y = e[1], this._z = e[2], e[3] !== void 0 && (this._order = e[3]), this._onChangeCallback(), this;
}
toArray(e = [], t = 0) {
return e[t] = this._x, e[t + 1] = this._y, e[t + 2] = this._z, e[t + 3] = this._order, e;
}
toVector3(e) {
return e ? e.set(this._x, this._y, this._z) : new q(this._x, this._y, this._z);
}
_onChange(e) {
return this._onChangeCallback = e, this;
}
_onChangeCallback() {
}
};
Us.prototype.isEuler = true;
Us.DefaultOrder = "XYZ";
Us.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"];
var Cf = class {
constructor() {
this.mask = 1;
}
set(e) {
this.mask = 1 << e | 0;
}
enable(e) {
this.mask |= 1 << e | 0;
}
enableAll() {
this.mask = -1;
}
toggle(e) {
this.mask ^= 1 << e | 0;
}
disable(e) {
this.mask &= ~(1 << e | 0);
}
disableAll() {
this.mask = 0;
}
test(e) {
return (this.mask & e.mask) !== 0;
}
};
var pF = 0;
var Jm = new q();
var Js = new bn();
var ji = new Xe();
var zl = new q();
var fa = new q();
var mF = new q();
var gF = new bn();
var Km = new q(1, 0, 0);
var qm = new q(0, 1, 0);
var Qm = new q(0, 0, 1);
var vF = { type: "added" };
var eg = { type: "removed" };
var ut = class _ut extends Kr {
constructor() {
super(), Object.defineProperty(this, "id", { value: pF++ }), this.uuid = Hn(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = _ut.DefaultUp.clone();
const e = new q(), t = new Us(), i = new bn(), r = new q(1, 1, 1);
function s() {
i.setFromEuler(t, false);
}
function o() {
t.setFromQuaternion(i, void 0, false);
}
t._onChange(s), i._onChange(o), Object.defineProperties(this, {
position: {
configurable: true,
enumerable: true,
value: e
},
rotation: {
configurable: true,
enumerable: true,
value: t
},
quaternion: {
configurable: true,
enumerable: true,
value: i
},
scale: {
configurable: true,
enumerable: true,
value: r
},
modelViewMatrix: {
value: new Xe()
},
normalMatrix: {
value: new rn()
}
}), this.matrix = new Xe(), this.matrixWorld = new Xe(), this.matrixAutoUpdate = _ut.DefaultMatrixAutoUpdate, this.matrixWorldNeedsUpdate = false, this.layers = new Cf(), this.visible = true, this.castShadow = false, this.receiveShadow = false, this.frustumCulled = true, this.renderOrder = 0, this.animations = [], this.userData = {};
}
onBeforeRender() {
}
onAfterRender() {
}
applyMatrix4(e) {
this.matrixAutoUpdate && this.updateMatrix(), this.matrix.premultiply(e), this.matrix.decompose(this.position, this.quaternion, this.scale);
}
applyQuaternion(e) {
return this.quaternion.premultiply(e), this;
}
setRotationFromAxisAngle(e, t) {
this.quaternion.setFromAxisAngle(e, t);
}
setRotationFromEuler(e) {
this.quaternion.setFromEuler(e, true);
}
setRotationFromMatrix(e) {
this.quaternion.setFromRotationMatrix(e);
}
setRotationFromQuaternion(e) {
this.quaternion.copy(e);
}
rotateOnAxis(e, t) {
return Js.setFromAxisAngle(e, t), this.quaternion.multiply(Js), this;
}
rotateOnWorldAxis(e, t) {
return Js.setFromAxisAngle(e, t), this.quaternion.premultiply(Js), this;
}
rotateX(e) {
return this.rotateOnAxis(Km, e);
}
rotateY(e) {
return this.rotateOnAxis(qm, e);
}
rotateZ(e) {
return this.rotateOnAxis(Qm, e);
}
translateOnAxis(e, t) {
return Jm.copy(e).applyQuaternion(this.quaternion), this.position.add(Jm.multiplyScalar(t)), this;
}
translateX(e) {
return this.translateOnAxis(Km, e);
}
translateY(e) {
return this.translateOnAxis(qm, e);
}
translateZ(e) {
return this.translateOnAxis(Qm, e);
}
localToWorld(e) {
return e.applyMatrix4(this.matrixWorld);
}
worldToLocal(e) {
return e.applyMatrix4(ji.copy(this.matrixWorld).invert());
}
lookAt(e, t, i) {
e.isVector3 ? zl.copy(e) : zl.set(e, t, i);
const r = this.parent;
this.updateWorldMatrix(true, false), fa.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? ji.lookAt(fa, zl, this.up) : ji.lookAt(zl, fa, this.up), this.quaternion.setFromRotationMatrix(ji), r && (ji.extractRotation(r.matrixWorld), Js.setFromRotationMatrix(ji), this.quaternion.premultiply(Js.invert()));
}
add(e) {
if (arguments.length > 1) {
for (let t = 0; t < arguments.length; t++)
this.add(arguments[t]);
return this;
}
return e === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.parent !== null && e.parent.remove(e), e.parent = this, this.children.push(e), e.dispatchEvent(vF)) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this);
}
remove(e) {
if (arguments.length > 1) {
for (let i = 0; i < arguments.length; i++)
this.remove(arguments[i]);
return this;
}
const t = this.children.indexOf(e);
return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(eg)), this;
}
removeFromParent() {
const e = this.parent;
return e !== null && e.remove(this), this;
}
clear() {
for (let e = 0; e < this.children.length; e++) {
const t = this.children[e];
t.parent = null, t.dispatchEvent(eg);
}
return this.children.length = 0, this;
}
attach(e) {
return this.updateWorldMatrix(true, false), ji.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(true, false), ji.multiply(e.parent.matrixWorld)), e.applyMatrix4(ji), this.add(e), e.updateWorldMatrix(false, true), this;
}
getObjectById(e) {
return this.getObjectByProperty("id", e);
}
getObjectByName(e) {
return this.getObjectByProperty("name", e);
}
getObjectByProperty(e, t) {
if (this[e] === t) return this;
for (let i = 0, r = this.children.length; i < r; i++) {
const o = this.children[i].getObjectByProperty(e, t);
if (o !== void 0)
return o;
}
}
getWorldPosition(e) {
return this.updateWorldMatrix(true, false), e.setFromMatrixPosition(this.matrixWorld);
}
getWorldQuaternion(e) {
return this.updateWorldMatrix(true, false), this.matrixWorld.decompose(fa, e, mF), e;
}
getWorldScale(e) {
return this.updateWorldMatrix(true, false), this.matrixWorld.decompose(fa, gF, e), e;
}
getWorldDirection(e) {
this.updateWorldMatrix(true, false);
const t = this.matrixWorld.elements;
return e.set(t[8], t[9], t[10]).normalize();
}
raycast() {
}
traverse(e) {
e(this);
const t = this.children;
for (let i = 0, r = t.length; i < r; i++)
t[i].traverse(e);
}
traverseVisible(e) {
if (this.visible === false) return;
e(this);
const t = this.children;
for (let i = 0, r = t.length; i < r; i++)
t[i].traverseVisible(e);
}
traverseAncestors(e) {
const t = this.parent;
t !== null && (e(t), t.traverseAncestors(e));
}
updateMatrix() {
this.matrix.compose(this.position, this.quaternion, this.scale), this.matrixWorldNeedsUpdate = true;
}
updateMatrixWorld(e) {
this.matrixAutoUpdate && this.updateMatrix(), (this.matrixWorldNeedsUpdate || e) && (this.parent === null ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), this.matrixWorldNeedsUpdate = false, e = true);
const t = this.children;
for (let i = 0, r = t.length; i < r; i++)
t[i].updateMatrixWorld(e);
}
updateWorldMatrix(e, t) {
const i = this.parent;
if (e === true && i !== null && i.updateWorldMatrix(true, false), this.matrixAutoUpdate && this.updateMatrix(), this.parent === null ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), t === true) {
const r = this.children;
for (let s = 0, o = r.length; s < o; s++)
r[s].updateWorldMatrix(false, true);
}
}
toJSON(e) {
const t = e === void 0 || typeof e == "string", i = {};
t && (e = {
geometries: {},
materials: {},
textures: {},
images: {},
shapes: {},
skeletons: {},
animations: {}
}, i.metadata = {
version: 4.5,
type: "Object",
generator: "Object3D.toJSON"
});
const r = {};
r.uuid = this.uuid, r.type = this.type, this.name !== "" && (r.name = this.name), this.castShadow === true && (r.castShadow = true), this.receiveShadow === true && (r.receiveShadow = true), this.visible === false && (r.visible = false), this.frustumCulled === false && (r.frustumCulled = false), this.renderOrder !== 0 && (r.renderOrder = this.renderOrder), JSON.stringify(this.userData) !== "{}" && (r.userData = this.userData), r.layers = this.layers.mask, r.matrix = this.matrix.toArray(), this.matrixAutoUpdate === false && (r.matrixAutoUpdate = false), this.isInstancedMesh && (r.type = "InstancedMesh", r.count = this.count, r.instanceMatrix = this.instanceMatrix.toJSON(), this.instanceColor !== null && (r.instanceColor = this.instanceColor.toJSON()));
function s(a, c) {
return a[c.uuid] === void 0 && (a[c.uuid] = c.toJSON(e)), c.uuid;
}
if (this.isScene)
this.background && (this.background.isColor ? r.background = this.background.toJSON() : this.background.isTexture && (r.background = this.background.toJSON(e).uuid)), this.environment && this.environment.isTexture && (r.environment = this.environment.toJSON(e).uuid);
else if (this.isMesh || this.isLine || this.isPoints) {
r.geometry = s(e.geometries, this.geometry);
const a = this.geometry.parameters;
if (a !== void 0 && a.shapes !== void 0) {
const c = a.shapes;
if (Array.isArray(c))
for (let l = 0, d = c.length; l < d; l++) {
const h6 = c[l];
s(e.shapes, h6);
}
else
s(e.shapes, c);
}
}
if (this.isSkinnedMesh && (r.bindMode = this.bindMode, r.bindMatrix = this.bindMatrix.toArray(), this.skeleton !== void 0 && (s(e.skeletons, this.skeleton), r.skeleton = this.skeleton.uuid)), this.material !== void 0)
if (Array.isArray(this.material)) {
const a = [];
for (let c = 0, l = this.material.length; c < l; c++)
a.push(s(e.materials, this.material[c]));
r.material = a;
} else
r.material = s(e.materials, this.material);
if (this.children.length > 0) {
r.children = [];
for (let a = 0; a < this.children.length; a++)
r.children.push(this.children[a].toJSON(e).object);
}
if (this.animations.length > 0) {
r.animations = [];
for (let a = 0; a < this.animations.length; a++) {
const c = this.animations[a];
r.animations.push(s(e.animations, c));
}
}
if (t) {
const a = o(e.geometries), c = o(e.materials), l = o(e.textures), d = o(e.images), h6 = o(e.shapes), f = o(e.skeletons), g = o(e.animations);
a.length > 0 && (i.geometries = a), c.length > 0 && (i.materials = c), l.length > 0 && (i.textures = l), d.length > 0 && (i.images = d), h6.length > 0 && (i.shapes = h6), f.length > 0 && (i.skeletons = f), g.length > 0 && (i.animations = g);
}
return i.object = r, i;
function o(a) {
const c = [];
for (const l in a) {
const d = a[l];
delete d.metadata, c.push(d);
}
return c;
}
}
clone(e) {
return new this.constructor().copy(this, e);
}
copy(e, t = true) {
if (this.name = e.name, this.up.copy(e.up), this.position.copy(e.position), this.rotation.order = e.rotation.order, this.quaternion.copy(e.quaternion), this.scale.copy(e.scale), this.matrix.copy(e.matrix), this.matrixWorld.copy(e.matrixWorld), this.matrixAutoUpdate = e.matrixAutoUpdate, this.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate, this.layers.mask = e.layers.mask, this.visible = e.visible, this.castShadow = e.castShadow, this.receiveShadow = e.receiveShadow, this.frustumCulled = e.frustumCulled, this.renderOrder = e.renderOrder, this.userData = JSON.parse(JSON.stringify(e.userData)), t === true)
for (let i = 0; i < e.children.length; i++) {
const r = e.children[i];
this.add(r.clone());
}
return this;
}
};
ut.DefaultUp = new q(0, 1, 0);
ut.DefaultMatrixAutoUpdate = true;
ut.prototype.isObject3D = true;
var si = new q();
var $i = new q();
var th = new q();
var Zi = new q();
var Ks = new q();
var qs = new q();
var tg = new q();
var nh = new q();
var ih = new q();
var rh = new q();
var Zt = class _Zt {
constructor(e = new q(), t = new q(), i = new q()) {
this.a = e, this.b = t, this.c = i;
}
static getNormal(e, t, i, r) {
r.subVectors(i, t), si.subVectors(e, t), r.cross(si);
const s = r.lengthSq();
return s > 0 ? r.multiplyScalar(1 / Math.sqrt(s)) : r.set(0, 0, 0);
}
// static/instance method to calculate barycentric coordinates
// based on: http://www.blackpawn.com/texts/pointinpoly/default.html
static getBarycoord(e, t, i, r, s) {
si.subVectors(r, t), $i.subVectors(i, t), th.subVectors(e, t);
const o = si.dot(si), a = si.dot($i), c = si.dot(th), l = $i.dot($i), d = $i.dot(th), h6 = o * l - a * a;
if (h6 === 0)
return s.set(-2, -1, -1);
const f = 1 / h6, g = (l * c - a * d) * f, p = (o * d - a * c) * f;
return s.set(1 - g - p, p, g);
}
static containsPoint(e, t, i, r) {
return this.getBarycoord(e, t, i, r, Zi), Zi.x >= 0 && Zi.y >= 0 && Zi.x + Zi.y <= 1;
}
static getUV(e, t, i, r, s, o, a, c) {
return this.getBarycoord(e, t, i, r, Zi), c.set(0, 0), c.addScaledVector(s, Zi.x), c.addScaledVector(o, Zi.y), c.addScaledVector(a, Zi.z), c;
}
static isFrontFacing(e, t, i, r) {
return si.subVectors(i, t), $i.subVectors(e, t), si.cross($i).dot(r) < 0;
}
set(e, t, i) {
return this.a.copy(e), this.b.copy(t), this.c.copy(i), this;
}
setFromPointsAndIndices(e, t, i, r) {
return this.a.copy(e[t]), this.b.copy(e[i]), this.c.copy(e[r]), this;
}
clone() {
return new this.constructor().copy(this);
}
copy(e) {
return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this;
}
getArea() {
return si.subVectors(this.c, this.b), $i.subVectors(this.a, this.b), si.cross($i).length() * 0.5;
}
getMidpoint(e) {
return e.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);
}
getNormal(e) {
return _Zt.getNormal(this.a, this.b, this.c, e);
}
getPlane(e) {
return e.setFromCoplanarPoints(this.a, this.b, this.c);
}
getBarycoord(e, t) {
return _Zt.getBarycoord(e, this.a, this.b, this.c, t);
}
getUV(e, t, i, r, s) {
return _Zt.getUV(e, this.a, this.b, this.c, t, i, r, s);
}
containsPoint(e) {
return _Zt.containsPoint(e, this.a, this.b, this.c);
}
isFrontFacing(e) {
return _Zt.isFrontFacing(this.a, this.b, this.c, e);
}
intersectsBox(e) {
return e.intersectsTriangle(this);
}
closestPointToPoint(e, t) {
const i = this.a, r = this.b, s = this.c;
let o, a;
Ks.subVectors(r, i), qs.subVectors(s, i), nh.subVectors(e, i);
const c = Ks.dot(nh), l = qs.dot(nh);
if (c <= 0 && l <= 0)
return t.copy(i);
ih.subVectors(e, r);
const d = Ks.dot(ih), h6 = qs.dot(ih);
if (d >= 0 && h6 <= d)
return t.copy(r);
const f = c * h6 - d * l;
if (f <= 0 && c >= 0 && d <= 0)
return o = c / (c - d), t.copy(i).addScaledVector(Ks, o);
rh.subVectors(e, s);
const g = Ks.dot(rh), p = qs.dot(rh);
if (p >= 0 && g <= p)
return t.copy(s);
const u = g * l - c * p;
if (u <= 0 && l >= 0 && p <= 0)
return a = l / (l - p), t.copy(i).addScaledVector(qs, a);
const y = d * p - g * h6;
if (y <= 0 && h6 - d >= 0 && g - p >= 0)
return tg.subVectors(s, r), a = (h6 - d) / (h6 - d + (g - p)), t.copy(r).addScaledVector(tg, a);
const v = 1 / (y + u + f);
return o = u * v, a = f * v, t.copy(i).addScaledVector(Ks, o).addScaledVector(qs, a);
}
equals(e) {
return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
}
};
var yF = 0;
var tn = class extends Kr {
constructor() {
super(), Object.defineProperty(this, "id", { value: yF++ }), this.uuid = Hn(), this.name = "", this.type = "Material", this.fog = true, this.blending = vo, this.side = Hr, this.vertexColors = false, this.opacity = 1, this.transparent = false, this.blendSrc = bf, this.blendDst = xf, this.blendEquation = ps, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = Vc, this.depthTest = true, this.depthWrite = true, this.stencilWriteMask = 255, this.stencilFunc = qb, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Lc, this.stencilZFail = Lc, this.stencilZPass = Lc, this.stencilWrite = false, this.clippingPlanes = null, this.clipIntersection = false, this.clipShadows = false, this.shadowSide = null, this.colorWrite = true, this.precision = null, this.polygonOffset = false, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = false, this.alphaTest = 0, this.alphaToCoverage = false, this.premultipliedAlpha = false, this.visible = true, this.toneMapped = true, this.userData = {}, this.version = 0;
}
onBuild() {
}
onBeforeCompile() {
}
customProgramCacheKey() {
return this.onBeforeCompile.toString();
}
setValues(e) {
if (e !== void 0)
for (const t in e) {
const i = e[t];
if (i === void 0) {
console.warn("THREE.Material: '" + t + "' parameter is undefined.");
continue;
}
if (t === "shading") {
console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = i === yf;
continue;
}
const r = this[t];
if (r === void 0) {
console.warn("THREE." + this.type + ": '" + t + "' is not a property of this material.");
continue;
}
r && r.isColor ? r.set(i) : r && r.isVector3 && i && i.isVector3 ? r.copy(i) : this[t] = i;
}
}
toJSON(e) {
const t = e === void 0 || typeof e == "string";
t && (e = {
textures: {},
images: {}
});
const i = {
metadata: {
version: 4.5,
type: "Material",
generator: "Material.toJSON"
}
};
i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen && this.sheen.isColor && (i.sheen = this.sheen.getHex()), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== vo && (i.blending = this.blending), this.side !== Hr && (i.side = this.side), this.vertexColors && (i.vertexColors = true), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === true && (i.transparent = this.transparent), i.depthFunc = this.depthFunc, i.depthTest = this.depthTest, i.depthWrite = this.depthWrite, i.colorWrite = this.colorWrite, i.stencilWrite = this.stencilWrite, i.stencilWriteMask = this.stencilWriteMask, i.stencilFunc = this.stencilFunc, i.stencilRef = this.stencilRef, i.stencilFuncMask = this.stencilFuncMask, i.stencilFail = this.stencilFail, i.stencilZFail = this.stencilZFail, i.stencilZPass = this.stencilZPass, this.rotation && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === true && (i.polygonOffset = true), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === true && (i.dithering = true), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaToCoverage === true && (i.alphaToCoverage = this.alphaToCoverage), this.premultipliedAlpha === true && (i.premultipliedAlpha = this.premultipliedAlpha), this.wireframe === true && (i.wireframe = this.wireframe), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.morphTargets === true && (i.morphTargets = true), this.morphNormals === true && (i.morphNormals = true), this.flatShading === true && (i.flatShading = this.flatShading), this.visible === false && (i.visible = false), this.toneMapped === false && (i.toneMapped = false), JSON.stringify(this.userData) !== "{}" && (i.userData = this.userData);
function r(s) {
const o = [];
for (const a in s) {
const c = s[a];
delete c.metadata, o.push(c);
}
return o;
}
if (t) {
const s = r(e.textures), o = r(e.images);
s.length > 0 && (i.textures = s), o.length > 0 && (i.images = o);
}
return i;
}
clone() {
return new this.constructor().copy(this);
}
copy(e) {
this.name = e.name, this.fog = e.fog, this.blending = e.blending, this.side = e.side, this.vertexColors = e.vertexColors, this.opacity = e.opacity, this.transparent = e.transparent, this.blendSrc = e.blendSrc, this.blendDst = e.blendDst, this.blendEquation = e.blendEquation, this.blendSrcAlpha = e.blendSrcAlpha, this.blendDstAlpha = e.blendDstAlpha, this.blendEquationAlpha = e.blendEquationAlpha, this.depthFunc = e.depthFunc, this.depthTest = e.depthTest, this.depthWrite = e.depthWrite, this.stencilWriteMask = e.stencilWriteMask, this.stencilFunc = e.stencilFunc, this.stencilRef = e.stencilRef, this.stencilFuncMask = e.stencilFuncMask, this.stencilFail = e.stencilFail, this.stencilZFail = e.stencilZFail, this.stencilZPass = e.stencilZPass, this.stencilWrite = e.stencilWrite;
const t = e.clippingPlanes;
let i = null;
if (t !== null) {
const r = t.length;
i = new Array(r);
for (let s = 0; s !== r; ++s)
i[s] = t[s].clone();
}
return this.clippingPlanes = i, this.clipIntersection = e.clipIntersection, this.clipShadows = e.clipShadows, this.shadowSide = e.shadowSide, this.colorWrite = e.colorWrite, this.precision = e.precision, this.polygonOffset = e.polygonOffset, this.polygonOffsetFactor = e.polygonOffsetFactor, this.polygonOffsetUnits = e.polygonOffsetUnits, this.dithering = e.dithering, this.alphaTest = e.alphaTest, this.alphaToCoverage = e.alphaToCoverage, this.premultipliedAlpha = e.premultipliedAlpha, this.visible = e.visible, this.toneMapped = e.toneMapped, this.userData = JSON.parse(JSON.stringify(e.userData)), this;
}
dispose() {
this.dispatchEvent({ type: "dispose" });
}
set needsUpdate(e) {
e === true && this.version++;
}
};
tn.prototype.isMaterial = true;
var nx = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074
};
var oi = { h: 0, s: 0, l: 0 };
var Vl = { h: 0, s: 0, l: 0 };
function sh(n, e, t) {
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * 6 * (2 / 3 - t) : n;
}
function oh(n) {
return n < 0.04045 ? n * 0.0773993808 : Math.pow(n * 0.9478672986 + 0.0521327014, 2.4);
}
function ah(n) {
return n < 31308e-7 ? n * 12.92 : 1.055 * Math.pow(n, 0.41666) - 0.055;
}
var Ue = class {
constructor(e, t, i) {
return t === void 0 && i === void 0 ? this.set(e) : this.setRGB(e, t, i);
}
set(e) {
return e && e.isColor ? this.copy(e) : typeof e == "number" ? this.setHex(e) : typeof e == "string" && this.setStyle(e), this;
}
setScalar(e) {
return this.r = e, this.g = e, this.b = e, this;
}
setHex(e) {
return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, this;
}
setRGB(e, t, i) {
return this.r = e, this.g = t, this.b = i, this;
}
setHSL(e, t, i) {
if (e = Tf(e, 1), t = gn(t, 0, 1), i = gn(i, 0, 1), t === 0)
this.r = this.g = this.b = i;
else {
const r = i <= 0.5 ? i * (1 + t) : i + t - i * t, s = 2 * i - r;
this.r = sh(s, r, e + 1 / 3), this.g = sh(s, r, e), this.b = sh(s, r, e - 1 / 3);
}
return this;
}
setStyle(e) {
function t(r) {
r !== void 0 && parseFloat(r) < 1 && console.warn("THREE.Color: Alpha component of " + e + " will be ignored.");
}
let i;
if (i = /^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)) {
let r;
const s = i[1], o = i[2];
switch (s) {
case "rgb":
case "rgba":
if (r = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))
return this.r = Math.min(255, parseInt(r[1], 10)) / 255, this.g = Math.min(255, parseInt(r[2], 10)) / 255, this.b = Math.min(255, parseInt(r[3], 10)) / 255, t(r[4]), this;
if (r = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))
return this.r = Math.min(100, parseInt(r[1], 10)) / 100, this.g = Math.min(100, parseInt(r[2], 10)) / 100, this.b = Math.min(100, parseInt(r[3], 10)) / 100, t(r[4]), this;
break;
case "hsl":
case "hsla":
if (r = /^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)) {
const a = parseFloat(r[1]) / 360, c = parseInt(r[2], 10) / 100, l = parseInt(r[3], 10) / 100;
return t(r[4]), this.setHSL(a, c, l);
}
break;
}
} else if (i = /^\#([A-Fa-f\d]+)$/.exec(e)) {
const r = i[1], s = r.length;
if (s === 3)
return this.r = parseInt(r.charAt(0) + r.charAt(0), 16) / 255, this.g = parseInt(r.charAt(1) + r.charAt(1), 16) / 255, this.b = parseInt(r.charAt(2) + r.charAt(2), 16) / 255, this;
if (s === 6)
return this.r = parseInt(r.charAt(0) + r.charAt(1), 16) / 255, this.g = parseInt(r.charAt(2) + r.charAt(3), 16) / 255, this.b = parseInt(r.charAt(4) + r.charAt(5), 16) / 255, this;
}
return e && e.length > 0 ? this.setColorName(e) : this;
}
setColorName(e) {
const t = nx[e.toLowerCase()];
return t !== void 0 ? this.setHex(t) : console.warn("THREE.Color: Unknown color " + e), this;
}
clone() {
return new this.constructor(this.r, this.g, this.b);
}
copy(e) {
return this.r = e.r, this.g = e.g, this.b = e.b, this;
}
copyGammaToLinear(e, t = 2) {
return this.r = Math.pow(e.r, t), this.g = Math.pow(e.g, t), this.b = Math.pow(e.b, t), this;
}
copyLinearToGamma(e, t = 2) {
const i = t > 0 ? 1 / t : 1;
return this.r = Math.pow(e.r, i), this.g = Math.pow(e.g, i), this.b = Math.pow(e.b, i), this;
}
convertGammaToLinear(e) {
return this.copyGammaToLinear(this, e), this;
}
convertLinearToGamma(e) {
return this.copyLinearToGamma(this, e), this;
}
copySRGBToLinear(e) {
return this.r = oh(e.r), this.g = oh(e.g), this.b = oh(e.b), this;
}
copyLinearToSRGB(e) {
return this.r = ah(e.r), this.g = ah(e.g), this.b = ah(e.b), this;
}
convertSRGBToLinear() {
return this.copySRGBToLinear(this), this;
}
convertLinearToSRGB() {
return this.copyLinearToSRGB(this), this;
}
getHex() {
return this.r * 255 << 16 ^ this.g * 255 << 8 ^ this.b * 255 << 0;
}
getHexString() {
return ("000000" + this.getHex().toString(16)).slice(-6);
}
getHSL(e) {
const t = this.r, i = this.g, r = this.b, s = Math.max(t, i, r), o = Math.min(t, i, r);
let a, c;
const l = (o + s) / 2;
if (o === s)
a = 0, c = 0;
else {
const d = s - o;
switch (c = l <= 0.5 ? d / (s + o) : d / (2 - s - o), s) {
case t:
a = (i - r) / d + (i < r ? 6 : 0);
break;
case i:
a = (r - t) / d + 2;
break;
case r:
a = (t - i) / d + 4;
break;
}
a /= 6;
}
return e.h = a, e.s = c, e.l = l, e;
}
getStyle() {
return "rgb(" + (this.r * 255 | 0) + "," + (this.g * 255 | 0) + "," + (this.b * 255 | 0) + ")";
}
offsetHSL(e, t, i) {
return this.getHSL(oi), oi.h += e, oi.s += t, oi.l += i, this.setHSL(oi.h, oi.s, oi.l), this;
}
add(e) {
return this.r += e.r, this.g += e.g, this.b += e.b, this;
}
addColors(e, t) {
return this.r = e.r + t.r, this.g = e.g + t.g, this.b = e.b + t.b, this;
}
addScalar(e) {
return this.r += e, this.g += e, this.b += e, this;
}
sub(e) {
return this.r = Math.max(0, this.r - e.r), this.g = Math.max(0, this.g - e.g), this.b = Math.max(0, this.b - e.b), this;
}
multiply(e) {
return this.r *= e.r, this.g *= e.g, this.b *= e.b, this;
}
multiplyScalar(e) {
return this.r *= e, this.g *= e, this.b *= e, this;
}
lerp(e, t) {
return this.r += (e.r - this.r) * t, this.g += (e.g - this.g) * t, this.b += (e.b - this.b) * t, this;
}
lerpColors(e, t, i) {
return this.r = e.r + (t.r - e.r) * i, this.g = e.g + (t.g - e.g) * i, this.b = e.b + (t.b - e.b) * i, this;
}
lerpHSL(e, t) {
this.getHSL(oi), e.getHSL(Vl);
const i = Fa(oi.h, Vl.h, t), r = Fa(oi.s, Vl.s, t), s = Fa(oi.l, Vl.l, t);
return this.setHSL(i, r, s), this;
}
equals(e) {
return e.r === this.r && e.g === this.g && e.b === this.b;
}
fromArray(e, t = 0) {
return this.r = e[t], this.g = e[t + 1], this.b = e[t + 2], this;
}
toArray(e = [], t = 0) {
return e[t] = this.r, e[t + 1] = this.g, e[t + 2] = this.b, e;
}
fromBufferAttribute(e, t) {
return this.r = e.getX(t), this.g = e.getY(t), this.b = e.getZ(t), e.normalized === true && (this.r /= 255, this.g /= 255, this.b /= 255), this;
}
toJSON() {
return this.getHex();
}
};
Ue.NAMES = nx;
Ue.prototype.isColor = true;
Ue.prototype.r = 1;
Ue.prototype.g = 1;
Ue.prototype.b = 1;
var In = class extends tn {
constructor(e) {
super(), this.type = "MeshBasicMaterial", this.color = new Ue(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = al, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = false, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.morphTargets = false, this.setValues(e);
}
copy(e) {
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.morphTargets = e.morphTargets, this;
}
};
In.prototype.isMeshBasicMaterial = true;
var St = new q();
var kl = new Re();
var ot = class {
constructor(e, t, i) {
if (Array.isArray(e))
throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
this.name = "", this.array = e, this.itemSize = t, this.count = e !== void 0 ? e.length / t : 0, this.normalized = i === true, this.usage = Ro, this.updateRange = { offset: 0, count: -1 }, this.version = 0;
}
onUploadCallback() {
}
set needsUpdate(e) {
e === true && this.version++;
}
setUsage(e) {
return this.usage = e, this;
}
copy(e) {
return this.name = e.name, this.array = new e.array.constructor(e.array), this.itemSize = e.itemSize, this.count = e.count, this.normalized = e.normalized, this.usage = e.usage, this;
}
copyAt(e, t, i) {
e *= this.itemSize, i *= t.itemSize;
for (let r = 0, s = this.itemSize; r < s; r++)
this.array[e + r] = t.array[i + r];
return this;
}
copyArray(e) {
return this.array.set(e), this;
}
copyColorsArray(e) {
const t = this.array;
let i = 0;
for (let r = 0, s = e.length; r < s; r++) {
let o = e[r];
o === void 0 && (console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined", r), o = new Ue()), t[i++] = o.r, t[i++] = o.g, t[i++] = o.b;
}
return this;
}
copyVector2sArray(e) {
const t = this.array;
let i = 0;
for (let r = 0, s = e.length; r < s; r++) {
let o = e[r];
o === void 0 && (console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined", r), o = new Re()), t[i++] = o.x, t[i++] = o.y;
}
return this;
}
copyVector3sArray(e) {
const t = this.array;
let i = 0;
for (let r = 0, s = e.length; r < s; r++) {
let o = e[r];
o === void 0 && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", r), o = new q()), t[i++] = o.x, t[i++] = o.y, t[i++] = o.z;
}
return this;
}
copyVector4sArray(e) {
const t = this.array;
let i = 0;
for (let r = 0, s = e.length; r < s; r++) {
let o = e[r];
o === void 0 && (console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined", r), o = new xt()), t[i++] = o.x, t[i++] = o.y, t[i++] = o.z, t[i++] = o.w;
}
return this;
}
applyMatrix3(e) {
if (this.itemSize === 2)
for (let t = 0, i = this.count; t < i; t++)
kl.fromBufferAttribute(this, t), kl.applyMatrix3(e), this.setXY(t, kl.x, kl.y);
else if (this.itemSize === 3)
for (let t = 0, i = this.count; t < i; t++)
St.fromBufferAttribute(this, t), St.applyMatrix3(e), this.setXYZ(t, St.x, St.y, St.z);
return this;
}
applyMatrix4(e) {
for (let t = 0, i = this.count; t < i; t++)
St.x = this.getX(t), St.y = this.getY(t), St.z = this.getZ(t), St.applyMatrix4(e), this.setXYZ(t, St.x, St.y, St.z);
return this;
}
applyNormalMatrix(e) {
for (let t = 0, i = this.count; t < i; t++)
St.x = this.getX(t), St.y = this.getY(t), St.z = this.getZ(t), St.applyNormalMatrix(e), this.setXYZ(t, St.x, St.y, St.z);
return this;
}
transformDirection(e) {
for (let t = 0, i = this.count; t < i; t++)
St.x = this.getX(t), St.y = this.getY(t), St.z = this.getZ(t), St.transformDirection(e), this.setXYZ(t, St.x, St.y, St.z);
return this;
}
set(e, t = 0) {
return this.array.set(e, t), this;
}
getX(e) {
return this.array[e * this.itemSize];
}
setX(e, t) {
return this.array[e * this.itemSize] = t, this;
}
getY(e) {
return this.array[e * this.itemSize + 1];
}
setY(e, t) {
return this.array[e * this.itemSize + 1] = t, this;
}
getZ(e) {
return this.array[e * this.itemSize + 2];
}
setZ(e, t) {
return this.array[e * this.itemSize + 2] = t, this;
}
getW(e) {
return this.array[e * this.itemSize + 3];
}
setW(e, t) {
return this.array[e * this.itemSize + 3] = t, this;
}
setXY(e, t, i) {
return e *= this.itemSize, this.array[e + 0] = t, this.array[e + 1] = i, this;
}
setXYZ(e, t, i, r) {
return e *= this.itemSize, this.array[e + 0] = t, this.array[e + 1] = i, this.array[e + 2] = r, this;
}
setXYZW(e, t, i, r, s) {
return e *= this.itemSize, this.array[e + 0] = t, this.array[e + 1] = i, this.array[e + 2] = r, this.array[e + 3] = s, this;
}
onUpload(e) {
return this.onUploadCallback = e, this;
}
clone() {
return new this.constructor(this.array, this.itemSize).copy(this);
}
toJSON() {
const e = {
itemSize: this.itemSize,
type: this.array.constructor.name,
array: Array.prototype.slice.call(this.array),
normalized: this.normalized
};
return this.name !== "" && (e.name = this.name), this.usage !== Ro && (e.usage = this.usage), (this.updateRange.offset !== 0 || this.updateRange.count !== -1) && (e.updateRange = this.updateRange), e;
}
};
ot.prototype.isBufferAttribute = true;
var ix = class extends ot {
constructor(e, t, i) {
super(new Int8Array(e), t, i);
}
};
var rx = class extends ot {
constructor(e, t, i) {
super(new Uint8Array(e), t, i);
}
};
var sx = class extends ot {
constructor(e, t, i) {
super(new Uint8ClampedArray(e), t, i);
}
};
var ox = class extends ot {
constructor(e, t, i) {
super(new Int16Array(e), t, i);
}
};
var gu = class extends ot {
constructor(e, t, i) {
super(new Uint16Array(e), t, i);
}
};
var ax = class extends ot {
constructor(e, t, i) {
super(new Int32Array(e), t, i);
}
};
var vu = class extends ot {
constructor(e, t, i) {
super(new Uint32Array(e), t, i);
}
};
var lx = class extends ot {
constructor(e, t, i) {
super(new Uint16Array(e), t, i);
}
};
lx.prototype.isFloat16BufferAttribute = true;
var He = class extends ot {
constructor(e, t, i) {
super(new Float32Array(e), t, i);
}
};
var cx = class extends ot {
constructor(e, t, i) {
super(new Float64Array(e), t, i);
}
};
function ux(n) {
if (n.length === 0) return -1 / 0;
let e = n[0];
for (let t = 1, i = n.length; t < i; ++t)
n[t] > e && (e = n[t]);
return e;
}
var bF = {
Int8Array,
Uint8Array,
Uint8ClampedArray,
Int16Array,
Uint16Array,
Int32Array,
Uint32Array,
Float32Array,
Float64Array
};
function mo(n, e) {
return new bF[n](e);
}
var xF = 0;
var Xn = new Xe();
var lh = new ut();
var Qs = new q();
var Un = new Nn();
var pa = new Nn();
var cn = new q();
var Ke = class _Ke extends Kr {
constructor() {
super(), Object.defineProperty(this, "id", { value: xF++ }), this.uuid = Hn(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = false, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
}
getIndex() {
return this.index;
}
setIndex(e) {
return Array.isArray(e) ? this.index = new (ux(e) > 65535 ? vu : gu)(e, 1) : this.index = e, this;
}
getAttribute(e) {
return this.attributes[e];
}
setAttribute(e, t) {
return this.attributes[e] = t, this;
}
deleteAttribute(e) {
return delete this.attributes[e], this;
}
hasAttribute(e) {
return this.attributes[e] !== void 0;
}
addGroup(e, t, i = 0) {
this.groups.push({
start: e,
count: t,
materialIndex: i
});
}
clearGroups() {
this.groups = [];
}
setDrawRange(e, t) {
this.drawRange.start = e, this.drawRange.count = t;
}
applyMatrix4(e) {
const t = this.attributes.position;
t !== void 0 && (t.applyMatrix4(e), t.needsUpdate = true);
const i = this.attributes.normal;
if (i !== void 0) {
const s = new rn().getNormalMatrix(e);
i.applyNormalMatrix(s), i.needsUpdate = true;
}
const r = this.attributes.tangent;
return r !== void 0 && (r.transformDirection(e), r.needsUpdate = true), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
}
applyQuaternion(e) {
return Xn.makeRotationFromQuaternion(e), this.applyMatrix4(Xn), this;
}
rotateX(e) {
return Xn.makeRotationX(e), this.applyMatrix4(Xn), this;
}
rotateY(e) {
return Xn.makeRotationY(e), this.applyMatrix4(Xn), this;
}
rotateZ(e) {
return Xn.makeRotationZ(e), this.applyMatrix4(Xn), this;
}
translate(e, t, i) {
return Xn.makeTranslation(e, t, i), this.applyMatrix4(Xn), this;
}
scale(e, t, i) {
return Xn.makeScale(e, t, i), this.applyMatrix4(Xn), this;
}
lookAt(e) {
return lh.lookAt(e), lh.updateMatrix(), this.applyMatrix4(lh.matrix), this;
}
center() {
return this.computeBoundingBox(), this.boundingBox.getCenter(Qs).negate(), this.translate(Qs.x, Qs.y, Qs.z), this;
}
setFromPoints(e) {
const t = [];
for (let i = 0, r = e.length; i < r; i++) {
const s = e[i];
t.push(s.x, s.y, s.z || 0);
}
return this.setAttribute("position", new He(t, 3)), this;
}
computeBoundingBox() {
this.boundingBox === null && (this.boundingBox = new Nn());
const e = this.attributes.position, t = this.morphAttributes.position;
if (e && e.isGLBufferAttribute) {
console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', this), this.boundingBox.set(
new q(-1 / 0, -1 / 0, -1 / 0),
new q(1 / 0, 1 / 0, 1 / 0)
);
return;
}
if (e !== void 0) {
if (this.boundingBox.setFromBufferAttribute(e), t)
for (let i = 0, r = t.length; i < r; i++) {
const s = t[i];
Un.setFromBufferAttribute(s), this.morphTargetsRelative ? (cn.addVectors(this.boundingBox.min, Un.min), this.boundingBox.expandByPoint(cn), cn.addVectors(this.boundingBox.max, Un.max), this.boundingBox.expandByPoint(cn)) : (this.boundingBox.expandByPoint(Un.min), this.boundingBox.expandByPoint(Un.max));
}
} else
this.boundingBox.makeEmpty();
(isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this);
}
computeBoundingSphere() {
this.boundingSphere === null && (this.boundingSphere = new pr());
const e = this.attributes.position, t = this.morphAttributes.position;
if (e && e.isGLBufferAttribute) {
console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', this), this.boundingSphere.set(new q(), 1 / 0);
return;
}
if (e) {
const i = this.boundingSphere.center;
if (Un.setFromBufferAttribute(e), t)
for (let s = 0, o = t.length; s < o; s++) {
const a = t[s];
pa.setFromBufferAttribute(a), this.morphTargetsRelative ? (cn.addVectors(Un.min, pa.min), Un.expandByPoint(cn), cn.addVectors(Un.max, pa.max), Un.expandByPoint(cn)) : (Un.expandByPoint(pa.min), Un.expandByPoint(pa.max));
}
Un.getCenter(i);
let r = 0;
for (let s = 0, o = e.count; s < o; s++)
cn.fromBufferAttribute(e, s), r = Math.max(r, i.distanceToSquared(cn));
if (t)
for (let s = 0, o = t.length; s < o; s++) {
const a = t[s], c = this.morphTargetsRelative;
for (let l = 0, d = a.count; l < d; l++)
cn.fromBufferAttribute(a, l), c && (Qs.fromBufferAttribute(e, l), cn.add(Qs)), r = Math.max(r, i.distanceToSquared(cn));
}
this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
}
}
computeFaceNormals() {
}
computeTangents() {
const e = this.index, t = this.attributes;
if (e === null || t.position === void 0 || t.normal === void 0 || t.uv === void 0) {
console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");
return;
}
const i = e.array, r = t.position.array, s = t.normal.array, o = t.uv.array, a = r.length / 3;
t.tangent === void 0 && this.setAttribute("tangent", new ot(new Float32Array(4 * a), 4));
const c = t.tangent.array, l = [], d = [];
for (let I = 0; I < a; I++)
l[I] = new q(), d[I] = new q();
const h6 = new q(), f = new q(), g = new q(), p = new Re(), u = new Re(), y = new Re(), v = new q(), m = new q();
function x(I, T, _) {
h6.fromArray(r, I * 3), f.fromArray(r, T * 3), g.fromArray(r, _ * 3), p.fromArray(o, I * 2), u.fromArray(o, T * 2), y.fromArray(o, _ * 2), f.sub(h6), g.sub(h6), u.sub(p), y.sub(p);
const E = 1 / (u.x * y.y - y.x * u.y);
isFinite(E) && (v.copy(f).multiplyScalar(y.y).addScaledVector(g, -u.y).multiplyScalar(E), m.copy(g).multiplyScalar(u.x).addScaledVector(f, -y.x).multiplyScalar(E), l[I].add(v), l[T].add(v), l[_].add(v), d[I].add(m), d[T].add(m), d[_].add(m));
}
let w = this.groups;
w.length === 0 && (w = [{
start: 0,
count: i.length
}]);
for (let I = 0, T = w.length; I < T; ++I) {
const _ = w[I], E = _.start, C = _.count;
for (let P = E, b = E + C; P < b; P += 3)
x(
i[P + 0],
i[P + 1],
i[P + 2]
);
}
const A = new q(), M = new q(), R = new q(), L = new q();
function S(I) {
R.fromArray(s, I * 3), L.copy(R);
const T = l[I];
A.copy(T), A.sub(R.multiplyScalar(R.dot(T))).normalize(), M.crossVectors(L, T);
const E = M.dot(d[I]) < 0 ? -1 : 1;
c[I * 4] = A.x, c[I * 4 + 1] = A.y, c[I * 4 + 2] = A.z, c[I * 4 + 3] = E;
}
for (let I = 0, T = w.length; I < T; ++I) {
const _ = w[I], E = _.start, C = _.count;
for (let P = E, b = E + C; P < b; P += 3)
S(i[P + 0]), S(i[P + 1]), S(i[P + 2]);
}
}
computeVertexNormals() {
const e = this.index, t = this.getAttribute("position");
if (t !== void 0) {
let i = this.getAttribute("normal");
if (i === void 0)
i = new ot(new Float32Array(t.count * 3), 3), this.setAttribute("normal", i);
else
for (let f = 0, g = i.count; f < g; f++)
i.setXYZ(f, 0, 0, 0);
const r = new q(), s = new q(), o = new q(), a = new q(), c = new q(), l = new q(), d = new q(), h6 = new q();
if (e)
for (let f = 0, g = e.count; f < g; f += 3) {
const p = e.getX(f + 0), u = e.getX(f + 1), y = e.getX(f + 2);
r.fromBufferAttribute(t, p), s.fromBufferAttribute(t, u), o.fromBufferAttribute(t, y), d.subVectors(o, s), h6.subVectors(r, s), d.cross(h6), a.fromBufferAttribute(i, p), c.fromBufferAttribute(i, u), l.fromBufferAttribute(i, y), a.add(d), c.add(d), l.add(d), i.setXYZ(p, a.x, a.y, a.z), i.setXYZ(u, c.x, c.y, c.z), i.setXYZ(y, l.x, l.y, l.z);
}
else
for (let f = 0, g = t.count; f < g; f += 3)
r.fromBufferAttribute(t, f + 0), s.fromBufferAttribute(t, f + 1), o.fromBufferAttribute(t, f + 2), d.subVectors(o, s), h6.subVectors(r, s), d.cross(h6), i.setXYZ(f + 0, d.x, d.y, d.z), i.setXYZ(f + 1, d.x, d.y, d.z), i.setXYZ(f + 2, d.x, d.y, d.z);
this.normalizeNormals(), i.needsUpdate = true;
}
}
merge(e, t) {
if (!(e && e.isBufferGeometry)) {
console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.", e);
return;
}
t === void 0 && (t = 0, console.warn(
"THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."
));
const i = this.attributes;
for (const r in i) {
if (e.attributes[r] === void 0) continue;
const o = i[r].array, a = e.attributes[r], c = a.array, l = a.itemSize * t, d = Math.min(c.length, o.length - l);
for (let h6 = 0, f = l; h6 < d; h6++, f++)
o[f] = c[h6];
}
return this;
}
normalizeNormals() {
const e = this.attributes.normal;
for (let t = 0, i = e.count; t < i; t++)
cn.fromBufferAttribute(e, t), cn.normalize(), e.setXYZ(t, cn.x, cn.y, cn.z);
}
toNonIndexed() {
function e(a, c) {
const l = a.array, d = a.itemSize, h6 = a.normalized, f = new l.constructor(c.length * d);
let g = 0, p = 0;
for (let u = 0, y = c.length; u < y; u++) {
a.isInterleavedBufferAttribute ? g = c[u] * a.data.stride + a.offset : g = c[u] * d;
for (let v = 0; v < d; v++)
f[p++] = l[g++];
}
return new ot(f, d, h6);
}
if (this.index === null)
return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
const t = new _Ke(), i = this.index.array, r = this.attributes;
for (const a in r) {
const c = r[a], l = e(c, i);
t.setAttribute(a, l);
}
const s = this.morphAttributes;
for (const a in s) {
const c = [], l = s[a];
for (let d = 0, h6 = l.length; d < h6; d++) {
const f = l[d], g = e(f, i);
c.push(g);
}
t.morphAttributes[a] = c;
}
t.morphTargetsRelative = this.morphTargetsRelative;
const o = this.groups;
for (let a = 0, c = o.length; a < c; a++) {
const l = o[a];
t.addGroup(l.start, l.count, l.materialIndex);
}
return t;
}
toJSON() {
const e = {
metadata: {
version: 4.5,
type: "BufferGeometry",
generator: "BufferGeometry.toJSON"
}
};
if (e.uuid = this.uuid, e.type = this.type, this.name !== "" && (e.name = this.name), Object.keys(this.userData).length > 0 && (e.userData = this.userData), this.parameters !== void 0) {
const c = this.parameters;
for (const l in c)
c[l] !== void 0 && (e[l] = c[l]);
return e;
}
e.data = { attributes: {} };
const t = this.index;
t !== null && (e.data.index = {
type: t.array.constructor.name,
array: Array.prototype.slice.call(t.array)
});
const i = this.attributes;
for (const c in i) {
const l = i[c];
e.data.attributes[c] = l.toJSON(e.data);
}
const r = {};
let s = false;
for (const c in this.morphAttributes) {
const l = this.morphAttributes[c], d = [];
for (let h6 = 0, f = l.length; h6 < f; h6++) {
const g = l[h6];
d.push(g.toJSON(e.data));
}
d.length > 0 && (r[c] = d, s = true);
}
s && (e.data.morphAttributes = r, e.data.morphTargetsRelative = this.morphTargetsRelative);
const o = this.groups;
o.length > 0 && (e.data.groups = JSON.parse(JSON.stringify(o)));
const a = this.boundingSphere;
return a !== null && (e.data.boundingSphere = {
center: a.center.toArray(),
radius: a.radius
}), e;
}
clone() {
return new _Ke().copy(this);
}
copy(e) {
this.index = null, this.attributes = {}, this.morphAttributes = {}, this.groups = [], this.boundingBox = null, this.boundingSphere = null;
const t = {};
this.name = e.name;
const i = e.index;
i !== null && this.setIndex(i.clone(t));
const r = e.attributes;
for (const l in r) {
const d = r[l];
this.setAttribute(l, d.clone(t));
}
const s = e.morphAttributes;
for (const l in s) {
const d = [], h6 = s[l];
for (let f = 0, g = h6.length; f < g; f++)
d.push(h6[f].clone(t));
this.morphAttributes[l] = d;
}
this.morphTargetsRelative = e.morphTargetsRelative;
const o = e.groups;
for (let l = 0, d = o.length; l < d; l++) {
const h6 = o[l];
this.addGroup(h6.start, h6.count, h6.materialIndex);
}
const a = e.boundingBox;
a !== null && (this.boundingBox = a.clone());
const c = e.boundingSphere;
return c !== null && (this.boundingSphere = c.clone()), this.drawRange.start = e.drawRange.start, this.drawRange.count = e.drawRange.count, this.userData = e.userData, this;
}
dispose() {
this.dispatchEvent({ type: "dispose" });
}
};
Ke.prototype.isBufferGeometry = true;
var ng = new Xe();
var eo = new qr();
var ch = new pr();
var Mr = new q();
var wr = new q();
var Ar = new q();
var uh = new q();
var hh = new q();
var dh = new q();
var Gl = new q();
var Hl = new q();
var Wl = new q();
var jl = new Re();
var $l = new Re();
var Zl = new Re();
var fh = new q();
var Xl = new q();
var Xt = class extends ut {
constructor(e = new Ke(), t = new In()) {
super(), this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
}
copy(e) {
return super.copy(e), e.morphTargetInfluences !== void 0 && (this.morphTargetInfluences = e.morphTargetInfluences.slice()), e.morphTargetDictionary !== void 0 && (this.morphTargetDictionary = Object.assign({}, e.morphTargetDictionary)), this.material = e.material, this.geometry = e.geometry, this;
}
updateMorphTargets() {
const e = this.geometry;
if (e.isBufferGeometry) {
const t = e.morphAttributes, i = Object.keys(t);
if (i.length > 0) {
const r = t[i[0]];
if (r !== void 0) {
this.morphTargetInfluences = [], this.morphTargetDictionary = {};
for (let s = 0, o = r.length; s < o; s++) {
const a = r[s].name || String(s);
this.morphTargetInfluences.push(0), this.morphTargetDictionary[a] = s;
}
}
}
} else {
const t = e.morphTargets;
t !== void 0 && t.length > 0 && console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
}
}
raycast(e, t) {
const i = this.geometry, r = this.material, s = this.matrixWorld;
if (r === void 0 || (i.boundingSphere === null && i.computeBoundingSphere(), ch.copy(i.boundingSphere), ch.applyMatrix4(s), e.ray.intersectsSphere(ch) === false) || (ng.copy(s).invert(), eo.copy(e.ray).applyMatrix4(ng), i.boundingBox !== null && eo.intersectsBox(i.boundingBox) === false))
return;
let o;
if (i.isBufferGeometry) {
const a = i.index, c = i.attributes.position, l = i.morphAttributes.position, d = i.morphTargetsRelative, h6 = i.attributes.uv, f = i.attributes.uv2, g = i.groups, p = i.drawRange;
if (a !== null)
if (Array.isArray(r))
for (let u = 0, y = g.length; u < y; u++) {
const v = g[u], m = r[v.materialIndex], x = Math.max(v.start, p.start), w = Math.min(v.start + v.count, p.start + p.count);
for (let A = x, M = w; A < M; A += 3) {
const R = a.getX(A), L = a.getX(A + 1), S = a.getX(A + 2);
o = Yl(this, m, e, eo, c, l, d, h6, f, R, L, S), o && (o.faceIndex = Math.floor(A / 3), o.face.materialIndex = v.materialIndex, t.push(o));
}
}
else {
const u = Math.max(0, p.start), y = Math.min(a.count, p.start + p.count);
for (let v = u, m = y; v < m; v += 3) {
const x = a.getX(v), w = a.getX(v + 1), A = a.getX(v + 2);
o = Yl(this, r, e, eo, c, l, d, h6, f, x, w, A), o && (o.faceIndex = Math.floor(v / 3), t.push(o));
}
}
else if (c !== void 0)
if (Array.isArray(r))
for (let u = 0, y = g.length; u < y; u++) {
const v = g[u], m = r[v.materialIndex], x = Math.max(v.start, p.start), w = Math.min(v.start + v.count, p.start + p.count);
for (let A = x, M = w; A < M; A += 3) {
const R = A, L = A + 1, S = A + 2;
o = Yl(this, m, e, eo, c, l, d, h6, f, R, L, S), o && (o.faceIndex = Math.floor(A / 3), o.face.materialIndex = v.materialIndex, t.push(o));
}
}
else {
const u = Math.max(0, p.start), y = Math.min(c.count, p.start + p.count);
for (let v = u, m = y; v < m; v += 3) {
const x = v, w = v + 1, A = v + 2;
o = Yl(this, r, e, eo, c, l, d, h6, f, x, w, A), o && (o.faceIndex = Math.floor(v / 3), t.push(o));
}
}
} else i.isGeometry && console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
}
};
Xt.prototype.isMesh = true;
function MF(n, e, t, i, r, s, o, a) {
let c;
if (e.side === jt ? c = i.intersectTriangle(o, s, r, true, a) : c = i.intersectTriangle(r, s, o, e.side !== Wr, a), c === null) return null;
Xl.copy(a), Xl.applyMatrix4(n.matrixWorld);
const l = t.ray.origin.distanceTo(Xl);
return l < t.near || l > t.far ? null : {
distance: l,
point: Xl.clone(),
object: n
};
}
function Yl(n, e, t, i, r, s, o, a, c, l, d, h6) {
Mr.fromBufferAttribute(r, l), wr.fromBufferAttribute(r, d), Ar.fromBufferAttribute(r, h6);
const f = n.morphTargetInfluences;
if (e.morphTargets && s && f) {
Gl.set(0, 0, 0), Hl.set(0, 0, 0), Wl.set(0, 0, 0);
for (let p = 0, u = s.length; p < u; p++) {
const y = f[p], v = s[p];
y !== 0 && (uh.fromBufferAttribute(v, l), hh.fromBufferAttribute(v, d), dh.fromBufferAttribute(v, h6), o ? (Gl.addScaledVector(uh, y), Hl.addScaledVector(hh, y), Wl.addScaledVector(dh, y)) : (Gl.addScaledVector(uh.sub(Mr), y), Hl.addScaledVector(hh.sub(wr), y), Wl.addScaledVector(dh.sub(Ar), y)));
}
Mr.add(Gl), wr.add(Hl), Ar.add(Wl);
}
n.isSkinnedMesh && (n.boneTransform(l, Mr), n.boneTransform(d, wr), n.boneTransform(h6, Ar));
const g = MF(n, e, t, i, Mr, wr, Ar, fh);
if (g) {
a && (jl.fromBufferAttribute(a, l), $l.fromBufferAttribute(a, d), Zl.fromBufferAttribute(a, h6), g.uv = Zt.getUV(fh, Mr, wr, Ar, jl, $l, Zl, new Re())), c && (jl.fromBufferAttribute(c, l), $l.fromBufferAttribute(c, d), Zl.fromBufferAttribute(c, h6), g.uv2 = Zt.getUV(fh, Mr, wr, Ar, jl, $l, Zl, new Re()));
const p = {
a: l,
b: d,
c: h6,
normal: new q(),
materialIndex: 0
};
Zt.getNormal(Mr, wr, Ar, p.normal), g.face = p;
}
return g;
}
var sr = class _sr extends Ke {
constructor(e = 1, t = 1, i = 1, r = 1, s = 1, o = 1) {
super(), this.type = "BoxGeometry", this.parameters = {
width: e,
height: t,
depth: i,
widthSegments: r,
heightSegments: s,
depthSegments: o
};
const a = this;
r = Math.floor(r), s = Math.floor(s), o = Math.floor(o);
const c = [], l = [], d = [], h6 = [];
let f = 0, g = 0;
p("z", "y", "x", -1, -1, i, t, e, o, s, 0), p("z", "y", "x", 1, -1, i, t, -e, o, s, 1), p("x", "z", "y", 1, 1, e, i, t, r, o, 2), p("x", "z", "y", 1, -1, e, i, -t, r, o, 3), p("x", "y", "z", 1, -1, e, t, i, r, s, 4), p("x", "y", "z", -1, -1, e, t, -i, r, s, 5), this.setIndex(c), this.setAttribute("position", new He(l, 3)), this.setAttribute("normal", new He(d, 3)), this.setAttribute("uv", new He(h6, 2));
function p(u, y, v, m, x, w, A, M, R, L, S) {
const I = w / R, T = A / L, _ = w / 2, E = A / 2, C = M / 2, P = R + 1, b = L + 1;
let F = 0, D = 0;
const N = new q();
for (let B = 0; B < b; B++) {
const U = B * T - E;
for (let G = 0; G < P; G++) {
const Y = G * I - _;
N[u] = Y * m, N[y] = U * x, N[v] = C, l.push(N.x, N.y, N.z), N[u] = 0, N[y] = 0, N[v] = M > 0 ? 1 : -1, d.push(N.x, N.y, N.z), h6.push(G / R), h6.push(1 - B / L), F += 1;
}
}
for (let B = 0; B < L; B++)
for (let U = 0; U < R; U++) {
const G = f + U + P * B, Y = f + U + P * (B + 1), te = f + (U + 1) + P * (B + 1), ae = f + (U + 1) + P * B;
c.push(G, Y, ae), c.push(Y, te, ae), D += 6;
}
a.addGroup(g, D, S), g += D, f += F;
}
}
static fromJSON(e) {
return new _sr(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
}
};
function Po(n) {
const e = {};
for (const t in n) {
e[t] = {};
for (const i in n[t]) {
const r = n[t][i];
r && (r.isColor || r.isMatrix3 || r.isMatrix4 || r.isVector2 || r.isVector3 || r.isVector4 || r.isTexture || r.isQuaternion) ? e[t][i] = r.clone() : Array.isArray(r) ? e[t][i] = r.slice() : e[t][i] = r;
}
}
return e;
}
function wn2(n) {
const e = {};
for (let t = 0; t < n.length; t++) {
const i = Po(n[t]);
for (const r in i)
e[r] = i[r];
}
return e;
}
var hx = { clone: Po, merge: wn2 };
var wF = `void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`;
var AF = `void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;
var or = class extends tn {
constructor(e) {
super(), this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.vertexShader = wF, this.fragmentShader = AF, this.linewidth = 1, this.wireframe = false, this.wireframeLinewidth = 1, this.fog = false, this.lights = false, this.clipping = false, this.morphTargets = false, this.morphNormals = false, this.extensions = {
derivatives: false,
// set to use derivatives
fragDepth: false,
// set to use fragment depth values
drawBuffers: false,
// set to use draw buffers
shaderTextureLOD: false
// set to use shader texture LOD
}, this.defaultAttributeValues = {
color: [1, 1, 1],
uv: [0, 0],
uv2: [0, 0]
}, this.index0AttributeName = void 0, this.uniformsNeedUpdate = false, this.glslVersion = null, e !== void 0 && (e.attributes !== void 0 && console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."), this.setValues(e));
}
copy(e) {
return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = Po(e.uniforms), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.lights = e.lights, this.clipping = e.clipping, this.morphTargets = e.morphTargets, this.morphNormals = e.morphNormals, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this;
}
toJSON(e) {
const t = super.toJSON(e);
t.glslVersion = this.glslVersion, t.uniforms = {};
for (const r in this.uniforms) {
const o = this.uniforms[r].value;
o && o.isTexture ? t.uniforms[r] = {
type: "t",
value: o.toJSON(e).uuid
} : o && o.isColor ? t.uniforms[r] = {
type: "c",
value: o.getHex()
} : o && o.isVector2 ? t.uniforms[r] = {
type: "v2",
value: o.toArray()
} : o && o.isVector3 ? t.uniforms[r] = {
type: "v3",
value: o.toArray()
} : o && o.isVector4 ? t.uniforms[r] = {
type: "v4",
value: o.toArray()
} : o && o.isMatrix3 ? t.uniforms[r] = {
type: "m3",
value: o.toArray()
} : o && o.isMatrix4 ? t.uniforms[r] = {
type: "m4",
value: o.toArray()
} : t.uniforms[r] = {
value: o
};
}
Object.keys(this.defines).length > 0 && (t.defines = this.defines), t.vertexShader = this.vertexShader, t.fragmentShader = this.fragmentShader;
const i = {};
for (const r in this.extensions)
this.extensions[r] === true && (i[r] = true);
return Object.keys(i).length > 0 && (t.extensions = i), t;
}
};
or.prototype.isShaderMaterial = true;
var hl = class extends ut {
constructor() {
super(), this.type = "Camera", this.matrixWorldInverse = new Xe(), this.projectionMatrix = new Xe(), this.projectionMatrixInverse = new Xe();
}
copy(e, t) {
return super.copy(e, t), this.matrixWorldInverse.copy(e.matrixWorldInverse), this.projectionMatrix.copy(e.projectionMatrix), this.projectionMatrixInverse.copy(e.projectionMatrixInverse), this;
}
getWorldDirection(e) {
this.updateWorldMatrix(true, false);
const t = this.matrixWorld.elements;
return e.set(-t[8], -t[9], -t[10]).normalize();
}
updateMatrixWorld(e) {
super.updateMatrixWorld(e), this.matrixWorldInverse.copy(this.matrixWorld).invert();
}
updateWorldMatrix(e, t) {
super.updateWorldMatrix(e, t), this.matrixWorldInverse.copy(this.matrixWorld).invert();
}
clone() {
return new this.constructor().copy(this);
}
};
hl.prototype.isCamera = true;
var nn = class extends hl {
constructor(e = 50, t = 1, i = 0.1, r = 2e3) {
super(), this.type = "PerspectiveCamera", this.fov = e, this.zoom = 1, this.near = i, this.far = r, this.focus = 10, this.aspect = t, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix();
}
copy(e, t) {
return super.copy(e, t), this.fov = e.fov, this.zoom = e.zoom, this.near = e.near, this.far = e.far, this.focus = e.focus, this.aspect = e.aspect, this.view = e.view === null ? null : Object.assign({}, e.view), this.filmGauge = e.filmGauge, this.filmOffset = e.filmOffset, this;
}
/**
* Sets the FOV by focal length in respect to the current .filmGauge.
*
* The default film gauge is 35, so that the focal length can be specified for
* a 35mm (full frame) camera.
*
* Values for focal length and film gauge must have the same unit.
*/
setFocalLength(e) {
const t = 0.5 * this.getFilmHeight() / e;
this.fov = ja * 2 * Math.atan(t), this.updateProjectionMatrix();
}
/**
* Calculates the focal length from the current .fov and .filmGauge.
*/
getFocalLength() {
const e = Math.tan(As * 0.5 * this.fov);
return 0.5 * this.getFilmHeight() / e;
}
getEffectiveFOV() {
return ja * 2 * Math.atan(
Math.tan(As * 0.5 * this.fov) / this.zoom
);
}
getFilmWidth() {
return this.filmGauge * Math.min(this.aspect, 1);
}
getFilmHeight() {
return this.filmGauge / Math.max(this.aspect, 1);
}
/**
* Sets an offset in a larger frustum. This is useful for multi-window or
* multi-monitor/multi-machine setups.
*
* For example, if you have 3x2 monitors and each monitor is 1920x1080 and
* the monitors are in grid like this
*
* +---+---+---+
* | A | B | C |
* +---+---+---+
* | D | E | F |
* +---+---+---+
*
* then for each monitor you would call it like this
*
* const w = 1920;
* const h = 1080;
* const fullWidth = w * 3;
* const fullHeight = h * 2;
*
* --A--
* camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
* --B--
* camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
* --C--
* camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
* --D--
* camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
* --E--
* camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
* --F--
* camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
*
* Note there is no reason monitors have to be the same size or in a grid.
*/
setViewOffset(e, t, i, r, s, o) {
this.aspect = e / t, this.view === null && (this.view = {
enabled: true,
fullWidth: 1,
fullHeight: 1,
offsetX: 0,
offsetY: 0,
width: 1,
height: 1
}), this.view.enabled = true, this.view.fullWidth = e, this.view.fullHeight = t, this.view.offsetX = i, this.view.offsetY = r, this.view.width = s, this.view.height = o, this.updateProjectionMatrix();
}
clearViewOffset() {
this.view !== null && (this.view.enabled = false), this.updateProjectionMatrix();
}
updateProjectionMatrix() {
const e = this.near;
let t = e * Math.tan(As * 0.5 * this.fov) / this.zoom, i = 2 * t, r = this.aspect * i, s = -0.5 * r;
const o = this.view;
if (this.view !== null && this.view.enabled) {
const c = o.fullWidth, l = o.fullHeight;
s += o.offsetX * r / c, t -= o.offsetY * i / l, r *= o.width / c, i *= o.height / l;
}
const a = this.filmOffset;
a !== 0 && (s += e * a / this.getFilmWidth()), this.projectionMatrix.makePerspective(s, s + r, t, t - i, e, this.far), this.projectionMatrixInverse.copy(this.projectionMatrix).invert();
}
toJSON(e) {
const t = super.toJSON(e);
return t.object.fov = this.fov, t.object.zoom = this.zoom, t.object.near = this.near, t.object.far = this.far, t.object.focus = this.focus, t.object.aspect = this.aspect, this.view !== null && (t.object.view = Object.assign({}, this.view)), t.object.filmGauge = this.filmGauge, t.object.filmOffset = this.filmOffset, t;
}
};
nn.prototype.isPerspectiveCamera = true;
var to = 90;
var no = 1;
var yu = class extends ut {
constructor(e, t, i) {
if (super(), this.type = "CubeCamera", i.isWebGLCubeRenderTarget !== true) {
console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");
return;
}
this.renderTarget = i;
const r = new nn(to, no, e, t);
r.layers = this.layers, r.up.set(0, -1, 0), r.lookAt(new q(1, 0, 0)), this.add(r);
const s = new nn(to, no, e, t);
s.layers = this.layers, s.up.set(0, -1, 0), s.lookAt(new q(-1, 0, 0)), this.add(s);
const o = new nn(to, no, e, t);
o.layers = this.layers, o.up.set(0, 0, 1), o.lookAt(new q(0, 1, 0)), this.add(o);
const a = new nn(to, no, e, t);
a.layers = this.layers, a.up.set(0, 0, -1), a.lookAt(new q(0, -1, 0)), this.add(a);
const c = new nn(to, no, e, t);
c.layers = this.layers, c.up.set(0, -1, 0), c.lookAt(new q(0, 0, 1)), this.add(c);
const l = new nn(to, no, e, t);
l.layers = this.layers, l.up.set(0, -1, 0), l.lookAt(new q(0, 0, -1)), this.add(l);
}
update(e, t) {
this.parent === null && this.updateMatrixWorld();
const i = this.renderTarget, [r, s, o, a, c, l] = this.children, d = e.xr.enabled, h6 = e.getRenderTarget();
e.xr.enabled = false;
const f = i.texture.generateMipmaps;
i.texture.generateMipmaps = false, e.setRenderTarget(i, 0), e.render(t, r), e.setRenderTarget(i, 1), e.render(t, s), e.setRenderTarget(i, 2), e.render(t, o), e.setRenderTarget(i, 3), e.render(t, a), e.setRenderTarget(i, 4), e.render(t, c), i.texture.generateMipmaps = f, e.setRenderTarget(i, 5), e.render(t, l), e.setRenderTarget(h6), e.xr.enabled = d;
}
};
var ta = class extends Yt {
constructor(e, t, i, r, s, o, a, c, l, d) {
e = e !== void 0 ? e : [], t = t !== void 0 ? t : ll, a = a !== void 0 ? a : nr, super(e, t, i, r, s, o, a, c, l, d), this._needsFlipEnvMap = true, this.flipY = false;
}
get images() {
return this.image;
}
set images(e) {
this.image = e;
}
};
ta.prototype.isCubeTexture = true;
var bu = class extends fi {
constructor(e, t, i) {
Number.isInteger(t) && (console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"), t = i), super(e, e, t), t = t || {}, this.texture = new ta(void 0, t.mapping, t.wrapS, t.wrapT, t.magFilter, t.minFilter, t.format, t.type, t.anisotropy, t.encoding), this.texture.generateMipmaps = t.generateMipmaps !== void 0 ? t.generateMipmaps : false, this.texture.minFilter = t.minFilter !== void 0 ? t.minFilter : zt, this.texture._needsFlipEnvMap = false;
}
fromEquirectangularTexture(e, t) {
this.texture.type = t.type, this.texture.format = Gn, this.texture.encoding = t.encoding, this.texture.generateMipmaps = t.generateMipmaps, this.texture.minFilter = t.minFilter, this.texture.magFilter = t.magFilter;
const i = {
uniforms: {
tEquirect: { value: null }
},
vertexShader: (
/* glsl */
`
varying vec3 vWorldDirection;
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include
#include
}
`
),
fragmentShader: (
/* glsl */
`
uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
gl_FragColor = texture2D( tEquirect, sampleUV );
}
`
)
}, r = new sr(5, 5, 5), s = new or({
name: "CubemapFromEquirect",
uniforms: Po(i.uniforms),
vertexShader: i.vertexShader,
fragmentShader: i.fragmentShader,
side: jt,
blending: tr
});
s.uniforms.tEquirect.value = t;
const o = new Xt(r, s), a = t.minFilter;
return t.minFilter === fr && (t.minFilter = zt), new yu(1, 10, this).update(e, o), t.minFilter = a, o.geometry.dispose(), o.material.dispose(), this;
}
clear(e, t, i, r) {
const s = e.getRenderTarget();
for (let o = 0; o < 6; o++)
e.setRenderTarget(this, o), e.clear(t, i, r);
e.setRenderTarget(s);
}
};
bu.prototype.isWebGLCubeRenderTarget = true;
var ph = new q();
var SF = new q();
var _F = new rn();
var wi = class {
constructor(e = new q(1, 0, 0), t = 0) {
this.normal = e, this.constant = t;
}
set(e, t) {
return this.normal.copy(e), this.constant = t, this;
}
setComponents(e, t, i, r) {
return this.normal.set(e, t, i), this.constant = r, this;
}
setFromNormalAndCoplanarPoint(e, t) {
return this.normal.copy(e), this.constant = -t.dot(this.normal), this;
}
setFromCoplanarPoints(e, t, i) {
const r = ph.subVectors(i, t).cross(SF.subVectors(e, t)).normalize();
return this.setFromNormalAndCoplanarPoint(r, e), this;
}
copy(e) {
return this.normal.copy(e.normal), this.constant = e.constant, this;
}
normalize() {
const e = 1 / this.normal.length();
return this.normal.multiplyScalar(e), this.constant *= e, this;
}
negate() {
return this.constant *= -1, this.normal.negate(), this;
}
distanceToPoint(e) {
return this.normal.dot(e) + this.constant;
}
distanceToSphere(e) {
return this.distanceToPoint(e.center) - e.radius;
}
projectPoint(e, t) {
return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e);
}
intersectLine(e, t) {
const i = e.delta(ph), r = this.normal.dot(i);
if (r === 0)
return this.distanceToPoint(e.start) === 0 ? t.copy(e.start) : null;
const s = -(e.start.dot(this.normal) + this.constant) / r;
return s < 0 || s > 1 ? null : t.copy(i).multiplyScalar(s).add(e.start);
}
intersectsLine(e) {
const t = this.distanceToPoint(e.start), i = this.distanceToPoint(e.end);
return t < 0 && i > 0 || i < 0 && t > 0;
}
intersectsBox(e) {
return e.intersectsPlane(this);
}
intersectsSphere(e) {
return e.intersectsPlane(this);
}
coplanarPoint(e) {
return e.copy(this.normal).multiplyScalar(-this.constant);
}
applyMatrix4(e, t) {
const i = t || _F.getNormalMatrix(e), r = this.coplanarPoint(ph).applyMatrix4(e), s = this.normal.applyMatrix3(i).normalize();
return this.constant = -r.dot(s), this;
}
translate(e) {
return this.constant -= e.dot(this.normal), this;
}
equals(e) {
return e.normal.equals(this.normal) && e.constant === this.constant;
}
clone() {
return new this.constructor().copy(this);
}
};
wi.prototype.isPlane = true;
var io = new pr();
var Jl = new q();
var dl = class {
constructor(e = new wi(), t = new wi(), i = new wi(), r = new wi(), s = new wi(), o = new wi()) {
this.planes = [e, t, i, r, s, o];
}
set(e, t, i, r, s, o) {
const a = this.planes;
return a[0].copy(e), a[1].copy(t), a[2].copy(i), a[3].copy(r), a[4].copy(s), a[5].copy(o), this;
}
copy(e) {
const t = this.planes;
for (let i = 0; i < 6; i++)
t[i].copy(e.planes[i]);
return this;
}
setFromProjectionMatrix(e) {
const t = this.planes, i = e.elements, r = i[0], s = i[1], o = i[2], a = i[3], c = i[4], l = i[5], d = i[6], h6 = i[7], f = i[8], g = i[9], p = i[10], u = i[11], y = i[12], v = i[13], m = i[14], x = i[15];
return t[0].setComponents(a - r, h6 - c, u - f, x - y).normalize(), t[1].setComponents(a + r, h6 + c, u + f, x + y).normalize(), t[2].setComponents(a + s, h6 + l, u + g, x + v).normalize(), t[3].setComponents(a - s, h6 - l, u - g, x - v).normalize(), t[4].setComponents(a - o, h6 - d, u - p, x - m).normalize(), t[5].setComponents(a + o, h6 + d, u + p, x + m).normalize(), this;
}
intersectsObject(e) {
const t = e.geometry;
return t.boundingSphere === null && t.computeBoundingSphere(), io.copy(t.boundingSphere).applyMatrix4(e.matrixWorld), this.intersectsSphere(io);
}
intersectsSprite(e) {
return io.center.set(0, 0, 0), io.radius = 0.7071067811865476, io.applyMatrix4(e.matrixWorld), this.intersectsSphere(io);
}
intersectsSphere(e) {
const t = this.planes, i = e.center, r = -e.radius;
for (let s = 0; s < 6; s++)
if (t[s].distanceToPoint(i) < r)
return false;
return true;
}
intersectsBox(e) {
const t = this.planes;
for (let i = 0; i < 6; i++) {
const r = t[i];
if (Jl.x = r.normal.x > 0 ? e.max.x : e.min.x, Jl.y = r.normal.y > 0 ? e.max.y : e.min.y, Jl.z = r.normal.z > 0 ? e.max.z : e.min.z, r.distanceToPoint(Jl) < 0)
return false;
}
return true;
}
containsPoint(e) {
const t = this.planes;
for (let i = 0; i < 6; i++)
if (t[i].distanceToPoint(e) < 0)
return false;
return true;
}
clone() {
return new this.constructor().copy(this);
}
};
function dx() {
let n = null, e = false, t = null, i = null;
function r(s, o) {
t(s, o), i = n.requestAnimationFrame(r);
}
return {
start: function() {
e !== true && t !== null && (i = n.requestAnimationFrame(r), e = true);
},
stop: function() {
n.cancelAnimationFrame(i), e = false;
},
setAnimationLoop: function(s) {
t = s;
},
setContext: function(s) {
n = s;
}
};
}
function TF(n, e) {
const t = e.isWebGL2, i = /* @__PURE__ */ new WeakMap();
function r(l, d) {
const h6 = l.array, f = l.usage, g = n.createBuffer();
n.bindBuffer(d, g), n.bufferData(d, h6, f), l.onUploadCallback();
let p = 5126;
return h6 instanceof Float32Array ? p = 5126 : h6 instanceof Float64Array ? console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.") : h6 instanceof Uint16Array ? l.isFloat16BufferAttribute ? t ? p = 5131 : console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.") : p = 5123 : h6 instanceof Int16Array ? p = 5122 : h6 instanceof Uint32Array ? p = 5125 : h6 instanceof Int32Array ? p = 5124 : h6 instanceof Int8Array ? p = 5120 : (h6 instanceof Uint8Array || h6 instanceof Uint8ClampedArray) && (p = 5121), {
buffer: g,
type: p,
bytesPerElement: h6.BYTES_PER_ELEMENT,
version: l.version
};
}
function s(l, d, h6) {
const f = d.array, g = d.updateRange;
n.bindBuffer(h6, l), g.count === -1 ? n.bufferSubData(h6, 0, f) : (t ? n.bufferSubData(
h6,
g.offset * f.BYTES_PER_ELEMENT,
f,
g.offset,
g.count
) : n.bufferSubData(
h6,
g.offset * f.BYTES_PER_ELEMENT,
f.subarray(g.offset, g.offset + g.count)
), g.count = -1);
}
function o(l) {
return l.isInterleavedBufferAttribute && (l = l.data), i.get(l);
}
function a(l) {
l.isInterleavedBufferAttribute && (l = l.data);
const d = i.get(l);
d && (n.deleteBuffer(d.buffer), i.delete(l));
}
function c(l, d) {
if (l.isGLBufferAttribute) {
const f = i.get(l);
(!f || f.version < l.version) && i.set(l, {
buffer: l.buffer,
type: l.type,
bytesPerElement: l.elementSize,
version: l.version
});
return;
}
l.isInterleavedBufferAttribute && (l = l.data);
const h6 = i.get(l);
h6 === void 0 ? i.set(l, r(l, d)) : h6.version < l.version && (s(h6.buffer, l, d), h6.version = l.version);
}
return {
get: o,
remove: a,
update: c
};
}
var Ls = class _Ls extends Ke {
constructor(e = 1, t = 1, i = 1, r = 1) {
super(), this.type = "PlaneGeometry", this.parameters = {
width: e,
height: t,
widthSegments: i,
heightSegments: r
};
const s = e / 2, o = t / 2, a = Math.floor(i), c = Math.floor(r), l = a + 1, d = c + 1, h6 = e / a, f = t / c, g = [], p = [], u = [], y = [];
for (let v = 0; v < d; v++) {
const m = v * f - o;
for (let x = 0; x < l; x++) {
const w = x * h6 - s;
p.push(w, -m, 0), u.push(0, 0, 1), y.push(x / a), y.push(1 - v / c);
}
}
for (let v = 0; v < c; v++)
for (let m = 0; m < a; m++) {
const x = m + l * v, w = m + l * (v + 1), A = m + 1 + l * (v + 1), M = m + 1 + l * v;
g.push(x, w, M), g.push(w, A, M);
}
this.setIndex(g), this.setAttribute("position", new He(p, 3)), this.setAttribute("normal", new He(u, 3)), this.setAttribute("uv", new He(y, 2));
}
static fromJSON(e) {
return new _Ls(e.width, e.height, e.widthSegments, e.heightSegments);
}
};
var EF = `#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vUv ).g;
#endif`;
var CF = `#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`;
var LF = `#ifdef ALPHATEST
if ( diffuseColor.a < ALPHATEST ) discard;
#endif`;
var RF = `#ifdef USE_AOMAP
float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
reflectedLight.indirectDiffuse *= ambientOcclusion;
#if defined( USE_ENVMAP ) && defined( STANDARD )
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );
#endif
#endif`;
var FF = `#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
#endif`;
var PF = "vec3 transformed = vec3( position );";
var IF = `vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
#endif`;
var OF = `vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {
const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
vec4 r = roughness * c0 + c1;
float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
return vec2( -1.04, 1.04 ) * a004 + r.zw;
}
float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
#if defined ( PHYSICALLY_CORRECT_LIGHTS )
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
if( cutoffDistance > 0.0 ) {
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
}
return distanceFalloff;
#else
if( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );
}
return 1.0;
#endif
}
vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {
return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {
float fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );
return ( 1.0 - specularColor ) * fresnel + specularColor;
}
vec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {
float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );
vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;
return Fr * fresnel + F0;
}
float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {
float a2 = pow2( alpha );
float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
return 1.0 / ( gl * gv );
}
float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
float a2 = pow2( alpha );
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
float a2 = pow2( alpha );
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
return RECIPROCAL_PI * a2 / pow2( denom );
}
vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {
float alpha = pow2( roughness );
vec3 halfDir = normalize( incidentLight.direction + viewDir );
float dotNL = saturate( dot( normal, incidentLight.direction ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
vec3 F = F_Schlick( specularColor, dotLH );
float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );
float D = D_GGX( alpha, dotNH );
return F * ( G * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
const float LUT_SIZE = 64.0;
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
const float LUT_BIAS = 0.5 / LUT_SIZE;
float dotNV = saturate( dot( N, V ) );
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
uv = uv * LUT_SCALE + LUT_BIAS;
return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
float l = length( f );
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
float x = dot( v1, v2 );
float y = abs( x );
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
float b = 3.4175940 + ( 4.1616724 + y ) * y;
float v = a / b;
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
vec3 lightNormal = cross( v1, v2 );
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
vec3 T1, T2;
T1 = normalize( V - N * dot( V, N ) );
T2 = - cross( N, T1 );
mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
vec3 coords[ 4 ];
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
coords[ 0 ] = normalize( coords[ 0 ] );
coords[ 1 ] = normalize( coords[ 1 ] );
coords[ 2 ] = normalize( coords[ 2 ] );
coords[ 3 ] = normalize( coords[ 3 ] );
vec3 vectorFormFactor = vec3( 0.0 );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
return vec3( result );
}
vec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {
float dotNV = saturate( dot( normal, viewDir ) );
vec2 brdf = integrateSpecularBRDF( dotNV, roughness );
return specularColor * brdf.x + brdf.y;
}
void BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );
vec2 brdf = integrateSpecularBRDF( dotNV, roughness );
vec3 FssEss = F * brdf.x + brdf.y;
float Ess = brdf.x + brdf.y;
float Ems = 1.0 - Ess;
vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
singleScatter += FssEss;
multiScatter += Fms * Ems;
}
float G_BlinnPhong_Implicit( ) {
return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {
vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );
float dotNH = saturate( dot( geometry.normal, halfDir ) );
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
vec3 F = F_Schlick( specularColor, dotLH );
float G = G_BlinnPhong_Implicit( );
float D = D_BlinnPhong( shininess, dotNH );
return F * ( G * D );
}
float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {
return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );
}
float BlinnExponentToGGXRoughness( const in float blinnExponent ) {
return sqrt( 2.0 / ( blinnExponent + 2.0 ) );
}
#if defined( USE_SHEEN )
float D_Charlie(float roughness, float NoH) {
float invAlpha = 1.0 / roughness;
float cos2h = NoH * NoH;
float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);
}
float V_Neubelt(float NoV, float NoL) {
return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));
}
vec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {
vec3 N = geometry.normal;
vec3 V = geometry.viewDir;
vec3 H = normalize( V + L );
float dotNH = saturate( dot( N, H ) );
return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );
}
#endif`;
var DF = `#ifdef USE_BUMPMAP
uniform sampler2D bumpMap;
uniform float bumpScale;
vec2 dHdxy_fwd() {
vec2 dSTdx = dFdx( vUv );
vec2 dSTdy = dFdy( vUv );
float Hll = bumpScale * texture2D( bumpMap, vUv ).x;
float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;
float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;
return vec2( dBx, dBy );
}
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );
vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );
vec3 vN = surf_norm;
vec3 R1 = cross( vSigmaY, vN );
vec3 R2 = cross( vN, vSigmaX );
float fDet = dot( vSigmaX, R1 ) * faceDirection;
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
return normalize( abs( fDet ) * surf_norm - vGrad );
}
#endif`;
var NF = `#if NUM_CLIPPING_PLANES > 0
vec4 plane;
#pragma unroll_loop_start
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
}
#pragma unroll_loop_end
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
bool clipped = true;
#pragma unroll_loop_start
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
}
#pragma unroll_loop_end
if ( clipped ) discard;
#endif
#endif`;
var BF = `#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`;
var UF = `#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
#endif`;
var zF = `#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
#endif`;
var VF = `#if defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
#elif defined( USE_COLOR )
diffuseColor.rgb *= vColor;
#endif`;
var kF = `#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR )
varying vec3 vColor;
#endif`;
var GF = `#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
varying vec3 vColor;
#endif`;
var HF = `#if defined( USE_COLOR_ALPHA )
vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
vColor.xyz *= instanceColor.xyz;
#endif`;
var WF = `#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate(a) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement(a) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
highp float rand( const in vec2 uv ) {
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
return fract(sin(sn) * c);
}
#ifdef HIGH_PRECISION
float precisionSafeLength( vec3 v ) { return length( v ); }
#else
float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float precisionSafeLength( vec3 v ) {
float maxComponent = max3( abs( v ) );
return length( v / maxComponent ) * maxComponent;
}
#endif
struct IncidentLight {
vec3 color;
vec3 direction;
bool visible;
};
struct ReflectedLight {
vec3 directDiffuse;
vec3 directSpecular;
vec3 indirectDiffuse;
vec3 indirectSpecular;
};
struct GeometricContext {
vec3 position;
vec3 normal;
vec3 viewDir;
#ifdef CLEARCOAT
vec3 clearcoatNormal;
#endif
};
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
float distance = dot( planeNormal, point - pointOnPlane );
return - distance * planeNormal + point;
}
float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
return sign( dot( point - pointOnPlane, planeNormal ) );
}
vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {
return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;
}
mat3 transposeMat3( const in mat3 m ) {
mat3 tmp;
tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
return tmp;
}
float linearToRelativeLuminance( const in vec3 color ) {
vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
return dot( weights, color.rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
return vec2( u, v );
}`;
var jF = `#ifdef ENVMAP_TYPE_CUBE_UV
#define cubeUV_maxMipLevel 8.0
#define cubeUV_minMipLevel 4.0
#define cubeUV_maxTileSize 256.0
#define cubeUV_minTileSize 16.0
float getFace( vec3 direction ) {
vec3 absDirection = abs( direction );
float face = - 1.0;
if ( absDirection.x > absDirection.z ) {
if ( absDirection.x > absDirection.y )
face = direction.x > 0.0 ? 0.0 : 3.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
} else {
if ( absDirection.z > absDirection.y )
face = direction.z > 0.0 ? 2.0 : 5.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
}
return face;
}
vec2 getUV( vec3 direction, float face ) {
vec2 uv;
if ( face == 0.0 ) {
uv = vec2( direction.z, direction.y ) / abs( direction.x );
} else if ( face == 1.0 ) {
uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
} else if ( face == 2.0 ) {
uv = vec2( - direction.x, direction.y ) / abs( direction.z );
} else if ( face == 3.0 ) {
uv = vec2( - direction.z, direction.y ) / abs( direction.x );
} else if ( face == 4.0 ) {
uv = vec2( - direction.x, direction.z ) / abs( direction.y );
} else {
uv = vec2( direction.x, direction.y ) / abs( direction.z );
}
return 0.5 * ( uv + 1.0 );
}
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
float face = getFace( direction );
float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
mipInt = max( mipInt, cubeUV_minMipLevel );
float faceSize = exp2( mipInt );
float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );
vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );
vec2 f = fract( uv );
uv += 0.5 - f;
if ( face > 2.0 ) {
uv.y += faceSize;
face -= 3.0;
}
uv.x += face * faceSize;
if ( mipInt < cubeUV_maxMipLevel ) {
uv.y += 2.0 * cubeUV_maxTileSize;
}
uv.y += filterInt * 2.0 * cubeUV_minTileSize;
uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );
uv *= texelSize;
vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
uv.x += texelSize;
vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
uv.y += texelSize;
vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
uv.x -= texelSize;
vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
vec3 tm = mix( tl, tr, f.x );
vec3 bm = mix( bl, br, f.x );
return mix( tm, bm, f.y );
}
#define r0 1.0
#define v0 0.339
#define m0 - 2.0
#define r1 0.8
#define v1 0.276
#define m1 - 1.0
#define r4 0.4
#define v4 0.046
#define m4 2.0
#define r5 0.305
#define v5 0.016
#define m5 3.0
#define r6 0.21
#define v6 0.0038
#define m6 4.0
float roughnessToMip( float roughness ) {
float mip = 0.0;
if ( roughness >= r1 ) {
mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;
} else if ( roughness >= r4 ) {
mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;
} else if ( roughness >= r5 ) {
mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;
} else if ( roughness >= r6 ) {
mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;
} else {
mip = - 2.0 * log2( 1.16 * roughness ); }
return mip;
}
vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );
float mipF = fract( mip );
float mipInt = floor( mip );
vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
if ( mipF == 0.0 ) {
return vec4( color0, 1.0 );
} else {
vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
return vec4( mix( color0, color1, mipF ), 1.0 );
}
}
#endif`;
var $F = `vec3 transformedNormal = objectNormal;
#ifdef USE_INSTANCING
mat3 m = mat3( instanceMatrix );
transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );
transformedNormal = m * transformedNormal;
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#ifdef FLIP_SIDED
transformedTangent = - transformedTangent;
#endif
#endif`;
var ZF = `#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
#endif`;
var XF = `#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
#endif`;
var YF = `#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vUv );
emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;
totalEmissiveRadiance *= emissiveColor.rgb;
#endif`;
var JF = `#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
#endif`;
var KF = "gl_FragColor = linearToOutputTexel( gl_FragColor );";
var qF = `
vec4 LinearToLinear( in vec4 value ) {
return value;
}
vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
}
vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {
return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );
}
vec4 sRGBToLinear( in vec4 value ) {
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
}
vec4 LinearTosRGB( in vec4 value ) {
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}
vec4 RGBEToLinear( in vec4 value ) {
return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
}
vec4 LinearToRGBE( in vec4 value ) {
float maxComponent = max( max( value.r, value.g ), value.b );
float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
}
vec4 RGBMToLinear( in vec4 value, in float maxRange ) {
return vec4( value.rgb * value.a * maxRange, 1.0 );
}
vec4 LinearToRGBM( in vec4 value, in float maxRange ) {
float maxRGB = max( value.r, max( value.g, value.b ) );
float M = clamp( maxRGB / maxRange, 0.0, 1.0 );
M = ceil( M * 255.0 ) / 255.0;
return vec4( value.rgb / ( M * maxRange ), M );
}
vec4 RGBDToLinear( in vec4 value, in float maxRange ) {
return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );
}
vec4 LinearToRGBD( in vec4 value, in float maxRange ) {
float maxRGB = max( value.r, max( value.g, value.b ) );
float D = max( maxRange / maxRGB, 1.0 );
D = clamp( floor( D ) / 255.0, 0.0, 1.0 );
return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );
}
const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );
vec4 LinearToLogLuv( in vec4 value ) {
vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;
Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
vec4 vResult;
vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;
float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;
vResult.w = fract( Le );
vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;
return vResult;
}
const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );
vec4 LogLuvToLinear( in vec4 value ) {
float Le = value.z * 255.0 + value.w;
vec3 Xp_Y_XYZp;
Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );
Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;
Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;
vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;
return vec4( max( vRGB, 0.0 ), 1.0 );
}`;
var QF = `#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vec3 cameraToFrag;
if ( isOrthographic ) {
cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToFrag = normalize( vWorldPosition - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vec3 reflectVec = reflect( cameraToFrag, worldNormal );
#else
vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
#endif
#else
vec3 reflectVec = vReflect;
#endif
#ifdef ENVMAP_TYPE_CUBE
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );
#else
vec4 envColor = vec4( 0.0 );
#endif
#ifndef ENVMAP_TYPE_CUBE_UV
envColor = envMapTexelToLinear( envColor );
#endif
#ifdef ENVMAP_BLENDING_MULTIPLY
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_MIX )
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_ADD )
outgoingLight += envColor.xyz * specularStrength * reflectivity;
#endif
#endif`;
var eP = `#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform float flipEnvMap;
uniform int maxMipLevel;
#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#else
uniform sampler2D envMap;
#endif
#endif`;
var tP = `#ifdef USE_ENVMAP
uniform float reflectivity;
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
uniform float refractionRatio;
#else
varying vec3 vReflect;
#endif
#endif`;
var nP = `#ifdef USE_ENVMAP
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
#else
varying vec3 vReflect;
uniform float refractionRatio;
#endif
#endif`;
var iP = `#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vWorldPosition = worldPosition.xyz;
#else
vec3 cameraToVertex;
if ( isOrthographic ) {
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vReflect = reflect( cameraToVertex, worldNormal );
#else
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
#endif
#endif
#endif`;
var rP = `#ifdef USE_FOG
fogDepth = - mvPosition.z;
#endif`;
var sP = `#ifdef USE_FOG
varying float fogDepth;
#endif`;
var oP = `#ifdef USE_FOG
#ifdef FOG_EXP2
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );
#else
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
#endif
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`;
var aP = `#ifdef USE_FOG
uniform vec3 fogColor;
varying float fogDepth;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif`;
var lP = `#ifdef USE_GRADIENTMAP
uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
float dotNL = dot( normal, lightDirection );
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
#ifdef USE_GRADIENTMAP
return texture2D( gradientMap, coord ).rgb;
#else
return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
#endif
}`;
var cP = `#ifdef USE_LIGHTMAP
vec4 lightMapTexel= texture2D( lightMap, vUv2 );
reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;
#endif`;
var uP = `#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
#endif`;
var hP = `vec3 diffuse = vec3( 1.0 );
GeometricContext geometry;
geometry.position = mvPosition.xyz;
geometry.normal = normalize( transformedNormal );
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );
GeometricContext backGeometry;
backGeometry.position = geometry.position;
backGeometry.normal = -geometry.normal;
backGeometry.viewDir = geometry.viewDir;
vLightFront = vec3( 0.0 );
vIndirectFront = vec3( 0.0 );
#ifdef DOUBLE_SIDED
vLightBack = vec3( 0.0 );
vIndirectBack = vec3( 0.0 );
#endif
IncidentLight directLight;
float dotNL;
vec3 directLightColor_Diffuse;
vIndirectFront += getAmbientLightIrradiance( ambientLightColor );
vIndirectFront += getLightProbeIrradiance( lightProbe, geometry );
#ifdef DOUBLE_SIDED
vIndirectBack += getAmbientLightIrradiance( ambientLightColor );
vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );
#endif
#if NUM_POINT_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );
dotNL = dot( geometry.normal, directLight.direction );
directLightColor_Diffuse = PI * directLight.color;
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
#ifdef DOUBLE_SIDED
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
#endif
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );
dotNL = dot( geometry.normal, directLight.direction );
directLightColor_Diffuse = PI * directLight.color;
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
#ifdef DOUBLE_SIDED
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
#endif
}
#pragma unroll_loop_end
#endif
#if NUM_DIR_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );
dotNL = dot( geometry.normal, directLight.direction );
directLightColor_Diffuse = PI * directLight.color;
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
#ifdef DOUBLE_SIDED
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
#endif
}
#pragma unroll_loop_end
#endif
#if NUM_HEMI_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
#ifdef DOUBLE_SIDED
vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );
#endif
}
#pragma unroll_loop_end
#endif`;
var dP = `uniform bool receiveShadow;
uniform vec3 ambientLightColor;
uniform vec3 lightProbe[ 9 ];
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
float x = normal.x, y = normal.y, z = normal.z;
vec3 result = shCoefficients[ 0 ] * 0.886227;
result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {
vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );
vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
vec3 irradiance = ambientLightColor;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
return irradiance;
}
#if NUM_DIR_LIGHTS > 0
struct DirectionalLight {
vec3 direction;
vec3 color;
};
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {
directLight.color = directionalLight.color;
directLight.direction = directionalLight.direction;
directLight.visible = true;
}
#endif
#if NUM_POINT_LIGHTS > 0
struct PointLight {
vec3 position;
vec3 color;
float distance;
float decay;
};
uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {
vec3 lVector = pointLight.position - geometry.position;
directLight.direction = normalize( lVector );
float lightDistance = length( lVector );
directLight.color = pointLight.color;
directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );
directLight.visible = ( directLight.color != vec3( 0.0 ) );
}
#endif
#if NUM_SPOT_LIGHTS > 0
struct SpotLight {
vec3 position;
vec3 direction;
vec3 color;
float distance;
float decay;
float coneCos;
float penumbraCos;
};
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {
vec3 lVector = spotLight.position - geometry.position;
directLight.direction = normalize( lVector );
float lightDistance = length( lVector );
float angleCos = dot( directLight.direction, spotLight.direction );
if ( angleCos > spotLight.coneCos ) {
float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );
directLight.color = spotLight.color;
directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );
directLight.visible = true;
} else {
directLight.color = vec3( 0.0 );
directLight.visible = false;
}
}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
struct RectAreaLight {
vec3 color;
vec3 position;
vec3 halfWidth;
vec3 halfHeight;
};
uniform sampler2D ltc_1; uniform sampler2D ltc_2;
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
struct HemisphereLight {
vec3 direction;
vec3 skyColor;
vec3 groundColor;
};
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {
float dotNL = dot( geometry.normal, hemiLight.direction );
float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
return irradiance;
}
#endif`;
var fP = `#if defined( USE_ENVMAP )
#ifdef ENVMAP_MODE_REFRACTION
uniform float refractionRatio;
#endif
vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {
vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );
#ifdef ENVMAP_TYPE_CUBE
vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );
#ifdef TEXTURE_LOD_EXT
vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );
#else
vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );
#endif
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
#else
vec4 envMapColor = vec4( 0.0 );
#endif
return PI * envMapColor.rgb * envMapIntensity;
}
float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {
float maxMIPLevelScalar = float( maxMIPLevel );
float sigma = PI * roughness * roughness / ( 1.0 + roughness );
float desiredMIPLevel = maxMIPLevelScalar + log2( sigma );
return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );
}
vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {
#ifdef ENVMAP_MODE_REFLECTION
vec3 reflectVec = reflect( -viewDir, normal );
reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
#else
vec3 reflectVec = refract( -viewDir, normal, refractionRatio );
#endif
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );
#ifdef ENVMAP_TYPE_CUBE
vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );
#ifdef TEXTURE_LOD_EXT
vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );
#else
vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );
#endif
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
#endif
return envMapColor.rgb * envMapIntensity;
}
#endif`;
var pP = `ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`;
var mP = `varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
struct ToonMaterial {
vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Toon
#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon
#define Material_LightProbeLOD( material ) (0)`;
var gP = `BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`;
var vP = `varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
struct BlinnPhongMaterial {
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_BlinnPhong
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong
#define Material_LightProbeLOD( material ) (0)`;
var yP = `PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;
material.specularRoughness = min( material.specularRoughness, 1.0 );
#ifdef REFLECTIVITY
material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );
#else
material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );
#endif
#ifdef CLEARCOAT
material.clearcoat = clearcoat;
material.clearcoatRoughness = clearcoatRoughness;
#ifdef USE_CLEARCOATMAP
material.clearcoat *= texture2D( clearcoatMap, vUv ).x;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;
#endif
material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
material.clearcoatRoughness += geometryRoughness;
material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_SHEEN
material.sheenColor = sheen;
#endif`;
var bP = `struct PhysicalMaterial {
vec3 diffuseColor;
float specularRoughness;
vec3 specularColor;
#ifdef CLEARCOAT
float clearcoat;
float clearcoatRoughness;
#endif
#ifdef USE_SHEEN
vec3 sheenColor;
#endif
};
#define MAXIMUM_SPECULAR_COEFFICIENT 0.16
#define DEFAULT_SPECULAR_COEFFICIENT 0.04
float clearcoatDHRApprox( const in float roughness, const in float dotNL ) {
return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );
}
#if NUM_RECT_AREA_LIGHTS > 0
void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
vec3 normal = geometry.normal;
vec3 viewDir = geometry.viewDir;
vec3 position = geometry.position;
vec3 lightPos = rectAreaLight.position;
vec3 halfWidth = rectAreaLight.halfWidth;
vec3 halfHeight = rectAreaLight.halfHeight;
vec3 lightColor = rectAreaLight.color;
float roughness = material.specularRoughness;
vec3 rectCoords[ 4 ];
rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
vec2 uv = LTC_Uv( normal, viewDir, roughness );
vec4 t1 = texture2D( ltc_1, uv );
vec4 t2 = texture2D( ltc_2, uv );
mat3 mInv = mat3(
vec3( t1.x, 0, t1.y ),
vec3( 0, 1, 0 ),
vec3( t1.z, 0, t1.w )
);
vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
#ifdef CLEARCOAT
float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );
vec3 ccIrradiance = ccDotNL * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
ccIrradiance *= PI;
#endif
float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );
reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );
#else
float clearcoatDHR = 0.0;
#endif
#ifdef USE_SHEEN
reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(
material.specularRoughness,
directLight.direction,
geometry,
material.sheenColor
);
#else
reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);
#endif
reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
#ifdef CLEARCOAT
float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );
reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );
float ccDotNL = ccDotNV;
float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );
#else
float clearcoatDHR = 0.0;
#endif
float clearcoatInv = 1.0 - clearcoatDHR;
vec3 singleScattering = vec3( 0.0 );
vec3 multiScattering = vec3( 0.0 );
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );
vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;
reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct RE_Direct_Physical
#define RE_Direct_RectArea RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`;
var xP = `
GeometricContext geometry;
geometry.position = - vViewPosition;
geometry.normal = normal;
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
#ifdef CLEARCOAT
geometry.clearcoatNormal = clearcoatNormal;
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
PointLight pointLight;
#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
pointLight = pointLights[ i ];
getPointDirectLightIrradiance( pointLight, geometry, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
pointLightShadow = pointLightShadows[ i ];
directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
#endif
RE_Direct( directLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
SpotLight spotLight;
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
spotLight = spotLights[ i ];
getSpotDirectLightIrradiance( spotLight, geometry, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
spotLightShadow = spotLightShadows[ i ];
directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
DirectionalLight directionalLight;
#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
directionalLight = directionalLights[ i ];
getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
directionalLightShadow = directionalLightShadows[ i ];
directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
RectAreaLight rectAreaLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
rectAreaLight = rectAreaLights[ i ];
RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
vec3 iblIrradiance = vec3( 0.0 );
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
irradiance += getLightProbeIrradiance( lightProbe, geometry );
#if ( NUM_HEMI_LIGHTS > 0 )
#pragma unroll_loop_start
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
}
#pragma unroll_loop_end
#endif
#endif
#if defined( RE_IndirectSpecular )
vec3 radiance = vec3( 0.0 );
vec3 clearcoatRadiance = vec3( 0.0 );
#endif`;
var MP = `#if defined( RE_IndirectDiffuse )
#ifdef USE_LIGHTMAP
vec4 lightMapTexel= texture2D( lightMap, vUv2 );
vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;
#ifndef PHYSICALLY_CORRECT_LIGHTS
lightMapIrradiance *= PI;
#endif
irradiance += lightMapIrradiance;
#endif
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );
#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );
#ifdef CLEARCOAT
clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );
#endif
#endif`;
var wP = `#if defined( RE_IndirectDiffuse )
RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
#endif`;
var AP = `#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`;
var SP = `#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
#endif`;
var _P = `#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
varying float vFragDepth;
varying float vIsPerspective;
#else
uniform float logDepthBufFC;
#endif
#endif`;
var TP = `#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
vFragDepth = 1.0 + gl_Position.w;
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#else
if ( isPerspectiveMatrix( projectionMatrix ) ) {
gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
gl_Position.z *= gl_Position.w;
}
#endif
#endif`;
var EP = `#ifdef USE_MAP
vec4 texelColor = texture2D( map, vUv );
texelColor = mapTexelToLinear( texelColor );
diffuseColor *= texelColor;
#endif`;
var CP = `#ifdef USE_MAP
uniform sampler2D map;
#endif`;
var LP = `#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
#endif
#ifdef USE_MAP
vec4 mapTexel = texture2D( map, uv );
diffuseColor *= mapTexelToLinear( mapTexel );
#endif
#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`;
var RP = `#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
uniform mat3 uvTransform;
#endif
#ifdef USE_MAP
uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`;
var FP = `float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vUv );
metalnessFactor *= texelMetalness.b;
#endif`;
var PP = `#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
#endif`;
var IP = `#ifdef USE_MORPHNORMALS
objectNormal *= morphTargetBaseInfluence;
objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
#endif`;
var OP = `#ifdef USE_MORPHTARGETS
uniform float morphTargetBaseInfluence;
#ifndef USE_MORPHNORMALS
uniform float morphTargetInfluences[ 8 ];
#else
uniform float morphTargetInfluences[ 4 ];
#endif
#endif`;
var DP = `#ifdef USE_MORPHTARGETS
transformed *= morphTargetBaseInfluence;
transformed += morphTarget0 * morphTargetInfluences[ 0 ];
transformed += morphTarget1 * morphTargetInfluences[ 1 ];
transformed += morphTarget2 * morphTargetInfluences[ 2 ];
transformed += morphTarget3 * morphTargetInfluences[ 3 ];
#ifndef USE_MORPHNORMALS
transformed += morphTarget4 * morphTargetInfluences[ 4 ];
transformed += morphTarget5 * morphTargetInfluences[ 5 ];
transformed += morphTarget6 * morphTargetInfluences[ 6 ];
transformed += morphTarget7 * morphTargetInfluences[ 7 ];
#endif
#endif`;
var NP = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );
vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );
vec3 normal = normalize( cross( fdx, fdy ) );
#else
vec3 normal = normalize( vNormal );
#ifdef DOUBLE_SIDED
normal = normal * faceDirection;
#endif
#ifdef USE_TANGENT
vec3 tangent = normalize( vTangent );
vec3 bitangent = normalize( vBitangent );
#ifdef DOUBLE_SIDED
tangent = tangent * faceDirection;
bitangent = bitangent * faceDirection;
#endif
#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )
mat3 vTBN = mat3( tangent, bitangent, normal );
#endif
#endif
#endif
vec3 geometryNormal = normal;`;
var BP = `#ifdef OBJECTSPACE_NORMALMAP
normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
#ifdef FLIP_SIDED
normal = - normal;
#endif
#ifdef DOUBLE_SIDED
normal = normal * faceDirection;
#endif
normal = normalize( normalMatrix * normal );
#elif defined( TANGENTSPACE_NORMALMAP )
vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
mapN.xy *= normalScale;
#ifdef USE_TANGENT
normal = normalize( vTBN * mapN );
#else
normal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );
#endif
#elif defined( USE_BUMPMAP )
normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`;
var UP = `#ifdef USE_NORMALMAP
uniform sampler2D normalMap;
uniform vec2 normalScale;
#endif
#ifdef OBJECTSPACE_NORMALMAP
uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )
vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {
vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );
vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );
vec2 st0 = dFdx( vUv.st );
vec2 st1 = dFdy( vUv.st );
vec3 N = surf_norm;
vec3 q1perp = cross( q1, N );
vec3 q0perp = cross( N, q0 );
vec3 T = q1perp * st0.x + q0perp * st1.x;
vec3 B = q1perp * st0.y + q0perp * st1.y;
float det = max( dot( T, T ), dot( B, B ) );
float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );
return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );
}
#endif`;
var zP = `#ifdef CLEARCOAT
vec3 clearcoatNormal = geometryNormal;
#endif`;
var VP = `#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
#ifdef USE_TANGENT
clearcoatNormal = normalize( vTBN * clearcoatMapN );
#else
clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );
#endif
#endif`;
var kP = `#ifdef USE_CLEARCOATMAP
uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform sampler2D clearcoatRoughnessMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
uniform sampler2D clearcoatNormalMap;
uniform vec2 clearcoatNormalScale;
#endif`;
var GP = `vec3 packNormalToRGB( const in vec3 normal ) {
return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
vec4 r = vec4( fract( v * PackFactors ), v );
r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
return dot( v, UnpackFactors );
}
vec4 pack2HalfToRGBA( vec2 v ) {
vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));
return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);
}
vec2 unpackRGBATo2Half( vec4 v ) {
return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
return linearClipZ * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
return (( near + viewZ ) * far ) / (( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
return ( near * far ) / ( ( far - near ) * invClipZ - far );
}`;
var HP = `#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
#endif`;
var WP = `vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`;
var jP = `#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`;
var $P = `#ifdef DITHERING
vec3 dithering( vec3 color ) {
float grid_position = rand( gl_FragCoord.xy );
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
return color + dither_shift_RGB;
}
#endif`;
var ZP = `float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vUv );
roughnessFactor *= texelRoughness.g;
#endif`;
var XP = `#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
#endif`;
var YP = `#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
struct SpotLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
}
vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
return unpackRGBATo2Half( texture2D( shadow, uv ) );
}
float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
float occlusion = 1.0;
vec2 distribution = texture2DDistribution( shadow, uv );
float hard_shadow = step( compare , distribution.x );
if (hard_shadow != 1.0 ) {
float distance = compare - distribution.x ;
float variance = max( 0.00000, distribution.y * distribution.y );
float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
}
return occlusion;
}
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
float shadow = 1.0;
shadowCoord.xyz /= shadowCoord.w;
shadowCoord.z += shadowBias;
bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );
bool inFrustum = all( inFrustumVec );
bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );
bool frustumTest = all( frustumTestVec );
if ( frustumTest ) {
#if defined( SHADOWMAP_TYPE_PCF )
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float dx0 = - texelSize.x * shadowRadius;
float dy0 = - texelSize.y * shadowRadius;
float dx1 = + texelSize.x * shadowRadius;
float dy1 = + texelSize.y * shadowRadius;
float dx2 = dx0 / 2.0;
float dy2 = dy0 / 2.0;
float dx3 = dx1 / 2.0;
float dy3 = dy1 / 2.0;
shadow = (
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
) * ( 1.0 / 17.0 );
#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float dx = texelSize.x;
float dy = texelSize.y;
vec2 uv = shadowCoord.xy;
vec2 f = fract( uv * shadowMapSize + 0.5 );
uv -= f * texelSize;
shadow = (
texture2DCompare( shadowMap, uv, shadowCoord.z ) +
texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
f.x ) +
mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
f.x ) +
mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
f.y ) +
mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
f.y ) +
mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
f.x ),
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
f.x ),
f.y )
) * ( 1.0 / 9.0 );
#elif defined( SHADOWMAP_TYPE_VSM )
shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
#else
shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
#endif
}
return shadow;
}
vec2 cubeToUV( vec3 v, float texelSizeY ) {
vec3 absV = abs( v );
float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
absV *= scaleToCube;
v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
vec2 planar = v.xy;
float almostATexel = 1.5 * texelSizeY;
float almostOne = 1.0 - almostATexel;
if ( absV.z >= almostOne ) {
if ( v.z > 0.0 )
planar.x = 4.0 - v.x;
} else if ( absV.x >= almostOne ) {
float signX = sign( v.x );
planar.x = v.z * signX + 2.0 * signX;
} else if ( absV.y >= almostOne ) {
float signY = sign( v.y );
planar.x = v.x + 2.0 * signY + 2.0;
planar.y = v.z * signY - 2.0;
}
return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
}
float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
vec3 lightToPosition = shadowCoord.xyz;
float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;
vec3 bd3D = normalize( lightToPosition );
#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
return (
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
) * ( 1.0 / 9.0 );
#else
return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
#endif
}
#endif`;
var JP = `#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];
varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
struct SpotLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
#endif`;
var KP = `#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
vec4 shadowWorldPosition;
#endif
#if NUM_DIR_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );
vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#endif`;
var qP = `float getShadowMask() {
float shadow = 1.0;
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
directionalLight = directionalLightShadows[ i ];
shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
spotLight = spotLightShadows[ i ];
shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
pointLight = pointLightShadows[ i ];
shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
}
#pragma unroll_loop_end
#endif
#endif
return shadow;
}`;
var QP = `#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`;
var eI = `#ifdef USE_SKINNING
uniform mat4 bindMatrix;
uniform mat4 bindMatrixInverse;
#ifdef BONE_TEXTURE
uniform highp sampler2D boneTexture;
uniform int boneTextureSize;
mat4 getBoneMatrix( const in float i ) {
float j = i * 4.0;
float x = mod( j, float( boneTextureSize ) );
float y = floor( j / float( boneTextureSize ) );
float dx = 1.0 / float( boneTextureSize );
float dy = 1.0 / float( boneTextureSize );
y = dy * ( y + 0.5 );
vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
mat4 bone = mat4( v1, v2, v3, v4 );
return bone;
}
#else
uniform mat4 boneMatrices[ MAX_BONES ];
mat4 getBoneMatrix( const in float i ) {
mat4 bone = boneMatrices[ int(i) ];
return bone;
}
#endif
#endif`;
var tI = `#ifdef USE_SKINNING
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
vec4 skinned = vec4( 0.0 );
skinned += boneMatX * skinVertex * skinWeight.x;
skinned += boneMatY * skinVertex * skinWeight.y;
skinned += boneMatZ * skinVertex * skinWeight.z;
skinned += boneMatW * skinVertex * skinWeight.w;
transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`;
var nI = `#ifdef USE_SKINNING
mat4 skinMatrix = mat4( 0.0 );
skinMatrix += skinWeight.x * boneMatX;
skinMatrix += skinWeight.y * boneMatY;
skinMatrix += skinWeight.z * boneMatZ;
skinMatrix += skinWeight.w * boneMatW;
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
#ifdef USE_TANGENT
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#endif
#endif`;
var iI = `float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
#endif`;
var rI = `#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
#endif`;
var sI = `#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`;
var oI = `#ifndef saturate
#define saturate(a) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
return toneMappingExposure * color;
}
vec3 ReinhardToneMapping( vec3 color ) {
color *= toneMappingExposure;
return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
color *= toneMappingExposure;
color = max( vec3( 0.0 ), color - 0.004 );
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
const mat3 ACESInputMat = mat3(
vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),
vec3( 0.04823, 0.01566, 0.83777 )
);
const mat3 ACESOutputMat = mat3(
vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),
vec3( -0.07367, -0.00605, 1.07602 )
);
color *= toneMappingExposure / 0.6;
color = ACESInputMat * color;
color = RRTAndODTFit( color );
color = ACESOutputMat * color;
return saturate( color );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`;
var aI = `#ifdef USE_TRANSMISSION
float transmissionFactor = transmission;
float thicknessFactor = thickness;
#ifdef USE_TRANSMISSIONMAP
transmissionFactor *= texture2D( transmissionMap, vUv ).r;
#endif
#ifdef USE_THICKNESSNMAP
thicknessFactor *= texture2D( thicknessMap, vUv ).g;
#endif
vec3 pos = vWorldPosition.xyz / vWorldPosition.w;
vec3 v = normalize( cameraPosition - pos );
float ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );
vec3 transmission = transmissionFactor * getIBLVolumeRefraction(
normal, v, roughnessFactor, material.diffuseColor, totalSpecular,
pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
attenuationColor, attenuationDistance );
totalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );
#endif`;
var lI = `#ifdef USE_TRANSMISSION
#ifdef USE_TRANSMISSIONMAP
uniform sampler2D transmissionMap;
#endif
#ifdef USE_THICKNESSMAP
uniform sampler2D thicknessMap;
#endif
uniform vec2 transmissionSamplerSize;
uniform sampler2D transmissionSamplerMap;
uniform mat4 modelMatrix;
uniform mat4 projectionMatrix;
varying vec4 vWorldPosition;
vec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {
vec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);
vec3 modelScale;
modelScale.x = length(vec3(modelMatrix[0].xyz));
modelScale.y = length(vec3(modelMatrix[1].xyz));
modelScale.z = length(vec3(modelMatrix[2].xyz));
return normalize(refractionVector) * thickness * modelScale;
}
float applyIorToRoughness(float roughness, float ior) {
return roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);
}
vec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {
float framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);
return texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;
}
vec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {
if (attenuationDistance == 0.0) {
return radiance;
} else {
vec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;
vec3 transmittance = exp(-attenuationCoefficient * transmissionDistance); return transmittance * radiance;
}
}
vec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,
vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,
vec3 attenuationColor, float attenuationDistance) {
vec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);
vec3 refractedRayExit = position + transmissionRay;
vec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
refractionCoords += 1.0;
refractionCoords /= 2.0;
vec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);
vec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);
return (1.0 - specularColor) * attenuatedColor * baseColor;
}
#endif`;
var cI = `#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
varying vec2 vUv;
#endif`;
var uI = `#ifdef USE_UV
#ifdef UVS_VERTEX_ONLY
vec2 vUv;
#else
varying vec2 vUv;
#endif
uniform mat3 uvTransform;
#endif`;
var hI = `#ifdef USE_UV
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif`;
var dI = `#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
varying vec2 vUv2;
#endif`;
var fI = `#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
attribute vec2 uv2;
varying vec2 vUv2;
uniform mat3 uv2Transform;
#endif`;
var pI = `#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
#endif`;
var mI = `#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )
vec4 worldPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
worldPosition = instanceMatrix * worldPosition;
#endif
worldPosition = modelMatrix * worldPosition;
#endif`;
var gI = `uniform sampler2D t2D;
varying vec2 vUv;
void main() {
vec4 texColor = texture2D( t2D, vUv );
gl_FragColor = mapTexelToLinear( texColor );
#include
#include
}`;
var vI = `varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
}`;
var yI = `#include
uniform float opacity;
varying vec3 vWorldDirection;
#include
void main() {
vec3 vReflect = vWorldDirection;
#include
gl_FragColor = envColor;
gl_FragColor.a *= opacity;
#include
#include
}`;
var bI = `varying vec3 vWorldDirection;
#include
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include
#include
gl_Position.z = gl_Position.w;
}`;
var xI = `#if DEPTH_PACKING == 3200
uniform float opacity;
#endif
#include
#include
#include
#include
#include
#include
#include
varying vec2 vHighPrecisionZW;
void main() {
#include
vec4 diffuseColor = vec4( 1.0 );
#if DEPTH_PACKING == 3200
diffuseColor.a = opacity;
#endif
#include
#include
#include
#include
float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
#if DEPTH_PACKING == 3200
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
#elif DEPTH_PACKING == 3201
gl_FragColor = packDepthToRGBA( fragCoordZ );
#endif
}`;
var MI = `#include
#include
#include
#include
#include
#include
#include
varying vec2 vHighPrecisionZW;
void main() {
#include
#include
#ifdef USE_DISPLACEMENTMAP
#include
#include
#include
#endif
#include
#include
#include
#include
#include
#include
#include
vHighPrecisionZW = gl_Position.zw;
}`;
var wI = `#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include
#include
#include
#include
#include
#include
void main () {
#include
vec4 diffuseColor = vec4( 1.0 );
#include
#include
#include
float dist = length( vWorldPosition - referencePosition );
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
dist = saturate( dist );
gl_FragColor = packDepthToRGBA( dist );
}`;
var AI = `#define DISTANCE
varying vec3 vWorldPosition;
#include
#include
#include
#include
#include
#include
void main() {
#include
#include
#ifdef USE_DISPLACEMENTMAP
#include
#include
#include
#endif
#include
#include
#include
#include
#include
#include
#include
vWorldPosition = worldPosition.xyz;
}`;
var SI = `uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
vec4 texColor = texture2D( tEquirect, sampleUV );
gl_FragColor = mapTexelToLinear( texColor );
#include
#include
}`;
var _I = `varying vec3 vWorldDirection;
#include
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include
#include
}`;
var TI = `uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include
#include
#include
#include
#include
void main() {
#include
if ( mod( vLineDistance, totalSize ) > dashSize ) {
discard;
}
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include
#include
outgoingLight = diffuseColor.rgb;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include
#include
#include
#include
}`;
var EI = `uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include
#include
#include
#include
#include
#include
void main() {
vLineDistance = scale * lineDistance;
#include
#include
#include
#include
#include
#include
#include
}`;
var CI = `uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
void main() {
#include
vec4 diffuseColor = vec4( diffuse, opacity );
#include
#include
#include
#include
#include
#include
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
#ifdef USE_LIGHTMAP
vec4 lightMapTexel= texture2D( lightMap, vUv2 );
reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;
#else
reflectedLight.indirectDiffuse += vec3( 1.0 );
#endif
#include
reflectedLight.indirectDiffuse *= diffuseColor.rgb;
vec3 outgoingLight = reflectedLight.indirectDiffuse;
#include
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include
#include
#include
#include
#include
}`;
var LI = `#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
void main() {
#include
#include
#include
#include
#ifdef USE_ENVMAP
#include
#include
#include
#include
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
}`;
var RI = `uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
varying vec3 vLightBack;
varying vec3 vIndirectBack;
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
void main() {
#include
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include
#include
#include
#include
#include
#include
#include
#ifdef DOUBLE_SIDED
reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;
#else
reflectedLight.indirectDiffuse += vIndirectFront;
#endif
#include
reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );
#ifdef DOUBLE_SIDED
reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;
#else
reflectedLight.directDiffuse = vLightFront;
#endif
reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();
#include
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include
#include
#include
#include
#include
}`;
var FI = `#define LAMBERT
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
varying vec3 vLightBack;
varying vec3 vIndirectBack;
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
void main() {
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
}`;
var PI = `#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
void main() {
#include
vec4 diffuseColor = vec4( diffuse, opacity );
#include
#include
#include
#include
#include
#include
#include
vec3 viewDir = normalize( vViewPosition );
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
vec3 y = cross( viewDir, x );
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
#ifdef USE_MATCAP
vec4 matcapColor = texture2D( matcap, uv );
matcapColor = matcapTexelToLinear( matcapColor );
#else
vec4 matcapColor = vec4( 1.0 );
#endif
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include
#include
#include
#include
#include
}`;
var II = `#define MATCAP
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include