!(function e(t, i, n) { function r(a, s) { if (!i[a]) { if (!t[a]) { var l = "function" == typeof require && require; if (!s && l) return l(a, !0); if (o) return o(a, !0); var c = new Error("Cannot find module '" + a + "'"); throw ((c.code = "MODULE_NOT_FOUND"), c); } var u = (i[a] = { exports: {} }); t[a][0].call( u.exports, function (e) { var i = t[a][1][e]; return r(i ? i : e); }, u, u.exports, e, t, i, n ); } return i[a].exports; } for (var o = "function" == typeof require && require, a = 0; a < n.length; a++) r(n[a]); return r; })({ 1: [ function (e, t, i) { (function (t) { "use strict"; if ((e("core-js/shim"), e("regenerator/runtime"), t._babelPolyfill)) throw new Error("only one instance of babel/polyfill is allowed"); t._babelPolyfill = !0; }.call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})); }, { "core-js/shim": 185, "regenerator/runtime": 186 }, ], 2: [ function (e, t, i) { t.exports = function (e) { if ("function" != typeof e) throw TypeError(e + " is not a function!"); return e; }; }, {}, ], 3: [ function (e, t, i) { var n = e("./$.is-object"); t.exports = function (e) { if (!n(e)) throw TypeError(e + " is not an object!"); return e; }; }, { "./$.is-object": 37 }, ], 4: [ function (e, t, i) { "use strict"; var n = e("./$.to-object"), r = e("./$.to-index"), o = e("./$.to-length"); t.exports = [].copyWithin || function (e, t) { var i = n(this), a = o(i.length), s = r(e, a), l = r(t, a), c = arguments[2], u = Math.min((void 0 === c ? a : r(c, a)) - l, a - s), h = 1; for (s > l && l + u > s && ((h = -1), (l += u - 1), (s += u - 1)); u-- > 0;) l in i ? (i[s] = i[l]) : delete i[s], (s += h), (l += h); return i; }; }, { "./$.to-index": 73, "./$.to-length": 76, "./$.to-object": 77 }, ], 5: [ function (e, t, i) { "use strict"; var n = e("./$.to-object"), r = e("./$.to-index"), o = e("./$.to-length"); t.exports = [].fill || function (e) { for (var t = n(this, !0), i = o(t.length), a = r(arguments[1], i), s = arguments[2], l = void 0 === s ? i : r(s, i); l > a;) t[a++] = e; return t; }; }, { "./$.to-index": 73, "./$.to-length": 76, "./$.to-object": 77 }, ], 6: [ function (e, t, i) { var n = e("./$.to-iobject"), r = e("./$.to-length"), o = e("./$.to-index"); t.exports = function (e) { return function (t, i, a) { var s, l = n(t), c = r(l.length), u = o(a, c); if (e && i != i) { for (; c > u;) if (((s = l[u++]), s != s)) return !0; } else for (; c > u; u++) if ((e || u in l) && l[u] === i) return e || u; return !e && -1; }; }; }, { "./$.to-index": 73, "./$.to-iobject": 75, "./$.to-length": 76 }, ], 7: [ function (e, t, i) { var n = e("./$.ctx"), r = e("./$.is-object"), o = e("./$.iobject"), a = e("./$.to-object"), s = e("./$.to-length"), l = e("./$.is-array"), c = e("./$.wks")("species"), u = function (e, t) { var i; return l(e) && r((i = e.constructor)) && ((i = i[c]), null === i && (i = void 0)), new(void 0 === i ? Array : i)(t); }; t.exports = function (e) { var t = 1 == e, i = 2 == e, r = 3 == e, l = 4 == e, c = 6 == e, h = 5 == e || c; return function (d, f, p) { for (var m, v, g = a(d), y = o(g), _ = n(f, p, 3), b = s(y.length), x = 0, w = t ? u(d, b) : i ? u(d, 0) : void 0; b > x; x++) if ((h || x in y) && ((m = y[x]), (v = _(m, x, g)), e)) if (t) w[x] = v; else if (v) switch (e) { case 3: return !0; case 5: return m; case 6: return x; case 2: w.push(m); } else if (l) return !1; return c ? -1 : r || l ? l : w; }; }; }, { "./$.ctx": 16, "./$.iobject": 33, "./$.is-array": 35, "./$.is-object": 37, "./$.to-length": 76, "./$.to-object": 77, "./$.wks": 80 }, ], 8: [ function (e, t, i) { var n = e("./$.to-object"), r = e("./$.iobject"), o = e("./$.enum-keys"), a = e("./$.has"); t.exports = e("./$.fails")(function () { var e = Object.assign, t = {}, i = {}, n = Symbol(), r = "abcdefghijklmnopqrst"; return ( (t[n] = 7), r.split("").forEach(function (e) { i[e] = e; }), 7 != e({}, t)[n] || Object.keys(e({}, i)).join("") != r ); }) ? function (e, t) { for (var i = n(e), s = arguments.length, l = 1; s > l;) for (var c, u = r(arguments[l++]), h = o(u), d = h.length, f = 0; d > f;) a(u, (c = h[f++])) && (i[c] = u[c]); return i; } : Object.assign; }, { "./$.enum-keys": 20, "./$.fails": 23, "./$.has": 29, "./$.iobject": 33, "./$.to-object": 77 }, ], 9: [ function (e, t, i) { var n = e("./$.cof"), r = e("./$.wks")("toStringTag"), o = "Arguments" == n( (function () { return arguments; })() ); t.exports = function (e) { var t, i, a; return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof (i = (t = Object(e))[r]) ? i : o ? n(t) : "Object" == (a = n(t)) && "function" == typeof t.callee ? "Arguments" : a; }; }, { "./$.cof": 10, "./$.wks": 80 }, ], 10: [ function (e, t, i) { var n = {}.toString; t.exports = function (e) { return n.call(e).slice(8, -1); }; }, {}, ], 11: [ function (e, t, i) { "use strict"; var n = e("./$"), r = e("./$.hide"), o = e("./$.ctx"), a = e("./$.species"), s = e("./$.strict-new"), l = e("./$.defined"), c = e("./$.for-of"), u = e("./$.iter-step"), h = e("./$.uid")("id"), d = e("./$.has"), f = e("./$.is-object"), p = Object.isExtensible || f, m = e("./$.support-desc"), v = m ? "_s" : "size", g = 0, y = function (e, t) { if (!f(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e; if (!d(e, h)) { if (!p(e)) return "F"; if (!t) return "E"; r(e, h, ++g); } return "O" + e[h]; }, _ = function (e, t) { var i, n = y(t); if ("F" !== n) return e._i[n]; for (i = e._f; i; i = i.n) if (i.k == t) return i; }; t.exports = { getConstructor: function (t, i, r, a) { var u = t(function (e, t) { s(e, u, i), (e._i = n.create(null)), (e._f = void 0), (e._l = void 0), (e[v] = 0), void 0 != t && c(t, r, e[a], e); }); return ( e("./$.mix")(u.prototype, { clear: function () { for (var e = this, t = e._i, i = e._f; i; i = i.n)(i.r = !0), i.p && (i.p = i.p.n = void 0), delete t[i.i]; (e._f = e._l = void 0), (e[v] = 0); }, delete: function (e) { var t = this, i = _(t, e); if (i) { var n = i.n, r = i.p; delete t._i[i.i], (i.r = !0), r && (r.n = n), n && (n.p = r), t._f == i && (t._f = n), t._l == i && (t._l = r), t[v]--; } return !!i; }, forEach: function (e) { for (var t, i = o(e, arguments[1], 3); (t = t ? t.n : this._f);) for (i(t.v, t.k, this); t && t.r;) t = t.p; }, has: function (e) { return !!_(this, e); }, }), m && n.setDesc(u.prototype, "size", { get: function () { return l(this[v]); }, }), u ); }, def: function (e, t, i) { var n, r, o = _(e, t); return o ? (o.v = i) : ((e._l = o = { i: (r = y(t, !0)), k: t, v: i, p: (n = e._l), n: void 0, r: !1 }), e._f || (e._f = o), n && (n.n = o), e[v]++, "F" !== r && (e._i[r] = o)), e; }, getEntry: _, setStrong: function (t, i, n) { e("./$.iter-define")( t, i, function (e, t) { (this._t = e), (this._k = t), (this._l = void 0); }, function () { for (var e = this, t = e._k, i = e._l; i && i.r;) i = i.p; return e._t && (e._l = i = i ? i.n : e._t._f) ? ("keys" == t ? u(0, i.k) : "values" == t ? u(0, i.v) : u(0, [i.k, i.v])) : ((e._t = void 0), u(1)); }, n ? "entries" : "values", !n, !0 ), a(t), a(e("./$.core")[i]); }, }; }, { "./$": 45, "./$.core": 15, "./$.ctx": 16, "./$.defined": 18, "./$.for-of": 26, "./$.has": 29, "./$.hide": 30, "./$.is-object": 37, "./$.iter-define": 41, "./$.iter-step": 43, "./$.mix": 50, "./$.species": 63, "./$.strict-new": 64, "./$.support-desc": 70, "./$.uid": 78, }, ], 12: [ function (e, t, i) { var n = e("./$.for-of"), r = e("./$.classof"); t.exports = function (e) { return function () { if (r(this) != e) throw TypeError(e + "#toJSON isn't generic"); var t = []; return n(this, !1, t.push, t), t; }; }; }, { "./$.classof": 9, "./$.for-of": 26 }, ], 13: [ function (e, t, i) { "use strict"; var n = e("./$.hide"), r = e("./$.an-object"), o = e("./$.strict-new"), a = e("./$.for-of"), s = e("./$.array-methods"), l = e("./$.uid")("weak"), c = e("./$.is-object"), u = e("./$.has"), h = Object.isExtensible || c, d = s(5), f = s(6), p = 0, m = function (e) { return e._l || (e._l = new v()); }, v = function () { this.a = []; }, g = function (e, t) { return d(e.a, function (e) { return e[0] === t; }); }; (v.prototype = { get: function (e) { var t = g(this, e); return t ? t[1] : void 0; }, has: function (e) { return !!g(this, e); }, set: function (e, t) { var i = g(this, e); i ? (i[1] = t) : this.a.push([e, t]); }, delete: function (e) { var t = f(this.a, function (t) { return t[0] === e; }); return ~t && this.a.splice(t, 1), !!~t; }, }), (t.exports = { getConstructor: function (t, i, n, r) { var s = t(function (e, t) { o(e, s, i), (e._i = p++), (e._l = void 0), void 0 != t && a(t, n, e[r], e); }); return ( e("./$.mix")(s.prototype, { delete: function (e) { return c(e) ? (h(e) ? u(e, l) && u(e[l], this._i) && delete e[l][this._i] : m(this)["delete"](e)) : !1; }, has: function (e) { return c(e) ? (h(e) ? u(e, l) && u(e[l], this._i) : m(this).has(e)) : !1; }, }), s ); }, def: function (e, t, i) { return h(r(t)) ? (u(t, l) || n(t, l, {}), (t[l][e._i] = i)) : m(e).set(t, i), e; }, frozenStore: m, WEAK: l, }); }, { "./$.an-object": 3, "./$.array-methods": 7, "./$.for-of": 26, "./$.has": 29, "./$.hide": 30, "./$.is-object": 37, "./$.mix": 50, "./$.strict-new": 64, "./$.uid": 78 }, ], 14: [ function (e, t, i) { "use strict"; var n = e("./$.global"), r = e("./$.def"), o = e("./$.for-of"), a = e("./$.strict-new"); t.exports = function (t, i, s, l, c, u) { var h = n[t], d = h, f = c ? "set" : "add", p = d && d.prototype, m = {}, v = function (t) { var i = p[t]; e("./$.redef")( p, t, "delete" == t ? function (e) { return i.call(this, 0 === e ? 0 : e); } : "has" == t ? function (e) { return i.call(this, 0 === e ? 0 : e); } : "get" == t ? function (e) { return i.call(this, 0 === e ? 0 : e); } : "add" == t ? function (e) { return i.call(this, 0 === e ? 0 : e), this; } : function (e, t) { return i.call(this, 0 === e ? 0 : e, t), this; } ); }; if ( "function" == typeof d && (u || (p.forEach && !e("./$.fails")(function () { new d().entries().next(); }))) ) { var g, y = new d(), _ = y[f](u ? {} : -0, 1); e("./$.iter-detect")(function (e) { new d(e); }) || ((d = i(function (e, i) { a(e, d, t); var n = new h(); return void 0 != i && o(i, c, n[f], n), n; })), (d.prototype = p), (p.constructor = d)), u || y.forEach(function (e, t) { g = 1 / t === -(1 / 0); }), g && (v("delete"), v("has"), c && v("get")), (g || _ !== y) && v(f), u && p.clear && delete p.clear; } else(d = l.getConstructor(i, t, c, f)), e("./$.mix")(d.prototype, s); return e("./$.tag")(d, t), (m[t] = d), r(r.G + r.W + r.F * (d != h), m), u || l.setStrong(d, t, c), d; }; }, { "./$.def": 17, "./$.fails": 23, "./$.for-of": 26, "./$.global": 28, "./$.iter-detect": 42, "./$.mix": 50, "./$.redef": 57, "./$.strict-new": 64, "./$.tag": 71 }, ], 15: [ function (e, t, i) { var n = (t.exports = { version: "1.2.1" }); "number" == typeof __e && (__e = n); }, {}, ], 16: [ function (e, t, i) { var n = e("./$.a-function"); t.exports = function (e, t, i) { if ((n(e), void 0 === t)) return e; switch (i) { case 1: return function (i) { return e.call(t, i); }; case 2: return function (i, n) { return e.call(t, i, n); }; case 3: return function (i, n, r) { return e.call(t, i, n, r); }; } return function () { return e.apply(t, arguments); }; }; }, { "./$.a-function": 2 }, ], 17: [ function (e, t, i) { var n = e("./$.global"), r = e("./$.core"), o = e("./$.hide"), a = e("./$.redef"), s = "prototype", l = function (e, t) { return function () { return e.apply(t, arguments); }; }, c = function (e, t, i) { var u, h, d, f, p = e & c.G, m = e & c.P, v = p ? n : e & c.S ? n[t] || (n[t] = {}) : (n[t] || {})[s], g = p ? r : r[t] || (r[t] = {}); p && (i = t); for (u in i) (h = !(e & c.F) && v && u in v), (d = (h ? v : i)[u]), (f = e & c.B && h ? l(d, n) : m && "function" == typeof d ? l(Function.call, d) : d), v && !h && a(v, u, d), g[u] != d && o(g, u, f), m && ((g[s] || (g[s] = {}))[u] = d); }; (n.core = r), (c.F = 1), (c.G = 2), (c.S = 4), (c.P = 8), (c.B = 16), (c.W = 32), (t.exports = c); }, { "./$.core": 15, "./$.global": 28, "./$.hide": 30, "./$.redef": 57 }, ], 18: [ function (e, t, i) { t.exports = function (e) { if (void 0 == e) throw TypeError("Can't call method on " + e); return e; }; }, {}, ], 19: [ function (e, t, i) { var n = e("./$.is-object"), r = e("./$.global").document, o = n(r) && n(r.createElement); t.exports = function (e) { return o ? r.createElement(e) : {}; }; }, { "./$.global": 28, "./$.is-object": 37 }, ], 20: [ function (e, t, i) { var n = e("./$"); t.exports = function (e) { var t = n.getKeys(e), i = n.getSymbols; if (i) for (var r, o = i(e), a = n.isEnum, s = 0; o.length > s;) a.call(e, (r = o[s++])) && t.push(r); return t; }; }, { "./$": 45 }, ], 21: [ function (e, t, i) { t.exports = Math.expm1 || function (e) { return 0 == (e = +e) ? e : e > -1e-6 && 1e-6 > e ? e + (e * e) / 2 : Math.exp(e) - 1; }; }, {}, ], 22: [ function (e, t, i) { t.exports = function (t) { var i = /./; try { "/./" [t](i); } catch (n) { try { return (i[e("./$.wks")("match")] = !1), !"/./" [t](i); } catch (n) {} } return !0; }; }, { "./$.wks": 80 }, ], 23: [ function (e, t, i) { t.exports = function (e) { try { return !!e(); } catch (t) { return !0; } }; }, {}, ], 24: [ function (e, t, i) { "use strict"; t.exports = function (t, i, n) { var r = e("./$.defined"), o = e("./$.wks")(t), a = "" [t]; e("./$.fails")(function () { var e = {}; return ( (e[o] = function () { return 7; }), 7 != "" [t](e) ); }) && (e("./$.redef")(String.prototype, t, n(r, o, a)), e("./$.hide")( RegExp.prototype, o, 2 == i ? function (e, t) { return a.call(e, this, t); } : function (e) { return a.call(e, this); } )); }; }, { "./$.defined": 18, "./$.fails": 23, "./$.hide": 30, "./$.redef": 57, "./$.wks": 80 }, ], 25: [ function (e, t, i) { "use strict"; var n = e("./$.an-object"); t.exports = function () { var e = n(this), t = ""; return e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), e.unicode && (t += "u"), e.sticky && (t += "y"), t; }; }, { "./$.an-object": 3 }, ], 26: [ function (e, t, i) { var n = e("./$.ctx"), r = e("./$.iter-call"), o = e("./$.is-array-iter"), a = e("./$.an-object"), s = e("./$.to-length"), l = e("./core.get-iterator-method"); t.exports = function (e, t, i, c) { var u, h, d, f = l(e), p = n(i, c, t ? 2 : 1), m = 0; if ("function" != typeof f) throw TypeError(e + " is not iterable!"); if (o(f)) for (u = s(e.length); u > m; m++) t ? p(a((h = e[m]))[0], h[1]) : p(e[m]); else for (d = f.call(e); !(h = d.next()).done;) r(d, p, h.value, t); }; }, { "./$.an-object": 3, "./$.ctx": 16, "./$.is-array-iter": 34, "./$.iter-call": 39, "./$.to-length": 76, "./core.get-iterator-method": 81 }, ], 27: [ function (e, t, i) { var n = {}.toString, r = e("./$.to-iobject"), o = e("./$").getNames, a = "object" == typeof window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], s = function (e) { try { return o(e); } catch (t) { return a.slice(); } }; t.exports.get = function (e) { return a && "[object Window]" == n.call(e) ? s(e) : o(r(e)); }; }, { "./$": 45, "./$.to-iobject": 75 }, ], 28: [ function (e, t, i) { var n = "undefined", r = (t.exports = typeof window != n && window.Math == Math ? window : typeof self != n && self.Math == Math ? self : Function("return this")()); "number" == typeof __g && (__g = r); }, {}, ], 29: [ function (e, t, i) { var n = {}.hasOwnProperty; t.exports = function (e, t) { return n.call(e, t); }; }, {}, ], 30: [ function (e, t, i) { var n = e("./$"), r = e("./$.property-desc"); t.exports = e("./$.support-desc") ? function (e, t, i) { return n.setDesc(e, t, r(1, i)); } : function (e, t, i) { return (e[t] = i), e; }; }, { "./$": 45, "./$.property-desc": 56, "./$.support-desc": 70 }, ], 31: [ function (e, t, i) { t.exports = e("./$.global").document && document.documentElement; }, { "./$.global": 28 }, ], 32: [ function (e, t, i) { t.exports = function (e, t, i) { var n = void 0 === i; switch (t.length) { case 0: return n ? e() : e.call(i); case 1: return n ? e(t[0]) : e.call(i, t[0]); case 2: return n ? e(t[0], t[1]) : e.call(i, t[0], t[1]); case 3: return n ? e(t[0], t[1], t[2]) : e.call(i, t[0], t[1], t[2]); case 4: return n ? e(t[0], t[1], t[2], t[3]) : e.call(i, t[0], t[1], t[2], t[3]); } return e.apply(i, t); }; }, {}, ], 33: [ function (e, t, i) { var n = e("./$.cof"); t.exports = 0 in Object("z") ? Object : function (e) { return "String" == n(e) ? e.split("") : Object(e); }; }, { "./$.cof": 10 }, ], 34: [ function (e, t, i) { var n = e("./$.iterators"), r = e("./$.wks")("iterator"); t.exports = function (e) { return (n.Array || Array.prototype[r]) === e; }; }, { "./$.iterators": 44, "./$.wks": 80 }, ], 35: [ function (e, t, i) { var n = e("./$.cof"); t.exports = Array.isArray || function (e) { return "Array" == n(e); }; }, { "./$.cof": 10 }, ], 36: [ function (e, t, i) { var n = e("./$.is-object"), r = Math.floor; t.exports = function (e) { return !n(e) && isFinite(e) && r(e) === e; }; }, { "./$.is-object": 37 }, ], 37: [ function (e, t, i) { t.exports = function (e) { return "object" == typeof e ? null !== e : "function" == typeof e; }; }, {}, ], 38: [ function (e, t, i) { var n = e("./$.is-object"), r = e("./$.cof"), o = e("./$.wks")("match"); t.exports = function (e) { var t; return n(e) && (void 0 !== (t = e[o]) ? !!t : "RegExp" == r(e)); }; }, { "./$.cof": 10, "./$.is-object": 37, "./$.wks": 80 }, ], 39: [ function (e, t, i) { var n = e("./$.an-object"); t.exports = function (e, t, i, r) { try { return r ? t(n(i)[0], i[1]) : t(i); } catch (o) { var a = e["return"]; throw (void 0 !== a && n(a.call(e)), o); } }; }, { "./$.an-object": 3 }, ], 40: [ function (e, t, i) { "use strict"; var n = e("./$"), r = {}; e("./$.hide")(r, e("./$.wks")("iterator"), function () { return this; }), (t.exports = function (t, i, o) { (t.prototype = n.create(r, { next: e("./$.property-desc")(1, o) })), e("./$.tag")(t, i + " Iterator"); }); }, { "./$": 45, "./$.hide": 30, "./$.property-desc": 56, "./$.tag": 71, "./$.wks": 80 }, ], 41: [ function (e, t, i) { "use strict"; var n = e("./$.library"), r = e("./$.def"), o = e("./$.redef"), a = e("./$.hide"), s = e("./$.has"), l = e("./$.wks")("iterator"), c = e("./$.iterators"), u = !([].keys && "next" in [].keys()), h = "@@iterator", d = "keys", f = "values", p = function () { return this; }; t.exports = function (t, i, m, v, g, y, _) { e("./$.iter-create")(m, i, v); var b, x, w = function (e) { switch (e) { case d: return function () { return new m(this, e); }; case f: return function () { return new m(this, e); }; } return function () { return new m(this, e); }; }, M = i + " Iterator", T = t.prototype, S = T[l] || T[h] || (g && T[g]), E = S || w(g); if (S) { var A = e("./$").getProto(E.call(new t())); e("./$.tag")(A, M, !0), !n && s(T, h) && a(A, l, p); } if (((!n || _) && a(T, l, E), (c[i] = E), (c[M] = p), g)) if (((b = { keys: y ? E : w(d), values: g == f ? E : w(f), entries: g != f ? E : w("entries") }), _)) for (x in b) x in T || o(T, x, b[x]); else r(r.P + r.F * u, i, b); }; }, { "./$": 45, "./$.def": 17, "./$.has": 29, "./$.hide": 30, "./$.iter-create": 40, "./$.iterators": 44, "./$.library": 47, "./$.redef": 57, "./$.tag": 71, "./$.wks": 80 }, ], 42: [ function (e, t, i) { var n = e("./$.wks")("iterator"), r = !1; try { var o = [7][n](); (o["return"] = function () { r = !0; }), Array.from(o, function () { throw 2; }); } catch (a) {} t.exports = function (e) { if (!r) return !1; var t = !1; try { var i = [7], o = i[n](); (o.next = function () { t = !0; }), (i[n] = function () { return o; }), e(i); } catch (a) {} return t; }; }, { "./$.wks": 80 }, ], 43: [ function (e, t, i) { t.exports = function (e, t) { return { value: t, done: !!e }; }; }, {}, ], 44: [ function (e, t, i) { t.exports = {}; }, {}, ], 45: [ function (e, t, i) { var n = Object; t.exports = { create: n.create, getProto: n.getPrototypeOf, isEnum: {}.propertyIsEnumerable, getDesc: n.getOwnPropertyDescriptor, setDesc: n.defineProperty, setDescs: n.defineProperties, getKeys: n.keys, getNames: n.getOwnPropertyNames, getSymbols: n.getOwnPropertySymbols, each: [].forEach, }; }, {}, ], 46: [ function (e, t, i) { var n = e("./$"), r = e("./$.to-iobject"); t.exports = function (e, t) { for (var i, o = r(e), a = n.getKeys(o), s = a.length, l = 0; s > l;) if (o[(i = a[l++])] === t) return i; }; }, { "./$": 45, "./$.to-iobject": 75 }, ], 47: [ function (e, t, i) { t.exports = !1; }, {}, ], 48: [ function (e, t, i) { t.exports = Math.log1p || function (e) { return (e = +e) > -1e-8 && 1e-8 > e ? e - (e * e) / 2 : Math.log(1 + e); }; }, {}, ], 49: [ function (e, t, i) { var n, r, o, a = e("./$.global"), s = e("./$.task").set, l = a.MutationObserver || a.WebKitMutationObserver, c = a.process, u = "process" == e("./$.cof")(c), h = function () { var e, t; for (u && (e = c.domain) && ((c.domain = null), e.exit()); n;)(t = n.domain), t && t.enter(), n.fn.call(), t && t.exit(), (n = n.next); (r = void 0), e && e.enter(); }; if (u) o = function () { c.nextTick(h); }; else if (l) { var d = 1, f = document.createTextNode(""); new l(h).observe(f, { characterData: !0 }), (o = function () { f.data = d = -d; }); } else o = function () { s.call(a, h); }; t.exports = function (e) { var t = { fn: e, next: void 0, domain: u && c.domain }; r && (r.next = t), n || ((n = t), o()), (r = t); }; }, { "./$.cof": 10, "./$.global": 28, "./$.task": 72 }, ], 50: [ function (e, t, i) { var n = e("./$.redef"); t.exports = function (e, t) { for (var i in t) n(e, i, t[i]); return e; }; }, { "./$.redef": 57 }, ], 51: [ function (e, t, i) { t.exports = function (t, i) { var n = e("./$.def"), r = (e("./$.core").Object || {})[t] || Object[t], o = {}; (o[t] = i(r)), n( n.S + n.F * e("./$.fails")(function () { r(1); }), "Object", o ); }; }, { "./$.core": 15, "./$.def": 17, "./$.fails": 23 }, ], 52: [ function (e, t, i) { var n = e("./$"), r = e("./$.has"), o = e("./$.to-iobject"); t.exports = function (e) { return function (t) { for (var i, a = o(t), s = n.getKeys(a), l = s.length, c = 0, u = []; l > c;) r(a, (i = s[c++])) && u.push(e ? [i, a[i]] : a[i]); return u; }; }; }, { "./$": 45, "./$.has": 29, "./$.to-iobject": 75 }, ], 53: [ function (e, t, i) { var n = e("./$"), r = e("./$.an-object"), o = e("./$.global").Reflect; t.exports = (o && o.ownKeys) || function (e) { var t = n.getNames(r(e)), i = n.getSymbols; return i ? t.concat(i(e)) : t; }; }, { "./$": 45, "./$.an-object": 3, "./$.global": 28 }, ], 54: [ function (e, t, i) { "use strict"; var n = e("./$.path"), r = e("./$.invoke"), o = e("./$.a-function"); t.exports = function () { for (var e = o(this), t = arguments.length, i = Array(t), a = 0, s = n._, l = !1; t > a;)(i[a] = arguments[a++]) === s && (l = !0); return function () { var n, o = this, a = arguments.length, c = 0, u = 0; if (!l && !a) return r(e, i, o); if (((n = i.slice()), l)) for (; t > c; c++) n[c] === s && (n[c] = arguments[u++]); for (; a > u;) n.push(arguments[u++]); return r(e, n, o); }; }; }, { "./$.a-function": 2, "./$.invoke": 32, "./$.path": 55 }, ], 55: [ function (e, t, i) { t.exports = e("./$.global"); }, { "./$.global": 28 }, ], 56: [ function (e, t, i) { t.exports = function (e, t) { return { enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t }; }; }, {}, ], 57: [ function (e, t, i) { var n = e("./$.global"), r = e("./$.hide"), o = e("./$.uid")("src"), a = "toString", s = Function[a], l = ("" + s).split(a); (e("./$.core").inspectSource = function (e) { return s.call(e); }), (t.exports = function (e, t, i, a) { "function" == typeof i && (r(i, o, e[t] ? "" + e[t] : l.join(String(t))), "name" in i || (i.name = t)), e === n ? (e[t] = i) : (a || delete e[t], r(e, t, i)); })(Function.prototype, a, function () { return ("function" == typeof this && this[o]) || s.call(this); }); }, { "./$.core": 15, "./$.global": 28, "./$.hide": 30, "./$.uid": 78 }, ], 58: [ function (e, t, i) { t.exports = function (e, t) { var i = t === Object(t) ? function (e) { return t[e]; } : t; return function (t) { return String(t).replace(e, i); }; }; }, {}, ], 59: [ function (e, t, i) { t.exports = Object.is || function (e, t) { return e === t ? 0 !== e || 1 / e === 1 / t : e != e && t != t; }; }, {}, ], 60: [ function (e, t, i) { var n = e("./$").getDesc, r = e("./$.is-object"), o = e("./$.an-object"), a = function (e, t) { if ((o(e), !r(t) && null !== t)) throw TypeError(t + ": can't set as prototype!"); }; t.exports = { set: Object.setPrototypeOf || ("__proto__" in {} ? (function (t, i, r) { try { (r = e("./$.ctx")(Function.call, n(Object.prototype, "__proto__").set, 2)), r(t, []), (i = !(t instanceof Array)); } catch (o) { i = !0; } return function (e, t) { return a(e, t), i ? (e.__proto__ = t) : r(e, t), e; }; })({}, !1) : void 0), check: a, }; }, { "./$": 45, "./$.an-object": 3, "./$.ctx": 16, "./$.is-object": 37 }, ], 61: [ function (e, t, i) { var n = e("./$.global"), r = "__core-js_shared__", o = n[r] || (n[r] = {}); t.exports = function (e) { return o[e] || (o[e] = {}); }; }, { "./$.global": 28 }, ], 62: [ function (e, t, i) { t.exports = Math.sign || function (e) { return 0 == (e = +e) || e != e ? e : 0 > e ? -1 : 1; }; }, {}, ], 63: [ function (e, t, i) { "use strict"; var n = e("./$"), r = e("./$.wks")("species"); t.exports = function (t) { !e("./$.support-desc") || r in t || n.setDesc(t, r, { configurable: !0, get: function () { return this; }, }); }; }, { "./$": 45, "./$.support-desc": 70, "./$.wks": 80 }, ], 64: [ function (e, t, i) { t.exports = function (e, t, i) { if (!(e instanceof t)) throw TypeError(i + ": use the 'new' operator!"); return e; }; }, {}, ], 65: [ function (e, t, i) { var n = e("./$.to-integer"), r = e("./$.defined"); t.exports = function (e) { return function (t, i) { var o, a, s = String(r(t)), l = n(i), c = s.length; return 0 > l || l >= c ? e ? "" : void 0 : ((o = s.charCodeAt(l)), 55296 > o || o > 56319 || l + 1 === c || (a = s.charCodeAt(l + 1)) < 56320 || a > 57343 ? (e ? s.charAt(l) : o) : e ? s.slice(l, l + 2) : ((o - 55296) << 10) + (a - 56320) + 65536); }; }; }, { "./$.defined": 18, "./$.to-integer": 74 }, ], 66: [ function (e, t, i) { var n = e("./$.is-regexp"), r = e("./$.defined"); t.exports = function (e, t, i) { if (n(t)) throw TypeError("String#" + i + " doesn't accept regex!"); return String(r(e)); }; }, { "./$.defined": 18, "./$.is-regexp": 38 }, ], 67: [ function (e, t, i) { var n = e("./$.to-length"), r = e("./$.string-repeat"), o = e("./$.defined"); t.exports = function (e, t, i, a) { var s = String(o(e)), l = s.length, c = void 0 === i ? " " : String(i), u = n(t); if (l >= u) return s; "" == c && (c = " "); var h = u - l, d = r.call(c, Math.ceil(h / c.length)); return d.length > h && (d = d.slice(0, h)), a ? d + s : s + d; }; }, { "./$.defined": 18, "./$.string-repeat": 68, "./$.to-length": 76 }, ], 68: [ function (e, t, i) { "use strict"; var n = e("./$.to-integer"), r = e("./$.defined"); t.exports = function (e) { var t = String(r(this)), i = "", o = n(e); if (0 > o || o == 1 / 0) throw RangeError("Count can't be negative"); for (; o > 0; (o >>>= 1) && (t += t)) 1 & o && (i += t); return i; }; }, { "./$.defined": 18, "./$.to-integer": 74 }, ], 69: [ function (e, t, i) { var n = function (e, t) { return (e = String(o(e))), 1 & t && (e = e.replace(c, "")), 2 & t && (e = e.replace(u, "")), e; }, r = e("./$.def"), o = e("./$.defined"), a = " nfr ", s = "[" + a + "]", l = " ", c = RegExp("^" + s + s + "*"), u = RegExp(s + s + "*$"); t.exports = function (t, i) { var o = {}; (o[t] = i(n)), r( r.P + r.F * e("./$.fails")(function () { return !!a[t]() || l[t]() != l; }), "String", o ); }; }, { "./$.def": 17, "./$.defined": 18, "./$.fails": 23 }, ], 70: [ function (e, t, i) { t.exports = !e("./$.fails")(function () { return ( 7 != Object.defineProperty({}, "a", { get: function () { return 7; }, }).a ); }); }, { "./$.fails": 23 }, ], 71: [ function (e, t, i) { var n = e("./$.has"), r = e("./$.hide"), o = e("./$.wks")("toStringTag"); t.exports = function (e, t, i) { e && !n((e = i ? e : e.prototype), o) && r(e, o, t); }; }, { "./$.has": 29, "./$.hide": 30, "./$.wks": 80 }, ], 72: [ function (e, t, i) { "use strict"; var n, r, o, a = e("./$.ctx"), s = e("./$.invoke"), l = e("./$.html"), c = e("./$.dom-create"), u = e("./$.global"), h = u.process, d = u.setImmediate, f = u.clearImmediate, p = u.MessageChannel, m = 0, v = {}, g = "onreadystatechange", y = function () { var e = +this; if (v.hasOwnProperty(e)) { var t = v[e]; delete v[e], t(); } }, _ = function (e) { y.call(e.data); }; (d && f) || ((d = function (e) { for (var t = [], i = 1; arguments.length > i;) t.push(arguments[i++]); return ( (v[++m] = function () { s("function" == typeof e ? e : Function(e), t); }), n(m), m ); }), (f = function (e) { delete v[e]; }), "process" == e("./$.cof")(h) ? (n = function (e) { h.nextTick(a(y, e, 1)); }) : p ? ((r = new p()), (o = r.port2), (r.port1.onmessage = _), (n = a(o.postMessage, o, 1))) : u.addEventListener && "function" == typeof postMessage && !u.importScripts ? ((n = function (e) { u.postMessage(e + "", "*"); }), u.addEventListener("message", _, !1)) : (n = g in c("script") ? function (e) { l.appendChild(c("script"))[g] = function () { l.removeChild(this), y.call(e); }; } : function (e) { setTimeout(a(y, e, 1), 0); })), (t.exports = { set: d, clear: f }); }, { "./$.cof": 10, "./$.ctx": 16, "./$.dom-create": 19, "./$.global": 28, "./$.html": 31, "./$.invoke": 32 }, ], 73: [ function (e, t, i) { var n = e("./$.to-integer"), r = Math.max, o = Math.min; t.exports = function (e, t) { return (e = n(e)), 0 > e ? r(e + t, 0) : o(e, t); }; }, { "./$.to-integer": 74 }, ], 74: [ function (e, t, i) { var n = Math.ceil, r = Math.floor; t.exports = function (e) { return isNaN((e = +e)) ? 0 : (e > 0 ? r : n)(e); }; }, {}, ], 75: [ function (e, t, i) { var n = e("./$.iobject"), r = e("./$.defined"); t.exports = function (e) { return n(r(e)); }; }, { "./$.defined": 18, "./$.iobject": 33 }, ], 76: [ function (e, t, i) { var n = e("./$.to-integer"), r = Math.min; t.exports = function (e) { return e > 0 ? r(n(e), 9007199254740991) : 0; }; }, { "./$.to-integer": 74 }, ], 77: [ function (e, t, i) { var n = e("./$.defined"); t.exports = function (e) { return Object(n(e)); }; }, { "./$.defined": 18 }, ], 78: [ function (e, t, i) { var n = 0, r = Math.random(); t.exports = function (e) { return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++n + r).toString(36)); }; }, {}, ], 79: [ function (e, t, i) { var n = e("./$.wks")("unscopables"); void 0 == [][n] && e("./$.hide")(Array.prototype, n, {}), (t.exports = function (e) { [][n][e] = !0; }); }, { "./$.hide": 30, "./$.wks": 80 }, ], 80: [ function (e, t, i) { var n = e("./$.shared")("wks"), r = e("./$.global").Symbol; t.exports = function (t) { return n[t] || (n[t] = (r && r[t]) || (r || e("./$.uid"))("Symbol." + t)); }; }, { "./$.global": 28, "./$.shared": 61, "./$.uid": 78 }, ], 81: [ function (e, t, i) { var n = e("./$.classof"), r = e("./$.wks")("iterator"), o = e("./$.iterators"); t.exports = e("./$.core").getIteratorMethod = function (e) { return void 0 != e ? e[r] || e["@@iterator"] || o[n(e)] : void 0; }; }, { "./$.classof": 9, "./$.core": 15, "./$.iterators": 44, "./$.wks": 80 }, ], 82: [ function (e, t, i) { "use strict"; var n, r = e("./$"), o = e("./$.support-desc"), a = e("./$.property-desc"), s = e("./$.html"), l = e("./$.dom-create"), c = e("./$.has"), u = e("./$.cof"), h = e("./$.def"), d = e("./$.invoke"), f = e("./$.array-methods"), p = e("./$.uid")("__proto__"), m = e("./$.is-object"), v = e("./$.an-object"), g = e("./$.a-function"), y = e("./$.to-object"), _ = e("./$.to-iobject"), b = e("./$.to-integer"), x = e("./$.to-index"), w = e("./$.to-length"), M = e("./$.iobject"), T = e("./$.fails"), S = Object.prototype, E = [], A = E.slice, C = E.join, P = r.setDesc, L = r.getDesc, R = r.setDescs, O = e("./$.array-includes")(!1), k = {}; o || ((n = !T(function () { return ( 7 != P(l("div"), "a", { get: function () { return 7; }, }).a ); })), (r.setDesc = function (e, t, i) { if (n) try { return P(e, t, i); } catch (r) {} if ("get" in i || "set" in i) throw TypeError("Accessors not supported!"); return "value" in i && (v(e)[t] = i.value), e; }), (r.getDesc = function (e, t) { if (n) try { return L(e, t); } catch (i) {} return c(e, t) ? a(!S.propertyIsEnumerable.call(e, t), e[t]) : void 0; }), (r.setDescs = R = function (e, t) { v(e); for (var i, n = r.getKeys(t), o = n.length, a = 0; o > a;) r.setDesc(e, (i = n[a++]), t[i]); return e; })), h(h.S + h.F * !o, "Object", { getOwnPropertyDescriptor: r.getDesc, defineProperty: r.setDesc, defineProperties: R }); var D = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","), I = D.concat("length", "prototype"), N = D.length, U = function () { var e, t = l("iframe"), i = N, n = ">"; for (t.style.display = "none", s.appendChild(t), t.src = "javascript:", e = t.contentWindow.document, e.open(), e.write("<script>document.F=Object</script" + n), e.close(), U = e.F; i--;) delete U.prototype[D[i]]; return U(); }, j = function (e, t) { return function (i) { var n, r = _(i), o = 0, a = []; for (n in r) n != p && c(r, n) && a.push(n); for (; t > o;) c(r, (n = e[o++])) && (~O(a, n) || a.push(n)); return a; }; }, B = function () {}; h(h.S, "Object", { getPrototypeOf: (r.getProto = r.getProto || function (e) { return (e = y(e)), c(e, p) ? e[p] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? S : null; }), getOwnPropertyNames: (r.getNames = r.getNames || j(I, I.length, !0)), create: (r.create = r.create || function (e, t) { var i; return null !== e ? ((B.prototype = v(e)), (i = new B()), (B.prototype = null), (i[p] = e)) : (i = U()), void 0 === t ? i : R(i, t); }), keys: (r.getKeys = r.getKeys || j(D, N, !1)), }); var F = function (e, t, i) { if (!(t in k)) { for (var n = [], r = 0; t > r; r++) n[r] = "a[" + r + "]"; k[t] = Function("F,a", "return new F(" + n.join(",") + ")"); } return k[t](e, i); }; h(h.P, "Function", { bind: function (e) { var t = g(this), i = A.call(arguments, 1), n = function () { var r = i.concat(A.call(arguments)); return this instanceof n ? F(t, r.length, r) : d(t, r, e); }; return m(t.prototype) && (n.prototype = t.prototype), n; }, }); var V = T(function () { s && A.call(s); }); h(h.P + h.F * V, "Array", { slice: function (e, t) { var i = w(this.length), n = u(this); if (((t = void 0 === t ? i : t), "Array" == n)) return A.call(this, e, t); for (var r = x(e, i), o = x(t, i), a = w(o - r), s = Array(a), l = 0; a > l; l++) s[l] = "String" == n ? this.charAt(r + l) : this[r + l]; return s; }, }), h(h.P + h.F * (M != Object), "Array", { join: function () { return C.apply(M(this), arguments); }, }), h(h.S, "Array", { isArray: e("./$.is-array") }); var G = function (e) { return function (t, i) { g(t); var n = M(this), r = w(n.length), o = e ? r - 1 : 0, a = e ? -1 : 1; if (arguments.length < 2) for (;;) { if (o in n) { (i = n[o]), (o += a); break; } if (((o += a), e ? 0 > o : o >= r)) throw TypeError("Reduce of empty array with no initial value"); } for (; e ? o >= 0 : r > o; o += a) o in n && (i = t(i, n[o], o, this)); return i; }; }, z = function (e) { return function (t) { return e(this, t, arguments[1]); }; }; h(h.P, "Array", { forEach: (r.each = r.each || z(f(0))), map: z(f(1)), filter: z(f(2)), some: z(f(3)), every: z(f(4)), reduce: G(!1), reduceRight: G(!0), indexOf: z(O), lastIndexOf: function (e, t) { var i = _(this), n = w(i.length), r = n - 1; for (arguments.length > 1 && (r = Math.min(r, b(t))), 0 > r && (r = w(n + r)); r >= 0; r--) if (r in i && i[r] === e) return r; return -1; }, }), h(h.S, "Date", { now: function () { return +new Date(); }, }); var $ = function (e) { return e > 9 ? e : "0" + e; }, H = new Date(-5e13 - 1), W = !( H.toISOString && "0385-07-25T07:06:39.999Z" == H.toISOString() && T(function () { new Date(NaN).toISOString(); }) ); h(h.P + h.F * W, "Date", { toISOString: function () { if (!isFinite(this)) throw RangeError("Invalid time value"); var e = this, t = e.getUTCFullYear(), i = e.getUTCMilliseconds(), n = 0 > t ? "-" : t > 9999 ? "+" : ""; return ( n + ("00000" + Math.abs(t)).slice(n ? -6 : -4) + "-" + $(e.getUTCMonth() + 1) + "-" + $(e.getUTCDate()) + "T" + $(e.getUTCHours()) + ":" + $(e.getUTCMinutes()) + ":" + $(e.getUTCSeconds()) + "." + (i > 99 ? i : "0" + $(i)) + "Z" ); }, }); }, { "./$": 45, "./$.a-function": 2, "./$.an-object": 3, "./$.array-includes": 6, "./$.array-methods": 7, "./$.cof": 10, "./$.def": 17, "./$.dom-create": 19, "./$.fails": 23, "./$.has": 29, "./$.html": 31, "./$.invoke": 32, "./$.iobject": 33, "./$.is-array": 35, "./$.is-object": 37, "./$.property-desc": 56, "./$.support-desc": 70, "./$.to-index": 73, "./$.to-integer": 74, "./$.to-iobject": 75, "./$.to-length": 76, "./$.to-object": 77, "./$.uid": 78, }, ], 83: [ function (e, t, i) { "use strict"; var n = e("./$.def"); n(n.P, "Array", { copyWithin: e("./$.array-copy-within") }), e("./$.unscope")("copyWithin"); }, { "./$.array-copy-within": 4, "./$.def": 17, "./$.unscope": 79 }, ], 84: [ function (e, t, i) { var n = e("./$.def"); n(n.P, "Array", { fill: e("./$.array-fill") }), e("./$.unscope")("fill"); }, { "./$.array-fill": 5, "./$.def": 17, "./$.unscope": 79 }, ], 85: [ function (e, t, i) { "use strict"; var n = "findIndex", r = e("./$.def"), o = !0, a = e("./$.array-methods")(6); n in [] && Array(1)[n](function () { o = !1; }), r(r.P + r.F * o, "Array", { findIndex: function (e) { return a(this, e, arguments[1]); }, }), e("./$.unscope")(n); }, { "./$.array-methods": 7, "./$.def": 17, "./$.unscope": 79 }, ], 86: [ function (e, t, i) { "use strict"; var n = "find", r = e("./$.def"), o = !0, a = e("./$.array-methods")(5); n in [] && Array(1)[n](function () { o = !1; }), r(r.P + r.F * o, "Array", { find: function (e) { return a(this, e, arguments[1]); }, }), e("./$.unscope")(n); }, { "./$.array-methods": 7, "./$.def": 17, "./$.unscope": 79 }, ], 87: [ function (e, t, i) { "use strict"; var n = e("./$.ctx"), r = e("./$.def"), o = e("./$.to-object"), a = e("./$.iter-call"), s = e("./$.is-array-iter"), l = e("./$.to-length"), c = e("./core.get-iterator-method"); r( r.S + r.F * !e("./$.iter-detect")(function (e) { Array.from(e); }), "Array", { from: function (e) { var t, i, r, u, h = o(e), d = "function" == typeof this ? this : Array, f = arguments[1], p = void 0 !== f, m = 0, v = c(h); if ((p && (f = n(f, arguments[2], 2)), void 0 == v || (d == Array && s(v)))) for (t = l(h.length), i = new d(t); t > m; m++) i[m] = p ? f(h[m], m) : h[m]; else for (u = v.call(h), i = new d(); !(r = u.next()).done; m++) i[m] = p ? a(u, f, [r.value, m], !0) : r.value; return (i.length = m), i; }, } ); }, { "./$.ctx": 16, "./$.def": 17, "./$.is-array-iter": 34, "./$.iter-call": 39, "./$.iter-detect": 42, "./$.to-length": 76, "./$.to-object": 77, "./core.get-iterator-method": 81 }, ], 88: [ function (e, t, i) { "use strict"; var n = e("./$.unscope"), r = e("./$.iter-step"), o = e("./$.iterators"), a = e("./$.to-iobject"); e("./$.iter-define")( Array, "Array", function (e, t) { (this._t = a(e)), (this._i = 0), (this._k = t); }, function () { var e = this._t, t = this._k, i = this._i++; return !e || i >= e.length ? ((this._t = void 0), r(1)) : "keys" == t ? r(0, i) : "values" == t ? r(0, e[i]) : r(0, [i, e[i]]); }, "values" ), (o.Arguments = o.Array), n("keys"), n("values"), n("entries"); }, { "./$.iter-define": 41, "./$.iter-step": 43, "./$.iterators": 44, "./$.to-iobject": 75, "./$.unscope": 79 }, ], 89: [ function (e, t, i) { "use strict"; var n = e("./$.def"); n( n.S + n.F * e("./$.fails")(function () { function e() {} return !(Array.of.call(e) instanceof e); }), "Array", { of: function () { for (var e = 0, t = arguments.length, i = new("function" == typeof this ? this : Array)(t); t > e;) i[e] = arguments[e++]; return (i.length = t), i; }, } ); }, { "./$.def": 17, "./$.fails": 23 }, ], 90: [ function (e, t, i) { e("./$.species")(Array); }, { "./$.species": 63 }, ], 91: [ function (e, t, i) { "use strict"; var n = e("./$"), r = e("./$.is-object"), o = e("./$.wks")("hasInstance"), a = Function.prototype; o in a || n.setDesc(a, o, { value: function (e) { if ("function" != typeof this || !r(e)) return !1; if (!r(this.prototype)) return e instanceof this; for (; (e = n.getProto(e));) if (this.prototype === e) return !0; return !1; }, }); }, { "./$": 45, "./$.is-object": 37, "./$.wks": 80 }, ], 92: [ function (e, t, i) { var n = e("./$").setDesc, r = e("./$.property-desc"), o = e("./$.has"), a = Function.prototype, s = /^s*function ([^ (]*)/, l = "name"; l in a || (e("./$.support-desc") && n(a, l, { configurable: !0, get: function () { var e = ("" + this).match(s), t = e ? e[1] : ""; return o(this, l) || n(this, l, r(5, t)), t; }, })); }, { "./$": 45, "./$.has": 29, "./$.property-desc": 56, "./$.support-desc": 70 }, ], 93: [ function (e, t, i) { "use strict"; var n = e("./$.collection-strong"); e("./$.collection")( "Map", function (e) { return function () { return e(this, arguments[0]); }; }, { get: function (e) { var t = n.getEntry(this, e); return t && t.v; }, set: function (e, t) { return n.def(this, 0 === e ? 0 : e, t); }, }, n, !0 ); }, { "./$.collection": 14, "./$.collection-strong": 11 }, ], 94: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.log1p"), o = Math.sqrt, a = Math.acosh; n(n.S + n.F * !(a && 710 == Math.floor(a(Number.MAX_VALUE))), "Math", { acosh: function (e) { return (e = +e) < 1 ? NaN : e > 94906265.62425156 ? Math.log(e) + Math.LN2 : r(e - 1 + o(e - 1) * o(e + 1)); }, }); }, { "./$.def": 17, "./$.log1p": 48 }, ], 95: [ function (e, t, i) { function n(e) { return isFinite((e = +e)) && 0 != e ? (0 > e ? -n(-e) : Math.log(e + Math.sqrt(e * e + 1))) : e; } var r = e("./$.def"); r(r.S, "Math", { asinh: n }); }, { "./$.def": 17 }, ], 96: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { atanh: function (e) { return 0 == (e = +e) ? e : Math.log((1 + e) / (1 - e)) / 2; }, }); }, { "./$.def": 17 }, ], 97: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.sign"); n(n.S, "Math", { cbrt: function (e) { return r((e = +e)) * Math.pow(Math.abs(e), 1 / 3); }, }); }, { "./$.def": 17, "./$.sign": 62 }, ], 98: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { clz32: function (e) { return (e >>>= 0) ? 31 - Math.floor(Math.log(e + 0.5) * Math.LOG2E) : 32; }, }); }, { "./$.def": 17 }, ], 99: [ function (e, t, i) { var n = e("./$.def"), r = Math.exp; n(n.S, "Math", { cosh: function (e) { return (r((e = +e)) + r(-e)) / 2; }, }); }, { "./$.def": 17 }, ], 100: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { expm1: e("./$.expm1") }); }, { "./$.def": 17, "./$.expm1": 21 }, ], 101: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.sign"), o = Math.pow, a = o(2, -52), s = o(2, -23), l = o(2, 127) * (2 - s), c = o(2, -126), u = function (e) { return e + 1 / a - 1 / a; }; n(n.S, "Math", { fround: function (e) { var t, i, n = Math.abs(e), o = r(e); return c > n ? o * u(n / c / s) * c * s : ((t = (1 + s / a) * n), (i = t - (t - n)), i > l || i != i ? o * (1 / 0) : o * i); }, }); }, { "./$.def": 17, "./$.sign": 62 }, ], 102: [ function (e, t, i) { var n = e("./$.def"), r = Math.abs; n(n.S, "Math", { hypot: function (e, t) { for (var i, n, o = 0, a = 0, s = arguments.length, l = 0; s > a;)(i = r(arguments[a++])), i > l ? ((n = l / i), (o = o * n * n + 1), (l = i)) : i > 0 ? ((n = i / l), (o += n * n)) : (o += i); return l === 1 / 0 ? 1 / 0 : l * Math.sqrt(o); }, }); }, { "./$.def": 17 }, ], 103: [ function (e, t, i) { var n = e("./$.def"); n( n.S + n.F * e("./$.fails")(function () { return -5 != Math.imul(4294967295, 5); }), "Math", { imul: function (e, t) { var i = 65535, n = +e, r = +t, o = i & n, a = i & r; return 0 | (o * a + ((((i & (n >>> 16)) * a + o * (i & (r >>> 16))) << 16) >>> 0)); }, } ); }, { "./$.def": 17, "./$.fails": 23 }, ], 104: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { log10: function (e) { return Math.log(e) / Math.LN10; }, }); }, { "./$.def": 17 }, ], 105: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { log1p: e("./$.log1p") }); }, { "./$.def": 17, "./$.log1p": 48 }, ], 106: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { log2: function (e) { return Math.log(e) / Math.LN2; }, }); }, { "./$.def": 17 }, ], 107: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { sign: e("./$.sign") }); }, { "./$.def": 17, "./$.sign": 62 }, ], 108: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.expm1"), o = Math.exp; n( n.S + n.F * e("./$.fails")(function () { return -2e-17 != !Math.sinh(-2e-17); }), "Math", { sinh: function (e) { return Math.abs((e = +e)) < 1 ? (r(e) - r(-e)) / 2 : (o(e - 1) - o(-e - 1)) * (Math.E / 2); }, } ); }, { "./$.def": 17, "./$.expm1": 21, "./$.fails": 23 }, ], 109: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.expm1"), o = Math.exp; n(n.S, "Math", { tanh: function (e) { var t = r((e = +e)), i = r(-e); return t == 1 / 0 ? 1 : i == 1 / 0 ? -1 : (t - i) / (o(e) + o(-e)); }, }); }, { "./$.def": 17, "./$.expm1": 21 }, ], 110: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Math", { trunc: function (e) { return (e > 0 ? Math.floor : Math.ceil)(e); }, }); }, { "./$.def": 17 }, ], 111: [ function (e, t, i) { "use strict"; var n = e("./$"), r = e("./$.global"), o = e("./$.has"), a = e("./$.cof"), s = e("./$.is-object"), l = e("./$.fails"), c = "Number", u = r[c], h = u, d = u.prototype, f = a(n.create(d)) == c, p = function (e) { var t, i; if ("function" == typeof (t = e.valueOf) && !s((i = t.call(e)))) return i; if ("function" == typeof (t = e.toString) && !s((i = t.call(e)))) return i; throw TypeError("Can't convert object to number"); }, m = function (e) { if ((s(e) && (e = p(e)), "string" == typeof e && e.length > 2 && 48 == e.charCodeAt(0))) { var t = !1; switch (e.charCodeAt(1)) { case 66: case 98: t = !0; case 79: case 111: return parseInt(e.slice(2), t ? 2 : 8); } } return +e; }; (u("0o1") && u("0b1")) || ((u = function (e) { var t = this; return t instanceof u && (f ? l(function () { d.valueOf.call(t); }) : a(t) != c) ? new h(m(e)) : m(e); }), n.each.call( e("./$.support-desc") ? n.getNames(h) : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","), function (e) { o(h, e) && !o(u, e) && n.setDesc(u, e, n.getDesc(h, e)); } ), (u.prototype = d), (d.constructor = u), e("./$.redef")(r, c, u)); }, { "./$": 45, "./$.cof": 10, "./$.fails": 23, "./$.global": 28, "./$.has": 29, "./$.is-object": 37, "./$.redef": 57, "./$.support-desc": 70 }, ], 112: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { EPSILON: Math.pow(2, -52) }); }, { "./$.def": 17 }, ], 113: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.global").isFinite; n(n.S, "Number", { isFinite: function (e) { return "number" == typeof e && r(e); }, }); }, { "./$.def": 17, "./$.global": 28 }, ], 114: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { isInteger: e("./$.is-integer") }); }, { "./$.def": 17, "./$.is-integer": 36 }, ], 115: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { isNaN: function (e) { return e != e; }, }); }, { "./$.def": 17 }, ], 116: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.is-integer"), o = Math.abs; n(n.S, "Number", { isSafeInteger: function (e) { return r(e) && o(e) <= 9007199254740991; }, }); }, { "./$.def": 17, "./$.is-integer": 36 }, ], 117: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { MAX_SAFE_INTEGER: 9007199254740991 }); }, { "./$.def": 17 }, ], 118: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { MIN_SAFE_INTEGER: -9007199254740991 }); }, { "./$.def": 17 }, ], 119: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { parseFloat: parseFloat }); }, { "./$.def": 17 }, ], 120: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Number", { parseInt: parseInt }); }, { "./$.def": 17 }, ], 121: [ function (e, t, i) { var n = e("./$.def"); n(n.S + n.F, "Object", { assign: e("./$.assign") }); }, { "./$.assign": 8, "./$.def": 17 }, ], 122: [ function (e, t, i) { var n = e("./$.is-object"); e("./$.object-sap")("freeze", function (e) { return function (t) { return e && n(t) ? e(t) : t; }; }); }, { "./$.is-object": 37, "./$.object-sap": 51 }, ], 123: [ function (e, t, i) { var n = e("./$.to-iobject"); e("./$.object-sap")("getOwnPropertyDescriptor", function (e) { return function (t, i) { return e(n(t), i); }; }); }, { "./$.object-sap": 51, "./$.to-iobject": 75 }, ], 124: [ function (e, t, i) { e("./$.object-sap")("getOwnPropertyNames", function () { return e("./$.get-names").get; }); }, { "./$.get-names": 27, "./$.object-sap": 51 }, ], 125: [ function (e, t, i) { var n = e("./$.to-object"); e("./$.object-sap")("getPrototypeOf", function (e) { return function (t) { return e(n(t)); }; }); }, { "./$.object-sap": 51, "./$.to-object": 77 }, ], 126: [ function (e, t, i) { var n = e("./$.is-object"); e("./$.object-sap")("isExtensible", function (e) { return function (t) { return n(t) ? (e ? e(t) : !0) : !1; }; }); }, { "./$.is-object": 37, "./$.object-sap": 51 }, ], 127: [ function (e, t, i) { var n = e("./$.is-object"); e("./$.object-sap")("isFrozen", function (e) { return function (t) { return n(t) ? (e ? e(t) : !1) : !0; }; }); }, { "./$.is-object": 37, "./$.object-sap": 51 }, ], 128: [ function (e, t, i) { var n = e("./$.is-object"); e("./$.object-sap")("isSealed", function (e) { return function (t) { return n(t) ? (e ? e(t) : !1) : !0; }; }); }, { "./$.is-object": 37, "./$.object-sap": 51 }, ], 129: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Object", { is: e("./$.same") }); }, { "./$.def": 17, "./$.same": 59 }, ], 130: [ function (e, t, i) { var n = e("./$.to-object"); e("./$.object-sap")("keys", function (e) { return function (t) { return e(n(t)); }; }); }, { "./$.object-sap": 51, "./$.to-object": 77 }, ], 131: [ function (e, t, i) { var n = e("./$.is-object"); e("./$.object-sap")("preventExtensions", function (e) { return function (t) { return e && n(t) ? e(t) : t; }; }); }, { "./$.is-object": 37, "./$.object-sap": 51 }, ], 132: [ function (e, t, i) { var n = e("./$.is-object"); e("./$.object-sap")("seal", function (e) { return function (t) { return e && n(t) ? e(t) : t; }; }); }, { "./$.is-object": 37, "./$.object-sap": 51 }, ], 133: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Object", { setPrototypeOf: e("./$.set-proto").set }); }, { "./$.def": 17, "./$.set-proto": 60 }, ], 134: [ function (e, t, i) { "use strict"; var n = e("./$.classof"), r = {}; (r[e("./$.wks")("toStringTag")] = "z"), r + "" != "[object z]" && e("./$.redef")( Object.prototype, "toString", function () { return "[object " + n(this) + "]"; }, !0 ); }, { "./$.classof": 9, "./$.redef": 57, "./$.wks": 80 }, ], 135: [ function (e, t, i) { "use strict"; var n, r = e("./$"), o = e("./$.library"), a = e("./$.global"), s = e("./$.ctx"), l = e("./$.classof"), c = e("./$.def"), u = e("./$.is-object"), h = e("./$.an-object"), d = e("./$.a-function"), f = e("./$.strict-new"), p = e("./$.for-of"), m = e("./$.set-proto").set, v = e("./$.same"), g = e("./$.species"), y = e("./$.wks")("species"), _ = e("./$.uid")("record"), b = e("./$.microtask"), x = "Promise", w = a.process, M = "process" == l(w), T = a[x], S = function (e) { var t = new T(function () {}); return e && (t.constructor = Object), T.resolve(t) === t; }, E = (function () { function t(e) { var i = new T(e); return m(i, t.prototype), i; } var i = !1; try { if (((i = T && T.resolve && S()), m(t, T), (t.prototype = r.create(T.prototype, { constructor: { value: t } })), t.resolve(5).then(function () {}) instanceof t || (i = !1), i && e("./$.support-desc"))) { var n = !1; T.resolve( r.setDesc({}, "then", { get: function () { n = !0; }, }) ), (i = n); } } catch (o) { i = !1; } return i; })(), A = function (e) { return u(e) && (E ? "Promise" == l(e) : _ in e); }, C = function (e, t) { return o && e === T && t === n ? !0 : v(e, t); }, P = function (e) { var t = h(e)[y]; return void 0 != t ? t : e; }, L = function (e) { var t; return u(e) && "function" == typeof (t = e.then) ? t : !1; }, R = function (e, t) { if (!e.n) { e.n = !0; var i = e.c; b(function () { for ( var n = e.v, r = 1 == e.s, o = 0, s = function (t) { var i, o, a = r ? t.ok : t.fail; try { a ? (r || (e.h = !0), (i = a === !0 ? n : a(n)), i === t.P ? t.rej(TypeError("Promise-chain cycle")) : (o = L(i)) ? o.call(i, t.res, t.rej) : t.res(i)) : t.rej(n); } catch (s) { t.rej(s); } }; i.length > o; ) s(i[o++]); (i.length = 0), (e.n = !1), t && setTimeout(function () { var t, i, r = e.p; O(r) && (M ? w.emit("unhandledRejection", n, r) : (t = a.onunhandledrejection) ? t({ promise: r, reason: n }) : (i = a.console) && i.error && i.error("Unhandled promise rejection", n)), (e.a = void 0); }, 1); }); } }, O = function (e) { var t, i = e[_], n = i.a || i.c, r = 0; if (i.h) return !1; for (; n.length > r;) if (((t = n[r++]), t.fail || !O(t.P))) return !1; return !0; }, k = function (e) { var t = this; t.d || ((t.d = !0), (t = t.r || t), (t.v = e), (t.s = 2), (t.a = t.c.slice()), R(t, !0)); }, D = function (e) { var t, i = this; if (!i.d) { (i.d = !0), (i = i.r || i); try { (t = L(e)) ? b(function () { var n = { r: i, d: !1 }; try { t.call(e, s(D, n, 1), s(k, n, 1)); } catch (r) { k.call(n, r); } }): ((i.v = e), (i.s = 1), R(i, !1)); } catch (n) { k.call({ r: i, d: !1 }, n); } } }; E || ((T = function (e) { d(e); var t = { p: f(this, T, x), c: [], a: void 0, s: 0, d: !1, v: void 0, h: !1, n: !1 }; this[_] = t; try { e(s(D, t, 1), s(k, t, 1)); } catch (i) { k.call(t, i); } }), e("./$.mix")(T.prototype, { then: function (e, t) { var i = h(h(this).constructor)[y], n = { ok: "function" == typeof e ? e : !0, fail: "function" == typeof t ? t : !1 }, r = (n.P = new(void 0 != i ? i : T)(function (e, t) { (n.res = e), (n.rej = t); })); d(n.res), d(n.rej); var o = this[_]; return o.c.push(n), o.a && o.a.push(n), o.s && R(o, !1), r; }, catch: function (e) { return this.then(void 0, e); }, })), c(c.G + c.W + c.F * !E, { Promise: T }), e("./$.tag")(T, x), g(T), g((n = e("./$.core")[x])), c(c.S + c.F * !E, x, { reject: function (e) { return new this(function (t, i) { i(e); }); }, }), c(c.S + c.F * (!E || S(!0)), x, { resolve: function (e) { return A(e) && C(e.constructor, this) ? e : new this(function (t) { t(e); }); }, }), c( c.S + c.F * !( E && e("./$.iter-detect")(function (e) { T.all(e)["catch"](function () {}); }) ), x, { all: function (e) { var t = P(this), i = []; return new t(function (n, o) { p(e, !1, i.push, i); var a = i.length, s = Array(a); a ? r.each.call(i, function (e, i) { t.resolve(e).then(function (e) { (s[i] = e), --a || n(s); }, o); }) : n(s); }); }, race: function (e) { var t = P(this); return new t(function (i, n) { p(e, !1, function (e) { t.resolve(e).then(i, n); }); }); }, } ); }, { "./$": 45, "./$.a-function": 2, "./$.an-object": 3, "./$.classof": 9, "./$.core": 15, "./$.ctx": 16, "./$.def": 17, "./$.for-of": 26, "./$.global": 28, "./$.is-object": 37, "./$.iter-detect": 42, "./$.library": 47, "./$.microtask": 49, "./$.mix": 50, "./$.same": 59, "./$.set-proto": 60, "./$.species": 63, "./$.strict-new": 64, "./$.support-desc": 70, "./$.tag": 71, "./$.uid": 78, "./$.wks": 80, }, ], 136: [ function (e, t, i) { var n = e("./$.def"), r = Function.apply; n(n.S, "Reflect", { apply: function (e, t, i) { return r.call(e, t, i); }, }); }, { "./$.def": 17 }, ], 137: [ function (e, t, i) { var n = e("./$"), r = e("./$.def"), o = e("./$.a-function"), a = e("./$.an-object"), s = e("./$.is-object"), l = Function.bind || e("./$.core").Function.prototype.bind; r( r.S + r.F * e("./$.fails")(function () { function e() {} return !(Reflect.construct(function () {}, [], e) instanceof e); }), "Reflect", { construct: function (e, t) { o(e); var i = arguments.length < 3 ? e : o(arguments[2]); if (e == i) { if (void 0 != t) switch (a(t).length) { case 0: return new e(); case 1: return new e(t[0]); case 2: return new e(t[0], t[1]); case 3: return new e(t[0], t[1], t[2]); case 4: return new e(t[0], t[1], t[2], t[3]); } var r = [null]; return r.push.apply(r, t), new(l.apply(e, r))(); } var c = i.prototype, u = n.create(s(c) ? c : Object.prototype), h = Function.apply.call(e, u, t); return s(h) ? h : u; }, } ); }, { "./$": 45, "./$.a-function": 2, "./$.an-object": 3, "./$.core": 15, "./$.def": 17, "./$.fails": 23, "./$.is-object": 37 }, ], 138: [ function (e, t, i) { var n = e("./$"), r = e("./$.def"), o = e("./$.an-object"); r( r.S + r.F * e("./$.fails")(function () { Reflect.defineProperty(n.setDesc({}, 1, { value: 1 }), 1, { value: 2 }); }), "Reflect", { defineProperty: function (e, t, i) { o(e); try { return n.setDesc(e, t, i), !0; } catch (r) { return !1; } }, } ); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17, "./$.fails": 23 }, ], 139: [ function (e, t, i) { var n = e("./$.def"), r = e("./$").getDesc, o = e("./$.an-object"); n(n.S, "Reflect", { deleteProperty: function (e, t) { var i = r(o(e), t); return i && !i.configurable ? !1 : delete e[t]; }, }); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17 }, ], 140: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.an-object"), o = function (e) { (this._t = r(e)), (this._i = 0); var t, i = (this._k = []); for (t in e) i.push(t); }; e("./$.iter-create")(o, "Object", function () { var e, t = this, i = t._k; do if (t._i >= i.length) return { value: void 0, done: !0 }; while (!((e = i[t._i++]) in t._t)); return { value: e, done: !1 }; }), n(n.S, "Reflect", { enumerate: function (e) { return new o(e); }, }); }, { "./$.an-object": 3, "./$.def": 17, "./$.iter-create": 40 }, ], 141: [ function (e, t, i) { var n = e("./$"), r = e("./$.def"), o = e("./$.an-object"); r(r.S, "Reflect", { getOwnPropertyDescriptor: function (e, t) { return n.getDesc(o(e), t); }, }); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17 }, ], 142: [ function (e, t, i) { var n = e("./$.def"), r = e("./$").getProto, o = e("./$.an-object"); n(n.S, "Reflect", { getPrototypeOf: function (e) { return r(o(e)); }, }); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17 }, ], 143: [ function (e, t, i) { function n(e, t) { var i, a, c = arguments.length < 3 ? e : arguments[2]; return l(e) === c ? e[t] : (i = r.getDesc(e, t)) ? (o(i, "value") ? i.value : void 0 !== i.get ? i.get.call(c) : void 0) : s((a = r.getProto(e))) ? n(a, t, c) : void 0; } var r = e("./$"), o = e("./$.has"), a = e("./$.def"), s = e("./$.is-object"), l = e("./$.an-object"); a(a.S, "Reflect", { get: n }); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17, "./$.has": 29, "./$.is-object": 37 }, ], 144: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Reflect", { has: function (e, t) { return t in e; }, }); }, { "./$.def": 17 }, ], 145: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.an-object"), o = Object.isExtensible; n(n.S, "Reflect", { isExtensible: function (e) { return r(e), o ? o(e) : !0; }, }); }, { "./$.an-object": 3, "./$.def": 17 }, ], 146: [ function (e, t, i) { var n = e("./$.def"); n(n.S, "Reflect", { ownKeys: e("./$.own-keys") }); }, { "./$.def": 17, "./$.own-keys": 53 }, ], 147: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.an-object"), o = Object.preventExtensions; n(n.S, "Reflect", { preventExtensions: function (e) { r(e); try { return o && o(e), !0; } catch (t) { return !1; } }, }); }, { "./$.an-object": 3, "./$.def": 17 }, ], 148: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.set-proto"); r && n(n.S, "Reflect", { setPrototypeOf: function (e, t) { r.check(e, t); try { return r.set(e, t), !0; } catch (i) { return !1; } }, }); }, { "./$.def": 17, "./$.set-proto": 60 }, ], 149: [ function (e, t, i) { function n(e, t, i) { var a, u, h = arguments.length < 4 ? e : arguments[3], d = r.getDesc(l(e), t); if (!d) { if (c((u = r.getProto(e)))) return n(u, t, i, h); d = s(0); } return o(d, "value") ? (d.writable !== !1 && c(h) ? ((a = r.getDesc(h, t) || s(0)), (a.value = i), r.setDesc(h, t, a), !0) : !1) : void 0 === d.set ? !1 : (d.set.call(h, i), !0); } var r = e("./$"), o = e("./$.has"), a = e("./$.def"), s = e("./$.property-desc"), l = e("./$.an-object"), c = e("./$.is-object"); a(a.S, "Reflect", { set: n }); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17, "./$.has": 29, "./$.is-object": 37, "./$.property-desc": 56 }, ], 150: [ function (e, t, i) { var n = e("./$"), r = e("./$.global"), o = e("./$.is-regexp"), a = e("./$.flags"), s = r.RegExp, l = s, c = s.prototype, u = /a/g, h = /a/g, d = new s(u) !== u; !e("./$.support-desc") || (d && !e("./$.fails")(function () { return (h[e("./$.wks")("match")] = !1), s(u) != u || s(h) == h || "/a/i" != s(u, "i"); })) || ((s = function (e, t) { var i = o(e), n = void 0 === t; return this instanceof s || !i || e.constructor !== s || !n ? (d ? new l(i && !n ? e.source : e, t) : l((i = e instanceof s) ? e.source : e, i && n ? a.call(e) : t)) : e; }), n.each.call(n.getNames(l), function (e) { e in s || n.setDesc(s, e, { configurable: !0, get: function () { return l[e]; }, set: function (t) { l[e] = t; }, }); }), (c.constructor = s), (s.prototype = c), e("./$.redef")(r, "RegExp", s)), e("./$.species")(s); }, { "./$": 45, "./$.fails": 23, "./$.flags": 25, "./$.global": 28, "./$.is-regexp": 38, "./$.redef": 57, "./$.species": 63, "./$.support-desc": 70, "./$.wks": 80 }, ], 151: [ function (e, t, i) { var n = e("./$"); e("./$.support-desc") && "g" != /./g.flags && n.setDesc(RegExp.prototype, "flags", { configurable: !0, get: e("./$.flags") }); }, { "./$": 45, "./$.flags": 25, "./$.support-desc": 70 }, ], 152: [ function (e, t, i) { e("./$.fix-re-wks")("match", 1, function (e, t) { return function (i) { "use strict"; var n = e(this), r = void 0 == i ? void 0 : i[t]; return void 0 !== r ? r.call(i, n) : new RegExp(i)[t](String(n)); }; }); }, { "./$.fix-re-wks": 24 }, ], 153: [ function (e, t, i) { e("./$.fix-re-wks")("replace", 2, function (e, t, i) { return function (n, r) { "use strict"; var o = e(this), a = void 0 == n ? void 0 : n[t]; return void 0 !== a ? a.call(n, o, r) : i.call(String(o), n, r); }; }); }, { "./$.fix-re-wks": 24 }, ], 154: [ function (e, t, i) { e("./$.fix-re-wks")("search", 1, function (e, t) { return function (i) { "use strict"; var n = e(this), r = void 0 == i ? void 0 : i[t]; return void 0 !== r ? r.call(i, n) : new RegExp(i)[t](String(n)); }; }); }, { "./$.fix-re-wks": 24 }, ], 155: [ function (e, t, i) { e("./$.fix-re-wks")("split", 2, function (e, t, i) { return function (n, r) { "use strict"; var o = e(this), a = void 0 == n ? void 0 : n[t]; return void 0 !== a ? a.call(n, o, r) : i.call(String(o), n, r); }; }); }, { "./$.fix-re-wks": 24 }, ], 156: [ function (e, t, i) { "use strict"; var n = e("./$.collection-strong"); e("./$.collection")( "Set", function (e) { return function () { return e(this, arguments[0]); }; }, { add: function (e) { return n.def(this, (e = 0 === e ? 0 : e), e); }, }, n ); }, { "./$.collection": 14, "./$.collection-strong": 11 }, ], 157: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.string-at")(!1); n(n.P, "String", { codePointAt: function (e) { return r(this, e); }, }); }, { "./$.def": 17, "./$.string-at": 65 }, ], 158: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.to-length"), o = e("./$.string-context"), a = "endsWith", s = "" [a]; n(n.P + n.F * e("./$.fails-is-regexp")(a), "String", { endsWith: function (e) { var t = o(this, e, a), i = arguments[1], n = r(t.length), l = void 0 === i ? n : Math.min(r(i), n), c = String(e); return s ? s.call(t, c, l) : t.slice(l - c.length, l) === c; }, }); }, { "./$.def": 17, "./$.fails-is-regexp": 22, "./$.string-context": 66, "./$.to-length": 76 }, ], 159: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.to-index"), o = String.fromCharCode, a = String.fromCodePoint; n(n.S + n.F * (!!a && 1 != a.length), "String", { fromCodePoint: function (e) { for (var t, i = [], n = arguments.length, a = 0; n > a;) { if (((t = +arguments[a++]), r(t, 1114111) !== t)) throw RangeError(t + " is not a valid code point"); i.push(65536 > t ? o(t) : o(((t -= 65536) >> 10) + 55296, (t % 1024) + 56320)); } return i.join(""); }, }); }, { "./$.def": 17, "./$.to-index": 73 }, ], 160: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.string-context"), o = "includes"; n(n.P + n.F * e("./$.fails-is-regexp")(o), "String", { includes: function (e) { return !!~r(this, e, o).indexOf(e, arguments[1]); }, }); }, { "./$.def": 17, "./$.fails-is-regexp": 22, "./$.string-context": 66 }, ], 161: [ function (e, t, i) { "use strict"; var n = e("./$.string-at")(!0); e("./$.iter-define")( String, "String", function (e) { (this._t = String(e)), (this._i = 0); }, function () { var e, t = this._t, i = this._i; return i >= t.length ? { value: void 0, done: !0 } : ((e = n(t, i)), (this._i += e.length), { value: e, done: !1 }); } ); }, { "./$.iter-define": 41, "./$.string-at": 65 }, ], 162: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.to-iobject"), o = e("./$.to-length"); n(n.S, "String", { raw: function (e) { for (var t = r(e.raw), i = o(t.length), n = arguments.length, a = [], s = 0; i > s;) a.push(String(t[s++])), n > s && a.push(String(arguments[s])); return a.join(""); }, }); }, { "./$.def": 17, "./$.to-iobject": 75, "./$.to-length": 76 }, ], 163: [ function (e, t, i) { var n = e("./$.def"); n(n.P, "String", { repeat: e("./$.string-repeat") }); }, { "./$.def": 17, "./$.string-repeat": 68 }, ], 164: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.to-length"), o = e("./$.string-context"), a = "startsWith", s = "" [a]; n(n.P + n.F * e("./$.fails-is-regexp")(a), "String", { startsWith: function (e) { var t = o(this, e, a), i = r(Math.min(arguments[1], t.length)), n = String(e); return s ? s.call(t, n, i) : t.slice(i, i + n.length) === n; }, }); }, { "./$.def": 17, "./$.fails-is-regexp": 22, "./$.string-context": 66, "./$.to-length": 76 }, ], 165: [ function (e, t, i) { "use strict"; e("./$.string-trim")("trim", function (e) { return function () { return e(this, 3); }; }); }, { "./$.string-trim": 69 }, ], 166: [ function (e, t, i) { "use strict"; var n = e("./$"), r = e("./$.global"), o = e("./$.has"), a = e("./$.support-desc"), s = e("./$.def"), l = e("./$.redef"), c = e("./$.fails"), u = e("./$.shared"), h = e("./$.tag"), d = e("./$.uid"), f = e("./$.wks"), p = e("./$.keyof"), m = e("./$.get-names"), v = e("./$.enum-keys"), g = e("./$.is-array"), y = (e("./$.is-object"), e("./$.an-object")), _ = e("./$.to-iobject"), b = e("./$.property-desc"), x = n.getDesc, w = n.setDesc, M = n.create, T = m.get, S = r.Symbol, E = r.JSON, A = E && E.stringify, C = !1, P = f("_hidden"), L = n.isEnum, R = u("symbol-registry"), O = u("symbols"), k = "function" == typeof S, D = Object.prototype, I = a && c(function () { return ( 7 != M( w({}, "a", { get: function () { return w(this, "a", { value: 7 }).a; }, }) ).a ); }) ? function (e, t, i) { var n = x(D, t); n && delete D[t], w(e, t, i), n && e !== D && w(D, t, n); } : w, N = function (e) { var t = (O[e] = M(S.prototype)); return ( (t._k = e), a && C && I(D, e, { configurable: !0, set: function (t) { o(this, P) && o(this[P], e) && (this[P][e] = !1), I(this, e, b(1, t)); }, }), t ); }, U = function (e) { return "symbol" == typeof e; }, j = function (e, t, i) { return i && o(O, t) ? (i.enumerable ? (o(e, P) && e[P][t] && (e[P][t] = !1), (i = M(i, { enumerable: b(0, !1) }))) : (o(e, P) || w(e, P, b(1, {})), (e[P][t] = !0)), I(e, t, i)) : w(e, t, i); }, B = function (e, t) { y(e); for (var i, n = v((t = _(t))), r = 0, o = n.length; o > r;) j(e, (i = n[r++]), t[i]); return e; }, F = function (e, t) { return void 0 === t ? M(e) : B(M(e), t); }, V = function (e) { var t = L.call(this, e); return t || !o(this, e) || !o(O, e) || (o(this, P) && this[P][e]) ? t : !0; }, G = function (e, t) { var i = x((e = _(e)), t); return !i || !o(O, t) || (o(e, P) && e[P][t]) || (i.enumerable = !0), i; }, z = function (e) { for (var t, i = T(_(e)), n = [], r = 0; i.length > r;) o(O, (t = i[r++])) || t == P || n.push(t); return n; }, $ = function (e) { for (var t, i = T(_(e)), n = [], r = 0; i.length > r;) o(O, (t = i[r++])) && n.push(O[t]); return n; }, H = function (e) { for (var t, i, n = [e], r = 1; arguments.length > r;) n.push(arguments[r++]); return ( (t = n[1]), "function" == typeof t && (i = t), (i || !g(t)) && (t = function (e, t) { return i && (t = i.call(this, e, t)), U(t) ? void 0 : t; }), (n[1] = t), A.apply(E, n) ); }, W = c(function () { var e = S(); return "[null]" != A([e]) || "{}" != A({ a: e }) || "{}" != A(Object(e)); }); k || ((S = function () { if (U(this)) throw TypeError("Symbol is not a constructor"); return N(d(arguments[0])); }), l(S.prototype, "toString", function () { return this._k; }), (U = function (e) { return e instanceof S; }), (n.create = F), (n.isEnum = V), (n.getDesc = G), (n.setDesc = j), (n.setDescs = B), (n.getNames = m.get = z), (n.getSymbols = $), a && !e("./$.library") && l(D, "propertyIsEnumerable", V, !0)); var X = { for: function (e) { return o(R, (e += "")) ? R[e] : (R[e] = S(e)); }, keyFor: function (e) { return p(R, e); }, useSetter: function () { C = !0; }, useSimple: function () { C = !1; }, }; n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), function (e) { var t = f(e); X[e] = k ? t : N(t); }), (C = !0), s(s.G + s.W, { Symbol: S }), s(s.S, "Symbol", X), s(s.S + s.F * !k, "Object", { create: F, defineProperty: j, defineProperties: B, getOwnPropertyDescriptor: G, getOwnPropertyNames: z, getOwnPropertySymbols: $ }), E && s(s.S + s.F * (!k || W), "JSON", { stringify: H }), h(S, "Symbol"), h(Math, "Math", !0), h(r.JSON, "JSON", !0); }, { "./$": 45, "./$.an-object": 3, "./$.def": 17, "./$.enum-keys": 20, "./$.fails": 23, "./$.get-names": 27, "./$.global": 28, "./$.has": 29, "./$.is-array": 35, "./$.is-object": 37, "./$.keyof": 46, "./$.library": 47, "./$.property-desc": 56, "./$.redef": 57, "./$.shared": 61, "./$.support-desc": 70, "./$.tag": 71, "./$.to-iobject": 75, "./$.uid": 78, "./$.wks": 80, }, ], 167: [ function (e, t, i) { "use strict"; var n = e("./$"), r = e("./$.collection-weak"), o = e("./$.is-object"), a = e("./$.has"), s = r.frozenStore, l = r.WEAK, c = Object.isExtensible || o, u = {}, h = e("./$.collection")( "WeakMap", function (e) { return function () { return e(this, arguments[0]); }; }, { get: function (e) { if (o(e)) { if (!c(e)) return s(this).get(e); if (a(e, l)) return e[l][this._i]; } }, set: function (e, t) { return r.def(this, e, t); }, }, r, !0, !0 ); 7 != new h().set((Object.freeze || Object)(u), 7).get(u) && n.each.call(["delete", "has", "get", "set"], function (t) { var i = h.prototype, n = i[t]; e("./$.redef")(i, t, function (e, i) { if (o(e) && !c(e)) { var r = s(this)[t](e, i); return "set" == t ? this : r; } return n.call(this, e, i); }); }); }, { "./$": 45, "./$.collection": 14, "./$.collection-weak": 13, "./$.has": 29, "./$.is-object": 37, "./$.redef": 57 }, ], 168: [ function (e, t, i) { "use strict"; var n = e("./$.collection-weak"); e("./$.collection")( "WeakSet", function (e) { return function () { return e(this, arguments[0]); }; }, { add: function (e) { return n.def(this, e, !0); }, }, n, !1, !0 ); }, { "./$.collection": 14, "./$.collection-weak": 13 }, ], 169: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.array-includes")(!0); n(n.P, "Array", { includes: function (e) { return r(this, e, arguments[1]); }, }), e("./$.unscope")("includes"); }, { "./$.array-includes": 6, "./$.def": 17, "./$.unscope": 79 }, ], 170: [ function (e, t, i) { var n = e("./$.def"); n(n.P, "Map", { toJSON: e("./$.collection-to-json")("Map") }); }, { "./$.collection-to-json": 12, "./$.def": 17 }, ], 171: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.object-to-array")(!0); n(n.S, "Object", { entries: function (e) { return r(e); }, }); }, { "./$.def": 17, "./$.object-to-array": 52 }, ], 172: [ function (e, t, i) { var n = e("./$"), r = e("./$.def"), o = e("./$.own-keys"), a = e("./$.to-iobject"), s = e("./$.property-desc"); r(r.S, "Object", { getOwnPropertyDescriptors: function (e) { for (var t, i, r = a(e), l = n.setDesc, c = n.getDesc, u = o(r), h = {}, d = 0; u.length > d;)(i = c(r, (t = u[d++]))), t in h ? l(h, t, s(0, i)) : (h[t] = i); return h; }, }); }, { "./$": 45, "./$.def": 17, "./$.own-keys": 53, "./$.property-desc": 56, "./$.to-iobject": 75 }, ], 173: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.object-to-array")(!1); n(n.S, "Object", { values: function (e) { return r(e); }, }); }, { "./$.def": 17, "./$.object-to-array": 52 }, ], 174: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.replacer")(/[\^$*+?.()|[]{}]/g, "\$&"); n(n.S, "RegExp", { escape: function (e) { return r(e); }, }); }, { "./$.def": 17, "./$.replacer": 58 }, ], 175: [ function (e, t, i) { var n = e("./$.def"); n(n.P, "Set", { toJSON: e("./$.collection-to-json")("Set") }); }, { "./$.collection-to-json": 12, "./$.def": 17 }, ], 176: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.string-at")(!0); n(n.P, "String", { at: function (e) { return r(this, e); }, }); }, { "./$.def": 17, "./$.string-at": 65 }, ], 177: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.string-pad"); n(n.P, "String", { padLeft: function (e) { return r(this, e, arguments[1], !0); }, }); }, { "./$.def": 17, "./$.string-pad": 67 }, ], 178: [ function (e, t, i) { "use strict"; var n = e("./$.def"), r = e("./$.string-pad"); n(n.P, "String", { padRight: function (e) { return r(this, e, arguments[1], !1); }, }); }, { "./$.def": 17, "./$.string-pad": 67 }, ], 179: [ function (e, t, i) { "use strict"; e("./$.string-trim")("trimLeft", function (e) { return function () { return e(this, 1); }; }); }, { "./$.string-trim": 69 }, ], 180: [ function (e, t, i) { "use strict"; e("./$.string-trim")("trimRight", function (e) { return function () { return e(this, 2); }; }); }, { "./$.string-trim": 69 }, ], 181: [ function (e, t, i) { var n = e("./$"), r = e("./$.def"), o = e("./$.core").Array || Array, a = {}, s = function (t, i) { n.each.call(t.split(","), function (t) { void 0 == i && t in o ? (a[t] = o[t]) : t in [] && (a[t] = e("./$.ctx")(Function.call, [][t], i)); }); }; s("pop,reverse,shift,keys,values,entries", 1), s("indexOf,every,some,forEach,map,filter,find,findIndex,includes", 3), s("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"), r(r.S, "Array", a); }, { "./$": 45, "./$.core": 15, "./$.ctx": 16, "./$.def": 17 }, ], 182: [ function (e, t, i) { e("./es6.array.iterator"); var n = e("./$.global"), r = e("./$.hide"), o = e("./$.iterators"), a = e("./$.wks")("iterator"), s = n.NodeList, l = n.HTMLCollection, c = s && s.prototype, u = l && l.prototype, h = (o.NodeList = o.HTMLCollection = o.Array); !s || a in c || r(c, a, h), !l || a in u || r(u, a, h); }, { "./$.global": 28, "./$.hide": 30, "./$.iterators": 44, "./$.wks": 80, "./es6.array.iterator": 88 }, ], 183: [ function (e, t, i) { var n = e("./$.def"), r = e("./$.task"); n(n.G + n.B, { setImmediate: r.set, clearImmediate: r.clear }); }, { "./$.def": 17, "./$.task": 72 }, ], 184: [ function (e, t, i) { var n = e("./$.global"), r = e("./$.def"), o = e("./$.invoke"), a = e("./$.partial"), s = n.navigator, l = !!s && /MSIE ../.test(s.userAgent), c = function (e) { return l ? function (t, i) { return e(o(a, [].slice.call(arguments, 2), "function" == typeof t ? t : Function(t)), i); } : e; }; r(r.G + r.B + r.F * l, { setTimeout: c(n.setTimeout), setInterval: c(n.setInterval) }); }, { "./$.def": 17, "./$.global": 28, "./$.invoke": 32, "./$.partial": 54 }, ], 185: [ function (e, t, i) { e("./modules/es5"), e("./modules/es6.symbol"), e("./modules/es6.object.assign"), e("./modules/es6.object.is"), e("./modules/es6.object.set-prototype-of"), e("./modules/es6.object.to-string"), e("./modules/es6.object.freeze"), e("./modules/es6.object.seal"), e("./modules/es6.object.prevent-extensions"), e("./modules/es6.object.is-frozen"), e("./modules/es6.object.is-sealed"), e("./modules/es6.object.is-extensible"), e("./modules/es6.object.get-own-property-descriptor"), e("./modules/es6.object.get-prototype-of"), e("./modules/es6.object.keys"), e("./modules/es6.object.get-own-property-names"), e("./modules/es6.function.name"), e("./modules/es6.function.has-instance"), e("./modules/es6.number.constructor"), e("./modules/es6.number.epsilon"), e("./modules/es6.number.is-finite"), e("./modules/es6.number.is-integer"), e("./modules/es6.number.is-nan"), e("./modules/es6.number.is-safe-integer"), e("./modules/es6.number.max-safe-integer"), e("./modules/es6.number.min-safe-integer"), e("./modules/es6.number.parse-float"), e("./modules/es6.number.parse-int"), e("./modules/es6.math.acosh"), e("./modules/es6.math.asinh"), e("./modules/es6.math.atanh"), e("./modules/es6.math.cbrt"), e("./modules/es6.math.clz32"), e("./modules/es6.math.cosh"), e("./modules/es6.math.expm1"), e("./modules/es6.math.fround"), e("./modules/es6.math.hypot"), e("./modules/es6.math.imul"), e("./modules/es6.math.log10"), e("./modules/es6.math.log1p"), e("./modules/es6.math.log2"), e("./modules/es6.math.sign"), e("./modules/es6.math.sinh"), e("./modules/es6.math.tanh"), e("./modules/es6.math.trunc"), e("./modules/es6.string.from-code-point"), e("./modules/es6.string.raw"), e("./modules/es6.string.trim"), e("./modules/es6.string.iterator"), e("./modules/es6.string.code-point-at"), e("./modules/es6.string.ends-with"), e("./modules/es6.string.includes"), e("./modules/es6.string.repeat"), e("./modules/es6.string.starts-with"), e("./modules/es6.array.from"), e("./modules/es6.array.of"), e("./modules/es6.array.iterator"), e("./modules/es6.array.species"), e("./modules/es6.array.copy-within"), e("./modules/es6.array.fill"), e("./modules/es6.array.find"), e("./modules/es6.array.find-index"), e("./modules/es6.regexp.constructor"), e("./modules/es6.regexp.flags"), e("./modules/es6.regexp.match"), e("./modules/es6.regexp.replace"), e("./modules/es6.regexp.search"), e("./modules/es6.regexp.split"), e("./modules/es6.promise"), e("./modules/es6.map"), e("./modules/es6.set"), e("./modules/es6.weak-map"), e("./modules/es6.weak-set"), e("./modules/es6.reflect.apply"), e("./modules/es6.reflect.construct"), e("./modules/es6.reflect.define-property"), e("./modules/es6.reflect.delete-property"), e("./modules/es6.reflect.enumerate"), e("./modules/es6.reflect.get"), e("./modules/es6.reflect.get-own-property-descriptor"), e("./modules/es6.reflect.get-prototype-of"), e("./modules/es6.reflect.has"), e("./modules/es6.reflect.is-extensible"), e("./modules/es6.reflect.own-keys"), e("./modules/es6.reflect.prevent-extensions"), e("./modules/es6.reflect.set"), e("./modules/es6.reflect.set-prototype-of"), e("./modules/es7.array.includes"), e("./modules/es7.string.at"), e("./modules/es7.string.pad-left"), e("./modules/es7.string.pad-right"), e("./modules/es7.string.trim-left"), e("./modules/es7.string.trim-right"), e("./modules/es7.regexp.escape"), e("./modules/es7.object.get-own-property-descriptors"), e("./modules/es7.object.values"), e("./modules/es7.object.entries"), e("./modules/es7.map.to-json"), e("./modules/es7.set.to-json"), e("./modules/js.array.statics"), e("./modules/web.timers"), e("./modules/web.immediate"), e("./modules/web.dom.iterable"), (t.exports = e("./modules/$.core")); }, { "./modules/$.core": 15, "./modules/es5": 82, "./modules/es6.array.copy-within": 83, "./modules/es6.array.fill": 84, "./modules/es6.array.find": 86, "./modules/es6.array.find-index": 85, "./modules/es6.array.from": 87, "./modules/es6.array.iterator": 88, "./modules/es6.array.of": 89, "./modules/es6.array.species": 90, "./modules/es6.function.has-instance": 91, "./modules/es6.function.name": 92, "./modules/es6.map": 93, "./modules/es6.math.acosh": 94, "./modules/es6.math.asinh": 95, "./modules/es6.math.atanh": 96, "./modules/es6.math.cbrt": 97, "./modules/es6.math.clz32": 98, "./modules/es6.math.cosh": 99, "./modules/es6.math.expm1": 100, "./modules/es6.math.fround": 101, "./modules/es6.math.hypot": 102, "./modules/es6.math.imul": 103, "./modules/es6.math.log10": 104, "./modules/es6.math.log1p": 105, "./modules/es6.math.log2": 106, "./modules/es6.math.sign": 107, "./modules/es6.math.sinh": 108, "./modules/es6.math.tanh": 109, "./modules/es6.math.trunc": 110, "./modules/es6.number.constructor": 111, "./modules/es6.number.epsilon": 112, "./modules/es6.number.is-finite": 113, "./modules/es6.number.is-integer": 114, "./modules/es6.number.is-nan": 115, "./modules/es6.number.is-safe-integer": 116, "./modules/es6.number.max-safe-integer": 117, "./modules/es6.number.min-safe-integer": 118, "./modules/es6.number.parse-float": 119, "./modules/es6.number.parse-int": 120, "./modules/es6.object.assign": 121, "./modules/es6.object.freeze": 122, "./modules/es6.object.get-own-property-descriptor": 123, "./modules/es6.object.get-own-property-names": 124, "./modules/es6.object.get-prototype-of": 125, "./modules/es6.object.is": 129, "./modules/es6.object.is-extensible": 126, "./modules/es6.object.is-frozen": 127, "./modules/es6.object.is-sealed": 128, "./modules/es6.object.keys": 130, "./modules/es6.object.prevent-extensions": 131, "./modules/es6.object.seal": 132, "./modules/es6.object.set-prototype-of": 133, "./modules/es6.object.to-string": 134, "./modules/es6.promise": 135, "./modules/es6.reflect.apply": 136, "./modules/es6.reflect.construct": 137, "./modules/es6.reflect.define-property": 138, "./modules/es6.reflect.delete-property": 139, "./modules/es6.reflect.enumerate": 140, "./modules/es6.reflect.get": 143, "./modules/es6.reflect.get-own-property-descriptor": 141, "./modules/es6.reflect.get-prototype-of": 142, "./modules/es6.reflect.has": 144, "./modules/es6.reflect.is-extensible": 145, "./modules/es6.reflect.own-keys": 146, "./modules/es6.reflect.prevent-extensions": 147, "./modules/es6.reflect.set": 149, "./modules/es6.reflect.set-prototype-of": 148, "./modules/es6.regexp.constructor": 150, "./modules/es6.regexp.flags": 151, "./modules/es6.regexp.match": 152, "./modules/es6.regexp.replace": 153, "./modules/es6.regexp.search": 154, "./modules/es6.regexp.split": 155, "./modules/es6.set": 156, "./modules/es6.string.code-point-at": 157, "./modules/es6.string.ends-with": 158, "./modules/es6.string.from-code-point": 159, "./modules/es6.string.includes": 160, "./modules/es6.string.iterator": 161, "./modules/es6.string.raw": 162, "./modules/es6.string.repeat": 163, "./modules/es6.string.starts-with": 164, "./modules/es6.string.trim": 165, "./modules/es6.symbol": 166, "./modules/es6.weak-map": 167, "./modules/es6.weak-set": 168, "./modules/es7.array.includes": 169, "./modules/es7.map.to-json": 170, "./modules/es7.object.entries": 171, "./modules/es7.object.get-own-property-descriptors": 172, "./modules/es7.object.values": 173, "./modules/es7.regexp.escape": 174, "./modules/es7.set.to-json": 175, "./modules/es7.string.at": 176, "./modules/es7.string.pad-left": 177, "./modules/es7.string.pad-right": 178, "./modules/es7.string.trim-left": 179, "./modules/es7.string.trim-right": 180, "./modules/js.array.statics": 181, "./modules/web.dom.iterable": 182, "./modules/web.immediate": 183, "./modules/web.timers": 184, }, ], 186: [ function (e, t, i) { (function (e, i) { !(function (i) { "use strict"; function n(e, t, i, n) { var r = Object.create((t || o).prototype); return (r._invoke = h(e, i || null, new p(n || []))), r; } function r(e, t, i) { try { return { type: "normal", arg: e.call(t, i) }; } catch (n) { return { type: "throw", arg: n }; } } function o() {} function a() {} function s() {} function l(e) { ["next", "throw", "return"].forEach(function (t) { e[t] = function (e) { return this._invoke(t, e); }; }); } function c(e) { this.arg = e; } function u(t) { function i(e, i) { var n = t[e](i), r = n.value; return r instanceof c ? Promise.resolve(r.arg).then(o, a) : Promise.resolve(r).then(function (e) { return (n.value = e), n; }); } function n(e, t) { var n = r ? r.then(function () { return i(e, t); }) : new Promise(function (n) { n(i(e, t)); }); return (r = n["catch"](function (e) {})), n; } "object" == typeof e && e.domain && (i = e.domain.bind(i)); var r, o = i.bind(t, "next"), a = i.bind(t, "throw"); i.bind(t, "return"); this._invoke = n; } function h(e, t, i) { var n = w; return function (o, a) { if (n === T) throw new Error("Generator is already running"); if (n === S) { if ("throw" === o) throw a; return v(); } for (;;) { var s = i.delegate; if (s) { if ("return" === o || ("throw" === o && s.iterator[o] === g)) { i.delegate = null; var l = s.iterator["return"]; if (l) { var c = r(l, s.iterator, a); if ("throw" === c.type) { (o = "throw"), (a = c.arg); continue; } } if ("return" === o) continue; } var c = r(s.iterator[o], s.iterator, a); if ("throw" === c.type) { (i.delegate = null), (o = "throw"), (a = c.arg); continue; } (o = "next"), (a = g); var u = c.arg; if (!u.done) return (n = M), u; (i[s.resultName] = u.value), (i.next = s.nextLoc), (i.delegate = null); } if ("next" === o) n === M ? (i.sent = a) : (i.sent = g); else if ("throw" === o) { if (n === w) throw ((n = S), a); i.dispatchException(a) && ((o = "next"), (a = g)); } else "return" === o && i.abrupt("return", a); n = T; var c = r(e, t, i); if ("normal" === c.type) { n = i.done ? S : M; var u = { value: c.arg, done: i.done }; if (c.arg !== E) return u; i.delegate && "next" === o && (a = g); } else "throw" === c.type && ((n = S), (o = "throw"), (a = c.arg)); } }; } function d(e) { var t = { tryLoc: e[0] }; 1 in e && (t.catchLoc = e[1]), 2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])), this.tryEntries.push(t); } function f(e) { var t = e.completion || {}; (t.type = "normal"), delete t.arg, (e.completion = t); } function p(e) { (this.tryEntries = [{ tryLoc: "root" }]), e.forEach(d, this), this.reset(!0); } function m(e) { if (e) { var t = e[_]; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var i = -1, n = function r() { for (; ++i < e.length;) if (y.call(e, i)) return (r.value = e[i]), (r.done = !1), r; return (r.value = g), (r.done = !0), r; }; return (n.next = n); } } return { next: v }; } function v() { return { value: g, done: !0 }; } var g, y = Object.prototype.hasOwnProperty, _ = ("function" == typeof Symbol && Symbol.iterator) || "@@iterator", b = "object" == typeof t, x = i.regeneratorRuntime; if (x) return void(b && (t.exports = x)); (x = i.regeneratorRuntime = b ? t.exports : {}), (x.wrap = n); var w = "suspendedStart", M = "suspendedYield", T = "executing", S = "completed", E = {}, A = (s.prototype = o.prototype); (a.prototype = A.constructor = s), (s.constructor = a), (a.displayName = "GeneratorFunction"), (x.isGeneratorFunction = function (e) { var t = "function" == typeof e && e.constructor; return t ? t === a || "GeneratorFunction" === (t.displayName || t.name) : !1; }), (x.mark = function (e) { return (e.__proto__ = s), (e.prototype = Object.create(A)), e; }), (x.awrap = function (e) { return new c(e); }), l(u.prototype), (x.async = function (e, t, i, r) { var o = new u(n(e, t, i, r)); return x.isGeneratorFunction(t) ? o : o.next().then(function (e) { return e.done ? e.value : o.next(); }); }), l(A), (A[_] = function () { return this; }), (A.toString = function () { return "[object Generator]"; }), (x.keys = function (e) { var t = []; for (var i in e) t.push(i); return ( t.reverse(), function n() { for (; t.length;) { var i = t.pop(); if (i in e) return (n.value = i), (n.done = !1), n; } return (n.done = !0), n; } ); }), (x.values = m), (p.prototype = { constructor: p, reset: function (e) { if (((this.prev = 0), (this.next = 0), (this.sent = g), (this.done = !1), (this.delegate = null), this.tryEntries.forEach(f), !e)) for (var t in this) "t" === t.charAt(0) && y.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = g); }, stop: function () { this.done = !0; var e = this.tryEntries[0], t = e.completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function (e) { function t(t, n) { return (o.type = "throw"), (o.arg = e), (i.next = t), !!n; } if (this.done) throw e; for (var i = this, n = this.tryEntries.length - 1; n >= 0; --n) { var r = this.tryEntries[n], o = r.completion; if ("root" === r.tryLoc) return t("end"); if (r.tryLoc <= this.prev) { var a = y.call(r, "catchLoc"), s = y.call(r, "finallyLoc"); if (a && s) { if (this.prev < r.catchLoc) return t(r.catchLoc, !0); if (this.prev < r.finallyLoc) return t(r.finallyLoc); } else if (a) { if (this.prev < r.catchLoc) return t(r.catchLoc, !0); } else { if (!s) throw new Error("try statement without catch or finally"); if (this.prev < r.finallyLoc) return t(r.finallyLoc); } } } }, abrupt: function (e, t) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var n = this.tryEntries[i]; if (n.tryLoc <= this.prev && y.call(n, "finallyLoc") && this.prev < n.finallyLoc) { var r = n; break; } } r && ("break" === e || "continue" === e) && r.tryLoc <= t && t <= r.finallyLoc && (r = null); var o = r ? r.completion : {}; return (o.type = e), (o.arg = t), r ? (this.next = r.finallyLoc) : this.complete(o), E; }, complete: function (e, t) { if ("throw" === e.type) throw e.arg; "break" === e.type || "continue" === e.type ? (this.next = e.arg) : "return" === e.type ? ((this.rval = e.arg), (this.next = "end")) : "normal" === e.type && t && (this.next = t); }, finish: function (e) { for (var t = this.tryEntries.length - 1; t >= 0; --t) { var i = this.tryEntries[t]; if (i.finallyLoc === e) return this.complete(i.completion, i.afterLoc), f(i), E; } }, catch: function (e) { for (var t = this.tryEntries.length - 1; t >= 0; --t) { var i = this.tryEntries[t]; if (i.tryLoc === e) { var n = i.completion; if ("throw" === n.type) { var r = n.arg; f(i); } return r; } } throw new Error("illegal catch attempt"); }, delegateYield: function (e, t, i) { return (this.delegate = { iterator: m(e), resultName: t, nextLoc: i }), E; }, }); })("object" == typeof i ? i : "object" == typeof window ? window : "object" == typeof self ? self : this); }.call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})); }, { _process: 189 }, ], 187: [ function (e, t, i) { t.exports = e("./lib/polyfill"); }, { "./lib/polyfill": 1 }, ], 188: [ function (e, t, i) { function n() { (this._events = this._events || {}), (this._maxListeners = this._maxListeners || void 0); } function r(e) { return "function" == typeof e; } function o(e) { return "number" == typeof e; } function a(e) { return "object" == typeof e && null !== e; } function s(e) { return void 0 === e; } (t.exports = n), (n.EventEmitter = n), (n.prototype._events = void 0), (n.prototype._maxListeners = void 0), (n.defaultMaxListeners = 10), (n.prototype.setMaxListeners = function (e) { if (!o(e) || 0 > e || isNaN(e)) throw TypeError("n must be a positive number"); return (this._maxListeners = e), this; }), (n.prototype.emit = function (e) { var t, i, n, o, l, c; if ((this._events || (this._events = {}), "error" === e && (!this._events.error || (a(this._events.error) && !this._events.error.length)))) { if (((t = arguments[1]), t instanceof Error)) throw t; throw TypeError('Uncaught, unspecified "error" event.'); } if (((i = this._events[e]), s(i))) return !1; if (r(i)) switch (arguments.length) { case 1: i.call(this); break; case 2: i.call(this, arguments[1]); break; case 3: i.call(this, arguments[1], arguments[2]); break; default: for (n = arguments.length, o = new Array(n - 1), l = 1; n > l; l++) o[l - 1] = arguments[l]; i.apply(this, o); } else if (a(i)) { for (n = arguments.length, o = new Array(n - 1), l = 1; n > l; l++) o[l - 1] = arguments[l]; for (c = i.slice(), n = c.length, l = 0; n > l; l++) c[l].apply(this, o); } return !0; }), (n.prototype.addListener = function (e, t) { var i; if (!r(t)) throw TypeError("listener must be a function"); if ( (this._events || (this._events = {}), this._events.newListener && this.emit("newListener", e, r(t.listener) ? t.listener : t), this._events[e] ? (a(this._events[e]) ? this._events[e].push(t) : (this._events[e] = [this._events[e], t])) : (this._events[e] = t), a(this._events[e]) && !this._events[e].warned) ) { var i; (i = s(this._maxListeners) ? n.defaultMaxListeners : this._maxListeners), i && i > 0 && this._events[e].length > i && ((this._events[e].warned = !0), console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[e].length), "function" == typeof console.trace && console.trace()); } return this; }), (n.prototype.on = n.prototype.addListener), (n.prototype.once = function (e, t) { function i() { this.removeListener(e, i), n || ((n = !0), t.apply(this, arguments)); } if (!r(t)) throw TypeError("listener must be a function"); var n = !1; return (i.listener = t), this.on(e, i), this; }), (n.prototype.removeListener = function (e, t) { var i, n, o, s; if (!r(t)) throw TypeError("listener must be a function"); if (!this._events || !this._events[e]) return this; if (((i = this._events[e]), (o = i.length), (n = -1), i === t || (r(i.listener) && i.listener === t))) delete this._events[e], this._events.removeListener && this.emit("removeListener", e, t); else if (a(i)) { for (s = o; s-- > 0;) if (i[s] === t || (i[s].listener && i[s].listener === t)) { n = s; break; } if (0 > n) return this; 1 === i.length ? ((i.length = 0), delete this._events[e]) : i.splice(n, 1), this._events.removeListener && this.emit("removeListener", e, t); } return this; }), (n.prototype.removeAllListeners = function (e) { var t, i; if (!this._events) return this; if (!this._events.removeListener) return 0 === arguments.length ? (this._events = {}) : this._events[e] && delete this._events[e], this; if (0 === arguments.length) { for (t in this._events) "removeListener" !== t && this.removeAllListeners(t); return this.removeAllListeners("removeListener"), (this._events = {}), this; } if (((i = this._events[e]), r(i))) this.removeListener(e, i); else for (; i.length;) this.removeListener(e, i[i.length - 1]); return delete this._events[e], this; }), (n.prototype.listeners = function (e) { var t; return (t = this._events && this._events[e] ? (r(this._events[e]) ? [this._events[e]] : this._events[e].slice()) : []); }), (n.listenerCount = function (e, t) { var i; return (i = e._events && e._events[t] ? (r(e._events[t]) ? 1 : e._events[t].length) : 0); }); }, {}, ], 189: [ function (e, t, i) { function n() { (u = !1), s.length ? (c = s.concat(c)) : (h = -1), c.length && r(); } function r() { if (!u) { var e = setTimeout(n); u = !0; for (var t = c.length; t;) { for (s = c, c = []; ++h < t;) s && s[h].run(); (h = -1), (t = c.length); } (s = null), (u = !1), clearTimeout(e); } } function o(e, t) { (this.fun = e), (this.array = t); } function a() {} var s, l = (t.exports = {}), c = [], u = !1, h = -1; (l.nextTick = function (e) { var t = new Array(arguments.length - 1); if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) t[i - 1] = arguments[i]; c.push(new o(e, t)), 1 !== c.length || u || setTimeout(r, 0); }), (o.prototype.run = function () { this.fun.apply(null, this.array); }), (l.title = "browser"), (l.browser = !0), (l.env = {}), (l.argv = []), (l.version = ""), (l.versions = {}), (l.on = a), (l.addListener = a), (l.once = a), (l.off = a), (l.removeListener = a), (l.removeAllListeners = a), (l.emit = a), (l.binding = function (e) { throw new Error("process.binding is not supported"); }), (l.cwd = function () { return "/"; }), (l.chdir = function (e) { throw new Error("process.chdir is not supported"); }), (l.umask = function () { return 0; }); }, {}, ], 190: [ function (e, t, i) { (t.exports = e("./vendor/dat.gui")), (t.exports.color = e("./vendor/dat.color")); }, { "./vendor/dat.color": 191, "./vendor/dat.gui": 192 }, ], 191: [ function (e, t, i) { var n = (t.exports = n || {}); (n.color = n.color || {}), (n.utils = n.utils || {}), (n.utils.common = (function () { var e = Array.prototype.forEach, t = Array.prototype.slice; return { BREAK: {}, extend: function (e) { return ( this.each( t.call(arguments, 1), function (t) { for (var i in t) this.isUndefined(t[i]) || (e[i] = t[i]); }, this ), e ); }, defaults: function (e) { return ( this.each( t.call(arguments, 1), function (t) { for (var i in t) this.isUndefined(e[i]) && (e[i] = t[i]); }, this ), e ); }, compose: function () { var e = t.call(arguments); return function () { for (var i = t.call(arguments), n = e.length - 1; n >= 0; n--) i = [e[n].apply(this, i)]; return i[0]; }; }, each: function (t, i, n) { if (e && t.forEach === e) t.forEach(i, n); else if (t.length === t.length + 0) { for (var r = 0, o = t.length; o > r; r++) if (r in t && i.call(n, t[r], r) === this.BREAK) return; } else for (var r in t) if (i.call(n, t[r], r) === this.BREAK) return; }, defer: function (e) { setTimeout(e, 0); }, toArray: function (e) { return e.toArray ? e.toArray() : t.call(e); }, isUndefined: function (e) { return void 0 === e; }, isNull: function (e) { return null === e; }, isNaN: function (e) { return e !== e; }, isArray: Array.isArray || function (e) { return e.constructor === Array; }, isObject: function (e) { return e === Object(e); }, isNumber: function (e) { return e === e + 0; }, isString: function (e) { return e === e + ""; }, isBoolean: function (e) { return e === !1 || e === !0; }, isFunction: function (e) { return "[object Function]" === Object.prototype.toString.call(e); }, }; })()), (n.color.toString = (function (e) { return function (t) { if (1 == t.a || e.isUndefined(t.a)) { for (var i = t.hex.toString(16); i.length < 6;) i = "0" + i; return "#" + i; } return "rgba(" + Math.round(t.r) + "," + Math.round(t.g) + "," + Math.round(t.b) + "," + t.a + ")"; }; })(n.utils.common)), (n.Color = n.color.Color = (function (e, t, i, n) { function r(e, t, i) { Object.defineProperty(e, t, { get: function () { return "RGB" === this.__state.space ? this.__state[t] : (a(this, t, i), this.__state[t]); }, set: function (e) { "RGB" !== this.__state.space && (a(this, t, i), (this.__state.space = "RGB")), (this.__state[t] = e); }, }); } function o(e, t) { Object.defineProperty(e, t, { get: function () { return "HSV" === this.__state.space ? this.__state[t] : (s(this), this.__state[t]); }, set: function (e) { "HSV" !== this.__state.space && (s(this), (this.__state.space = "HSV")), (this.__state[t] = e); }, }); } function a(e, i, r) { if ("HEX" === e.__state.space) e.__state[i] = t.component_from_hex(e.__state.hex, r); else { if ("HSV" !== e.__state.space) throw "Corrupted color state"; n.extend(e.__state, t.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v)); } } function s(e) { var i = t.rgb_to_hsv(e.r, e.g, e.b); n.extend(e.__state, { s: i.s, v: i.v }), n.isNaN(i.h) ? n.isUndefined(e.__state.h) && (e.__state.h = 0) : (e.__state.h = i.h); } var l = function () { if (((this.__state = e.apply(this, arguments)), this.__state === !1)) throw "Failed to interpret color arguments"; this.__state.a = this.__state.a || 1; }; return ( (l.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"]), n.extend(l.prototype, { toString: function () { return i(this); }, toOriginal: function () { return this.__state.conversion.write(this); }, }), r(l.prototype, "r", 2), r(l.prototype, "g", 1), r(l.prototype, "b", 0), o(l.prototype, "h"), o(l.prototype, "s"), o(l.prototype, "v"), Object.defineProperty(l.prototype, "a", { get: function () { return this.__state.a; }, set: function (e) { this.__state.a = e; }, }), Object.defineProperty(l.prototype, "hex", { get: function () { return "HEX" !== !this.__state.space && (this.__state.hex = t.rgb_to_hex(this.r, this.g, this.b)), this.__state.hex; }, set: function (e) { (this.__state.space = "HEX"), (this.__state.hex = e); }, }), l ); })( (n.color.interpret = (function (e, t) { var i, n, r = function () { n = !1; var e = arguments.length > 1 ? t.toArray(arguments) : arguments[0]; return ( t.each(o, function (r) { return r.litmus(e) ? (t.each(r.conversions, function (r, o) { return (i = r.read(e)), n === !1 && i !== !1 ? ((n = i), (i.conversionName = o), (i.conversion = r), t.BREAK) : void 0; }), t.BREAK) : void 0; }), n ); }, o = [{ litmus: t.isString, conversions: { THREE_CHAR_HEX: { read: function (e) { var t = e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i); return null === t ? !1 : { space: "HEX", hex: parseInt("0x" + t[1].toString() + t[1].toString() + t[2].toString() + t[2].toString() + t[3].toString() + t[3].toString()) }; }, write: e, }, SIX_CHAR_HEX: { read: function (e) { var t = e.match(/^#([A-F0-9]{6})$/i); return null === t ? !1 : { space: "HEX", hex: parseInt("0x" + t[1].toString()) }; }, write: e, }, CSS_RGB: { read: function (e) { var t = e.match(/^rgb(s*(.+)s*,s*(.+)s*,s*(.+)s*)/); return null === t ? !1 : { space: "RGB", r: parseFloat(t[1]), g: parseFloat(t[2]), b: parseFloat(t[3]) }; }, write: e, }, CSS_RGBA: { read: function (e) { var t = e.match(/^rgba(s*(.+)s*,s*(.+)s*,s*(.+)s*,s*(.+)s*)/); return null === t ? !1 : { space: "RGB", r: parseFloat(t[1]), g: parseFloat(t[2]), b: parseFloat(t[3]), a: parseFloat(t[4]) }; }, write: e, }, }, }, { litmus: t.isNumber, conversions: { HEX: { read: function (e) { return { space: "HEX", hex: e, conversionName: "HEX" }; }, write: function (e) { return e.hex; }, }, }, }, { litmus: t.isArray, conversions: { RGB_ARRAY: { read: function (e) { return 3 != e.length ? !1 : { space: "RGB", r: e[0], g: e[1], b: e[2] }; }, write: function (e) { return [e.r, e.g, e.b]; }, }, RGBA_ARRAY: { read: function (e) { return 4 != e.length ? !1 : { space: "RGB", r: e[0], g: e[1], b: e[2], a: e[3] }; }, write: function (e) { return [e.r, e.g, e.b, e.a]; }, }, }, }, { litmus: t.isObject, conversions: { RGBA_OBJ: { read: function (e) { return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) && t.isNumber(e.a) ? { space: "RGB", r: e.r, g: e.g, b: e.b, a: e.a } : !1; }, write: function (e) { return { r: e.r, g: e.g, b: e.b, a: e.a }; }, }, RGB_OBJ: { read: function (e) { return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) ? { space: "RGB", r: e.r, g: e.g, b: e.b } : !1; }, write: function (e) { return { r: e.r, g: e.g, b: e.b }; }, }, HSVA_OBJ: { read: function (e) { return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) && t.isNumber(e.a) ? { space: "HSV", h: e.h, s: e.s, v: e.v, a: e.a } : !1; }, write: function (e) { return { h: e.h, s: e.s, v: e.v, a: e.a }; }, }, HSV_OBJ: { read: function (e) { return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) ? { space: "HSV", h: e.h, s: e.s, v: e.v } : !1; }, write: function (e) { return { h: e.h, s: e.s, v: e.v }; }, }, }, }, ]; return r; })(n.color.toString, n.utils.common)), (n.color.math = (function () { var e; return { hsv_to_rgb: function (e, t, i) { var n = Math.floor(e / 60) % 6, r = e / 60 - Math.floor(e / 60), o = i * (1 - t), a = i * (1 - r * t), s = i * (1 - (1 - r) * t), l = [ [i, s, o], [a, i, o], [o, i, s], [o, a, i], [s, o, i], [i, o, a], ][n]; return { r: 255 * l[0], g: 255 * l[1], b: 255 * l[2] }; }, rgb_to_hsv: function (e, t, i) { var n, r, o = Math.min(e, t, i), a = Math.max(e, t, i), s = a - o; return 0 == a ? { h: NaN, s: 0, v: 0 } : ((r = s / a), (n = e == a ? (t - i) / s : t == a ? 2 + (i - e) / s : 4 + (e - t) / s), (n /= 6), 0 > n && (n += 1), { h: 360 * n, s: r, v: a / 255 }); }, rgb_to_hex: function (e, t, i) { var n = this.hex_with_component(0, 2, e); return (n = this.hex_with_component(n, 1, t)), (n = this.hex_with_component(n, 0, i)); }, component_from_hex: function (e, t) { return (e >> (8 * t)) & 255; }, hex_with_component: function (t, i, n) { return (n << (e = 8 * i)) | (t & ~(255 << e)); }, }; })()), n.color.toString, n.utils.common )); }, {}, ], 192: [ function (e, t, i) { var n = (t.exports = n || {}); (n.gui = n.gui || {}), (n.utils = n.utils || {}), (n.controllers = n.controllers || {}), (n.dom = n.dom || {}), (n.color = n.color || {}), (n.utils.css = (function () { return { load: function (e, t) { t = t || document; var i = t.createElement("link"); (i.type = "text/css"), (i.rel = "stylesheet"), (i.href = e), t.getElementsByTagName("head")[0].appendChild(i); }, inject: function (e, t) { t = t || document; var i = document.createElement("style"); (i.type = "text/css"), (i.innerHTML = e), t.getElementsByTagName("head")[0].appendChild(i); }, }; })()), (n.utils.common = (function () { var e = Array.prototype.forEach, t = Array.prototype.slice; return { BREAK: {}, extend: function (e) { return ( this.each( t.call(arguments, 1), function (t) { for (var i in t) this.isUndefined(t[i]) || (e[i] = t[i]); }, this ), e ); }, defaults: function (e) { return ( this.each( t.call(arguments, 1), function (t) { for (var i in t) this.isUndefined(e[i]) && (e[i] = t[i]); }, this ), e ); }, compose: function () { var e = t.call(arguments); return function () { for (var i = t.call(arguments), n = e.length - 1; n >= 0; n--) i = [e[n].apply(this, i)]; return i[0]; }; }, each: function (t, i, n) { if (e && t.forEach === e) t.forEach(i, n); else if (t.length === t.length + 0) { for (var r = 0, o = t.length; o > r; r++) if (r in t && i.call(n, t[r], r) === this.BREAK) return; } else for (var r in t) if (i.call(n, t[r], r) === this.BREAK) return; }, defer: function (e) { setTimeout(e, 0); }, toArray: function (e) { return e.toArray ? e.toArray() : t.call(e); }, isUndefined: function (e) { return void 0 === e; }, isNull: function (e) { return null === e; }, isNaN: function (e) { return e !== e; }, isArray: Array.isArray || function (e) { return e.constructor === Array; }, isObject: function (e) { return e === Object(e); }, isNumber: function (e) { return e === e + 0; }, isString: function (e) { return e === e + ""; }, isBoolean: function (e) { return e === !1 || e === !0; }, isFunction: function (e) { return "[object Function]" === Object.prototype.toString.call(e); }, }; })()), (n.controllers.Controller = (function (e) { var t = function (e, t) { (this.initialValue = e[t]), (this.domElement = document.createElement("div")), (this.object = e), (this.property = t), (this.__onChange = void 0), (this.__onFinishChange = void 0); }; return ( e.extend(t.prototype, { onChange: function (e) { return (this.__onChange = e), this; }, onFinishChange: function (e) { return (this.__onFinishChange = e), this; }, setValue: function (e) { return (this.object[this.property] = e), this.__onChange && this.__onChange.call(this, e), this.updateDisplay(), this; }, getValue: function () { return this.object[this.property]; }, updateDisplay: function () { return this; }, isModified: function () { return this.initialValue !== this.getValue(); }, }), t ); })(n.utils.common)), (n.dom.dom = (function (e) { function t(t) { if ("0" === t || e.isUndefined(t)) return 0; var i = t.match(r); return e.isNull(i) ? 0 : parseFloat(i[1]); } var i = { HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, n = {}; e.each(i, function (t, i) { e.each(t, function (e) { n[e] = i; }); }); var r = /(d+(.d+)?)px/, o = { makeSelectable: function (e, t) { void 0 !== e && void 0 !== e.style && ((e.onselectstart = t ? function () { return !1; } : function () {}), (e.style.MozUserSelect = t ? "auto" : "none"), (e.style.KhtmlUserSelect = t ? "auto" : "none"), (e.unselectable = t ? "on" : "off")); }, makeFullscreen: function (t, i, n) { e.isUndefined(i) && (i = !0), e.isUndefined(n) && (n = !0), (t.style.position = "absolute"), i && ((t.style.left = 0), (t.style.right = 0)), n && ((t.style.top = 0), (t.style.bottom = 0)); }, fakeEvent: function (t, i, r, o) { r = r || {}; var a = n[i]; if (!a) throw new Error("Event type " + i + " not supported."); var s = document.createEvent(a); switch (a) { case "MouseEvents": var l = r.x || r.clientX || 0, c = r.y || r.clientY || 0; s.initMouseEvent(i, r.bubbles || !1, r.cancelable || !0, window, r.clickCount || 1, 0, 0, l, c, !1, !1, !1, !1, 0, null); break; case "KeyboardEvents": var u = s.initKeyboardEvent || s.initKeyEvent; e.defaults(r, { cancelable: !0, ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1, keyCode: void 0, charCode: void 0 }), u(i, r.bubbles || !1, r.cancelable, window, r.ctrlKey, r.altKey, r.shiftKey, r.metaKey, r.keyCode, r.charCode); break; default: s.initEvent(i, r.bubbles || !1, r.cancelable || !0); } e.defaults(s, o), t.dispatchEvent(s); }, bind: function (e, t, i, n) { return (n = n || !1), e.addEventListener ? e.addEventListener(t, i, n) : e.attachEvent && e.attachEvent("on" + t, i), o; }, unbind: function (e, t, i, n) { return (n = n || !1), e.removeEventListener ? e.removeEventListener(t, i, n) : e.detachEvent && e.detachEvent("on" + t, i), o; }, addClass: function (e, t) { if (void 0 === e.className) e.className = t; else if (e.className !== t) { var i = e.className.split(/ +/); - 1 == i.indexOf(t) && (i.push(t), (e.className = i.join(" ").replace(/^s+/, "").replace(/s+$/, ""))); } return o; }, removeClass: function (e, t) { if (t) if (void 0 === e.className); else if (e.className === t) e.removeAttribute("class"); else { var i = e.className.split(/ +/), n = i.indexOf(t); - 1 != n && (i.splice(n, 1), (e.className = i.join(" "))); } else e.className = void 0; return o; }, hasClass: function (e, t) { return new RegExp("(?:^|\s+)" + t + "(?:\s+|$)").test(e.className) || !1; }, getWidth: function (e) { var i = getComputedStyle(e); return t(i["border-left-width"]) + t(i["border-right-width"]) + t(i["padding-left"]) + t(i["padding-right"]) + t(i.width); }, getHeight: function (e) { var i = getComputedStyle(e); return t(i["border-top-width"]) + t(i["border-bottom-width"]) + t(i["padding-top"]) + t(i["padding-bottom"]) + t(i.height); }, getOffset: function (e) { var t = { left: 0, top: 0 }; if (e.offsetParent) do(t.left += e.offsetLeft), (t.top += e.offsetTop); while ((e = e.offsetParent)); return t; }, isActive: function (e) { return e === document.activeElement && (e.type || e.href); }, }; return o; })(n.utils.common)), (n.controllers.OptionController = (function (e, t, i) { var n = function (e, r, o) { n.superclass.call(this, e, r); var a = this; if (((this.__select = document.createElement("select")), i.isArray(o))) { var s = {}; i.each(o, function (e) { s[e] = e; }), (o = s); } i.each(o, function (e, t) { var i = document.createElement("option"); (i.innerHTML = t), i.setAttribute("value", e), a.__select.appendChild(i); }), this.updateDisplay(), t.bind(this.__select, "change", function () { var e = this.options[this.selectedIndex].value; a.setValue(e); }), this.domElement.appendChild(this.__select); }; return ( (n.superclass = e), i.extend(n.prototype, e.prototype, { setValue: function (e) { var t = n.superclass.prototype.setValue.call(this, e); return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), t; }, updateDisplay: function () { return (this.__select.value = this.getValue()), n.superclass.prototype.updateDisplay.call(this); }, }), n ); })(n.controllers.Controller, n.dom.dom, n.utils.common)), (n.controllers.NumberController = (function (e, t) { function i(e) { return (e = e.toString()), e.indexOf(".") > -1 ? e.length - e.indexOf(".") - 1 : 0; } var n = function (e, r, o) { n.superclass.call(this, e, r), (o = o || {}), (this.__min = o.min), (this.__max = o.max), (this.__step = o.step), t.isUndefined(this.__step) ? 0 == this.initialValue ? (this.__impliedStep = 1) : (this.__impliedStep = Math.pow(10, Math.floor(Math.log(this.initialValue) / Math.LN10)) / 10) : (this.__impliedStep = this.__step), (this.__precision = i(this.__impliedStep)); }; return ( (n.superclass = e), t.extend(n.prototype, e.prototype, { setValue: function (e) { return ( void 0 !== this.__min && e < this.__min ? (e = this.__min) : void 0 !== this.__max && e > this.__max && (e = this.__max), void 0 !== this.__step && e % this.__step != 0 && (e = Math.round(e / this.__step) * this.__step), n.superclass.prototype.setValue.call(this, e) ); }, min: function (e) { return (this.__min = e), this; }, max: function (e) { return (this.__max = e), this; }, step: function (e) { return (this.__step = e), this; }, }), n ); })(n.controllers.Controller, n.utils.common)), (n.controllers.NumberControllerBox = (function (e, t, i) { function n(e, t) { var i = Math.pow(10, t); return Math.round(e * i) / i; } var r = function (e, n, o) { function a() { var e = parseFloat(d.__input.value); i.isNaN(e) || d.setValue(e); } function s() { a(), d.__onFinishChange && d.__onFinishChange.call(d, d.getValue()); } function l(e) { t.bind(window, "mousemove", c), t.bind(window, "mouseup", u), (h = e.clientY); } function c(e) { var t = h - e.clientY; d.setValue(d.getValue() + t * d.__impliedStep), (h = e.clientY); } function u() { t.unbind(window, "mousemove", c), t.unbind(window, "mouseup", u); } (this.__truncationSuspended = !1), r.superclass.call(this, e, n, o); var h, d = this; (this.__input = document.createElement("input")), this.__input.setAttribute("type", "text"), t.bind(this.__input, "change", a), t.bind(this.__input, "blur", s), t.bind(this.__input, "mousedown", l), t.bind(this.__input, "keydown", function (e) { 13 === e.keyCode && ((d.__truncationSuspended = !0), this.blur(), (d.__truncationSuspended = !1)); }), this.updateDisplay(), this.domElement.appendChild(this.__input); }; return ( (r.superclass = e), i.extend(r.prototype, e.prototype, { updateDisplay: function () { return (this.__input.value = this.__truncationSuspended ? this.getValue() : n(this.getValue(), this.__precision)), r.superclass.prototype.updateDisplay.call(this); }, }), r ); })(n.controllers.NumberController, n.dom.dom, n.utils.common)), (n.controllers.NumberControllerSlider = (function (e, t, i, n, r) { function o(e, t, i, n, r) { return n + (r - n) * ((e - t) / (i - t)); } var a = function (e, i, n, r, s) { function l(e) { t.bind(window, "mousemove", c), t.bind(window, "mouseup", u), c(e); } function c(e) { e.preventDefault(); var i = t.getOffset(h.__background), n = t.getWidth(h.__background); return h.setValue(o(e.clientX, i.left, i.left + n, h.__min, h.__max)), !1; } function u() { t.unbind(window, "mousemove", c), t.unbind(window, "mouseup", u), h.__onFinishChange && h.__onFinishChange.call(h, h.getValue()); } a.superclass.call(this, e, i, { min: n, max: r, step: s }); var h = this; (this.__background = document.createElement("div")), (this.__foreground = document.createElement("div")), t.bind(this.__background, "mousedown", l), t.addClass(this.__background, "slider"), t.addClass(this.__foreground, "slider-fg"), this.updateDisplay(), this.__background.appendChild(this.__foreground), this.domElement.appendChild(this.__background); }; return ( (a.superclass = e), (a.useDefaultStyles = function () { i.inject(r); }), n.extend(a.prototype, e.prototype, { updateDisplay: function () { var e = (this.getValue() - this.__min) / (this.__max - this.__min); return (this.__foreground.style.width = 100 * e + "%"), a.superclass.prototype.updateDisplay.call(this); }, }), a ); })( n.controllers.NumberController, n.dom.dom, n.utils.css, n.utils.common, ".slider {n box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);n height: 1em;n border-radius: 1em;n background-color: #eee;n padding: 0 0.5em;n overflow: hidden;n}nn.slider-fg {n padding: 1px 0 2px 0;n background-color: #aaa;n height: 1em;n margin-left: -0.5em;n padding-right: 0.5em;n border-radius: 1em 0 0 1em;n}nn.slider-fg:after {n display: inline-block;n border-radius: 1em;n background-color: #fff;n border: 1px solid #aaa;n content: '';n float: right;n margin-right: -1em;n margin-top: -1px;n height: 0.9em;n width: 0.9em;n}" )), (n.controllers.FunctionController = (function (e, t, i) { var n = function (e, i, r) { n.superclass.call(this, e, i); var o = this; (this.__button = document.createElement("div")), (this.__button.innerHTML = void 0 === r ? "Fire" : r), t.bind(this.__button, "click", function (e) { return e.preventDefault(), o.fire(), !1; }), t.addClass(this.__button, "button"), this.domElement.appendChild(this.__button); }; return ( (n.superclass = e), i.extend(n.prototype, e.prototype, { fire: function () { this.__onChange && this.__onChange.call(this), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.getValue().call(this.object); }, }), n ); })(n.controllers.Controller, n.dom.dom, n.utils.common)), (n.controllers.BooleanController = (function (e, t, i) { var n = function (e, i) { function r() { o.setValue(!o.__prev); } n.superclass.call(this, e, i); var o = this; (this.__prev = this.getValue()), (this.__checkbox = document.createElement("input")), this.__checkbox.setAttribute("type", "checkbox"), t.bind(this.__checkbox, "change", r, !1), this.domElement.appendChild(this.__checkbox), this.updateDisplay(); }; return ( (n.superclass = e), i.extend(n.prototype, e.prototype, { setValue: function (e) { var t = n.superclass.prototype.setValue.call(this, e); return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), (this.__prev = this.getValue()), t; }, updateDisplay: function () { return this.getValue() === !0 ? (this.__checkbox.setAttribute("checked", "checked"), (this.__checkbox.checked = !0)) : (this.__checkbox.checked = !1), n.superclass.prototype.updateDisplay.call(this); }, }), n ); })(n.controllers.Controller, n.dom.dom, n.utils.common)), (n.color.toString = (function (e) { return function (t) { if (1 == t.a || e.isUndefined(t.a)) { for (var i = t.hex.toString(16); i.length < 6;) i = "0" + i; return "#" + i; } return "rgba(" + Math.round(t.r) + "," + Math.round(t.g) + "," + Math.round(t.b) + "," + t.a + ")"; }; })(n.utils.common)), (n.color.interpret = (function (e, t) { var i, n, r = function () { n = !1; var e = arguments.length > 1 ? t.toArray(arguments) : arguments[0]; return ( t.each(o, function (r) { return r.litmus(e) ? (t.each(r.conversions, function (r, o) { return (i = r.read(e)), n === !1 && i !== !1 ? ((n = i), (i.conversionName = o), (i.conversion = r), t.BREAK) : void 0; }), t.BREAK) : void 0; }), n ); }, o = [{ litmus: t.isString, conversions: { THREE_CHAR_HEX: { read: function (e) { var t = e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i); return null === t ? !1 : { space: "HEX", hex: parseInt("0x" + t[1].toString() + t[1].toString() + t[2].toString() + t[2].toString() + t[3].toString() + t[3].toString()) }; }, write: e, }, SIX_CHAR_HEX: { read: function (e) { var t = e.match(/^#([A-F0-9]{6})$/i); return null === t ? !1 : { space: "HEX", hex: parseInt("0x" + t[1].toString()) }; }, write: e, }, CSS_RGB: { read: function (e) { var t = e.match(/^rgb(s*(.+)s*,s*(.+)s*,s*(.+)s*)/); return null === t ? !1 : { space: "RGB", r: parseFloat(t[1]), g: parseFloat(t[2]), b: parseFloat(t[3]) }; }, write: e, }, CSS_RGBA: { read: function (e) { var t = e.match(/^rgba(s*(.+)s*,s*(.+)s*,s*(.+)s*,s*(.+)s*)/); return null === t ? !1 : { space: "RGB", r: parseFloat(t[1]), g: parseFloat(t[2]), b: parseFloat(t[3]), a: parseFloat(t[4]) }; }, write: e, }, }, }, { litmus: t.isNumber, conversions: { HEX: { read: function (e) { return { space: "HEX", hex: e, conversionName: "HEX" }; }, write: function (e) { return e.hex; }, }, }, }, { litmus: t.isArray, conversions: { RGB_ARRAY: { read: function (e) { return 3 != e.length ? !1 : { space: "RGB", r: e[0], g: e[1], b: e[2] }; }, write: function (e) { return [e.r, e.g, e.b]; }, }, RGBA_ARRAY: { read: function (e) { return 4 != e.length ? !1 : { space: "RGB", r: e[0], g: e[1], b: e[2], a: e[3] }; }, write: function (e) { return [e.r, e.g, e.b, e.a]; }, }, }, }, { litmus: t.isObject, conversions: { RGBA_OBJ: { read: function (e) { return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) && t.isNumber(e.a) ? { space: "RGB", r: e.r, g: e.g, b: e.b, a: e.a } : !1; }, write: function (e) { return { r: e.r, g: e.g, b: e.b, a: e.a }; }, }, RGB_OBJ: { read: function (e) { return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) ? { space: "RGB", r: e.r, g: e.g, b: e.b } : !1; }, write: function (e) { return { r: e.r, g: e.g, b: e.b }; }, }, HSVA_OBJ: { read: function (e) { return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) && t.isNumber(e.a) ? { space: "HSV", h: e.h, s: e.s, v: e.v, a: e.a } : !1; }, write: function (e) { return { h: e.h, s: e.s, v: e.v, a: e.a }; }, }, HSV_OBJ: { read: function (e) { return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) ? { space: "HSV", h: e.h, s: e.s, v: e.v } : !1; }, write: function (e) { return { h: e.h, s: e.s, v: e.v }; }, }, }, }, ]; return r; })(n.color.toString, n.utils.common)), (n.GUI = n.gui.GUI = (function (e, t, i, n, r, o, a, s, l, c, u, h, d, f, p) { function m(e, t, i, o) { if (void 0 === t[i]) throw new Error("Object " + t + ' has no property "' + i + '"'); var a; if (o.color) a = new u(t, i); else { var s = [t, i].concat(o.factoryArgs); a = n.apply(e, s); } o.before instanceof r && (o.before = o.before.__li), y(e, a), f.addClass(a.domElement, "c"); var l = document.createElement("span"); f.addClass(l, "property-name"), (l.innerHTML = a.property); var c = document.createElement("div"); c.appendChild(l), c.appendChild(a.domElement); var h = v(e, c, o.before); return f.addClass(h, j.CLASS_CONTROLLER_ROW), f.addClass(h, typeof a.getValue()), g(e, h, a), e.__controllers.push(a), a; } function v(e, t, i) { var n = document.createElement("li"); return t && n.appendChild(t), i ? e.__ul.insertBefore(n, params.before) : e.__ul.appendChild(n), e.onResize(), n; } function g(e, t, i) { if ( ((i.__li = t), (i.__gui = e), p.extend(i, { options: function (t) { return arguments.length > 1 ? (i.remove(), m(e, i.object, i.property, { before: i.__li.nextElementSibling, factoryArgs: [p.toArray(arguments)] })) : p.isArray(t) || p.isObject(t) ? (i.remove(), m(e, i.object, i.property, { before: i.__li.nextElementSibling, factoryArgs: [t] })) : void 0; }, name: function (e) { return (i.__li.firstElementChild.firstElementChild.innerHTML = e), i; }, listen: function () { return i.__gui.listen(i), i; }, remove: function () { return i.__gui.remove(i), i; }, }), i instanceof l) ) { var n = new s(i.object, i.property, { min: i.__min, max: i.__max, step: i.__step }); p.each(["updateDisplay", "onChange", "onFinishChange"], function (e) { var t = i[e], r = n[e]; i[e] = n[e] = function () { var e = Array.prototype.slice.call(arguments); return t.apply(i, e), r.apply(n, e); }; }), f.addClass(t, "has-slider"), i.domElement.insertBefore(n.domElement, i.domElement.firstElementChild); } else if (i instanceof s) { var r = function (t) { return p.isNumber(i.__min) && p.isNumber(i.__max) ? (i.remove(), m(e, i.object, i.property, { before: i.__li.nextElementSibling, factoryArgs: [i.__min, i.__max, i.__step] })) : t; }; (i.min = p.compose(r, i.min)), (i.max = p.compose(r, i.max)); } else i instanceof o ? (f.bind(t, "click", function () { f.fakeEvent(i.__checkbox, "click"); }), f.bind(i.__checkbox, "click", function (e) { e.stopPropagation(); })) : i instanceof a ? (f.bind(t, "click", function () { f.fakeEvent(i.__button, "click"); }), f.bind(t, "mouseover", function () { f.addClass(i.__button, "hover"); }), f.bind(t, "mouseout", function () { f.removeClass(i.__button, "hover"); })) : i instanceof u && (f.addClass(t, "color"), (i.updateDisplay = p.compose(function (e) { return (t.style.borderLeftColor = i.__color.toString()), e; }, i.updateDisplay)), i.updateDisplay()); i.setValue = p.compose(function (t) { return e.getRoot().__preset_select && i.isModified() && E(e.getRoot(), !0), t; }, i.setValue); } function y(e, t) { var i = e.getRoot(), n = i.__rememberedObjects.indexOf(t.object); if (-1 != n) { var r = i.__rememberedObjectIndecesToControllers[n]; if ((void 0 === r && ((r = {}), (i.__rememberedObjectIndecesToControllers[n] = r)), (r[t.property] = t), i.load && i.load.remembered)) { var o, a = i.load.remembered; if (a[e.preset]) o = a[e.preset]; else { if (!a[k]) return; o = a[k]; } if (o[n] && void 0 !== o[n][t.property]) { var s = o[n][t.property]; (t.initialValue = s), t.setValue(s); } } } } function _(e, t) { return document.location.href + "." + t; } function b(e) { function t() { c.style.display = e.useLocalStorage ? "block" : "none"; } var i = (e.__save_row = document.createElement("li")); f.addClass(e.domElement, "has-save"), e.__ul.insertBefore(i, e.__ul.firstChild), f.addClass(i, "save-row"); var n = document.createElement("span"); (n.innerHTML = " "), f.addClass(n, "button gears"); var r = document.createElement("span"); (r.innerHTML = "Save"), f.addClass(r, "button"), f.addClass(r, "save"); var o = document.createElement("span"); (o.innerHTML = "New"), f.addClass(o, "button"), f.addClass(o, "save-as"); var a = document.createElement("span"); (a.innerHTML = "Revert"), f.addClass(a, "button"), f.addClass(a, "revert"); var s = (e.__preset_select = document.createElement("select")); if ( (e.load && e.load.remembered ? p.each(e.load.remembered, function (t, i) { T(e, i, i == e.preset); }) : T(e, k, !1), f.bind(s, "change", function () { for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].innerHTML = e.__preset_select[t].value; e.preset = this.value; }), i.appendChild(s), i.appendChild(n), i.appendChild(r), i.appendChild(o), i.appendChild(a), D) ) { var l = document.getElementById("dg-save-locally"), c = document.getElementById("dg-local-explain"); l.style.display = "block"; var u = document.getElementById("dg-local-storage"); "true" === localStorage.getItem(_(e, "isLocal")) && u.setAttribute("checked", "checked"), t(), f.bind(u, "change", function () { (e.useLocalStorage = !e.useLocalStorage), t(); }); } var h = document.getElementById("dg-new-constructor"); f.bind(h, "keydown", function (e) { !e.metaKey || (67 !== e.which && 67 != e.keyCode) || C.hide(); }), f.bind(n, "click", function () { (h.innerHTML = JSON.stringify(e.getSaveObject(), void 0, 2)), C.show(), h.focus(), h.select(); }), f.bind(r, "click", function () { e.save(); }), f.bind(o, "click", function () { var t = prompt("Enter a new preset name."); t && e.saveAs(t); }), f.bind(a, "click", function () { e.revert(); }); } function x(e) { function t(t) { return t.preventDefault(), (r = t.clientX), f.addClass(e.__closeButton, j.CLASS_DRAG), f.bind(window, "mousemove", i), f.bind(window, "mouseup", n), !1; } function i(t) { return t.preventDefault(), (e.width += r - t.clientX), e.onResize(), (r = t.clientX), !1; } function n() { f.removeClass(e.__closeButton, j.CLASS_DRAG), f.unbind(window, "mousemove", i), f.unbind(window, "mouseup", n); } (e.__resize_handle = document.createElement("div")), p.extend(e.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }); var r; f.bind(e.__resize_handle, "mousedown", t), f.bind(e.__closeButton, "mousedown", t), e.domElement.insertBefore(e.__resize_handle, e.domElement.firstElementChild); } function w(e, t) { (e.domElement.style.width = t + "px"), e.__save_row && e.autoPlace && (e.__save_row.style.width = t + "px"), e.__closeButton && (e.__closeButton.style.width = t + "px"); } function M(e, t) { var i = {}; return ( p.each(e.__rememberedObjects, function (n, r) { var o = {}, a = e.__rememberedObjectIndecesToControllers[r]; p.each(a, function (e, i) { o[i] = t ? e.initialValue : e.getValue(); }), (i[r] = o); }), i ); } function T(e, t, i) { var n = document.createElement("option"); (n.innerHTML = t), (n.value = t), e.__preset_select.appendChild(n), i && (e.__preset_select.selectedIndex = e.__preset_select.length - 1); } function S(e) { for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].value == e.preset && (e.__preset_select.selectedIndex = t); } function E(e, t) { var i = e.__preset_select[e.__preset_select.selectedIndex]; t ? (i.innerHTML = i.value + "*") : (i.innerHTML = i.value); } function A(e) { 0 != e.length && h(function () { A(e); }), p.each(e, function (e) { e.updateDisplay(); }); } e.inject(i); var C, P, L = "dg", R = 72, O = 20, k = "Default", D = (function () { try { return "localStorage" in window && null !== window.localStorage; } catch (e) { return !1; } })(), I = !0, N = !1, U = [], j = function (e) { function t() { localStorage.setItem(_(n, "gui"), JSON.stringify(n.getSaveObject())); } function i() { var e = n.getRoot(); (e.width += 1), p.defer(function () { e.width -= 1; }); } var n = this; (this.domElement = document.createElement("div")), (this.__ul = document.createElement("ul")), this.domElement.appendChild(this.__ul), f.addClass(this.domElement, L), (this.__folders = {}), (this.__controllers = []), (this.__rememberedObjects = []), (this.__rememberedObjectIndecesToControllers = []), (this.__listening = []), (e = e || {}), (e = p.defaults(e, { autoPlace: !0, width: j.DEFAULT_WIDTH })), (e = p.defaults(e, { resizable: e.autoPlace, hideable: e.autoPlace })), p.isUndefined(e.load) ? (e.load = { preset: k }) : e.preset && (e.load.preset = e.preset), p.isUndefined(e.parent) && e.hideable && U.push(this), (e.resizable = p.isUndefined(e.parent) && e.resizable), e.autoPlace && p.isUndefined(e.scrollable) && (e.scrollable = !0); var r = D && "true" === localStorage.getItem(_(this, "isLocal")); if ( (Object.defineProperties(this, { parent: { get: function () { return e.parent; }, }, scrollable: { get: function () { return e.scrollable; }, }, autoPlace: { get: function () { return e.autoPlace; }, }, preset: { get: function () { return n.parent ? n.getRoot().preset : e.load.preset; }, set: function (t) { n.parent ? (n.getRoot().preset = t) : (e.load.preset = t), S(this), n.revert(); }, }, width: { get: function () { return e.width; }, set: function (t) { (e.width = t), w(n, t); }, }, name: { get: function () { return e.name; }, set: function (t) { (e.name = t), a && (a.innerHTML = e.name); }, }, closed: { get: function () { return e.closed; }, set: function (t) { (e.closed = t), e.closed ? f.addClass(n.__ul, j.CLASS_CLOSED) : f.removeClass(n.__ul, j.CLASS_CLOSED), this.onResize(), n.__closeButton && (n.__closeButton.innerHTML = t ? j.TEXT_OPEN : j.TEXT_CLOSED); }, }, load: { get: function () { return e.load; }, }, useLocalStorage: { get: function () { return r; }, set: function (e) { D && ((r = e), e ? f.bind(window, "unload", t) : f.unbind(window, "unload", t), localStorage.setItem(_(n, "isLocal"), e)); }, }, }), p.isUndefined(e.parent)) ) { if (((e.closed = !1), f.addClass(this.domElement, j.CLASS_MAIN), f.makeSelectable(this.domElement, !1), D && r)) { n.useLocalStorage = !0; var o = localStorage.getItem(_(this, "gui")); o && (e.load = JSON.parse(o)); } (this.__closeButton = document.createElement("div")), (this.__closeButton.innerHTML = j.TEXT_CLOSED), f.addClass(this.__closeButton, j.CLASS_CLOSE_BUTTON), this.domElement.appendChild(this.__closeButton), f.bind(this.__closeButton, "click", function () { n.closed = !n.closed; }); } else { void 0 === e.closed && (e.closed = !0); var a = document.createTextNode(e.name); f.addClass(a, "controller-name"); var s = v(n, a), l = function (e) { return e.preventDefault(), (n.closed = !n.closed), !1; }; f.addClass(this.__ul, j.CLASS_CLOSED), f.addClass(s, "title"), f.bind(s, "click", l), e.closed || (this.closed = !1); } e.autoPlace && (p.isUndefined(e.parent) && (I && ((P = document.createElement("div")), f.addClass(P, L), f.addClass(P, j.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(P), (I = !1)), P.appendChild(this.domElement), f.addClass(this.domElement, j.CLASS_AUTO_PLACE)), this.parent || w(n, e.width)), f.bind(window, "resize", function () { n.onResize(); }), f.bind(this.__ul, "webkitTransitionEnd", function () { n.onResize(); }), f.bind(this.__ul, "transitionend", function () { n.onResize(); }), f.bind(this.__ul, "oTransitionEnd", function () { n.onResize(); }), this.onResize(), e.resizable && x(this); n.getRoot(); e.parent || i(); }; return ( (j.toggleHide = function () { (N = !N), p.each(U, function (e) { (e.domElement.style.zIndex = N ? -999 : 999), (e.domElement.style.opacity = N ? 0 : 1); }); }), (j.CLASS_AUTO_PLACE = "a"), (j.CLASS_AUTO_PLACE_CONTAINER = "ac"), (j.CLASS_MAIN = "main"), (j.CLASS_CONTROLLER_ROW = "cr"), (j.CLASS_TOO_TALL = "taller-than-window"), (j.CLASS_CLOSED = "closed"), (j.CLASS_CLOSE_BUTTON = "close-button"), (j.CLASS_DRAG = "drag"), (j.DEFAULT_WIDTH = 245), (j.TEXT_CLOSED = "Close Controls"), (j.TEXT_OPEN = "Open Controls"), f.bind( window, "keydown", function (e) { "text" === document.activeElement.type || (e.which !== R && e.keyCode != R) || j.toggleHide(); }, !1 ), p.extend(j.prototype, { add: function (e, t) { return m(this, e, t, { factoryArgs: Array.prototype.slice.call(arguments, 2) }); }, addColor: function (e, t) { return m(this, e, t, { color: !0 }); }, remove: function (e) { this.__ul.removeChild(e.__li), this.__controllers.slice(this.__controllers.indexOf(e), 1); var t = this; p.defer(function () { t.onResize(); }); }, destroy: function () { this.autoPlace && P.removeChild(this.domElement); }, addFolder: function (e) { if (void 0 !== this.__folders[e]) throw new Error('You already have a folder in this GUI by the name "' + e + '"'); var t = { name: e, parent: this }; (t.autoPlace = this.autoPlace), this.load && this.load.folders && this.load.folders[e] && ((t.closed = this.load.folders[e].closed), (t.load = this.load.folders[e])); var i = new j(t); this.__folders[e] = i; var n = v(this, i.domElement); return f.addClass(n, "folder"), i; }, open: function () { this.closed = !1; }, close: function () { this.closed = !0; }, onResize: function () { var e = this.getRoot(); if (e.scrollable) { var t = f.getOffset(e.__ul).top, i = 0; p.each(e.__ul.childNodes, function (t) { (e.autoPlace && t === e.__save_row) || (i += f.getHeight(t)); }), window.innerHeight - t - O < i ? (f.addClass(e.domElement, j.CLASS_TOO_TALL), (e.__ul.style.height = window.innerHeight - t - O + "px")) : (f.removeClass(e.domElement, j.CLASS_TOO_TALL), (e.__ul.style.height = "auto")); } e.__resize_handle && p.defer(function () { e.__resize_handle.style.height = e.__ul.offsetHeight + "px"; }), e.__closeButton && (e.__closeButton.style.width = e.width + "px"); }, remember: function () { if ((p.isUndefined(C) && ((C = new d()), (C.domElement.innerHTML = t)), this.parent)) throw new Error("You can only call remember on a top level GUI."); var e = this; p.each(Array.prototype.slice.call(arguments), function (t) { 0 == e.__rememberedObjects.length && b(e), -1 == e.__rememberedObjects.indexOf(t) && e.__rememberedObjects.push(t); }), this.autoPlace && w(this, this.width); }, getRoot: function () { for (var e = this; e.parent;) e = e.parent; return e; }, getSaveObject: function () { var e = this.load; return ( (e.closed = this.closed), this.__rememberedObjects.length > 0 && ((e.preset = this.preset), e.remembered || (e.remembered = {}), (e.remembered[this.preset] = M(this))), (e.folders = {}), p.each(this.__folders, function (t, i) { e.folders[i] = t.getSaveObject(); }), e ); }, save: function () { this.load.remembered || (this.load.remembered = {}), (this.load.remembered[this.preset] = M(this)), E(this, !1); }, saveAs: function (e) { this.load.remembered || ((this.load.remembered = {}), (this.load.remembered[k] = M(this, !0))), (this.load.remembered[e] = M(this)), (this.preset = e), T(this, e, !0); }, revert: function (e) { p.each( this.__controllers, function (t) { this.getRoot().load.remembered ? y(e || this.getRoot(), t) : t.setValue(t.initialValue); }, this ), p.each(this.__folders, function (e) { e.revert(e); }), e || E(this.getRoot(), !1); }, listen: function (e) { var t = 0 == this.__listening.length; this.__listening.push(e), t && A(this.__listening); }, }), j ); })( n.utils.css, '<div id="dg-save" class="dg dialogue">nn Here's the new load parameter for your <code>GUI</code>'s constructor:nn <textarea id="dg-new-constructor"></textarea>nn <div id="dg-save-locally">nn <input id="dg-local-storage" type="checkbox"/> Automatically saven values to <code>localStorage</code> on exit.nn <div id="dg-local-explain">The values saved to <code>localStorage</code> willn override those passed to <code>dat.GUI</code>'s constructor. This makes itn easier to work incrementally, but <code>localStorage</code> is fragile,n and your friends may not see the same values you do.n n </div>n n </div>nn</div>', ".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity 0.1s linear;-o-transition:opacity 0.1s linear;-moz-transition:opacity 0.1s linear;transition:opacity 0.1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity 0.1s linear;-o-transition:opacity 0.1s linear;-moz-transition:opacity 0.1s linear;transition:opacity 0.1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save ul{margin-top:27px}.dg.a.has-save ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height 0.1s ease-out;-o-transition:height 0.1s ease-out;-moz-transition:height 0.1s ease-out;transition:height 0.1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li > *{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:9px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}n", (n.controllers.factory = (function (e, t, i, n, r, o, a) { return function (s, l) { var c = s[l]; return a.isArray(arguments[2]) || a.isObject(arguments[2]) ? new e(s, l, arguments[2]) : a.isNumber(c) ? a.isNumber(arguments[2]) && a.isNumber(arguments[3]) ? new i(s, l, arguments[2], arguments[3]) : new t(s, l, { min: arguments[2], max: arguments[3] }) : a.isString(c) ? new n(s, l) : a.isFunction(c) ? new r(s, l, "") : a.isBoolean(c) ? new o(s, l) : void 0; }; })( n.controllers.OptionController, n.controllers.NumberControllerBox, n.controllers.NumberControllerSlider, (n.controllers.StringController = (function (e, t, i) { var n = function (e, i) { function r() { a.setValue(a.__input.value); } function o() { a.__onFinishChange && a.__onFinishChange.call(a, a.getValue()); } n.superclass.call(this, e, i); var a = this; (this.__input = document.createElement("input")), this.__input.setAttribute("type", "text"), t.bind(this.__input, "keyup", r), t.bind(this.__input, "change", r), t.bind(this.__input, "blur", o), t.bind(this.__input, "keydown", function (e) { 13 === e.keyCode && this.blur(); }), this.updateDisplay(), this.domElement.appendChild(this.__input); }; return ( (n.superclass = e), i.extend(n.prototype, e.prototype, { updateDisplay: function () { return t.isActive(this.__input) || (this.__input.value = this.getValue()), n.superclass.prototype.updateDisplay.call(this); }, }), n ); })(n.controllers.Controller, n.dom.dom, n.utils.common)), n.controllers.FunctionController, n.controllers.BooleanController, n.utils.common )), n.controllers.Controller, n.controllers.BooleanController, n.controllers.FunctionController, n.controllers.NumberControllerBox, n.controllers.NumberControllerSlider, n.controllers.OptionController, (n.controllers.ColorController = (function (e, t, i, n, r) { function o(e, t, i, n) { (e.style.background = ""), r.each(l, function (r) { e.style.cssText += "background: " + r + "linear-gradient(" + t + ", " + i + " 0%, " + n + " 100%); "; }); } function a(e) { (e.style.background = ""), (e.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);"), (e.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"), (e.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"), (e.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"), (e.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"); } var s = function (e, l) { function c(e) { f(e), t.bind(window, "mousemove", f), t.bind(window, "mouseup", u); } function u() { t.unbind(window, "mousemove", f), t.unbind(window, "mouseup", u); } function h() { var e = n(this.value); e !== !1 ? ((m.__color.__state = e), m.setValue(m.__color.toOriginal())) : (this.value = m.__color.toString()); } function d() { t.unbind(window, "mousemove", p), t.unbind(window, "mouseup", d); } function f(e) { e.preventDefault(); var i = t.getWidth(m.__saturation_field), n = t.getOffset(m.__saturation_field), r = (e.clientX - n.left + document.body.scrollLeft) / i, o = 1 - (e.clientY - n.top + document.body.scrollTop) / i; return o > 1 ? (o = 1) : 0 > o && (o = 0), r > 1 ? (r = 1) : 0 > r && (r = 0), (m.__color.v = o), (m.__color.s = r), m.setValue(m.__color.toOriginal()), !1; } function p(e) { e.preventDefault(); var i = t.getHeight(m.__hue_field), n = t.getOffset(m.__hue_field), r = 1 - (e.clientY - n.top + document.body.scrollTop) / i; return r > 1 ? (r = 1) : 0 > r && (r = 0), (m.__color.h = 360 * r), m.setValue(m.__color.toOriginal()), !1; } s.superclass.call(this, e, l), (this.__color = new i(this.getValue())), (this.__temp = new i(0)); var m = this; (this.domElement = document.createElement("div")), t.makeSelectable(this.domElement, !1), (this.__selector = document.createElement("div")), (this.__selector.className = "selector"), (this.__saturation_field = document.createElement("div")), (this.__saturation_field.className = "saturation-field"), (this.__field_knob = document.createElement("div")), (this.__field_knob.className = "field-knob"), (this.__field_knob_border = "2px solid "), (this.__hue_knob = document.createElement("div")), (this.__hue_knob.className = "hue-knob"), (this.__hue_field = document.createElement("div")), (this.__hue_field.className = "hue-field"), (this.__input = document.createElement("input")), (this.__input.type = "text"), (this.__input_textShadow = "0 1px 1px "), t.bind(this.__input, "keydown", function (e) { 13 === e.keyCode && h.call(this); }), t.bind(this.__input, "blur", h), t.bind(this.__selector, "mousedown", function (e) { t.addClass(this, "drag").bind(window, "mouseup", function (e) { t.removeClass(m.__selector, "drag"); }); }); var v = document.createElement("div"); r.extend(this.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), r.extend(this.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: this.__field_knob_border + (this.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1, }), r.extend(this.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), r.extend(this.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), r.extend(v.style, { width: "100%", height: "100%", background: "none" }), o(v, "top", "rgba(0,0,0,0)", "#000"), r.extend(this.__hue_field.style, { width: "15px", height: "100px", display: "inline-block", border: "1px solid #555", cursor: "ns-resize" }), a(this.__hue_field), r.extend(this.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: this.__input_textShadow + "rgba(0,0,0,0.7)" }), t.bind(this.__saturation_field, "mousedown", c), t.bind(this.__field_knob, "mousedown", c), t.bind(this.__hue_field, "mousedown", function (e) { p(e), t.bind(window, "mousemove", p), t.bind(window, "mouseup", d); }), this.__saturation_field.appendChild(v), this.__selector.appendChild(this.__field_knob), this.__selector.appendChild(this.__saturation_field), this.__selector.appendChild(this.__hue_field), this.__hue_field.appendChild(this.__hue_knob), this.domElement.appendChild(this.__input), this.domElement.appendChild(this.__selector), this.updateDisplay(); }; (s.superclass = e), r.extend(s.prototype, e.prototype, { updateDisplay: function () { var e = n(this.getValue()); if (e !== !1) { var t = !1; r.each( i.COMPONENTS, function (i) { return r.isUndefined(e[i]) || r.isUndefined(this.__color.__state[i]) || e[i] === this.__color.__state[i] ? void 0 : ((t = !0), {}); }, this ), t && r.extend(this.__color.__state, e); } r.extend(this.__temp.__state, this.__color.__state), (this.__temp.a = 1); var a = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, s = 255 - a; r.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toString(), border: this.__field_knob_border + "rgb(" + a + "," + a + "," + a + ")", }), (this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px"), (this.__temp.s = 1), (this.__temp.v = 1), o(this.__saturation_field, "left", "#fff", this.__temp.toString()), r.extend(this.__input.style, { backgroundColor: (this.__input.value = this.__color.toString()), color: "rgb(" + a + "," + a + "," + a + ")", textShadow: this.__input_textShadow + "rgba(" + s + "," + s + "," + s + ",.7)", }); }, }); var l = ["-moz-", "-o-", "-webkit-", "-ms-", ""]; return s; })( n.controllers.Controller, n.dom.dom, (n.color.Color = (function (e, t, i, n) { function r(e, t, i) { Object.defineProperty(e, t, { get: function () { return "RGB" === this.__state.space ? this.__state[t] : (a(this, t, i), this.__state[t]); }, set: function (e) { "RGB" !== this.__state.space && (a(this, t, i), (this.__state.space = "RGB")), (this.__state[t] = e); }, }); } function o(e, t) { Object.defineProperty(e, t, { get: function () { return "HSV" === this.__state.space ? this.__state[t] : (s(this), this.__state[t]); }, set: function (e) { "HSV" !== this.__state.space && (s(this), (this.__state.space = "HSV")), (this.__state[t] = e); }, }); } function a(e, i, r) { if ("HEX" === e.__state.space) e.__state[i] = t.component_from_hex(e.__state.hex, r); else { if ("HSV" !== e.__state.space) throw "Corrupted color state"; n.extend(e.__state, t.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v)); } } function s(e) { var i = t.rgb_to_hsv(e.r, e.g, e.b); n.extend(e.__state, { s: i.s, v: i.v }), n.isNaN(i.h) ? n.isUndefined(e.__state.h) && (e.__state.h = 0) : (e.__state.h = i.h); } var l = function () { if (((this.__state = e.apply(this, arguments)), this.__state === !1)) throw "Failed to interpret color arguments"; this.__state.a = this.__state.a || 1; }; return ( (l.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"]), n.extend(l.prototype, { toString: function () { return i(this); }, toOriginal: function () { return this.__state.conversion.write(this); }, }), r(l.prototype, "r", 2), r(l.prototype, "g", 1), r(l.prototype, "b", 0), o(l.prototype, "h"), o(l.prototype, "s"), o(l.prototype, "v"), Object.defineProperty(l.prototype, "a", { get: function () { return this.__state.a; }, set: function (e) { this.__state.a = e; }, }), Object.defineProperty(l.prototype, "hex", { get: function () { return "HEX" !== !this.__state.space && (this.__state.hex = t.rgb_to_hex(this.r, this.g, this.b)), this.__state.hex; }, set: function (e) { (this.__state.space = "HEX"), (this.__state.hex = e); }, }), l ); })( n.color.interpret, (n.color.math = (function () { var e; return { hsv_to_rgb: function (e, t, i) { var n = Math.floor(e / 60) % 6, r = e / 60 - Math.floor(e / 60), o = i * (1 - t), a = i * (1 - r * t), s = i * (1 - (1 - r) * t), l = [ [i, s, o], [a, i, o], [o, i, s], [o, a, i], [s, o, i], [i, o, a], ][n]; return { r: 255 * l[0], g: 255 * l[1], b: 255 * l[2] }; }, rgb_to_hsv: function (e, t, i) { var n, r, o = Math.min(e, t, i), a = Math.max(e, t, i), s = a - o; return 0 == a ? { h: NaN, s: 0, v: 0 } : ((r = s / a), (n = e == a ? (t - i) / s : t == a ? 2 + (i - e) / s : 4 + (e - t) / s), (n /= 6), 0 > n && (n += 1), { h: 360 * n, s: r, v: a / 255 }); }, rgb_to_hex: function (e, t, i) { var n = this.hex_with_component(0, 2, e); return (n = this.hex_with_component(n, 1, t)), (n = this.hex_with_component(n, 0, i)); }, component_from_hex: function (e, t) { return (e >> (8 * t)) & 255; }, hex_with_component: function (t, i, n) { return (n << (e = 8 * i)) | (t & ~(255 << e)); }, }; })()), n.color.toString, n.utils.common )), n.color.interpret, n.utils.common )), (n.utils.requestAnimationFrame = (function () { return ( window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e, t) { window.setTimeout(e, 1e3 / 60); } ); })()), (n.dom.CenteredDiv = (function (e, t) { var i = function () { (this.backgroundElement = document.createElement("div")), t.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", }), e.makeFullscreen(this.backgroundElement), (this.backgroundElement.style.position = "fixed"), (this.domElement = document.createElement("div")), t.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement); var i = this; e.bind(this.backgroundElement, "click", function () { i.hide(); }); }; return ( (i.prototype.show = function () { var e = this; (this.backgroundElement.style.display = "block"), (this.domElement.style.display = "block"), (this.domElement.style.opacity = 0), (this.domElement.style.webkitTransform = "scale(1.1)"), this.layout(), t.defer(function () { (e.backgroundElement.style.opacity = 1), (e.domElement.style.opacity = 1), (e.domElement.style.webkitTransform = "scale(1)"); }); }), (i.prototype.hide = function () { var t = this, i = function () { (t.domElement.style.display = "none"), (t.backgroundElement.style.display = "none"), e.unbind(t.domElement, "webkitTransitionEnd", i), e.unbind(t.domElement, "transitionend", i), e.unbind(t.domElement, "oTransitionEnd", i); }; e.bind(this.domElement, "webkitTransitionEnd", i), e.bind(this.domElement, "transitionend", i), e.bind(this.domElement, "oTransitionEnd", i), (this.backgroundElement.style.opacity = 0), (this.domElement.style.opacity = 0), (this.domElement.style.webkitTransform = "scale(1.1)"); }), (i.prototype.layout = function () { (this.domElement.style.left = window.innerWidth / 2 - e.getWidth(this.domElement) / 2 + "px"), (this.domElement.style.top = window.innerHeight / 2 - e.getHeight(this.domElement) / 2 + "px"); }), i ); })(n.dom.dom, n.utils.common)), n.dom.dom, n.utils.common )); }, {}, ], 193: [ function (e, t, i) { !(function (e, i) { "undefined" != typeof t ? (t.exports = i()) : "function" == typeof define && "object" == typeof define.amd ? define(i) : (this[e] = i()); })("domready", function () { var e, t = [], i = document, n = i.documentElement.doScroll, r = "DOMContentLoaded", o = (n ? /^loaded|^c/ : /^loaded|^i|^c/).test(i.readyState); return ( o || i.addEventListener( r, (e = function () { for (i.removeEventListener(r, e), o = 1; (e = t.shift());) e(); }) ), function (e) { o ? setTimeout(e, 0) : t.push(e); } ); }); }, {}, ], 194: [ function (e, t, i) { "use strict"; var n, r, o, a, s, l, c, u = e("d"), h = e("es5-ext/object/valid-callable"), d = Function.prototype.apply, f = Function.prototype.call, p = Object.create, m = Object.defineProperty, v = Object.defineProperties, g = Object.prototype.hasOwnProperty, y = { configurable: !0, enumerable: !1, writable: !0 }; (n = function (e, t) { var i; return h(t), g.call(this, "__ee__") ? (i = this.__ee__) : ((i = y.value = p(null)), m(this, "__ee__", y), (y.value = null)), i[e] ? ("object" == typeof i[e] ? i[e].push(t) : (i[e] = [i[e], t])) : (i[e] = t), this; }), (r = function (e, t) { var i, r; return ( h(t), (r = this), n.call( this, e, (i = function () { o.call(r, e, i), d.call(t, this, arguments); }) ), (i.__eeOnceListener__ = t), this ); }), (o = function (e, t) { var i, n, r, o; if ((h(t), !g.call(this, "__ee__"))) return this; if (((i = this.__ee__), !i[e])) return this; if (((n = i[e]), "object" == typeof n)) for (o = 0; (r = n[o]); ++o)(r === t || r.__eeOnceListener__ === t) && (2 === n.length ? (i[e] = n[o ? 0 : 1]) : n.splice(o, 1)); else(n === t || n.__eeOnceListener__ === t) && delete i[e]; return this; }), (a = function (e) { var t, i, n, r, o; if (g.call(this, "__ee__") && (r = this.__ee__[e])) if ("object" == typeof r) { for (i = arguments.length, o = new Array(i - 1), t = 1; i > t; ++t) o[t - 1] = arguments[t]; for (r = r.slice(), t = 0; (n = r[t]); ++t) d.call(n, this, o); } else switch (arguments.length) { case 1: f.call(r, this); break; case 2: f.call(r, this, arguments[1]); break; case 3: f.call(r, this, arguments[1], arguments[2]); break; default: for (i = arguments.length, o = new Array(i - 1), t = 1; i > t; ++t) o[t - 1] = arguments[t]; d.call(r, this, o); } }), (s = { on: n, once: r, off: o, emit: a }), (l = { on: u(n), once: u(r), off: u(o), emit: u(a) }), (c = v({}, l)), (t.exports = i = function (e) { return null == e ? p(c) : v(Object(e), l); }), (i.methods = s); }, { d: 195, "es5-ext/object/valid-callable": 204 }, ], 195: [ function (e, t, i) { "use strict"; var n, r = e("es5-ext/object/assign"), o = e("es5-ext/object/normalize-options"), a = e("es5-ext/object/is-callable"), s = e("es5-ext/string/#/contains"); (n = t.exports = function (e, t) { var i, n, a, l, c; return ( arguments.length < 2 || "string" != typeof e ? ((l = t), (t = e), (e = null)) : (l = arguments[2]), null == e ? ((i = a = !0), (n = !1)) : ((i = s.call(e, "c")), (n = s.call(e, "e")), (a = s.call(e, "w"))), (c = { value: t, configurable: i, enumerable: n, writable: a }), l ? r(o(l), c) : c ); }), (n.gs = function (e, t, i) { var n, l, c, u; return ( "string" != typeof e ? ((c = i), (i = t), (t = e), (e = null)) : (c = arguments[3]), null == t ? (t = void 0) : a(t) ? (null == i ? (i = void 0) : a(i) || ((c = i), (i = void 0))) : ((c = t), (t = i = void 0)), null == e ? ((n = !0), (l = !1)) : ((n = s.call(e, "c")), (l = s.call(e, "e"))), (u = { get: t, set: i, configurable: n, enumerable: l }), c ? r(o(c), u) : u ); }); }, { "es5-ext/object/assign": 196, "es5-ext/object/is-callable": 199, "es5-ext/object/normalize-options": 203, "es5-ext/string/#/contains": 206 }, ], 196: [ function (e, t, i) { "use strict"; t.exports = e("./is-implemented")() ? Object.assign : e("./shim"); }, { "./is-implemented": 197, "./shim": 198 }, ], 197: [ function (e, t, i) { "use strict"; t.exports = function () { var e, t = Object.assign; return "function" != typeof t ? !1 : ((e = { foo: "raz" }), t(e, { bar: "dwa" }, { trzy: "trzy" }), e.foo + e.bar + e.trzy === "razdwatrzy"); }; }, {}, ], 198: [ function (e, t, i) { "use strict"; var n = e("../keys"), r = e("../valid-value"), o = Math.max; t.exports = function (e, t) { var i, a, s, l = o(arguments.length, 2); for ( e = Object(r(e)), s = function (n) { try { e[n] = t[n]; } catch (r) { i || (i = r); } }, a = 1; l > a; ++a ) (t = arguments[a]), n(t).forEach(s); if (void 0 !== i) throw i; return e; }; }, { "../keys": 200, "../valid-value": 205 }, ], 199: [ function (e, t, i) { "use strict"; t.exports = function (e) { return "function" == typeof e; }; }, {}, ], 200: [ function (e, t, i) { "use strict"; t.exports = e("./is-implemented")() ? Object.keys : e("./shim"); }, { "./is-implemented": 201, "./shim": 202 }, ], 201: [ function (e, t, i) { "use strict"; t.exports = function () { try { return Object.keys("primitive"), !0; } catch (e) { return !1; } }; }, {}, ], 202: [ function (e, t, i) { "use strict"; var n = Object.keys; t.exports = function (e) { return n(null == e ? e : Object(e)); }; }, {}, ], 203: [ function (e, t, i) { "use strict"; var n = Array.prototype.forEach, r = Object.create, o = function (e, t) { var i; for (i in e) t[i] = e[i]; }; t.exports = function (e) { var t = r(null); return ( n.call(arguments, function (e) { null != e && o(Object(e), t); }), t ); }; }, {}, ], 204: [ function (e, t, i) { "use strict"; t.exports = function (e) { if ("function" != typeof e) throw new TypeError(e + " is not a function"); return e; }; }, {}, ], 205: [ function (e, t, i) { "use strict"; t.exports = function (e) { if (null == e) throw new TypeError("Cannot use null or undefined"); return e; }; }, {}, ], 206: [ function (e, t, i) { "use strict"; t.exports = e("./is-implemented")() ? String.prototype.contains : e("./shim"); }, { "./is-implemented": 207, "./shim": 208 }, ], 207: [ function (e, t, i) { "use strict"; var n = "razdwatrzy"; t.exports = function () { return "function" != typeof n.contains ? !1 : n.contains("dwa") === !0 && n.contains("foo") === !1; }; }, {}, ], 208: [ function (e, t, i) { "use strict"; var n = String.prototype.indexOf; t.exports = function (e) { return n.call(this, e, arguments[1]) > -1; }; }, {}, ], 209: [ function (e, t, i) { (function (e) { var i = "undefined" != typeof t && t.exports && "undefined" != typeof e ? e : this || window; (i._gsQueue || (i._gsQueue = [])).push(function () { "use strict"; i._gsDefine( "TweenMax", ["core.Animation", "core.SimpleTimeline", "TweenLite"], function (e, t, i) { var n = function (e) { var t, i = [], n = e.length; for (t = 0; t !== n; i.push(e[t++])); return i; }, r = function (e, t, i) { var n, r, o = e.cycle; for (n in o)(r = o[n]), (e[n] = "function" == typeof r ? r.call(t[i], i) : r[i % r.length]); delete e.cycle; }, o = function (e, t, n) { i.call(this, e, t, n), (this._cycle = 0), (this._yoyo = this.vars.yoyo === !0), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), (this._dirty = !0), (this.render = o.prototype.render); }, a = 1e-10, s = i._internals, l = s.isSelector, c = s.isArray, u = (o.prototype = i.to({}, 0.1, {})), h = []; (o.version = "1.18.0"), (u.constructor = o), (u.kill()._gc = !1), (o.killTweensOf = o.killDelayedCallsTo = i.killTweensOf), (o.getTweensOf = i.getTweensOf), (o.lagSmoothing = i.lagSmoothing), (o.ticker = i.ticker), (o.render = i.render), (u.invalidate = function () { return (this._yoyo = this.vars.yoyo === !0), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), this._uncache(!0), i.prototype.invalidate.call(this); }), (u.updateTo = function (e, t) { var n, r = this.ratio, o = this.vars.immediateRender || e.immediateRender; t && this._startTime < this._timeline._time && ((this._startTime = this._timeline._time), this._uncache(!1), this._gc ? this._enabled(!0, !1) : this._timeline.insert(this, this._startTime - this._delay)); for (n in e) this.vars[n] = e[n]; if (this._initted || o) if (t)(this._initted = !1), o && this.render(0, !0, !0); else if ((this._gc && this._enabled(!0, !1), this._notifyPluginsOfEnabled && this._firstPT && i._onPluginEvent("_onDisable", this), this._time / this._duration > 0.998)) { var a = this._time; this.render(0, !0, !1), (this._initted = !1), this.render(a, !0, !1); } else if (this._time > 0 || o) { (this._initted = !1), this._init(); for (var s, l = 1 / (1 - r), c = this._firstPT; c;)(s = c.s + c.c), (c.c *= l), (c.s = s - c.c), (c = c._next); } return this; }), (u.render = function (e, t, i) { this._initted || (0 === this._duration && this.vars.repeat && this.invalidate()); var n, r, o, l, c, u, h, d, f = this._dirty ? this.totalDuration() : this._totalDuration, p = this._time, m = this._totalTime, v = this._cycle, g = this._duration, y = this._rawPrevTime; if ( (e >= f ? ((this._totalTime = f), (this._cycle = this._repeat), this._yoyo && 0 !== (1 & this._cycle) ? ((this._time = 0), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0)) : ((this._time = g), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1)), this._reversed || ((n = !0), (r = "onComplete"), (i = i || this._timeline.autoRemoveChildren)), 0 === g && (this._initted || !this.vars.lazy || i) && (this._startTime === this._timeline._duration && (e = 0), (0 === e || 0 > y || y === a) && y !== e && ((i = !0), y > a && (r = "onReverseComplete")), (this._rawPrevTime = d = !t || e || y === e ? e : a))) : 1e-7 > e ? ((this._totalTime = this._time = this._cycle = 0), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0), (0 !== m || (0 === g && y > 0)) && ((r = "onReverseComplete"), (n = this._reversed)), 0 > e && ((this._active = !1), 0 === g && (this._initted || !this.vars.lazy || i) && (y >= 0 && (i = !0), (this._rawPrevTime = d = !t || e || y === e ? e : a))), this._initted || (i = !0)) : ((this._totalTime = this._time = e), 0 !== this._repeat && ((l = g + this._repeatDelay), (this._cycle = (this._totalTime / l) >> 0), 0 !== this._cycle && this._cycle === this._totalTime / l && this._cycle--, (this._time = this._totalTime - this._cycle * l), this._yoyo && 0 !== (1 & this._cycle) && (this._time = g - this._time), this._time > g ? (this._time = g) : this._time < 0 && (this._time = 0)), this._easeType ? ((c = this._time / g), (u = this._easeType), (h = this._easePower), (1 === u || (3 === u && c >= 0.5)) && (c = 1 - c), 3 === u && (c *= 2), 1 === h ? (c *= c) : 2 === h ? (c *= c * c) : 3 === h ? (c *= c * c * c) : 4 === h && (c *= c * c * c * c), 1 === u ? (this.ratio = 1 - c) : 2 === u ? (this.ratio = c) : this._time / g < 0.5 ? (this.ratio = c / 2) : (this.ratio = 1 - c / 2)) : (this.ratio = this._ease.getRatio(this._time / g))), p === this._time && !i && v === this._cycle) ) return void(m !== this._totalTime && this._onUpdate && (t || this._callback("onUpdate"))); if (!this._initted) { if ((this._init(), !this._initted || this._gc)) return; if (!i && this._firstPT && ((this.vars.lazy !== !1 && this._duration) || (this.vars.lazy && !this._duration))) return (this._time = p), (this._totalTime = m), (this._rawPrevTime = y), (this._cycle = v), s.lazyTweens.push(this), void(this._lazy = [e, t]); this._time && !n ? (this.ratio = this._ease.getRatio(this._time / g)) : n && this._ease._calcEnd && (this.ratio = this._ease.getRatio(0 === this._time ? 0 : 1)); } for ( this._lazy !== !1 && (this._lazy = !1), this._active || (!this._paused && this._time !== p && e >= 0 && (this._active = !0)), 0 === m && (2 === this._initted && e > 0 && this._init(), this._startAt && (e >= 0 ? this._startAt.render(e, t, i) : r || (r = "_dummyGS")), this.vars.onStart && (0 !== this._totalTime || 0 === g) && (t || this._callback("onStart"))), o = this._firstPT; o; ) o.f ? o.t[o.p](o.c * this.ratio + o.s) : (o.t[o.p] = o.c * this.ratio + o.s), (o = o._next); this._onUpdate && (0 > e && this._startAt && this._startTime && this._startAt.render(e, t, i), t || ((this._totalTime !== m || n) && this._callback("onUpdate"))), this._cycle !== v && (t || this._gc || (this.vars.onRepeat && this._callback("onRepeat"))), r && (!this._gc || i) && (0 > e && this._startAt && !this._onUpdate && this._startTime && this._startAt.render(e, t, i), n && (this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)), !t && this.vars[r] && this._callback(r), 0 === g && this._rawPrevTime === a && d !== a && (this._rawPrevTime = 0)); }), (o.to = function (e, t, i) { return new o(e, t, i); }), (o.from = function (e, t, i) { return (i.runBackwards = !0), (i.immediateRender = 0 != i.immediateRender), new o(e, t, i); }), (o.fromTo = function (e, t, i, n) { return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), new o(e, t, n); }), (o.staggerTo = o.allTo = function (e, t, a, s, u, d, f) { s = s || 0; var p, m, v, g, y = a.delay || 0, _ = [], b = function () { a.onComplete && a.onComplete.apply(a.onCompleteScope || this, arguments), u.apply(f || a.callbackScope || this, d || h); }, x = a.cycle, w = a.startAt && a.startAt.cycle; for (c(e) || ("string" == typeof e && (e = i.selector(e) || e), l(e) && (e = n(e))), e = e || [], 0 > s && ((e = n(e)), e.reverse(), (s *= -1)), p = e.length - 1, v = 0; p >= v; v++) { m = {}; for (g in a) m[g] = a[g]; if ((x && r(m, e, v), w)) { w = m.startAt = {}; for (g in a.startAt) w[g] = a.startAt[g]; r(m.startAt, e, v); } (m.delay = y), v === p && u && (m.onComplete = b), (_[v] = new o(e[v], t, m)), (y += s); } return _; }), (o.staggerFrom = o.allFrom = function (e, t, i, n, r, a, s) { return (i.runBackwards = !0), (i.immediateRender = 0 != i.immediateRender), o.staggerTo(e, t, i, n, r, a, s); }), (o.staggerFromTo = o.allFromTo = function (e, t, i, n, r, a, s, l) { return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), o.staggerTo(e, t, n, r, a, s, l); }), (o.delayedCall = function (e, t, i, n, r) { return new o(t, 0, { delay: e, onComplete: t, onCompleteParams: i, callbackScope: n, onReverseComplete: t, onReverseCompleteParams: i, immediateRender: !1, useFrames: r, overwrite: 0 }); }), (o.set = function (e, t) { return new o(e, 0, t); }), (o.isTweening = function (e) { return i.getTweensOf(e, !0).length > 0; }); var d = function (e, t) { for (var n = [], r = 0, o = e._first; o;) o instanceof i ? (n[r++] = o) : (t && (n[r++] = o), (n = n.concat(d(o, t))), (r = n.length)), (o = o._next); return n; }, f = (o.getAllTweens = function (t) { return d(e._rootTimeline, t).concat(d(e._rootFramesTimeline, t)); }); (o.killAll = function (e, i, n, r) { null == i && (i = !0), null == n && (n = !0); var o, a, s, l = f(0 != r), c = l.length, u = i && n && r; for (s = 0; c > s; s++)(a = l[s]), (u || a instanceof t || ((o = a.target === a.vars.onComplete) && n) || (i && !o)) && (e ? a.totalTime(a._reversed ? 0 : a.totalDuration()) : a._enabled(!1, !1)); }), (o.killChildTweensOf = function (e, t) { if (null != e) { var r, a, u, h, d, f = s.tweenLookup; if (("string" == typeof e && (e = i.selector(e) || e), l(e) && (e = n(e)), c(e))) for (h = e.length; --h > -1;) o.killChildTweensOf(e[h], t); else { r = []; for (u in f) for (a = f[u].target.parentNode; a;) a === e && (r = r.concat(f[u].tweens)), (a = a.parentNode); for (d = r.length, h = 0; d > h; h++) t && r[h].totalTime(r[h].totalDuration()), r[h]._enabled(!1, !1); } } }); var p = function (e, i, n, r) { (i = i !== !1), (n = n !== !1), (r = r !== !1); for (var o, a, s = f(r), l = i && n && r, c = s.length; --c > -1;)(a = s[c]), (l || a instanceof t || ((o = a.target === a.vars.onComplete) && n) || (i && !o)) && a.paused(e); }; return ( (o.pauseAll = function (e, t, i) { p(!0, e, t, i); }), (o.resumeAll = function (e, t, i) { p(!1, e, t, i); }), (o.globalTimeScale = function (t) { var n = e._rootTimeline, r = i.ticker.time; return arguments.length ? ((t = t || a), (n._startTime = r - ((r - n._startTime) * n._timeScale) / t), (n = e._rootFramesTimeline), (r = i.ticker.frame), (n._startTime = r - ((r - n._startTime) * n._timeScale) / t), (n._timeScale = e._rootTimeline._timeScale = t), t) : n._timeScale; }), (u.progress = function (e) { return arguments.length ? this.totalTime(this.duration() * (this._yoyo && 0 !== (1 & this._cycle) ? 1 - e : e) + this._cycle * (this._duration + this._repeatDelay), !1) : this._time / this.duration(); }), (u.totalProgress = function (e) { return arguments.length ? this.totalTime(this.totalDuration() * e, !1) : this._totalTime / this.totalDuration(); }), (u.time = function (e, t) { return arguments.length ? (this._dirty && this.totalDuration(), e > this._duration && (e = this._duration), this._yoyo && 0 !== (1 & this._cycle) ? (e = this._duration - e + this._cycle * (this._duration + this._repeatDelay)) : 0 !== this._repeat && (e += this._cycle * (this._duration + this._repeatDelay)), this.totalTime(e, t)) : this._time; }), (u.duration = function (t) { return arguments.length ? e.prototype.duration.call(this, t) : this._duration; }), (u.totalDuration = function (e) { return arguments.length ? -1 === this._repeat ? this : this.duration((e - this._repeat * this._repeatDelay) / (this._repeat + 1)) : (this._dirty && ((this._totalDuration = -1 === this._repeat ? 999999999999 : this._duration * (this._repeat + 1) + this._repeatDelay * this._repeat), (this._dirty = !1)), this._totalDuration); }), (u.repeat = function (e) { return arguments.length ? ((this._repeat = e), this._uncache(!0)) : this._repeat; }), (u.repeatDelay = function (e) { return arguments.length ? ((this._repeatDelay = e), this._uncache(!0)) : this._repeatDelay; }), (u.yoyo = function (e) { return arguments.length ? ((this._yoyo = e), this) : this._yoyo; }), o ); }, !0 ), i._gsDefine( "TimelineLite", ["core.Animation", "core.SimpleTimeline", "TweenLite"], function (e, t, n) { var r = function (e) { t.call(this, e), (this._labels = {}), (this.autoRemoveChildren = this.vars.autoRemoveChildren === !0), (this.smoothChildTiming = this.vars.smoothChildTiming === !0), (this._sortChildren = !0), (this._onUpdate = this.vars.onUpdate); var i, n, r = this.vars; for (n in r)(i = r[n]), c(i) && -1 !== i.join("").indexOf("{self}") && (r[n] = this._swapSelfInParams(i)); c(r.tweens) && this.add(r.tweens, 0, r.align, r.stagger); }, o = 1e-10, a = n._internals, s = (r._internals = {}), l = a.isSelector, c = a.isArray, u = a.lazyTweens, h = a.lazyRender, d = i._gsDefine.globals, f = function (e) { var t, i = {}; for (t in e) i[t] = e[t]; return i; }, p = function (e, t, i) { var n, r, o = e.cycle; for (n in o)(r = o[n]), (e[n] = "function" == typeof r ? r.call(t[i], i) : r[i % r.length]); delete e.cycle; }, m = (s.pauseCallback = function () {}), v = function (e) { var t, i = [], n = e.length; for (t = 0; t !== n; i.push(e[t++])); return i; }, g = (r.prototype = new t()); return ( (r.version = "1.18.0"), (g.constructor = r), (g.kill()._gc = g._forcingPlayhead = g._hasPause = !1), (g.to = function (e, t, i, r) { var o = (i.repeat && d.TweenMax) || n; return t ? this.add(new o(e, t, i), r) : this.set(e, i, r); }), (g.from = function (e, t, i, r) { return this.add(((i.repeat && d.TweenMax) || n).from(e, t, i), r); }), (g.fromTo = function (e, t, i, r, o) { var a = (r.repeat && d.TweenMax) || n; return t ? this.add(a.fromTo(e, t, i, r), o) : this.set(e, r, o); }), (g.staggerTo = function (e, t, i, o, a, s, c, u) { var h, d, m = new r({ onComplete: s, onCompleteParams: c, callbackScope: u, smoothChildTiming: this.smoothChildTiming }), g = i.cycle; for ("string" == typeof e && (e = n.selector(e) || e), e = e || [], l(e) && (e = v(e)), o = o || 0, 0 > o && ((e = v(e)), e.reverse(), (o *= -1)), d = 0; d < e.length; d++) (h = f(i)), h.startAt && ((h.startAt = f(h.startAt)), h.startAt.cycle && p(h.startAt, e, d)), g && p(h, e, d), m.to(e[d], t, h, d * o); return this.add(m, a); }), (g.staggerFrom = function (e, t, i, n, r, o, a, s) { return (i.immediateRender = 0 != i.immediateRender), (i.runBackwards = !0), this.staggerTo(e, t, i, n, r, o, a, s); }), (g.staggerFromTo = function (e, t, i, n, r, o, a, s, l) { return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), this.staggerTo(e, t, n, r, o, a, s, l); }), (g.call = function (e, t, i, r) { return this.add(n.delayedCall(0, e, t, i), r); }), (g.set = function (e, t, i) { return (i = this._parseTimeOrLabel(i, 0, !0)), null == t.immediateRender && (t.immediateRender = i === this._time && !this._paused), this.add(new n(e, 0, t), i); }), (r.exportRoot = function (e, t) { (e = e || {}), null == e.smoothChildTiming && (e.smoothChildTiming = !0); var i, o, a = new r(e), s = a._timeline; for (null == t && (t = !0), s._remove(a, !0), a._startTime = 0, a._rawPrevTime = a._time = a._totalTime = s._time, i = s._first; i;) (o = i._next), (t && i instanceof n && i.target === i.vars.onComplete) || a.add(i, i._startTime - i._delay), (i = o); return s.add(a, 0), a; }), (g.add = function (i, o, a, s) { var l, u, h, d, f, p; if (("number" != typeof o && (o = this._parseTimeOrLabel(o, 0, !0, i)), !(i instanceof e))) { if (i instanceof Array || (i && i.push && c(i))) { for (a = a || "normal", s = s || 0, l = o, u = i.length, h = 0; u > h; h++) c((d = i[h])) && (d = new r({ tweens: d })), this.add(d, l), "string" != typeof d && "function" != typeof d && ("sequence" === a ? (l = d._startTime + d.totalDuration() / d._timeScale) : "start" === a && (d._startTime -= d.delay())), (l += s); return this._uncache(!0); } if ("string" == typeof i) return this.addLabel(i, o); if ("function" != typeof i) throw "Cannot add " + i + " into the timeline; it is not a tween, timeline, function, or string."; i = n.delayedCall(0, i); } if ((t.prototype.add.call(this, i, o), (this._gc || this._time === this._duration) && !this._paused && this._duration < this.duration())) for (f = this, p = f.rawTime() > i._startTime; f._timeline;) p && f._timeline.smoothChildTiming ? f.totalTime(f._totalTime, !0) : f._gc && f._enabled(!0, !1), (f = f._timeline); return this; }), (g.remove = function (t) { if (t instanceof e) { this._remove(t, !1); var i = (t._timeline = t.vars.useFrames ? e._rootFramesTimeline : e._rootTimeline); return (t._startTime = (t._paused ? t._pauseTime : i._time) - (t._reversed ? t.totalDuration() - t._totalTime : t._totalTime) / t._timeScale), this; } if (t instanceof Array || (t && t.push && c(t))) { for (var n = t.length; --n > -1;) this.remove(t[n]); return this; } return "string" == typeof t ? this.removeLabel(t) : this.kill(null, t); }), (g._remove = function (e, i) { t.prototype._remove.call(this, e, i); var n = this._last; return ( n ? this._time > n._startTime + n._totalDuration / n._timeScale && ((this._time = this.duration()), (this._totalTime = this._totalDuration)) : (this._time = this._totalTime = this._duration = this._totalDuration = 0), this ); }), (g.append = function (e, t) { return this.add(e, this._parseTimeOrLabel(null, t, !0, e)); }), (g.insert = g.insertMultiple = function (e, t, i, n) { return this.add(e, t || 0, i, n); }), (g.appendMultiple = function (e, t, i, n) { return this.add(e, this._parseTimeOrLabel(null, t, !0, e), i, n); }), (g.addLabel = function (e, t) { return (this._labels[e] = this._parseTimeOrLabel(t)), this; }), (g.addPause = function (e, t, i, r) { var o = n.delayedCall(0, m, i, r || this); return (o.vars.onComplete = o.vars.onReverseComplete = t), (o.data = "isPause"), (this._hasPause = !0), this.add(o, e); }), (g.removeLabel = function (e) { return delete this._labels[e], this; }), (g.getLabelTime = function (e) { return null != this._labels[e] ? this._labels[e] : -1; }), (g._parseTimeOrLabel = function (t, i, n, r) { var o; if (r instanceof e && r.timeline === this) this.remove(r); else if (r && (r instanceof Array || (r.push && c(r)))) for (o = r.length; --o > -1;) r[o] instanceof e && r[o].timeline === this && this.remove(r[o]); if ("string" == typeof i) return this._parseTimeOrLabel(i, n && "number" == typeof t && null == this._labels[i] ? t - this.duration() : 0, n); if (((i = i || 0), "string" != typeof t || (!isNaN(t) && null == this._labels[t]))) null == t && (t = this.duration()); else { if (((o = t.indexOf("=")), -1 === o)) return null == this._labels[t] ? (n ? (this._labels[t] = this.duration() + i) : i) : this._labels[t] + i; (i = parseInt(t.charAt(o - 1) + "1", 10) * Number(t.substr(o + 1))), (t = o > 1 ? this._parseTimeOrLabel(t.substr(0, o - 1), 0, n) : this.duration()); } return Number(t) + i; }), (g.seek = function (e, t) { return this.totalTime("number" == typeof e ? e : this._parseTimeOrLabel(e), t !== !1); }), (g.stop = function () { return this.paused(!0); }), (g.gotoAndPlay = function (e, t) { return this.play(e, t); }), (g.gotoAndStop = function (e, t) { return this.pause(e, t); }), (g.render = function (e, t, i) { this._gc && this._enabled(!0, !1); var n, r, a, s, l, c, d = this._dirty ? this.totalDuration() : this._totalDuration, f = this._time, p = this._startTime, m = this._timeScale, v = this._paused; if (e >= d) (this._totalTime = this._time = d), this._reversed || this._hasPausedChild() || ((r = !0), (s = "onComplete"), (l = !!this._timeline.autoRemoveChildren), 0 === this._duration && (0 === e || this._rawPrevTime < 0 || this._rawPrevTime === o) && this._rawPrevTime !== e && this._first && ((l = !0), this._rawPrevTime > o && (s = "onReverseComplete"))), (this._rawPrevTime = this._duration || !t || e || this._rawPrevTime === e ? e : o), (e = d + 1e-4); else if (1e-7 > e) if ( ((this._totalTime = this._time = 0), (0 !== f || (0 === this._duration && this._rawPrevTime !== o && (this._rawPrevTime > 0 || (0 > e && this._rawPrevTime >= 0)))) && ((s = "onReverseComplete"), (r = this._reversed)), 0 > e) ) (this._active = !1), this._timeline.autoRemoveChildren && this._reversed ? ((l = r = !0), (s = "onReverseComplete")) : this._rawPrevTime >= 0 && this._first && (l = !0), (this._rawPrevTime = e); else { if (((this._rawPrevTime = this._duration || !t || e || this._rawPrevTime === e ? e : o), 0 === e && r)) for (n = this._first; n && 0 === n._startTime;) n._duration || (r = !1), (n = n._next); (e = 0), this._initted || (l = !0); } else { if (this._hasPause && !this._forcingPlayhead && !t) { if (e >= f) for (n = this._first; n && n._startTime <= e && !c;) n._duration || "isPause" !== n.data || n.ratio || (0 === n._startTime && 0 === this._rawPrevTime) || (c = n), (n = n._next); else for (n = this._last; n && n._startTime >= e && !c;) n._duration || ("isPause" === n.data && n._rawPrevTime > 0 && (c = n)), (n = n._prev); c && ((this._time = e = c._startTime), (this._totalTime = e + this._cycle * (this._totalDuration + this._repeatDelay))); } this._totalTime = this._time = this._rawPrevTime = e; } if ((this._time !== f && this._first) || i || l || c) { if ( (this._initted || (this._initted = !0), this._active || (!this._paused && this._time !== f && e > 0 && (this._active = !0)), 0 === f && this.vars.onStart && 0 !== this._time && (t || this._callback("onStart")), this._time >= f) ) for (n = this._first; n && ((a = n._next), !this._paused || v);) (n._active || (n._startTime <= this._time && !n._paused && !n._gc)) && (c === n && this.pause(), n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i)), (n = a); else for (n = this._last; n && ((a = n._prev), !this._paused || v);) { if (n._active || (n._startTime <= f && !n._paused && !n._gc)) { if (c === n) { for (c = n._prev; c && c.endTime() > this._time;) c.render(c._reversed ? c.totalDuration() - (e - c._startTime) * c._timeScale : (e - c._startTime) * c._timeScale, t, i), (c = c._prev); (c = null), this.pause(); } n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i); } n = a; } this._onUpdate && (t || (u.length && h(), this._callback("onUpdate"))), s && (this._gc || ((p === this._startTime || m !== this._timeScale) && (0 === this._time || d >= this.totalDuration()) && (r && (u.length && h(), this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)), !t && this.vars[s] && this._callback(s)))); } }), (g._hasPausedChild = function () { for (var e = this._first; e;) { if (e._paused || (e instanceof r && e._hasPausedChild())) return !0; e = e._next; } return !1; }), (g.getChildren = function (e, t, i, r) { r = r || -9999999999; for (var o = [], a = this._first, s = 0; a;) a._startTime < r || (a instanceof n ? t !== !1 && (o[s++] = a) : (i !== !1 && (o[s++] = a), e !== !1 && ((o = o.concat(a.getChildren(!0, t, i))), (s = o.length)))), (a = a._next); return o; }), (g.getTweensOf = function (e, t) { var i, r, o = this._gc, a = [], s = 0; for (o && this._enabled(!0, !0), i = n.getTweensOf(e), r = i.length; --r > -1;)(i[r].timeline === this || (t && this._contains(i[r]))) && (a[s++] = i[r]); return o && this._enabled(!1, !0), a; }), (g.recent = function () { return this._recent; }), (g._contains = function (e) { for (var t = e.timeline; t;) { if (t === this) return !0; t = t.timeline; } return !1; }), (g.shiftChildren = function (e, t, i) { i = i || 0; for (var n, r = this._first, o = this._labels; r;) r._startTime >= i && (r._startTime += e), (r = r._next); if (t) for (n in o) o[n] >= i && (o[n] += e); return this._uncache(!0); }), (g._kill = function (e, t) { if (!e && !t) return this._enabled(!1, !1); for (var i = t ? this.getTweensOf(t) : this.getChildren(!0, !0, !1), n = i.length, r = !1; --n > -1;) i[n]._kill(e, t) && (r = !0); return r; }), (g.clear = function (e) { var t = this.getChildren(!1, !0, !0), i = t.length; for (this._time = this._totalTime = 0; --i > -1;) t[i]._enabled(!1, !1); return e !== !1 && (this._labels = {}), this._uncache(!0); }), (g.invalidate = function () { for (var t = this._first; t;) t.invalidate(), (t = t._next); return e.prototype.invalidate.call(this); }), (g._enabled = function (e, i) { if (e === this._gc) for (var n = this._first; n;) n._enabled(e, !0), (n = n._next); return t.prototype._enabled.call(this, e, i); }), (g.totalTime = function (t, i, n) { this._forcingPlayhead = !0; var r = e.prototype.totalTime.apply(this, arguments); return (this._forcingPlayhead = !1), r; }), (g.duration = function (e) { return arguments.length ? (0 !== this.duration() && 0 !== e && this.timeScale(this._duration / e), this) : (this._dirty && this.totalDuration(), this._duration); }), (g.totalDuration = function (e) { if (!arguments.length) { if (this._dirty) { for (var t, i, n = 0, r = this._last, o = 999999999999; r;) (t = r._prev), r._dirty && r.totalDuration(), r._startTime > o && this._sortChildren && !r._paused ? this.add(r, r._startTime - r._delay) : (o = r._startTime), r._startTime < 0 && !r._paused && ((n -= r._startTime), this._timeline.smoothChildTiming && (this._startTime += r._startTime / this._timeScale), this.shiftChildren(-r._startTime, !1, -9999999999), (o = 0)), (i = r._startTime + r._totalDuration / r._timeScale), i > n && (n = i), (r = t); (this._duration = this._totalDuration = n), (this._dirty = !1); } return this._totalDuration; } return 0 !== this.totalDuration() && 0 !== e && this.timeScale(this._totalDuration / e), this; }), (g.paused = function (t) { if (!t) for (var i = this._first, n = this._time; i;) i._startTime === n && "isPause" === i.data && (i._rawPrevTime = 0), (i = i._next); return e.prototype.paused.apply(this, arguments); }), (g.usesFrames = function () { for (var t = this._timeline; t._timeline;) t = t._timeline; return t === e._rootFramesTimeline; }), (g.rawTime = function () { return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale; }), r ); }, !0 ), i._gsDefine( "TimelineMax", ["TimelineLite", "TweenLite", "easing.Ease"], function (e, t, i) { var n = function (t) { e.call(this, t), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), (this._cycle = 0), (this._yoyo = this.vars.yoyo === !0), (this._dirty = !0); }, r = 1e-10, o = t._internals, a = o.lazyTweens, s = o.lazyRender, l = new i(null, null, 1, 0), c = (n.prototype = new e()); return ( (c.constructor = n), (c.kill()._gc = !1), (n.version = "1.18.0"), (c.invalidate = function () { return (this._yoyo = this.vars.yoyo === !0), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), this._uncache(!0), e.prototype.invalidate.call(this); }), (c.addCallback = function (e, i, n, r) { return this.add(t.delayedCall(0, e, n, r), i); }), (c.removeCallback = function (e, t) { if (e) if (null == t) this._kill(null, e); else for (var i = this.getTweensOf(e, !1), n = i.length, r = this._parseTimeOrLabel(t); --n > -1;) i[n]._startTime === r && i[n]._enabled(!1, !1); return this; }), (c.removePause = function (t) { return this.removeCallback(e._internals.pauseCallback, t); }), (c.tweenTo = function (e, i) { i = i || {}; var n, r, o, a = { ease: l, useFrames: this.usesFrames(), immediateRender: !1 }; for (r in i) a[r] = i[r]; return ( (a.time = this._parseTimeOrLabel(e)), (n = Math.abs(Number(a.time) - this._time) / this._timeScale || 0.001), (o = new t(this, n, a)), (a.onStart = function () { o.target.paused(!0), o.vars.time !== o.target.time() && n === o.duration() && o.duration(Math.abs(o.vars.time - o.target.time()) / o.target._timeScale), i.onStart && o._callback("onStart"); }), o ); }), (c.tweenFromTo = function (e, t, i) { (i = i || {}), (e = this._parseTimeOrLabel(e)), (i.startAt = { onComplete: this.seek, onCompleteParams: [e], callbackScope: this }), (i.immediateRender = i.immediateRender !== !1); var n = this.tweenTo(t, i); return n.duration(Math.abs(n.vars.time - e) / this._timeScale || 0.001); }), (c.render = function (e, t, i) { this._gc && this._enabled(!0, !1); var n, o, l, c, u, h, d, f = this._dirty ? this.totalDuration() : this._totalDuration, p = this._duration, m = this._time, v = this._totalTime, g = this._startTime, y = this._timeScale, _ = this._rawPrevTime, b = this._paused, x = this._cycle; if (e >= f) this._locked || ((this._totalTime = f), (this._cycle = this._repeat)), this._reversed || this._hasPausedChild() || ((o = !0), (c = "onComplete"), (u = !!this._timeline.autoRemoveChildren), 0 === this._duration && (0 === e || 0 > _ || _ === r) && _ !== e && this._first && ((u = !0), _ > r && (c = "onReverseComplete"))), (this._rawPrevTime = this._duration || !t || e || this._rawPrevTime === e ? e : r), this._yoyo && 0 !== (1 & this._cycle) ? (this._time = e = 0) : ((this._time = p), (e = p + 1e-4)); else if (1e-7 > e) if ( (this._locked || (this._totalTime = this._cycle = 0), (this._time = 0), (0 !== m || (0 === p && _ !== r && (_ > 0 || (0 > e && _ >= 0)) && !this._locked)) && ((c = "onReverseComplete"), (o = this._reversed)), 0 > e) ) (this._active = !1), this._timeline.autoRemoveChildren && this._reversed ? ((u = o = !0), (c = "onReverseComplete")) : _ >= 0 && this._first && (u = !0), (this._rawPrevTime = e); else { if (((this._rawPrevTime = p || !t || e || this._rawPrevTime === e ? e : r), 0 === e && o)) for (n = this._first; n && 0 === n._startTime;) n._duration || (o = !1), (n = n._next); (e = 0), this._initted || (u = !0); } else if ( (0 === p && 0 > _ && (u = !0), (this._time = this._rawPrevTime = e), this._locked || ((this._totalTime = e), 0 !== this._repeat && ((h = p + this._repeatDelay), (this._cycle = (this._totalTime / h) >> 0), 0 !== this._cycle && this._cycle === this._totalTime / h && this._cycle--, (this._time = this._totalTime - this._cycle * h), this._yoyo && 0 !== (1 & this._cycle) && (this._time = p - this._time), this._time > p ? ((this._time = p), (e = p + 1e-4)) : this._time < 0 ? (this._time = e = 0) : (e = this._time))), this._hasPause && !this._forcingPlayhead && !t) ) { if (((e = this._time), e >= m)) for (n = this._first; n && n._startTime <= e && !d;) n._duration || "isPause" !== n.data || n.ratio || (0 === n._startTime && 0 === this._rawPrevTime) || (d = n), (n = n._next); else for (n = this._last; n && n._startTime >= e && !d;) n._duration || ("isPause" === n.data && n._rawPrevTime > 0 && (d = n)), (n = n._prev); d && ((this._time = e = d._startTime), (this._totalTime = e + this._cycle * (this._totalDuration + this._repeatDelay))); } if (this._cycle !== x && !this._locked) { var w = this._yoyo && 0 !== (1 & x), M = w === (this._yoyo && 0 !== (1 & this._cycle)), T = this._totalTime, S = this._cycle, E = this._rawPrevTime, A = this._time; if ( ((this._totalTime = x * p), this._cycle < x ? (w = !w) : (this._totalTime += p), (this._time = m), (this._rawPrevTime = 0 === p ? _ - 1e-4 : _), (this._cycle = x), (this._locked = !0), (m = w ? 0 : p), this.render(m, t, 0 === p), t || this._gc || (this.vars.onRepeat && this._callback("onRepeat")), M && ((m = w ? p + 1e-4 : -1e-4), this.render(m, !0, !1)), (this._locked = !1), this._paused && !b) ) return; (this._time = A), (this._totalTime = T), (this._cycle = S), (this._rawPrevTime = E); } if (!((this._time !== m && this._first) || i || u || d)) return void(v !== this._totalTime && this._onUpdate && (t || this._callback("onUpdate"))); if ( (this._initted || (this._initted = !0), this._active || (!this._paused && this._totalTime !== v && e > 0 && (this._active = !0)), 0 === v && this.vars.onStart && 0 !== this._totalTime && (t || this._callback("onStart")), this._time >= m) ) for (n = this._first; n && ((l = n._next), !this._paused || b);) (n._active || (n._startTime <= this._time && !n._paused && !n._gc)) && (d === n && this.pause(), n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i)), (n = l); else for (n = this._last; n && ((l = n._prev), !this._paused || b);) { if (n._active || (n._startTime <= m && !n._paused && !n._gc)) { if (d === n) { for (d = n._prev; d && d.endTime() > this._time;) d.render(d._reversed ? d.totalDuration() - (e - d._startTime) * d._timeScale : (e - d._startTime) * d._timeScale, t, i), (d = d._prev); (d = null), this.pause(); } n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i); } n = l; } this._onUpdate && (t || (a.length && s(), this._callback("onUpdate"))), c && (this._locked || this._gc || ((g === this._startTime || y !== this._timeScale) && (0 === this._time || f >= this.totalDuration()) && (o && (a.length && s(), this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)), !t && this.vars[c] && this._callback(c)))); }), (c.getActive = function (e, t, i) { null == e && (e = !0), null == t && (t = !0), null == i && (i = !1); var n, r, o = [], a = this.getChildren(e, t, i), s = 0, l = a.length; for (n = 0; l > n; n++)(r = a[n]), r.isActive() && (o[s++] = r); return o; }), (c.getLabelAfter = function (e) { e || (0 !== e && (e = this._time)); var t, i = this.getLabelsArray(), n = i.length; for (t = 0; n > t; t++) if (i[t].time > e) return i[t].name; return null; }), (c.getLabelBefore = function (e) { null == e && (e = this._time); for (var t = this.getLabelsArray(), i = t.length; --i > -1;) if (t[i].time < e) return t[i].name; return null; }), (c.getLabelsArray = function () { var e, t = [], i = 0; for (e in this._labels) t[i++] = { time: this._labels[e], name: e }; return ( t.sort(function (e, t) { return e.time - t.time; }), t ); }), (c.progress = function (e, t) { return arguments.length ? this.totalTime(this.duration() * (this._yoyo && 0 !== (1 & this._cycle) ? 1 - e : e) + this._cycle * (this._duration + this._repeatDelay), t) : this._time / this.duration(); }), (c.totalProgress = function (e, t) { return arguments.length ? this.totalTime(this.totalDuration() * e, t) : this._totalTime / this.totalDuration(); }), (c.totalDuration = function (t) { return arguments.length ? -1 === this._repeat ? this : this.duration((t - this._repeat * this._repeatDelay) / (this._repeat + 1)) : (this._dirty && (e.prototype.totalDuration.call(this), (this._totalDuration = -1 === this._repeat ? 999999999999 : this._duration * (this._repeat + 1) + this._repeatDelay * this._repeat)), this._totalDuration); }), (c.time = function (e, t) { return arguments.length ? (this._dirty && this.totalDuration(), e > this._duration && (e = this._duration), this._yoyo && 0 !== (1 & this._cycle) ? (e = this._duration - e + this._cycle * (this._duration + this._repeatDelay)) : 0 !== this._repeat && (e += this._cycle * (this._duration + this._repeatDelay)), this.totalTime(e, t)) : this._time; }), (c.repeat = function (e) { return arguments.length ? ((this._repeat = e), this._uncache(!0)) : this._repeat; }), (c.repeatDelay = function (e) { return arguments.length ? ((this._repeatDelay = e), this._uncache(!0)) : this._repeatDelay; }), (c.yoyo = function (e) { return arguments.length ? ((this._yoyo = e), this) : this._yoyo; }), (c.currentLabel = function (e) { return arguments.length ? this.seek(e, !0) : this.getLabelBefore(this._time + 1e-8); }), n ); }, !0 ), (function () { var e = 180 / Math.PI, t = [], n = [], r = [], o = {}, a = i._gsDefine.globals, s = function (e, t, i, n) { (this.a = e), (this.b = t), (this.c = i), (this.d = n), (this.da = n - e), (this.ca = i - e), (this.ba = t - e); }, l = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,", c = function (e, t, i, n) { var r = { a: e }, o = {}, a = {}, s = { c: n }, l = (e + t) / 2, c = (t + i) / 2, u = (i + n) / 2, h = (l + c) / 2, d = (c + u) / 2, f = (d - h) / 8; return (r.b = l + (e - l) / 4), (o.b = h + f), (r.c = o.a = (r.b + o.b) / 2), (o.c = a.a = (h + d) / 2), (a.b = d - f), (s.b = u + (n - u) / 4), (a.c = s.a = (a.b + s.b) / 2), [r, o, a, s]; }, u = function (e, i, o, a, s) { var l, u, h, d, f, p, m, v, g, y, _, b, x, w = e.length - 1, M = 0, T = e[0].a; for (l = 0; w > l; l++) (f = e[M]), (u = f.a), (h = f.d), (d = e[M + 1].d), s ? ((_ = t[l]), (b = n[l]), (x = ((b + _) * i * 0.25) / (a ? 0.5 : r[l] || 0.5)), (p = h - (h - u) * (a ? 0.5 * i : 0 !== _ ? x / _ : 0)), (m = h + (d - h) * (a ? 0.5 * i : 0 !== b ? x / b : 0)), (v = h - (p + (((m - p) * ((3 * _) / (_ + b) + 0.5)) / 4 || 0)))) : ((p = h - (h - u) * i * 0.5), (m = h + (d - h) * i * 0.5), (v = h - (p + m) / 2)), (p += v), (m += v), (f.c = g = p), 0 !== l ? (f.b = T) : (f.b = T = f.a + 0.6 * (f.c - f.a)), (f.da = h - u), (f.ca = g - u), (f.ba = T - u), o ? ((y = c(u, T, g, h)), e.splice(M, 1, y[0], y[1], y[2], y[3]), (M += 4)) : M++, (T = m); (f = e[M]), (f.b = T), (f.c = T + 0.4 * (f.d - T)), (f.da = f.d - f.a), (f.ca = f.c - f.a), (f.ba = T - f.a), o && ((y = c(f.a, T, f.c, f.d)), e.splice(M, 1, y[0], y[1], y[2], y[3])); }, h = function (e, i, r, o) { var a, l, c, u, h, d, f = []; if (o) for (e = [o].concat(e), l = e.length; --l > -1;) "string" == typeof (d = e[l][i]) && "=" === d.charAt(1) && (e[l][i] = o[i] + Number(d.charAt(0) + d.substr(2))); if (((a = e.length - 2), 0 > a)) return (f[0] = new s(e[0][i], 0, 0, e[-1 > a ? 0 : 1][i])), f; for (l = 0; a > l; l++)(c = e[l][i]), (u = e[l + 1][i]), (f[l] = new s(c, 0, 0, u)), r && ((h = e[l + 2][i]), (t[l] = (t[l] || 0) + (u - c) * (u - c)), (n[l] = (n[l] || 0) + (h - u) * (h - u))); return (f[l] = new s(e[l][i], 0, 0, e[l + 1][i])), f; }, d = function (e, i, a, s, c, d) { var f, p, m, v, g, y, _, b, x = {}, w = [], M = d || e[0]; (c = "string" == typeof c ? "," + c + "," : l), null == i && (i = 1); for (p in e[0]) w.push(p); if (e.length > 1) { for (b = e[e.length - 1], _ = !0, f = w.length; --f > -1;) if (((p = w[f]), Math.abs(M[p] - b[p]) > 0.05)) { _ = !1; break; } _ && ((e = e.concat()), d && e.unshift(d), e.push(e[1]), (d = e[e.length - 3])); } for (t.length = n.length = r.length = 0, f = w.length; --f > -1;)(p = w[f]), (o[p] = -1 !== c.indexOf("," + p + ",")), (x[p] = h(e, p, o[p], d)); for (f = t.length; --f > -1;)(t[f] = Math.sqrt(t[f])), (n[f] = Math.sqrt(n[f])); if (!s) { for (f = w.length; --f > -1;) if (o[p]) for (m = x[w[f]], y = m.length - 1, v = 0; y > v; v++)(g = m[v + 1].da / n[v] + m[v].da / t[v]), (r[v] = (r[v] || 0) + g * g); for (f = r.length; --f > -1;) r[f] = Math.sqrt(r[f]); } for (f = w.length, v = a ? 4 : 1; --f > -1;)(p = w[f]), (m = x[p]), u(m, i, a, s, o[p]), _ && (m.splice(0, v), m.splice(m.length - v, v)); return x; }, f = function (e, t, i) { t = t || "soft"; var n, r, o, a, l, c, u, h, d, f, p, m = {}, v = "cubic" === t ? 3 : 2, g = "soft" === t, y = []; if ((g && i && (e = [i].concat(e)), null == e || e.length < v + 1)) throw "invalid Bezier data"; for (d in e[0]) y.push(d); for (c = y.length; --c > -1;) { for (d = y[c], m[d] = l = [], f = 0, h = e.length, u = 0; h > u; u++) (n = null == i ? e[u][d] : "string" == typeof (p = e[u][d]) && "=" === p.charAt(1) ? i[d] + Number(p.charAt(0) + p.substr(2)) : Number(p)), g && u > 1 && h - 1 > u && (l[f++] = (n + l[f - 2]) / 2), (l[f++] = n); for (h = f - v + 1, f = 0, u = 0; h > u; u += v) (n = l[u]), (r = l[u + 1]), (o = l[u + 2]), (a = 2 === v ? 0 : l[u + 3]), (l[f++] = p = 3 === v ? new s(n, r, o, a) : new s(n, (2 * r + n) / 3, (2 * r + o) / 3, o)); l.length = f; } return m; }, p = function (e, t, i) { for (var n, r, o, a, s, l, c, u, h, d, f, p = 1 / i, m = e.length; --m > -1;) for (d = e[m], o = d.a, a = d.d - o, s = d.c - o, l = d.b - o, n = r = 0, u = 1; i >= u; u++) (c = p * u), (h = 1 - c), (n = r - (r = (c * c * a + 3 * h * (c * s + h * l)) * c)), (f = m * i + u - 1), (t[f] = (t[f] || 0) + n * n); }, m = function (e, t) { t = t >> 0 || 6; var i, n, r, o, a = [], s = [], l = 0, c = 0, u = t - 1, h = [], d = []; for (i in e) p(e[i], a, t); for (r = a.length, n = 0; r > n; n++)(l += Math.sqrt(a[n])), (o = n % t), (d[o] = l), o === u && ((c += l), (o = (n / t) >> 0), (h[o] = d), (s[o] = c), (l = 0), (d = [])); return { length: c, lengths: s, segments: h }; }, v = i._gsDefine.plugin({ propName: "bezier", priority: -1, version: "1.3.4", API: 2, global: !0, init: function (e, t, i) { (this._target = e), t instanceof Array && (t = { values: t }), (this._func = {}), (this._round = {}), (this._props = []), (this._timeRes = null == t.timeResolution ? 6 : parseInt(t.timeResolution, 10)); var n, r, o, a, s, l = t.values || [], c = {}, u = l[0], h = t.autoRotate || i.vars.orientToBezier; this._autoRotate = h ? (h instanceof Array ? h : [ ["x", "y", "rotation", h === !0 ? 0 : Number(h) || 0] ]) : null; for (n in u) this._props.push(n); for (o = this._props.length; --o > -1;) (n = this._props[o]), this._overwriteProps.push(n), (r = this._func[n] = "function" == typeof e[n]), (c[n] = r ? e[n.indexOf("set") || "function" != typeof e["get" + n.substr(3)] ? n : "get" + n.substr(3)]() : parseFloat(e[n])), s || (c[n] !== l[0][n] && (s = c)); if ( ((this._beziers = "cubic" !== t.type && "quadratic" !== t.type && "soft" !== t.type ? d(l, isNaN(t.curviness) ? 1 : t.curviness, !1, "thruBasic" === t.type, t.correlate, s) : f(l, t.type, c)), (this._segCount = this._beziers[n].length), this._timeRes) ) { var p = m(this._beziers, this._timeRes); (this._length = p.length), (this._lengths = p.lengths), (this._segments = p.segments), (this._l1 = this._li = this._s1 = this._si = 0), (this._l2 = this._lengths[0]), (this._curSeg = this._segments[0]), (this._s2 = this._curSeg[0]), (this._prec = 1 / this._curSeg.length); } if ((h = this._autoRotate)) for (this._initialRotations = [], h[0] instanceof Array || (this._autoRotate = h = [h]), o = h.length; --o > -1;) { for (a = 0; 3 > a; a++)(n = h[o][a]), (this._func[n] = "function" == typeof e[n] ? e[n.indexOf("set") || "function" != typeof e["get" + n.substr(3)] ? n : "get" + n.substr(3)] : !1); (n = h[o][2]), (this._initialRotations[o] = this._func[n] ? this._func[n].call(this._target) : this._target[n]); } return (this._startRatio = i.vars.runBackwards ? 1 : 0), !0; }, set: function (t) { var i, n, r, o, a, s, l, c, u, h, d = this._segCount, f = this._func, p = this._target, m = t !== this._startRatio; if (this._timeRes) { if (((u = this._lengths), (h = this._curSeg), (t *= this._length), (r = this._li), t > this._l2 && d - 1 > r)) { for (c = d - 1; c > r && (this._l2 = u[++r]) <= t;); (this._l1 = u[r - 1]), (this._li = r), (this._curSeg = h = this._segments[r]), (this._s2 = h[(this._s1 = this._si = 0)]); } else if (t < this._l1 && r > 0) { for (; r > 0 && (this._l1 = u[--r]) >= t;); 0 === r && t < this._l1 ? (this._l1 = 0) : r++, (this._l2 = u[r]), (this._li = r), (this._curSeg = h = this._segments[r]), (this._s1 = h[(this._si = h.length - 1) - 1] || 0), (this._s2 = h[this._si]); } if (((i = r), (t -= this._l1), (r = this._si), t > this._s2 && r < h.length - 1)) { for (c = h.length - 1; c > r && (this._s2 = h[++r]) <= t;); (this._s1 = h[r - 1]), (this._si = r); } else if (t < this._s1 && r > 0) { for (; r > 0 && (this._s1 = h[--r]) >= t;); 0 === r && t < this._s1 ? (this._s1 = 0) : r++, (this._s2 = h[r]), (this._si = r); } s = (r + (t - this._s1) / (this._s2 - this._s1)) * this._prec; } else(i = 0 > t ? 0 : t >= 1 ? d - 1 : (d * t) >> 0), (s = (t - i * (1 / d)) * d); for (n = 1 - s, r = this._props.length; --r > -1;) (o = this._props[r]), (a = this._beziers[o][i]), (l = (s * s * a.da + 3 * n * (s * a.ca + n * a.ba)) * s + a.a), this._round[o] && (l = Math.round(l)), f[o] ? p[o](l) : (p[o] = l); if (this._autoRotate) { var v, g, y, _, b, x, w, M = this._autoRotate; for (r = M.length; --r > -1;) (o = M[r][2]), (x = M[r][3] || 0), (w = M[r][4] === !0 ? 1 : e), (a = this._beziers[M[r][0]]), (v = this._beziers[M[r][1]]), a && v && ((a = a[i]), (v = v[i]), (g = a.a + (a.b - a.a) * s), (_ = a.b + (a.c - a.b) * s), (g += (_ - g) * s), (_ += (a.c + (a.d - a.c) * s - _) * s), (y = v.a + (v.b - v.a) * s), (b = v.b + (v.c - v.b) * s), (y += (b - y) * s), (b += (v.c + (v.d - v.c) * s - b) * s), (l = m ? Math.atan2(b - y, _ - g) * w + x : this._initialRotations[r]), f[o] ? p[o](l) : (p[o] = l)); } }, }), g = v.prototype; (v.bezierThrough = d), (v.cubicToQuadratic = c), (v._autoCSS = !0), (v.quadraticToCubic = function (e, t, i) { return new s(e, (2 * t + e) / 3, (2 * t + i) / 3, i); }), (v._cssRegister = function () { var e = a.CSSPlugin; if (e) { var t = e._internals, i = t._parseToProxy, n = t._setPluginRatio, r = t.CSSPropTween; t._registerComplexSpecialProp("bezier", { parser: function (e, t, o, a, s, l) { t instanceof Array && (t = { values: t }), (l = new v()); var c, u, h, d = t.values, f = d.length - 1, p = [], m = {}; if (0 > f) return s; for (c = 0; f >= c; c++)(h = i(e, d[c], a, s, l, f !== c)), (p[c] = h.end); for (u in t) m[u] = t[u]; return ( (m.values = p), (s = new r(e, "bezier", 0, 0, h.pt, 2)), (s.data = h), (s.plugin = l), (s.setRatio = n), 0 === m.autoRotate && (m.autoRotate = !0), !m.autoRotate || m.autoRotate instanceof Array || ((c = m.autoRotate === !0 ? 0 : Number(m.autoRotate)), (m.autoRotate = null != h.end.left ? [ ["left", "top", "rotation", c, !1] ] : null != h.end.x ? [ ["x", "y", "rotation", c, !1] ] : !1)), m.autoRotate && (a._transform || a._enableTransforms(!1), (h.autoRotate = a._target._gsTransform)), l._onInitTween(h.proxy, m, a._tween), s ); }, }); } }), (g._roundProps = function (e, t) { for (var i = this._overwriteProps, n = i.length; --n > -1;)(e[i[n]] || e.bezier || e.bezierThrough) && (this._round[i[n]] = t); }), (g._kill = function (e) { var t, i, n = this._props; for (t in this._beziers) if (t in e) for (delete this._beziers[t], delete this._func[t], i = n.length; --i > -1;) n[i] === t && n.splice(i, 1); return this._super._kill.call(this, e); }); })(), i._gsDefine( "plugins.CSSPlugin", ["plugins.TweenPlugin", "TweenLite"], function (e, t) { var n, r, o, a, s = function () { e.call(this, "css"), (this._overwriteProps.length = 0), (this.setRatio = s.prototype.setRatio); }, l = i._gsDefine.globals, c = {}, u = (s.prototype = new e("css")); (u.constructor = s), (s.version = "1.18.0"), (s.API = 2), (s.defaultTransformPerspective = 0), (s.defaultSkewType = "compensated"), (s.defaultSmoothOrigin = !0), (u = "px"), (s.suffixMap = { top: u, right: u, bottom: u, left: u, width: u, height: u, fontSize: u, padding: u, margin: u, perspective: u, lineHeight: "" }); var h, d, f, p, m, v, g = /(?:d|-d|.d|-.d)+/g, y = /(?:d|-d|.d|-.d|+=d|-=d|+=.d|-=.d)+/g, _ = /(?:+=|-=|-|b)[d-.]+[a-zA-Z0-9]*(?:%|b)/gi, b = /(?![+-]?d*.?d+|[+-]|e[+-]d+)[^0-9]/g, x = /(?:d|-|+|=|#|.)*/g, w = /opacity *= *([^)]*)/i, M = /opacity:([^;]*)/i, T = /alpha(opacity *=.+?)/i, S = /^(rgb|hsl)/, E = /([A-Z])/g, A = /-([a-z])/gi, C = /(^(?:url("|url())|(?:("))$|)$)/gi, P = function (e, t) { return t.toUpperCase(); }, L = /(?:Left|Right|Width)/i, R = /(M11|M12|M21|M22)=[d-.e]+/gi, O = /progid:DXImageTransform.Microsoft.Matrix(.+?)/i, k = /,(?=[^)]*(?:(|$))/gi, D = Math.PI / 180, I = 180 / Math.PI, N = {}, U = document, j = function (e) { return U.createElementNS ? U.createElementNS("http://www.w3.org/1999/xhtml", e) : U.createElement(e); }, B = j("div"), F = j("img"), V = (s._internals = { _specialProps: c }), G = navigator.userAgent, z = (function () { var e = G.indexOf("Android"), t = j("a"); return ( (f = -1 !== G.indexOf("Safari") && -1 === G.indexOf("Chrome") && (-1 === e || Number(G.substr(e + 8, 1)) > 3)), (m = f && Number(G.substr(G.indexOf("Version/") + 8, 1)) < 6), (p = -1 !== G.indexOf("Firefox")), (/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(G) || /Trident/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(G)) && (v = parseFloat(RegExp.$1)), t ? ((t.style.cssText = "top:1px;opacity:.55;"), /^0.55/.test(t.style.opacity)) : !1 ); })(), $ = function (e) { return w.test("string" == typeof e ? e : (e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? parseFloat(RegExp.$1) / 100 : 1; }, H = function (e) { window.console && console.log(e); }, W = "", X = "", Y = function (e, t) { t = t || B; var i, n, r = t.style; if (void 0 !== r[e]) return e; for (e = e.charAt(0).toUpperCase() + e.substr(1), i = ["O", "Moz", "ms", "Ms", "Webkit"], n = 5; --n > -1 && void 0 === r[i[n] + e];); return n >= 0 ? ((X = 3 === n ? "ms" : i[n]), (W = "-" + X.toLowerCase() + "-"), X + e) : null; }, q = U.defaultView ? U.defaultView.getComputedStyle : function () {}, Z = (s.getStyle = function (e, t, i, n, r) { var o; return z || "opacity" !== t ? (!n && e.style[t] ? (o = e.style[t]) : (i = i || q(e)) ? (o = i[t] || i.getPropertyValue(t) || i.getPropertyValue(t.replace(E, "-$1").toLowerCase())) : e.currentStyle && (o = e.currentStyle[t]), null == r || (o && "none" !== o && "auto" !== o && "auto auto" !== o) ? o : r) : $(e); }), K = (V.convertToPixels = function (e, i, n, r, o) { if ("px" === r || !r) return n; if ("auto" === r || !n) return 0; var a, l, c, u = L.test(i), h = e, d = B.style, f = 0 > n; if ((f && (n = -n), "%" === r && -1 !== i.indexOf("border"))) a = (n / 100) * (u ? e.clientWidth : e.clientHeight); else { if (((d.cssText = "border:0 solid red;position:" + Z(e, "position") + ";line-height:0;"), "%" !== r && h.appendChild && "v" !== r.charAt(0) && "rem" !== r)) d[u ? "borderLeftWidth" : "borderTopWidth"] = n + r; else { if (((h = e.parentNode || U.body), (l = h._gsCache), (c = t.ticker.frame), l && u && l.time === c)) return (l.width * n) / 100; d[u ? "width" : "height"] = n + r; } h.appendChild(B), (a = parseFloat(B[u ? "offsetWidth" : "offsetHeight"])), h.removeChild(B), u && "%" === r && s.cacheWidths !== !1 && ((l = h._gsCache = h._gsCache || {}), (l.time = c), (l.width = (a / n) * 100)), 0 !== a || o || (a = K(e, i, n, r, !0)); } return f ? -a : a; }), Q = (V.calculateOffset = function (e, t, i) { if ("absolute" !== Z(e, "position", i)) return 0; var n = "left" === t ? "Left" : "Top", r = Z(e, "margin" + n, i); return e["offset" + n] - (K(e, t, parseFloat(r), r.replace(x, "")) || 0); }), J = function (e, t) { var i, n, r, o = {}; if ((t = t || q(e, null))) if ((i = t.length)) for (; --i > -1;)(r = t[i]), (-1 === r.indexOf("-transform") || Ee === r) && (o[r.replace(A, P)] = t.getPropertyValue(r)); else for (i in t)(-1 === i.indexOf("Transform") || Se === i) && (o[i] = t[i]); else if ((t = e.currentStyle || e.style)) for (i in t) "string" == typeof i && void 0 === o[i] && (o[i.replace(A, P)] = t[i]); return ( z || (o.opacity = $(e)), (n = je(e, t, !1)), (o.rotation = n.rotation), (o.skewX = n.skewX), (o.scaleX = n.scaleX), (o.scaleY = n.scaleY), (o.x = n.x), (o.y = n.y), Ce && ((o.z = n.z), (o.rotationX = n.rotationX), (o.rotationY = n.rotationY), (o.scaleZ = n.scaleZ)), o.filters && delete o.filters, o ); }, ee = function (e, t, i, n, r) { var o, a, s, l = {}, c = e.style; for (a in i) "cssText" !== a && "length" !== a && isNaN(a) && (t[a] !== (o = i[a]) || (r && r[a])) && -1 === a.indexOf("Origin") && ("number" == typeof o || "string" == typeof o) && ((l[a] = "auto" !== o || ("left" !== a && "top" !== a) ? (("" !== o && "auto" !== o && "none" !== o) || "string" != typeof t[a] || "" === t[a].replace(b, "") ? o : 0) : Q(e, a)), void 0 !== c[a] && (s = new me(c, a, c[a], s))); if (n) for (a in n) "className" !== a && (l[a] = n[a]); return { difs: l, firstMPT: s }; }, te = { width: ["Left", "Right"], height: ["Top", "Bottom"] }, ie = ["marginLeft", "marginRight", "marginTop", "marginBottom"], ne = function (e, t, i) { var n = parseFloat("width" === t ? e.offsetWidth : e.offsetHeight), r = te[t], o = r.length; for (i = i || q(e, null); --o > -1;)(n -= parseFloat(Z(e, "padding" + r[o], i, !0)) || 0), (n -= parseFloat(Z(e, "border" + r[o] + "Width", i, !0)) || 0); return n; }, re = function (e, t) { if ("contain" === e || "auto" === e || "auto auto" === e) return e + " "; (null == e || "" === e) && (e = "0 0"); var i = e.split(" "), n = -1 !== e.indexOf("left") ? "0%" : -1 !== e.indexOf("right") ? "100%" : i[0], r = -1 !== e.indexOf("top") ? "0%" : -1 !== e.indexOf("bottom") ? "100%" : i[1]; return ( null == r ? (r = "center" === n ? "50%" : "0") : "center" === r && (r = "50%"), ("center" === n || (isNaN(parseFloat(n)) && -1 === (n + "").indexOf("="))) && (n = "50%"), (e = n + " " + r + (i.length > 2 ? " " + i[2] : "")), t && ((t.oxp = -1 !== n.indexOf("%")), (t.oyp = -1 !== r.indexOf("%")), (t.oxr = "=" === n.charAt(1)), (t.oyr = "=" === r.charAt(1)), (t.ox = parseFloat(n.replace(b, ""))), (t.oy = parseFloat(r.replace(b, ""))), (t.v = e)), t || e ); }, oe = function (e, t) { return "string" == typeof e && "=" === e.charAt(1) ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(t); }, ae = function (e, t) { return null == e ? t : "string" == typeof e && "=" === e.charAt(1) ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) + t : parseFloat(e); }, se = function (e, t, i, n) { var r, o, a, s, l, c = 1e-6; return ( null == e ? (s = t) : "number" == typeof e ? (s = e) : ((r = 360), (o = e.split("_")), (l = "=" === e.charAt(1)), (a = (l ? parseInt(e.charAt(0) + "1", 10) * parseFloat(o[0].substr(2)) : parseFloat(o[0])) * (-1 === e.indexOf("rad") ? 1 : I) - (l ? 0 : t)), o.length && (n && (n[i] = t + a), -1 !== e.indexOf("short") && ((a %= r), a !== a % (r / 2) && (a = 0 > a ? a + r : a - r)), -1 !== e.indexOf("_cw") && 0 > a ? (a = ((a + 9999999999 * r) % r) - ((a / r) | 0) * r) : -1 !== e.indexOf("ccw") && a > 0 && (a = ((a - 9999999999 * r) % r) - ((a / r) | 0) * r)), (s = t + a)), c > s && s > -c && (s = 0), s ); }, le = { aqua: [0, 255, 255], lime: [0, 255, 0], silver: [192, 192, 192], black: [0, 0, 0], maroon: [128, 0, 0], teal: [0, 128, 128], blue: [0, 0, 255], navy: [0, 0, 128], white: [255, 255, 255], fuchsia: [255, 0, 255], olive: [128, 128, 0], yellow: [255, 255, 0], orange: [255, 165, 0], gray: [128, 128, 128], purple: [128, 0, 128], green: [0, 128, 0], red: [255, 0, 0], pink: [255, 192, 203], cyan: [0, 255, 255], transparent: [255, 255, 255, 0], }, ce = function (e, t, i) { return (e = 0 > e ? e + 1 : e > 1 ? e - 1 : e), (255 * (1 > 6 * e ? t + (i - t) * e * 6 : 0.5 > e ? i : 2 > 3 * e ? t + (i - t) * (2 / 3 - e) * 6 : t) + 0.5) | 0; }, ue = (s.parseColor = function (e, t) { var i, n, r, o, a, s, l, c, u, h, d; if (e) if ("number" == typeof e) i = [e >> 16, (e >> 8) & 255, 255 & e]; else { if (("," === e.charAt(e.length - 1) && (e = e.substr(0, e.length - 1)), le[e])) i = le[e]; else if ("#" === e.charAt(0)) 4 === e.length && ((n = e.charAt(1)), (r = e.charAt(2)), (o = e.charAt(3)), (e = "#" + n + n + r + r + o + o)), (e = parseInt(e.substr(1), 16)), (i = [e >> 16, (e >> 8) & 255, 255 & e]); else if ("hsl" === e.substr(0, 3)) if (((i = d = e.match(g)), t)) { if (-1 !== e.indexOf("=")) return e.match(y); } else (a = (Number(i[0]) % 360) / 360), (s = Number(i[1]) / 100), (l = Number(i[2]) / 100), (r = 0.5 >= l ? l * (s + 1) : l + s - l * s), (n = 2 * l - r), i.length > 3 && (i[3] = Number(e[3])), (i[0] = ce(a + 1 / 3, n, r)), (i[1] = ce(a, n, r)), (i[2] = ce(a - 1 / 3, n, r)); else i = e.match(g) || le.transparent; (i[0] = Number(i[0])), (i[1] = Number(i[1])), (i[2] = Number(i[2])), i.length > 3 && (i[3] = Number(i[3])); } else i = le.black; return ( t && !d && ((n = i[0] / 255), (r = i[1] / 255), (o = i[2] / 255), (c = Math.max(n, r, o)), (u = Math.min(n, r, o)), (l = (c + u) / 2), c === u ? (a = s = 0) : ((h = c - u), (s = l > 0.5 ? h / (2 - c - u) : h / (c + u)), (a = c === n ? (r - o) / h + (o > r ? 6 : 0) : c === r ? (o - n) / h + 2 : (n - r) / h + 4), (a *= 60)), (i[0] = (a + 0.5) | 0), (i[1] = (100 * s + 0.5) | 0), (i[2] = (100 * l + 0.5) | 0)), i ); }), he = function (e, t) { var i, n, r, o = e.match(de) || [], a = 0, s = o.length ? "" : e; for (i = 0; i < o.length; i++) (n = o[i]), (r = e.substr(a, e.indexOf(n, a) - a)), (a += r.length + n.length), (n = ue(n, t)), 3 === n.length && n.push(1), (s += r + (t ? "hsla(" + n[0] + "," + n[1] + "%," + n[2] + "%," + n[3] : "rgba(" + n.join(",")) + ")"); return s; }, de = "(?:\b(?:(?:rgb|rgba|hsl|hsla)\(.+?\))|\B#.+?\b"; for (u in le) de += "|" + u + "\b"; (de = new RegExp(de + ")", "gi")), (s.colorStringFilter = function (e) { var t, i = e[0] + e[1]; (de.lastIndex = 0), de.test(i) && ((t = -1 !== i.indexOf("hsl(") || -1 !== i.indexOf("hsla(")), (e[0] = he(e[0], t)), (e[1] = he(e[1], t))); }), t.defaultStringFilter || (t.defaultStringFilter = s.colorStringFilter); var fe = function (e, t, i, n) { if (null == e) return function (e) { return e; }; var r, o = t ? (e.match(de) || [""])[0] : "", a = e.split(o).join("").match(_) || [], s = e.substr(0, e.indexOf(a[0])), l = ")" === e.charAt(e.length - 1) ? ")" : "", c = -1 !== e.indexOf(" ") ? " " : ",", u = a.length, h = u > 0 ? a[0].replace(g, "") : ""; return u ? (r = t ? function (e) { var t, d, f, p; if ("number" == typeof e) e += h; else if (n && k.test(e)) { for (p = e.replace(k, "|").split("|"), f = 0; f < p.length; f++) p[f] = r(p[f]); return p.join(","); } if (((t = (e.match(de) || [o])[0]), (d = e.split(t).join("").match(_) || []), (f = d.length), u > f--)) for (; ++f < u;) d[f] = i ? d[((f - 1) / 2) | 0] : a[f]; return s + d.join(c) + c + t + l + (-1 !== e.indexOf("inset") ? " inset" : ""); } : function (e) { var t, o, d; if ("number" == typeof e) e += h; else if (n && k.test(e)) { for (o = e.replace(k, "|").split("|"), d = 0; d < o.length; d++) o[d] = r(o[d]); return o.join(","); } if (((t = e.match(_) || []), (d = t.length), u > d--)) for (; ++d < u;) t[d] = i ? t[((d - 1) / 2) | 0] : a[d]; return s + t.join(c) + l; }) : function (e) { return e; }; }, pe = function (e) { return ( (e = e.split(",")), function (t, i, n, r, o, a, s) { var l, c = (i + "").split(" "); for (s = {}, l = 0; 4 > l; l++) s[e[l]] = c[l] = c[l] || c[((l - 1) / 2) >> 0]; return r.parse(t, s, o, a); } ); }, me = ((V._setPluginRatio = function (e) { this.plugin.setRatio(e); for (var t, i, n, r, o = this.data, a = o.proxy, s = o.firstMPT, l = 1e-6; s;)(t = a[s.v]), s.r ? (t = Math.round(t)) : l > t && t > -l && (t = 0), (s.t[s.p] = t), (s = s._next); if ((o.autoRotate && (o.autoRotate.rotation = a.rotation), 1 === e)) for (s = o.firstMPT; s;) { if (((i = s.t), i.type)) { if (1 === i.type) { for (r = i.xs0 + i.s + i.xs1, n = 1; n < i.l; n++) r += i["xn" + n] + i["xs" + (n + 1)]; i.e = r; } } else i.e = i.s + i.xs0; s = s._next; } }), function (e, t, i, n, r) { (this.t = e), (this.p = t), (this.v = i), (this.r = r), n && ((n._prev = this), (this._next = n)); }), ve = ((V._parseToProxy = function (e, t, i, n, r, o) { var a, s, l, c, u, h = n, d = {}, f = {}, p = i._transform, m = N; for (i._transform = null, N = t, n = u = i.parse(e, t, n, r), N = m, o && ((i._transform = p), h && ((h._prev = null), h._prev && (h._prev._next = null))); n && n !== h;) { if (n.type <= 1 && ((s = n.p), (f[s] = n.s + n.c), (d[s] = n.s), o || ((c = new me(n, "s", s, c, n.r)), (n.c = 0)), 1 === n.type)) for (a = n.l; --a > 0;)(l = "xn" + a), (s = n.p + "_" + l), (f[s] = n.data[l]), (d[s] = n[l]), o || (c = new me(n, l, s, c, n.rxp[l])); n = n._next; } return { proxy: d, end: f, firstMPT: c, pt: u }; }), (V.CSSPropTween = function (e, t, i, r, o, s, l, c, u, h, d) { (this.t = e), (this.p = t), (this.s = i), (this.c = r), (this.n = l || t), e instanceof ve || a.push(this.n), (this.r = c), (this.type = s || 0), u && ((this.pr = u), (n = !0)), (this.b = void 0 === h ? i : h), (this.e = void 0 === d ? i + r : d), o && ((this._next = o), (o._prev = this)); })), ge = function (e, t, i, n, r, o) { var a = new ve(e, t, i, n - i, r, -1, o); return (a.b = i), (a.e = a.xs0 = n), a; }, ye = (s.parseComplex = function (e, t, i, n, r, o, a, s, l, c) { (i = i || o || ""), (a = new ve(e, t, 0, 0, a, c ? 2 : 1, null, !1, s, i, n)), (n += ""); var u, d, f, p, m, v, _, b, x, w, M, T, S, E = i.split(", ").join(",").split(" "), A = n.split(", ").join(",").split(" "), C = E.length, P = h !== !1; for ( (-1 !== n.indexOf(",") || -1 !== i.indexOf(",")) && ((E = E.join(" ").replace(k, ", ").split(" ")), (A = A.join(" ").replace(k, ", ").split(" ")), (C = E.length)), C !== A.length && ((E = (o || "").split(" ")), (C = E.length)), a.plugin = l, a.setRatio = c, de.lastIndex = 0, u = 0; C > u; u++ ) if (((p = E[u]), (m = A[u]), (b = parseFloat(p)), b || 0 === b)) a.appendXtra("", b, oe(m, b), m.replace(y, ""), P && -1 !== m.indexOf("px"), !0); else if (r && de.test(p)) (T = "," === m.charAt(m.length - 1) ? ")," : ")"), (S = -1 !== m.indexOf("hsl") && z), (p = ue(p, S)), (m = ue(m, S)), (x = p.length + m.length > 6), x && !z && 0 === m[3] ? ((a["xs" + a.l] += a.l ? " transparent" : "transparent"), (a.e = a.e.split(A[u]).join("transparent"))) : (z || (x = !1), S ? a .appendXtra(x ? "hsla(" : "hsl(", p[0], oe(m[0], p[0]), ",", !1, !0) .appendXtra("", p[1], oe(m[1], p[1]), "%,", !1) .appendXtra("", p[2], oe(m[2], p[2]), x ? "%," : "%" + T, !1) : a .appendXtra(x ? "rgba(" : "rgb(", p[0], m[0] - p[0], ",", !0, !0) .appendXtra("", p[1], m[1] - p[1], ",", !0) .appendXtra("", p[2], m[2] - p[2], x ? "," : T, !0), x && ((p = p.length < 4 ? 1 : p[3]), a.appendXtra("", p, (m.length < 4 ? 1 : m[3]) - p, T, !1))), (de.lastIndex = 0); else if ((v = p.match(g))) { if (((_ = m.match(y)), !_ || _.length !== v.length)) return a; for (f = 0, d = 0; d < v.length; d++) (M = v[d]), (w = p.indexOf(M, f)), a.appendXtra(p.substr(f, w - f), Number(M), oe(_[d], M), "", P && "px" === p.substr(w + M.length, 2), 0 === d), (f = w + M.length); a["xs" + a.l] += p.substr(f); } else a["xs" + a.l] += a.l ? " " + p : p; if (-1 !== n.indexOf("=") && a.data) { for (T = a.xs0 + a.data.s, u = 1; u < a.l; u++) T += a["xs" + u] + a.data["xn" + u]; a.e = T + a["xs" + u]; } return a.l || ((a.type = -1), (a.xs0 = a.e)), a.xfirst || a; }), _e = 9; for (u = ve.prototype, u.l = u.pr = 0; --_e > 0;)(u["xn" + _e] = 0), (u["xs" + _e] = ""); (u.xs0 = ""), (u._next = u._prev = u.xfirst = u.data = u.plugin = u.setRatio = u.rxp = null), (u.appendXtra = function (e, t, i, n, r, o) { var a = this, s = a.l; return ( (a["xs" + s] += o && s ? " " + e : e || ""), i || 0 === s || a.plugin ? (a.l++, (a.type = a.setRatio ? 2 : 1), (a["xs" + a.l] = n || ""), s > 0 ? ((a.data["xn" + s] = t + i), (a.rxp["xn" + s] = r), (a["xn" + s] = t), a.plugin || ((a.xfirst = new ve(a, "xn" + s, t, i, a.xfirst || a, 0, a.n, r, a.pr)), (a.xfirst.xs0 = 0)), a) : ((a.data = { s: t + i }), (a.rxp = {}), (a.s = t), (a.c = i), (a.r = r), a)) : ((a["xs" + s] += t + (n || "")), a) ); }); var be = function (e, t) { (t = t || {}), (this.p = t.prefix ? Y(e) || e : e), (c[e] = c[this.p] = this), (this.format = t.formatter || fe(t.defaultValue, t.color, t.collapsible, t.multi)), t.parser && (this.parse = t.parser), (this.clrs = t.color), (this.multi = t.multi), (this.keyword = t.keyword), (this.dflt = t.defaultValue), (this.pr = t.priority || 0); }, xe = (V._registerComplexSpecialProp = function (e, t, i) { "object" != typeof t && (t = { parser: i }); var n, r, o = e.split(","), a = t.defaultValue; for (i = i || [a], n = 0; n < o.length; n++)(t.prefix = 0 === n && t.prefix), (t.defaultValue = i[n] || a), (r = new be(o[n], t)); }), we = function (e) { if (!c[e]) { var t = e.charAt(0).toUpperCase() + e.substr(1) + "Plugin"; xe(e, { parser: function (e, i, n, r, o, a, s) { var u = l.com.greensock.plugins[t]; return u ? (u._cssRegister(), c[n].parse(e, i, n, r, o, a, s)) : (H("Error: " + t + " js file not loaded."), o); }, }); } }; (u = be.prototype), (u.parseComplex = function (e, t, i, n, r, o) { var a, s, l, c, u, h, d = this.keyword; if ((this.multi && (k.test(i) || k.test(t) ? ((s = t.replace(k, "|").split("|")), (l = i.replace(k, "|").split("|"))) : d && ((s = [t]), (l = [i]))), l)) { for (c = l.length > s.length ? l.length : s.length, a = 0; c > a; a++) (t = s[a] = s[a] || this.dflt), (i = l[a] = l[a] || this.dflt), d && ((u = t.indexOf(d)), (h = i.indexOf(d)), u !== h && (-1 === h ? (s[a] = s[a].split(d).join("")) : -1 === u && (s[a] += " " + d))); (t = s.join(", ")), (i = l.join(", ")); } return ye(e, this.p, t, i, this.clrs, this.dflt, n, this.pr, r, o); }), (u.parse = function (e, t, i, n, r, a, s) { return this.parseComplex(e.style, this.format(Z(e, this.p, o, !1, this.dflt)), this.format(t), r, a); }), (s.registerSpecialProp = function (e, t, i) { xe(e, { parser: function (e, n, r, o, a, s, l) { var c = new ve(e, r, 0, 0, a, 2, r, !1, i); return (c.plugin = s), (c.setRatio = t(e, n, o._tween, r)), c; }, priority: i, }); }), (s.useSVGTransformAttr = f || p); var Me, Te = "scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","), Se = Y("transform"), Ee = W + "transform", Ae = Y("transformOrigin"), Ce = null !== Y("perspective"), Pe = (V.Transform = function () { (this.perspective = parseFloat(s.defaultTransformPerspective) || 0), (this.force3D = s.defaultForce3D !== !1 && Ce ? s.defaultForce3D || "auto" : !1); }), Le = window.SVGElement, Re = function (e, t, i) { var n, r = U.createElementNS("http://www.w3.org/2000/svg", e), o = /([a-z])([A-Z])/g; for (n in i) r.setAttributeNS(null, n.replace(o, "$1-$2").toLowerCase(), i[n]); return t.appendChild(r), r; }, Oe = U.documentElement, ke = (function () { var e, t, i, n = v || (/Android/i.test(G) && !window.chrome); return ( U.createElementNS && !n && ((e = Re("svg", Oe)), (t = Re("rect", e, { width: 100, height: 50, x: 100 })), (i = t.getBoundingClientRect().width), (t.style[Ae] = "50% 50%"), (t.style[Se] = "scaleX(0.5)"), (n = i === t.getBoundingClientRect().width && !(p && Ce)), Oe.removeChild(e)), n ); })(), De = function (e, t, i, n, r) { var o, a, l, c, u, h, d, f, p, m, v, g, y, _, b = e._gsTransform, x = Ue(e, !0); b && ((y = b.xOrigin), (_ = b.yOrigin)), (!n || (o = n.split(" ")).length < 2) && ((d = e.getBBox()), (t = re(t).split(" ")), (o = [ (-1 !== t[0].indexOf("%") ? (parseFloat(t[0]) / 100) * d.width : parseFloat(t[0])) + d.x, (-1 !== t[1].indexOf("%") ? (parseFloat(t[1]) / 100) * d.height : parseFloat(t[1])) + d.y, ])), (i.xOrigin = c = parseFloat(o[0])), (i.yOrigin = u = parseFloat(o[1])), n && x !== Ne && ((h = x[0]), (d = x[1]), (f = x[2]), (p = x[3]), (m = x[4]), (v = x[5]), (g = h * p - d * f), (a = c * (p / g) + u * (-f / g) + (f * v - p * m) / g), (l = c * (-d / g) + u * (h / g) - (h * v - d * m) / g), (c = i.xOrigin = o[0] = a), (u = i.yOrigin = o[1] = l)), b && (r || (r !== !1 && s.defaultSmoothOrigin !== !1) ? ((a = c - y), (l = u - _), (b.xOffset += a * x[0] + l * x[2] - a), (b.yOffset += a * x[1] + l * x[3] - l)) : (b.xOffset = b.yOffset = 0)), e.setAttribute("data-svg-origin", o.join(" ")); }, Ie = function (e) { return !!(Le && "function" == typeof e.getBBox && e.getCTM && (!e.parentNode || (e.parentNode.getBBox && e.parentNode.getCTM))); }, Ne = [1, 0, 0, 1, 0, 0], Ue = function (e, t) { var i, n, r, o, a, s = e._gsTransform || new Pe(), l = 1e5; if ( (Se ? (n = Z(e, Ee, null, !0)) : e.currentStyle && ((n = e.currentStyle.filter.match(R)), (n = n && 4 === n.length ? [n[0].substr(4), Number(n[2].substr(4)), Number(n[1].substr(4)), n[3].substr(4), s.x || 0, s.y || 0].join(",") : "")), (i = !n || "none" === n || "matrix(1, 0, 0, 1, 0, 0)" === n), (s.svg || (e.getBBox && Ie(e))) && (i && -1 !== (e.style[Se] + "").indexOf("matrix") && ((n = e.style[Se]), (i = 0)), (r = e.getAttribute("transform")), i && r && (-1 !== r.indexOf("matrix") ? ((n = r), (i = 0)) : -1 !== r.indexOf("translate") && ((n = "matrix(1,0,0,1," + r.match(/(?:-|b)[d-.e]+b/gi).join(",") + ")"), (i = 0)))), i) ) return Ne; for (r = (n || "").match(/(?:-|b)[d-.e]+b/gi) || [], _e = r.length; --_e > -1;)(o = Number(r[_e])), (r[_e] = (a = o - (o |= 0)) ? ((a * l + (0 > a ? -0.5 : 0.5)) | 0) / l + o : o); return t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r; }, je = (V.getTransform = function (e, i, n, r) { if (e._gsTransform && n && !r) return e._gsTransform; var a, l, c, u, h, d, f = n ? e._gsTransform || new Pe() : new Pe(), p = f.scaleX < 0, m = 2e-5, v = 1e5, g = Ce ? parseFloat(Z(e, Ae, i, !1, "0 0 0").split(" ")[2]) || f.zOrigin || 0 : 0, y = parseFloat(s.defaultTransformPerspective) || 0; if (((f.svg = !(!e.getBBox || !Ie(e))), f.svg && (De(e, Z(e, Ae, o, !1, "50% 50%") + "", f, e.getAttribute("data-svg-origin")), (Me = s.useSVGTransformAttr || ke)), (a = Ue(e)), a !== Ne)) { if (16 === a.length) { var _, b, x, w, M, T = a[0], S = a[1], E = a[2], A = a[3], C = a[4], P = a[5], L = a[6], R = a[7], O = a[8], k = a[9], D = a[10], N = a[12], U = a[13], j = a[14], B = a[11], F = Math.atan2(L, D); f.zOrigin && ((j = -f.zOrigin), (N = O * j - a[12]), (U = k * j - a[13]), (j = D * j + f.zOrigin - a[14])), (f.rotationX = F * I), F && ((w = Math.cos(-F)), (M = Math.sin(-F)), (_ = C * w + O * M), (b = P * w + k * M), (x = L * w + D * M), (O = C * -M + O * w), (k = P * -M + k * w), (D = L * -M + D * w), (B = R * -M + B * w), (C = _), (P = b), (L = x)), (F = Math.atan2(O, D)), (f.rotationY = F * I), F && ((w = Math.cos(-F)), (M = Math.sin(-F)), (_ = T * w - O * M), (b = S * w - k * M), (x = E * w - D * M), (k = S * M + k * w), (D = E * M + D * w), (B = A * M + B * w), (T = _), (S = b), (E = x)), (F = Math.atan2(S, T)), (f.rotation = F * I), F && ((w = Math.cos(-F)), (M = Math.sin(-F)), (T = T * w + C * M), (b = S * w + P * M), (P = S * -M + P * w), (L = E * -M + L * w), (S = b)), f.rotationX && Math.abs(f.rotationX) + Math.abs(f.rotation) > 359.9 && ((f.rotationX = f.rotation = 0), (f.rotationY += 180)), (f.scaleX = ((Math.sqrt(T * T + S * S) * v + 0.5) | 0) / v), (f.scaleY = ((Math.sqrt(P * P + k * k) * v + 0.5) | 0) / v), (f.scaleZ = ((Math.sqrt(L * L + D * D) * v + 0.5) | 0) / v), (f.skewX = 0), (f.perspective = B ? 1 / (0 > B ? -B : B) : 0), (f.x = N), (f.y = U), (f.z = j), f.svg && ((f.x -= f.xOrigin - (f.xOrigin * T - f.yOrigin * C)), (f.y -= f.yOrigin - (f.yOrigin * S - f.xOrigin * P))); } else if ((!Ce || r || !a.length || f.x !== a[4] || f.y !== a[5] || (!f.rotationX && !f.rotationY)) && (void 0 === f.x || "none" !== Z(e, "display", i))) { var V = a.length >= 6, G = V ? a[0] : 1, z = a[1] || 0, $ = a[2] || 0, H = V ? a[3] : 1; (f.x = a[4] || 0), (f.y = a[5] || 0), (c = Math.sqrt(G * G + z * z)), (u = Math.sqrt(H * H + $ * $)), (h = G || z ? Math.atan2(z, G) * I : f.rotation || 0), (d = $ || H ? Math.atan2($, H) * I + h : f.skewX || 0), Math.abs(d) > 90 && Math.abs(d) < 270 && (p ? ((c *= -1), (d += 0 >= h ? 180 : -180), (h += 0 >= h ? 180 : -180)) : ((u *= -1), (d += 0 >= d ? 180 : -180))), (f.scaleX = c), (f.scaleY = u), (f.rotation = h), (f.skewX = d), Ce && ((f.rotationX = f.rotationY = f.z = 0), (f.perspective = y), (f.scaleZ = 1)), f.svg && ((f.x -= f.xOrigin - (f.xOrigin * G + f.yOrigin * $)), (f.y -= f.yOrigin - (f.xOrigin * z + f.yOrigin * H))); } f.zOrigin = g; for (l in f) f[l] < m && f[l] > -m && (f[l] = 0); } return ( n && ((e._gsTransform = f), f.svg && (Me && e.style[Se] ? t.delayedCall(0.001, function () { Ge(e.style, Se); }) : !Me && e.getAttribute("transform") && t.delayedCall(0.001, function () { e.removeAttribute("transform"); }))), f ); }), Be = function (e) { var t, i, n = this.data, r = -n.rotation * D, o = r + n.skewX * D, a = 1e5, s = ((Math.cos(r) * n.scaleX * a) | 0) / a, l = ((Math.sin(r) * n.scaleX * a) | 0) / a, c = ((Math.sin(o) * -n.scaleY * a) | 0) / a, u = ((Math.cos(o) * n.scaleY * a) | 0) / a, h = this.t.style, d = this.t.currentStyle; if (d) { (i = l), (l = -c), (c = -i), (t = d.filter), (h.filter = ""); var f, p, m = this.t.offsetWidth, g = this.t.offsetHeight, y = "absolute" !== d.position, _ = "progid:DXImageTransform.Microsoft.Matrix(M11=" + s + ", M12=" + l + ", M21=" + c + ", M22=" + u, b = n.x + (m * n.xPercent) / 100, M = n.y + (g * n.yPercent) / 100; if ( (null != n.ox && ((f = (n.oxp ? m * n.ox * 0.01 : n.ox) - m / 2), (p = (n.oyp ? g * n.oy * 0.01 : n.oy) - g / 2), (b += f - (f * s + p * l)), (M += p - (f * c + p * u))), y ? ((f = m / 2), (p = g / 2), (_ += ", Dx=" + (f - (f * s + p * l) + b) + ", Dy=" + (p - (f * c + p * u) + M) + ")")) : (_ += ", sizingMethod='auto expand')"), -1 !== t.indexOf("DXImageTransform.Microsoft.Matrix(") ? (h.filter = t.replace(O, _)) : (h.filter = _ + " " + t), (0 === e || 1 === e) && 1 === s && 0 === l && 0 === c && 1 === u && ((y && -1 === _.indexOf("Dx=0, Dy=0")) || (w.test(t) && 100 !== parseFloat(RegExp.$1)) || (-1 === t.indexOf(t.indexOf("Alpha")) && h.removeAttribute("filter"))), !y) ) { var T, S, E, A = 8 > v ? 1 : -1; for ( f = n.ieOffsetX || 0, p = n.ieOffsetY || 0, n.ieOffsetX = Math.round((m - ((0 > s ? -s : s) * m + (0 > l ? -l : l) * g)) / 2 + b), n.ieOffsetY = Math.round((g - ((0 > u ? -u : u) * g + (0 > c ? -c : c) * m)) / 2 + M), _e = 0; 4 > _e; _e++ ) (S = ie[_e]), (T = d[S]), (i = -1 !== T.indexOf("px") ? parseFloat(T) : K(this.t, S, parseFloat(T), T.replace(x, "")) || 0), (E = i !== n[S] ? (2 > _e ? -n.ieOffsetX : -n.ieOffsetY) : 2 > _e ? f - n.ieOffsetX : p - n.ieOffsetY), (h[S] = (n[S] = Math.round(i - E * (0 === _e || 2 === _e ? 1 : A))) + "px"); } } }, Fe = (V.set3DTransformRatio = V.setTransformRatio = function (e) { var t, i, n, r, o, a, s, l, c, u, h, d, f, m, v, g, y, _, b, x, w, M, T, S = this.data, E = this.t.style, A = S.rotation, C = S.rotationX, P = S.rotationY, L = S.scaleX, R = S.scaleY, O = S.scaleZ, k = S.x, I = S.y, N = S.z, U = S.svg, j = S.perspective, B = S.force3D; if (((((1 === e || 0 === e) && "auto" === B && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !B) && !N && !j && !P && !C) || (Me && U) || !Ce) return void(A || S.skewX || U ? ((A *= D), (M = S.skewX * D), (T = 1e5), (t = Math.cos(A) * L), (r = Math.sin(A) * L), (i = Math.sin(A - M) * -R), (o = Math.cos(A - M) * R), M && "simple" === S.skewType && ((y = Math.tan(M)), (y = Math.sqrt(1 + y * y)), (i *= y), (o *= y), S.skewY && ((t *= y), (r *= y))), U && ((k += S.xOrigin - (S.xOrigin * t + S.yOrigin * i) + S.xOffset), (I += S.yOrigin - (S.xOrigin * r + S.yOrigin * o) + S.yOffset), Me && (S.xPercent || S.yPercent) && ((m = this.t.getBBox()), (k += 0.01 * S.xPercent * m.width), (I += 0.01 * S.yPercent * m.height)), (m = 1e-6), m > k && k > -m && (k = 0), m > I && I > -m && (I = 0)), (b = ((t * T) | 0) / T + "," + ((r * T) | 0) / T + "," + ((i * T) | 0) / T + "," + ((o * T) | 0) / T + "," + k + "," + I + ")"), U && Me ? this.t.setAttribute("transform", "matrix(" + b) : (E[Se] = (S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) matrix(" : "matrix(") + b)) : (E[Se] = (S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) matrix(" : "matrix(") + L + ",0,0," + R + "," + k + "," + I + ")")); if ((p && ((m = 1e-4), m > L && L > -m && (L = O = 2e-5), m > R && R > -m && (R = O = 2e-5), !j || S.z || S.rotationX || S.rotationY || (j = 0)), A || S.skewX)) (A *= D), (v = t = Math.cos(A)), (g = r = Math.sin(A)), S.skewX && ((A -= S.skewX * D), (v = Math.cos(A)), (g = Math.sin(A)), "simple" === S.skewType && ((y = Math.tan(S.skewX * D)), (y = Math.sqrt(1 + y * y)), (v *= y), (g *= y), S.skewY && ((t *= y), (r *= y)))), (i = -g), (o = v); else { if (!(P || C || 1 !== O || j || U)) return void(E[Se] = (S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) translate3d(" : "translate3d(") + k + "px," + I + "px," + N + "px)" + (1 !== L || 1 !== R ? " scale(" + L + "," + R + ")" : "")); (t = o = 1), (i = r = 0); } (c = 1), (n = a = s = l = u = h = 0), (d = j ? -1 / j : 0), (f = S.zOrigin), (m = 1e-6), (x = ","), (w = "0"), (A = P * D), A && ((v = Math.cos(A)), (g = Math.sin(A)), (s = -g), (u = d * -g), (n = t * g), (a = r * g), (c = v), (d *= v), (t *= v), (r *= v)), (A = C * D), A && ((v = Math.cos(A)), (g = Math.sin(A)), (y = i * v + n * g), (_ = o * v + a * g), (l = c * g), (h = d * g), (n = i * -g + n * v), (a = o * -g + a * v), (c *= v), (d *= v), (i = y), (o = _)), 1 !== O && ((n *= O), (a *= O), (c *= O), (d *= O)), 1 !== R && ((i *= R), (o *= R), (l *= R), (h *= R)), 1 !== L && ((t *= L), (r *= L), (s *= L), (u *= L)), (f || U) && (f && ((k += n * -f), (I += a * -f), (N += c * -f + f)), U && ((k += S.xOrigin - (S.xOrigin * t + S.yOrigin * i) + S.xOffset), (I += S.yOrigin - (S.xOrigin * r + S.yOrigin * o) + S.yOffset)), m > k && k > -m && (k = w), m > I && I > -m && (I = w), m > N && N > -m && (N = 0)), (b = S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) matrix3d(" : "matrix3d("), (b += (m > t && t > -m ? w : t) + x + (m > r && r > -m ? w : r) + x + (m > s && s > -m ? w : s)), (b += x + (m > u && u > -m ? w : u) + x + (m > i && i > -m ? w : i) + x + (m > o && o > -m ? w : o)), C || P ? ((b += x + (m > l && l > -m ? w : l) + x + (m > h && h > -m ? w : h) + x + (m > n && n > -m ? w : n)), (b += x + (m > a && a > -m ? w : a) + x + (m > c && c > -m ? w : c) + x + (m > d && d > -m ? w : d) + x)) : (b += ",0,0,0,0,1,0,"), (b += k + x + I + x + N + x + (j ? 1 + -N / j : 1) + ")"), (E[Se] = b); }); (u = Pe.prototype), (u.x = u.y = u.z = u.skewX = u.skewY = u.rotation = u.rotationX = u.rotationY = u.zOrigin = u.xPercent = u.yPercent = u.xOffset = u.yOffset = 0), (u.scaleX = u.scaleY = u.scaleZ = 1), xe( "transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", { parser: function (e, t, i, n, r, a, l) { if (n._lastParsedTransform === l) return r; n._lastParsedTransform = l; var c, u, h, d, f, p, m, v, g, y, _ = e._gsTransform, b = e.style, x = 1e-6, w = Te.length, M = l, T = {}, S = "transformOrigin"; if ( (l.display ? ((d = Z(e, "display")), (b.display = "block"), (c = je(e, o, !0, l.parseTransform)), (b.display = d)) : (c = je(e, o, !0, l.parseTransform)), (n._transform = c), "string" == typeof M.transform && Se) ) (d = B.style), (d[Se] = M.transform), (d.display = "block"), (d.position = "absolute"), U.body.appendChild(B), (u = je(B, null, !1)), U.body.removeChild(B), u.perspective || (u.perspective = c.perspective), null != M.xPercent && (u.xPercent = ae(M.xPercent, c.xPercent)), null != M.yPercent && (u.yPercent = ae(M.yPercent, c.yPercent)); else if ("object" == typeof M) { if ( ((u = { scaleX: ae(null != M.scaleX ? M.scaleX : M.scale, c.scaleX), scaleY: ae(null != M.scaleY ? M.scaleY : M.scale, c.scaleY), scaleZ: ae(M.scaleZ, c.scaleZ), x: ae(M.x, c.x), y: ae(M.y, c.y), z: ae(M.z, c.z), xPercent: ae(M.xPercent, c.xPercent), yPercent: ae(M.yPercent, c.yPercent), perspective: ae(M.transformPerspective, c.perspective), }), (v = M.directionalRotation), null != v) ) if ("object" == typeof v) for (d in v) M[d] = v[d]; else M.rotation = v; "string" == typeof M.x && -1 !== M.x.indexOf("%") && ((u.x = 0), (u.xPercent = ae(M.x, c.xPercent))), "string" == typeof M.y && -1 !== M.y.indexOf("%") && ((u.y = 0), (u.yPercent = ae(M.y, c.yPercent))), (u.rotation = se("rotation" in M ? M.rotation : "shortRotation" in M ? M.shortRotation + "_short" : "rotationZ" in M ? M.rotationZ : c.rotation, c.rotation, "rotation", T)), Ce && ((u.rotationX = se("rotationX" in M ? M.rotationX : "shortRotationX" in M ? M.shortRotationX + "_short" : c.rotationX || 0, c.rotationX, "rotationX", T)), (u.rotationY = se("rotationY" in M ? M.rotationY : "shortRotationY" in M ? M.shortRotationY + "_short" : c.rotationY || 0, c.rotationY, "rotationY", T))), (u.skewX = null == M.skewX ? c.skewX : se(M.skewX, c.skewX)), (u.skewY = null == M.skewY ? c.skewY : se(M.skewY, c.skewY)), (h = u.skewY - c.skewY) && ((u.skewX += h), (u.rotation += h)); } for ( Ce && null != M.force3D && ((c.force3D = M.force3D), (m = !0)), c.skewType = M.skewType || c.skewType || s.defaultSkewType, p = c.force3D || c.z || c.rotationX || c.rotationY || u.z || u.rotationX || u.rotationY || u.perspective, p || null == M.scale || (u.scaleZ = 1); --w > -1; ) (i = Te[w]), (f = u[i] - c[i]), (f > x || -x > f || null != M[i] || null != N[i]) && ((m = !0), (r = new ve(c, i, c[i], f, r)), i in T && (r.e = T[i]), (r.xs0 = 0), (r.plugin = a), n._overwriteProps.push(r.n)); return ( (f = M.transformOrigin), c.svg && (f || M.svgOrigin) && ((g = c.xOffset), (y = c.yOffset), De(e, re(f), u, M.svgOrigin, M.smoothOrigin), (r = ge(c, "xOrigin", (_ ? c : u).xOrigin, u.xOrigin, r, S)), (r = ge(c, "yOrigin", (_ ? c : u).yOrigin, u.yOrigin, r, S)), (g !== c.xOffset || y !== c.yOffset) && ((r = ge(c, "xOffset", _ ? g : c.xOffset, c.xOffset, r, S)), (r = ge(c, "yOffset", _ ? y : c.yOffset, c.yOffset, r, S))), (f = Me ? null : "0px 0px")), (f || (Ce && p && c.zOrigin)) && (Se ? ((m = !0), (i = Ae), (f = (f || Z(e, i, o, !1, "50% 50%")) + ""), (r = new ve(b, i, 0, 0, r, -1, S)), (r.b = b[i]), (r.plugin = a), Ce ? ((d = c.zOrigin), (f = f.split(" ")), (c.zOrigin = (f.length > 2 && (0 === d || "0px" !== f[2]) ? parseFloat(f[2]) : d) || 0), (r.xs0 = r.e = f[0] + " " + (f[1] || "50%") + " 0px"), (r = new ve(c, "zOrigin", 0, 0, r, -1, r.n)), (r.b = d), (r.xs0 = r.e = c.zOrigin)) : (r.xs0 = r.e = f)) : re(f + "", c)), m && (n._transformType = (c.svg && Me) || (!p && 3 !== this._transformType) ? 2 : 3), r ); }, prefix: !0, } ), xe("boxShadow", { defaultValue: "0px 0px 0px 0px #999", prefix: !0, color: !0, multi: !0, keyword: "inset" }), xe("borderRadius", { defaultValue: "0px", parser: function (e, t, i, n, a, s) { t = this.format(t); var l, c, u, h, d, f, p, m, v, g, y, _, b, x, w, M, T = ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"], S = e.style; for (v = parseFloat(e.offsetWidth), g = parseFloat(e.offsetHeight), l = t.split(" "), c = 0; c < T.length; c++) this.p.indexOf("border") && (T[c] = Y(T[c])), (d = h = Z(e, T[c], o, !1, "0px")), -1 !== d.indexOf(" ") && ((h = d.split(" ")), (d = h[0]), (h = h[1])), (f = u = l[c]), (p = parseFloat(d)), (_ = d.substr((p + "").length)), (b = "=" === f.charAt(1)), b ? ((m = parseInt(f.charAt(0) + "1", 10)), (f = f.substr(2)), (m *= parseFloat(f)), (y = f.substr((m + "").length - (0 > m ? 1 : 0)) || "")) : ((m = parseFloat(f)), (y = f.substr((m + "").length))), "" === y && (y = r[i] || _), y !== _ && ((x = K(e, "borderLeft", p, _)), (w = K(e, "borderTop", p, _)), "%" === y ? ((d = (x / v) * 100 + "%"), (h = (w / g) * 100 + "%")) : "em" === y ? ((M = K(e, "borderLeft", 1, "em")), (d = x / M + "em"), (h = w / M + "em")) : ((d = x + "px"), (h = w + "px")), b && ((f = parseFloat(d) + m + y), (u = parseFloat(h) + m + y))), (a = ye(S, T[c], d + " " + h, f + " " + u, !1, "0px", a)); return a; }, prefix: !0, formatter: fe("0px 0px 0px 0px", !1, !0), }), xe("backgroundPosition", { defaultValue: "0 0", parser: function (e, t, i, n, r, a) { var s, l, c, u, h, d, f = "background-position", p = o || q(e, null), m = this.format( (p ? (v ? p.getPropertyValue(f + "-x") + " " + p.getPropertyValue(f + "-y") : p.getPropertyValue(f)) : e.currentStyle.backgroundPositionX + " " + e.currentStyle.backgroundPositionY) || "0 0" ), g = this.format(t); if ((-1 !== m.indexOf("%")) != (-1 !== g.indexOf("%")) && ((d = Z(e, "backgroundImage").replace(C, "")), d && "none" !== d)) { for (s = m.split(" "), l = g.split(" "), F.setAttribute("src", d), c = 2; --c > -1;) (m = s[c]), (u = -1 !== m.indexOf("%")), u !== (-1 !== l[c].indexOf("%")) && ((h = 0 === c ? e.offsetWidth - F.width : e.offsetHeight - F.height), (s[c] = u ? (parseFloat(m) / 100) * h + "px" : (parseFloat(m) / h) * 100 + "%")); m = s.join(" "); } return this.parseComplex(e.style, m, g, r, a); }, formatter: re, }), xe("backgroundSize", { defaultValue: "0 0", formatter: re }), xe("perspective", { defaultValue: "0px", prefix: !0 }), xe("perspectiveOrigin", { defaultValue: "50% 50%", prefix: !0 }), xe("transformStyle", { prefix: !0 }), xe("backfaceVisibility", { prefix: !0 }), xe("userSelect", { prefix: !0 }), xe("margin", { parser: pe("marginTop,marginRight,marginBottom,marginLeft") }), xe("padding", { parser: pe("paddingTop,paddingRight,paddingBottom,paddingLeft") }), xe("clip", { defaultValue: "rect(0px,0px,0px,0px)", parser: function (e, t, i, n, r, a) { var s, l, c; return ( 9 > v ? ((l = e.currentStyle), (c = 8 > v ? " " : ","), (s = "rect(" + l.clipTop + c + l.clipRight + c + l.clipBottom + c + l.clipLeft + ")"), (t = this.format(t).split(",").join(c))) : ((s = this.format(Z(e, this.p, o, !1, this.dflt))), (t = this.format(t))), this.parseComplex(e.style, s, t, r, a) ); }, }), xe("textShadow", { defaultValue: "0px 0px 0px #999", color: !0, multi: !0 }), xe("autoRound,strictUnits", { parser: function (e, t, i, n, r) { return r; }, }), xe("border", { defaultValue: "0px solid #000", parser: function (e, t, i, n, r, a) { return this.parseComplex( e.style, this.format(Z(e, "borderTopWidth", o, !1, "0px") + " " + Z(e, "borderTopStyle", o, !1, "solid") + " " + Z(e, "borderTopColor", o, !1, "#000")), this.format(t), r, a ); }, color: !0, formatter: function (e) { var t = e.split(" "); return t[0] + " " + (t[1] || "solid") + " " + (e.match(de) || ["#000"])[0]; }, }), xe("borderWidth", { parser: pe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth") }), xe("float,cssFloat,styleFloat", { parser: function (e, t, i, n, r, o) { var a = e.style, s = "cssFloat" in a ? "cssFloat" : "styleFloat"; return new ve(a, s, 0, 0, r, -1, i, !1, 0, a[s], t); }, }); var Ve = function (e) { var t, i = this.t, n = i.filter || Z(this.data, "filter") || "", r = (this.s + this.c * e) | 0; 100 === r && (-1 === n.indexOf("atrix(") && -1 === n.indexOf("radient(") && -1 === n.indexOf("oader(") ? (i.removeAttribute("filter"), (t = !Z(this.data, "filter"))) : ((i.filter = n.replace(T, "")), (t = !0))), t || (this.xn1 && (i.filter = n = n || "alpha(opacity=" + r + ")"), -1 === n.indexOf("pacity") ? (0 === r && this.xn1) || (i.filter = n + " alpha(opacity=" + r + ")") : (i.filter = n.replace(w, "opacity=" + r))); }; xe("opacity,alpha,autoAlpha", { defaultValue: "1", parser: function (e, t, i, n, r, a) { var s = parseFloat(Z(e, "opacity", o, !1, "1")), l = e.style, c = "autoAlpha" === i; return ( "string" == typeof t && "=" === t.charAt(1) && (t = ("-" === t.charAt(0) ? -1 : 1) * parseFloat(t.substr(2)) + s), c && 1 === s && "hidden" === Z(e, "visibility", o) && 0 !== t && (s = 0), z ? (r = new ve(l, "opacity", s, t - s, r)) : ((r = new ve(l, "opacity", 100 * s, 100 * (t - s), r)), (r.xn1 = c ? 1 : 0), (l.zoom = 1), (r.type = 2), (r.b = "alpha(opacity=" + r.s + ")"), (r.e = "alpha(opacity=" + (r.s + r.c) + ")"), (r.data = e), (r.plugin = a), (r.setRatio = Ve)), c && ((r = new ve(l, "visibility", 0, 0, r, -1, null, !1, 0, 0 !== s ? "inherit" : "hidden", 0 === t ? "hidden" : "inherit")), (r.xs0 = "inherit"), n._overwriteProps.push(r.n), n._overwriteProps.push(i)), r ); }, }); var Ge = function (e, t) { t && (e.removeProperty ? (("ms" === t.substr(0, 2) || "webkit" === t.substr(0, 6)) && (t = "-" + t), e.removeProperty(t.replace(E, "-$1").toLowerCase())) : e.removeAttribute(t)); }, ze = function (e) { if (((this.t._gsClassPT = this), 1 === e || 0 === e)) { this.t.setAttribute("class", 0 === e ? this.b : this.e); for (var t = this.data, i = this.t.style; t;) t.v ? (i[t.p] = t.v) : Ge(i, t.p), (t = t._next); 1 === e && this.t._gsClassPT === this && (this.t._gsClassPT = null); } else this.t.getAttribute("class") !== this.e && this.t.setAttribute("class", this.e); }; xe("className", { parser: function (e, t, i, r, a, s, l) { var c, u, h, d, f, p = e.getAttribute("class") || "", m = e.style.cssText; if (((a = r._classNamePT = new ve(e, i, 0, 0, a, 2)), (a.setRatio = ze), (a.pr = -11), (n = !0), (a.b = p), (u = J(e, o)), (h = e._gsClassPT))) { for (d = {}, f = h.data; f;)(d[f.p] = 1), (f = f._next); h.setRatio(1); } return ( (e._gsClassPT = a), (a.e = "=" !== t.charAt(1) ? t : p.replace(new RegExp("\s*\b" + t.substr(2) + "\b"), "") + ("+" === t.charAt(0) ? " " + t.substr(2) : "")), e.setAttribute("class", a.e), (c = ee(e, u, J(e), l, d)), e.setAttribute("class", p), (a.data = c.firstMPT), (e.style.cssText = m), (a = a.xfirst = r.parse(e, c.difs, a, s)) ); }, }); var $e = function (e) { if ((1 === e || 0 === e) && this.data._totalTime === this.data._totalDuration && "isFromStart" !== this.data.data) { var t, i, n, r, o, a = this.t.style, s = c.transform.parse; if ("all" === this.e)(a.cssText = ""), (r = !0); else for (t = this.e.split(" ").join("").split(","), n = t.length; --n > -1;)(i = t[n]), c[i] && (c[i].parse === s ? (r = !0) : (i = "transformOrigin" === i ? Ae : c[i].p)), Ge(a, i); r && (Ge(a, Se), (o = this.t._gsTransform), o && (o.svg && this.t.removeAttribute("data-svg-origin"), delete this.t._gsTransform)); } }; for ( xe("clearProps", { parser: function (e, t, i, r, o) { return (o = new ve(e, i, 0, 0, o, 2)), (o.setRatio = $e), (o.e = t), (o.pr = -10), (o.data = r._tween), (n = !0), o; }, }), u = "bezier,throwProps,physicsProps,physics2D".split(","), _e = u.length; _e--; ) we(u[_e]); (u = s.prototype), (u._firstPT = u._lastParsedTransform = u._transform = null), (u._onInitTween = function (e, t, i) { if (!e.nodeType) return !1; (this._target = e), (this._tween = i), (this._vars = t), (h = t.autoRound), (n = !1), (r = t.suffixMap || s.suffixMap), (o = q(e, "")), (a = this._overwriteProps); var l, u, p, v, g, y, _, b, x, w = e.style; if ( (d && "" === w.zIndex && ((l = Z(e, "zIndex", o)), ("auto" === l || "" === l) && this._addLazySet(w, "zIndex", 0)), "string" == typeof t && ((v = w.cssText), (l = J(e, o)), (w.cssText = v + ";" + t), (l = ee(e, l, J(e)).difs), !z && M.test(t) && (l.opacity = parseFloat(RegExp.$1)), (t = l), (w.cssText = v)), t.className ? (this._firstPT = u = c.className.parse(e, t.className, "className", this, null, null, t)) : (this._firstPT = u = this.parse(e, t, null)), this._transformType) ) { for ( x = 3 === this._transformType, Se ? f && ((d = !0), "" === w.zIndex && ((_ = Z(e, "zIndex", o)), ("auto" === _ || "" === _) && this._addLazySet(w, "zIndex", 0)), m && this._addLazySet(w, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (x ? "visible" : "hidden"))) : (w.zoom = 1), p = u; p && p._next; ) p = p._next; (b = new ve(e, "transform", 0, 0, null, 2)), this._linkCSSP(b, null, p), (b.setRatio = Se ? Fe : Be), (b.data = this._transform || je(e, o, !0)), (b.tween = i), (b.pr = -1), a.pop(); } if (n) { for (; u;) { for (y = u._next, p = v; p && p.pr > u.pr;) p = p._next; (u._prev = p ? p._prev : g) ? (u._prev._next = u) : (v = u), (u._next = p) ? (p._prev = u) : (g = u), (u = y); } this._firstPT = v; } return !0; }), (u.parse = function (e, t, i, n) { var a, s, l, u, d, f, p, m, v, g, y = e.style; for (a in t) (f = t[a]), (s = c[a]), s ? (i = s.parse(e, f, a, this, i, n, t)) : ((d = Z(e, a, o) + ""), (v = "string" == typeof f), "color" === a || "fill" === a || "stroke" === a || -1 !== a.indexOf("Color") || (v && S.test(f)) ? (v || ((f = ue(f)), (f = (f.length > 3 ? "rgba(" : "rgb(") + f.join(",") + ")")), (i = ye(y, a, d, f, !0, "transparent", i, 0, n))) : !v || (-1 === f.indexOf(" ") && -1 === f.indexOf(",")) ? ((l = parseFloat(d)), (p = l || 0 === l ? d.substr((l + "").length) : ""), ("" === d || "auto" === d) && ("width" === a || "height" === a ? ((l = ne(e, a, o)), (p = "px")) : "left" === a || "top" === a ? ((l = Q(e, a, o)), (p = "px")) : ((l = "opacity" !== a ? 0 : 1), (p = ""))), (g = v && "=" === f.charAt(1)), g ? ((u = parseInt(f.charAt(0) + "1", 10)), (f = f.substr(2)), (u *= parseFloat(f)), (m = f.replace(x, ""))) : ((u = parseFloat(f)), (m = v ? f.replace(x, "") : "")), "" === m && (m = a in r ? r[a] : p), (f = u || 0 === u ? (g ? u + l : u) + m : t[a]), p !== m && "" !== m && (u || 0 === u) && l && ((l = K(e, a, l, p)), "%" === m ? ((l /= K(e, a, 100, "%") / 100), t.strictUnits !== !0 && (d = l + "%")) : "em" === m || "rem" === m ? (l /= K(e, a, 1, m)) : "px" !== m && ((u = K(e, a, u, m)), (m = "px")), g && (u || 0 === u) && (f = u + l + m)), g && (u += l), (!l && 0 !== l) || (!u && 0 !== u) ? void 0 !== y[a] && (f || (f + "" != "NaN" && null != f)) ? ((i = new ve(y, a, u || l || 0, 0, i, -1, a, !1, 0, d, f)), (i.xs0 = "none" !== f || ("display" !== a && -1 === a.indexOf("Style")) ? f : d)) : H("invalid " + a + " tween value: " + t[a]) : ((i = new ve(y, a, l, u - l, i, 0, a, h !== !1 && ("px" === m || "zIndex" === a), 0, d, f)), (i.xs0 = m))) : (i = ye(y, a, d, f, !0, null, i, 0, n))), n && i && !i.plugin && (i.plugin = n); return i; }), (u.setRatio = function (e) { var t, i, n, r = this._firstPT, o = 1e-6; if (1 !== e || (this._tween._time !== this._tween._duration && 0 !== this._tween._time)) if (e || (this._tween._time !== this._tween._duration && 0 !== this._tween._time) || this._tween._rawPrevTime === -1e-6) for (; r;) { if (((t = r.c * e + r.s), r.r ? (t = Math.round(t)) : o > t && t > -o && (t = 0), r.type)) if (1 === r.type) if (((n = r.l), 2 === n)) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2; else if (3 === n) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3; else if (4 === n) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3 + r.xn3 + r.xs4; else if (5 === n) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3 + r.xn3 + r.xs4 + r.xn4 + r.xs5; else { for (i = r.xs0 + t + r.xs1, n = 1; n < r.l; n++) i += r["xn" + n] + r["xs" + (n + 1)]; r.t[r.p] = i; } else -1 === r.type ? (r.t[r.p] = r.xs0) : r.setRatio && r.setRatio(e); else r.t[r.p] = t + r.xs0; r = r._next; } else for (; r;) 2 !== r.type ? (r.t[r.p] = r.b) : r.setRatio(e), (r = r._next); else for (; r;) { if (2 !== r.type) if (r.r && -1 !== r.type) if (((t = Math.round(r.s + r.c)), r.type)) { if (1 === r.type) { for (n = r.l, i = r.xs0 + t + r.xs1, n = 1; n < r.l; n++) i += r["xn" + n] + r["xs" + (n + 1)]; r.t[r.p] = i; } } else r.t[r.p] = t + r.xs0; else r.t[r.p] = r.e; else r.setRatio(e); r = r._next; } }), (u._enableTransforms = function (e) { (this._transform = this._transform || je(this._target, o, !0)), (this._transformType = (this._transform.svg && Me) || (!e && 3 !== this._transformType) ? 2 : 3); }); var He = function (e) { (this.t[this.p] = this.e), this.data._linkCSSP(this, this._next, null, !0); }; (u._addLazySet = function (e, t, i) { var n = (this._firstPT = new ve(e, t, 0, 0, this._firstPT, 2)); (n.e = i), (n.setRatio = He), (n.data = this); }), (u._linkCSSP = function (e, t, i, n) { return ( e && (t && (t._prev = e), e._next && (e._next._prev = e._prev), e._prev ? (e._prev._next = e._next) : this._firstPT === e && ((this._firstPT = e._next), (n = !0)), i ? (i._next = e) : n || null !== this._firstPT || (this._firstPT = e), (e._next = t), (e._prev = i)), e ); }), (u._kill = function (t) { var i, n, r, o = t; if (t.autoAlpha || t.alpha) { o = {}; for (n in t) o[n] = t[n]; (o.opacity = 1), o.autoAlpha && (o.visibility = 1); } return ( t.className && (i = this._classNamePT) && ((r = i.xfirst), r && r._prev ? this._linkCSSP(r._prev, i._next, r._prev._prev) : r === this._firstPT && (this._firstPT = i._next), i._next && this._linkCSSP(i._next, i._next._next, r._prev), (this._classNamePT = null)), e.prototype._kill.call(this, o) ); }); var We = function (e, t, i) { var n, r, o, a; if (e.slice) for (r = e.length; --r > -1;) We(e[r], t, i); else for (n = e.childNodes, r = n.length; --r > -1;)(o = n[r]), (a = o.type), o.style && (t.push(J(o)), i && i.push(o)), (1 !== a && 9 !== a && 11 !== a) || !o.childNodes.length || We(o, t, i); }; return ( (s.cascadeTo = function (e, i, n) { var r, o, a, s, l = t.to(e, i, n), c = [l], u = [], h = [], d = [], f = t._internals.reservedProps; for (e = l._targets || l.target, We(e, u, d), l.render(i, !0, !0), We(e, h), l.render(0, !0, !0), l._enabled(!0), r = d.length; --r > -1;) if (((o = ee(d[r], u[r], h[r])), o.firstMPT)) { o = o.difs; for (a in n) f[a] && (o[a] = n[a]); s = {}; for (a in o) s[a] = u[r][a]; c.push(t.fromTo(d[r], i, s, o)); } return c; }), e.activate([s]), s ); }, !0 ), (function () { var e = i._gsDefine.plugin({ propName: "roundProps", version: "1.5", priority: -1, API: 2, init: function (e, t, i) { return (this._tween = i), !0; }, }), t = function (e) { for (; e;) e.f || e.blob || (e.r = 1), (e = e._next); }, n = e.prototype; (n._onInitAllProps = function () { for (var e, i, n, r = this._tween, o = r.vars.roundProps.join ? r.vars.roundProps : r.vars.roundProps.split(","), a = o.length, s = {}, l = r._propLookup.roundProps; --a > -1;) s[o[a]] = 1; for (a = o.length; --a > -1;) for (e = o[a], i = r._firstPT; i;) (n = i._next), i.pg ? i.t._roundProps(s, !0) : i.n === e && (2 === i.f && i.t ? t(i.t._firstPT) : (this._add(i.t, e, i.s, i.c), n && (n._prev = i._prev), i._prev ? (i._prev._next = n) : r._firstPT === i && (r._firstPT = n), (i._next = i._prev = null), (r._propLookup[e] = l))), (i = n); return !1; }), (n._add = function (e, t, i, n) { this._addTween(e, t, i, i + n, t, !0), this._overwriteProps.push(t); }); })(), (function () { i._gsDefine.plugin({ propName: "attr", API: 2, version: "0.5.0", init: function (e, t, i) { var n; if ("function" != typeof e.setAttribute) return !1; for (n in t) this._addTween(e, "setAttribute", e.getAttribute(n) + "", t[n] + "", n, !1, n), this._overwriteProps.push(n); return !0; }, }); })(), (i._gsDefine.plugin({ propName: "directionalRotation", version: "0.2.1", API: 2, init: function (e, t, i) { "object" != typeof t && (t = { rotation: t }), (this.finals = {}); var n, r, o, a, s, l, c = t.useRadians === !0 ? 2 * Math.PI : 360, u = 1e-6; for (n in t) "useRadians" !== n && ((l = (t[n] + "").split("_")), (r = l[0]), (o = parseFloat("function" != typeof e[n] ? e[n] : e[n.indexOf("set") || "function" != typeof e["get" + n.substr(3)] ? n : "get" + n.substr(3)]())), (a = this.finals[n] = "string" == typeof r && "=" === r.charAt(1) ? o + parseInt(r.charAt(0) + "1", 10) * Number(r.substr(2)) : Number(r) || 0), (s = a - o), l.length && ((r = l.join("_")), -1 !== r.indexOf("short") && ((s %= c), s !== s % (c / 2) && (s = 0 > s ? s + c : s - c)), -1 !== r.indexOf("_cw") && 0 > s ? (s = ((s + 9999999999 * c) % c) - ((s / c) | 0) * c) : -1 !== r.indexOf("ccw") && s > 0 && (s = ((s - 9999999999 * c) % c) - ((s / c) | 0) * c)), (s > u || -u > s) && (this._addTween(e, n, o, o + s, n), this._overwriteProps.push(n))); return !0; }, set: function (e) { var t; if (1 !== e) this._super.setRatio.call(this, e); else for (t = this._firstPT; t;) t.f ? t.t[t.p](this.finals[t.p]) : (t.t[t.p] = this.finals[t.p]), (t = t._next); }, })._autoCSS = !0), i._gsDefine( "easing.Back", ["easing.Ease"], function (e) { var t, n, r, o = i.GreenSockGlobals || i, a = o.com.greensock, s = 2 * Math.PI, l = Math.PI / 2, c = a._class, u = function (t, i) { var n = c("easing." + t, function () {}, !0), r = (n.prototype = new e()); return (r.constructor = n), (r.getRatio = i), n; }, h = e.register || function () {}, d = function (e, t, i, n, r) { var o = c("easing." + e, { easeOut: new t(), easeIn: new i(), easeInOut: new n() }, !0); return h(o, e), o; }, f = function (e, t, i) { (this.t = e), (this.v = t), i && ((this.next = i), (i.prev = this), (this.c = i.v - t), (this.gap = i.t - e)); }, p = function (t, i) { var n = c( "easing." + t, function (e) { (this._p1 = e || 0 === e ? e : 1.70158), (this._p2 = 1.525 * this._p1); }, !0 ), r = (n.prototype = new e()); return ( (r.constructor = n), (r.getRatio = i), (r.config = function (e) { return new n(e); }), n ); }, m = d( "Back", p("BackOut", function (e) { return (e -= 1) * e * ((this._p1 + 1) * e + this._p1) + 1; }), p("BackIn", function (e) { return e * e * ((this._p1 + 1) * e - this._p1); }), p("BackInOut", function (e) { return (e *= 2) < 1 ? 0.5 * e * e * ((this._p2 + 1) * e - this._p2) : 0.5 * ((e -= 2) * e * ((this._p2 + 1) * e + this._p2) + 2); }) ), v = c( "easing.SlowMo", function (e, t, i) { (t = t || 0 === t ? t : 0.7), null == e ? (e = 0.7) : e > 1 && (e = 1), (this._p = 1 !== e ? t : 0), (this._p1 = (1 - e) / 2), (this._p2 = e), (this._p3 = this._p1 + this._p2), (this._calcEnd = i === !0); }, !0 ), g = (v.prototype = new e()); return ( (g.constructor = v), (g.getRatio = function (e) { var t = e + (0.5 - e) * this._p; return e < this._p1 ? this._calcEnd ? 1 - (e = 1 - e / this._p1) * e : t - (e = 1 - e / this._p1) * e * e * e * t : e > this._p3 ? this._calcEnd ? 1 - (e = (e - this._p3) / this._p1) * e : t + (e - t) * (e = (e - this._p3) / this._p1) * e * e * e : this._calcEnd ? 1 : t; }), (v.ease = new v(0.7, 0.7)), (g.config = v.config = function (e, t, i) { return new v(e, t, i); }), (t = c( "easing.SteppedEase", function (e) { (e = e || 1), (this._p1 = 1 / e), (this._p2 = e + 1); }, !0 )), (g = t.prototype = new e()), (g.constructor = t), (g.getRatio = function (e) { return 0 > e ? (e = 0) : e >= 1 && (e = 0.999999999), ((this._p2 * e) >> 0) * this._p1; }), (g.config = t.config = function (e) { return new t(e); }), (n = c( "easing.RoughEase", function (t) { t = t || {}; for ( var i, n, r, o, a, s, l = t.taper || "none", c = [], u = 0, h = 0 | (t.points || 20), d = h, p = t.randomize !== !1, m = t.clamp === !0, v = t.template instanceof e ? t.template : null, g = "number" == typeof t.strength ? 0.4 * t.strength : 0.4; --d > -1; ) (i = p ? Math.random() : (1 / h) * d), (n = v ? v.getRatio(i) : i), "none" === l ? (r = g) : "out" === l ? ((o = 1 - i), (r = o * o * g)) : "in" === l ? (r = i * i * g) : 0.5 > i ? ((o = 2 * i), (r = o * o * 0.5 * g)) : ((o = 2 * (1 - i)), (r = o * o * 0.5 * g)), p ? (n += Math.random() * r - 0.5 * r) : d % 2 ? (n += 0.5 * r) : (n -= 0.5 * r), m && (n > 1 ? (n = 1) : 0 > n && (n = 0)), (c[u++] = { x: i, y: n }); for ( c.sort(function (e, t) { return e.x - t.x; }), s = new f(1, 1, null), d = h; --d > -1; ) (a = c[d]), (s = new f(a.x, a.y, s)); this._prev = new f(0, 0, 0 !== s.t ? s : s.next); }, !0 )), (g = n.prototype = new e()), (g.constructor = n), (g.getRatio = function (e) { var t = this._prev; if (e > t.t) { for (; t.next && e >= t.t;) t = t.next; t = t.prev; } else for (; t.prev && e <= t.t;) t = t.prev; return (this._prev = t), t.v + ((e - t.t) / t.gap) * t.c; }), (g.config = function (e) { return new n(e); }), (n.ease = new n()), d( "Bounce", u("BounceOut", function (e) { return 1 / 2.75 > e ? 7.5625 * e * e : 2 / 2.75 > e ? 7.5625 * (e -= 1.5 / 2.75) * e + 0.75 : 2.5 / 2.75 > e ? 7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 : 7.5625 * (e -= 2.625 / 2.75) * e + 0.984375; }), u("BounceIn", function (e) { return (e = 1 - e) < 1 / 2.75 ? 1 - 7.5625 * e * e : 2 / 2.75 > e ? 1 - (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) : 2.5 / 2.75 > e ? 1 - (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) : 1 - (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375); }), u("BounceInOut", function (e) { var t = 0.5 > e; return ( (e = t ? 1 - 2 * e : 2 * e - 1), (e = 1 / 2.75 > e ? 7.5625 * e * e : 2 / 2.75 > e ? 7.5625 * (e -= 1.5 / 2.75) * e + 0.75 : 2.5 / 2.75 > e ? 7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 : 7.5625 * (e -= 2.625 / 2.75) * e + 0.984375), t ? 0.5 * (1 - e) : 0.5 * e + 0.5 ); }) ), d( "Circ", u("CircOut", function (e) { return Math.sqrt(1 - (e -= 1) * e); }), u("CircIn", function (e) { return -(Math.sqrt(1 - e * e) - 1); }), u("CircInOut", function (e) { return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1); }) ), (r = function (t, i, n) { var r = c( "easing." + t, function (e, t) { (this._p1 = e >= 1 ? e : 1), (this._p2 = (t || n) / (1 > e ? e : 1)), (this._p3 = (this._p2 / s) * (Math.asin(1 / this._p1) || 0)), (this._p2 = s / this._p2); }, !0 ), o = (r.prototype = new e()); return ( (o.constructor = r), (o.getRatio = i), (o.config = function (e, t) { return new r(e, t); }), r ); }), d( "Elastic", r( "ElasticOut", function (e) { return this._p1 * Math.pow(2, -10 * e) * Math.sin((e - this._p3) * this._p2) + 1; }, 0.3 ), r( "ElasticIn", function (e) { return -(this._p1 * Math.pow(2, 10 * (e -= 1)) * Math.sin((e - this._p3) * this._p2)); }, 0.3 ), r( "ElasticInOut", function (e) { return (e *= 2) < 1 ? -0.5 * (this._p1 * Math.pow(2, 10 * (e -= 1)) * Math.sin((e - this._p3) * this._p2)) : this._p1 * Math.pow(2, -10 * (e -= 1)) * Math.sin((e - this._p3) * this._p2) * 0.5 + 1; }, 0.45 ) ), d( "Expo", u("ExpoOut", function (e) { return 1 - Math.pow(2, -10 * e); }), u("ExpoIn", function (e) { return Math.pow(2, 10 * (e - 1)) - 0.001; }), u("ExpoInOut", function (e) { return (e *= 2) < 1 ? 0.5 * Math.pow(2, 10 * (e - 1)) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))); }) ), d( "Sine", u("SineOut", function (e) { return Math.sin(e * l); }), u("SineIn", function (e) { return -Math.cos(e * l) + 1; }), u("SineInOut", function (e) { return -0.5 * (Math.cos(Math.PI * e) - 1); }) ), c( "easing.EaseLookup", { find: function (t) { return e.map[t]; }, }, !0 ), h(o.SlowMo, "SlowMo", "ease,"), h(n, "RoughEase", "ease,"), h(t, "SteppedEase", "ease,"), m ); }, !0 ); }), i._gsDefine && i._gsQueue.pop()(), (function (e, i) { "use strict"; var n = (e.GreenSockGlobals = e.GreenSockGlobals || e); if (!n.TweenLite) { var r, o, a, s, l, c = function (e) { var t, i = e.split("."), r = n; for (t = 0; t < i.length; t++) r[i[t]] = r = r[i[t]] || {}; return r; }, u = c("com.greensock"), h = 1e-10, d = function (e) { var t, i = [], n = e.length; for (t = 0; t !== n; i.push(e[t++])); return i; }, f = function () {}, p = (function () { var e = Object.prototype.toString, t = e.call([]); return function (i) { return null != i && (i instanceof Array || ("object" == typeof i && !!i.push && e.call(i) === t)); }; })(), m = {}, v = function (r, o, a, s) { (this.sc = m[r] ? m[r].sc : []), (m[r] = this), (this.gsClass = null), (this.func = a); var l = []; (this.check = function (u) { for (var h, d, f, p, g, y = o.length, _ = y; --y > -1;)(h = m[o[y]] || new v(o[y], [])).gsClass ? ((l[y] = h.gsClass), _--) : u && h.sc.push(this); if (0 === _ && a) for ( d = ("com.greensock." + r).split("."), f = d.pop(), p = c(d.join("."))[f] = this.gsClass = a.apply(a, l), s && ((n[f] = p), (g = "undefined" != typeof t && t.exports), !g && "function" == typeof define && define.amd ? define((e.GreenSockAMDPath ? e.GreenSockAMDPath + "/" : "") + r.split(".").pop(), [], function () { return p; }) : r === i && g && (t.exports = p)), y = 0; y < this.sc.length; y++ ) this.sc[y].check(); }), this.check(!0); }, g = (e._gsDefine = function (e, t, i, n) { return new v(e, t, i, n); }), y = (u._class = function (e, t, i) { return ( (t = t || function () {}), g( e, [], function () { return t; }, i ), t ); }); g.globals = n; var _ = [0, 0, 1, 1], b = [], x = y( "easing.Ease", function (e, t, i, n) { (this._func = e), (this._type = i || 0), (this._power = n || 0), (this._params = t ? _.concat(t) : _); }, !0 ), w = (x.map = {}), M = (x.register = function (e, t, i, n) { for (var r, o, a, s, l = t.split(","), c = l.length, h = (i || "easeIn,easeOut,easeInOut").split(","); --c > -1;) for (o = l[c], r = n ? y("easing." + o, null, !0) : u.easing[o] || {}, a = h.length; --a > -1;)(s = h[a]), (w[o + "." + s] = w[s + o] = r[s] = e.getRatio ? e : e[s] || new e()); }); for ( a = x.prototype, a._calcEnd = !1, a.getRatio = function (e) { if (this._func) return (this._params[0] = e), this._func.apply(null, this._params); var t = this._type, i = this._power, n = 1 === t ? 1 - e : 2 === t ? e : 0.5 > e ? 2 * e : 2 * (1 - e); return 1 === i ? (n *= n) : 2 === i ? (n *= n * n) : 3 === i ? (n *= n * n * n) : 4 === i && (n *= n * n * n * n), 1 === t ? 1 - n : 2 === t ? n : 0.5 > e ? n / 2 : 1 - n / 2; }, r = ["Linear", "Quad", "Cubic", "Quart", "Quint,Strong"], o = r.length; --o > -1; ) (a = r[o] + ",Power" + o), M(new x(null, null, 1, o), a, "easeOut", !0), M(new x(null, null, 2, o), a, "easeIn" + (0 === o ? ",easeNone" : "")), M(new x(null, null, 3, o), a, "easeInOut"); (w.linear = u.easing.Linear.easeIn), (w.swing = u.easing.Quad.easeInOut); var T = y("events.EventDispatcher", function (e) { (this._listeners = {}), (this._eventTarget = e || this); }); (a = T.prototype), (a.addEventListener = function (e, t, i, n, r) { r = r || 0; var o, a, c = this._listeners[e], u = 0; for (null == c && (this._listeners[e] = c = []), a = c.length; --a > -1;)(o = c[a]), o.c === t && o.s === i ? c.splice(a, 1) : 0 === u && o.pr < r && (u = a + 1); c.splice(u, 0, { c: t, s: i, up: n, pr: r }), this !== s || l || s.wake(); }), (a.removeEventListener = function (e, t) { var i, n = this._listeners[e]; if (n) for (i = n.length; --i > -1;) if (n[i].c === t) return void n.splice(i, 1); }), (a.dispatchEvent = function (e) { var t, i, n, r = this._listeners[e]; if (r) for (t = r.length, i = this._eventTarget; --t > -1;)(n = r[t]), n && (n.up ? n.c.call(n.s || i, { type: e, target: i }) : n.c.call(n.s || i)); }); var S = e.requestAnimationFrame, E = e.cancelAnimationFrame, A = Date.now || function () { return new Date().getTime(); }, C = A(); for (r = ["ms", "moz", "webkit", "o"], o = r.length; --o > -1 && !S;)(S = e[r[o] + "RequestAnimationFrame"]), (E = e[r[o] + "CancelAnimationFrame"] || e[r[o] + "CancelRequestAnimationFrame"]); y("Ticker", function (e, t) { var i, n, r, o, a, c = this, u = A(), d = t !== !1 && S, p = 500, m = 33, v = "tick", g = function (e) { var t, s, l = A() - C; l > p && (u += l - m), (C += l), (c.time = (C - u) / 1e3), (t = c.time - a), (!i || t > 0 || e === !0) && (c.frame++, (a += t + (t >= o ? 0.004 : o - t)), (s = !0)), e !== !0 && (r = n(g)), s && c.dispatchEvent(v); }; T.call(c), (c.time = c.frame = 0), (c.tick = function () { g(!0); }), (c.lagSmoothing = function (e, t) { (p = e || 1 / h), (m = Math.min(t, p, 0)); }), (c.sleep = function () { null != r && (d && E ? E(r) : clearTimeout(r), (n = f), (r = null), c === s && (l = !1)); }), (c.wake = function () { null !== r ? c.sleep() : c.frame > 10 && (C = A() - p + 5), (n = 0 === i ? f : d && S ? S : function (e) { return setTimeout(e, (1e3 * (a - c.time) + 1) | 0); }), c === s && (l = !0), g(2); }), (c.fps = function (e) { return arguments.length ? ((i = e), (o = 1 / (i || 60)), (a = this.time + o), void c.wake()) : i; }), (c.useRAF = function (e) { return arguments.length ? (c.sleep(), (d = e), void c.fps(i)) : d; }), c.fps(e), setTimeout(function () { d && c.frame < 5 && c.useRAF(!1); }, 1500); }), (a = u.Ticker.prototype = new u.events.EventDispatcher()), (a.constructor = u.Ticker); var P = y("core.Animation", function (e, t) { if ( ((this.vars = t = t || {}), (this._duration = this._totalDuration = e || 0), (this._delay = Number(t.delay) || 0), (this._timeScale = 1), (this._active = t.immediateRender === !0), (this.data = t.data), (this._reversed = t.reversed === !0), Y) ) { l || s.wake(); var i = this.vars.useFrames ? X : Y; i.add(this, i._time), this.vars.paused && this.paused(!0); } }); (s = P.ticker = new u.Ticker()), (a = P.prototype), (a._dirty = a._gc = a._initted = a._paused = !1), (a._totalTime = a._time = 0), (a._rawPrevTime = -1), (a._next = a._last = a._onUpdate = a._timeline = a.timeline = null), (a._paused = !1); var L = function () { l && A() - C > 2e3 && s.wake(), setTimeout(L, 2e3); }; L(), (a.play = function (e, t) { return null != e && this.seek(e, t), this.reversed(!1).paused(!1); }), (a.pause = function (e, t) { return null != e && this.seek(e, t), this.paused(!0); }), (a.resume = function (e, t) { return null != e && this.seek(e, t), this.paused(!1); }), (a.seek = function (e, t) { return this.totalTime(Number(e), t !== !1); }), (a.restart = function (e, t) { return this.reversed(!1) .paused(!1) .totalTime(e ? -this._delay : 0, t !== !1, !0); }), (a.reverse = function (e, t) { return null != e && this.seek(e || this.totalDuration(), t), this.reversed(!0).paused(!1); }), (a.render = function (e, t, i) {}), (a.invalidate = function () { return (this._time = this._totalTime = 0), (this._initted = this._gc = !1), (this._rawPrevTime = -1), (this._gc || !this.timeline) && this._enabled(!0), this; }), (a.isActive = function () { var e, t = this._timeline, i = this._startTime; return !t || (!this._gc && !this._paused && t.isActive() && (e = t.rawTime()) >= i && e < i + this.totalDuration() / this._timeScale); }), (a._enabled = function (e, t) { return ( l || s.wake(), (this._gc = !e), (this._active = this.isActive()), t !== !0 && (e && !this.timeline ? this._timeline.add(this, this._startTime - this._delay) : !e && this.timeline && this._timeline._remove(this, !0)), !1 ); }), (a._kill = function (e, t) { return this._enabled(!1, !1); }), (a.kill = function (e, t) { return this._kill(e, t), this; }), (a._uncache = function (e) { for (var t = e ? this : this.timeline; t;)(t._dirty = !0), (t = t.timeline); return this; }), (a._swapSelfInParams = function (e) { for (var t = e.length, i = e.concat(); --t > -1;) "{self}" === e[t] && (i[t] = this); return i; }), (a._callback = function (e) { var t = this.vars; t[e].apply(t[e + "Scope"] || t.callbackScope || this, t[e + "Params"] || b); }), (a.eventCallback = function (e, t, i, n) { if ("on" === (e || "").substr(0, 2)) { var r = this.vars; if (1 === arguments.length) return r[e]; null == t ? delete r[e] : ((r[e] = t), (r[e + "Params"] = p(i) && -1 !== i.join("").indexOf("{self}") ? this._swapSelfInParams(i) : i), (r[e + "Scope"] = n)), "onUpdate" === e && (this._onUpdate = t); } return this; }), (a.delay = function (e) { return arguments.length ? (this._timeline.smoothChildTiming && this.startTime(this._startTime + e - this._delay), (this._delay = e), this) : this._delay; }), (a.duration = function (e) { return arguments.length ? ((this._duration = this._totalDuration = e), this._uncache(!0), this._timeline.smoothChildTiming && this._time > 0 && this._time < this._duration && 0 !== e && this.totalTime(this._totalTime * (e / this._duration), !0), this) : ((this._dirty = !1), this._duration); }), (a.totalDuration = function (e) { return (this._dirty = !1), arguments.length ? this.duration(e) : this._totalDuration; }), (a.time = function (e, t) { return arguments.length ? (this._dirty && this.totalDuration(), this.totalTime(e > this._duration ? this._duration : e, t)) : this._time; }), (a.totalTime = function (e, t, i) { if ((l || s.wake(), !arguments.length)) return this._totalTime; if (this._timeline) { if ((0 > e && !i && (e += this.totalDuration()), this._timeline.smoothChildTiming)) { this._dirty && this.totalDuration(); var n = this._totalDuration, r = this._timeline; if ((e > n && !i && (e = n), (this._startTime = (this._paused ? this._pauseTime : r._time) - (this._reversed ? n - e : e) / this._timeScale), r._dirty || this._uncache(!1), r._timeline)) for (; r._timeline;) r._timeline._time !== (r._startTime + r._totalTime) / r._timeScale && r.totalTime(r._totalTime, !0), (r = r._timeline); } this._gc && this._enabled(!0, !1), (this._totalTime !== e || 0 === this._duration) && (I.length && Z(), this.render(e, t, !1), I.length && Z()); } return this; }), (a.progress = a.totalProgress = function (e, t) { var i = this.duration(); return arguments.length ? this.totalTime(i * e, t) : i ? this._time / i : this.ratio; }), (a.startTime = function (e) { return arguments.length ? (e !== this._startTime && ((this._startTime = e), this.timeline && this.timeline._sortChildren && this.timeline.add(this, e - this._delay)), this) : this._startTime; }), (a.endTime = function (e) { return this._startTime + (0 != e ? this.totalDuration() : this.duration()) / this._timeScale; }), (a.timeScale = function (e) { if (!arguments.length) return this._timeScale; if (((e = e || h), this._timeline && this._timeline.smoothChildTiming)) { var t = this._pauseTime, i = t || 0 === t ? t : this._timeline.totalTime(); this._startTime = i - ((i - this._startTime) * this._timeScale) / e; } return (this._timeScale = e), this._uncache(!1); }), (a.reversed = function (e) { return arguments.length ? (e != this._reversed && ((this._reversed = e), this.totalTime(this._timeline && !this._timeline.smoothChildTiming ? this.totalDuration() - this._totalTime : this._totalTime, !0)), this) : this._reversed; }), (a.paused = function (e) { if (!arguments.length) return this._paused; var t, i, n = this._timeline; return ( e != this._paused && n && (l || e || s.wake(), (t = n.rawTime()), (i = t - this._pauseTime), !e && n.smoothChildTiming && ((this._startTime += i), this._uncache(!1)), (this._pauseTime = e ? t : null), (this._paused = e), (this._active = this.isActive()), !e && 0 !== i && this._initted && this.duration() && ((t = n.smoothChildTiming ? this._totalTime : (t - this._startTime) / this._timeScale), this.render(t, t === this._totalTime, !0))), this._gc && !e && this._enabled(!0, !1), this ); }); var R = y("core.SimpleTimeline", function (e) { P.call(this, 0, e), (this.autoRemoveChildren = this.smoothChildTiming = !0); }); (a = R.prototype = new P()), (a.constructor = R), (a.kill()._gc = !1), (a._first = a._last = a._recent = null), (a._sortChildren = !1), (a.add = a.insert = function (e, t, i, n) { var r, o; if ( ((e._startTime = Number(t || 0) + e._delay), e._paused && this !== e._timeline && (e._pauseTime = e._startTime + (this.rawTime() - e._startTime) / e._timeScale), e.timeline && e.timeline._remove(e, !0), (e.timeline = e._timeline = this), e._gc && e._enabled(!0, !0), (r = this._last), this._sortChildren) ) for (o = e._startTime; r && r._startTime > o;) r = r._prev; return ( r ? ((e._next = r._next), (r._next = e)) : ((e._next = this._first), (this._first = e)), e._next ? (e._next._prev = e) : (this._last = e), (e._prev = r), (this._recent = e), this._timeline && this._uncache(!0), this ); }), (a._remove = function (e, t) { return ( e.timeline === this && (t || e._enabled(!1, !0), e._prev ? (e._prev._next = e._next) : this._first === e && (this._first = e._next), e._next ? (e._next._prev = e._prev) : this._last === e && (this._last = e._prev), (e._next = e._prev = e.timeline = null), e === this._recent && (this._recent = this._last), this._timeline && this._uncache(!0)), this ); }), (a.render = function (e, t, i) { var n, r = this._first; for (this._totalTime = this._time = this._rawPrevTime = e; r;) (n = r._next), (r._active || (e >= r._startTime && !r._paused)) && (r._reversed ? r.render((r._dirty ? r.totalDuration() : r._totalDuration) - (e - r._startTime) * r._timeScale, t, i) : r.render((e - r._startTime) * r._timeScale, t, i)), (r = n); }), (a.rawTime = function () { return l || s.wake(), this._totalTime; }); var O = y( "TweenLite", function (t, i, n) { if ((P.call(this, i, n), (this.render = O.prototype.render), null == t)) throw "Cannot tween a null target."; this.target = t = "string" != typeof t ? t : O.selector(t) || t; var r, o, a, s = t.jquery || (t.length && t !== e && t[0] && (t[0] === e || (t[0].nodeType && t[0].style && !t.nodeType))), l = this.vars.overwrite; if (((this._overwrite = l = null == l ? W[O.defaultOverwrite] : "number" == typeof l ? l >> 0 : W[l]), (s || t instanceof Array || (t.push && p(t))) && "number" != typeof t[0])) for (this._targets = a = d(t), this._propLookup = [], this._siblings = [], r = 0; r < a.length; r++) (o = a[r]), o ? "string" != typeof o ? o.length && o !== e && o[0] && (o[0] === e || (o[0].nodeType && o[0].style && !o.nodeType)) ? (a.splice(r--, 1), (this._targets = a = a.concat(d(o)))) : ((this._siblings[r] = K(o, this, !1)), 1 === l && this._siblings[r].length > 1 && J(o, this, null, 1, this._siblings[r])) : ((o = a[r--] = O.selector(o)), "string" == typeof o && a.splice(r + 1, 1)) : a.splice(r--, 1); else(this._propLookup = {}), (this._siblings = K(t, this, !1)), 1 === l && this._siblings.length > 1 && J(t, this, null, 1, this._siblings); (this.vars.immediateRender || (0 === i && 0 === this._delay && this.vars.immediateRender !== !1)) && ((this._time = -h), this.render(-this._delay)); }, !0 ), k = function (t) { return t && t.length && t !== e && t[0] && (t[0] === e || (t[0].nodeType && t[0].style && !t.nodeType)); }, D = function (e, t) { var i, n = {}; for (i in e) H[i] || (i in t && "transform" !== i && "x" !== i && "y" !== i && "width" !== i && "height" !== i && "className" !== i && "border" !== i) || !(!G[i] || (G[i] && G[i]._autoCSS)) || ((n[i] = e[i]), delete e[i]); e.css = n; }; (a = O.prototype = new P()), (a.constructor = O), (a.kill()._gc = !1), (a.ratio = 0), (a._firstPT = a._targets = a._overwrittenProps = a._startAt = null), (a._notifyPluginsOfEnabled = a._lazy = !1), (O.version = "1.18.0"), (O.defaultEase = a._ease = new x(null, null, 1, 1)), (O.defaultOverwrite = "auto"), (O.ticker = s), (O.autoSleep = 120), (O.lagSmoothing = function (e, t) { s.lagSmoothing(e, t); }), (O.selector = e.$ || e.jQuery || function (t) { var i = e.$ || e.jQuery; return i ? ((O.selector = i), i(t)) : "undefined" == typeof document ? t : document.querySelectorAll ? document.querySelectorAll(t) : document.getElementById("#" === t.charAt(0) ? t.substr(1) : t); }); var I = [], N = {}, U = /(?:(-|-=|+=)?d*.?d*(?:e[-+]?d+)?)[0-9]/gi, j = function (e) { for (var t, i = this._firstPT, n = 1e-6; i;) (t = i.blob ? (e ? this.join("") : this.start) : i.c * e + i.s), i.r ? (t = Math.round(t)) : n > t && t > -n && (t = 0), i.f ? (i.fp ? i.t[i.p](i.fp, t) : i.t[i.p](t)) : (i.t[i.p] = t), (i = i._next); }, B = function (e, t, i, n) { var r, o, a, s, l, c, u, h = [e, t], d = 0, f = "", p = 0; for ( h.start = e, i && (i(h), (e = h[0]), (t = h[1])), h.length = 0, r = e.match(U) || [], o = t.match(U) || [], n && ((n._next = null), (n.blob = 1), (h._firstPT = n)), l = o.length, s = 0; l > s; s++ ) (u = o[s]), (c = t.substr(d, t.indexOf(u, d) - d)), (f += c || !s ? c : ","), (d += c.length), p ? (p = (p + 1) % 5) : "rgba(" === c.substr(-5) && (p = 1), u === r[s] || r.length <= s ? (f += u) : (f && (h.push(f), (f = "")), (a = parseFloat(r[s])), h.push(a), (h._firstPT = { _next: h._firstPT, t: h, p: h.length - 1, s: a, c: ("=" === u.charAt(1) ? parseInt(u.charAt(0) + "1", 10) * parseFloat(u.substr(2)) : parseFloat(u) - a) || 0, f: 0, r: p && 4 > p, })), (d += u.length); return (f += t.substr(d)), f && h.push(f), (h.setRatio = j), h; }, F = function (e, t, i, n, r, o, a, s) { var l, c, u = "get" === i ? e[t] : i, h = typeof e[t], d = "string" == typeof n && "=" === n.charAt(1), f = { t: e, p: t, s: u, f: "function" === h, pg: 0, n: r || t, r: o, pr: 0, c: d ? parseInt(n.charAt(0) + "1", 10) * parseFloat(n.substr(2)) : parseFloat(n) - u || 0 }; return ( "number" !== h && ("function" === h && "get" === i && ((c = t.indexOf("set") || "function" != typeof e["get" + t.substr(3)] ? t : "get" + t.substr(3)), (f.s = u = a ? e[c](a) : e[c]())), "string" == typeof u && (a || isNaN(u)) ? ((f.fp = a), (l = B(u, n, s || O.defaultStringFilter, f)), (f = { t: l, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: r || t, pr: 0 })) : d || (f.c = parseFloat(n) - parseFloat(u) || 0)), f.c ? ((f._next = this._firstPT) && (f._next._prev = f), (this._firstPT = f), f) : void 0 ); }, V = (O._internals = { isArray: p, isSelector: k, lazyTweens: I, blobDif: B }), G = (O._plugins = {}), z = (V.tweenLookup = {}), $ = 0, H = (V.reservedProps = { ease: 1, delay: 1, overwrite: 1, onComplete: 1, onCompleteParams: 1, onCompleteScope: 1, useFrames: 1, runBackwards: 1, startAt: 1, onUpdate: 1, onUpdateParams: 1, onUpdateScope: 1, onStart: 1, onStartParams: 1, onStartScope: 1, onReverseComplete: 1, onReverseCompleteParams: 1, onReverseCompleteScope: 1, onRepeat: 1, onRepeatParams: 1, onRepeatScope: 1, easeParams: 1, yoyo: 1, immediateRender: 1, repeat: 1, repeatDelay: 1, data: 1, paused: 1, reversed: 1, autoCSS: 1, lazy: 1, onOverwrite: 1, callbackScope: 1, stringFilter: 1, }), W = { none: 0, all: 1, auto: 2, concurrent: 3, allOnStart: 4, preexisting: 5, true: 1, false: 0 }, X = (P._rootFramesTimeline = new R()), Y = (P._rootTimeline = new R()), q = 30, Z = (V.lazyRender = function () { var e, t = I.length; for (N = {}; --t > -1;)(e = I[t]), e && e._lazy !== !1 && (e.render(e._lazy[0], e._lazy[1], !0), (e._lazy = !1)); I.length = 0; }); (Y._startTime = s.time), (X._startTime = s.frame), (Y._active = X._active = !0), setTimeout(Z, 1), (P._updateRoot = O.render = function () { var e, t, i; if ((I.length && Z(), Y.render((s.time - Y._startTime) * Y._timeScale, !1, !1), X.render((s.frame - X._startTime) * X._timeScale, !1, !1), I.length && Z(), s.frame >= q)) { q = s.frame + (parseInt(O.autoSleep, 10) || 120); for (i in z) { for (t = z[i].tweens, e = t.length; --e > -1;) t[e]._gc && t.splice(e, 1); 0 === t.length && delete z[i]; } if (((i = Y._first), (!i || i._paused) && O.autoSleep && !X._first && 1 === s._listeners.tick.length)) { for (; i && i._paused;) i = i._next; i || s.sleep(); } } }), s.addEventListener("tick", P._updateRoot); var K = function (e, t, i) { var n, r, o = e._gsTweenID; if ((z[o || (e._gsTweenID = o = "t" + $++)] || (z[o] = { target: e, tweens: [] }), t && ((n = z[o].tweens), (n[(r = n.length)] = t), i))) for (; --r > -1;) n[r] === t && n.splice(r, 1); return z[o].tweens; }, Q = function (e, t, i, n) { var r, o, a = e.vars.onOverwrite; return a && (r = a(e, t, i, n)), (a = O.onOverwrite), a && (o = a(e, t, i, n)), r !== !1 && o !== !1; }, J = function (e, t, i, n, r) { var o, a, s, l; if (1 === n || n >= 4) { for (l = r.length, o = 0; l > o; o++) if ((s = r[o]) !== t) s._gc || (s._kill(null, e, t) && (a = !0)); else if (5 === n) break; return a; } var c, u = t._startTime + h, d = [], f = 0, p = 0 === t._duration; for (o = r.length; --o > -1;) (s = r[o]) === t || s._gc || s._paused || (s._timeline !== t._timeline ? ((c = c || ee(t, 0, p)), 0 === ee(s, c, p) && (d[f++] = s)) : s._startTime <= u && s._startTime + s.totalDuration() / s._timeScale > u && (((p || !s._initted) && u - s._startTime <= 2e-10) || (d[f++] = s))); for (o = f; --o > -1;) if (((s = d[o]), 2 === n && s._kill(i, e, t) && (a = !0), 2 !== n || (!s._firstPT && s._initted))) { if (2 !== n && !Q(s, t)) continue; s._enabled(!1, !1) && (a = !0); } return a; }, ee = function (e, t, i) { for (var n = e._timeline, r = n._timeScale, o = e._startTime; n._timeline;) { if (((o += n._startTime), (r *= n._timeScale), n._paused)) return -100; n = n._timeline; } return (o /= r), o > t ? o - t : (i && o === t) || (!e._initted && 2 * h > o - t) ? h : (o += e.totalDuration() / e._timeScale / r) > t + h ? 0 : o - t - h; }; (a._init = function () { var e, t, i, n, r, o = this.vars, a = this._overwrittenProps, s = this._duration, l = !!o.immediateRender, c = o.ease; if (o.startAt) { this._startAt && (this._startAt.render(-1, !0), this._startAt.kill()), (r = {}); for (n in o.startAt) r[n] = o.startAt[n]; if (((r.overwrite = !1), (r.immediateRender = !0), (r.lazy = l && o.lazy !== !1), (r.startAt = r.delay = null), (this._startAt = O.to(this.target, 0, r)), l)) if (this._time > 0) this._startAt = null; else if (0 !== s) return; } else if (o.runBackwards && 0 !== s) if (this._startAt) this._startAt.render(-1, !0), this._startAt.kill(), (this._startAt = null); else { 0 !== this._time && (l = !1), (i = {}); for (n in o)(H[n] && "autoCSS" !== n) || (i[n] = o[n]); if (((i.overwrite = 0), (i.data = "isFromStart"), (i.lazy = l && o.lazy !== !1), (i.immediateRender = l), (this._startAt = O.to(this.target, 0, i)), l)) { if (0 === this._time) return; } else this._startAt._init(), this._startAt._enabled(!1), this.vars.immediateRender && (this._startAt = null); } if ( ((this._ease = c = c ? (c instanceof x ? c : "function" == typeof c ? new x(c, o.easeParams) : w[c] || O.defaultEase) : O.defaultEase), o.easeParams instanceof Array && c.config && (this._ease = c.config.apply(c, o.easeParams)), (this._easeType = this._ease._type), (this._easePower = this._ease._power), (this._firstPT = null), this._targets) ) for (e = this._targets.length; --e > -1;) this._initProps(this._targets[e], (this._propLookup[e] = {}), this._siblings[e], a ? a[e] : null) && (t = !0); else t = this._initProps(this.target, this._propLookup, this._siblings, a); if ((t && O._onPluginEvent("_onInitAllProps", this), a && (this._firstPT || ("function" != typeof this.target && this._enabled(!1, !1))), o.runBackwards)) for (i = this._firstPT; i;)(i.s += i.c), (i.c = -i.c), (i = i._next); (this._onUpdate = o.onUpdate), (this._initted = !0); }), (a._initProps = function (t, i, n, r) { var o, a, s, l, c, u; if (null == t) return !1; N[t._gsTweenID] && Z(), this.vars.css || (t.style && t !== e && t.nodeType && G.css && this.vars.autoCSS !== !1 && D(this.vars, t)); for (o in this.vars) if (((u = this.vars[o]), H[o])) u && (u instanceof Array || (u.push && p(u))) && -1 !== u.join("").indexOf("{self}") && (this.vars[o] = u = this._swapSelfInParams(u, this)); else if (G[o] && (l = new G[o]())._onInitTween(t, this.vars[o], this)) { for (this._firstPT = c = { _next: this._firstPT, t: l, p: "setRatio", s: 0, c: 1, f: 1, n: o, pg: 1, pr: l._priority }, a = l._overwriteProps.length; --a > -1;) i[l._overwriteProps[a]] = this._firstPT; (l._priority || l._onInitAllProps) && (s = !0), (l._onDisable || l._onEnable) && (this._notifyPluginsOfEnabled = !0), c._next && (c._next._prev = c); } else i[o] = F.call(this, t, o, "get", u, o, 0, null, this.vars.stringFilter); return r && this._kill(r, t) ? this._initProps(t, i, n, r) : this._overwrite > 1 && this._firstPT && n.length > 1 && J(t, this, i, this._overwrite, n) ? (this._kill(i, t), this._initProps(t, i, n, r)) : (this._firstPT && ((this.vars.lazy !== !1 && this._duration) || (this.vars.lazy && !this._duration)) && (N[t._gsTweenID] = !0), s); }), (a.render = function (e, t, i) { var n, r, o, a, s = this._time, l = this._duration, c = this._rawPrevTime; if (e >= l) (this._totalTime = this._time = l), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1), this._reversed || ((n = !0), (r = "onComplete"), (i = i || this._timeline.autoRemoveChildren)), 0 === l && (this._initted || !this.vars.lazy || i) && (this._startTime === this._timeline._duration && (e = 0), (0 === e || 0 > c || (c === h && "isPause" !== this.data)) && c !== e && ((i = !0), c > h && (r = "onReverseComplete")), (this._rawPrevTime = a = !t || e || c === e ? e : h)); else if (1e-7 > e) (this._totalTime = this._time = 0), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0), (0 !== s || (0 === l && c > 0)) && ((r = "onReverseComplete"), (n = this._reversed)), 0 > e && ((this._active = !1), 0 === l && (this._initted || !this.vars.lazy || i) && (c >= 0 && (c !== h || "isPause" !== this.data) && (i = !0), (this._rawPrevTime = a = !t || e || c === e ? e : h))), this._initted || (i = !0); else if (((this._totalTime = this._time = e), this._easeType)) { var u = e / l, d = this._easeType, f = this._easePower; (1 === d || (3 === d && u >= 0.5)) && (u = 1 - u), 3 === d && (u *= 2), 1 === f ? (u *= u) : 2 === f ? (u *= u * u) : 3 === f ? (u *= u * u * u) : 4 === f && (u *= u * u * u * u), 1 === d ? (this.ratio = 1 - u) : 2 === d ? (this.ratio = u) : 0.5 > e / l ? (this.ratio = u / 2) : (this.ratio = 1 - u / 2); } else this.ratio = this._ease.getRatio(e / l); if (this._time !== s || i) { if (!this._initted) { if ((this._init(), !this._initted || this._gc)) return; if (!i && this._firstPT && ((this.vars.lazy !== !1 && this._duration) || (this.vars.lazy && !this._duration))) return (this._time = this._totalTime = s), (this._rawPrevTime = c), I.push(this), void(this._lazy = [e, t]); this._time && !n ? (this.ratio = this._ease.getRatio(this._time / l)) : n && this._ease._calcEnd && (this.ratio = this._ease.getRatio(0 === this._time ? 0 : 1)); } for ( this._lazy !== !1 && (this._lazy = !1), this._active || (!this._paused && this._time !== s && e >= 0 && (this._active = !0)), 0 === s && (this._startAt && (e >= 0 ? this._startAt.render(e, t, i) : r || (r = "_dummyGS")), this.vars.onStart && (0 !== this._time || 0 === l) && (t || this._callback("onStart"))), o = this._firstPT; o; ) o.f ? o.t[o.p](o.c * this.ratio + o.s) : (o.t[o.p] = o.c * this.ratio + o.s), (o = o._next); this._onUpdate && (0 > e && this._startAt && e !== -1e-4 && this._startAt.render(e, t, i), t || ((this._time !== s || n) && this._callback("onUpdate"))), r && (!this._gc || i) && (0 > e && this._startAt && !this._onUpdate && e !== -1e-4 && this._startAt.render(e, t, i), n && (this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)), !t && this.vars[r] && this._callback(r), 0 === l && this._rawPrevTime === h && a !== h && (this._rawPrevTime = 0)); } }), (a._kill = function (e, t, i) { if (("all" === e && (e = null), null == e && (null == t || t === this.target))) return (this._lazy = !1), this._enabled(!1, !1); t = "string" != typeof t ? t || this._targets || this.target : O.selector(t) || t; var n, r, o, a, s, l, c, u, h, d = i && this._time && i._startTime === this._startTime && this._timeline === i._timeline; if ((p(t) || k(t)) && "number" != typeof t[0]) for (n = t.length; --n > -1;) this._kill(e, t[n], i) && (l = !0); else { if (this._targets) { for (n = this._targets.length; --n > -1;) if (t === this._targets[n]) { (s = this._propLookup[n] || {}), (this._overwrittenProps = this._overwrittenProps || []), (r = this._overwrittenProps[n] = e ? this._overwrittenProps[n] || {} : "all"); break; } } else { if (t !== this.target) return !1; (s = this._propLookup), (r = this._overwrittenProps = e ? this._overwrittenProps || {} : "all"); } if (s) { if (((c = e || s), (u = e !== r && "all" !== r && e !== s && ("object" != typeof e || !e._tempKill)), i && (O.onOverwrite || this.vars.onOverwrite))) { for (o in c) s[o] && (h || (h = []), h.push(o)); if ((h || !e) && !Q(this, i, t, h)) return !1; } for (o in c) (a = s[o]) && (d && (a.f ? a.t[a.p](a.s) : (a.t[a.p] = a.s), (l = !0)), a.pg && a.t._kill(c) && (l = !0), (a.pg && 0 !== a.t._overwriteProps.length) || (a._prev ? (a._prev._next = a._next) : a === this._firstPT && (this._firstPT = a._next), a._next && (a._next._prev = a._prev), (a._next = a._prev = null)), delete s[o]), u && (r[o] = 1); !this._firstPT && this._initted && this._enabled(!1, !1); } } return l; }), (a.invalidate = function () { return ( this._notifyPluginsOfEnabled && O._onPluginEvent("_onDisable", this), (this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null), (this._notifyPluginsOfEnabled = this._active = this._lazy = !1), (this._propLookup = this._targets ? {} : []), P.prototype.invalidate.call(this), this.vars.immediateRender && ((this._time = -h), this.render(-this._delay)), this ); }), (a._enabled = function (e, t) { if ((l || s.wake(), e && this._gc)) { var i, n = this._targets; if (n) for (i = n.length; --i > -1;) this._siblings[i] = K(n[i], this, !0); else this._siblings = K(this.target, this, !0); } return P.prototype._enabled.call(this, e, t), this._notifyPluginsOfEnabled && this._firstPT ? O._onPluginEvent(e ? "_onEnable" : "_onDisable", this) : !1; }), (O.to = function (e, t, i) { return new O(e, t, i); }), (O.from = function (e, t, i) { return (i.runBackwards = !0), (i.immediateRender = 0 != i.immediateRender), new O(e, t, i); }), (O.fromTo = function (e, t, i, n) { return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), new O(e, t, n); }), (O.delayedCall = function (e, t, i, n, r) { return new O(t, 0, { delay: e, onComplete: t, onCompleteParams: i, callbackScope: n, onReverseComplete: t, onReverseCompleteParams: i, immediateRender: !1, lazy: !1, useFrames: r, overwrite: 0 }); }), (O.set = function (e, t) { return new O(e, 0, t); }), (O.getTweensOf = function (e, t) { if (null == e) return []; e = "string" != typeof e ? e : O.selector(e) || e; var i, n, r, o; if ((p(e) || k(e)) && "number" != typeof e[0]) { for (i = e.length, n = []; --i > -1;) n = n.concat(O.getTweensOf(e[i], t)); for (i = n.length; --i > -1;) for (o = n[i], r = i; --r > -1;) o === n[r] && n.splice(i, 1); } else for (n = K(e).concat(), i = n.length; --i > -1;)(n[i]._gc || (t && !n[i].isActive())) && n.splice(i, 1); return n; }), (O.killTweensOf = O.killDelayedCallsTo = function (e, t, i) { "object" == typeof t && ((i = t), (t = !1)); for (var n = O.getTweensOf(e, t), r = n.length; --r > -1;) n[r]._kill(i, e); }); var te = y( "plugins.TweenPlugin", function (e, t) { (this._overwriteProps = (e || "").split(",")), (this._propName = this._overwriteProps[0]), (this._priority = t || 0), (this._super = te.prototype); }, !0 ); if ( ((a = te.prototype), (te.version = "1.18.0"), (te.API = 2), (a._firstPT = null), (a._addTween = F), (a.setRatio = j), (a._kill = function (e) { var t, i = this._overwriteProps, n = this._firstPT; if (null != e[this._propName]) this._overwriteProps = []; else for (t = i.length; --t > -1;) null != e[i[t]] && i.splice(t, 1); for (; n;) null != e[n.n] && (n._next && (n._next._prev = n._prev), n._prev ? ((n._prev._next = n._next), (n._prev = null)) : this._firstPT === n && (this._firstPT = n._next)), (n = n._next); return !1; }), (a._roundProps = function (e, t) { for (var i = this._firstPT; i;)(e[this._propName] || (null != i.n && e[i.n.split(this._propName + "_").join("")])) && (i.r = t), (i = i._next); }), (O._onPluginEvent = function (e, t) { var i, n, r, o, a, s = t._firstPT; if ("_onInitAllProps" === e) { for (; s;) { for (a = s._next, n = r; n && n.pr > s.pr;) n = n._next; (s._prev = n ? n._prev : o) ? (s._prev._next = s) : (r = s), (s._next = n) ? (n._prev = s) : (o = s), (s = a); } s = t._firstPT = r; } for (; s;) s.pg && "function" == typeof s.t[e] && s.t[e]() && (i = !0), (s = s._next); return i; }), (te.activate = function (e) { for (var t = e.length; --t > -1;) e[t].API === te.API && (G[new e[t]()._propName] = e[t]); return !0; }), (g.plugin = function (e) { if (!(e && e.propName && e.init && e.API)) throw "illegal plugin definition."; var t, i = e.propName, n = e.priority || 0, r = e.overwriteProps, o = { init: "_onInitTween", set: "setRatio", kill: "_kill", round: "_roundProps", initAll: "_onInitAllProps" }, a = y( "plugins." + i.charAt(0).toUpperCase() + i.substr(1) + "Plugin", function () { te.call(this, i, n), (this._overwriteProps = r || []); }, e.global === !0 ), s = (a.prototype = new te(i)); (s.constructor = a), (a.API = e.API); for (t in o) "function" == typeof e[t] && (s[o[t]] = e[t]); return (a.version = e.version), te.activate([a]), a; }), (r = e._gsQueue)) ) { for (o = 0; o < r.length; o++) r[o](); for (a in m) m[a].func || e.console.log("GSAP encountered missing dependency: com.greensock." + a); } l = !1; } })("undefined" != typeof t && t.exports && "undefined" != typeof e ? e : this || window, "TweenMax"); }.call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})); }, {}, ], 210: [ function (e, t, i) { "use strict"; function n() { r.call(this), this.setMaxListeners(20); } var r = e("events").EventEmitter; (n.prototype = Object.create(r.prototype)), (n.prototype.constructor = n), (n.prototype.off = function (e, t) { return t ? this.removeListener(e, t) : e ? this.removeAllListeners(e) : this.removeAllListeners(); }), (t.exports = n); }, { events: 188 }, ], 211: [ function (e, t, i) { "use strict"; function n(e) { function t(t, i) { if (e.verbose) { var n = (i.size / 1024).toFixed() + "kb"; console.log("Imagepack --> Unpacked", t, "image/" + i.type, n); } d[t] = i; } function i(e) { return e.replace(/�/g, ""); } function n(e) { var t = String.fromCharCode.apply(null, new Uint8Array(e)); return i(t); } function o(e) { var t = new Image(), i = function () { t.removeEventListener("load", i), URL.revokeObjectURL(t.src), (t = null); }; return t.addEventListener("load", i), (t.src = a(e)), t; } function a(e) { var t = d[e]; if (!t) throw new Error("[ERROR] Imagepack " + e + " not found"); var i = new Blob([new Uint8Array(t.contents)], { type: "image/" + t.type }); return URL.createObjectURL(i); } function s() { return Object.keys(d).sort(); } function l(i) { for (var r = new DataView(i), o = 128, a = 4, l = 8, c = 0; c < r.byteLength;) { var u = n(i.slice(c, c + o)); c += o; var d = r.getUint32(c); c += a; var f = n(i.slice(c, c + l)); c += l; var p = i.slice(c, c + d); (c += d), t(u, { name: u, contents: p, type: f, size: d }); } return e.verbose && console.log("Imagepack --> Unpacked " + s().length + " images"), h.emit("load", s()), h; } function c(t) { var i = new XMLHttpRequest(); i.open("GET", t, !0), (i.responseType = "arraybuffer"), i.addEventListener("load", function () { i.status < 400 ? l(i.response) : n(); }), i.addEventListener("progress", function (e) { e.lengthComputable && h.emit("progress", e.loaded / e.total); }); var n = function () { var t = "[ERROR] imagepack " + i.status + " " + e.path; if (!h.listeners("error").length) throw new Error(t); h.emit("error", t); }; return i.addEventListener("error", n), i.send(), h; } function u() { return (d = {}), h; } (window.Blob && window.DataView) || console.warn("Imagepack --> Unsupported browser"); var h, d = {}; return (h = Object.create(r.prototype, { _events: { value: {} }, load: { value: c }, unpack: { value: l }, getURI: { value: a }, getImage: { value: o }, getKeys: { value: s }, destroy: { value: u } })), Object.freeze(h); } var r = e("./emitter.js"); if (!ArrayBuffer.prototype.slice) { var o = ArrayBuffer.prototype; o.slice = function (e, t) { if ( (void 0 === e && (e = 0), void 0 === t && (t = this.byteLength), (e = Math.floor(e)), (t = Math.floor(t)), 0 > e && (e += this.byteLength), 0 > t && (t += this.byteLength), (e = Math.min(Math.max(0, e), this.byteLength)), (t = Math.min(Math.max(0, t), this.byteLength)), 0 >= t - e) ) return new ArrayBuffer(0); var i = new ArrayBuffer(t - e), n = new Uint8Array(i), r = new Uint8Array(this, e, t - e); return n.set(r), i; }; } t.exports = n; }, { "./emitter.js": 210 }, ], 212: [ function (e, t, i) { (function () { var e; (e = "undefined" != typeof i && null !== i ? i : this), (e.Lethargy = (function () { function e(e, t, i) { (this.stability = null != e ? Math.abs(e) : 8), (this.sensitivity = null != t ? 1 + Math.abs(t) : 100), (this.tolerance = null != i ? 1 + Math.abs(i) : 1.1), (this.lastUpDeltas = function () { var e, t, i; for (i = [], e = 1, t = 2 * this.stability; t >= 1 ? t >= e : e >= t; t >= 1 ? e++ : e--) i.push(null); return i; }.call(this)), (this.lastDownDeltas = function () { var e, t, i; for (i = [], e = 1, t = 2 * this.stability; t >= 1 ? t >= e : e >= t; t >= 1 ? e++ : e--) i.push(null); return i; }.call(this)), (this.deltasTimestamp = function () { var e, t, i; for (i = [], e = 1, t = 2 * this.stability; t >= 1 ? t >= e : e >= t; t >= 1 ? e++ : e--) i.push(null); return i; }.call(this)); } return ( (e.prototype.check = function (e) { var t; return ( null != e.originalEvent.wheelDelta ? (t = e.originalEvent.wheelDelta) : null != e.originalEvent.deltaY ? (t = -40 * e.originalEvent.deltaY) : (null != e.originalEvent.detail || 0 === e.originalEvent.detail) && (t = -40 * e.originalEvent.detail), this.deltasTimestamp.push(Date.now()), this.deltasTimestamp.shift(), t > 0 ? (this.lastUpDeltas.push(t), this.lastUpDeltas.shift(), this.isInertia(1)) : (this.lastDownDeltas.push(t), this.lastDownDeltas.shift(), this.isInertia(-1)) ); }), (e.prototype.isInertia = function (e) { var t, i, n, r, o, a, s; return ( (t = -1 === e ? this.lastDownDeltas : this.lastUpDeltas), null === t[0] ? e : this.deltasTimestamp[2 * this.stability - 2] + 150 > Date.now() && t[0] === t[2 * this.stability - 1] ? !1 : ((n = t.slice(0, this.stability)), (i = t.slice(this.stability, 2 * this.stability)), (s = n.reduce(function (e, t) { return e + t; })), (o = i.reduce(function (e, t) { return e + t; })), (a = s / n.length), (r = o / i.length), Math.abs(a) < Math.abs(r * this.tolerance) && this.sensitivity < Math.abs(r) ? e : !1) ); }), (e.prototype.showLastUpDeltas = function () { return this.lastUpDeltas; }), (e.prototype.showLastDownDeltas = function () { return this.lastDownDeltas; }), e ); })()); }.call(this)); }, {}, ], 213: [ function (e, t, i) { !(function (e, t) { "object" == typeof i && i && "string" != typeof i.nodeName ? t(i) : "function" == typeof define && define.amd ? define(["exports"], t) : ((e.Mustache = {}), t(e.Mustache)); })(this, function (e) { function t(e) { return "function" == typeof e; } function i(e) { return m(e) ? "array" : typeof e; } function n(e) { return e.replace(/[-[]{}()*+?.,\^$|#s]/g, "\$&"); } function r(e, t) { return null != e && "object" == typeof e && t in e; } function o(e, t) { return v.call(e, t); } function a(e) { return !o(g, e); } function s(e) { return String(e).replace(/[&<>"'`=/]/g, function (e) { return y[e]; }); } function l(t, i) { function r() { if (g && !y) for (; v.length;) delete p[v.pop()]; else v = []; (g = !1), (y = !1); } function o(e) { if (("string" == typeof e && (e = e.split(b, 2)), !m(e) || 2 !== e.length)) throw new Error("Invalid tags: " + e); (s = new RegExp(n(e[0]) + "\s*")), (l = new RegExp("\s*" + n(e[1]))), (d = new RegExp("\s*" + n("}" + e[1]))); } if (!t) return []; var s, l, d, f = [], p = [], v = [], g = !1, y = !1; o(i || e.tags); for (var T, S, E, A, C, P, L = new h(t); !L.eos();) { if (((T = L.pos), (E = L.scanUntil(s)))) for (var R = 0, O = E.length; O > R; ++R)(A = E.charAt(R)), a(A) ? v.push(p.length) : (y = !0), p.push(["text", A, T, T + 1]), (T += 1), "n" === A && r(); if (!L.scan(s)) break; if ( ((g = !0), (S = L.scan(M) || "name"), L.scan(_), "=" === S ? ((E = L.scanUntil(x)), L.scan(x), L.scanUntil(l)) : "{" === S ? ((E = L.scanUntil(d)), L.scan(w), L.scanUntil(l), (S = "&")) : (E = L.scanUntil(l)), !L.scan(l)) ) throw new Error("Unclosed tag at " + L.pos); if (((C = [S, E, T, L.pos]), p.push(C), "#" === S || "^" === S)) f.push(C); else if ("/" === S) { if (((P = f.pop()), !P)) throw new Error('Unopened section "' + E + '" at ' + T); if (P[1] !== E) throw new Error('Unclosed section "' + P[1] + '" at ' + T); } else "name" === S || "{" === S || "&" === S ? (y = !0) : "=" === S && o(E); } if ((P = f.pop())) throw new Error('Unclosed section "' + P[1] + '" at ' + L.pos); return u(c(p)); } function c(e) { for (var t, i, n = [], r = 0, o = e.length; o > r; ++r)(t = e[r]), t && ("text" === t[0] && i && "text" === i[0] ? ((i[1] += t[1]), (i[3] = t[3])) : (n.push(t), (i = t))); return n; } function u(e) { for (var t, i, n = [], r = n, o = [], a = 0, s = e.length; s > a; ++a) switch (((t = e[a]), t[0])) { case "#": case "^": r.push(t), o.push(t), (r = t[4] = []); break; case "/": (i = o.pop()), (i[5] = t[2]), (r = o.length > 0 ? o[o.length - 1][4] : n); break; default: r.push(t); } return n; } function h(e) { (this.string = e), (this.tail = e), (this.pos = 0); } function d(e, t) { (this.view = e), (this.cache = { ".": this.view }), (this.parent = t); } function f() { this.cache = {}; } var p = Object.prototype.toString, m = Array.isArray || function (e) { return "[object Array]" === p.call(e); }, v = RegExp.prototype.test, g = /S/, y = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/", "`": "`", "=": "=" }, _ = /s*/, b = /s+/, x = /s*=/, w = /s*}/, M = /#|^|/|>|{|&|=|!/; (h.prototype.eos = function () { return "" === this.tail; }), (h.prototype.scan = function (e) { var t = this.tail.match(e); if (!t || 0 !== t.index) return ""; var i = t[0]; return (this.tail = this.tail.substring(i.length)), (this.pos += i.length), i; }), (h.prototype.scanUntil = function (e) { var t, i = this.tail.search(e); switch (i) { case -1: (t = this.tail), (this.tail = ""); break; case 0: t = ""; break; default: (t = this.tail.substring(0, i)), (this.tail = this.tail.substring(i)); } return (this.pos += t.length), t; }), (d.prototype.push = function (e) { return new d(e, this); }), (d.prototype.lookup = function (e) { var i, n = this.cache; if (n.hasOwnProperty(e)) i = n[e]; else { for (var o, a, s = this, l = !1; s;) { if (e.indexOf(".") > 0) for (i = s.view, o = e.split("."), a = 0; null != i && a < o.length;) a === o.length - 1 && (l = r(i, o[a])), (i = i[o[a++]]); else(i = s.view[e]), (l = r(s.view, e)); if (l) break; s = s.parent; } n[e] = i; } return t(i) && (i = i.call(this.view)), i; }), (f.prototype.clearCache = function () { this.cache = {}; }), (f.prototype.parse = function (e, t) { var i = this.cache, n = i[e]; return null == n && (n = i[e] = l(e, t)), n; }), (f.prototype.render = function (e, t, i) { var n = this.parse(e), r = t instanceof d ? t : new d(t); return this.renderTokens(n, r, i, e); }), (f.prototype.renderTokens = function (e, t, i, n) { for (var r, o, a, s = "", l = 0, c = e.length; c > l; ++l) (a = void 0), (r = e[l]), (o = r[0]), "#" === o ? (a = this.renderSection(r, t, i, n)) : "^" === o ? (a = this.renderInverted(r, t, i, n)) : ">" === o ? (a = this.renderPartial(r, t, i, n)) : "&" === o ? (a = this.unescapedValue(r, t)) : "name" === o ? (a = this.escapedValue(r, t)) : "text" === o && (a = this.rawValue(r)), void 0 !== a && (s += a); return s; }), (f.prototype.renderSection = function (e, i, n, r) { function o(e) { return a.render(e, i, n); } var a = this, s = "", l = i.lookup(e[1]); if (l) { if (m(l)) for (var c = 0, u = l.length; u > c; ++c) s += this.renderTokens(e[4], i.push(l[c]), n, r); else if ("object" == typeof l || "string" == typeof l || "number" == typeof l) s += this.renderTokens(e[4], i.push(l), n, r); else if (t(l)) { if ("string" != typeof r) throw new Error("Cannot use higher-order sections without the original template"); (l = l.call(i.view, r.slice(e[3], e[5]), o)), null != l && (s += l); } else s += this.renderTokens(e[4], i, n, r); return s; } }), (f.prototype.renderInverted = function (e, t, i, n) { var r = t.lookup(e[1]); return !r || (m(r) && 0 === r.length) ? this.renderTokens(e[4], t, i, n) : void 0; }), (f.prototype.renderPartial = function (e, i, n) { if (n) { var r = t(n) ? n(e[1]) : n[e[1]]; return null != r ? this.renderTokens(this.parse(r), i, n, r) : void 0; } }), (f.prototype.unescapedValue = function (e, t) { var i = t.lookup(e[1]); return null != i ? i : void 0; }), (f.prototype.escapedValue = function (t, i) { var n = i.lookup(t[1]); return null != n ? e.escape(n) : void 0; }), (f.prototype.rawValue = function (e) { return e[1]; }), (e.name = "mustache.js"), (e.version = "2.2.1"), (e.tags = ["{{", "}}"]); var T = new f(); (e.clearCache = function () { return T.clearCache(); }), (e.parse = function (e, t) { return T.parse(e, t); }), (e.render = function (e, t, n) { if ("string" != typeof e) throw new TypeError('Invalid template! Template should be a "string" but "' + i(e) + '" was given as the first argument for mustache#render(template, view, partials)'); return T.render(e, t, n); }), (e.to_html = function (i, n, r, o) { var a = e.render(i, n, r); return t(o) ? void o(a) : a; }), (e.escape = s), (e.Scanner = h), (e.Context = d), (e.Writer = f); }); }, {}, ], 214: [ function (e, t, i) { t.exports = function (e) { function t(t, n) { function r() { return ((2 * Math.PI) / 60 / 60) * v.autoRotateSpeed; } function o() { return Math.pow(0.95, v.zoomSpeed); } function a(e) { if (v.enabled !== !1) { if ((e.preventDefault(), e.button === v.mouseButtons.ORBIT)) { if (v.noRotate === !0) return; (N = I.ROTATE), y.set(e.clientX, e.clientY); } else if (e.button === v.mouseButtons.ZOOM) { if (v.noZoom === !0) return; (N = I.DOLLY), E.set(e.clientX, e.clientY); } else if (e.button === v.mouseButtons.PAN) { if (v.noPan === !0) return; (N = I.PAN), x.set(e.clientX, e.clientY); } N !== I.NONE && (document.addEventListener("mousemove", s, !1), document.addEventListener("mouseup", l, !1), v.dispatchEvent(F)); } } function s(e) { if (v.enabled !== !1) { e.preventDefault(); var t = v.domElement === document ? v.domElement.body : v.domElement; if (N === I.ROTATE) { if (v.noRotate === !0) return; _.set(e.clientX, e.clientY), b.subVectors(_, y), v.rotateLeft(((2 * Math.PI * b.x) / t.clientWidth) * v.rotateSpeed), v.rotateUp(((2 * Math.PI * b.y) / t.clientHeight) * v.rotateSpeed), y.copy(_); } else if (N === I.DOLLY) { if (v.noZoom === !0) return; A.set(e.clientX, e.clientY), C.subVectors(A, E), C.y > 0 ? v.dollyIn() : C.y < 0 && v.dollyOut(), E.copy(A); } else if (N === I.PAN) { if (v.noPan === !0) return; w.set(e.clientX, e.clientY), M.subVectors(w, x), v.pan(M.x, M.y), x.copy(w); } N !== I.NONE && v.update(); } } function l() { v.enabled !== !1 && (document.removeEventListener("mousemove", s, !1), document.removeEventListener("mouseup", l, !1), v.dispatchEvent(V), (N = I.NONE)); } function c(e) { if (v.enabled !== !1 && v.noZoom !== !0 && N === I.NONE) { e.preventDefault(), e.stopPropagation(); var t = 0; void 0 !== e.wheelDelta ? (t = e.wheelDelta) : void 0 !== e.detail && (t = -e.detail), t > 0 ? v.dollyOut() : 0 > t && v.dollyIn(), v.update(), v.dispatchEvent(F), v.dispatchEvent(V); } } function u(e) { if (v.enabled !== !1 && v.noKeys !== !0 && v.noPan !== !0) switch (e.keyCode) { case v.keys.UP: v.pan(0, v.keyPanSpeed), v.update(); break; case v.keys.BOTTOM: v.pan(0, -v.keyPanSpeed), v.update(); break; case v.keys.LEFT: v.pan(v.keyPanSpeed, 0), v.update(); break; case v.keys.RIGHT: v.pan(-v.keyPanSpeed, 0), v.update(); } } function h(e) { if (v.enabled !== !1) { switch (e.touches.length) { case 1: if (v.noRotate === !0) return; (N = I.TOUCH_ROTATE), y.set(e.touches[0].pageX, e.touches[0].pageY); break; case 2: if (v.noZoom === !0) return; N = I.TOUCH_DOLLY; var t = e.touches[0].pageX - e.touches[1].pageX, i = e.touches[0].pageY - e.touches[1].pageY, n = Math.sqrt(t * t + i * i); E.set(0, n); break; case 3: if (v.noPan === !0) return; (N = I.TOUCH_PAN), x.set(e.touches[0].pageX, e.touches[0].pageY); break; default: N = I.NONE; } N !== I.NONE && v.dispatchEvent(F); } } function d(e) { if (v.enabled !== !1) { e.preventDefault(), e.stopPropagation(); var t = v.domElement === document ? v.domElement.body : v.domElement; switch (e.touches.length) { case 1: if (v.noRotate === !0) return; if (N !== I.TOUCH_ROTATE) return; _.set(e.touches[0].pageX, e.touches[0].pageY), b.subVectors(_, y), v.rotateLeft(((2 * Math.PI * b.x) / t.clientWidth) * v.rotateSpeed), v.rotateUp(((2 * Math.PI * b.y) / t.clientHeight) * v.rotateSpeed), y.copy(_), v.update(); break; case 2: if (v.noZoom === !0) return; if (N !== I.TOUCH_DOLLY) return; var i = e.touches[0].pageX - e.touches[1].pageX, n = e.touches[0].pageY - e.touches[1].pageY, r = Math.sqrt(i * i + n * n); A.set(0, r), C.subVectors(A, E), C.y > 0 ? v.dollyOut() : C.y < 0 && v.dollyIn(), E.copy(A), v.update(); break; case 3: if (v.noPan === !0) return; if (N !== I.TOUCH_PAN) return; w.set(e.touches[0].pageX, e.touches[0].pageY), M.subVectors(w, x), v.pan(M.x, M.y), x.copy(w), v.update(); break; default: N = I.NONE; } } } function f() { v.enabled !== !1 && (v.dispatchEvent(V), (N = I.NONE)); } (this.object = t), (this.domElement = void 0 !== n ? n : document), (this.enabled = !0), (this.target = new e.Vector3()), (this.center = this.target), (this.noZoom = !1), (this.zoomSpeed = 1), (this.minDistance = 0), (this.maxDistance = 1 / 0), (this.minZoom = 0), (this.maxZoom = 1 / 0), (this.noRotate = !1), (this.rotateSpeed = 1), (this.noPan = !1), (this.keyPanSpeed = 7), (this.autoRotate = !1), (this.autoRotateSpeed = 2), (this.minPolarAngle = 0), (this.maxPolarAngle = Math.PI), (this.minAzimuthAngle = -(1 / 0)), (this.maxAzimuthAngle = 1 / 0), (this.noKeys = !1), (this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }), (this.mouseButtons = { ORBIT: i.LEFT, ZOOM: i.MIDDLE, PAN: i.RIGHT }); var p, m, v = this, g = 1e-6, y = new e.Vector2(), _ = new e.Vector2(), b = new e.Vector2(), x = new e.Vector2(), w = new e.Vector2(), M = new e.Vector2(), T = new e.Vector3(), S = new e.Vector3(), E = new e.Vector2(), A = new e.Vector2(), C = new e.Vector2(), P = 0, L = 0, R = 1, O = new e.Vector3(), k = new e.Vector3(), D = new e.Quaternion(), I = { NONE: -1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_DOLLY: 4, TOUCH_PAN: 5 }, N = I.NONE; (this.target0 = this.target.clone()), (this.position0 = this.object.position.clone()), (this.zoom0 = this.object.zoom); var U = new e.Quaternion().setFromUnitVectors(t.up, new e.Vector3(0, 1, 0)), j = U.clone().inverse(), B = { type: "change" }, F = { type: "start" }, V = { type: "end" }; (this.rotateLeft = function (e) { void 0 === e && (e = r()), (L -= e); }), (this.rotateUp = function (e) { void 0 === e && (e = r()), (P -= e); }), (this.panLeft = function (e) { var t = this.object.matrix.elements; T.set(t[0], t[1], t[2]), T.multiplyScalar(-e), O.add(T); }), (this.panUp = function (e) { var t = this.object.matrix.elements; T.set(t[4], t[5], t[6]), T.multiplyScalar(e), O.add(T); }), (this.pan = function (t, i) { var n = v.domElement === document ? v.domElement.body : v.domElement; if (v.object instanceof e.PerspectiveCamera) { var r = v.object.position, o = r.clone().sub(v.target), a = o.length(); (a *= Math.tan(((v.object.fov / 2) * Math.PI) / 180)), v.panLeft((2 * t * a) / n.clientHeight), v.panUp((2 * i * a) / n.clientHeight); } else v.object instanceof e.OrthographicCamera ? (v.panLeft((t * (v.object.right - v.object.left)) / n.clientWidth), v.panUp((i * (v.object.top - v.object.bottom)) / n.clientHeight)) : console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."); }), (this.dollyIn = function (t) { void 0 === t && (t = o()), v.object instanceof e.PerspectiveCamera ? (R /= t) : v.object instanceof e.OrthographicCamera ? ((v.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom * t))), v.object.updateProjectionMatrix(), v.dispatchEvent(B)) : console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."); }), (this.dollyOut = function (t) { void 0 === t && (t = o()), v.object instanceof e.PerspectiveCamera ? (R *= t) : v.object instanceof e.OrthographicCamera ? ((v.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / t))), v.object.updateProjectionMatrix(), v.dispatchEvent(B)) : console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."); }), (this.update = function () { var e = this.object.position; S.copy(e).sub(this.target), S.applyQuaternion(U), (p = Math.atan2(S.x, S.z)), (m = Math.atan2(Math.sqrt(S.x * S.x + S.z * S.z), S.y)), this.autoRotate && N === I.NONE && this.rotateLeft(r()), (p += L), (m += P), (p = Math.max(this.minAzimuthAngle, Math.min(this.maxAzimuthAngle, p))), (m = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, m))), (m = Math.max(g, Math.min(Math.PI - g, m))); var t = S.length() * R; (t = Math.max(this.minDistance, Math.min(this.maxDistance, t))), this.target.add(O), (S.x = t * Math.sin(m) * Math.sin(p)), (S.y = t * Math.cos(m)), (S.z = t * Math.sin(m) * Math.cos(p)), S.applyQuaternion(j), e.copy(this.target).add(S), this.object.lookAt(this.target), (L = 0), (P = 0), (R = 1), O.set(0, 0, 0), (k.distanceToSquared(this.object.position) > g || 8 * (1 - D.dot(this.object.quaternion)) > g) && (this.dispatchEvent(B), k.copy(this.object.position), D.copy(this.object.quaternion)); }), (this.reset = function () { (N = I.NONE), this.target.copy(this.target0), this.object.position.copy(this.position0), (this.object.zoom = this.zoom0), this.object.updateProjectionMatrix(), this.dispatchEvent(B), this.update(); }), (this.getPolarAngle = function () { return m; }), (this.getAzimuthalAngle = function () { return p; }), this.domElement.addEventListener( "contextmenu", function (e) { e.preventDefault(); }, !1 ), this.domElement.addEventListener("mousedown", a, !1), this.domElement.addEventListener("mousewheel", c, !1), this.domElement.addEventListener("DOMMouseScroll", c, !1), this.domElement.addEventListener("touchstart", h, !1), this.domElement.addEventListener("touchend", f, !1), this.domElement.addEventListener("touchmove", d, !1), window.addEventListener("keydown", u, !1), this.update(); } var i = e.MOUSE; return i || (i = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }), (t.prototype = Object.create(e.EventDispatcher.prototype)), (t.prototype.constructor = t), t; }; }, {}, ], 215: [ function (e, t, i) { var n = { REVISION: "79" }; "function" == typeof define && define.amd ? define("three", n) : "undefined" != typeof i && "undefined" != typeof t && (t.exports = n), void 0 === Number.EPSILON && (Number.EPSILON = Math.pow(2, -52)), void 0 === Math.sign && (Math.sign = function (e) { return 0 > e ? -1 : e > 0 ? 1 : +e; }), void 0 === Function.prototype.name && Object.defineProperty(Function.prototype, "name", { get: function () { return this.toString().match(/^s*functions*(S*)s*(/)[1]; }, }), void 0 === Object.assign && !(function () { Object.assign = function (e) { "use strict"; if (void 0 === e || null === e) throw new TypeError("Cannot convert undefined or null to object"); for (var t = Object(e), i = 1; i < arguments.length; i++) { var n = arguments[i]; if (void 0 !== n && null !== n) for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]); } return t; }; })(), Object.assign(n, { MOUSE: { LEFT: 0, MIDDLE: 1, RIGHT: 2 }, CullFaceNone: 0, CullFaceBack: 1, CullFaceFront: 2, CullFaceFrontBack: 3, FrontFaceDirectionCW: 0, FrontFaceDirectionCCW: 1, BasicShadowMap: 0, PCFShadowMap: 1, PCFSoftShadowMap: 2, FrontSide: 0, BackSide: 1, DoubleSide: 2, FlatShading: 1, SmoothShading: 2, NoColors: 0, FaceColors: 1, VertexColors: 2, NoBlending: 0, NormalBlending: 1, AdditiveBlending: 2, SubtractiveBlending: 3, MultiplyBlending: 4, CustomBlending: 5, AddEquation: 100, SubtractEquation: 101, ReverseSubtractEquation: 102, MinEquation: 103, MaxEquation: 104, ZeroFactor: 200, OneFactor: 201, SrcColorFactor: 202, OneMinusSrcColorFactor: 203, SrcAlphaFactor: 204, OneMinusSrcAlphaFactor: 205, DstAlphaFactor: 206, OneMinusDstAlphaFactor: 207, DstColorFactor: 208, OneMinusDstColorFactor: 209, SrcAlphaSaturateFactor: 210, NeverDepth: 0, AlwaysDepth: 1, LessDepth: 2, LessEqualDepth: 3, EqualDepth: 4, GreaterEqualDepth: 5, GreaterDepth: 6, NotEqualDepth: 7, MultiplyOperation: 0, MixOperation: 1, AddOperation: 2, NoToneMapping: 0, LinearToneMapping: 1, ReinhardToneMapping: 2, Uncharted2ToneMapping: 3, CineonToneMapping: 4, UVMapping: 300, CubeReflectionMapping: 301, CubeRefractionMapping: 302, EquirectangularReflectionMapping: 303, EquirectangularRefractionMapping: 304, SphericalReflectionMapping: 305, CubeUVReflectionMapping: 306, CubeUVRefractionMapping: 307, RepeatWrapping: 1e3, ClampToEdgeWrapping: 1001, MirroredRepeatWrapping: 1002, NearestFilter: 1003, NearestMipMapNearestFilter: 1004, NearestMipMapLinearFilter: 1005, LinearFilter: 1006, LinearMipMapNearestFilter: 1007, LinearMipMapLinearFilter: 1008, UnsignedByteType: 1009, ByteType: 1010, ShortType: 1011, UnsignedShortType: 1012, IntType: 1013, UnsignedIntType: 1014, FloatType: 1015, HalfFloatType: 1025, UnsignedShort4444Type: 1016, UnsignedShort5551Type: 1017, UnsignedShort565Type: 1018, AlphaFormat: 1019, RGBFormat: 1020, RGBAFormat: 1021, LuminanceFormat: 1022, LuminanceAlphaFormat: 1023, RGBEFormat: n.RGBAFormat, DepthFormat: 1026, RGB_S3TC_DXT1_Format: 2001, RGBA_S3TC_DXT1_Format: 2002, RGBA_S3TC_DXT3_Format: 2003, RGBA_S3TC_DXT5_Format: 2004, RGB_PVRTC_4BPPV1_Format: 2100, RGB_PVRTC_2BPPV1_Format: 2101, RGBA_PVRTC_4BPPV1_Format: 2102, RGBA_PVRTC_2BPPV1_Format: 2103, RGB_ETC1_Format: 2151, LoopOnce: 2200, LoopRepeat: 2201, LoopPingPong: 2202, InterpolateDiscrete: 2300, InterpolateLinear: 2301, InterpolateSmooth: 2302, ZeroCurvatureEnding: 2400, ZeroSlopeEnding: 2401, WrapAroundEnding: 2402, TrianglesDrawMode: 0, TriangleStripDrawMode: 1, TriangleFanDrawMode: 2, LinearEncoding: 3e3, sRGBEncoding: 3001, GammaEncoding: 3007, RGBEEncoding: 3002, LogLuvEncoding: 3003, RGBM7Encoding: 3004, RGBM16Encoding: 3005, RGBDEncoding: 3006, BasicDepthPacking: 3200, RGBADepthPacking: 3201, }), (n.Color = function (e, t, i) { return void 0 === t && void 0 === i ? this.set(e) : this.setRGB(e, t, i); }), (n.Color.prototype = { constructor: n.Color, r: 1, g: 1, b: 1, set: function (e) { return e instanceof n.Color ? this.copy(e) : "number" == typeof e ? this.setHex(e) : "string" == typeof e && this.setStyle(e), this; }, setScalar: function (e) { (this.r = e), (this.g = e), (this.b = e); }, setHex: function (e) { return (e = Math.floor(e)), (this.r = ((e >> 16) & 255) / 255), (this.g = ((e >> 8) & 255) / 255), (this.b = (255 & e) / 255), this; }, setRGB: function (e, t, i) { return (this.r = e), (this.g = t), (this.b = i), this; }, setHSL: (function () { function e(e, t, i) { return 0 > i && (i += 1), i > 1 && (i -= 1), 1 / 6 > i ? e + 6 * (t - e) * i : 0.5 > i ? t : 2 / 3 > i ? e + 6 * (t - e) * (2 / 3 - i) : e; } return function (t, i, r) { if (((t = n.Math.euclideanModulo(t, 1)), (i = n.Math.clamp(i, 0, 1)), (r = n.Math.clamp(r, 0, 1)), 0 === i)) this.r = this.g = this.b = r; else { var o = 0.5 >= r ? r * (1 + i) : r + i - r * i, a = 2 * r - o; (this.r = e(a, o, t + 1 / 3)), (this.g = e(a, o, t)), (this.b = e(a, o, t - 1 / 3)); } return this; }; })(), setStyle: function (e) { function t(t) { void 0 !== t && parseFloat(t) < 1 && console.warn("THREE.Color: Alpha component of " + e + " will be ignored."); } var i; if ((i = /^((?:rgb|hsl)a?)(s*([^)]*))/.exec(e))) { var r, o = i[1], a = i[2]; switch (o) { case "rgb": case "rgba": if ((r = /^(d+)s*,s*(d+)s*,s*(d+)s*(,s*([0-9]*.?[0-9]+)s*)?$/.exec(a))) 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[5]), this; if ((r = /^(d+)%s*,s*(d+)%s*,s*(d+)%s*(,s*([0-9]*.?[0-9]+)s*)?$/.exec(a))) 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[5]), this; break; case "hsl": case "hsla": if ((r = /^([0-9]*.?[0-9]+)s*,s*(d+)%s*,s*(d+)%s*(,s*([0-9]*.?[0-9]+)s*)?$/.exec(a))) { var s = parseFloat(r[1]) / 360, l = parseInt(r[2], 10) / 100, c = parseInt(r[3], 10) / 100; return t(r[5]), this.setHSL(s, l, c); } } } else if ((i = /^#([A-Fa-f0-9]+)$/.exec(e))) { var u = i[1], h = u.length; if (3 === h) return (this.r = parseInt(u.charAt(0) + u.charAt(0), 16) / 255), (this.g = parseInt(u.charAt(1) + u.charAt(1), 16) / 255), (this.b = parseInt(u.charAt(2) + u.charAt(2), 16) / 255), this; if (6 === h) return (this.r = parseInt(u.charAt(0) + u.charAt(1), 16) / 255), (this.g = parseInt(u.charAt(2) + u.charAt(3), 16) / 255), (this.b = parseInt(u.charAt(4) + u.charAt(5), 16) / 255), this; } if (e && e.length > 0) { var u = n.ColorKeywords[e]; void 0 !== u ? this.setHex(u) : console.warn("THREE.Color: Unknown color " + e); } return this; }, clone: function () { return new this.constructor(this.r, this.g, this.b); }, copy: function (e) { return (this.r = e.r), (this.g = e.g), (this.b = e.b), this; }, copyGammaToLinear: function (e, t) { return void 0 === t && (t = 2), (this.r = Math.pow(e.r, t)), (this.g = Math.pow(e.g, t)), (this.b = Math.pow(e.b, t)), this; }, copyLinearToGamma: function (e, t) { void 0 === t && (t = 2); var 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: function () { var e = this.r, t = this.g, i = this.b; return (this.r = e * e), (this.g = t * t), (this.b = i * i), this; }, convertLinearToGamma: function () { return (this.r = Math.sqrt(this.r)), (this.g = Math.sqrt(this.g)), (this.b = Math.sqrt(this.b)), this; }, getHex: function () { return ((255 * this.r) << 16) ^ ((255 * this.g) << 8) ^ ((255 * this.b) << 0); }, getHexString: function () { return ("000000" + this.getHex().toString(16)).slice(-6); }, getHSL: function (e) { var t, i, n = e || { h: 0, s: 0, l: 0 }, r = this.r, o = this.g, a = this.b, s = Math.max(r, o, a), l = Math.min(r, o, a), c = (l + s) / 2; if (l === s)(t = 0), (i = 0); else { var u = s - l; switch (((i = 0.5 >= c ? u / (s + l) : u / (2 - s - l)), s)) { case r: t = (o - a) / u + (a > o ? 6 : 0); break; case o: t = (a - r) / u + 2; break; case a: t = (r - o) / u + 4; } t /= 6; } return (n.h = t), (n.s = i), (n.l = c), n; }, getStyle: function () { return "rgb(" + ((255 * this.r) | 0) + "," + ((255 * this.g) | 0) + "," + ((255 * this.b) | 0) + ")"; }, offsetHSL: function (e, t, i) { var n = this.getHSL(); return (n.h += e), (n.s += t), (n.l += i), this.setHSL(n.h, n.s, n.l), this; }, add: function (e) { return (this.r += e.r), (this.g += e.g), (this.b += e.b), this; }, addColors: function (e, t) { return (this.r = e.r + t.r), (this.g = e.g + t.g), (this.b = e.b + t.b), this; }, addScalar: function (e) { return (this.r += e), (this.g += e), (this.b += e), this; }, sub: function (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: function (e) { return (this.r *= e.r), (this.g *= e.g), (this.b *= e.b), this; }, multiplyScalar: function (e) { return (this.r *= e), (this.g *= e), (this.b *= e), this; }, lerp: function (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; }, equals: function (e) { return e.r === this.r && e.g === this.g && e.b === this.b; }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.r = e[t]), (this.g = e[t + 1]), (this.b = e[t + 2]), this; }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.r), (e[t + 1] = this.g), (e[t + 2] = this.b), e; }, }), (n.ColorKeywords = { 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, 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, }), (n.Quaternion = function (e, t, i, n) { (this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._w = void 0 !== n ? n : 1); }), (n.Quaternion.prototype = { constructor: n.Quaternion, 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: function (e, t, i, n) { return (this._x = e), (this._y = t), (this._z = i), (this._w = n), this.onChangeCallback(), this; }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._w); }, copy: function (e) { return (this._x = e.x), (this._y = e.y), (this._z = e.z), (this._w = e.w), this.onChangeCallback(), this; }, setFromEuler: function (e, t) { if (e instanceof n.Euler == !1) throw new Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order."); var i = Math.cos(e._x / 2), r = Math.cos(e._y / 2), o = Math.cos(e._z / 2), a = Math.sin(e._x / 2), s = Math.sin(e._y / 2), l = Math.sin(e._z / 2), c = e.order; return ( "XYZ" === c ? ((this._x = a * r * o + i * s * l), (this._y = i * s * o - a * r * l), (this._z = i * r * l + a * s * o), (this._w = i * r * o - a * s * l)) : "YXZ" === c ? ((this._x = a * r * o + i * s * l), (this._y = i * s * o - a * r * l), (this._z = i * r * l - a * s * o), (this._w = i * r * o + a * s * l)) : "ZXY" === c ? ((this._x = a * r * o - i * s * l), (this._y = i * s * o + a * r * l), (this._z = i * r * l + a * s * o), (this._w = i * r * o - a * s * l)) : "ZYX" === c ? ((this._x = a * r * o - i * s * l), (this._y = i * s * o + a * r * l), (this._z = i * r * l - a * s * o), (this._w = i * r * o + a * s * l)) : "YZX" === c ? ((this._x = a * r * o + i * s * l), (this._y = i * s * o + a * r * l), (this._z = i * r * l - a * s * o), (this._w = i * r * o - a * s * l)) : "XZY" === c && ((this._x = a * r * o - i * s * l), (this._y = i * s * o - a * r * l), (this._z = i * r * l + a * s * o), (this._w = i * r * o + a * s * l)), t !== !1 && this.onChangeCallback(), this ); }, setFromAxisAngle: function (e, t) { var i = t / 2, n = Math.sin(i); return (this._x = e.x * n), (this._y = e.y * n), (this._z = e.z * n), (this._w = Math.cos(i)), this.onChangeCallback(), this; }, setFromRotationMatrix: function (e) { var t, i = e.elements, n = i[0], r = i[4], o = i[8], a = i[1], s = i[5], l = i[9], c = i[2], u = i[6], h = i[10], d = n + s + h; return ( d > 0 ? ((t = 0.5 / Math.sqrt(d + 1)), (this._w = 0.25 / t), (this._x = (u - l) * t), (this._y = (o - c) * t), (this._z = (a - r) * t)) : n > s && n > h ? ((t = 2 * Math.sqrt(1 + n - s - h)), (this._w = (u - l) / t), (this._x = 0.25 * t), (this._y = (r + a) / t), (this._z = (o + c) / t)) : s > h ? ((t = 2 * Math.sqrt(1 + s - n - h)), (this._w = (o - c) / t), (this._x = (r + a) / t), (this._y = 0.25 * t), (this._z = (l + u) / t)) : ((t = 2 * Math.sqrt(1 + h - n - s)), (this._w = (a - r) / t), (this._x = (o + c) / t), (this._y = (l + u) / t), (this._z = 0.25 * t)), this.onChangeCallback(), this ); }, setFromUnitVectors: (function () { var e, t, i = 1e-6; return function (r, o) { return ( void 0 === e && (e = new n.Vector3()), (t = r.dot(o) + 1), i > t ? ((t = 0), Math.abs(r.x) > Math.abs(r.z) ? e.set(-r.y, r.x, 0) : e.set(0, -r.z, r.y)) : e.crossVectors(r, o), (this._x = e.x), (this._y = e.y), (this._z = e.z), (this._w = t), this.normalize() ); }; })(), inverse: function () { return this.conjugate().normalize(); }, conjugate: function () { return (this._x *= -1), (this._y *= -1), (this._z *= -1), this.onChangeCallback(), this; }, dot: function (e) { return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w; }, lengthSq: function () { return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; }, length: function () { return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w); }, normalize: function () { var e = this.length(); return ( 0 === e ? ((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: function (e, t) { return void 0 !== t ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(e, t)) : this.multiplyQuaternions(this, e); }, premultiply: function (e) { return this.multiplyQuaternions(e, this); }, multiplyQuaternions: function (e, t) { var i = e._x, n = e._y, r = e._z, o = e._w, a = t._x, s = t._y, l = t._z, c = t._w; return (this._x = i * c + o * a + n * l - r * s), (this._y = n * c + o * s + r * a - i * l), (this._z = r * c + o * l + i * s - n * a), (this._w = o * c - i * a - n * s - r * l), this.onChangeCallback(), this; }, slerp: function (e, t) { if (0 === t) return this; if (1 === t) return this.copy(e); var i = this._x, n = this._y, r = this._z, o = this._w, a = o * e._w + i * e._x + n * e._y + r * e._z; if ((0 > a ? ((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 = n), (this._z = r), this; var s = Math.sqrt(1 - a * a); if (Math.abs(s) < 0.001) return (this._w = 0.5 * (o + this._w)), (this._x = 0.5 * (i + this._x)), (this._y = 0.5 * (n + this._y)), (this._z = 0.5 * (r + this._z)), this; var l = Math.atan2(s, a), c = Math.sin((1 - t) * l) / s, u = Math.sin(t * l) / s; return (this._w = o * c + this._w * u), (this._x = i * c + this._x * u), (this._y = n * c + this._y * u), (this._z = r * c + this._z * u), this.onChangeCallback(), this; }, equals: function (e) { return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w; }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this._x = e[t]), (this._y = e[t + 1]), (this._z = e[t + 2]), (this._w = e[t + 3]), this.onChangeCallback(), this; }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this._x), (e[t + 1] = this._y), (e[t + 2] = this._z), (e[t + 3] = this._w), e; }, onChange: function (e) { return (this.onChangeCallback = e), this; }, onChangeCallback: function () {}, }), Object.assign(n.Quaternion, { slerp: function (e, t, i, n) { return i.copy(e).slerp(t, n); }, slerpFlat: function (e, t, i, n, r, o, a) { var s = i[n + 0], l = i[n + 1], c = i[n + 2], u = i[n + 3], h = r[o + 0], d = r[o + 1], f = r[o + 2], p = r[o + 3]; if (u !== p || s !== h || l !== d || c !== f) { var m = 1 - a, v = s * h + l * d + c * f + u * p, g = v >= 0 ? 1 : -1, y = 1 - v * v; if (y > Number.EPSILON) { var _ = Math.sqrt(y), b = Math.atan2(_, v * g); (m = Math.sin(m * b) / _), (a = Math.sin(a * b) / _); } var x = a * g; if (((s = s * m + h * x), (l = l * m + d * x), (c = c * m + f * x), (u = u * m + p * x), m === 1 - a)) { var w = 1 / Math.sqrt(s * s + l * l + c * c + u * u); (s *= w), (l *= w), (c *= w), (u *= w); } } (e[t] = s), (e[t + 1] = l), (e[t + 2] = c), (e[t + 3] = u); }, }), (n.Vector2 = function (e, t) { (this.x = e || 0), (this.y = t || 0); }), (n.Vector2.prototype = { constructor: n.Vector2, get width() { return this.x; }, set width(e) { this.x = e; }, get height() { return this.y; }, set height(e) { this.y = e; }, set: function (e, t) { return (this.x = e), (this.y = t), this; }, setScalar: function (e) { return (this.x = e), (this.y = e), this; }, setX: function (e) { return (this.x = e), this; }, setY: function (e) { return (this.y = e), this; }, setComponent: function (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); } }, getComponent: function (e) { switch (e) { case 0: return this.x; case 1: return this.y; default: throw new Error("index is out of range: " + e); } }, clone: function () { return new this.constructor(this.x, this.y); }, copy: function (e) { return (this.x = e.x), (this.y = e.y), this; }, add: function (e, t) { return void 0 !== t ? (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: function (e) { return (this.x += e), (this.y += e), this; }, addVectors: function (e, t) { return (this.x = e.x + t.x), (this.y = e.y + t.y), this; }, addScaledVector: function (e, t) { return (this.x += e.x * t), (this.y += e.y * t), this; }, sub: function (e, t) { return void 0 !== t ? (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: function (e) { return (this.x -= e), (this.y -= e), this; }, subVectors: function (e, t) { return (this.x = e.x - t.x), (this.y = e.y - t.y), this; }, multiply: function (e) { return (this.x *= e.x), (this.y *= e.y), this; }, multiplyScalar: function (e) { return isFinite(e) ? ((this.x *= e), (this.y *= e)) : ((this.x = 0), (this.y = 0)), this; }, divide: function (e) { return (this.x /= e.x), (this.y /= e.y), this; }, divideScalar: function (e) { return this.multiplyScalar(1 / e); }, min: function (e) { return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), this; }, max: function (e) { return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), this; }, clamp: function (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: (function () { var e, t; return function (i, r) { return void 0 === e && ((e = new n.Vector2()), (t = new n.Vector2())), e.set(i, i), t.set(r, r), this.clamp(e, t); }; })(), clampLength: function (e, t) { var i = this.length(); return this.multiplyScalar(Math.max(e, Math.min(t, i)) / i); }, floor: function () { return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), this; }, ceil: function () { return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), this; }, round: function () { return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), this; }, roundToZero: function () { 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: function () { return (this.x = -this.x), (this.y = -this.y), this; }, dot: function (e) { return this.x * e.x + this.y * e.y; }, lengthSq: function () { return this.x * this.x + this.y * this.y; }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y); }, lengthManhattan: function () { return Math.abs(this.x) + Math.abs(this.y); }, normalize: function () { return this.divideScalar(this.length()); }, angle: function () { var e = Math.atan2(this.y, this.x); return 0 > e && (e += 2 * Math.PI), e; }, distanceTo: function (e) { return Math.sqrt(this.distanceToSquared(e)); }, distanceToSquared: function (e) { var t = this.x - e.x, i = this.y - e.y; return t * t + i * i; }, distanceToManhattan: function (e) { return Math.abs(this.x - e.x) + Math.abs(this.y - e.y); }, setLength: function (e) { return this.multiplyScalar(e / this.length()); }, lerp: function (e, t) { return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), this; }, lerpVectors: function (e, t, i) { return this.subVectors(t, e).multiplyScalar(i).add(e); }, equals: function (e) { return e.x === this.x && e.y === this.y; }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), this; }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), e; }, fromAttribute: function (e, t, i) { return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), this; }, rotateAround: function (e, t) { var i = Math.cos(t), n = Math.sin(t), r = this.x - e.x, o = this.y - e.y; return (this.x = r * i - o * n + e.x), (this.y = r * n + o * i + e.y), this; }, }), (n.Vector3 = function (e, t, i) { (this.x = e || 0), (this.y = t || 0), (this.z = i || 0); }), (n.Vector3.prototype = { constructor: n.Vector3, set: function (e, t, i) { return (this.x = e), (this.y = t), (this.z = i), this; }, setScalar: function (e) { return (this.x = e), (this.y = e), (this.z = e), this; }, setX: function (e) { return (this.x = e), this; }, setY: function (e) { return (this.y = e), this; }, setZ: function (e) { return (this.z = e), this; }, setComponent: function (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); } }, getComponent: function (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: function () { return new this.constructor(this.x, this.y, this.z); }, copy: function (e) { return (this.x = e.x), (this.y = e.y), (this.z = e.z), this; }, add: function (e, t) { return void 0 !== t ? (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: function (e) { return (this.x += e), (this.y += e), (this.z += e), this; }, addVectors: function (e, t) { return (this.x = e.x + t.x), (this.y = e.y + t.y), (this.z = e.z + t.z), this; }, addScaledVector: function (e, t) { return (this.x += e.x * t), (this.y += e.y * t), (this.z += e.z * t), this; }, sub: function (e, t) { return void 0 !== t ? (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: function (e) { return (this.x -= e), (this.y -= e), (this.z -= e), this; }, subVectors: function (e, t) { return (this.x = e.x - t.x), (this.y = e.y - t.y), (this.z = e.z - t.z), this; }, multiply: function (e, t) { return void 0 !== t ? (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: function (e) { return isFinite(e) ? ((this.x *= e), (this.y *= e), (this.z *= e)) : ((this.x = 0), (this.y = 0), (this.z = 0)), this; }, multiplyVectors: function (e, t) { return (this.x = e.x * t.x), (this.y = e.y * t.y), (this.z = e.z * t.z), this; }, applyEuler: (function () { var e; return function (t) { return ( t instanceof n.Euler == !1 && console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."), void 0 === e && (e = new n.Quaternion()), this.applyQuaternion(e.setFromEuler(t)) ); }; })(), applyAxisAngle: (function () { var e; return function (t, i) { return void 0 === e && (e = new n.Quaternion()), this.applyQuaternion(e.setFromAxisAngle(t, i)); }; })(), applyMatrix3: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements; return (this.x = r[0] * t + r[3] * i + r[6] * n), (this.y = r[1] * t + r[4] * i + r[7] * n), (this.z = r[2] * t + r[5] * i + r[8] * n), this; }, applyMatrix4: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements; return (this.x = r[0] * t + r[4] * i + r[8] * n + r[12]), (this.y = r[1] * t + r[5] * i + r[9] * n + r[13]), (this.z = r[2] * t + r[6] * i + r[10] * n + r[14]), this; }, applyProjection: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements, o = 1 / (r[3] * t + r[7] * i + r[11] * n + r[15]); return (this.x = (r[0] * t + r[4] * i + r[8] * n + r[12]) * o), (this.y = (r[1] * t + r[5] * i + r[9] * n + r[13]) * o), (this.z = (r[2] * t + r[6] * i + r[10] * n + r[14]) * o), this; }, applyQuaternion: function (e) { var t = this.x, i = this.y, n = this.z, r = e.x, o = e.y, a = e.z, s = e.w, l = s * t + o * n - a * i, c = s * i + a * t - r * n, u = s * n + r * i - o * t, h = -r * t - o * i - a * n; return (this.x = l * s + h * -r + c * -a - u * -o), (this.y = c * s + h * -o + u * -r - l * -a), (this.z = u * s + h * -a + l * -o - c * -r), this; }, project: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.multiplyMatrices(t.projectionMatrix, e.getInverse(t.matrixWorld)), this.applyProjection(e); }; })(), unproject: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.multiplyMatrices(t.matrixWorld, e.getInverse(t.projectionMatrix)), this.applyProjection(e); }; })(), transformDirection: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements; return (this.x = r[0] * t + r[4] * i + r[8] * n), (this.y = r[1] * t + r[5] * i + r[9] * n), (this.z = r[2] * t + r[6] * i + r[10] * n), this.normalize(); }, divide: function (e) { return (this.x /= e.x), (this.y /= e.y), (this.z /= e.z), this; }, divideScalar: function (e) { return this.multiplyScalar(1 / e); }, min: function (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: function (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: function (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: (function () { var e, t; return function (i, r) { return void 0 === e && ((e = new n.Vector3()), (t = new n.Vector3())), e.set(i, i, i), t.set(r, r, r), this.clamp(e, t); }; })(), clampLength: function (e, t) { var i = this.length(); return this.multiplyScalar(Math.max(e, Math.min(t, i)) / i); }, floor: function () { return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), (this.z = Math.floor(this.z)), this; }, ceil: function () { return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), (this.z = Math.ceil(this.z)), this; }, round: function () { return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), (this.z = Math.round(this.z)), this; }, roundToZero: function () { 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: function () { return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), this; }, dot: function (e) { return this.x * e.x + this.y * e.y + this.z * e.z; }, lengthSq: function () { return this.x * this.x + this.y * this.y + this.z * this.z; }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); }, lengthManhattan: function () { return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z); }, normalize: function () { return this.divideScalar(this.length()); }, setLength: function (e) { return this.multiplyScalar(e / this.length()); }, lerp: function (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: function (e, t, i) { return this.subVectors(t, e).multiplyScalar(i).add(e); }, cross: function (e, t) { if (void 0 !== t) return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."), this.crossVectors(e, t); var i = this.x, n = this.y, r = this.z; return (this.x = n * e.z - r * e.y), (this.y = r * e.x - i * e.z), (this.z = i * e.y - n * e.x), this; }, crossVectors: function (e, t) { var i = e.x, n = e.y, r = e.z, o = t.x, a = t.y, s = t.z; return (this.x = n * s - r * a), (this.y = r * o - i * s), (this.z = i * a - n * o), this; }, projectOnVector: function (e) { var t = e.dot(this) / e.lengthSq(); return this.copy(e).multiplyScalar(t); }, projectOnPlane: (function () { var e; return function (t) { return void 0 === e && (e = new n.Vector3()), e.copy(this).projectOnVector(t), this.sub(e); }; })(), reflect: (function () { var e; return function (t) { return void 0 === e && (e = new n.Vector3()), this.sub(e.copy(t).multiplyScalar(2 * this.dot(t))); }; })(), angleTo: function (e) { var t = this.dot(e) / Math.sqrt(this.lengthSq() * e.lengthSq()); return Math.acos(n.Math.clamp(t, -1, 1)); }, distanceTo: function (e) { return Math.sqrt(this.distanceToSquared(e)); }, distanceToSquared: function (e) { var t = this.x - e.x, i = this.y - e.y, n = this.z - e.z; return t * t + i * i + n * n; }, distanceToManhattan: function (e) { return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) + Math.abs(this.z - e.z); }, setFromSpherical: function (e) { var t = Math.sin(e.phi) * e.radius; return (this.x = t * Math.sin(e.theta)), (this.y = Math.cos(e.phi) * e.radius), (this.z = t * Math.cos(e.theta)), this; }, setFromMatrixPosition: function (e) { return this.setFromMatrixColumn(e, 3); }, setFromMatrixScale: function (e) { var t = this.setFromMatrixColumn(e, 0).length(), i = this.setFromMatrixColumn(e, 1).length(), n = this.setFromMatrixColumn(e, 2).length(); return (this.x = t), (this.y = i), (this.z = n), this; }, setFromMatrixColumn: function (e, t) { if ("number" == typeof e) { console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index )."); var i = e; (e = t), (t = i); } return this.fromArray(e.elements, 4 * t); }, equals: function (e) { return e.x === this.x && e.y === this.y && e.z === this.z; }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), (this.z = e[t + 2]), this; }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), e; }, fromAttribute: function (e, t, i) { return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), (this.z = e.array[t + 2]), this; }, }), (n.Vector4 = function (e, t, i, n) { (this.x = e || 0), (this.y = t || 0), (this.z = i || 0), (this.w = void 0 !== n ? n : 1); }), (n.Vector4.prototype = { constructor: n.Vector4, set: function (e, t, i, n) { return (this.x = e), (this.y = t), (this.z = i), (this.w = n), this; }, setScalar: function (e) { return (this.x = e), (this.y = e), (this.z = e), (this.w = e), this; }, setX: function (e) { return (this.x = e), this; }, setY: function (e) { return (this.y = e), this; }, setZ: function (e) { return (this.z = e), this; }, setW: function (e) { return (this.w = e), this; }, setComponent: function (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); } }, getComponent: function (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: function () { return new this.constructor(this.x, this.y, this.z, this.w); }, copy: function (e) { return (this.x = e.x), (this.y = e.y), (this.z = e.z), (this.w = void 0 !== e.w ? e.w : 1), this; }, add: function (e, t) { return void 0 !== t ? (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: function (e) { return (this.x += e), (this.y += e), (this.z += e), (this.w += e), this; }, addVectors: function (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: function (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: function (e, t) { return void 0 !== t ? (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: function (e) { return (this.x -= e), (this.y -= e), (this.z -= e), (this.w -= e), this; }, subVectors: function (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; }, multiplyScalar: function (e) { return isFinite(e) ? ((this.x *= e), (this.y *= e), (this.z *= e), (this.w *= e)) : ((this.x = 0), (this.y = 0), (this.z = 0), (this.w = 0)), this; }, applyMatrix4: function (e) { var t = this.x, i = this.y, n = this.z, r = this.w, o = e.elements; return ( (this.x = o[0] * t + o[4] * i + o[8] * n + o[12] * r), (this.y = o[1] * t + o[5] * i + o[9] * n + o[13] * r), (this.z = o[2] * t + o[6] * i + o[10] * n + o[14] * r), (this.w = o[3] * t + o[7] * i + o[11] * n + o[15] * r), this ); }, divideScalar: function (e) { return this.multiplyScalar(1 / e); }, setAxisAngleFromQuaternion: function (e) { this.w = 2 * Math.acos(e.w); var t = Math.sqrt(1 - e.w * e.w); return 1e-4 > t ? ((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: function (e) { var t, i, n, r, o = 0.01, a = 0.1, s = e.elements, l = s[0], c = s[4], u = s[8], h = s[1], d = s[5], f = s[9], p = s[2], m = s[6], v = s[10]; if (Math.abs(c - h) < o && Math.abs(u - p) < o && Math.abs(f - m) < o) { if (Math.abs(c + h) < a && Math.abs(u + p) < a && Math.abs(f + m) < a && Math.abs(l + d + v - 3) < a) return this.set(1, 0, 0, 0), this; t = Math.PI; var g = (l + 1) / 2, y = (d + 1) / 2, _ = (v + 1) / 2, b = (c + h) / 4, x = (u + p) / 4, w = (f + m) / 4; return ( g > y && g > _ ? o > g ? ((i = 0), (n = 0.707106781), (r = 0.707106781)) : ((i = Math.sqrt(g)), (n = b / i), (r = x / i)) : y > _ ? o > y ? ((i = 0.707106781), (n = 0), (r = 0.707106781)) : ((n = Math.sqrt(y)), (i = b / n), (r = w / n)) : o > _ ? ((i = 0.707106781), (n = 0.707106781), (r = 0)) : ((r = Math.sqrt(_)), (i = x / r), (n = w / r)), this.set(i, n, r, t), this ); } var M = Math.sqrt((m - f) * (m - f) + (u - p) * (u - p) + (h - c) * (h - c)); return Math.abs(M) < 0.001 && (M = 1), (this.x = (m - f) / M), (this.y = (u - p) / M), (this.z = (h - c) / M), (this.w = Math.acos((l + d + v - 1) / 2)), this; }, min: function (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: function (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: function (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: (function () { var e, t; return function (i, r) { return void 0 === e && ((e = new n.Vector4()), (t = new n.Vector4())), e.set(i, i, i, i), t.set(r, r, r, r), this.clamp(e, t); }; })(), floor: function () { 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: function () { 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: function () { 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: function () { 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: function () { return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), (this.w = -this.w), this; }, dot: function (e) { return this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w; }, lengthSq: function () { return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); }, lengthManhattan: function () { return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w); }, normalize: function () { return this.divideScalar(this.length()); }, setLength: function (e) { return this.multiplyScalar(e / this.length()); }, lerp: function (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: function (e, t, i) { return this.subVectors(t, e).multiplyScalar(i).add(e); }, equals: function (e) { return e.x === this.x && e.y === this.y && e.z === this.z && e.w === this.w; }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), (this.z = e[t + 2]), (this.w = e[t + 3]), this; }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), (e[t + 3] = this.w), e; }, fromAttribute: function (e, t, i) { return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), (this.z = e.array[t + 2]), (this.w = e.array[t + 3]), this; }, }), (n.Euler = function (e, t, i, r) { (this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._order = r || n.Euler.DefaultOrder); }), (n.Euler.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"]), (n.Euler.DefaultOrder = "XYZ"), (n.Euler.prototype = { constructor: n.Euler, 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: function (e, t, i, n) { return (this._x = e), (this._y = t), (this._z = i), (this._order = n || this._order), this.onChangeCallback(), this; }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._order); }, copy: function (e) { return (this._x = e._x), (this._y = e._y), (this._z = e._z), (this._order = e._order), this.onChangeCallback(), this; }, setFromRotationMatrix: function (e, t, i) { var r = n.Math.clamp, o = e.elements, a = o[0], s = o[4], l = o[8], c = o[1], u = o[5], h = o[9], d = o[2], f = o[6], p = o[10]; return ( (t = t || this._order), "XYZ" === t ? ((this._y = Math.asin(r(l, -1, 1))), Math.abs(l) < 0.99999 ? ((this._x = Math.atan2(-h, p)), (this._z = Math.atan2(-s, a))) : ((this._x = Math.atan2(f, u)), (this._z = 0))) : "YXZ" === t ? ((this._x = Math.asin(-r(h, -1, 1))), Math.abs(h) < 0.99999 ? ((this._y = Math.atan2(l, p)), (this._z = Math.atan2(c, u))) : ((this._y = Math.atan2(-d, a)), (this._z = 0))) : "ZXY" === t ? ((this._x = Math.asin(r(f, -1, 1))), Math.abs(f) < 0.99999 ? ((this._y = Math.atan2(-d, p)), (this._z = Math.atan2(-s, u))) : ((this._y = 0), (this._z = Math.atan2(c, a)))) : "ZYX" === t ? ((this._y = Math.asin(-r(d, -1, 1))), Math.abs(d) < 0.99999 ? ((this._x = Math.atan2(f, p)), (this._z = Math.atan2(c, a))) : ((this._x = 0), (this._z = Math.atan2(-s, u)))) : "YZX" === t ? ((this._z = Math.asin(r(c, -1, 1))), Math.abs(c) < 0.99999 ? ((this._x = Math.atan2(-h, u)), (this._y = Math.atan2(-d, a))) : ((this._x = 0), (this._y = Math.atan2(l, p)))) : "XZY" === t ? ((this._z = Math.asin(-r(s, -1, 1))), Math.abs(s) < 0.99999 ? ((this._x = Math.atan2(f, u)), (this._y = Math.atan2(l, a))) : ((this._x = Math.atan2(-h, p)), (this._y = 0))) : console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: " + t), (this._order = t), i !== !1 && this.onChangeCallback(), this ); }, setFromQuaternion: (function () { var e; return function (t, i, r) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationFromQuaternion(t), this.setFromRotationMatrix(e, i, r); }; })(), setFromVector3: function (e, t) { return this.set(e.x, e.y, e.z, t || this._order); }, reorder: (function () { var e = new n.Quaternion(); return function (t) { return e.setFromEuler(this), this.setFromQuaternion(e, t); }; })(), equals: function (e) { return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order; }, fromArray: function (e) { return (this._x = e[0]), (this._y = e[1]), (this._z = e[2]), void 0 !== e[3] && (this._order = e[3]), this.onChangeCallback(), this; }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this._x), (e[t + 1] = this._y), (e[t + 2] = this._z), (e[t + 3] = this._order), e; }, toVector3: function (e) { return e ? e.set(this._x, this._y, this._z) : new n.Vector3(this._x, this._y, this._z); }, onChange: function (e) { return (this.onChangeCallback = e), this; }, onChangeCallback: function () {}, }), (n.Line3 = function (e, t) { (this.start = void 0 !== e ? e : new n.Vector3()), (this.end = void 0 !== t ? t : new n.Vector3()); }), (n.Line3.prototype = { constructor: n.Line3, set: function (e, t) { return this.start.copy(e), this.end.copy(t), this; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.start.copy(e.start), this.end.copy(e.end), this; }, center: function (e) { var t = e || new n.Vector3(); return t.addVectors(this.start, this.end).multiplyScalar(0.5); }, delta: function (e) { var t = e || new n.Vector3(); return t.subVectors(this.end, this.start); }, distanceSq: function () { return this.start.distanceToSquared(this.end); }, distance: function () { return this.start.distanceTo(this.end); }, at: function (e, t) { var i = t || new n.Vector3(); return this.delta(i).multiplyScalar(e).add(this.start); }, closestPointToPointParameter: (function () { var e = new n.Vector3(), t = new n.Vector3(); return function (i, r) { e.subVectors(i, this.start), t.subVectors(this.end, this.start); var o = t.dot(t), a = t.dot(e), s = a / o; return r && (s = n.Math.clamp(s, 0, 1)), s; }; })(), closestPointToPoint: function (e, t, i) { var r = this.closestPointToPointParameter(e, t), o = i || new n.Vector3(); return this.delta(o).multiplyScalar(r).add(this.start); }, applyMatrix4: function (e) { return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this; }, equals: function (e) { return e.start.equals(this.start) && e.end.equals(this.end); }, }), (n.Box2 = function (e, t) { (this.min = void 0 !== e ? e : new n.Vector2(+(1 / 0), +(1 / 0))), (this.max = void 0 !== t ? t : new n.Vector2(-(1 / 0), -(1 / 0))); }), (n.Box2.prototype = { constructor: n.Box2, set: function (e, t) { return this.min.copy(e), this.max.copy(t), this; }, setFromPoints: function (e) { this.makeEmpty(); for (var t = 0, i = e.length; i > t; t++) this.expandByPoint(e[t]); return this; }, setFromCenterAndSize: (function () { var e = new n.Vector2(); return function (t, i) { var n = e.copy(i).multiplyScalar(0.5); return this.min.copy(t).sub(n), this.max.copy(t).add(n), this; }; })(), clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.min.copy(e.min), this.max.copy(e.max), this; }, makeEmpty: function () { return (this.min.x = this.min.y = +(1 / 0)), (this.max.x = this.max.y = -(1 / 0)), this; }, isEmpty: function () { return this.max.x < this.min.x || this.max.y < this.min.y; }, center: function (e) { var t = e || new n.Vector2(); return t.addVectors(this.min, this.max).multiplyScalar(0.5); }, size: function (e) { var t = e || new n.Vector2(); return t.subVectors(this.max, this.min); }, expandByPoint: function (e) { return this.min.min(e), this.max.max(e), this; }, expandByVector: function (e) { return this.min.sub(e), this.max.add(e), this; }, expandByScalar: function (e) { return this.min.addScalar(-e), this.max.addScalar(e), this; }, containsPoint: function (e) { return e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y ? !1 : !0; }, containsBox: function (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 ? !0 : !1; }, getParameter: function (e, t) { var i = t || new n.Vector2(); return i.set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y)); }, intersectsBox: function (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 ? !1 : !0; }, clampPoint: function (e, t) { var i = t || new n.Vector2(); return i.copy(e).clamp(this.min, this.max); }, distanceToPoint: (function () { var e = new n.Vector2(); return function (t) { var i = e.copy(t).clamp(this.min, this.max); return i.sub(t).length(); }; })(), intersect: function (e) { return this.min.max(e.min), this.max.min(e.max), this; }, union: function (e) { return this.min.min(e.min), this.max.max(e.max), this; }, translate: function (e) { return this.min.add(e), this.max.add(e), this; }, equals: function (e) { return e.min.equals(this.min) && e.max.equals(this.max); }, }), (n.Box3 = function (e, t) { (this.min = void 0 !== e ? e : new n.Vector3(+(1 / 0), +(1 / 0), +(1 / 0))), (this.max = void 0 !== t ? t : new n.Vector3(-(1 / 0), -(1 / 0), -(1 / 0))); }), (n.Box3.prototype = { constructor: n.Box3, set: function (e, t) { return this.min.copy(e), this.max.copy(t), this; }, setFromArray: function (e) { for (var t = +(1 / 0), i = +(1 / 0), n = +(1 / 0), r = -(1 / 0), o = -(1 / 0), a = -(1 / 0), s = 0, l = e.length; l > s; s += 3) { var c = e[s], u = e[s + 1], h = e[s + 2]; t > c && (t = c), i > u && (i = u), n > h && (n = h), c > r && (r = c), u > o && (o = u), h > a && (a = h); } this.min.set(t, i, n), this.max.set(r, o, a); }, setFromPoints: function (e) { this.makeEmpty(); for (var t = 0, i = e.length; i > t; t++) this.expandByPoint(e[t]); return this; }, setFromCenterAndSize: (function () { var e = new n.Vector3(); return function (t, i) { var n = e.copy(i).multiplyScalar(0.5); return this.min.copy(t).sub(n), this.max.copy(t).add(n), this; }; })(), setFromObject: (function () { var e = new n.Vector3(); return function (t) { var i = this; return ( t.updateMatrixWorld(!0), this.makeEmpty(), t.traverse(function (t) { var r = t.geometry; if (void 0 !== r) if (r instanceof n.Geometry) for (var o = r.vertices, a = 0, s = o.length; s > a; a++) e.copy(o[a]), e.applyMatrix4(t.matrixWorld), i.expandByPoint(e); else if (r instanceof n.BufferGeometry) { var l = r.attributes.position; if (void 0 !== l) { var c, u, h; l instanceof n.InterleavedBufferAttribute ? ((c = l.data.array), (u = l.offset), (h = l.data.stride)) : ((c = l.array), (u = 0), (h = 3)); for (var a = u, s = c.length; s > a; a += h) e.fromArray(c, a), e.applyMatrix4(t.matrixWorld), i.expandByPoint(e); } } }), this ); }; })(), clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.min.copy(e.min), this.max.copy(e.max), this; }, makeEmpty: function () { 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: function () { return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z; }, center: function (e) { var t = e || new n.Vector3(); return t.addVectors(this.min, this.max).multiplyScalar(0.5); }, size: function (e) { var t = e || new n.Vector3(); return t.subVectors(this.max, this.min); }, expandByPoint: function (e) { return this.min.min(e), this.max.max(e), this; }, expandByVector: function (e) { return this.min.sub(e), this.max.add(e), this; }, expandByScalar: function (e) { return this.min.addScalar(-e), this.max.addScalar(e), this; }, containsPoint: function (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 ? !1 : !0; }, containsBox: function (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 ? !0 : !1; }, getParameter: function (e, t) { var i = t || new n.Vector3(); return i.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: function (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 ? !1 : !0; }, intersectsSphere: (function () { var e; return function (t) { return void 0 === e && (e = new n.Vector3()), this.clampPoint(t.center, e), e.distanceToSquared(t.center) <= t.radius * t.radius; }; })(), intersectsPlane: function (e) { var 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 ); }, clampPoint: function (e, t) { var i = t || new n.Vector3(); return i.copy(e).clamp(this.min, this.max); }, distanceToPoint: (function () { var e = new n.Vector3(); return function (t) { var i = e.copy(t).clamp(this.min, this.max); return i.sub(t).length(); }; })(), getBoundingSphere: (function () { var e = new n.Vector3(); return function (t) { var i = t || new n.Sphere(); return (i.center = this.center()), (i.radius = 0.5 * this.size(e).length()), i; }; })(), intersect: function (e) { return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this; }, union: function (e) { return this.min.min(e.min), this.max.max(e.max), this; }, applyMatrix4: (function () { var e = [new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3()]; return function (t) { return this.isEmpty() ? this : (e[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(t), e[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(t), e[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(t), e[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(t), e[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(t), e[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(t), e[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(t), e[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(t), this.setFromPoints(e), this); }; })(), translate: function (e) { return this.min.add(e), this.max.add(e), this; }, equals: function (e) { return e.min.equals(this.min) && e.max.equals(this.max); }, }), (n.Matrix3 = function () { (this.elements = new Float32Array([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."); }), (n.Matrix3.prototype = { constructor: n.Matrix3, set: function (e, t, i, n, r, o, a, s, l) { var c = this.elements; return (c[0] = e), (c[1] = n), (c[2] = a), (c[3] = t), (c[4] = r), (c[5] = s), (c[6] = i), (c[7] = o), (c[8] = l), this; }, identity: function () { return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this; }, clone: function () { return new this.constructor().fromArray(this.elements); }, copy: function (e) { var t = e.elements; return this.set(t[0], t[3], t[6], t[1], t[4], t[7], t[2], t[5], t[8]), this; }, setFromMatrix4: function (e) { var 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; }, applyToVector3Array: (function () { var e; return function (t, i, r) { void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length); for (var o = 0, a = i; r > o; o += 3, a += 3) e.fromArray(t, a), e.applyMatrix3(this), e.toArray(t, a); return t; }; })(), applyToBuffer: (function () { var e; return function (t, i, r) { void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length / t.itemSize); for (var o = 0, a = i; r > o; o++, a++)(e.x = t.getX(a)), (e.y = t.getY(a)), (e.z = t.getZ(a)), e.applyMatrix3(this), t.setXYZ(e.x, e.y, e.z); return t; }; })(), multiplyScalar: function (e) { var 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: function () { var e = this.elements, t = e[0], i = e[1], n = e[2], r = e[3], o = e[4], a = e[5], s = e[6], l = e[7], c = e[8]; return t * o * c - t * a * l - i * r * c + i * a * s + n * r * l - n * o * s; }, getInverse: function (e, t) { e instanceof n.Matrix4 && console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument."); var i = e.elements, r = this.elements, o = i[0], a = i[1], s = i[2], l = i[3], c = i[4], u = i[5], h = i[6], d = i[7], f = i[8], p = f * c - u * d, m = u * h - f * l, v = d * l - c * h, g = o * p + a * m + s * v; if (0 === g) { var y = "THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0"; if (t) throw new Error(y); return console.warn(y), this.identity(); } var _ = 1 / g; return ( (r[0] = p * _), (r[1] = (s * d - f * a) * _), (r[2] = (u * a - s * c) * _), (r[3] = m * _), (r[4] = (f * o - s * h) * _), (r[5] = (s * l - u * o) * _), (r[6] = v * _), (r[7] = (a * h - d * o) * _), (r[8] = (c * o - a * l) * _), this ); }, transpose: function () { var e, 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; }, flattenToArrayOffset: function (e, t) { return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."), this.toArray(e, t); }, getNormalMatrix: function (e) { return this.setFromMatrix4(e).getInverse(this).transpose(); }, transposeIntoArray: function (e) { var 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; }, fromArray: function (e) { return this.elements.set(e), this; }, toArray: function (e, t) { void 0 === e && (e = []), void 0 === t && (t = 0); var 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; }, }), (n.Matrix4 = function () { (this.elements = new Float32Array([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."); }), (n.Matrix4.prototype = { constructor: n.Matrix4, set: function (e, t, i, n, r, o, a, s, l, c, u, h, d, f, p, m) { var v = this.elements; return (v[0] = e), (v[4] = t), (v[8] = i), (v[12] = n), (v[1] = r), (v[5] = o), (v[9] = a), (v[13] = s), (v[2] = l), (v[6] = c), (v[10] = u), (v[14] = h), (v[3] = d), (v[7] = f), (v[11] = p), (v[15] = m), this; }, identity: function () { return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this; }, clone: function () { return new n.Matrix4().fromArray(this.elements); }, copy: function (e) { return this.elements.set(e.elements), this; }, copyPosition: function (e) { var t = this.elements, i = e.elements; return (t[12] = i[12]), (t[13] = i[13]), (t[14] = i[14]), this; }, extractBasis: function (e, t, i) { return e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), i.setFromMatrixColumn(this, 2), this; }, makeBasis: function (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: (function () { var e; return function (t) { void 0 === e && (e = new n.Vector3()); var i = this.elements, r = t.elements, o = 1 / e.setFromMatrixColumn(t, 0).length(), a = 1 / e.setFromMatrixColumn(t, 1).length(), s = 1 / e.setFromMatrixColumn(t, 2).length(); return (i[0] = r[0] * o), (i[1] = r[1] * o), (i[2] = r[2] * o), (i[4] = r[4] * a), (i[5] = r[5] * a), (i[6] = r[6] * a), (i[8] = r[8] * s), (i[9] = r[9] * s), (i[10] = r[10] * s), this; }; })(), makeRotationFromEuler: function (e) { e instanceof n.Euler == !1 && console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order."); var t = this.elements, i = e.x, r = e.y, o = e.z, a = Math.cos(i), s = Math.sin(i), l = Math.cos(r), c = Math.sin(r), u = Math.cos(o), h = Math.sin(o); if ("XYZ" === e.order) { var d = a * u, f = a * h, p = s * u, m = s * h; (t[0] = l * u), (t[4] = -l * h), (t[8] = c), (t[1] = f + p * c), (t[5] = d - m * c), (t[9] = -s * l), (t[2] = m - d * c), (t[6] = p + f * c), (t[10] = a * l); } else if ("YXZ" === e.order) { var v = l * u, g = l * h, y = c * u, _ = c * h; (t[0] = v + _ * s), (t[4] = y * s - g), (t[8] = a * c), (t[1] = a * h), (t[5] = a * u), (t[9] = -s), (t[2] = g * s - y), (t[6] = _ + v * s), (t[10] = a * l); } else if ("ZXY" === e.order) { var v = l * u, g = l * h, y = c * u, _ = c * h; (t[0] = v - _ * s), (t[4] = -a * h), (t[8] = y + g * s), (t[1] = g + y * s), (t[5] = a * u), (t[9] = _ - v * s), (t[2] = -a * c), (t[6] = s), (t[10] = a * l); } else if ("ZYX" === e.order) { var d = a * u, f = a * h, p = s * u, m = s * h; (t[0] = l * u), (t[4] = p * c - f), (t[8] = d * c + m), (t[1] = l * h), (t[5] = m * c + d), (t[9] = f * c - p), (t[2] = -c), (t[6] = s * l), (t[10] = a * l); } else if ("YZX" === e.order) { var b = a * l, x = a * c, w = s * l, M = s * c; (t[0] = l * u), (t[4] = M - b * h), (t[8] = w * h + x), (t[1] = h), (t[5] = a * u), (t[9] = -s * u), (t[2] = -c * u), (t[6] = x * h + w), (t[10] = b - M * h); } else if ("XZY" === e.order) { var b = a * l, x = a * c, w = s * l, M = s * c; (t[0] = l * u), (t[4] = -h), (t[8] = c * u), (t[1] = b * h + M), (t[5] = a * u), (t[9] = x * h - w), (t[2] = w * h - x), (t[6] = s * u), (t[10] = M * h + b); } return (t[3] = 0), (t[7] = 0), (t[11] = 0), (t[12] = 0), (t[13] = 0), (t[14] = 0), (t[15] = 1), this; }, makeRotationFromQuaternion: function (e) { var t = this.elements, i = e.x, n = e.y, r = e.z, o = e.w, a = i + i, s = n + n, l = r + r, c = i * a, u = i * s, h = i * l, d = n * s, f = n * l, p = r * l, m = o * a, v = o * s, g = o * l; return ( (t[0] = 1 - (d + p)), (t[4] = u - g), (t[8] = h + v), (t[1] = u + g), (t[5] = 1 - (c + p)), (t[9] = f - m), (t[2] = h - v), (t[6] = f + m), (t[10] = 1 - (c + d)), (t[3] = 0), (t[7] = 0), (t[11] = 0), (t[12] = 0), (t[13] = 0), (t[14] = 0), (t[15] = 1), this ); }, lookAt: (function () { var e, t, i; return function (r, o, a) { void 0 === e && ((e = new n.Vector3()), (t = new n.Vector3()), (i = new n.Vector3())); var s = this.elements; return ( i.subVectors(r, o).normalize(), 0 === i.lengthSq() && (i.z = 1), e.crossVectors(a, i).normalize(), 0 === e.lengthSq() && ((i.z += 1e-4), e.crossVectors(a, i).normalize()), t.crossVectors(i, e), (s[0] = e.x), (s[4] = t.x), (s[8] = i.x), (s[1] = e.y), (s[5] = t.y), (s[9] = i.y), (s[2] = e.z), (s[6] = t.z), (s[10] = i.z), this ); }; })(), multiply: function (e, t) { return void 0 !== t ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(e, t)) : this.multiplyMatrices(this, e); }, premultiply: function (e) { return this.multiplyMatrices(e, this); }, multiplyMatrices: function (e, t) { var i = e.elements, n = t.elements, r = this.elements, o = i[0], a = i[4], s = i[8], l = i[12], c = i[1], u = i[5], h = i[9], d = i[13], f = i[2], p = i[6], m = i[10], v = i[14], g = i[3], y = i[7], _ = i[11], b = i[15], x = n[0], w = n[4], M = n[8], T = n[12], S = n[1], E = n[5], A = n[9], C = n[13], P = n[2], L = n[6], R = n[10], O = n[14], k = n[3], D = n[7], I = n[11], N = n[15]; return ( (r[0] = o * x + a * S + s * P + l * k), (r[4] = o * w + a * E + s * L + l * D), (r[8] = o * M + a * A + s * R + l * I), (r[12] = o * T + a * C + s * O + l * N), (r[1] = c * x + u * S + h * P + d * k), (r[5] = c * w + u * E + h * L + d * D), (r[9] = c * M + u * A + h * R + d * I), (r[13] = c * T + u * C + h * O + d * N), (r[2] = f * x + p * S + m * P + v * k), (r[6] = f * w + p * E + m * L + v * D), (r[10] = f * M + p * A + m * R + v * I), (r[14] = f * T + p * C + m * O + v * N), (r[3] = g * x + y * S + _ * P + b * k), (r[7] = g * w + y * E + _ * L + b * D), (r[11] = g * M + y * A + _ * R + b * I), (r[15] = g * T + y * C + _ * O + b * N), this ); }, multiplyToArray: function (e, t, i) { var n = this.elements; return ( this.multiplyMatrices(e, t), (i[0] = n[0]), (i[1] = n[1]), (i[2] = n[2]), (i[3] = n[3]), (i[4] = n[4]), (i[5] = n[5]), (i[6] = n[6]), (i[7] = n[7]), (i[8] = n[8]), (i[9] = n[9]), (i[10] = n[10]), (i[11] = n[11]), (i[12] = n[12]), (i[13] = n[13]), (i[14] = n[14]), (i[15] = n[15]), this ); }, multiplyScalar: function (e) { var 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 ); }, applyToVector3Array: (function () { var e; return function (t, i, r) { void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length); for (var o = 0, a = i; r > o; o += 3, a += 3) e.fromArray(t, a), e.applyMatrix4(this), e.toArray(t, a); return t; }; })(), applyToBuffer: (function () { var e; return function (t, i, r) { void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length / t.itemSize); for (var o = 0, a = i; r > o; o++, a++)(e.x = t.getX(a)), (e.y = t.getY(a)), (e.z = t.getZ(a)), e.applyMatrix4(this), t.setXYZ(e.x, e.y, e.z); return t; }; })(), determinant: function () { var e = this.elements, t = e[0], i = e[4], n = e[8], r = e[12], o = e[1], a = e[5], s = e[9], l = e[13], c = e[2], u = e[6], h = e[10], d = e[14], f = e[3], p = e[7], m = e[11], v = e[15]; return ( f * (+r * s * u - n * l * u - r * a * h + i * l * h + n * a * d - i * s * d) + p * (+t * s * d - t * l * h + r * o * h - n * o * d + n * l * c - r * s * c) + m * (+t * l * u - t * a * d - r * o * u + i * o * d + r * a * c - i * l * c) + v * (-n * a * c - t * s * u + t * a * h + n * o * u - i * o * h + i * s * c) ); }, transpose: function () { var e, t = this.elements; return ( (e = t[1]), (t[1] = t[4]), (t[4] = e), (e = t[2]), (t[2] = t[8]), (t[8] = e), (e = t[6]), (t[6] = t[9]), (t[9] = e), (e = t[3]), (t[3] = t[12]), (t[12] = e), (e = t[7]), (t[7] = t[13]), (t[13] = e), (e = t[11]), (t[11] = t[14]), (t[14] = e), this ); }, flattenToArrayOffset: function (e, t) { return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."), this.toArray(e, t); }, getPosition: (function () { var e; return function () { return void 0 === e && (e = new n.Vector3()), console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), e.setFromMatrixColumn(this, 3); }; })(), setPosition: function (e) { var t = this.elements; return (t[12] = e.x), (t[13] = e.y), (t[14] = e.z), this; }, getInverse: function (e, t) { var i = this.elements, n = e.elements, r = n[0], o = n[1], a = n[2], s = n[3], l = n[4], c = n[5], u = n[6], h = n[7], d = n[8], f = n[9], p = n[10], m = n[11], v = n[12], g = n[13], y = n[14], _ = n[15], b = f * y * h - g * p * h + g * u * m - c * y * m - f * u * _ + c * p * _, x = v * p * h - d * y * h - v * u * m + l * y * m + d * u * _ - l * p * _, w = d * g * h - v * f * h + v * c * m - l * g * m - d * c * _ + l * f * _, M = v * f * u - d * g * u - v * c * p + l * g * p + d * c * y - l * f * y, T = r * b + o * x + a * w + s * M; if (0 === T) { var S = "THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0"; if (t) throw new Error(S); return console.warn(S), this.identity(); } var E = 1 / T; return ( (i[0] = b * E), (i[1] = (g * p * s - f * y * s - g * a * m + o * y * m + f * a * _ - o * p * _) * E), (i[2] = (c * y * s - g * u * s + g * a * h - o * y * h - c * a * _ + o * u * _) * E), (i[3] = (f * u * s - c * p * s - f * a * h + o * p * h + c * a * m - o * u * m) * E), (i[4] = x * E), (i[5] = (d * y * s - v * p * s + v * a * m - r * y * m - d * a * _ + r * p * _) * E), (i[6] = (v * u * s - l * y * s - v * a * h + r * y * h + l * a * _ - r * u * _) * E), (i[7] = (l * p * s - d * u * s + d * a * h - r * p * h - l * a * m + r * u * m) * E), (i[8] = w * E), (i[9] = (v * f * s - d * g * s - v * o * m + r * g * m + d * o * _ - r * f * _) * E), (i[10] = (l * g * s - v * c * s + v * o * h - r * g * h - l * o * _ + r * c * _) * E), (i[11] = (d * c * s - l * f * s - d * o * h + r * f * h + l * o * m - r * c * m) * E), (i[12] = M * E), (i[13] = (d * g * a - v * f * a + v * o * p - r * g * p - d * o * y + r * f * y) * E), (i[14] = (v * c * a - l * g * a - v * o * u + r * g * u + l * o * y - r * c * y) * E), (i[15] = (l * f * a - d * c * a + d * o * u - r * f * u - l * o * p + r * c * p) * E), this ); }, scale: function (e) { var t = this.elements, i = e.x, n = e.y, r = e.z; return (t[0] *= i), (t[4] *= n), (t[8] *= r), (t[1] *= i), (t[5] *= n), (t[9] *= r), (t[2] *= i), (t[6] *= n), (t[10] *= r), (t[3] *= i), (t[7] *= n), (t[11] *= r), this; }, getMaxScaleOnAxis: function () { var 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], n = e[8] * e[8] + e[9] * e[9] + e[10] * e[10]; return Math.sqrt(Math.max(t, i, n)); }, makeTranslation: function (e, t, i) { return this.set(1, 0, 0, e, 0, 1, 0, t, 0, 0, 1, i, 0, 0, 0, 1), this; }, makeRotationX: function (e) { var 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: function (e) { var 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: function (e) { var 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: function (e, t) { var i = Math.cos(t), n = Math.sin(t), r = 1 - i, o = e.x, a = e.y, s = e.z, l = r * o, c = r * a; return this.set(l * o + i, l * a - n * s, l * s + n * a, 0, l * a + n * s, c * a + i, c * s - n * o, 0, l * s - n * a, c * s + n * o, r * s * s + i, 0, 0, 0, 0, 1), this; }, makeScale: function (e, t, i) { return this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1), this; }, compose: function (e, t, i) { return this.makeRotationFromQuaternion(t), this.scale(i), this.setPosition(e), this; }, decompose: (function () { var e, t; return function (i, r, o) { void 0 === e && ((e = new n.Vector3()), (t = new n.Matrix4())); var a = this.elements, s = e.set(a[0], a[1], a[2]).length(), l = e.set(a[4], a[5], a[6]).length(), c = e.set(a[8], a[9], a[10]).length(), u = this.determinant(); 0 > u && (s = -s), (i.x = a[12]), (i.y = a[13]), (i.z = a[14]), t.elements.set(this.elements); var h = 1 / s, d = 1 / l, f = 1 / c; return ( (t.elements[0] *= h), (t.elements[1] *= h), (t.elements[2] *= h), (t.elements[4] *= d), (t.elements[5] *= d), (t.elements[6] *= d), (t.elements[8] *= f), (t.elements[9] *= f), (t.elements[10] *= f), r.setFromRotationMatrix(t), (o.x = s), (o.y = l), (o.z = c), this ); }; })(), makeFrustum: function (e, t, i, n, r, o) { var a = this.elements, s = (2 * r) / (t - e), l = (2 * r) / (n - i), c = (t + e) / (t - e), u = (n + i) / (n - i), h = -(o + r) / (o - r), d = (-2 * o * r) / (o - r); return (a[0] = s), (a[4] = 0), (a[8] = c), (a[12] = 0), (a[1] = 0), (a[5] = l), (a[9] = u), (a[13] = 0), (a[2] = 0), (a[6] = 0), (a[10] = h), (a[14] = d), (a[3] = 0), (a[7] = 0), (a[11] = -1), (a[15] = 0), this; }, makePerspective: function (e, t, i, r) { var o = i * Math.tan(n.Math.DEG2RAD * e * 0.5), a = -o, s = a * t, l = o * t; return this.makeFrustum(s, l, a, o, i, r); }, makeOrthographic: function (e, t, i, n, r, o) { var a = this.elements, s = 1 / (t - e), l = 1 / (i - n), c = 1 / (o - r), u = (t + e) * s, h = (i + n) * l, d = (o + r) * c; return ( (a[0] = 2 * s), (a[4] = 0), (a[8] = 0), (a[12] = -u), (a[1] = 0), (a[5] = 2 * l), (a[9] = 0), (a[13] = -h), (a[2] = 0), (a[6] = 0), (a[10] = -2 * c), (a[14] = -d), (a[3] = 0), (a[7] = 0), (a[11] = 0), (a[15] = 1), this ); }, equals: function (e) { for (var t = this.elements, i = e.elements, n = 0; 16 > n; n++) if (t[n] !== i[n]) return !1; return !0; }, fromArray: function (e) { return this.elements.set(e), this; }, toArray: function (e, t) { void 0 === e && (e = []), void 0 === t && (t = 0); var 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 ); }, }), (n.Ray = function (e, t) { (this.origin = void 0 !== e ? e : new n.Vector3()), (this.direction = void 0 !== t ? t : new n.Vector3()); }), (n.Ray.prototype = { constructor: n.Ray, set: function (e, t) { return this.origin.copy(e), this.direction.copy(t), this; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.origin.copy(e.origin), this.direction.copy(e.direction), this; }, at: function (e, t) { var i = t || new n.Vector3(); return i.copy(this.direction).multiplyScalar(e).add(this.origin); }, lookAt: function (e) { return this.direction.copy(e).sub(this.origin).normalize(), this; }, recast: (function () { var e = new n.Vector3(); return function (t) { return this.origin.copy(this.at(t, e)), this; }; })(), closestPointToPoint: function (e, t) { var i = t || new n.Vector3(); i.subVectors(e, this.origin); var r = i.dot(this.direction); return 0 > r ? i.copy(this.origin) : i.copy(this.direction).multiplyScalar(r).add(this.origin); }, distanceToPoint: function (e) { return Math.sqrt(this.distanceSqToPoint(e)); }, distanceSqToPoint: (function () { var e = new n.Vector3(); return function (t) { var i = e.subVectors(t, this.origin).dot(this.direction); return 0 > i ? this.origin.distanceToSquared(t) : (e.copy(this.direction).multiplyScalar(i).add(this.origin), e.distanceToSquared(t)); }; })(), distanceSqToSegment: (function () { var e = new n.Vector3(), t = new n.Vector3(), i = new n.Vector3(); return function (n, r, o, a) { e.copy(n).add(r).multiplyScalar(0.5), t.copy(r).sub(n).normalize(), i.copy(this.origin).sub(e); var s, l, c, u, h = 0.5 * n.distanceTo(r), d = -this.direction.dot(t), f = i.dot(this.direction), p = -i.dot(t), m = i.lengthSq(), v = Math.abs(1 - d * d); if (v > 0) if (((s = d * p - f), (l = d * f - p), (u = h * v), s >= 0)) if (l >= -u) if (u >= l) { var g = 1 / v; (s *= g), (l *= g), (c = s * (s + d * l + 2 * f) + l * (d * s + l + 2 * p) + m); } else(l = h), (s = Math.max(0, -(d * l + f))), (c = -s * s + l * (l + 2 * p) + m); else(l = -h), (s = Math.max(0, -(d * l + f))), (c = -s * s + l * (l + 2 * p) + m); else -u >= l ? ((s = Math.max(0, -(-d * h + f))), (l = s > 0 ? -h : Math.min(Math.max(-h, -p), h)), (c = -s * s + l * (l + 2 * p) + m)) : u >= l ? ((s = 0), (l = Math.min(Math.max(-h, -p), h)), (c = l * (l + 2 * p) + m)) : ((s = Math.max(0, -(d * h + f))), (l = s > 0 ? h : Math.min(Math.max(-h, -p), h)), (c = -s * s + l * (l + 2 * p) + m)); else(l = d > 0 ? -h : h), (s = Math.max(0, -(d * l + f))), (c = -s * s + l * (l + 2 * p) + m); return o && o.copy(this.direction).multiplyScalar(s).add(this.origin), a && a.copy(t).multiplyScalar(l).add(e), c; }; })(), intersectSphere: (function () { var e = new n.Vector3(); return function (t, i) { e.subVectors(t.center, this.origin); var n = e.dot(this.direction), r = e.dot(e) - n * n, o = t.radius * t.radius; if (r > o) return null; var a = Math.sqrt(o - r), s = n - a, l = n + a; return 0 > s && 0 > l ? null : 0 > s ? this.at(l, i) : this.at(s, i); }; })(), intersectsSphere: function (e) { return this.distanceToPoint(e.center) <= e.radius; }, distanceToPlane: function (e) { var t = e.normal.dot(this.direction); if (0 === t) return 0 === e.distanceToPoint(this.origin) ? 0 : null; var i = -(this.origin.dot(e.normal) + e.constant) / t; return i >= 0 ? i : null; }, intersectPlane: function (e, t) { var i = this.distanceToPlane(e); return null === i ? null : this.at(i, t); }, intersectsPlane: function (e) { var t = e.distanceToPoint(this.origin); if (0 === t) return !0; var i = e.normal.dot(this.direction); return 0 > i * t ? !0 : !1; }, intersectBox: function (e, t) { var i, n, r, o, a, s, l = 1 / this.direction.x, c = 1 / this.direction.y, u = 1 / this.direction.z, h = this.origin; return ( l >= 0 ? ((i = (e.min.x - h.x) * l), (n = (e.max.x - h.x) * l)) : ((i = (e.max.x - h.x) * l), (n = (e.min.x - h.x) * l)), c >= 0 ? ((r = (e.min.y - h.y) * c), (o = (e.max.y - h.y) * c)) : ((r = (e.max.y - h.y) * c), (o = (e.min.y - h.y) * c)), i > o || r > n ? null : ((r > i || i !== i) && (i = r), (n > o || n !== n) && (n = o), u >= 0 ? ((a = (e.min.z - h.z) * u), (s = (e.max.z - h.z) * u)) : ((a = (e.max.z - h.z) * u), (s = (e.min.z - h.z) * u)), i > s || a > n ? null : ((a > i || i !== i) && (i = a), (n > s || n !== n) && (n = s), 0 > n ? null : this.at(i >= 0 ? i : n, t))) ); }, intersectsBox: (function () { var e = new n.Vector3(); return function (t) { return null !== this.intersectBox(t, e); }; })(), intersectTriangle: (function () { var e = new n.Vector3(), t = new n.Vector3(), i = new n.Vector3(), r = new n.Vector3(); return function (n, o, a, s, l) { t.subVectors(o, n), i.subVectors(a, n), r.crossVectors(t, i); var c, u = this.direction.dot(r); if (u > 0) { if (s) return null; c = 1; } else { if (!(0 > u)) return null; (c = -1), (u = -u); } e.subVectors(this.origin, n); var h = c * this.direction.dot(i.crossVectors(e, i)); if (0 > h) return null; var d = c * this.direction.dot(t.cross(e)); if (0 > d) return null; if (h + d > u) return null; var f = -c * e.dot(r); return 0 > f ? null : this.at(f / u, l); }; })(), applyMatrix4: function (e) { return this.direction.add(this.origin).applyMatrix4(e), this.origin.applyMatrix4(e), this.direction.sub(this.origin), this.direction.normalize(), this; }, equals: function (e) { return e.origin.equals(this.origin) && e.direction.equals(this.direction); }, }), (n.Sphere = function (e, t) { (this.center = void 0 !== e ? e : new n.Vector3()), (this.radius = void 0 !== t ? t : 0); }), (n.Sphere.prototype = { constructor: n.Sphere, set: function (e, t) { return this.center.copy(e), (this.radius = t), this; }, setFromPoints: (function () { var e = new n.Box3(); return function (t, i) { var n = this.center; void 0 !== i ? n.copy(i) : e.setFromPoints(t).center(n); for (var r = 0, o = 0, a = t.length; a > o; o++) r = Math.max(r, n.distanceToSquared(t[o])); return (this.radius = Math.sqrt(r)), this; }; })(), clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.center.copy(e.center), (this.radius = e.radius), this; }, empty: function () { return this.radius <= 0; }, containsPoint: function (e) { return e.distanceToSquared(this.center) <= this.radius * this.radius; }, distanceToPoint: function (e) { return e.distanceTo(this.center) - this.radius; }, intersectsSphere: function (e) { var t = this.radius + e.radius; return e.center.distanceToSquared(this.center) <= t * t; }, intersectsBox: function (e) { return e.intersectsSphere(this); }, intersectsPlane: function (e) { return Math.abs(this.center.dot(e.normal) - e.constant) <= this.radius; }, clampPoint: function (e, t) { var i = this.center.distanceToSquared(e), r = t || new n.Vector3(); return r.copy(e), i > this.radius * this.radius && (r.sub(this.center).normalize(), r.multiplyScalar(this.radius).add(this.center)), r; }, getBoundingBox: function (e) { var t = e || new n.Box3(); return t.set(this.center, this.center), t.expandByScalar(this.radius), t; }, applyMatrix4: function (e) { return this.center.applyMatrix4(e), (this.radius = this.radius * e.getMaxScaleOnAxis()), this; }, translate: function (e) { return this.center.add(e), this; }, equals: function (e) { return e.center.equals(this.center) && e.radius === this.radius; }, }), (n.Frustum = function (e, t, i, r, o, a) { this.planes = [ void 0 !== e ? e : new n.Plane(), void 0 !== t ? t : new n.Plane(), void 0 !== i ? i : new n.Plane(), void 0 !== r ? r : new n.Plane(), void 0 !== o ? o : new n.Plane(), void 0 !== a ? a : new n.Plane(), ]; }), (n.Frustum.prototype = { constructor: n.Frustum, set: function (e, t, i, n, r, o) { var a = this.planes; return a[0].copy(e), a[1].copy(t), a[2].copy(i), a[3].copy(n), a[4].copy(r), a[5].copy(o), this; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { for (var t = this.planes, i = 0; 6 > i; i++) t[i].copy(e.planes[i]); return this; }, setFromMatrix: function (e) { var t = this.planes, i = e.elements, n = i[0], r = i[1], o = i[2], a = i[3], s = i[4], l = i[5], c = i[6], u = i[7], h = i[8], d = i[9], f = i[10], p = i[11], m = i[12], v = i[13], g = i[14], y = i[15]; return ( t[0].setComponents(a - n, u - s, p - h, y - m).normalize(), t[1].setComponents(a + n, u + s, p + h, y + m).normalize(), t[2].setComponents(a + r, u + l, p + d, y + v).normalize(), t[3].setComponents(a - r, u - l, p - d, y - v).normalize(), t[4].setComponents(a - o, u - c, p - f, y - g).normalize(), t[5].setComponents(a + o, u + c, p + f, y + g).normalize(), this ); }, intersectsObject: (function () { var e = new n.Sphere(); return function (t) { var i = t.geometry; return null === i.boundingSphere && i.computeBoundingSphere(), e.copy(i.boundingSphere).applyMatrix4(t.matrixWorld), this.intersectsSphere(e); }; })(), intersectsSprite: (function () { var e = new n.Sphere(); return function (t) { return e.center.set(0, 0, 0), (e.radius = 0.7071067811865476), e.applyMatrix4(t.matrixWorld), this.intersectsSphere(e); }; })(), intersectsSphere: function (e) { for (var t = this.planes, i = e.center, n = -e.radius, r = 0; 6 > r; r++) { var o = t[r].distanceToPoint(i); if (n > o) return !1; } return !0; }, intersectsBox: (function () { var e = new n.Vector3(), t = new n.Vector3(); return function (i) { for (var n = this.planes, r = 0; 6 > r; r++) { var o = n[r]; (e.x = o.normal.x > 0 ? i.min.x : i.max.x), (t.x = o.normal.x > 0 ? i.max.x : i.min.x), (e.y = o.normal.y > 0 ? i.min.y : i.max.y), (t.y = o.normal.y > 0 ? i.max.y : i.min.y), (e.z = o.normal.z > 0 ? i.min.z : i.max.z), (t.z = o.normal.z > 0 ? i.max.z : i.min.z); var a = o.distanceToPoint(e), s = o.distanceToPoint(t); if (0 > a && 0 > s) return !1; } return !0; }; })(), containsPoint: function (e) { for (var t = this.planes, i = 0; 6 > i; i++) if (t[i].distanceToPoint(e) < 0) return !1; return !0; }, }), (n.Plane = function (e, t) { (this.normal = void 0 !== e ? e : new n.Vector3(1, 0, 0)), (this.constant = void 0 !== t ? t : 0); }), (n.Plane.prototype = { constructor: n.Plane, set: function (e, t) { return this.normal.copy(e), (this.constant = t), this; }, setComponents: function (e, t, i, n) { return this.normal.set(e, t, i), (this.constant = n), this; }, setFromNormalAndCoplanarPoint: function (e, t) { return this.normal.copy(e), (this.constant = -t.dot(this.normal)), this; }, setFromCoplanarPoints: (function () { var e = new n.Vector3(), t = new n.Vector3(); return function (i, n, r) { var o = e.subVectors(r, n).cross(t.subVectors(i, n)).normalize(); return this.setFromNormalAndCoplanarPoint(o, i), this; }; })(), clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.normal.copy(e.normal), (this.constant = e.constant), this; }, normalize: function () { var e = 1 / this.normal.length(); return this.normal.multiplyScalar(e), (this.constant *= e), this; }, negate: function () { return (this.constant *= -1), this.normal.negate(), this; }, distanceToPoint: function (e) { return this.normal.dot(e) + this.constant; }, distanceToSphere: function (e) { return this.distanceToPoint(e.center) - e.radius; }, projectPoint: function (e, t) { return this.orthoPoint(e, t).sub(e).negate(); }, orthoPoint: function (e, t) { var i = this.distanceToPoint(e), r = t || new n.Vector3(); return r.copy(this.normal).multiplyScalar(i); }, intersectLine: (function () { var e = new n.Vector3(); return function (t, i) { var r = i || new n.Vector3(), o = t.delta(e), a = this.normal.dot(o); if (0 === a) return 0 === this.distanceToPoint(t.start) ? r.copy(t.start) : void 0; var s = -(t.start.dot(this.normal) + this.constant) / a; return 0 > s || s > 1 ? void 0 : r.copy(o).multiplyScalar(s).add(t.start); }; })(), intersectsLine: function (e) { var t = this.distanceToPoint(e.start), i = this.distanceToPoint(e.end); return (0 > t && i > 0) || (0 > i && t > 0); }, intersectsBox: function (e) { return e.intersectsPlane(this); }, intersectsSphere: function (e) { return e.intersectsPlane(this); }, coplanarPoint: function (e) { var t = e || new n.Vector3(); return t.copy(this.normal).multiplyScalar(-this.constant); }, applyMatrix4: (function () { var e = new n.Vector3(), t = new n.Matrix3(); return function (i, n) { var r = this.coplanarPoint(e).applyMatrix4(i), o = n || t.getNormalMatrix(i), a = this.normal.applyMatrix3(o).normalize(); return (this.constant = -r.dot(a)), this; }; })(), translate: function (e) { return (this.constant = this.constant - e.dot(this.normal)), this; }, equals: function (e) { return e.normal.equals(this.normal) && e.constant === this.constant; }, }), (n.Spherical = function (e, t, i) { return (this.radius = void 0 !== e ? e : 1), (this.phi = void 0 !== t ? t : 0), (this.theta = void 0 !== i ? i : 0), this; }), (n.Spherical.prototype = { constructor: n.Spherical, set: function (e, t, i) { return (this.radius = e), (this.phi = t), (this.theta = i), this; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.radius.copy(e.radius), this.phi.copy(e.phi), this.theta.copy(e.theta), this; }, makeSafe: function () { var e = 1e-6; return (this.phi = Math.max(e, Math.min(Math.PI - e, this.phi))), this; }, setFromVector3: function (e) { return (this.radius = e.length()), 0 === this.radius ? ((this.theta = 0), (this.phi = 0)) : ((this.theta = Math.atan2(e.x, e.z)), (this.phi = Math.acos(n.Math.clamp(e.y / this.radius, -1, 1)))), this; }, }), (n.Math = { DEG2RAD: Math.PI / 180, RAD2DEG: 180 / Math.PI, generateUUID: (function () { var e, t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), i = new Array(36), n = 0; return function () { for (var r = 0; 36 > r; r++) 8 === r || 13 === r || 18 === r || 23 === r ? (i[r] = "-") : 14 === r ? (i[r] = "4") : (2 >= n && (n = (33554432 + 16777216 * Math.random()) | 0), (e = 15 & n), (n >>= 4), (i[r] = t[19 === r ? (3 & e) | 8 : e])); return i.join(""); }; })(), clamp: function (e, t, i) { return Math.max(t, Math.min(i, e)); }, euclideanModulo: function (e, t) { return ((e % t) + t) % t; }, mapLinear: function (e, t, i, n, r) { return n + ((e - t) * (r - n)) / (i - t); }, smoothstep: function (e, t, i) { return t >= e ? 0 : e >= i ? 1 : ((e = (e - t) / (i - t)), e * e * (3 - 2 * e)); }, smootherstep: function (e, t, i) { return t >= e ? 0 : e >= i ? 1 : ((e = (e - t) / (i - t)), e * e * e * (e * (6 * e - 15) + 10)); }, random16: function () { return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."), Math.random(); }, randInt: function (e, t) { return e + Math.floor(Math.random() * (t - e + 1)); }, randFloat: function (e, t) { return e + Math.random() * (t - e); }, randFloatSpread: function (e) { return e * (0.5 - Math.random()); }, degToRad: function (e) { return e * n.Math.DEG2RAD; }, radToDeg: function (e) { return e * n.Math.RAD2DEG; }, isPowerOfTwo: function (e) { return 0 === (e & (e - 1)) && 0 !== e; }, nearestPowerOfTwo: function (e) { return Math.pow(2, Math.round(Math.log(e) / Math.LN2)); }, nextPowerOfTwo: function (e) { return e--, (e |= e >> 1), (e |= e >> 2), (e |= e >> 4), (e |= e >> 8), (e |= e >> 16), e++, e; }, }), (n.Spline = function (e) { function t(e, t, i, n, r, o, a) { var s = 0.5 * (i - e), l = 0.5 * (n - t); return (2 * (t - i) + s + l) * a + (-3 * (t - i) - 2 * s - l) * o + s * r + t; } this.points = e; var i, r, o, a, s, l, c, u, h, d = [], f = { x: 0, y: 0, z: 0 }; (this.initFromArray = function (e) { this.points = []; for (var t = 0; t < e.length; t++) this.points[t] = { x: e[t][0], y: e[t][1], z: e[t][2] }; }), (this.getPoint = function (e) { return ( (i = (this.points.length - 1) * e), (r = Math.floor(i)), (o = i - r), (d[0] = 0 === r ? r : r - 1), (d[1] = r), (d[2] = r > this.points.length - 2 ? this.points.length - 1 : r + 1), (d[3] = r > this.points.length - 3 ? this.points.length - 1 : r + 2), (l = this.points[d[0]]), (c = this.points[d[1]]), (u = this.points[d[2]]), (h = this.points[d[3]]), (a = o * o), (s = o * a), (f.x = t(l.x, c.x, u.x, h.x, o, a, s)), (f.y = t(l.y, c.y, u.y, h.y, o, a, s)), (f.z = t(l.z, c.z, u.z, h.z, o, a, s)), f ); }), (this.getControlPointsArray = function () { var e, t, i = this.points.length, n = []; for (e = 0; i > e; e++)(t = this.points[e]), (n[e] = [t.x, t.y, t.z]); return n; }), (this.getLength = function (e) { var t, i, r, o, a = 0, s = 0, l = 0, c = new n.Vector3(), u = new n.Vector3(), h = [], d = 0; for (h[0] = 0, e || (e = 100), r = this.points.length * e, c.copy(this.points[0]), t = 1; r > t; t++) (i = t / r), (o = this.getPoint(i)), u.copy(o), (d += u.distanceTo(c)), c.copy(o), (a = (this.points.length - 1) * i), (s = Math.floor(a)), s !== l && ((h[s] = d), (l = s)); return (h[h.length] = d), { chunks: h, total: d }; }), (this.reparametrizeByArcLength = function (e) { var t, i, r, o, a, s, l, c, u = [], h = new n.Vector3(), d = this.getLength(); for (u.push(h.copy(this.points[0]).clone()), t = 1; t < this.points.length; t++) { for (s = d.chunks[t] - d.chunks[t - 1], l = Math.ceil((e * s) / d.total), o = (t - 1) / (this.points.length - 1), a = t / (this.points.length - 1), i = 1; l - 1 > i; i++) (r = o + i * (1 / l) * (a - o)), (c = this.getPoint(r)), u.push(h.copy(c).clone()); u.push(h.copy(this.points[t]).clone()); } this.points = u; }); }), (n.Triangle = function (e, t, i) { (this.a = void 0 !== e ? e : new n.Vector3()), (this.b = void 0 !== t ? t : new n.Vector3()), (this.c = void 0 !== i ? i : new n.Vector3()); }), (n.Triangle.normal = (function () { var e = new n.Vector3(); return function (t, i, r, o) { var a = o || new n.Vector3(); a.subVectors(r, i), e.subVectors(t, i), a.cross(e); var s = a.lengthSq(); return s > 0 ? a.multiplyScalar(1 / Math.sqrt(s)) : a.set(0, 0, 0); }; })()), (n.Triangle.barycoordFromPoint = (function () { var e = new n.Vector3(), t = new n.Vector3(), i = new n.Vector3(); return function (r, o, a, s, l) { e.subVectors(s, o), t.subVectors(a, o), i.subVectors(r, o); var c = e.dot(e), u = e.dot(t), h = e.dot(i), d = t.dot(t), f = t.dot(i), p = c * d - u * u, m = l || new n.Vector3(); if (0 === p) return m.set(-2, -1, -1); var v = 1 / p, g = (d * h - u * f) * v, y = (c * f - u * h) * v; return m.set(1 - g - y, y, g); }; })()), (n.Triangle.containsPoint = (function () { var e = new n.Vector3(); return function (t, i, r, o) { var a = n.Triangle.barycoordFromPoint(t, i, r, o, e); return a.x >= 0 && a.y >= 0 && a.x + a.y <= 1; }; })()), (n.Triangle.prototype = { constructor: n.Triangle, set: function (e, t, i) { return this.a.copy(e), this.b.copy(t), this.c.copy(i), this; }, setFromPointsAndIndices: function (e, t, i, n) { return this.a.copy(e[t]), this.b.copy(e[i]), this.c.copy(e[n]), this; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this; }, area: (function () { var e = new n.Vector3(), t = new n.Vector3(); return function () { return e.subVectors(this.c, this.b), t.subVectors(this.a, this.b), 0.5 * e.cross(t).length(); }; })(), midpoint: function (e) { var t = e || new n.Vector3(); return t .addVectors(this.a, this.b) .add(this.c) .multiplyScalar(1 / 3); }, normal: function (e) { return n.Triangle.normal(this.a, this.b, this.c, e); }, plane: function (e) { var t = e || new n.Plane(); return t.setFromCoplanarPoints(this.a, this.b, this.c); }, barycoordFromPoint: function (e, t) { return n.Triangle.barycoordFromPoint(e, this.a, this.b, this.c, t); }, containsPoint: function (e) { return n.Triangle.containsPoint(e, this.a, this.b, this.c); }, closestPointToPoint: (function () { var e, t, i, r; return function (o, a) { void 0 === e && ((e = new n.Plane()), (t = [new n.Line3(), new n.Line3(), new n.Line3()]), (i = new n.Vector3()), (r = new n.Vector3())); var s = a || new n.Vector3(), l = 1 / 0; if ((e.setFromCoplanarPoints(this.a, this.b, this.c), e.projectPoint(o, i), this.containsPoint(i) === !0)) s.copy(i); else { t[0].set(this.a, this.b), t[1].set(this.b, this.c), t[2].set(this.c, this.a); for (var c = 0; c < t.length; c++) { t[c].closestPointToPoint(i, !0, r); var u = i.distanceToSquared(r); l > u && ((l = u), s.copy(r)); } } return s; }; })(), equals: function (e) { return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c); }, }), (n.Interpolant = function (e, t, i, n) { (this.parameterPositions = e), (this._cachedIndex = 0), (this.resultBuffer = void 0 !== n ? n : new t.constructor(i)), (this.sampleValues = t), (this.valueSize = i); }), (n.Interpolant.prototype = { constructor: n.Interpolant, evaluate: function (e) { var t = this.parameterPositions, i = this._cachedIndex, n = t[i], r = t[i - 1]; e: { t: { var o; i: { n: if (!(n > e)) { for (var a = i + 2;;) { if (void 0 === n) { if (r > e) break n; return (i = t.length), (this._cachedIndex = i), this.afterEnd_(i - 1, e, r); } if (i === a) break; if (((r = n), (n = t[++i]), n > e)) break t; } o = t.length; break i; } { if (e >= r) break e; var s = t[1]; s > e && ((i = 2), (r = s)); for (var a = i - 2;;) { if (void 0 === r) return (this._cachedIndex = 0), this.beforeStart_(0, e, n); if (i === a) break; if (((n = r), (r = t[--i - 1]), e >= r)) break t; } (o = i), (i = 0); } } for (; o > i;) { var l = (i + o) >>> 1; e < t[l] ? (o = l) : (i = l + 1); } if (((n = t[i]), (r = t[i - 1]), void 0 === r)) return (this._cachedIndex = 0), this.beforeStart_(0, e, n); if (void 0 === n) return (i = t.length), (this._cachedIndex = i), this.afterEnd_(i - 1, r, e); } (this._cachedIndex = i), this.intervalChanged_(i, r, n); } return this.interpolate_(i, r, e, n); }, settings: null, DefaultSettings_: {}, getSettings_: function () { return this.settings || this.DefaultSettings_; }, copySampleValue_: function (e) { for (var t = this.resultBuffer, i = this.sampleValues, n = this.valueSize, r = e * n, o = 0; o !== n; ++o) t[o] = i[r + o]; return t; }, interpolate_: function (e, t, i, n) { throw new Error("call to abstract method"); }, intervalChanged_: function (e, t, i) {}, }), Object.assign(n.Interpolant.prototype, { beforeStart_: n.Interpolant.prototype.copySampleValue_, afterEnd_: n.Interpolant.prototype.copySampleValue_ }), (n.CubicInterpolant = function (e, t, i, r) { n.Interpolant.call(this, e, t, i, r), (this._weightPrev = -0), (this._offsetPrev = -0), (this._weightNext = -0), (this._offsetNext = -0); }), (n.CubicInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), { constructor: n.CubicInterpolant, DefaultSettings_: { endingStart: n.ZeroCurvatureEnding, endingEnd: n.ZeroCurvatureEnding }, intervalChanged_: function (e, t, i) { var r = this.parameterPositions, o = e - 2, a = e + 1, s = r[o], l = r[a]; if (void 0 === s) switch (this.getSettings_().endingStart) { case n.ZeroSlopeEnding: (o = e), (s = 2 * t - i); break; case n.WrapAroundEnding: (o = r.length - 2), (s = t + r[o] - r[o + 1]); break; default: (o = e), (s = i); } if (void 0 === l) switch (this.getSettings_().endingEnd) { case n.ZeroSlopeEnding: (a = e), (l = 2 * i - t); break; case n.WrapAroundEnding: (a = 1), (l = i + r[1] - r[0]); break; default: (a = e - 1), (l = t); } var c = 0.5 * (i - t), u = this.valueSize; (this._weightPrev = c / (t - s)), (this._weightNext = c / (l - i)), (this._offsetPrev = o * u), (this._offsetNext = a * u); }, interpolate_: function (e, t, i, n) { for ( var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = this._offsetPrev, u = this._offsetNext, h = this._weightPrev, d = this._weightNext, f = (i - t) / (n - t), p = f * f, m = p * f, v = -h * m + 2 * h * p - h * f, g = (1 + h) * m + (-1.5 - 2 * h) * p + (-0.5 + h) * f + 1, y = (-1 - d) * m + (1.5 + d) * p + 0.5 * f, _ = d * m - d * p, b = 0; b !== a; ++b ) r[b] = v * o[c + b] + g * o[l + b] + y * o[s + b] + _ * o[u + b]; return r; }, })), (n.DiscreteInterpolant = function (e, t, i, r) { n.Interpolant.call(this, e, t, i, r); }), (n.DiscreteInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), { constructor: n.DiscreteInterpolant, interpolate_: function (e, t, i, n) { return this.copySampleValue_(e - 1); }, })), (n.LinearInterpolant = function (e, t, i, r) { n.Interpolant.call(this, e, t, i, r); }), (n.LinearInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), { constructor: n.LinearInterpolant, interpolate_: function (e, t, i, n) { for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = (i - t) / (n - t), u = 1 - c, h = 0; h !== a; ++h) r[h] = o[l + h] * u + o[s + h] * c; return r; }, })), (n.QuaternionLinearInterpolant = function (e, t, i, r) { n.Interpolant.call(this, e, t, i, r); }), (n.QuaternionLinearInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), { constructor: n.QuaternionLinearInterpolant, interpolate_: function (e, t, i, r) { for (var o = this.resultBuffer, a = this.sampleValues, s = this.valueSize, l = e * s, c = (i - t) / (r - t), u = l + s; l !== u; l += 4) n.Quaternion.slerpFlat(o, 0, a, l - s, a, l, c); return o; }, })), (n.Clock = function (e) { (this.autoStart = void 0 !== e ? e : !0), (this.startTime = 0), (this.oldTime = 0), (this.elapsedTime = 0), (this.running = !1); }), (n.Clock.prototype = { constructor: n.Clock, start: function () { (this.startTime = (performance || Date).now()), (this.oldTime = this.startTime), (this.running = !0); }, stop: function () { this.getElapsedTime(), (this.running = !1); }, getElapsedTime: function () { return this.getDelta(), this.elapsedTime; }, getDelta: function () { var e = 0; if ((this.autoStart && !this.running && this.start(), this.running)) { var t = (performance || Date).now(); (e = (t - this.oldTime) / 1e3), (this.oldTime = t), (this.elapsedTime += e); } return e; }, }), (n.EventDispatcher = function () {}), Object.assign(n.EventDispatcher.prototype, { addEventListener: function (e, t) { void 0 === this._listeners && (this._listeners = {}); var i = this._listeners; void 0 === i[e] && (i[e] = []), -1 === i[e].indexOf(t) && i[e].push(t); }, hasEventListener: function (e, t) { if (void 0 === this._listeners) return !1; var i = this._listeners; return void 0 !== i[e] && -1 !== i[e].indexOf(t) ? !0 : !1; }, removeEventListener: function (e, t) { if (void 0 !== this._listeners) { var i = this._listeners, n = i[e]; if (void 0 !== n) { var r = n.indexOf(t); - 1 !== r && n.splice(r, 1); } } }, dispatchEvent: function (e) { if (void 0 !== this._listeners) { var t = this._listeners, i = t[e.type]; if (void 0 !== i) { e.target = this; var n = [], r = 0, o = i.length; for (r = 0; o > r; r++) n[r] = i[r]; for (r = 0; o > r; r++) n[r].call(this, e); } } }, }), (n.Layers = function () { this.mask = 1; }), (n.Layers.prototype = { constructor: n.Layers, set: function (e) { this.mask = 1 << e; }, enable: function (e) { this.mask |= 1 << e; }, toggle: function (e) { this.mask ^= 1 << e; }, disable: function (e) { this.mask &= ~(1 << e); }, test: function (e) { return 0 !== (this.mask & e.mask); }, }), (function (e) { function t(e, t) { return e.distance - t.distance; } function i(e, t, n, r) { if (e.visible !== !1 && (e.raycast(t, n), r === !0)) for (var o = e.children, a = 0, s = o.length; s > a; a++) i(o[a], t, n, !0); } (e.Raycaster = function (t, i, n, r) { (this.ray = new e.Ray(t, i)), (this.near = n || 0), (this.far = r || 1 / 0), (this.params = { Mesh: {}, Line: {}, LOD: {}, Points: { threshold: 1 }, Sprite: {} }), Object.defineProperties(this.params, { PointCloud: { get: function () { return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."), this.Points; }, }, }); }), (e.Raycaster.prototype = { constructor: e.Raycaster, linePrecision: 1, set: function (e, t) { this.ray.set(e, t); }, setFromCamera: function (t, i) { i instanceof e.PerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(i.matrixWorld), this.ray.direction.set(t.x, t.y, 0.5).unproject(i).sub(this.ray.origin).normalize()) : i instanceof e.OrthographicCamera ? (this.ray.origin.set(t.x, t.y, (i.near + i.far) / (i.near - i.far)).unproject(i), this.ray.direction.set(0, 0, -1).transformDirection(i.matrixWorld)) : console.error("THREE.Raycaster: Unsupported camera type."); }, intersectObject: function (e, n) { var r = []; return i(e, this, r, n), r.sort(t), r; }, intersectObjects: function (e, n) { var r = []; if (Array.isArray(e) === !1) return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."), r; for (var o = 0, a = e.length; a > o; o++) i(e[o], this, r, n); return r.sort(t), r; }, }); })(n), (n.Object3D = function () { function e() { o.setFromEuler(r, !1); } function t() { r.setFromQuaternion(o, void 0, !1); } Object.defineProperty(this, "id", { value: n.Object3DIdCount++ }), (this.uuid = n.Math.generateUUID()), (this.name = ""), (this.type = "Object3D"), (this.parent = null), (this.children = []), (this.up = n.Object3D.DefaultUp.clone()); var i = new n.Vector3(), r = new n.Euler(), o = new n.Quaternion(), a = new n.Vector3(1, 1, 1); r.onChange(e), o.onChange(t), Object.defineProperties(this, { position: { enumerable: !0, value: i }, rotation: { enumerable: !0, value: r }, quaternion: { enumerable: !0, value: o }, scale: { enumerable: !0, value: a }, modelViewMatrix: { value: new n.Matrix4() }, normalMatrix: { value: new n.Matrix3() }, }), (this.matrix = new n.Matrix4()), (this.matrixWorld = new n.Matrix4()), (this.matrixAutoUpdate = n.Object3D.DefaultMatrixAutoUpdate), (this.matrixWorldNeedsUpdate = !1), (this.layers = new n.Layers()), (this.visible = !0), (this.castShadow = !1), (this.receiveShadow = !1), (this.frustumCulled = !0), (this.renderOrder = 0), (this.userData = {}); }), (n.Object3D.DefaultUp = new n.Vector3(0, 1, 0)), (n.Object3D.DefaultMatrixAutoUpdate = !0), Object.assign(n.Object3D.prototype, n.EventDispatcher.prototype, { applyMatrix: function (e) { this.matrix.multiplyMatrices(e, this.matrix), this.matrix.decompose(this.position, this.quaternion, this.scale); }, setRotationFromAxisAngle: function (e, t) { this.quaternion.setFromAxisAngle(e, t); }, setRotationFromEuler: function (e) { this.quaternion.setFromEuler(e, !0); }, setRotationFromMatrix: function (e) { this.quaternion.setFromRotationMatrix(e); }, setRotationFromQuaternion: function (e) { this.quaternion.copy(e); }, rotateOnAxis: (function () { var e = new n.Quaternion(); return function (t, i) { return e.setFromAxisAngle(t, i), this.quaternion.multiply(e), this; }; })(), rotateX: (function () { var e = new n.Vector3(1, 0, 0); return function (t) { return this.rotateOnAxis(e, t); }; })(), rotateY: (function () { var e = new n.Vector3(0, 1, 0); return function (t) { return this.rotateOnAxis(e, t); }; })(), rotateZ: (function () { var e = new n.Vector3(0, 0, 1); return function (t) { return this.rotateOnAxis(e, t); }; })(), translateOnAxis: (function () { var e = new n.Vector3(); return function (t, i) { return e.copy(t).applyQuaternion(this.quaternion), this.position.add(e.multiplyScalar(i)), this; }; })(), translateX: (function () { var e = new n.Vector3(1, 0, 0); return function (t) { return this.translateOnAxis(e, t); }; })(), translateY: (function () { var e = new n.Vector3(0, 1, 0); return function (t) { return this.translateOnAxis(e, t); }; })(), translateZ: (function () { var e = new n.Vector3(0, 0, 1); return function (t) { return this.translateOnAxis(e, t); }; })(), localToWorld: function (e) { return e.applyMatrix4(this.matrixWorld); }, worldToLocal: (function () { var e = new n.Matrix4(); return function (t) { return t.applyMatrix4(e.getInverse(this.matrixWorld)); }; })(), lookAt: (function () { var e = new n.Matrix4(); return function (t) { e.lookAt(t, this.position, this.up), this.quaternion.setFromRotationMatrix(e); }; })(), add: function (e) { if (arguments.length > 1) { for (var 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 instanceof n.Object3D ? (null !== e.parent && e.parent.remove(e), (e.parent = this), e.dispatchEvent({ type: "added" }), this.children.push(e)) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this); }, remove: function (e) { if (arguments.length > 1) for (var t = 0; t < arguments.length; t++) this.remove(arguments[t]); var i = this.children.indexOf(e); - 1 !== i && ((e.parent = null), e.dispatchEvent({ type: "removed" }), this.children.splice(i, 1)); }, getObjectById: function (e) { return this.getObjectByProperty("id", e); }, getObjectByName: function (e) { return this.getObjectByProperty("name", e); }, getObjectByProperty: function (e, t) { if (this[e] === t) return this; for (var i = 0, n = this.children.length; n > i; i++) { var r = this.children[i], o = r.getObjectByProperty(e, t); if (void 0 !== o) return o; } return void 0; }, getWorldPosition: function (e) { var t = e || new n.Vector3(); return this.updateMatrixWorld(!0), t.setFromMatrixPosition(this.matrixWorld); }, getWorldQuaternion: (function () { var e = new n.Vector3(), t = new n.Vector3(); return function (i) { var r = i || new n.Quaternion(); return this.updateMatrixWorld(!0), this.matrixWorld.decompose(e, r, t), r; }; })(), getWorldRotation: (function () { var e = new n.Quaternion(); return function (t) { var i = t || new n.Euler(); return this.getWorldQuaternion(e), i.setFromQuaternion(e, this.rotation.order, !1); }; })(), getWorldScale: (function () { var e = new n.Vector3(), t = new n.Quaternion(); return function (i) { var r = i || new n.Vector3(); return this.updateMatrixWorld(!0), this.matrixWorld.decompose(e, t, r), r; }; })(), getWorldDirection: (function () { var e = new n.Quaternion(); return function (t) { var i = t || new n.Vector3(); return this.getWorldQuaternion(e), i.set(0, 0, 1).applyQuaternion(e); }; })(), raycast: function () {}, traverse: function (e) { e(this); for (var t = this.children, i = 0, n = t.length; n > i; i++) t[i].traverse(e); }, traverseVisible: function (e) { if (this.visible !== !1) { e(this); for (var t = this.children, i = 0, n = t.length; n > i; i++) t[i].traverseVisible(e); } }, traverseAncestors: function (e) { var t = this.parent; null !== t && (e(t), t.traverseAncestors(e)); }, updateMatrix: function () { this.matrix.compose(this.position, this.quaternion, this.scale), (this.matrixWorldNeedsUpdate = !0); }, updateMatrixWorld: function (e) { this.matrixAutoUpdate === !0 && this.updateMatrix(), (this.matrixWorldNeedsUpdate === !0 || e === !0) && (null === this.parent ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), (this.matrixWorldNeedsUpdate = !1), (e = !0)); for (var t = 0, i = this.children.length; i > t; t++) this.children[t].updateMatrixWorld(e); }, toJSON: function (e) { function t(e) { var t = []; for (var i in e) { var n = e[i]; delete n.metadata, t.push(n); } return t; } var i = void 0 === e || "" === e, n = {}; i && ((e = { geometries: {}, materials: {}, textures: {}, images: {} }), (n.metadata = { version: 4.4, type: "Object", generator: "Object3D.toJSON" })); var r = {}; if ( ((r.uuid = this.uuid), (r.type = this.type), "" !== this.name && (r.name = this.name), "{}" !== JSON.stringify(this.userData) && (r.userData = this.userData), this.castShadow === !0 && (r.castShadow = !0), this.receiveShadow === !0 && (r.receiveShadow = !0), this.visible === !1 && (r.visible = !1), (r.matrix = this.matrix.toArray()), void 0 !== this.geometry && (void 0 === e.geometries[this.geometry.uuid] && (e.geometries[this.geometry.uuid] = this.geometry.toJSON(e)), (r.geometry = this.geometry.uuid)), void 0 !== this.material && (void 0 === e.materials[this.material.uuid] && (e.materials[this.material.uuid] = this.material.toJSON(e)), (r.material = this.material.uuid)), this.children.length > 0) ) { r.children = []; for (var o = 0; o < this.children.length; o++) r.children.push(this.children[o].toJSON(e).object); } if (i) { var a = t(e.geometries), s = t(e.materials), l = t(e.textures), c = t(e.images); a.length > 0 && (n.geometries = a), s.length > 0 && (n.materials = s), l.length > 0 && (n.textures = l), c.length > 0 && (n.images = c); } return (n.object = r), n; }, clone: function (e) { return new this.constructor().copy(this, e); }, copy: function (e, t) { if ( (void 0 === t && (t = !0), (this.name = e.name), this.up.copy(e.up), this.position.copy(e.position), 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.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 === !0) ) for (var i = 0; i < e.children.length; i++) { var n = e.children[i]; this.add(n.clone()); } return this; }, }), (n.Object3DIdCount = 0), (n.Face3 = function (e, t, i, r, o, a) { (this.a = e), (this.b = t), (this.c = i), (this.normal = r instanceof n.Vector3 ? r : new n.Vector3()), (this.vertexNormals = Array.isArray(r) ? r : []), (this.color = o instanceof n.Color ? o : new n.Color()), (this.vertexColors = Array.isArray(o) ? o : []), (this.materialIndex = void 0 !== a ? a : 0); }), (n.Face3.prototype = { constructor: n.Face3, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { (this.a = e.a), (this.b = e.b), (this.c = e.c), this.normal.copy(e.normal), this.color.copy(e.color), (this.materialIndex = e.materialIndex); for (var t = 0, i = e.vertexNormals.length; i > t; t++) this.vertexNormals[t] = e.vertexNormals[t].clone(); for (var t = 0, i = e.vertexColors.length; i > t; t++) this.vertexColors[t] = e.vertexColors[t].clone(); return this; }, }), (n.BufferAttribute = function (e, t, i) { (this.uuid = n.Math.generateUUID()), (this.array = e), (this.itemSize = t), (this.dynamic = !1), (this.updateRange = { offset: 0, count: -1 }), (this.version = 0), (this.normalized = i === !0); }), (n.BufferAttribute.prototype = { constructor: n.BufferAttribute, get count() { return this.array.length / this.itemSize; }, set needsUpdate(e) { e === !0 && this.version++; }, setDynamic: function (e) { return (this.dynamic = e), this; }, copy: function (e) { return (this.array = new e.array.constructor(e.array)), (this.itemSize = e.itemSize), (this.dynamic = e.dynamic), this; }, copyAt: function (e, t, i) { (e *= this.itemSize), (i *= t.itemSize); for (var n = 0, r = this.itemSize; r > n; n++) this.array[e + n] = t.array[i + n]; return this; }, copyArray: function (e) { return this.array.set(e), this; }, copyColorsArray: function (e) { for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) { var a = e[r]; void 0 === a && (console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined", r), (a = new n.Color())), (t[i++] = a.r), (t[i++] = a.g), (t[i++] = a.b); } return this; }, copyIndicesArray: function (e) { for (var t = this.array, i = 0, n = 0, r = e.length; r > n; n++) { var o = e[n]; (t[i++] = o.a), (t[i++] = o.b), (t[i++] = o.c); } return this; }, copyVector2sArray: function (e) { for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) { var a = e[r]; void 0 === a && (console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined", r), (a = new n.Vector2())), (t[i++] = a.x), (t[i++] = a.y); } return this; }, copyVector3sArray: function (e) { for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) { var a = e[r]; void 0 === a && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", r), (a = new n.Vector3())), (t[i++] = a.x), (t[i++] = a.y), (t[i++] = a.z); } return this; }, copyVector4sArray: function (e) { for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) { var a = e[r]; void 0 === a && (console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined", r), (a = new n.Vector4())), (t[i++] = a.x), (t[i++] = a.y), (t[i++] = a.z), (t[i++] = a.w); } return this; }, set: function (e, t) { return void 0 === t && (t = 0), this.array.set(e, t), this; }, getX: function (e) { return this.array[e * this.itemSize]; }, setX: function (e, t) { return (this.array[e * this.itemSize] = t), this; }, getY: function (e) { return this.array[e * this.itemSize + 1]; }, setY: function (e, t) { return (this.array[e * this.itemSize + 1] = t), this; }, getZ: function (e) { return this.array[e * this.itemSize + 2]; }, setZ: function (e, t) { return (this.array[e * this.itemSize + 2] = t), this; }, getW: function (e) { return this.array[e * this.itemSize + 3]; }, setW: function (e, t) { return (this.array[e * this.itemSize + 3] = t), this; }, setXY: function (e, t, i) { return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), this; }, setXYZ: function (e, t, i, n) { return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), (this.array[e + 2] = n), this; }, setXYZW: function (e, t, i, n, r) { return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), (this.array[e + 2] = n), (this.array[e + 3] = r), this; }, clone: function () { return new this.constructor().copy(this); }, }), (n.Int8Attribute = function (e, t) { return new n.BufferAttribute(new Int8Array(e), t); }), (n.Uint8Attribute = function (e, t) { return new n.BufferAttribute(new Uint8Array(e), t); }), (n.Uint8ClampedAttribute = function (e, t) { return new n.BufferAttribute(new Uint8ClampedArray(e), t); }), (n.Int16Attribute = function (e, t) { return new n.BufferAttribute(new Int16Array(e), t); }), (n.Uint16Attribute = function (e, t) { return new n.BufferAttribute(new Uint16Array(e), t); }), (n.Int32Attribute = function (e, t) { return new n.BufferAttribute(new Int32Array(e), t); }), (n.Uint32Attribute = function (e, t) { return new n.BufferAttribute(new Uint32Array(e), t); }), (n.Float32Attribute = function (e, t) { return new n.BufferAttribute(new Float32Array(e), t); }), (n.Float64Attribute = function (e, t) { return new n.BufferAttribute(new Float64Array(e), t); }), (n.DynamicBufferAttribute = function (e, t) { return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."), new n.BufferAttribute(e, t).setDynamic(!0); }), (n.InstancedBufferAttribute = function (e, t, i) { n.BufferAttribute.call(this, e, t), (this.meshPerAttribute = i || 1); }), (n.InstancedBufferAttribute.prototype = Object.create(n.BufferAttribute.prototype)), (n.InstancedBufferAttribute.prototype.constructor = n.InstancedBufferAttribute), (n.InstancedBufferAttribute.prototype.copy = function (e) { return n.BufferAttribute.prototype.copy.call(this, e), (this.meshPerAttribute = e.meshPerAttribute), this; }), (n.InterleavedBuffer = function (e, t) { (this.uuid = n.Math.generateUUID()), (this.array = e), (this.stride = t), (this.dynamic = !1), (this.updateRange = { offset: 0, count: -1 }), (this.version = 0); }), (n.InterleavedBuffer.prototype = { constructor: n.InterleavedBuffer, get length() { return this.array.length; }, get count() { return this.array.length / this.stride; }, set needsUpdate(e) { e === !0 && this.version++; }, setDynamic: function (e) { return (this.dynamic = e), this; }, copy: function (e) { return (this.array = new e.array.constructor(e.array)), (this.stride = e.stride), (this.dynamic = e.dynamic), this; }, copyAt: function (e, t, i) { (e *= this.stride), (i *= t.stride); for (var n = 0, r = this.stride; r > n; n++) this.array[e + n] = t.array[i + n]; return this; }, set: function (e, t) { return void 0 === t && (t = 0), this.array.set(e, t), this; }, clone: function () { return new this.constructor().copy(this); }, }), (n.InstancedInterleavedBuffer = function (e, t, i) { n.InterleavedBuffer.call(this, e, t), (this.meshPerAttribute = i || 1); }), (n.InstancedInterleavedBuffer.prototype = Object.create(n.InterleavedBuffer.prototype)), (n.InstancedInterleavedBuffer.prototype.constructor = n.InstancedInterleavedBuffer), (n.InstancedInterleavedBuffer.prototype.copy = function (e) { return n.InterleavedBuffer.prototype.copy.call(this, e), (this.meshPerAttribute = e.meshPerAttribute), this; }), (n.InterleavedBufferAttribute = function (e, t, i, r) { (this.uuid = n.Math.generateUUID()), (this.data = e), (this.itemSize = t), (this.offset = i), (this.normalized = r === !0); }), (n.InterleavedBufferAttribute.prototype = { constructor: n.InterleavedBufferAttribute, get length() { return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."), this.array.length; }, get count() { return this.data.count; }, get array() { return this.data.array; }, setX: function (e, t) { return (this.data.array[e * this.data.stride + this.offset] = t), this; }, setY: function (e, t) { return (this.data.array[e * this.data.stride + this.offset + 1] = t), this; }, setZ: function (e, t) { return (this.data.array[e * this.data.stride + this.offset + 2] = t), this; }, setW: function (e, t) { return (this.data.array[e * this.data.stride + this.offset + 3] = t), this; }, getX: function (e) { return this.data.array[e * this.data.stride + this.offset]; }, getY: function (e) { return this.data.array[e * this.data.stride + this.offset + 1]; }, getZ: function (e) { return this.data.array[e * this.data.stride + this.offset + 2]; }, getW: function (e) { return this.data.array[e * this.data.stride + this.offset + 3]; }, setXY: function (e, t, i) { return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), this; }, setXYZ: function (e, t, i, n) { return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), (this.data.array[e + 2] = n), this; }, setXYZW: function (e, t, i, n, r) { return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), (this.data.array[e + 2] = n), (this.data.array[e + 3] = r), this; }, }), (n.Geometry = function () { Object.defineProperty(this, "id", { value: n.GeometryIdCount++ }), (this.uuid = n.Math.generateUUID()), (this.name = ""), (this.type = "Geometry"), (this.vertices = []), (this.colors = []), (this.faces = []), (this.faceVertexUvs = [ [] ]), (this.morphTargets = []), (this.morphNormals = []), (this.skinWeights = []), (this.skinIndices = []), (this.lineDistances = []), (this.boundingBox = null), (this.boundingSphere = null), (this.elementsNeedUpdate = !1), (this.verticesNeedUpdate = !1), (this.uvsNeedUpdate = !1), (this.normalsNeedUpdate = !1), (this.colorsNeedUpdate = !1), (this.lineDistancesNeedUpdate = !1), (this.groupsNeedUpdate = !1); }), Object.assign(n.Geometry.prototype, n.EventDispatcher.prototype, { applyMatrix: function (e) { for (var t = new n.Matrix3().getNormalMatrix(e), i = 0, r = this.vertices.length; r > i; i++) { var o = this.vertices[i]; o.applyMatrix4(e); } for (var i = 0, r = this.faces.length; r > i; i++) { var a = this.faces[i]; a.normal.applyMatrix3(t).normalize(); for (var s = 0, l = a.vertexNormals.length; l > s; s++) a.vertexNormals[s].applyMatrix3(t).normalize(); } return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), (this.verticesNeedUpdate = !0), (this.normalsNeedUpdate = !0), this; }, rotateX: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationX(t), this.applyMatrix(e), this; }; })(), rotateY: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationY(t), this.applyMatrix(e), this; }; })(), rotateZ: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationZ(t), this.applyMatrix(e), this; }; })(), translate: (function () { var e; return function (t, i, r) { return void 0 === e && (e = new n.Matrix4()), e.makeTranslation(t, i, r), this.applyMatrix(e), this; }; })(), scale: (function () { var e; return function (t, i, r) { return void 0 === e && (e = new n.Matrix4()), e.makeScale(t, i, r), this.applyMatrix(e), this; }; })(), lookAt: (function () { var e; return function (t) { void 0 === e && (e = new n.Object3D()), e.lookAt(t), e.updateMatrix(), this.applyMatrix(e.matrix); }; })(), fromBufferGeometry: function (e) { function t(e, t, r, o) { var a = void 0 !== s ? [h[e].clone(), h[t].clone(), h[r].clone()] : [], p = void 0 !== l ? [i.colors[e].clone(), i.colors[t].clone(), i.colors[r].clone()] : [], m = new n.Face3(e, t, r, a, p, o); i.faces.push(m), void 0 !== c && i.faceVertexUvs[0].push([d[e].clone(), d[t].clone(), d[r].clone()]), void 0 !== u && i.faceVertexUvs[1].push([f[e].clone(), f[t].clone(), f[r].clone()]); } var i = this, r = null !== e.index ? e.index.array : void 0, o = e.attributes, a = o.position.array, s = void 0 !== o.normal ? o.normal.array : void 0, l = void 0 !== o.color ? o.color.array : void 0, c = void 0 !== o.uv ? o.uv.array : void 0, u = void 0 !== o.uv2 ? o.uv2.array : void 0; void 0 !== u && (this.faceVertexUvs[1] = []); for (var h = [], d = [], f = [], p = 0, m = 0; p < a.length; p += 3, m += 2) i.vertices.push(new n.Vector3(a[p], a[p + 1], a[p + 2])), void 0 !== s && h.push(new n.Vector3(s[p], s[p + 1], s[p + 2])), void 0 !== l && i.colors.push(new n.Color(l[p], l[p + 1], l[p + 2])), void 0 !== c && d.push(new n.Vector2(c[m], c[m + 1])), void 0 !== u && f.push(new n.Vector2(u[m], u[m + 1])); if (void 0 !== r) { var v = e.groups; if (v.length > 0) for (var p = 0; p < v.length; p++) for (var g = v[p], y = g.start, _ = g.count, m = y, b = y + _; b > m; m += 3) t(r[m], r[m + 1], r[m + 2], g.materialIndex); else for (var p = 0; p < r.length; p += 3) t(r[p], r[p + 1], r[p + 2]); } else for (var p = 0; p < a.length / 3; p += 3) t(p, p + 1, p + 2); return this.computeFaceNormals(), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), this; }, center: function () { this.computeBoundingBox(); var e = this.boundingBox.center().negate(); return this.translate(e.x, e.y, e.z), e; }, normalize: function () { this.computeBoundingSphere(); var e = this.boundingSphere.center, t = this.boundingSphere.radius, i = 0 === t ? 1 : 1 / t, r = new n.Matrix4(); return r.set(i, 0, 0, -i * e.x, 0, i, 0, -i * e.y, 0, 0, i, -i * e.z, 0, 0, 0, 1), this.applyMatrix(r), this; }, computeFaceNormals: function () { for (var e = new n.Vector3(), t = new n.Vector3(), i = 0, r = this.faces.length; r > i; i++) { var o = this.faces[i], a = this.vertices[o.a], s = this.vertices[o.b], l = this.vertices[o.c]; e.subVectors(l, s), t.subVectors(a, s), e.cross(t), e.normalize(), o.normal.copy(e); } }, computeVertexNormals: function (e) { void 0 === e && (e = !0); var t, i, r, o, a, s; for (s = new Array(this.vertices.length), t = 0, i = this.vertices.length; i > t; t++) s[t] = new n.Vector3(); if (e) { var l, c, u, h = new n.Vector3(), d = new n.Vector3(); for (r = 0, o = this.faces.length; o > r; r++) (a = this.faces[r]), (l = this.vertices[a.a]), (c = this.vertices[a.b]), (u = this.vertices[a.c]), h.subVectors(u, c), d.subVectors(l, c), h.cross(d), s[a.a].add(h), s[a.b].add(h), s[a.c].add(h); } else for (r = 0, o = this.faces.length; o > r; r++)(a = this.faces[r]), s[a.a].add(a.normal), s[a.b].add(a.normal), s[a.c].add(a.normal); for (t = 0, i = this.vertices.length; i > t; t++) s[t].normalize(); for (r = 0, o = this.faces.length; o > r; r++) { a = this.faces[r]; var f = a.vertexNormals; 3 === f.length ? (f[0].copy(s[a.a]), f[1].copy(s[a.b]), f[2].copy(s[a.c])) : ((f[0] = s[a.a].clone()), (f[1] = s[a.b].clone()), (f[2] = s[a.c].clone())); } this.faces.length > 0 && (this.normalsNeedUpdate = !0); }, computeMorphNormals: function () { var e, t, i, r, o; for (i = 0, r = this.faces.length; r > i; i++) for ( o = this.faces[i], o.__originalFaceNormal ? o.__originalFaceNormal.copy(o.normal) : (o.__originalFaceNormal = o.normal.clone()), o.__originalVertexNormals || (o.__originalVertexNormals = []), e = 0, t = o.vertexNormals.length; t > e; e++ ) o.__originalVertexNormals[e] ? o.__originalVertexNormals[e].copy(o.vertexNormals[e]) : (o.__originalVertexNormals[e] = o.vertexNormals[e].clone()); var a = new n.Geometry(); for (a.faces = this.faces, e = 0, t = this.morphTargets.length; t > e; e++) { if (!this.morphNormals[e]) { (this.morphNormals[e] = {}), (this.morphNormals[e].faceNormals = []), (this.morphNormals[e].vertexNormals = []); var s, l, c = this.morphNormals[e].faceNormals, u = this.morphNormals[e].vertexNormals; for (i = 0, r = this.faces.length; r > i; i++)(s = new n.Vector3()), (l = { a: new n.Vector3(), b: new n.Vector3(), c: new n.Vector3() }), c.push(s), u.push(l); } var h = this.morphNormals[e]; (a.vertices = this.morphTargets[e].vertices), a.computeFaceNormals(), a.computeVertexNormals(); var s, l; for (i = 0, r = this.faces.length; r > i; i++) (o = this.faces[i]), (s = h.faceNormals[i]), (l = h.vertexNormals[i]), s.copy(o.normal), l.a.copy(o.vertexNormals[0]), l.b.copy(o.vertexNormals[1]), l.c.copy(o.vertexNormals[2]); } for (i = 0, r = this.faces.length; r > i; i++)(o = this.faces[i]), (o.normal = o.__originalFaceNormal), (o.vertexNormals = o.__originalVertexNormals); }, computeTangents: function () { console.warn("THREE.Geometry: .computeTangents() has been removed."); }, computeLineDistances: function () { for (var e = 0, t = this.vertices, i = 0, n = t.length; n > i; i++) i > 0 && (e += t[i].distanceTo(t[i - 1])), (this.lineDistances[i] = e); }, computeBoundingBox: function () { null === this.boundingBox && (this.boundingBox = new n.Box3()), this.boundingBox.setFromPoints(this.vertices); }, computeBoundingSphere: function () { null === this.boundingSphere && (this.boundingSphere = new n.Sphere()), this.boundingSphere.setFromPoints(this.vertices); }, merge: function (e, t, i) { if (e instanceof n.Geometry == !1) return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.", e); var r, o = this.vertices.length, a = this.vertices, s = e.vertices, l = this.faces, c = e.faces, u = this.faceVertexUvs[0], h = e.faceVertexUvs[0]; void 0 === i && (i = 0), void 0 !== t && (r = new n.Matrix3().getNormalMatrix(t)); for (var d = 0, f = s.length; f > d; d++) { var p = s[d], m = p.clone(); void 0 !== t && m.applyMatrix4(t), a.push(m); } for (d = 0, f = c.length; f > d; d++) { var v, g, y, _ = c[d], b = _.vertexNormals, x = _.vertexColors; (v = new n.Face3(_.a + o, _.b + o, _.c + o)), v.normal.copy(_.normal), void 0 !== r && v.normal.applyMatrix3(r).normalize(); for (var w = 0, M = b.length; M > w; w++)(g = b[w].clone()), void 0 !== r && g.applyMatrix3(r).normalize(), v.vertexNormals.push(g); v.color.copy(_.color); for (var w = 0, M = x.length; M > w; w++)(y = x[w]), v.vertexColors.push(y.clone()); (v.materialIndex = _.materialIndex + i), l.push(v); } for (d = 0, f = h.length; f > d; d++) { var T = h[d], S = []; if (void 0 !== T) { for (var w = 0, M = T.length; M > w; w++) S.push(T[w].clone()); u.push(S); } } }, mergeMesh: function (e) { return e instanceof n.Mesh == !1 ? void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.", e) : (e.matrixAutoUpdate && e.updateMatrix(), void this.merge(e.geometry, e.matrix)); }, mergeVertices: function () { var e, t, i, n, r, o, a, s, l = {}, c = [], u = [], h = 4, d = Math.pow(10, h); for (i = 0, n = this.vertices.length; n > i; i++) (e = this.vertices[i]), (t = Math.round(e.x * d) + "_" + Math.round(e.y * d) + "_" + Math.round(e.z * d)), void 0 === l[t] ? ((l[t] = i), c.push(this.vertices[i]), (u[i] = c.length - 1)) : (u[i] = u[l[t]]); var f = []; for (i = 0, n = this.faces.length; n > i; i++) { (r = this.faces[i]), (r.a = u[r.a]), (r.b = u[r.b]), (r.c = u[r.c]), (o = [r.a, r.b, r.c]); for (var p = -1, m = 0; 3 > m; m++) if (o[m] === o[(m + 1) % 3]) { (p = m), f.push(i); break; } } for (i = f.length - 1; i >= 0; i--) { var v = f[i]; for (this.faces.splice(v, 1), a = 0, s = this.faceVertexUvs.length; s > a; a++) this.faceVertexUvs[a].splice(v, 1); } var g = this.vertices.length - c.length; return (this.vertices = c), g; }, sortFacesByMaterialIndex: function () { function e(e, t) { return e.materialIndex - t.materialIndex; } for (var t = this.faces, i = t.length, n = 0; i > n; n++) t[n]._id = n; t.sort(e); var r, o, a = this.faceVertexUvs[0], s = this.faceVertexUvs[1]; a && a.length === i && (r = []), s && s.length === i && (o = []); for (var n = 0; i > n; n++) { var l = t[n]._id; r && r.push(a[l]), o && o.push(s[l]); } r && (this.faceVertexUvs[0] = r), o && (this.faceVertexUvs[1] = o); }, toJSON: function () { function e(e, t, i) { return i ? e | (1 << t) : e & ~(1 << t); } function t(e) { var t = e.x.toString() + e.y.toString() + e.z.toString(); return void 0 !== d[t] ? d[t] : ((d[t] = h.length / 3), h.push(e.x, e.y, e.z), d[t]); } function i(e) { var t = e.r.toString() + e.g.toString() + e.b.toString(); return void 0 !== p[t] ? p[t] : ((p[t] = f.length), f.push(e.getHex()), p[t]); } function n(e) { var t = e.x.toString() + e.y.toString(); return void 0 !== v[t] ? v[t] : ((v[t] = m.length / 2), m.push(e.x, e.y), v[t]); } var r = { metadata: { version: 4.4, type: "Geometry", generator: "Geometry.toJSON" } }; if (((r.uuid = this.uuid), (r.type = this.type), "" !== this.name && (r.name = this.name), void 0 !== this.parameters)) { var o = this.parameters; for (var a in o) void 0 !== o[a] && (r[a] = o[a]); return r; } for (var s = [], l = 0; l < this.vertices.length; l++) { var c = this.vertices[l]; s.push(c.x, c.y, c.z); } for (var u = [], h = [], d = {}, f = [], p = {}, m = [], v = {}, l = 0; l < this.faces.length; l++) { var g = this.faces[l], y = !0, _ = !1, b = void 0 !== this.faceVertexUvs[0][l], x = g.normal.length() > 0, w = g.vertexNormals.length > 0, M = 1 !== g.color.r || 1 !== g.color.g || 1 !== g.color.b, T = g.vertexColors.length > 0, S = 0; if ( ((S = e(S, 0, 0)), (S = e(S, 1, y)), (S = e(S, 2, _)), (S = e(S, 3, b)), (S = e(S, 4, x)), (S = e(S, 5, w)), (S = e(S, 6, M)), (S = e(S, 7, T)), u.push(S), u.push(g.a, g.b, g.c), u.push(g.materialIndex), b) ) { var E = this.faceVertexUvs[0][l]; u.push(n(E[0]), n(E[1]), n(E[2])); } if ((x && u.push(t(g.normal)), w)) { var A = g.vertexNormals; u.push(t(A[0]), t(A[1]), t(A[2])); } if ((M && u.push(i(g.color)), T)) { var C = g.vertexColors; u.push(i(C[0]), i(C[1]), i(C[2])); } } return (r.data = {}), (r.data.vertices = s), (r.data.normals = h), f.length > 0 && (r.data.colors = f), m.length > 0 && (r.data.uvs = [m]), (r.data.faces = u), r; }, clone: function () { return new n.Geometry().copy(this); }, copy: function (e) { (this.vertices = []), (this.faces = []), (this.faceVertexUvs = [ [] ]); for (var t = e.vertices, i = 0, n = t.length; n > i; i++) this.vertices.push(t[i].clone()); for (var r = e.faces, i = 0, n = r.length; n > i; i++) this.faces.push(r[i].clone()); for (var i = 0, n = e.faceVertexUvs.length; n > i; i++) { var o = e.faceVertexUvs[i]; void 0 === this.faceVertexUvs[i] && (this.faceVertexUvs[i] = []); for (var a = 0, s = o.length; s > a; a++) { for (var l = o[a], c = [], u = 0, h = l.length; h > u; u++) { var d = l[u]; c.push(d.clone()); } this.faceVertexUvs[i].push(c); } } return this; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); }, }), (n.GeometryIdCount = 0), (n.DirectGeometry = function () { Object.defineProperty(this, "id", { value: n.GeometryIdCount++ }), (this.uuid = n.Math.generateUUID()), (this.name = ""), (this.type = "DirectGeometry"), (this.indices = []), (this.vertices = []), (this.normals = []), (this.colors = []), (this.uvs = []), (this.uvs2 = []), (this.groups = []), (this.morphTargets = {}), (this.skinWeights = []), (this.skinIndices = []), (this.boundingBox = null), (this.boundingSphere = null), (this.verticesNeedUpdate = !1), (this.normalsNeedUpdate = !1), (this.colorsNeedUpdate = !1), (this.uvsNeedUpdate = !1), (this.groupsNeedUpdate = !1); }), Object.assign(n.DirectGeometry.prototype, n.EventDispatcher.prototype, { computeBoundingBox: n.Geometry.prototype.computeBoundingBox, computeBoundingSphere: n.Geometry.prototype.computeBoundingSphere, computeFaceNormals: function () { console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry."); }, computeVertexNormals: function () { console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry."); }, computeGroups: function (e) { for (var t, i, n = [], r = e.faces, o = 0; o < r.length; o++) { var a = r[o]; a.materialIndex !== i && ((i = a.materialIndex), void 0 !== t && ((t.count = 3 * o - t.start), n.push(t)), (t = { start: 3 * o, materialIndex: i })); } void 0 !== t && ((t.count = 3 * o - t.start), n.push(t)), (this.groups = n); }, fromGeometry: function (e) { var t, i = e.faces, r = e.vertices, o = e.faceVertexUvs, a = o[0] && o[0].length > 0, s = o[1] && o[1].length > 0, l = e.morphTargets, c = l.length; if (c > 0) { t = []; for (var u = 0; c > u; u++) t[u] = []; this.morphTargets.position = t; } var h, d = e.morphNormals, f = d.length; if (f > 0) { h = []; for (var u = 0; f > u; u++) h[u] = []; this.morphTargets.normal = h; } for (var p = e.skinIndices, m = e.skinWeights, v = p.length === r.length, g = m.length === r.length, u = 0; u < i.length; u++) { var y = i[u]; this.vertices.push(r[y.a], r[y.b], r[y.c]); var _ = y.vertexNormals; if (3 === _.length) this.normals.push(_[0], _[1], _[2]); else { var b = y.normal; this.normals.push(b, b, b); } var x = y.vertexColors; if (3 === x.length) this.colors.push(x[0], x[1], x[2]); else { var w = y.color; this.colors.push(w, w, w); } if (a === !0) { var M = o[0][u]; void 0 !== M ? this.uvs.push(M[0], M[1], M[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", u), this.uvs.push(new n.Vector2(), new n.Vector2(), new n.Vector2())); } if (s === !0) { var M = o[1][u]; void 0 !== M ? this.uvs2.push(M[0], M[1], M[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", u), this.uvs2.push(new n.Vector2(), new n.Vector2(), new n.Vector2())); } for (var T = 0; c > T; T++) { var S = l[T].vertices; t[T].push(S[y.a], S[y.b], S[y.c]); } for (var T = 0; f > T; T++) { var E = d[T].vertexNormals[u]; h[T].push(E.a, E.b, E.c); } v && this.skinIndices.push(p[y.a], p[y.b], p[y.c]), g && this.skinWeights.push(m[y.a], m[y.b], m[y.c]); } return ( this.computeGroups(e), (this.verticesNeedUpdate = e.verticesNeedUpdate), (this.normalsNeedUpdate = e.normalsNeedUpdate), (this.colorsNeedUpdate = e.colorsNeedUpdate), (this.uvsNeedUpdate = e.uvsNeedUpdate), (this.groupsNeedUpdate = e.groupsNeedUpdate), this ); }, dispose: function () { this.dispatchEvent({ type: "dispose" }); }, }), (n.BufferGeometry = function () { Object.defineProperty(this, "id", { value: n.GeometryIdCount++ }), (this.uuid = n.Math.generateUUID()), (this.name = ""), (this.type = "BufferGeometry"), (this.index = null), (this.attributes = {}), (this.morphAttributes = {}), (this.groups = []), (this.boundingBox = null), (this.boundingSphere = null), (this.drawRange = { start: 0, count: 1 / 0 }); }), Object.assign(n.BufferGeometry.prototype, n.EventDispatcher.prototype, { getIndex: function () { return this.index; }, setIndex: function (e) { this.index = e; }, addAttribute: function (e, t) { return t instanceof n.BufferAttribute == !1 && t instanceof n.InterleavedBufferAttribute == !1 ? (console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."), void this.addAttribute(e, new n.BufferAttribute(arguments[1], arguments[2]))) : "index" === e ? (console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."), void this.setIndex(t)) : ((this.attributes[e] = t), this); }, getAttribute: function (e) { return this.attributes[e]; }, removeAttribute: function (e) { return delete this.attributes[e], this; }, addGroup: function (e, t, i) { this.groups.push({ start: e, count: t, materialIndex: void 0 !== i ? i : 0 }); }, clearGroups: function () { this.groups = []; }, setDrawRange: function (e, t) { (this.drawRange.start = e), (this.drawRange.count = t); }, applyMatrix: function (e) { var t = this.attributes.position; void 0 !== t && (e.applyToVector3Array(t.array), (t.needsUpdate = !0)); var i = this.attributes.normal; if (void 0 !== i) { var r = new n.Matrix3().getNormalMatrix(e); r.applyToVector3Array(i.array), (i.needsUpdate = !0); } return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this; }, rotateX: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationX(t), this.applyMatrix(e), this; }; })(), rotateY: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationY(t), this.applyMatrix(e), this; }; })(), rotateZ: (function () { var e; return function (t) { return void 0 === e && (e = new n.Matrix4()), e.makeRotationZ(t), this.applyMatrix(e), this; }; })(), translate: (function () { var e; return function (t, i, r) { return void 0 === e && (e = new n.Matrix4()), e.makeTranslation(t, i, r), this.applyMatrix(e), this; }; })(), scale: (function () { var e; return function (t, i, r) { return void 0 === e && (e = new n.Matrix4()), e.makeScale(t, i, r), this.applyMatrix(e), this; }; })(), lookAt: (function () { var e; return function (t) { void 0 === e && (e = new n.Object3D()), e.lookAt(t), e.updateMatrix(), this.applyMatrix(e.matrix); }; })(), center: function () { this.computeBoundingBox(); var e = this.boundingBox.center().negate(); return this.translate(e.x, e.y, e.z), e; }, setFromObject: function (e) { var t = e.geometry; if (e instanceof n.Points || e instanceof n.Line) { var i = new n.Float32Attribute(3 * t.vertices.length, 3), r = new n.Float32Attribute(3 * t.colors.length, 3); if ((this.addAttribute("position", i.copyVector3sArray(t.vertices)), this.addAttribute("color", r.copyColorsArray(t.colors)), t.lineDistances && t.lineDistances.length === t.vertices.length)) { var o = new n.Float32Attribute(t.lineDistances.length, 1); this.addAttribute("lineDistance", o.copyArray(t.lineDistances)); } null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone()); } else e instanceof n.Mesh && t instanceof n.Geometry && this.fromGeometry(t); return this; }, updateFromObject: function (e) { var t = e.geometry; if (e instanceof n.Mesh) { var i = t.__directGeometry; if (void 0 === i || t.elementsNeedUpdate === !0) return this.fromGeometry(t); (i.verticesNeedUpdate = t.verticesNeedUpdate || t.elementsNeedUpdate), (i.normalsNeedUpdate = t.normalsNeedUpdate || t.elementsNeedUpdate), (i.colorsNeedUpdate = t.colorsNeedUpdate || t.elementsNeedUpdate), (i.uvsNeedUpdate = t.uvsNeedUpdate || t.elementsNeedUpdate), (i.groupsNeedUpdate = t.groupsNeedUpdate || t.elementsNeedUpdate), (t.elementsNeedUpdate = !1), (t.verticesNeedUpdate = !1), (t.normalsNeedUpdate = !1), (t.colorsNeedUpdate = !1), (t.uvsNeedUpdate = !1), (t.groupsNeedUpdate = !1), (t = i); } var r; return ( t.verticesNeedUpdate === !0 && ((r = this.attributes.position), void 0 !== r && (r.copyVector3sArray(t.vertices), (r.needsUpdate = !0)), (t.verticesNeedUpdate = !1)), t.normalsNeedUpdate === !0 && ((r = this.attributes.normal), void 0 !== r && (r.copyVector3sArray(t.normals), (r.needsUpdate = !0)), (t.normalsNeedUpdate = !1)), t.colorsNeedUpdate === !0 && ((r = this.attributes.color), void 0 !== r && (r.copyColorsArray(t.colors), (r.needsUpdate = !0)), (t.colorsNeedUpdate = !1)), t.uvsNeedUpdate && ((r = this.attributes.uv), void 0 !== r && (r.copyVector2sArray(t.uvs), (r.needsUpdate = !0)), (t.uvsNeedUpdate = !1)), t.lineDistancesNeedUpdate && ((r = this.attributes.lineDistance), void 0 !== r && (r.copyArray(t.lineDistances), (r.needsUpdate = !0)), (t.lineDistancesNeedUpdate = !1)), t.groupsNeedUpdate && (t.computeGroups(e.geometry), (this.groups = t.groups), (t.groupsNeedUpdate = !1)), this ); }, fromGeometry: function (e) { return (e.__directGeometry = new n.DirectGeometry().fromGeometry(e)), this.fromDirectGeometry(e.__directGeometry); }, fromDirectGeometry: function (e) { var t = new Float32Array(3 * e.vertices.length); if ((this.addAttribute("position", new n.BufferAttribute(t, 3).copyVector3sArray(e.vertices)), e.normals.length > 0)) { var i = new Float32Array(3 * e.normals.length); this.addAttribute("normal", new n.BufferAttribute(i, 3).copyVector3sArray(e.normals)); } if (e.colors.length > 0) { var r = new Float32Array(3 * e.colors.length); this.addAttribute("color", new n.BufferAttribute(r, 3).copyColorsArray(e.colors)); } if (e.uvs.length > 0) { var o = new Float32Array(2 * e.uvs.length); this.addAttribute("uv", new n.BufferAttribute(o, 2).copyVector2sArray(e.uvs)); } if (e.uvs2.length > 0) { var a = new Float32Array(2 * e.uvs2.length); this.addAttribute("uv2", new n.BufferAttribute(a, 2).copyVector2sArray(e.uvs2)); } if (e.indices.length > 0) { var s = e.vertices.length > 65535 ? Uint32Array : Uint16Array, l = new s(3 * e.indices.length); this.setIndex(new n.BufferAttribute(l, 1).copyIndicesArray(e.indices)); } this.groups = e.groups; for (var c in e.morphTargets) { for (var u = [], h = e.morphTargets[c], d = 0, f = h.length; f > d; d++) { var p = h[d], m = new n.Float32Attribute(3 * p.length, 3); u.push(m.copyVector3sArray(p)); } this.morphAttributes[c] = u; } if (e.skinIndices.length > 0) { var v = new n.Float32Attribute(4 * e.skinIndices.length, 4); this.addAttribute("skinIndex", v.copyVector4sArray(e.skinIndices)); } if (e.skinWeights.length > 0) { var g = new n.Float32Attribute(4 * e.skinWeights.length, 4); this.addAttribute("skinWeight", g.copyVector4sArray(e.skinWeights)); } return null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), this; }, computeBoundingBox: function () { null === this.boundingBox && (this.boundingBox = new n.Box3()); var e = this.attributes.position.array; void 0 !== e ? this.boundingBox.setFromArray(e) : 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: (function () { var e = new n.Box3(), t = new n.Vector3(); return function () { null === this.boundingSphere && (this.boundingSphere = new n.Sphere()); var i = this.attributes.position; if (i) { var r = i.array, o = this.boundingSphere.center; e.setFromArray(r), e.center(o); for (var a = 0, s = 0, l = r.length; l > s; s += 3) t.fromArray(r, s), (a = Math.max(a, o.distanceToSquared(t))); (this.boundingSphere.radius = Math.sqrt(a)), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this); } }; })(), computeFaceNormals: function () {}, computeVertexNormals: function () { var e = this.index, t = this.attributes, i = this.groups; if (t.position) { var r = t.position.array; if (void 0 === t.normal) this.addAttribute("normal", new n.BufferAttribute(new Float32Array(r.length), 3)); else for (var o = t.normal.array, a = 0, s = o.length; s > a; a++) o[a] = 0; var l, c, u, h = t.normal.array, d = new n.Vector3(), f = new n.Vector3(), p = new n.Vector3(), m = new n.Vector3(), v = new n.Vector3(); if (e) { var g = e.array; 0 === i.length && this.addGroup(0, g.length); for (var y = 0, _ = i.length; _ > y; ++y) for (var b = i[y], x = b.start, w = b.count, a = x, s = x + w; s > a; a += 3) (l = 3 * g[a + 0]), (c = 3 * g[a + 1]), (u = 3 * g[a + 2]), d.fromArray(r, l), f.fromArray(r, c), p.fromArray(r, u), m.subVectors(p, f), v.subVectors(d, f), m.cross(v), (h[l] += m.x), (h[l + 1] += m.y), (h[l + 2] += m.z), (h[c] += m.x), (h[c + 1] += m.y), (h[c + 2] += m.z), (h[u] += m.x), (h[u + 1] += m.y), (h[u + 2] += m.z); } else for (var a = 0, s = r.length; s > a; a += 9) d.fromArray(r, a), f.fromArray(r, a + 3), p.fromArray(r, a + 6), m.subVectors(p, f), v.subVectors(d, f), m.cross(v), (h[a] = m.x), (h[a + 1] = m.y), (h[a + 2] = m.z), (h[a + 3] = m.x), (h[a + 4] = m.y), (h[a + 5] = m.z), (h[a + 6] = m.x), (h[a + 7] = m.y), (h[a + 8] = m.z); this.normalizeNormals(), (t.normal.needsUpdate = !0); } }, merge: function (e, t) { if (e instanceof n.BufferGeometry == !1) return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.", e); void 0 === t && (t = 0); var i = this.attributes; for (var r in i) if (void 0 !== e.attributes[r]) for (var o = i[r], a = o.array, s = e.attributes[r], l = s.array, c = s.itemSize, u = 0, h = c * t; u < l.length; u++, h++) a[h] = l[u]; return this; }, normalizeNormals: function () { for (var e, t, i, n, r = this.attributes.normal.array, o = 0, a = r.length; a > o; o += 3) (e = r[o]), (t = r[o + 1]), (i = r[o + 2]), (n = 1 / Math.sqrt(e * e + t * t + i * i)), (r[o] *= n), (r[o + 1] *= n), (r[o + 2] *= n); }, toNonIndexed: function () { if (null === this.index) return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."), this; var e = new n.BufferGeometry(), t = this.index.array, i = this.attributes; for (var r in i) { for (var o = i[r], a = o.array, s = o.itemSize, l = new a.constructor(t.length * s), c = 0, u = 0, h = 0, d = t.length; d > h; h++) { c = t[h] * s; for (var f = 0; s > f; f++) l[u++] = a[c++]; } e.addAttribute(r, new n.BufferAttribute(l, s)); } return e; }, toJSON: function () { var e = { metadata: { version: 4.4, type: "BufferGeometry", generator: "BufferGeometry.toJSON" } }; if (((e.uuid = this.uuid), (e.type = this.type), "" !== this.name && (e.name = this.name), void 0 !== this.parameters)) { var t = this.parameters; for (var i in t) void 0 !== t[i] && (e[i] = t[i]); return e; } e.data = { attributes: {} }; var n = this.index; if (null !== n) { var r = Array.prototype.slice.call(n.array); e.data.index = { type: n.array.constructor.name, array: r }; } var o = this.attributes; for (var i in o) { var a = o[i], r = Array.prototype.slice.call(a.array); e.data.attributes[i] = { itemSize: a.itemSize, type: a.array.constructor.name, array: r, normalized: a.normalized }; } var s = this.groups; s.length > 0 && (e.data.groups = JSON.parse(JSON.stringify(s))); var l = this.boundingSphere; return null !== l && (e.data.boundingSphere = { center: l.center.toArray(), radius: l.radius }), e; }, clone: function () { return new n.BufferGeometry().copy(this); }, copy: function (e) { var t = e.index; null !== t && this.setIndex(t.clone()); var i = e.attributes; for (var n in i) { var r = i[n]; this.addAttribute(n, r.clone()); } for (var o = e.groups, a = 0, s = o.length; s > a; a++) { var l = o[a]; this.addGroup(l.start, l.count, l.materialIndex); } return this; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); }, }), (n.BufferGeometry.MaxIndex = 65535), (n.InstancedBufferGeometry = function () { n.BufferGeometry.call(this), (this.type = "InstancedBufferGeometry"), (this.maxInstancedCount = void 0); }), (n.InstancedBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.InstancedBufferGeometry.prototype.constructor = n.InstancedBufferGeometry), (n.InstancedBufferGeometry.prototype.addGroup = function (e, t, i) { this.groups.push({ start: e, count: t, instances: i }); }), (n.InstancedBufferGeometry.prototype.copy = function (e) { var t = e.index; null !== t && this.setIndex(t.clone()); var i = e.attributes; for (var n in i) { var r = i[n]; this.addAttribute(n, r.clone()); } for (var o = e.groups, a = 0, s = o.length; s > a; a++) { var l = o[a]; this.addGroup(l.start, l.count, l.instances); } return this; }), (n.Uniform = function (e) { "string" == typeof e && (console.warn("THREE.Uniform: Type parameter is no longer needed."), (e = arguments[1])), (this.value = e), (this.dynamic = !1); }), (n.Uniform.prototype = { constructor: n.Uniform, onUpdate: function (e) { return (this.dynamic = !0), (this.onUpdateCallback = e), this; }, }), (n.AnimationAction = function () { throw new Error("THREE.AnimationAction: Use mixer.clipAction for construction."); }), (n.AnimationAction._new = function (e, t, i) { (this._mixer = e), (this._clip = t), (this._localRoot = i || null); for (var r = t.tracks, o = r.length, a = new Array(o), s = { endingStart: n.ZeroCurvatureEnding, endingEnd: n.ZeroCurvatureEnding }, l = 0; l !== o; ++l) { var c = r[l].createInterpolant(null); (a[l] = c), (c.settings = s); } (this._interpolantSettings = s), (this._interpolants = a), (this._propertyBindings = new Array(o)), (this._cacheIndex = null), (this._byClipCacheIndex = null), (this._timeScaleInterpolant = null), (this._weightInterpolant = null), (this.loop = n.LoopRepeat), (this._loopCount = -1), (this._startTime = null), (this.time = 0), (this.timeScale = 1), (this._effectiveTimeScale = 1), (this.weight = 1), (this._effectiveWeight = 1), (this.repetitions = 1 / 0), (this.paused = !1), (this.enabled = !0), (this.clampWhenFinished = !1), (this.zeroSlopeAtStart = !0), (this.zeroSlopeAtEnd = !0); }), (n.AnimationAction._new.prototype = { constructor: n.AnimationAction._new, play: function () { return this._mixer._activateAction(this), this; }, stop: function () { return this._mixer._deactivateAction(this), this.reset(); }, reset: function () { return (this.paused = !1), (this.enabled = !0), (this.time = 0), (this._loopCount = -1), (this._startTime = null), this.stopFading().stopWarping(); }, isRunning: function () { this._startTime; return this.enabled && !this.paused && 0 !== this.timeScale && null === this._startTime && this._mixer._isActiveAction(this); }, isScheduled: function () { return this._mixer._isActiveAction(this); }, startAt: function (e) { return (this._startTime = e), this; }, setLoop: function (e, t) { return (this.loop = e), (this.repetitions = t), this; }, setEffectiveWeight: function (e) { return (this.weight = e), (this._effectiveWeight = this.enabled ? e : 0), this.stopFading(); }, getEffectiveWeight: function () { return this._effectiveWeight; }, fadeIn: function (e) { return this._scheduleFading(e, 0, 1); }, fadeOut: function (e) { return this._scheduleFading(e, 1, 0); }, crossFadeFrom: function (e, t, i) { this._mixer; if ((e.fadeOut(t), this.fadeIn(t), i)) { var n = this._clip.duration, r = e._clip.duration, o = r / n, a = n / r; e.warp(1, o, t), this.warp(a, 1, t); } return this; }, crossFadeTo: function (e, t, i) { return e.crossFadeFrom(this, t, i); }, stopFading: function () { var e = this._weightInterpolant; return null !== e && ((this._weightInterpolant = null), this._mixer._takeBackControlInterpolant(e)), this; }, setEffectiveTimeScale: function (e) { return (this.timeScale = e), (this._effectiveTimeScale = this.paused ? 0 : e), this.stopWarping(); }, getEffectiveTimeScale: function () { return this._effectiveTimeScale; }, setDuration: function (e) { return (this.timeScale = this._clip.duration / e), this.stopWarping(); }, syncWith: function (e) { return (this.time = e.time), (this.timeScale = e.timeScale), this.stopWarping(); }, halt: function (e) { return this.warp(this._effectiveTimeScale, 0, e); }, warp: function (e, t, i) { var n = this._mixer, r = n.time, o = this._timeScaleInterpolant, a = this.timeScale; null === o && ((o = n._lendControlInterpolant()), (this._timeScaleInterpolant = o)); var s = o.parameterPositions, l = o.sampleValues; return (s[0] = r), (s[1] = r + i), (l[0] = e / a), (l[1] = t / a), this; }, stopWarping: function () { var e = this._timeScaleInterpolant; return null !== e && ((this._timeScaleInterpolant = null), this._mixer._takeBackControlInterpolant(e)), this; }, getMixer: function () { return this._mixer; }, getClip: function () { return this._clip; }, getRoot: function () { return this._localRoot || this._mixer._root; }, _update: function (e, t, i, n) { var r = this._startTime; if (null !== r) { var o = (e - r) * i; if (0 > o || 0 === i) return; (this._startTime = null), (t = i * o); } t *= this._updateTimeScale(e); var a = this._updateTime(t), s = this._updateWeight(e); if (s > 0) for (var l = this._interpolants, c = this._propertyBindings, u = 0, h = l.length; u !== h; ++u) l[u].evaluate(a), c[u].accumulate(n, s); }, _updateWeight: function (e) { var t = 0; if (this.enabled) { t = this.weight; var i = this._weightInterpolant; if (null !== i) { var n = i.evaluate(e)[0]; (t *= n), e > i.parameterPositions[1] && (this.stopFading(), 0 === n && (this.enabled = !1)); } } return (this._effectiveWeight = t), t; }, _updateTimeScale: function (e) { var t = 0; if (!this.paused) { t = this.timeScale; var i = this._timeScaleInterpolant; if (null !== i) { var n = i.evaluate(e)[0]; (t *= n), e > i.parameterPositions[1] && (this.stopWarping(), 0 === t ? (this.paused = !0) : (this.timeScale = t)); } } return (this._effectiveTimeScale = t), t; }, _updateTime: function (e) { var t = this.time + e; if (0 === e) return t; var i = this._clip.duration, r = this.loop, o = this._loopCount; if (r === n.LoopOnce) { -1 === o && ((this.loopCount = 0), this._setEndings(!0, !0, !1)); e: { if (t >= i) t = i; else { if (!(0 > t)) break e; t = 0; } this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1), this._mixer.dispatchEvent({ type: "finished", action: this, direction: 0 > e ? -1 : 1 }); } } else { var a = r === n.LoopPingPong; if ((-1 === o && (e >= 0 ? ((o = 0), this._setEndings(!0, 0 === this.repetitions, a)) : this._setEndings(0 === this.repetitions, !0, a)), t >= i || 0 > t)) { var s = Math.floor(t / i); (t -= i * s), (o += Math.abs(s)); var l = this.repetitions - o; if (0 > l) this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1), (t = e > 0 ? i : 0), this._mixer.dispatchEvent({ type: "finished", action: this, direction: e > 0 ? 1 : -1 }); else { if (0 === l) { var c = 0 > e; this._setEndings(c, !c, a); } else this._setEndings(!1, !1, a); (this._loopCount = o), this._mixer.dispatchEvent({ type: "loop", action: this, loopDelta: s }); } } if (a && 1 === (1 & o)) return (this.time = t), i - t; } return (this.time = t), t; }, _setEndings: function (e, t, i) { var r = this._interpolantSettings; i ? ((r.endingStart = n.ZeroSlopeEnding), (r.endingEnd = n.ZeroSlopeEnding)) : (e ? (r.endingStart = this.zeroSlopeAtStart ? n.ZeroSlopeEnding : n.ZeroCurvatureEnding) : (r.endingStart = n.WrapAroundEnding), t ? (r.endingEnd = this.zeroSlopeAtEnd ? n.ZeroSlopeEnding : n.ZeroCurvatureEnding) : (r.endingEnd = n.WrapAroundEnding)); }, _scheduleFading: function (e, t, i) { var n = this._mixer, r = n.time, o = this._weightInterpolant; null === o && ((o = n._lendControlInterpolant()), (this._weightInterpolant = o)); var a = o.parameterPositions, s = o.sampleValues; return (a[0] = r), (s[0] = t), (a[1] = r + e), (s[1] = i), this; }, }), (n.AnimationClip = function (e, t, i) { (this.name = e), (this.tracks = i), (this.duration = void 0 !== t ? t : -1), (this.uuid = n.Math.generateUUID()), this.duration < 0 && this.resetDuration(), this.trim(), this.optimize(); }), (n.AnimationClip.prototype = { constructor: n.AnimationClip, resetDuration: function () { for (var e = this.tracks, t = 0, i = 0, n = e.length; i !== n; ++i) { var r = this.tracks[i]; t = Math.max(t, r.times[r.times.length - 1]); } this.duration = t; }, trim: function () { for (var e = 0; e < this.tracks.length; e++) this.tracks[e].trim(0, this.duration); return this; }, optimize: function () { for (var e = 0; e < this.tracks.length; e++) this.tracks[e].optimize(); return this; }, }), Object.assign(n.AnimationClip, { parse: function (e) { for (var t = [], i = e.tracks, r = 1 / (e.fps || 1), o = 0, a = i.length; o !== a; ++o) t.push(n.KeyframeTrack.parse(i[o]).scale(r)); return new n.AnimationClip(e.name, e.duration, t); }, toJSON: function (e) { for (var t = [], i = e.tracks, r = { name: e.name, duration: e.duration, tracks: t }, o = 0, a = i.length; o !== a; ++o) t.push(n.KeyframeTrack.toJSON(i[o])); return r; }, CreateFromMorphTargetSequence: function (e, t, i, r) { for (var o = t.length, a = [], s = 0; o > s; s++) { var l = [], c = []; l.push((s + o - 1) % o, s, (s + 1) % o), c.push(0, 1, 0); var u = n.AnimationUtils.getKeyframeOrder(l); (l = n.AnimationUtils.sortedArray(l, 1, u)), (c = n.AnimationUtils.sortedArray(c, 1, u)), r || 0 !== l[0] || (l.push(o), c.push(c[0])), a.push(new n.NumberKeyframeTrack(".morphTargetInfluences[" + t[s].name + "]", l, c).scale(1 / i)); } return new n.AnimationClip(e, -1, a); }, findByName: function (e, t) { var i = e; if (!Array.isArray(e)) { var n = e; i = (n.geometry && n.geometry.animations) || n.animations; } for (var r = 0; r < i.length; r++) if (i[r].name === t) return i[r]; return null; }, CreateClipsFromMorphTargetSequences: function (e, t, i) { for (var r = {}, o = /^([w-]*?)([d]+)$/, a = 0, s = e.length; s > a; a++) { var l = e[a], c = l.name.match(o); if (c && c.length > 1) { var u = c[1], h = r[u]; h || (r[u] = h = []), h.push(l); } } var d = []; for (var u in r) d.push(n.AnimationClip.CreateFromMorphTargetSequence(u, r[u], t, i)); return d; }, parseAnimation: function (e, t, i) { if (!e) return console.error(" no animation in JSONLoader data"), null; for ( var r = function (e, t, i, r, o) { if (0 !== i.length) { var a = [], s = []; n.AnimationUtils.flattenJSON(i, a, s, r), 0 !== a.length && o.push(new e(t, a, s)); } }, o = [], a = e.name || "default", s = e.length || -1, l = e.fps || 30, c = e.hierarchy || [], u = 0; u < c.length; u++ ) { var h = c[u].keys; if (h && 0 !== h.length) if (h[0].morphTargets) { for (var d = {}, f = 0; f < h.length; f++) if (h[f].morphTargets) for (var p = 0; p < h[f].morphTargets.length; p++) d[h[f].morphTargets[p]] = -1; for (var m in d) { for (var v = [], g = [], p = 0; p !== h[f].morphTargets.length; ++p) { var y = h[f]; v.push(y.time), g.push(y.morphTarget === m ? 1 : 0); } o.push(new n.NumberKeyframeTrack(".morphTargetInfluence[" + m + "]", v, g)); } s = d.length * (l || 1); } else { var _ = ".bones[" + t[u].name + "]"; r(n.VectorKeyframeTrack, _ + ".position", h, "pos", o), r(n.QuaternionKeyframeTrack, _ + ".quaternion", h, "rot", o), r(n.VectorKeyframeTrack, _ + ".scale", h, "scl", o); } } if (0 === o.length) return null; var b = new n.AnimationClip(a, s, o); return b; }, }), (n.AnimationMixer = function (e) { (this._root = e), this._initMemoryManager(), (this._accuIndex = 0), (this.time = 0), (this.timeScale = 1); }), Object.assign(n.AnimationMixer.prototype, n.EventDispatcher.prototype, { clipAction: function (e, t) { var i = t || this._root, r = i.uuid, o = "string" == typeof e ? n.AnimationClip.findByName(i, e) : e, a = null !== o ? o.uuid : e, s = this._actionsByClip[a], l = null; if (void 0 !== s) { var c = s.actionByRoot[r]; if (void 0 !== c) return c; (l = s.knownActions[0]), null === o && (o = l._clip); } if (null === o) return null; var u = new n.AnimationMixer._Action(this, o, t); return this._bindAction(u, l), this._addInactiveAction(u, a, r), u; }, existingAction: function (e, t) { var i = t || this._root, r = i.uuid, o = "string" == typeof e ? n.AnimationClip.findByName(i, e) : e, a = o ? o.uuid : e, s = this._actionsByClip[a]; return void 0 !== s ? s.actionByRoot[r] || null : null; }, stopAllAction: function () { var e = this._actions, t = this._nActiveActions, i = this._bindings, n = this._nActiveBindings; (this._nActiveActions = 0), (this._nActiveBindings = 0); for (var r = 0; r !== t; ++r) e[r].reset(); for (var r = 0; r !== n; ++r) i[r].useCount = 0; return this; }, update: function (e) { e *= this.timeScale; for (var t = this._actions, i = this._nActiveActions, n = (this.time += e), r = Math.sign(e), o = (this._accuIndex ^= 1), a = 0; a !== i; ++a) { var s = t[a]; s.enabled && s._update(n, e, r, o); } for (var l = this._bindings, c = this._nActiveBindings, a = 0; a !== c; ++a) l[a].apply(o); return this; }, getRoot: function () { return this._root; }, uncacheClip: function (e) { var t = this._actions, i = e.uuid, n = this._actionsByClip, r = n[i]; if (void 0 !== r) { for (var o = r.knownActions, a = 0, s = o.length; a !== s; ++a) { var l = o[a]; this._deactivateAction(l); var c = l._cacheIndex, u = t[t.length - 1]; (l._cacheIndex = null), (l._byClipCacheIndex = null), (u._cacheIndex = c), (t[c] = u), t.pop(), this._removeInactiveBindingsForAction(l); } delete n[i]; } }, uncacheRoot: function (e) { var t = e.uuid, i = this._actionsByClip; for (var n in i) { var r = i[n].actionByRoot, o = r[t]; void 0 !== o && (this._deactivateAction(o), this._removeInactiveAction(o)); } var a = this._bindingsByRootAndName, s = a[t]; if (void 0 !== s) for (var l in s) { var c = s[l]; c.restoreOriginalState(), this._removeInactiveBinding(c); } }, uncacheAction: function (e, t) { var i = this.existingAction(e, t); null !== i && (this._deactivateAction(i), this._removeInactiveAction(i)); }, }), (n.AnimationMixer._Action = n.AnimationAction._new), Object.assign(n.AnimationMixer.prototype, { _bindAction: function (e, t) { var i = e._localRoot || this._root, r = e._clip.tracks, o = r.length, a = e._propertyBindings, s = e._interpolants, l = i.uuid, c = this._bindingsByRootAndName, u = c[l]; void 0 === u && ((u = {}), (c[l] = u)); for (var h = 0; h !== o; ++h) { var d = r[h], f = d.name, p = u[f]; if (void 0 !== p) a[h] = p; else { if (((p = a[h]), void 0 !== p)) { null === p._cacheIndex && (++p.referenceCount, this._addInactiveBinding(p, l, f)); continue; } var m = t && t._propertyBindings[h].binding.parsedPath; (p = new n.PropertyMixer(n.PropertyBinding.create(i, f, m), d.ValueTypeName, d.getValueSize())), ++p.referenceCount, this._addInactiveBinding(p, l, f), (a[h] = p); } s[h].resultBuffer = p.buffer; } }, _activateAction: function (e) { if (!this._isActiveAction(e)) { if (null === e._cacheIndex) { var t = (e._localRoot || this._root).uuid, i = e._clip.uuid, n = this._actionsByClip[i]; this._bindAction(e, n && n.knownActions[0]), this._addInactiveAction(e, i, t); } for (var r = e._propertyBindings, o = 0, a = r.length; o !== a; ++o) { var s = r[o]; 0 === s.useCount++ && (this._lendBinding(s), s.saveOriginalState()); } this._lendAction(e); } }, _deactivateAction: function (e) { if (this._isActiveAction(e)) { for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) { var r = t[i]; 0 === --r.useCount && (r.restoreOriginalState(), this._takeBackBinding(r)); } this._takeBackAction(e); } }, _initMemoryManager: function () { (this._actions = []), (this._nActiveActions = 0), (this._actionsByClip = {}), (this._bindings = []), (this._nActiveBindings = 0), (this._bindingsByRootAndName = {}), (this._controlInterpolants = []), (this._nActiveControlInterpolants = 0); var e = this; this.stats = { actions: { get total() { return e._actions.length; }, get inUse() { return e._nActiveActions; }, }, bindings: { get total() { return e._bindings.length; }, get inUse() { return e._nActiveBindings; }, }, controlInterpolants: { get total() { return e._controlInterpolants.length; }, get inUse() { return e._nActiveControlInterpolants; }, }, }; }, _isActiveAction: function (e) { var t = e._cacheIndex; return null !== t && t < this._nActiveActions; }, _addInactiveAction: function (e, t, i) { var n = this._actions, r = this._actionsByClip, o = r[t]; if (void 0 === o)(o = { knownActions: [e], actionByRoot: {} }), (e._byClipCacheIndex = 0), (r[t] = o); else { var a = o.knownActions; (e._byClipCacheIndex = a.length), a.push(e); } (e._cacheIndex = n.length), n.push(e), (o.actionByRoot[i] = e); }, _removeInactiveAction: function (e) { var t = this._actions, i = t[t.length - 1], n = e._cacheIndex; (i._cacheIndex = n), (t[n] = i), t.pop(), (e._cacheIndex = null); var r = e._clip.uuid, o = this._actionsByClip, a = o[r], s = a.knownActions, l = s[s.length - 1], c = e._byClipCacheIndex; (l._byClipCacheIndex = c), (s[c] = l), s.pop(), (e._byClipCacheIndex = null); var u = a.actionByRoot, h = (t._localRoot || this._root).uuid; delete u[h], 0 === s.length && delete o[r], this._removeInactiveBindingsForAction(e); }, _removeInactiveBindingsForAction: function (e) { for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) { var r = t[i]; 0 === --r.referenceCount && this._removeInactiveBinding(r); } }, _lendAction: function (e) { var t = this._actions, i = e._cacheIndex, n = this._nActiveActions++, r = t[n]; (e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r); }, _takeBackAction: function (e) { var t = this._actions, i = e._cacheIndex, n = --this._nActiveActions, r = t[n]; (e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r); }, _addInactiveBinding: function (e, t, i) { var n = this._bindingsByRootAndName, r = n[t], o = this._bindings; void 0 === r && ((r = {}), (n[t] = r)), (r[i] = e), (e._cacheIndex = o.length), o.push(e); }, _removeInactiveBinding: function (e) { var t = this._bindings, i = e.binding, n = i.rootNode.uuid, r = i.path, o = this._bindingsByRootAndName, a = o[n], s = t[t.length - 1], l = e._cacheIndex; (s._cacheIndex = l), (t[l] = s), t.pop(), delete a[r]; e: { for (var c in a) break e; delete o[n]; } }, _lendBinding: function (e) { var t = this._bindings, i = e._cacheIndex, n = this._nActiveBindings++, r = t[n]; (e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r); }, _takeBackBinding: function (e) { var t = this._bindings, i = e._cacheIndex, n = --this._nActiveBindings, r = t[n]; (e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r); }, _lendControlInterpolant: function () { var e = this._controlInterpolants, t = this._nActiveControlInterpolants++, i = e[t]; return void 0 === i && ((i = new n.LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer)), (i.__cacheIndex = t), (e[t] = i)), i; }, _takeBackControlInterpolant: function (e) { var t = this._controlInterpolants, i = e.__cacheIndex, n = --this._nActiveControlInterpolants, r = t[n]; (e.__cacheIndex = n), (t[n] = e), (r.__cacheIndex = i), (t[i] = r); }, _controlInterpolantsResultBuffer: new Float32Array(1), }), (n.AnimationObjectGroup = function (e) { (this.uuid = n.Math.generateUUID()), (this._objects = Array.prototype.slice.call(arguments)), (this.nCachedObjects_ = 0); var t = {}; this._indicesByUUID = t; for (var i = 0, r = arguments.length; i !== r; ++i) t[arguments[i].uuid] = i; (this._paths = []), (this._parsedPaths = []), (this._bindings = []), (this._bindingsIndicesByPath = {}); var o = this; this.stats = { objects: { get total() { return o._objects.length; }, get inUse() { return this.total - o.nCachedObjects_; }, }, get bindingsPerObject() { return o._bindings.length; }, }; }), (n.AnimationObjectGroup.prototype = { constructor: n.AnimationObjectGroup, add: function (e) { for (var t = this._objects, i = t.length, r = this.nCachedObjects_, o = this._indicesByUUID, a = this._paths, s = this._parsedPaths, l = this._bindings, c = l.length, u = 0, h = arguments.length; u !== h; ++u) { var d = arguments[u], f = d.uuid, p = o[f]; if (void 0 === p) { (p = i++), (o[f] = p), t.push(d); for (var m = 0, v = c; m !== v; ++m) l[m].push(new n.PropertyBinding(d, a[m], s[m])); } else if (r > p) { var g = t[p], y = --r, _ = t[y]; (o[_.uuid] = p), (t[p] = _), (o[f] = y), (t[y] = d); for (var m = 0, v = c; m !== v; ++m) { var b = l[m], x = b[y], w = b[p]; (b[p] = x), void 0 === w && (w = new n.PropertyBinding(d, a[m], s[m])), (b[y] = w); } } else t[p] !== g && console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes..."); } this.nCachedObjects_ = r; }, remove: function (e) { for (var t = this._objects, i = (t.length, this.nCachedObjects_), n = this._indicesByUUID, r = this._bindings, o = r.length, a = 0, s = arguments.length; a !== s; ++a) { var l = arguments[a], c = l.uuid, u = n[c]; if (void 0 !== u && u >= i) { var h = i++, d = t[h]; (n[d.uuid] = u), (t[u] = d), (n[c] = h), (t[h] = l); for (var f = 0, p = o; f !== p; ++f) { var m = r[f], v = m[h], g = m[u]; (m[u] = v), (m[h] = g); } } } this.nCachedObjects_ = i; }, uncache: function (e) { for (var t = this._objects, i = t.length, n = this.nCachedObjects_, r = this._indicesByUUID, o = this._bindings, a = o.length, s = 0, l = arguments.length; s !== l; ++s) { var c = arguments[s], u = c.uuid, h = r[u]; if (void 0 !== h) if ((delete r[u], n > h)) { var d = --n, f = t[d], p = --i, m = t[p]; (r[f.uuid] = h), (t[h] = f), (r[m.uuid] = d), (t[d] = m), t.pop(); for (var v = 0, g = a; v !== g; ++v) { var y = o[v], _ = y[d], b = y[p]; (y[h] = _), (y[d] = b), y.pop(); } } else { var p = --i, m = t[p]; (r[m.uuid] = h), (t[h] = m), t.pop(); for (var v = 0, g = a; v !== g; ++v) { var y = o[v]; (y[h] = y[p]), y.pop(); } } } this.nCachedObjects_ = n; }, subscribe_: function (e, t) { var i = this._bindingsIndicesByPath, r = i[e], o = this._bindings; if (void 0 !== r) return o[r]; var a = this._paths, s = this._parsedPaths, l = this._objects, c = l.length, u = this.nCachedObjects_, h = new Array(c); (r = o.length), (i[e] = r), a.push(e), s.push(t), o.push(h); for (var d = u, f = l.length; d !== f; ++d) { var p = l[d]; h[d] = new n.PropertyBinding(p, e, t); } return h; }, unsubscribe_: function (e) { var t = this._bindingsIndicesByPath, i = t[e]; if (void 0 !== i) { var n = this._paths, r = this._parsedPaths, o = this._bindings, a = o.length - 1, s = o[a], l = e[a]; (t[l] = i), (o[i] = s), o.pop(), (r[i] = r[a]), r.pop(), (n[i] = n[a]), n.pop(); } }, }), (n.AnimationUtils = { arraySlice: function (e, t, i) { return n.AnimationUtils.isTypedArray(e) ? new e.constructor(e.subarray(t, i)) : e.slice(t, i); }, convertArray: function (e, t, i) { return !e || (!i && e.constructor === t) ? e : "number" == typeof t.BYTES_PER_ELEMENT ? new t(e) : Array.prototype.slice.call(e); }, isTypedArray: function (e) { return ArrayBuffer.isView(e) && !(e instanceof DataView); }, getKeyframeOrder: function (e) { function t(t, i) { return e[t] - e[i]; } for (var i = e.length, n = new Array(i), r = 0; r !== i; ++r) n[r] = r; return n.sort(t), n; }, sortedArray: function (e, t, i) { for (var n = e.length, r = new e.constructor(n), o = 0, a = 0; a !== n; ++o) for (var s = i[o] * t, l = 0; l !== t; ++l) r[a++] = e[s + l]; return r; }, flattenJSON: function (e, t, i, n) { for (var r = 1, o = e[0]; void 0 !== o && void 0 === o[n];) o = e[r++]; if (void 0 !== o) { var a = o[n]; if (void 0 !== a) if (Array.isArray(a)) { do(a = o[n]), void 0 !== a && (t.push(o.time), i.push.apply(i, a)), (o = e[r++]); while (void 0 !== o); } else if (void 0 !== a.toArray) { do(a = o[n]), void 0 !== a && (t.push(o.time), a.toArray(i, i.length)), (o = e[r++]); while (void 0 !== o); } else do(a = o[n]), void 0 !== a && (t.push(o.time), i.push(a)), (o = e[r++]); while (void 0 !== o); } }, }), (n.KeyframeTrack = function (e, t, i, r) { if (void 0 === e) throw new Error("track name is undefined"); if (void 0 === t || 0 === t.length) throw new Error("no keyframes in track named " + e); (this.name = e), (this.times = n.AnimationUtils.convertArray(t, this.TimeBufferType)), (this.values = n.AnimationUtils.convertArray(i, this.ValueBufferType)), this.setInterpolation(r || this.DefaultInterpolation), this.validate(), this.optimize(); }), (n.KeyframeTrack.prototype = { constructor: n.KeyframeTrack, TimeBufferType: Float32Array, ValueBufferType: Float32Array, DefaultInterpolation: n.InterpolateLinear, InterpolantFactoryMethodDiscrete: function (e) { return new n.DiscreteInterpolant(this.times, this.values, this.getValueSize(), e); }, InterpolantFactoryMethodLinear: function (e) { return new n.LinearInterpolant(this.times, this.values, this.getValueSize(), e); }, InterpolantFactoryMethodSmooth: function (e) { return new n.CubicInterpolant(this.times, this.values, this.getValueSize(), e); }, setInterpolation: function (e) { var t; switch (e) { case n.InterpolateDiscrete: t = this.InterpolantFactoryMethodDiscrete; break; case n.InterpolateLinear: t = this.InterpolantFactoryMethodLinear; break; case n.InterpolateSmooth: t = this.InterpolantFactoryMethodSmooth; } if (void 0 === t) { var i = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name; if (void 0 === this.createInterpolant) { if (e === this.DefaultInterpolation) throw new Error(i); this.setInterpolation(this.DefaultInterpolation); } return void console.warn(i); } this.createInterpolant = t; }, getInterpolation: function () { switch (this.createInterpolant) { case this.InterpolantFactoryMethodDiscrete: return n.InterpolateDiscrete; case this.InterpolantFactoryMethodLinear: return n.InterpolateLinear; case this.InterpolantFactoryMethodSmooth: return n.InterpolateSmooth; } }, getValueSize: function () { return this.values.length / this.times.length; }, shift: function (e) { if (0 !== e) for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] += e; return this; }, scale: function (e) { if (1 !== e) for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] *= e; return this; }, trim: function (e, t) { for (var i = this.times, r = i.length, o = 0, a = r - 1; o !== r && i[o] < e;) ++o; for (; - 1 !== a && i[a] > t;) --a; if ((++a, 0 !== o || a !== r)) { o >= a && ((a = Math.max(a, 1)), (o = a - 1)); var s = this.getValueSize(); (this.times = n.AnimationUtils.arraySlice(i, o, a)), (this.values = n.AnimationUtils.arraySlice(this.values, o * s, a * s)); } return this; }, validate: function () { var e = !0, t = this.getValueSize(); t - Math.floor(t) !== 0 && (console.error("invalid value size in track", this), (e = !1)); var i = this.times, r = this.values, o = i.length; 0 === o && (console.error("track is empty", this), (e = !1)); for (var a = null, s = 0; s !== o; s++) { var l = i[s]; if ("number" == typeof l && isNaN(l)) { console.error("time is not a valid number", this, s, l), (e = !1); break; } if (null !== a && a > l) { console.error("out of order keys", this, s, l, a), (e = !1); break; } a = l; } if (void 0 !== r && n.AnimationUtils.isTypedArray(r)) for (var s = 0, c = r.length; s !== c; ++s) { var u = r[s]; if (isNaN(u)) { console.error("value is not a valid number", this, s, u), (e = !1); break; } } return e; }, optimize: function () { for (var e = this.times, t = this.values, i = this.getValueSize(), r = 1, o = 1, a = e.length - 1; a >= o; ++o) { var s = !1, l = e[o], c = e[o + 1]; if (l !== c && (1 !== o || l !== l[0])) for (var u = o * i, h = u - i, d = u + i, f = 0; f !== i; ++f) { var p = t[u + f]; if (p !== t[h + f] || p !== t[d + f]) { s = !0; break; } } if (s) { if (o !== r) { e[r] = e[o]; for (var m = o * i, v = r * i, f = 0; f !== i; ++f) t[v + f] = t[m + f]; } ++r; } } return r !== e.length && ((this.times = n.AnimationUtils.arraySlice(e, 0, r)), (this.values = n.AnimationUtils.arraySlice(t, 0, r * i))), this; }, }), Object.assign(n.KeyframeTrack, { parse: function (e) { if (void 0 === e.type) throw new Error("track type undefined, can not parse"); var t = n.KeyframeTrack._getTrackTypeForValueTypeName(e.type); if (void 0 === e.times) { var i = [], r = []; n.AnimationUtils.flattenJSON(e.keys, i, r, "value"), (e.times = i), (e.values = r); } return void 0 !== t.parse ? t.parse(e) : new t(e.name, e.times, e.values, e.interpolation); }, toJSON: function (e) { var t, i = e.constructor; if (void 0 !== i.toJSON) t = i.toJSON(e); else { t = { name: e.name, times: n.AnimationUtils.convertArray(e.times, Array), values: n.AnimationUtils.convertArray(e.values, Array) }; var r = e.getInterpolation(); r !== e.DefaultInterpolation && (t.interpolation = r); } return (t.type = e.ValueTypeName), t; }, _getTrackTypeForValueTypeName: function (e) { switch (e.toLowerCase()) { case "scalar": case "double": case "float": case "number": case "integer": return n.NumberKeyframeTrack; case "vector": case "vector2": case "vector3": case "vector4": return n.VectorKeyframeTrack; case "color": return n.ColorKeyframeTrack; case "quaternion": return n.QuaternionKeyframeTrack; case "bool": case "boolean": return n.BooleanKeyframeTrack; case "string": return n.StringKeyframeTrack; } throw new Error("Unsupported typeName: " + e); }, }), (n.PropertyBinding = function (e, t, i) { (this.path = t), (this.parsedPath = i || n.PropertyBinding.parseTrackName(t)), (this.node = n.PropertyBinding.findNode(e, this.parsedPath.nodeName) || e), (this.rootNode = e); }), (n.PropertyBinding.prototype = { constructor: n.PropertyBinding, getValue: function (e, t) { this.bind(), this.getValue(e, t); }, setValue: function (e, t) { this.bind(), this.setValue(e, t); }, bind: function () { var e = this.node, t = this.parsedPath, i = t.objectName, r = t.propertyName, o = t.propertyIndex; if ((e || ((e = n.PropertyBinding.findNode(this.rootNode, t.nodeName) || this.rootNode), (this.node = e)), (this.getValue = this._getValue_unavailable), (this.setValue = this._setValue_unavailable), !e)) return void console.error(" trying to update node for track: " + this.path + " but it wasn't found."); if (i) { var a = t.objectIndex; switch (i) { case "materials": if (!e.material) return void console.error(" can not bind to material as node does not have a material", this); if (!e.material.materials) return void console.error(" can not bind to material.materials as node.material does not have a materials array", this); e = e.material.materials; break; case "bones": if (!e.skeleton) return void console.error(" can not bind to bones as node does not have a skeleton", this); e = e.skeleton.bones; for (var s = 0; s < e.length; s++) if (e[s].name === a) { a = s; break; } break; default: if (void 0 === e[i]) return void console.error(" can not bind to objectName of node, undefined", this); e = e[i]; } if (void 0 !== a) { if (void 0 === e[a]) return void console.error(" trying to bind to objectIndex of objectName, but is undefined:", this, e); e = e[a]; } } var l = e[r]; if (void 0 === l) { var c = t.nodeName; return void console.error(" trying to update property for track: " + c + "." + r + " but it wasn't found.", e); } var u = this.Versioning.None; void 0 !== e.needsUpdate ? ((u = this.Versioning.NeedsUpdate), (this.targetObject = e)) : void 0 !== e.matrixWorldNeedsUpdate && ((u = this.Versioning.MatrixWorldNeedsUpdate), (this.targetObject = e)); var h = this.BindingType.Direct; if (void 0 !== o) { if ("morphTargetInfluences" === r) { if (!e.geometry) return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry", this); if (!e.geometry.morphTargets) return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets", this); for (var s = 0; s < this.node.geometry.morphTargets.length; s++) if (e.geometry.morphTargets[s].name === o) { o = s; break; } } (h = this.BindingType.ArrayElement), (this.resolvedProperty = l), (this.propertyIndex = o); } else void 0 !== l.fromArray && void 0 !== l.toArray ? ((h = this.BindingType.HasFromToArray), (this.resolvedProperty = l)) : void 0 !== l.length ? ((h = this.BindingType.EntireArray), (this.resolvedProperty = l)) : (this.propertyName = r); (this.getValue = this.GetterByBindingType[h]), (this.setValue = this.SetterByBindingTypeAndVersioning[h][u]); }, unbind: function () { (this.node = null), (this.getValue = this._getValue_unbound), (this.setValue = this._setValue_unbound); }, }), Object.assign(n.PropertyBinding.prototype, { _getValue_unavailable: function () {}, _setValue_unavailable: function () {}, _getValue_unbound: n.PropertyBinding.prototype.getValue, _setValue_unbound: n.PropertyBinding.prototype.setValue, BindingType: { Direct: 0, EntireArray: 1, ArrayElement: 2, HasFromToArray: 3 }, Versioning: { None: 0, NeedsUpdate: 1, MatrixWorldNeedsUpdate: 2 }, GetterByBindingType: [ function (e, t) { e[t] = this.node[this.propertyName]; }, function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) e[t++] = i[n]; }, function (e, t) { e[t] = this.resolvedProperty[this.propertyIndex]; }, function (e, t) { this.resolvedProperty.toArray(e, t); }, ], SetterByBindingTypeAndVersioning: [ [ function (e, t) { this.node[this.propertyName] = e[t]; }, function (e, t) { (this.node[this.propertyName] = e[t]), (this.targetObject.needsUpdate = !0); }, function (e, t) { (this.node[this.propertyName] = e[t]), (this.targetObject.matrixWorldNeedsUpdate = !0); }, ], [ function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++]; }, function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++]; this.targetObject.needsUpdate = !0; }, function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++]; this.targetObject.matrixWorldNeedsUpdate = !0; }, ], [ function (e, t) { this.resolvedProperty[this.propertyIndex] = e[t]; }, function (e, t) { (this.resolvedProperty[this.propertyIndex] = e[t]), (this.targetObject.needsUpdate = !0); }, function (e, t) { (this.resolvedProperty[this.propertyIndex] = e[t]), (this.targetObject.matrixWorldNeedsUpdate = !0); }, ], [ function (e, t) { this.resolvedProperty.fromArray(e, t); }, function (e, t) { this.resolvedProperty.fromArray(e, t), (this.targetObject.needsUpdate = !0); }, function (e, t) { this.resolvedProperty.fromArray(e, t), (this.targetObject.matrixWorldNeedsUpdate = !0); }, ], ], }), (n.PropertyBinding.Composite = function (e, t, i) { var r = i || n.PropertyBinding.parseTrackName(t); (this._targetGroup = e), (this._bindings = e.subscribe_(t, r)); }), (n.PropertyBinding.Composite.prototype = { constructor: n.PropertyBinding.Composite, getValue: function (e, t) { this.bind(); var i = this._targetGroup.nCachedObjects_, n = this._bindings[i]; void 0 !== n && n.getValue(e, t); }, setValue: function (e, t) { for (var i = this._bindings, n = this._targetGroup.nCachedObjects_, r = i.length; n !== r; ++n) i[n].setValue(e, t); }, bind: function () { for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].bind(); }, unbind: function () { for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].unbind(); }, }), (n.PropertyBinding.create = function (e, t, i) { return e instanceof n.AnimationObjectGroup ? new n.PropertyBinding.Composite(e, t, i) : new n.PropertyBinding(e, t, i); }), (n.PropertyBinding.parseTrackName = function (e) { var t = /^(([w]+/)*)([w-d]+)?(.([w]+)([([wd[]_.:- ]+)])?)?(.([w.]+)([([wd[]_. ]+)])?)$/, i = t.exec(e); if (!i) throw new Error("cannot parse trackName at all: " + e); i.index === t.lastIndex && t.lastIndex++; var n = { nodeName: i[3], objectName: i[5], objectIndex: i[7], propertyName: i[9], propertyIndex: i[11] }; if (null === n.propertyName || 0 === n.propertyName.length) throw new Error("can not parse propertyName from trackName: " + e); return n; }), (n.PropertyBinding.findNode = function (e, t) { if (!t || "" === t || "root" === t || "." === t || -1 === t || t === e.name || t === e.uuid) return e; if (e.skeleton) { var i = function (e) { for (var i = 0; i < e.bones.length; i++) { var n = e.bones[i]; if (n.name === t) return n; } return null; }, n = i(e.skeleton); if (n) return n; } if (e.children) { var r = function (e) { for (var i = 0; i < e.length; i++) { var n = e[i]; if (n.name === t || n.uuid === t) return n; var o = r(n.children); if (o) return o; } return null; }, o = r(e.children); if (o) return o; } return null; }), (n.PropertyMixer = function (e, t, i) { (this.binding = e), (this.valueSize = i); var n, r = Float64Array; switch (t) { case "quaternion": n = this._slerp; break; case "string": case "bool": (r = Array), (n = this._select); break; default: n = this._lerp; } (this.buffer = new r(4 * i)), (this._mixBufferRegion = n), (this.cumulativeWeight = 0), (this.useCount = 0), (this.referenceCount = 0); }), (n.PropertyMixer.prototype = { constructor: n.PropertyMixer, accumulate: function (e, t) { var i = this.buffer, n = this.valueSize, r = e * n + n, o = this.cumulativeWeight; if (0 === o) { for (var a = 0; a !== n; ++a) i[r + a] = i[a]; o = t; } else { o += t; var s = t / o; this._mixBufferRegion(i, r, 0, s, n); } this.cumulativeWeight = o; }, apply: function (e) { var t = this.valueSize, i = this.buffer, n = e * t + t, r = this.cumulativeWeight, o = this.binding; if (((this.cumulativeWeight = 0), 1 > r)) { var a = 3 * t; this._mixBufferRegion(i, n, a, 1 - r, t); } for (var s = t, l = t + t; s !== l; ++s) if (i[s] !== i[s + t]) { o.setValue(i, n); break; } }, saveOriginalState: function () { var e = this.binding, t = this.buffer, i = this.valueSize, n = 3 * i; e.getValue(t, n); for (var r = i, o = n; r !== o; ++r) t[r] = t[n + (r % i)]; this.cumulativeWeight = 0; }, restoreOriginalState: function () { var e = 3 * this.valueSize; this.binding.setValue(this.buffer, e); }, _select: function (e, t, i, n, r) { if (n >= 0.5) for (var o = 0; o !== r; ++o) e[t + o] = e[i + o]; }, _slerp: function (e, t, i, r, o) { n.Quaternion.slerpFlat(e, t, e, t, e, i, r); }, _lerp: function (e, t, i, n, r) { for (var o = 1 - n, a = 0; a !== r; ++a) { var s = t + a; e[s] = e[s] * o + e[i + a] * n; } }, }), (n.BooleanKeyframeTrack = function (e, t, i) { n.KeyframeTrack.call(this, e, t, i); }), (n.BooleanKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), { constructor: n.BooleanKeyframeTrack, ValueTypeName: "bool", ValueBufferType: Array, DefaultInterpolation: n.InterpolateDiscrete, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0, })), (n.ColorKeyframeTrack = function (e, t, i, r) { n.KeyframeTrack.call(this, e, t, i, r); }), (n.ColorKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), { constructor: n.ColorKeyframeTrack, ValueTypeName: "color" })), (n.NumberKeyframeTrack = function (e, t, i, r) { n.KeyframeTrack.call(this, e, t, i, r); }), (n.NumberKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), { constructor: n.NumberKeyframeTrack, ValueTypeName: "number" })), (n.QuaternionKeyframeTrack = function (e, t, i, r) { n.KeyframeTrack.call(this, e, t, i, r); }), (n.QuaternionKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), { constructor: n.QuaternionKeyframeTrack, ValueTypeName: "quaternion", DefaultInterpolation: n.InterpolateLinear, InterpolantFactoryMethodLinear: function (e) { return new n.QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), e); }, InterpolantFactoryMethodSmooth: void 0, })), (n.StringKeyframeTrack = function (e, t, i, r) { n.KeyframeTrack.call(this, e, t, i, r); }), (n.StringKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), { constructor: n.StringKeyframeTrack, ValueTypeName: "string", ValueBufferType: Array, DefaultInterpolation: n.InterpolateDiscrete, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0, })), (n.VectorKeyframeTrack = function (e, t, i, r) { n.KeyframeTrack.call(this, e, t, i, r); }), (n.VectorKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), { constructor: n.VectorKeyframeTrack, ValueTypeName: "vector" })), (n.Audio = function (e) { n.Object3D.call(this), (this.type = "Audio"), (this.context = e.context), (this.source = this.context.createBufferSource()), (this.source.onended = this.onEnded.bind(this)), (this.gain = this.context.createGain()), this.gain.connect(e.getInput()), (this.autoplay = !1), (this.startTime = 0), (this.playbackRate = 1), (this.isPlaying = !1), (this.hasPlaybackControl = !0), (this.sourceType = "empty"), (this.filters = []); }), (n.Audio.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Audio, getOutput: function () { return this.gain; }, setNodeSource: function (e) { return (this.hasPlaybackControl = !1), (this.sourceType = "audioNode"), (this.source = e), this.connect(), this; }, setBuffer: function (e) { return (this.source.buffer = e), (this.sourceType = "buffer"), this.autoplay && this.play(), this; }, play: function () { if (this.isPlaying === !0) return void console.warn("THREE.Audio: Audio is already playing."); if (this.hasPlaybackControl === !1) return void console.warn("THREE.Audio: this Audio has no playback control."); var e = this.context.createBufferSource(); return ( (e.buffer = this.source.buffer), (e.loop = this.source.loop), (e.onended = this.source.onended), e.start(0, this.startTime), (e.playbackRate.value = this.playbackRate), (this.isPlaying = !0), (this.source = e), this.connect() ); }, pause: function () { return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : (this.source.stop(), (this.startTime = this.context.currentTime), (this.isPlaying = !1), this); }, stop: function () { return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : (this.source.stop(), (this.startTime = 0), (this.isPlaying = !1), this); }, connect: function () { if (this.filters.length > 0) { this.source.connect(this.filters[0]); for (var e = 1, t = this.filters.length; t > e; e++) this.filters[e - 1].connect(this.filters[e]); this.filters[this.filters.length - 1].connect(this.getOutput()); } else this.source.connect(this.getOutput()); return this; }, disconnect: function () { if (this.filters.length > 0) { this.source.disconnect(this.filters[0]); for (var e = 1, t = this.filters.length; t > e; e++) this.filters[e - 1].disconnect(this.filters[e]); this.filters[this.filters.length - 1].disconnect(this.getOutput()); } else this.source.disconnect(this.getOutput()); return this; }, getFilters: function () { return this.filters; }, setFilters: function (e) { return e || (e = []), this.isPlaying === !0 ? (this.disconnect(), (this.filters = e), this.connect()) : (this.filters = e), this; }, getFilter: function () { return this.getFilters()[0]; }, setFilter: function (e) { return this.setFilters(e ? [e] : []); }, setPlaybackRate: function (e) { return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : ((this.playbackRate = e), this.isPlaying === !0 && (this.source.playbackRate.value = this.playbackRate), this); }, getPlaybackRate: function () { return this.playbackRate; }, onEnded: function () { this.isPlaying = !1; }, getLoop: function () { return this.hasPlaybackControl === !1 ? (console.warn("THREE.Audio: this Audio has no playback control."), !1) : this.source.loop; }, setLoop: function (e) { return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : void(this.source.loop = e); }, getVolume: function () { return this.gain.gain.value; }, setVolume: function (e) { return (this.gain.gain.value = e), this; }, })), (n.AudioAnalyser = function (e, t) { (this.analyser = e.context.createAnalyser()), (this.analyser.fftSize = void 0 !== t ? t : 2048), (this.data = new Uint8Array(this.analyser.frequencyBinCount)), e.getOutput().connect(this.analyser); }), Object.assign(n.AudioAnalyser.prototype, { getFrequencyData: function () { return this.analyser.getByteFrequencyData(this.data), this.data; }, getAverageFrequency: function () { for (var e = 0, t = this.getFrequencyData(), i = 0; i < t.length; i++) e += t[i]; return e / t.length; }, }), Object.defineProperty(n, "AudioContext", { get: (function () { var e; return function () { return void 0 === e && (e = new(window.AudioContext || window.webkitAudioContext)()), e; }; })(), }), (n.PositionalAudio = function (e) { n.Audio.call(this, e), (this.panner = this.context.createPanner()), this.panner.connect(this.gain); }), (n.PositionalAudio.prototype = Object.assign(Object.create(n.Audio.prototype), { constructor: n.PositionalAudio, getOutput: function () { return this.panner; }, getRefDistance: function () { return this.panner.refDistance; }, setRefDistance: function (e) { this.panner.refDistance = e; }, getRolloffFactor: function () { return this.panner.rolloffFactor; }, setRolloffFactor: function (e) { this.panner.rolloffFactor = e; }, getDistanceModel: function () { return this.panner.distanceModel; }, setDistanceModel: function (e) { this.panner.distanceModel = e; }, getMaxDistance: function () { return this.panner.maxDistance; }, setMaxDistance: function (e) { this.panner.maxDistance = e; }, updateMatrixWorld: (function () { var e = new n.Vector3(); return function (t) { n.Object3D.prototype.updateMatrixWorld.call(this, t), e.setFromMatrixPosition(this.matrixWorld), this.panner.setPosition(e.x, e.y, e.z); }; })(), })), (n.AudioListener = function () { n.Object3D.call(this), (this.type = "AudioListener"), (this.context = n.AudioContext), (this.gain = this.context.createGain()), this.gain.connect(this.context.destination), (this.filter = null); }), (n.AudioListener.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.AudioListener, getInput: function () { return this.gain; }, removeFilter: function () { null !== this.filter && (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination), this.gain.connect(this.context.destination), (this.filter = null)); }, getFilter: function () { return this.filter; }, setFilter: function (e) { null !== this.filter ? (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination)) : this.gain.disconnect(this.context.destination), (this.filter = e), this.gain.connect(this.filter), this.filter.connect(this.context.destination); }, getMasterVolume: function () { return this.gain.gain.value; }, setMasterVolume: function (e) { this.gain.gain.value = e; }, updateMatrixWorld: (function () { var e = new n.Vector3(), t = new n.Quaternion(), i = new n.Vector3(), r = new n.Vector3(); return function (o) { n.Object3D.prototype.updateMatrixWorld.call(this, o); var a = this.context.listener, s = this.up; this.matrixWorld.decompose(e, t, i), r.set(0, 0, -1).applyQuaternion(t), a.setPosition(e.x, e.y, e.z), a.setOrientation(r.x, r.y, r.z, s.x, s.y, s.z); }; })(), })), (n.Camera = function () { n.Object3D.call(this), (this.type = "Camera"), (this.matrixWorldInverse = new n.Matrix4()), (this.projectionMatrix = new n.Matrix4()); }), (n.Camera.prototype = Object.create(n.Object3D.prototype)), (n.Camera.prototype.constructor = n.Camera), (n.Camera.prototype.getWorldDirection = (function () { var e = new n.Quaternion(); return function (t) { var i = t || new n.Vector3(); return this.getWorldQuaternion(e), i.set(0, 0, -1).applyQuaternion(e); }; })()), (n.Camera.prototype.lookAt = (function () { var e = new n.Matrix4(); return function (t) { e.lookAt(this.position, t, this.up), this.quaternion.setFromRotationMatrix(e); }; })()), (n.Camera.prototype.clone = function () { return new this.constructor().copy(this); }), (n.Camera.prototype.copy = function (e) { return n.Object3D.prototype.copy.call(this, e), this.matrixWorldInverse.copy(e.matrixWorldInverse), this.projectionMatrix.copy(e.projectionMatrix), this; }), (n.CubeCamera = function (e, t, i) { n.Object3D.call(this), (this.type = "CubeCamera"); var r = 90, o = 1, a = new n.PerspectiveCamera(r, o, e, t); a.up.set(0, -1, 0), a.lookAt(new n.Vector3(1, 0, 0)), this.add(a); var s = new n.PerspectiveCamera(r, o, e, t); s.up.set(0, -1, 0), s.lookAt(new n.Vector3(-1, 0, 0)), this.add(s); var l = new n.PerspectiveCamera(r, o, e, t); l.up.set(0, 0, 1), l.lookAt(new n.Vector3(0, 1, 0)), this.add(l); var c = new n.PerspectiveCamera(r, o, e, t); c.up.set(0, 0, -1), c.lookAt(new n.Vector3(0, -1, 0)), this.add(c); var u = new n.PerspectiveCamera(r, o, e, t); u.up.set(0, -1, 0), u.lookAt(new n.Vector3(0, 0, 1)), this.add(u); var h = new n.PerspectiveCamera(r, o, e, t); h.up.set(0, -1, 0), h.lookAt(new n.Vector3(0, 0, -1)), this.add(h); var d = { format: n.RGBFormat, magFilter: n.LinearFilter, minFilter: n.LinearFilter }; (this.renderTarget = new n.WebGLRenderTargetCube(i, i, d)), (this.updateCubeMap = function (e, t) { null === this.parent && this.updateMatrixWorld(); var i = this.renderTarget, n = i.texture.generateMipmaps; (i.texture.generateMipmaps = !1), (i.activeCubeFace = 0), e.render(t, a, i), (i.activeCubeFace = 1), e.render(t, s, i), (i.activeCubeFace = 2), e.render(t, l, i), (i.activeCubeFace = 3), e.render(t, c, i), (i.activeCubeFace = 4), e.render(t, u, i), (i.texture.generateMipmaps = n), (i.activeCubeFace = 5), e.render(t, h, i), e.setRenderTarget(null); }); }), (n.CubeCamera.prototype = Object.create(n.Object3D.prototype)), (n.CubeCamera.prototype.constructor = n.CubeCamera), (n.OrthographicCamera = function (e, t, i, r, o, a) { n.Camera.call(this), (this.type = "OrthographicCamera"), (this.zoom = 1), (this.view = null), (this.left = e), (this.right = t), (this.top = i), (this.bottom = r), (this.near = void 0 !== o ? o : 0.1), (this.far = void 0 !== a ? a : 2e3), this.updateProjectionMatrix(); }), (n.OrthographicCamera.prototype = Object.assign(Object.create(n.Camera.prototype), { constructor: n.OrthographicCamera, copy: function (e) { return ( n.Camera.prototype.copy.call(this, e), (this.left = e.left), (this.right = e.right), (this.top = e.top), (this.bottom = e.bottom), (this.near = e.near), (this.far = e.far), (this.zoom = e.zoom), (this.view = null === e.view ? null : Object.assign({}, e.view)), this ); }, setViewOffset: function (e, t, i, n, r, o) { (this.view = { fullWidth: e, fullHeight: t, offsetX: i, offsetY: n, width: r, height: o }), this.updateProjectionMatrix(); }, clearViewOffset: function () { (this.view = null), this.updateProjectionMatrix(); }, updateProjectionMatrix: function () { var e = (this.right - this.left) / (2 * this.zoom), t = (this.top - this.bottom) / (2 * this.zoom), i = (this.right + this.left) / 2, n = (this.top + this.bottom) / 2, r = i - e, o = i + e, a = n + t, s = n - t; if (null !== this.view) { var l = this.zoom / (this.view.width / this.view.fullWidth), c = this.zoom / (this.view.height / this.view.fullHeight), u = (this.right - this.left) / this.view.width, h = (this.top - this.bottom) / this.view.height; (r += u * (this.view.offsetX / l)), (o = r + u * (this.view.width / l)), (a -= h * (this.view.offsetY / c)), (s = a - h * (this.view.height / c)); } this.projectionMatrix.makeOrthographic(r, o, a, s, this.near, this.far); }, toJSON: function (e) { var t = n.Object3D.prototype.toJSON.call(this, e); return ( (t.object.zoom = this.zoom), (t.object.left = this.left), (t.object.right = this.right), (t.object.top = this.top), (t.object.bottom = this.bottom), (t.object.near = this.near), (t.object.far = this.far), null !== this.view && (t.object.view = Object.assign({}, this.view)), t ); }, })), (n.PerspectiveCamera = function (e, t, i, r) { n.Camera.call(this), (this.type = "PerspectiveCamera"), (this.fov = void 0 !== e ? e : 50), (this.zoom = 1), (this.near = void 0 !== i ? i : 0.1), (this.far = void 0 !== r ? r : 2e3), (this.focus = 10), (this.aspect = void 0 !== t ? t : 1), (this.view = null), (this.filmGauge = 35), (this.filmOffset = 0), this.updateProjectionMatrix(); }), (n.PerspectiveCamera.prototype = Object.assign(Object.create(n.Camera.prototype), { constructor: n.PerspectiveCamera, copy: function (e) { return ( n.Camera.prototype.copy.call(this, e), (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 = null === e.view ? null : Object.assign({}, e.view)), (this.filmGauge = e.filmGauge), (this.filmOffset = e.filmOffset), this ); }, setFocalLength: function (e) { var t = (0.5 * this.getFilmHeight()) / e; (this.fov = 2 * n.Math.RAD2DEG * Math.atan(t)), this.updateProjectionMatrix(); }, getFocalLength: function () { var e = Math.tan(0.5 * n.Math.DEG2RAD * this.fov); return (0.5 * this.getFilmHeight()) / e; }, getEffectiveFOV: function () { return 2 * n.Math.RAD2DEG * Math.atan(Math.tan(0.5 * n.Math.DEG2RAD * this.fov) / this.zoom); }, getFilmWidth: function () { return this.filmGauge * Math.min(this.aspect, 1); }, getFilmHeight: function () { return this.filmGauge / Math.max(this.aspect, 1); }, setViewOffset: function (e, t, i, n, r, o) { (this.aspect = e / t), (this.view = { fullWidth: e, fullHeight: t, offsetX: i, offsetY: n, width: r, height: o }), this.updateProjectionMatrix(); }, clearViewOffset: function () { (this.view = null), this.updateProjectionMatrix(); }, updateProjectionMatrix: function () { var e = this.near, t = (e * Math.tan(0.5 * n.Math.DEG2RAD * this.fov)) / this.zoom, i = 2 * t, r = this.aspect * i, o = -0.5 * r, a = this.view; if (null !== a) { var s = a.fullWidth, l = a.fullHeight; (o += (a.offsetX * r) / s), (t -= (a.offsetY * i) / l), (r *= a.width / s), (i *= a.height / l); } var c = this.filmOffset; 0 !== c && (o += (e * c) / this.getFilmWidth()), this.projectionMatrix.makeFrustum(o, o + r, t - i, t, e, this.far); }, toJSON: function (e) { var t = n.Object3D.prototype.toJSON.call(this, 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), null !== this.view && (t.object.view = Object.assign({}, this.view)), (t.object.filmGauge = this.filmGauge), (t.object.filmOffset = this.filmOffset), t ); }, })), (n.StereoCamera = function () { (this.type = "StereoCamera"), (this.aspect = 1), (this.cameraL = new n.PerspectiveCamera()), this.cameraL.layers.enable(1), (this.cameraL.matrixAutoUpdate = !1), (this.cameraR = new n.PerspectiveCamera()), this.cameraR.layers.enable(2), (this.cameraR.matrixAutoUpdate = !1); }), Object.assign(n.StereoCamera.prototype, { update: (function () { var e, t, i, r, o, a = new n.Matrix4(), s = new n.Matrix4(); return function (l) { var c = e !== l.focus || t !== l.fov || i !== l.aspect * this.aspect || r !== l.near || o !== l.far; if (c) { (e = l.focus), (t = l.fov), (i = l.aspect * this.aspect), (r = l.near), (o = l.far); var u, h, d = l.projectionMatrix.clone(), f = 0.032, p = (f * r) / e, m = r * Math.tan(n.Math.DEG2RAD * t * 0.5); (s.elements[12] = -f), (a.elements[12] = f), (u = -m * i + p), (h = m * i + p), (d.elements[0] = (2 * r) / (h - u)), (d.elements[8] = (h + u) / (h - u)), this.cameraL.projectionMatrix.copy(d), (u = -m * i - p), (h = m * i - p), (d.elements[0] = (2 * r) / (h - u)), (d.elements[8] = (h + u) / (h - u)), this.cameraR.projectionMatrix.copy(d); } this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(s), this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(a); }; })(), }), (n.Light = function (e, t) { n.Object3D.call(this), (this.type = "Light"), (this.color = new n.Color(e)), (this.intensity = void 0 !== t ? t : 1), (this.receiveShadow = void 0); }), (n.Light.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Light, copy: function (e) { return n.Object3D.prototype.copy.call(this, e), this.color.copy(e.color), (this.intensity = e.intensity), this; }, toJSON: function (e) { var t = n.Object3D.prototype.toJSON.call(this, e); return ( (t.object.color = this.color.getHex()), (t.object.intensity = this.intensity), void 0 !== this.groundColor && (t.object.groundColor = this.groundColor.getHex()), void 0 !== this.distance && (t.object.distance = this.distance), void 0 !== this.angle && (t.object.angle = this.angle), void 0 !== this.decay && (t.object.decay = this.decay), void 0 !== this.penumbra && (t.object.penumbra = this.penumbra), t ); }, })), (n.LightShadow = function (e) { (this.camera = e), (this.bias = 0), (this.radius = 1), (this.mapSize = new n.Vector2(512, 512)), (this.map = null), (this.matrix = new n.Matrix4()); }), Object.assign(n.LightShadow.prototype, { copy: function (e) { return (this.camera = e.camera.clone()), (this.bias = e.bias), (this.radius = e.radius), this.mapSize.copy(e.mapSize), this; }, clone: function () { return new this.constructor().copy(this); }, }), (n.AmbientLight = function (e, t) { n.Light.call(this, e, t), (this.type = "AmbientLight"), (this.castShadow = void 0); }), (n.AmbientLight.prototype = Object.assign(Object.create(n.Light.prototype), { constructor: n.AmbientLight })), (n.DirectionalLight = function (e, t) { n.Light.call(this, e, t), (this.type = "DirectionalLight"), this.position.copy(n.Object3D.DefaultUp), this.updateMatrix(), (this.target = new n.Object3D()), (this.shadow = new n.DirectionalLightShadow()); }), (n.DirectionalLight.prototype = Object.assign(Object.create(n.Light.prototype), { constructor: n.DirectionalLight, copy: function (e) { return n.Light.prototype.copy.call(this, e), (this.target = e.target.clone()), (this.shadow = e.shadow.clone()), this; }, })), (n.DirectionalLightShadow = function (e) { n.LightShadow.call(this, new n.OrthographicCamera(-5, 5, 5, -5, 0.5, 500)); }), (n.DirectionalLightShadow.prototype = Object.assign(Object.create(n.LightShadow.prototype), { constructor: n.DirectionalLightShadow })), (n.HemisphereLight = function (e, t, i) { n.Light.call(this, e, i), (this.type = "HemisphereLight"), (this.castShadow = void 0), this.position.copy(n.Object3D.DefaultUp), this.updateMatrix(), (this.groundColor = new n.Color(t)); }), (n.HemisphereLight.prototype = Object.assign(Object.create(n.Light.prototype), { constructor: n.HemisphereLight, copy: function (e) { return n.Light.prototype.copy.call(this, e), this.groundColor.copy(e.groundColor), this; }, })), (n.PointLight = function (e, t, i, r) { n.Light.call(this, e, t), (this.type = "PointLight"), Object.defineProperty(this, "power", { get: function () { return 4 * this.intensity * Math.PI; }, set: function (e) { this.intensity = e / (4 * Math.PI); }, }), (this.distance = void 0 !== i ? i : 0), (this.decay = void 0 !== r ? r : 1), (this.shadow = new n.LightShadow(new n.PerspectiveCamera(90, 1, 0.5, 500))); }), (n.PointLight.prototype = Object.assign(Object.create(n.Light.prototype), { constructor: n.PointLight, copy: function (e) { return n.Light.prototype.copy.call(this, e), (this.distance = e.distance), (this.decay = e.decay), (this.shadow = e.shadow.clone()), this; }, })), (n.SpotLight = function (e, t, i, r, o, a) { n.Light.call(this, e, t), (this.type = "SpotLight"), this.position.copy(n.Object3D.DefaultUp), this.updateMatrix(), (this.target = new n.Object3D()), Object.defineProperty(this, "power", { get: function () { return this.intensity * Math.PI; }, set: function (e) { this.intensity = e / Math.PI; }, }), (this.distance = void 0 !== i ? i : 0), (this.angle = void 0 !== r ? r : Math.PI / 3), (this.penumbra = void 0 !== o ? o : 0), (this.decay = void 0 !== a ? a : 1), (this.shadow = new n.SpotLightShadow()); }), (n.SpotLight.prototype = Object.assign(Object.create(n.Light.prototype), { constructor: n.SpotLight, copy: function (e) { return ( n.Light.prototype.copy.call(this, e), (this.distance = e.distance), (this.angle = e.angle), (this.penumbra = e.penumbra), (this.decay = e.decay), (this.target = e.target.clone()), (this.shadow = e.shadow.clone()), this ); }, })), (n.SpotLightShadow = function () { n.LightShadow.call(this, new n.PerspectiveCamera(50, 1, 0.5, 500)); }), (n.SpotLightShadow.prototype = Object.assign(Object.create(n.LightShadow.prototype), { constructor: n.SpotLightShadow, update: function (e) { var t = 2 * n.Math.RAD2DEG * e.angle, i = this.mapSize.width / this.mapSize.height, r = e.distance || 500, o = this.camera; (t !== o.fov || i !== o.aspect || r !== o.far) && ((o.fov = t), (o.aspect = i), (o.far = r), o.updateProjectionMatrix()); }, })), (n.AudioLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.AudioLoader.prototype, { load: function (e, t, i, r) { var o = new n.XHRLoader(this.manager); o.setResponseType("arraybuffer"), o.load( e, function (e) { var i = n.AudioContext; i.decodeAudioData(e, function (e) { t(e); }); }, i, r ); }, }), (n.Cache = { enabled: !1, files: {}, add: function (e, t) { this.enabled !== !1 && (this.files[e] = t); }, get: function (e) { return this.enabled !== !1 ? this.files[e] : void 0; }, remove: function (e) { delete this.files[e]; }, clear: function () { this.files = {}; }, }), (n.Loader = function () { (this.onLoadStart = function () {}), (this.onLoadProgress = function () {}), (this.onLoadComplete = function () {}); }), (n.Loader.prototype = { constructor: n.Loader, crossOrigin: void 0, extractUrlBase: function (e) { var t = e.split("/"); return 1 === t.length ? "./" : (t.pop(), t.join("/") + "/"); }, initMaterials: function (e, t, i) { for (var n = [], r = 0; r < e.length; ++r) n[r] = this.createMaterial(e[r], t, i); return n; }, createMaterial: (function () { var e, t, i; return function (r, o, a) { function s(e, i, r, s, c) { var u, h = o + e, d = n.Loader.Handlers.get(h); null !== d ? (u = d.load(h)) : (t.setCrossOrigin(a), (u = t.load(h))), void 0 !== i && (u.repeat.fromArray(i), 1 !== i[0] && (u.wrapS = n.RepeatWrapping), 1 !== i[1] && (u.wrapT = n.RepeatWrapping)), void 0 !== r && u.offset.fromArray(r), void 0 !== s && ("repeat" === s[0] && (u.wrapS = n.RepeatWrapping), "mirror" === s[0] && (u.wrapS = n.MirroredRepeatWrapping), "repeat" === s[1] && (u.wrapT = n.RepeatWrapping), "mirror" === s[1] && (u.wrapT = n.MirroredRepeatWrapping)), void 0 !== c && (u.anisotropy = c); var f = n.Math.generateUUID(); return (l[f] = u), f; } void 0 === e && (e = new n.Color()), void 0 === t && (t = new n.TextureLoader()), void 0 === i && (i = new n.MaterialLoader()); var l = {}, c = { uuid: n.Math.generateUUID(), type: "MeshLambertMaterial" }; for (var u in r) { var h = r[u]; switch (u) { case "DbgColor": case "DbgIndex": case "opticalDensity": case "illumination": break; case "DbgName": c.name = h; break; case "blending": c.blending = n[h]; break; case "colorAmbient": case "mapAmbient": console.warn("THREE.Loader.createMaterial:", u, "is no longer supported."); break; case "colorDiffuse": c.color = e.fromArray(h).getHex(); break; case "colorSpecular": c.specular = e.fromArray(h).getHex(); break; case "colorEmissive": c.emissive = e.fromArray(h).getHex(); break; case "specularCoef": c.shininess = h; break; case "shading": "basic" === h.toLowerCase() && (c.type = "MeshBasicMaterial"), "phong" === h.toLowerCase() && (c.type = "MeshPhongMaterial"), "standard" === h.toLowerCase() && (c.type = "MeshStandardMaterial"); break; case "mapDiffuse": c.map = s(h, r.mapDiffuseRepeat, r.mapDiffuseOffset, r.mapDiffuseWrap, r.mapDiffuseAnisotropy); break; case "mapDiffuseRepeat": case "mapDiffuseOffset": case "mapDiffuseWrap": case "mapDiffuseAnisotropy": break; case "mapEmissive": c.emissiveMap = s(h, r.mapEmissiveRepeat, r.mapEmissiveOffset, r.mapEmissiveWrap, r.mapEmissiveAnisotropy); break; case "mapEmissiveRepeat": case "mapEmissiveOffset": case "mapEmissiveWrap": case "mapEmissiveAnisotropy": break; case "mapLight": c.lightMap = s(h, r.mapLightRepeat, r.mapLightOffset, r.mapLightWrap, r.mapLightAnisotropy); break; case "mapLightRepeat": case "mapLightOffset": case "mapLightWrap": case "mapLightAnisotropy": break; case "mapAO": c.aoMap = s(h, r.mapAORepeat, r.mapAOOffset, r.mapAOWrap, r.mapAOAnisotropy); break; case "mapAORepeat": case "mapAOOffset": case "mapAOWrap": case "mapAOAnisotropy": break; case "mapBump": c.bumpMap = s(h, r.mapBumpRepeat, r.mapBumpOffset, r.mapBumpWrap, r.mapBumpAnisotropy); break; case "mapBumpScale": c.bumpScale = h; break; case "mapBumpRepeat": case "mapBumpOffset": case "mapBumpWrap": case "mapBumpAnisotropy": break; case "mapNormal": c.normalMap = s(h, r.mapNormalRepeat, r.mapNormalOffset, r.mapNormalWrap, r.mapNormalAnisotropy); break; case "mapNormalFactor": c.normalScale = [h, h]; break; case "mapNormalRepeat": case "mapNormalOffset": case "mapNormalWrap": case "mapNormalAnisotropy": break; case "mapSpecular": c.specularMap = s(h, r.mapSpecularRepeat, r.mapSpecularOffset, r.mapSpecularWrap, r.mapSpecularAnisotropy); break; case "mapSpecularRepeat": case "mapSpecularOffset": case "mapSpecularWrap": case "mapSpecularAnisotropy": break; case "mapMetalness": c.metalnessMap = s(h, r.mapMetalnessRepeat, r.mapMetalnessOffset, r.mapMetalnessWrap, r.mapMetalnessAnisotropy); break; case "mapMetalnessRepeat": case "mapMetalnessOffset": case "mapMetalnessWrap": case "mapMetalnessAnisotropy": break; case "mapRoughness": c.roughnessMap = s(h, r.mapRoughnessRepeat, r.mapRoughnessOffset, r.mapRoughnessWrap, r.mapRoughnessAnisotropy); break; case "mapRoughnessRepeat": case "mapRoughnessOffset": case "mapRoughnessWrap": case "mapRoughnessAnisotropy": break; case "mapAlpha": c.alphaMap = s(h, r.mapAlphaRepeat, r.mapAlphaOffset, r.mapAlphaWrap, r.mapAlphaAnisotropy); break; case "mapAlphaRepeat": case "mapAlphaOffset": case "mapAlphaWrap": case "mapAlphaAnisotropy": break; case "flipSided": c.side = n.BackSide; break; case "doubleSided": c.side = n.DoubleSide; break; case "transparency": console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"), (c.opacity = h); break; case "depthTest": case "depthWrite": case "colorWrite": case "opacity": case "reflectivity": case "transparent": case "visible": case "wireframe": c[u] = h; break; case "vertexColors": h === !0 && (c.vertexColors = n.VertexColors), "face" === h && (c.vertexColors = n.FaceColors); break; default: console.error("THREE.Loader.createMaterial: Unsupported", u, h); } } return "MeshBasicMaterial" === c.type && delete c.emissive, "MeshPhongMaterial" !== c.type && delete c.specular, c.opacity < 1 && (c.transparent = !0), i.setTextures(l), i.parse(c); }; })(), }), (n.Loader.Handlers = { handlers: [], add: function (e, t) { this.handlers.push(e, t); }, get: function (e) { for (var t = this.handlers, i = 0, n = t.length; n > i; i += 2) { var r = t[i], o = t[i + 1]; if (r.test(e)) return o; } return null; }, }), (n.XHRLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.XHRLoader.prototype, { load: function (e, t, i, r) { void 0 !== this.path && (e = this.path + e); var o = this, a = n.Cache.get(e); if (void 0 !== a) return ( o.manager.itemStart(e), setTimeout(function () { t && t(a), o.manager.itemEnd(e); }, 0), a ); var s = new XMLHttpRequest(); return ( s.overrideMimeType("text/plain"), s.open("GET", e, !0), s.addEventListener( "load", function (i) { var a = i.target.response; n.Cache.add(e, a), 200 === this.status ? (t && t(a), o.manager.itemEnd(e)) : 0 === this.status ? (console.warn("THREE.XHRLoader: HTTP Status 0 received."), t && t(a), o.manager.itemEnd(e)) : (r && r(i), o.manager.itemError(e)); }, !1 ), void 0 !== i && s.addEventListener( "progress", function (e) { i(e); }, !1 ), s.addEventListener( "error", function (t) { r && r(t), o.manager.itemError(e); }, !1 ), void 0 !== this.responseType && (s.responseType = this.responseType), void 0 !== this.withCredentials && (s.withCredentials = this.withCredentials), s.send(null), o.manager.itemStart(e), s ); }, setPath: function (e) { return (this.path = e), this; }, setResponseType: function (e) { return (this.responseType = e), this; }, setWithCredentials: function (e) { return (this.withCredentials = e), this; }, }), (n.FontLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.FontLoader.prototype, { load: function (e, t, i, r) { var o = this, a = new n.XHRLoader(this.manager); a.load( e, function (e) { var i; try { i = JSON.parse(e); } catch (n) { console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."), (i = JSON.parse(e.substring(65, e.length - 2))); } var r = o.parse(i); t && t(r); }, i, r ); }, parse: function (e) { return new n.Font(e); }, }), (n.ImageLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.ImageLoader.prototype, { load: function (e, t, i, r) { var o = this, a = document.createElementNS("http://www.w3.org/1999/xhtml", "img"); if ( ((a.onload = function () { URL.revokeObjectURL(a.src), t && t(a), o.manager.itemEnd(e); }), 0 === e.indexOf("data:")) ) a.src = e; else { var s = new n.XHRLoader(); s.setPath(this.path), s.setResponseType("blob"), s.load( e, function (e) { a.src = URL.createObjectURL(e); }, i, r ); } return o.manager.itemStart(e), a; }, setCrossOrigin: function (e) { return (this.crossOrigin = e), this; }, setPath: function (e) { return (this.path = e), this; }, }), (n.JSONLoader = function (e) { "boolean" == typeof e && (console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."), (e = void 0)), (this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this.withCredentials = !1); }), Object.assign(n.JSONLoader.prototype, { load: function (e, t, i, r) { var o = this, a = this.texturePath && "string" == typeof this.texturePath ? this.texturePath : n.Loader.prototype.extractUrlBase(e), s = new n.XHRLoader(this.manager); s.setWithCredentials(this.withCredentials), s.load( e, function (i) { var n = JSON.parse(i), r = n.metadata; if (void 0 !== r) { var s = r.type; if (void 0 !== s) { if ("object" === s.toLowerCase()) return void console.error("THREE.JSONLoader: " + e + " should be loaded with THREE.ObjectLoader instead."); if ("scene" === s.toLowerCase()) return void console.error("THREE.JSONLoader: " + e + " should be loaded with THREE.SceneLoader instead."); } } var l = o.parse(n, a); t(l.geometry, l.materials); }, i, r ); }, setTexturePath: function (e) { this.texturePath = e; }, parse: function (e, t) { function i(t) { function i(e, t) { return e & (1 << t); } var r, o, a, l, c, u, h, d, f, p, m, v, g, y, _, b, x, w, M, T, S, E, A, C, P, L, R, O = e.faces, k = e.vertices, D = e.normals, I = e.colors, N = 0; if (void 0 !== e.uvs) { for (r = 0; r < e.uvs.length; r++) e.uvs[r].length && N++; for (r = 0; N > r; r++) s.faceVertexUvs[r] = []; } for (l = 0, c = k.length; c > l;)(w = new n.Vector3()), (w.x = k[l++] * t), (w.y = k[l++] * t), (w.z = k[l++] * t), s.vertices.push(w); for (l = 0, c = O.length; c > l;) if (((p = O[l++]), (m = i(p, 0)), (v = i(p, 1)), (g = i(p, 3)), (y = i(p, 4)), (_ = i(p, 5)), (b = i(p, 6)), (x = i(p, 7)), m)) { if ( ((T = new n.Face3()), (T.a = O[l]), (T.b = O[l + 1]), (T.c = O[l + 3]), (S = new n.Face3()), (S.a = O[l + 1]), (S.b = O[l + 2]), (S.c = O[l + 3]), (l += 4), v && ((f = O[l++]), (T.materialIndex = f), (S.materialIndex = f)), (a = s.faces.length), g) ) for (r = 0; N > r; r++) for (C = e.uvs[r], s.faceVertexUvs[r][a] = [], s.faceVertexUvs[r][a + 1] = [], o = 0; 4 > o; o++) (d = O[l++]), (L = C[2 * d]), (R = C[2 * d + 1]), (P = new n.Vector2(L, R)), 2 !== o && s.faceVertexUvs[r][a].push(P), 0 !== o && s.faceVertexUvs[r][a + 1].push(P); if ((y && ((h = 3 * O[l++]), T.normal.set(D[h++], D[h++], D[h]), S.normal.copy(T.normal)), _)) for (r = 0; 4 > r; r++)(h = 3 * O[l++]), (A = new n.Vector3(D[h++], D[h++], D[h])), 2 !== r && T.vertexNormals.push(A), 0 !== r && S.vertexNormals.push(A); if ((b && ((u = O[l++]), (E = I[u]), T.color.setHex(E), S.color.setHex(E)), x)) for (r = 0; 4 > r; r++)(u = O[l++]), (E = I[u]), 2 !== r && T.vertexColors.push(new n.Color(E)), 0 !== r && S.vertexColors.push(new n.Color(E)); s.faces.push(T), s.faces.push(S); } else { if (((M = new n.Face3()), (M.a = O[l++]), (M.b = O[l++]), (M.c = O[l++]), v && ((f = O[l++]), (M.materialIndex = f)), (a = s.faces.length), g)) for (r = 0; N > r; r++) for (C = e.uvs[r], s.faceVertexUvs[r][a] = [], o = 0; 3 > o; o++)(d = O[l++]), (L = C[2 * d]), (R = C[2 * d + 1]), (P = new n.Vector2(L, R)), s.faceVertexUvs[r][a].push(P); if ((y && ((h = 3 * O[l++]), M.normal.set(D[h++], D[h++], D[h])), _)) for (r = 0; 3 > r; r++)(h = 3 * O[l++]), (A = new n.Vector3(D[h++], D[h++], D[h])), M.vertexNormals.push(A); if ((b && ((u = O[l++]), M.color.setHex(I[u])), x)) for (r = 0; 3 > r; r++)(u = O[l++]), M.vertexColors.push(new n.Color(I[u])); s.faces.push(M); } } function r() { var t = void 0 !== e.influencesPerVertex ? e.influencesPerVertex : 2; if (e.skinWeights) for (var i = 0, r = e.skinWeights.length; r > i; i += t) { var o = e.skinWeights[i], a = t > 1 ? e.skinWeights[i + 1] : 0, l = t > 2 ? e.skinWeights[i + 2] : 0, c = t > 3 ? e.skinWeights[i + 3] : 0; s.skinWeights.push(new n.Vector4(o, a, l, c)); } if (e.skinIndices) for (var i = 0, r = e.skinIndices.length; r > i; i += t) { var u = e.skinIndices[i], h = t > 1 ? e.skinIndices[i + 1] : 0, d = t > 2 ? e.skinIndices[i + 2] : 0, f = t > 3 ? e.skinIndices[i + 3] : 0; s.skinIndices.push(new n.Vector4(u, h, d, f)); } (s.bones = e.bones), s.bones && s.bones.length > 0 && (s.skinWeights.length !== s.skinIndices.length || s.skinIndices.length !== s.vertices.length) && console.warn("When skinning, number of vertices (" + s.vertices.length + "), skinIndices (" + s.skinIndices.length + "), and skinWeights (" + s.skinWeights.length + ") should match."); } function o(t) { if (void 0 !== e.morphTargets) for (var i = 0, r = e.morphTargets.length; r > i; i++) { (s.morphTargets[i] = {}), (s.morphTargets[i].name = e.morphTargets[i].name), (s.morphTargets[i].vertices = []); for (var o = s.morphTargets[i].vertices, a = e.morphTargets[i].vertices, l = 0, c = a.length; c > l; l += 3) { var u = new n.Vector3(); (u.x = a[l] * t), (u.y = a[l + 1] * t), (u.z = a[l + 2] * t), o.push(u); } } if (void 0 !== e.morphColors && e.morphColors.length > 0) { console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'); for (var h = s.faces, d = e.morphColors[0].colors, i = 0, r = h.length; r > i; i++) h[i].color.fromArray(d, 3 * i); } } function a() { var t = [], i = []; void 0 !== e.animation && i.push(e.animation), void 0 !== e.animations && (e.animations.length ? (i = i.concat(e.animations)) : i.push(e.animations)); for (var r = 0; r < i.length; r++) { var o = n.AnimationClip.parseAnimation(i[r], s.bones); o && t.push(o); } if (s.morphTargets) { var a = n.AnimationClip.CreateClipsFromMorphTargetSequences(s.morphTargets, 10); t = t.concat(a); } t.length > 0 && (s.animations = t); } var s = new n.Geometry(), l = void 0 !== e.scale ? 1 / e.scale : 1; if ((i(l), r(), o(l), a(), s.computeFaceNormals(), s.computeBoundingSphere(), void 0 === e.materials || 0 === e.materials.length)) return { geometry: s }; var c = n.Loader.prototype.initMaterials(e.materials, t, this.crossOrigin); return { geometry: s, materials: c }; }, }), (n.LoadingManager = function (e, t, i) { var n = this, r = !1, o = 0, a = 0; (this.onStart = void 0), (this.onLoad = e), (this.onProgress = t), (this.onError = i), (this.itemStart = function (e) { a++, r === !1 && void 0 !== n.onStart && n.onStart(e, o, a), (r = !0); }), (this.itemEnd = function (e) { o++, void 0 !== n.onProgress && n.onProgress(e, o, a), o === a && ((r = !1), void 0 !== n.onLoad && n.onLoad()); }), (this.itemError = function (e) { void 0 !== n.onError && n.onError(e); }); }), (n.DefaultLoadingManager = new n.LoadingManager()), (n.BufferGeometryLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.BufferGeometryLoader.prototype, { load: function (e, t, i, r) { var o = this, a = new n.XHRLoader(o.manager); a.load( e, function (e) { t(o.parse(JSON.parse(e))); }, i, r ); }, parse: function (e) { var t = new n.BufferGeometry(), i = e.data.index, r = { Int8Array: Int8Array, Uint8Array: Uint8Array, Uint8ClampedArray: Uint8ClampedArray, Int16Array: Int16Array, Uint16Array: Uint16Array, Int32Array: Int32Array, Uint32Array: Uint32Array, Float32Array: Float32Array, Float64Array: Float64Array, }; if (void 0 !== i) { var o = new r[i.type](i.array); t.setIndex(new n.BufferAttribute(o, 1)); } var a = e.data.attributes; for (var s in a) { var l = a[s], o = new r[l.type](l.array); t.addAttribute(s, new n.BufferAttribute(o, l.itemSize, l.normalized)); } var c = e.data.groups || e.data.drawcalls || e.data.offsets; if (void 0 !== c) for (var u = 0, h = c.length; u !== h; ++u) { var d = c[u]; t.addGroup(d.start, d.count, d.materialIndex); } var f = e.data.boundingSphere; if (void 0 !== f) { var p = new n.Vector3(); void 0 !== f.center && p.fromArray(f.center), (t.boundingSphere = new n.Sphere(p, f.radius)); } return t; }, }), (n.MaterialLoader = function (e) { (this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this.textures = {}); }), Object.assign(n.MaterialLoader.prototype, { load: function (e, t, i, r) { var o = this, a = new n.XHRLoader(o.manager); a.load( e, function (e) { t(o.parse(JSON.parse(e))); }, i, r ); }, setTextures: function (e) { this.textures = e; }, getTexture: function (e) { var t = this.textures; return void 0 === t[e] && console.warn("THREE.MaterialLoader: Undefined texture", e), t[e]; }, parse: function (e) { var t = new n[e.type](); if ( (void 0 !== e.uuid && (t.uuid = e.uuid), void 0 !== e.name && (t.name = e.name), void 0 !== e.color && t.color.setHex(e.color), void 0 !== e.roughness && (t.roughness = e.roughness), void 0 !== e.metalness && (t.metalness = e.metalness), void 0 !== e.emissive && t.emissive.setHex(e.emissive), void 0 !== e.specular && t.specular.setHex(e.specular), void 0 !== e.shininess && (t.shininess = e.shininess), void 0 !== e.uniforms && (t.uniforms = e.uniforms), void 0 !== e.vertexShader && (t.vertexShader = e.vertexShader), void 0 !== e.fragmentShader && (t.fragmentShader = e.fragmentShader), void 0 !== e.vertexColors && (t.vertexColors = e.vertexColors), void 0 !== e.shading && (t.shading = e.shading), void 0 !== e.blending && (t.blending = e.blending), void 0 !== e.side && (t.side = e.side), void 0 !== e.opacity && (t.opacity = e.opacity), void 0 !== e.transparent && (t.transparent = e.transparent), void 0 !== e.alphaTest && (t.alphaTest = e.alphaTest), void 0 !== e.depthTest && (t.depthTest = e.depthTest), void 0 !== e.depthWrite && (t.depthWrite = e.depthWrite), void 0 !== e.colorWrite && (t.colorWrite = e.colorWrite), void 0 !== e.wireframe && (t.wireframe = e.wireframe), void 0 !== e.wireframeLinewidth && (t.wireframeLinewidth = e.wireframeLinewidth), void 0 !== e.size && (t.size = e.size), void 0 !== e.sizeAttenuation && (t.sizeAttenuation = e.sizeAttenuation), void 0 !== e.map && (t.map = this.getTexture(e.map)), void 0 !== e.alphaMap && ((t.alphaMap = this.getTexture(e.alphaMap)), (t.transparent = !0)), void 0 !== e.bumpMap && (t.bumpMap = this.getTexture(e.bumpMap)), void 0 !== e.bumpScale && (t.bumpScale = e.bumpScale), void 0 !== e.normalMap && (t.normalMap = this.getTexture(e.normalMap)), void 0 !== e.normalScale) ) { var i = e.normalScale; Array.isArray(i) === !1 && (i = [i, i]), (t.normalScale = new n.Vector2().fromArray(i)); } if ( (void 0 !== e.displacementMap && (t.displacementMap = this.getTexture(e.displacementMap)), void 0 !== e.displacementScale && (t.displacementScale = e.displacementScale), void 0 !== e.displacementBias && (t.displacementBias = e.displacementBias), void 0 !== e.roughnessMap && (t.roughnessMap = this.getTexture(e.roughnessMap)), void 0 !== e.metalnessMap && (t.metalnessMap = this.getTexture(e.metalnessMap)), void 0 !== e.emissiveMap && (t.emissiveMap = this.getTexture(e.emissiveMap)), void 0 !== e.emissiveIntensity && (t.emissiveIntensity = e.emissiveIntensity), void 0 !== e.specularMap && (t.specularMap = this.getTexture(e.specularMap)), void 0 !== e.envMap && ((t.envMap = this.getTexture(e.envMap)), (t.combine = n.MultiplyOperation)), void 0 !== e.reflectivity && (t.reflectivity = e.reflectivity), void 0 !== e.lightMap && (t.lightMap = this.getTexture(e.lightMap)), void 0 !== e.lightMapIntensity && (t.lightMapIntensity = e.lightMapIntensity), void 0 !== e.aoMap && (t.aoMap = this.getTexture(e.aoMap)), void 0 !== e.aoMapIntensity && (t.aoMapIntensity = e.aoMapIntensity), void 0 !== e.materials) ) for (var r = 0, o = e.materials.length; o > r; r++) t.materials.push(this.parse(e.materials[r])); return t; }, }), (n.ObjectLoader = function (e) { (this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this.texturePath = ""); }), Object.assign(n.ObjectLoader.prototype, { load: function (e, t, i, r) { "" === this.texturePath && (this.texturePath = e.substring(0, e.lastIndexOf("/") + 1)); var o = this, a = new n.XHRLoader(o.manager); a.load( e, function (e) { o.parse(JSON.parse(e), t); }, i, r ); }, setTexturePath: function (e) { this.texturePath = e; }, setCrossOrigin: function (e) { this.crossOrigin = e; }, parse: function (e, t) { var i = this.parseGeometries(e.geometries), n = this.parseImages(e.images, function () { void 0 !== t && t(a); }), r = this.parseTextures(e.textures, n), o = this.parseMaterials(e.materials, r), a = this.parseObject(e.object, i, o); return e.animations && (a.animations = this.parseAnimations(e.animations)), (void 0 === e.images || 0 === e.images.length) && void 0 !== t && t(a), a; }, parseGeometries: function (e) { var t = {}; if (void 0 !== e) for (var i = new n.JSONLoader(), r = new n.BufferGeometryLoader(), o = 0, a = e.length; a > o; o++) { var s, l = e[o]; switch (l.type) { case "PlaneGeometry": case "PlaneBufferGeometry": s = new n[l.type](l.width, l.height, l.widthSegments, l.heightSegments); break; case "BoxGeometry": case "BoxBufferGeometry": case "CubeGeometry": s = new n[l.type](l.width, l.height, l.depth, l.widthSegments, l.heightSegments, l.depthSegments); break; case "CircleGeometry": case "CircleBufferGeometry": s = new n[l.type](l.radius, l.segments, l.thetaStart, l.thetaLength); break; case "CylinderGeometry": case "CylinderBufferGeometry": s = new n[l.type](l.radiusTop, l.radiusBottom, l.height, l.radialSegments, l.heightSegments, l.openEnded, l.thetaStart, l.thetaLength); break; case "ConeGeometry": case "ConeBufferGeometry": s = new n[l.type](l.radius, l.height, l.radialSegments, l.heightSegments, l.openEnded, l.thetaStart, l.thetaLength); break; case "SphereGeometry": case "SphereBufferGeometry": s = new n[l.type](l.radius, l.widthSegments, l.heightSegments, l.phiStart, l.phiLength, l.thetaStart, l.thetaLength); break; case "DodecahedronGeometry": case "IcosahedronGeometry": case "OctahedronGeometry": case "TetrahedronGeometry": s = new n[l.type](l.radius, l.detail); break; case "RingGeometry": case "RingBufferGeometry": s = new n[l.type](l.innerRadius, l.outerRadius, l.thetaSegments, l.phiSegments, l.thetaStart, l.thetaLength); break; case "TorusGeometry": case "TorusBufferGeometry": s = new n[l.type](l.radius, l.tube, l.radialSegments, l.tubularSegments, l.arc); break; case "TorusKnotGeometry": case "TorusKnotBufferGeometry": s = new n[l.type](l.radius, l.tube, l.tubularSegments, l.radialSegments, l.p, l.q); break; case "LatheGeometry": case "LatheBufferGeometry": s = new n[l.type](l.points, l.segments, l.phiStart, l.phiLength); break; case "BufferGeometry": s = r.parse(l); break; case "Geometry": s = i.parse(l.data, this.texturePath).geometry; break; default: console.warn('THREE.ObjectLoader: Unsupported geometry type "' + l.type + '"'); continue; } (s.uuid = l.uuid), void 0 !== l.name && (s.name = l.name), (t[l.uuid] = s); } return t; }, parseMaterials: function (e, t) { var i = {}; if (void 0 !== e) { var r = new n.MaterialLoader(); r.setTextures(t); for (var o = 0, a = e.length; a > o; o++) { var s = r.parse(e[o]); i[s.uuid] = s; } } return i; }, parseAnimations: function (e) { for (var t = [], i = 0; i < e.length; i++) { var r = n.AnimationClip.parse(e[i]); t.push(r); } return t; }, parseImages: function (e, t) { function i(e) { return ( r.manager.itemStart(e), s.load(e, function () { r.manager.itemEnd(e); }) ); } var r = this, o = {}; if (void 0 !== e && e.length > 0) { var a = new n.LoadingManager(t), s = new n.ImageLoader(a); s.setCrossOrigin(this.crossOrigin); for (var l = 0, c = e.length; c > l; l++) { var u = e[l], h = /^(//)|([a-z]+:(//)?)/i.test(u.url) ? u.url : r.texturePath + u.url; o[u.uuid] = i(h); } } return o; }, parseTextures: function (e, t) { function i(e) { return "number" == typeof e ? e : (console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.", e), n[e]); } var r = {}; if (void 0 !== e) for (var o = 0, a = e.length; a > o; o++) { var s = e[o]; void 0 === s.image && console.warn('THREE.ObjectLoader: No "image" specified for', s.uuid), void 0 === t[s.image] && console.warn("THREE.ObjectLoader: Undefined image", s.image); var l = new n.Texture(t[s.image]); (l.needsUpdate = !0), (l.uuid = s.uuid), void 0 !== s.name && (l.name = s.name), void 0 !== s.mapping && (l.mapping = i(s.mapping)), void 0 !== s.offset && l.offset.fromArray(s.offset), void 0 !== s.repeat && l.repeat.fromArray(s.repeat), void 0 !== s.wrap && ((l.wrapS = i(s.wrap[0])), (l.wrapT = i(s.wrap[1]))), void 0 !== s.minFilter && (l.minFilter = i(s.minFilter)), void 0 !== s.magFilter && (l.magFilter = i(s.magFilter)), void 0 !== s.anisotropy && (l.anisotropy = s.anisotropy), void 0 !== s.flipY && (l.flipY = s.flipY), (r[s.uuid] = l); } return r; }, parseObject: (function () { var e = new n.Matrix4(); return function (t, i, r) { function o(e) { return void 0 === i[e] && console.warn("THREE.ObjectLoader: Undefined geometry", e), i[e]; } function a(e) { return void 0 === e ? void 0 : (void 0 === r[e] && console.warn("THREE.ObjectLoader: Undefined material", e), r[e]); } var s; switch (t.type) { case "Scene": s = new n.Scene(); break; case "PerspectiveCamera": (s = new n.PerspectiveCamera(t.fov, t.aspect, t.near, t.far)), void 0 !== t.focus && (s.focus = t.focus), void 0 !== t.zoom && (s.zoom = t.zoom), void 0 !== t.filmGauge && (s.filmGauge = t.filmGauge), void 0 !== t.filmOffset && (s.filmOffset = t.filmOffset), void 0 !== t.view && (s.view = Object.assign({}, t.view)); break; case "OrthographicCamera": s = new n.OrthographicCamera(t.left, t.right, t.top, t.bottom, t.near, t.far); break; case "AmbientLight": s = new n.AmbientLight(t.color, t.intensity); break; case "DirectionalLight": s = new n.DirectionalLight(t.color, t.intensity); break; case "PointLight": s = new n.PointLight(t.color, t.intensity, t.distance, t.decay); break; case "SpotLight": s = new n.SpotLight(t.color, t.intensity, t.distance, t.angle, t.penumbra, t.decay); break; case "HemisphereLight": s = new n.HemisphereLight(t.color, t.groundColor, t.intensity); break; case "Mesh": var l = o(t.geometry), c = a(t.material); s = l.bones && l.bones.length > 0 ? new n.SkinnedMesh(l, c) : new n.Mesh(l, c); break; case "LOD": s = new n.LOD(); break; case "Line": s = new n.Line(o(t.geometry), a(t.material), t.mode); break; case "PointCloud": case "Points": s = new n.Points(o(t.geometry), a(t.material)); break; case "Sprite": s = new n.Sprite(a(t.material)); break; case "Group": s = new n.Group(); break; default: s = new n.Object3D(); } if ( ((s.uuid = t.uuid), void 0 !== t.name && (s.name = t.name), void 0 !== t.matrix ? (e.fromArray(t.matrix), e.decompose(s.position, s.quaternion, s.scale)) : (void 0 !== t.position && s.position.fromArray(t.position), void 0 !== t.rotation && s.rotation.fromArray(t.rotation), void 0 !== t.scale && s.scale.fromArray(t.scale)), void 0 !== t.castShadow && (s.castShadow = t.castShadow), void 0 !== t.receiveShadow && (s.receiveShadow = t.receiveShadow), void 0 !== t.visible && (s.visible = t.visible), void 0 !== t.userData && (s.userData = t.userData), void 0 !== t.children) ) for (var u in t.children) s.add(this.parseObject(t.children[u], i, r)); if ("LOD" === t.type) for (var h = t.levels, d = 0; d < h.length; d++) { var f = h[d], u = s.getObjectByProperty("uuid", f.object); void 0 !== u && s.addLevel(u, f.distance); } return s; }; })(), }), (n.TextureLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.TextureLoader.prototype, { load: function (e, t, i, r) { var o = new n.Texture(), a = new n.ImageLoader(this.manager); return ( a.setCrossOrigin(this.crossOrigin), a.setPath(this.path), a.load( e, function (i) { var r = e.search(/.(jpg|jpeg)$/) > 0 || 0 === e.search(/^data:image/jpeg/); (o.format = r ? n.RGBFormat : n.RGBAFormat), (o.image = i), (o.needsUpdate = !0), void 0 !== t && t(o); }, i, r ), o ); }, setCrossOrigin: function (e) { return (this.crossOrigin = e), this; }, setPath: function (e) { return (this.path = e), this; }, }), (n.CubeTextureLoader = function (e) { this.manager = void 0 !== e ? e : n.DefaultLoadingManager; }), Object.assign(n.CubeTextureLoader.prototype, { load: function (e, t, i, r) { function o(i) { s.load( e[i], function (e) { (a.images[i] = e), l++, 6 === l && ((a.needsUpdate = !0), t && t(a)); }, void 0, r ); } var a = new n.CubeTexture(), s = new n.ImageLoader(this.manager); s.setCrossOrigin(this.crossOrigin), s.setPath(this.path); for (var l = 0, c = 0; c < e.length; ++c) o(c); return a; }, setCrossOrigin: function (e) { return (this.crossOrigin = e), this; }, setPath: function (e) { return (this.path = e), this; }, }), (n.DataTextureLoader = n.BinaryTextureLoader = function (e) { (this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this._parser = null); }), Object.assign(n.BinaryTextureLoader.prototype, { load: function (e, t, i, r) { var o = this, a = new n.DataTexture(), s = new n.XHRLoader(this.manager); return ( s.setResponseType("arraybuffer"), s.load( e, function (e) { var i = o._parser(e); i && (void 0 !== i.image ? (a.image = i.image) : void 0 !== i.data && ((a.image.width = i.width), (a.image.height = i.height), (a.image.data = i.data)), (a.wrapS = void 0 !== i.wrapS ? i.wrapS : n.ClampToEdgeWrapping), (a.wrapT = void 0 !== i.wrapT ? i.wrapT : n.ClampToEdgeWrapping), (a.magFilter = void 0 !== i.magFilter ? i.magFilter : n.LinearFilter), (a.minFilter = void 0 !== i.minFilter ? i.minFilter : n.LinearMipMapLinearFilter), (a.anisotropy = void 0 !== i.anisotropy ? i.anisotropy : 1), void 0 !== i.format && (a.format = i.format), void 0 !== i.type && (a.type = i.type), void 0 !== i.mipmaps && (a.mipmaps = i.mipmaps), 1 === i.mipmapCount && (a.minFilter = n.LinearFilter), (a.needsUpdate = !0), t && t(a, i)); }, i, r ), a ); }, }), (n.CompressedTextureLoader = function (e) { (this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this._parser = null); }), Object.assign(n.CompressedTextureLoader.prototype, { load: function (e, t, i, r) { function o(o) { c.load( e[o], function (e) { var i = a._parser(e, !0); (s[o] = { width: i.width, height: i.height, format: i.format, mipmaps: i.mipmaps }), (u += 1), 6 === u && (1 === i.mipmapCount && (l.minFilter = n.LinearFilter), (l.format = i.format), (l.needsUpdate = !0), t && t(l)); }, i, r ); } var a = this, s = [], l = new n.CompressedTexture(); l.image = s; var c = new n.XHRLoader(this.manager); if ((c.setPath(this.path), c.setResponseType("arraybuffer"), Array.isArray(e))) for (var u = 0, h = 0, d = e.length; d > h; ++h) o(h); else c.load( e, function (e) { var i = a._parser(e, !0); if (i.isCubemap) for (var r = i.mipmaps.length / i.mipmapCount, o = 0; r > o; o++) { s[o] = { mipmaps: [] }; for (var c = 0; c < i.mipmapCount; c++) s[o].mipmaps.push(i.mipmaps[o * i.mipmapCount + c]), (s[o].format = i.format), (s[o].width = i.width), (s[o].height = i.height); } else(l.image.width = i.width), (l.image.height = i.height), (l.mipmaps = i.mipmaps); 1 === i.mipmapCount && (l.minFilter = n.LinearFilter), (l.format = i.format), (l.needsUpdate = !0), t && t(l); }, i, r ); return l; }, setPath: function (e) { return (this.path = e), this; }, }), (n.Material = function () { Object.defineProperty(this, "id", { value: n.MaterialIdCount++ }), (this.uuid = n.Math.generateUUID()), (this.name = ""), (this.type = "Material"), (this.fog = !0), (this.lights = !0), (this.blending = n.NormalBlending), (this.side = n.FrontSide), (this.shading = n.SmoothShading), (this.vertexColors = n.NoColors), (this.opacity = 1), (this.transparent = !1), (this.blendSrc = n.SrcAlphaFactor), (this.blendDst = n.OneMinusSrcAlphaFactor), (this.blendEquation = n.AddEquation), (this.blendSrcAlpha = null), (this.blendDstAlpha = null), (this.blendEquationAlpha = null), (this.depthFunc = n.LessEqualDepth), (this.depthTest = !0), (this.depthWrite = !0), (this.clippingPlanes = null), (this.clipShadows = !1), (this.colorWrite = !0), (this.precision = null), (this.polygonOffset = !1), (this.polygonOffsetFactor = 0), (this.polygonOffsetUnits = 0), (this.alphaTest = 0), (this.premultipliedAlpha = !1), (this.overdraw = 0), (this.visible = !0), (this._needsUpdate = !0); }), (n.Material.prototype = { constructor: n.Material, get needsUpdate() { return this._needsUpdate; }, set needsUpdate(e) { e === !0 && this.update(), (this._needsUpdate = e); }, setValues: function (e) { if (void 0 !== e) for (var t in e) { var i = e[t]; if (void 0 !== i) { var r = this[t]; void 0 !== r ? r instanceof n.Color ? r.set(i) : r instanceof n.Vector3 && i instanceof n.Vector3 ? r.copy(i) : "overdraw" === t ? (this[t] = Number(i)) : (this[t] = i) : console.warn("THREE." + this.type + ": '" + t + "' is not a property of this material."); } else console.warn("THREE.Material: '" + t + "' parameter is undefined."); } }, toJSON: function (e) { function t(e) { var t = []; for (var i in e) { var n = e[i]; delete n.metadata, t.push(n); } return t; } var i = void 0 === e; i && (e = { textures: {}, images: {} }); var r = { metadata: { version: 4.4, type: "Material", generator: "Material.toJSON" } }; if ( ((r.uuid = this.uuid), (r.type = this.type), "" !== this.name && (r.name = this.name), this.color instanceof n.Color && (r.color = this.color.getHex()), void 0 !== this.roughness && (r.roughness = this.roughness), void 0 !== this.metalness && (r.metalness = this.metalness), this.emissive instanceof n.Color && (r.emissive = this.emissive.getHex()), this.specular instanceof n.Color && (r.specular = this.specular.getHex()), void 0 !== this.shininess && (r.shininess = this.shininess), this.map instanceof n.Texture && (r.map = this.map.toJSON(e).uuid), this.alphaMap instanceof n.Texture && (r.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap instanceof n.Texture && (r.lightMap = this.lightMap.toJSON(e).uuid), this.bumpMap instanceof n.Texture && ((r.bumpMap = this.bumpMap.toJSON(e).uuid), (r.bumpScale = this.bumpScale)), this.normalMap instanceof n.Texture && ((r.normalMap = this.normalMap.toJSON(e).uuid), (r.normalScale = this.normalScale.toArray())), this.displacementMap instanceof n.Texture && ((r.displacementMap = this.displacementMap.toJSON(e).uuid), (r.displacementScale = this.displacementScale), (r.displacementBias = this.displacementBias)), this.roughnessMap instanceof n.Texture && (r.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap instanceof n.Texture && (r.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap instanceof n.Texture && (r.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap instanceof n.Texture && (r.specularMap = this.specularMap.toJSON(e).uuid), this.envMap instanceof n.Texture && ((r.envMap = this.envMap.toJSON(e).uuid), (r.reflectivity = this.reflectivity)), void 0 !== this.size && (r.size = this.size), void 0 !== this.sizeAttenuation && (r.sizeAttenuation = this.sizeAttenuation), this.blending !== n.NormalBlending && (r.blending = this.blending), this.shading !== n.SmoothShading && (r.shading = this.shading), this.side !== n.FrontSide && (r.side = this.side), this.vertexColors !== n.NoColors && (r.vertexColors = this.vertexColors), this.opacity < 1 && (r.opacity = this.opacity), this.transparent === !0 && (r.transparent = this.transparent), this.alphaTest > 0 && (r.alphaTest = this.alphaTest), this.premultipliedAlpha === !0 && (r.premultipliedAlpha = this.premultipliedAlpha), this.wireframe === !0 && (r.wireframe = this.wireframe), this.wireframeLinewidth > 1 && (r.wireframeLinewidth = this.wireframeLinewidth), i) ) { var o = t(e.textures), a = t(e.images); o.length > 0 && (r.textures = o), a.length > 0 && (r.images = a); } return r; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { (this.name = e.name), (this.fog = e.fog), (this.lights = e.lights), (this.blending = e.blending), (this.side = e.side), (this.shading = e.shading), (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.colorWrite = e.colorWrite), (this.precision = e.precision), (this.polygonOffset = e.polygonOffset), (this.polygonOffsetFactor = e.polygonOffsetFactor), (this.polygonOffsetUnits = e.polygonOffsetUnits), (this.alphaTest = e.alphaTest), (this.premultipliedAlpha = e.premultipliedAlpha), (this.overdraw = e.overdraw), (this.visible = e.visible), (this.clipShadows = e.clipShadows); var t = e.clippingPlanes, i = null; if (null !== t) { var n = t.length; i = new Array(n); for (var r = 0; r !== n; ++r) i[r] = t[r].clone(); } return (this.clippingPlanes = i), this; }, update: function () { this.dispatchEvent({ type: "update" }); }, dispose: function () { this.dispatchEvent({ type: "dispose" }); }, }), Object.assign(n.Material.prototype, n.EventDispatcher.prototype), (n.MaterialIdCount = 0), (n.LineBasicMaterial = function (e) { n.Material.call(this), (this.type = "LineBasicMaterial"), (this.color = new n.Color(16777215)), (this.linewidth = 1), (this.linecap = "round"), (this.linejoin = "round"), (this.lights = !1), this.setValues(e); }), (n.LineBasicMaterial.prototype = Object.create(n.Material.prototype)), (n.LineBasicMaterial.prototype.constructor = n.LineBasicMaterial), (n.LineBasicMaterial.prototype.copy = function (e) { return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.linewidth = e.linewidth), (this.linecap = e.linecap), (this.linejoin = e.linejoin), this; }), (n.LineDashedMaterial = function (e) { n.Material.call(this), (this.type = "LineDashedMaterial"), (this.color = new n.Color(16777215)), (this.linewidth = 1), (this.scale = 1), (this.dashSize = 3), (this.gapSize = 1), (this.lights = !1), this.setValues(e); }), (n.LineDashedMaterial.prototype = Object.create(n.Material.prototype)), (n.LineDashedMaterial.prototype.constructor = n.LineDashedMaterial), (n.LineDashedMaterial.prototype.copy = function (e) { return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.linewidth = e.linewidth), (this.scale = e.scale), (this.dashSize = e.dashSize), (this.gapSize = e.gapSize), this; }), (n.MeshBasicMaterial = function (e) { n.Material.call(this), (this.type = "MeshBasicMaterial"), (this.color = new n.Color(16777215)), (this.map = null), (this.aoMap = null), (this.aoMapIntensity = 1), (this.specularMap = null), (this.alphaMap = null), (this.envMap = null), (this.combine = n.MultiplyOperation), (this.reflectivity = 1), (this.refractionRatio = 0.98), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = "round"), (this.wireframeLinejoin = "round"), (this.skinning = !1), (this.morphTargets = !1), (this.lights = !1), this.setValues(e); }), (n.MeshBasicMaterial.prototype = Object.create(n.Material.prototype)), (n.MeshBasicMaterial.prototype.constructor = n.MeshBasicMaterial), (n.MeshBasicMaterial.prototype.copy = function (e) { return ( n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (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.skinning = e.skinning), (this.morphTargets = e.morphTargets), this ); }), (n.MeshDepthMaterial = function (e) { n.Material.call(this), (this.type = "MeshDepthMaterial"), (this.depthPacking = n.BasicDepthPacking), (this.skinning = !1), (this.morphTargets = !1), (this.map = null), (this.alphaMap = null), (this.displacementMap = null), (this.displacementScale = 1), (this.displacementBias = 0), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.fog = !1), (this.lights = !1), this.setValues(e); }), (n.MeshDepthMaterial.prototype = Object.create(n.Material.prototype)), (n.MeshDepthMaterial.prototype.constructor = n.MeshDepthMaterial), (n.MeshDepthMaterial.prototype.copy = function (e) { return ( n.Material.prototype.copy.call(this, e), (this.depthPacking = e.depthPacking), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.map = e.map), (this.alphaMap = e.alphaMap), (this.displacementMap = e.displacementMap), (this.displacementScale = e.displacementScale), (this.displacementBias = e.displacementBias), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), this ); }), (n.MeshLambertMaterial = function (e) { n.Material.call(this), (this.type = "MeshLambertMaterial"), (this.color = new n.Color(16777215)), (this.map = null), (this.lightMap = null), (this.lightMapIntensity = 1), (this.aoMap = null), (this.aoMapIntensity = 1), (this.emissive = new n.Color(0)), (this.emissiveIntensity = 1), (this.emissiveMap = null), (this.specularMap = null), (this.alphaMap = null), (this.envMap = null), (this.combine = n.MultiplyOperation), (this.reflectivity = 1), (this.refractionRatio = 0.98), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = "round"), (this.wireframeLinejoin = "round"), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), this.setValues(e); }), (n.MeshLambertMaterial.prototype = Object.create(n.Material.prototype)), (n.MeshLambertMaterial.prototype.constructor = n.MeshLambertMaterial), (n.MeshLambertMaterial.prototype.copy = function (e) { return ( n.Material.prototype.copy.call(this, 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.emissive.copy(e.emissive), (this.emissiveMap = e.emissiveMap), (this.emissiveIntensity = e.emissiveIntensity), (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.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), this ); }), (n.MeshNormalMaterial = function (e) { n.Material.call(this, e), (this.type = "MeshNormalMaterial"), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.fog = !1), (this.lights = !1), (this.morphTargets = !1), this.setValues(e); }), (n.MeshNormalMaterial.prototype = Object.create(n.Material.prototype)), (n.MeshNormalMaterial.prototype.constructor = n.MeshNormalMaterial), (n.MeshNormalMaterial.prototype.copy = function (e) { return n.Material.prototype.copy.call(this, e), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), this; }), (n.MeshPhongMaterial = function (e) { n.Material.call(this), (this.type = "MeshPhongMaterial"), (this.color = new n.Color(16777215)), (this.specular = new n.Color(1118481)), (this.shininess = 30), (this.map = null), (this.lightMap = null), (this.lightMapIntensity = 1), (this.aoMap = null), (this.aoMapIntensity = 1), (this.emissive = new n.Color(0)), (this.emissiveIntensity = 1), (this.emissiveMap = null), (this.bumpMap = null), (this.bumpScale = 1), (this.normalMap = null), (this.normalScale = new n.Vector2(1, 1)), (this.displacementMap = null), (this.displacementScale = 1), (this.displacementBias = 0), (this.specularMap = null), (this.alphaMap = null), (this.envMap = null), (this.combine = n.MultiplyOperation), (this.reflectivity = 1), (this.refractionRatio = 0.98), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = "round"), (this.wireframeLinejoin = "round"), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), this.setValues(e); }), (n.MeshPhongMaterial.prototype = Object.create(n.Material.prototype)), (n.MeshPhongMaterial.prototype.constructor = n.MeshPhongMaterial), (n.MeshPhongMaterial.prototype.copy = function (e) { return ( n.Material.prototype.copy.call(this, e), this.color.copy(e.color), this.specular.copy(e.specular), (this.shininess = e.shininess), (this.map = e.map), (this.lightMap = e.lightMap), (this.lightMapIntensity = e.lightMapIntensity), (this.aoMap = e.aoMap), (this.aoMapIntensity = e.aoMapIntensity), this.emissive.copy(e.emissive), (this.emissiveMap = e.emissiveMap), (this.emissiveIntensity = e.emissiveIntensity), (this.bumpMap = e.bumpMap), (this.bumpScale = e.bumpScale), (this.normalMap = e.normalMap), this.normalScale.copy(e.normalScale), (this.displacementMap = e.displacementMap), (this.displacementScale = e.displacementScale), (this.displacementBias = e.displacementBias), (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.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), this ); }), (n.MeshStandardMaterial = function (e) { n.Material.call(this), (this.defines = { STANDARD: "" }), (this.type = "MeshStandardMaterial"), (this.color = new n.Color(16777215)), (this.roughness = 0.5), (this.metalness = 0.5), (this.map = null), (this.lightMap = null), (this.lightMapIntensity = 1), (this.aoMap = null), (this.aoMapIntensity = 1), (this.emissive = new n.Color(0)), (this.emissiveIntensity = 1), (this.emissiveMap = null), (this.bumpMap = null), (this.bumpScale = 1), (this.normalMap = null), (this.normalScale = new n.Vector2(1, 1)), (this.displacementMap = null), (this.displacementScale = 1), (this.displacementBias = 0), (this.roughnessMap = null), (this.metalnessMap = null), (this.alphaMap = null), (this.envMap = null), (this.envMapIntensity = 1), (this.refractionRatio = 0.98), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = "round"), (this.wireframeLinejoin = "round"), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), this.setValues(e); }), (n.MeshStandardMaterial.prototype = Object.create(n.Material.prototype)), (n.MeshStandardMaterial.prototype.constructor = n.MeshStandardMaterial), (n.MeshStandardMaterial.prototype.copy = function (e) { return ( n.Material.prototype.copy.call(this, e), (this.defines = { STANDARD: "" }), this.color.copy(e.color), (this.roughness = e.roughness), (this.metalness = e.metalness), (this.map = e.map), (this.lightMap = e.lightMap), (this.lightMapIntensity = e.lightMapIntensity), (this.aoMap = e.aoMap), (this.aoMapIntensity = e.aoMapIntensity), this.emissive.copy(e.emissive), (this.emissiveMap = e.emissiveMap), (this.emissiveIntensity = e.emissiveIntensity), (this.bumpMap = e.bumpMap), (this.bumpScale = e.bumpScale), (this.normalMap = e.normalMap), this.normalScale.copy(e.normalScale), (this.displacementMap = e.displacementMap), (this.displacementScale = e.displacementScale), (this.displacementBias = e.displacementBias), (this.roughnessMap = e.roughnessMap), (this.metalnessMap = e.metalnessMap), (this.alphaMap = e.alphaMap), (this.envMap = e.envMap), (this.envMapIntensity = e.envMapIntensity), (this.refractionRatio = e.refractionRatio), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.wireframeLinecap = e.wireframeLinecap), (this.wireframeLinejoin = e.wireframeLinejoin), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), this ); }), (n.MeshPhysicalMaterial = function (e) { n.MeshStandardMaterial.call(this), (this.defines = { PHYSICAL: "" }), (this.type = "MeshPhysicalMaterial"), (this.reflectivity = 0.5), (this.clearCoat = 0), (this.clearCoatRoughness = 0), this.setValues(e); }), (n.MeshPhysicalMaterial.prototype = Object.create(n.MeshStandardMaterial.prototype)), (n.MeshPhysicalMaterial.prototype.constructor = n.MeshPhysicalMaterial), (n.MeshPhysicalMaterial.prototype.copy = function (e) { return ( n.MeshStandardMaterial.prototype.copy.call(this, e), (this.defines = { PHYSICAL: "" }), (this.reflectivity = e.reflectivity), (this.clearCoat = e.clearCoat), (this.clearCoatRoughness = e.clearCoatRoughness), this ); }), (n.MultiMaterial = function (e) { (this.uuid = n.Math.generateUUID()), (this.type = "MultiMaterial"), (this.materials = e instanceof Array ? e : []), (this.visible = !0); }), (n.MultiMaterial.prototype = { constructor: n.MultiMaterial, toJSON: function (e) { for (var t = { metadata: { version: 4.2, type: "material", generator: "MaterialExporter" }, uuid: this.uuid, type: this.type, materials: [] }, i = this.materials, n = 0, r = i.length; r > n; n++) { var o = i[n].toJSON(e); delete o.metadata, t.materials.push(o); } return (t.visible = this.visible), t; }, clone: function () { for (var e = new this.constructor(), t = 0; t < this.materials.length; t++) e.materials.push(this.materials[t].clone()); return (e.visible = this.visible), e; }, }), (n.PointsMaterial = function (e) { n.Material.call(this), (this.type = "PointsMaterial"), (this.color = new n.Color(16777215)), (this.map = null), (this.size = 1), (this.sizeAttenuation = !0), (this.lights = !1), this.setValues(e); }), (n.PointsMaterial.prototype = Object.create(n.Material.prototype)), (n.PointsMaterial.prototype.constructor = n.PointsMaterial), (n.PointsMaterial.prototype.copy = function (e) { return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.size = e.size), (this.sizeAttenuation = e.sizeAttenuation), this; }), (n.ShaderMaterial = function (e) { n.Material.call(this), (this.type = "ShaderMaterial"), (this.defines = {}), (this.uniforms = {}), (this.vertexShader = "void main() {n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );n}"), (this.fragmentShader = "void main() {n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );n}"), (this.linewidth = 1), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.fog = !1), (this.lights = !1), (this.clipping = !1), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), (this.extensions = { derivatives: !1, fragDepth: !1, drawBuffers: !1, shaderTextureLOD: !1 }), (this.defaultAttributeValues = { color: [1, 1, 1], uv: [0, 0], uv2: [0, 0] }), (this.index0AttributeName = void 0), void 0 !== e && (void 0 !== e.attributes && console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."), this.setValues(e)); }), (n.ShaderMaterial.prototype = Object.create(n.Material.prototype)), (n.ShaderMaterial.prototype.constructor = n.ShaderMaterial), (n.ShaderMaterial.prototype.copy = function (e) { return ( n.Material.prototype.copy.call(this, e), (this.fragmentShader = e.fragmentShader), (this.vertexShader = e.vertexShader), (this.uniforms = n.UniformsUtils.clone(e.uniforms)), (this.defines = e.defines), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.lights = e.lights), (this.clipping = e.clipping), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), (this.extensions = e.extensions), this ); }), (n.ShaderMaterial.prototype.toJSON = function (e) { var t = n.Material.prototype.toJSON.call(this, e); return (t.uniforms = this.uniforms), (t.vertexShader = this.vertexShader), (t.fragmentShader = this.fragmentShader), t; }), (n.RawShaderMaterial = function (e) { n.ShaderMaterial.call(this, e), (this.type = "RawShaderMaterial"); }), (n.RawShaderMaterial.prototype = Object.create(n.ShaderMaterial.prototype)), (n.RawShaderMaterial.prototype.constructor = n.RawShaderMaterial), (n.SpriteMaterial = function (e) { n.Material.call(this), (this.type = "SpriteMaterial"), (this.color = new n.Color(16777215)), (this.map = null), (this.rotation = 0), (this.fog = !1), (this.lights = !1), this.setValues(e); }), (n.SpriteMaterial.prototype = Object.create(n.Material.prototype)), (n.SpriteMaterial.prototype.constructor = n.SpriteMaterial), (n.SpriteMaterial.prototype.copy = function (e) { return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.rotation = e.rotation), this; }), (n.ShadowMaterial = function () { n.ShaderMaterial.call(this, { uniforms: n.UniformsUtils.merge([n.UniformsLib.lights, { opacity: { value: 1 } }]), vertexShader: n.ShaderChunk.shadow_vert, fragmentShader: n.ShaderChunk.shadow_frag }), (this.lights = !0), (this.transparent = !0), Object.defineProperties(this, { opacity: { enumerable: !0, get: function () { return this.uniforms.opacity.value; }, set: function (e) { this.uniforms.opacity.value = e; }, }, }); }), (n.ShadowMaterial.prototype = Object.create(n.ShaderMaterial.prototype)), (n.ShadowMaterial.prototype.constructor = n.ShadowMaterial), (n.Texture = function (e, t, i, r, o, a, s, l, c, u) { Object.defineProperty(this, "id", { value: n.TextureIdCount++ }), (this.uuid = n.Math.generateUUID()), (this.name = ""), (this.sourceFile = ""), (this.image = void 0 !== e ? e : n.Texture.DEFAULT_IMAGE), (this.mipmaps = []), (this.mapping = void 0 !== t ? t : n.Texture.DEFAULT_MAPPING), (this.wrapS = void 0 !== i ? i : n.ClampToEdgeWrapping), (this.wrapT = void 0 !== r ? r : n.ClampToEdgeWrapping), (this.magFilter = void 0 !== o ? o : n.LinearFilter), (this.minFilter = void 0 !== a ? a : n.LinearMipMapLinearFilter), (this.anisotropy = void 0 !== c ? c : 1), (this.format = void 0 !== s ? s : n.RGBAFormat), (this.type = void 0 !== l ? l : n.UnsignedByteType), (this.offset = new n.Vector2(0, 0)), (this.repeat = new n.Vector2(1, 1)), (this.generateMipmaps = !0), (this.premultiplyAlpha = !1), (this.flipY = !0), (this.unpackAlignment = 4), (this.encoding = void 0 !== u ? u : n.LinearEncoding), (this.version = 0), (this.onUpdate = null); }), (n.Texture.DEFAULT_IMAGE = void 0), (n.Texture.DEFAULT_MAPPING = n.UVMapping), (n.Texture.prototype = { constructor: n.Texture, set needsUpdate(e) { e === !0 && this.version++; }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return ( (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.type = e.type), this.offset.copy(e.offset), this.repeat.copy(e.repeat), (this.generateMipmaps = e.generateMipmaps), (this.premultiplyAlpha = e.premultiplyAlpha), (this.flipY = e.flipY), (this.unpackAlignment = e.unpackAlignment), (this.encoding = e.encoding), this ); }, toJSON: function (e) { function t(e) { var t; return ( void 0 !== e.toDataURL ? (t = e) : ((t = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")), (t.width = e.width), (t.height = e.height), t.getContext("2d").drawImage(e, 0, 0, e.width, e.height)), t.width > 2048 || t.height > 2048 ? t.toDataURL("image/jpeg", 0.6) : t.toDataURL("image/png") ); } if (void 0 !== e.textures[this.uuid]) return e.textures[this.uuid]; var i = { metadata: { version: 4.4, 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], wrap: [this.wrapS, this.wrapT], minFilter: this.minFilter, magFilter: this.magFilter, anisotropy: this.anisotropy, flipY: this.flipY, }; if (void 0 !== this.image) { var r = this.image; void 0 === r.uuid && (r.uuid = n.Math.generateUUID()), void 0 === e.images[r.uuid] && (e.images[r.uuid] = { uuid: r.uuid, url: t(r) }), (i.image = r.uuid); } return (e.textures[this.uuid] = i), i; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); }, transformUv: function (e) { if (this.mapping === n.UVMapping) { if ((e.multiply(this.repeat), e.add(this.offset), e.x < 0 || e.x > 1)) switch (this.wrapS) { case n.RepeatWrapping: e.x = e.x - Math.floor(e.x); break; case n.ClampToEdgeWrapping: e.x = e.x < 0 ? 0 : 1; break; case n.MirroredRepeatWrapping: 1 === Math.abs(Math.floor(e.x) % 2) ? (e.x = Math.ceil(e.x) - e.x) : (e.x = e.x - Math.floor(e.x)); } if (e.y < 0 || e.y > 1) switch (this.wrapT) { case n.RepeatWrapping: e.y = e.y - Math.floor(e.y); break; case n.ClampToEdgeWrapping: e.y = e.y < 0 ? 0 : 1; break; case n.MirroredRepeatWrapping: 1 === Math.abs(Math.floor(e.y) % 2) ? (e.y = Math.ceil(e.y) - e.y) : (e.y = e.y - Math.floor(e.y)); } this.flipY && (e.y = 1 - e.y); } }, }), Object.assign(n.Texture.prototype, n.EventDispatcher.prototype), (n.TextureIdCount = 0), (n.DepthTexture = function (e, t, i, r, o, a, s, l, c) { n.Texture.call(this, null, r, o, a, s, l, n.DepthFormat, i, c), (this.image = { width: e, height: t }), (this.type = void 0 !== i ? i : n.UnsignedShortType), (this.magFilter = void 0 !== s ? s : n.NearestFilter), (this.minFilter = void 0 !== l ? l : n.NearestFilter), (this.flipY = !1), (this.generateMipmaps = !1); }), (n.DepthTexture.prototype = Object.create(n.Texture.prototype)), (n.DepthTexture.prototype.constructor = n.DepthTexture), (n.CanvasTexture = function (e, t, i, r, o, a, s, l, c) { n.Texture.call(this, e, t, i, r, o, a, s, l, c), (this.needsUpdate = !0); }), (n.CanvasTexture.prototype = Object.create(n.Texture.prototype)), (n.CanvasTexture.prototype.constructor = n.CanvasTexture), (n.CubeTexture = function (e, t, i, r, o, a, s, l, c, u) { (e = void 0 !== e ? e : []), (t = void 0 !== t ? t : n.CubeReflectionMapping), n.Texture.call(this, e, t, i, r, o, a, s, l, c, u), (this.flipY = !1); }), (n.CubeTexture.prototype = Object.create(n.Texture.prototype)), (n.CubeTexture.prototype.constructor = n.CubeTexture), Object.defineProperty(n.CubeTexture.prototype, "images", { get: function () { return this.image; }, set: function (e) { this.image = e; }, }), (n.CompressedTexture = function (e, t, i, r, o, a, s, l, c, u, h, d) { n.Texture.call(this, null, a, s, l, c, u, r, o, h, d), (this.image = { width: t, height: i }), (this.mipmaps = e), (this.flipY = !1), (this.generateMipmaps = !1); }), (n.CompressedTexture.prototype = Object.create(n.Texture.prototype)), (n.CompressedTexture.prototype.constructor = n.CompressedTexture), (n.DataTexture = function (e, t, i, r, o, a, s, l, c, u, h, d) { n.Texture.call(this, null, a, s, l, c, u, r, o, h, d), (this.image = { data: e, width: t, height: i }), (this.magFilter = void 0 !== c ? c : n.NearestFilter), (this.minFilter = void 0 !== u ? u : n.NearestFilter), (this.flipY = !1), (this.generateMipmaps = !1); }), (n.DataTexture.prototype = Object.create(n.Texture.prototype)), (n.DataTexture.prototype.constructor = n.DataTexture), (n.VideoTexture = function (e, t, i, r, o, a, s, l, c) { function u() { requestAnimationFrame(u), e.readyState >= e.HAVE_CURRENT_DATA && (h.needsUpdate = !0); } n.Texture.call(this, e, t, i, r, o, a, s, l, c), (this.generateMipmaps = !1); var h = this; u(); }), (n.VideoTexture.prototype = Object.create(n.Texture.prototype)), (n.VideoTexture.prototype.constructor = n.VideoTexture), (n.Group = function () { n.Object3D.call(this), (this.type = "Group"); }), (n.Group.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Group })), (n.Points = function (e, t) { n.Object3D.call(this), (this.type = "Points"), (this.geometry = void 0 !== e ? e : new n.BufferGeometry()), (this.material = void 0 !== t ? t : new n.PointsMaterial({ color: 16777215 * Math.random() })); }), (n.Points.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Points, raycast: (function () { var e = new n.Matrix4(), t = new n.Ray(), i = new n.Sphere(); return function (r, o) { function a(e, i) { var n = t.distanceSqToPoint(e); if (d > n) { var a = t.closestPointToPoint(e); a.applyMatrix4(c); var l = r.ray.origin.distanceTo(a); if (l < r.near || l > r.far) return; o.push({ distance: l, distanceToRay: Math.sqrt(n), point: a.clone(), index: i, face: null, object: s }); } } var s = this, l = this.geometry, c = this.matrixWorld, u = r.params.Points.threshold; if ((null === l.boundingSphere && l.computeBoundingSphere(), i.copy(l.boundingSphere), i.applyMatrix4(c), r.ray.intersectsSphere(i) !== !1)) { e.getInverse(c), t.copy(r.ray).applyMatrix4(e); var h = u / ((this.scale.x + this.scale.y + this.scale.z) / 3), d = h * h, f = new n.Vector3(); if (l instanceof n.BufferGeometry) { var p = l.index, m = l.attributes, v = m.position.array; if (null !== p) for (var g = p.array, y = 0, _ = g.length; _ > y; y++) { var b = g[y]; f.fromArray(v, 3 * b), a(f, b); } else for (var y = 0, x = v.length / 3; x > y; y++) f.fromArray(v, 3 * y), a(f, y); } else for (var w = l.vertices, y = 0, x = w.length; x > y; y++) a(w[y], y); } }; })(), clone: function () { return new this.constructor(this.geometry, this.material).copy(this); }, })), (n.Line = function (e, t, i) { return 1 === i ? (console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."), new n.LineSegments(e, t)) : (n.Object3D.call(this), (this.type = "Line"), (this.geometry = void 0 !== e ? e : new n.BufferGeometry()), void(this.material = void 0 !== t ? t : new n.LineBasicMaterial({ color: 16777215 * Math.random() }))); }), (n.Line.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Line, raycast: (function () { var e = new n.Matrix4(), t = new n.Ray(), i = new n.Sphere(); return function (r, o) { var a = r.linePrecision, s = a * a, l = this.geometry, c = this.matrixWorld; if ((null === l.boundingSphere && l.computeBoundingSphere(), i.copy(l.boundingSphere), i.applyMatrix4(c), r.ray.intersectsSphere(i) !== !1)) { e.getInverse(c), t.copy(r.ray).applyMatrix4(e); var u = new n.Vector3(), h = new n.Vector3(), d = new n.Vector3(), f = new n.Vector3(), p = this instanceof n.LineSegments ? 2 : 1; if (l instanceof n.BufferGeometry) { var m = l.index, v = l.attributes, g = v.position.array; if (null !== m) for (var y = m.array, _ = 0, b = y.length - 1; b > _; _ += p) { var x = y[_], w = y[_ + 1]; u.fromArray(g, 3 * x), h.fromArray(g, 3 * w); var M = t.distanceSqToSegment(u, h, f, d); if (!(M > s)) { f.applyMatrix4(this.matrixWorld); var T = r.ray.origin.distanceTo(f); T < r.near || T > r.far || o.push({ distance: T, point: d.clone().applyMatrix4(this.matrixWorld), index: _, face: null, faceIndex: null, object: this }); } } else for (var _ = 0, b = g.length / 3 - 1; b > _; _ += p) { u.fromArray(g, 3 * _), h.fromArray(g, 3 * _ + 3); var M = t.distanceSqToSegment(u, h, f, d); if (!(M > s)) { f.applyMatrix4(this.matrixWorld); var T = r.ray.origin.distanceTo(f); T < r.near || T > r.far || o.push({ distance: T, point: d.clone().applyMatrix4(this.matrixWorld), index: _, face: null, faceIndex: null, object: this }); } } } else if (l instanceof n.Geometry) for (var S = l.vertices, E = S.length, _ = 0; E - 1 > _; _ += p) { var M = t.distanceSqToSegment(S[_], S[_ + 1], f, d); if (!(M > s)) { f.applyMatrix4(this.matrixWorld); var T = r.ray.origin.distanceTo(f); T < r.near || T > r.far || o.push({ distance: T, point: d.clone().applyMatrix4(this.matrixWorld), index: _, face: null, faceIndex: null, object: this }); } } } }; })(), clone: function () { return new this.constructor(this.geometry, this.material).copy(this); }, })), (n.LineSegments = function (e, t) { n.Line.call(this, e, t), (this.type = "LineSegments"); }), (n.LineSegments.prototype = Object.assign(Object.create(n.Line.prototype), { constructor: n.LineSegments })), (n.Mesh = function (e, t) { n.Object3D.call(this), (this.type = "Mesh"), (this.geometry = void 0 !== e ? e : new n.BufferGeometry()), (this.material = void 0 !== t ? t : new n.MeshBasicMaterial({ color: 16777215 * Math.random() })), (this.drawMode = n.TrianglesDrawMode), this.updateMorphTargets(); }), (n.Mesh.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Mesh, setDrawMode: function (e) { this.drawMode = e; }, copy: function (e) { return n.Object3D.prototype.copy.call(this, e), (this.drawMode = e.drawMode), this; }, updateMorphTargets: function () { if (void 0 !== this.geometry.morphTargets && this.geometry.morphTargets.length > 0) { (this.morphTargetBase = -1), (this.morphTargetInfluences = []), (this.morphTargetDictionary = {}); for (var e = 0, t = this.geometry.morphTargets.length; t > e; e++) this.morphTargetInfluences.push(0), (this.morphTargetDictionary[this.geometry.morphTargets[e].name] = e); } }, getMorphTargetIndexByName: function (e) { return void 0 !== this.morphTargetDictionary[e] ? this.morphTargetDictionary[e] : (console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target " + e + " does not exist. Returning 0."), 0); }, raycast: (function () { function e(e, t, i, r, o, a, s) { return n.Triangle.barycoordFromPoint(e, t, i, r, v), o.multiplyScalar(v.x), a.multiplyScalar(v.y), s.multiplyScalar(v.z), o.add(a).add(s), o.clone(); } function t(e, t, i, r, o, a, s) { var l, c = e.material; if (((l = c.side === n.BackSide ? i.intersectTriangle(a, o, r, !0, s) : i.intersectTriangle(r, o, a, c.side !== n.DoubleSide, s)), null === l)) return null; y.copy(s), y.applyMatrix4(e.matrixWorld); var u = t.ray.origin.distanceTo(y); return u < t.near || u > t.far ? null : { distance: u, point: y.clone(), object: e }; } function i(i, r, o, a, u, h, d, v) { s.fromArray(a, 3 * h), l.fromArray(a, 3 * d), c.fromArray(a, 3 * v); var y = t(i, r, o, s, l, c, g); return y && (u && (f.fromArray(u, 2 * h), p.fromArray(u, 2 * d), m.fromArray(u, 2 * v), (y.uv = e(g, s, l, c, f, p, m))), (y.face = new n.Face3(h, d, v, n.Triangle.normal(s, l, c))), (y.faceIndex = h)), y; } var r = new n.Matrix4(), o = new n.Ray(), a = new n.Sphere(), s = new n.Vector3(), l = new n.Vector3(), c = new n.Vector3(), u = new n.Vector3(), h = new n.Vector3(), d = new n.Vector3(), f = new n.Vector2(), p = new n.Vector2(), m = new n.Vector2(), v = new n.Vector3(), g = new n.Vector3(), y = new n.Vector3(); return function (v, y) { var _ = this.geometry, b = this.material, x = this.matrixWorld; if ( void 0 !== b && (null === _.boundingSphere && _.computeBoundingSphere(), a.copy(_.boundingSphere), a.applyMatrix4(x), v.ray.intersectsSphere(a) !== !1 && (r.getInverse(x), o.copy(v.ray).applyMatrix4(r), null === _.boundingBox || o.intersectsBox(_.boundingBox) !== !1)) ) { var w, M; if (_ instanceof n.BufferGeometry) { var T, S, E, A = _.index, C = _.attributes, P = C.position.array; if ((void 0 !== C.uv && (w = C.uv.array), null !== A)) for (var L = A.array, R = 0, O = L.length; O > R; R += 3)(T = L[R]), (S = L[R + 1]), (E = L[R + 2]), (M = i(this, v, o, P, w, T, S, E)), M && ((M.faceIndex = Math.floor(R / 3)), y.push(M)); else for (var R = 0, O = P.length; O > R; R += 9)(T = R / 3), (S = T + 1), (E = T + 2), (M = i(this, v, o, P, w, T, S, E)), M && ((M.index = T), y.push(M)); } else if (_ instanceof n.Geometry) { var k, D, I, N = b instanceof n.MultiMaterial, U = N === !0 ? b.materials : null, j = _.vertices, B = _.faces, F = _.faceVertexUvs[0]; F.length > 0 && (w = F); for (var V = 0, G = B.length; G > V; V++) { var z = B[V], $ = N === !0 ? U[z.materialIndex] : b; if (void 0 !== $) { if (((k = j[z.a]), (D = j[z.b]), (I = j[z.c]), $.morphTargets === !0)) { var H = _.morphTargets, W = this.morphTargetInfluences; s.set(0, 0, 0), l.set(0, 0, 0), c.set(0, 0, 0); for (var X = 0, Y = H.length; Y > X; X++) { var q = W[X]; if (0 !== q) { var Z = H[X].vertices; s.addScaledVector(u.subVectors(Z[z.a], k), q), l.addScaledVector(h.subVectors(Z[z.b], D), q), c.addScaledVector(d.subVectors(Z[z.c], I), q); } } s.add(k), l.add(D), c.add(I), (k = s), (D = l), (I = c); } if ((M = t(this, v, o, k, D, I, g))) { if (w) { var K = w[V]; f.copy(K[0]), p.copy(K[1]), m.copy(K[2]), (M.uv = e(g, k, D, I, f, p, m)); } (M.face = z), (M.faceIndex = V), y.push(M); } } } } } }; })(), clone: function () { return new this.constructor(this.geometry, this.material).copy(this); }, })), (n.Bone = function (e) { n.Object3D.call(this), (this.type = "Bone"), (this.skin = e); }), (n.Bone.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Bone, copy: function (e) { return n.Object3D.prototype.copy.call(this, e), (this.skin = e.skin), this; }, })), (n.Skeleton = function (e, t, i) { if (((this.useVertexTexture = void 0 !== i ? i : !0), (this.identityMatrix = new n.Matrix4()), (e = e || []), (this.bones = e.slice(0)), this.useVertexTexture)) { var r = Math.sqrt(4 * this.bones.length); (r = n.Math.nextPowerOfTwo(Math.ceil(r))), (r = Math.max(r, 4)), (this.boneTextureWidth = r), (this.boneTextureHeight = r), (this.boneMatrices = new Float32Array(this.boneTextureWidth * this.boneTextureHeight * 4)), (this.boneTexture = new n.DataTexture(this.boneMatrices, this.boneTextureWidth, this.boneTextureHeight, n.RGBAFormat, n.FloatType)); } else this.boneMatrices = new Float32Array(16 * this.bones.length); if (void 0 === t) this.calculateInverses(); else if (this.bones.length === t.length) this.boneInverses = t.slice(0); else { console.warn("THREE.Skeleton bonInverses is the wrong length."), (this.boneInverses = []); for (var o = 0, a = this.bones.length; a > o; o++) this.boneInverses.push(new n.Matrix4()); } }), Object.assign(n.Skeleton.prototype, { calculateInverses: function () { this.boneInverses = []; for (var e = 0, t = this.bones.length; t > e; e++) { var i = new n.Matrix4(); this.bones[e] && i.getInverse(this.bones[e].matrixWorld), this.boneInverses.push(i); } }, pose: function () { for (var e, t = 0, i = this.bones.length; i > t; t++)(e = this.bones[t]), e && e.matrixWorld.getInverse(this.boneInverses[t]); for (var t = 0, i = this.bones.length; i > t; t++) (e = this.bones[t]), e && (e.parent instanceof n.Bone ? (e.matrix.getInverse(e.parent.matrixWorld), e.matrix.multiply(e.matrixWorld)) : e.matrix.copy(e.matrixWorld), e.matrix.decompose(e.position, e.quaternion, e.scale)); }, update: (function () { var e = new n.Matrix4(); return function () { for (var t = 0, i = this.bones.length; i > t; t++) { var n = this.bones[t] ? this.bones[t].matrixWorld : this.identityMatrix; e.multiplyMatrices(n, this.boneInverses[t]), e.toArray(this.boneMatrices, 16 * t); } this.useVertexTexture && (this.boneTexture.needsUpdate = !0); }; })(), clone: function () { return new n.Skeleton(this.bones, this.boneInverses, this.useVertexTexture); }, }), (n.SkinnedMesh = function (e, t, i) { n.Mesh.call(this, e, t), (this.type = "SkinnedMesh"), (this.bindMode = "attached"), (this.bindMatrix = new n.Matrix4()), (this.bindMatrixInverse = new n.Matrix4()); var r = []; if (this.geometry && void 0 !== this.geometry.bones) { for (var o, a, s = 0, l = this.geometry.bones.length; l > s; ++s) (a = this.geometry.bones[s]), (o = new n.Bone(this)), r.push(o), (o.name = a.name), o.position.fromArray(a.pos), o.quaternion.fromArray(a.rotq), void 0 !== a.scl && o.scale.fromArray(a.scl); for (var s = 0, l = this.geometry.bones.length; l > s; ++s)(a = this.geometry.bones[s]), -1 !== a.parent && null !== a.parent && void 0 !== r[a.parent] ? r[a.parent].add(r[s]) : this.add(r[s]); } this.normalizeSkinWeights(), this.updateMatrixWorld(!0), this.bind(new n.Skeleton(r, void 0, i), this.matrixWorld); }), (n.SkinnedMesh.prototype = Object.assign(Object.create(n.Mesh.prototype), { constructor: n.SkinnedMesh, bind: function (e, t) { (this.skeleton = e), void 0 === t && (this.updateMatrixWorld(!0), this.skeleton.calculateInverses(), (t = this.matrixWorld)), this.bindMatrix.copy(t), this.bindMatrixInverse.getInverse(t); }, pose: function () { this.skeleton.pose(); }, normalizeSkinWeights: function () { if (this.geometry instanceof n.Geometry) for (var e = 0; e < this.geometry.skinWeights.length; e++) { var t = this.geometry.skinWeights[e], i = 1 / t.lengthManhattan(); i !== 1 / 0 ? t.multiplyScalar(i) : t.set(1, 0, 0, 0); } else if (this.geometry instanceof n.BufferGeometry) for (var r = new n.Vector4(), o = this.geometry.attributes.skinWeight, e = 0; e < o.count; e++) { (r.x = o.getX(e)), (r.y = o.getY(e)), (r.z = o.getZ(e)), (r.w = o.getW(e)); var i = 1 / r.lengthManhattan(); i !== 1 / 0 ? r.multiplyScalar(i) : r.set(1, 0, 0, 0), o.setXYZW(e, r.x, r.y, r.z, r.w); } }, updateMatrixWorld: function (e) { n.Mesh.prototype.updateMatrixWorld.call(this, !0), "attached" === this.bindMode ? this.bindMatrixInverse.getInverse(this.matrixWorld) : "detached" === this.bindMode ? this.bindMatrixInverse.getInverse(this.bindMatrix) : console.warn("THREE.SkinnedMesh unrecognized bindMode: " + this.bindMode); }, clone: function () { return new this.constructor(this.geometry, this.material, this.skeleton.useVertexTexture).copy(this); }, })), (n.LOD = function () { n.Object3D.call(this), (this.type = "LOD"), Object.defineProperties(this, { levels: { enumerable: !0, value: [] } }); }), (n.LOD.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.LOD, copy: function (e) { n.Object3D.prototype.copy.call(this, e, !1); for (var t = e.levels, i = 0, r = t.length; r > i; i++) { var o = t[i]; this.addLevel(o.object.clone(), o.distance); } return this; }, addLevel: function (e, t) { void 0 === t && (t = 0), (t = Math.abs(t)); for (var i = this.levels, n = 0; n < i.length && !(t < i[n].distance); n++); i.splice(n, 0, { distance: t, object: e }), this.add(e); }, getObjectForDistance: function (e) { for (var t = this.levels, i = 1, n = t.length; n > i && !(e < t[i].distance); i++); return t[i - 1].object; }, raycast: (function () { var e = new n.Vector3(); return function (t, i) { e.setFromMatrixPosition(this.matrixWorld); var n = t.ray.origin.distanceTo(e); this.getObjectForDistance(n).raycast(t, i); }; })(), update: (function () { var e = new n.Vector3(), t = new n.Vector3(); return function (i) { var n = this.levels; if (n.length > 1) { e.setFromMatrixPosition(i.matrixWorld), t.setFromMatrixPosition(this.matrixWorld); var r = e.distanceTo(t); n[0].object.visible = !0; for (var o = 1, a = n.length; a > o && r >= n[o].distance; o++)(n[o - 1].object.visible = !1), (n[o].object.visible = !0); for (; a > o; o++) n[o].object.visible = !1; } }; })(), toJSON: function (e) { var t = n.Object3D.prototype.toJSON.call(this, e); t.object.levels = []; for (var i = this.levels, r = 0, o = i.length; o > r; r++) { var a = i[r]; t.object.levels.push({ object: a.object.uuid, distance: a.distance }); } return t; }, })), (n.Sprite = function (e) { n.Object3D.call(this), (this.type = "Sprite"), (this.material = void 0 !== e ? e : new n.SpriteMaterial()); }), (n.Sprite.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.Sprite, raycast: (function () { var e = new n.Vector3(); return function (t, i) { e.setFromMatrixPosition(this.matrixWorld); var n = t.ray.distanceSqToPoint(e), r = (this.scale.x * this.scale.y) / 4; n > r || i.push({ distance: Math.sqrt(n), point: this.position, face: null, object: this }); }; })(), clone: function () { return new this.constructor(this.material).copy(this); }, })), (n.LensFlare = function (e, t, i, r, o) { n.Object3D.call(this), (this.lensFlares = []), (this.positionScreen = new n.Vector3()), (this.customUpdateCallback = void 0), void 0 !== e && this.add(e, t, i, r, o); }), (n.LensFlare.prototype = Object.assign(Object.create(n.Object3D.prototype), { constructor: n.LensFlare, copy: function (e) { n.Object3D.prototype.copy.call(this, e), this.positionScreen.copy(e.positionScreen), (this.customUpdateCallback = e.customUpdateCallback); for (var t = 0, i = e.lensFlares.length; i > t; t++) this.lensFlares.push(e.lensFlares[t]); return this; }, add: function (e, t, i, r, o, a) { void 0 === t && (t = -1), void 0 === i && (i = 0), void 0 === a && (a = 1), void 0 === o && (o = new n.Color(16777215)), void 0 === r && (r = n.NormalBlending), (i = Math.min(i, Math.max(0, i))), this.lensFlares.push({ texture: e, size: t, distance: i, x: 0, y: 0, z: 0, scale: 1, rotation: 0, opacity: a, color: o, blending: r }); }, updateLensFlares: function () { var e, t, i = this.lensFlares.length, n = 2 * -this.positionScreen.x, r = 2 * -this.positionScreen.y; for (e = 0; i > e; e++) (t = this.lensFlares[e]), (t.x = this.positionScreen.x + n * t.distance), (t.y = this.positionScreen.y + r * t.distance), (t.wantedRotation = t.x * Math.PI * 0.25), (t.rotation += 0.25 * (t.wantedRotation - t.rotation)); }, })), (n.Scene = function () { n.Object3D.call(this), (this.type = "Scene"), (this.background = null), (this.fog = null), (this.overrideMaterial = null), (this.autoUpdate = !0); }), (n.Scene.prototype = Object.create(n.Object3D.prototype)), (n.Scene.prototype.constructor = n.Scene), (n.Scene.prototype.copy = function (e, t) { return ( n.Object3D.prototype.copy.call(this, e, t), null !== e.background && (this.background = e.background.clone()), null !== e.fog && (this.fog = e.fog.clone()), null !== e.overrideMaterial && (this.overrideMaterial = e.overrideMaterial.clone()), (this.autoUpdate = e.autoUpdate), (this.matrixAutoUpdate = e.matrixAutoUpdate), this ); }), (n.Fog = function (e, t, i) { (this.name = ""), (this.color = new n.Color(e)), (this.near = void 0 !== t ? t : 1), (this.far = void 0 !== i ? i : 1e3); }), (n.Fog.prototype.clone = function () { return new n.Fog(this.color.getHex(), this.near, this.far); }), (n.FogExp2 = function (e, t) { (this.name = ""), (this.color = new n.Color(e)), (this.density = void 0 !== t ? t : 25e-5); }), (n.FogExp2.prototype.clone = function () { return new n.FogExp2(this.color.getHex(), this.density); }), (n.ShaderChunk = {}), (n.ShaderChunk.alphamap_fragment = "#ifdef USE_ALPHAMAPn diffuseColor.a *= texture2D( alphaMap, vUv ).g;n#endifn"), (n.ShaderChunk.alphamap_pars_fragment = "#ifdef USE_ALPHAMAPn uniform sampler2D alphaMap;n#endifn"), (n.ShaderChunk.alphatest_fragment = "#ifdef ALPHATESTn if ( diffuseColor.a < ALPHATEST ) discard;n#endifn"), (n.ShaderChunk.aomap_fragment = "#ifdef USE_AOMAPn float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;n reflectedLight.indirectDiffuse *= ambientOcclusion;n #if defined( USE_ENVMAP ) && defined( PHYSICAL )n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );n #endifn#endifn"), (n.ShaderChunk.aomap_pars_fragment = "#ifdef USE_AOMAPn uniform sampler2D aoMap;n uniform float aoMapIntensity;n#endif"), (n.ShaderChunk.begin_vertex = "nvec3 transformed = vec3( position );n"), (n.ShaderChunk.beginnormal_vertex = "nvec3 objectNormal = vec3( normal );n"), (n.ShaderChunk.bsdfs = "bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {n return any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );n}nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {n if( decayExponent > 0.0 ) {n#if defined ( PHYSICALLY_CORRECT_LIGHTS )n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );n float maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );n return distanceFalloff * maxDistanceCutoffFactor;n#elsen return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );n#endifn }n return 1.0;n}nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {n return RECIPROCAL_PI * diffuseColor;n}nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {n float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );n return ( 1.0 - specularColor ) * fresnel + specularColor;n}nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {n float a2 = pow2( alpha );n float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );n float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );n return 1.0 / ( gl * gv );n}nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {n float a2 = pow2( alpha );n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );n return 0.5 / max( gv + gl, EPSILON );n}nfloat D_GGX( const in float alpha, const in float dotNH ) {n float a2 = pow2( alpha );n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;n return RECIPROCAL_PI * a2 / pow2( denom );n}nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {n float alpha = pow2( roughness );n vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );n float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n float dotNH = saturate( dot( geometry.normal, halfDir ) );n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );n vec3 F = F_Schlick( specularColor, dotLH );n float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );n float D = D_GGX( alpha, dotNH );n return F * ( G * D );n}nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );n vec4 r = roughness * c0 + c1;n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;n vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;n return specularColor * AB.x + AB.y;n}nfloat G_BlinnPhong_Implicit( ) {n return 0.25;n}nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );n}nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {n vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );n float dotNH = saturate( dot( geometry.normal, halfDir ) );n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );n vec3 F = F_Schlick( specularColor, dotLH );n float G = G_BlinnPhong_Implicit( );n float D = D_BlinnPhong( shininess, dotNH );n return F * ( G * D );n}nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {n return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );n}nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {n return sqrt( 2.0 / ( blinnExponent + 2.0 ) );n}n"), (n.ShaderChunk.bumpmap_pars_fragment = "#ifdef USE_BUMPMAPn uniform sampler2D bumpMap;n uniform float bumpScale;n vec2 dHdxy_fwd() {n vec2 dSTdx = dFdx( vUv );n vec2 dSTdy = dFdy( vUv );n float Hll = bumpScale * texture2D( bumpMap, vUv ).x;n float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;n float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;n return vec2( dBx, dBy );n }n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {n vec3 vSigmaX = dFdx( surf_pos );n vec3 vSigmaY = dFdy( surf_pos );n vec3 vN = surf_norm;n vec3 R1 = cross( vSigmaY, vN );n vec3 R2 = cross( vN, vSigmaX );n float fDet = dot( vSigmaX, R1 );n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );n return normalize( abs( fDet ) * surf_norm - vGrad );n }n#endifn"), (n.ShaderChunk.clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0n for ( int i = 0; i < NUM_CLIPPING_PLANES; ++ i ) {n vec4 plane = clippingPlanes[ i ];n if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;n }n#endifn"), (n.ShaderChunk.clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0n #if ! defined( PHYSICAL ) && ! defined( PHONG )n varying vec3 vViewPosition;n #endifn uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];n#endifn"), (n.ShaderChunk.clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )n varying vec3 vViewPosition;n#endifn"), (n.ShaderChunk.clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )n vViewPosition = - mvPosition.xyz;n#endifn"), (n.ShaderChunk.color_fragment = "#ifdef USE_COLORn diffuseColor.rgb *= vColor;n#endif"), (n.ShaderChunk.color_pars_fragment = "#ifdef USE_COLORn varying vec3 vColor;n#endifn"), (n.ShaderChunk.color_pars_vertex = "#ifdef USE_COLORn varying vec3 vColor;n#endif"), (n.ShaderChunk.color_vertex = "#ifdef USE_COLORn vColor.xyz = color.xyz;n#endif"), (n.ShaderChunk.common = "#define PI 3.14159265359n#define PI2 6.28318530718n#define RECIPROCAL_PI 0.31830988618n#define RECIPROCAL_PI2 0.15915494n#define LOG2 1.442695n#define EPSILON 1e-6n#define saturate(a) clamp( a, 0.0, 1.0 )n#define whiteCompliment(a) ( 1.0 - saturate( a ) )nfloat pow2( const in float x ) { return x*x; }nfloat pow3( const in float x ) { return x*x*x; }nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }nhighp float rand( const in vec2 uv ) {n const highp float a = 12.9898, b = 78.233, c = 43758.5453;n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );n return fract(sin(sn) * c);n}nstruct IncidentLight {n vec3 color;n vec3 direction;n bool visible;n};nstruct ReflectedLight {n vec3 directDiffuse;n vec3 directSpecular;n vec3 indirectDiffuse;n vec3 indirectSpecular;n};nstruct GeometricContext {n vec3 position;n vec3 normal;n vec3 viewDir;n};nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );n}nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );n}nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {n float distance = dot( planeNormal, point - pointOnPlane );n return - distance * planeNormal + point;n}nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {n return sign( dot( point - pointOnPlane, planeNormal ) );n}nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {n return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;n}n"), (n.ShaderChunk.cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UVn#define cubeUV_textureSize (1024.0)nint getFaceFromDirection(vec3 direction) {n vec3 absDirection = abs(direction);n int face = -1;n if( absDirection.x > absDirection.z ) {n if(absDirection.x > absDirection.y )n face = direction.x > 0.0 ? 0 : 3;n elsen face = direction.y > 0.0 ? 1 : 4;n }n else {n if(absDirection.z > absDirection.y )n face = direction.z > 0.0 ? 2 : 5;n elsen face = direction.y > 0.0 ? 1 : 4;n }n return face;n}n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {n float scale = exp2(cubeUV_maxLods1 - roughnessLevel);n float dxRoughness = dFdx(roughness);n float dyRoughness = dFdy(roughness);n vec3 dx = dFdx( vec * scale * dxRoughness );n vec3 dy = dFdy( vec * scale * dyRoughness );n float d = max( dot( dx, dx ), dot( dy, dy ) );n d = clamp(d, 1.0, cubeUV_rangeClamp);n float mipLevel = 0.5 * log2(d);n return vec2(floor(mipLevel), fract(mipLevel));n}n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {n mipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;n float a = 16.0 * cubeUV_rcpTextureSize;n vec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );n vec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;n float powScale = exp2_packed.x * exp2_packed.y;n float scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;n float mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;n bool bRes = mipLevel == 0.0;n scale = bRes && (scale < a) ? a : scale;n vec3 r;n vec2 offset;n int face = getFaceFromDirection(direction);n float rcpPowScale = 1.0 / powScale;n if( face == 0) {n r = vec3(direction.x, -direction.z, direction.y);n offset = vec2(0.0+mipOffset,0.75 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;n }n else if( face == 1) {n r = vec3(direction.y, direction.x, direction.z);n offset = vec2(scale+mipOffset, 0.75 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;n }n else if( face == 2) {n r = vec3(direction.z, direction.x, direction.y);n offset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;n }n else if( face == 3) {n r = vec3(direction.x, direction.z, direction.y);n offset = vec2(0.0+mipOffset,0.5 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;n }n else if( face == 4) {n r = vec3(direction.y, direction.x, -direction.z);n offset = vec2(scale+mipOffset, 0.5 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;n }n else {n r = vec3(direction.z, -direction.x, direction.y);n offset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;n }n r = normalize(r);n float texelOffset = 0.5 * cubeUV_rcpTextureSize;n vec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;n vec2 base = offset + vec2( texelOffset );n return base + s * ( scale - 2.0 * texelOffset );n}n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {n float roughnessVal = roughness* cubeUV_maxLods3;n float r1 = floor(roughnessVal);n float r2 = r1 + 1.0;n float t = fract(roughnessVal);n vec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);n float s = mipInfo.y;n float level0 = mipInfo.x;n float level1 = level0 + 1.0;n level1 = level1 > 5.0 ? 5.0 : level1;n level0 += min( floor( s + 0.5 ), 5.0 );n vec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);n vec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));n vec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);n vec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));n vec4 result = mix(color10, color20, t);n return vec4(result.rgb, 1.0);n}n#endifn"), (n.ShaderChunk.defaultnormal_vertex = "#ifdef FLIP_SIDEDn objectNormal = -objectNormal;n#endifnvec3 transformedNormal = normalMatrix * objectNormal;n"), (n.ShaderChunk.displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAPn transformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );n#endifn"), (n.ShaderChunk.displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAPn uniform sampler2D displacementMap;n uniform float displacementScale;n uniform float displacementBias;n#endifn"), (n.ShaderChunk.emissivemap_fragment = "#ifdef USE_EMISSIVEMAPn vec4 emissiveColor = texture2D( emissiveMap, vUv );n emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;n totalEmissiveRadiance *= emissiveColor.rgb;n#endifn"), (n.ShaderChunk.emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAPn uniform sampler2D emissiveMap;n#endifn"), (n.ShaderChunk.encodings_pars_fragment = "nvec4 LinearToLinear( in vec4 value ) {n return value;n}nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {n return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );n}nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {n return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );n}nvec4 sRGBToLinear( in vec4 value ) {n 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.w );n}nvec4 LinearTosRGB( in vec4 value ) {n 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.w );n}nvec4 RGBEToLinear( in vec4 value ) {n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );n}nvec4 LinearToRGBE( in vec4 value ) {n float maxComponent = max( max( value.r, value.g ), value.b );n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );n}nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {n return vec4( value.xyz * value.w * maxRange, 1.0 );n}nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {n float maxRGB = max( value.x, max( value.g, value.b ) );n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );n M = ceil( M * 255.0 ) / 255.0;n return vec4( value.rgb / ( M * maxRange ), M );n}nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );n}nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {n float maxRGB = max( value.x, max( value.g, value.b ) );n float D = max( maxRange / maxRGB, 1.0 );n D = min( floor( D ) / 255.0, 1.0 );n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );n}nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );nvec4 LinearToLogLuv( in vec4 value ) {n vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;n Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));n vec4 vResult;n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;n vResult.w = fract(Le);n vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;n return vResult;n}nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );nvec4 LogLuvToLinear( in vec4 value ) {n float Le = value.z * 255.0 + value.w;n vec3 Xp_Y_XYZp;n Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;n vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;n return vec4( max(vRGB, 0.0), 1.0 );n}n"), (n.ShaderChunk.encodings_fragment = " gl_FragColor = linearToOutputTexel( gl_FragColor );n"), (n.ShaderChunk.envmap_fragment = "#ifdef USE_ENVMAPn #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )n vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );n #ifdef ENVMAP_MODE_REFLECTIONn vec3 reflectVec = reflect( cameraToVertex, worldNormal );n #elsen vec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );n #endifn #elsen vec3 reflectVec = vReflect;n #endifn #ifdef ENVMAP_TYPE_CUBEn vec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );n #elif defined( ENVMAP_TYPE_EQUIREC )n vec2 sampleUV;n sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );n sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;n vec4 envColor = texture2D( envMap, sampleUV );n #elif defined( ENVMAP_TYPE_SPHERE )n vec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );n vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );n #endifn envColor = envMapTexelToLinear( envColor );n #ifdef ENVMAP_BLENDING_MULTIPLYn outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );n #elif defined( ENVMAP_BLENDING_MIX )n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );n #elif defined( ENVMAP_BLENDING_ADD )n outgoingLight += envColor.xyz * specularStrength * reflectivity;n #endifn#endifn"), (n.ShaderChunk.envmap_pars_fragment = "#if defined( USE_ENVMAP ) || defined( PHYSICAL )n uniform float reflectivity;n uniform float envMapIntenstiy;n#endifn#ifdef USE_ENVMAPn #if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )n varying vec3 vWorldPosition;n #endifn #ifdef ENVMAP_TYPE_CUBEn uniform samplerCube envMap;n #elsen uniform sampler2D envMap;n #endifn uniform float flipEnvMap;n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )n uniform float refractionRatio;n #elsen varying vec3 vReflect;n #endifn#endifn"), (n.ShaderChunk.envmap_pars_vertex = "#ifdef USE_ENVMAPn #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )n varying vec3 vWorldPosition;n #elsen varying vec3 vReflect;n uniform float refractionRatio;n #endifn#endifn"), (n.ShaderChunk.envmap_vertex = "#ifdef USE_ENVMAPn #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )n vWorldPosition = worldPosition.xyz;n #elsen vec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );n #ifdef ENVMAP_MODE_REFLECTIONn vReflect = reflect( cameraToVertex, worldNormal );n #elsen vReflect = refract( cameraToVertex, worldNormal, refractionRatio );n #endifn #endifn#endifn"), (n.ShaderChunk.fog_fragment = "#ifdef USE_FOGn #ifdef USE_LOGDEPTHBUF_EXTn float depth = gl_FragDepthEXT / gl_FragCoord.w;n #elsen float depth = gl_FragCoord.z / gl_FragCoord.w;n #endifn #ifdef FOG_EXP2n float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );n #elsen float fogFactor = smoothstep( fogNear, fogFar, depth );n #endifn gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );n#endifn"), (n.ShaderChunk.fog_pars_fragment = "#ifdef USE_FOGn uniform vec3 fogColor;n #ifdef FOG_EXP2n uniform float fogDensity;n #elsen uniform float fogNear;n uniform float fogFar;n #endifn#endif"), (n.ShaderChunk.lightmap_fragment = "#ifdef USE_LIGHTMAPn reflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;n#endifn"), (n.ShaderChunk.lightmap_pars_fragment = "#ifdef USE_LIGHTMAPn uniform sampler2D lightMap;n uniform float lightMapIntensity;n#endif"), (n.ShaderChunk.lights_lambert_vertex = "vec3 diffuse = vec3( 1.0 );nGeometricContext geometry;ngeometry.position = mvPosition.xyz;ngeometry.normal = normalize( transformedNormal );ngeometry.viewDir = normalize( -mvPosition.xyz );nGeometricContext backGeometry;nbackGeometry.position = geometry.position;nbackGeometry.normal = -geometry.normal;nbackGeometry.viewDir = geometry.viewDir;nvLightFront = vec3( 0.0 );n#ifdef DOUBLE_SIDEDn vLightBack = vec3( 0.0 );n#endifnIncidentLight directLight;nfloat dotNL;nvec3 directLightColor_Diffuse;n#if NUM_POINT_LIGHTS > 0n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );n dotNL = dot( geometry.normal, directLight.direction );n directLightColor_Diffuse = PI * directLight.color;n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;n #ifdef DOUBLE_SIDEDn vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;n #endifn }n#endifn#if NUM_SPOT_LIGHTS > 0n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );n dotNL = dot( geometry.normal, directLight.direction );n directLightColor_Diffuse = PI * directLight.color;n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;n #ifdef DOUBLE_SIDEDn vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;n #endifn }n#endifn#if NUM_DIR_LIGHTS > 0n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );n dotNL = dot( geometry.normal, directLight.direction );n directLightColor_Diffuse = PI * directLight.color;n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;n #ifdef DOUBLE_SIDEDn vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;n #endifn }n#endifn#if NUM_HEMI_LIGHTS > 0n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {n vLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );n #ifdef DOUBLE_SIDEDn vLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );n #endifn }n#endifn"), (n.ShaderChunk.lights_pars = "uniform vec3 ambientLightColor;nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {n vec3 irradiance = ambientLightColor;n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn return irradiance;n}n#if NUM_DIR_LIGHTS > 0n struct DirectionalLight {n vec3 direction;n vec3 color;n int shadow;n float shadowBias;n float shadowRadius;n vec2 shadowMapSize;n };n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];n void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {n directLight.color = directionalLight.color;n directLight.direction = directionalLight.direction;n directLight.visible = true;n }n#endifn#if NUM_POINT_LIGHTS > 0n struct PointLight {n vec3 position;n vec3 color;n float distance;n float decay;n int shadow;n float shadowBias;n float shadowRadius;n vec2 shadowMapSize;n };n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];n void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {n vec3 lVector = pointLight.position - geometry.position;n directLight.direction = normalize( lVector );n float lightDistance = length( lVector );n if ( testLightInRange( lightDistance, pointLight.distance ) ) {n directLight.color = pointLight.color;n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );n directLight.visible = true;n } else {n directLight.color = vec3( 0.0 );n directLight.visible = false;n }n }n#endifn#if NUM_SPOT_LIGHTS > 0n struct SpotLight {n vec3 position;n vec3 direction;n vec3 color;n float distance;n float decay;n float coneCos;n float penumbraCos;n int shadow;n float shadowBias;n float shadowRadius;n vec2 shadowMapSize;n };n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];n void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {n vec3 lVector = spotLight.position - geometry.position;n directLight.direction = normalize( lVector );n float lightDistance = length( lVector );n float angleCos = dot( directLight.direction, spotLight.direction );n if ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );n directLight.color = spotLight.color;n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );n directLight.visible = true;n } else {n directLight.color = vec3( 0.0 );n directLight.visible = false;n }n }n#endifn#if NUM_HEMI_LIGHTS > 0n struct HemisphereLight {n vec3 direction;n vec3 skyColor;n vec3 groundColor;n };n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {n float dotNL = dot( geometry.normal, hemiLight.direction );n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn return irradiance;n }n#endifn#if defined( USE_ENVMAP ) && defined( PHYSICAL )n vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {n #include <normal_flip>n vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );n #ifdef ENVMAP_TYPE_CUBEn vec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );n #elsen vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #elif defined( ENVMAP_TYPE_CUBE_UV )n vec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );n vec4 envMapColor = textureCubeUV( queryVec, 1.0 );n #elsen vec4 envMapColor = vec4( 0.0 );n #endifn return PI * envMapColor.rgb * envMapIntensity;n }n float getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {n float maxMIPLevelScalar = float( maxMIPLevel );n float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );n return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );n }n vec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {n #ifdef ENVMAP_MODE_REFLECTIONn vec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );n #elsen vec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );n #endifn #include <normal_flip>n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );n float specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );n #ifdef ENVMAP_TYPE_CUBEn vec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );n #elsen vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #elif defined( ENVMAP_TYPE_CUBE_UV )n vec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );n vec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));n #elif defined( ENVMAP_TYPE_EQUIREC )n vec2 sampleUV;n sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );n sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );n #elsen vec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #elif defined( ENVMAP_TYPE_SPHERE )n vec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );n #elsen vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #endifn return envMapColor.rgb * envMapIntensity;n }n#endifn"), (n.ShaderChunk.lights_phong_fragment = "BlinnPhongMaterial material;nmaterial.diffuseColor = diffuseColor.rgb;nmaterial.specularColor = specular;nmaterial.specularShininess = shininess;nmaterial.specularStrength = specularStrength;n"), (n.ShaderChunk.lights_phong_pars_fragment = "varying vec3 vViewPosition;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifnstruct BlinnPhongMaterial {n vec3 diffuseColor;n vec3 specularColor;n float specularShininess;n float specularStrength;n};nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );n vec3 irradiance = dotNL * directLight.color;n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;n}nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n}n#define RE_Direct RE_Direct_BlinnPhongn#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhongn#define Material_LightProbeLOD( material ) (0)n"), (n.ShaderChunk.lights_physical_fragment = "PhysicalMaterial material;nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );n#ifdef STANDARDn material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );n#elsen material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );n material.clearCoat = saturate( clearCoat ); material.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );n#endifn"), (n.ShaderChunk.lights_physical_pars_fragment = "struct PhysicalMaterial {n vec3 diffuseColor;n float specularRoughness;n vec3 specularColor;n #ifndef STANDARDn float clearCoat;n float clearCoatRoughness;n #endifn};n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16n#define DEFAULT_SPECULAR_COEFFICIENT 0.04nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {n return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );n}nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );n vec3 irradiance = dotNL * directLight.color;n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn #ifndef STANDARDn float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );n #elsen float clearCoatDHR = 0.0;n #endifn reflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );n reflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n #ifndef STANDARDn reflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );n #endifn}nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n}nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {n #ifndef STANDARDn float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n float dotNL = dotNV;n float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );n #elsen float clearCoatDHR = 0.0;n #endifn reflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );n #ifndef STANDARDn reflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );n #endifn}n#define RE_Direct RE_Direct_Physicaln#define RE_IndirectDiffuse RE_IndirectDiffuse_Physicaln#define RE_IndirectSpecular RE_IndirectSpecular_Physicaln#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );n}n"), (n.ShaderChunk.lights_template = "nGeometricContext geometry;ngeometry.position = - vViewPosition;ngeometry.normal = normal;ngeometry.viewDir = normalize( vViewPosition );nIncidentLight directLight;n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )n PointLight pointLight;n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n pointLight = pointLights[ i ];n getPointDirectLightIrradiance( pointLight, geometry, directLight );n #ifdef USE_SHADOWMAPn directLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;n #endifn RE_Direct( directLight, geometry, material, reflectedLight );n }n#endifn#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )n SpotLight spotLight;n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n spotLight = spotLights[ i ];n getSpotDirectLightIrradiance( spotLight, geometry, directLight );n #ifdef USE_SHADOWMAPn directLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;n #endifn RE_Direct( directLight, geometry, material, reflectedLight );n }n#endifn#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )n DirectionalLight directionalLight;n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n directionalLight = directionalLights[ i ];n getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );n #ifdef USE_SHADOWMAPn directLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;n #endifn RE_Direct( directLight, geometry, material, reflectedLight );n }n#endifn#if defined( RE_IndirectDiffuse )n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );n #ifdef USE_LIGHTMAPn vec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;n #ifndef PHYSICALLY_CORRECT_LIGHTSn lightMapIrradiance *= PI;n #endifn irradiance += lightMapIrradiance;n #endifn #if ( NUM_HEMI_LIGHTS > 0 )n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );n }n #endifn #if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )n irradiance += getLightProbeIndirectIrradiance( geometry, 8 );n #endifn RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );n#endifn#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )n vec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );n #ifndef STANDARDn vec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );n #elsen vec3 clearCoatRadiance = vec3( 0.0 );n #endifn n RE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );n#endifn"), (n.ShaderChunk.logdepthbuf_fragment = "#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)n gl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;n#endif"), (n.ShaderChunk.logdepthbuf_pars_fragment = "#ifdef USE_LOGDEPTHBUFn uniform float logDepthBufFC;n #ifdef USE_LOGDEPTHBUF_EXTn varying float vFragDepth;n #endifn#endifn"), (n.ShaderChunk.logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUFn #ifdef USE_LOGDEPTHBUF_EXTn varying float vFragDepth;n #endifn uniform float logDepthBufFC;n#endif"), (n.ShaderChunk.logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUFn gl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;n #ifdef USE_LOGDEPTHBUF_EXTn vFragDepth = 1.0 + gl_Position.w;n #elsen gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;n #endifn#endifn"), (n.ShaderChunk.map_fragment = "#ifdef USE_MAPn vec4 texelColor = texture2D( map, vUv );n texelColor = mapTexelToLinear( texelColor );n diffuseColor *= texelColor;n#endifn"), (n.ShaderChunk.map_pars_fragment = "#ifdef USE_MAPn uniform sampler2D map;n#endifn"), (n.ShaderChunk.map_particle_fragment = "#ifdef USE_MAPn vec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );n diffuseColor *= mapTexelToLinear( mapTexel );n#endifn"), (n.ShaderChunk.map_particle_pars_fragment = "#ifdef USE_MAPn uniform vec4 offsetRepeat;n uniform sampler2D map;n#endifn"), (n.ShaderChunk.metalnessmap_fragment = "float metalnessFactor = metalness;n#ifdef USE_METALNESSMAPn vec4 texelMetalness = texture2D( metalnessMap, vUv );n metalnessFactor *= texelMetalness.r;n#endifn"), (n.ShaderChunk.metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAPn uniform sampler2D metalnessMap;n#endif"), (n.ShaderChunk.morphnormal_vertex = "#ifdef USE_MORPHNORMALSn objectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];n objectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];n objectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];n objectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];n#endifn"), (n.ShaderChunk.morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETSn #ifndef USE_MORPHNORMALSn uniform float morphTargetInfluences[ 8 ];n #elsen uniform float morphTargetInfluences[ 4 ];n #endifn#endif"), (n.ShaderChunk.morphtarget_vertex = "#ifdef USE_MORPHTARGETSn transformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];n transformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];n transformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];n transformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];n #ifndef USE_MORPHNORMALSn transformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];n transformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];n transformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];n transformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];n #endifn#endifn"), (n.ShaderChunk.normal_flip = "#ifdef DOUBLE_SIDEDn float flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );n#elsen float flipNormal = 1.0;n#endifn"), (n.ShaderChunk.normal_fragment = "#ifdef FLAT_SHADEDn vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );n vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );n vec3 normal = normalize( cross( fdx, fdy ) );n#elsen vec3 normal = normalize( vNormal ) * flipNormal;n#endifn#ifdef USE_NORMALMAPn normal = perturbNormal2Arb( -vViewPosition, normal );n#elif defined( USE_BUMPMAP )n normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );n#endifn"), (n.ShaderChunk.normalmap_pars_fragment = "#ifdef USE_NORMALMAPn uniform sampler2D normalMap;n uniform vec2 normalScale;n vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {n vec3 q0 = dFdx( eye_pos.xyz );n vec3 q1 = dFdy( eye_pos.xyz );n vec2 st0 = dFdx( vUv.st );n vec2 st1 = dFdy( vUv.st );n vec3 S = normalize( q0 * st1.t - q1 * st0.t );n vec3 T = normalize( -q0 * st1.s + q1 * st0.s );n vec3 N = normalize( surf_norm );n vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;n mapN.xy = normalScale * mapN.xy;n mat3 tsn = mat3( S, T, N );n return normalize( tsn * mapN );n }n#endifn"), (n.ShaderChunk.packing = "vec3 packNormalToRGB( const in vec3 normal ) {n return normalize( normal ) * 0.5 + 0.5;n}nvec3 unpackRGBToNormal( const in vec3 rgb ) {n return 1.0 - 2.0 * rgb.xyz;n}nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );nconst float ShiftRight8 = 1. / 256.;nvec4 packDepthToRGBA( const in float v ) {n vec4 r = vec4( fract( v * PackFactors ), v );n r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;n}nfloat unpackRGBAToDepth( const in vec4 v ) {n return dot( v, UnpackFactors );n}nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {n return ( viewZ + near ) / ( near - far );n}nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {n return linearClipZ * ( near - far ) - near;n}nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );n}nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {n return ( near * far ) / ( ( far - near ) * invClipZ - far );n}n"), (n.ShaderChunk.premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHAn gl_FragColor.rgb *= gl_FragColor.a;n#endifn"), (n.ShaderChunk.project_vertex = "#ifdef USE_SKINNINGn vec4 mvPosition = modelViewMatrix * skinned;n#elsen vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );n#endifngl_Position = projectionMatrix * mvPosition;n"), (n.ShaderChunk.roughnessmap_fragment = "float roughnessFactor = roughness;n#ifdef USE_ROUGHNESSMAPn vec4 texelRoughness = texture2D( roughnessMap, vUv );n roughnessFactor *= texelRoughness.r;n#endifn"), (n.ShaderChunk.roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAPn uniform sampler2D roughnessMap;n#endif"), (n.ShaderChunk.shadowmap_pars_fragment = "#ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];n #endifn #if NUM_SPOT_LIGHTS > 0n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];n #endifn #if NUM_POINT_LIGHTS > 0n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];n #endifn float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );n }n float texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {n const vec2 offset = vec2( 0.0, 1.0 );n vec2 texelSize = vec2( 1.0 ) / size;n vec2 centroidUV = floor( uv * size + 0.5 ) / size;n float lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );n float lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );n float rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );n float rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );n vec2 f = fract( uv * size + 0.5 );n float a = mix( lb, lt, f.y );n float b = mix( rb, rt, f.y );n float c = mix( a, b, f.x );n return c;n }n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {n shadowCoord.xyz /= shadowCoord.w;n shadowCoord.z += shadowBias;n bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );n bool inFrustum = all( inFrustumVec );n bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );n bool frustumTest = all( frustumTestVec );n if ( frustumTest ) {n #if defined( SHADOWMAP_TYPE_PCF )n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;n float dx0 = - texelSize.x * shadowRadius;n float dy0 = - texelSize.y * shadowRadius;n float dx1 = + texelSize.x * shadowRadius;n float dy1 = + texelSize.y * shadowRadius;n return (n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )n ) * ( 1.0 / 9.0 );n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;n float dx0 = - texelSize.x * shadowRadius;n float dy0 = - texelSize.y * shadowRadius;n float dx1 = + texelSize.x * shadowRadius;n float dy1 = + texelSize.y * shadowRadius;n return (n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )n ) * ( 1.0 / 9.0 );n #elsen return texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );n #endifn }n return 1.0;n }n vec2 cubeToUV( vec3 v, float texelSizeY ) {n vec3 absV = abs( v );n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );n absV *= scaleToCube;n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );n vec2 planar = v.xy;n float almostATexel = 1.5 * texelSizeY;n float almostOne = 1.0 - almostATexel;n if ( absV.z >= almostOne ) {n if ( v.z > 0.0 )n planar.x = 4.0 - v.x;n } else if ( absV.x >= almostOne ) {n float signX = sign( v.x );n planar.x = v.z * signX + 2.0 * signX;n } else if ( absV.y >= almostOne ) {n float signY = sign( v.y );n planar.x = v.x + 2.0 * signY + 2.0;n planar.y = v.z * signY - 2.0;n }n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );n }n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );n vec3 lightToPosition = shadowCoord.xyz;n vec3 bd3D = normalize( lightToPosition );n float dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;n return (n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )n ) * ( 1.0 / 9.0 );n #elsen return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );n #endifn }n#endifn"), (n.ShaderChunk.shadowmap_pars_vertex = "#ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];n #endifn #if NUM_SPOT_LIGHTS > 0n uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];n #endifn #if NUM_POINT_LIGHTS > 0n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];n #endifn#endifn"), (n.ShaderChunk.shadowmap_vertex = "#ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;n }n #endifn #if NUM_SPOT_LIGHTS > 0n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;n }n #endifn #if NUM_POINT_LIGHTS > 0n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;n }n #endifn#endifn"), (n.ShaderChunk.shadowmask_pars_fragment = "float getShadowMask() {n float shadow = 1.0;n #ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n DirectionalLight directionalLight;n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n directionalLight = directionalLights[ i ];n shadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;n }n #endifn #if NUM_SPOT_LIGHTS > 0n SpotLight spotLight;n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n spotLight = spotLights[ i ];n shadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;n }n #endifn #if NUM_POINT_LIGHTS > 0n PointLight pointLight;n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n pointLight = pointLights[ i ];n shadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;n }n #endifn #endifn return shadow;n}n"), (n.ShaderChunk.skinbase_vertex = "#ifdef USE_SKINNINGn mat4 boneMatX = getBoneMatrix( skinIndex.x );n mat4 boneMatY = getBoneMatrix( skinIndex.y );n mat4 boneMatZ = getBoneMatrix( skinIndex.z );n mat4 boneMatW = getBoneMatrix( skinIndex.w );n#endif"), (n.ShaderChunk.skinning_pars_vertex = "#ifdef USE_SKINNINGn uniform mat4 bindMatrix;n uniform mat4 bindMatrixInverse;n #ifdef BONE_TEXTUREn uniform sampler2D boneTexture;n uniform int boneTextureWidth;n uniform int boneTextureHeight;n mat4 getBoneMatrix( const in float i ) {n float j = i * 4.0;n float x = mod( j, float( boneTextureWidth ) );n float y = floor( j / float( boneTextureWidth ) );n float dx = 1.0 / float( boneTextureWidth );n float dy = 1.0 / float( boneTextureHeight );n y = dy * ( y + 0.5 );n vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );n vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );n vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );n vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );n mat4 bone = mat4( v1, v2, v3, v4 );n return bone;n }n #elsen uniform mat4 boneMatrices[ MAX_BONES ];n mat4 getBoneMatrix( const in float i ) {n mat4 bone = boneMatrices[ int(i) ];n return bone;n }n #endifn#endifn"), (n.ShaderChunk.skinning_vertex = "#ifdef USE_SKINNINGn vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );n vec4 skinned = vec4( 0.0 );n skinned += boneMatX * skinVertex * skinWeight.x;n skinned += boneMatY * skinVertex * skinWeight.y;n skinned += boneMatZ * skinVertex * skinWeight.z;n skinned += boneMatW * skinVertex * skinWeight.w;n skinned = bindMatrixInverse * skinned;n#endifn"), (n.ShaderChunk.skinnormal_vertex = "#ifdef USE_SKINNINGn mat4 skinMatrix = mat4( 0.0 );n skinMatrix += skinWeight.x * boneMatX;n skinMatrix += skinWeight.y * boneMatY;n skinMatrix += skinWeight.z * boneMatZ;n skinMatrix += skinWeight.w * boneMatW;n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;n#endifn"), (n.ShaderChunk.specularmap_fragment = "float specularStrength;n#ifdef USE_SPECULARMAPn vec4 texelSpecular = texture2D( specularMap, vUv );n specularStrength = texelSpecular.r;n#elsen specularStrength = 1.0;n#endif"), (n.ShaderChunk.specularmap_pars_fragment = "#ifdef USE_SPECULARMAPn uniform sampler2D specularMap;n#endif"), (n.ShaderChunk.tonemapping_fragment = "#if defined( TONE_MAPPING )n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );n#endifn"), (n.ShaderChunk.tonemapping_pars_fragment = "#define saturate(a) clamp( a, 0.0, 1.0 )nuniform float toneMappingExposure;nuniform float toneMappingWhitePoint;nvec3 LinearToneMapping( vec3 color ) {n return toneMappingExposure * color;n}nvec3 ReinhardToneMapping( vec3 color ) {n color *= toneMappingExposure;n return saturate( color / ( vec3( 1.0 ) + color ) );n}n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )nvec3 Uncharted2ToneMapping( vec3 color ) {n color *= toneMappingExposure;n return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );n}nvec3 OptimizedCineonToneMapping( vec3 color ) {n color *= toneMappingExposure;n color = max( vec3( 0.0 ), color - 0.004 );n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );n}n"), (n.ShaderChunk.uv2_pars_fragment = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )n varying vec2 vUv2;n#endif"), (n.ShaderChunk.uv2_pars_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )n attribute vec2 uv2;n varying vec2 vUv2;n#endif"), (n.ShaderChunk.uv2_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )n vUv2 = uv2;n#endif"), (n.ShaderChunk.uv_pars_fragment = "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )n varying vec2 vUv;n#endif"), (n.ShaderChunk.uv_pars_vertex = "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )n varying vec2 vUv;n uniform vec4 offsetRepeat;n#endifn"), (n.ShaderChunk.uv_vertex = "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )n vUv = uv * offsetRepeat.zw + offsetRepeat.xy;n#endif"), (n.ShaderChunk.worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )n #ifdef USE_SKINNINGn vec4 worldPosition = modelMatrix * skinned;n #elsen vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );n #endifn#endifn"), (n.UniformsUtils = { merge: function (e) { for (var t = {}, i = 0; i < e.length; i++) { var n = this.clone(e[i]); for (var r in n) t[r] = n[r]; } return t; }, clone: function (e) { var t = {}; for (var i in e) { t[i] = {}; for (var r in e[i]) { var o = e[i][r]; o instanceof n.Color || o instanceof n.Vector2 || o instanceof n.Vector3 || o instanceof n.Vector4 || o instanceof n.Matrix3 || o instanceof n.Matrix4 || o instanceof n.Texture ? (t[i][r] = o.clone()) : Array.isArray(o) ? (t[i][r] = o.slice()) : (t[i][r] = o); } } return t; }, }), (n.UniformsLib = { common: { diffuse: { value: new n.Color(15658734) }, opacity: { value: 1 }, map: { value: null }, offsetRepeat: { value: new n.Vector4(0, 0, 1, 1) }, specularMap: { value: null }, alphaMap: { value: null }, envMap: { value: null }, flipEnvMap: { value: -1 }, reflectivity: { value: 1 }, refractionRatio: { value: 0.98 }, }, aomap: { aoMap: { value: null }, aoMapIntensity: { value: 1 } }, lightmap: { lightMap: { value: null }, lightMapIntensity: { value: 1 } }, emissivemap: { emissiveMap: { value: null } }, bumpmap: { bumpMap: { value: null }, bumpScale: { value: 1 } }, normalmap: { normalMap: { value: null }, normalScale: { value: new n.Vector2(1, 1) } }, displacementmap: { displacementMap: { value: null }, displacementScale: { value: 1 }, displacementBias: { value: 0 } }, roughnessmap: { roughnessMap: { value: null } }, metalnessmap: { metalnessMap: { value: null } }, fog: { fogDensity: { value: 25e-5 }, fogNear: { value: 1 }, fogFar: { value: 2e3 }, fogColor: { value: new n.Color(16777215) } }, lights: { ambientLightColor: { value: [] }, directionalLights: { value: [], properties: { direction: {}, color: {}, shadow: {}, shadowBias: {}, shadowRadius: {}, shadowMapSize: {} } }, directionalShadowMap: { value: [] }, directionalShadowMatrix: { value: [] }, spotLights: { value: [], properties: { color: {}, position: {}, direction: {}, distance: {}, coneCos: {}, penumbraCos: {}, decay: {}, shadow: {}, shadowBias: {}, shadowRadius: {}, shadowMapSize: {} } }, spotShadowMap: { value: [] }, spotShadowMatrix: { value: [] }, pointLights: { value: [], properties: { color: {}, position: {}, decay: {}, distance: {}, shadow: {}, shadowBias: {}, shadowRadius: {}, shadowMapSize: {} } }, pointShadowMap: { value: [] }, pointShadowMatrix: { value: [] }, hemisphereLights: { value: [], properties: { direction: {}, skyColor: {}, groundColor: {} } }, }, points: { diffuse: { value: new n.Color(15658734) }, opacity: { value: 1 }, size: { value: 1 }, scale: { value: 1 }, map: { value: null }, offsetRepeat: { value: new n.Vector4(0, 0, 1, 1) } }, }), (n.ShaderChunk.cube_frag = "uniform samplerCube tCube;nuniform float tFlip;nuniform float opacity;nvarying vec3 vWorldPosition;n#include <common>nvoid main() {n gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );n gl_FragColor.a *= opacity;n}n"), (n.ShaderChunk.cube_vert = "varying vec3 vWorldPosition;n#include <common>nvoid main() {n vWorldPosition = transformDirection( position, modelMatrix );n #include <begin_vertex>n #include <project_vertex>n}n"), (n.ShaderChunk.depth_frag = "#if DEPTH_PACKING == 3200n uniform float opacity;n#endifn#include <common>n#include <packing>n#include <uv_pars_fragment>n#include <map_pars_fragment>n#include <alphamap_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n vec4 diffuseColor = vec4( 1.0 );n #if DEPTH_PACKING == 3200n diffuseColor.a = opacity;n #endifn #include <map_fragment>n #include <alphamap_fragment>n #include <alphatest_fragment>n #include <logdepthbuf_fragment>n #if DEPTH_PACKING == 3200n gl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );n #elif DEPTH_PACKING == 3201n gl_FragColor = packDepthToRGBA( gl_FragCoord.z );n #endifn}n"), (n.ShaderChunk.depth_vert = "#include <common>n#include <uv_pars_vertex>n#include <displacementmap_pars_vertex>n#include <morphtarget_pars_vertex>n#include <skinning_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <uv_vertex>n #include <skinbase_vertex>n #include <begin_vertex>n #include <displacementmap_vertex>n #include <morphtarget_vertex>n #include <skinning_vertex>n #include <project_vertex>n #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n}n"), (n.ShaderChunk.distanceRGBA_frag = "uniform vec3 lightPos;nvarying vec4 vWorldPosition;n#include <common>n#include <packing>n#include <clipping_planes_pars_fragment>nvoid main () {n #include <clipping_planes_fragment>n gl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );n}n"), (n.ShaderChunk.distanceRGBA_vert = "varying vec4 vWorldPosition;n#include <common>n#include <morphtarget_pars_vertex>n#include <skinning_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <skinbase_vertex>n #include <begin_vertex>n #include <morphtarget_vertex>n #include <skinning_vertex>n #include <project_vertex>n #include <worldpos_vertex>n #include <clipping_planes_vertex>n vWorldPosition = worldPosition;n}n"), (n.ShaderChunk.equirect_frag = "uniform sampler2D tEquirect;nuniform float tFlip;nvarying vec3 vWorldPosition;n#include <common>nvoid main() {n vec3 direction = normalize( vWorldPosition );n vec2 sampleUV;n sampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );n sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;n gl_FragColor = texture2D( tEquirect, sampleUV );n}n"), (n.ShaderChunk.equirect_vert = "varying vec3 vWorldPosition;n#include <common>nvoid main() {n vWorldPosition = transformDirection( position, modelMatrix );n #include <begin_vertex>n #include <project_vertex>n}n"), (n.ShaderChunk.linedashed_frag = "uniform vec3 diffuse;nuniform float opacity;nuniform float dashSize;nuniform float totalSize;nvarying float vLineDistance;n#include <common>n#include <color_pars_fragment>n#include <fog_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n if ( mod( vLineDistance, totalSize ) > dashSize ) {n discard;n }n vec3 outgoingLight = vec3( 0.0 );n vec4 diffuseColor = vec4( diffuse, opacity );n #include <logdepthbuf_fragment>n #include <color_fragment>n outgoingLight = diffuseColor.rgb;n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include <premultiplied_alpha_fragment>n #include <tonemapping_fragment>n #include <encodings_fragment>n #include <fog_fragment>n}n"), (n.ShaderChunk.linedashed_vert = "uniform float scale;nattribute float lineDistance;nvarying float vLineDistance;n#include <common>n#include <color_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <color_vertex>n vLineDistance = scale * lineDistance;n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );n gl_Position = projectionMatrix * mvPosition;n #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n}n"), (n.ShaderChunk.meshbasic_frag = "uniform vec3 diffuse;nuniform float opacity;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifn#include <common>n#include <color_pars_fragment>n#include <uv_pars_fragment>n#include <uv2_pars_fragment>n#include <map_pars_fragment>n#include <alphamap_pars_fragment>n#include <aomap_pars_fragment>n#include <envmap_pars_fragment>n#include <fog_pars_fragment>n#include <specularmap_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n vec4 diffuseColor = vec4( diffuse, opacity );n #include <logdepthbuf_fragment>n #include <map_fragment>n #include <color_fragment>n #include <alphamap_fragment>n #include <alphatest_fragment>n #include <specularmap_fragment>n ReflectedLight reflectedLight;n reflectedLight.directDiffuse = vec3( 0.0 );n reflectedLight.directSpecular = vec3( 0.0 );n reflectedLight.indirectDiffuse = diffuseColor.rgb;n reflectedLight.indirectSpecular = vec3( 0.0 );n #include <aomap_fragment>n vec3 outgoingLight = reflectedLight.indirectDiffuse;n #include <normal_flip>n #include <envmap_fragment>n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include <premultiplied_alpha_fragment>n #include <tonemapping_fragment>n #include <encodings_fragment>n #include <fog_fragment>n}n"), (n.ShaderChunk.meshbasic_vert = "#include <common>n#include <uv_pars_vertex>n#include <uv2_pars_vertex>n#include <envmap_pars_vertex>n#include <color_pars_vertex>n#include <morphtarget_pars_vertex>n#include <skinning_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <uv_vertex>n #include <uv2_vertex>n #include <color_vertex>n #include <skinbase_vertex>n #ifdef USE_ENVMAPn #include <beginnormal_vertex>n #include <morphnormal_vertex>n #include <skinnormal_vertex>n #include <defaultnormal_vertex>n #endifn #include <begin_vertex>n #include <morphtarget_vertex>n #include <skinning_vertex>n #include <project_vertex>n #include <logdepthbuf_vertex>n #include <worldpos_vertex>n #include <clipping_planes_vertex>n #include <envmap_vertex>n}n"), (n.ShaderChunk.meshlambert_frag = "uniform vec3 diffuse;nuniform vec3 emissive;nuniform float opacity;nvarying vec3 vLightFront;n#ifdef DOUBLE_SIDEDn varying vec3 vLightBack;n#endifn#include <common>n#include <packing>n#include <color_pars_fragment>n#include <uv_pars_fragment>n#include <uv2_pars_fragment>n#include <map_pars_fragment>n#include <alphamap_pars_fragment>n#include <aomap_pars_fragment>n#include <lightmap_pars_fragment>n#include <emissivemap_pars_fragment>n#include <envmap_pars_fragment>n#include <bsdfs>n#include <lights_pars>n#include <fog_pars_fragment>n#include <shadowmap_pars_fragment>n#include <shadowmask_pars_fragment>n#include <specularmap_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n vec4 diffuseColor = vec4( diffuse, opacity );n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );n vec3 totalEmissiveRadiance = emissive;n #include <logdepthbuf_fragment>n #include <map_fragment>n #include <color_fragment>n #include <alphamap_fragment>n #include <alphatest_fragment>n #include <specularmap_fragment>n #include <emissivemap_fragment>n reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );n #include <lightmap_fragment>n reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );n #ifdef DOUBLE_SIDEDn reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;n #elsen reflectedLight.directDiffuse = vLightFront;n #endifn reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();n #include <aomap_fragment>n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;n #include <normal_flip>n #include <envmap_fragment>n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include <premultiplied_alpha_fragment>n #include <tonemapping_fragment>n #include <encodings_fragment>n #include <fog_fragment>n}n"), (n.ShaderChunk.meshlambert_vert = "#define LAMBERTnvarying vec3 vLightFront;n#ifdef DOUBLE_SIDEDn varying vec3 vLightBack;n#endifn#include <common>n#include <uv_pars_vertex>n#include <uv2_pars_vertex>n#include <envmap_pars_vertex>n#include <bsdfs>n#include <lights_pars>n#include <color_pars_vertex>n#include <morphtarget_pars_vertex>n#include <skinning_pars_vertex>n#include <shadowmap_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <uv_vertex>n #include <uv2_vertex>n #include <color_vertex>n #include <beginnormal_vertex>n #include <morphnormal_vertex>n #include <skinbase_vertex>n #include <skinnormal_vertex>n #include <defaultnormal_vertex>n #include <begin_vertex>n #include <morphtarget_vertex>n #include <skinning_vertex>n #include <project_vertex>n #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n #include <worldpos_vertex>n #include <envmap_vertex>n #include <lights_lambert_vertex>n #include <shadowmap_vertex>n}n"), (n.ShaderChunk.meshphong_frag = "#define PHONGnuniform vec3 diffuse;nuniform vec3 emissive;nuniform vec3 specular;nuniform float shininess;nuniform float opacity;n#include <common>n#include <packing>n#include <color_pars_fragment>n#include <uv_pars_fragment>n#include <uv2_pars_fragment>n#include <map_pars_fragment>n#include <alphamap_pars_fragment>n#include <aomap_pars_fragment>n#include <lightmap_pars_fragment>n#include <emissivemap_pars_fragment>n#include <envmap_pars_fragment>n#include <fog_pars_fragment>n#include <bsdfs>n#include <lights_pars>n#include <lights_phong_pars_fragment>n#include <shadowmap_pars_fragment>n#include <bumpmap_pars_fragment>n#include <normalmap_pars_fragment>n#include <specularmap_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n vec4 diffuseColor = vec4( diffuse, opacity );n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );n vec3 totalEmissiveRadiance = emissive;n #include <logdepthbuf_fragment>n #include <map_fragment>n #include <color_fragment>n #include <alphamap_fragment>n #include <alphatest_fragment>n #include <specularmap_fragment>n #include <normal_flip>n #include <normal_fragment>n #include <emissivemap_fragment>n #include <lights_phong_fragment>n #include <lights_template>n #include <aomap_fragment>n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;n #include <envmap_fragment>n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include <premultiplied_alpha_fragment>n #include <tonemapping_fragment>n #include <encodings_fragment>n #include <fog_fragment>n}n"), (n.ShaderChunk.meshphong_vert = "#define PHONGnvarying vec3 vViewPosition;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifn#include <common>n#include <uv_pars_vertex>n#include <uv2_pars_vertex>n#include <displacementmap_pars_vertex>n#include <envmap_pars_vertex>n#include <color_pars_vertex>n#include <morphtarget_pars_vertex>n#include <skinning_pars_vertex>n#include <shadowmap_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <uv_vertex>n #include <uv2_vertex>n #include <color_vertex>n #include <beginnormal_vertex>n #include <morphnormal_vertex>n #include <skinbase_vertex>n #include <skinnormal_vertex>n #include <defaultnormal_vertex>n#ifndef FLAT_SHADEDn vNormal = normalize( transformedNormal );n#endifn #include <begin_vertex>n #include <displacementmap_vertex>n #include <morphtarget_vertex>n #include <skinning_vertex>n #include <project_vertex>n #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n vViewPosition = - mvPosition.xyz;n #include <worldpos_vertex>n #include <envmap_vertex>n #include <shadowmap_vertex>n}n"), (n.ShaderChunk.meshphysical_frag = "#define PHYSICALnuniform vec3 diffuse;nuniform vec3 emissive;nuniform float roughness;nuniform float metalness;nuniform float opacity;n#ifndef STANDARDn uniform float clearCoat;n uniform float clearCoatRoughness;n#endifnuniform float envMapIntensity;nvarying vec3 vViewPosition;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifn#include <common>n#include <packing>n#include <color_pars_fragment>n#include <uv_pars_fragment>n#include <uv2_pars_fragment>n#include <map_pars_fragment>n#include <alphamap_pars_fragment>n#include <aomap_pars_fragment>n#include <lightmap_pars_fragment>n#include <emissivemap_pars_fragment>n#include <envmap_pars_fragment>n#include <fog_pars_fragment>n#include <bsdfs>n#include <cube_uv_reflection_fragment>n#include <lights_pars>n#include <lights_physical_pars_fragment>n#include <shadowmap_pars_fragment>n#include <bumpmap_pars_fragment>n#include <normalmap_pars_fragment>n#include <roughnessmap_pars_fragment>n#include <metalnessmap_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n vec4 diffuseColor = vec4( diffuse, opacity );n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );n vec3 totalEmissiveRadiance = emissive;n #include <logdepthbuf_fragment>n #include <map_fragment>n #include <color_fragment>n #include <alphamap_fragment>n #include <alphatest_fragment>n #include <specularmap_fragment>n #include <roughnessmap_fragment>n #include <metalnessmap_fragment>n #include <normal_flip>n #include <normal_fragment>n #include <emissivemap_fragment>n #include <lights_physical_fragment>n #include <lights_template>n #include <aomap_fragment>n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include <premultiplied_alpha_fragment>n #include <tonemapping_fragment>n #include <encodings_fragment>n #include <fog_fragment>n}n"), (n.ShaderChunk.meshphysical_vert = "#define PHYSICALnvarying vec3 vViewPosition;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifn#include <common>n#include <uv_pars_vertex>n#include <uv2_pars_vertex>n#include <displacementmap_pars_vertex>n#include <color_pars_vertex>n#include <morphtarget_pars_vertex>n#include <skinning_pars_vertex>n#include <shadowmap_pars_vertex>n#include <specularmap_pars_fragment>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <uv_vertex>n #include <uv2_vertex>n #include <color_vertex>n #include <beginnormal_vertex>n #include <morphnormal_vertex>n #include <skinbase_vertex>n #include <skinnormal_vertex>n #include <defaultnormal_vertex>n#ifndef FLAT_SHADEDn vNormal = normalize( transformedNormal );n#endifn #include <begin_vertex>n #include <displacementmap_vertex>n #include <morphtarget_vertex>n #include <skinning_vertex>n #include <project_vertex>n #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n vViewPosition = - mvPosition.xyz;n #include <worldpos_vertex>n #include <shadowmap_vertex>n}n"), (n.ShaderChunk.normal_frag = "uniform float opacity;nvarying vec3 vNormal;n#include <common>n#include <packing>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n gl_FragColor = vec4( packNormalToRGB( vNormal ), opacity );n #include <logdepthbuf_fragment>n}n"), (n.ShaderChunk.normal_vert = "varying vec3 vNormal;n#include <common>n#include <morphtarget_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n vNormal = normalize( normalMatrix * normal );n #include <begin_vertex>n #include <morphtarget_vertex>n #include <project_vertex>n #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n}n"), (n.ShaderChunk.points_frag = "uniform vec3 diffuse;nuniform float opacity;n#include <common>n#include <color_pars_fragment>n#include <map_particle_pars_fragment>n#include <fog_pars_fragment>n#include <shadowmap_pars_fragment>n#include <logdepthbuf_pars_fragment>n#include <clipping_planes_pars_fragment>nvoid main() {n #include <clipping_planes_fragment>n vec3 outgoingLight = vec3( 0.0 );n vec4 diffuseColor = vec4( diffuse, opacity );n #include <logdepthbuf_fragment>n #include <map_particle_fragment>n #include <color_fragment>n #include <alphatest_fragment>n outgoingLight = diffuseColor.rgb;n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include <premultiplied_alpha_fragment>n #include <tonemapping_fragment>n #include <encodings_fragment>n #include <fog_fragment>n}n"), (n.ShaderChunk.points_vert = "uniform float size;nuniform float scale;n#include <common>n#include <color_pars_vertex>n#include <shadowmap_pars_vertex>n#include <logdepthbuf_pars_vertex>n#include <clipping_planes_pars_vertex>nvoid main() {n #include <color_vertex>n #include <begin_vertex>n #include <project_vertex>n #ifdef USE_SIZEATTENUATIONn gl_PointSize = size * ( scale / - mvPosition.z );n #elsen gl_PointSize = size;n #endifn #include <logdepthbuf_vertex>n #include <clipping_planes_vertex>n #include <worldpos_vertex>n #include <shadowmap_vertex>n}n"), (n.ShaderChunk.shadow_frag = "uniform float opacity;n#include <common>n#include <packing>n#include <bsdfs>n#include <lights_pars>n#include <shadowmap_pars_fragment>n#include <shadowmask_pars_fragment>nvoid main() {n gl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );n}n"), (n.ShaderChunk.shadow_vert = "#include <shadowmap_pars_vertex>nvoid main() {n #include <begin_vertex>n #include <project_vertex>n #include <worldpos_vertex>n #include <shadowmap_vertex>n}n"), (n.ShaderLib = { basic: { uniforms: n.UniformsUtils.merge([n.UniformsLib.common, n.UniformsLib.aomap, n.UniformsLib.fog]), vertexShader: n.ShaderChunk.meshbasic_vert, fragmentShader: n.ShaderChunk.meshbasic_frag }, lambert: { uniforms: n.UniformsUtils.merge([n.UniformsLib.common, n.UniformsLib.aomap, n.UniformsLib.lightmap, n.UniformsLib.emissivemap, n.UniformsLib.fog, n.UniformsLib.lights, { emissive: { value: new n.Color(0) } }]), vertexShader: n.ShaderChunk.meshlambert_vert, fragmentShader: n.ShaderChunk.meshlambert_frag, }, phong: { uniforms: n.UniformsUtils.merge([ n.UniformsLib.common, n.UniformsLib.aomap, n.UniformsLib.lightmap, n.UniformsLib.emissivemap, n.UniformsLib.bumpmap, n.UniformsLib.normalmap, n.UniformsLib.displacementmap, n.UniformsLib.fog, n.UniformsLib.lights, { emissive: { value: new n.Color(0) }, specular: { value: new n.Color(1118481) }, shininess: { value: 30 } }, ]), vertexShader: n.ShaderChunk.meshphong_vert, fragmentShader: n.ShaderChunk.meshphong_frag, }, standard: { uniforms: n.UniformsUtils.merge([ n.UniformsLib.common, n.UniformsLib.aomap, n.UniformsLib.lightmap, n.UniformsLib.emissivemap, n.UniformsLib.bumpmap, n.UniformsLib.normalmap, n.UniformsLib.displacementmap, n.UniformsLib.roughnessmap, n.UniformsLib.metalnessmap, n.UniformsLib.fog, n.UniformsLib.lights, { emissive: { value: new n.Color(0) }, roughness: { value: 0.5 }, metalness: { value: 0 }, envMapIntensity: { value: 1 } }, ]), vertexShader: n.ShaderChunk.meshphysical_vert, fragmentShader: n.ShaderChunk.meshphysical_frag, }, points: { uniforms: n.UniformsUtils.merge([n.UniformsLib.points, n.UniformsLib.fog]), vertexShader: n.ShaderChunk.points_vert, fragmentShader: n.ShaderChunk.points_frag }, dashed: { uniforms: n.UniformsUtils.merge([n.UniformsLib.common, n.UniformsLib.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: n.ShaderChunk.linedashed_vert, fragmentShader: n.ShaderChunk.linedashed_frag, }, depth: { uniforms: n.UniformsUtils.merge([n.UniformsLib.common, n.UniformsLib.displacementmap]), vertexShader: n.ShaderChunk.depth_vert, fragmentShader: n.ShaderChunk.depth_frag }, normal: { uniforms: { opacity: { value: 1 } }, vertexShader: n.ShaderChunk.normal_vert, fragmentShader: n.ShaderChunk.normal_frag }, cube: { uniforms: { tCube: { value: null }, tFlip: { value: -1 }, opacity: { value: 1 } }, vertexShader: n.ShaderChunk.cube_vert, fragmentShader: n.ShaderChunk.cube_frag }, equirect: { uniforms: { tEquirect: { value: null }, tFlip: { value: -1 } }, vertexShader: n.ShaderChunk.equirect_vert, fragmentShader: n.ShaderChunk.equirect_frag }, distanceRGBA: { uniforms: { lightPos: { value: new n.Vector3() } }, vertexShader: n.ShaderChunk.distanceRGBA_vert, fragmentShader: n.ShaderChunk.distanceRGBA_frag }, }), (n.ShaderLib.physical = { uniforms: n.UniformsUtils.merge([n.ShaderLib.standard.uniforms, { clearCoat: { value: 0 }, clearCoatRoughness: { value: 0 } }]), vertexShader: n.ShaderChunk.meshphysical_vert, fragmentShader: n.ShaderChunk.meshphysical_frag, }), (n.WebGLRenderer = function (e) { function t() { return null === te ? pe : 1; } function i(e, t, i, n) { z === !0 && ((e *= n), (t *= n), (i *= n)), Oe.clearColor(e, t, i, n); } function r() { Oe.init(), Oe.scissor(ae.copy(me).multiplyScalar(pe)), Oe.viewport(le.copy(ge).multiplyScalar(pe)), i(ue.r, ue.g, ue.b, he); } function o() { (ee = null), (oe = null), (re = ""), (ne = -1), Oe.reset(); } function a(e) { e.preventDefault(), o(), r(), ke.clear(); } function s(e) { var t = e.target; t.removeEventListener("dispose", s), l(t); } function l(e) { c(e), ke["delete"](e); } function c(e) { var t = ke.get(e).program; (e.program = void 0), void 0 !== t && Ne.releaseProgram(t); } function u(e, t, i, r) { var o; if (i instanceof n.InstancedBufferGeometry && ((o = Le.get("ANGLE_instanced_arrays")), null === o)) return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); void 0 === r && (r = 0), Oe.initAttributes(); var a = i.attributes, s = t.getAttributes(), l = e.defaultAttributeValues; for (var c in s) { var u = s[c]; if (u >= 0) { var h = a[c]; if (void 0 !== h) { var d = Ae.FLOAT, f = h.array, p = h.normalized; f instanceof Float32Array ? (d = Ae.FLOAT) : f instanceof Float64Array ? console.warn("Unsupported data buffer format: Float64Array") : f instanceof Uint16Array ? (d = Ae.UNSIGNED_SHORT) : f instanceof Int16Array ? (d = Ae.SHORT) : f instanceof Uint32Array ? (d = Ae.UNSIGNED_INT) : f instanceof Int32Array ? (d = Ae.INT) : f instanceof Int8Array ? (d = Ae.BYTE) : f instanceof Uint8Array && (d = Ae.UNSIGNED_BYTE); var m = h.itemSize, v = Ie.getAttributeBuffer(h); if (h instanceof n.InterleavedBufferAttribute) { var g = h.data, y = g.stride, _ = h.offset; g instanceof n.InstancedInterleavedBuffer ? (Oe.enableAttributeAndDivisor(u, g.meshPerAttribute, o), void 0 === i.maxInstancedCount && (i.maxInstancedCount = g.meshPerAttribute * g.count)) : Oe.enableAttribute(u), Ae.bindBuffer(Ae.ARRAY_BUFFER, v), Ae.vertexAttribPointer(u, m, d, p, y * g.array.BYTES_PER_ELEMENT, (r * y + _) * g.array.BYTES_PER_ELEMENT); } else h instanceof n.InstancedBufferAttribute ? (Oe.enableAttributeAndDivisor(u, h.meshPerAttribute, o), void 0 === i.maxInstancedCount && (i.maxInstancedCount = h.meshPerAttribute * h.count)) : Oe.enableAttribute(u), Ae.bindBuffer(Ae.ARRAY_BUFFER, v), Ae.vertexAttribPointer(u, m, d, p, 0, r * m * h.array.BYTES_PER_ELEMENT); } else if (void 0 !== l) { var b = l[c]; if (void 0 !== b) switch (b.length) { case 2: Ae.vertexAttrib2fv(u, b); break; case 3: Ae.vertexAttrib3fv(u, b); break; case 4: Ae.vertexAttrib4fv(u, b); break; default: Ae.vertexAttrib1fv(u, b); } } } } Oe.disableUnusedAttributes(); } function h(e, t) { return Math.abs(t[0]) - Math.abs(e[0]); } function d(e, t) { return e.object.renderOrder !== t.object.renderOrder ? e.object.renderOrder - t.object.renderOrder : e.material.program && t.material.program && e.material.program !== t.material.program ? e.material.program.id - t.material.program.id : e.material.id !== t.material.id ? e.material.id - t.material.id : e.z !== t.z ? e.z - t.z : e.id - t.id; } function f(e, t) { return e.object.renderOrder !== t.object.renderOrder ? e.object.renderOrder - t.object.renderOrder : e.z !== t.z ? t.z - e.z : e.id - t.id; } function p(e, t, i, n, r) { var o, a; i.transparent ? ((o = Y), (a = ++q)) : ((o = W), (a = ++X)); var s = o[a]; void 0 !== s ? ((s.id = e.id), (s.object = e), (s.geometry = t), (s.material = i), (s.z = Te.z), (s.group = r)) : ((s = { id: e.id, object: e, geometry: t, material: i, z: Te.z, group: r }), o.push(s)); } function m(e) { var t = e.geometry; return null === t.boundingSphere && t.computeBoundingSphere(), we.copy(t.boundingSphere).applyMatrix4(e.matrixWorld), g(we); } function v(e) { return we.center.set(0, 0, 0), (we.radius = 0.7071067811865476), we.applyMatrix4(e.matrixWorld), g(we); } function g(e) { if (!ye.intersectsSphere(e)) return !1; var t = _e.numPlanes; if (0 === t) return !0; var i = J.clippingPlanes, n = e.center, r = -e.radius, o = 0; do if (i[o].distanceToPoint(n) < r) return !1; while (++o !== t); return !0; } function y(e, t) { if (e.visible !== !1) { if (e.layers.test(t.layers)) if (e instanceof n.Light) H.push(e); else if (e instanceof n.Sprite)(e.frustumCulled === !1 || v(e) === !0) && K.push(e); else if (e instanceof n.LensFlare) Q.push(e); else if (e instanceof n.ImmediateRenderObject) J.sortObjects === !0 && (Te.setFromMatrixPosition(e.matrixWorld), Te.applyProjection(Me)), p(e, null, e.material, Te.z, null); else if ((e instanceof n.Mesh || e instanceof n.Line || e instanceof n.Points) && (e instanceof n.SkinnedMesh && e.skeleton.update(), e.frustumCulled === !1 || m(e) === !0)) { var i = e.material; if (i.visible === !0) { J.sortObjects === !0 && (Te.setFromMatrixPosition(e.matrixWorld), Te.applyProjection(Me)); var r = Ie.update(e); if (i instanceof n.MultiMaterial) for (var o = r.groups, a = i.materials, s = 0, l = o.length; l > s; s++) { var c = o[s], u = a[c.materialIndex]; u.visible === !0 && p(e, r, u, Te.z, c); } else p(e, r, i, Te.z, null); } } for (var h = e.children, s = 0, l = h.length; l > s; s++) y(h[s], t); } } function _(e, t, i, r) { for (var o = 0, a = e.length; a > o; o++) { var s = e[o], l = s.object, c = s.geometry, u = void 0 === r ? s.material : r, h = s.group; if ((l.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, l.matrixWorld), l.normalMatrix.getNormalMatrix(l.modelViewMatrix), l instanceof n.ImmediateRenderObject)) { x(u); var d = w(t, i, u, l); (re = ""), l.render(function (e) { J.renderBufferImmediate(e, d, u); }); } else J.renderBufferDirect(t, i, c, u, l, h); } } function b(e, t, i) { var r = ke.get(e), o = Ne.getParameters(e, Se, t, _e.numPlanes, i), a = Ne.getProgramCode(e, o), l = r.program, u = !0; if (void 0 === l) e.addEventListener("dispose", s); else if (l.code !== a) c(e); else { if (void 0 !== o.shaderID) return; u = !1; } if (u) { if (o.shaderID) { var h = n.ShaderLib[o.shaderID]; r.__webglShader = { name: e.type, uniforms: n.UniformsUtils.clone(h.uniforms), vertexShader: h.vertexShader, fragmentShader: h.fragmentShader }; } else r.__webglShader = { name: e.type, uniforms: e.uniforms, vertexShader: e.vertexShader, fragmentShader: e.fragmentShader }; (e.__webglShader = r.__webglShader), (l = Ne.acquireProgram(e, o, a)), (r.program = l), (e.program = l); } var d = l.getAttributes(); if (e.morphTargets) { e.numSupportedMorphTargets = 0; for (var f = 0; f < J.maxMorphTargets; f++) d["morphTarget" + f] >= 0 && e.numSupportedMorphTargets++; } if (e.morphNormals) { e.numSupportedMorphNormals = 0; for (var f = 0; f < J.maxMorphNormals; f++) d["morphNormal" + f] >= 0 && e.numSupportedMorphNormals++; } var p = r.__webglShader.uniforms; ((e instanceof n.ShaderMaterial || e instanceof n.RawShaderMaterial) && e.clipping !== !0) || ((r.numClippingPlanes = _e.numPlanes), (p.clippingPlanes = _e.uniform)), e.lights && ((r.lightsHash = Se.hash), (p.ambientLightColor.value = Se.ambient), (p.directionalLights.value = Se.directional), (p.spotLights.value = Se.spot), (p.pointLights.value = Se.point), (p.hemisphereLights.value = Se.hemi), (p.directionalShadowMap.value = Se.directionalShadowMap), (p.directionalShadowMatrix.value = Se.directionalShadowMatrix), (p.spotShadowMap.value = Se.spotShadowMap), (p.spotShadowMatrix.value = Se.spotShadowMatrix), (p.pointShadowMap.value = Se.pointShadowMap), (p.pointShadowMatrix.value = Se.pointShadowMatrix)); var m = r.program.getUniforms(), v = n.WebGLUniforms.seqWithValue(m.seq, p); (r.uniformsList = v), (r.dynamicUniforms = n.WebGLUniforms.splitDynamic(v, p)); } function x(e) { e.side !== n.DoubleSide ? Oe.enable(Ae.CULL_FACE) : Oe.disable(Ae.CULL_FACE), Oe.setFlipSided(e.side === n.BackSide), e.transparent === !0 ? Oe.setBlending(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha) : Oe.setBlending(n.NoBlending), Oe.setDepthFunc(e.depthFunc), Oe.setDepthTest(e.depthTest), Oe.setDepthWrite(e.depthWrite), Oe.setColorWrite(e.colorWrite), Oe.setPolygonOffset(e.polygonOffset, e.polygonOffsetFactor, e.polygonOffsetUnits); } function w(e, t, i, r) { ce = 0; var o = ke.get(i); if (be) { if (xe || e !== oe) { var a = e === oe && i.id === ne; _e.setState(i.clippingPlanes, i.clipShadows, e, o, a); } void 0 !== o.numClippingPlanes && o.numClippingPlanes !== _e.numPlanes && (i.needsUpdate = !0); } void 0 === o.program && (i.needsUpdate = !0), void 0 !== o.lightsHash && o.lightsHash !== Se.hash && (i.needsUpdate = !0), i.needsUpdate && (b(i, t, r), (i.needsUpdate = !1)); var s = !1, l = !1, c = !1, u = o.program, h = u.getUniforms(), d = o.__webglShader.uniforms; if ((u.id !== ee && (Ae.useProgram(u.program), (ee = u.id), (s = !0), (l = !0), (c = !0)), i.id !== ne && ((ne = i.id), (l = !0)), s || e !== oe)) { if ( (h.set(Ae, e, "projectionMatrix"), Re.logarithmicDepthBuffer && h.setValue(Ae, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)), e !== oe && ((oe = e), (l = !0), (c = !0)), i instanceof n.ShaderMaterial || i instanceof n.MeshPhongMaterial || i instanceof n.MeshStandardMaterial || i.envMap) ) { var f = h.map.cameraPosition; void 0 !== f && f.setValue(Ae, Te.setFromMatrixPosition(e.matrixWorld)); } (i instanceof n.MeshPhongMaterial || i instanceof n.MeshLambertMaterial || i instanceof n.MeshBasicMaterial || i instanceof n.MeshStandardMaterial || i instanceof n.ShaderMaterial || i.skinning) && h.setValue(Ae, "viewMatrix", e.matrixWorldInverse), h.set(Ae, J, "toneMappingExposure"), h.set(Ae, J, "toneMappingWhitePoint"); } if (i.skinning) { h.setOptional(Ae, r, "bindMatrix"), h.setOptional(Ae, r, "bindMatrixInverse"); var p = r.skeleton; p && (Re.floatVertexTextures && p.useVertexTexture ? (h.set(Ae, p, "boneTexture"), h.set(Ae, p, "boneTextureWidth"), h.set(Ae, p, "boneTextureHeight")) : h.setOptional(Ae, p, "boneMatrices")); } l && (i.lights && O(d, c), t && i.fog && A(d, t), (i instanceof n.MeshBasicMaterial || i instanceof n.MeshLambertMaterial || i instanceof n.MeshPhongMaterial || i instanceof n.MeshStandardMaterial || i instanceof n.MeshDepthMaterial) && M(d, i), i instanceof n.LineBasicMaterial ? T(d, i) : i instanceof n.LineDashedMaterial ? (T(d, i), S(d, i)) : i instanceof n.PointsMaterial ? E(d, i) : i instanceof n.MeshLambertMaterial ? C(d, i) : i instanceof n.MeshPhongMaterial ? P(d, i) : i instanceof n.MeshPhysicalMaterial ? R(d, i) : i instanceof n.MeshStandardMaterial ? L(d, i) : i instanceof n.MeshDepthMaterial ? i.displacementMap && ((d.displacementMap.value = i.displacementMap), (d.displacementScale.value = i.displacementScale), (d.displacementBias.value = i.displacementBias)) : i instanceof n.MeshNormalMaterial && (d.opacity.value = i.opacity), n.WebGLUniforms.upload(Ae, o.uniformsList, d, J)), h.set(Ae, r, "modelViewMatrix"), h.set(Ae, r, "normalMatrix"), h.setValue(Ae, "modelMatrix", r.matrixWorld); var m = o.dynamicUniforms; return null !== m && (n.WebGLUniforms.evalDynamic(m, d, r, e), n.WebGLUniforms.upload(Ae, m, d, J)), u; } function M(e, t) { (e.opacity.value = t.opacity), (e.diffuse.value = t.color), t.emissive && e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity), (e.map.value = t.map), (e.specularMap.value = t.specularMap), (e.alphaMap.value = t.alphaMap), t.aoMap && ((e.aoMap.value = t.aoMap), (e.aoMapIntensity.value = t.aoMapIntensity)); var i; if ( (t.map ? (i = t.map) : t.specularMap ? (i = t.specularMap) : t.displacementMap ? (i = t.displacementMap) : t.normalMap ? (i = t.normalMap) : t.bumpMap ? (i = t.bumpMap) : t.roughnessMap ? (i = t.roughnessMap) : t.metalnessMap ? (i = t.metalnessMap) : t.alphaMap ? (i = t.alphaMap) : t.emissiveMap && (i = t.emissiveMap), void 0 !== i) ) { i instanceof n.WebGLRenderTarget && (i = i.texture); var r = i.offset, o = i.repeat; e.offsetRepeat.value.set(r.x, r.y, o.x, o.y); } (e.envMap.value = t.envMap), (e.flipEnvMap.value = t.envMap instanceof n.CubeTexture ? -1 : 1), (e.reflectivity.value = t.reflectivity), (e.refractionRatio.value = t.refractionRatio); } function T(e, t) { (e.diffuse.value = t.color), (e.opacity.value = t.opacity); } function S(e, t) { (e.dashSize.value = t.dashSize), (e.totalSize.value = t.dashSize + t.gapSize), (e.scale.value = t.scale); } function E(e, t) { if (((e.diffuse.value = t.color), (e.opacity.value = t.opacity), (e.size.value = t.size * pe), (e.scale.value = 0.5 * U.clientHeight), (e.map.value = t.map), null !== t.map)) { var i = t.map.offset, n = t.map.repeat; e.offsetRepeat.value.set(i.x, i.y, n.x, n.y); } } function A(e, t) { (e.fogColor.value = t.color), t instanceof n.Fog ? ((e.fogNear.value = t.near), (e.fogFar.value = t.far)) : t instanceof n.FogExp2 && (e.fogDensity.value = t.density); } function C(e, t) { t.lightMap && ((e.lightMap.value = t.lightMap), (e.lightMapIntensity.value = t.lightMapIntensity)), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap); } function P(e, t) { (e.specular.value = t.specular), (e.shininess.value = Math.max(t.shininess, 1e-4)), t.lightMap && ((e.lightMap.value = t.lightMap), (e.lightMapIntensity.value = t.lightMapIntensity)), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap), t.bumpMap && ((e.bumpMap.value = t.bumpMap), (e.bumpScale.value = t.bumpScale)), t.normalMap && ((e.normalMap.value = t.normalMap), e.normalScale.value.copy(t.normalScale)), t.displacementMap && ((e.displacementMap.value = t.displacementMap), (e.displacementScale.value = t.displacementScale), (e.displacementBias.value = t.displacementBias)); } function L(e, t) { (e.roughness.value = t.roughness), (e.metalness.value = t.metalness), t.roughnessMap && (e.roughnessMap.value = t.roughnessMap), t.metalnessMap && (e.metalnessMap.value = t.metalnessMap), t.lightMap && ((e.lightMap.value = t.lightMap), (e.lightMapIntensity.value = t.lightMapIntensity)), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap), t.bumpMap && ((e.bumpMap.value = t.bumpMap), (e.bumpScale.value = t.bumpScale)), t.normalMap && ((e.normalMap.value = t.normalMap), e.normalScale.value.copy(t.normalScale)), t.displacementMap && ((e.displacementMap.value = t.displacementMap), (e.displacementScale.value = t.displacementScale), (e.displacementBias.value = t.displacementBias)), t.envMap && (e.envMapIntensity.value = t.envMapIntensity); } function R(e, t) { (e.clearCoat.value = t.clearCoat), (e.clearCoatRoughness.value = t.clearCoatRoughness), L(e, t); } function O(e, t) { (e.ambientLightColor.needsUpdate = t), (e.directionalLights.needsUpdate = t), (e.pointLights.needsUpdate = t), (e.spotLights.needsUpdate = t), (e.hemisphereLights.needsUpdate = t); } function k(e) { for (var t = 0, i = 0, n = e.length; n > i; i++) { var r = e[i]; r.castShadow && (Se.shadows[t++] = r); } Se.shadows.length = t; } function D(e, t) { var i, r, o, a, s, l, c, u = 0, h = 0, d = 0, f = t.matrixWorldInverse, p = 0, m = 0, v = 0, g = 0; for (i = 0, r = e.length; r > i; i++) if (((o = e[i]), (a = o.color), (s = o.intensity), (l = o.distance), (c = o.shadow && o.shadow.map ? o.shadow.map.texture : null), o instanceof n.AmbientLight))(u += a.r * s), (h += a.g * s), (d += a.b * s); else if (o instanceof n.DirectionalLight) { var y = Ue.get(o); y.color.copy(o.color).multiplyScalar(o.intensity), y.direction.setFromMatrixPosition(o.matrixWorld), Te.setFromMatrixPosition(o.target.matrixWorld), y.direction.sub(Te), y.direction.transformDirection(f), (y.shadow = o.castShadow), o.castShadow && ((y.shadowBias = o.shadow.bias), (y.shadowRadius = o.shadow.radius), (y.shadowMapSize = o.shadow.mapSize)), (Se.directionalShadowMap[p] = c), (Se.directionalShadowMatrix[p] = o.shadow.matrix), (Se.directional[p++] = y); } else if (o instanceof n.SpotLight) { var y = Ue.get(o); y.position.setFromMatrixPosition(o.matrixWorld), y.position.applyMatrix4(f), y.color.copy(a).multiplyScalar(s), (y.distance = l), y.direction.setFromMatrixPosition(o.matrixWorld), Te.setFromMatrixPosition(o.target.matrixWorld), y.direction.sub(Te), y.direction.transformDirection(f), (y.coneCos = Math.cos(o.angle)), (y.penumbraCos = Math.cos(o.angle * (1 - o.penumbra))), (y.decay = 0 === o.distance ? 0 : o.decay), (y.shadow = o.castShadow), o.castShadow && ((y.shadowBias = o.shadow.bias), (y.shadowRadius = o.shadow.radius), (y.shadowMapSize = o.shadow.mapSize)), (Se.spotShadowMap[v] = c), (Se.spotShadowMatrix[v] = o.shadow.matrix), (Se.spot[v++] = y); } else if (o instanceof n.PointLight) { var y = Ue.get(o); y.position.setFromMatrixPosition(o.matrixWorld), y.position.applyMatrix4(f), y.color.copy(o.color).multiplyScalar(o.intensity), (y.distance = o.distance), (y.decay = 0 === o.distance ? 0 : o.decay), (y.shadow = o.castShadow), o.castShadow && ((y.shadowBias = o.shadow.bias), (y.shadowRadius = o.shadow.radius), (y.shadowMapSize = o.shadow.mapSize)), (Se.pointShadowMap[m] = c), void 0 === Se.pointShadowMatrix[m] && (Se.pointShadowMatrix[m] = new n.Matrix4()), Te.setFromMatrixPosition(o.matrixWorld).negate(), Se.pointShadowMatrix[m].identity().setPosition(Te), (Se.point[m++] = y); } else if (o instanceof n.HemisphereLight) { var y = Ue.get(o); y.direction.setFromMatrixPosition(o.matrixWorld), y.direction.transformDirection(f), y.direction.normalize(), y.skyColor.copy(o.color).multiplyScalar(s), y.groundColor.copy(o.groundColor).multiplyScalar(s), (Se.hemi[g++] = y); } (Se.ambient[0] = u), (Se.ambient[1] = h), (Se.ambient[2] = d), (Se.directional.length = p), (Se.spot.length = v), (Se.point.length = m), (Se.hemi.length = g), (Se.hash = p + "," + m + "," + v + "," + g + "," + Se.shadows.length); } function I() { var e = ce; return e >= Re.maxTextures && console.warn("WebGLRenderer: trying to use " + e + " texture units while this GPU supports only " + Re.maxTextures), (ce += 1), e; } function N(e) { var t; if (e === n.RepeatWrapping) return Ae.REPEAT; if (e === n.ClampToEdgeWrapping) return Ae.CLAMP_TO_EDGE; if (e === n.MirroredRepeatWrapping) return Ae.MIRRORED_REPEAT; if (e === n.NearestFilter) return Ae.NEAREST; if (e === n.NearestMipMapNearestFilter) return Ae.NEAREST_MIPMAP_NEAREST; if (e === n.NearestMipMapLinearFilter) return Ae.NEAREST_MIPMAP_LINEAR; if (e === n.LinearFilter) return Ae.LINEAR; if (e === n.LinearMipMapNearestFilter) return Ae.LINEAR_MIPMAP_NEAREST; if (e === n.LinearMipMapLinearFilter) return Ae.LINEAR_MIPMAP_LINEAR; if (e === n.UnsignedByteType) return Ae.UNSIGNED_BYTE; if (e === n.UnsignedShort4444Type) return Ae.UNSIGNED_SHORT_4_4_4_4; if (e === n.UnsignedShort5551Type) return Ae.UNSIGNED_SHORT_5_5_5_1; if (e === n.UnsignedShort565Type) return Ae.UNSIGNED_SHORT_5_6_5; if (e === n.ByteType) return Ae.BYTE; if (e === n.ShortType) return Ae.SHORT; if (e === n.UnsignedShortType) return Ae.UNSIGNED_SHORT; if (e === n.IntType) return Ae.INT; if (e === n.UnsignedIntType) return Ae.UNSIGNED_INT; if (e === n.FloatType) return Ae.FLOAT; if (((t = Le.get("OES_texture_half_float")), null !== t && e === n.HalfFloatType)) return t.HALF_FLOAT_OES; if (e === n.AlphaFormat) return Ae.ALPHA; if (e === n.RGBFormat) return Ae.RGB; if (e === n.RGBAFormat) return Ae.RGBA; if (e === n.LuminanceFormat) return Ae.LUMINANCE; if (e === n.LuminanceAlphaFormat) return Ae.LUMINANCE_ALPHA; if (e === n.DepthFormat) return Ae.DEPTH_COMPONENT; if (e === n.AddEquation) return Ae.FUNC_ADD; if (e === n.SubtractEquation) return Ae.FUNC_SUBTRACT; if (e === n.ReverseSubtractEquation) return Ae.FUNC_REVERSE_SUBTRACT; if (e === n.ZeroFactor) return Ae.ZERO; if (e === n.OneFactor) return Ae.ONE; if (e === n.SrcColorFactor) return Ae.SRC_COLOR; if (e === n.OneMinusSrcColorFactor) return Ae.ONE_MINUS_SRC_COLOR; if (e === n.SrcAlphaFactor) return Ae.SRC_ALPHA; if (e === n.OneMinusSrcAlphaFactor) return Ae.ONE_MINUS_SRC_ALPHA; if (e === n.DstAlphaFactor) return Ae.DST_ALPHA; if (e === n.OneMinusDstAlphaFactor) return Ae.ONE_MINUS_DST_ALPHA; if (e === n.DstColorFactor) return Ae.DST_COLOR; if (e === n.OneMinusDstColorFactor) return Ae.ONE_MINUS_DST_COLOR; if (e === n.SrcAlphaSaturateFactor) return Ae.SRC_ALPHA_SATURATE; if (((t = Le.get("WEBGL_compressed_texture_s3tc")), null !== t)) { if (e === n.RGB_S3TC_DXT1_Format) return t.COMPRESSED_RGB_S3TC_DXT1_EXT; if (e === n.RGBA_S3TC_DXT1_Format) return t.COMPRESSED_RGBA_S3TC_DXT1_EXT; if (e === n.RGBA_S3TC_DXT3_Format) return t.COMPRESSED_RGBA_S3TC_DXT3_EXT; if (e === n.RGBA_S3TC_DXT5_Format) return t.COMPRESSED_RGBA_S3TC_DXT5_EXT; } if (((t = Le.get("WEBGL_compressed_texture_pvrtc")), null !== t)) { if (e === n.RGB_PVRTC_4BPPV1_Format) return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; if (e === n.RGB_PVRTC_2BPPV1_Format) return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; if (e === n.RGBA_PVRTC_4BPPV1_Format) return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; if (e === n.RGBA_PVRTC_2BPPV1_Format) return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; } if (((t = Le.get("WEBGL_compressed_texture_etc1")), null !== t && e === n.RGB_ETC1_Format)) return t.COMPRESSED_RGB_ETC1_WEBGL; if (((t = Le.get("EXT_blend_minmax")), null !== t)) { if (e === n.MinEquation) return t.MIN_EXT; if (e === n.MaxEquation) return t.MAX_EXT; } return 0; } console.log("THREE.WebGLRenderer", n.REVISION), (e = e || {}); var U = void 0 !== e.canvas ? e.canvas : document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"), j = void 0 !== e.context ? e.context : null, B = void 0 !== e.alpha ? e.alpha : !1, F = void 0 !== e.depth ? e.depth : !0, V = void 0 !== e.stencil ? e.stencil : !0, G = void 0 !== e.antialias ? e.antialias : !1, z = void 0 !== e.premultipliedAlpha ? e.premultipliedAlpha : !0, $ = void 0 !== e.preserveDrawingBuffer ? e.preserveDrawingBuffer : !1, H = [], W = [], X = -1, Y = [], q = -1, Z = new Float32Array(8), K = [], Q = []; (this.domElement = U), (this.context = null), (this.autoClear = !0), (this.autoClearColor = !0), (this.autoClearDepth = !0), (this.autoClearStencil = !0), (this.sortObjects = !0), (this.clippingPlanes = []), (this.localClippingEnabled = !1), (this.gammaFactor = 2), (this.gammaInput = !1), (this.gammaOutput = !1), (this.physicallyCorrectLights = !1), (this.toneMapping = n.LinearToneMapping), (this.toneMappingExposure = 1), (this.toneMappingWhitePoint = 1), (this.maxMorphTargets = 8), (this.maxMorphNormals = 4); var J = this, ee = null, te = null, ie = null, ne = -1, re = "", oe = null, ae = new n.Vector4(), se = null, le = new n.Vector4(), ce = 0, ue = new n.Color(0), he = 0, de = U.width, fe = U.height, pe = 1, me = new n.Vector4(0, 0, de, fe), ve = !1, ge = new n.Vector4(0, 0, de, fe), ye = new n.Frustum(), _e = new n.WebGLClipping(), be = !1, xe = !1, we = new n.Sphere(), Me = new n.Matrix4(), Te = new n.Vector3(), Se = { hash: "", ambient: [0, 0, 0], directional: [], directionalShadowMap: [], directionalShadowMatrix: [], spot: [], spotShadowMap: [], spotShadowMatrix: [], point: [], pointShadowMap: [], pointShadowMatrix: [], hemi: [], shadows: [], }, Ee = { calls: 0, vertices: 0, faces: 0, points: 0 }; this.info = { render: Ee, memory: { geometries: 0, textures: 0 }, programs: null }; var Ae; try { var Ce = { alpha: B, depth: F, stencil: V, antialias: G, premultipliedAlpha: z, preserveDrawingBuffer: $ }; if (((Ae = j || U.getContext("webgl", Ce) || U.getContext("experimental-webgl", Ce)), null === Ae)) throw null !== U.getContext("webgl") ? "Error creating WebGL context with your selected attributes." : "Error creating WebGL context."; void 0 === Ae.getShaderPrecisionFormat && (Ae.getShaderPrecisionFormat = function () { return { rangeMin: 1, rangeMax: 1, precision: 1 }; }), U.addEventListener("webglcontextlost", a, !1); } catch (Pe) { console.error("THREE.WebGLRenderer: " + Pe); } var Le = new n.WebGLExtensions(Ae); Le.get("WEBGL_depth_texture"), Le.get("OES_texture_float"), Le.get("OES_texture_float_linear"), Le.get("OES_texture_half_float"), Le.get("OES_texture_half_float_linear"), Le.get("OES_standard_derivatives"), Le.get("ANGLE_instanced_arrays"), Le.get("OES_element_index_uint") && (n.BufferGeometry.MaxIndex = 4294967296); var Re = new n.WebGLCapabilities(Ae, Le, e), Oe = new n.WebGLState(Ae, Le, N), ke = new n.WebGLProperties(), De = new n.WebGLTextures(Ae, Le, Oe, ke, Re, N, this.info), Ie = new n.WebGLObjects(Ae, ke, this.info), Ne = new n.WebGLPrograms(this, Re), Ue = new n.WebGLLights(); this.info.programs = Ne.programs; var je = new n.WebGLBufferRenderer(Ae, Le, Ee), Be = new n.WebGLIndexedBufferRenderer(Ae, Le, Ee), Fe = new n.OrthographicCamera(-1, 1, 1, -1, 0, 1), Ve = new n.PerspectiveCamera(), Ge = new n.Mesh(new n.PlaneBufferGeometry(2, 2), new n.MeshBasicMaterial({ depthTest: !1, depthWrite: !1, fog: !1 })), ze = n.ShaderLib.cube, $e = new n.Mesh( new n.BoxBufferGeometry(5, 5, 5), new n.ShaderMaterial({ uniforms: ze.uniforms, vertexShader: ze.vertexShader, fragmentShader: ze.fragmentShader, side: n.BackSide, depthTest: !1, depthWrite: !1, fog: !1 }) ); r(), (this.context = Ae), (this.capabilities = Re), (this.extensions = Le), (this.properties = ke), (this.state = Oe); var He = new n.WebGLShadowMap(this, Se, Ie, Re); this.shadowMap = He; var We = new n.SpritePlugin(this, K), Xe = new n.LensFlarePlugin(this, Q); (this.getContext = function () { return Ae; }), (this.getContextAttributes = function () { return Ae.getContextAttributes(); }), (this.forceContextLoss = function () { Le.get("WEBGL_lose_context").loseContext(); }), (this.getMaxAnisotropy = function () { return Re.getMaxAnisotropy(); }), (this.getPrecision = function () { return Re.precision; }), (this.getPixelRatio = function () { return pe; }), (this.setPixelRatio = function (e) { void 0 !== e && ((pe = e), this.setSize(ge.z, ge.w, !1)); }), (this.getSize = function () { return { width: de, height: fe }; }), (this.setSize = function (e, t, i) { (de = e), (fe = t), (U.width = e * pe), (U.height = t * pe), i !== !1 && ((U.style.width = e + "px"), (U.style.height = t + "px")), this.setViewport(0, 0, e, t); }), (this.setViewport = function (e, t, i, n) { Oe.viewport(ge.set(e, t, i, n)); }), (this.setScissor = function (e, t, i, n) { Oe.scissor(me.set(e, t, i, n)); }), (this.setScissorTest = function (e) { Oe.setScissorTest((ve = e)); }), (this.getClearColor = function () { return ue; }), (this.setClearColor = function (e, t) { ue.set(e), (he = void 0 !== t ? t : 1), i(ue.r, ue.g, ue.b, he); }), (this.getClearAlpha = function () { return he; }), (this.setClearAlpha = function (e) { (he = e), i(ue.r, ue.g, ue.b, he); }), (this.clear = function (e, t, i) { var n = 0; (void 0 === e || e) && (n |= Ae.COLOR_BUFFER_BIT), (void 0 === t || t) && (n |= Ae.DEPTH_BUFFER_BIT), (void 0 === i || i) && (n |= Ae.STENCIL_BUFFER_BIT), Ae.clear(n); }), (this.clearColor = function () { this.clear(!0, !1, !1); }), (this.clearDepth = function () { this.clear(!1, !0, !1); }), (this.clearStencil = function () { this.clear(!1, !1, !0); }), (this.clearTarget = function (e, t, i, n) { this.setRenderTarget(e), this.clear(t, i, n); }), (this.resetGLState = o), (this.dispose = function () { (Y = []), (q = -1), (W = []), (X = -1), U.removeEventListener("webglcontextlost", a, !1); }), (this.renderBufferImmediate = function (e, t, i) { Oe.initAttributes(); var r = ke.get(e); e.hasPositions && !r.position && (r.position = Ae.createBuffer()), e.hasNormals && !r.normal && (r.normal = Ae.createBuffer()), e.hasUvs && !r.uv && (r.uv = Ae.createBuffer()), e.hasColors && !r.color && (r.color = Ae.createBuffer()); var o = t.getAttributes(); if ( (e.hasPositions && (Ae.bindBuffer(Ae.ARRAY_BUFFER, r.position), Ae.bufferData(Ae.ARRAY_BUFFER, e.positionArray, Ae.DYNAMIC_DRAW), Oe.enableAttribute(o.position), Ae.vertexAttribPointer(o.position, 3, Ae.FLOAT, !1, 0, 0)), e.hasNormals) ) { if ((Ae.bindBuffer(Ae.ARRAY_BUFFER, r.normal), "MeshPhongMaterial" !== i.type && "MeshStandardMaterial" !== i.type && "MeshPhysicalMaterial" !== i.type && i.shading === n.FlatShading)) for (var a = 0, s = 3 * e.count; s > a; a += 9) { var l = e.normalArray, c = (l[a + 0] + l[a + 3] + l[a + 6]) / 3, u = (l[a + 1] + l[a + 4] + l[a + 7]) / 3, h = (l[a + 2] + l[a + 5] + l[a + 8]) / 3; (l[a + 0] = c), (l[a + 1] = u), (l[a + 2] = h), (l[a + 3] = c), (l[a + 4] = u), (l[a + 5] = h), (l[a + 6] = c), (l[a + 7] = u), (l[a + 8] = h); } Ae.bufferData(Ae.ARRAY_BUFFER, e.normalArray, Ae.DYNAMIC_DRAW), Oe.enableAttribute(o.normal), Ae.vertexAttribPointer(o.normal, 3, Ae.FLOAT, !1, 0, 0); } e.hasUvs && i.map && (Ae.bindBuffer(Ae.ARRAY_BUFFER, r.uv), Ae.bufferData(Ae.ARRAY_BUFFER, e.uvArray, Ae.DYNAMIC_DRAW), Oe.enableAttribute(o.uv), Ae.vertexAttribPointer(o.uv, 2, Ae.FLOAT, !1, 0, 0)), e.hasColors && i.vertexColors !== n.NoColors && (Ae.bindBuffer(Ae.ARRAY_BUFFER, r.color), Ae.bufferData(Ae.ARRAY_BUFFER, e.colorArray, Ae.DYNAMIC_DRAW), Oe.enableAttribute(o.color), Ae.vertexAttribPointer(o.color, 3, Ae.FLOAT, !1, 0, 0)), Oe.disableUnusedAttributes(), Ae.drawArrays(Ae.TRIANGLES, 0, e.count), (e.count = 0); }), (this.renderBufferDirect = function (e, i, r, o, a, s) { x(o); var l = w(e, i, o, a), c = !1, d = r.id + "_" + l.id + "_" + o.wireframe; d !== re && ((re = d), (c = !0)); var f = a.morphTargetInfluences; if (void 0 !== f) { for (var p = [], m = 0, v = f.length; v > m; m++) { var g = f[m]; p.push([g, m]); } p.sort(h), p.length > 8 && (p.length = 8); for (var y = r.morphAttributes, m = 0, v = p.length; v > m; m++) { var g = p[m]; if (((Z[m] = g[0]), 0 !== g[0])) { var _ = g[1]; o.morphTargets === !0 && y.position && r.addAttribute("morphTarget" + m, y.position[_]), o.morphNormals === !0 && y.normal && r.addAttribute("morphNormal" + m, y.normal[_]); } else o.morphTargets === !0 && r.removeAttribute("morphTarget" + m), o.morphNormals === !0 && r.removeAttribute("morphNormal" + m); } l.getUniforms().setValue(Ae, "morphTargetInfluences", Z), (c = !0); } var _ = r.index, b = r.attributes.position; o.wireframe === !0 && (_ = Ie.getWireframeAttribute(r)); var M; null !== _ ? ((M = Be), M.setIndex(_)) : (M = je), c && (u(o, l, r), null !== _ && Ae.bindBuffer(Ae.ELEMENT_ARRAY_BUFFER, Ie.getAttributeBuffer(_))); var T = 0, S = 1 / 0; null !== _ ? (S = _.count) : void 0 !== b && (S = b.count); var E = r.drawRange.start, A = r.drawRange.count, C = null !== s ? s.start : 0, P = null !== s ? s.count : 1 / 0, L = Math.max(T, E, C), R = Math.min(T + S, E + A, C + P) - 1, O = Math.max(0, R - L + 1); if (a instanceof n.Mesh) if (o.wireframe === !0) Oe.setLineWidth(o.wireframeLinewidth * t()), M.setMode(Ae.LINES); else switch (a.drawMode) { case n.TrianglesDrawMode: M.setMode(Ae.TRIANGLES); break; case n.TriangleStripDrawMode: M.setMode(Ae.TRIANGLE_STRIP); break; case n.TriangleFanDrawMode: M.setMode(Ae.TRIANGLE_FAN); } else if (a instanceof n.Line) { var k = o.linewidth; void 0 === k && (k = 1), Oe.setLineWidth(k * t()), a instanceof n.LineSegments ? M.setMode(Ae.LINES) : M.setMode(Ae.LINE_STRIP); } else a instanceof n.Points && M.setMode(Ae.POINTS); r instanceof n.InstancedBufferGeometry ? r.maxInstancedCount > 0 && M.renderInstances(r, L, O) : M.render(L, O); }), (this.render = function (e, t, r, o) { if (t instanceof n.Camera == !1) return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera."); var a = e.fog; (re = ""), (ne = -1), (oe = null), e.autoUpdate === !0 && e.updateMatrixWorld(), null === t.parent && t.updateMatrixWorld(), t.matrixWorldInverse.getInverse(t.matrixWorld), Me.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), ye.setFromMatrix(Me), (H.length = 0), (X = -1), (q = -1), (K.length = 0), (Q.length = 0), (xe = this.localClippingEnabled), (be = _e.init(this.clippingPlanes, xe, t)), y(e, t), (W.length = X + 1), (Y.length = q + 1), J.sortObjects === !0 && (W.sort(d), Y.sort(f)), be && _e.beginShadows(), k(H), He.render(e, t), D(H, t), be && _e.endShadows(), (Ee.calls = 0), (Ee.vertices = 0), (Ee.faces = 0), (Ee.points = 0), void 0 === r && (r = null), this.setRenderTarget(r); var s = e.background; if ( (null === s ? i(ue.r, ue.g, ue.b, he) : s instanceof n.Color && i(s.r, s.g, s.b, 1), (this.autoClear || o) && this.clear(this.autoClearColor, this.autoClearDepth, this.autoClearStencil), s instanceof n.CubeTexture ? (Ve.projectionMatrix.copy(t.projectionMatrix), Ve.matrixWorld.extractRotation(t.matrixWorld), Ve.matrixWorldInverse.getInverse(Ve.matrixWorld), ($e.material.uniforms.tCube.value = s), $e.modelViewMatrix.multiplyMatrices(Ve.matrixWorldInverse, $e.matrixWorld), Ie.update($e), J.renderBufferDirect(Ve, null, $e.geometry, $e.material, $e, null)) : s instanceof n.Texture && ((Ge.material.map = s), Ie.update(Ge), J.renderBufferDirect(Fe, null, Ge.geometry, Ge.material, Ge, null)), e.overrideMaterial) ) { var l = e.overrideMaterial; _(W, t, a, l), _(Y, t, a, l); } else Oe.setBlending(n.NoBlending), _(W, t, a), _(Y, t, a); We.render(e, t), Xe.render(e, t, le), r && De.updateRenderTargetMipmap(r), Oe.setDepthTest(!0), Oe.setDepthWrite(!0), Oe.setColorWrite(!0); }), (this.setFaceCulling = function (e, t) { Oe.setCullFace(e), Oe.setFlipSided(t === n.FrontFaceDirectionCW); }), (this.allocTextureUnit = I), (this.setTexture2D = (function () { var e = !1; return function (t, i) { t instanceof n.WebGLRenderTarget && (e || (console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."), (e = !0)), (t = t.texture)), De.setTexture2D(t, i); }; })()), (this.setTexture = (function () { var e = !1; return function (t, i) { e || (console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."), (e = !0)), De.setTexture2D(t, i); }; })()), (this.setTextureCube = (function () { var e = !1; return function (t, i) { t instanceof n.WebGLRenderTargetCube && (e || (console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."), (e = !0)), (t = t.texture)), t instanceof n.CubeTexture || (Array.isArray(t.image) && 6 === t.image.length) ? De.setTextureCube(t, i) : De.setTextureCubeDynamic(t, i); }; })()), (this.getCurrentRenderTarget = function () { return te; }), (this.setRenderTarget = function (e) { (te = e), e && void 0 === ke.get(e).__webglFramebuffer && De.setupRenderTarget(e); var t, i = e instanceof n.WebGLRenderTargetCube; if (e) { var r = ke.get(e); (t = i ? r.__webglFramebuffer[e.activeCubeFace] : r.__webglFramebuffer), ae.copy(e.scissor), (se = e.scissorTest), le.copy(e.viewport); } else(t = null), ae.copy(me).multiplyScalar(pe), (se = ve), le.copy(ge).multiplyScalar(pe); if ((ie !== t && (Ae.bindFramebuffer(Ae.FRAMEBUFFER, t), (ie = t)), Oe.scissor(ae), Oe.setScissorTest(se), Oe.viewport(le), i)) { var o = ke.get(e.texture); Ae.framebufferTexture2D(Ae.FRAMEBUFFER, Ae.COLOR_ATTACHMENT0, Ae.TEXTURE_CUBE_MAP_POSITIVE_X + e.activeCubeFace, o.__webglTexture, e.activeMipMapLevel); } }), (this.readRenderTargetPixels = function (e, t, i, r, o, a) { if (e instanceof n.WebGLRenderTarget == !1) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget."); var s = ke.get(e).__webglFramebuffer; if (s) { var l = !1; s !== ie && (Ae.bindFramebuffer(Ae.FRAMEBUFFER, s), (l = !0)); try { var c = e.texture; if (c.format !== n.RGBAFormat && N(c.format) !== Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_FORMAT)) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."); if ( !( c.type === n.UnsignedByteType || N(c.type) === Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_TYPE) || (c.type === n.FloatType && Le.get("WEBGL_color_buffer_float")) || (c.type === n.HalfFloatType && Le.get("EXT_color_buffer_half_float")) ) ) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type."); Ae.checkFramebufferStatus(Ae.FRAMEBUFFER) === Ae.FRAMEBUFFER_COMPLETE ? t >= 0 && t <= e.width - r && i >= 0 && i <= e.height - o && Ae.readPixels(t, i, r, o, N(c.format), N(c.type), a) : console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."); } finally { l && Ae.bindFramebuffer(Ae.FRAMEBUFFER, ie); } } }); }), (n.WebGLRenderTarget = function (e, t, i) { (this.uuid = n.Math.generateUUID()), (this.width = e), (this.height = t), (this.scissor = new n.Vector4(0, 0, e, t)), (this.scissorTest = !1), (this.viewport = new n.Vector4(0, 0, e, t)), (i = i || {}), void 0 === i.minFilter && (i.minFilter = n.LinearFilter), (this.texture = new n.Texture(void 0, void 0, i.wrapS, i.wrapT, i.magFilter, i.minFilter, i.format, i.type, i.anisotropy, i.encoding)), (this.depthBuffer = void 0 !== i.depthBuffer ? i.depthBuffer : !0), (this.stencilBuffer = void 0 !== i.stencilBuffer ? i.stencilBuffer : !0), (this.depthTexture = null); }), Object.assign(n.WebGLRenderTarget.prototype, n.EventDispatcher.prototype, { setSize: function (e, t) { (this.width !== e || this.height !== t) && ((this.width = e), (this.height = t), this.dispose()), this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t); }, clone: function () { return new this.constructor().copy(this); }, copy: function (e) { return ( (this.width = e.width), (this.height = e.height), this.viewport.copy(e.viewport), (this.texture = e.texture.clone()), (this.depthBuffer = e.depthBuffer), (this.stencilBuffer = e.stencilBuffer), (this.depthTexture = e.depthTexture), this ); }, dispose: function () { this.dispatchEvent({ type: "dispose" }); }, }), (n.WebGLRenderTargetCube = function (e, t, i) { n.WebGLRenderTarget.call(this, e, t, i), (this.activeCubeFace = 0), (this.activeMipMapLevel = 0); }), (n.WebGLRenderTargetCube.prototype = Object.create(n.WebGLRenderTarget.prototype)), (n.WebGLRenderTargetCube.prototype.constructor = n.WebGLRenderTargetCube), (n.WebGLBufferRenderer = function (e, t, i) { function r(e) { s = e; } function o(t, n) { e.drawArrays(s, t, n), i.calls++, (i.vertices += n), s === e.TRIANGLES && (i.faces += n / 3); } function a(r) { var o = t.get("ANGLE_instanced_arrays"); if (null === o) return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); var a = r.attributes.position, l = 0; a instanceof n.InterleavedBufferAttribute ? ((l = a.data.count), o.drawArraysInstancedANGLE(s, 0, l, r.maxInstancedCount)) : ((l = a.count), o.drawArraysInstancedANGLE(s, 0, l, r.maxInstancedCount)), i.calls++, (i.vertices += l * r.maxInstancedCount), s === e.TRIANGLES && (i.faces += (r.maxInstancedCount * l) / 3); } var s; (this.setMode = r), (this.render = o), (this.renderInstances = a); }), (n.WebGLClipping = function () { function e() { u.value !== r && ((u.value = r), (u.needsUpdate = o > 0)), (i.numPlanes = o); } function t(e, t, n, r) { var o = null !== e ? e.length : 0, a = null; if (0 !== o) { if (((a = u.value), r !== !0 || null === a)) { var s = n + 4 * o, h = t.matrixWorldInverse; c.getNormalMatrix(h), (null === a || a.length < s) && (a = new Float32Array(s)); for (var d = 0, f = n; d !== o; ++d, f += 4) l.copy(e[d]).applyMatrix4(h, c), l.normal.toArray(a, f), (a[f + 3] = l.constant); } (u.value = a), (u.needsUpdate = !0); } return (i.numPlanes = o), a; } var i = this, r = null, o = 0, a = !1, s = !1, l = new n.Plane(), c = new n.Matrix3(), u = { value: null, needsUpdate: !1 }; (this.uniform = u), (this.numPlanes = 0), (this.init = function (e, i, n) { var s = 0 !== e.length || i || 0 !== o || a; return (a = i), (r = t(e, n, 0)), (o = e.length), s; }), (this.beginShadows = function () { (s = !0), t(null); }), (this.endShadows = function () { (s = !1), e(); }), (this.setState = function (i, n, l, c, h) { if (!a || null === i || 0 === i.length || (s && !n)) s ? t(null) : e(); else { var d = s ? 0 : o, f = 4 * d, p = c.clippingState || null; (u.value = p), (p = t(i, l, f, h)); for (var m = 0; m !== f; ++m) p[m] = r[m]; (c.clippingState = p), (this.numPlanes += d); } }); }), (n.WebGLIndexedBufferRenderer = function (e, t, i) { function n(e) { s = e; } function r(i) { i.array instanceof Uint32Array && t.get("OES_element_index_uint") ? ((l = e.UNSIGNED_INT), (c = 4)) : ((l = e.UNSIGNED_SHORT), (c = 2)); } function o(t, n) { e.drawElements(s, n, l, t * c), i.calls++, (i.vertices += n), s === e.TRIANGLES && (i.faces += n / 3); } function a(n, r, o) { var a = t.get("ANGLE_instanced_arrays"); return null === a ? void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.") : (a.drawElementsInstancedANGLE(s, o, l, r * c, n.maxInstancedCount), i.calls++, (i.vertices += o * n.maxInstancedCount), void(s === e.TRIANGLES && (i.faces += (n.maxInstancedCount * o) / 3))); } var s, l, c; (this.setMode = n), (this.setIndex = r), (this.render = o), (this.renderInstances = a); }), (n.WebGLExtensions = function (e) { var t = {}; this.get = function (i) { if (void 0 !== t[i]) return t[i]; var n; switch (i) { case "WEBGL_depth_texture": n = e.getExtension("WEBGL_depth_texture") || e.getExtension("MOZ_WEBGL_depth_texture") || e.getExtension("WEBKIT_WEBGL_depth_texture"); break; case "EXT_texture_filter_anisotropic": n = e.getExtension("EXT_texture_filter_anisotropic") || e.getExtension("MOZ_EXT_texture_filter_anisotropic") || e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"); break; case "WEBGL_compressed_texture_s3tc": n = e.getExtension("WEBGL_compressed_texture_s3tc") || e.getExtension("MOZ_WEBGL_compressed_texture_s3tc") || e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"); break; case "WEBGL_compressed_texture_pvrtc": n = e.getExtension("WEBGL_compressed_texture_pvrtc") || e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"); break; case "WEBGL_compressed_texture_etc1": n = e.getExtension("WEBGL_compressed_texture_etc1"); break; default: n = e.getExtension(i); } return null === n && console.warn("THREE.WebGLRenderer: " + i + " extension not supported."), (t[i] = n), n; }; }), (n.WebGLCapabilities = function (e, t, i) { function n() { if (void 0 !== o) return o; var i = t.get("EXT_texture_filter_anisotropic"); return (o = null !== i ? e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0); } function r(t) { if ("highp" === t) { if (e.getShaderPrecisionFormat(e.VERTEX_SHADER, e.HIGH_FLOAT).precision > 0 && e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.HIGH_FLOAT).precision > 0) return "highp"; t = "mediump"; } return "mediump" === t && e.getShaderPrecisionFormat(e.VERTEX_SHADER, e.MEDIUM_FLOAT).precision > 0 && e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp"; } var o; (this.getMaxAnisotropy = n), (this.getMaxPrecision = r), (this.precision = void 0 !== i.precision ? i.precision : "highp"), (this.logarithmicDepthBuffer = void 0 !== i.logarithmicDepthBuffer ? i.logarithmicDepthBuffer : !1), (this.maxTextures = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)), (this.maxVertexTextures = e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)), (this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE)), (this.maxCubemapSize = e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)), (this.maxAttributes = e.getParameter(e.MAX_VERTEX_ATTRIBS)), (this.maxVertexUniforms = e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)), (this.maxVaryings = e.getParameter(e.MAX_VARYING_VECTORS)), (this.maxFragmentUniforms = e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)), (this.vertexTextures = this.maxVertexTextures > 0), (this.floatFragmentTextures = !!t.get("OES_texture_float")), (this.floatVertexTextures = this.vertexTextures && this.floatFragmentTextures); var a = r(this.precision); a !== this.precision && (console.warn("THREE.WebGLRenderer:", this.precision, "not supported, using", a, "instead."), (this.precision = a)), this.logarithmicDepthBuffer && (this.logarithmicDepthBuffer = !!t.get("EXT_frag_depth")); }), (n.WebGLGeometries = function (e, t, i) { function r(e) { var t = e.geometry; if (void 0 !== u[t.id]) return u[t.id]; t.addEventListener("dispose", o); var r; return ( t instanceof n.BufferGeometry ? (r = t) : t instanceof n.Geometry && (void 0 === t._bufferGeometry && (t._bufferGeometry = new n.BufferGeometry().setFromObject(e)), (r = t._bufferGeometry)), (u[t.id] = r), i.memory.geometries++, r ); } function o(e) { var n = e.target, r = u[n.id]; null !== r.index && s(r.index), l(r.attributes), n.removeEventListener("dispose", o), delete u[n.id]; var a = t.get(n); a.wireframe && s(a.wireframe), t["delete"](n); var c = t.get(r); c.wireframe && s(c.wireframe), t["delete"](r), i.memory.geometries--; } function a(e) { return e instanceof n.InterleavedBufferAttribute ? t.get(e.data).__webglBuffer : t.get(e).__webglBuffer; } function s(t) { var i = a(t); void 0 !== i && (e.deleteBuffer(i), c(t)); } function l(e) { for (var t in e) s(e[t]); } function c(e) { e instanceof n.InterleavedBufferAttribute ? t["delete"](e.data) : t["delete"](e); } var u = {}; this.get = r; }), (n.WebGLLights = function () { var e = {}; this.get = function (t) { if (void 0 !== e[t.id]) return e[t.id]; var i; switch (t.type) { case "DirectionalLight": i = { direction: new n.Vector3(), color: new n.Color(), shadow: !1, shadowBias: 0, shadowRadius: 1, shadowMapSize: new n.Vector2() }; break; case "SpotLight": i = { position: new n.Vector3(), direction: new n.Vector3(), color: new n.Color(), distance: 0, coneCos: 0, penumbraCos: 0, decay: 0, shadow: !1, shadowBias: 0, shadowRadius: 1, shadowMapSize: new n.Vector2(), }; break; case "PointLight": i = { position: new n.Vector3(), color: new n.Color(), distance: 0, decay: 0, shadow: !1, shadowBias: 0, shadowRadius: 1, shadowMapSize: new n.Vector2() }; break; case "HemisphereLight": i = { direction: new n.Vector3(), skyColor: new n.Color(), groundColor: new n.Color() }; } return (e[t.id] = i), i; }; }), (n.WebGLObjects = function (e, t, i) { function r(t) { var i = h.get(t); t.geometry instanceof n.Geometry && i.updateFromObject(t); var r = i.index, a = i.attributes; null !== r && o(r, e.ELEMENT_ARRAY_BUFFER); for (var s in a) o(a[s], e.ARRAY_BUFFER); var l = i.morphAttributes; for (var s in l) for (var c = l[s], u = 0, d = c.length; d > u; u++) o(c[u], e.ARRAY_BUFFER); return i; } function o(e, i) { var r = e instanceof n.InterleavedBufferAttribute ? e.data : e, o = t.get(r); void 0 === o.__webglBuffer ? a(o, r, i) : o.version !== r.version && s(o, r, i); } function a(t, i, n) { (t.__webglBuffer = e.createBuffer()), e.bindBuffer(n, t.__webglBuffer); var r = i.dynamic ? e.DYNAMIC_DRAW : e.STATIC_DRAW; e.bufferData(n, i.array, r), (t.version = i.version); } function s(t, i, n) { e.bindBuffer(n, t.__webglBuffer), i.dynamic === !1 || -1 === i.updateRange.count ? e.bufferSubData(n, 0, i.array) : 0 === i.updateRange.count ? console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.") : (e.bufferSubData(n, i.updateRange.offset * i.array.BYTES_PER_ELEMENT, i.array.subarray(i.updateRange.offset, i.updateRange.offset + i.updateRange.count)), (i.updateRange.count = 0)), (t.version = i.version); } function l(e) { return e instanceof n.InterleavedBufferAttribute ? t.get(e.data).__webglBuffer : t.get(e).__webglBuffer; } function c(i) { var r = t.get(i); if (void 0 !== r.wireframe) return r.wireframe; var a = [], s = i.index, l = i.attributes, c = l.position; if (null !== s) for (var h = {}, d = s.array, f = 0, p = d.length; p > f; f += 3) { var m = d[f + 0], v = d[f + 1], g = d[f + 2]; u(h, m, v) && a.push(m, v), u(h, v, g) && a.push(v, g), u(h, g, m) && a.push(g, m); } else for (var d = l.position.array, f = 0, p = d.length / 3 - 1; p > f; f += 3) { var m = f + 0, v = f + 1, g = f + 2; a.push(m, v, v, g, g, m); } var y = c.count > 65535 ? Uint32Array : Uint16Array, _ = new n.BufferAttribute(new y(a), 1); return o(_, e.ELEMENT_ARRAY_BUFFER), (r.wireframe = _), _; } function u(e, t, i) { if (t > i) { var n = t; (t = i), (i = n); } var r = e[t]; return void 0 === r ? ((e[t] = [i]), !0) : -1 === r.indexOf(i) ? (r.push(i), !0) : !1; } var h = new n.WebGLGeometries(e, t, i); (this.getAttributeBuffer = l), (this.getWireframeAttribute = c), (this.update = r); }), (n.WebGLProgram = (function () { function e(e) { switch (e) { case n.LinearEncoding: return ["Linear", "( value )"]; case n.sRGBEncoding: return ["sRGB", "( value )"]; case n.RGBEEncoding: return ["RGBE", "( value )"]; case n.RGBM7Encoding: return ["RGBM", "( value, 7.0 )"]; case n.RGBM16Encoding: return ["RGBM", "( value, 16.0 )"]; case n.RGBDEncoding: return ["RGBD", "( value, 256.0 )"]; case n.GammaEncoding: return ["Gamma", "( value, float( GAMMA_FACTOR ) )"]; default: throw new Error("unsupported encoding: " + e); } } function t(t, i) { var n = e(i); return "vec4 " + t + "( vec4 value ) { return " + n[0] + "ToLinear" + n[1] + "; }"; } function i(t, i) { var n = e(i); return "vec4 " + t + "( vec4 value ) { return LinearTo" + n[0] + n[1] + "; }"; } function r(e, t) { var i; switch (t) { case n.LinearToneMapping: i = "Linear"; break; case n.ReinhardToneMapping: i = "Reinhard"; break; case n.Uncharted2ToneMapping: i = "Uncharted2"; break; case n.CineonToneMapping: i = "OptimizedCineon"; break; default: throw new Error("unsupported toneMapping: " + t); } return "vec3 " + e + "( vec3 color ) { return " + i + "ToneMapping( color ); }"; } function o(e, t, i) { e = e || {}; var n = [ e.derivatives || t.envMapCubeUV || t.bumpMap || t.normalMap || t.flatShading ? "#extension GL_OES_standard_derivatives : enable" : "", (e.fragDepth || t.logarithmicDepthBuffer) && i.get("EXT_frag_depth") ? "#extension GL_EXT_frag_depth : enable" : "", e.drawBuffers && i.get("WEBGL_draw_buffers") ? "#extension GL_EXT_draw_buffers : require" : "", (e.shaderTextureLOD || t.envMap) && i.get("EXT_shader_texture_lod") ? "#extension GL_EXT_shader_texture_lod : enable" : "", ]; return n.filter(l).join("n"); } function a(e) { var t = []; for (var i in e) { var n = e[i]; n !== !1 && t.push("#define " + i + " " + n); } return t.join("n"); } function s(e, t, i) { for (var n = {}, r = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES), o = 0; r > o; o++) { var a = e.getActiveAttrib(t, o), s = a.name; n[s] = e.getAttribLocation(t, s); } return n; } function l(e) { return "" !== e; } function c(e, t) { return e .replace(/NUM_DIR_LIGHTS/g, t.numDirLights) .replace(/NUM_SPOT_LIGHTS/g, t.numSpotLights) .replace(/NUM_POINT_LIGHTS/g, t.numPointLights) .replace(/NUM_HEMI_LIGHTS/g, t.numHemiLights); } function u(e) { function t(e, t) { var i = n.ShaderChunk[t]; if (void 0 === i) throw new Error("Can not resolve #include <" + t + ">"); return u(i); } var i = /#include +<([wd.]+)>/g; return e.replace(i, t); } function h(e) { function t(e, t, i, n) { for (var r = "", o = parseInt(t); o < parseInt(i); o++) r += n.replace(/[ i ]/g, "[ " + o + " ]"); return r; } var i = /for ( int i = (d+); i < (d+); i ++ ) {([sS]+?)(?=})}/g; return e.replace(i, t); } var d = 0; return function (e, f, p, m) { var v = e.context, g = p.extensions, y = p.defines, _ = p.__webglShader.vertexShader, b = p.__webglShader.fragmentShader, x = "SHADOWMAP_TYPE_BASIC"; m.shadowMapType === n.PCFShadowMap ? (x = "SHADOWMAP_TYPE_PCF") : m.shadowMapType === n.PCFSoftShadowMap && (x = "SHADOWMAP_TYPE_PCF_SOFT"); var w = "ENVMAP_TYPE_CUBE", M = "ENVMAP_MODE_REFLECTION", T = "ENVMAP_BLENDING_MULTIPLY"; if (m.envMap) { switch (p.envMap.mapping) { case n.CubeReflectionMapping: case n.CubeRefractionMapping: w = "ENVMAP_TYPE_CUBE"; break; case n.CubeUVReflectionMapping: case n.CubeUVRefractionMapping: w = "ENVMAP_TYPE_CUBE_UV"; break; case n.EquirectangularReflectionMapping: case n.EquirectangularRefractionMapping: w = "ENVMAP_TYPE_EQUIREC"; break; case n.SphericalReflectionMapping: w = "ENVMAP_TYPE_SPHERE"; } switch (p.envMap.mapping) { case n.CubeRefractionMapping: case n.EquirectangularRefractionMapping: M = "ENVMAP_MODE_REFRACTION"; } switch (p.combine) { case n.MultiplyOperation: T = "ENVMAP_BLENDING_MULTIPLY"; break; case n.MixOperation: T = "ENVMAP_BLENDING_MIX"; break; case n.AddOperation: T = "ENVMAP_BLENDING_ADD"; } } var S, E, A = e.gammaFactor > 0 ? e.gammaFactor : 1, C = o(g, m, e.extensions), P = a(y), L = v.createProgram(); p instanceof n.RawShaderMaterial ? ((S = [P].filter(l).join("n")), (E = [P].filter(l).join("n"))) : ((S = [ "precision " + m.precision + " float;", "precision " + m.precision + " int;", "#define SHADER_NAME " + p.__webglShader.name, P, m.supportsVertexTextures ? "#define VERTEX_TEXTURES" : "", "#define GAMMA_FACTOR " + A, "#define MAX_BONES " + m.maxBones, m.map ? "#define USE_MAP" : "", m.envMap ? "#define USE_ENVMAP" : "", m.envMap ? "#define " + M : "", m.lightMap ? "#define USE_LIGHTMAP" : "", m.aoMap ? "#define USE_AOMAP" : "", m.emissiveMap ? "#define USE_EMISSIVEMAP" : "", m.bumpMap ? "#define USE_BUMPMAP" : "", m.normalMap ? "#define USE_NORMALMAP" : "", m.displacementMap && m.supportsVertexTextures ? "#define USE_DISPLACEMENTMAP" : "", m.specularMap ? "#define USE_SPECULARMAP" : "", m.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", m.metalnessMap ? "#define USE_METALNESSMAP" : "", m.alphaMap ? "#define USE_ALPHAMAP" : "", m.vertexColors ? "#define USE_COLOR" : "", m.flatShading ? "#define FLAT_SHADED" : "", m.skinning ? "#define USE_SKINNING" : "", m.useVertexTexture ? "#define BONE_TEXTURE" : "", m.morphTargets ? "#define USE_MORPHTARGETS" : "", m.morphNormals && m.flatShading === !1 ? "#define USE_MORPHNORMALS" : "", m.doubleSided ? "#define DOUBLE_SIDED" : "", m.flipSided ? "#define FLIP_SIDED" : "", "#define NUM_CLIPPING_PLANES " + m.numClippingPlanes, m.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", m.shadowMapEnabled ? "#define " + x : "", m.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", m.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", m.logarithmicDepthBuffer && e.extensions.get("EXT_frag_depth") ? "#define USE_LOGDEPTHBUF_EXT" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_COLOR", " attribute vec3 color;", "#endif", "#ifdef USE_MORPHTARGETS", " attribute vec3 morphTarget0;", " attribute vec3 morphTarget1;", " attribute vec3 morphTarget2;", " attribute vec3 morphTarget3;", " #ifdef USE_MORPHNORMALS", " attribute vec3 morphNormal0;", " attribute vec3 morphNormal1;", " attribute vec3 morphNormal2;", " attribute vec3 morphNormal3;", " #else", " attribute vec3 morphTarget4;", " attribute vec3 morphTarget5;", " attribute vec3 morphTarget6;", " attribute vec3 morphTarget7;", " #endif", "#endif", "#ifdef USE_SKINNING", " attribute vec4 skinIndex;", " attribute vec4 skinWeight;", "#endif", "n", ] .filter(l) .join("n")), (E = [ C, "precision " + m.precision + " float;", "precision " + m.precision + " int;", "#define SHADER_NAME " + p.__webglShader.name, P, m.alphaTest ? "#define ALPHATEST " + m.alphaTest : "", "#define GAMMA_FACTOR " + A, m.useFog && m.fog ? "#define USE_FOG" : "", m.useFog && m.fogExp ? "#define FOG_EXP2" : "", m.map ? "#define USE_MAP" : "", m.envMap ? "#define USE_ENVMAP" : "", m.envMap ? "#define " + w : "", m.envMap ? "#define " + M : "", m.envMap ? "#define " + T : "", m.lightMap ? "#define USE_LIGHTMAP" : "", m.aoMap ? "#define USE_AOMAP" : "", m.emissiveMap ? "#define USE_EMISSIVEMAP" : "", m.bumpMap ? "#define USE_BUMPMAP" : "", m.normalMap ? "#define USE_NORMALMAP" : "", m.specularMap ? "#define USE_SPECULARMAP" : "", m.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", m.metalnessMap ? "#define USE_METALNESSMAP" : "", m.alphaMap ? "#define USE_ALPHAMAP" : "", m.vertexColors ? "#define USE_COLOR" : "", m.flatShading ? "#define FLAT_SHADED" : "", m.doubleSided ? "#define DOUBLE_SIDED" : "", m.flipSided ? "#define FLIP_SIDED" : "", "#define NUM_CLIPPING_PLANES " + m.numClippingPlanes, m.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", m.shadowMapEnabled ? "#define " + x : "", m.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", m.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : "", m.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", m.logarithmicDepthBuffer && e.extensions.get("EXT_frag_depth") ? "#define USE_LOGDEPTHBUF_EXT" : "", m.envMap && e.extensions.get("EXT_shader_texture_lod") ? "#define TEXTURE_LOD_EXT" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", m.toneMapping !== n.NoToneMapping ? "#define TONE_MAPPING" : "", m.toneMapping !== n.NoToneMapping ? n.ShaderChunk.tonemapping_pars_fragment : "", m.toneMapping !== n.NoToneMapping ? r("toneMapping", m.toneMapping) : "", m.outputEncoding || m.mapEncoding || m.envMapEncoding || m.emissiveMapEncoding ? n.ShaderChunk.encodings_pars_fragment : "", m.mapEncoding ? t("mapTexelToLinear", m.mapEncoding) : "", m.envMapEncoding ? t("envMapTexelToLinear", m.envMapEncoding) : "", m.emissiveMapEncoding ? t("emissiveMapTexelToLinear", m.emissiveMapEncoding) : "", m.outputEncoding ? i("linearToOutputTexel", m.outputEncoding) : "", m.depthPacking ? "#define DEPTH_PACKING " + p.depthPacking : "", "n", ] .filter(l) .join("n"))), (_ = u(_, m)), (_ = c(_, m)), (b = u(b, m)), (b = c(b, m)), p instanceof n.ShaderMaterial == !1 && ((_ = h(_)), (b = h(b))); var R = S + _, O = E + b, k = n.WebGLShader(v, v.VERTEX_SHADER, R), D = n.WebGLShader(v, v.FRAGMENT_SHADER, O); v.attachShader(L, k), v.attachShader(L, D), void 0 !== p.index0AttributeName ? v.bindAttribLocation(L, 0, p.index0AttributeName) : m.morphTargets === !0 && v.bindAttribLocation(L, 0, "position"), v.linkProgram(L); var I = v.getProgramInfoLog(L), N = v.getShaderInfoLog(k), U = v.getShaderInfoLog(D), j = !0, B = !0; v.getProgramParameter(L, v.LINK_STATUS) === !1 ? ((j = !1), console.error("THREE.WebGLProgram: shader error: ", v.getError(), "gl.VALIDATE_STATUS", v.getProgramParameter(L, v.VALIDATE_STATUS), "gl.getProgramInfoLog", I, N, U)) : "" !== I ? console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()", I) : ("" === N || "" === U) && (B = !1), B && (this.diagnostics = { runnable: j, material: p, programLog: I, vertexShader: { log: N, prefix: S }, fragmentShader: { log: U, prefix: E } }), v.deleteShader(k), v.deleteShader(D); var F; this.getUniforms = function () { return void 0 === F && (F = new n.WebGLUniforms(v, L, e)), F; }; var V; return ( (this.getAttributes = function () { return void 0 === V && (V = s(v, L)), V; }), (this.destroy = function () { v.deleteProgram(L), (this.program = void 0); }), Object.defineProperties(this, { uniforms: { get: function () { return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."), this.getUniforms(); }, }, attributes: { get: function () { return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."), this.getAttributes(); }, }, }), (this.id = d++), (this.code = f), (this.usedTimes = 1), (this.program = L), (this.vertexShader = k), (this.fragmentShader = D), this ); }; })()), (n.WebGLPrograms = function (e, t) { function i(e) { if (t.floatVertexTextures && e && e.skeleton && e.skeleton.useVertexTexture) return 1024; var i = t.maxVertexUniforms, r = Math.floor((i - 20) / 4), o = r; return ( void 0 !== e && e instanceof n.SkinnedMesh && ((o = Math.min(e.skeleton.bones.length, o)), o < e.skeleton.bones.length && console.warn("WebGLRenderer: too many bones - " + e.skeleton.bones.length + ", this GPU supports just " + o + " (try OpenGL instead of ANGLE)")), o ); } function r(e, t) { var i; return ( e ? e instanceof n.Texture ? (i = e.encoding) : e instanceof n.WebGLRenderTarget && (console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."), (i = e.texture.encoding)) : (i = n.LinearEncoding), i === n.LinearEncoding && t && (i = n.GammaEncoding), i ); } var o = [], a = { MeshDepthMaterial: "depth", MeshNormalMaterial: "normal", MeshBasicMaterial: "basic", MeshLambertMaterial: "lambert", MeshPhongMaterial: "phong", MeshStandardMaterial: "physical", MeshPhysicalMaterial: "physical", LineBasicMaterial: "basic", LineDashedMaterial: "dashed", PointsMaterial: "points", }, s = [ "precision", "supportsVertexTextures", "map", "mapEncoding", "envMap", "envMapMode", "envMapEncoding", "lightMap", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "alphaMap", "combine", "vertexColors", "fog", "useFog", "fogExp", "flatShading", "sizeAttenuation", "logarithmicDepthBuffer", "skinning", "maxBones", "useVertexTexture", "morphTargets", "morphNormals", "maxMorphTargets", "maxMorphNormals", "premultipliedAlpha", "numDirLights", "numPointLights", "numSpotLights", "numHemiLights", "shadowMapEnabled", "shadowMapType", "toneMapping", "physicallyCorrectLights", "alphaTest", "doubleSided", "flipSided", "numClippingPlanes", "depthPacking", ]; (this.getParameters = function (o, s, l, c, u) { var h = a[o.type], d = i(u), f = e.getPrecision(); null !== o.precision && ((f = t.getMaxPrecision(o.precision)), f !== o.precision && console.warn("THREE.WebGLProgram.getParameters:", o.precision, "not supported, using", f, "instead.")); var p = e.getCurrentRenderTarget(), m = { shaderID: h, precision: f, supportsVertexTextures: t.vertexTextures, outputEncoding: r(p ? p.texture : null, e.gammaOutput), map: !!o.map, mapEncoding: r(o.map, e.gammaInput), envMap: !!o.envMap, envMapMode: o.envMap && o.envMap.mapping, envMapEncoding: r(o.envMap, e.gammaInput), envMapCubeUV: !!o.envMap && (o.envMap.mapping === n.CubeUVReflectionMapping || o.envMap.mapping === n.CubeUVRefractionMapping), lightMap: !!o.lightMap, aoMap: !!o.aoMap, emissiveMap: !!o.emissiveMap, emissiveMapEncoding: r(o.emissiveMap, e.gammaInput), bumpMap: !!o.bumpMap, normalMap: !!o.normalMap, displacementMap: !!o.displacementMap, roughnessMap: !!o.roughnessMap, metalnessMap: !!o.metalnessMap, specularMap: !!o.specularMap, alphaMap: !!o.alphaMap, combine: o.combine, vertexColors: o.vertexColors, fog: !!l, useFog: o.fog, fogExp: l instanceof n.FogExp2, flatShading: o.shading === n.FlatShading, sizeAttenuation: o.sizeAttenuation, logarithmicDepthBuffer: t.logarithmicDepthBuffer, skinning: o.skinning, maxBones: d, useVertexTexture: t.floatVertexTextures && u && u.skeleton && u.skeleton.useVertexTexture, morphTargets: o.morphTargets, morphNormals: o.morphNormals, maxMorphTargets: e.maxMorphTargets, maxMorphNormals: e.maxMorphNormals, numDirLights: s.directional.length, numPointLights: s.point.length, numSpotLights: s.spot.length, numHemiLights: s.hemi.length, numClippingPlanes: c, shadowMapEnabled: e.shadowMap.enabled && u.receiveShadow && s.shadows.length > 0, shadowMapType: e.shadowMap.type, toneMapping: e.toneMapping, physicallyCorrectLights: e.physicallyCorrectLights, premultipliedAlpha: o.premultipliedAlpha, alphaTest: o.alphaTest, doubleSided: o.side === n.DoubleSide, flipSided: o.side === n.BackSide, depthPacking: void 0 !== o.depthPacking ? o.depthPacking : !1, }; return m; }), (this.getProgramCode = function (e, t) { var i = []; if ((t.shaderID ? i.push(t.shaderID) : (i.push(e.fragmentShader), i.push(e.vertexShader)), void 0 !== e.defines)) for (var n in e.defines) i.push(n), i.push(e.defines[n]); for (var r = 0; r < s.length; r++) i.push(t[s[r]]); return i.join(); }), (this.acquireProgram = function (t, i, r) { for (var a, s = 0, l = o.length; l > s; s++) { var c = o[s]; if (c.code === r) { (a = c), ++a.usedTimes; break; } } return void 0 === a && ((a = new n.WebGLProgram(e, r, t, i)), o.push(a)), a; }), (this.releaseProgram = function (e) { if (0 === --e.usedTimes) { var t = o.indexOf(e); (o[t] = o[o.length - 1]), o.pop(), e.destroy(); } }), (this.programs = o); }), (n.WebGLProperties = function () { var e = {}; (this.get = function (t) { var i = t.uuid, n = e[i]; return void 0 === n && ((n = {}), (e[i] = n)), n; }), (this["delete"] = function (t) { delete e[t.uuid]; }), (this.clear = function () { e = {}; }); }), (n.WebGLShader = (function () { function e(e) { for (var t = e.split("n"), i = 0; i < t.length; i++) t[i] = i + 1 + ": " + t[i]; return t.join("n"); } return function (t, i, n) { var r = t.createShader(i); return ( t.shaderSource(r, n), t.compileShader(r), t.getShaderParameter(r, t.COMPILE_STATUS) === !1 && console.error("THREE.WebGLShader: Shader couldn't compile."), "" !== t.getShaderInfoLog(r) && console.warn("THREE.WebGLShader: gl.getShaderInfoLog()", i === t.VERTEX_SHADER ? "vertex" : "fragment", t.getShaderInfoLog(r), e(n)), r ); }; })()), (n.WebGLShadowMap = function (e, t, i, r) { function o(t, i, r, o) { var a = t.geometry, s = null, l = b, c = t.customDepthMaterial; if ((r && ((l = x), (c = t.customDistanceMaterial)), c)) s = c; else { var u = !1; i.morphTargets && (a instanceof n.BufferGeometry ? (u = a.morphAttributes && a.morphAttributes.position && a.morphAttributes.position.length > 0) : a instanceof n.Geometry && (u = a.morphTargets && a.morphTargets.length > 0)); var h = t instanceof n.SkinnedMesh && i.skinning, d = 0; u && (d |= g), h && (d |= y), (s = l[d]); } if (e.localClippingEnabled && i.clipShadows === !0 && 0 !== i.clippingPlanes.length) { var f = s.uuid, p = i.uuid, m = w[f]; void 0 === m && ((m = {}), (w[f] = m)); var v = m[p]; void 0 === v && ((v = s.clone()), (m[p] = v)), (s = v); } (s.visible = i.visible), (s.wireframe = i.wireframe); var _ = i.side; return ( D.renderSingleSided && _ == n.DoubleSide && (_ = n.FrontSide), D.renderReverseSided && (_ === n.FrontSide ? (_ = n.BackSide) : _ === n.BackSide && (_ = n.FrontSide)), (s.side = _), (s.clipShadows = i.clipShadows), (s.clippingPlanes = i.clippingPlanes), (s.wireframeLinewidth = i.wireframeLinewidth), (s.linewidth = i.linewidth), r && void 0 !== s.uniforms.lightPos && s.uniforms.lightPos.value.copy(o), s ); } function a(e, t, i) { if (e.visible !== !1) { if (e.layers.test(t.layers) && (e instanceof n.Mesh || e instanceof n.Line || e instanceof n.Points) && e.castShadow && (e.frustumCulled === !1 || c.intersectsObject(e) === !0)) { var r = e.material; r.visible === !0 && (e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, e.matrixWorld), v.push(e)); } for (var o = e.children, s = 0, l = o.length; l > s; s++) a(o[s], t, i); } } var s = e.context, l = e.state, c = new n.Frustum(), u = new n.Matrix4(), h = t.shadows, d = new n.Vector2(), f = new n.Vector2(r.maxTextureSize, r.maxTextureSize), p = new n.Vector3(), m = new n.Vector3(), v = [], g = 1, y = 2, _ = (g | y) + 1, b = new Array(_), x = new Array(_), w = {}, M = [new n.Vector3(1, 0, 0), new n.Vector3(-1, 0, 0), new n.Vector3(0, 0, 1), new n.Vector3(0, 0, -1), new n.Vector3(0, 1, 0), new n.Vector3(0, -1, 0)], T = [new n.Vector3(0, 1, 0), new n.Vector3(0, 1, 0), new n.Vector3(0, 1, 0), new n.Vector3(0, 1, 0), new n.Vector3(0, 0, 1), new n.Vector3(0, 0, -1)], S = [new n.Vector4(), new n.Vector4(), new n.Vector4(), new n.Vector4(), new n.Vector4(), new n.Vector4()], E = new n.MeshDepthMaterial(); (E.depthPacking = n.RGBADepthPacking), (E.clipping = !0); for (var A = n.ShaderLib.distanceRGBA, C = n.UniformsUtils.clone(A.uniforms), P = 0; P !== _; ++P) { var L = 0 !== (P & g), R = 0 !== (P & y), O = E.clone(); (O.morphTargets = L), (O.skinning = R), (b[P] = O); var k = new n.ShaderMaterial({ defines: { USE_SHADOWMAP: "" }, uniforms: C, vertexShader: A.vertexShader, fragmentShader: A.fragmentShader, morphTargets: L, skinning: R, clipping: !0 }); x[P] = k; } var D = this; (this.enabled = !1), (this.autoUpdate = !0), (this.needsUpdate = !1), (this.type = n.PCFShadowMap), (this.renderReverseSided = !0), (this.renderSingleSided = !0), (this.render = function (t, r) { if (D.enabled !== !1 && (D.autoUpdate !== !1 || D.needsUpdate !== !1) && 0 !== h.length) { l.clearColor(1, 1, 1, 1), l.disable(s.BLEND), l.setDepthTest(!0), l.setScissorTest(!1); for (var g, y, _ = 0, b = h.length; b > _; _++) { var x = h[_], w = x.shadow; if (void 0 !== w) { var E = w.camera; if ((d.copy(w.mapSize), d.min(f), x instanceof n.PointLight)) { (g = 6), (y = !0); var A = d.x, C = d.y; S[0].set(2 * A, C, A, C), S[1].set(0, C, A, C), S[2].set(3 * A, C, A, C), S[3].set(A, C, A, C), S[4].set(3 * A, 0, A, C), S[5].set(A, 0, A, C), (d.x *= 4), (d.y *= 2); } else(g = 1), (y = !1); if (null === w.map) { var P = { minFilter: n.NearestFilter, magFilter: n.NearestFilter, format: n.RGBAFormat }; (w.map = new n.WebGLRenderTarget(d.x, d.y, P)), E.updateProjectionMatrix(); } w instanceof n.SpotLightShadow && w.update(x); var L = w.map, R = w.matrix; m.setFromMatrixPosition(x.matrixWorld), E.position.copy(m), e.setRenderTarget(L), e.clear(); for (var O = 0; g > O; O++) { if (y) { p.copy(E.position), p.add(M[O]), E.up.copy(T[O]), E.lookAt(p); var k = S[O]; l.viewport(k); } else p.setFromMatrixPosition(x.target.matrixWorld), E.lookAt(p); E.updateMatrixWorld(), E.matrixWorldInverse.getInverse(E.matrixWorld), R.set(0.5, 0, 0, 0.5, 0, 0.5, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0, 0, 1), R.multiply(E.projectionMatrix), R.multiply(E.matrixWorldInverse), u.multiplyMatrices(E.projectionMatrix, E.matrixWorldInverse), c.setFromMatrix(u), (v.length = 0), a(t, r, E); for (var I = 0, N = v.length; N > I; I++) { var U = v[I], j = i.update(U), B = U.material; if (B instanceof n.MultiMaterial) for (var F = j.groups, V = B.materials, G = 0, z = F.length; z > G; G++) { var $ = F[G], H = V[$.materialIndex]; if (H.visible === !0) { var W = o(U, H, y, m); e.renderBufferDirect(E, null, j, W, U, $); } } else { var W = o(U, B, y, m); e.renderBufferDirect(E, null, j, W, U, null); } } } } else console.warn("THREE.WebGLShadowMap:", x, "has no shadow."); } var X = e.getClearColor(), Y = e.getClearAlpha(); e.setClearColor(X, Y), (D.needsUpdate = !1); } }); }), (n.WebGLState = function (e, t, i) { function r(t, i, n) { var r = new Uint8Array(4), o = e.createTexture(); e.bindTexture(t, o), e.texParameteri(t, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(t, e.TEXTURE_MAG_FILTER, e.NEAREST); for (var a = 0; n > a; a++) e.texImage2D(i + a, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, r); return o; } var o = this; this.buffers = { color: new n.WebGLColorBuffer(e, this), depth: new n.WebGLDepthBuffer(e, this), stencil: new n.WebGLStencilBuffer(e, this) }; var a = e.getParameter(e.MAX_VERTEX_ATTRIBS), s = new Uint8Array(a), l = new Uint8Array(a), c = new Uint8Array(a), u = {}, h = null, d = null, f = null, p = null, m = null, v = null, g = null, y = null, _ = !1, b = null, x = null, w = null, M = null, T = null, S = null, E = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), A = null, C = {}, P = new n.Vector4(), L = new n.Vector4(), R = {}; (R[e.TEXTURE_2D] = r(e.TEXTURE_2D, e.TEXTURE_2D, 1)), (R[e.TEXTURE_CUBE_MAP] = r(e.TEXTURE_CUBE_MAP, e.TEXTURE_CUBE_MAP_POSITIVE_X, 6)), (this.init = function () { this.clearColor(0, 0, 0, 1), this.clearDepth(1), this.clearStencil(0), this.enable(e.DEPTH_TEST), this.setDepthFunc(n.LessEqualDepth), this.setFlipSided(!1), this.setCullFace(n.CullFaceBack), this.enable(e.CULL_FACE), this.enable(e.BLEND), this.setBlending(n.NormalBlending); }), (this.initAttributes = function () { for (var e = 0, t = s.length; t > e; e++) s[e] = 0; }), (this.enableAttribute = function (i) { if (((s[i] = 1), 0 === l[i] && (e.enableVertexAttribArray(i), (l[i] = 1)), 0 !== c[i])) { var n = t.get("ANGLE_instanced_arrays"); n.vertexAttribDivisorANGLE(i, 0), (c[i] = 0); } }), (this.enableAttributeAndDivisor = function (t, i, n) { (s[t] = 1), 0 === l[t] && (e.enableVertexAttribArray(t), (l[t] = 1)), c[t] !== i && (n.vertexAttribDivisorANGLE(t, i), (c[t] = i)); }), (this.disableUnusedAttributes = function () { for (var t = 0, i = l.length; t !== i; ++t) l[t] !== s[t] && (e.disableVertexAttribArray(t), (l[t] = 0)); }), (this.enable = function (t) { u[t] !== !0 && (e.enable(t), (u[t] = !0)); }), (this.disable = function (t) { u[t] !== !1 && (e.disable(t), (u[t] = !1)); }), (this.getCompressedTextureFormats = function () { if (null === h && ((h = []), t.get("WEBGL_compressed_texture_pvrtc") || t.get("WEBGL_compressed_texture_s3tc") || t.get("WEBGL_compressed_texture_etc1"))) for (var i = e.getParameter(e.COMPRESSED_TEXTURE_FORMATS), n = 0; n < i.length; n++) h.push(i[n]); return h; }), (this.setBlending = function (t, r, o, a, s, l, c, u) { return t === n.NoBlending ? (this.disable(e.BLEND), void(d = t)) : (this.enable(e.BLEND), (t !== d || u !== _) && (t === n.AdditiveBlending ? u ? (e.blendEquationSeparate(e.FUNC_ADD, e.FUNC_ADD), e.blendFuncSeparate(e.ONE, e.ONE, e.ONE, e.ONE)) : (e.blendEquation(e.FUNC_ADD), e.blendFunc(e.SRC_ALPHA, e.ONE)) : t === n.SubtractiveBlending ? u ? (e.blendEquationSeparate(e.FUNC_ADD, e.FUNC_ADD), e.blendFuncSeparate(e.ZERO, e.ZERO, e.ONE_MINUS_SRC_COLOR, e.ONE_MINUS_SRC_ALPHA)) : (e.blendEquation(e.FUNC_ADD), e.blendFunc(e.ZERO, e.ONE_MINUS_SRC_COLOR)) : t === n.MultiplyBlending ? u ? (e.blendEquationSeparate(e.FUNC_ADD, e.FUNC_ADD), e.blendFuncSeparate(e.ZERO, e.SRC_COLOR, e.ZERO, e.SRC_ALPHA)) : (e.blendEquation(e.FUNC_ADD), e.blendFunc(e.ZERO, e.SRC_COLOR)) : u ? (e.blendEquationSeparate(e.FUNC_ADD, e.FUNC_ADD), e.blendFuncSeparate(e.ONE, e.ONE_MINUS_SRC_ALPHA, e.ONE, e.ONE_MINUS_SRC_ALPHA)) : (e.blendEquationSeparate(e.FUNC_ADD, e.FUNC_ADD), e.blendFuncSeparate(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA, e.ONE, e.ONE_MINUS_SRC_ALPHA)), (d = t), (_ = u)), void(t === n.CustomBlending ? ((s = s || r), (l = l || o), (c = c || a), (r !== f || s !== v) && (e.blendEquationSeparate(i(r), i(s)), (f = r), (v = s)), (o !== p || a !== m || l !== g || c !== y) && (e.blendFuncSeparate(i(o), i(a), i(l), i(c)), (p = o), (m = a), (g = l), (y = c))) : ((f = null), (p = null), (m = null), (v = null), (g = null), (y = null)))); }), (this.setColorWrite = function (e) { this.buffers.color.setMask(e); }), (this.setDepthTest = function (e) { this.buffers.depth.setTest(e); }), (this.setDepthWrite = function (e) { this.buffers.depth.setMask(e); }), (this.setDepthFunc = function (e) { this.buffers.depth.setFunc(e); }), (this.setStencilTest = function (e) { this.buffers.stencil.setTest(e); }), (this.setStencilWrite = function (e) { this.buffers.stencil.setMask(e); }), (this.setStencilFunc = function (e, t, i) { this.buffers.stencil.setFunc(e, t, i); }), (this.setStencilOp = function (e, t, i) { this.buffers.stencil.setOp(e, t, i); }), (this.setFlipSided = function (t) { b !== t && (t ? e.frontFace(e.CW) : e.frontFace(e.CCW), (b = t)); }), (this.setCullFace = function (t) { t !== n.CullFaceNone ? (this.enable(e.CULL_FACE), t !== x && (t === n.CullFaceBack ? e.cullFace(e.BACK) : t === n.CullFaceFront ? e.cullFace(e.FRONT) : e.cullFace(e.FRONT_AND_BACK))) : this.disable(e.CULL_FACE), (x = t); }), (this.setLineWidth = function (t) { t !== w && (e.lineWidth(t), (w = t)); }), (this.setPolygonOffset = function (t, i, n) { t ? (this.enable(e.POLYGON_OFFSET_FILL), (M !== i || T !== n) && (e.polygonOffset(i, n), (M = i), (T = n))) : this.disable(e.POLYGON_OFFSET_FILL); }), (this.getScissorTest = function () { return S; }), (this.setScissorTest = function (t) { (S = t), t ? this.enable(e.SCISSOR_TEST) : this.disable(e.SCISSOR_TEST); }), (this.activeTexture = function (t) { void 0 === t && (t = e.TEXTURE0 + E - 1), A !== t && (e.activeTexture(t), (A = t)); }), (this.bindTexture = function (t, i) { null === A && o.activeTexture(); var n = C[A]; void 0 === n && ((n = { type: void 0, texture: void 0 }), (C[A] = n)), (n.type !== t || n.texture !== i) && (e.bindTexture(t, i || R[t]), (n.type = t), (n.texture = i)); }), (this.compressedTexImage2D = function () { try { e.compressedTexImage2D.apply(e, arguments); } catch (t) { console.error(t); } }), (this.texImage2D = function () { try { e.texImage2D.apply(e, arguments); } catch (t) { console.error(t); } }), (this.clearColor = function (e, t, i, n) { this.buffers.color.setClear(e, t, i, n); }), (this.clearDepth = function (e) { this.buffers.depth.setClear(e); }), (this.clearStencil = function (e) { this.buffers.stencil.setClear(e); }), (this.scissor = function (t) { P.equals(t) === !1 && (e.scissor(t.x, t.y, t.z, t.w), P.copy(t)); }), (this.viewport = function (t) { L.equals(t) === !1 && (e.viewport(t.x, t.y, t.z, t.w), L.copy(t)); }), (this.reset = function () { for (var t = 0; t < l.length; t++) 1 === l[t] && (e.disableVertexAttribArray(t), (l[t] = 0)); (u = {}), (h = null), (A = null), (C = {}), (d = null), (b = null), (x = null), this.buffers.color.reset(), this.buffers.depth.reset(), this.buffers.stencil.reset(); }); }), (n.WebGLColorBuffer = function (e, t) { var i = !1, r = new n.Vector4(), o = null, a = new n.Vector4(); (this.setMask = function (t) { o === t || i || (e.colorMask(t, t, t, t), (o = t)); }), (this.setLocked = function (e) { i = e; }), (this.setClear = function (t, i, n, o) { r.set(t, i, n, o), a.equals(r) === !1 && (e.clearColor(t, i, n, o), a.copy(r)); }), (this.reset = function () { (i = !1), (o = null), (a = new n.Vector4()); }); }), (n.WebGLDepthBuffer = function (e, t) { var i = !1, r = null, o = null, a = null; (this.setTest = function (i) { i ? t.enable(e.DEPTH_TEST) : t.disable(e.DEPTH_TEST); }), (this.setMask = function (t) { r === t || i || (e.depthMask(t), (r = t)); }), (this.setFunc = function (t) { if (o !== t) { if (t) switch (t) { case n.NeverDepth: e.depthFunc(e.NEVER); break; case n.AlwaysDepth: e.depthFunc(e.ALWAYS); break; case n.LessDepth: e.depthFunc(e.LESS); break; case n.LessEqualDepth: e.depthFunc(e.LEQUAL); break; case n.EqualDepth: e.depthFunc(e.EQUAL); break; case n.GreaterEqualDepth: e.depthFunc(e.GEQUAL); break; case n.GreaterDepth: e.depthFunc(e.GREATER); break; case n.NotEqualDepth: e.depthFunc(e.NOTEQUAL); break; default: e.depthFunc(e.LEQUAL); } else e.depthFunc(e.LEQUAL); o = t; } }), (this.setLocked = function (e) { i = e; }), (this.setClear = function (t) { a !== t && (e.clearDepth(t), (a = t)); }), (this.reset = function () { (i = !1), (r = null), (o = null), (a = null); }); }), (n.WebGLStencilBuffer = function (e, t) { var i = !1, n = null, r = null, o = null, a = null, s = null, l = null, c = null, u = null; (this.setTest = function (i) { i ? t.enable(e.STENCIL_TEST) : t.disable(e.STENCIL_TEST); }), (this.setMask = function (t) { n === t || i || (e.stencilMask(t), (n = t)); }), (this.setFunc = function (t, i, n) { (r !== t || o !== i || a !== n) && (e.stencilFunc(t, i, n), (r = t), (o = i), (a = n)); }), (this.setOp = function (t, i, n) { (s !== t || l !== i || c !== n) && (e.stencilOp(t, i, n), (s = t), (l = i), (c = n)); }), (this.setLocked = function (e) { i = e; }), (this.setClear = function (t) { u !== t && (e.clearStencil(t), (u = t)); }), (this.reset = function () { (i = !1), (n = null), (r = null), (o = null), (a = null), (s = null), (l = null), (c = null), (u = null); }); }), (n.WebGLTextures = function (e, t, i, r, o, a, s) { function l(e, t) { if (e.width > t || e.height > t) { var i = t / Math.max(e.width, e.height), n = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); (n.width = Math.floor(e.width * i)), (n.height = Math.floor(e.height * i)); var r = n.getContext("2d"); return r.drawImage(e, 0, 0, e.width, e.height, 0, 0, n.width, n.height), console.warn("THREE.WebGLRenderer: image is too big (" + e.width + "x" + e.height + "). Resized to " + n.width + "x" + n.height, e), n; } return e; } function c(e) { return n.Math.isPowerOfTwo(e.width) && n.Math.isPowerOfTwo(e.height); } function u(e) { if (e instanceof HTMLImageElement || e instanceof HTMLCanvasElement) { var t = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); (t.width = n.Math.nearestPowerOfTwo(e.width)), (t.height = n.Math.nearestPowerOfTwo(e.height)); var i = t.getContext("2d"); return i.drawImage(e, 0, 0, t.width, t.height), console.warn("THREE.WebGLRenderer: image is not power of two (" + e.width + "x" + e.height + "). Resized to " + t.width + "x" + t.height, e), t; } return e; } function h(e) { return e.wrapS !== n.ClampToEdgeWrapping || e.wrapT !== n.ClampToEdgeWrapping ? !0 : e.minFilter !== n.NearestFilter && e.minFilter !== n.LinearFilter ? !0 : !1; } function d(t) { return t === n.NearestFilter || t === n.NearestMipMapNearestFilter || t === n.NearestMipMapLinearFilter ? e.NEAREST : e.LINEAR; } function f(e) { var t = e.target; t.removeEventListener("dispose", f), m(t), C.textures--; } function p(e) { var t = e.target; t.removeEventListener("dispose", p), v(t), C.textures--; } function m(t) { var i = r.get(t); if (t.image && i.__image__webglTextureCube) e.deleteTexture(i.__image__webglTextureCube); else { if (void 0 === i.__webglInit) return; e.deleteTexture(i.__webglTexture); } r["delete"](t); } function v(t) { var i = r.get(t), o = r.get(t.texture); if (t) { if ((void 0 !== o.__webglTexture && e.deleteTexture(o.__webglTexture), t.depthTexture && t.depthTexture.dispose(), t instanceof n.WebGLRenderTargetCube)) for (var a = 0; 6 > a; a++) e.deleteFramebuffer(i.__webglFramebuffer[a]), i.__webglDepthbuffer && e.deleteRenderbuffer(i.__webglDepthbuffer[a]); else e.deleteFramebuffer(i.__webglFramebuffer), i.__webglDepthbuffer && e.deleteRenderbuffer(i.__webglDepthbuffer); r["delete"](t.texture), r["delete"](t); } } function g(t, n) { var o = r.get(t); if (t.version > 0 && o.__version !== t.version) { var a = t.image; if (void 0 === a) console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined", t); else { if (a.complete !== !1) return void x(o, t, n); console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete", t); } } i.activeTexture(e.TEXTURE0 + n), i.bindTexture(e.TEXTURE_2D, o.__webglTexture); } function y(t, s) { var u = r.get(t); if (6 === t.image.length) if (t.version > 0 && u.__version !== t.version) { u.__image__webglTextureCube || (t.addEventListener("dispose", f), (u.__image__webglTextureCube = e.createTexture()), C.textures++), i.activeTexture(e.TEXTURE0 + s), i.bindTexture(e.TEXTURE_CUBE_MAP, u.__image__webglTextureCube), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, t.flipY); for (var h = t instanceof n.CompressedTexture, d = t.image[0] instanceof n.DataTexture, p = [], m = 0; 6 > m; m++) h || d ? (p[m] = d ? t.image[m].image : t.image[m]) : (p[m] = l(t.image[m], o.maxCubemapSize)); var v = p[0], g = c(v), y = a(t.format), _ = a(t.type); b(e.TEXTURE_CUBE_MAP, t, g); for (var m = 0; 6 > m; m++) if (h) for (var x, w = p[m].mipmaps, M = 0, T = w.length; T > M; M++) (x = w[M]), t.format !== n.RGBAFormat && t.format !== n.RGBFormat ? i.getCompressedTextureFormats().indexOf(y) > -1 ? i.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + m, M, y, x.width, x.height, 0, x.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + m, M, y, x.width, x.height, 0, y, _, x.data); else d ? i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + m, 0, y, p[m].width, p[m].height, 0, y, _, p[m].data) : i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + m, 0, y, y, _, p[m]); t.generateMipmaps && g && e.generateMipmap(e.TEXTURE_CUBE_MAP), (u.__version = t.version), t.onUpdate && t.onUpdate(t); } else i.activeTexture(e.TEXTURE0 + s), i.bindTexture(e.TEXTURE_CUBE_MAP, u.__image__webglTextureCube); } function _(t, n) { i.activeTexture(e.TEXTURE0 + n), i.bindTexture(e.TEXTURE_CUBE_MAP, r.get(t).__webglTexture); } function b(i, s, l) { var c; if ( (l ? (e.texParameteri(i, e.TEXTURE_WRAP_S, a(s.wrapS)), e.texParameteri(i, e.TEXTURE_WRAP_T, a(s.wrapT)), e.texParameteri(i, e.TEXTURE_MAG_FILTER, a(s.magFilter)), e.texParameteri(i, e.TEXTURE_MIN_FILTER, a(s.minFilter))) : (e.texParameteri(i, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(i, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), (s.wrapS !== n.ClampToEdgeWrapping || s.wrapT !== n.ClampToEdgeWrapping) && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.", s), e.texParameteri(i, e.TEXTURE_MAG_FILTER, d(s.magFilter)), e.texParameteri(i, e.TEXTURE_MIN_FILTER, d(s.minFilter)), s.minFilter !== n.NearestFilter && s.minFilter !== n.LinearFilter && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.", s)), (c = t.get("EXT_texture_filter_anisotropic"))) ) { if (s.type === n.FloatType && null === t.get("OES_texture_float_linear")) return; if (s.type === n.HalfFloatType && null === t.get("OES_texture_half_float_linear")) return; (s.anisotropy > 1 || r.get(s).__currentAnisotropy) && (e.texParameterf(i, c.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(s.anisotropy, o.getMaxAnisotropy())), (r.get(s).__currentAnisotropy = s.anisotropy)); } } function x(t, r, s) { void 0 === t.__webglInit && ((t.__webglInit = !0), r.addEventListener("dispose", f), (t.__webglTexture = e.createTexture()), C.textures++), i.activeTexture(e.TEXTURE0 + s), i.bindTexture(e.TEXTURE_2D, t.__webglTexture), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, r.flipY), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, r.premultiplyAlpha), e.pixelStorei(e.UNPACK_ALIGNMENT, r.unpackAlignment); var d = l(r.image, o.maxTextureSize); h(r) && c(d) === !1 && (d = u(d)); var p = c(d), m = a(r.format), v = a(r.type); b(e.TEXTURE_2D, r, p); var g, y = r.mipmaps; if (r instanceof n.DepthTexture) { var _ = e.DEPTH_COMPONENT; if (r.type === n.FloatType) { if (!P) throw new Error("Float Depth Texture only supported in WebGL2.0"); _ = e.DEPTH_COMPONENT32F; } else P && (_ = e.DEPTH_COMPONENT16); i.texImage2D(e.TEXTURE_2D, 0, _, d.width, d.height, 0, m, v, null); } else if (r instanceof n.DataTexture) if (y.length > 0 && p) { for (var x = 0, w = y.length; w > x; x++)(g = y[x]), i.texImage2D(e.TEXTURE_2D, x, m, g.width, g.height, 0, m, v, g.data); r.generateMipmaps = !1; } else i.texImage2D(e.TEXTURE_2D, 0, m, d.width, d.height, 0, m, v, d.data); else if (r instanceof n.CompressedTexture) for (var x = 0, w = y.length; w > x; x++) (g = y[x]), r.format !== n.RGBAFormat && r.format !== n.RGBFormat ? i.getCompressedTextureFormats().indexOf(m) > -1 ? i.compressedTexImage2D(e.TEXTURE_2D, x, m, g.width, g.height, 0, g.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : i.texImage2D(e.TEXTURE_2D, x, m, g.width, g.height, 0, m, v, g.data); else if (y.length > 0 && p) { for (var x = 0, w = y.length; w > x; x++)(g = y[x]), i.texImage2D(e.TEXTURE_2D, x, m, m, v, g); r.generateMipmaps = !1; } else i.texImage2D(e.TEXTURE_2D, 0, m, m, v, d); r.generateMipmaps && p && e.generateMipmap(e.TEXTURE_2D), (t.__version = r.version), r.onUpdate && r.onUpdate(r); } function w(t, n, o, s) { var l = a(n.texture.format), c = a(n.texture.type); i.texImage2D(s, 0, l, n.width, n.height, 0, l, c, null), e.bindFramebuffer(e.FRAMEBUFFER, t), e.framebufferTexture2D(e.FRAMEBUFFER, o, s, r.get(n.texture).__webglTexture, 0), e.bindFramebuffer(e.FRAMEBUFFER, null); } function M(t, i) { e.bindRenderbuffer(e.RENDERBUFFER, t), i.depthBuffer && !i.stencilBuffer ? (e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_COMPONENT16, i.width, i.height), e.framebufferRenderbuffer(e.FRAMEBUFFER, e.DEPTH_ATTACHMENT, e.RENDERBUFFER, t)) : i.depthBuffer && i.stencilBuffer ? (e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, i.width, i.height), e.framebufferRenderbuffer(e.FRAMEBUFFER, e.DEPTH_STENCIL_ATTACHMENT, e.RENDERBUFFER, t)) : e.renderbufferStorage(e.RENDERBUFFER, e.RGBA4, i.width, i.height), e.bindRenderbuffer(e.RENDERBUFFER, null); } function T(t, i) { var o = i instanceof n.WebGLRenderTargetCube; if (o) throw new Error("Depth Texture with cube render targets is not supported!"); if ((e.bindFramebuffer(e.FRAMEBUFFER, t), !(i.depthTexture instanceof n.DepthTexture))) throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture"); (r.get(i.depthTexture).__webglTexture && i.depthTexture.image.width === i.width && i.depthTexture.image.height === i.height) || ((i.depthTexture.image.width = i.width), (i.depthTexture.image.height = i.height), (i.depthTexture.needsUpdate = !0)), g(i.depthTexture, 0); var a = r.get(i.depthTexture).__webglTexture; e.framebufferTexture2D(e.FRAMEBUFFER, e.DEPTH_ATTACHMENT, e.TEXTURE_2D, a, 0); } function S(t) { var i = r.get(t), o = t instanceof n.WebGLRenderTargetCube; if (t.depthTexture) { if (o) throw new Error("target.depthTexture not supported in Cube render targets"); T(i.__webglFramebuffer, t); } else if (o) { i.__webglDepthbuffer = []; for (var a = 0; 6 > a; a++) e.bindFramebuffer(e.FRAMEBUFFER, i.__webglFramebuffer[a]), (i.__webglDepthbuffer[a] = e.createRenderbuffer()), M(i.__webglDepthbuffer[a], t); } else e.bindFramebuffer(e.FRAMEBUFFER, i.__webglFramebuffer), (i.__webglDepthbuffer = e.createRenderbuffer()), M(i.__webglDepthbuffer, t); e.bindFramebuffer(e.FRAMEBUFFER, null); } function E(t) { var o = r.get(t), a = r.get(t.texture); t.addEventListener("dispose", p), (a.__webglTexture = e.createTexture()), C.textures++; var s = t instanceof n.WebGLRenderTargetCube, l = c(t); if (s) { o.__webglFramebuffer = []; for (var u = 0; 6 > u; u++) o.__webglFramebuffer[u] = e.createFramebuffer(); } else o.__webglFramebuffer = e.createFramebuffer(); if (s) { i.bindTexture(e.TEXTURE_CUBE_MAP, a.__webglTexture), b(e.TEXTURE_CUBE_MAP, t.texture, l); for (var u = 0; 6 > u; u++) w(o.__webglFramebuffer[u], t, e.COLOR_ATTACHMENT0, e.TEXTURE_CUBE_MAP_POSITIVE_X + u); t.texture.generateMipmaps && l && e.generateMipmap(e.TEXTURE_CUBE_MAP), i.bindTexture(e.TEXTURE_CUBE_MAP, null); } else i.bindTexture(e.TEXTURE_2D, a.__webglTexture), b(e.TEXTURE_2D, t.texture, l), w(o.__webglFramebuffer, t, e.COLOR_ATTACHMENT0, e.TEXTURE_2D), t.texture.generateMipmaps && l && e.generateMipmap(e.TEXTURE_2D), i.bindTexture(e.TEXTURE_2D, null); t.depthBuffer && S(t); } function A(t) { var o = t.texture; if (o.generateMipmaps && c(t) && o.minFilter !== n.NearestFilter && o.minFilter !== n.LinearFilter) { var a = t instanceof n.WebGLRenderTargetCube ? e.TEXTURE_CUBE_MAP : e.TEXTURE_2D, s = r.get(o).__webglTexture; i.bindTexture(a, s), e.generateMipmap(a), i.bindTexture(a, null); } } var C = s.memory, P = "undefined" != typeof WebGL2RenderingContext && e instanceof WebGL2RenderingContext; (this.setTexture2D = g), (this.setTextureCube = y), (this.setTextureCubeDynamic = _), (this.setupRenderTarget = E), (this.updateRenderTargetMipmap = A); }), (n.WebGLUniforms = (function () { var e = new n.Texture(), t = new n.CubeTexture(), i = function () { (this.seq = []), (this.map = {}); }, r = [], o = [], a = function (e, t, i) { var n = e[0]; if (0 >= n || n > 0) return e; var o = t * i, a = r[o]; if ((void 0 === a && ((a = new Float32Array(o)), (r[o] = a)), 0 !== t)) { n.toArray(a, 0); for (var s = 1, l = 0; s !== t; ++s)(l += i), e[s].toArray(a, l); } return a; }, s = function (e, t) { var i = o[t]; void 0 === i && ((i = new Int32Array(t)), (o[t] = i)); for (var n = 0; n !== t; ++n) i[n] = e.allocTextureUnit(); return i; }, l = function (e, t) { e.uniform1f(this.addr, t); }, c = function (e, t) { e.uniform1i(this.addr, t); }, u = function (e, t) { void 0 === t.x ? e.uniform2fv(this.addr, t) : e.uniform2f(this.addr, t.x, t.y); }, h = function (e, t) { void 0 !== t.x ? e.uniform3f(this.addr, t.x, t.y, t.z) : void 0 !== t.r ? e.uniform3f(this.addr, t.r, t.g, t.b) : e.uniform3fv(this.addr, t); }, d = function (e, t) { void 0 === t.x ? e.uniform4fv(this.addr, t) : e.uniform4f(this.addr, t.x, t.y, t.z, t.w); }, f = function (e, t) { e.uniformMatrix2fv(this.addr, !1, t.elements || t); }, p = function (e, t) { e.uniformMatrix3fv(this.addr, !1, t.elements || t); }, m = function (e, t) { e.uniformMatrix4fv(this.addr, !1, t.elements || t); }, v = function (t, i, n) { var r = n.allocTextureUnit(); t.uniform1i(this.addr, r), n.setTexture2D(i || e, r); }, g = function (e, i, n) { var r = n.allocTextureUnit(); e.uniform1i(this.addr, r), n.setTextureCube(i || t, r); }, y = function (e, t) { e.uniform2iv(this.addr, t); }, _ = function (e, t) { e.uniform3iv(this.addr, t); }, b = function (e, t) { e.uniform4iv(this.addr, t); }, x = function (e) { switch (e) { case 5126: return l; case 35664: return u; case 35665: return h; case 35666: return d; case 35674: return f; case 35675: return p; case 35676: return m; case 35678: return v; case 35680: return g; case 5124: case 35670: return c; case 35667: case 35671: return y; case 35668: case 35672: return _; case 35669: case 35673: return b; } }, w = function (e, t) { e.uniform1fv(this.addr, t); }, M = function (e, t) { e.uniform1iv(this.addr, t); }, T = function (e, t) { e.uniform2fv(this.addr, a(t, this.size, 2)); }, S = function (e, t) { e.uniform3fv(this.addr, a(t, this.size, 3)); }, E = function (e, t) { e.uniform4fv(this.addr, a(t, this.size, 4)); }, A = function (e, t) { e.uniformMatrix2fv(this.addr, !1, a(t, this.size, 4)); }, C = function (e, t) { e.uniformMatrix3fv(this.addr, !1, a(t, this.size, 9)); }, P = function (e, t) { e.uniformMatrix4fv(this.addr, !1, a(t, this.size, 16)); }, L = function (t, i, n) { var r = i.length, o = s(n, r); t.uniform1iv(this.addr, o); for (var a = 0; a !== r; ++a) n.setTexture2D(i[a] || e, o[a]); }, R = function (e, i, n) { var r = i.length, o = s(n, r); e.uniform1iv(this.addr, o); for (var a = 0; a !== r; ++a) n.setTextureCube(i[a] || t, o[a]); }, O = function (e) { switch (e) { case 5126: return w; case 35664: return T; case 35665: return S; case 35666: return E; case 35674: return A; case 35675: return C; case 35676: return P; case 35678: return L; case 35680: return R; case 5124: case 35670: return M; case 35667: case 35671: return y; case 35668: case 35672: return _; case 35669: case 35673: return b; } }, k = function (e, t, i) { (this.id = e), (this.addr = i), (this.setValue = x(t.type)); }, D = function (e, t, i) { (this.id = e), (this.addr = i), (this.size = t.size), (this.setValue = O(t.type)); }, I = function (e) { (this.id = e), i.call(this); }; I.prototype.setValue = function (e, t) { for (var i = this.seq, n = 0, r = i.length; n !== r; ++n) { var o = i[n]; o.setValue(e, t[o.id]); } }; var N = /([wd_]+)(])?([|.)?/g, U = function (e, t) { e.seq.push(t), (e.map[t.id] = t); }, j = function (e, t, i) { var n = e.name, r = n.length; for (N.lastIndex = 0;;) { var o = N.exec(n), a = N.lastIndex, s = o[1], l = "]" === o[2], c = o[3]; if ((l && (s = 0 | s), void 0 === c || ("[" === c && a + 2 === r))) { U(i, void 0 === c ? new k(s, e, t) : new D(s, e, t)); break; } var u = i.map, h = u[s]; void 0 === h && ((h = new I(s)), U(i, h)), (i = h); } }, B = function (e, t, n) { i.call(this), (this.renderer = n); for (var r = e.getProgramParameter(t, e.ACTIVE_UNIFORMS), o = 0; o !== r; ++o) { var a = e.getActiveUniform(t, o), s = a.name, l = e.getUniformLocation(t, s); j(a, l, this); } }; return ( (B.prototype.setValue = function (e, t, i) { var n = this.map[t]; void 0 !== n && n.setValue(e, i, this.renderer); }), (B.prototype.set = function (e, t, i) { var n = this.map[i]; void 0 !== n && n.setValue(e, t[i], this.renderer); }), (B.prototype.setOptional = function (e, t, i) { var n = t[i]; void 0 !== n && this.setValue(e, i, n); }), (B.upload = function (e, t, i, n) { for (var r = 0, o = t.length; r !== o; ++r) { var a = t[r], s = i[a.id]; s.needsUpdate !== !1 && a.setValue(e, s.value, n); } }), (B.seqWithValue = function (e, t) { for (var i = [], n = 0, r = e.length; n !== r; ++n) { var o = e[n]; o.id in t && i.push(o); } return i; }), (B.splitDynamic = function (e, t) { for (var i = null, n = e.length, r = 0, o = 0; o !== n; ++o) { var a = e[o], s = t[a.id]; s && s.dynamic === !0 ? (null === i && (i = []), i.push(a)) : (o > r && (e[r] = a), ++r); } return n > r && (e.length = r), i; }), (B.evalDynamic = function (e, t, i, n) { for (var r = 0, o = e.length; r !== o; ++r) { var a = t[e[r].id], s = a.onUpdateCallback; void 0 !== s && s.call(a, i, n); } }), B ); })()), (n.LensFlarePlugin = function (e, t) { function i() { var e = new Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1]), t = new Uint16Array([0, 1, 2, 0, 2, 3]); (o = f.createBuffer()), (a = f.createBuffer()), f.bindBuffer(f.ARRAY_BUFFER, o), f.bufferData(f.ARRAY_BUFFER, e, f.STATIC_DRAW), f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, a), f.bufferData(f.ELEMENT_ARRAY_BUFFER, t, f.STATIC_DRAW), (h = f.createTexture()), (d = f.createTexture()), p.bindTexture(f.TEXTURE_2D, h), f.texImage2D(f.TEXTURE_2D, 0, f.RGB, 16, 16, 0, f.RGB, f.UNSIGNED_BYTE, null), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_S, f.CLAMP_TO_EDGE), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_T, f.CLAMP_TO_EDGE), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MAG_FILTER, f.NEAREST), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MIN_FILTER, f.NEAREST), p.bindTexture(f.TEXTURE_2D, d), f.texImage2D(f.TEXTURE_2D, 0, f.RGBA, 16, 16, 0, f.RGBA, f.UNSIGNED_BYTE, null), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_S, f.CLAMP_TO_EDGE), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_T, f.CLAMP_TO_EDGE), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MAG_FILTER, f.NEAREST), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MIN_FILTER, f.NEAREST), (s = { vertexShader: [ "uniform lowp int renderType;", "uniform vec3 screenPosition;", "uniform vec2 scale;", "uniform float rotation;", "uniform sampler2D occlusionMap;", "attribute vec2 position;", "attribute vec2 uv;", "varying vec2 vUV;", "varying float vVisibility;", "void main() {", "vUV = uv;", "vec2 pos = position;", "if ( renderType == 2 ) {", "vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );", "visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );", "visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );", "visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );", "visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );", "visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );", "visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );", "visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );", "visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );", "vVisibility = visibility.r / 9.0;", "vVisibility *= 1.0 - visibility.g / 9.0;", "vVisibility *= visibility.b / 9.0;", "vVisibility *= 1.0 - visibility.a / 9.0;", "pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;", "pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;", "}", "gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );", "}", ].join("n"), fragmentShader: [ "uniform lowp int renderType;", "uniform sampler2D map;", "uniform float opacity;", "uniform vec3 color;", "varying vec2 vUV;", "varying float vVisibility;", "void main() {", "if ( renderType == 0 ) {", "gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );", "} else if ( renderType == 1 ) {", "gl_FragColor = texture2D( map, vUV );", "} else {", "vec4 texture = texture2D( map, vUV );", "texture.a *= opacity * vVisibility;", "gl_FragColor = texture;", "gl_FragColor.rgb *= color;", "}", "}", ].join("n"), }), (l = r(s)), (c = { vertex: f.getAttribLocation(l, "position"), uv: f.getAttribLocation(l, "uv") }), (u = { renderType: f.getUniformLocation(l, "renderType"), map: f.getUniformLocation(l, "map"), occlusionMap: f.getUniformLocation(l, "occlusionMap"), opacity: f.getUniformLocation(l, "opacity"), color: f.getUniformLocation(l, "color"), scale: f.getUniformLocation(l, "scale"), rotation: f.getUniformLocation(l, "rotation"), screenPosition: f.getUniformLocation(l, "screenPosition"), }); } function r(t) { var i = f.createProgram(), n = f.createShader(f.FRAGMENT_SHADER), r = f.createShader(f.VERTEX_SHADER), o = "precision " + e.getPrecision() + " float;n"; return f.shaderSource(n, o + t.fragmentShader), f.shaderSource(r, o + t.vertexShader), f.compileShader(n), f.compileShader(r), f.attachShader(i, n), f.attachShader(i, r), f.linkProgram(i), i; } var o, a, s, l, c, u, h, d, f = e.context, p = e.state; this.render = function (r, s, m) { if (0 !== t.length) { var v = new n.Vector3(), g = m.w / m.z, y = 0.5 * m.z, _ = 0.5 * m.w, b = 16 / m.w, x = new n.Vector2(b * g, b), w = new n.Vector3(1, 1, 0), M = new n.Vector2(1, 1), T = new n.Box2(); T.min.set(0, 0), T.max.set(m.z - 16, m.w - 16), void 0 === l && i(), f.useProgram(l), p.initAttributes(), p.enableAttribute(c.vertex), p.enableAttribute(c.uv), p.disableUnusedAttributes(), f.uniform1i(u.occlusionMap, 0), f.uniform1i(u.map, 1), f.bindBuffer(f.ARRAY_BUFFER, o), f.vertexAttribPointer(c.vertex, 2, f.FLOAT, !1, 16, 0), f.vertexAttribPointer(c.uv, 2, f.FLOAT, !1, 16, 8), f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, a), p.disable(f.CULL_FACE), p.setDepthWrite(!1); for (var S = 0, E = t.length; E > S; S++) { (b = 16 / m.w), x.set(b * g, b); var A = t[S]; if ( (v.set(A.matrixWorld.elements[12], A.matrixWorld.elements[13], A.matrixWorld.elements[14]), v.applyMatrix4(s.matrixWorldInverse), v.applyProjection(s.projectionMatrix), w.copy(v), (M.x = m.x + w.x * y + y - 8), (M.y = m.y + w.y * _ + _ - 8), T.containsPoint(M) === !0) ) { p.activeTexture(f.TEXTURE0), p.bindTexture(f.TEXTURE_2D, null), p.activeTexture(f.TEXTURE1), p.bindTexture(f.TEXTURE_2D, h), f.copyTexImage2D(f.TEXTURE_2D, 0, f.RGB, M.x, M.y, 16, 16, 0), f.uniform1i(u.renderType, 0), f.uniform2f(u.scale, x.x, x.y), f.uniform3f(u.screenPosition, w.x, w.y, w.z), p.disable(f.BLEND), p.enable(f.DEPTH_TEST), f.drawElements(f.TRIANGLES, 6, f.UNSIGNED_SHORT, 0), p.activeTexture(f.TEXTURE0), p.bindTexture(f.TEXTURE_2D, d), f.copyTexImage2D(f.TEXTURE_2D, 0, f.RGBA, M.x, M.y, 16, 16, 0), f.uniform1i(u.renderType, 1), p.disable(f.DEPTH_TEST), p.activeTexture(f.TEXTURE1), p.bindTexture(f.TEXTURE_2D, h), f.drawElements(f.TRIANGLES, 6, f.UNSIGNED_SHORT, 0), A.positionScreen.copy(w), A.customUpdateCallback ? A.customUpdateCallback(A) : A.updateLensFlares(), f.uniform1i(u.renderType, 2), p.enable(f.BLEND); for (var C = 0, P = A.lensFlares.length; P > C; C++) { var L = A.lensFlares[C]; L.opacity > 0.001 && L.scale > 0.001 && ((w.x = L.x), (w.y = L.y), (w.z = L.z), (b = (L.size * L.scale) / m.w), (x.x = b * g), (x.y = b), f.uniform3f(u.screenPosition, w.x, w.y, w.z), f.uniform2f(u.scale, x.x, x.y), f.uniform1f(u.rotation, L.rotation), f.uniform1f(u.opacity, L.opacity), f.uniform3f(u.color, L.color.r, L.color.g, L.color.b), p.setBlending(L.blending, L.blendEquation, L.blendSrc, L.blendDst), e.setTexture2D(L.texture, 1), f.drawElements(f.TRIANGLES, 6, f.UNSIGNED_SHORT, 0)); } } } p.enable(f.CULL_FACE), p.enable(f.DEPTH_TEST), p.setDepthWrite(!0), e.resetGLState(); } }; }), (n.SpritePlugin = function (e, t) { function i() { var e = new Float32Array([-0.5, -0.5, 0, 0, 0.5, -0.5, 1, 0, 0.5, 0.5, 1, 1, -0.5, 0.5, 0, 1]), t = new Uint16Array([0, 1, 2, 0, 2, 3]); (a = d.createBuffer()), (s = d.createBuffer()), d.bindBuffer(d.ARRAY_BUFFER, a), d.bufferData(d.ARRAY_BUFFER, e, d.STATIC_DRAW), d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, s), d.bufferData(d.ELEMENT_ARRAY_BUFFER, t, d.STATIC_DRAW), (l = r()), (c = { position: d.getAttribLocation(l, "position"), uv: d.getAttribLocation(l, "uv") }), (u = { uvOffset: d.getUniformLocation(l, "uvOffset"), uvScale: d.getUniformLocation(l, "uvScale"), rotation: d.getUniformLocation(l, "rotation"), scale: d.getUniformLocation(l, "scale"), color: d.getUniformLocation(l, "color"), map: d.getUniformLocation(l, "map"), opacity: d.getUniformLocation(l, "opacity"), modelViewMatrix: d.getUniformLocation(l, "modelViewMatrix"), projectionMatrix: d.getUniformLocation(l, "projectionMatrix"), fogType: d.getUniformLocation(l, "fogType"), fogDensity: d.getUniformLocation(l, "fogDensity"), fogNear: d.getUniformLocation(l, "fogNear"), fogFar: d.getUniformLocation(l, "fogFar"), fogColor: d.getUniformLocation(l, "fogColor"), alphaTest: d.getUniformLocation(l, "alphaTest"), }); var i = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); (i.width = 8), (i.height = 8); var o = i.getContext("2d"); (o.fillStyle = "white"), o.fillRect(0, 0, 8, 8), (h = new n.Texture(i)), (h.needsUpdate = !0); } function r() { var t = d.createProgram(), i = d.createShader(d.VERTEX_SHADER), n = d.createShader(d.FRAGMENT_SHADER); return ( d.shaderSource( i, [ "precision " + e.getPrecision() + " float;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform float rotation;", "uniform vec2 scale;", "uniform vec2 uvOffset;", "uniform vec2 uvScale;", "attribute vec2 position;", "attribute vec2 uv;", "varying vec2 vUV;", "void main() {", "vUV = uvOffset + uv * uvScale;", "vec2 alignedPosition = position * scale;", "vec2 rotatedPosition;", "rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;", "rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;", "vec4 finalPosition;", "finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );", "finalPosition.xy += rotatedPosition;", "finalPosition = projectionMatrix * finalPosition;", "gl_Position = finalPosition;", "}", ].join("n") ), d.shaderSource( n, [ "precision " + e.getPrecision() + " float;", "uniform vec3 color;", "uniform sampler2D map;", "uniform float opacity;", "uniform int fogType;", "uniform vec3 fogColor;", "uniform float fogDensity;", "uniform float fogNear;", "uniform float fogFar;", "uniform float alphaTest;", "varying vec2 vUV;", "void main() {", "vec4 texture = texture2D( map, vUV );", "if ( texture.a < alphaTest ) discard;", "gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );", "if ( fogType > 0 ) {", "float depth = gl_FragCoord.z / gl_FragCoord.w;", "float fogFactor = 0.0;", "if ( fogType == 1 ) {", "fogFactor = smoothstep( fogNear, fogFar, depth );", "} else {", "const float LOG2 = 1.442695;", "fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );", "fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );", "}", "gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );", "}", "}", ].join("n") ), d.compileShader(i), d.compileShader(n), d.attachShader(t, i), d.attachShader(t, n), d.linkProgram(t), t ); } function o(e, t) { return e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.z !== t.z ? t.z - e.z : t.id - e.id; } var a, s, l, c, u, h, d = e.context, f = e.state, p = new n.Vector3(), m = new n.Quaternion(), v = new n.Vector3(); this.render = function (r, g) { if (0 !== t.length) { void 0 === l && i(), d.useProgram(l), f.initAttributes(), f.enableAttribute(c.position), f.enableAttribute(c.uv), f.disableUnusedAttributes(), f.disable(d.CULL_FACE), f.enable(d.BLEND), d.bindBuffer(d.ARRAY_BUFFER, a), d.vertexAttribPointer(c.position, 2, d.FLOAT, !1, 16, 0), d.vertexAttribPointer(c.uv, 2, d.FLOAT, !1, 16, 8), d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, s), d.uniformMatrix4fv(u.projectionMatrix, !1, g.projectionMatrix.elements), f.activeTexture(d.TEXTURE0), d.uniform1i(u.map, 0); var y = 0, _ = 0, b = r.fog; b ? (d.uniform3f(u.fogColor, b.color.r, b.color.g, b.color.b), b instanceof n.Fog ? (d.uniform1f(u.fogNear, b.near), d.uniform1f(u.fogFar, b.far), d.uniform1i(u.fogType, 1), (y = 1), (_ = 1)) : b instanceof n.FogExp2 && (d.uniform1f(u.fogDensity, b.density), d.uniform1i(u.fogType, 2), (y = 2), (_ = 2))) : (d.uniform1i(u.fogType, 0), (y = 0), (_ = 0)); for (var x = 0, w = t.length; w > x; x++) { var M = t[x]; M.modelViewMatrix.multiplyMatrices(g.matrixWorldInverse, M.matrixWorld), (M.z = -M.modelViewMatrix.elements[14]); } t.sort(o); for (var T = [], x = 0, w = t.length; w > x; x++) { var M = t[x], S = M.material; if (S.visible !== !1) { d.uniform1f(u.alphaTest, S.alphaTest), d.uniformMatrix4fv(u.modelViewMatrix, !1, M.modelViewMatrix.elements), M.matrixWorld.decompose(p, m, v), (T[0] = v.x), (T[1] = v.y); var E = 0; r.fog && S.fog && (E = _), y !== E && (d.uniform1i(u.fogType, E), (y = E)), null !== S.map ? (d.uniform2f(u.uvOffset, S.map.offset.x, S.map.offset.y), d.uniform2f(u.uvScale, S.map.repeat.x, S.map.repeat.y)) : (d.uniform2f(u.uvOffset, 0, 0), d.uniform2f(u.uvScale, 1, 1)), d.uniform1f(u.opacity, S.opacity), d.uniform3f(u.color, S.color.r, S.color.g, S.color.b), d.uniform1f(u.rotation, S.rotation), d.uniform2fv(u.scale, T), f.setBlending(S.blending, S.blendEquation, S.blendSrc, S.blendDst), f.setDepthTest(S.depthTest), f.setDepthWrite(S.depthWrite), S.map ? e.setTexture2D(S.map, 0) : e.setTexture2D(h, 0), d.drawElements(d.TRIANGLES, 6, d.UNSIGNED_SHORT, 0); } } f.enable(d.CULL_FACE), e.resetGLState(); } }; }), Object.assign(n, { Face4: function (e, t, i, r, o, a, s) { return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."), new n.Face3(e, t, i, o, a, s); }, LineStrip: 0, LinePieces: 1, MeshFaceMaterial: n.MultiMaterial, PointCloud: function (e, t) { return console.warn("THREE.PointCloud has been renamed to THREE.Points."), new n.Points(e, t); }, Particle: n.Sprite, ParticleSystem: function (e, t) { return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."), new n.Points(e, t); }, PointCloudMaterial: function (e) { return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."), new n.PointsMaterial(e); }, ParticleBasicMaterial: function (e) { return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."), new n.PointsMaterial(e); }, ParticleSystemMaterial: function (e) { return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."), new n.PointsMaterial(e); }, Vertex: function (e, t, i) { return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."), new n.Vector3(e, t, i); }, }), Object.assign(n.Box2.prototype, { empty: function () { return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."), this.isEmpty(); }, isIntersectionBox: function (e) { return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(e); }, }), Object.assign(n.Box3.prototype, { empty: function () { return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."), this.isEmpty(); }, isIntersectionBox: function (e) { return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(e); }, isIntersectionSphere: function (e) { return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(e); }, }), Object.assign(n.Matrix3.prototype, { multiplyVector3: function (e) { return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."), e.applyMatrix3(this); }, multiplyVector3Array: function (e) { return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."), this.applyToVector3Array(e); }, }), Object.assign(n.Matrix4.prototype, { extractPosition: function (e) { return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."), this.copyPosition(e); }, setRotationFromQuaternion: function (e) { return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."), this.makeRotationFromQuaternion(e); }, multiplyVector3: function (e) { return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead."), e.applyProjection(this); }, multiplyVector4: function (e) { return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."), e.applyMatrix4(this); }, multiplyVector3Array: function (e) { return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."), this.applyToVector3Array(e); }, rotateAxis: function (e) { console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."), e.transformDirection(this); }, crossVector: function (e) { return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."), e.applyMatrix4(this); }, translate: function (e) { console.error("THREE.Matrix4: .translate() has been removed."); }, rotateX: function (e) { console.error("THREE.Matrix4: .rotateX() has been removed."); }, rotateY: function (e) { console.error("THREE.Matrix4: .rotateY() has been removed."); }, rotateZ: function (e) { console.error("THREE.Matrix4: .rotateZ() has been removed."); }, rotateByAxis: function (e, t) { console.error("THREE.Matrix4: .rotateByAxis() has been removed."); }, }), Object.assign(n.Plane.prototype, { isIntersectionLine: function (e) { return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."), this.intersectsLine(e); }, }), Object.assign(n.Quaternion.prototype, { multiplyVector3: function (e) { return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."), e.applyQuaternion(this); }, }), Object.assign(n.Ray.prototype, { isIntersectionBox: function (e) { return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(e); }, isIntersectionPlane: function (e) { return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."), this.intersectsPlane(e); }, isIntersectionSphere: function (e) { return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(e); }, }), Object.assign(n.Vector3.prototype, { setEulerFromRotationMatrix: function () { console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead."); }, setEulerFromQuaternion: function () { console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead."); }, getPositionFromMatrix: function (e) { return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."), this.setFromMatrixPosition(e); }, getScaleFromMatrix: function (e) { return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."), this.setFromMatrixScale(e); }, getColumnFromMatrix: function (e, t) { return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."), this.setFromMatrixColumn(t, e); }, }), Object.assign(n.Object3D.prototype, { getChildByName: function (e) { return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."), this.getObjectByName(e); }, renderDepth: function (e) { console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead."); }, translate: function (e, t) { return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."), this.translateOnAxis(t, e); }, }), Object.defineProperties(n.Object3D.prototype, { eulerOrder: { get: function () { return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order; }, set: function (e) { console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), (this.rotation.order = e); }, }, useQuaternion: { get: function () { console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default."); }, set: function (e) { console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default."); }, }, }), Object.defineProperties(n.LOD.prototype, { objects: { get: function () { return console.warn("THREE.LOD: .objects has been renamed to .levels."), this.levels; }, }, }), (n.PerspectiveCamera.prototype.setLens = function (e, t) { console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."), void 0 !== t && (this.filmGauge = t), this.setFocalLength(e); }), Object.defineProperties(n.Light.prototype, { onlyShadow: { set: function (e) { console.warn("THREE.Light: .onlyShadow has been removed."); }, }, shadowCameraFov: { set: function (e) { console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."), (this.shadow.camera.fov = e); }, }, shadowCameraLeft: { set: function (e) { console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."), (this.shadow.camera.left = e); }, }, shadowCameraRight: { set: function (e) { console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."), (this.shadow.camera.right = e); }, }, shadowCameraTop: { set: function (e) { console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."), (this.shadow.camera.top = e); }, }, shadowCameraBottom: { set: function (e) { console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."), (this.shadow.camera.bottom = e); }, }, shadowCameraNear: { set: function (e) { console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."), (this.shadow.camera.near = e); }, }, shadowCameraFar: { set: function (e) { console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."), (this.shadow.camera.far = e); }, }, shadowCameraVisible: { set: function (e) { console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead."); }, }, shadowBias: { set: function (e) { console.warn("THREE.Light: .shadowBias is now .shadow.bias."), (this.shadow.bias = e); }, }, shadowDarkness: { set: function (e) { console.warn("THREE.Light: .shadowDarkness has been removed."); }, }, shadowMapWidth: { set: function (e) { console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."), (this.shadow.mapSize.width = e); }, }, shadowMapHeight: { set: function (e) { console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."), (this.shadow.mapSize.height = e); }, }, }), Object.defineProperties(n.BufferAttribute.prototype, { length: { get: function () { return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."), this.array.length; }, }, }), Object.assign(n.BufferGeometry.prototype, { addIndex: function (e) { console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."), this.setIndex(e); }, addDrawCall: function (e, t, i) { void 0 !== i && console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."), console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."), this.addGroup(e, t); }, clearDrawCalls: function () { console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."), this.clearGroups(); }, computeTangents: function () { console.warn("THREE.BufferGeometry: .computeTangents() has been removed."); }, computeOffsets: function () { console.warn("THREE.BufferGeometry: .computeOffsets() has been removed."); }, }), Object.defineProperties(n.BufferGeometry.prototype, { drawcalls: { get: function () { return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."), this.groups; }, }, offsets: { get: function () { return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."), this.groups; }, }, }), Object.defineProperties(n.Material.prototype, { wrapAround: { get: function () { console.warn("THREE." + this.type + ": .wrapAround has been removed."); }, set: function (e) { console.warn("THREE." + this.type + ": .wrapAround has been removed."); }, }, wrapRGB: { get: function () { return console.warn("THREE." + this.type + ": .wrapRGB has been removed."), new n.Color(); }, }, }), Object.defineProperties(n.MeshPhongMaterial.prototype, { metal: { get: function () { return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."), !1; }, set: function (e) { console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead"); }, }, }), Object.defineProperties(n.ShaderMaterial.prototype, { derivatives: { get: function () { return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives; }, set: function (e) { console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), (this.extensions.derivatives = e); }, }, }), (n.EventDispatcher.prototype = Object.assign( Object.create({ constructor: n.EventDispatcher, apply: function (e) { console.warn("THREE.EventDispatcher: .apply is deprecated, just inherit or Object.assign the prototype to mix-in."), Object.assign(e, this); }, }), n.EventDispatcher.prototype )), Object.assign(n.WebGLRenderer.prototype, { supportsFloatTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."), this.extensions.get("OES_texture_float"); }, supportsHalfFloatTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."), this.extensions.get("OES_texture_half_float"); }, supportsStandardDerivatives: function () { return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."), this.extensions.get("OES_standard_derivatives"); }, supportsCompressedTextureS3TC: function () { return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."), this.extensions.get("WEBGL_compressed_texture_s3tc"); }, supportsCompressedTexturePVRTC: function () { return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."), this.extensions.get("WEBGL_compressed_texture_pvrtc"); }, supportsBlendMinMax: function () { return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."), this.extensions.get("EXT_blend_minmax"); }, supportsVertexTextures: function () { return this.capabilities.vertexTextures; }, supportsInstancedArrays: function () { return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."), this.extensions.get("ANGLE_instanced_arrays"); }, enableScissorTest: function (e) { console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."), this.setScissorTest(e); }, initMaterial: function () { console.warn("THREE.WebGLRenderer: .initMaterial() has been removed."); }, addPrePlugin: function () { console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed."); }, addPostPlugin: function () { console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed."); }, updateShadowMap: function () { console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed."); }, }), Object.defineProperties(n.WebGLRenderer.prototype, { shadowMapEnabled: { get: function () { return this.shadowMap.enabled; }, set: function (e) { console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."), (this.shadowMap.enabled = e); }, }, shadowMapType: { get: function () { return this.shadowMap.type; }, set: function (e) { console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."), (this.shadowMap.type = e); }, }, shadowMapCullFace: { get: function () { return this.shadowMap.cullFace; }, set: function (e) { console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."), (this.shadowMap.cullFace = e); }, }, }), Object.defineProperties(n.WebGLShadowMap.prototype, { cullFace: { get: function () { return this.renderReverseSided ? n.CullFaceFront : n.CullFaceBack; }, set: function (e) { var t = e !== n.CullFaceBack; console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to " + t + "."), (this.renderReverseSided = t); }, }, }), Object.defineProperties(n.WebGLRenderTarget.prototype, { wrapS: { get: function () { return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), (this.texture.wrapS = e); }, }, wrapT: { get: function () { return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), (this.texture.wrapT = e); }, }, magFilter: { get: function () { return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), (this.texture.magFilter = e); }, }, minFilter: { get: function () { return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), (this.texture.minFilter = e); }, }, anisotropy: { get: function () { return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), (this.texture.anisotropy = e); }, }, offset: { get: function () { return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), (this.texture.offset = e); }, }, repeat: { get: function () { return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), (this.texture.repeat = e); }, }, format: { get: function () { return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), (this.texture.format = e); }, }, type: { get: function () { return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), (this.texture.type = e); }, }, generateMipmaps: { get: function () { return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps; }, set: function (e) { console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), (this.texture.generateMipmaps = e); }, }, }), Object.assign(n.Audio.prototype, { load: function (e) { console.warn("THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader."); var t = this, i = new n.AudioLoader(); return ( i.load(e, function (e) { t.setBuffer(e); }), this ); }, }), Object.assign(n.AudioAnalyser.prototype, { getData: function (e) { return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."), this.getFrequencyData(); }, }), (n.GeometryUtils = { merge: function (e, t, i) { console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."); var r; t instanceof n.Mesh && (t.matrixAutoUpdate && t.updateMatrix(), (r = t.matrix), (t = t.geometry)), e.merge(t, r, i); }, center: function (e) { return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."), e.center(); }, }), (n.ImageUtils = { crossOrigin: void 0, loadTexture: function (e, t, i, r) { console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead."); var o = new n.TextureLoader(); o.setCrossOrigin(this.crossOrigin); var a = o.load(e, i, void 0, r); return t && (a.mapping = t), a; }, loadTextureCube: function (e, t, i, r) { console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead."); var o = new n.CubeTextureLoader(); o.setCrossOrigin(this.crossOrigin); var a = o.load(e, i, void 0, r); return t && (a.mapping = t), a; }, loadCompressedTexture: function () { console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead."); }, loadCompressedTextureCube: function () { console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead."); }, }), (n.Projector = function () { console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."), (this.projectVector = function (e, t) { console.warn("THREE.Projector: .projectVector() is now vector.project()."), e.project(t); }), (this.unprojectVector = function (e, t) { console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."), e.unproject(t); }), (this.pickingRay = function (e, t) { console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera()."); }); }), (n.CanvasRenderer = function () { console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"), (this.domElement = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")), (this.clear = function () {}), (this.render = function () {}), (this.setClearColor = function () {}), (this.setSize = function () {}); }), (n.CurveUtils = { tangentQuadraticBezier: function (e, t, i, n) { return 2 * (1 - e) * (i - t) + 2 * e * (n - i); }, tangentCubicBezier: function (e, t, i, n, r) { return -3 * t * (1 - e) * (1 - e) + 3 * i * (1 - e) * (1 - e) - 6 * e * i * (1 - e) + 6 * e * n * (1 - e) - 3 * e * e * n + 3 * e * e * r; }, tangentSpline: function (e, t, i, n, r) { var o = 6 * e * e - 6 * e, a = 3 * e * e - 4 * e + 1, s = -6 * e * e + 6 * e, l = 3 * e * e - 2 * e; return o + a + s + l; }, interpolate: function (e, t, i, n, r) { var o = 0.5 * (i - e), a = 0.5 * (n - t), s = r * r, l = r * s; return (2 * t - 2 * i + o + a) * l + (-3 * t + 3 * i - 2 * o - a) * s + o * r + t; }, }), (n.SceneUtils = { createMultiMaterialObject: function (e, t) { for (var i = new n.Group(), r = 0, o = t.length; o > r; r++) i.add(new n.Mesh(e, t[r])); return i; }, detach: function (e, t, i) { e.applyMatrix(t.matrixWorld), t.remove(e), i.add(e); }, attach: function (e, t, i) { var r = new n.Matrix4(); r.getInverse(i.matrixWorld), e.applyMatrix(r), t.remove(e), i.add(e); }, }), (n.ShapeUtils = { area: function (e) { for (var t = e.length, i = 0, n = t - 1, r = 0; t > r; n = r++) i += e[n].x * e[r].y - e[r].x * e[n].y; return 0.5 * i; }, triangulate: (function () { function e(e, t, i, n, r, o) { var a, s, l, c, u, h, d, f, p; if (((s = e[o[t]].x), (l = e[o[t]].y), (c = e[o[i]].x), (u = e[o[i]].y), (h = e[o[n]].x), (d = e[o[n]].y), Number.EPSILON > (c - s) * (d - l) - (u - l) * (h - s))) return !1; var m, v, g, y, _, b, x, w, M, T, S, E, A, C, P; for (m = h - c, v = d - u, g = s - h, y = l - d, _ = c - s, b = u - l, a = 0; r > a; a++) if ( ((f = e[o[a]].x), (p = e[o[a]].y), !((f === s && p === l) || (f === c && p === u) || (f === h && p === d)) && ((x = f - s), (w = p - l), (M = f - c), (T = p - u), (S = f - h), (E = p - d), (P = m * T - v * M), (A = _ * w - b * x), (C = g * E - y * S), P >= -Number.EPSILON && C >= -Number.EPSILON && A >= -Number.EPSILON)) ) return !1; return !0; } return function (t, i) { var r = t.length; if (3 > r) return null; var o, a, s, l = [], c = [], u = []; if (n.ShapeUtils.area(t) > 0) for (a = 0; r > a; a++) c[a] = a; else for (a = 0; r > a; a++) c[a] = r - 1 - a; var h = r, d = 2 * h; for (a = h - 1; h > 2;) { if (d-- <= 0) return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"), i ? u : l; if (((o = a), o >= h && (o = 0), (a = o + 1), a >= h && (a = 0), (s = a + 1), s >= h && (s = 0), e(t, o, a, s, h, c))) { var f, p, m, v, g; for (f = c[o], p = c[a], m = c[s], l.push([t[f], t[p], t[m]]), u.push([c[o], c[a], c[s]]), v = a, g = a + 1; h > g; v++, g++) c[v] = c[g]; h--, (d = 2 * h); } } return i ? u : l; }; })(), triangulateShape: function (e, t) { function i(e) { var t = e.length; t > 2 && e[t - 1].equals(e[0]) && e.pop(); } function r(e, t, i) { return e.x !== t.x ? (e.x < t.x ? e.x <= i.x && i.x <= t.x : t.x <= i.x && i.x <= e.x) : e.y < t.y ? e.y <= i.y && i.y <= t.y : t.y <= i.y && i.y <= e.y; } function o(e, t, i, n, o) { var a = t.x - e.x, s = t.y - e.y, l = n.x - i.x, c = n.y - i.y, u = e.x - i.x, h = e.y - i.y, d = s * l - a * c, f = s * u - a * h; if (Math.abs(d) > Number.EPSILON) { var p; if (d > 0) { if (0 > f || f > d) return []; if (((p = c * u - l * h), 0 > p || p > d)) return []; } else { if (f > 0 || d > f) return []; if (((p = c * u - l * h), p > 0 || d > p)) return []; } if (0 === p) return !o || (0 !== f && f !== d) ? [e] : []; if (p === d) return !o || (0 !== f && f !== d) ? [t] : []; if (0 === f) return [i]; if (f === d) return [n]; var m = p / d; return [{ x: e.x + m * a, y: e.y + m * s }]; } if (0 !== f || c * u !== l * h) return []; var v = 0 === a && 0 === s, g = 0 === l && 0 === c; if (v && g) return e.x !== i.x || e.y !== i.y ? [] : [e]; if (v) return r(i, n, e) ? [e] : []; if (g) return r(e, t, i) ? [i] : []; var y, _, b, x, w, M, T, S; return ( 0 !== a ? (e.x < t.x ? ((y = e), (b = e.x), (_ = t), (x = t.x)) : ((y = t), (b = t.x), (_ = e), (x = e.x)), i.x < n.x ? ((w = i), (T = i.x), (M = n), (S = n.x)) : ((w = n), (T = n.x), (M = i), (S = i.x))) : (e.y < t.y ? ((y = e), (b = e.y), (_ = t), (x = t.y)) : ((y = t), (b = t.y), (_ = e), (x = e.y)), i.y < n.y ? ((w = i), (T = i.y), (M = n), (S = n.y)) : ((w = n), (T = n.y), (M = i), (S = i.y))), T >= b ? (T > x ? [] : x === T ? (o ? [] : [w]) : S >= x ? [w, _] : [w, M]) : b > S ? [] : b === S ? (o ? [] : [y]) : S >= x ? [y, _] : [y, M] ); } function a(e, t, i, n) { var r = t.x - e.x, o = t.y - e.y, a = i.x - e.x, s = i.y - e.y, l = n.x - e.x, c = n.y - e.y, u = r * s - o * a, h = r * c - o * l; if (Math.abs(u) > Number.EPSILON) { var d = l * s - c * a; return u > 0 ? h >= 0 && d >= 0 : h >= 0 || d >= 0; } return h > 0; } function s(e, t) { function i(e, t) { var i = y.length - 1, n = e - 1; 0 > n && (n = i); var r = e + 1; r > i && (r = 0); var o = a(y[e], y[n], y[r], s[t]); if (!o) return !1; var l = s.length - 1, c = t - 1; 0 > c && (c = l); var u = t + 1; return u > l && (u = 0), (o = a(s[t], s[c], s[u], y[e])), o ? !0 : !1; } function n(e, t) { var i, n, r; for (i = 0; i < y.length; i++) if (((n = i + 1), (n %= y.length), (r = o(e, t, y[i], y[n], !0)), r.length > 0)) return !0; return !1; } function r(e, i) { var n, r, a, s, l; for (n = 0; n < _.length; n++) for (r = t[_[n]], a = 0; a < r.length; a++) if (((s = a + 1), (s %= r.length), (l = o(e, i, r[a], r[s], !0)), l.length > 0)) return !0; return !1; } for (var s, l, c, u, h, d, f, p, m, v, g, y = e.concat(), _ = [], b = [], x = 0, w = t.length; w > x; x++) _.push(x); for (var M = 0, T = 2 * _.length; _.length > 0;) { if ((T--, 0 > T)) { console.log("Infinite Loop! Holes left:" + _.length + ", Probably Hole outside Shape!"); break; } for (c = M; c < y.length; c++) { (u = y[c]), (l = -1); for (var x = 0; x < _.length; x++) if (((d = _[x]), (f = u.x + ":" + u.y + ":" + d), void 0 === b[f])) { s = t[d]; for (var S = 0; S < s.length; S++) if (((h = s[S]), i(c, S) && !n(u, h) && !r(u, h))) { (l = S), _.splice(x, 1), (p = y.slice(0, c + 1)), (m = y.slice(c)), (v = s.slice(l)), (g = s.slice(0, l + 1)), (y = p.concat(v).concat(g).concat(m)), (M = c); break; } if (l >= 0) break; b[f] = !0; } if (l >= 0) break; } } return y; } i(e), t.forEach(i); for (var l, c, u, h, d, f, p = {}, m = e.concat(), v = 0, g = t.length; g > v; v++) Array.prototype.push.apply(m, t[v]); for (l = 0, c = m.length; c > l; l++)(d = m[l].x + ":" + m[l].y), void 0 !== p[d] && console.warn("THREE.ShapeUtils: Duplicate point", d, l), (p[d] = l); var y = s(e, t), _ = n.ShapeUtils.triangulate(y, !1); for (l = 0, c = _.length; c > l; l++) for (h = _[l], u = 0; 3 > u; u++)(d = h[u].x + ":" + h[u].y), (f = p[d]), void 0 !== f && (h[u] = f); return _.concat(); }, isClockWise: function (e) { return n.ShapeUtils.area(e) < 0; }, b2: (function () { function e(e, t) { var i = 1 - e; return i * i * t; } function t(e, t) { return 2 * (1 - e) * e * t; } function i(e, t) { return e * e * t; } return function (n, r, o, a) { return e(n, r) + t(n, o) + i(n, a); }; })(), b3: (function () { function e(e, t) { var i = 1 - e; return i * i * i * t; } function t(e, t) { var i = 1 - e; return 3 * i * i * e * t; } function i(e, t) { var i = 1 - e; return 3 * i * e * e * t; } function n(e, t) { return e * e * e * t; } return function (r, o, a, s, l) { return e(r, o) + t(r, a) + i(r, s) + n(r, l); }; })(), }), (n.Curve = function () {}), (n.Curve.prototype = { constructor: n.Curve, getPoint: function (e) { return console.warn("THREE.Curve: Warning, getPoint() not implemented!"), null; }, getPointAt: function (e) { var t = this.getUtoTmapping(e); return this.getPoint(t); }, getPoints: function (e) { e || (e = 5); for (var t = [], i = 0; e >= i; i++) t.push(this.getPoint(i / e)); return t; }, getSpacedPoints: function (e) { e || (e = 5); for (var t = [], i = 0; e >= i; i++) t.push(this.getPointAt(i / e)); return t; }, getLength: function () { var e = this.getLengths(); return e[e.length - 1]; }, getLengths: function (e) { if ((e || (e = this.__arcLengthDivisions ? this.__arcLengthDivisions : 200), this.cacheArcLengths && this.cacheArcLengths.length === e + 1 && !this.needsUpdate)) return this.cacheArcLengths; this.needsUpdate = !1; var t, i, n = [], r = this.getPoint(0), o = 0; for (n.push(0), i = 1; e >= i; i++)(t = this.getPoint(i / e)), (o += t.distanceTo(r)), n.push(o), (r = t); return (this.cacheArcLengths = n), n; }, updateArcLengths: function () { (this.needsUpdate = !0), this.getLengths(); }, getUtoTmapping: function (e, t) { var i, n = this.getLengths(), r = 0, o = n.length; i = t ? t : e * n[o - 1]; for (var a, s = 0, l = o - 1; l >= s;) if (((r = Math.floor(s + (l - s) / 2)), (a = n[r] - i), 0 > a)) s = r + 1; else { if (!(a > 0)) { l = r; break; } l = r - 1; } if (((r = l), n[r] === i)) { var c = r / (o - 1); return c; } var u = n[r], h = n[r + 1], d = h - u, f = (i - u) / d, c = (r + f) / (o - 1); return c; }, getTangent: function (e) { var t = 1e-4, i = e - t, n = e + t; 0 > i && (i = 0), n > 1 && (n = 1); var r = this.getPoint(i), o = this.getPoint(n), a = o.clone().sub(r); return a.normalize(); }, getTangentAt: function (e) { var t = this.getUtoTmapping(e); return this.getTangent(t); }, }), (n.Curve.create = function (e, t) { return (e.prototype = Object.create(n.Curve.prototype)), (e.prototype.constructor = e), (e.prototype.getPoint = t), e; }), (n.CurvePath = function () { (this.curves = []), (this.autoClose = !1); }), (n.CurvePath.prototype = Object.assign(Object.create(n.Curve.prototype), { constructor: n.CurvePath, add: function (e) { this.curves.push(e); }, closePath: function () { var e = this.curves[0].getPoint(0), t = this.curves[this.curves.length - 1].getPoint(1); e.equals(t) || this.curves.push(new n.LineCurve(t, e)); }, getPoint: function (e) { for (var t = e * this.getLength(), i = this.getCurveLengths(), n = 0; n < i.length;) { if (i[n] >= t) { var r = i[n] - t, o = this.curves[n], a = o.getLength(), s = 0 === a ? 0 : 1 - r / a; return o.getPointAt(s); } n++; } return null; }, getLength: function () { var e = this.getCurveLengths(); return e[e.length - 1]; }, updateArcLengths: function () { (this.needsUpdate = !0), (this.cacheLengths = null), this.getLengths(); }, getCurveLengths: function () { if (this.cacheLengths && this.cacheLengths.length === this.curves.length) return this.cacheLengths; for (var e = [], t = 0, i = 0, n = this.curves.length; n > i; i++)(t += this.curves[i].getLength()), e.push(t); return (this.cacheLengths = e), e; }, getSpacedPoints: function (e) { e || (e = 40); for (var t = [], i = 0; e >= i; i++) t.push(this.getPoint(i / e)); return this.autoClose && t.push(t[0]), t; }, getPoints: function (e) { e = e || 12; for (var t, i = [], r = 0, o = this.curves; r < o.length; r++) for (var a = o[r], s = a instanceof n.EllipseCurve ? 2 * e : a instanceof n.LineCurve ? 1 : a instanceof n.SplineCurve ? e * a.points.length : e, l = a.getPoints(s), c = 0; c < l.length; c++) { var u = l[c]; (t && t.equals(u)) || (i.push(u), (t = u)); } return this.autoClose && i.length > 1 && !i[i.length - 1].equals(i[0]) && i.push(i[0]), i; }, createPointsGeometry: function (e) { var t = this.getPoints(e); return this.createGeometry(t); }, createSpacedPointsGeometry: function (e) { var t = this.getSpacedPoints(e); return this.createGeometry(t); }, createGeometry: function (e) { for (var t = new n.Geometry(), i = 0, r = e.length; r > i; i++) { var o = e[i]; t.vertices.push(new n.Vector3(o.x, o.y, o.z || 0)); } return t; }, })), (n.Font = function (e) { this.data = e; }), Object.assign(n.Font.prototype, { generateShapes: function (e, t, i) { function r(e) { for (var i = String(e).split(""), n = t / a.resolution, r = 0, s = [], l = 0; l < i.length; l++) { var c = o(i[l], n, r); (r += c.offset), s.push(c.path); } return s; } function o(e, t, r) { var o = a.glyphs[e] || a.glyphs["?"]; if (o) { var s, l, c, u, h, d, f, p, m, v, g, y = new n.ShapePath(), _ = [], b = n.ShapeUtils.b2, x = n.ShapeUtils.b3; if (o.o) for (var w = o._cachedOutline || (o._cachedOutline = o.o.split(" ")), M = 0, T = w.length; T > M;) { var S = w[M++]; switch (S) { case "m": (s = w[M++] * t + r), (l = w[M++] * t), y.moveTo(s, l); break; case "l": (s = w[M++] * t + r), (l = w[M++] * t), y.lineTo(s, l); break; case "q": if (((c = w[M++] * t + r), (u = w[M++] * t), (f = w[M++] * t + r), (p = w[M++] * t), y.quadraticCurveTo(f, p, c, u), (g = _[_.length - 1]))) { (h = g.x), (d = g.y); for (var E = 1; i >= E; E++) { var A = E / i; b(A, h, f, c), b(A, d, p, u); } } break; case "b": if (((c = w[M++] * t + r), (u = w[M++] * t), (f = w[M++] * t + r), (p = w[M++] * t), (m = w[M++] * t + r), (v = w[M++] * t), y.bezierCurveTo(f, p, m, v, c, u), (g = _[_.length - 1]))) { (h = g.x), (d = g.y); for (var E = 1; i >= E; E++) { var A = E / i; x(A, h, f, m, c), x(A, d, p, v, u); } } } } return { offset: o.ha * t, path: y }; } } void 0 === t && (t = 100), void 0 === i && (i = 4); for (var a = this.data, s = r(e), l = [], c = 0, u = s.length; u > c; c++) Array.prototype.push.apply(l, s[c].toShapes()); return l; }, }), (n.Path = function (e) { n.CurvePath.call(this), (this.currentPoint = new n.Vector2()), e && this.fromPoints(e); }), (n.Path.prototype = Object.assign(Object.create(n.CurvePath.prototype), { constructor: n.Path, fromPoints: function (e) { this.moveTo(e[0].x, e[0].y); for (var t = 1, i = e.length; i > t; t++) this.lineTo(e[t].x, e[t].y); }, moveTo: function (e, t) { this.currentPoint.set(e, t); }, lineTo: function (e, t) { var i = new n.LineCurve(this.currentPoint.clone(), new n.Vector2(e, t)); this.curves.push(i), this.currentPoint.set(e, t); }, quadraticCurveTo: function (e, t, i, r) { var o = new n.QuadraticBezierCurve(this.currentPoint.clone(), new n.Vector2(e, t), new n.Vector2(i, r)); this.curves.push(o), this.currentPoint.set(i, r); }, bezierCurveTo: function (e, t, i, r, o, a) { var s = new n.CubicBezierCurve(this.currentPoint.clone(), new n.Vector2(e, t), new n.Vector2(i, r), new n.Vector2(o, a)); this.curves.push(s), this.currentPoint.set(o, a); }, splineThru: function (e) { var t = [this.currentPoint.clone()].concat(e), i = new n.SplineCurve(t); this.curves.push(i), this.currentPoint.copy(e[e.length - 1]); }, arc: function (e, t, i, n, r, o) { var a = this.currentPoint.x, s = this.currentPoint.y; this.absarc(e + a, t + s, i, n, r, o); }, absarc: function (e, t, i, n, r, o) { this.absellipse(e, t, i, i, n, r, o); }, ellipse: function (e, t, i, n, r, o, a, s) { var l = this.currentPoint.x, c = this.currentPoint.y; this.absellipse(e + l, t + c, i, n, r, o, a, s); }, absellipse: function (e, t, i, r, o, a, s, l) { var c = new n.EllipseCurve(e, t, i, r, o, a, s, l); if (this.curves.length > 0) { var u = c.getPoint(0); u.equals(this.currentPoint) || this.lineTo(u.x, u.y); } this.curves.push(c); var h = c.getPoint(1); this.currentPoint.copy(h); }, })), (n.ShapePath = function () { (this.subPaths = []), (this.currentPath = null); }), (n.ShapePath.prototype = { moveTo: function (e, t) { (this.currentPath = new n.Path()), this.subPaths.push(this.currentPath), this.currentPath.moveTo(e, t); }, lineTo: function (e, t) { this.currentPath.lineTo(e, t); }, quadraticCurveTo: function (e, t, i, n) { this.currentPath.quadraticCurveTo(e, t, i, n); }, bezierCurveTo: function (e, t, i, n, r, o) { this.currentPath.bezierCurveTo(e, t, i, n, r, o); }, splineThru: function (e) { this.currentPath.splineThru(e); }, toShapes: function (e, t) { function i(e) { for (var t = [], i = 0, r = e.length; r > i; i++) { var o = e[i], a = new n.Shape(); (a.curves = o.curves), t.push(a); } return t; } function r(e, t) { for (var i = t.length, n = !1, r = i - 1, o = 0; i > o; r = o++) { var a = t[r], s = t[o], l = s.x - a.x, c = s.y - a.y; if (Math.abs(c) > Number.EPSILON) { if ((0 > c && ((a = t[o]), (l = -l), (s = t[r]), (c = -c)), e.y < a.y || e.y > s.y)) continue; if (e.y === a.y) { if (e.x === a.x) return !0; } else { var u = c * (e.x - a.x) - l * (e.y - a.y); if (0 === u) return !0; if (0 > u) continue; n = !n; } } else { if (e.y !== a.y) continue; if ((s.x <= e.x && e.x <= a.x) || (a.x <= e.x && e.x <= s.x)) return !0; } } return n; } var o = n.ShapeUtils.isClockWise, a = this.subPaths; if (0 === a.length) return []; if (t === !0) return i(a); var s, l, c, u = []; if (1 === a.length) return (l = a[0]), (c = new n.Shape()), (c.curves = l.curves), u.push(c), u; var h = !o(a[0].getPoints()); h = e ? !h : h; var d, f = [], p = [], m = [], v = 0; (p[v] = void 0), (m[v] = []); for (var g = 0, y = a.length; y > g; g++) (l = a[g]), (d = l.getPoints()), (s = o(d)), (s = e ? !s : s), s ? (!h && p[v] && v++, (p[v] = { s: new n.Shape(), p: d }), (p[v].s.curves = l.curves), h && v++, (m[v] = [])) : m[v].push({ h: l, p: d[0] }); if (!p[0]) return i(a); if (p.length > 1) { for (var _ = !1, b = [], x = 0, w = p.length; w > x; x++) f[x] = []; for (var x = 0, w = p.length; w > x; x++) for (var M = m[x], T = 0; T < M.length; T++) { for (var S = M[T], E = !0, A = 0; A < p.length; A++) r(S.p, p[A].p) && (x !== A && b.push({ froms: x, tos: A, hole: T }), E ? ((E = !1), f[A].push(S)) : (_ = !0)); E && f[x].push(S); } b.length > 0 && (_ || (m = f)); } for (var C, g = 0, P = p.length; P > g; g++) { (c = p[g].s), u.push(c), (C = m[g]); for (var L = 0, R = C.length; R > L; L++) c.holes.push(C[L].h); } return u; }, }), (n.Shape = function () { n.Path.apply(this, arguments), (this.holes = []); }), (n.Shape.prototype = Object.assign(Object.create(n.Path.prototype), { constructor: n.Shape, extrude: function (e) { return new n.ExtrudeGeometry(this, e); }, makeGeometry: function (e) { return new n.ShapeGeometry(this, e); }, getPointsHoles: function (e) { for (var t = [], i = 0, n = this.holes.length; n > i; i++) t[i] = this.holes[i].getPoints(e); return t; }, extractAllPoints: function (e) { return { shape: this.getPoints(e), holes: this.getPointsHoles(e) }; }, extractPoints: function (e) { return this.extractAllPoints(e); }, })), (n.LineCurve = function (e, t) { (this.v1 = e), (this.v2 = t); }), (n.LineCurve.prototype = Object.create(n.Curve.prototype)), (n.LineCurve.prototype.constructor = n.LineCurve), (n.LineCurve.prototype.getPoint = function (e) { if (1 === e) return this.v2.clone(); var t = this.v2.clone().sub(this.v1); return t.multiplyScalar(e).add(this.v1), t; }), (n.LineCurve.prototype.getPointAt = function (e) { return this.getPoint(e); }), (n.LineCurve.prototype.getTangent = function (e) { var t = this.v2.clone().sub(this.v1); return t.normalize(); }), (n.QuadraticBezierCurve = function (e, t, i) { (this.v0 = e), (this.v1 = t), (this.v2 = i); }), (n.QuadraticBezierCurve.prototype = Object.create(n.Curve.prototype)), (n.QuadraticBezierCurve.prototype.constructor = n.QuadraticBezierCurve), (n.QuadraticBezierCurve.prototype.getPoint = function (e) { var t = n.ShapeUtils.b2; return new n.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x), t(e, this.v0.y, this.v1.y, this.v2.y)); }), (n.QuadraticBezierCurve.prototype.getTangent = function (e) { var t = n.CurveUtils.tangentQuadraticBezier; return new n.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x), t(e, this.v0.y, this.v1.y, this.v2.y)).normalize(); }), (n.CubicBezierCurve = function (e, t, i, n) { (this.v0 = e), (this.v1 = t), (this.v2 = i), (this.v3 = n); }), (n.CubicBezierCurve.prototype = Object.create(n.Curve.prototype)), (n.CubicBezierCurve.prototype.constructor = n.CubicBezierCurve), (n.CubicBezierCurve.prototype.getPoint = function (e) { var t = n.ShapeUtils.b3; return new n.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x, this.v3.x), t(e, this.v0.y, this.v1.y, this.v2.y, this.v3.y)); }), (n.CubicBezierCurve.prototype.getTangent = function (e) { var t = n.CurveUtils.tangentCubicBezier; return new n.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x, this.v3.x), t(e, this.v0.y, this.v1.y, this.v2.y, this.v3.y)).normalize(); }), (n.SplineCurve = function (e) { this.points = void 0 == e ? [] : e; }), (n.SplineCurve.prototype = Object.create(n.Curve.prototype)), (n.SplineCurve.prototype.constructor = n.SplineCurve), (n.SplineCurve.prototype.getPoint = function (e) { var t = this.points, i = (t.length - 1) * e, r = Math.floor(i), o = i - r, a = t[0 === r ? r : r - 1], s = t[r], l = t[r > t.length - 2 ? t.length - 1 : r + 1], c = t[r > t.length - 3 ? t.length - 1 : r + 2], u = n.CurveUtils.interpolate; return new n.Vector2(u(a.x, s.x, l.x, c.x, o), u(a.y, s.y, l.y, c.y, o)); }), (n.EllipseCurve = function (e, t, i, n, r, o, a, s) { (this.aX = e), (this.aY = t), (this.xRadius = i), (this.yRadius = n), (this.aStartAngle = r), (this.aEndAngle = o), (this.aClockwise = a), (this.aRotation = s || 0); }), (n.EllipseCurve.prototype = Object.create(n.Curve.prototype)), (n.EllipseCurve.prototype.constructor = n.EllipseCurve), (n.EllipseCurve.prototype.getPoint = function (e) { for (var t = 2 * Math.PI, i = this.aEndAngle - this.aStartAngle, r = Math.abs(i) < Number.EPSILON; 0 > i;) i += t; for (; i > t;) i -= t; i < Number.EPSILON && (i = r ? 0 : t), this.aClockwise !== !0 || r || (i === t ? (i = -t) : (i -= t)); var o = this.aStartAngle + e * i, a = this.aX + this.xRadius * Math.cos(o), s = this.aY + this.yRadius * Math.sin(o); if (0 !== this.aRotation) { var l = Math.cos(this.aRotation), c = Math.sin(this.aRotation), u = a - this.aX, h = s - this.aY; (a = u * l - h * c + this.aX), (s = u * c + h * l + this.aY); } return new n.Vector2(a, s); }), (n.ArcCurve = function (e, t, i, r, o, a) { n.EllipseCurve.call(this, e, t, i, i, r, o, a); }), (n.ArcCurve.prototype = Object.create(n.EllipseCurve.prototype)), (n.ArcCurve.prototype.constructor = n.ArcCurve), (n.LineCurve3 = n.Curve.create( function (e, t) { (this.v1 = e), (this.v2 = t); }, function (e) { if (1 === e) return this.v2.clone(); var t = new n.Vector3(); return t.subVectors(this.v2, this.v1), t.multiplyScalar(e), t.add(this.v1), t; } )), (n.QuadraticBezierCurve3 = n.Curve.create( function (e, t, i) { (this.v0 = e), (this.v1 = t), (this.v2 = i); }, function (e) { var t = n.ShapeUtils.b2; return new n.Vector3(t(e, this.v0.x, this.v1.x, this.v2.x), t(e, this.v0.y, this.v1.y, this.v2.y), t(e, this.v0.z, this.v1.z, this.v2.z)); } )), (n.CubicBezierCurve3 = n.Curve.create( function (e, t, i, n) { (this.v0 = e), (this.v1 = t), (this.v2 = i), (this.v3 = n); }, function (e) { var t = n.ShapeUtils.b3; return new n.Vector3(t(e, this.v0.x, this.v1.x, this.v2.x, this.v3.x), t(e, this.v0.y, this.v1.y, this.v2.y, this.v3.y), t(e, this.v0.z, this.v1.z, this.v2.z, this.v3.z)); } )), (n.SplineCurve3 = n.Curve.create( function (e) { console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"), (this.points = void 0 == e ? [] : e); }, function (e) { var t = this.points, i = (t.length - 1) * e, r = Math.floor(i), o = i - r, a = t[0 == r ? r : r - 1], s = t[r], l = t[r > t.length - 2 ? t.length - 1 : r + 1], c = t[r > t.length - 3 ? t.length - 1 : r + 2], u = n.CurveUtils.interpolate; return new n.Vector3(u(a.x, s.x, l.x, c.x, o), u(a.y, s.y, l.y, c.y, o), u(a.z, s.z, l.z, c.z, o)); } )), (n.CatmullRomCurve3 = (function () { function e() {} var t = new n.Vector3(), i = new e(), r = new e(), o = new e(); return ( (e.prototype.init = function (e, t, i, n) { (this.c0 = e), (this.c1 = i), (this.c2 = -3 * e + 3 * t - 2 * i - n), (this.c3 = 2 * e - 2 * t + i + n); }), (e.prototype.initNonuniformCatmullRom = function (e, t, i, n, r, o, a) { var s = (t - e) / r - (i - e) / (r + o) + (i - t) / o, l = (i - t) / o - (n - t) / (o + a) + (n - i) / a; (s *= o), (l *= o), this.init(t, i, s, l); }), (e.prototype.initCatmullRom = function (e, t, i, n, r) { this.init(t, i, r * (i - e), r * (n - t)); }), (e.prototype.calc = function (e) { var t = e * e, i = t * e; return this.c0 + this.c1 * e + this.c2 * t + this.c3 * i; }), n.Curve.create( function (e) { (this.points = e || []), (this.closed = !1); }, function (e) { var a, s, l, c, u = this.points; (c = u.length), 2 > c && console.log("duh, you need at least 2 points"), (a = (c - (this.closed ? 0 : 1)) * e), (s = Math.floor(a)), (l = a - s), this.closed ? (s += s > 0 ? 0 : (Math.floor(Math.abs(s) / u.length) + 1) * u.length) : 0 === l && s === c - 1 && ((s = c - 2), (l = 1)); var h, d, f, p; if ( (this.closed || s > 0 ? (h = u[(s - 1) % c]) : (t.subVectors(u[0], u[1]).add(u[0]), (h = t)), (d = u[s % c]), (f = u[(s + 1) % c]), this.closed || c > s + 2 ? (p = u[(s + 2) % c]) : (t.subVectors(u[c - 1], u[c - 2]).add(u[c - 1]), (p = t)), void 0 === this.type || "centripetal" === this.type || "chordal" === this.type) ) { var m = "chordal" === this.type ? 0.5 : 0.25, v = Math.pow(h.distanceToSquared(d), m), g = Math.pow(d.distanceToSquared(f), m), y = Math.pow(f.distanceToSquared(p), m); 1e-4 > g && (g = 1), 1e-4 > v && (v = g), 1e-4 > y && (y = g), i.initNonuniformCatmullRom(h.x, d.x, f.x, p.x, v, g, y), r.initNonuniformCatmullRom(h.y, d.y, f.y, p.y, v, g, y), o.initNonuniformCatmullRom(h.z, d.z, f.z, p.z, v, g, y); } else if ("catmullrom" === this.type) { var _ = void 0 !== this.tension ? this.tension : 0.5; i.initCatmullRom(h.x, d.x, f.x, p.x, _), r.initCatmullRom(h.y, d.y, f.y, p.y, _), o.initCatmullRom(h.z, d.z, f.z, p.z, _); } var b = new n.Vector3(i.calc(l), r.calc(l), o.calc(l)); return b; } ) ); })()), (n.ClosedSplineCurve3 = function (e) { console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3."), n.CatmullRomCurve3.call(this, e), (this.type = "catmullrom"), (this.closed = !0); }), (n.ClosedSplineCurve3.prototype = Object.create(n.CatmullRomCurve3.prototype)), (n.BoxGeometry = function (e, t, i, r, o, a) { n.Geometry.call(this), (this.type = "BoxGeometry"), (this.parameters = { width: e, height: t, depth: i, widthSegments: r, heightSegments: o, depthSegments: a }), this.fromBufferGeometry(new n.BoxBufferGeometry(e, t, i, r, o, a)), this.mergeVertices(); }), (n.BoxGeometry.prototype = Object.create(n.Geometry.prototype)), (n.BoxGeometry.prototype.constructor = n.BoxGeometry), (n.CubeGeometry = n.BoxGeometry), (n.BoxBufferGeometry = function (e, t, i, r, o, a) { function s(e, t, i) { var n = 0; return (n += (e + 1) * (t + 1) * 2), (n += (e + 1) * (i + 1) * 2), (n += (i + 1) * (t + 1) * 2); } function l(e, t, i) { var n = 0; return (n += e * t * 2), (n += e * i * 2), (n += i * t * 2), 6 * n; } function c(e, t, i, r, o, a, s, l, c, h, d) { for (var w = a / c, M = s / h, T = a / 2, S = s / 2, E = l / 2, A = c + 1, C = h + 1, P = 0, L = 0, R = new n.Vector3(), O = 0; C > O; O++) for (var k = O * M - S, D = 0; A > D; D++) { var I = D * w - T; (R[e] = I * r), (R[t] = k * o), (R[i] = E), (p[g] = R.x), (p[g + 1] = R.y), (p[g + 2] = R.z), (R[e] = 0), (R[t] = 0), (R[i] = l > 0 ? 1 : -1), (m[g] = R.x), (m[g + 1] = R.y), (m[g + 2] = R.z), (v[y] = D / c), (v[y + 1] = 1 - O / h), (g += 3), (y += 2), (P += 1); } for (O = 0; h > O; O++) for (D = 0; c > D; D++) { var N = b + D + A * O, U = b + D + A * (O + 1), j = b + (D + 1) + A * (O + 1), B = b + (D + 1) + A * O; (f[_] = N), (f[_ + 1] = U), (f[_ + 2] = B), (f[_ + 3] = U), (f[_ + 4] = j), (f[_ + 5] = B), (_ += 6), (L += 6); } u.addGroup(x, L, d), (x += L), (b += P); } n.BufferGeometry.call(this), (this.type = "BoxBufferGeometry"), (this.parameters = { width: e, height: t, depth: i, widthSegments: r, heightSegments: o, depthSegments: a }); var u = this; (r = Math.floor(r) || 1), (o = Math.floor(o) || 1), (a = Math.floor(a) || 1); var h = s(r, o, a), d = l(r, o, a), f = new(d > 65535 ? Uint32Array : Uint16Array)(d), p = new Float32Array(3 * h), m = new Float32Array(3 * h), v = new Float32Array(2 * h), g = 0, y = 0, _ = 0, b = 0, x = 0; c("z", "y", "x", -1, -1, i, t, e, a, o, 0), c("z", "y", "x", 1, -1, i, t, -e, a, o, 1), c("x", "z", "y", 1, 1, e, i, t, r, a, 2), c("x", "z", "y", 1, -1, e, i, -t, r, a, 3), c("x", "y", "z", 1, -1, e, t, i, r, o, 4), c("x", "y", "z", -1, -1, e, t, -i, r, o, 5), this.setIndex(new n.BufferAttribute(f, 1)), this.addAttribute("position", new n.BufferAttribute(p, 3)), this.addAttribute("normal", new n.BufferAttribute(m, 3)), this.addAttribute("uv", new n.BufferAttribute(v, 2)); }), (n.BoxBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.BoxBufferGeometry.prototype.constructor = n.BoxBufferGeometry), (n.CircleGeometry = function (e, t, i, r) { n.Geometry.call(this), (this.type = "CircleGeometry"), (this.parameters = { radius: e, segments: t, thetaStart: i, thetaLength: r }), this.fromBufferGeometry(new n.CircleBufferGeometry(e, t, i, r)); }), (n.CircleGeometry.prototype = Object.create(n.Geometry.prototype)), (n.CircleGeometry.prototype.constructor = n.CircleGeometry), (n.CircleBufferGeometry = function (e, t, i, r) { n.BufferGeometry.call(this), (this.type = "CircleBufferGeometry"), (this.parameters = { radius: e, segments: t, thetaStart: i, thetaLength: r }), (e = e || 50), (t = void 0 !== t ? Math.max(3, t) : 8), (i = void 0 !== i ? i : 0), (r = void 0 !== r ? r : 2 * Math.PI); var o = t + 2, a = new Float32Array(3 * o), s = new Float32Array(3 * o), l = new Float32Array(2 * o); (s[2] = 1), (l[0] = 0.5), (l[1] = 0.5); for (var c = 0, u = 3, h = 2; t >= c; c++, u += 3, h += 2) { var d = i + (c / t) * r; (a[u] = e * Math.cos(d)), (a[u + 1] = e * Math.sin(d)), (s[u + 2] = 1), (l[h] = (a[u] / e + 1) / 2), (l[h + 1] = (a[u + 1] / e + 1) / 2); } for (var f = [], u = 1; t >= u; u++) f.push(u, u + 1, 0); this.setIndex(new n.BufferAttribute(new Uint16Array(f), 1)), this.addAttribute("position", new n.BufferAttribute(a, 3)), this.addAttribute("normal", new n.BufferAttribute(s, 3)), this.addAttribute("uv", new n.BufferAttribute(l, 2)), (this.boundingSphere = new n.Sphere(new n.Vector3(), e)); }), (n.CircleBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.CircleBufferGeometry.prototype.constructor = n.CircleBufferGeometry), (n.CylinderBufferGeometry = function (e, t, i, r, o, a, s, l) { function c() { var e = (r + 1) * (o + 1); return a === !1 && (e += (r + 1) * p + r * p), e; } function u() { var e = r * o * 2 * 3; return a === !1 && (e += r * p * 3), e; } function h() { var a, c, u = new n.Vector3(), h = new n.Vector3(), d = 0, p = (t - e) / i; for (c = 0; o >= c; c++) { var m = [], v = c / o, E = v * (t - e) + e; for (a = 0; r >= a; a++) { var A = a / r; (h.x = E * Math.sin(A * l + s)), (h.y = -v * i + T), (h.z = E * Math.cos(A * l + s)), y.setXYZ(x, h.x, h.y, h.z), u.copy(h), ((0 === e && 0 === c) || (0 === t && c === o)) && ((u.x = Math.sin(A * l + s)), (u.z = Math.cos(A * l + s))), u.setY(Math.sqrt(u.x * u.x + u.z * u.z) * p).normalize(), _.setXYZ(x, u.x, u.y, u.z), b.setXY(x, A, 1 - v), m.push(x), x++; } M.push(m); } for (a = 0; r > a; a++) for (c = 0; o > c; c++) { var C = M[c][a], P = M[c + 1][a], L = M[c + 1][a + 1], R = M[c][a + 1]; g.setX(w, C), w++, g.setX(w, P), w++, g.setX(w, R), w++, g.setX(w, P), w++, g.setX(w, L), w++, g.setX(w, R), w++, (d += 6); } f.addGroup(S, d, 0), (S += d); } function d(i) { var o, a, c, u = new n.Vector2(), h = new n.Vector3(), d = 0, p = i === !0 ? e : t, m = i === !0 ? 1 : -1; for (a = x, o = 1; r >= o; o++) y.setXYZ(x, 0, T * m, 0), _.setXYZ(x, 0, m, 0), (u.x = 0.5), (u.y = 0.5), b.setXY(x, u.x, u.y), x++; for (c = x, o = 0; r >= o; o++) { var v = o / r, M = v * l + s, E = Math.cos(M), A = Math.sin(M); (h.x = p * A), (h.y = T * m), (h.z = p * E), y.setXYZ(x, h.x, h.y, h.z), _.setXYZ(x, 0, m, 0), (u.x = 0.5 * E + 0.5), (u.y = 0.5 * A * m + 0.5), b.setXY(x, u.x, u.y), x++; } for (o = 0; r > o; o++) { var C = a + o, P = c + o; i === !0 ? (g.setX(w, P), w++, g.setX(w, P + 1), w++, g.setX(w, C), w++) : (g.setX(w, P + 1), w++, g.setX(w, P), w++, g.setX(w, C), w++), (d += 3); } f.addGroup(S, d, i === !0 ? 1 : 2), (S += d); } n.BufferGeometry.call(this), (this.type = "CylinderBufferGeometry"), (this.parameters = { radiusTop: e, radiusBottom: t, height: i, radialSegments: r, heightSegments: o, openEnded: a, thetaStart: s, thetaLength: l }); var f = this; (e = void 0 !== e ? e : 20), (t = void 0 !== t ? t : 20), (i = void 0 !== i ? i : 100), (r = Math.floor(r) || 8), (o = Math.floor(o) || 1), (a = void 0 !== a ? a : !1), (s = void 0 !== s ? s : 0), (l = void 0 !== l ? l : 2 * Math.PI); var p = 0; a === !1 && (e > 0 && p++, t > 0 && p++); var m = c(), v = u(), g = new n.BufferAttribute(new(v > 65535 ? Uint32Array : Uint16Array)(v), 1), y = new n.BufferAttribute(new Float32Array(3 * m), 3), _ = new n.BufferAttribute(new Float32Array(3 * m), 3), b = new n.BufferAttribute(new Float32Array(2 * m), 2), x = 0, w = 0, M = [], T = i / 2, S = 0; h(), a === !1 && (e > 0 && d(!0), t > 0 && d(!1)), this.setIndex(g), this.addAttribute("position", y), this.addAttribute("normal", _), this.addAttribute("uv", b); }), (n.CylinderBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.CylinderBufferGeometry.prototype.constructor = n.CylinderBufferGeometry), (n.CylinderGeometry = function (e, t, i, r, o, a, s, l) { n.Geometry.call(this), (this.type = "CylinderGeometry"), (this.parameters = { radiusTop: e, radiusBottom: t, height: i, radialSegments: r, heightSegments: o, openEnded: a, thetaStart: s, thetaLength: l }), this.fromBufferGeometry(new n.CylinderBufferGeometry(e, t, i, r, o, a, s, l)), this.mergeVertices(); }), (n.CylinderGeometry.prototype = Object.create(n.Geometry.prototype)), (n.CylinderGeometry.prototype.constructor = n.CylinderGeometry), (n.ConeBufferGeometry = function (e, t, i, r, o, a, s) { n.CylinderBufferGeometry.call(this, 0, e, t, i, r, o, a, s), (this.type = "ConeBufferGeometry"), (this.parameters = { radius: e, height: t, radialSegments: i, heightSegments: r, thetaStart: a, thetaLength: s }); }), (n.ConeBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.ConeBufferGeometry.prototype.constructor = n.ConeBufferGeometry), (n.ConeGeometry = function (e, t, i, r, o, a, s) { n.CylinderGeometry.call(this, 0, e, t, i, r, o, a, s), (this.type = "ConeGeometry"), (this.parameters = { radius: e, height: t, radialSegments: i, heightSegments: r, openEnded: o, thetaStart: a, thetaLength: s }); }), (n.ConeGeometry.prototype = Object.create(n.CylinderGeometry.prototype)), (n.ConeGeometry.prototype.constructor = n.ConeGeometry), (n.EdgesGeometry = function (e, t) { function i(e, t) { return e - t; } n.BufferGeometry.call(this), (t = void 0 !== t ? t : 1); var r, o = Math.cos(n.Math.DEG2RAD * t), a = [0, 0], s = {}, l = ["a", "b", "c"]; e instanceof n.BufferGeometry ? ((r = new n.Geometry()), r.fromBufferGeometry(e)) : (r = e.clone()), r.mergeVertices(), r.computeFaceNormals(); for (var c = r.vertices, u = r.faces, h = 0, d = u.length; d > h; h++) for (var f = u[h], p = 0; 3 > p; p++) { (a[0] = f[l[p]]), (a[1] = f[l[(p + 1) % 3]]), a.sort(i); var m = a.toString(); void 0 === s[m] ? (s[m] = { vert1: a[0], vert2: a[1], face1: h, face2: void 0 }) : (s[m].face2 = h); } var v = []; for (var m in s) { var g = s[m]; if (void 0 === g.face2 || u[g.face1].normal.dot(u[g.face2].normal) <= o) { var y = c[g.vert1]; v.push(y.x), v.push(y.y), v.push(y.z), (y = c[g.vert2]), v.push(y.x), v.push(y.y), v.push(y.z); } } this.addAttribute("position", new n.BufferAttribute(new Float32Array(v), 3)); }), (n.EdgesGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.EdgesGeometry.prototype.constructor = n.EdgesGeometry), (n.ExtrudeGeometry = function (e, t) { return "undefined" == typeof e ? void(e = []) : (n.Geometry.call(this), (this.type = "ExtrudeGeometry"), (e = Array.isArray(e) ? e : [e]), this.addShapeList(e, t), void this.computeFaceNormals()); }), (n.ExtrudeGeometry.prototype = Object.create(n.Geometry.prototype)), (n.ExtrudeGeometry.prototype.constructor = n.ExtrudeGeometry), (n.ExtrudeGeometry.prototype.addShapeList = function (e, t) { for (var i = e.length, n = 0; i > n; n++) { var r = e[n]; this.addShape(r, t); } }), (n.ExtrudeGeometry.prototype.addShape = function (e, t) { function i(e, t, i) { return t || console.error("THREE.ExtrudeGeometry: vec does not exist"), t.clone().multiplyScalar(i).add(e); } function r(e, t, i) { var r, o, a = 1, s = e.x - t.x, l = e.y - t.y, c = i.x - e.x, u = i.y - e.y, h = s * s + l * l, d = s * u - l * c; if (Math.abs(d) > Number.EPSILON) { var f = Math.sqrt(h), p = Math.sqrt(c * c + u * u), m = t.x - l / f, v = t.y + s / f, g = i.x - u / p, y = i.y + c / p, _ = ((g - m) * u - (y - v) * c) / (s * u - l * c); (r = m + s * _ - e.x), (o = v + l * _ - e.y); var b = r * r + o * o; if (2 >= b) return new n.Vector2(r, o); a = Math.sqrt(b / 2); } else { var x = !1; s > Number.EPSILON ? c > Number.EPSILON && (x = !0) : s < -Number.EPSILON ? c < -Number.EPSILON && (x = !0) : Math.sign(l) === Math.sign(u) && (x = !0), x ? ((r = -l), (o = s), (a = Math.sqrt(h))) : ((r = s), (o = l), (a = Math.sqrt(h / 2))); } return new n.Vector2(r / a, o / a); } function o() { if (b) { var e = 0, t = z * e; for (W = 0; $ > W; W++)(G = I[W]), c(G[2] + t, G[1] + t, G[0] + t); for (e = w + 2 * _, t = z * e, W = 0; $ > W; W++)(G = I[W]), c(G[0] + t, G[1] + t, G[2] + t); } else { for (W = 0; $ > W; W++)(G = I[W]), c(G[2], G[1], G[0]); for (W = 0; $ > W; W++)(G = I[W]), c(G[0] + z * w, G[1] + z * w, G[2] + z * w); } } function a() { var e = 0; for (s(N, e), e += N.length, A = 0, C = k.length; C > A; A++)(E = k[A]), s(E, e), (e += E.length); } function s(e, t) { var i, n; for (W = e.length; --W >= 0;) { (i = W), (n = W - 1), 0 > n && (n = e.length - 1); var r = 0, o = w + 2 * _; for (r = 0; o > r; r++) { var a = z * r, s = z * (r + 1), l = t + i + a, c = t + n + a, h = t + n + s, d = t + i + s; u(l, c, h, d, e, r, o, i, n); } } } function l(e, t, i) { P.vertices.push(new n.Vector3(e, t, i)); } function c(e, t, i) { (e += L), (t += L), (i += L), P.faces.push(new n.Face3(e, t, i, null, null, 0)); var r = S.generateTopUV(P, e, t, i); P.faceVertexUvs[0].push(r); } function u(e, t, i, r, o, a, s, l, c) { (e += L), (t += L), (i += L), (r += L), P.faces.push(new n.Face3(e, t, r, null, null, 1)), P.faces.push(new n.Face3(t, i, r, null, null, 1)); var u = S.generateSideWallUV(P, e, t, i, r); P.faceVertexUvs[0].push([u[0], u[1], u[3]]), P.faceVertexUvs[0].push([u[1], u[2], u[3]]); } var h, d, f, p, m, v = void 0 !== t.amount ? t.amount : 100, g = void 0 !== t.bevelThickness ? t.bevelThickness : 6, y = void 0 !== t.bevelSize ? t.bevelSize : g - 2, _ = void 0 !== t.bevelSegments ? t.bevelSegments : 3, b = void 0 !== t.bevelEnabled ? t.bevelEnabled : !0, x = void 0 !== t.curveSegments ? t.curveSegments : 12, w = void 0 !== t.steps ? t.steps : 1, M = t.extrudePath, T = !1, S = void 0 !== t.UVGenerator ? t.UVGenerator : n.ExtrudeGeometry.WorldUVGenerator; M && ((h = M.getSpacedPoints(w)), (T = !0), (b = !1), (d = void 0 !== t.frames ? t.frames : new n.TubeGeometry.FrenetFrames(M, w, !1)), (f = new n.Vector3()), (p = new n.Vector3()), (m = new n.Vector3())), b || ((_ = 0), (g = 0), (y = 0)); var E, A, C, P = this, L = this.vertices.length, R = e.extractPoints(x), O = R.shape, k = R.holes, D = !n.ShapeUtils.isClockWise(O); if (D) { for (O = O.reverse(), A = 0, C = k.length; C > A; A++)(E = k[A]), n.ShapeUtils.isClockWise(E) && (k[A] = E.reverse()); D = !1; } var I = n.ShapeUtils.triangulateShape(O, k), N = O; for (A = 0, C = k.length; C > A; A++)(E = k[A]), (O = O.concat(E)); for (var U, j, B, F, V, G, z = O.length, $ = I.length, H = [], W = 0, X = N.length, Y = X - 1, q = W + 1; X > W; W++, Y++, q++) Y === X && (Y = 0), q === X && (q = 0), (H[W] = r(N[W], N[Y], N[q])); var Z, K = [], Q = H.concat(); for (A = 0, C = k.length; C > A; A++) { for (E = k[A], Z = [], W = 0, X = E.length, Y = X - 1, q = W + 1; X > W; W++, Y++, q++) Y === X && (Y = 0), q === X && (q = 0), (Z[W] = r(E[W], E[Y], E[q])); K.push(Z), (Q = Q.concat(Z)); } for (U = 0; _ > U; U++) { for (B = U / _, F = g * (1 - B), j = y * Math.sin((B * Math.PI) / 2), W = 0, X = N.length; X > W; W++)(V = i(N[W], H[W], j)), l(V.x, V.y, -F); for (A = 0, C = k.length; C > A; A++) for (E = k[A], Z = K[A], W = 0, X = E.length; X > W; W++)(V = i(E[W], Z[W], j)), l(V.x, V.y, -F); } for (j = y, W = 0; z > W; W++) (V = b ? i(O[W], Q[W], j) : O[W]), T ? (p.copy(d.normals[0]).multiplyScalar(V.x), f.copy(d.binormals[0]).multiplyScalar(V.y), m.copy(h[0]).add(p).add(f), l(m.x, m.y, m.z)) : l(V.x, V.y, 0); var J; for (J = 1; w >= J; J++) for (W = 0; z > W; W++) (V = b ? i(O[W], Q[W], j) : O[W]), T ? (p.copy(d.normals[J]).multiplyScalar(V.x), f.copy(d.binormals[J]).multiplyScalar(V.y), m.copy(h[J]).add(p).add(f), l(m.x, m.y, m.z)) : l(V.x, V.y, (v / w) * J); for (U = _ - 1; U >= 0; U--) { for (B = U / _, F = g * (1 - B), j = y * Math.sin((B * Math.PI) / 2), W = 0, X = N.length; X > W; W++)(V = i(N[W], H[W], j)), l(V.x, V.y, v + F); for (A = 0, C = k.length; C > A; A++) for (E = k[A], Z = K[A], W = 0, X = E.length; X > W; W++)(V = i(E[W], Z[W], j)), T ? l(V.x, V.y + h[w - 1].y, h[w - 1].x + F) : l(V.x, V.y, v + F); } o(), a(); }), (n.ExtrudeGeometry.WorldUVGenerator = { generateTopUV: function (e, t, i, r) { var o = e.vertices, a = o[t], s = o[i], l = o[r]; return [new n.Vector2(a.x, a.y), new n.Vector2(s.x, s.y), new n.Vector2(l.x, l.y)]; }, generateSideWallUV: function (e, t, i, r, o) { var a = e.vertices, s = a[t], l = a[i], c = a[r], u = a[o]; return Math.abs(s.y - l.y) < 0.01 ? [new n.Vector2(s.x, 1 - s.z), new n.Vector2(l.x, 1 - l.z), new n.Vector2(c.x, 1 - c.z), new n.Vector2(u.x, 1 - u.z)] : [new n.Vector2(s.y, 1 - s.z), new n.Vector2(l.y, 1 - l.z), new n.Vector2(c.y, 1 - c.z), new n.Vector2(u.y, 1 - u.z)]; }, }), (n.ShapeGeometry = function (e, t) { n.Geometry.call(this), (this.type = "ShapeGeometry"), Array.isArray(e) === !1 && (e = [e]), this.addShapeList(e, t), this.computeFaceNormals(); }), (n.ShapeGeometry.prototype = Object.create(n.Geometry.prototype)), (n.ShapeGeometry.prototype.constructor = n.ShapeGeometry), (n.ShapeGeometry.prototype.addShapeList = function (e, t) { for (var i = 0, n = e.length; n > i; i++) this.addShape(e[i], t); return this; }), (n.ShapeGeometry.prototype.addShape = function (e, t) { void 0 === t && (t = {}); var i, r, o, a = void 0 !== t.curveSegments ? t.curveSegments : 12, s = t.material, l = void 0 === t.UVGenerator ? n.ExtrudeGeometry.WorldUVGenerator : t.UVGenerator, c = this.vertices.length, u = e.extractPoints(a), h = u.shape, d = u.holes, f = !n.ShapeUtils.isClockWise(h); if (f) { for (h = h.reverse(), i = 0, r = d.length; r > i; i++)(o = d[i]), n.ShapeUtils.isClockWise(o) && (d[i] = o.reverse()); f = !1; } var p = n.ShapeUtils.triangulateShape(h, d); for (i = 0, r = d.length; r > i; i++)(o = d[i]), (h = h.concat(o)); var m, v, g = h.length, y = p.length; for (i = 0; g > i; i++)(m = h[i]), this.vertices.push(new n.Vector3(m.x, m.y, 0)); for (i = 0; y > i; i++) { v = p[i]; var _ = v[0] + c, b = v[1] + c, x = v[2] + c; this.faces.push(new n.Face3(_, b, x, null, null, s)), this.faceVertexUvs[0].push(l.generateTopUV(this, _, b, x)); } }), (n.LatheBufferGeometry = function (e, t, i, r) { n.BufferGeometry.call(this), (this.type = "LatheBufferGeometry"), (this.parameters = { points: e, segments: t, phiStart: i, phiLength: r }), (t = Math.floor(t) || 12), (i = i || 0), (r = r || 2 * Math.PI), (r = n.Math.clamp(r, 0, 2 * Math.PI)); var o, a, s, l = (t + 1) * e.length, c = t * e.length * 2 * 3, u = new n.BufferAttribute(new(c > 65535 ? Uint32Array : Uint16Array)(c), 1), h = new n.BufferAttribute(new Float32Array(3 * l), 3), d = new n.BufferAttribute(new Float32Array(2 * l), 2), f = 0, p = 0, m = (1 / (e.length - 1), 1 / t), v = new n.Vector3(), g = new n.Vector2(); for (a = 0; t >= a; a++) { var y = i + a * m * r, _ = Math.sin(y), b = Math.cos(y); for (s = 0; s <= e.length - 1; s++)(v.x = e[s].x * _), (v.y = e[s].y), (v.z = e[s].x * b), h.setXYZ(f, v.x, v.y, v.z), (g.x = a / t), (g.y = s / (e.length - 1)), d.setXY(f, g.x, g.y), f++; } for (a = 0; t > a; a++) for (s = 0; s < e.length - 1; s++) { o = s + a * e.length; var x = o, w = o + e.length, M = o + e.length + 1, T = o + 1; u.setX(p, x), p++, u.setX(p, w), p++, u.setX(p, T), p++, u.setX(p, w), p++, u.setX(p, M), p++, u.setX(p, T), p++; } if ((this.setIndex(u), this.addAttribute("position", h), this.addAttribute("uv", d), this.computeVertexNormals(), r === 2 * Math.PI)) { var S = this.attributes.normal.array, E = new n.Vector3(), A = new n.Vector3(), C = new n.Vector3(); for (o = t * e.length * 3, a = 0, s = 0; a < e.length; a++, s += 3) (E.x = S[s + 0]), (E.y = S[s + 1]), (E.z = S[s + 2]), (A.x = S[o + s + 0]), (A.y = S[o + s + 1]), (A.z = S[o + s + 2]), C.addVectors(E, A).normalize(), (S[s + 0] = S[o + s + 0] = C.x), (S[s + 1] = S[o + s + 1] = C.y), (S[s + 2] = S[o + s + 2] = C.z); } }), (n.LatheBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.LatheBufferGeometry.prototype.constructor = n.LatheBufferGeometry), (n.LatheGeometry = function (e, t, i, r) { n.Geometry.call(this), (this.type = "LatheGeometry"), (this.parameters = { points: e, segments: t, phiStart: i, phiLength: r }), this.fromBufferGeometry(new n.LatheBufferGeometry(e, t, i, r)), this.mergeVertices(); }), (n.LatheGeometry.prototype = Object.create(n.Geometry.prototype)), (n.LatheGeometry.prototype.constructor = n.LatheGeometry), (n.PlaneGeometry = function (e, t, i, r) { n.Geometry.call(this), (this.type = "PlaneGeometry"), (this.parameters = { width: e, height: t, widthSegments: i, heightSegments: r }), this.fromBufferGeometry(new n.PlaneBufferGeometry(e, t, i, r)); }), (n.PlaneGeometry.prototype = Object.create(n.Geometry.prototype)), (n.PlaneGeometry.prototype.constructor = n.PlaneGeometry), (n.PlaneBufferGeometry = function (e, t, i, r) { n.BufferGeometry.call(this), (this.type = "PlaneBufferGeometry"), (this.parameters = { width: e, height: t, widthSegments: i, heightSegments: r }); for ( var o = e / 2, a = t / 2, s = Math.floor(i) || 1, l = Math.floor(r) || 1, c = s + 1, u = l + 1, h = e / s, d = t / l, f = new Float32Array(c * u * 3), p = new Float32Array(c * u * 3), m = new Float32Array(c * u * 2), v = 0, g = 0, y = 0; u > y; y++ ) for (var _ = y * d - a, b = 0; c > b; b++) { var x = b * h - o; (f[v] = x), (f[v + 1] = -_), (p[v + 2] = 1), (m[g] = b / s), (m[g + 1] = 1 - y / l), (v += 3), (g += 2); } v = 0; for (var w = new(f.length / 3 > 65535 ? Uint32Array : Uint16Array)(s * l * 6), y = 0; l > y; y++) for (var b = 0; s > b; b++) { var M = b + c * y, T = b + c * (y + 1), S = b + 1 + c * (y + 1), E = b + 1 + c * y; (w[v] = M), (w[v + 1] = T), (w[v + 2] = E), (w[v + 3] = T), (w[v + 4] = S), (w[v + 5] = E), (v += 6); } this.setIndex(new n.BufferAttribute(w, 1)), this.addAttribute("position", new n.BufferAttribute(f, 3)), this.addAttribute("normal", new n.BufferAttribute(p, 3)), this.addAttribute("uv", new n.BufferAttribute(m, 2)); }), (n.PlaneBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.PlaneBufferGeometry.prototype.constructor = n.PlaneBufferGeometry), (n.RingBufferGeometry = function (e, t, i, r, o, a) { n.BufferGeometry.call(this), (this.type = "RingBufferGeometry"), (this.parameters = { innerRadius: e, outerRadius: t, thetaSegments: i, phiSegments: r, thetaStart: o, thetaLength: a }), (e = e || 20), (t = t || 50), (o = void 0 !== o ? o : 0), (a = void 0 !== a ? a : 2 * Math.PI), (i = void 0 !== i ? Math.max(3, i) : 8), (r = void 0 !== r ? Math.max(1, r) : 1); var s, l, c, u = (i + 1) * (r + 1), h = i * r * 2 * 3, d = new n.BufferAttribute(new(h > 65535 ? Uint32Array : Uint16Array)(h), 1), f = new n.BufferAttribute(new Float32Array(3 * u), 3), p = new n.BufferAttribute(new Float32Array(3 * u), 3), m = new n.BufferAttribute(new Float32Array(2 * u), 2), v = 0, g = 0, y = e, _ = (t - e) / r, b = new n.Vector3(), x = new n.Vector2(); for (l = 0; r >= l; l++) { for (c = 0; i >= c; c++) (s = o + (c / i) * a), (b.x = y * Math.cos(s)), (b.y = y * Math.sin(s)), f.setXYZ(v, b.x, b.y, b.z), p.setXYZ(v, 0, 0, 1), (x.x = (b.x / t + 1) / 2), (x.y = (b.y / t + 1) / 2), m.setXY(v, x.x, x.y), v++; y += _; } for (l = 0; r > l; l++) { var w = l * (i + 1); for (c = 0; i > c; c++) { s = c + w; var M = s, T = s + i + 1, S = s + i + 2, E = s + 1; d.setX(g, M), g++, d.setX(g, T), g++, d.setX(g, S), g++, d.setX(g, M), g++, d.setX(g, S), g++, d.setX(g, E), g++; } } this.setIndex(d), this.addAttribute("position", f), this.addAttribute("normal", p), this.addAttribute("uv", m); }), (n.RingBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.RingBufferGeometry.prototype.constructor = n.RingBufferGeometry), (n.RingGeometry = function (e, t, i, r, o, a) { n.Geometry.call(this), (this.type = "RingGeometry"), (this.parameters = { innerRadius: e, outerRadius: t, thetaSegments: i, phiSegments: r, thetaStart: o, thetaLength: a }), this.fromBufferGeometry(new n.RingBufferGeometry(e, t, i, r, o, a)); }), (n.RingGeometry.prototype = Object.create(n.Geometry.prototype)), (n.RingGeometry.prototype.constructor = n.RingGeometry), (n.SphereGeometry = function (e, t, i, r, o, a, s) { n.Geometry.call(this), (this.type = "SphereGeometry"), (this.parameters = { radius: e, widthSegments: t, heightSegments: i, phiStart: r, phiLength: o, thetaStart: a, thetaLength: s }), this.fromBufferGeometry(new n.SphereBufferGeometry(e, t, i, r, o, a, s)); }), (n.SphereGeometry.prototype = Object.create(n.Geometry.prototype)), (n.SphereGeometry.prototype.constructor = n.SphereGeometry), (n.SphereBufferGeometry = function (e, t, i, r, o, a, s) { n.BufferGeometry.call(this), (this.type = "SphereBufferGeometry"), (this.parameters = { radius: e, widthSegments: t, heightSegments: i, phiStart: r, phiLength: o, thetaStart: a, thetaLength: s }), (e = e || 50), (t = Math.max(3, Math.floor(t) || 8)), (i = Math.max(2, Math.floor(i) || 6)), (r = void 0 !== r ? r : 0), (o = void 0 !== o ? o : 2 * Math.PI), (a = void 0 !== a ? a : 0), (s = void 0 !== s ? s : Math.PI); for ( var l = a + s, c = (t + 1) * (i + 1), u = new n.BufferAttribute(new Float32Array(3 * c), 3), h = new n.BufferAttribute(new Float32Array(3 * c), 3), d = new n.BufferAttribute(new Float32Array(2 * c), 2), f = 0, p = [], m = new n.Vector3(), v = 0; i >= v; v++ ) { for (var g = [], y = v / i, _ = 0; t >= _; _++) { var b = _ / t, x = -e * Math.cos(r + b * o) * Math.sin(a + y * s), w = e * Math.cos(a + y * s), M = e * Math.sin(r + b * o) * Math.sin(a + y * s); m.set(x, w, M).normalize(), u.setXYZ(f, x, w, M), h.setXYZ(f, m.x, m.y, m.z), d.setXY(f, b, 1 - y), g.push(f), f++; } p.push(g); } for (var T = [], v = 0; i > v; v++) for (var _ = 0; t > _; _++) { var S = p[v][_ + 1], E = p[v][_], A = p[v + 1][_], C = p[v + 1][_ + 1]; (0 !== v || a > 0) && T.push(S, E, C), (v !== i - 1 || l < Math.PI) && T.push(E, A, C); } this.setIndex(new(u.count > 65535 ? n.Uint32Attribute : n.Uint16Attribute)(T, 1)), this.addAttribute("position", u), this.addAttribute("normal", h), this.addAttribute("uv", d), (this.boundingSphere = new n.Sphere(new n.Vector3(), e)); }), (n.SphereBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.SphereBufferGeometry.prototype.constructor = n.SphereBufferGeometry), (n.TextGeometry = function (e, t) { t = t || {}; var i = t.font; if (i instanceof n.Font == !1) return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."), new n.Geometry(); var r = i.generateShapes(e, t.size, t.curveSegments); (t.amount = void 0 !== t.height ? t.height : 50), void 0 === t.bevelThickness && (t.bevelThickness = 10), void 0 === t.bevelSize && (t.bevelSize = 8), void 0 === t.bevelEnabled && (t.bevelEnabled = !1), n.ExtrudeGeometry.call(this, r, t), (this.type = "TextGeometry"); }), (n.TextGeometry.prototype = Object.create(n.ExtrudeGeometry.prototype)), (n.TextGeometry.prototype.constructor = n.TextGeometry), (n.TorusBufferGeometry = function (e, t, i, r, o) { n.BufferGeometry.call(this), (this.type = "TorusBufferGeometry"), (this.parameters = { radius: e, tube: t, radialSegments: i, tubularSegments: r, arc: o }), (e = e || 100), (t = t || 40), (i = Math.floor(i) || 8), (r = Math.floor(r) || 6), (o = o || 2 * Math.PI); var a, s, l = (i + 1) * (r + 1), c = i * r * 2 * 3, u = new(c > 65535 ? Uint32Array : Uint16Array)(c), h = new Float32Array(3 * l), d = new Float32Array(3 * l), f = new Float32Array(2 * l), p = 0, m = 0, v = 0, g = new n.Vector3(), y = new n.Vector3(), _ = new n.Vector3(); for (a = 0; i >= a; a++) for (s = 0; r >= s; s++) { var b = (s / r) * o, x = (a / i) * Math.PI * 2; (y.x = (e + t * Math.cos(x)) * Math.cos(b)), (y.y = (e + t * Math.cos(x)) * Math.sin(b)), (y.z = t * Math.sin(x)), (h[p] = y.x), (h[p + 1] = y.y), (h[p + 2] = y.z), (g.x = e * Math.cos(b)), (g.y = e * Math.sin(b)), _.subVectors(y, g).normalize(), (d[p] = _.x), (d[p + 1] = _.y), (d[p + 2] = _.z), (f[m] = s / r), (f[m + 1] = a / i), (p += 3), (m += 2); } for (a = 1; i >= a; a++) for (s = 1; r >= s; s++) { var w = (r + 1) * a + s - 1, M = (r + 1) * (a - 1) + s - 1, T = (r + 1) * (a - 1) + s, S = (r + 1) * a + s; (u[v] = w), (u[v + 1] = M), (u[v + 2] = S), (u[v + 3] = M), (u[v + 4] = T), (u[v + 5] = S), (v += 6); } this.setIndex(new n.BufferAttribute(u, 1)), this.addAttribute("position", new n.BufferAttribute(h, 3)), this.addAttribute("normal", new n.BufferAttribute(d, 3)), this.addAttribute("uv", new n.BufferAttribute(f, 2)); }), (n.TorusBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.TorusBufferGeometry.prototype.constructor = n.TorusBufferGeometry), (n.TorusGeometry = function (e, t, i, r, o) { n.Geometry.call(this), (this.type = "TorusGeometry"), (this.parameters = { radius: e, tube: t, radialSegments: i, tubularSegments: r, arc: o }), this.fromBufferGeometry(new n.TorusBufferGeometry(e, t, i, r, o)); }), (n.TorusGeometry.prototype = Object.create(n.Geometry.prototype)), (n.TorusGeometry.prototype.constructor = n.TorusGeometry), (n.TorusKnotBufferGeometry = function (e, t, i, r, o, a) { function s(e, t, i, n, r) { var o = Math.cos(e), a = Math.sin(e), s = (i / t) * e, l = Math.cos(s); (r.x = n * (2 + l) * 0.5 * o), (r.y = n * (2 + l) * a * 0.5), (r.z = n * Math.sin(s) * 0.5); } n.BufferGeometry.call(this), (this.type = "TorusKnotBufferGeometry"), (this.parameters = { radius: e, tube: t, tubularSegments: i, radialSegments: r, p: o, q: a }), (e = e || 100), (t = t || 40), (i = Math.floor(i) || 64), (r = Math.floor(r) || 8), (o = o || 2), (a = a || 3); var l, c, u = (r + 1) * (i + 1), h = r * i * 2 * 3, d = new n.BufferAttribute(new(h > 65535 ? Uint32Array : Uint16Array)(h), 1), f = new n.BufferAttribute(new Float32Array(3 * u), 3), p = new n.BufferAttribute(new Float32Array(3 * u), 3), m = new n.BufferAttribute(new Float32Array(2 * u), 2), v = 0, g = 0, y = new n.Vector3(), _ = new n.Vector3(), b = new n.Vector2(), x = new n.Vector3(), w = new n.Vector3(), M = new n.Vector3(), T = new n.Vector3(), S = new n.Vector3(); for (l = 0; i >= l; ++l) { var E = (l / i) * o * Math.PI * 2; for (s(E, o, a, e, x), s(E + 0.01, o, a, e, w), T.subVectors(w, x), S.addVectors(w, x), M.crossVectors(T, S), S.crossVectors(M, T), M.normalize(), S.normalize(), c = 0; r >= c; ++c) { var A = (c / r) * Math.PI * 2, C = -t * Math.cos(A), P = t * Math.sin(A); (y.x = x.x + (C * S.x + P * M.x)), (y.y = x.y + (C * S.y + P * M.y)), (y.z = x.z + (C * S.z + P * M.z)), f.setXYZ(v, y.x, y.y, y.z), _.subVectors(y, x).normalize(), p.setXYZ(v, _.x, _.y, _.z), (b.x = l / i), (b.y = c / r), m.setXY(v, b.x, b.y), v++; } } for (c = 1; i >= c; c++) for (l = 1; r >= l; l++) { var L = (r + 1) * (c - 1) + (l - 1), R = (r + 1) * c + (l - 1), O = (r + 1) * c + l, k = (r + 1) * (c - 1) + l; d.setX(g, L), g++, d.setX(g, R), g++, d.setX(g, k), g++, d.setX(g, R), g++, d.setX(g, O), g++, d.setX(g, k), g++; } this.setIndex(d), this.addAttribute("position", f), this.addAttribute("normal", p), this.addAttribute("uv", m); }), (n.TorusKnotBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.TorusKnotBufferGeometry.prototype.constructor = n.TorusKnotBufferGeometry), (n.TorusKnotGeometry = function (e, t, i, r, o, a, s) { n.Geometry.call(this), (this.type = "TorusKnotGeometry"), (this.parameters = { radius: e, tube: t, tubularSegments: i, radialSegments: r, p: o, q: a }), void 0 !== s && console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."), this.fromBufferGeometry(new n.TorusKnotBufferGeometry(e, t, i, r, o, a)), this.mergeVertices(); }), (n.TorusKnotGeometry.prototype = Object.create(n.Geometry.prototype)), (n.TorusKnotGeometry.prototype.constructor = n.TorusKnotGeometry), (n.TubeGeometry = function (e, t, i, r, o, a) { function s(e, t, i) { return L.vertices.push(new n.Vector3(e, t, i)) - 1; } n.Geometry.call(this), (this.type = "TubeGeometry"), (this.parameters = { path: e, segments: t, radius: i, radialSegments: r, closed: o, taper: a }), (t = t || 64), (i = i || 1), (r = r || 8), (o = o || !1), (a = a || n.TubeGeometry.NoTaper); var l, c, u, h, d, f, p, m, v, g, y, _, b, x, w, M, T, S, E, A, C, P = [], L = this, R = t + 1, O = new n.Vector3(), k = new n.TubeGeometry.FrenetFrames(e, t, o), D = k.tangents, I = k.normals, N = k.binormals; for (this.tangents = D, this.normals = I, this.binormals = N, g = 0; R > g; g++) for (P[g] = [], h = g / (R - 1), v = e.getPointAt(h), l = D[g], c = I[g], u = N[g], f = i * a(h), y = 0; r > y; y++) (d = (y / r) * 2 * Math.PI), (p = -f * Math.cos(d)), (m = f * Math.sin(d)), O.copy(v), (O.x += p * c.x + m * u.x), (O.y += p * c.y + m * u.y), (O.z += p * c.z + m * u.z), (P[g][y] = s(O.x, O.y, O.z)); for (g = 0; t > g; g++) for (y = 0; r > y; y++) (_ = o ? (g + 1) % t : g + 1), (b = (y + 1) % r), (x = P[g][y]), (w = P[_][y]), (M = P[_][b]), (T = P[g][b]), (S = new n.Vector2(g / t, y / r)), (E = new n.Vector2((g + 1) / t, y / r)), (A = new n.Vector2((g + 1) / t, (y + 1) / r)), (C = new n.Vector2(g / t, (y + 1) / r)), this.faces.push(new n.Face3(x, w, T)), this.faceVertexUvs[0].push([S, E, C]), this.faces.push(new n.Face3(w, M, T)), this.faceVertexUvs[0].push([E.clone(), A, C.clone()]); this.computeFaceNormals(), this.computeVertexNormals(); }), (n.TubeGeometry.prototype = Object.create(n.Geometry.prototype)), (n.TubeGeometry.prototype.constructor = n.TubeGeometry), (n.TubeGeometry.NoTaper = function (e) { return 1; }), (n.TubeGeometry.SinusoidalTaper = function (e) { return Math.sin(Math.PI * e); }), (n.TubeGeometry.FrenetFrames = function (e, t, i) { function r() { (p[0] = new n.Vector3()), (m[0] = new n.Vector3()), (a = Number.MAX_VALUE), (s = Math.abs(f[0].x)), (l = Math.abs(f[0].y)), (c = Math.abs(f[0].z)), a >= s && ((a = s), d.set(1, 0, 0)), a >= l && ((a = l), d.set(0, 1, 0)), a >= c && d.set(0, 0, 1), v.crossVectors(f[0], d).normalize(), p[0].crossVectors(f[0], v), m[0].crossVectors(f[0], p[0]); } var o, a, s, l, c, u, h, d = new n.Vector3(), f = [], p = [], m = [], v = new n.Vector3(), g = new n.Matrix4(), y = t + 1; for (this.tangents = f, this.normals = p, this.binormals = m, u = 0; y > u; u++)(h = u / (y - 1)), (f[u] = e.getTangentAt(h)), f[u].normalize(); for (r(), u = 1; y > u; u++) (p[u] = p[u - 1].clone()), (m[u] = m[u - 1].clone()), v.crossVectors(f[u - 1], f[u]), v.length() > Number.EPSILON && (v.normalize(), (o = Math.acos(n.Math.clamp(f[u - 1].dot(f[u]), -1, 1))), p[u].applyMatrix4(g.makeRotationAxis(v, o))), m[u].crossVectors(f[u], p[u]); if (i) for (o = Math.acos(n.Math.clamp(p[0].dot(p[y - 1]), -1, 1)), o /= y - 1, f[0].dot(v.crossVectors(p[0], p[y - 1])) > 0 && (o = -o), u = 1; y > u; u++) p[u].applyMatrix4(g.makeRotationAxis(f[u], o * u)), m[u].crossVectors(f[u], p[u]); }), (n.PolyhedronGeometry = function (e, t, i, r) { function o(e) { var t = e.normalize().clone(); t.index = h.vertices.push(t) - 1; var i = l(e) / 2 / Math.PI + 0.5, r = c(e) / Math.PI + 0.5; return (t.uv = new n.Vector2(i, 1 - r)), t; } function a(e, t, i) { var r = new n.Face3(e.index, t.index, i.index, [e.clone(), t.clone(), i.clone()]); h.faces.push(r), b.copy(e).add(t).add(i).divideScalar(3); var o = l(b); h.faceVertexUvs[0].push([u(e.uv, e, o), u(t.uv, t, o), u(i.uv, i, o)]); } function s(e, t) { for (var i = Math.pow(2, t), n = o(h.vertices[e.a]), r = o(h.vertices[e.b]), s = o(h.vertices[e.c]), l = [], c = 0; i >= c; c++) { l[c] = []; for (var u = o(n.clone().lerp(s, c / i)), d = o(r.clone().lerp(s, c / i)), f = i - c, p = 0; f >= p; p++) 0 === p && c === i ? (l[c][p] = u) : (l[c][p] = o(u.clone().lerp(d, p / f))); } for (var c = 0; i > c; c++) for (var p = 0; 2 * (i - c) - 1 > p; p++) { var m = Math.floor(p / 2); p % 2 === 0 ? a(l[c][m + 1], l[c + 1][m], l[c][m]) : a(l[c][m + 1], l[c + 1][m + 1], l[c + 1][m]); } } function l(e) { return Math.atan2(e.z, -e.x); } function c(e) { return Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)); } function u(e, t, i) { return 0 > i && 1 === e.x && (e = new n.Vector2(e.x - 1, e.y)), 0 === t.x && 0 === t.z && (e = new n.Vector2(i / 2 / Math.PI + 0.5, e.y)), e.clone(); } n.Geometry.call(this), (this.type = "PolyhedronGeometry"), (this.parameters = { vertices: e, indices: t, radius: i, detail: r }), (i = i || 1), (r = r || 0); for (var h = this, d = 0, f = e.length; f > d; d += 3) o(new n.Vector3(e[d], e[d + 1], e[d + 2])); for (var p = this.vertices, m = [], d = 0, v = 0, f = t.length; f > d; d += 3, v++) { var g = p[t[d]], y = p[t[d + 1]], _ = p[t[d + 2]]; m[v] = new n.Face3(g.index, y.index, _.index, [g.clone(), y.clone(), _.clone()]); } for (var b = new n.Vector3(), d = 0, f = m.length; f > d; d++) s(m[d], r); for (var d = 0, f = this.faceVertexUvs[0].length; f > d; d++) { var x = this.faceVertexUvs[0][d], w = x[0].x, M = x[1].x, T = x[2].x, S = Math.max(w, M, T), E = Math.min(w, M, T); S > 0.9 && 0.1 > E && (0.2 > w && (x[0].x += 1), 0.2 > M && (x[1].x += 1), 0.2 > T && (x[2].x += 1)); } for (var d = 0, f = this.vertices.length; f > d; d++) this.vertices[d].multiplyScalar(i); this.mergeVertices(), this.computeFaceNormals(), (this.boundingSphere = new n.Sphere(new n.Vector3(), i)); }), (n.PolyhedronGeometry.prototype = Object.create(n.Geometry.prototype)), (n.PolyhedronGeometry.prototype.constructor = n.PolyhedronGeometry), (n.DodecahedronGeometry = function (e, t) { var i = (1 + Math.sqrt(5)) / 2, r = 1 / i, o = [-1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -r, -i, 0, -r, i, 0, r, -i, 0, r, i, -r, -i, 0, -r, i, 0, r, -i, 0, r, i, 0, -i, 0, -r, i, 0, -r, -i, 0, r, i, 0, r], a = [ 3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9, ]; n.PolyhedronGeometry.call(this, o, a, e, t), (this.type = "DodecahedronGeometry"), (this.parameters = { radius: e, detail: t }); }), (n.DodecahedronGeometry.prototype = Object.create(n.PolyhedronGeometry.prototype)), (n.DodecahedronGeometry.prototype.constructor = n.DodecahedronGeometry), (n.IcosahedronGeometry = function (e, t) { var i = (1 + Math.sqrt(5)) / 2, r = [-1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, 0, 0, -1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, i, 0, -1, i, 0, 1, -i, 0, -1, -i, 0, 1], o = [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1]; n.PolyhedronGeometry.call(this, r, o, e, t), (this.type = "IcosahedronGeometry"), (this.parameters = { radius: e, detail: t }); }), (n.IcosahedronGeometry.prototype = Object.create(n.PolyhedronGeometry.prototype)), (n.IcosahedronGeometry.prototype.constructor = n.IcosahedronGeometry), (n.OctahedronGeometry = function (e, t) { var i = [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], r = [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2]; n.PolyhedronGeometry.call(this, i, r, e, t), (this.type = "OctahedronGeometry"), (this.parameters = { radius: e, detail: t }); }), (n.OctahedronGeometry.prototype = Object.create(n.PolyhedronGeometry.prototype)), (n.OctahedronGeometry.prototype.constructor = n.OctahedronGeometry), (n.TetrahedronGeometry = function (e, t) { var i = [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], r = [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1]; n.PolyhedronGeometry.call(this, i, r, e, t), (this.type = "TetrahedronGeometry"), (this.parameters = { radius: e, detail: t }); }), (n.TetrahedronGeometry.prototype = Object.create(n.PolyhedronGeometry.prototype)), (n.TetrahedronGeometry.prototype.constructor = n.TetrahedronGeometry), (n.ParametricGeometry = function (e, t, i) { n.Geometry.call(this), (this.type = "ParametricGeometry"), (this.parameters = { func: e, slices: t, stacks: i }); var r, o, a, s, l, c = this.vertices, u = this.faces, h = this.faceVertexUvs[0], d = t + 1; for (r = 0; i >= r; r++) for (l = r / i, o = 0; t >= o; o++)(s = o / t), (a = e(s, l)), c.push(a); var f, p, m, v, g, y, _, b; for (r = 0; i > r; r++) for (o = 0; t > o; o++) (f = r * d + o), (p = r * d + o + 1), (m = (r + 1) * d + o + 1), (v = (r + 1) * d + o), (g = new n.Vector2(o / t, r / i)), (y = new n.Vector2((o + 1) / t, r / i)), (_ = new n.Vector2((o + 1) / t, (r + 1) / i)), (b = new n.Vector2(o / t, (r + 1) / i)), u.push(new n.Face3(f, p, v)), h.push([g, y, b]), u.push(new n.Face3(p, m, v)), h.push([y.clone(), _, b.clone()]); this.computeFaceNormals(), this.computeVertexNormals(); }), (n.ParametricGeometry.prototype = Object.create(n.Geometry.prototype)), (n.ParametricGeometry.prototype.constructor = n.ParametricGeometry), (n.WireframeGeometry = function (e) { function t(e, t) { return e - t; } n.BufferGeometry.call(this); var i = [0, 0], r = {}, o = ["a", "b", "c"]; if (e instanceof n.Geometry) { for (var a = e.vertices, s = e.faces, l = 0, c = new Uint32Array(6 * s.length), u = 0, h = s.length; h > u; u++) for (var d = s[u], f = 0; 3 > f; f++) { (i[0] = d[o[f]]), (i[1] = d[o[(f + 1) % 3]]), i.sort(t); var p = i.toString(); void 0 === r[p] && ((c[2 * l] = i[0]), (c[2 * l + 1] = i[1]), (r[p] = !0), l++); } for (var m = new Float32Array(2 * l * 3), u = 0, h = l; h > u; u++) for (var f = 0; 2 > f; f++) { var v = a[c[2 * u + f]], g = 6 * u + 3 * f; (m[g + 0] = v.x), (m[g + 1] = v.y), (m[g + 2] = v.z); } this.addAttribute("position", new n.BufferAttribute(m, 3)); } else if (e instanceof n.BufferGeometry) if (null !== e.index) { var y = e.index.array, a = e.attributes.position, _ = e.groups, l = 0; 0 === _.length && e.addGroup(0, y.length); for (var c = new Uint32Array(2 * y.length), b = 0, x = _.length; x > b; ++b) for (var w = _[b], M = w.start, T = w.count, u = M, S = M + T; S > u; u += 3) for (var f = 0; 3 > f; f++) { (i[0] = y[u + f]), (i[1] = y[u + ((f + 1) % 3)]), i.sort(t); var p = i.toString(); void 0 === r[p] && ((c[2 * l] = i[0]), (c[2 * l + 1] = i[1]), (r[p] = !0), l++); } for (var m = new Float32Array(2 * l * 3), u = 0, h = l; h > u; u++) for (var f = 0; 2 > f; f++) { var g = 6 * u + 3 * f, E = c[2 * u + f]; (m[g + 0] = a.getX(E)), (m[g + 1] = a.getY(E)), (m[g + 2] = a.getZ(E)); } this.addAttribute("position", new n.BufferAttribute(m, 3)); } else { for (var a = e.attributes.position.array, l = a.length / 3, A = l / 3, m = new Float32Array(2 * l * 3), u = 0, h = A; h > u; u++) for (var f = 0; 3 > f; f++) { var g = 18 * u + 6 * f, C = 9 * u + 3 * f; (m[g + 0] = a[C]), (m[g + 1] = a[C + 1]), (m[g + 2] = a[C + 2]); var E = 9 * u + 3 * ((f + 1) % 3); (m[g + 3] = a[E]), (m[g + 4] = a[E + 1]), (m[g + 5] = a[E + 2]); } this.addAttribute("position", new n.BufferAttribute(m, 3)); } }), (n.WireframeGeometry.prototype = Object.create(n.BufferGeometry.prototype)), (n.WireframeGeometry.prototype.constructor = n.WireframeGeometry), (n.AxisHelper = function (e) { e = e || 1; var t = new Float32Array([0, 0, 0, e, 0, 0, 0, 0, 0, 0, e, 0, 0, 0, 0, 0, 0, e]), i = new Float32Array([1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, 1]), r = new n.BufferGeometry(); r.addAttribute("position", new n.BufferAttribute(t, 3)), r.addAttribute("color", new n.BufferAttribute(i, 3)); var o = new n.LineBasicMaterial({ vertexColors: n.VertexColors }); n.LineSegments.call(this, r, o); }), (n.AxisHelper.prototype = Object.create(n.LineSegments.prototype)), (n.AxisHelper.prototype.constructor = n.AxisHelper), (n.ArrowHelper = (function () { var e = new n.BufferGeometry(); e.addAttribute("position", new n.Float32Attribute([0, 0, 0, 0, 1, 0], 3)); var t = new n.CylinderBufferGeometry(0, 0.5, 1, 5, 1); return ( t.translate(0, -0.5, 0), function (i, r, o, a, s, l) { n.Object3D.call(this), void 0 === a && (a = 16776960), void 0 === o && (o = 1), void 0 === s && (s = 0.2 * o), void 0 === l && (l = 0.2 * s), this.position.copy(r), (this.line = new n.Line(e, new n.LineBasicMaterial({ color: a }))), (this.line.matrixAutoUpdate = !1), this.add(this.line), (this.cone = new n.Mesh(t, new n.MeshBasicMaterial({ color: a }))), (this.cone.matrixAutoUpdate = !1), this.add(this.cone), this.setDirection(i), this.setLength(o, s, l); } ); })()), (n.ArrowHelper.prototype = Object.create(n.Object3D.prototype)), (n.ArrowHelper.prototype.constructor = n.ArrowHelper), (n.ArrowHelper.prototype.setDirection = (function () { var e, t = new n.Vector3(); return function (i) { i.y > 0.99999 ? this.quaternion.set(0, 0, 0, 1) : i.y < -0.99999 ? this.quaternion.set(1, 0, 0, 0) : (t.set(i.z, 0, -i.x).normalize(), (e = Math.acos(i.y)), this.quaternion.setFromAxisAngle(t, e)); }; })()), (n.ArrowHelper.prototype.setLength = function (e, t, i) { void 0 === t && (t = 0.2 * e), void 0 === i && (i = 0.2 * t), this.line.scale.set(1, Math.max(0, e - t), 1), this.line.updateMatrix(), this.cone.scale.set(i, t, i), (this.cone.position.y = e), this.cone.updateMatrix(); }), (n.ArrowHelper.prototype.setColor = function (e) { this.line.material.color.copy(e), this.cone.material.color.copy(e); }), (n.BoxHelper = function (e, t) { void 0 === t && (t = 16776960); var i = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), r = new Float32Array(24), o = new n.BufferGeometry(); o.setIndex(new n.BufferAttribute(i, 1)), o.addAttribute("position", new n.BufferAttribute(r, 3)), n.LineSegments.call(this, o, new n.LineBasicMaterial({ color: t })), void 0 !== e && this.update(e); }), (n.BoxHelper.prototype = Object.create(n.LineSegments.prototype)), (n.BoxHelper.prototype.constructor = n.BoxHelper), (n.BoxHelper.prototype.update = (function () { var e = new n.Box3(); return function (t) { if ((t instanceof n.Box3 ? e.copy(t) : e.setFromObject(t), !e.isEmpty())) { var i = e.min, r = e.max, o = this.geometry.attributes.position, a = o.array; (a[0] = r.x), (a[1] = r.y), (a[2] = r.z), (a[3] = i.x), (a[4] = r.y), (a[5] = r.z), (a[6] = i.x), (a[7] = i.y), (a[8] = r.z), (a[9] = r.x), (a[10] = i.y), (a[11] = r.z), (a[12] = r.x), (a[13] = r.y), (a[14] = i.z), (a[15] = i.x), (a[16] = r.y), (a[17] = i.z), (a[18] = i.x), (a[19] = i.y), (a[20] = i.z), (a[21] = r.x), (a[22] = i.y), (a[23] = i.z), (o.needsUpdate = !0), this.geometry.computeBoundingSphere(); } }; })()), (n.BoundingBoxHelper = function (e, t) { var i = void 0 !== t ? t : 8947848; (this.object = e), (this.box = new n.Box3()), n.Mesh.call(this, new n.BoxGeometry(1, 1, 1), new n.MeshBasicMaterial({ color: i, wireframe: !0 })); }), (n.BoundingBoxHelper.prototype = Object.create(n.Mesh.prototype)), (n.BoundingBoxHelper.prototype.constructor = n.BoundingBoxHelper), (n.BoundingBoxHelper.prototype.update = function () { this.box.setFromObject(this.object), this.box.size(this.scale), this.box.center(this.position); }), (n.CameraHelper = function (e) { function t(e, t, n) { i(e, n), i(t, n); } function i(e, t) { r.vertices.push(new n.Vector3()), r.colors.push(new n.Color(t)), void 0 === a[e] && (a[e] = []), a[e].push(r.vertices.length - 1); } var r = new n.Geometry(), o = new n.LineBasicMaterial({ color: 16777215, vertexColors: n.FaceColors }), a = {}, s = 16755200, l = 16711680, c = 43775, u = 16777215, h = 3355443; t("n1", "n2", s), t("n2", "n4", s), t("n4", "n3", s), t("n3", "n1", s), t("f1", "f2", s), t("f2", "f4", s), t("f4", "f3", s), t("f3", "f1", s), t("n1", "f1", s), t("n2", "f2", s), t("n3", "f3", s), t("n4", "f4", s), t("p", "n1", l), t("p", "n2", l), t("p", "n3", l), t("p", "n4", l), t("u1", "u2", c), t("u2", "u3", c), t("u3", "u1", c), t("c", "t", u), t("p", "c", h), t("cn1", "cn2", h), t("cn3", "cn4", h), t("cf1", "cf2", h), t("cf3", "cf4", h), n.LineSegments.call(this, r, o), (this.camera = e), this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), (this.pointMap = a), this.update(); }), (n.CameraHelper.prototype = Object.create(n.LineSegments.prototype)), (n.CameraHelper.prototype.constructor = n.CameraHelper), (n.CameraHelper.prototype.update = (function () { function e(e, n, a, s) { r.set(n, a, s).unproject(o); var l = i[e]; if (void 0 !== l) for (var c = 0, u = l.length; u > c; c++) t.vertices[l[c]].copy(r); } var t, i, r = new n.Vector3(), o = new n.Camera(); return function () { (t = this.geometry), (i = this.pointMap); var n = 1, r = 1; o.projectionMatrix.copy(this.camera.projectionMatrix), e("c", 0, 0, -1), e("t", 0, 0, 1), e("n1", -n, -r, -1), e("n2", n, -r, -1), e("n3", -n, r, -1), e("n4", n, r, -1), e("f1", -n, -r, 1), e("f2", n, -r, 1), e("f3", -n, r, 1), e("f4", n, r, 1), e("u1", 0.7 * n, 1.1 * r, -1), e("u2", 0.7 * -n, 1.1 * r, -1), e("u3", 0, 2 * r, -1), e("cf1", -n, 0, 1), e("cf2", n, 0, 1), e("cf3", 0, -r, 1), e("cf4", 0, r, 1), e("cn1", -n, 0, -1), e("cn2", n, 0, -1), e("cn3", 0, -r, -1), e("cn4", 0, r, -1), (t.verticesNeedUpdate = !0); }; })()), (n.DirectionalLightHelper = function (e, t) { n.Object3D.call(this), (this.light = e), this.light.updateMatrixWorld(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), void 0 === t && (t = 1); var i = new n.BufferGeometry(); i.addAttribute("position", new n.Float32Attribute([-t, t, 0, t, t, 0, t, -t, 0, -t, -t, 0, -t, t, 0], 3)); var r = new n.LineBasicMaterial({ fog: !1 }); this.add(new n.Line(i, r)), (i = new n.BufferGeometry()), i.addAttribute("position", new n.Float32Attribute([0, 0, 0, 0, 0, 1], 3)), this.add(new n.Line(i, r)), this.update(); }), (n.DirectionalLightHelper.prototype = Object.create(n.Object3D.prototype)), (n.DirectionalLightHelper.prototype.constructor = n.DirectionalLightHelper), (n.DirectionalLightHelper.prototype.dispose = function () { var e = this.children[0], t = this.children[1]; e.geometry.dispose(), e.material.dispose(), t.geometry.dispose(), t.material.dispose(); }), (n.DirectionalLightHelper.prototype.update = (function () { var e = new n.Vector3(), t = new n.Vector3(), i = new n.Vector3(); return function () { e.setFromMatrixPosition(this.light.matrixWorld), t.setFromMatrixPosition(this.light.target.matrixWorld), i.subVectors(t, e); var n = this.children[0], r = this.children[1]; n.lookAt(i), n.material.color.copy(this.light.color).multiplyScalar(this.light.intensity), r.lookAt(i), (r.scale.z = i.length()); }; })()), (n.EdgesHelper = function (e, t, i) { var r = void 0 !== t ? t : 16777215; n.LineSegments.call(this, new n.EdgesGeometry(e.geometry, i), new n.LineBasicMaterial({ color: r })), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1); }), (n.EdgesHelper.prototype = Object.create(n.LineSegments.prototype)), (n.EdgesHelper.prototype.constructor = n.EdgesHelper), (n.FaceNormalsHelper = function (e, t, i, r) { (this.object = e), (this.size = void 0 !== t ? t : 1); var o = void 0 !== i ? i : 16776960, a = void 0 !== r ? r : 1, s = 0, l = this.object.geometry; l instanceof n.Geometry ? (s = l.faces.length) : console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."); var c = new n.BufferGeometry(), u = new n.Float32Attribute(2 * s * 3, 3); c.addAttribute("position", u), n.LineSegments.call(this, c, new n.LineBasicMaterial({ color: o, linewidth: a })), (this.matrixAutoUpdate = !1), this.update(); }), (n.FaceNormalsHelper.prototype = Object.create(n.LineSegments.prototype)), (n.FaceNormalsHelper.prototype.constructor = n.FaceNormalsHelper), (n.FaceNormalsHelper.prototype.update = (function () { var e = new n.Vector3(), t = new n.Vector3(), i = new n.Matrix3(); return function () { this.object.updateMatrixWorld(!0), i.getNormalMatrix(this.object.matrixWorld); for (var n = this.object.matrixWorld, r = this.geometry.attributes.position, o = this.object.geometry, a = o.vertices, s = o.faces, l = 0, c = 0, u = s.length; u > c; c++) { var h = s[c], d = h.normal; e.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(n), t.copy(d).applyMatrix3(i).normalize().multiplyScalar(this.size).add(e), r.setXYZ(l, e.x, e.y, e.z), (l += 1), r.setXYZ(l, t.x, t.y, t.z), (l += 1); } return (r.needsUpdate = !0), this; }; })()), (n.GridHelper = function (e, t, i, r) { (t = t || 1), (i = new n.Color(void 0 !== i ? i : 4473924)), (r = new n.Color(void 0 !== r ? r : 8947848)); for (var o = t / 2, a = (2 * e) / t, s = [], l = [], c = 0, u = 0, h = -e; t >= c; c++, h += a) { s.push(-e, 0, h, e, 0, h), s.push(h, 0, -e, h, 0, e); var d = c === o ? i : r; d.toArray(l, u), (u += 3), d.toArray(l, u), (u += 3), d.toArray(l, u), (u += 3), d.toArray(l, u), (u += 3); } var f = new n.BufferGeometry(); f.addAttribute("position", new n.Float32Attribute(s, 3)), f.addAttribute("color", new n.Float32Attribute(l, 3)); var p = new n.LineBasicMaterial({ vertexColors: n.VertexColors }); n.LineSegments.call(this, f, p); }), (n.GridHelper.prototype = Object.create(n.LineSegments.prototype)), (n.GridHelper.prototype.constructor = n.GridHelper), (n.GridHelper.prototype.setColors = function () { console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead."); }), (n.HemisphereLightHelper = function (e, t) { n.Object3D.call(this), (this.light = e), this.light.updateMatrixWorld(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), (this.colors = [new n.Color(), new n.Color()]); var i = new n.SphereGeometry(t, 4, 2); i.rotateX(-Math.PI / 2); for (var r = 0, o = 8; o > r; r++) i.faces[r].color = this.colors[4 > r ? 0 : 1]; var a = new n.MeshBasicMaterial({ vertexColors: n.FaceColors, wireframe: !0 }); (this.lightSphere = new n.Mesh(i, a)), this.add(this.lightSphere), this.update(); }), (n.HemisphereLightHelper.prototype = Object.create(n.Object3D.prototype)), (n.HemisphereLightHelper.prototype.constructor = n.HemisphereLightHelper), (n.HemisphereLightHelper.prototype.dispose = function () { this.lightSphere.geometry.dispose(), this.lightSphere.material.dispose(); }), (n.HemisphereLightHelper.prototype.update = (function () { var e = new n.Vector3(); return function () { this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity), this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity), this.lightSphere.lookAt(e.setFromMatrixPosition(this.light.matrixWorld).negate()), (this.lightSphere.geometry.colorsNeedUpdate = !0); }; })()), (n.PointLightHelper = function (e, t) { (this.light = e), this.light.updateMatrixWorld(); var i = new n.SphereBufferGeometry(t, 4, 2), r = new n.MeshBasicMaterial({ wireframe: !0, fog: !1 }); r.color.copy(this.light.color).multiplyScalar(this.light.intensity), n.Mesh.call(this, i, r), (this.matrix = this.light.matrixWorld), (this.matrixAutoUpdate = !1); }), (n.PointLightHelper.prototype = Object.create(n.Mesh.prototype)), (n.PointLightHelper.prototype.constructor = n.PointLightHelper), (n.PointLightHelper.prototype.dispose = function () { this.geometry.dispose(), this.material.dispose(); }), (n.PointLightHelper.prototype.update = function () { this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity); }), (n.SkeletonHelper = function (e) { this.bones = this.getBoneList(e); for (var t = new n.Geometry(), i = 0; i < this.bones.length; i++) { var r = this.bones[i]; r.parent instanceof n.Bone && (t.vertices.push(new n.Vector3()), t.vertices.push(new n.Vector3()), t.colors.push(new n.Color(0, 0, 1)), t.colors.push(new n.Color(0, 1, 0))); } t.dynamic = !0; var o = new n.LineBasicMaterial({ vertexColors: n.VertexColors, depthTest: !1, depthWrite: !1, transparent: !0 }); n.LineSegments.call(this, t, o), (this.root = e), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), this.update(); }), (n.SkeletonHelper.prototype = Object.create(n.LineSegments.prototype)), (n.SkeletonHelper.prototype.constructor = n.SkeletonHelper), (n.SkeletonHelper.prototype.getBoneList = function (e) { var t = []; e instanceof n.Bone && t.push(e); for (var i = 0; i < e.children.length; i++) t.push.apply(t, this.getBoneList(e.children[i])); return t; }), (n.SkeletonHelper.prototype.update = function () { for (var e = this.geometry, t = new n.Matrix4().getInverse(this.root.matrixWorld), i = new n.Matrix4(), r = 0, o = 0; o < this.bones.length; o++) { var a = this.bones[o]; a.parent instanceof n.Bone && (i.multiplyMatrices(t, a.matrixWorld), e.vertices[r].setFromMatrixPosition(i), i.multiplyMatrices(t, a.parent.matrixWorld), e.vertices[r + 1].setFromMatrixPosition(i), (r += 2)); } (e.verticesNeedUpdate = !0), e.computeBoundingSphere(); }), (n.SpotLightHelper = function (e) { n.Object3D.call(this), (this.light = e), this.light.updateMatrixWorld(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1); for (var t = new n.BufferGeometry(), i = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1], r = 0, o = 1, a = 32; a > r; r++, o++) { var s = (r / a) * Math.PI * 2, l = (o / a) * Math.PI * 2; i.push(Math.cos(s), Math.sin(s), 1, Math.cos(l), Math.sin(l), 1); } t.addAttribute("position", new n.Float32Attribute(i, 3)); var c = new n.LineBasicMaterial({ fog: !1 }); (this.cone = new n.LineSegments(t, c)), this.add(this.cone), this.update(); }), (n.SpotLightHelper.prototype = Object.create(n.Object3D.prototype)), (n.SpotLightHelper.prototype.constructor = n.SpotLightHelper), (n.SpotLightHelper.prototype.dispose = function () { this.cone.geometry.dispose(), this.cone.material.dispose(); }), (n.SpotLightHelper.prototype.update = (function () { var e = new n.Vector3(), t = new n.Vector3(); return function () { var i = this.light.distance ? this.light.distance : 1e3, n = i * Math.tan(this.light.angle); this.cone.scale.set(n, n, i), e.setFromMatrixPosition(this.light.matrixWorld), t.setFromMatrixPosition(this.light.target.matrixWorld), this.cone.lookAt(t.sub(e)), this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity); }; })()), (n.VertexNormalsHelper = function (e, t, i, r) { (this.object = e), (this.size = void 0 !== t ? t : 1); var o = void 0 !== i ? i : 16711680, a = void 0 !== r ? r : 1, s = 0, l = this.object.geometry; l instanceof n.Geometry ? (s = 3 * l.faces.length) : l instanceof n.BufferGeometry && (s = l.attributes.normal.count); var c = new n.BufferGeometry(), u = new n.Float32Attribute(2 * s * 3, 3); c.addAttribute("position", u), n.LineSegments.call(this, c, new n.LineBasicMaterial({ color: o, linewidth: a })), (this.matrixAutoUpdate = !1), this.update(); }), (n.VertexNormalsHelper.prototype = Object.create(n.LineSegments.prototype)), (n.VertexNormalsHelper.prototype.constructor = n.VertexNormalsHelper), (n.VertexNormalsHelper.prototype.update = (function () { var e = new n.Vector3(), t = new n.Vector3(), i = new n.Matrix3(); return function () { var r = ["a", "b", "c"]; this.object.updateMatrixWorld(!0), i.getNormalMatrix(this.object.matrixWorld); var o = this.object.matrixWorld, a = this.geometry.attributes.position, s = this.object.geometry; if (s instanceof n.Geometry) for (var l = s.vertices, c = s.faces, u = 0, h = 0, d = c.length; d > h; h++) for (var f = c[h], p = 0, m = f.vertexNormals.length; m > p; p++) { var v = l[f[r[p]]], g = f.vertexNormals[p]; e.copy(v).applyMatrix4(o), t.copy(g).applyMatrix3(i).normalize().multiplyScalar(this.size).add(e), a.setXYZ(u, e.x, e.y, e.z), (u += 1), a.setXYZ(u, t.x, t.y, t.z), (u += 1); } else if (s instanceof n.BufferGeometry) for (var y = s.attributes.position, _ = s.attributes.normal, u = 0, p = 0, m = y.count; m > p; p++) e.set(y.getX(p), y.getY(p), y.getZ(p)).applyMatrix4(o), t.set(_.getX(p), _.getY(p), _.getZ(p)), t.applyMatrix3(i).normalize().multiplyScalar(this.size).add(e), a.setXYZ(u, e.x, e.y, e.z), (u += 1), a.setXYZ(u, t.x, t.y, t.z), (u += 1); return (a.needsUpdate = !0), this; }; })()), (n.WireframeHelper = function (e, t) { var i = void 0 !== t ? t : 16777215; n.LineSegments.call(this, new n.WireframeGeometry(e.geometry), new n.LineBasicMaterial({ color: i })), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1); }), (n.WireframeHelper.prototype = Object.create(n.LineSegments.prototype)), (n.WireframeHelper.prototype.constructor = n.WireframeHelper), (n.ImmediateRenderObject = function (e) { n.Object3D.call(this), (this.material = e), (this.render = function (e) {}); }), (n.ImmediateRenderObject.prototype = Object.create(n.Object3D.prototype)), (n.ImmediateRenderObject.prototype.constructor = n.ImmediateRenderObject), (n.MorphBlendMesh = function (e, t) { n.Mesh.call(this, e, t), (this.animationsMap = {}), (this.animationsList = []); var i = this.geometry.morphTargets.length, r = "__default", o = 0, a = i - 1, s = i / 1; this.createAnimation(r, o, a, s), this.setAnimationWeight(r, 1); }), (n.MorphBlendMesh.prototype = Object.create(n.Mesh.prototype)), (n.MorphBlendMesh.prototype.constructor = n.MorphBlendMesh), (n.MorphBlendMesh.prototype.createAnimation = function (e, t, i, n) { var r = { start: t, end: i, length: i - t + 1, fps: n, duration: (i - t) / n, lastFrame: 0, currentFrame: 0, active: !1, time: 0, direction: 1, weight: 1, directionBackwards: !1, mirroredLoop: !1 }; (this.animationsMap[e] = r), this.animationsList.push(r); }), (n.MorphBlendMesh.prototype.autoCreateAnimations = function (e) { for (var t, i = /([a-z]+)_?(d+)/i, n = {}, r = this.geometry, o = 0, a = r.morphTargets.length; a > o; o++) { var s = r.morphTargets[o], l = s.name.match(i); if (l && l.length > 1) { var c = l[1]; n[c] || (n[c] = { start: 1 / 0, end: -(1 / 0) }); var u = n[c]; o < u.start && (u.start = o), o > u.end && (u.end = o), t || (t = c); } } for (var c in n) { var u = n[c]; this.createAnimation(c, u.start, u.end, e); } this.firstAnimation = t; }), (n.MorphBlendMesh.prototype.setAnimationDirectionForward = function (e) { var t = this.animationsMap[e]; t && ((t.direction = 1), (t.directionBackwards = !1)); }), (n.MorphBlendMesh.prototype.setAnimationDirectionBackward = function (e) { var t = this.animationsMap[e]; t && ((t.direction = -1), (t.directionBackwards = !0)); }), (n.MorphBlendMesh.prototype.setAnimationFPS = function (e, t) { var i = this.animationsMap[e]; i && ((i.fps = t), (i.duration = (i.end - i.start) / i.fps)); }), (n.MorphBlendMesh.prototype.setAnimationDuration = function (e, t) { var i = this.animationsMap[e]; i && ((i.duration = t), (i.fps = (i.end - i.start) / i.duration)); }), (n.MorphBlendMesh.prototype.setAnimationWeight = function (e, t) { var i = this.animationsMap[e]; i && (i.weight = t); }), (n.MorphBlendMesh.prototype.setAnimationTime = function (e, t) { var i = this.animationsMap[e]; i && (i.time = t); }), (n.MorphBlendMesh.prototype.getAnimationTime = function (e) { var t = 0, i = this.animationsMap[e]; return i && (t = i.time), t; }), (n.MorphBlendMesh.prototype.getAnimationDuration = function (e) { var t = -1, i = this.animationsMap[e]; return i && (t = i.duration), t; }), (n.MorphBlendMesh.prototype.playAnimation = function (e) { var t = this.animationsMap[e]; t ? ((t.time = 0), (t.active = !0)) : console.warn("THREE.MorphBlendMesh: animation[" + e + "] undefined in .playAnimation()"); }), (n.MorphBlendMesh.prototype.stopAnimation = function (e) { var t = this.animationsMap[e]; t && (t.active = !1); }), (n.MorphBlendMesh.prototype.update = function (e) { for (var t = 0, i = this.animationsList.length; i > t; t++) { var r = this.animationsList[t]; if (r.active) { var o = r.duration / r.length; (r.time += r.direction * e), r.mirroredLoop ? (r.time > r.duration || r.time < 0) && ((r.direction *= -1), r.time > r.duration && ((r.time = r.duration), (r.directionBackwards = !0)), r.time < 0 && ((r.time = 0), (r.directionBackwards = !1))) : ((r.time = r.time % r.duration), r.time < 0 && (r.time += r.duration)); var a = r.start + n.Math.clamp(Math.floor(r.time / o), 0, r.length - 1), s = r.weight; a !== r.currentFrame && ((this.morphTargetInfluences[r.lastFrame] = 0), (this.morphTargetInfluences[r.currentFrame] = 1 * s), (this.morphTargetInfluences[a] = 0), (r.lastFrame = r.currentFrame), (r.currentFrame = a)); var l = (r.time % o) / o; r.directionBackwards && (l = 1 - l), r.currentFrame !== r.lastFrame ? ((this.morphTargetInfluences[r.currentFrame] = l * s), (this.morphTargetInfluences[r.lastFrame] = (1 - l) * s)) : (this.morphTargetInfluences[r.currentFrame] = s); } } }); }, {}, ], 216: [ function (e, t, i) { var n = { emptyUserAgentDeviceType: "desktop", unknownUserAgentDeviceType: "phone", botUserAgentDeviceType: "bot" }, r = { tv: "tv", tablet: "tablet", phone: "phone", desktop: "desktop", bot: "bot" }; (t.exports = function (e, t) { return ( (t = t || {}), e && "" !== e ? e.match(/GoogleTV|SmartTV|Internet TV|NetCast|NETTV|AppleTV|boxee|Kylo|Roku|DLNADOC|CE-HTML/i) ? r.tv : e.match(/Xbox|PLAYSTATION 3|Wii/i) ? r.tv : e.match(/iP(a|ro)d/i) || (e.match(/tablet/i) && !e.match(/RX-34/i)) || e.match(/FOLIO/i) ? r.tablet : e.match(/Linux/i) && e.match(/Android/i) && !e.match(/Fennec|mobi|HTC Magic|HTCX06HT|Nexus One|SC-02B|fone 945/i) ? r.tablet : e.match(/Kindle/i) || (e.match(/Mac OS/i) && e.match(/Silk/i)) ? r.tablet : e.match( /GT-P10|SC-01C|SHW-M180S|SGH-T849|SCH-I800|SHW-M180L|SPH-P100|SGH-I987|zt180|HTC( Flyer|_Flyer)|Sprint ATP51|ViewPad7|pandigital(sprnova|nova)|Ideos S7|Dell Streak 7|Advent Vega|A101IT|A70BHT|MID7015|Next2|nook/i ) || (e.match(/MB511/i) && e.match(/RUTEM/i)) ? r.tablet : e.match(/BOLT|Fennec|Iris|Maemo|Minimo|Mobi|mowser|NetFront|Novarra|Prism|RX-34|Skyfire|Tear|XV6875|XV6975|Google Wireless Transcoder/i) ? r.phone : e.match(/Opera/i) && e.match(/Windows NT 5/i) && e.match(/HTC|Xda|Mini|Vario|SAMSUNG-GT-i8000|SAMSUNG-SGH-i9/i) ? r.phone : (e.match(/Windows (NT|XP|ME|9)/) && !e.match(/Phone/i) && !e.match(/Bot|Spider|ia_archiver|NewsGator/i)) || e.match(/Win( ?9|NT)/i) ? r.desktop : e.match(/Macintosh|PowerPC/i) && !e.match(/Silk/i) ? r.desktop : e.match(/Linux/i) && e.match(/X11/i) && !e.match(/Charlotte/i) ? r.desktop : e.match(/CrOS/) ? r.desktop : e.match(/Solaris|SunOS|BSD/i) ? r.desktop : e.match( /curl|Bot|B-O-T|Crawler|Spider|Spyder|Yahoo|ia_archiver|Covario-IDS|findlinks|DataparkSearch|larbin|Mediapartners-Google|NG-Search|Snappy|Teoma|Jeeves|Charlotte|NewsGator|TinEye|Cerberian|SearchSight|Zao|Scrubby|Qseero|PycURL|Pompos|oegp|SBIder|yoogliFetchAgent|yacy|webcollage|VYU2|voyager|updated|truwoGPS|StackRambler|Sqworm|silk|semanticdiscovery|ScoutJet|Nymesis|NetResearchServer|MVAClient|mogimogi|Mnogosearch|Arachmo|Accoona|holmes|htdig|ichiro|webis|LinkWalker|lwp-trivial/i ) && !e.match(/mobile|Playstation/i) ? t.botUserAgentDeviceType || r.bot : t.unknownUserAgentDeviceType || r.phone : t.emptyUserAgentDeviceType || r.desktop ); }), (t.exports.devices = r), (t.exports.defaultOptions = n); }, {}, ], 217: [ function (e, t, i) { !(function (e, n) { "use strict"; var r = "0.7.9", o = "", a = "?", s = "function", l = "undefined", c = "object", u = "string", h = "major", d = "model", f = "name", p = "type", m = "vendor", v = "version", g = "architecture", y = "console", _ = "mobile", b = "tablet", x = "smarttv", w = "wearable", M = "embedded", T = { extend: function (e, t) { for (var i in t) - 1 !== "browser cpu device engine os".indexOf(i) && t[i].length % 2 === 0 && (e[i] = t[i].concat(e[i])); return e; }, has: function (e, t) { return "string" == typeof e ? -1 !== t.toLowerCase().indexOf(e.toLowerCase()) : !1; }, lowerize: function (e) { return e.toLowerCase(); }, major: function (e) { return typeof e === u ? e.split(".")[0] : n; }, }, S = { rgx: function () { for (var e, t, i, r, o, a, u, h = 0, d = arguments; h < d.length && !a;) { var f = d[h], p = d[h + 1]; if (typeof e === l) { e = {}; for (r in p)(o = p[r]), typeof o === c ? (e[o[0]] = n) : (e[o] = n); } for (t = i = 0; t < f.length && !a;) if ((a = f[t++].exec(this.getUA()))) for (r = 0; r < p.length; r++) (u = a[++i]), (o = p[r]), typeof o === c && o.length > 0 ? 2 == o.length ? typeof o[1] == s ? (e[o[0]] = o[1].call(this, u)) : (e[o[0]] = o[1]) : 3 == o.length ? typeof o[1] !== s || (o[1].exec && o[1].test) ? (e[o[0]] = u ? u.replace(o[1], o[2]) : n) : (e[o[0]] = u ? o[1].call(this, u, o[2]) : n) : 4 == o.length && (e[o[0]] = u ? o[3].call(this, u.replace(o[1], o[2])) : n) : (e[o] = u ? u : n); h += 2; } return e; }, str: function (e, t) { for (var i in t) if (typeof t[i] === c && t[i].length > 0) { for (var r = 0; r < t[i].length; r++) if (T.has(t[i][r], e)) return i === a ? n : i; } else if (T.has(t[i], e)) return i === a ? n : i; return e; }, }, E = { browser: { oldsafari: { version: { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" } } }, device: { amazon: { model: { "Fire Phone": ["SD", "KF"] } }, sprint: { model: { "Evo Shift 4G": "7373KT" }, vendor: { HTC: "APA", Sprint: "Sprint" } } }, os: { windows: { version: { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2000: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, }, }, }, A = { browser: [ [/(operasmini)/([w.-]+)/i, /(operas[mobiletab]+).+version/([w.-]+)/i, /(opera).+version/([w.]+)/i, /(opera)[/s]+([w.]+)/i], [f, v], [/s(opr)/([w.]+)/i], [ [f, "Opera"], v ], [ /(kindle)/([w.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[/s]?([w.]+)*/i, /(avants|iemobile|slim|baidu)(?:browser)?[/s]?([w.]*)/i, /(?:ms|()(ie)s([w.]+)/i, /(rekonq)/([w.]+)*/i, /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium)/([w.-]+)/i, ], [f, v], [/(trident).+rv[:s]([w.]+).+likesgecko/i], [ [f, "IE"], v ], [/(edge)/((d+)?[w.]+)/i], [f, v], [/(yabrowser)/([w.]+)/i], [ [f, "Yandex"], v ], [/(comodo_dragon)/([w.]+)/i], [ [f, /_/g, " "], v ], [/(chrome|omniweb|arora|[tizenoka]{5}s?browser)/v?([w.]+)/i, /(ucs?browser|qqbrowser)[/s]?([w.]+)/i], [f, v], [/(dolfin)/([w.]+)/i], [ [f, "Dolphin"], v ], [/((?:android.+)crmo|crios)/([w.]+)/i], [ [f, "Chrome"], v ], [/XiaoMi/MiuiBrowser/([w.]+)/i], [v, [f, "MIUI Browser"]], [/android.+version/([w.]+)s+(?:mobiles?safari|safari)/i], [v, [f, "Android Browser"]], [/FBAV/([w.]+);/i], [v, [f, "Facebook"]], [/version/([w.]+).+?mobile/w+s(safari)/i], [v, [f, "Mobile Safari"]], [/version/([w.]+).+?(mobiles?safari|safari)/i], [v, f], [/webkit.+?(mobiles?safari|safari)(/[w.]+)/i], [f, [v, S.str, E.browser.oldsafari.version]], [/(konqueror)/([w.]+)/i, /(webkit|khtml)/([w.]+)/i], [f, v], [/(navigator|netscape)/([w.-]+)/i], [ [f, "Netscape"], v ], [/fxios/([w.-]+)/i], [v, [f, "Firefox"]], [ /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemosbrowser|minimo|conkeror)[/s]?([w.+]+)/i, /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)/([w.-]+)/i, /(mozilla)/([w.]+).+rv:.+gecko/d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[/s]?([w.]+)/i, /(links)s(([w.]+)/i, /(gobrowser)/?([w.]+)*/i, /(ices?browser)/v?([w._]+)/i, /(mosaic)[/s]([w.]+)/i, ], [f, v], ], cpu: [ [/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;)]/i], [ [g, "amd64"] ], [/(ia32(?=;))/i], [ [g, T.lowerize] ], [/((?:i[346]|x)86)[;)]/i], [ [g, "ia32"] ], [/windowss(ce|mobile);sppc;/i], [ [g, "arm"] ], [/((?:ppc|powerpc)(?:64)?)(?:smac|;|))/i], [ [g, /ower/, "", T.lowerize] ], [/(sun4w)[;)]/i], [ [g, "sparc"] ], [/((?:avr32|ia64(?=;))|68k(?=))|arm(?:64|(?=vd+;))|(?=atmels)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i], [ [g, T.lowerize] ], ], device: [ [/((ipad|playbook);[ws);-]+(rim|apple)/i], [d, m, [p, b]], [/applecoremedia/[w.]+ ((ipad)/], [d, [m, "Apple"], [p, b] ], [/(apples{0,1}tv)/i], [ [d, "Apple TV"], [m, "Apple"], ], [/(archos)s(gamepad2?)/i, /(hp).+(touchpad)/i, /(kindle)/([w.]+)/i, /s(nook)[ws]+build/(w+)/i, /(dell)s(strea[kprsd]*[dko])/i], [m, d, [p, b]], [/(kf[A-z]+)sbuild/[w.]+.*silk//i], [d, [m, "Amazon"], [p, b] ], [/(sd|kf)[0349hijorstuw]+sbuild/[w.]+.*silk//i], [ [d, S.str, E.device.amazon.model], [m, "Amazon"], [p, _], ], [/((ip[honed|sw*]+);.+(apple)/i], [d, m, [p, _]], [/((ip[honed|sw*]+);/i], [d, [m, "Apple"], [p, _] ], [/(blackberry)[s-]?(w+)/i, /(blackberry|benq|palm(?=-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola|polytron)[s_-]?([w-]+)*/i, /(hp)s([ws]+w)/i, /(asus)-?(w+)/i], [m, d, [p, _]], [/(bb10;s(w+)/i], [d, [m, "BlackBerry"], [p, _] ], [/android.+(transfo[primes]{4,10}sw+|eeepc|slidersw+|nexus 7)/i], [d, [m, "Asus"], [p, b] ], [/(sony)s(tablets[ps])sbuild//i, /(sony)?(?:sgp.+)sbuild//i], [ [m, "Sony"], [d, "Xperia Tablet"], [p, b], ], [/(?:sony)?(?:(?:(?:c|d)d{4})|(?:so[-l].+))sbuild//i], [ [m, "Sony"], [d, "Xperia Phone"], [p, _], ], [/s(ouya)s/i, /(nintendo)s([wids3u]+)/i], [m, d, [p, y]], [/android.+;s(shield)sbuild/i], [d, [m, "Nvidia"], [p, y] ], [/(playstations[3portablevi]+)/i], [d, [m, "Sony"], [p, y] ], [/(sprints(w+))/i], [ [m, S.str, E.device.sprint.vendor], [d, S.str, E.device.sprint.model], [p, _], ], [/(lenovo)s?(S(?:5000|6000)+(?:[-][w+]))/i], [m, d, [p, b]], [/(htc)[;_s-]+([ws]+(?=))|w+)*/i, /(zte)-(w+)*/i, /(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;s)sony)[_s-]?([w-]+)*/i], [m, [d, /_/g, " "], [p, _] ], [/(nexuss9)/i], [d, [m, "HTC"], [p, b] ], [/[s(;](xbox(?:sone)?)[s);]/i], [d, [m, "Microsoft"], [p, y] ], [/(kin.[onetw]{3})/i], [ [d, /./g, " "], [m, "Microsoft"], [p, _], ], [/s(milestone|droid(?:[2-4x]|s(?:bionic|x2|pro|razr))?(:?s4g)?)[ws]+build//i, /mot[s-]?(w+)*/i, /(XTd{3,4}) build//i], [d, [m, "Motorola"], [p, _] ], [/android.+s(mz60d|xoom[s2]{0,2})sbuild//i], [d, [m, "Motorola"], [p, b] ], [/android.+((sch-i[89]0d|shw-m380s|gt-pd{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i, /((SM-Tw+))/i], [ [m, "Samsung"], d, [p, b] ], [/((s[cgp]h-w+|gt-w+|galaxysnexus|sm-n900))/i, /(sam[sung]*)[s-]*(w+-?[w-]*)*/i, /sec-((sghw+))/i], [ [m, "Samsung"], d, [p, _] ], [/(samsung);smarttv/i], [m, d, [p, x]], [/(dtv[);].+(aquos)/i], [d, [m, "Sharp"], [p, x] ], [/sie-(w+)*/i], [d, [m, "Siemens"], [p, _] ], [/(maemo|nokia).*(n900|lumiasd+)/i, /(nokia)[s_-]?([w-]+)*/i], [ [m, "Nokia"], d, [p, _] ], [/androids3.[sw;-]{10}(ad{3})/i], [d, [m, "Acer"], [p, b] ], [/androids3.[sw;-]{10}(lg?)-([06cv9]{3,4})/i], [ [m, "LG"], d, [p, b] ], [/(lg) netcast.tv/i], [m, d, [p, x]], [/(nexuss[45])/i, /lg[e;s/-]+(w+)*/i], [d, [m, "LG"], [p, _] ], [/android.+(ideatab[a-z0-9-s]+)/i], [d, [m, "Lenovo"], [p, b] ], [/linux;.+((jolla));/i], [m, d, [p, _]], [/((pebble))app/[d.]+s/i], [m, d, [p, w]], [/android.+;s(glass)sd/i], [d, [m, "Google"], [p, w] ], [/android.+(w+)s+build/hm1/i, /android.+(hm[s-_]*note?[s_]*(?:dw)?)s+build/i, /android.+(mi[s-_]*(?:one|one[s_]plus)?[s_]*(?:dw)?)s+build/i], [ [d, /_/g, " "], [m, "Xiaomi"], [p, _], ], [/(mobile|tablet);.+rv:.+gecko//i], [ [p, T.lowerize], m, d ], ], engine: [ [/windows.+sedge/([w.]+)/i], [v, [f, "EdgeHTML"]], [/(presto)/([w.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)/([w.]+)/i, /(khtml|tasman|links)[/s](?([w.]+)/i, /(icab)[/s]([23].[d.]+)/i], [f, v], [/rv:([w.]+).*(gecko)/i], [v, f], ], os: [ [/microsofts(windows)s(vista|xp)/i], [f, v], [/(windows)snts6.2;s(arm)/i, /(windowssphone(?:sos)*|windowssmobile|windows)[s/]?([ntced.s]+w)/i], [f, [v, S.str, E.os.windows.version]], [/(win(?=3|9|n)|wins9xs)([ntd.]+)/i], [ [f, "Windows"], [v, S.str, E.os.windows.version], ], [/((bb)(10);/i], [ [f, "BlackBerry"], v ], [/(blackberry)w*/?([w.]+)*/i, /(tizen)[/s]([w.]+)/i, /(android|webos|palmsos|qnx|bada|rimstabletsos|meego|contiki)[/s-]?([w.]+)*/i, /linux;.+(sailfish);/i], [f, v], [/(symbians?os|symbos|s60(?=;))[/s-]?([w.]+)*/i], [ [f, "Symbian"], v ], [/((series40);/i], [f], [/mozilla.+(mobile;.+gecko.+firefox/i], [ [f, "Firefox OS"], v ], [ /(nintendo|playstation)s([wids3portablevu]+)/i, /(mint)[/s(]?(w+)*/i, /(mageia|vectorlinux)[;s]/i, /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[/s-]?([w.-]+)*/i, /(hurd|linux)s?([w.]+)*/i, /(gnu)s?([w.]+)*/i, ], [f, v], [/(cros)s[w]+s([w.]+w)/i], [ [f, "Chromium OS"], v ], [/(sunos)s?([w.]+d)*/i], [ [f, "Solaris"], v ], [/s([frentopc-]{0,4}bsd|dragonfly)s?([w.]+)*/i], [f, v], [/(ip[honead]+)(?:.*oss*([w]+)*slikesmac|;sopera)/i], [ [f, "iOS"], [v, /_/g, "."], ], [/(macsossx)s?([ws.]+w)*/i, /(macintosh|mac(?=_powerpc)s)/i], [ [f, "Mac OS"], [v, /_/g, "."], ], [/((?:open)?solaris)[/s-]?([w.]+)*/i, /(haiku)s(w+)/i, /(aix)s((d)(?=.|)|s)[w.]*)*/i, /(plans9|minix|beos|os/2|amigaos|morphos|riscsos|openvms)/i, /(unix)s?([w.]+)*/i], [f, v], ], }, C = function (t, i) { if (!(this instanceof C)) return new C(t, i).getResult(); var n = t || (e && e.navigator && e.navigator.userAgent ? e.navigator.userAgent : o), r = i ? T.extend(A, i) : A; return ( (this.getBrowser = function () { var e = S.rgx.apply(this, r.browser); return (e.major = T.major(e.version)), e; }), (this.getCPU = function () { return S.rgx.apply(this, r.cpu); }), (this.getDevice = function () { return S.rgx.apply(this, r.device); }), (this.getEngine = function () { return S.rgx.apply(this, r.engine); }), (this.getOS = function () { return S.rgx.apply(this, r.os); }), (this.getResult = function () { return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() }; }), (this.getUA = function () { return n; }), (this.setUA = function (e) { return (n = e), this; }), this.setUA(n), this ); }; (C.VERSION = r), (C.BROWSER = { NAME: f, MAJOR: h, VERSION: v }), (C.CPU = { ARCHITECTURE: g }), (C.DEVICE = { MODEL: d, VENDOR: m, TYPE: p, CONSOLE: y, MOBILE: _, SMARTTV: x, TABLET: b, WEARABLE: w, EMBEDDED: M }), (C.ENGINE = { NAME: f, VERSION: v }), (C.OS = { NAME: f, VERSION: v }), typeof i !== l ? (typeof t !== l && t.exports && (i = t.exports = C), (i.UAParser = C)) : typeof define === s && define.amd ? define(function () { return C; }) : (e.UAParser = C); var P = e.jQuery || e.Zepto; if (typeof P !== l) { var L = new C(); (P.ua = L.getResult()), (P.ua.get = function () { return L.getUA(); }), (P.ua.set = function (e) { L.setUA(e); var t = L.getResult(); for (var i in t) P.ua[i] = t[i]; }); } })("object" == typeof window ? window : this); }, {}, ], 218: [ function (e, t, i) { function n(e, t, i) { o(e, u, t, i), "DOMMouseScroll" == u && o(e, "MozMousePixelScroll", t, i); } function r(e, t, i) { a(e, u, t, i), "DOMMouseScroll" == u && a(e, "MozMousePixelScroll", t, i); } function o(e, t, i, n) { e[l]( h + t, "wheel" == u ? i : function (e) { !e && (e = window.event); var t = { originalEvent: e, target: e.target || e.srcElement, type: "wheel", deltaMode: "MozMousePixelScroll" == e.type ? 0 : 1, deltaX: 0, delatZ: 0, preventDefault: function () { e.preventDefault ? e.preventDefault() : (e.returnValue = !1); }, stopPropagation: function () { e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function () { e.stopImmediatePropagation && e.stopImmediatePropagation(); }, }; return "mousewheel" == u ? ((t.deltaY = (-1 / 40) * e.wheelDelta), e.wheelDeltaX && (t.deltaX = (-1 / 40) * e.wheelDeltaX)) : (t.deltaY = e.detail), i(t); }, n || !1 ); } function a(e, t, i, n) { e[c](h + t, i, n || !1); } function s(e, t) { e && e.addEventListener ? ((l = "addEventListener"), (c = "removeEventListener")) : ((l = "attachEvent"), (c = "detachEvent"), (h = "on")), (u = t ? ("onwheel" in t.createElement("div") ? "wheel" : void 0 !== t.onmousewheel ? "mousewheel" : "DOMMouseScroll") : "wheel"); } (t.exports = n), (t.exports.addWheelListener = n), (t.exports.removeWheelListener = r); var l, c, u, h = ""; s("undefined" != typeof window && window, "undefined" != typeof document && document); }, {}, ], 219: [ function (e, t, i) { t.exports = { imagepack: [{ name: "arkade" }, { name: "arkadesd" }, { name: "duracell" }, { name: "duracellsd" }, { name: "magician" }, { name: "magiciansd" }, { name: "olivari" }, { name: "olivarisd" }, { name: "adidas" }, { name: "adidassd" }, { name: "5gum" }, { name: "5gumsd" }, { name: "snmn" }, { name: "snmnsd" }, ], projects: [{ name: "arkade", title: "Arkade <br/> London", infotile: "Arkade London", subtitle: "Audio Reactive Art", tags: "Design, Art Direction / JUL 2016", description: "Arkade London is a pure experimental real time audio-reactive experiment working with Soundcloud’s API, WebGL and the WebAudio API. It gives the power to the user and lets them interact, using their keyboard to trigger generative real time graphics and visuals on top of the music they love. It’s been designed so that it can be projected on big walls and give easy access to DJs who need graphic visuals for their shows.<br/><br/><a target='_blank' href='http://arkade.london/'>arkade.london</a>", color: "0x0d0d0d", text: "rgb(145, 145, 145)", }, { name: "duracell", title: "Duracell", infotile: "Duracell", subtitle: "Corporate Website", tags: "UI Designer / AUG 2014 / UNIT9", description: "UNIT9 worked closely with Anomaly to revamp Duracell’s existing website and create a new one with responsive design and smooth user experience on any kind of device, be it mobile, tablet or desktop. <br/><br/> We transformed a static website into one that lives and breathes innovation, reflecting the spirit of the brand. We wanted to draw attention to the premium rank of Duracell batteries, so we focused on creating a site that was simple and elegant.", color: "0xcb8955", text: "rgb(255, 207, 170)", }, { name: "magician", title: "The <br/> Magicians", infotile: "The Magicians", subtitle: "Welcome to brakebills university", tags: "Designer / JAN 2014 / UNIT9", description: "Welcome to Brakebills is an interactive second screen experience showcasing the new SyFy series ‘The Magicians’. The series is based on a trilogy by Lev Grossman and follows the adventures of a group of young magicians and their journey at Brakebills University for Magical Pedagogy. <br/><br/> The website aims to provide fans with a deeper understanding of what the characters and magic universe of Brakebills is like, unlocking special cult content every time an episode airs.", color: "0x253044", text: "rgb(73, 83, 100)", }, { name: "olivari", title: "Olivari", infotile: "Olivari", subtitle: "Audio Cookbook", tags: "Art Director / AUG 2014 / UNIT9", description: "What do you do when you’re cooking with the aid of a cooking app?<br/><br/> Interaction with the recipe requires touch, which can be problematic if your fingers are covered in olive oil, egg yolk, crushed tomatoes, raw chicken, butter, flour, or any other delicious ingredient that could cause significant harm to your mobile device.<br/><br/>The solution came when Twofifteenmccann partnered with UNIT9 to build an audio-enabled cooking app, controlled by the user’s voice commands. Interaction is intuitive, fluid, and hands-free. Instead of swiping the screen to move to the next step, simply speak aloud to hear what’s next.", color: "0x547c87", text: "rgb(159, 178, 184)", }, { name: "adidas", title: "Adidas", infotile: "Adidas", subtitle: "All Or Nothing", tags: "UI Designer / AUG 2014 / UNIT9", description: "All Or Nothing is an interactive scavenger hunt created to extend the hype beyond the 2014 FIFA World Cup. Powered by Google for Adidas, the virtual quest is set in Brazil and players participate by using StreetView to find clues scattered around the globe. </br> </br> Players are tested with football trivia and win the next clue in the quest, getting one step closer to the next checkpoint, if they answer correctly. </br> </br> The project was fully playable on mobile, desktop and tablet. The experience had more than 250,000 unique players. ", color: "0X21202a", text: "rgb(65, 62, 94)", }, { name: "5gum", title: "5Gum", infotile: "5Gum", subtitle: "5gum experience", tags: "UI Designer / AUG 2014 / UNIT9", description: "Experience 5Gum is a multi-sensory virtual reality installation that lets you fly through virtual worlds and shoot thunderbolts from your fingertips.<br/><br/>The experience combines the Oculus Rift, the Kinect, 3D graphics, custom 7.1 sound design, two different forms of scented air, a harness, and a shipping container to create a sensory overload that culminates in letting users experience the sensation of flight.", color: "0x081116", text: "rgb(115, 128, 135)", }, { name: "snmn", title: "Snmn", infotile: "Snmn", subtitle: "Personal space", tags: "Blog / AUG 2015", description: "SNMN is a personal space. This blog is the gap between two projects, a place where I can explore my ideas and try other graphic technics.<br/><br/><a target='_blank' href='http://snmnlab.tumblr.com/'>snmnlab.tumblr.com</a>", color: "0x1d1d1d", text: "rgb(96, 96, 96)", }, ], wording: { about: { title1: "Hello,", title2: "Is it me you're looking for?", description: "I’m a London based French Digital Designer currently working at UNIT9. </br> </br> I've worked with Audi, Google, Montblanc, Adidas... </br> </br> New experiences and challenges are my thing. </br> </br> If you have any cool projects or opportunities, get in touch!", recognition: "Recognition", recognitions: ["X11 FWA", "X4 AWWWARDS", "X1 WEBBY AWARD", "X1 ADOBE THE CUTTING EDGE"], experience: "Experiences", experiences: [ "UNIT9 London / Digital Designer / JAN 2014", "FRED & FARID Paris / AD Junior / MAR 2013 - NOV 2013", "EDDI & SON Paris / Designer / OCT 2012 - MAR 2013", "S.Y.N Paris / Designer / APR 2012 - OCT 2012", ], links: [{ name: "twitter", url: "https://twitter.com/steven_mengin" }, { name: "behance", url: "https://www.behance.net/steven_mengin" }, { name: "linkedin", url: "https://uk.linkedin.com/in/steven-mengin-58270352" }, { name: "pinterest", url: "https://pinterest.com/stevenmengin/" }, { name: "instagram", url: "https://www.instagram.com/stevenmengin/" }, ], }, nav: { about: "About", mail: "[email protected]" }, }, }; }, {}, ], 220: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("gsap"), s = n(a), l = e("./config.js"), c = n(l), u = e("./utils/Mediator.js"), h = n(u), d = e("./controllers/slider"), f = n(d), p = e("./modules/world3D"), m = n(p), v = e("./views/homeslider"), g = n(v), y = e("./views/about"), _ = n(y), b = e("./views/nav"), x = n(b), w = e("./views/grabber"), M = n(w), T = c["default"].instance, S = h["default"].instance.emitter, E = "", A = (function () { function e(t) { r(this, e), (E = t), this.loadJSON(this.start.bind(this)); } return ( o(e, [{ key: "loadJSON", value: function (e) { var t = window.location.pathname, i = t.substring(0, t.lastIndexOf("/")), n = new XMLHttpRequest(); n.overrideMimeType("application/json"), n.open("GET", window.location.origin + i + "/media/json/data.json", !0), (n.onreadystatechange = function () { 4 == n.readyState && "200" == n.status && e(n.responseText); }), n.send(null); }, }, { key: "start", value: function (e) { (E.datajson = JSON.parse(e)), T.setOptions(E), T.isCapable() ? ("desktop" != T.device && (T.isPosteffected = !1), this.initVariables(), this.addEvents(), this.initModules()) : ((document.querySelector("#orientation-fallback").style.display = "block"), (document.querySelector(".loader").style.display = "none")), h["default"].instance.initDevice(T.device); }, }, { key: "initVariables", value: function () { (this.name = document.querySelector("#name")), (this.subname = document.querySelector("#namesub")), (this.topname = document.querySelector("#topname")), (this.arrowDownTrail = document.querySelector("#arrowdown-trail")), (this.arrowCaps = document.querySelector(".arrowdown-caps-one")), (this.arrowCaps2 = document.querySelector(".arrowdown-caps-two")), (this.timelinetile = new TimelineMax({ paused: !0 })), s["default"].set([this.subname, this.topname], { y: -25 }), s["default"].set(this.arrowDownTrail, { scaleY: 0 }), s["default"].set([this.arrowCaps, this.arrowCaps2], { scaleY: 0 }), (document.querySelector("#arrowdown").style.display = "block"), s["default"].set([this.name], { y: -60 }), (this.topname.style.display = "block"), this.timelinetile.add([ s["default"].to(this.name, 0.8, { autoAlpha: !0, y: 0 }), s["default"].to(this.subname, 0.8, { delay: 0.5, autoAlpha: !0, y: 0 }), s["default"].to(this.arrowDownTrail, 0.8, { delay: 0.8, scaleY: 1, ease: T.defaultEase }), s["default"].to(this.arrowCaps, 1, { delay: 1, scaleY: 1, ease: T.defaultEase }), s["default"].to(this.arrowCaps2, 1, { delay: 1, scaleY: 1, ease: T.defaultEase }), ]); }, }, { key: "initModules", value: function () { this.homeSlider = new g["default"](); }, }, { key: "loadWord3D", value: function () { S.off("coverLoaded", this.loadWord3DEvent), s["default"].to(document.querySelector(".loader"), 0.8, { autoAlpha: 0 }), "phone" != T.device && (this.grabber = new M["default"]()), (this.slider = new f["default"]()), (this.about = new _["default"]()), (this.nav = new x["default"]()), (this.world3D = new m["default"]()), h["default"].instance.onResize(); }, }, { key: "showTitle", value: function () { this.timelinetile.timeScale(1).play(), s["default"].to(this.topname, 0.8, { y: -25 }), (this.coverVisible = !0); }, }, { key: "hideTitle", value: function () { this.timelinetile.timeScale(2).reverse(), s["default"].to(this.topname, 0.8, { y: 0 }), (this.coverVisible = !1); }, }, { key: "onStage", value: function (e) { 0 == e.actual ? this.hideTitle() : -1 == e.actual && s["default"].delayedCall(1, this.showTitle.bind(this)); }, }, { key: "onAboutHide", value: function () { this.coverVisible && this.timelinetile.timeScale(1).play(); }, }, { key: "onAboutShow", value: function () { this.coverVisible && this.timelinetile.timeScale(2).reverse(); }, }, { key: "addEvents", value: function () { (this.loadWord3DEvent = this.loadWord3D.bind(this)), S.on("coverLoaded", this.loadWord3DEvent), S.on("world3D:ready", this.showTitle.bind(this)), S.on("stage", this.onStage.bind(this)), S.on("show-about", this.onAboutShow.bind(this)), S.on("hide-about", this.onAboutHide.bind(this)); }, }, ]), e ); })(); (i["default"] = A), (t.exports = i["default"]); }, { "./config.js": 221, "./controllers/slider": 222, "./modules/world3D": 237, "./utils/Mediator.js": 240, "./views/about": 244, "./views/grabber": 247, "./views/homeslider": 248, "./views/nav": 249, gsap: 209 }, ], 221: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("ua-parser-js"), s = n(a), l = e("ua-device-type"), c = n(l), u = e("../media/json/data.json"), h = (n(u), Symbol()), d = Symbol(), f = new s["default"](), p = (function () { function e(t) { if ((r(this, e), t != d)) throw "Cannot construct config singleton"; } return ( o( e, [{ key: "init", value: function (e) { (this.DEBUG = e.debug), (this.DEBUG_LOG = e.debugLog), (this.isPosteffected = e.isPosteffected), this.DEBUG_LOG && (window.console.log = function () {}), (this.DEBUG_NOSOUND = e.debugNoSound); var t = void 0, i = document.createElement("video"); (t = i.canPlayType("video/webm") ? "webm" : "mp4"), (i = null), (this.VIDEO_EXTENSION = "." + t), (this.VIDEO_PATH = e.cdn ? e.s3url + t + "/" : e.videoPath + t + "/"), (this.IMAGE_PATH = e.imagesPath), (this.IMAGEPACK_PATH = e.imagesPackPath), (this.PATH = e.path), (this.DATAJSON = e.datajson), f.setUA(navigator.userAgent), (this.browser = f.getBrowser().name), (this.version = f.getBrowser().version), (this.os = f.getOS()), "IE" == this.browser && "11.0" !== this.version, (this.devicePixelRatio = window.devicePixelRatio), (this.device = c["default"](navigator.userAgent)), document.body.classList.add(this.device), (this.model = f.getDevice()), (this.isCapture = e.isCapture), (this.websocketUrl = e.websocketUrl), (this.defaultEase = new Ease(BezierEasing(1, 0, 0, 1))); }, }, { key: "isCapable", value: function () { if ( ((this.tabletVersion = !0), (this.devicePhone = !0), (this.IEVERSION = !0), "IE" == this.browser && "11.0" !== this.version && (this.IEVERSION = !1), "tablet" == this.device && ("iPad" == this.model.model && this.os.version.split(".", 1)[0] < 7 && (this.tabletVersion = !1), "Android" == this.os.name && (this.os.version.split(".", 1)[0] <= 4 ? (this.tabletVersion = !1) : (this.tabletVersion = !1))), "phone" == this.device) ) if ("iPhone" == this.model.model) { this.os.version.split(".", 1)[0] <= 8 && (this.devicePhone = !1); var e = window.innerHeight, t = window.innerWidth; t > e ? screen.width > 600 && (this.devicePhone = !0) : screen.width > 374 && (this.devicePhone = !0); } else "Android" == this.os.name ? this.os.version.split(".", 1)[0] < 5 && (this.devicePhone = !1) : (this.devicePhone = !1); status = !1; try { var i = document.createElement("canvas"); return !!(window.WebGLRenderingContext && (i.getContext("webgl") || i.getContext("experimental-webgl")) && this.IEVERSION && this.devicePhone && this.tabletVersion); } catch (n) { return !1; } }, }, { key: "get", value: function (e) { return this[h][e]; }, }, { key: "setOptions", value: function (e) { this.init(e); }, }, ], [{ key: "instance", get: function () { return this[h] || (this[h] = new e(d)), this[h]; }, }, ] ), e ); })(); (i["default"] = p), (t.exports = i["default"]); }, { "../media/json/data.json": 219, "ua-device-type": 216, "ua-parser-js": 217 }, ], 222: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../views/AbstractView.js"), c = n(l), u = e("./../../config.js"), h = n(u), d = e("./../../utils/Mediator.js"), f = n(d), p = h["default"].instance, m = f["default"].instance.emitter, v = (function (e) { function t() { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this), this.initVariables(), this.addEvents(); } return ( o(t, e), a(t, [{ key: "initVariables", value: function () { (this.stageCount = p.DATAJSON.projects.length), (this.actualStageCount = -1), (this.lastStageCount = -1); }, }, { key: "onNonInertialScroll", value: function (e) { if (((this.lastStageCount = this.actualStageCount), (this.actualStageCount -= e), this.actualStageCount == this.stageCount)) return void(this.actualStageCount = this.lastStageCount); if (this.actualStageCount < -1) return void(this.actualStageCount = -1); var t = { actual: this.actualStageCount, last: this.lastStageCount }; m.emit("stage", t); }, }, { key: "setActualProject", value: function (e) { (this.lastStageCount = this.actualStageCount), (this.actualStageCount = e); }, }, { key: "onGoTop", value: function () { (this.lastStageCount = this.actualStageCount), (this.actualStageCount = -1); var e = { actual: this.actualStageCount, last: this.lastStageCount }; m.emit("stage", e); }, }, { key: "onClickArrow", value: function (e) { if (-1 == this.actualStageCount) { (this.lastStageCount = this.actualStageCount), (this.actualStageCount = 0); var t = { actual: this.actualStageCount, last: this.lastStageCount }; m.emit("stage", t); } }, }, { key: "addEvents", value: function () { this.listenNonInertialScroll(), m.on("gotop", this.onGoTop.bind(this)), m.on("slide:projectchange", this.setActualProject.bind(this)), (this.arrowdownWrapper = document.querySelector("#arrowdown")), this.arrowdownWrapper.addEventListener("click", this.onClickArrow.bind(this)); }, }, ]), t ); })(c["default"]); (i["default"] = v), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../utils/Mediator.js": 240, "./../../views/AbstractView.js": 243 }, ], 223: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } e("babel-core/polyfill"); var r = e("./config.js"), o = n(r), a = e("./App.js"), s = n(a), l = e("domready"), c = n(l); o["default"].instance; c["default"](function () { return new s[ "default" ]({ debug: !1, isPosteffected: !1, cdn: !0, s3url: "", websocketUrl: "ws://localhost:8000", videoPath: "", imagesPackPath: "media/packed/", imagesPath: "media/assets/", debugLog: !1, debugNoSound: !1, path: window.location.href.substr(0, location.href.lastIndexOf("/") + 1) }); }); }, { "./App.js": 220, "./config.js": 221, "babel-core/polyfill": 187, domready: 193 }, ], 224: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("../../utils/imagepackloader.js"), s = (n(a), e("./../../config.js")), l = n(s), c = e("./../../utils/Mediator.js"), u = n(c), h = e("../preloadbinaries"), d = n(h), f = (e("dat-gui").GUI, l["default"].instance), p = u["default"].instance.emitter, m = (function () { function e() { r(this, e), (this.arraytoload = f.DATAJSON.projects), (this.loadIndex = 0), (this.currentName = ""), (this.projectloaded = []), this.load(this.arraytoload[this.loadIndex].name); } return ( o(e, [{ key: "load", value: function (e) { var t = this; setTimeout(function () { (t.currentName = e), (t.file = e), "desktop" != f.device && (t.file += "sd"), (t.PreloadBinariesCover = new d["default"](t.currentName, t.file, t.callback.bind(t), t.progressioncallback.bind(t))); }, 1500); }, }, { key: "callback", value: function (e, t) { var i = {}; (i.name = this.currentName), (i.urls = e.urls), (this.projectloaded[this.loadIndex] = i), p.emit("projectloaded" + this.loadIndex, this.projectloaded[this.loadIndex]), this.loadIndex++, this.loadIndex < this.arraytoload.length && this.load(this.arraytoload[this.loadIndex].name); }, }, { key: "progressioncallback", value: function (e) { p.emit("projectloading" + this.loadIndex, e); }, }, ]), e ); })(); (i["default"] = m), (t.exports = i["default"]); }, { "../../utils/imagepackloader.js": 242, "../preloadbinaries": 234, "./../../config.js": 221, "./../../utils/Mediator.js": 240, "dat-gui": 190 }, ], 225: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("three"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = (e("three-orbit-controls")(c["default"]), h["default"].instance.emitter), f = (function (e) { function t(e, i, n, o) { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this, e, i, n, o), (this.rotationnb = 0), this.position.set(0, 0, -200), (this.originalXPosition = this.position.x), (this.originalYPosition = this.position.y), (this.originalZPosition = this.position.z), (this.zero = new c["default"].Vector3()), this.lookAt(this.zero), (this.aspect = window.innerWidth / window.innerHeight), this.updateProjectionMatrix(), this.addEvents(); } return ( o(t, e), a(t, [{ key: "onResize", value: function (e) { this.ratio = e.h / e.w; }, }, { key: "onUpdate", value: function () { this.zero.y = this.position.y; }, }, { key: "onBack", value: function () { TweenMax.to(this.position, 0.6, { z: -850, ease: Power4.EaseIn }); }, }, { key: "onFront", value: function () { TweenMax.to(this.position, 1.2, { z: this.originalZPosition, ease: Elastic.easeOut.config(1, 1) }); }, }, { key: "addEvents", value: function () { (this.onMouseMoveEvent = this.onMouseMove.bind(this)), (this.onResizeEvent = this.onResize.bind(this)), d.on("resize", this.onResizeEvent), (this.onBackEvent = this.onBack.bind(this)), (this.onFrontEvent = this.onFront.bind(this)), d.on("mousemove", this.onMouseMoveEvent), d.on("camera:back", this.onBackEvent), d.on("camera:front", this.onFrontEvent); }, }, { key: "onMouseMove", value: function (e) { var t = this.position.y == this.originalYPosition ? 4 : 0; TweenMax.to(this.position, 1, { ease: Expo.EaseOut, x: this.originalXPosition + -e.xRatio * t }); }, }, ]), t ); })(c["default"].PerspectiveCamera); (i["default"] = f), (t.exports = i["default"]); }, { "./../../utils/Mediator.js": 240, three: 215, "three-orbit-controls": 214 }, ], 226: [ function (e, t, i) { t.exports = "<ul>nn{{#projectlength}}nn {{#.}}n n <li> </li>n n {{/.}}n n{{/projectlength}}nn</ul>nn"; }, {}, ], 227: [ function (e, t, i) { t.exports = "<div class='overflow'>nn <div class='counter-title'>n {{title}}n </div>n n</div>"; }, {}, ], 228: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = e("three"), f = n(d), p = e("mustache"), m = n(p), v = e("./title.html"), g = n(v), y = e("./info.html"), _ = n(y), b = e("./infoproject.html"), x = n(b), w = e("../materials/covermaterial.js"), M = n(w), T = e("./counter.html"), S = n(T), E = e("./countertitle.html"), A = n(E), C = (e("dat-gui").GUI, c["default"].instance), P = h["default"].instance.emitter, L = (function (e) { function t(e, i, n, o, a) { r(this, t); var l = C.coverUrls[o], c = new f["default"].TextureLoader(), u = c.load(l), h = C.DATAJSON.projects[o].color, d = new M["default"]({ map: u, size: a, infocolor: h }); s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this, i, d), this.initVariables(o, n, e), (this.position.z = this.originalZposition), (this.position.y = 1e3 * -(o + 1) + 80), (this.rotation.y = Math.PI), this.scene.add(this), this.createCss3D(), this.initTweens(), this.addEvents(); } return ( o(t, e), a(t, [{ key: "initVariables", value: function (e, t, i) { (this.scene = i), (this.currentScale = 1), (this.scaleRatio = 0.1), (this.assetsUrls = null), (this.infoOpen = !1), (this.tempboundingbox = t), (this.nb = e), (this.h1pos = 130), (this.h2pos = 60), (this.options = { projectLoading: 0 }), (this.originalZposition = 800), (this.countTitleTimelineisOpen = !1), (this.positionZRange = 0), (this.mainObjectZPosition = 0), (this.assetsLoaded = !1), (this.isBack = !1), (this.textArray = []), this.textArray.push(this.material.uniforms.tInput.value), (this.currentTexture = 0), (this.ease = new Ease(BezierEasing(0.81, 0.19, 0.15, 0.86))), (this.playtimelineEvent = this.playTimeline.bind(this)), (this.playTimelineInfoEvent = this.playTimelineInfo.bind(this)); }, }, { key: "initTweens", value: function () { TweenMax.set([this.titleh1], { y: -this.h1pos }), TweenMax.set([this.titleh2], { y: -this.h2pos }), TweenMax.set([this.trail], { scaleX: 0, transformOrigin: "100% 50%" }), TweenMax.set([this.textInfo], { x: 50 }), (this.titletimeline = new TimelineMax({ paused: !0 })), this.titletimeline.add([(this.currentTitleh1Tween = TweenMax.to(this.titleh1, 0.5, { y: 0, ease: Expo.EaseInOut }))]), (this.infoTimeline = new TimelineMax({ paused: !0 })), this.infoTimeline.add([TweenMax.to(this.trail, 0.8, { scaleX: 1, ease: this.ease }), TweenMax.to([this.textInfo], 0.8, { delay: 0.3, x: 0, ease: this.ease })]); }, }, { key: "onUpdate", value: function () { this.material.uniforms.timer.value += 0.016; }, }, { key: "createCss3D", value: function () { (this.cssObject3D = new f["default"].Object3D()), (this.cssObject3D.position.z = 0), (this.cssObject3D.rotation.y = Math.PI); var e = document.createElement("div"); (e.innerHTML = C.DATAJSON.projects[this.nb].title), (e.className = "project-three-div"); var t = C.DATAJSON.projects[this.nb].title.split("<br/>"), i = { title: t, subtitle: C.DATAJSON.projects[this.nb].subtitle }, n = m["default"].render(g["default"], i); e.innerHTML = n; var r = new f["default"].CSS3DObject(e); (r.position.x = this.tempboundingbox.max.x - 150), (r.rotation.y = Math.PI), this.cssObject3D.add(r), (this.infoui = document.createElement("div")), (this.infoui.className = "project-three-info-div info-project"), (this.infoui.innerHTML = _["default"]); var o = new f["default"].CSS3DObject(this.infoui); (o.position.x = Math.round(this.tempboundingbox.min.x + 120)), (o.position.y = Math.round(this.tempboundingbox.min.y - 22)), (o.rotation.y = Math.PI), (o.rotation.z = Math.PI / 2), this.cssObject3D.add(o), this.add(this.cssObject3D), (this.titleh1 = e.querySelectorAll("h1")), (this.titleh2 = e.querySelector("h2")), (this.trail = this.infoui.querySelector(".trail")), (this.textInfo = this.infoui.querySelector(".text-info")); }, }, { key: "onSlideProjectChange", value: function (e, t) { this.nb == e ? (this.material.uniforms.isAnimated.value = !0) : ((this.material.uniforms.isAnimated.value = !1), this.tweenOriginZPosition()); }, }, { key: "tweenOriginZPosition", value: function () { this.position != this.originalZposition && (TweenMax.killTweensOf(this.position), TweenMax.to(this.position, 1, { z: this.originalZposition }), TweenMax.to(this.cssObject3D.position, 0.1, { z: 0 })); }, }, { key: "putSlideBack", value: function () { (this.isBack = !1), this.assetsLoaded && 0 == this.currentTexture && this.playInfoTimeline(), 0 != this.currentTexture && (this.countTitleTimelineisOpen && this.countTitleTimeline.play(), (this.currentTitleh1Tween = TweenMax.to(this.titleh1, 0.5, { y: -this.h1pos, ease: Expo.EaseInOut }))), this.tweenOriginZPosition(); }, }, { key: "putSlideFront", value: function () { (this.isBack = !0), this.assetsLoaded && ((this.currentTitleh1Tween = TweenMax.to(this.titleh1, 0.5, { y: 0, ease: Expo.EaseInOut })), this.reverseInfoTimeline()), this.infoOpen && this.closeInfo(), 0 != this.currentTexture && this.countTitleTimelineisOpen && this.countTitleTimeline.reverse(); }, }, { key: "assetsLoading", value: function (e) { var t = this; TweenMax.killTweensOf(this.options), TweenMax.to(this.options, 1.3, { projectLoading: e, ease: Expo.EaseInOut, onUpdate: function () { t.material.uniforms.preload.value = t.options.projectLoading; }, onComplete: function () { 1 == t.material.uniforms.preload.value && t.assetloadingcomplete(); }, }); }, }, { key: "assetloadingcomplete", value: function () { this.titletimeline.play(), this.isBack || this.playInfoTimeline(), (this.assetsLoaded = !0); }, }, { key: "playInfoTimeline", value: function () { TweenMax.killTweensOf(this.infoTimeline), this.infoTimeline.pause(), this.infoTimeline.delay(0).timeScale(1).play(), (this.currentTitleh2Tween = TweenMax.to(this.titleh2, 0.5, { delay: 0.35, y: 0, ease: this.ease })); }, }, { key: "reverseInfoTimeline", value: function () { TweenMax.killTweensOf(this.infoTimeline), this.infoTimeline.pause(), this.infoTimeline.timeScale(1.3).reverse(), (this.currentTitleh2Tween = TweenMax.to(this.titleh2, 0.5, { delay: 0.35, y: -this.h2pos, ease: this.ease })); }, }, { key: "assetsLoadedf", value: function (e) { (this.assetsUrls = e.urls), this.addInfoEvent(), this.prepareTextures(); }, }, { key: "prepareTextures", value: function () { for (var e = 0, t = new f["default"].TextureLoader(); e < this.assetsUrls.length;) { var i = t.load(this.assetsUrls[e]); (i.minFilter = f["default"].LinearFilter), (i.magFilter = f["default"].LinearFilter), (i.wrapping = f["default"].ClampToEdgeWrapping), this.textArray.push(i), e++; } this.addInfoImage(); }, }, { key: "addInfoImage", value: function () { (this.infoimage = new Image()), (this.infoimage.src = this.assetsUrls[this.assetsUrls.length - 1]), (this.infoimage.className = "project-three-div-infoimage"), (this.divInfoImage = new f["default"].CSS3DObject(this.infoimage)), (this.divInfoImage.rotation.y = Math.PI), (this.divInfoImage.position.x = this.tempboundingbox.min.x + 270), (this.divInfoImage.position.y = this.tempboundingbox.max.y - 300), this.cssObject3D.add(this.divInfoImage), (this.projectText = document.createElement("div")), (this.projectText.className = "project-info"); var e = { title: C.DATAJSON.projects[this.nb].infotile, subtitle: C.DATAJSON.projects[this.nb].subtitle, tags: C.DATAJSON.projects[this.nb].tags, description: C.DATAJSON.projects[this.nb].description, }; (this.projectText.innerHTML = m["default"].render(x["default"], e)), (this.projectTextDiv = new f["default"].CSS3DObject(this.projectText)), (this.projectTextDiv.position.x = this.tempboundingbox.max.x - 385), (this.projectTextDiv.position.y = this.tempboundingbox.max.y - 50), (this.projectTextDiv.rotation.y = Math.PI), this.cssObject3D.add(this.projectTextDiv), (this.projectTextAnimated = this.projectText.querySelectorAll(".animated")), TweenMax.set(this.projectText.querySelectorAll(".project-info-colored"), { color: "'" + C.DATAJSON.projects[this.nb].text + "'" }), TweenMax.set(this.projectTextAnimated, { autoAlpha: 0, y: 40 }), TweenMax.set(this.infoimage, { autoAlpha: 0 }), (this.timelineInfoProject = new TimelineMax({ paused: !0 })); new Ease(BezierEasing(0.215, 0.61, 0.355, 1)); this.timelineInfoProject.add([ new TweenMax.staggerTo(this.projectTextAnimated, 0.3, { y: 0, autoAlpha: 1, ease: this.ease }, 0.05), new TweenMax.to(this.infoimage, 1.2, { autoAlpha: 1, delay: 0.2, ease: this.ease }), new TweenMax.to(this.divInfoImage.position, 1.2, { y: this.tempboundingbox.max.y - 230, ease: this.ease }), new TweenMax.to(this.material.uniforms.infocolormix, 1.2, { value: 1, ease: this.ease }), ]); var t = this.assetsUrls.slice(0); t.pop(); var i = { projectlength: t }; (this.counterWrap = document.createElement("div")), (this.counterWrap.className = "counter-project"), (this.counterWrap.innerHTML = m["default"].render(S["default"], i)), (this.counter3D = new f["default"].CSS3DObject(this.counterWrap)), (this.counter3D.position.x = Math.round(this.tempboundingbox.min.x)), (this.counter3D.position.y = Math.round(this.tempboundingbox.min.y - 40)), this.cssObject3D.add(this.counter3D), (this.licounter = this.counterWrap.querySelectorAll("li")); TweenMax.set(this.licounter, { scaleY: 0 }), (this.counterTitle = document.createElement("div")), (this.counterTitle.className = "counter-project-title"); var n = { title: C.DATAJSON.projects[this.nb].infotile }; (this.counterTitle.innerHTML = m["default"].render(A["default"], n)), (this.counterTopTitle = this.counterTitle.querySelector(".counter-title")), (this.countertitle3D = new f["default"].CSS3DObject(this.counterTitle)), (this.countertitle3D.position.x = Math.round(this.tempboundingbox.max.x)), (this.countertitle3D.position.y = Math.round(this.tempboundingbox.max.y + 50)), (this.countertitle3D.rotation.y = Math.PI), this.cssObject3D.add(this.countertitle3D), TweenMax.set(this.counterTopTitle, { y: 50 }), (this.countTimeline = new TimelineMax({ paused: !0 })), this.countTimeline.add([new TweenMax.staggerTo(this.licounter, 0.3, { scaleY: 1, ease: C.defaultEase }, 0.05)]), (this.countTitleTimeline = new TimelineMax({ paused: !0 })), this.countTitleTimeline.add([new TweenMax.to(this.counterTopTitle, 0.7, { y: 0, ease: C.defaultEase })]); }, }, { key: "onClick", value: function () { this.assetsUrls && (this.infoOpen ? (this.closeInfo(), this.countTitleTimeline.reverse()) : (this.currentTexture++, this.currentTexture > this.textArray.length - 2 && ((this.currentTexture = 0), (this.countTitleTimelineisOpen = !1), this.countTimeline.reverse(), this.countTitleTimeline.reverse()), (this.material.uniforms.tInput.value = this.textArray[this.currentTexture]), 1 == this.currentTexture && ((this.material.uniforms.isZero.value = 0), (this.countTitleTimelineisOpen = !0), this.onHide(), this.countTimeline.play(), this.countTitleTimeline.play()), 0 == this.currentTexture && ((this.material.uniforms.isZero.value = 1), this.setCount(), this.onShow()), this.currentTexture > 0 && this.setCount(this.currentTexture - 1)), P.emit("raycaster:forceperform")); }, }, { key: "onStage", value: function (e) { if (((this.actual = this.nb), e.actual == this.nb && 0 == this.currentTexture && this.assetsLoaded)) { var t = e.last > e.actual ? this.h1pos : -this.h1pos, i = e.last > e.actual ? this.h2pos : -this.h2pos; TweenMax.set([this.titleh1], { y: t }), (this.onShowTween1 = TweenMax.delayedCall(1, this.playtimelineEvent)), this.isBack || (TweenMax.set([this.titleh2], { y: i }), this.infoTimeline.progress(0), this.infoTimeline.restart(), this.infoTimeline.pause(), (this.onShowTween2 = TweenMax.delayedCall(1, this.playTimelineInfoEvent))); } else e.last == this.nb && 0 == this.currentTexture && this.onHideLast(e.last, e.actual); this.actual == this.nb ? (this.material.uniforms.isAnimated.value = !0) : (this.material.uniforms.isAnimated.value = !1), this.infoOpen && this.closeInfo(); }, }, { key: "playTimeline", value: function () { this.currentTitleh1Tween = TweenMax.to(this.titleh1, 0.5, { y: 0, ease: Expo.EaseInOut }); }, }, { key: "playTimelineInfo", value: function () { (this.currentTitleh2Tween = TweenMax.to(this.titleh2, 0.5, { delay: 0.35, y: 0, ease: this.ease })), this.infoTimeline.timeScale(1).restart(); }, }, { key: "openInfo", value: function () { this.infoui.removeEventListener("click", this.openInfoEvent), P.emit("info:open"), (this.infoOpen = !0), this.timelineInfoProject.delay(0.5).timeScale(1).play(), this.onHide(); }, }, { key: "closeInfo", value: function () { this.infoOpen && (this.addInfoEvent(), P.emit("info:close"), (this.infoOpen = !1), this.timelineInfoProject.delay(0).timeScale(1.3).reverse(), TweenMax.delayedCall(1, this.onShow.bind(this))); }, }, { key: "onHideLast", value: function (e, t) { var i = 1; e > t && (i = -1), TweenMax.killTweensOf([this.titleh2, this.titleh1, this.infoTimeline, this.currentTitleh1Tween, this.currentTitleh2Tween, this.infoTimeline, this.onShowTween1, this.onShowTween2]), TweenMax.killDelayedCallsTo([this.playtimelineEvent, this.playTimelineInfoEvent]), (this.currentTitleh2Tween = TweenMax.to(this.titleh2, 0.5, { y: i * this.h2pos, ease: Expo.EaseInOut })), (this.currentTitleh1Tween = TweenMax.to(this.titleh1, 0.5, { delay: 0.1, y: i * this.h1pos, ease: Expo.EaseInOut })), this.infoTimeline.timeScale(1.3).reverse(); }, }, { key: "onHide", value: function () { this.actual == this.nb && (TweenMax.killTweensOf([this.titleh2, this.titleh1, this.infoTimeline, this.currentTitleh1Tween, this.currentTitleh2Tween, this.infoTimeline, this.onShowTween1, this.onShowTween2]), TweenMax.killDelayedCallsTo([this.playtimelineEvent, this.playTimelineInfoEvent]), (this.currentTitleh2Tween = TweenMax.to(this.titleh2, 0.5, { y: -this.h2pos, ease: Expo.EaseInOut })), (this.currentTitleh1Tween = TweenMax.to(this.titleh1, 0.5, { delay: 0.1, y: -this.h1pos, ease: Expo.EaseInOut })), this.infoTimeline.timeScale(1.3).reverse()); }, }, { key: "onShow", value: function () { 0 == this.currentTexture && (TweenMax.killTweensOf([this.titleh2, this.titleh1, this.infoTimeline, this.currentTitleh1Tween, this.currentTitleh2Tween, this.infoTimeline, this.onShowTween1, this.onShowTween2]), TweenMax.killDelayedCallsTo([this.playtimelineEvent, this.playTimelineInfoEvent]), (this.currentTitleh1Tween = TweenMax.delayedCall(0.2, this.playtimelineEvent)), (this.currentTitleh2Tween = TweenMax.delayedCall(0.3, this.playTimelineInfoEvent))); }, }, { key: "setCount", value: function () { for (var e = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0], t = 0; t < this.licounter.length;) this.licounter[t].classList.remove("active"), t++; this.licounter[e] && this.licounter[e].classList.add("active"); }, }, { key: "onAboutShow", value: function () { this.assetsLoaded && (this.countTitleTimelineisOpen && (this.countTitleTimeline.reverse(), this.countTimeline.reverse()), this.infoOpen ? this.timelineInfoProject.delay(0).timeScale(1.8).reverse() : this.onHide()); }, }, { key: "onAboutHide", value: function () { this.assetsLoaded && (this.countTitleTimelineisOpen && (this.countTitleTimeline.play(), this.countTimeline.play()), this.infoOpen ? this.timelineInfoProject.delay(2).timeScale(0.8).play() : this.onShow()); }, }, { key: "onLowq", value: function () { this.material.uniforms.lowq.value = 1; }, }, { key: "addEvents", value: function () { P.on("update", this.onUpdate.bind(this)), P.on("slide:projectchange", this.onSlideProjectChange.bind(this)), P.on("camera:front", this.putSlideBack.bind(this)), P.on("camera:back", this.putSlideFront.bind(this)), P.on("projectloaded" + this.nb, this.assetsLoadedf.bind(this)), P.on("projectloading" + this.nb, this.assetsLoading.bind(this)), P.on("cover:click" + this.nb, this.onClick.bind(this)), P.on("stage", this.onStage.bind(this)), P.on("show-about", this.onAboutShow.bind(this)), P.on("hide-about", this.onAboutHide.bind(this)), P.on("lowq", this.onLowq.bind(this)); }, }, { key: "addInfoEvent", value: function () { (this.openInfoEvent = this.openInfo.bind(this)), this.infoui.addEventListener("click", this.openInfoEvent); }, }, { key: "initGUI", value: function () {} }, ]), t ); })(f["default"].Mesh); (i["default"] = L), (t.exports = i["default"]); }, { "../materials/covermaterial.js": 233, "./../../config.js": 221, "./../../utils/Mediator.js": 240, "./counter.html": 226, "./countertitle.html": 227, "./info.html": 229, "./infoproject.html": 230, "./title.html": 231, "dat-gui": 190, mustache: 213, three: 215, }, ], 229: [ function (e, t, i) { t.exports = "<div class='overflow'>nn <h4 class='text-info info-ui'> Info </h4>nn</div>nn<div class='trail info-ui'> </div>nn"; }, {}, ], 230: [ function (e, t, i) { t.exports = "<div class='project-info-container'>nn <div class='overflow'>nn <h4 class='project-info-title animated'> {{{title}}} </h4>nn </div>nn <div class='overflow'>nn <h4 class='project-info-subtitle animated'> - {{subtitle}} </h4>nn </div>nn <div class='overflow'>nn <h4 class='project-info-description project-info-colored animated'> {{ tags }} </h4>nn </div>nnn <div class='overflow'>nn <h4 class='project-info-text project-info-colored animated'> {{{description}}} </h4>nn </div>nn</div>nnn"; }, {}, ], 231: [ function (e, t, i) { t.exports = "{{#title}}nn {{#.}}n n <div class='overflow'>nn <h1 class='project-title'>nn {{.}}nn </h1>nn </div>n n {{/.}}n n{{/title}}nn<div class='overflow'>nn <h2 class='project-subtitle'> nn - {{{subtitle}}}nn </h2>nn</div>n"; }, {}, ], 232: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("three"), s = n(a), l = e("./../../config.js"), c = n(l), u = e("../targetnoise"), h = n(u), d = e("./../../utils/Mediator.js"), f = n(d), p = e("dat-gui").GUI, m = c["default"].instance, v = f["default"].instance.emitter, g = (function () { function e(t, i) { r(this, e), (this.scene = t), (this.renderer = i), (this.options = { alphaValue: 0, originalYPosition: 10, elevation: 0, noise_range: 5.8, sombrero_amplitude: 1.6, sombrero_frequency: 8, speed: 1, segments: 500, wireframe_color: "#67ff39", perlin_passes: 3, wireframe: !1, RotationX: 4.02, lightX: 0, lightZ: -300, lightY: 0, uDisplacementScale: -74, uDisplacementBias: -152, }), (this.scale = 50), (this.targetNoise = new h["default"](this.scene, i)), this.buildPlane(), this.addEvents(); } return ( o(e, [{ key: "update", value: function () { this.targetNoise.update(), (this.plane_material.uniforms.time.value += 0.016); }, }, { key: "buildPlane", value: function () { (this.uniforms = { uDisplacementBias: { type: "f", value: this.options.uDisplacementBias }, tDisplacement: { type: "t", value: this.targetNoise.noiseMap }, uDisplacementScale: { type: "f", value: this.options.uDisplacementScale }, uDisplacementPostScale: { type: "f", value: 50 }, tDiffuse: { type: "t", value: 0 }, alphaVal: { type: "f", value: 1 }, time: { type: "f", value: 0 }, lowq: { type: "f", value: 0 }, amount: { type: "f", value: m.devicePixelRatio > 1 ? 0.07 : 0.035 }, }), (this.plane_material = new s["default"].ShaderMaterial({ vertexShader: "#define GLSLIFY 1nnn varying vec2 vUv;n n n varying float vTime;n n uniform sampler2D tDisplacement;n uniform float uDisplacementScale;n uniform float uDisplacementBias;n uniform float uDisplacementPostScale;n uniform float time;nn n n void main() {nn vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );nn vTime = time;n vUv = uv;n n vec3 dv = texture2D( tDisplacement, vUv ).xyz;n float df = uDisplacementScale * dv.x + uDisplacementBias;n n vec4 displacedPosition = vec4( normalize( normalMatrix * normal ).xyz * df * uDisplacementPostScale/100.0, 0.0 ) + mvPosition;nn gl_Position = projectionMatrix * displacedPosition;n n }nn ", fragmentShader: "#define GLSLIFY 1nuniform sampler2D tDisplacement;nvarying vec2 vUv;nuniform float alphaVal;nuniform float lowq;nvarying float vTime;nuniform float amount;nnfloat random(vec2 n, float offset ){n // return fract(sin(dot(gl_FragCoord.xyz+seed,scale))*43758.5453);n return .5 - fract(sin(dot(n.xy + vec2( offset, 0. ), vec2(12.9898, 78.233)))* 43758.5453);n}nnvoid main() {n n vec4 diffuseTex = texture2D( tDisplacement, vUv ) + vec4( vec3( amount * random( vUv, .0000000001 * vTime ) ) , 1.0 );n n gl_FragColor = vec4( 1.0 - vec3( diffuseTex.r ), alphaVal );n n}nnn", uniforms: this.uniforms, side: s["default"].BackSide, })), (this.plane_material2 = new s["default"].ShaderMaterial({ vertexShader: "#define GLSLIFY 1nnn varying vec2 vUv;n n n varying float vTime;n n uniform sampler2D tDisplacement;n uniform float uDisplacementScale;n uniform float uDisplacementBias;n uniform float uDisplacementPostScale;n uniform float time;nn n n void main() {nn vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );nn vTime = time;n vUv = uv;n n vec3 dv = texture2D( tDisplacement, vUv ).xyz;n float df = uDisplacementScale * dv.x + uDisplacementBias;n n vec4 displacedPosition = vec4( normalize( normalMatrix * normal ).xyz * df * uDisplacementPostScale/100.0, 0.0 ) + mvPosition;nn gl_Position = projectionMatrix * displacedPosition;n n }nn ", fragmentShader: "#define GLSLIFY 1nuniform float alphaVal;nnconst vec3 color = vec3(0.09411764705882353);nnvoid main() {n n // with texturen gl_FragColor = vec4( color, alphaVal);n n // without texturen // gl_FragColor = vec4( totalLight.xyz, 1.0 );n n}n", uniforms: this.uniforms, side: s["default"].FrontSide, })); for (var e = [this.plane_material, this.plane_material2], t = new s["default"].PlaneGeometry(400, 300, 256, 128), i = 0, n = t.faces.length; n > i; i++) { var r = t.faces[i].clone(); (r.materialIndex = 1), t.faces.push(r), t.faceVertexUvs[0].push(t.faceVertexUvs[0][i].slice(0)); } (this.mesh = new s["default"].Mesh(t, new s["default"].MeshFaceMaterial(e))), (this.mesh.rotation.y = Math.PI), (this.mesh.rotation.x = this.options.RotationX), (this.mesh.position.y = this.options.originalYPosition), (this.mesh.position.z = 25), this.scene.add(this.mesh); }, }, { key: "setPosition", value: function (e) { var t = this; (this.mesh.position.y = e + this.options.originalYPosition), (this.isPreviouslyVisible = this.mesh.visible), (this.mesh.visible = !0), (this.plane_material.transparent = !0), (this.plane_material2.transparent = !0), (this.plane_material.uniforms.alphaVal.value = 0), (this.plane_material.uniforms.uDisplacementScale.value = 200), (this.plane_material2.uniforms.alphaVal.value = 0), (this.plane_material2.uniforms.uDisplacementScale.value = 200), (this.options.alphaValue = 0), (this.opacityTween = TweenMax.to(this.options, 1, { alphaValue: 1, delay: 0.2, onUpdate: function () { (t.plane_material.uniforms.alphaVal.value = t.options.alphaValue), (t.plane_material2.uniforms.alphaVal.value = t.options.alphaValue); }, })); }, }, { key: "backPosition", value: function () { var e = this; TweenMax.killTweensOf(this.opacityTween), (this.opacityTween = TweenMax.to(this.options, 0.4, { alphaValue: 0, onUpdate: function () { (e.plane_material.uniforms.alphaVal.value = e.options.alphaValue), (e.plane_material2.uniforms.alphaVal.value = e.options.alphaValue); }, onComplete: function () { (e.plane_material.transparent = !1), (e.plane_material2.transparent = !1), (e.plane_material.uniforms.uDisplacementScale.value = e.options.uDisplacementScale), (e.plane_material2.uniforms.uDisplacementScale.value = e.options.uDisplacementScale), (e.plane_material.uniforms.alphaVal.value = 1), (e.plane_material2.uniforms.alphaVal.value = 1), (e.mesh.position.y = e.options.originalYPosition), (e.mesh.visible = e.isPreviouslyVisible); }, })); }, }, { key: "onLowq", value: function () { this.plane_material.uniforms.lowq.value = !0; }, }, { key: "addEvents", value: function () { (this.onUpdateEvent = this.update.bind(this)), v.on("update", this.onUpdateEvent), v.on("lowq", this.onLowq.bind(this)); }, }, { key: "initGui", value: function () { var e = this; (this.gui = new p()), (this.gui.values = {}), (this.gui.values.RotationX = this.gui.add(this.options, "RotationX", 0, 2 * Math.PI).step(0.01)), (this.gui.values.uDisplacementScale = this.gui.add(this.options, "uDisplacementScale", -200, 200).step(1)), (this.gui.values.uDisplacementBias = this.gui.add(this.options, "uDisplacementBias", -200, 200).step(1)), this.gui.values.RotationX.onChange(function (t) { e.mesh.rotation.x = t; }), this.gui.values.uDisplacementScale.onChange(function (t) { e.uniforms.uDisplacementScale.value = t; }), this.gui.values.uDisplacementBias.onChange(function (t) { e.uniforms.uDisplacementBias.value = t; }), this.gui.close(); }, }, ]), e ); })(); (i["default"] = g), (t.exports = i["default"]); }, { "../targetnoise": 236, "./../../config.js": 221, "./../../utils/Mediator.js": 240, "dat-gui": 190, three: 215 }, ], 233: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, s = e("three"), l = n(s), c = e("./../../config.js"), u = n(c), h = u["default"].instance, d = (function (e) { function t(e) { r(this, t), (e.map.minFilter = l["default"].NearestFilter); var i = {}; (i.uniforms = { tInput: { type: "t", value: e.map }, hoverActive: { type: "f", value: 0 }, timer: { type: "f", value: 0 }, loading: { type: "f", value: 0 }, mouse: { type: "v2", value: new l["default"].Vector2(0, 0) }, displacementRatio: { type: "f", value: 0 }, ratioresolution: { type: "f", value: e.size.width / e.size.height }, preload: { type: "f", value: 0 }, circleCenter: { type: "v2", value: new l["default"].Vector2(0, 0) }, circleTimer: { type: "f", value: 0 }, infocolor: { type: "c", value: new l["default"].Color(parseInt(e.infocolor)) }, infocolormix: { type: "f", value: 0 }, isAnimated: { type: "f", value: 0 }, lowq: { type: "f", value: 0 }, isZero: { type: "f", value: 1 }, isRetina: { type: "f", value: h.devicePixelRatio > 1 ? 1 : 0 }, }), "desktop" != h.device ? ((i.vertexShader = "#define GLSLIFY 1n#define M_PI 3.1415926535897932384626433832795nnvarying vec2 vUv;nnvarying float hoverActivef;nnvarying vec2 mousef;nnuniform float hoverActive;nnuniform vec2 mouse;nnuniform float timer;nnuniform vec2 circleCenter;nnuniform float circleTimer;nnvarying float wave;nnuniform float ratioresolution;nnuniform float isAnimated;nnnvoid main() {nn vUv = uv;nn float displacement = 0.0;nn if( isAnimated == 1.0 ) {nn mousef = mouse;nn float distanceCircle = distance( vec2( circleCenter.x, circleCenter.y / ratioresolution), vec2( vUv.x , vUv.y / ratioresolution ) );nn wave = (1.0 - smoothstep(0., .4, abs(distanceCircle - (timer - circleTimer) * 2.25 )));n } nn else {nn wave = 0.0;nn }nn n gl_Position = projectionMatrix * modelViewMatrix * vec4( position.x, position.y, position.z + wave * 7.0, 1.0 );nnn}"), (i.fragmentShader = "#define GLSLIFY 1nuniform sampler2D tInput;nnuniform float hoverActive;nnuniform float loading;nnuniform float timer;nnuniform float ratioresolution;nnuniform float preload;nnuniform float infocolormix;nnuniform vec3 infocolor;nnuniform float lowq;nnvarying vec2 vUv;nnvarying vec2 mousef;nnvarying float wave;nnuniform float isAnimated;nnnfloat random(vec2 n, float offset ){n // return fract(sin(dot(gl_FragCoord.xyz+seed,scale))*43758.5453);n return .5 - fract(sin(dot(n.xy + vec2( offset, 0. ), vec2(12.9898, 78.233)))* 43758.5453);n}nnvoid main() {nn vec4 color = texture2D( tInput, vUv );nn if(vUv.x >= preload) {nn float medium = ( color.r + color.g + color.b ) / 3.0;nn color = vec4(medium);n n }nn if( isAnimated == 1.0 ) { nn color.rgb += pow(color.rgb * wave, vec3(1.)) * .2;nn }nnn color = mix(color, vec4(infocolor, 1.0), infocolormix );nnn gl_FragColor = color;n}nn")) : ((i.vertexShader = "#define GLSLIFY 1n#define M_PI 3.1415926535897932384626433832795nnvarying vec2 vUv;nnvarying vec2 mousef;nnuniform float hoverActive;nnuniform float timer;nnuniform vec2 circleCenter;nnuniform float circleTimer;nnvarying float wave;nnuniform float ratioresolution;nnuniform float isAnimated;nnuniform float isZero;nnconst float one = 1.0;nnconst float sombrero_amplitude = 2.0;nconst float sombrero_frequency = 3.3;nnnvoid main() {nn vUv = uv;nn float displacement = position.z;nn wave = 0.0;nn if( isAnimated == one ) {nn // if (vUv.x < abs(sin(timer / 4.0) )) {nn if( isZero == one ) {nn displacement += (sombrero_amplitude * sin(((timer / 2.0) - (distance(uv.x, uv.y) * sombrero_frequency)) * M_PI)) * 2.0 * isZero;n }nnn float distanceCircle = distance( vec2( circleCenter.x, circleCenter.y / ratioresolution), vec2( vUv.x , vUv.y / ratioresolution ) );nn wave = (one - smoothstep(0., .4, abs(distanceCircle - (timer - circleTimer) * 2.25 )));n } nnn gl_Position = projectionMatrix * modelViewMatrix * vec4( position.x, position.y, displacement + wave * 7.0, 1.0 );nnn}"), (i.fragmentShader = "#define GLSLIFY 1nuniform sampler2D tInput;nnuniform float hoverActive;nnuniform float loading;nnuniform float timer;nnuniform float ratioresolution;nnuniform float preload;nnuniform float infocolormix;nnuniform vec3 infocolor;nnuniform float lowq;nnvarying vec2 vUv;nnvarying float wave;nnuniform float isAnimated;nnuniform float isZero;nnuniform float isRetina;nnconst float blurSteps = 1.;nn nnvoid main() {nn vec4 color = texture2D( tInput, vUv);nn if( isZero == 1.0 && isRetina == 0.0 ) {nn color += ( 1. / blurSteps )*texture2D( tInput, vUv + ( vec2( 1.0-blurSteps*.5, 1.0-blurSteps*.5 ) / 1130. ) );n n color /= blurSteps+1.0;n }nnn if(vUv.x >= preload) {nn float medium = ( color.r + color.g + color.b ) / 3.0;nn color = vec4(medium);n n }nn if( isAnimated == 1.0 ) { nn color.rgb += pow(color.rgb * wave, vec3(1.)) * .2;nn }nnn color = mix(color, vec4(infocolor, 1.0), infocolormix );nnn gl_FragColor = color;n}nn")), (i.shading = l["default"].FlatShading), (i.transparent = !0), (i.depthWrite = !1), (i.depthTest = !1), a(Object.getPrototypeOf(t.prototype), "constructor", this).call(this, i); } return o(t, e), t; })(l["default"].ShaderMaterial); (i["default"] = d), (t.exports = i["default"]); }, { "./../../config.js": 221, three: 215 }, ], 234: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("../../utils/imagepackloader.js"), s = n(a), l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = (e("dat-gui").GUI, c["default"].instance, h["default"].instance.emitter, (function () { function e(t, i, n, o) { r(this, e), (this.cb = n), (this.progresscb = o), (this.imagepackloader = new s["default"](this, this.onLoadProgress.bind(this), this.onLoadEnd.bind(this))), this.imagepackloader.load(i); } return ( o(e, [{ key: "onLoadProgress", value: function (e, t) { this.progresscb(t); }, }, { key: "onLoadEnd", value: function (e) { this.processImageUrls(e), this.cb(e), delete e.cb; }, }, { key: "processImageUrls", value: function (e) { for (var t = [], i = 0; i < e.names.length;) t.push(e.imagepackloader.get(e.names[i])), i++; e.urls = t; }, }, ]), e ); })()); (i["default"] = d), (t.exports = i["default"]); }, { "../../utils/imagepackloader.js": 242, "./../../config.js": 221, "./../../utils/Mediator.js": 240, "dat-gui": 190 }, ], 235: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("three"), s = n(a), l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = c["default"].instance, f = h["default"].instance.emitter, p = (function () { function e(t, i, n) { r(this, e), (this.stage = 0), (this.objects = n), (this.currentObject = this.objects[this.stage]), (this.mouse = new s["default"].Vector2()), (this.lastMouse = new s["default"].Vector2()), (this.touchDate = 0), (this.camera = i), (this.isInfoOpen = !1), (this.isPointer = !1), (this.ontouchmove = "phone" == d.device ? !1 : !0), (this.isRaycasted = !1), (this.raycaster = new s["default"].Raycaster()), this.addEvents(); } return ( o(e, [{ key: "perform", value: function () { "desktop" != d.device || (this.mouse.x == this.lastMouse.x && this.mouse.y == this.lastMouse.y) || this.raycast(); }, }, { key: "forcePerform", value: function () { (this.isRaycasted = !1), TweenMax.delayedCall(1e-4, this.raycast.bind(this)); }, }, { key: "raycast", value: function () { this.raycaster.setFromCamera(this.mouse, this.camera); var e = this.raycaster.intersectObjects([this.currentObject]); e.length > 0 ? (this.setPointer(), (this.currentObject.material.uniforms.hoverActive.value = 1), this.setMouseUVS(e), (this.isRaycasted = !0)) : ((this.isRaycasted = !1), this.removePointer(), (this.currentObject.material.uniforms.hoverActive.value = 0)), (this.lastMouse.x = this.mouse.x), (this.lastMouse.y = this.mouse.y); }, }, { key: "setMouseUVS", value: function (e) { var t = e[0].faceIndex, i = new s["default"].Vector2(), n = new s["default"].Vector2(), r = new s["default"].Vector2(), o = new s["default"].Vector2(); (i.x = this.currentObject.geometry.faceVertexUvs[0][t][0].x), (i.y = this.currentObject.geometry.faceVertexUvs[0][t][0].y), (n.x = this.currentObject.geometry.faceVertexUvs[0][t][1].x), (n.y = this.currentObject.geometry.faceVertexUvs[0][t][1].y), (r.x = this.currentObject.geometry.faceVertexUvs[0][t][2].x), (r.y = this.currentObject.geometry.faceVertexUvs[0][t][2].y), (o.x = (i.x + n.x + r.x) / 3), (o.y = 1 - (i.y + n.y + r.y) / 3), (this.currentObject.material.uniforms.mouse.value = o), this.isRaycasted || ((this.currentObject.material.uniforms.circleCenter.value = o), (this.currentObject.material.uniforms.circleTimer.value = this.currentObject.material.uniforms.timer.value)); }, }, { key: "changeStage", value: function (e) { (this.stage = e.actual < 0 ? 0 : e.actual), (this.currentObject = this.objects[this.stage]); }, }, { key: "onChangeStage", value: function (e) { (this.stage = e), (this.currentObject = this.objects[this.stage]); }, }, { key: "onmouseclick", value: function (e) { var t = this; ("desktop" != d.device && e.changedTouches[0].clientX < 0.3 * this.w) || (this.isRaycasted && ("desktop" == d.device && f.emit("cover:click" + this.currentObject.nb), "desktop" != d.device && setTimeout(function () { t.ontouchmove || f.emit("cover:click" + t.currentObject.nb); }, 100))); }, }, { key: "mousemove", value: function (e) { (this.touchDate = Date.now()), (this.mouse.x = e.xRatio), (this.mouse.y = e.yRatio); }, }, { key: "onInfoOpen", value: function () { (this.isInfoOpen = !0), this.setPointer(); }, }, { key: "onInfoClose", value: function () { this.removePointer(), (this.isInfoOpen = !1), this.setPointer(); }, }, { key: "setPointer", value: function () { this.isPointer || (this.isInfoOpen ? document.body.classList.add("infoopen") : (document.body.style.cursor = "e-resize"), (this.isPointer = !0)); }, }, { key: "removePointer", value: function () { this.isPointer && ((document.body.style.cursor = "initial"), (this.isPointer = !1)), this.isInfoOpen && document.body.classList.remove("infoopen"); }, }, { key: "forceRemovePointer", value: function () { (this.isPointer = !0), this.removePointer(); }, }, { key: "resize", value: function (e) { (this.w = e.w), (this.h = e.h); }, }, { key: "onTouchMove", value: function () { this.ontouchmove = !0; }, }, { key: "onMouseUp", value: function () { (this.mouse.x = 0), (this.mouse.y = 0), (this.ontouchmove = !1); }, }, { key: "addEvents", value: function () { (this.changeStateEvent = this.changeStage.bind(this)), (this.onChangeStageEvent = this.onChangeStage.bind(this)), (this.mousemoveEvent = this.mousemove.bind(this)), (this.onMouseClickEvent = this.onmouseclick.bind(this)), f.on("resize", this.resize.bind(this)), f.on("stage", this.changeStateEvent), f.on("raycast:changestage", this.onChangeStageEvent), f.on("raycaster:forceperform", this.forcePerform.bind(this)), f.on("info:open", this.onInfoOpen.bind(this)), f.on("info:close", this.onInfoClose.bind(this)), "desktop" == d.device ? (window.addEventListener("click", this.onMouseClickEvent), f.on("mousemove", this.mousemoveEvent)) : (window.addEventListener("touchstart", this.onMouseClickEvent.bind(this)), window.addEventListener("touchmove", this.onTouchMove.bind(this)), f.on("mouseup", this.onMouseUp.bind(this))); }, }, { key: "removeEvents", value: function () {} }, ]), e ); })(); (i["default"] = p), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../utils/Mediator.js": 240, three: 215 }, ], 236: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("three"), s = n(a), l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = e("dat-gui").GUI, f = c["default"].instance, p = (h["default"].instance.emitter, (function () { function e(t, i) { r(this, e), (this.scene = t), (this.renderer = i), (this.options = { vScale: 1.3, timeScale: 0.15 }), (this.uniforms = { time: { type: "f", value: 1 }, vScale: { type: "v2", value: new s["default"].Vector2(this.options.vScale, this.options.vScale) }, vOffset: { type: "v2", value: new s["default"].Vector2(1, 1) }, }), (this.noiseMap = new s["default"].WebGLRenderTarget(256, 256, { minFilter: s["default"].LinearFilter, magFilter: s["default"].LinearFilter, format: s["default"].RGBFormat })), (this.noiseScene = new s["default"].Scene()), (this.noiseCameraOrtho = new s["default"].OrthographicCamera(-128, 128, 128, -128, -1e3, 1e3)), (this.noiseCameraOrtho.position.z = 100), this.noiseScene.add(this.noiseCameraOrtho), (this.noiseMaterial = new s["default"].ShaderMaterial({ fragmentShader: "#define GLSLIFY 1nuniform float time;nvarying vec2 vUv;nvarying vec2 vUv2;nconst float first = 0.7;nconst float second = 0.4;nnvec3 mod289(vec3 x) {n return x - floor(x * (1.0 / 289.0)) * 289.0;n}nnvec4 mod289(vec4 x) {n return x - floor(x * (1.0 / 289.0)) * 289.0;n}nnvec4 permute(vec4 x) {n return mod289(((x*34.0)+1.0)*x);n}nnvec4 taylorInvSqrt(vec4 r)n{n return 1.79284291400159 - 0.85373472095314 * r;n}nnfloat snoise(vec3 v)n {n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);nn// First cornern vec3 i = floor(v + dot(v, C.yyy) );n vec3 x0 = v - i + dot(i, C.xxx) ;nn// Other cornersn vec3 g = step(x0.yzx, x0.xyz);n vec3 l = 1.0 - g;n vec3 i1 = min( g.xyz, l.zxy );n vec3 i2 = max( g.xyz, l.zxy );nn // x0 = x0 - 0.0 + 0.0 * C.xxx;n // x1 = x0 - i1 + 1.0 * C.xxx;n // x2 = x0 - i2 + 2.0 * C.xxx;n // x3 = x0 - 1.0 + 3.0 * C.xxx;n vec3 x1 = x0 - i1 + C.xxx;n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.yn vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.ynn// Permutationsn i = mod289(i);n vec4 p = permute( permute( permute(n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))n + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));nn// Gradients: 7x7 points over a square, mapped onto an octahedron.n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)n float n_ = 0.142857142857; // 1.0/7.0n vec3 ns = n_ * D.wyz - D.xzx;nn vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)nn vec4 x_ = floor(j * ns.z);n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)nn vec4 x = x_ *ns.x + ns.yyyy;n vec4 y = y_ *ns.x + ns.yyyy;n vec4 h = 1.0 - abs(x) - abs(y);nn vec4 b0 = vec4( x.xy, y.xy );n vec4 b1 = vec4( x.zw, y.zw );nn //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;n vec4 s0 = floor(b0)*2.0 + 1.0;n vec4 s1 = floor(b1)*2.0 + 1.0;n vec4 sh = -step(h, vec4(0.0));nn vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;nn vec3 p0 = vec3(a0.xy,h.x);n vec3 p1 = vec3(a0.zw,h.y);n vec3 p2 = vec3(a1.xy,h.z);n vec3 p3 = vec3(a1.zw,h.w);nn//Normalise gradientsn vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));n p0 *= norm.x;n p1 *= norm.y;n p2 *= norm.z;n p3 *= norm.w;nn// Mix final noise valuen vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);n m = m * m;n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),n dot(p2,x2), dot(p3,x3) ) );n }nnfloat surface3( vec3 coord ) {nn float n = 0.0;nn n += 1.0 * abs( snoise( coord ) );n n += 0.5 * abs( snoise( coord * 2.0 ) );n n += 0.25 * abs( snoise( coord * 4.0 ) );n n += 0.125 * abs( snoise( coord * 8.0 ) );nn if(vUv2.y > second && vUv2.y < first) {nn n n += 0.057 * abs( snoise( coord * 16.0 ) );n }nn else {nn n n += 0.057 * abs( snoise( coord * 16.0 ) );n n += 0.023 * abs( snoise( coord * 32.0 ) );n }n nn return n;nn}nnvoid main() {nn gl_FragColor = vec4( vec3( surface3( vec3( vUv, -time / 50.0 ) ) ), 1.0 );nn}nnn", vertexShader: "#define GLSLIFY 1nvarying vec2 vUv;nvarying vec2 vUv2;nuniform vec2 vScale;nuniform vec2 vOffset;nnvoid main() {nn vUv = (uv * vScale) + vOffset;n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );nn}", uniforms: this.uniforms, lights: !1, depthWrite: !1, depthTest: !1, })), (this.noiseQuadTarget = new s["default"].Mesh(new s["default"].PlaneBufferGeometry(256, 256, 1, 1), this.noiseMaterial)), this.noiseScene.add(this.noiseQuadTarget), f.DEBUG && this.initGui(); } return ( o(e, [{ key: "update", value: function () { this.renderer.render(this.noiseScene, this.noiseCameraOrtho, this.noiseMap), (this.noiseMaterial.uniforms.time.value += 0.016); }, }, { key: "initGui", value: function () { var e = this; (this.gui = new d()), (this.gui.values = {}), (this.gui.values.vScale = this.gui.add(this.options, "vScale", 0, 10).step(0.01)), (this.gui.values.timeScale = this.gui.add(this.options, "timeScale", 0, 1).step(0.01)), this.gui.values.vScale.onChange(function (t) { e.uniforms.vScale.value = new s["default"].Vector2(t, t); }), this.gui.close(); }, }, ]), e ); })()); (i["default"] = p), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../utils/Mediator.js": 240, "dat-gui": 190, three: 215 }, ], 237: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = e("three"), f = n(d), p = e("../../utils/css3drenderer.js"), m = n(p), v = e("../camera"), g = n(v), y = e("../field"), _ = n(y), b = e("../covers"), x = n(b), w = e("../raycast"), M = n(w), T = e("../assetloader"), S = n(T), E = e("./../../views/AbstractView.js"), A = n(E), C = (e("dat-gui").GUI, c["default"].instance), P = h["default"].instance.emitter, L = (function (e) { function t(e) { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this), (this.fpscount = document.querySelector("#fpscount")), this.initVariables(), this.addEvents(), this.addExtensions(), this.initScene(), (this.fps = 0), (this.count = 0), (this.total = 0), (this.maxcountframe = 200), TweenMax.delayedCall(0.2, this.show.bind(this)), P.emit("lowq"), (this.assetLoader = new S["default"]()); } return ( o(t, e), a(t, [{ key: "initVariables", value: function () { (this.coverLoaded = 0), (this.coversArray = []), (this.isRaycastable = !0), (this.stageCount = C.DATAJSON.projects.length), (this.actualStageCount = -1), (this.lastStageCount = -1), (this.titletop = document.querySelector("#topname")); }, }, { key: "initScene", value: function () { this.scene = new f["default"].Scene(); var e = !1, t = "mediump"; (C.devicePixelRatio < 2 || "desktop" != C.device) && (t = "highp"), C.devicePixelRatio < 2 && (e = !0), (this.renderer = new f["default"].WebGLRenderer({ precision: "highp", antialias: !0, transparent: !0, sortObjects: !1 })), this.renderer.setClearColor(1579032), "desktop" == C.device && (this.renderer.precision = t), this.renderer.setPixelRatio(C.devicePixelRatio), (this.camera = new g["default"](60, window.innerWidth / window.innerHeight, 0.5, 2e3)), (this.scene2 = new f["default"].Scene()), (this.renderer2 = new f["default"].CSS3DRenderer()), this.renderer2.setSize(window.innerWidth, window.innerHeight), (this.renderer2.domElement.className = "css3dDom"), document.body.appendChild(this.renderer2.domElement), this.createCovers(), (this.raycaster = new M["default"](this.scene, this.camera, this.coversArray)), (this.windowHeight = window.innerHeight), this.renderer.setSize(window.innerWidth, window.innerHeight), (this.container = document.querySelector(".wrapper")), (this.canvas = this.renderer.domElement), this.container.appendChild(this.canvas), (this.field = new _["default"](this.scene, this.renderer)); }, }, { key: "checkPerformance", value: function () { if (!this.lastCalledTime) return void(this.lastCalledTime = Date.now()); var e = (Date.now() - this.lastCalledTime) / 1e3; (this.lastCalledTime = Date.now()), (this.fps = 1 / e), (this.total += this.fps), (this.average = Math.round(this.total / this.count)), this.count++; }, }, { key: "onUpdate", value: function () { this.actualStageCount >= 0 && this.isRaycastable && this.raycaster.perform(), this.renderer.render(this.scene, this.camera), this.renderer2.render(this.scene, this.camera); }, }, { key: "scroll", value: function (e) { this.raycaster.forceRemovePointer(), (this.timeline = new TimelineMax({ paused: !0, onComplete: this.callbackcamera.bind(this) })); var t = 1.6; - 1 == this.lastStageCount && 0 == this.actualStageCount ? this.timeline.add([TweenMax.to(this.camera.position, t, { y: this.coversArray[this.actualStageCount].position.y, ease: C.defaultEase })]) : -1 == this.actualStageCount ? ((this.field.mesh.visible = !0), this.timeline.add([TweenMax.to(this.camera.position, t, { y: this.camera.originalYPosition, ease: new Ease(BezierEasing(0.56, 0.01, 0, 0.98)) })])) : this.timeline.add([TweenMax.to(this.camera.position, 0.9 * t, { y: this.coversArray[this.actualStageCount].position.y, ease: new Ease(BezierEasing(0.81, 0.19, 0.15, 1)) })]), this.timeline.play(); }, }, { key: "callbackcamera", value: function () { -1 == this.lastStageCount && 0 == this.actualStageCount && (this.field.mesh.visible = !1), (this.lastStageCount = this.stageCount), P.emit("raycaster:forceperform"); }, }, { key: "cameraSlide", value: function (e) { var t = this.minCam - this.diffCam * e; TweenMax.to(this.camera.position, 0.2, { y: t, ease: Expo.EaseIn }); }, }, { key: "createCovers", value: function () { var e = 1130, t = 636, i = void 0, n = void 0; "desktop" == C.device ? ((i = Math.round(e / 10)), (n = Math.round(t / 10))) : ((i = Math.round(e / 20)), (n = Math.round(t / 20))); var r = new f["default"].PlaneGeometry(e, t, i, n); r.computeBoundingBox(); for (var o = 0; o < C.DATAJSON.projects.length;) this.coversArray.push(new x["default"](this.scene, r.clone(), r.boundingBox, o, { width: e, height: t })), o++; (this.minCam = this.coversArray[0].position.y), (this.maxCam = this.coversArray[this.coversArray.length - 1].position.y), (this.diffCam = this.minCam - this.maxCam); }, }, { key: "onStage", value: function (e) { (this.actualStageCount = e.actual), (this.lastStageCount = e.last), this.scroll(); }, }, { key: "show", value: function () { TweenMax.to(this.canvas, 1.5, { autoAlpha: 1, onComplete: function () { P.emit("allow-scroll"), P.emit("world3D:ready"); }, }); }, }, { key: "onShowAbout", value: function () { -1 != this.actualStageCount && ((this.isRaycastable = !1), (this.currentPagePosition = this.camera.position.y), this.field.setPosition(this.currentPagePosition)); }, }, { key: "onHideAbout", value: function () { -1 != this.actualStageCount && ((this.isRaycastable = !0), this.field.backPosition()); }, }, { key: "onResize", value: function (e) { this.renderer.setSize(e.w, e.h), this.renderer2.setSize(e.w, e.h), (this.camera.aspect = e.w / e.h), this.camera.updateProjectionMatrix(), "desktop" != C.device && setTimeout(function () { window.scrollTo(0, 1); }, 10); }, }, { key: "onCLickTopName", value: function () { P.emit("gotop"); }, }, { key: "addEvents", value: function () { this.listenUpdate(), this.listenResize(), this.listenStage(), this.titletop.addEventListener("click", this.onCLickTopName.bind(this)), P.on("camera:slide", this.cameraSlide.bind(this)), P.on("show-about", this.onShowAbout.bind(this)), P.on("hide-about", this.onHideAbout.bind(this)); }, }, { key: "addExtensions", value: function () { new m["default"](C.browser, C.device); }, }, { key: "initGUI", value: function () {} }, ]), t ); })(A["default"]); (i["default"] = L), (t.exports = i["default"]); }, { "../../utils/css3drenderer.js": 241, "../assetloader": 224, "../camera": 225, "../covers": 228, "../field": 232, "../raycast": 235, "./../../config.js": 221, "./../../utils/Mediator.js": 240, "./../../views/AbstractView.js": 243, "dat-gui": 190, three: 215, }, ], 238: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../views/AbstractView.js"), c = n(l), u = e("./template.html"), h = n(u), d = e("./../../config.js"), f = n(d), p = e("./../../utils/Mediator.js"), m = n(p), v = f["default"].instance, g = (m["default"].instance.emitter, (function (e) { function t(e) { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this), (this.el = document.querySelector(e)); var i = { current: 1, total: v.DATAJSON.projects.length }; this.render(this.el, h["default"], i), (this.container = this.el.querySelector(".grabui-container")), this.initVariables(), this.initStyles(), this.initTweens(), this.addEvents(); } return ( o(t, e), a(t, [{ key: "initVariables", value: function () { (this.showDuration = 0.85), (this.hoverDuration = 0.35), (this.isDown = !1), (this.isEnter = !1), (this.cursorcontainer = this.el.querySelector(".cursor-container")), (this.burg = this.el.querySelector(".grabui-burg")), (this.arrow1 = this.el.querySelector(".first-arrow")), (this.arrow2 = this.el.querySelector(".second-arrow")), (this.nbCurrent = this.el.querySelector(".grabui-current")), (this.nbTotal = this.el.querySelector(".grabui-total")), (this.trailTop = this.el.querySelector(".timeline-trail-top")), (this.trailBot = this.el.querySelector(".timeline-trail-bot")); }, }, { key: "initStyles", value: function () { TweenMax.set(this.burg, { rotation: -45 }), TweenMax.set(this.arrow1, { autoAlpha: 0, transformOrigin: "50% 50%" }), TweenMax.set(this.arrow2, { autoAlpha: 0, rotation: 180, transformOrigin: "50% 50%" }), TweenMax.set(this.nbCurrent, { x: 15, y: -15, transformOrigin: "50% 50%" }), TweenMax.set(this.nbTotal, { x: -15, y: 15, transformOrigin: "50% 50%" }), TweenMax.set(this.trailTop, { scaleY: 0.4, transformOrigin: "50% 0%" }), TweenMax.set(this.trailBot, { scaleY: 0.4, transformOrigin: "50% 100%" }); }, }, { key: "initTweens", value: function () { (this.timelineHover = new TimelineMax({ paused: !0 })), this.timelineHover.add([ TweenMax.to(this.burg, this.hoverDuration / 2, { rotation: 0, ease: Linear.None }), TweenMax.to(this.arrow1, this.hoverDuration, { y: -30, autoAlpha: 1, ease: Expo.EaseOut }), TweenMax.to(this.arrow2, this.hoverDuration, { y: 30, autoAlpha: 1, ease: Expo.EaseOut }), TweenMax.to(this.nbCurrent, this.hoverDuration / 2, { x: 0, autoAlpha: 1, ease: Circ.EaseIn }), TweenMax.to(this.nbCurrent, this.hoverDuration, { y: 0, autoAlpha: 1, ease: Circ.EaseOut }), TweenMax.to(this.nbTotal, this.hoverDuration / 2, { x: 0, autoAlpha: 1, ease: Circ.EaseIn }), TweenMax.to(this.nbTotal, this.hoverDuration, { y: 0, autoAlpha: 1, ease: Circ.EaseOut }), ]), (this.timeLineDrag = new TimelineMax({ paused: !0 })), this.timeLineDrag.add([ TweenMax.to(this.arrow1, this.hoverDuration / 3, { y: -22, ease: Expo.EaseOut }), TweenMax.to(this.arrow2, this.hoverDuration / 3, { y: 22, ease: Expo.EaseOut }), TweenMax.to(this.nbCurrent, this.hoverDuration / 3, { x: 5, ease: Expo.EaseOut }), TweenMax.to(this.nbTotal, this.hoverDuration / 3, { x: -5, ease: Expo.EaseOut }), ]), (this.timelineShow = new TimelineMax({ paused: !0 })); }, }, { key: "setProject", value: function (e) { this.nbCurrent.innerHTML = e + 1; }, }, { key: "onMouseEnter", value: function () { (this.isEnter = !0), this.timelineHover.pause(), this.timelineHover.timeScale(1).play(); }, }, { key: "onMouseLeave", value: function () { (this.isEnter = !1), this.isDown || (this.timelineHover.pause(), this.timelineHover.timeScale(2).reverse()); }, }, { key: "onMouseDown", value: function (e) { (this.isDown = !0), this.timeLineDrag.pause(), this.timeLineDrag.timeScale(1).play(); }, }, { key: "onMouseUp", value: function (e) { (this.isDown = !1), this.timeLineDrag.pause(), this.isEnter ? this.timeLineDrag.timeScale(2).reverse() : this.onMouseLeave(); }, }, { key: "mouseMove", value: function (e) {} }, { key: "show", value: function () { TweenMax.killTweensOf(this.container), TweenMax.to(this.container, 1, { autoAlpha: 1 }); }, }, { key: "hide", value: function () { TweenMax.killTweensOf(this.container), TweenMax.to(this.container, 1, { autoAlpha: 0 }), this.removeEvents(), this.timelineHover.kill(); }, }, { key: "addEvents", value: function () { (this.enterEvent = this.onMouseEnter.bind(this)), (this.leaveEvent = this.onMouseLeave.bind(this)), this.cursorcontainer.addEventListener("mouseenter", this.enterEvent), this.cursorcontainer.addEventListener("mouseleave", this.leaveEvent); }, }, { key: "removeEvents", value: function () { this.cursorcontainer.removeEventListener("mouseenter", this.enterEvent), this.cursorcontainer.removeEventListener("mouseleave", this.leaveEvent); }, }, ]), t ); })(c["default"])); (i["default"] = g), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../utils/Mediator.js": 240, "./../../views/AbstractView.js": 243, "./template.html": 239 }, ], 239: [ function (e, t, i) { t.exports = "<div class='grabui-container'>nn <div class='cursor-container'>nn <div class='cursor'> nn <p class='inline number grabui-current'> {{ current }} </p>nn <div class='inline grabui-burg'>nn <div class='burg-trail one'></div>nn </div>nn <div class='arrow first-arrow'></div>n <div class='arrow second-arrow'></div>nn <p class='inline number grabui-total'> {{ total }} </p>nn </div>nn </div>nn <div class='timeline'>nn <div class='timeline-trail timeline-trail-top'></div>nn <div class='timeline-trail timeline-trail-bot'></div>nn </div>nn</div>"; }, {}, ], 240: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("event-emitter"), s = n(a), l = e("lethargy"), c = n(l), u = Symbol(), h = Symbol(), d = (function () { function t(e) { if ((r(this, t), (this.emitter = s["default"]({})), e != h)) throw "Cannot construct mediator singleton"; } return ( o( t, [{ key: "initDevice", value: function (e) { var t = this; (this.device = e), "desktop" == this.device ? (this.lethargy = new c["default"].Lethargy(7, 55, 0.05)) : (this.touches = {}), (this.isScrollable = !1), (this.listeningMouseWheel = !1), this.addEvents(), setTimeout(function () { t.toggleMouseEvent(), (t.now = new Date()); }, 500); }, }, { key: "addEvents", value: function () { "desktop" == this.device ? (window.addEventListener("mousemove", this.onMouseMove.bind(this)), window.addEventListener("mouseup", this.onMouseUp.bind(this)), window.addEventListener("resize", this.onResize.bind(this)), window.addEventListener("keydown", this.onKeyDown.bind(this))) : (window.DeviceOrientationEvent && window.addEventListener("deviceorientation", this.deviceorientation.bind(this)), window.addEventListener("touchstart", this.onTouchStart.bind(this)), window.addEventListener("touchmove", this.onMouseMove.bind(this), !1), window.addEventListener("touchend", this.onMouseUp.bind(this)), window.addEventListener("orientationchange", this.onResize.bind(this))), "desktop" == this.device && ((this.addWheelListener = e("wheel").addWheelListener), (this.removeWheelListener = e("wheel").removeWheelListener)), this.emitter.on("block-scroll", this.blockScroll.bind(this)), this.emitter.on("allow-scroll", this.allowScroll.bind(this)), TweenMax.ticker.addEventListener("tick", this.onUpdate.bind(this)); }, }, { key: "onKeyDown", value: function (e) { if (this.isScrollable) switch (e.keyCode) { case 38: this.checkHashScroll(1); break; case 40: this.checkHashScroll(-1); } }, }, { key: "onMouseMove", value: function (e) { if ((e.preventDefault(), "desktop" != this.device && this.isScrollable)) { e = e.changedTouches[0]; var t = this.touches.y - e.clientY; Math.abs(t) > 80 && (0 > t ? this.checkHashScroll(1) : this.checkHashScroll(-1)); } var i = (e.clientX / this.w) * 2 - 1, n = (e.clientY / this.h) * 2 - 1, r = e.clientX / this.w, o = e.clientY / this.h; this.emitter.emit("mousemove", { xRatio: i, yRatio: n, x: e.clientX, y: e.clientY, fullRatioX: r, fullRatioY: o }); }, }, { key: "onTouchStart", value: function (e) { (this.touches.x = e.changedTouches[0].clientX), (this.touches.y = e.changedTouches[0].clientY); }, }, { key: "onMouseUp", value: function () { this.emitter.emit("mouseup"); }, }, { key: "checkSwipe", value: function () {} }, { key: "toggleMouseEvent", value: function () { "desktop" == this.device && (this.listeningMouseWheel ? this.removeWheelListener(window, this.mouseWheelEvent) : ((this.mouseWheelEvent = this.mousewheel.bind(this)), this.addWheelListener(window, this.mouseWheelEvent))), (this.listeningMouseWheel = !this.listeningMouseWheel); }, }, { key: "deviceorientation", value: function (e) { var t = e.gamma, i = e.beta; t > 90 && (t = 90), -90 > t && (t = -90), (t /= 90), (i /= 90), this.w < this.h ? this.emitter.emit("mousemove", { xRatio: 4 * t, yRatio: 4 * i }) : this.emitter.emit("mousemove", { xRatio: 4 * i, yRatio: 4 * t }); }, }, { key: "mousewheel", value: function (e) { if (this.isScrollable) { e.originalEvent = e; var t = void 0; (t = this.lethargy ? this.lethargy.check(e) : !0), t ? this.checkHashScroll(t) : e.preventDefault(); } else e.preventDefault(); }, }, { key: "checkHashScroll", value: function (e) { new Date() - this.now > 1250 && (this.emitter.emit("noninertialscroll", e), (this.now = new Date())); }, }, { key: "blockScroll", value: function () { this.isScrollable = !1; }, }, { key: "allowScroll", value: function () { this.isScrollable = !0; }, }, { key: "onResize", value: function (e) { var t = this; (this.w = window.innerWidth), (this.h = window.innerHeight), "desktop" != this.device ? setTimeout(function () { (t.w = window.innerWidth), (t.h = window.innerHeight); var e = ""; (e = t.h >= t.w ? "block" : "none"), (document.querySelector("#orientationside").style.display = e), (document.body.style.height = t.h + 1 + "px"), window.scrollTo(0, 1), t.emitter.emit("resize", { w: t.w, h: t.h }); }, 100) : this.emitter.emit("resize", { w: this.w, h: this.h }); }, }, { key: "onUpdate", value: function () { this.emitter.emit("update"); }, }, ], [{ key: "instance", get: function () { return this[u] || (this[u] = new t(h)), this[u]; }, }, ] ), t ); })(); (i["default"] = d), (t.exports = i["default"]); }, { "event-emitter": 194, lethargy: 212, wheel: 218 }, ], 241: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = e("three"), a = n(o), s = function l(e, t) { r(this, l); var i = !1; ("Safari" == e || "desktop" != t) && (i = !0), (a["default"].CSS3DObject = function (e) { a["default"].Object3D.call(this), (this.element = e), (this.element.style.position = "absolute"), this.addEventListener("removed", function (e) { null !== this.element.parentNode && this.element.parentNode.removeChild(this.element); }); }), (a["default"].CSS3DObject.prototype = Object.create(a["default"].Object3D.prototype)), (a["default"].CSS3DObject.prototype.constructor = a["default"].CSS3DObject), (a["default"].CSS3DSprite = function (e) { a["default"].CSS3DObject.call(this, e); }), (a["default"].CSS3DSprite.prototype = Object.create(a["default"].CSS3DObject.prototype)), (a["default"].CSS3DSprite.prototype.constructor = a["default"].CSS3DSprite), (a["default"].CSS3DRenderer = function () { var e, t, n, r, o = new a["default"].Matrix4(), s = { camera: { fov: 0, style: "" }, objects: {} }, l = document.createElement("div"); (l.style.overflow = "hidden"), (l.style.WebkitTransformStyle = "preserve-3d"), (l.style.MozTransformStyle = "preserve-3d"), (l.style.oTransformStyle = "preserve-3d"), (l.style.transformStyle = "preserve-3d"), (this.domElement = l); var c = document.createElement("div"); (c.style.WebkitTransformStyle = "preserve-3d"), (c.style.MozTransformStyle = "preserve-3d"), (c.style.oTransformStyle = "preserve-3d"), (c.style.transformStyle = "preserve-3d"), l.appendChild(c), (this.setClearColor = function () {}), (this.getSize = function () { return { width: e, height: t }; }), (this.setSize = function (i, o) { (e = i), (t = o), (n = e / 2), (r = t / 2), (l.style.width = i + "px"), (l.style.height = o + "px"), (c.style.width = i + "px"), (c.style.height = o + "px"); }); var u, h = function (e) { return Number(e) === e && e % 1 === 0; }; u = i ? function (e) { return Math.abs(e) < Number.EPSILON ? 0 : h(e) ? e : e.toFixed(8); } : function (e) { return Math.abs(e) < Number.EPSILON ? 0 : e; }; var d = function (e) { var t = e.elements; return ( "matrix3d(" + u(t[0]) + "," + u(-t[1]) + "," + u(t[2]) + "," + u(t[3]) + "," + u(t[4]) + "," + u(-t[5]) + "," + u(t[6]) + "," + u(t[7]) + "," + u(t[8]) + "," + u(-t[9]) + "," + u(t[10]) + "," + u(t[11]) + "," + u(t[12]) + "," + u(-t[13]) + "," + u(t[14]) + "," + u(t[15]) + ")" ); }, f = function (e) { var t = e.elements; return ( "translate3d(-50%,-50%,0) matrix3d(" + u(t[0]) + "," + u(t[1]) + "," + u(t[2]) + "," + u(t[3]) + "," + u(-t[4]) + "," + u(-t[5]) + "," + u(-t[6]) + "," + u(-t[7]) + "," + u(t[8]) + "," + u(t[9]) + "," + u(t[10]) + "," + u(t[11]) + "," + u(t[12]) + "," + u(t[13]) + "," + u(t[14]) + "," + u(t[15]) + ")" ); }, p = function m(e, t) { if (e instanceof a["default"].CSS3DObject) { var i; e instanceof a["default"].CSS3DSprite ? (o.copy(t.matrixWorldInverse), o.transpose(), o.copyPosition(e.matrixWorld), o.scale(e.scale), (o.elements[3] = 0), (o.elements[7] = 0), (o.elements[11] = 0), (o.elements[15] = 1), (i = f(o))) : (i = f(e.matrixWorld)); var n = e.element, r = s.objects[e.id]; (void 0 === r || r !== i) && ((n.style.WebkitTransform = i), (n.style.MozTransform = i), (n.style.oTransform = i), (n.style.transform = i), (s.objects[e.id] = i)), n.parentNode !== c && c.appendChild(n); } for (var l = 0, u = e.children.length; u > l; l++) m(e.children[l], t); }; this.render = function (e, i) { var o = (0.5 / Math.tan(a["default"].Math.degToRad(0.5 * i.fov))) * t; s.camera.fov !== o && ((l.style.WebkitPerspective = o + "px"), (l.style.MozPerspective = o + "px"), (l.style.oPerspective = o + "px"), (l.style.perspective = o + "px"), (s.camera.fov = o)), e.updateMatrixWorld(), null === i.parent && i.updateMatrixWorld(), i.matrixWorldInverse.getInverse(i.matrixWorld); var u = "translate3d(0,0," + o + "px)" + d(i.matrixWorldInverse) + " translate3d(" + n + "px," + r + "px, 0)"; s.camera.style !== u && ((c.style.WebkitTransform = u), (c.style.MozTransform = u), (c.style.oTransform = u), (c.style.transform = u), (s.camera.style = u)), p(e, i); }; }); }; (i["default"] = s), (t.exports = i["default"]); }, { three: 215 }, ], 242: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("imagepack"), s = n(a), l = e("./../config.js"), c = n(l), u = c["default"].instance, h = (function () { function e(t, i, n) { r(this, e), (this.onprogresscb = i), (this.onendcb = n), (this.ctx = t); } return ( o(e, [{ key: "load", value: function (e) { var t = this; this.imagepack = new s["default"]({ verbose: !1 }) .on("error", function (e) {}) .on("progress", function (e) { t.onprogresscb(t.ctx, e); }) .once("load", function (e) { (t.ctx.names = e), t.onendcb(t.ctx); }) .load(u.IMAGEPACK_PATH + e + ".bin"); }, }, { key: "get", value: function (e) { return this.imagepack.getURI(e); }, }, ]), e ); })(); (i["default"] = h), (t.exports = i["default"]); }, { "./../config.js": 221, imagepack: 211 }, ], 243: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("./../utils/Mediator.js"), s = n(a), l = e("./../config.js"), c = n(l), u = e("mustache"), h = n(u), d = (function () { function e() { r(this, e), (this.mediator = s["default"].instance), (this.config = c["default"].instance); } return ( o(e, [{ key: "render", value: function (e, t, i) { var n = h["default"].render(t, i); e.innerHTML = n; }, }, { key: "listenUpdate", value: function () { (this.onUpdateEvent = this.onUpdate.bind(this)), this.mediator.emitter.on("update", this.onUpdateEvent); }, }, { key: "removeListenUpdate", value: function () { this.mediator.emitter.off("update", this.onUpdateEvent); }, }, { key: "listenResize", value: function () { (this.resizeEvent = this.onResize.bind(this)), this.mediator.emitter.on("resize", this.resizeEvent); }, }, { key: "removeListenResize", value: function () { this.mediator.emitter.off("resize", this.resizeEvent); }, }, { key: "listenNonInertialScroll", value: function () { this.mediator.emitter.on("noninertialscroll", this.onNonInertialScroll.bind(this)); }, }, { key: "listenStage", value: function () { (this.onStageEvent = this.onStage.bind(this)), this.mediator.emitter.on("stage", this.onStageEvent); }, }, { key: "onStage", value: function () {} }, ]), e ); })(); (i["default"] = d), (t.exports = i["default"]); }, { "./../config.js": 221, "./../utils/Mediator.js": 240, mustache: 213 }, ], 244: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = e("./../AbstractView.js"), f = n(d), p = e("./template.html"), m = n(p), v = e("./templatemobile.html"), g = n(v), y = c["default"].instance, _ = h["default"].instance.emitter, b = (function (e) { function t() { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this), (this.el = document.querySelector(".about")); var e = { wording: y.DATAJSON.wording.about }, i = "phone" == y.device ? g["default"] : m["default"]; this.render(this.el, i, e), this.initVariables(), this.addEvents(); } return ( o(t, e), a(t, [{ key: "show", value: function () { this.showTimeline.timeScale(1).play(); }, }, { key: "hide", value: function () { this.showTimeline.timeScale(2).reverse(); }, }, { key: "hideDom", value: function () {} }, { key: "initVariables", value: function () { TweenMax.set(this.el, { autoAlpha: 0 }), (this.animated = this.el.querySelectorAll(".animated")), TweenMax.set(this.animated, { y: -6, autoAlpha: 0 }), (this.showTimeline = new TimelineMax({ paused: !0 })), this.showTimeline.add([new TweenMax.to(this.el, 0.5, { autoAlpha: 1 })]), this.showTimeline.add([new TweenMax.staggerTo(this.animated, 0.4, { y: 0, autoAlpha: 1, ease: Expo.EaseOut }, 0.05)]); }, }, { key: "addEvents", value: function () { _.on("show-about", this.show.bind(this)), _.on("hide-about", this.hide.bind(this)); }, }, ]), t ); })(f["default"]); (i["default"] = b), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../utils/Mediator.js": 240, "./../AbstractView.js": 243, "./template.html": 245, "./templatemobile.html": 246 }, ], 245: [ function (e, t, i) { t.exports = "<div class='about-wrapper'>nn <h1 class='title1 animated'>{{ wording.title1 }}</h1>n <h2 class='title2 animated'>{{ wording.title2 }}</h2>nn <p class='description animated'>{{{ wording.description }}}</p>nn <div class='about-tables'>nn <div class='about-table left'>nn <h3 class='animated'> {{ wording.recognition }} </h3>nn <ul> nn {{#wording.recognitions}}nn <li class="animated"> {{.}} </li>nn {{/wording.recognitions}}nn </ul>n nn </div>nn <div class='about-table right'>nn <h3 class="animated"> {{ wording.experience }} </h3>nn <ul>n {{#wording.experiences}}nn <li class="animated"> {{.}} </li>nn {{/wording.experiences}}nn </ul>nn </div>nn </div>nnn <div class='about-links'>nn <ul> nn {{#wording.links}}nn <li class="animated"> <a href='{{url}}' target='_blank'> {{name}} </a> </li>nn {{/wording.links}}nn <ul> nn </div>nn <p class='greeting animated'> Coded with hate, love and drugs by <a href='http://samsy.ninja' target='_blank'> Samsy </a> </p>nn</div>nn"; }, {}, ], 246: [ function (e, t, i) { t.exports = "<div class='about-wrapper'>nn <h1 class='title1 animated'>{{ wording.title1 }}</h1>n <h2 class='title2 animated'>{{ wording.title2 }}</h2>nnn <div class='about-links'>nn <ul> nn {{#wording.links}}nn <li class="animated"> <a href='{{url}}' target='_blank'> {{name}} </a> </li>nn {{/wording.links}}nn <ul> nn </div>nn <p class='greeting animated'> Coded with hate, love and drugs by <a href='http://samsy.ninja' target='_blank'> Samsy </a> </p>nn</div>nn"; }, {}, ], 247: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = e("./../AbstractView.js"), f = n(d), p = e("./../../ui/grabui"), m = n(p), v = (e("dat-gui").GUI, c["default"].instance), g = h["default"].instance.emitter, y = (function (e) { function t() { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this), (this.ui = new m["default"](".grab", {})), this.initVariables(), this.onStage({ actual: 0 }), this.listenStage(), this.listenResize(); } return ( o(t, e), a(t, [{ key: "initVariables", value: function () { (this.timelinetrail = document.querySelector(".timeline")), TweenMax.set(this.timelinetrail, { scaleY: 0, transformOrigin: "50% 0%" }), (this.stageCount = v.DATAJSON.projects.length), (this.actualproject = 1), (this.percentHeight = 0.8), (this.realRatioActualProject = 1), (this.realPixelDiff = 60), (this.pixelDiff = 0), (this.diff = Number(((1 - this.percentHeight) / 2).toFixed(2))), (this.cursorSlide = this.diff), (this.w = 0), (this.h = 0), (this.scaleTop = 0), (this.scaleBot = 0), (this.animDuration = 1.3), (this.ease = new Ease(BezierEasing(0.81, 0.19, 0.15, 0.86))); }, }, { key: "onStage", value: function (e) { e.actual < 0 ? this.hide() : 0 == e.actual && -1 == e.last && this.show(), (this.actualproject = e.actual), this.ui.setProject(this.actualproject < 0 ? 0 : this.actualproject), (this.percenttrail = (1 / (this.stageCount - 1)) * this.actualproject), (this.percentTop = (this.percentHeight / (this.stageCount - 1)) * this.actualproject), this.moveCursor(); }, }, { key: "show", value: function () { this.ui.show(), TweenMax.killTweensOf(this.timelinetrail), TweenMax.to(this.timelinetrail, 1.5, { delay: 0.8, scaleY: 1, ease: v.defaultEase }), this.addEvents(); }, }, { key: "hide", value: function () { this.ui.hide(), TweenMax.killTweensOf(this.timelinetrail), TweenMax.to(this.timelinetrail, 0.8, { scaleY: 0, ease: this.ease }), this.removeEvents(); }, }, { key: "calcCurrentProject", value: function () { var e = Math.floor((this.percentTop / this.percentHeight) * (this.stageCount - 1) + 0.5); (this.realRatioActualProject = (this.percentTop / this.percentHeight) * (this.stageCount - 1)), (this.actualproject = e), this.ui.setProject(this.actualproject < 0 ? 0 : this.actualproject); }, }, { key: "moveCursor", value: function (e) { this.calculateTrailScale(); var t = this.ui.isDown ? 0.1 : this.animDuration; e && (t = 0), TweenMax.to(this.ui.trailTop, t, { scaleY: this.scaleTop, ease: this.ease }), TweenMax.to(this.ui.trailBot, t, { scaleY: this.scaleBot, ease: this.ease }), TweenMax.to(this.ui.cursorcontainer, t, { y: this.h * this.percentTop - 38, ease: this.ease }); }, }, { key: "calculateTrailScale", value: function () { (this.scaleBot = 1 - this.percenttrail - this.pixelDiff), this.scaleBot < 0 && (this.scaleBot = 0), (this.scaleTop = this.percenttrail - this.pixelDiff), this.scaleTop < 0 && (this.scaleTop = 0); }, }, { key: "magnetism", value: function () { var e = 1 / this.stageCount, t = e * (this.stageCount - 1), i = (e * this.actualproject) / t; g.emit("camera:slide", i); }, }, { key: "onMouseUp", value: function () { this.ui.isDown && (this.ui.onMouseUp(), this.magnetism(), g.emit("camera:front")), (this.ui.isDown = !1); }, }, { key: "onMouseDown", value: function () { g.emit("camera:back"), this.ui.onMouseDown(), this.calcCurrentProject(), g.emit("slide:projectchange", this.actualproject, this.realRatioActualProject); }, }, { key: "onMouseMove", value: function (e) { this.ui.isDown && (e && ((this.oldFullRatio = e.fullRatioY), e.fullRatioY < this.diff ? (this.cursorSlide = 0) : e.fullRatioY > 1 - this.diff ? (this.cursorSlide = 1 - 2 * this.diff) : (this.cursorSlide = e.fullRatioY - this.diff)), (this.percentTop = this.cursorSlide), (this.percenttrail = 1.25 * this.cursorSlide), this.calculateTrailScale(), this.moveCursor(), this.calcCurrentProject(), g.emit("camera:slide", this.percenttrail), g.emit("slide:projectchange", this.actualproject, this.realRatioActualProject), g.emit("raycast:changestage", this.actualproject)); }, }, { key: "onResize", value: function (e) { (this.w = e.w), (this.h = e.h), (this.pixelDiff = this.realPixelDiff / (this.h * this.percentHeight)), this.calculateTrailScale(), this.moveCursor(!0); }, }, { key: "addEvents", value: function () { (this.onmouseupevent = this.onMouseUp.bind(this)), g.on("mouseup", this.onmouseupevent), (this.onmousedownevent = this.onMouseDown.bind(this)), this.ui.cursorcontainer.addEventListener("mousedown", this.onmousedownevent), (this.onmousemoveevent = this.onMouseMove.bind(this)), g.on("mousemove", this.onmousemoveevent); }, }, { key: "removeEvents", value: function () { g.off("mouseup", this.onmouseupevent), this.ui.cursorcontainer.removeEventListener("mousedown", this.onmousedownevent), g.off("mousemove", this.onmousemoveevent); }, }, { key: "initGUI", value: function () {} }, ]), t ); })(f["default"]); (i["default"] = y), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../ui/grabui": 238, "./../../utils/Mediator.js": 240, "./../AbstractView.js": 243, "dat-gui": 190 }, ], 248: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } Object.defineProperty(i, "__esModule", { value: !0 }); var o = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), a = e("./../../config.js"), s = n(a), l = e("./../../utils/Mediator.js"), c = n(l), u = e("./../../modules/preloadbinaries/index.js"), h = n(u), d = s["default"].instance, f = c["default"].instance.emitter, p = (function () { function e() { r(this, e), this.preloadCovers(); } return ( o(e, [{ key: "preloadCovers", value: function () { var e = void 0; (e = ("desktop" == d.device || d.devicePixelRatio < 2, "coverssd")), (this.PreloadBinariesCover = new h["default"]("covers", e, this.coverPreloaded.bind(this), this.progression.bind(this))); }, }, { key: "progression", value: function (e) {} }, { key: "coverPreloaded", value: function (e) { (this.coverPackLoader = e), (d.coverUrls = this.coverPackLoader.urls), f.emit("coverLoaded"); }, }, ]), e ); })(); (i["default"] = p), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../modules/preloadbinaries/index.js": 234, "./../../utils/Mediator.js": 240 }, ], 249: [ function (e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e }; } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function o(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); } Object.defineProperty(i, "__esModule", { value: !0 }); var a = (function () { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; (n.enumerable = n.enumerable || !1), (n.configurable = !0), "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); } } return function (t, i, n) { return i && e(t.prototype, i), n && e(t, n), t; }; })(), s = function (e, t, i) { for (var n = !0; n;) { var r = e, o = t, a = i; (s = c = l = void 0), (n = !1), null === r && (r = Function.prototype); var s = Object.getOwnPropertyDescriptor(r, o); if (void 0 !== s) { if ("value" in s) return s.value; var l = s.get; return void 0 === l ? void 0 : l.call(a); } var c = Object.getPrototypeOf(r); if (null === c) return void 0; (e = c), (t = o), (i = a), (n = !0); } }, l = e("./../../config.js"), c = n(l), u = e("./../../utils/Mediator.js"), h = n(u), d = e("./../AbstractView.js"), f = n(d), p = e("./template.html"), m = n(p), v = (e("dat-gui").GUI, c["default"].instance), g = h["default"].instance.emitter, y = (function (e) { function t() { r(this, t), s(Object.getPrototypeOf(t.prototype), "constructor", this).call(this); var e = { wording: v.DATAJSON.wording.nav }; (this.el = document.querySelector(".nav")), this.render(this.el, m["default"], e), this.initVariables(), this.addEvents(), TweenMax.set(this.el, { autoAlpha: 0 }); } return ( o(t, e), a(t, [{ key: "initVariables", value: function () { (this.aboutButton = this.el.querySelector(".nav-about-wrapper")), (this.element = this.el.querySelector(".nav-about")), (this.isAboutVisible = !1); }, }, { key: "toggleAbout", value: function () { (this.isAboutVisible = !this.isAboutVisible), this.isAboutVisible ? (g.emit("block-scroll"), g.emit("show-about"), (this.element.innerHTML = "Close")) : (g.emit("allow-scroll"), g.emit("hide-about"), (this.element.innerHTML = "About")); }, }, { key: "show", value: function () { TweenMax.to(this.el, 1, { autoAlpha: 1, delay: 1 }); }, }, { key: "addEvents", value: function () { (this.aboutButtonEvent = this.toggleAbout.bind(this)), this.aboutButton.addEventListener("click", this.aboutButtonEvent), g.on("world3D:ready", this.show.bind(this)); }, }, { key: "removeEvents", value: function () { this.aboutButton.removeEventListener("click", this.aboutButtonEvent); }, }, ]), t ); })(f["default"]); (i["default"] = y), (t.exports = i["default"]); }, { "./../../config.js": 221, "./../../utils/Mediator.js": 240, "./../AbstractView.js": 243, "./template.html": 250, "dat-gui": 190 }, ], 250: [ function (e, t, i) { t.exports = "<div class='nav-left nav-transform'>nn <div class='nav-about-wrapper'>nn <h3 class='nav-about'> {{ wording.about }} </h3>nn </div>nn</div>nnn<div class='nav-mail-wrapper nav-transform-right nav-right'>nnn <h3 class='nav-mail'> <a href="mailto:{{ wording.mail }}?subject=Hello steven"> {{ wording.mail }}</a> </h3>nn</div>nnnnn"; }, {}, ], }, {}, [223] );