/*! For license information please see main.js.LICENSE.txt */ (() => { var e = { 62824: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(99413), i = n(22970), o = n(4015), a = n(71470), s = n(56630); n(91363); var u, l = "analytics", c = "firebase_id", d = "origin", h = 6e4, p = "https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig", f = "https://www.googletagmanager.com/gtag/js", _ = new o.Logger("@firebase/analytics"), g = (((u = {})["already-exists"] = "A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId."), (u["already-initialized"] = "initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance."), (u["already-initialized-settings"] = "Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect."), (u["interop-component-reg-failed"] = "Firebase Analytics Interop Component failed to instantiate: {$reason}"), (u["invalid-analytics-context"] = "Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}"), (u["indexeddb-unavailable"] = "IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}"), (u["fetch-throttle"] = "The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}."), (u["config-fetch-failed"] = "Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}"), (u["no-api-key"] = 'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.'), (u["no-app-id"] = 'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'), (u["no-client-id"] = 'The "client_id" field is empty.'), (u["invalid-gtag-resource"] = "Trusted Types detected an invalid gtag resource: {$gtagURL}."), u), m = new a.ErrorFactory("analytics", "Analytics", g); function v(e) { if (!e.startsWith(f)) { var t = m.create("invalid-gtag-resource", { gtagURL: e }); return _.warn(t.message), ""; } return e; } function y(e) { return Promise.all( e.map(function (e) { return e.catch(function (e) { return e; }); }) ); } function C(e, t) { var n = (function (e, t) { var n; return window.trustedTypes && (n = window.trustedTypes.createPolicy(e, t)), n; })("firebase-js-sdk-policy", { createScriptURL: v }), r = document.createElement("script"), i = "".concat(f, "?l=").concat(e, "&id=").concat(t); (r.src = n ? (null == n ? void 0 : n.createScriptURL(i)) : i), (r.async = !0), document.head.appendChild(r); } function b(e, t, n, r, o, a) { return i.__awaiter(this, void 0, void 0, function () { var s, u, l, c; return i.__generator(this, function (i) { switch (i.label) { case 0: (s = r[o]), (i.label = 1); case 1: return i.trys.push([1, 7, , 8]), s ? [4, t[s]] : [3, 3]; case 2: return i.sent(), [3, 6]; case 3: return [4, y(n)]; case 4: return ( (u = i.sent()), (l = u.find(function (e) { return e.measurementId === o; })) ? [4, t[l.appId]] : [3, 6] ); case 5: i.sent(), (i.label = 6); case 6: return [3, 8]; case 7: return (c = i.sent()), _.error(c), [3, 8]; case 8: return e("config", o, a), [2]; } }); }); } function w(e, t, n, r, o) { return i.__awaiter(this, void 0, void 0, function () { var a, s, u, l, c, d, h, p; return i.__generator(this, function (i) { switch (i.label) { case 0: return i.trys.push([0, 4, , 5]), (a = []), o && o.send_to ? ((s = o.send_to), Array.isArray(s) || (s = [s]), [4, y(n)]) : [3, 2]; case 1: for ( u = i.sent(), l = function (e) { var n = u.find(function (t) { return t.measurementId === e; }), r = n && t[n.appId]; if (!r) return (a = []), "break"; a.push(r); }, c = 0, d = s; c < d.length && ((h = d[c]), "break" !== l(h)); c++ ); i.label = 2; case 2: return 0 === a.length && (a = Object.values(t)), [4, Promise.all(a)]; case 3: return i.sent(), e("event", r, o || {}), [3, 5]; case 4: return (p = i.sent()), _.error(p), [3, 5]; case 5: return [2]; } }); }); } function S(e, t, n, r, o) { var a = function () { window[r].push(arguments); }; return ( window[o] && "function" == typeof window[o] && (a = window[o]), (window[o] = (function (e, t, n, r) { return function (o) { for (var a = [], s = 1; s < arguments.length; s++) a[s - 1] = arguments[s]; return i.__awaiter(this, void 0, void 0, function () { var s, u, l, c, d, h; return i.__generator(this, function (p) { switch (p.label) { case 0: return p.trys.push([0, 6, , 7]), "event" !== o ? [3, 2] : ((u = a[0]), (s = a[1]), [4, w(e, t, n, u, s)]); case 1: return p.sent(), [3, 5]; case 2: return "config" !== o ? [3, 4] : ((u = a[0]), (s = a[1]), [4, b(e, t, n, r, u, s)]); case 3: return p.sent(), [3, 5]; case 4: "consent" === o ? ((s = a[0]), e("consent", "update", s)) : "get" === o ? ((u = a[0]), (l = a[1]), (c = a[2]), e("get", u, l, c)) : "set" === o ? ((d = a[0]), e("set", d)) : e.apply(void 0, i.__spreadArray([o], a, !1)), (p.label = 5); case 5: return [3, 7]; case 6: return (h = p.sent()), _.error(h), [3, 7]; case 7: return [2]; } }); }); }; })(a, e, t, n)), { gtagCore: a, wrappedGtag: window[o] } ); } var T = 30, x = new ((function () { function e(e, t) { void 0 === e && (e = {}), void 0 === t && (t = 1e3), (this.throttleMetadata = e), (this.intervalMillis = t); } return ( (e.prototype.getThrottleMetadata = function (e) { return this.throttleMetadata[e]; }), (e.prototype.setThrottleMetadata = function (e, t) { this.throttleMetadata[e] = t; }), (e.prototype.deleteThrottleMetadata = function (e) { delete this.throttleMetadata[e]; }), e ); })())(); function E(e) { return new Headers({ Accept: "application/json", "x-goog-api-key": e }); } function L(e) { var t; return i.__awaiter(this, void 0, void 0, function () { var n, r, o, a, s, u, l; return i.__generator(this, function (i) { switch (i.label) { case 0: return (n = e.appId), (r = e.apiKey), (o = { method: "GET", headers: E(r) }), (a = p.replace("{app-id}", n)), [4, fetch(a, o)]; case 1: if (200 === (s = i.sent()).status || 304 === s.status) return [3, 6]; (u = ""), (i.label = 2); case 2: return i.trys.push([2, 4, , 5]), [4, s.json()]; case 3: return (l = i.sent()), (null === (t = l.error) || void 0 === t ? void 0 : t.message) && (u = l.error.message), [3, 5]; case 4: return i.sent(), [3, 5]; case 5: throw m.create("config-fetch-failed", { httpStatus: s.status, responseMessage: u }); case 6: return [2, s.json()]; } }); }); } function A(e, t, n, r) { var o, s = t.throttleEndTimeMillis, u = t.backoffCount; return ( void 0 === r && (r = x), i.__awaiter(this, void 0, void 0, function () { var t, l, c, d, h, p, f, g; return i.__generator(this, function (i) { switch (i.label) { case 0: (t = e.appId), (l = e.measurementId), (i.label = 1); case 1: return i.trys.push([1, 3, , 4]), [4, I(n, s)]; case 2: return i.sent(), [3, 4]; case 3: if (((c = i.sent()), l)) return _.warn("Timed out fetching this Firebase app's measurement ID from the server." + " Falling back to the measurement ID ".concat(l) + ' provided in the "measurementId" field in the local Firebase config. ['.concat(null == c ? void 0 : c.message, "]")), [2, { appId: t, measurementId: l }]; throw c; case 4: return i.trys.push([4, 6, , 7]), [4, L(e)]; case 5: return (d = i.sent()), r.deleteThrottleMetadata(t), [2, d]; case 6: if ( ((h = i.sent()), !(function (e) { if (!(e instanceof a.FirebaseError && e.customData)) return !1; var t = Number(e.customData.httpStatus); return 429 === t || 500 === t || 503 === t || 504 === t; })((p = h))) ) { if ((r.deleteThrottleMetadata(t), l)) return _.warn("Failed to fetch this Firebase app's measurement ID from the server." + " Falling back to the measurement ID ".concat(l) + ' provided in the "measurementId" field in the local Firebase config. ['.concat(null == p ? void 0 : p.message, "]")), [2, { appId: t, measurementId: l }]; throw h; } return (f = 503 === Number(null === (o = null == p ? void 0 : p.customData) || void 0 === o ? void 0 : o.httpStatus) ? a.calculateBackoffMillis(u, r.intervalMillis, T) : a.calculateBackoffMillis(u, r.intervalMillis)), (g = { throttleEndTimeMillis: Date.now() + f, backoffCount: u + 1 }), r.setThrottleMetadata(t, g), _.debug("Calling attemptFetch again in ".concat(f, " millis")), [2, A(e, g, n, r)]; case 7: return [2]; } }); }) ); } function I(e, t) { return new Promise(function (n, r) { var i = Math.max(t - Date.now(), 0), o = setTimeout(n, i); e.addEventListener(function () { clearTimeout(o), r(m.create("fetch-throttle", { throttleEndTimeMillis: t })); }); }); } var M, P, O = (function () { function e() { this.listeners = []; } return ( (e.prototype.addEventListener = function (e) { this.listeners.push(e); }), (e.prototype.abort = function () { this.listeners.forEach(function (e) { return e(); }); }), e ); })(); function k(e, t) { return i.__awaiter(this, void 0, void 0, function () { var n; return i.__generator(this, function (r) { switch (r.label) { case 0: return [4, t]; case 1: return ( (n = r.sent()), [ 2, new Promise(function (t, r) { e("get", n, "client_id", function (e) { e || r(m.create("no-client-id")), t(e); }); }), ] ); } }); }); } function R(e) { P = e; } function D(e) { M = e; } function N(e, t, n, r, o, s, u) { var l; return i.__awaiter(this, void 0, void 0, function () { var p, g, v, y, b, w; return i.__generator(this, function (S) { switch (S.label) { case 0: return ( (p = (function (e, t, n) { return ( void 0 === t && (t = x), i.__awaiter(this, void 0, void 0, function () { var r, o, a, s, u, l, c = this; return i.__generator(this, function (d) { if (((r = e.options), (o = r.appId), (a = r.apiKey), (s = r.measurementId), !o)) throw m.create("no-app-id"); if (!a) { if (s) return [2, { measurementId: s, appId: o }]; throw m.create("no-api-key"); } return ( (u = t.getThrottleMetadata(o) || { backoffCount: 0, throttleEndTimeMillis: Date.now() }), (l = new O()), setTimeout( function () { return i.__awaiter(c, void 0, void 0, function () { return i.__generator(this, function (e) { return l.abort(), [2]; }); }); }, void 0 !== n ? n : h ), [2, A({ appId: o, apiKey: a, measurementId: s }, u, l, t)] ); }); }) ); })(e)), p .then(function (t) { (n[t.measurementId] = t.appId), e.options.measurementId && t.measurementId !== e.options.measurementId && _.warn("The measurement ID in the local Firebase config (".concat(e.options.measurementId, ")") + " does not match the measurement ID fetched from the server (".concat(t.measurementId, ").") + " To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config."); }) .catch(function (e) { return _.error(e); }), t.push(p), (g = (function () { return i.__awaiter(this, void 0, void 0, function () { var e; return i.__generator(this, function (t) { switch (t.label) { case 0: return a.isIndexedDBAvailable() ? [3, 1] : (_.warn(m.create("indexeddb-unavailable", { errorInfo: "IndexedDB is not available in this environment." }).message), [2, !1]); case 1: return t.trys.push([1, 3, , 4]), [4, a.validateIndexedDBOpenable()]; case 2: return t.sent(), [3, 4]; case 3: return (e = t.sent()), _.warn(m.create("indexeddb-unavailable", { errorInfo: null == e ? void 0 : e.toString() }).message), [2, !1]; case 4: return [2, !0]; } }); }); })().then(function (e) { return e ? r.getId() : void 0; })), [4, Promise.all([p, g])] ); case 1: return ( (v = S.sent()), (y = v[0]), (b = v[1]), (function (e) { for (var t = window.document.getElementsByTagName("script"), n = 0, r = Object.values(t); n < r.length; n++) { var i = r[n]; if (i.src && i.src.includes(f) && i.src.includes(e)) return i; } return null; })(s) || C(s, y.measurementId), P && (o("consent", "default", P), R(void 0)), o("js", new Date()), ((w = null !== (l = null == u ? void 0 : u.config) && void 0 !== l ? l : {})[d] = "firebase"), (w.update = !0), null != b && (w[c] = b), o("config", y.measurementId, w), M && (o("set", M), D(void 0)), [2, y.measurementId] ); } }); }); } var B, F, U = (function () { function e(e) { this.app = e; } return ( (e.prototype._delete = function () { return delete j[this.app.options.appId], Promise.resolve(); }), e ); })(), j = {}, G = [], H = {}, V = "dataLayer", Z = "gtag", z = !1; function Y(e, t, n) { !(function () { var e = []; if ((a.isBrowserExtension() && e.push("This is a browser extension environment."), a.areCookiesEnabled() || e.push("Cookies are not available."), e.length > 0)) { var t = e .map(function (e, t) { return "(".concat(t + 1, ") ").concat(e); }) .join(" "), n = m.create("invalid-analytics-context", { errorInfo: t }); _.warn(n.message); } })(); var r = e.options.appId; if (!r) throw m.create("no-app-id"); if (!e.options.apiKey) { if (!e.options.measurementId) throw m.create("no-api-key"); _.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest' + " measurement ID for this Firebase app. Falling back to the measurement ID ".concat(e.options.measurementId) + ' provided in the "measurementId" field in the local Firebase config.'); } if (null != j[r]) throw m.create("already-exists", { id: r }); if (!z) { !(function (e) { var t = []; Array.isArray(window[e]) ? (t = window[e]) : (window[e] = t); })(V); var i = S(j, G, H, V, Z), o = i.wrappedGtag, s = i.gtagCore; (F = o), (B = s), (z = !0); } return (j[r] = N(e, G, H, t, B, V, n)), new U(e); } function W(e, t) { void 0 === t && (t = {}); var n = r._getProvider(e, l); if (n.isInitialized()) { var i = n.getImmediate(); if (a.deepEqual(t, n.getOptions())) return i; throw m.create("already-initialized"); } return n.initialize({ options: t }); } function X(e, t, n, r) { (e = a.getModularInstance(e)), (function (e, t, n, r, o) { return i.__awaiter(this, void 0, void 0, function () { var a, s; return i.__generator(this, function (u) { switch (u.label) { case 0: return o && o.global ? (e("event", n, r), [2]) : [3, 1]; case 1: return [4, t]; case 2: (a = u.sent()), (s = i.__assign(i.__assign({}, r), { send_to: a })), e("event", n, s), (u.label = 3); case 3: return [2]; } }); }); })(F, j[e.app.options.appId], t, n, r).catch(function (e) { return _.error(e); }); } var q = "@firebase/analytics", K = "0.10.0"; r._registerComponent( new s.Component( l, function (e, t) { var n = t.options; return Y(e.getProvider("app").getImmediate(), e.getProvider("installations-internal").getImmediate(), n); }, "PUBLIC" ) ), r._registerComponent( new s.Component( "analytics-internal", function (e) { try { var t = e.getProvider(l).getImmediate(); return { logEvent: function (e, n, r) { return X(t, e, n, r); }, }; } catch (e) { throw m.create("interop-component-reg-failed", { reason: e }); } }, "PRIVATE" ) ), r.registerVersion(q, K), r.registerVersion(q, K, "cjs5"), (t.getAnalytics = function (e) { void 0 === e && (e = r.getApp()), (e = a.getModularInstance(e)); var t = r._getProvider(e, l); return t.isInitialized() ? t.getImmediate() : W(e); }), (t.getGoogleAnalyticsClientId = function (e) { return i.__awaiter(this, void 0, void 0, function () { return i.__generator(this, function (t) { return (e = a.getModularInstance(e)), [2, k(F, j[e.app.options.appId])]; }); }); }), (t.initializeAnalytics = W), (t.isSupported = function () { return i.__awaiter(this, void 0, void 0, function () { return i.__generator(this, function (e) { switch (e.label) { case 0: if (a.isBrowserExtension()) return [2, !1]; if (!a.areCookiesEnabled()) return [2, !1]; if (!a.isIndexedDBAvailable()) return [2, !1]; e.label = 1; case 1: return e.trys.push([1, 3, , 4]), [4, a.validateIndexedDBOpenable()]; case 2: return [2, e.sent()]; case 3: return e.sent(), [2, !1]; case 4: return [2]; } }); }); }), (t.logEvent = X), (t.setAnalyticsCollectionEnabled = function (e, t) { (e = a.getModularInstance(e)), (function (e, t) { return i.__awaiter(this, void 0, void 0, function () { var n; return i.__generator(this, function (r) { switch (r.label) { case 0: return [4, e]; case 1: return (n = r.sent()), (window["ga-disable-".concat(n)] = !t), [2]; } }); }); })(j[e.app.options.appId], t).catch(function (e) { return _.error(e); }); }), (t.setConsent = function (e) { F ? F("consent", "update", e) : R(e); }), (t.setCurrentScreen = function (e, t, n) { (e = a.getModularInstance(e)), (function (e, t, n, r) { return i.__awaiter(this, void 0, void 0, function () { var o; return i.__generator(this, function (i) { switch (i.label) { case 0: return r && r.global ? (e("set", { screen_name: n }), [2, Promise.resolve()]) : [3, 1]; case 1: return [4, t]; case 2: (o = i.sent()), e("config", o, { update: !0, screen_name: n }), (i.label = 3); case 3: return [2]; } }); }); })(F, j[e.app.options.appId], t, n).catch(function (e) { return _.error(e); }); }), (t.setDefaultEventParameters = function (e) { F ? F("set", e) : D(e); }), (t.setUserId = function (e, t, n) { (e = a.getModularInstance(e)), (function (e, t, n, r) { return i.__awaiter(this, void 0, void 0, function () { var o; return i.__generator(this, function (i) { switch (i.label) { case 0: return r && r.global ? (e("set", { user_id: n }), [2, Promise.resolve()]) : [3, 1]; case 1: return [4, t]; case 2: (o = i.sent()), e("config", o, { update: !0, user_id: n }), (i.label = 3); case 3: return [2]; } }); }); })(F, j[e.app.options.appId], t, n).catch(function (e) { return _.error(e); }); }), (t.setUserProperties = function (e, t, n) { (e = a.getModularInstance(e)), (function (e, t, n, r) { return i.__awaiter(this, void 0, void 0, function () { var o, a, s, u, l; return i.__generator(this, function (i) { switch (i.label) { case 0: if (!r || !r.global) return [3, 1]; for (o = {}, a = 0, s = Object.keys(n); a < s.length; a++) (u = s[a]), (o["user_properties.".concat(u)] = n[u]); return e("set", o), [2, Promise.resolve()]; case 1: return [4, t]; case 2: (l = i.sent()), e("config", l, { update: !0, user_properties: n }), (i.label = 3); case 3: return [2]; } }); }); })(F, j[e.app.options.appId], t, n).catch(function (e) { return _.error(e); }); }), (t.settings = function (e) { if (z) throw m.create("already-initialized"); e.dataLayerName && (V = e.dataLayerName), e.gtagName && (Z = e.gtagName); }); }, 99413: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(56630), i = n(22970), o = n(4015), a = n(71470), s = n(32065), u = (function () { function e(e) { this.container = e; } return ( (e.prototype.getPlatformInfoString = function () { return this.container .getProviders() .map(function (e) { if ( (function (e) { var t = e.getComponent(); return "VERSION" === (null == t ? void 0 : t.type); })(e) ) { var t = e.getImmediate(); return "".concat(t.library, "/").concat(t.version); } return null; }) .filter(function (e) { return e; }) .join(" "); }), e ); })(); var l, c, d = "@firebase/app", h = "0.9.13", p = new o.Logger("@firebase/app"), f = "[DEFAULT]", _ = (((l = {})[d] = "fire-core"), (l["@firebase/app-compat"] = "fire-core-compat"), (l["@firebase/analytics"] = "fire-analytics"), (l["@firebase/analytics-compat"] = "fire-analytics-compat"), (l["@firebase/app-check"] = "fire-app-check"), (l["@firebase/app-check-compat"] = "fire-app-check-compat"), (l["@firebase/auth"] = "fire-auth"), (l["@firebase/auth-compat"] = "fire-auth-compat"), (l["@firebase/database"] = "fire-rtdb"), (l["@firebase/database-compat"] = "fire-rtdb-compat"), (l["@firebase/functions"] = "fire-fn"), (l["@firebase/functions-compat"] = "fire-fn-compat"), (l["@firebase/installations"] = "fire-iid"), (l["@firebase/installations-compat"] = "fire-iid-compat"), (l["@firebase/messaging"] = "fire-fcm"), (l["@firebase/messaging-compat"] = "fire-fcm-compat"), (l["@firebase/performance"] = "fire-perf"), (l["@firebase/performance-compat"] = "fire-perf-compat"), (l["@firebase/remote-config"] = "fire-rc"), (l["@firebase/remote-config-compat"] = "fire-rc-compat"), (l["@firebase/storage"] = "fire-gcs"), (l["@firebase/storage-compat"] = "fire-gcs-compat"), (l["@firebase/firestore"] = "fire-fst"), (l["@firebase/firestore-compat"] = "fire-fst-compat"), (l["fire-js"] = "fire-js"), (l.firebase = "fire-js-all"), l), g = new Map(), m = new Map(); function v(e, t) { try { e.container.addComponent(t); } catch (n) { p.debug("Component ".concat(t.name, " failed to register with FirebaseApp ").concat(e.name), n); } } function y(e) { var t, n, r = e.name; if (m.has(r)) return p.debug("There were multiple attempts to register component ".concat(r, ".")), !1; m.set(r, e); try { for (var o = i.__values(g.values()), a = o.next(); !a.done; a = o.next()) { v(a.value, e); } } catch (e) { t = { error: e }; } finally { try { a && !a.done && (n = o.return) && n.call(o); } finally { if (t) throw t.error; } } return !0; } function C(e, t) { var n = e.container.getProvider("heartbeat").getImmediate({ optional: !0 }); return n && n.triggerHeartbeat(), e.container.getProvider(t); } var b = (((c = {})["no-app"] = "No Firebase App '{$appName}' has been created - call initializeApp() first"), (c["bad-app-name"] = "Illegal App name: '{$appName}"), (c["duplicate-app"] = "Firebase App named '{$appName}' already exists with different options or config"), (c["app-deleted"] = "Firebase App named '{$appName}' already deleted"), (c["no-options"] = "Need to provide options, when not being deployed to hosting via source."), (c["invalid-app-argument"] = "firebase.{$appName}() takes either no argument or a Firebase App instance."), (c["invalid-log-argument"] = "First argument to `onLog` must be null or a function."), (c["idb-open"] = "Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}."), (c["idb-get"] = "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}."), (c["idb-set"] = "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}."), (c["idb-delete"] = "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."), c), w = new a.ErrorFactory("app", "Firebase", b), S = (function () { function e(e, t, n) { var o = this; (this._isDeleted = !1), (this._options = i.__assign({}, e)), (this._config = i.__assign({}, t)), (this._name = t.name), (this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled), (this._container = n), this.container.addComponent( new r.Component( "app", function () { return o; }, "PUBLIC" ) ); } return ( Object.defineProperty(e.prototype, "automaticDataCollectionEnabled", { get: function () { return this.checkDestroyed(), this._automaticDataCollectionEnabled; }, set: function (e) { this.checkDestroyed(), (this._automaticDataCollectionEnabled = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "name", { get: function () { return this.checkDestroyed(), this._name; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "options", { get: function () { return this.checkDestroyed(), this._options; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "config", { get: function () { return this.checkDestroyed(), this._config; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "container", { get: function () { return this._container; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isDeleted", { get: function () { return this._isDeleted; }, set: function (e) { this._isDeleted = e; }, enumerable: !1, configurable: !0, }), (e.prototype.checkDestroyed = function () { if (this.isDeleted) throw w.create("app-deleted", { appName: this._name }); }), e ); })(); function T(e, t) { var n, o; void 0 === t && (t = {}); var s = e; "object" != typeof t && (t = { name: t }); var u = i.__assign({ name: f, automaticDataCollectionEnabled: !1 }, t), l = u.name; if ("string" != typeof l || !l) throw w.create("bad-app-name", { appName: String(l) }); if ((s || (s = a.getDefaultAppConfig()), !s)) throw w.create("no-options"); var c = g.get(l); if (c) { if (a.deepEqual(s, c.options) && a.deepEqual(u, c.config)) return c; throw w.create("duplicate-app", { appName: l }); } var d = new r.ComponentContainer(l); try { for (var h = i.__values(m.values()), p = h.next(); !p.done; p = h.next()) { var _ = p.value; d.addComponent(_); } } catch (e) { n = { error: e }; } finally { try { p && !p.done && (o = h.return) && o.call(h); } finally { if (n) throw n.error; } } var v = new S(s, u, d); return g.set(l, v), v; } function x(e, t, n) { var i, o = null !== (i = _[e]) && void 0 !== i ? i : e; n && (o += "-".concat(n)); var a = o.match(/\s|\//), s = t.match(/\s|\//); if (a || s) { var u = ['Unable to register library "'.concat(o, '" with version "').concat(t, '":')]; return a && u.push('library name "'.concat(o, '" contains illegal characters (whitespace or "/")')), a && s && u.push("and"), s && u.push('version name "'.concat(t, '" contains illegal characters (whitespace or "/")')), void p.warn(u.join(" ")); } y( new r.Component( "".concat(o, "-version"), function () { return { library: o, version: t }; }, "VERSION" ) ); } var E = "firebase-heartbeat-database", L = 1, A = "firebase-heartbeat-store", I = null; function M() { return ( I || (I = s .openDB(E, L, { upgrade: function (e, t) { if (0 === t) e.createObjectStore(A); }, }) .catch(function (e) { throw w.create("idb-open", { originalErrorMessage: e.message }); })), I ); } function P(e) { return i.__awaiter(this, void 0, void 0, function () { var t, n; return i.__generator(this, function (r) { switch (r.label) { case 0: return r.trys.push([0, 3, , 4]), [4, M()]; case 1: return [4, r.sent().transaction(A).objectStore(A).get(k(e))]; case 2: return [2, r.sent()]; case 3: return (t = r.sent()) instanceof a.FirebaseError ? p.warn(t.message) : ((n = w.create("idb-get", { originalErrorMessage: null == t ? void 0 : t.message })), p.warn(n.message)), [3, 4]; case 4: return [2]; } }); }); } function O(e, t) { return i.__awaiter(this, void 0, void 0, function () { var n, r, o, s; return i.__generator(this, function (i) { switch (i.label) { case 0: return i.trys.push([0, 4, , 5]), [4, M()]; case 1: return (n = i.sent()), (r = n.transaction(A, "readwrite")), [4, r.objectStore(A).put(t, k(e))]; case 2: return i.sent(), [4, r.done]; case 3: return i.sent(), [3, 5]; case 4: return (o = i.sent()) instanceof a.FirebaseError ? p.warn(o.message) : ((s = w.create("idb-set", { originalErrorMessage: null == o ? void 0 : o.message })), p.warn(s.message)), [3, 5]; case 5: return [2]; } }); }); } function k(e) { return "".concat(e.name, "!").concat(e.options.appId); } var R = (function () { function e(e) { var t = this; (this.container = e), (this._heartbeatsCache = null); var n = this.container.getProvider("app").getImmediate(); (this._storage = new B(n)), (this._heartbeatsCachePromise = this._storage.read().then(function (e) { return (t._heartbeatsCache = e), e; })); } return ( (e.prototype.triggerHeartbeat = function () { return i.__awaiter(this, void 0, void 0, function () { var e, t, n, r; return i.__generator(this, function (i) { switch (i.label) { case 0: return (e = this.container.getProvider("platform-logger").getImmediate()), (t = e.getPlatformInfoString()), (n = D()), null !== this._heartbeatsCache ? [3, 2] : ((r = this), [4, this._heartbeatsCachePromise]); case 1: (r._heartbeatsCache = i.sent()), (i.label = 2); case 2: return this._heartbeatsCache.lastSentHeartbeatDate === n || this._heartbeatsCache.heartbeats.some(function (e) { return e.date === n; }) ? [2] : (this._heartbeatsCache.heartbeats.push({ date: n, agent: t }), (this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter(function (e) { var t = new Date(e.date).valueOf(); return Date.now() - t <= 2592e6; })), [2, this._storage.overwrite(this._heartbeatsCache)]); } }); }); }), (e.prototype.getHeartbeatsHeader = function () { return i.__awaiter(this, void 0, void 0, function () { var e, t, n, r, o; return i.__generator(this, function (s) { switch (s.label) { case 0: return null !== this._heartbeatsCache ? [3, 2] : [4, this._heartbeatsCachePromise]; case 1: s.sent(), (s.label = 2); case 2: return null === this._heartbeatsCache || 0 === this._heartbeatsCache.heartbeats.length ? [2, ""] : ((e = D()), (t = (function (e, t) { var n, r; void 0 === t && (t = 1024); var o = [], a = e.slice(), s = function (e) { var n = o.find(function (t) { return t.agent === e.agent; }); if (n) { if ((n.dates.push(e.date), F(o) > t)) return n.dates.pop(), "break"; } else if ((o.push({ agent: e.agent, dates: [e.date] }), F(o) > t)) return o.pop(), "break"; a = a.slice(1); }; try { for (var u = i.__values(e), l = u.next(); !l.done; l = u.next()) { if ("break" === s(l.value)) break; } } catch (e) { n = { error: e }; } finally { try { l && !l.done && (r = u.return) && r.call(u); } finally { if (n) throw n.error; } } return { heartbeatsToSend: o, unsentEntries: a }; })(this._heartbeatsCache.heartbeats)), (n = t.heartbeatsToSend), (r = t.unsentEntries), (o = a.base64urlEncodeWithoutPadding(JSON.stringify({ version: 2, heartbeats: n }))), (this._heartbeatsCache.lastSentHeartbeatDate = e), r.length > 0 ? ((this._heartbeatsCache.heartbeats = r), [4, this._storage.overwrite(this._heartbeatsCache)]) : [3, 4]); case 3: return s.sent(), [3, 5]; case 4: (this._heartbeatsCache.heartbeats = []), this._storage.overwrite(this._heartbeatsCache), (s.label = 5); case 5: return [2, o]; } }); }); }), e ); })(); function D() { return new Date().toISOString().substring(0, 10); } var N, B = (function () { function e(e) { (this.app = e), (this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck()); } return ( (e.prototype.runIndexedDBEnvironmentCheck = function () { return i.__awaiter(this, void 0, void 0, function () { return i.__generator(this, function (e) { return a.isIndexedDBAvailable() ? [ 2, a .validateIndexedDBOpenable() .then(function () { return !0; }) .catch(function () { return !1; }), ] : [2, !1]; }); }); }), (e.prototype.read = function () { return i.__awaiter(this, void 0, void 0, function () { return i.__generator(this, function (e) { switch (e.label) { case 0: return [4, this._canUseIndexedDBPromise]; case 1: return e.sent() ? [3, 2] : [2, { heartbeats: [] }]; case 2: return [4, P(this.app)]; case 3: return [2, e.sent() || { heartbeats: [] }]; } }); }); }), (e.prototype.overwrite = function (e) { var t; return i.__awaiter(this, void 0, void 0, function () { var n; return i.__generator(this, function (r) { switch (r.label) { case 0: return [4, this._canUseIndexedDBPromise]; case 1: return r.sent() ? [3, 2] : [2]; case 2: return [4, this.read()]; case 3: return (n = r.sent()), [2, O(this.app, { lastSentHeartbeatDate: null !== (t = e.lastSentHeartbeatDate) && void 0 !== t ? t : n.lastSentHeartbeatDate, heartbeats: e.heartbeats })]; } }); }); }), (e.prototype.add = function (e) { var t; return i.__awaiter(this, void 0, void 0, function () { var n; return i.__generator(this, function (r) { switch (r.label) { case 0: return [4, this._canUseIndexedDBPromise]; case 1: return r.sent() ? [3, 2] : [2]; case 2: return [4, this.read()]; case 3: return (n = r.sent()), [2, O(this.app, { lastSentHeartbeatDate: null !== (t = e.lastSentHeartbeatDate) && void 0 !== t ? t : n.lastSentHeartbeatDate, heartbeats: i.__spreadArray(i.__spreadArray([], i.__read(n.heartbeats), !1), i.__read(e.heartbeats), !1) })]; } }); }); }), e ); })(); function F(e) { return a.base64urlEncodeWithoutPadding(JSON.stringify({ version: 2, heartbeats: e })).length; } (N = "node"), y( new r.Component( "platform-logger", function (e) { return new u(e); }, "PRIVATE" ) ), y( new r.Component( "heartbeat", function (e) { return new R(e); }, "PRIVATE" ) ), x(d, h, N), x(d, h, "cjs5"), x("fire-js", ""), Object.defineProperty(t, "FirebaseError", { enumerable: !0, get: function () { return a.FirebaseError; }, }), (t.SDK_VERSION = "9.23.0"), (t._DEFAULT_ENTRY_NAME = f), (t._addComponent = v), (t._addOrOverwriteComponent = function (e, t) { e.container.addOrOverwriteComponent(t); }), (t._apps = g), (t._clearComponents = function () { m.clear(); }), (t._components = m), (t._getProvider = C), (t._registerComponent = y), (t._removeServiceInstance = function (e, t, n) { void 0 === n && (n = f), C(e, t).clearInstance(n); }), (t.deleteApp = function (e) { return i.__awaiter(this, void 0, void 0, function () { var t; return i.__generator(this, function (n) { switch (n.label) { case 0: return ( (t = e.name), g.has(t) ? (g.delete(t), [ 4, Promise.all( e.container.getProviders().map(function (e) { return e.delete(); }) ), ]) : [3, 2] ); case 1: n.sent(), (e.isDeleted = !0), (n.label = 2); case 2: return [2]; } }); }); }), (t.getApp = function (e) { void 0 === e && (e = f); var t = g.get(e); if (!t && e === f && a.getDefaultAppConfig()) return T(); if (!t) throw w.create("no-app", { appName: e }); return t; }), (t.getApps = function () { return Array.from(g.values()); }), (t.initializeApp = T), (t.onLog = function (e, t) { if (null !== e && "function" != typeof e) throw w.create("invalid-log-argument"); o.setUserLogHandler(e, t); }), (t.registerVersion = x), (t.setLogLevel = function (e) { o.setLogLevel(e); }); }, 42491: (e, t, n) => { "use strict"; var r = n(71470), i = n(99413), o = n(22970), a = n(4015), s = n(56630); function u() { return { "dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK." }; } const l = function () { return { "admin-restricted-operation": "This operation is restricted to administrators only.", "argument-error": "", "app-not-authorized": "This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.", "app-not-installed": "The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.", "captcha-check-failed": "The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.", "code-expired": "The SMS code has expired. Please re-send the verification code to try again.", "cordova-not-ready": "Cordova framework is not ready.", "cors-unsupported": "This browser is not supported.", "credential-already-in-use": "This credential is already associated with a different user account.", "custom-token-mismatch": "The custom token corresponds to a different audience.", "requires-recent-login": "This operation is sensitive and requires recent authentication. Log in again before retrying this request.", "dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.", "dynamic-link-not-activated": "Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.", "email-change-needs-verification": "Multi-factor users must always have a verified email.", "email-already-in-use": "The email address is already in use by another account.", "emulator-config-failed": 'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.', "expired-action-code": "The action code has expired.", "cancelled-popup-request": "This operation has been cancelled due to another conflicting popup being opened.", "internal-error": "An internal AuthError has occurred.", "invalid-app-credential": "The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.", "invalid-app-id": "The mobile app identifier is not registed for the current project.", "invalid-user-token": "This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.", "invalid-auth-event": "An internal AuthError has occurred.", "invalid-verification-code": "The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.", "invalid-continue-uri": "The continue URL provided in the request is invalid.", "invalid-cordova-configuration": "The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.", "invalid-custom-token": "The custom token format is incorrect. Please check the documentation.", "invalid-dynamic-link-domain": "The provided dynamic link domain is not configured or authorized for the current project.", "invalid-email": "The email address is badly formatted.", "invalid-emulator-scheme": "Emulator URL must start with a valid scheme (http:// or https://).", "invalid-api-key": "Your API key is invalid, please check you have copied it correctly.", "invalid-cert-hash": "The SHA-1 certificate hash provided is invalid.", "invalid-credential": "The supplied auth credential is malformed or has expired.", "invalid-message-payload": "The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.", "invalid-multi-factor-session": "The request does not contain a valid proof of first factor successful sign-in.", "invalid-oauth-provider": "EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.", "invalid-oauth-client-id": "The OAuth client ID provided is either invalid or does not match the specified API key.", "unauthorized-domain": "This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.", "invalid-action-code": "The action code is invalid. This can happen if the code is malformed, expired, or has already been used.", "wrong-password": "The password is invalid or the user does not have a password.", "invalid-persistence-type": "The specified persistence type is invalid. It can only be local, session or none.", "invalid-phone-number": "The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].", "invalid-provider-id": "The specified provider ID is invalid.", "invalid-recipient-email": "The email corresponding to this action failed to send as the provided recipient email address is invalid.", "invalid-sender": "The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.", "invalid-verification-id": "The verification ID used to create the phone auth credential is invalid.", "invalid-tenant-id": "The Auth instance's tenant ID is invalid.", "login-blocked": "Login blocked by user-provided method: {$originalMessage}", "missing-android-pkg-name": "An Android Package Name must be provided if the Android App is required to be installed.", "auth-domain-config-required": "Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.", "missing-app-credential": "The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.", "missing-verification-code": "The phone auth credential was created with an empty SMS verification code.", "missing-continue-uri": "A continue URL must be provided in the request.", "missing-iframe-start": "An internal AuthError has occurred.", "missing-ios-bundle-id": "An iOS Bundle ID must be provided if an App Store ID is provided.", "missing-or-invalid-nonce": "The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.", "missing-password": "A non-empty password must be provided", "missing-multi-factor-info": "No second factor identifier is provided.", "missing-multi-factor-session": "The request is missing proof of first factor successful sign-in.", "missing-phone-number": "To send verification codes, provide a phone number for the recipient.", "missing-verification-id": "The phone auth credential was created with an empty verification ID.", "app-deleted": "This instance of FirebaseApp has been deleted.", "multi-factor-info-not-found": "The user does not have a second factor matching the identifier provided.", "multi-factor-auth-required": "Proof of ownership of a second factor is required to complete sign-in.", "account-exists-with-different-credential": "An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.", "network-request-failed": "A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.", "no-auth-event": "An internal AuthError has occurred.", "no-such-provider": "User was not linked to an account with the given provider.", "null-user": "A null user object was provided as the argument for an operation which requires a non-null user object.", "operation-not-allowed": "The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.", "operation-not-supported-in-this-environment": 'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.', "popup-blocked": "Unable to establish a connection with the popup. It may have been blocked by the browser.", "popup-closed-by-user": "The popup has been closed by the user before finalizing the operation.", "provider-already-linked": "User can only be linked to one identity for the given provider.", "quota-exceeded": "The project's quota for this operation has been exceeded.", "redirect-cancelled-by-user": "The redirect operation has been cancelled by the user before finalizing.", "redirect-operation-pending": "A redirect sign-in operation is already pending.", "rejected-credential": "The request contains malformed or mismatching credentials.", "second-factor-already-in-use": "The second factor is already enrolled on this account.", "maximum-second-factor-count-exceeded": "The maximum allowed number of second factors on a user has been exceeded.", "tenant-id-mismatch": "The provided tenant ID does not match the Auth instance's tenant ID", timeout: "The operation has timed out.", "user-token-expired": "The user's credential is no longer valid. The user must sign in again.", "too-many-requests": "We have blocked all requests from this device due to unusual activity. Try again later.", "unauthorized-continue-uri": "The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.", "unsupported-first-factor": "Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.", "unsupported-persistence-type": "The current environment does not support the specified persistence type.", "unsupported-tenant-operation": "This operation is not supported in a multi-tenant context.", "unverified-email": "The operation requires a verified email.", "user-cancelled": "The user did not grant your application the permissions it requested.", "user-not-found": "There is no user record corresponding to this identifier. The user may have been deleted.", "user-disabled": "The user account has been disabled by an administrator.", "user-mismatch": "The supplied credentials do not correspond to the previously signed in user.", "user-signed-out": "", "weak-password": "The password must be 6 characters long or more.", "web-storage-unsupported": "This browser is not supported or 3rd party cookies and data may be disabled.", "already-initialized": "initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.", "missing-recaptcha-token": "The reCAPTCHA token is missing when sending request to the backend.", "invalid-recaptcha-token": "The reCAPTCHA token is invalid when sending request to the backend.", "invalid-recaptcha-action": "The reCAPTCHA action is invalid when sending request to the backend.", "recaptcha-not-enabled": "reCAPTCHA Enterprise integration is not enabled for this project.", "missing-client-type": "The reCAPTCHA client type is missing when sending request to the backend.", "missing-recaptcha-version": "The reCAPTCHA version is missing when sending request to the backend.", "invalid-req-type": "Invalid request parameters.", "invalid-recaptcha-version": "The reCAPTCHA version is invalid when sending request to the backend." }; }, c = u, d = new r.ErrorFactory("auth", "Firebase", { "dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK." }), h = new a.Logger("@firebase/auth"); function p(e, ...t) { h.logLevel <= a.LogLevel.ERROR && h.error(`Auth (${i.SDK_VERSION}): ${e}`, ...t); } function f(e, ...t) { throw v(e, ...t); } function _(e, ...t) { return v(e, ...t); } function g(e, t, n) { const i = Object.assign(Object.assign({}, c()), { [t]: n }); return new r.ErrorFactory("auth", "Firebase", i).create(t, { appName: e.name }); } function m(e, t, n) { if (!(t instanceof n)) throw (n.name !== t.constructor.name && f(e, "argument-error"), g(e, "argument-error", `Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)); } function v(e, ...t) { if ("string" != typeof e) { const n = t[0], r = [...t.slice(1)]; return r[0] && (r[0].appName = e.name), e._errorFactory.create(n, ...r); } return d.create(e, ...t); } function y(e, t, ...n) { if (!e) throw v(t, ...n); } function C(e) { const t = "INTERNAL ASSERTION FAILED: " + e; throw (p(t), new Error(t)); } function b(e, t) { e || C(t); } function w() { var e; return ("undefined" != typeof self && (null === (e = self.location) || void 0 === e ? void 0 : e.href)) || ""; } function S() { return "http:" === T() || "https:" === T(); } function T() { var e; return ("undefined" != typeof self && (null === (e = self.location) || void 0 === e ? void 0 : e.protocol)) || null; } class x { constructor(e, t) { (this.shortDelay = e), (this.longDelay = t), b(t > e, "Short delay should be less than long delay!"), (this.isMobile = r.isMobileCordova() || r.isReactNative()); } get() { return "undefined" != typeof navigator && navigator && "onLine" in navigator && "boolean" == typeof navigator.onLine && (S() || r.isBrowserExtension() || "connection" in navigator) && !navigator.onLine ? Math.min(5e3, this.shortDelay) : this.isMobile ? this.longDelay : this.shortDelay; } } function E(e, t) { b(e.emulator, "Emulator should always be set here"); const { url: n } = e.emulator; return t ? `${n}${t.startsWith("/") ? t.slice(1) : t}` : n; } class L { static initialize(e, t, n) { (this.fetchImpl = e), t && (this.headersImpl = t), n && (this.responseImpl = n); } static fetch() { return this.fetchImpl ? this.fetchImpl : "undefined" != typeof self && "fetch" in self ? self.fetch : void C("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill"); } static headers() { return this.headersImpl ? this.headersImpl : "undefined" != typeof self && "Headers" in self ? self.Headers : void C("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill"); } static response() { return this.responseImpl ? this.responseImpl : "undefined" != typeof self && "Response" in self ? self.Response : void C("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill"); } } const A = { CREDENTIAL_MISMATCH: "custom-token-mismatch", MISSING_CUSTOM_TOKEN: "internal-error", INVALID_IDENTIFIER: "invalid-email", MISSING_CONTINUE_URI: "internal-error", INVALID_PASSWORD: "wrong-password", MISSING_PASSWORD: "missing-password", EMAIL_EXISTS: "email-already-in-use", PASSWORD_LOGIN_DISABLED: "operation-not-allowed", INVALID_IDP_RESPONSE: "invalid-credential", INVALID_PENDING_TOKEN: "invalid-credential", FEDERATED_USER_ID_ALREADY_LINKED: "credential-already-in-use", MISSING_REQ_TYPE: "internal-error", EMAIL_NOT_FOUND: "user-not-found", RESET_PASSWORD_EXCEED_LIMIT: "too-many-requests", EXPIRED_OOB_CODE: "expired-action-code", INVALID_OOB_CODE: "invalid-action-code", MISSING_OOB_CODE: "internal-error", CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "requires-recent-login", INVALID_ID_TOKEN: "invalid-user-token", TOKEN_EXPIRED: "user-token-expired", USER_NOT_FOUND: "user-token-expired", TOO_MANY_ATTEMPTS_TRY_LATER: "too-many-requests", INVALID_CODE: "invalid-verification-code", INVALID_SESSION_INFO: "invalid-verification-id", INVALID_TEMPORARY_PROOF: "invalid-credential", MISSING_SESSION_INFO: "missing-verification-id", SESSION_EXPIRED: "code-expired", MISSING_ANDROID_PACKAGE_NAME: "missing-android-pkg-name", UNAUTHORIZED_DOMAIN: "unauthorized-continue-uri", INVALID_OAUTH_CLIENT_ID: "invalid-oauth-client-id", ADMIN_ONLY_OPERATION: "admin-restricted-operation", INVALID_MFA_PENDING_CREDENTIAL: "invalid-multi-factor-session", MFA_ENROLLMENT_NOT_FOUND: "multi-factor-info-not-found", MISSING_MFA_ENROLLMENT_ID: "missing-multi-factor-info", MISSING_MFA_PENDING_CREDENTIAL: "missing-multi-factor-session", SECOND_FACTOR_EXISTS: "second-factor-already-in-use", SECOND_FACTOR_LIMIT_EXCEEDED: "maximum-second-factor-count-exceeded", BLOCKING_FUNCTION_ERROR_RESPONSE: "internal-error", RECAPTCHA_NOT_ENABLED: "recaptcha-not-enabled", MISSING_RECAPTCHA_TOKEN: "missing-recaptcha-token", INVALID_RECAPTCHA_TOKEN: "invalid-recaptcha-token", INVALID_RECAPTCHA_ACTION: "invalid-recaptcha-action", MISSING_CLIENT_TYPE: "missing-client-type", MISSING_RECAPTCHA_VERSION: "missing-recaptcha-version", INVALID_RECAPTCHA_VERSION: "invalid-recaptcha-version", INVALID_REQ_TYPE: "invalid-req-type" }, I = new x(3e4, 6e4); function M(e, t) { return e.tenantId && !t.tenantId ? Object.assign(Object.assign({}, t), { tenantId: e.tenantId }) : t; } async function P(e, t, n, i, o = {}) { return O(e, o, async () => { let o = {}, a = {}; i && ("GET" === t ? (a = i) : (o = { body: JSON.stringify(i) })); const s = r.querystring(Object.assign({ key: e.config.apiKey }, a)).slice(1), u = await e._getAdditionalHeaders(); return (u["Content-Type"] = "application/json"), e.languageCode && (u["X-Firebase-Locale"] = e.languageCode), L.fetch()(R(e, e.config.apiHost, n, s), Object.assign({ method: t, headers: u, referrerPolicy: "no-referrer" }, o)); }); } async function O(e, t, n) { e._canInitEmulator = !1; const i = Object.assign(Object.assign({}, A), t); try { const t = new D(e), r = await Promise.race([n(), t.promise]); t.clearNetworkTimeout(); const o = await r.json(); if ("needConfirmation" in o) throw N(e, "account-exists-with-different-credential", o); if (r.ok && !("errorMessage" in o)) return o; { const t = r.ok ? o.errorMessage : o.error.message, [n, a] = t.split(" : "); if ("FEDERATED_USER_ID_ALREADY_LINKED" === n) throw N(e, "credential-already-in-use", o); if ("EMAIL_EXISTS" === n) throw N(e, "email-already-in-use", o); if ("USER_DISABLED" === n) throw N(e, "user-disabled", o); const s = i[n] || n.toLowerCase().replace(/[_\s]+/g, "-"); if (a) throw g(e, s, a); f(e, s); } } catch (t) { if (t instanceof r.FirebaseError) throw t; f(e, "network-request-failed", { message: String(t) }); } } async function k(e, t, n, r, i = {}) { const o = await P(e, t, n, r, i); return "mfaPendingCredential" in o && f(e, "multi-factor-auth-required", { _serverResponse: o }), o; } function R(e, t, n, r) { const i = `${t}${n}?${r}`; return e.config.emulator ? E(e.config, i) : `${e.config.apiScheme}://${i}`; } class D { constructor(e) { (this.auth = e), (this.timer = null), (this.promise = new Promise((e, t) => { this.timer = setTimeout(() => t(_(this.auth, "network-request-failed")), I.get()); })); } clearNetworkTimeout() { clearTimeout(this.timer); } } function N(e, t, n) { const r = { appName: e.name }; n.email && (r.email = n.email), n.phoneNumber && (r.phoneNumber = n.phoneNumber); const i = _(e, t, r); return (i.customData._tokenResponse = n), i; } function B(e) { if (e) try { const t = new Date(Number(e)); if (!isNaN(t.getTime())) return t.toUTCString(); } catch (e) {} } async function F(e, t = !1) { const n = r.getModularInstance(e), i = await n.getIdToken(t), o = j(i); y(o && o.exp && o.auth_time && o.iat, n.auth, "internal-error"); const a = "object" == typeof o.firebase ? o.firebase : void 0, s = null == a ? void 0 : a.sign_in_provider; return { claims: o, token: i, authTime: B(U(o.auth_time)), issuedAtTime: B(U(o.iat)), expirationTime: B(U(o.exp)), signInProvider: s || null, signInSecondFactor: (null == a ? void 0 : a.sign_in_second_factor) || null }; } function U(e) { return 1e3 * Number(e); } function j(e) { const [t, n, i] = e.split("."); if (void 0 === t || void 0 === n || void 0 === i) return p("JWT malformed, contained fewer than 3 sections"), null; try { const e = r.base64Decode(n); return e ? JSON.parse(e) : (p("Failed to decode base64 JWT payload"), null); } catch (e) { return p("Caught error parsing JWT payload as JSON", null == e ? void 0 : e.toString()), null; } } async function G(e, t, n = !1) { if (n) return t; try { return await t; } catch (t) { throw ( (t instanceof r.FirebaseError && (function ({ code: e }) { return "auth/user-disabled" === e || "auth/user-token-expired" === e; })(t) && e.auth.currentUser === e && (await e.auth.signOut()), t) ); } } class H { constructor(e) { (this.user = e), (this.isRunning = !1), (this.timerId = null), (this.errorBackoff = 3e4); } _start() { this.isRunning || ((this.isRunning = !0), this.schedule()); } _stop() { this.isRunning && ((this.isRunning = !1), null !== this.timerId && clearTimeout(this.timerId)); } getInterval(e) { var t; if (e) { const e = this.errorBackoff; return (this.errorBackoff = Math.min(2 * this.errorBackoff, 96e4)), e; } { this.errorBackoff = 3e4; const e = (null !== (t = this.user.stsTokenManager.expirationTime) && void 0 !== t ? t : 0) - Date.now() - 3e5; return Math.max(0, e); } } schedule(e = !1) { if (!this.isRunning) return; const t = this.getInterval(e); this.timerId = setTimeout(async () => { await this.iteration(); }, t); } async iteration() { try { await this.user.getIdToken(!0); } catch (e) { return void ("auth/network-request-failed" === (null == e ? void 0 : e.code) && this.schedule(!0)); } this.schedule(); } } class V { constructor(e, t) { (this.createdAt = e), (this.lastLoginAt = t), this._initializeTime(); } _initializeTime() { (this.lastSignInTime = B(this.lastLoginAt)), (this.creationTime = B(this.createdAt)); } _copy(e) { (this.createdAt = e.createdAt), (this.lastLoginAt = e.lastLoginAt), this._initializeTime(); } toJSON() { return { createdAt: this.createdAt, lastLoginAt: this.lastLoginAt }; } } async function Z(e) { var t; const n = e.auth, r = await e.getIdToken(), i = await G( e, (async function (e, t) { return P(e, "POST", "/v1/accounts:lookup", t); })(n, { idToken: r }) ); y(null == i ? void 0 : i.users.length, n, "internal-error"); const a = i.users[0]; e._notifyReloadListener(a); const s = (null === (t = a.providerUserInfo) || void 0 === t ? void 0 : t.length) ? a.providerUserInfo.map((e) => { var { providerId: t } = e, n = o.__rest(e, ["providerId"]); return { providerId: t, uid: n.rawId || "", displayName: n.displayName || null, email: n.email || null, phoneNumber: n.phoneNumber || null, photoURL: n.photoUrl || null }; }) : []; const u = ((l = e.providerData), (c = s), [...l.filter((e) => !c.some((t) => t.providerId === e.providerId)), ...c]); var l, c; const d = e.isAnonymous, h = !((e.email && a.passwordHash) || (null == u ? void 0 : u.length)), p = !!d && h, f = { uid: a.localId, displayName: a.displayName || null, photoURL: a.photoUrl || null, email: a.email || null, emailVerified: a.emailVerified || !1, phoneNumber: a.phoneNumber || null, tenantId: a.tenantId || null, providerData: u, metadata: new V(a.createdAt, a.lastLoginAt), isAnonymous: p }; Object.assign(e, f); } async function z(e) { const t = r.getModularInstance(e); await Z(t), await t.auth._persistUserIfCurrent(t), t.auth._notifyListenersIfCurrent(t); } class Y { constructor() { (this.refreshToken = null), (this.accessToken = null), (this.expirationTime = null); } get isExpired() { return !this.expirationTime || Date.now() > this.expirationTime - 3e4; } updateFromServerResponse(e) { y(e.idToken, "internal-error"), y(void 0 !== e.idToken, "internal-error"), y(void 0 !== e.refreshToken, "internal-error"); const t = "expiresIn" in e && void 0 !== e.expiresIn ? Number(e.expiresIn) : (function (e) { const t = j(e); return y(t, "internal-error"), y(void 0 !== t.exp, "internal-error"), y(void 0 !== t.iat, "internal-error"), Number(t.exp) - Number(t.iat); })(e.idToken); this.updateTokensAndExpiration(e.idToken, e.refreshToken, t); } async getToken(e, t = !1) { return y(!this.accessToken || this.refreshToken, e, "user-token-expired"), t || !this.accessToken || this.isExpired ? (this.refreshToken ? (await this.refresh(e, this.refreshToken), this.accessToken) : null) : this.accessToken; } clearRefreshToken() { this.refreshToken = null; } async refresh(e, t) { const { accessToken: n, refreshToken: i, expiresIn: o, } = await (async function (e, t) { const n = await O(e, {}, async () => { const n = r.querystring({ grant_type: "refresh_token", refresh_token: t }).slice(1), { tokenApiHost: i, apiKey: o } = e.config, a = R(e, i, "/v1/token", `key=${o}`), s = await e._getAdditionalHeaders(); return (s["Content-Type"] = "application/x-www-form-urlencoded"), L.fetch()(a, { method: "POST", headers: s, body: n }); }); return { accessToken: n.access_token, expiresIn: n.expires_in, refreshToken: n.refresh_token }; })(e, t); this.updateTokensAndExpiration(n, i, Number(o)); } updateTokensAndExpiration(e, t, n) { (this.refreshToken = t || null), (this.accessToken = e || null), (this.expirationTime = Date.now() + 1e3 * n); } static fromJSON(e, t) { const { refreshToken: n, accessToken: r, expirationTime: i } = t, o = new Y(); return n && (y("string" == typeof n, "internal-error", { appName: e }), (o.refreshToken = n)), r && (y("string" == typeof r, "internal-error", { appName: e }), (o.accessToken = r)), i && (y("number" == typeof i, "internal-error", { appName: e }), (o.expirationTime = i)), o; } toJSON() { return { refreshToken: this.refreshToken, accessToken: this.accessToken, expirationTime: this.expirationTime }; } _assign(e) { (this.accessToken = e.accessToken), (this.refreshToken = e.refreshToken), (this.expirationTime = e.expirationTime); } _clone() { return Object.assign(new Y(), this.toJSON()); } _performRefresh() { return C("not implemented"); } } function W(e, t) { y("string" == typeof e || void 0 === e, "internal-error", { appName: t }); } class X { constructor(e) { var { uid: t, auth: n, stsTokenManager: r } = e, i = o.__rest(e, ["uid", "auth", "stsTokenManager"]); (this.providerId = "firebase"), (this.proactiveRefresh = new H(this)), (this.reloadUserInfo = null), (this.reloadListener = null), (this.uid = t), (this.auth = n), (this.stsTokenManager = r), (this.accessToken = r.accessToken), (this.displayName = i.displayName || null), (this.email = i.email || null), (this.emailVerified = i.emailVerified || !1), (this.phoneNumber = i.phoneNumber || null), (this.photoURL = i.photoURL || null), (this.isAnonymous = i.isAnonymous || !1), (this.tenantId = i.tenantId || null), (this.providerData = i.providerData ? [...i.providerData] : []), (this.metadata = new V(i.createdAt || void 0, i.lastLoginAt || void 0)); } async getIdToken(e) { const t = await G(this, this.stsTokenManager.getToken(this.auth, e)); return y(t, this.auth, "internal-error"), this.accessToken !== t && ((this.accessToken = t), await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t; } getIdTokenResult(e) { return F(this, e); } reload() { return z(this); } _assign(e) { this !== e && (y(this.uid === e.uid, this.auth, "internal-error"), (this.displayName = e.displayName), (this.photoURL = e.photoURL), (this.email = e.email), (this.emailVerified = e.emailVerified), (this.phoneNumber = e.phoneNumber), (this.isAnonymous = e.isAnonymous), (this.tenantId = e.tenantId), (this.providerData = e.providerData.map((e) => Object.assign({}, e))), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager)); } _clone(e) { const t = new X(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() })); return t.metadata._copy(this.metadata), t; } _onReload(e) { y(!this.reloadListener, this.auth, "internal-error"), (this.reloadListener = e), this.reloadUserInfo && (this._notifyReloadListener(this.reloadUserInfo), (this.reloadUserInfo = null)); } _notifyReloadListener(e) { this.reloadListener ? this.reloadListener(e) : (this.reloadUserInfo = e); } _startProactiveRefresh() { this.proactiveRefresh._start(); } _stopProactiveRefresh() { this.proactiveRefresh._stop(); } async _updateTokensIfNecessary(e, t = !1) { let n = !1; e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), (n = !0)), t && (await Z(this)), await this.auth._persistUserIfCurrent(this), n && this.auth._notifyListenersIfCurrent(this); } async delete() { const e = await this.getIdToken(); return ( await G( this, (async function (e, t) { return P(e, "POST", "/v1/accounts:delete", t); })(this.auth, { idToken: e }) ), this.stsTokenManager.clearRefreshToken(), this.auth.signOut() ); } toJSON() { return Object.assign(Object.assign({ uid: this.uid, email: this.email || void 0, emailVerified: this.emailVerified, displayName: this.displayName || void 0, isAnonymous: this.isAnonymous, photoURL: this.photoURL || void 0, phoneNumber: this.phoneNumber || void 0, tenantId: this.tenantId || void 0, providerData: this.providerData.map((e) => Object.assign({}, e)), stsTokenManager: this.stsTokenManager.toJSON(), _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), { apiKey: this.auth.config.apiKey, appName: this.auth.name }); } get refreshToken() { return this.stsTokenManager.refreshToken || ""; } static _fromJSON(e, t) { var n, r, i, o, a, s, u, l; const c = null !== (n = t.displayName) && void 0 !== n ? n : void 0, d = null !== (r = t.email) && void 0 !== r ? r : void 0, h = null !== (i = t.phoneNumber) && void 0 !== i ? i : void 0, p = null !== (o = t.photoURL) && void 0 !== o ? o : void 0, f = null !== (a = t.tenantId) && void 0 !== a ? a : void 0, _ = null !== (s = t._redirectEventId) && void 0 !== s ? s : void 0, g = null !== (u = t.createdAt) && void 0 !== u ? u : void 0, m = null !== (l = t.lastLoginAt) && void 0 !== l ? l : void 0, { uid: v, emailVerified: C, isAnonymous: b, providerData: w, stsTokenManager: S } = t; y(v && S, e, "internal-error"); const T = Y.fromJSON(this.name, S); y("string" == typeof v, e, "internal-error"), W(c, e.name), W(d, e.name), y("boolean" == typeof C, e, "internal-error"), y("boolean" == typeof b, e, "internal-error"), W(h, e.name), W(p, e.name), W(f, e.name), W(_, e.name), W(g, e.name), W(m, e.name); const x = new X({ uid: v, auth: e, email: d, emailVerified: C, displayName: c, isAnonymous: b, photoURL: p, phoneNumber: h, tenantId: f, stsTokenManager: T, createdAt: g, lastLoginAt: m }); return w && Array.isArray(w) && (x.providerData = w.map((e) => Object.assign({}, e))), _ && (x._redirectEventId = _), x; } static async _fromIdTokenResponse(e, t, n = !1) { const r = new Y(); r.updateFromServerResponse(t); const i = new X({ uid: t.localId, auth: e, stsTokenManager: r, isAnonymous: n }); return await Z(i), i; } } const q = new Map(); function K(e) { b(e instanceof Function, "Expected a class definition"); let t = q.get(e); return t ? (b(t instanceof e, "Instance stored in cache mismatched with class"), t) : ((t = new e()), q.set(e, t), t); } class $ { constructor() { (this.type = "NONE"), (this.storage = {}); } async _isAvailable() { return !0; } async _set(e, t) { this.storage[e] = t; } async _get(e) { const t = this.storage[e]; return void 0 === t ? null : t; } async _remove(e) { delete this.storage[e]; } _addListener(e, t) {} _removeListener(e, t) {} } $.type = "NONE"; const J = $; function Q(e, t, n) { return `firebase:${e}:${t}:${n}`; } class ee { constructor(e, t, n) { (this.persistence = e), (this.auth = t), (this.userKey = n); const { config: r, name: i } = this.auth; (this.fullUserKey = Q(this.userKey, r.apiKey, i)), (this.fullPersistenceKey = Q("persistence", r.apiKey, i)), (this.boundEventHandler = t._onStorageEvent.bind(t)), this.persistence._addListener(this.fullUserKey, this.boundEventHandler); } setCurrentUser(e) { return this.persistence._set(this.fullUserKey, e.toJSON()); } async getCurrentUser() { const e = await this.persistence._get(this.fullUserKey); return e ? X._fromJSON(this.auth, e) : null; } removeCurrentUser() { return this.persistence._remove(this.fullUserKey); } savePersistenceForRedirect() { return this.persistence._set(this.fullPersistenceKey, this.persistence.type); } async setPersistence(e) { if (this.persistence === e) return; const t = await this.getCurrentUser(); return await this.removeCurrentUser(), (this.persistence = e), t ? this.setCurrentUser(t) : void 0; } delete() { this.persistence._removeListener(this.fullUserKey, this.boundEventHandler); } static async create(e, t, n = "authUser") { if (!t.length) return new ee(K(J), e, n); const r = ( await Promise.all( t.map(async (e) => { if (await e._isAvailable()) return e; }) ) ).filter((e) => e); let i = r[0] || K(J); const o = Q(n, e.config.apiKey, e.name); let a = null; for (const n of t) try { const t = await n._get(o); if (t) { const r = X._fromJSON(e, t); n !== i && (a = r), (i = n); break; } } catch (e) {} const s = r.filter((e) => e._shouldAllowMigration); return i._shouldAllowMigration && s.length ? ((i = s[0]), a && (await i._set(o, a.toJSON())), await Promise.all( t.map(async (e) => { if (e !== i) try { await e._remove(o); } catch (e) {} }) ), new ee(i, e, n)) : new ee(i, e, n); } } function te(e) { const t = e.toLowerCase(); if (t.includes("opera/") || t.includes("opr/") || t.includes("opios/")) return "Opera"; if (oe(t)) return "IEMobile"; if (t.includes("msie") || t.includes("trident/")) return "IE"; if (t.includes("edge/")) return "Edge"; if (ne(t)) return "Firefox"; if (t.includes("silk/")) return "Silk"; if (se(t)) return "Blackberry"; if (ue(t)) return "Webos"; if (re(t)) return "Safari"; if ((t.includes("chrome/") || ie(t)) && !t.includes("edge/")) return "Chrome"; if (ae(t)) return "Android"; { const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, n = e.match(t); if (2 === (null == n ? void 0 : n.length)) return n[1]; } return "Other"; } function ne(e = r.getUA()) { return /firefox\//i.test(e); } function re(e = r.getUA()) { const t = e.toLowerCase(); return t.includes("safari/") && !t.includes("chrome/") && !t.includes("crios/") && !t.includes("android"); } function ie(e = r.getUA()) { return /crios\//i.test(e); } function oe(e = r.getUA()) { return /iemobile/i.test(e); } function ae(e = r.getUA()) { return /android/i.test(e); } function se(e = r.getUA()) { return /blackberry/i.test(e); } function ue(e = r.getUA()) { return /webos/i.test(e); } function le(e = r.getUA()) { return /iphone|ipad|ipod/i.test(e) || (/macintosh/i.test(e) && /mobile/i.test(e)); } function ce(e = r.getUA()) { return le(e) || ae(e) || ue(e) || se(e) || /windows phone/i.test(e) || oe(e); } function de(e, t = []) { let n; switch (e) { case "Browser": n = te(r.getUA()); break; case "Worker": n = `${te(r.getUA())}-${e}`; break; default: n = e; } const o = t.length ? t.join(",") : "FirebaseCore-web"; return `${n}/JsCore/${i.SDK_VERSION}/${o}`; } async function he(e, t) { return P(e, "GET", "/v2/recaptchaConfig", M(e, t)); } function pe(e) { return void 0 !== e && void 0 !== e.getResponse; } function fe(e) { return void 0 !== e && void 0 !== e.enterprise; } class _e { constructor(e) { if (((this.siteKey = ""), (this.emailPasswordEnabled = !1), void 0 === e.recaptchaKey)) throw new Error("recaptchaKey undefined"); (this.siteKey = e.recaptchaKey.split("/")[3]), (this.emailPasswordEnabled = e.recaptchaEnforcementState.some((e) => "EMAIL_PASSWORD_PROVIDER" === e.provider && "OFF" !== e.enforcementState)); } } function ge(e) { return new Promise((t, n) => { const r = document.createElement("script"); var i, o; r.setAttribute("src", e), (r.onload = t), (r.onerror = (e) => { const t = _("internal-error"); (t.customData = e), n(t); }), (r.type = "text/javascript"), (r.charset = "UTF-8"), (null !== (o = null === (i = document.getElementsByTagName("head")) || void 0 === i ? void 0 : i[0]) && void 0 !== o ? o : document).appendChild(r); }); } function me(e) { return `__${e}${Math.floor(1e6 * Math.random())}`; } class ve { constructor(e) { (this.type = "recaptcha-enterprise"), (this.auth = we(e)); } async verify(e = "verify", t = !1) { function n(t, n, r) { const i = window.grecaptcha; fe(i) ? i.enterprise.ready(() => { i.enterprise .execute(t, { action: e }) .then((e) => { n(e); }) .catch(() => { n("NO_RECAPTCHA"); }); }) : r(Error("No reCAPTCHA enterprise script loaded.")); } return new Promise((e, r) => { (async function (e) { if (!t) { if (null == e.tenantId && null != e._agentRecaptchaConfig) return e._agentRecaptchaConfig.siteKey; if (null != e.tenantId && void 0 !== e._tenantRecaptchaConfigs[e.tenantId]) return e._tenantRecaptchaConfigs[e.tenantId].siteKey; } return new Promise(async (t, n) => { he(e, { clientType: "CLIENT_TYPE_WEB", version: "RECAPTCHA_ENTERPRISE" }) .then((r) => { if (void 0 !== r.recaptchaKey) { const n = new _e(r); return null == e.tenantId ? (e._agentRecaptchaConfig = n) : (e._tenantRecaptchaConfigs[e.tenantId] = n), t(n.siteKey); } n(new Error("recaptcha Enterprise site key undefined")); }) .catch((e) => { n(e); }); }); })(this.auth) .then((i) => { if (!t && fe(window.grecaptcha)) n(i, e, r); else { if ("undefined" == typeof window) return void r(new Error("RecaptchaVerifier is only supported in browser")); ge("https://www.google.com/recaptcha/enterprise.js?render=" + i) .then(() => { n(i, e, r); }) .catch((e) => { r(e); }); } }) .catch((e) => { r(e); }); }); } } async function ye(e, t, n, r = !1) { const i = new ve(e); let o; try { o = await i.verify(n); } catch (e) { o = await i.verify(n, !0); } const a = Object.assign({}, t); return r ? Object.assign(a, { captchaResp: o }) : Object.assign(a, { captchaResponse: o }), Object.assign(a, { clientType: "CLIENT_TYPE_WEB" }), Object.assign(a, { recaptchaVersion: "RECAPTCHA_ENTERPRISE" }), a; } class Ce { constructor(e) { (this.auth = e), (this.queue = []); } pushCallback(e, t) { const n = (t) => new Promise((n, r) => { try { n(e(t)); } catch (e) { r(e); } }); (n.onAbort = t), this.queue.push(n); const r = this.queue.length - 1; return () => { this.queue[r] = () => Promise.resolve(); }; } async runMiddleware(e) { if (this.auth.currentUser === e) return; const t = []; try { for (const n of this.queue) await n(e), n.onAbort && t.push(n.onAbort); } catch (e) { t.reverse(); for (const e of t) try { e(); } catch (e) {} throw this.auth._errorFactory.create("login-blocked", { originalMessage: null == e ? void 0 : e.message }); } } } class be { constructor(e, t, n, r) { (this.app = e), (this.heartbeatServiceProvider = t), (this.appCheckServiceProvider = n), (this.config = r), (this.currentUser = null), (this.emulatorConfig = null), (this.operations = Promise.resolve()), (this.authStateSubscription = new Se(this)), (this.idTokenSubscription = new Se(this)), (this.beforeStateQueue = new Ce(this)), (this.redirectUser = null), (this.isProactiveRefreshEnabled = !1), (this._canInitEmulator = !0), (this._isInitialized = !1), (this._deleted = !1), (this._initializationPromise = null), (this._popupRedirectResolver = null), (this._errorFactory = d), (this._agentRecaptchaConfig = null), (this._tenantRecaptchaConfigs = {}), (this.lastNotifiedUid = void 0), (this.languageCode = null), (this.tenantId = null), (this.settings = { appVerificationDisabledForTesting: !1 }), (this.frameworks = []), (this.name = e.name), (this.clientVersion = r.sdkClientVersion); } _initializeWithPersistence(e, t) { return ( t && (this._popupRedirectResolver = K(t)), (this._initializationPromise = this.queue(async () => { var n, r; if (!this._deleted && ((this.persistenceManager = await ee.create(this, e)), !this._deleted)) { if (null === (n = this._popupRedirectResolver) || void 0 === n ? void 0 : n._shouldInitProactively) try { await this._popupRedirectResolver._initialize(this); } catch (e) {} await this.initializeCurrentUser(t), (this.lastNotifiedUid = (null === (r = this.currentUser) || void 0 === r ? void 0 : r.uid) || null), this._deleted || (this._isInitialized = !0); } })), this._initializationPromise ); } async _onStorageEvent() { if (this._deleted) return; const e = await this.assertedPersistence.getCurrentUser(); return this.currentUser || e ? (this.currentUser && e && this.currentUser.uid === e.uid ? (this._currentUser._assign(e), void (await this.currentUser.getIdToken())) : void (await this._updateCurrentUser(e, !0))) : void 0; } async initializeCurrentUser(e) { var t; const n = await this.assertedPersistence.getCurrentUser(); let r = n, i = !1; if (e && this.config.authDomain) { await this.getOrInitRedirectPersistenceManager(); const n = null === (t = this.redirectUser) || void 0 === t ? void 0 : t._redirectEventId, o = null == r ? void 0 : r._redirectEventId, a = await this.tryRedirectSignIn(e); (n && n !== o) || !(null == a ? void 0 : a.user) || ((r = a.user), (i = !0)); } if (!r) return this.directlySetCurrentUser(null); if (!r._redirectEventId) { if (i) try { await this.beforeStateQueue.runMiddleware(r); } catch (e) { (r = n), this._popupRedirectResolver._overrideRedirectResult(this, () => Promise.reject(e)); } return r ? this.reloadAndSetCurrentUserOrClear(r) : this.directlySetCurrentUser(null); } return y(this._popupRedirectResolver, this, "argument-error"), await this.getOrInitRedirectPersistenceManager(), this.redirectUser && this.redirectUser._redirectEventId === r._redirectEventId ? this.directlySetCurrentUser(r) : this.reloadAndSetCurrentUserOrClear(r); } async tryRedirectSignIn(e) { let t = null; try { t = await this._popupRedirectResolver._completeRedirectFn(this, e, !0); } catch (e) { await this._setRedirectUser(null); } return t; } async reloadAndSetCurrentUserOrClear(e) { try { await Z(e); } catch (e) { if ("auth/network-request-failed" !== (null == e ? void 0 : e.code)) return this.directlySetCurrentUser(null); } return this.directlySetCurrentUser(e); } useDeviceLanguage() { this.languageCode = (function () { if ("undefined" == typeof navigator) return null; const e = navigator; return (e.languages && e.languages[0]) || e.language || null; })(); } async _delete() { this._deleted = !0; } async updateCurrentUser(e) { const t = e ? r.getModularInstance(e) : null; return t && y(t.auth.config.apiKey === this.config.apiKey, this, "invalid-user-token"), this._updateCurrentUser(t && t._clone(this)); } async _updateCurrentUser(e, t = !1) { if (!this._deleted) return ( e && y(this.tenantId === e.tenantId, this, "tenant-id-mismatch"), t || (await this.beforeStateQueue.runMiddleware(e)), this.queue(async () => { await this.directlySetCurrentUser(e), this.notifyAuthListeners(); }) ); } async signOut() { return await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && (await this._setRedirectUser(null)), this._updateCurrentUser(null, !0); } setPersistence(e) { return this.queue(async () => { await this.assertedPersistence.setPersistence(K(e)); }); } async initializeRecaptchaConfig() { const e = await he(this, { clientType: "CLIENT_TYPE_WEB", version: "RECAPTCHA_ENTERPRISE" }), t = new _e(e); if ((null == this.tenantId ? (this._agentRecaptchaConfig = t) : (this._tenantRecaptchaConfigs[this.tenantId] = t), t.emailPasswordEnabled)) { new ve(this).verify(); } } _getRecaptchaConfig() { return null == this.tenantId ? this._agentRecaptchaConfig : this._tenantRecaptchaConfigs[this.tenantId]; } _getPersistence() { return this.assertedPersistence.persistence.type; } _updateErrorMap(e) { this._errorFactory = new r.ErrorFactory("auth", "Firebase", e()); } onAuthStateChanged(e, t, n) { return this.registerStateListener(this.authStateSubscription, e, t, n); } beforeAuthStateChanged(e, t) { return this.beforeStateQueue.pushCallback(e, t); } onIdTokenChanged(e, t, n) { return this.registerStateListener(this.idTokenSubscription, e, t, n); } toJSON() { var e; return { apiKey: this.config.apiKey, authDomain: this.config.authDomain, appName: this.name, currentUser: null === (e = this._currentUser) || void 0 === e ? void 0 : e.toJSON() }; } async _setRedirectUser(e, t) { const n = await this.getOrInitRedirectPersistenceManager(t); return null === e ? n.removeCurrentUser() : n.setCurrentUser(e); } async getOrInitRedirectPersistenceManager(e) { if (!this.redirectPersistenceManager) { const t = (e && K(e)) || this._popupRedirectResolver; y(t, this, "argument-error"), (this.redirectPersistenceManager = await ee.create(this, [K(t._redirectPersistence)], "redirectUser")), (this.redirectUser = await this.redirectPersistenceManager.getCurrentUser()); } return this.redirectPersistenceManager; } async _redirectUserForId(e) { var t, n; return this._isInitialized && (await this.queue(async () => {})), (null === (t = this._currentUser) || void 0 === t ? void 0 : t._redirectEventId) === e ? this._currentUser : (null === (n = this.redirectUser) || void 0 === n ? void 0 : n._redirectEventId) === e ? this.redirectUser : null; } async _persistUserIfCurrent(e) { if (e === this.currentUser) return this.queue(async () => this.directlySetCurrentUser(e)); } _notifyListenersIfCurrent(e) { e === this.currentUser && this.notifyAuthListeners(); } _key() { return `${this.config.authDomain}:${this.config.apiKey}:${this.name}`; } _startProactiveRefresh() { (this.isProactiveRefreshEnabled = !0), this.currentUser && this._currentUser._startProactiveRefresh(); } _stopProactiveRefresh() { (this.isProactiveRefreshEnabled = !1), this.currentUser && this._currentUser._stopProactiveRefresh(); } get _currentUser() { return this.currentUser; } notifyAuthListeners() { var e, t; if (!this._isInitialized) return; this.idTokenSubscription.next(this.currentUser); const n = null !== (t = null === (e = this.currentUser) || void 0 === e ? void 0 : e.uid) && void 0 !== t ? t : null; this.lastNotifiedUid !== n && ((this.lastNotifiedUid = n), this.authStateSubscription.next(this.currentUser)); } registerStateListener(e, t, n, r) { if (this._deleted) return () => {}; const i = "function" == typeof t ? t : t.next.bind(t), o = this._isInitialized ? Promise.resolve() : this._initializationPromise; return y(o, this, "internal-error"), o.then(() => i(this.currentUser)), "function" == typeof t ? e.addObserver(t, n, r) : e.addObserver(t); } async directlySetCurrentUser(e) { this.currentUser && this.currentUser !== e && this._currentUser._stopProactiveRefresh(), e && this.isProactiveRefreshEnabled && e._startProactiveRefresh(), (this.currentUser = e), e ? await this.assertedPersistence.setCurrentUser(e) : await this.assertedPersistence.removeCurrentUser(); } queue(e) { return (this.operations = this.operations.then(e, e)), this.operations; } get assertedPersistence() { return y(this.persistenceManager, this, "internal-error"), this.persistenceManager; } _logFramework(e) { e && !this.frameworks.includes(e) && (this.frameworks.push(e), this.frameworks.sort(), (this.clientVersion = de(this.config.clientPlatform, this._getFrameworks()))); } _getFrameworks() { return this.frameworks; } async _getAdditionalHeaders() { var e; const t = { "X-Client-Version": this.clientVersion }; this.app.options.appId && (t["X-Firebase-gmpid"] = this.app.options.appId); const n = await (null === (e = this.heartbeatServiceProvider.getImmediate({ optional: !0 })) || void 0 === e ? void 0 : e.getHeartbeatsHeader()); n && (t["X-Firebase-Client"] = n); const r = await this._getAppCheckToken(); return r && (t["X-Firebase-AppCheck"] = r), t; } async _getAppCheckToken() { var e; const t = await (null === (e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) || void 0 === e ? void 0 : e.getToken()); return ( (null == t ? void 0 : t.error) && (function (e, ...t) { h.logLevel <= a.LogLevel.WARN && h.warn(`Auth (${i.SDK_VERSION}): ${e}`, ...t); })(`Error while retrieving App Check token: ${t.error}`), null == t ? void 0 : t.token ); } } function we(e) { return r.getModularInstance(e); } class Se { constructor(e) { (this.auth = e), (this.observer = null), (this.addObserver = r.createSubscribe((e) => (this.observer = e))); } get next() { return y(this.observer, this.auth, "internal-error"), this.observer.next.bind(this.observer); } } function Te(e, t) { const n = i._getProvider(e, "auth"); if (n.isInitialized()) { const e = n.getImmediate(), i = n.getOptions(); if (r.deepEqual(i, null != t ? t : {})) return e; f(e, "already-initialized"); } return n.initialize({ options: t }); } function xe(e, t, n) { const r = we(e); y(r._canInitEmulator, r, "emulator-config-failed"), y(/^https?:\/\//.test(t), r, "invalid-emulator-scheme"); const i = !!(null == n ? void 0 : n.disableWarnings), o = Ee(t), { host: a, port: s } = (function (e) { const t = Ee(e), n = /(\/\/)?([^?#/]+)/.exec(e.substr(t.length)); if (!n) return { host: "", port: null }; const r = n[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r); if (i) { const e = i[1]; return { host: e, port: Le(r.substr(e.length + 1)) }; } { const [e, t] = r.split(":"); return { host: e, port: Le(t) }; } })(t), u = null === s ? "" : `:${s}`; (r.config.emulator = { url: `${o}//${a}${u}/` }), (r.settings.appVerificationDisabledForTesting = !0), (r.emulatorConfig = Object.freeze({ host: a, port: s, protocol: o.replace(":", ""), options: Object.freeze({ disableWarnings: i }) })), i || (function () { function e() { const e = document.createElement("p"), t = e.style; (e.innerText = "Running in emulator mode. Do not use with production credentials."), (t.position = "fixed"), (t.width = "100%"), (t.backgroundColor = "#ffffff"), (t.border = ".1em solid #000000"), (t.color = "#b50000"), (t.bottom = "0px"), (t.left = "0px"), (t.margin = "0px"), (t.zIndex = "10000"), (t.textAlign = "center"), e.classList.add("firebase-emulator-warning"), document.body.appendChild(e); } "undefined" != typeof console && "function" == typeof console.info && console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."); "undefined" != typeof window && "undefined" != typeof document && ("loading" === document.readyState ? window.addEventListener("DOMContentLoaded", e) : e()); })(); } function Ee(e) { const t = e.indexOf(":"); return t < 0 ? "" : e.substr(0, t + 1); } function Le(e) { if (!e) return null; const t = Number(e); return isNaN(t) ? null : t; } class Ae { constructor(e, t) { (this.providerId = e), (this.signInMethod = t); } toJSON() { return C("not implemented"); } _getIdTokenResponse(e) { return C("not implemented"); } _linkToIdToken(e, t) { return C("not implemented"); } _getReauthenticationResolver(e) { return C("not implemented"); } } async function Ie(e, t) { return P(e, "POST", "/v1/accounts:resetPassword", M(e, t)); } async function Me(e, t) { return P(e, "POST", "/v1/accounts:update", t); } async function Pe(e, t) { return k(e, "POST", "/v1/accounts:signInWithPassword", M(e, t)); } async function Oe(e, t) { return P(e, "POST", "/v1/accounts:sendOobCode", M(e, t)); } async function ke(e, t) { return Oe(e, t); } async function Re(e, t) { return Oe(e, t); } class De extends Ae { constructor(e, t, n, r = null) { super("password", n), (this._email = e), (this._password = t), (this._tenantId = r); } static _fromEmailAndPassword(e, t) { return new De(e, t, "password"); } static _fromEmailAndCode(e, t, n = null) { return new De(e, t, "emailLink", n); } toJSON() { return { email: this._email, password: this._password, signInMethod: this.signInMethod, tenantId: this._tenantId }; } static fromJSON(e) { const t = "string" == typeof e ? JSON.parse(e) : e; if ((null == t ? void 0 : t.email) && (null == t ? void 0 : t.password)) { if ("password" === t.signInMethod) return this._fromEmailAndPassword(t.email, t.password); if ("emailLink" === t.signInMethod) return this._fromEmailAndCode(t.email, t.password, t.tenantId); } return null; } async _getIdTokenResponse(e) { var t; switch (this.signInMethod) { case "password": const n = { returnSecureToken: !0, email: this._email, password: this._password, clientType: "CLIENT_TYPE_WEB" }; if (null === (t = e._getRecaptchaConfig()) || void 0 === t ? void 0 : t.emailPasswordEnabled) { const t = await ye(e, n, "signInWithPassword"); return Pe(e, t); } return Pe(e, n).catch(async (t) => { if ("auth/missing-recaptcha-token" === t.code) { console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow."); const t = await ye(e, n, "signInWithPassword"); return Pe(e, t); } return Promise.reject(t); }); case "emailLink": return (async function (e, t) { return k(e, "POST", "/v1/accounts:signInWithEmailLink", M(e, t)); })(e, { email: this._email, oobCode: this._password }); default: f(e, "internal-error"); } } async _linkToIdToken(e, t) { switch (this.signInMethod) { case "password": return Me(e, { idToken: t, returnSecureToken: !0, email: this._email, password: this._password }); case "emailLink": return (async function (e, t) { return k(e, "POST", "/v1/accounts:signInWithEmailLink", M(e, t)); })(e, { idToken: t, email: this._email, oobCode: this._password }); default: f(e, "internal-error"); } } _getReauthenticationResolver(e) { return this._getIdTokenResponse(e); } } async function Ne(e, t) { return k(e, "POST", "/v1/accounts:signInWithIdp", M(e, t)); } class Be extends Ae { constructor() { super(...arguments), (this.pendingToken = null); } static _fromParams(e) { const t = new Be(e.providerId, e.signInMethod); return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? ((t.accessToken = e.oauthToken), (t.secret = e.oauthTokenSecret)) : f("argument-error"), t; } toJSON() { return { idToken: this.idToken, accessToken: this.accessToken, secret: this.secret, nonce: this.nonce, pendingToken: this.pendingToken, providerId: this.providerId, signInMethod: this.signInMethod }; } static fromJSON(e) { const t = "string" == typeof e ? JSON.parse(e) : e, { providerId: n, signInMethod: r } = t, i = o.__rest(t, ["providerId", "signInMethod"]); if (!n || !r) return null; const a = new Be(n, r); return (a.idToken = i.idToken || void 0), (a.accessToken = i.accessToken || void 0), (a.secret = i.secret), (a.nonce = i.nonce), (a.pendingToken = i.pendingToken || null), a; } _getIdTokenResponse(e) { return Ne(e, this.buildRequest()); } _linkToIdToken(e, t) { const n = this.buildRequest(); return (n.idToken = t), Ne(e, n); } _getReauthenticationResolver(e) { const t = this.buildRequest(); return (t.autoCreate = !1), Ne(e, t); } buildRequest() { const e = { requestUri: "http://localhost", returnSecureToken: !0 }; if (this.pendingToken) e.pendingToken = this.pendingToken; else { const t = {}; this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), (t.providerId = this.providerId), this.nonce && !this.pendingToken && (t.nonce = this.nonce), (e.postBody = r.querystring(t)); } return e; } } const Fe = { USER_NOT_FOUND: "user-not-found" }; class Ue extends Ae { constructor(e) { super("phone", "phone"), (this.params = e); } static _fromVerification(e, t) { return new Ue({ verificationId: e, verificationCode: t }); } static _fromTokenResponse(e, t) { return new Ue({ phoneNumber: e, temporaryProof: t }); } _getIdTokenResponse(e) { return (async function (e, t) { return k(e, "POST", "/v1/accounts:signInWithPhoneNumber", M(e, t)); })(e, this._makeVerificationRequest()); } _linkToIdToken(e, t) { return (async function (e, t) { const n = await k(e, "POST", "/v1/accounts:signInWithPhoneNumber", M(e, t)); if (n.temporaryProof) throw N(e, "account-exists-with-different-credential", n); return n; })(e, Object.assign({ idToken: t }, this._makeVerificationRequest())); } _getReauthenticationResolver(e) { return (async function (e, t) { return k(e, "POST", "/v1/accounts:signInWithPhoneNumber", M(e, Object.assign(Object.assign({}, t), { operation: "REAUTH" })), Fe); })(e, this._makeVerificationRequest()); } _makeVerificationRequest() { const { temporaryProof: e, phoneNumber: t, verificationId: n, verificationCode: r } = this.params; return e && t ? { temporaryProof: e, phoneNumber: t } : { sessionInfo: n, code: r }; } toJSON() { const e = { providerId: this.providerId }; return this.params.phoneNumber && (e.phoneNumber = this.params.phoneNumber), this.params.temporaryProof && (e.temporaryProof = this.params.temporaryProof), this.params.verificationCode && (e.verificationCode = this.params.verificationCode), this.params.verificationId && (e.verificationId = this.params.verificationId), e; } static fromJSON(e) { "string" == typeof e && (e = JSON.parse(e)); const { verificationId: t, verificationCode: n, phoneNumber: r, temporaryProof: i } = e; return n || t || r || i ? new Ue({ verificationId: t, verificationCode: n, phoneNumber: r, temporaryProof: i }) : null; } } class je { constructor(e) { var t, n, i, o, a, s; const u = r.querystringDecode(r.extractQuerystring(e)), l = null !== (t = u.apiKey) && void 0 !== t ? t : null, c = null !== (n = u.oobCode) && void 0 !== n ? n : null, d = (function (e) { switch (e) { case "recoverEmail": return "RECOVER_EMAIL"; case "resetPassword": return "PASSWORD_RESET"; case "signIn": return "EMAIL_SIGNIN"; case "verifyEmail": return "VERIFY_EMAIL"; case "verifyAndChangeEmail": return "VERIFY_AND_CHANGE_EMAIL"; case "revertSecondFactorAddition": return "REVERT_SECOND_FACTOR_ADDITION"; default: return null; } })(null !== (i = u.mode) && void 0 !== i ? i : null); y(l && c && d, "argument-error"), (this.apiKey = l), (this.operation = d), (this.code = c), (this.continueUrl = null !== (o = u.continueUrl) && void 0 !== o ? o : null), (this.languageCode = null !== (a = u.languageCode) && void 0 !== a ? a : null), (this.tenantId = null !== (s = u.tenantId) && void 0 !== s ? s : null); } static parseLink(e) { const t = (function (e) { const t = r.querystringDecode(r.extractQuerystring(e)).link, n = t ? r.querystringDecode(r.extractQuerystring(t)).deep_link_id : null, i = r.querystringDecode(r.extractQuerystring(e)).deep_link_id; return (i ? r.querystringDecode(r.extractQuerystring(i)).link : null) || i || n || t || e; })(e); try { return new je(t); } catch (e) { return null; } } } class Ge { constructor() { this.providerId = Ge.PROVIDER_ID; } static credential(e, t) { return De._fromEmailAndPassword(e, t); } static credentialWithLink(e, t) { const n = je.parseLink(t); return y(n, "argument-error"), De._fromEmailAndCode(e, n.code, n.tenantId); } } (Ge.PROVIDER_ID = "password"), (Ge.EMAIL_PASSWORD_SIGN_IN_METHOD = "password"), (Ge.EMAIL_LINK_SIGN_IN_METHOD = "emailLink"); class He { constructor(e) { (this.providerId = e), (this.defaultLanguageCode = null), (this.customParameters = {}); } setDefaultLanguage(e) { this.defaultLanguageCode = e; } setCustomParameters(e) { return (this.customParameters = e), this; } getCustomParameters() { return this.customParameters; } } class Ve extends He { constructor() { super(...arguments), (this.scopes = []); } addScope(e) { return this.scopes.includes(e) || this.scopes.push(e), this; } getScopes() { return [...this.scopes]; } } class Ze extends Ve { static credentialFromJSON(e) { const t = "string" == typeof e ? JSON.parse(e) : e; return y("providerId" in t && "signInMethod" in t, "argument-error"), Be._fromParams(t); } credential(e) { return this._credential(Object.assign(Object.assign({}, e), { nonce: e.rawNonce })); } _credential(e) { return y(e.idToken || e.accessToken, "argument-error"), Be._fromParams(Object.assign(Object.assign({}, e), { providerId: this.providerId, signInMethod: this.providerId })); } static credentialFromResult(e) { return Ze.oauthCredentialFromTaggedObject(e); } static credentialFromError(e) { return Ze.oauthCredentialFromTaggedObject(e.customData || {}); } static oauthCredentialFromTaggedObject({ _tokenResponse: e }) { if (!e) return null; const { oauthIdToken: t, oauthAccessToken: n, oauthTokenSecret: r, pendingToken: i, nonce: o, providerId: a } = e; if (!(n || r || t || i)) return null; if (!a) return null; try { return new Ze(a)._credential({ idToken: t, accessToken: n, nonce: o, pendingToken: i }); } catch (e) { return null; } } } class ze extends Ve { constructor() { super("facebook.com"); } static credential(e) { return Be._fromParams({ providerId: ze.PROVIDER_ID, signInMethod: ze.FACEBOOK_SIGN_IN_METHOD, accessToken: e }); } static credentialFromResult(e) { return ze.credentialFromTaggedObject(e); } static credentialFromError(e) { return ze.credentialFromTaggedObject(e.customData || {}); } static credentialFromTaggedObject({ _tokenResponse: e }) { if (!e || !("oauthAccessToken" in e)) return null; if (!e.oauthAccessToken) return null; try { return ze.credential(e.oauthAccessToken); } catch (e) { return null; } } } (ze.FACEBOOK_SIGN_IN_METHOD = "facebook.com"), (ze.PROVIDER_ID = "facebook.com"); class Ye extends Ve { constructor() { super("google.com"), this.addScope("profile"); } static credential(e, t) { return Be._fromParams({ providerId: Ye.PROVIDER_ID, signInMethod: Ye.GOOGLE_SIGN_IN_METHOD, idToken: e, accessToken: t }); } static credentialFromResult(e) { return Ye.credentialFromTaggedObject(e); } static credentialFromError(e) { return Ye.credentialFromTaggedObject(e.customData || {}); } static credentialFromTaggedObject({ _tokenResponse: e }) { if (!e) return null; const { oauthIdToken: t, oauthAccessToken: n } = e; if (!t && !n) return null; try { return Ye.credential(t, n); } catch (e) { return null; } } } (Ye.GOOGLE_SIGN_IN_METHOD = "google.com"), (Ye.PROVIDER_ID = "google.com"); class We extends Ve { constructor() { super("github.com"); } static credential(e) { return Be._fromParams({ providerId: We.PROVIDER_ID, signInMethod: We.GITHUB_SIGN_IN_METHOD, accessToken: e }); } static credentialFromResult(e) { return We.credentialFromTaggedObject(e); } static credentialFromError(e) { return We.credentialFromTaggedObject(e.customData || {}); } static credentialFromTaggedObject({ _tokenResponse: e }) { if (!e || !("oauthAccessToken" in e)) return null; if (!e.oauthAccessToken) return null; try { return We.credential(e.oauthAccessToken); } catch (e) { return null; } } } (We.GITHUB_SIGN_IN_METHOD = "github.com"), (We.PROVIDER_ID = "github.com"); class Xe extends Ae { constructor(e, t) { super(e, e), (this.pendingToken = t); } _getIdTokenResponse(e) { return Ne(e, this.buildRequest()); } _linkToIdToken(e, t) { const n = this.buildRequest(); return (n.idToken = t), Ne(e, n); } _getReauthenticationResolver(e) { const t = this.buildRequest(); return (t.autoCreate = !1), Ne(e, t); } toJSON() { return { signInMethod: this.signInMethod, providerId: this.providerId, pendingToken: this.pendingToken }; } static fromJSON(e) { const t = "string" == typeof e ? JSON.parse(e) : e, { providerId: n, signInMethod: r, pendingToken: i } = t; return n && r && i && n === r ? new Xe(n, i) : null; } static _create(e, t) { return new Xe(e, t); } buildRequest() { return { requestUri: "http://localhost", returnSecureToken: !0, pendingToken: this.pendingToken }; } } class qe extends He { constructor(e) { y(e.startsWith("saml."), "argument-error"), super(e); } static credentialFromResult(e) { return qe.samlCredentialFromTaggedObject(e); } static credentialFromError(e) { return qe.samlCredentialFromTaggedObject(e.customData || {}); } static credentialFromJSON(e) { const t = Xe.fromJSON(e); return y(t, "argument-error"), t; } static samlCredentialFromTaggedObject({ _tokenResponse: e }) { if (!e) return null; const { pendingToken: t, providerId: n } = e; if (!t || !n) return null; try { return Xe._create(n, t); } catch (e) { return null; } } } class Ke extends Ve { constructor() { super("twitter.com"); } static credential(e, t) { return Be._fromParams({ providerId: Ke.PROVIDER_ID, signInMethod: Ke.TWITTER_SIGN_IN_METHOD, oauthToken: e, oauthTokenSecret: t }); } static credentialFromResult(e) { return Ke.credentialFromTaggedObject(e); } static credentialFromError(e) { return Ke.credentialFromTaggedObject(e.customData || {}); } static credentialFromTaggedObject({ _tokenResponse: e }) { if (!e) return null; const { oauthAccessToken: t, oauthTokenSecret: n } = e; if (!t || !n) return null; try { return Ke.credential(t, n); } catch (e) { return null; } } } async function $e(e, t) { return k(e, "POST", "/v1/accounts:signUp", M(e, t)); } (Ke.TWITTER_SIGN_IN_METHOD = "twitter.com"), (Ke.PROVIDER_ID = "twitter.com"); class Je { constructor(e) { (this.user = e.user), (this.providerId = e.providerId), (this._tokenResponse = e._tokenResponse), (this.operationType = e.operationType); } static async _fromIdTokenResponse(e, t, n, r = !1) { const i = await X._fromIdTokenResponse(e, n, r), o = Qe(n); return new Je({ user: i, providerId: o, _tokenResponse: n, operationType: t }); } static async _forOperation(e, t, n) { await e._updateTokensIfNecessary(n, !0); const r = Qe(n); return new Je({ user: e, providerId: r, _tokenResponse: n, operationType: t }); } } function Qe(e) { return e.providerId ? e.providerId : "phoneNumber" in e ? "phone" : null; } class et extends r.FirebaseError { constructor(e, t, n, r) { var i; super(t.code, t.message), (this.operationType = n), (this.user = r), Object.setPrototypeOf(this, et.prototype), (this.customData = { appName: e.name, tenantId: null !== (i = e.tenantId) && void 0 !== i ? i : void 0, _serverResponse: t.customData._serverResponse, operationType: n }); } static _fromErrorAndOperation(e, t, n, r) { return new et(e, t, n, r); } } function tt(e, t, n, r) { return ("reauthenticate" === t ? n._getReauthenticationResolver(e) : n._getIdTokenResponse(e)).catch((n) => { if ("auth/multi-factor-auth-required" === n.code) throw et._fromErrorAndOperation(e, n, t, r); throw n; }); } function nt(e) { return new Set(e.map(({ providerId: e }) => e).filter((e) => !!e)); } async function rt(e, t, n = !1) { const r = await G(e, t._linkToIdToken(e.auth, await e.getIdToken()), n); return Je._forOperation(e, "link", r); } async function it(e, t, n) { await Z(t); const r = !1 === e ? "provider-already-linked" : "no-such-provider"; y(nt(t.providerData).has(n) === e, t.auth, r); } async function ot(e, t, n = !1) { const { auth: r } = e, i = "reauthenticate"; try { const o = await G(e, tt(r, i, t, e), n); y(o.idToken, r, "internal-error"); const a = j(o.idToken); y(a, r, "internal-error"); const { sub: s } = a; return y(e.uid === s, r, "user-mismatch"), Je._forOperation(e, i, o); } catch (e) { throw ("auth/user-not-found" === (null == e ? void 0 : e.code) && f(r, "user-mismatch"), e); } } async function at(e, t, n = !1) { const r = "signIn", i = await tt(e, r, t), o = await Je._fromIdTokenResponse(e, r, i); return n || (await e._updateCurrentUser(o.user)), o; } async function st(e, t) { return at(we(e), t); } async function ut(e, t) { const n = r.getModularInstance(e); return await it(!1, n, t.providerId), rt(n, t); } async function lt(e, t) { return ot(r.getModularInstance(e), t); } class ct { constructor(e, t) { (this.factorId = e), (this.uid = t.mfaEnrollmentId), (this.enrollmentTime = new Date(t.enrolledAt).toUTCString()), (this.displayName = t.displayName); } static _fromServerResponse(e, t) { return "phoneInfo" in t ? dt._fromServerResponse(e, t) : "totpInfo" in t ? ht._fromServerResponse(e, t) : f(e, "internal-error"); } } class dt extends ct { constructor(e) { super("phone", e), (this.phoneNumber = e.phoneInfo); } static _fromServerResponse(e, t) { return new dt(t); } } class ht extends ct { constructor(e) { super("totp", e); } static _fromServerResponse(e, t) { return new ht(t); } } function pt(e, t, n) { var r; y((null === (r = n.url) || void 0 === r ? void 0 : r.length) > 0, e, "invalid-continue-uri"), y(void 0 === n.dynamicLinkDomain || n.dynamicLinkDomain.length > 0, e, "invalid-dynamic-link-domain"), (t.continueUrl = n.url), (t.dynamicLinkDomain = n.dynamicLinkDomain), (t.canHandleCodeInApp = n.handleCodeInApp), n.iOS && (y(n.iOS.bundleId.length > 0, e, "missing-ios-bundle-id"), (t.iOSBundleId = n.iOS.bundleId)), n.android && (y(n.android.packageName.length > 0, e, "missing-android-pkg-name"), (t.androidInstallApp = n.android.installApp), (t.androidMinimumVersionCode = n.android.minimumVersion), (t.androidPackageName = n.android.packageName)); } async function ft(e, t) { const n = r.getModularInstance(e), i = await Ie(n, { oobCode: t }), o = i.requestType; switch ((y(o, n, "internal-error"), o)) { case "EMAIL_SIGNIN": break; case "VERIFY_AND_CHANGE_EMAIL": y(i.newEmail, n, "internal-error"); break; case "REVERT_SECOND_FACTOR_ADDITION": y(i.mfaInfo, n, "internal-error"); default: y(i.email, n, "internal-error"); } let a = null; return i.mfaInfo && (a = ct._fromServerResponse(we(n), i.mfaInfo)), { data: { email: ("VERIFY_AND_CHANGE_EMAIL" === i.requestType ? i.newEmail : i.email) || null, previousEmail: ("VERIFY_AND_CHANGE_EMAIL" === i.requestType ? i.email : i.newEmail) || null, multiFactorInfo: a }, operation: o }; } async function _t(e, t, n) { const { auth: r } = e, i = { idToken: await e.getIdToken(), returnSecureToken: !0 }; t && (i.email = t), n && (i.password = n); const o = await G(e, Me(r, i)); await e._updateTokensIfNecessary(o, !0); } class gt { constructor(e, t, n = {}) { (this.isNewUser = e), (this.providerId = t), (this.profile = n); } } class mt extends gt { constructor(e, t, n, r) { super(e, t, n), (this.username = r); } } class vt extends gt { constructor(e, t) { super(e, "facebook.com", t); } } class yt extends mt { constructor(e, t) { super(e, "github.com", t, "string" == typeof (null == t ? void 0 : t.login) ? (null == t ? void 0 : t.login) : null); } } class Ct extends gt { constructor(e, t) { super(e, "google.com", t); } } class bt extends mt { constructor(e, t, n) { super(e, "twitter.com", t, n); } } function wt(e, t, n, i) { return r.getModularInstance(e).onIdTokenChanged(t, n, i); } function St(e, t, n) { return r.getModularInstance(e).beforeAuthStateChanged(t, n); } class Tt { constructor(e, t, n) { (this.type = e), (this.credential = t), (this.auth = n); } static _fromIdtoken(e, t) { return new Tt("enroll", e, t); } static _fromMfaPendingCredential(e) { return new Tt("signin", e); } toJSON() { return { multiFactorSession: { ["enroll" === this.type ? "idToken" : "pendingCredential"]: this.credential } }; } static fromJSON(e) { var t, n; if (null == e ? void 0 : e.multiFactorSession) { if (null === (t = e.multiFactorSession) || void 0 === t ? void 0 : t.pendingCredential) return Tt._fromMfaPendingCredential(e.multiFactorSession.pendingCredential); if (null === (n = e.multiFactorSession) || void 0 === n ? void 0 : n.idToken) return Tt._fromIdtoken(e.multiFactorSession.idToken); } return null; } } class xt { constructor(e, t, n) { (this.session = e), (this.hints = t), (this.signInResolver = n); } static _fromError(e, t) { const n = we(e), r = t.customData._serverResponse, i = (r.mfaInfo || []).map((e) => ct._fromServerResponse(n, e)); y(r.mfaPendingCredential, n, "internal-error"); const o = Tt._fromMfaPendingCredential(r.mfaPendingCredential); return new xt(o, i, async (e) => { const i = await e._process(n, o); delete r.mfaInfo, delete r.mfaPendingCredential; const a = Object.assign(Object.assign({}, r), { idToken: i.idToken, refreshToken: i.refreshToken }); switch (t.operationType) { case "signIn": const e = await Je._fromIdTokenResponse(n, t.operationType, a); return await n._updateCurrentUser(e.user), e; case "reauthenticate": return y(t.user, n, "internal-error"), Je._forOperation(t.user, t.operationType, a); default: f(n, "internal-error"); } }); } async resolveSignIn(e) { const t = e; return this.signInResolver(t); } } class Et { constructor(e) { (this.user = e), (this.enrolledFactors = []), e._onReload((t) => { t.mfaInfo && (this.enrolledFactors = t.mfaInfo.map((t) => ct._fromServerResponse(e.auth, t))); }); } static _fromUser(e) { return new Et(e); } async getSession() { return Tt._fromIdtoken(await this.user.getIdToken(), this.user.auth); } async enroll(e, t) { const n = e, r = await this.getSession(), i = await G(this.user, n._process(this.user.auth, r, t)); return await this.user._updateTokensIfNecessary(i), this.user.reload(); } async unenroll(e) { const t = "string" == typeof e ? e : e.uid, n = await this.user.getIdToken(); try { const e = await G(this.user, ((r = this.user.auth), (i = { idToken: n, mfaEnrollmentId: t }), P(r, "POST", "/v2/accounts/mfaEnrollment:withdraw", M(r, i)))); (this.enrolledFactors = this.enrolledFactors.filter(({ uid: e }) => e !== t)), await this.user._updateTokensIfNecessary(e), await this.user.reload(); } catch (e) { throw e; } var r, i; } } const Lt = new WeakMap(); const At = "__sak"; class It { constructor(e, t) { (this.storageRetriever = e), (this.type = t); } _isAvailable() { try { return this.storage ? (this.storage.setItem(At, "1"), this.storage.removeItem(At), Promise.resolve(!0)) : Promise.resolve(!1); } catch (e) { return Promise.resolve(!1); } } _set(e, t) { return this.storage.setItem(e, JSON.stringify(t)), Promise.resolve(); } _get(e) { const t = this.storage.getItem(e); return Promise.resolve(t ? JSON.parse(t) : null); } _remove(e) { return this.storage.removeItem(e), Promise.resolve(); } get storage() { return this.storageRetriever(); } } class Mt extends It { constructor() { super(() => window.localStorage, "LOCAL"), (this.boundEventHandler = (e, t) => this.onStorageEvent(e, t)), (this.listeners = {}), (this.localCache = {}), (this.pollTimer = null), (this.safariLocalStorageNotSynced = (function () { const e = r.getUA(); return re(e) || le(e); })() && (function () { try { return !(!window || window === window.top); } catch (e) { return !1; } })()), (this.fallbackToPolling = ce()), (this._shouldAllowMigration = !0); } forAllChangedKeys(e) { for (const t of Object.keys(this.listeners)) { const n = this.storage.getItem(t), r = this.localCache[t]; n !== r && e(t, r, n); } } onStorageEvent(e, t = !1) { if (!e.key) return void this.forAllChangedKeys((e, t, n) => { this.notifyListeners(e, n); }); const n = e.key; if ((t ? this.detachListener() : this.stopPolling(), this.safariLocalStorageNotSynced)) { const r = this.storage.getItem(n); if (e.newValue !== r) null !== e.newValue ? this.storage.setItem(n, e.newValue) : this.storage.removeItem(n); else if (this.localCache[n] === e.newValue && !t) return; } const i = () => { const e = this.storage.getItem(n); (t || this.localCache[n] !== e) && this.notifyListeners(n, e); }, o = this.storage.getItem(n); r.isIE() && 10 === document.documentMode && o !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, 10) : i(); } notifyListeners(e, t) { this.localCache[e] = t; const n = this.listeners[e]; if (n) for (const e of Array.from(n)) e(t ? JSON.parse(t) : t); } startPolling() { this.stopPolling(), (this.pollTimer = setInterval(() => { this.forAllChangedKeys((e, t, n) => { this.onStorageEvent(new StorageEvent("storage", { key: e, oldValue: t, newValue: n }), !0); }); }, 1e3)); } stopPolling() { this.pollTimer && (clearInterval(this.pollTimer), (this.pollTimer = null)); } attachListener() { window.addEventListener("storage", this.boundEventHandler); } detachListener() { window.removeEventListener("storage", this.boundEventHandler); } _addListener(e, t) { 0 === Object.keys(this.listeners).length && (this.fallbackToPolling ? this.startPolling() : this.attachListener()), this.listeners[e] || ((this.listeners[e] = new Set()), (this.localCache[e] = this.storage.getItem(e))), this.listeners[e].add(t); } _removeListener(e, t) { this.listeners[e] && (this.listeners[e].delete(t), 0 === this.listeners[e].size && delete this.listeners[e]), 0 === Object.keys(this.listeners).length && (this.detachListener(), this.stopPolling()); } async _set(e, t) { await super._set(e, t), (this.localCache[e] = JSON.stringify(t)); } async _get(e) { const t = await super._get(e); return (this.localCache[e] = JSON.stringify(t)), t; } async _remove(e) { await super._remove(e), delete this.localCache[e]; } } Mt.type = "LOCAL"; const Pt = Mt; class Ot extends It { constructor() { super(() => window.sessionStorage, "SESSION"); } _addListener(e, t) {} _removeListener(e, t) {} } Ot.type = "SESSION"; const kt = Ot; class Rt { constructor(e) { (this.eventTarget = e), (this.handlersMap = {}), (this.boundEventHandler = this.handleEvent.bind(this)); } static _getInstance(e) { const t = this.receivers.find((t) => t.isListeningto(e)); if (t) return t; const n = new Rt(e); return this.receivers.push(n), n; } isListeningto(e) { return this.eventTarget === e; } async handleEvent(e) { const t = e, { eventId: n, eventType: r, data: i } = t.data, o = this.handlersMap[r]; if (!(null == o ? void 0 : o.size)) return; t.ports[0].postMessage({ status: "ack", eventId: n, eventType: r }); const a = Array.from(o).map(async (e) => e(t.origin, i)), s = await (function (e) { return Promise.all( e.map(async (e) => { try { return { fulfilled: !0, value: await e }; } catch (e) { return { fulfilled: !1, reason: e }; } }) ); })(a); t.ports[0].postMessage({ status: "done", eventId: n, eventType: r, response: s }); } _subscribe(e, t) { 0 === Object.keys(this.handlersMap).length && this.eventTarget.addEventListener("message", this.boundEventHandler), this.handlersMap[e] || (this.handlersMap[e] = new Set()), this.handlersMap[e].add(t); } _unsubscribe(e, t) { this.handlersMap[e] && t && this.handlersMap[e].delete(t), (t && 0 !== this.handlersMap[e].size) || delete this.handlersMap[e], 0 === Object.keys(this.handlersMap).length && this.eventTarget.removeEventListener("message", this.boundEventHandler); } } function Dt(e = "", t = 10) { let n = ""; for (let e = 0; e < t; e++) n += Math.floor(10 * Math.random()); return e + n; } Rt.receivers = []; class Nt { constructor(e) { (this.target = e), (this.handlers = new Set()); } removeMessageHandler(e) { e.messageChannel && (e.messageChannel.port1.removeEventListener("message", e.onMessage), e.messageChannel.port1.close()), this.handlers.delete(e); } async _send(e, t, n = 50) { const r = "undefined" != typeof MessageChannel ? new MessageChannel() : null; if (!r) throw new Error("connection_unavailable"); let i, o; return new Promise((a, s) => { const u = Dt("", 20); r.port1.start(); const l = setTimeout(() => { s(new Error("unsupported_event")); }, n); (o = { messageChannel: r, onMessage(e) { const t = e; if (t.data.eventId === u) switch (t.data.status) { case "ack": clearTimeout(l), (i = setTimeout(() => { s(new Error("timeout")); }, 3e3)); break; case "done": clearTimeout(i), a(t.data.response); break; default: clearTimeout(l), clearTimeout(i), s(new Error("invalid_response")); } }, }), this.handlers.add(o), r.port1.addEventListener("message", o.onMessage), this.target.postMessage({ eventType: e, eventId: u, data: t }, [r.port2]); }).finally(() => { o && this.removeMessageHandler(o); }); } } function Bt() { return window; } function Ft() { return void 0 !== Bt().WorkerGlobalScope && "function" == typeof Bt().importScripts; } const Ut = "firebaseLocalStorageDb", jt = "firebaseLocalStorage", Gt = "fbase_key"; class Ht { constructor(e) { this.request = e; } toPromise() { return new Promise((e, t) => { this.request.addEventListener("success", () => { e(this.request.result); }), this.request.addEventListener("error", () => { t(this.request.error); }); }); } } function Vt(e, t) { return e.transaction([jt], t ? "readwrite" : "readonly").objectStore(jt); } function Zt() { const e = indexedDB.open(Ut, 1); return new Promise((t, n) => { e.addEventListener("error", () => { n(e.error); }), e.addEventListener("upgradeneeded", () => { const t = e.result; try { t.createObjectStore(jt, { keyPath: Gt }); } catch (e) { n(e); } }), e.addEventListener("success", async () => { const n = e.result; n.objectStoreNames.contains(jt) ? t(n) : (n.close(), await (function () { const e = indexedDB.deleteDatabase(Ut); return new Ht(e).toPromise(); })(), t(await Zt())); }); }); } async function zt(e, t, n) { const r = Vt(e, !0).put({ [Gt]: t, value: n }); return new Ht(r).toPromise(); } function Yt(e, t) { const n = Vt(e, !0).delete(t); return new Ht(n).toPromise(); } class Wt { constructor() { (this.type = "LOCAL"), (this._shouldAllowMigration = !0), (this.listeners = {}), (this.localCache = {}), (this.pollTimer = null), (this.pendingWrites = 0), (this.receiver = null), (this.sender = null), (this.serviceWorkerReceiverAvailable = !1), (this.activeServiceWorker = null), (this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then( () => {}, () => {} )); } async _openDb() { return this.db || (this.db = await Zt()), this.db; } async _withRetries(e) { let t = 0; for (;;) try { const t = await this._openDb(); return await e(t); } catch (e) { if (t++ > 3) throw e; this.db && (this.db.close(), (this.db = void 0)); } } async initializeServiceWorkerMessaging() { return Ft() ? this.initializeReceiver() : this.initializeSender(); } async initializeReceiver() { (this.receiver = Rt._getInstance(Ft() ? self : null)), this.receiver._subscribe("keyChanged", async (e, t) => ({ keyProcessed: (await this._poll()).includes(t.key) })), this.receiver._subscribe("ping", async (e, t) => ["keyChanged"]); } async initializeSender() { var e, t; if ( ((this.activeServiceWorker = await (async function () { if (!(null === navigator || void 0 === navigator ? void 0 : navigator.serviceWorker)) return null; try { return (await navigator.serviceWorker.ready).active; } catch (e) { return null; } })()), !this.activeServiceWorker) ) return; this.sender = new Nt(this.activeServiceWorker); const n = await this.sender._send("ping", {}, 800); n && (null === (e = n[0]) || void 0 === e ? void 0 : e.fulfilled) && (null === (t = n[0]) || void 0 === t ? void 0 : t.value.includes("keyChanged")) && (this.serviceWorkerReceiverAvailable = !0); } async notifyServiceWorker(e) { var t; if (this.sender && this.activeServiceWorker && ((null === (t = null === navigator || void 0 === navigator ? void 0 : navigator.serviceWorker) || void 0 === t ? void 0 : t.controller) || null) === this.activeServiceWorker) try { await this.sender._send("keyChanged", { key: e }, this.serviceWorkerReceiverAvailable ? 800 : 50); } catch (t) {} } async _isAvailable() { try { if (!indexedDB) return !1; const e = await Zt(); return await zt(e, At, "1"), await Yt(e, At), !0; } catch (e) {} return !1; } async _withPendingWrite(e) { this.pendingWrites++; try { await e(); } finally { this.pendingWrites--; } } async _set(e, t) { return this._withPendingWrite(async () => (await this._withRetries((n) => zt(n, e, t)), (this.localCache[e] = t), this.notifyServiceWorker(e))); } async _get(e) { const t = await this._withRetries((t) => (async function (e, t) { const n = Vt(e, !1).get(t), r = await new Ht(n).toPromise(); return void 0 === r ? null : r.value; })(t, e) ); return (this.localCache[e] = t), t; } async _remove(e) { return this._withPendingWrite(async () => (await this._withRetries((t) => Yt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e))); } async _poll() { const e = await this._withRetries((e) => { const t = Vt(e, !1).getAll(); return new Ht(t).toPromise(); }); if (!e) return []; if (0 !== this.pendingWrites) return []; const t = [], n = new Set(); for (const { fbase_key: r, value: i } of e) n.add(r), JSON.stringify(this.localCache[r]) !== JSON.stringify(i) && (this.notifyListeners(r, i), t.push(r)); for (const e of Object.keys(this.localCache)) this.localCache[e] && !n.has(e) && (this.notifyListeners(e, null), t.push(e)); return t; } notifyListeners(e, t) { this.localCache[e] = t; const n = this.listeners[e]; if (n) for (const e of Array.from(n)) e(t); } startPolling() { this.stopPolling(), (this.pollTimer = setInterval(async () => this._poll(), 800)); } stopPolling() { this.pollTimer && (clearInterval(this.pollTimer), (this.pollTimer = null)); } _addListener(e, t) { 0 === Object.keys(this.listeners).length && this.startPolling(), this.listeners[e] || ((this.listeners[e] = new Set()), this._get(e)), this.listeners[e].add(t); } _removeListener(e, t) { this.listeners[e] && (this.listeners[e].delete(t), 0 === this.listeners[e].size && delete this.listeners[e]), 0 === Object.keys(this.listeners).length && this.stopPolling(); } } Wt.type = "LOCAL"; const Xt = Wt; const qt = 1e12; class Kt { constructor(e) { (this.auth = e), (this.counter = qt), (this._widgets = new Map()); } render(e, t) { const n = this.counter; return this._widgets.set(n, new $t(e, this.auth.name, t || {})), this.counter++, n; } reset(e) { var t; const n = e || qt; null === (t = this._widgets.get(n)) || void 0 === t || t.delete(), this._widgets.delete(n); } getResponse(e) { var t; const n = e || qt; return (null === (t = this._widgets.get(n)) || void 0 === t ? void 0 : t.getResponse()) || ""; } async execute(e) { var t; const n = e || qt; return null === (t = this._widgets.get(n)) || void 0 === t || t.execute(), ""; } } class $t { constructor(e, t, n) { (this.params = n), (this.timerId = null), (this.deleted = !1), (this.responseToken = null), (this.clickHandler = () => { this.execute(); }); const r = "string" == typeof e ? document.getElementById(e) : e; y(r, "argument-error", { appName: t }), (this.container = r), (this.isVisible = "invisible" !== this.params.size), this.isVisible ? this.execute() : this.container.addEventListener("click", this.clickHandler); } getResponse() { return this.checkIfDeleted(), this.responseToken; } delete() { this.checkIfDeleted(), (this.deleted = !0), this.timerId && (clearTimeout(this.timerId), (this.timerId = null)), this.container.removeEventListener("click", this.clickHandler); } execute() { this.checkIfDeleted(), this.timerId || (this.timerId = window.setTimeout(() => { this.responseToken = (function (e) { const t = [], n = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (let r = 0; r < e; r++) t.push(n.charAt(Math.floor(Math.random() * n.length))); return t.join(""); })(50); const { callback: e, "expired-callback": t } = this.params; if (e) try { e(this.responseToken); } catch (e) {} this.timerId = window.setTimeout(() => { if (((this.timerId = null), (this.responseToken = null), t)) try { t(); } catch (e) {} this.isVisible && this.execute(); }, 6e4); }, 500)); } checkIfDeleted() { if (this.deleted) throw new Error("reCAPTCHA mock was already deleted!"); } } const Jt = me("rcb"), Qt = new x(3e4, 6e4); class en { constructor() { var e; (this.hostLanguage = ""), (this.counter = 0), (this.librarySeparatelyLoaded = !!(null === (e = Bt().grecaptcha) || void 0 === e ? void 0 : e.render)); } load(e, t = "") { return ( y( (function (e) { return e.length <= 6 && /^\s*[a-zA-Z0-9\-]*\s*$/.test(e); })(t), e, "argument-error" ), this.shouldResolveImmediately(t) && pe(Bt().grecaptcha) ? Promise.resolve(Bt().grecaptcha) : new Promise((n, i) => { const o = Bt().setTimeout(() => { i(_(e, "network-request-failed")); }, Qt.get()); Bt()[Jt] = () => { Bt().clearTimeout(o), delete Bt()[Jt]; const r = Bt().grecaptcha; if (!r || !pe(r)) return void i(_(e, "internal-error")); const a = r.render; (r.render = (e, t) => { const n = a(e, t); return this.counter++, n; }), (this.hostLanguage = t), n(r); }; ge(`https://www.google.com/recaptcha/api.js??${r.querystring({ onload: Jt, render: "explicit", hl: t })}`).catch(() => { clearTimeout(o), i(_(e, "internal-error")); }); }) ); } clearedOneInstance() { this.counter--; } shouldResolveImmediately(e) { var t; return !!(null === (t = Bt().grecaptcha) || void 0 === t ? void 0 : t.render) && (e === this.hostLanguage || this.counter > 0 || this.librarySeparatelyLoaded); } } class tn { async load(e) { return new Kt(e); } clearedOneInstance() {} } const nn = "recaptcha", rn = { theme: "light", type: "image" }; class on { constructor(e, t) { (this.verificationId = e), (this.onConfirmation = t); } confirm(e) { const t = Ue._fromVerification(this.verificationId, e); return this.onConfirmation(t); } } async function an(e, t, n) { var r; const i = await n.verify(); try { let o; if ((y("string" == typeof i, e, "argument-error"), y(n.type === nn, e, "argument-error"), (o = "string" == typeof t ? { phoneNumber: t } : t), "session" in o)) { const t = o.session; if ("phoneNumber" in o) { y("enroll" === t.type, e, "internal-error"); const n = await (function (e, t) { return P(e, "POST", "/v2/accounts/mfaEnrollment:start", M(e, t)); })(e, { idToken: t.credential, phoneEnrollmentInfo: { phoneNumber: o.phoneNumber, recaptchaToken: i } }); return n.phoneSessionInfo.sessionInfo; } { y("signin" === t.type, e, "internal-error"); const n = (null === (r = o.multiFactorHint) || void 0 === r ? void 0 : r.uid) || o.multiFactorUid; y(n, e, "missing-multi-factor-info"); const a = await (function (e, t) { return P(e, "POST", "/v2/accounts/mfaSignIn:start", M(e, t)); })(e, { mfaPendingCredential: t.credential, mfaEnrollmentId: n, phoneSignInInfo: { recaptchaToken: i } }); return a.phoneResponseInfo.sessionInfo; } } { const { sessionInfo: t } = await (async function (e, t) { return P(e, "POST", "/v1/accounts:sendVerificationCode", M(e, t)); })(e, { phoneNumber: o.phoneNumber, recaptchaToken: i }); return t; } } finally { n._reset(); } } class sn { constructor(e) { (this.providerId = sn.PROVIDER_ID), (this.auth = we(e)); } verifyPhoneNumber(e, t) { return an(this.auth, e, r.getModularInstance(t)); } static credential(e, t) { return Ue._fromVerification(e, t); } static credentialFromResult(e) { const t = e; return sn.credentialFromTaggedObject(t); } static credentialFromError(e) { return sn.credentialFromTaggedObject(e.customData || {}); } static credentialFromTaggedObject({ _tokenResponse: e }) { if (!e) return null; const { phoneNumber: t, temporaryProof: n } = e; return t && n ? Ue._fromTokenResponse(t, n) : null; } } function un(e, t) { return t ? K(t) : (y(e._popupRedirectResolver, e, "argument-error"), e._popupRedirectResolver); } (sn.PROVIDER_ID = "phone"), (sn.PHONE_SIGN_IN_METHOD = "phone"); class ln extends Ae { constructor(e) { super("custom", "custom"), (this.params = e); } _getIdTokenResponse(e) { return Ne(e, this._buildIdpRequest()); } _linkToIdToken(e, t) { return Ne(e, this._buildIdpRequest(t)); } _getReauthenticationResolver(e) { return Ne(e, this._buildIdpRequest()); } _buildIdpRequest(e) { const t = { requestUri: this.params.requestUri, sessionId: this.params.sessionId, postBody: this.params.postBody, tenantId: this.params.tenantId, pendingToken: this.params.pendingToken, returnSecureToken: !0, returnIdpCredential: !0 }; return e && (t.idToken = e), t; } } function cn(e) { return at(e.auth, new ln(e), e.bypassAuthState); } function dn(e) { const { auth: t, user: n } = e; return y(n, t, "internal-error"), ot(n, new ln(e), e.bypassAuthState); } async function hn(e) { const { auth: t, user: n } = e; return y(n, t, "internal-error"), rt(n, new ln(e), e.bypassAuthState); } class pn { constructor(e, t, n, r, i = !1) { (this.auth = e), (this.resolver = n), (this.user = r), (this.bypassAuthState = i), (this.pendingPromise = null), (this.eventManager = null), (this.filter = Array.isArray(t) ? t : [t]); } execute() { return new Promise(async (e, t) => { this.pendingPromise = { resolve: e, reject: t }; try { (this.eventManager = await this.resolver._initialize(this.auth)), await this.onExecution(), this.eventManager.registerConsumer(this); } catch (e) { this.reject(e); } }); } async onAuthEvent(e) { const { urlResponse: t, sessionId: n, postBody: r, tenantId: i, error: o, type: a } = e; if (o) return void this.reject(o); const s = { auth: this.auth, requestUri: t, sessionId: n, tenantId: i || void 0, postBody: r || void 0, user: this.user, bypassAuthState: this.bypassAuthState }; try { this.resolve(await this.getIdpTask(a)(s)); } catch (e) { this.reject(e); } } onError(e) { this.reject(e); } getIdpTask(e) { switch (e) { case "signInViaPopup": case "signInViaRedirect": return cn; case "linkViaPopup": case "linkViaRedirect": return hn; case "reauthViaPopup": case "reauthViaRedirect": return dn; default: f(this.auth, "internal-error"); } } resolve(e) { b(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp(); } reject(e) { b(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp(); } unregisterAndCleanUp() { this.eventManager && this.eventManager.unregisterConsumer(this), (this.pendingPromise = null), this.cleanUp(); } } const fn = new x(2e3, 1e4); class _n extends pn { constructor(e, t, n, r, i) { super(e, t, r, i), (this.provider = n), (this.authWindow = null), (this.pollId = null), _n.currentPopupAction && _n.currentPopupAction.cancel(), (_n.currentPopupAction = this); } async executeNotNull() { const e = await this.execute(); return y(e, this.auth, "internal-error"), e; } async onExecution() { b(1 === this.filter.length, "Popup operations only handle one event"); const e = Dt(); (this.authWindow = await this.resolver._openPopup(this.auth, this.provider, this.filter[0], e)), (this.authWindow.associatedEvent = e), this.resolver._originValidation(this.auth).catch((e) => { this.reject(e); }), this.resolver._isIframeWebStorageSupported(this.auth, (e) => { e || this.reject(_(this.auth, "web-storage-unsupported")); }), this.pollUserCancellation(); } get eventId() { var e; return (null === (e = this.authWindow) || void 0 === e ? void 0 : e.associatedEvent) || null; } cancel() { this.reject(_(this.auth, "cancelled-popup-request")); } cleanUp() { this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), (this.authWindow = null), (this.pollId = null), (_n.currentPopupAction = null); } pollUserCancellation() { const e = () => { var t, n; (null === (n = null === (t = this.authWindow) || void 0 === t ? void 0 : t.window) || void 0 === n ? void 0 : n.closed) ? (this.pollId = window.setTimeout(() => { (this.pollId = null), this.reject(_(this.auth, "popup-closed-by-user")); }, 8e3)) : (this.pollId = window.setTimeout(e, fn.get())); }; e(); } } _n.currentPopupAction = null; const gn = "pendingRedirect", mn = new Map(); class vn extends pn { constructor(e, t, n = !1) { super(e, ["signInViaRedirect", "linkViaRedirect", "reauthViaRedirect", "unknown"], t, void 0, n), (this.eventId = null); } async execute() { let e = mn.get(this.auth._key()); if (!e) { try { const t = (await (async function (e, t) { const n = wn(t), r = bn(e); if (!(await r._isAvailable())) return !1; const i = "true" === (await r._get(n)); return await r._remove(n), i; })(this.resolver, this.auth)) ? await super.execute() : null; e = () => Promise.resolve(t); } catch (t) { e = () => Promise.reject(t); } mn.set(this.auth._key(), e); } return this.bypassAuthState || mn.set(this.auth._key(), () => Promise.resolve(null)), e(); } async onAuthEvent(e) { if ("signInViaRedirect" === e.type) return super.onAuthEvent(e); if ("unknown" !== e.type) { if (e.eventId) { const t = await this.auth._redirectUserForId(e.eventId); if (t) return (this.user = t), super.onAuthEvent(e); this.resolve(null); } } else this.resolve(null); } async onExecution() {} cleanUp() {} } async function yn(e, t) { return bn(e)._set(wn(t), "true"); } function Cn(e, t) { mn.set(e._key(), t); } function bn(e) { return K(e._redirectPersistence); } function wn(e) { return Q(gn, e.config.apiKey, e.name); } async function Sn(e, t, n = !1) { const r = we(e), i = un(r, t), o = new vn(r, i, n), a = await o.execute(); return a && !n && (delete a.user._redirectEventId, await r._persistUserIfCurrent(a.user), await r._setRedirectUser(null, t)), a; } async function Tn(e) { const t = Dt(`${e.uid}:::`); return (e._redirectEventId = t), await e.auth._setRedirectUser(e), await e.auth._persistUserIfCurrent(e), t; } class xn { constructor(e) { (this.auth = e), (this.cachedEventUids = new Set()), (this.consumers = new Set()), (this.queuedRedirectEvent = null), (this.hasHandledPotentialRedirect = !1), (this.lastProcessedEventTime = Date.now()); } registerConsumer(e) { this.consumers.add(e), this.queuedRedirectEvent && this.isEventForConsumer(this.queuedRedirectEvent, e) && (this.sendToConsumer(this.queuedRedirectEvent, e), this.saveEventToCache(this.queuedRedirectEvent), (this.queuedRedirectEvent = null)); } unregisterConsumer(e) { this.consumers.delete(e); } onEvent(e) { if (this.hasEventBeenHandled(e)) return !1; let t = !1; return ( this.consumers.forEach((n) => { this.isEventForConsumer(e, n) && ((t = !0), this.sendToConsumer(e, n), this.saveEventToCache(e)); }), this.hasHandledPotentialRedirect || !(function (e) { switch (e.type) { case "signInViaRedirect": case "linkViaRedirect": case "reauthViaRedirect": return !0; case "unknown": return Ln(e); default: return !1; } })(e) || ((this.hasHandledPotentialRedirect = !0), t || ((this.queuedRedirectEvent = e), (t = !0))), t ); } sendToConsumer(e, t) { var n; if (e.error && !Ln(e)) { const r = (null === (n = e.error.code) || void 0 === n ? void 0 : n.split("auth/")[1]) || "internal-error"; t.onError(_(this.auth, r)); } else t.onAuthEvent(e); } isEventForConsumer(e, t) { const n = null === t.eventId || (!!e.eventId && e.eventId === t.eventId); return t.filter.includes(e.type) && n; } hasEventBeenHandled(e) { return Date.now() - this.lastProcessedEventTime >= 6e5 && this.cachedEventUids.clear(), this.cachedEventUids.has(En(e)); } saveEventToCache(e) { this.cachedEventUids.add(En(e)), (this.lastProcessedEventTime = Date.now()); } } function En(e) { return [e.type, e.eventId, e.sessionId, e.tenantId].filter((e) => e).join("-"); } function Ln({ type: e, error: t }) { return "unknown" === e && "auth/no-auth-event" === (null == t ? void 0 : t.code); } async function An(e, t = {}) { return P(e, "GET", "/v1/projects", t); } const In = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Mn = /^https?/; function Pn(e) { const t = w(), { protocol: n, hostname: r } = new URL(t); if (e.startsWith("chrome-extension://")) { const i = new URL(e); return "" === i.hostname && "" === r ? "chrome-extension:" === n && e.replace("chrome-extension://", "") === t.replace("chrome-extension://", "") : "chrome-extension:" === n && i.hostname === r; } if (!Mn.test(n)) return !1; if (In.test(e)) return r === e; const i = e.replace(/\./g, "\\."); return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r); } const On = new x(3e4, 6e4); function kn() { const e = Bt().___jsl; if (null == e ? void 0 : e.H) for (const t of Object.keys(e.H)) if (((e.H[t].r = e.H[t].r || []), (e.H[t].L = e.H[t].L || []), (e.H[t].r = [...e.H[t].L]), e.CP)) for (let t = 0; t < e.CP.length; t++) e.CP[t] = null; } let Rn = null; function Dn(e) { return ( (Rn = Rn || (function (e) { return new Promise((t, n) => { var r, i, o; function a() { kn(), gapi.load("gapi.iframes", { callback: () => { t(gapi.iframes.getContext()); }, ontimeout: () => { kn(), n(_(e, "network-request-failed")); }, timeout: On.get(), }); } if (null === (i = null === (r = Bt().gapi) || void 0 === r ? void 0 : r.iframes) || void 0 === i ? void 0 : i.Iframe) t(gapi.iframes.getContext()); else { if (!(null === (o = Bt().gapi) || void 0 === o ? void 0 : o.load)) { const t = me("iframefcb"); return ( (Bt()[t] = () => { gapi.load ? a() : n(_(e, "network-request-failed")); }), ge(`https://apis.google.com/js/api.js?onload=${t}`).catch((e) => n(e)) ); } a(); } }).catch((e) => { throw ((Rn = null), e); }); })(e)), Rn ); } const Nn = new x(5e3, 15e3), Bn = "__/auth/iframe", Fn = "emulator/auth/iframe", Un = { style: { position: "absolute", top: "-100px", width: "1px", height: "1px" }, "aria-hidden": "true", tabindex: "-1" }, jn = new Map([ ["identitytoolkit.googleapis.com", "p"], ["staging-identitytoolkit.sandbox.googleapis.com", "s"], ["test-identitytoolkit.sandbox.googleapis.com", "t"], ]); function Gn(e) { const t = e.config; y(t.authDomain, e, "auth-domain-config-required"); const n = t.emulator ? E(t, Fn) : `https://${e.config.authDomain}/${Bn}`, o = { apiKey: t.apiKey, appName: e.name, v: i.SDK_VERSION }, a = jn.get(e.config.apiHost); a && (o.eid = a); const s = e._getFrameworks(); return s.length && (o.fw = s.join(",")), `${n}?${r.querystring(o).slice(1)}`; } const Hn = { location: "yes", resizable: "yes", statusbar: "yes", toolbar: "no" }; class Vn { constructor(e) { (this.window = e), (this.associatedEvent = null); } close() { if (this.window) try { this.window.close(); } catch (e) {} } } function Zn(e, t, n, i = 500, o = 600) { const a = Math.max((window.screen.availHeight - o) / 2, 0).toString(), s = Math.max((window.screen.availWidth - i) / 2, 0).toString(); let u = ""; const l = Object.assign(Object.assign({}, Hn), { width: i.toString(), height: o.toString(), top: a, left: s }), c = r.getUA().toLowerCase(); n && (u = ie(c) ? "_blank" : n), ne(c) && ((t = t || "http://localhost"), (l.scrollbars = "yes")); const d = Object.entries(l).reduce((e, [t, n]) => `${e}${t}=${n},`, ""); if ( (function (e = r.getUA()) { var t; return le(e) && !!(null === (t = window.navigator) || void 0 === t ? void 0 : t.standalone); })(c) && "_self" !== u ) return ( (function (e, t) { const n = document.createElement("a"); (n.href = e), (n.target = t); const r = document.createEvent("MouseEvent"); r.initMouseEvent("click", !0, !0, window, 1, 0, 0, 0, 0, !1, !1, !1, !1, 1, null), n.dispatchEvent(r); })(t || "", u), new Vn(null) ); const h = window.open(t || "", u, d); y(h, e, "popup-blocked"); try { h.focus(); } catch (e) {} return new Vn(h); } const zn = "__/auth/handler", Yn = "emulator/auth/handler", Wn = encodeURIComponent("fac"); async function Xn(e, t, n, o, a, s) { y(e.config.authDomain, e, "auth-domain-config-required"), y(e.config.apiKey, e, "invalid-api-key"); const u = { apiKey: e.config.apiKey, appName: e.name, authType: n, redirectUrl: o, v: i.SDK_VERSION, eventId: a }; if (t instanceof He) { t.setDefaultLanguage(e.languageCode), (u.providerId = t.providerId || ""), r.isEmpty(t.getCustomParameters()) || (u.customParameters = JSON.stringify(t.getCustomParameters())); for (const [e, t] of Object.entries(s || {})) u[e] = t; } if (t instanceof Ve) { const e = t.getScopes().filter((e) => "" !== e); e.length > 0 && (u.scopes = e.join(",")); } e.tenantId && (u.tid = e.tenantId); const l = u; for (const e of Object.keys(l)) void 0 === l[e] && delete l[e]; const c = await e._getAppCheckToken(), d = c ? `#${Wn}=${encodeURIComponent(c)}` : ""; return `${(function ({ config: e }) { if (!e.emulator) return `https://${e.authDomain}/${zn}`; return E(e, Yn); })(e)}?${r.querystring(l).slice(1)}${d}`; } const qn = "webStorageSupport"; const Kn = class { constructor() { (this.eventManagers = {}), (this.iframes = {}), (this.originValidationPromises = {}), (this._redirectPersistence = kt), (this._completeRedirectFn = Sn), (this._overrideRedirectResult = Cn); } async _openPopup(e, t, n, r) { var i; b(null === (i = this.eventManagers[e._key()]) || void 0 === i ? void 0 : i.manager, "_initialize() not called before _openPopup()"); return Zn(e, await Xn(e, t, n, w(), r), Dt()); } async _openRedirect(e, t, n, r) { await this._originValidation(e); return ( (function (e) { Bt().location.href = e; })(await Xn(e, t, n, w(), r)), new Promise(() => {}) ); } _initialize(e) { const t = e._key(); if (this.eventManagers[t]) { const { manager: e, promise: n } = this.eventManagers[t]; return e ? Promise.resolve(e) : (b(n, "If manager is not set, promise should be"), n); } const n = this.initAndGetManager(e); return ( (this.eventManagers[t] = { promise: n }), n.catch(() => { delete this.eventManagers[t]; }), n ); } async initAndGetManager(e) { const t = await (async function (e) { const t = await Dn(e), n = Bt().gapi; return ( y(n, e, "internal-error"), t.open( { where: document.body, url: Gn(e), messageHandlersFilter: n.iframes.CROSS_ORIGIN_IFRAMES_FILTER, attributes: Un, dontclear: !0 }, (t) => new Promise(async (n, r) => { await t.restyle({ setHideOnLeave: !1 }); const i = _(e, "network-request-failed"), o = Bt().setTimeout(() => { r(i); }, Nn.get()); function a() { Bt().clearTimeout(o), n(t); } t.ping(a).then(a, () => { r(i); }); }) ) ); })(e), n = new xn(e); return ( t.register( "authEvent", (t) => { y(null == t ? void 0 : t.authEvent, e, "invalid-auth-event"); return { status: n.onEvent(t.authEvent) ? "ACK" : "ERROR" }; }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER ), (this.eventManagers[e._key()] = { manager: n }), (this.iframes[e._key()] = t), n ); } _isIframeWebStorageSupported(e, t) { this.iframes[e._key()].send( qn, { type: qn }, (n) => { var r; const i = null === (r = null == n ? void 0 : n[0]) || void 0 === r ? void 0 : r[qn]; void 0 !== i && t(!!i), f(e, "internal-error"); }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER ); } _originValidation(e) { const t = e._key(); return ( this.originValidationPromises[t] || (this.originValidationPromises[t] = (async function (e) { if (e.config.emulator) return; const { authorizedDomains: t } = await An(e); for (const e of t) try { if (Pn(e)) return; } catch (e) {} f(e, "unauthorized-domain"); })(e)), this.originValidationPromises[t] ); } get _shouldInitProactively() { return ce() || re() || le(); } }; class $n { constructor(e) { this.factorId = e; } _process(e, t, n) { switch (t.type) { case "enroll": return this._finalizeEnroll(e, t.credential, n); case "signin": return this._finalizeSignIn(e, t.credential); default: return C("unexpected MultiFactorSessionType"); } } } class Jn extends $n { constructor(e) { super("phone"), (this.credential = e); } static _fromCredential(e) { return new Jn(e); } _finalizeEnroll(e, t, n) { return (function (e, t) { return P(e, "POST", "/v2/accounts/mfaEnrollment:finalize", M(e, t)); })(e, { idToken: t, displayName: n, phoneVerificationInfo: this.credential._makeVerificationRequest() }); } _finalizeSignIn(e, t) { return (function (e, t) { return P(e, "POST", "/v2/accounts/mfaSignIn:finalize", M(e, t)); })(e, { mfaPendingCredential: t, phoneVerificationInfo: this.credential._makeVerificationRequest() }); } } class Qn { constructor() {} static assertion(e) { return Jn._fromCredential(e); } } Qn.FACTOR_ID = "phone"; class er { static assertionForEnrollment(e, t) { return tr._fromSecret(e, t); } static assertionForSignIn(e, t) { return tr._fromEnrollmentId(e, t); } static async generateSecret(e) { const t = e; y(void 0 !== t.auth, "internal-error"); const n = await ((r = t.auth), (i = { idToken: t.credential, totpEnrollmentInfo: {} }), P(r, "POST", "/v2/accounts/mfaEnrollment:start", M(r, i))); var r, i; return nr._fromStartTotpMfaEnrollmentResponse(n, t.auth); } } er.FACTOR_ID = "totp"; class tr extends $n { constructor(e, t, n) { super("totp"), (this.otp = e), (this.enrollmentId = t), (this.secret = n); } static _fromSecret(e, t) { return new tr(t, void 0, e); } static _fromEnrollmentId(e, t) { return new tr(t, e); } async _finalizeEnroll(e, t, n) { return ( y(void 0 !== this.secret, e, "argument-error"), (function (e, t) { return P(e, "POST", "/v2/accounts/mfaEnrollment:finalize", M(e, t)); })(e, { idToken: t, displayName: n, totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp) }) ); } async _finalizeSignIn(e, t) { y(void 0 !== this.enrollmentId && void 0 !== this.otp, e, "argument-error"); const n = { verificationCode: this.otp }; return (function (e, t) { return P(e, "POST", "/v2/accounts/mfaSignIn:finalize", M(e, t)); })(e, { mfaPendingCredential: t, mfaEnrollmentId: this.enrollmentId, totpVerificationInfo: n }); } } class nr { constructor(e, t, n, r, i, o, a) { (this.sessionInfo = o), (this.auth = a), (this.secretKey = e), (this.hashingAlgorithm = t), (this.codeLength = n), (this.codeIntervalSeconds = r), (this.enrollmentCompletionDeadline = i); } static _fromStartTotpMfaEnrollmentResponse(e, t) { return new nr(e.totpSessionInfo.sharedSecretKey, e.totpSessionInfo.hashingAlgorithm, e.totpSessionInfo.verificationCodeLength, e.totpSessionInfo.periodSec, new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(), e.totpSessionInfo.sessionInfo, t); } _makeTotpVerificationInfo(e) { return { sessionInfo: this.sessionInfo, verificationCode: e }; } generateQrCodeUrl(e, t) { var n; let r = !1; return (rr(e) || rr(t)) && (r = !0), r && (rr(e) && (e = (null === (n = this.auth.currentUser) || void 0 === n ? void 0 : n.email) || "unknownuser"), rr(t) && (t = this.auth.name)), `otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`; } } function rr(e) { return void 0 === e || 0 === (null == e ? void 0 : e.length); } var ir = "@firebase/auth", or = "0.23.2"; class ar { constructor(e) { (this.auth = e), (this.internalListeners = new Map()); } getUid() { var e; return this.assertAuthConfigured(), (null === (e = this.auth.currentUser) || void 0 === e ? void 0 : e.uid) || null; } async getToken(e) { if ((this.assertAuthConfigured(), await this.auth._initializationPromise, !this.auth.currentUser)) return null; return { accessToken: await this.auth.currentUser.getIdToken(e) }; } addAuthTokenListener(e) { if ((this.assertAuthConfigured(), this.internalListeners.has(e))) return; const t = this.auth.onIdTokenChanged((t) => { e((null == t ? void 0 : t.stsTokenManager.accessToken) || null); }); this.internalListeners.set(e, t), this.updateProactiveRefresh(); } removeAuthTokenListener(e) { this.assertAuthConfigured(); const t = this.internalListeners.get(e); t && (this.internalListeners.delete(e), t(), this.updateProactiveRefresh()); } assertAuthConfigured() { y(this.auth._initializationPromise, "dependent-sdk-initialized-before-auth"); } updateProactiveRefresh() { this.internalListeners.size > 0 ? this.auth._startProactiveRefresh() : this.auth._stopProactiveRefresh(); } } const sr = r.getExperimentalSetting("authIdTokenMaxAge") || 300; let ur = null; var lr; (lr = "Browser"), i._registerComponent( new s.Component( "auth", (e, { options: t }) => { const n = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), i = e.getProvider("app-check-internal"), { apiKey: o, authDomain: a } = n.options; y(o && !o.includes(":"), "invalid-api-key", { appName: n.name }); const s = { apiKey: o, authDomain: a, clientPlatform: lr, apiHost: "identitytoolkit.googleapis.com", tokenApiHost: "securetoken.googleapis.com", apiScheme: "https", sdkClientVersion: de(lr) }, u = new be(n, r, i, s); return ( (function (e, t) { const n = (null == t ? void 0 : t.persistence) || [], r = (Array.isArray(n) ? n : [n]).map(K); (null == t ? void 0 : t.errorMap) && e._updateErrorMap(t.errorMap), e._initializeWithPersistence(r, null == t ? void 0 : t.popupRedirectResolver); })(u, t), u ); }, "PUBLIC" ) .setInstantiationMode("EXPLICIT") .setInstanceCreatedCallback((e, t, n) => { e.getProvider("auth-internal").initialize(); }) ), i._registerComponent(new s.Component("auth-internal", (e) => ((e) => new ar(e))(we(e.getProvider("auth").getImmediate())), "PRIVATE").setInstantiationMode("EXPLICIT")), i.registerVersion( ir, or, (function (e) { switch (e) { case "Node": return "node"; case "ReactNative": return "rn"; case "Worker": return "webworker"; case "Cordova": return "cordova"; default: return; } })(lr) ), i.registerVersion(ir, or, "cjs2017"), (t.AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = { ADMIN_ONLY_OPERATION: "auth/admin-restricted-operation", ARGUMENT_ERROR: "auth/argument-error", APP_NOT_AUTHORIZED: "auth/app-not-authorized", APP_NOT_INSTALLED: "auth/app-not-installed", CAPTCHA_CHECK_FAILED: "auth/captcha-check-failed", CODE_EXPIRED: "auth/code-expired", CORDOVA_NOT_READY: "auth/cordova-not-ready", CORS_UNSUPPORTED: "auth/cors-unsupported", CREDENTIAL_ALREADY_IN_USE: "auth/credential-already-in-use", CREDENTIAL_MISMATCH: "auth/custom-token-mismatch", CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "auth/requires-recent-login", DEPENDENT_SDK_INIT_BEFORE_AUTH: "auth/dependent-sdk-initialized-before-auth", DYNAMIC_LINK_NOT_ACTIVATED: "auth/dynamic-link-not-activated", EMAIL_CHANGE_NEEDS_VERIFICATION: "auth/email-change-needs-verification", EMAIL_EXISTS: "auth/email-already-in-use", EMULATOR_CONFIG_FAILED: "auth/emulator-config-failed", EXPIRED_OOB_CODE: "auth/expired-action-code", EXPIRED_POPUP_REQUEST: "auth/cancelled-popup-request", INTERNAL_ERROR: "auth/internal-error", INVALID_API_KEY: "auth/invalid-api-key", INVALID_APP_CREDENTIAL: "auth/invalid-app-credential", INVALID_APP_ID: "auth/invalid-app-id", INVALID_AUTH: "auth/invalid-user-token", INVALID_AUTH_EVENT: "auth/invalid-auth-event", INVALID_CERT_HASH: "auth/invalid-cert-hash", INVALID_CODE: "auth/invalid-verification-code", INVALID_CONTINUE_URI: "auth/invalid-continue-uri", INVALID_CORDOVA_CONFIGURATION: "auth/invalid-cordova-configuration", INVALID_CUSTOM_TOKEN: "auth/invalid-custom-token", INVALID_DYNAMIC_LINK_DOMAIN: "auth/invalid-dynamic-link-domain", INVALID_EMAIL: "auth/invalid-email", INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme", INVALID_IDP_RESPONSE: "auth/invalid-credential", INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload", INVALID_MFA_SESSION: "auth/invalid-multi-factor-session", INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id", INVALID_OAUTH_PROVIDER: "auth/invalid-oauth-provider", INVALID_OOB_CODE: "auth/invalid-action-code", INVALID_ORIGIN: "auth/unauthorized-domain", INVALID_PASSWORD: "auth/wrong-password", INVALID_PERSISTENCE: "auth/invalid-persistence-type", INVALID_PHONE_NUMBER: "auth/invalid-phone-number", INVALID_PROVIDER_ID: "auth/invalid-provider-id", INVALID_RECIPIENT_EMAIL: "auth/invalid-recipient-email", INVALID_SENDER: "auth/invalid-sender", INVALID_SESSION_INFO: "auth/invalid-verification-id", INVALID_TENANT_ID: "auth/invalid-tenant-id", MFA_INFO_NOT_FOUND: "auth/multi-factor-info-not-found", MFA_REQUIRED: "auth/multi-factor-auth-required", MISSING_ANDROID_PACKAGE_NAME: "auth/missing-android-pkg-name", MISSING_APP_CREDENTIAL: "auth/missing-app-credential", MISSING_AUTH_DOMAIN: "auth/auth-domain-config-required", MISSING_CODE: "auth/missing-verification-code", MISSING_CONTINUE_URI: "auth/missing-continue-uri", MISSING_IFRAME_START: "auth/missing-iframe-start", MISSING_IOS_BUNDLE_ID: "auth/missing-ios-bundle-id", MISSING_OR_INVALID_NONCE: "auth/missing-or-invalid-nonce", MISSING_MFA_INFO: "auth/missing-multi-factor-info", MISSING_MFA_SESSION: "auth/missing-multi-factor-session", MISSING_PHONE_NUMBER: "auth/missing-phone-number", MISSING_SESSION_INFO: "auth/missing-verification-id", MODULE_DESTROYED: "auth/app-deleted", NEED_CONFIRMATION: "auth/account-exists-with-different-credential", NETWORK_REQUEST_FAILED: "auth/network-request-failed", NULL_USER: "auth/null-user", NO_AUTH_EVENT: "auth/no-auth-event", NO_SUCH_PROVIDER: "auth/no-such-provider", OPERATION_NOT_ALLOWED: "auth/operation-not-allowed", OPERATION_NOT_SUPPORTED: "auth/operation-not-supported-in-this-environment", POPUP_BLOCKED: "auth/popup-blocked", POPUP_CLOSED_BY_USER: "auth/popup-closed-by-user", PROVIDER_ALREADY_LINKED: "auth/provider-already-linked", QUOTA_EXCEEDED: "auth/quota-exceeded", REDIRECT_CANCELLED_BY_USER: "auth/redirect-cancelled-by-user", REDIRECT_OPERATION_PENDING: "auth/redirect-operation-pending", REJECTED_CREDENTIAL: "auth/rejected-credential", SECOND_FACTOR_ALREADY_ENROLLED: "auth/second-factor-already-in-use", SECOND_FACTOR_LIMIT_EXCEEDED: "auth/maximum-second-factor-count-exceeded", TENANT_ID_MISMATCH: "auth/tenant-id-mismatch", TIMEOUT: "auth/timeout", TOKEN_EXPIRED: "auth/user-token-expired", TOO_MANY_ATTEMPTS_TRY_LATER: "auth/too-many-requests", UNAUTHORIZED_DOMAIN: "auth/unauthorized-continue-uri", UNSUPPORTED_FIRST_FACTOR: "auth/unsupported-first-factor", UNSUPPORTED_PERSISTENCE: "auth/unsupported-persistence-type", UNSUPPORTED_TENANT_OPERATION: "auth/unsupported-tenant-operation", UNVERIFIED_EMAIL: "auth/unverified-email", USER_CANCELLED: "auth/user-cancelled", USER_DELETED: "auth/user-not-found", USER_DISABLED: "auth/user-disabled", USER_MISMATCH: "auth/user-mismatch", USER_SIGNED_OUT: "auth/user-signed-out", WEAK_PASSWORD: "auth/weak-password", WEB_STORAGE_UNSUPPORTED: "auth/web-storage-unsupported", ALREADY_INITIALIZED: "auth/already-initialized", RECAPTCHA_NOT_ENABLED: "auth/recaptcha-not-enabled", MISSING_RECAPTCHA_TOKEN: "auth/missing-recaptcha-token", INVALID_RECAPTCHA_TOKEN: "auth/invalid-recaptcha-token", INVALID_RECAPTCHA_ACTION: "auth/invalid-recaptcha-action", MISSING_CLIENT_TYPE: "auth/missing-client-type", MISSING_RECAPTCHA_VERSION: "auth/missing-recaptcha-version", INVALID_RECAPTCHA_VERSION: "auth/invalid-recaptcha-version", INVALID_REQ_TYPE: "auth/invalid-req-type" }), (t.ActionCodeOperation = { EMAIL_SIGNIN: "EMAIL_SIGNIN", PASSWORD_RESET: "PASSWORD_RESET", RECOVER_EMAIL: "RECOVER_EMAIL", REVERT_SECOND_FACTOR_ADDITION: "REVERT_SECOND_FACTOR_ADDITION", VERIFY_AND_CHANGE_EMAIL: "VERIFY_AND_CHANGE_EMAIL", VERIFY_EMAIL: "VERIFY_EMAIL" }), (t.ActionCodeURL = je), (t.AuthCredential = Ae), (t.AuthEventManager = xn), (t.AuthImpl = be), (t.AuthPopup = Vn), (t.EmailAuthCredential = De), (t.EmailAuthProvider = Ge), (t.FacebookAuthProvider = ze), (t.FactorId = { PHONE: "phone", TOTP: "totp" }), (t.FetchProvider = L), (t.GithubAuthProvider = We), (t.GoogleAuthProvider = Ye), (t.OAuthCredential = Be), (t.OAuthProvider = Ze), (t.OperationType = { LINK: "link", REAUTHENTICATE: "reauthenticate", SIGN_IN: "signIn" }), (t.PhoneAuthCredential = Ue), (t.PhoneAuthProvider = sn), (t.PhoneMultiFactorGenerator = Qn), (t.ProviderId = { FACEBOOK: "facebook.com", GITHUB: "github.com", GOOGLE: "google.com", PASSWORD: "password", PHONE: "phone", TWITTER: "twitter.com" }), (t.RecaptchaVerifier = class { constructor(e, t = Object.assign({}, rn), n) { (this.parameters = t), (this.type = nn), (this.destroyed = !1), (this.widgetId = null), (this.tokenChangeListeners = new Set()), (this.renderPromise = null), (this.recaptcha = null), (this.auth = we(n)), (this.isInvisible = "invisible" === this.parameters.size), y("undefined" != typeof document, this.auth, "operation-not-supported-in-this-environment"); const r = "string" == typeof e ? document.getElementById(e) : e; y(r, this.auth, "argument-error"), (this.container = r), (this.parameters.callback = this.makeTokenCallback(this.parameters.callback)), (this._recaptchaLoader = this.auth.settings.appVerificationDisabledForTesting ? new tn() : new en()), this.validateStartingState(); } async verify() { this.assertNotDestroyed(); const e = await this.render(), t = this.getAssertedRecaptcha(), n = t.getResponse(e); return ( n || new Promise((n) => { const r = (e) => { e && (this.tokenChangeListeners.delete(r), n(e)); }; this.tokenChangeListeners.add(r), this.isInvisible && t.execute(e); }) ); } render() { try { this.assertNotDestroyed(); } catch (e) { return Promise.reject(e); } return ( this.renderPromise || (this.renderPromise = this.makeRenderPromise().catch((e) => { throw ((this.renderPromise = null), e); })), this.renderPromise ); } _reset() { this.assertNotDestroyed(), null !== this.widgetId && this.getAssertedRecaptcha().reset(this.widgetId); } clear() { this.assertNotDestroyed(), (this.destroyed = !0), this._recaptchaLoader.clearedOneInstance(), this.isInvisible || this.container.childNodes.forEach((e) => { this.container.removeChild(e); }); } validateStartingState() { y(!this.parameters.sitekey, this.auth, "argument-error"), y(this.isInvisible || !this.container.hasChildNodes(), this.auth, "argument-error"), y("undefined" != typeof document, this.auth, "operation-not-supported-in-this-environment"); } makeTokenCallback(e) { return (t) => { if ((this.tokenChangeListeners.forEach((e) => e(t)), "function" == typeof e)) e(t); else if ("string" == typeof e) { const n = Bt()[e]; "function" == typeof n && n(t); } }; } assertNotDestroyed() { y(!this.destroyed, this.auth, "internal-error"); } async makeRenderPromise() { if ((await this.init(), !this.widgetId)) { let e = this.container; if (!this.isInvisible) { const t = document.createElement("div"); e.appendChild(t), (e = t); } this.widgetId = this.getAssertedRecaptcha().render(e, this.parameters); } return this.widgetId; } async init() { y(S() && !Ft(), this.auth, "internal-error"), await (function () { let e = null; return new Promise((t) => { "complete" !== document.readyState ? ((e = () => t()), window.addEventListener("load", e)) : t(); }).catch((t) => { throw (e && window.removeEventListener("load", e), t); }); })(), (this.recaptcha = await this._recaptchaLoader.load(this.auth, this.auth.languageCode || void 0)); const e = await (async function (e) { return (await P(e, "GET", "/v1/recaptchaParams")).recaptchaSiteKey || ""; })(this.auth); y(e, this.auth, "internal-error"), (this.parameters.sitekey = e); } getAssertedRecaptcha() { return y(this.recaptcha, this.auth, "internal-error"), this.recaptcha; } }), (t.SAMLAuthCredential = Xe), (t.SAMLAuthProvider = qe), (t.SignInMethod = { EMAIL_LINK: "emailLink", EMAIL_PASSWORD: "password", FACEBOOK: "facebook.com", GITHUB: "github.com", GOOGLE: "google.com", PHONE: "phone", TWITTER: "twitter.com" }), (t.TotpMultiFactorGenerator = er), (t.TotpSecret = nr), (t.TwitterAuthProvider = Ke), (t.UserImpl = X), (t._assert = y), (t._castAuth = we), (t._clearRedirectOutcomes = function () { mn.clear(); }), (t._createError = _), (t._fail = f), (t._generateEventId = Dt), (t._getClientVersion = de), (t._getInstance = K), (t._getProjectConfig = An), (t._getRedirectResult = Sn), (t._getRedirectUrl = Xn), (t._isAndroid = ae), (t._isIOS = le), (t._isIOS7Or8 = function (e = r.getUA()) { return /(iPad|iPhone|iPod).*OS 7_\d/i.test(e) || /(iPad|iPhone|iPod).*OS 8_\d/i.test(e); }), (t._overrideRedirectResult = Cn), (t._persistenceKeyName = Q), (t.applyActionCode = async function (e, t) { await (async function (e, t) { return P(e, "POST", "/v1/accounts:update", M(e, t)); })(r.getModularInstance(e), { oobCode: t }); }), (t.beforeAuthStateChanged = St), (t.browserLocalPersistence = Pt), (t.browserPopupRedirectResolver = Kn), (t.browserSessionPersistence = kt), (t.checkActionCode = ft), (t.confirmPasswordReset = async function (e, t, n) { await Ie(r.getModularInstance(e), { oobCode: t, newPassword: n }); }), (t.connectAuthEmulator = xe), (t.createUserWithEmailAndPassword = async function (e, t, n) { var r; const i = we(e), o = { returnSecureToken: !0, email: t, password: n, clientType: "CLIENT_TYPE_WEB" }; let a; if (null === (r = i._getRecaptchaConfig()) || void 0 === r ? void 0 : r.emailPasswordEnabled) { const e = await ye(i, o, "signUpPassword"); a = $e(i, e); } else a = $e(i, o).catch(async (e) => { if ("auth/missing-recaptcha-token" === e.code) { console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow."); const e = await ye(i, o, "signUpPassword"); return $e(i, e); } return Promise.reject(e); }); const s = await a.catch((e) => Promise.reject(e)), u = await Je._fromIdTokenResponse(i, "signIn", s); return await i._updateCurrentUser(u.user), u; }), (t.debugAssert = b), (t.debugErrorMap = l), (t.deleteUser = async function (e) { return r.getModularInstance(e).delete(); }), (t.fetchSignInMethodsForEmail = async function (e, t) { const n = { identifier: t, continueUri: S() ? w() : "http://localhost" }, { signinMethods: i } = await (async function (e, t) { return P(e, "POST", "/v1/accounts:createAuthUri", M(e, t)); })(r.getModularInstance(e), n); return i || []; }), (t.getAdditionalUserInfo = function (e) { const { user: t, _tokenResponse: n } = e; return t.isAnonymous && !n ? { providerId: null, isNewUser: !1, profile: null } : (function (e) { var t, n; if (!e) return null; const { providerId: r } = e, i = e.rawUserInfo ? JSON.parse(e.rawUserInfo) : {}, o = e.isNewUser || "identitytoolkit#SignupNewUserResponse" === e.kind; if (!r && (null == e ? void 0 : e.idToken)) { const r = null === (n = null === (t = j(e.idToken)) || void 0 === t ? void 0 : t.firebase) || void 0 === n ? void 0 : n.sign_in_provider; if (r) return new gt(o, "anonymous" !== r && "custom" !== r ? r : null); } if (!r) return null; switch (r) { case "facebook.com": return new vt(o, i); case "github.com": return new yt(o, i); case "google.com": return new Ct(o, i); case "twitter.com": return new bt(o, i, e.screenName || null); case "custom": case "anonymous": return new gt(o, null); default: return new gt(o, r, i); } })(n); }), (t.getAuth = function (e = i.getApp()) { const t = i._getProvider(e, "auth"); if (t.isInitialized()) return t.getImmediate(); const n = Te(e, { popupRedirectResolver: Kn, persistence: [Xt, Pt, kt] }), o = r.getExperimentalSetting("authTokenSyncURL"); if (o) { const e = ((a = o), async (e) => { const t = e && (await e.getIdTokenResult()), n = t && (new Date().getTime() - Date.parse(t.issuedAtTime)) / 1e3; if (n && n > sr) return; const r = null == t ? void 0 : t.token; ur !== r && ((ur = r), await fetch(a, { method: r ? "POST" : "DELETE", headers: r ? { Authorization: `Bearer ${r}` } : {} })); }); St(n, e, () => e(n.currentUser)), wt(n, (t) => e(t)); } var a; const s = r.getDefaultEmulatorHost("auth"); return s && xe(n, `http://${s}`), n; }), (t.getIdToken = function (e, t = !1) { return r.getModularInstance(e).getIdToken(t); }), (t.getIdTokenResult = F), (t.getMultiFactorResolver = function (e, t) { var n; const i = r.getModularInstance(e), o = t; return y(t.customData.operationType, i, "argument-error"), y(null === (n = o.customData._serverResponse) || void 0 === n ? void 0 : n.mfaPendingCredential, i, "argument-error"), xt._fromError(i, o); }), (t.getRedirectResult = async function (e, t) { return await we(e)._initializationPromise, Sn(e, t, !1); }), (t.inMemoryPersistence = J), (t.indexedDBLocalPersistence = Xt), (t.initializeAuth = Te), (t.initializeRecaptchaConfig = function (e) { return we(e).initializeRecaptchaConfig(); }), (t.isSignInWithEmailLink = function (e, t) { const n = je.parseLink(t); return "EMAIL_SIGNIN" === (null == n ? void 0 : n.operation); }), (t.linkWithCredential = ut), (t.linkWithPhoneNumber = async function (e, t, n) { const i = r.getModularInstance(e); await it(!1, i, "phone"); const o = await an(i.auth, t, r.getModularInstance(n)); return new on(o, (e) => ut(i, e)); }), (t.linkWithPopup = async function (e, t, n) { const i = r.getModularInstance(e); m(i.auth, t, He); const o = un(i.auth, n); return new _n(i.auth, "linkViaPopup", t, o, i).executeNotNull(); }), (t.linkWithRedirect = function (e, t, n) { return (async function (e, t, n) { const i = r.getModularInstance(e); m(i.auth, t, He), await i.auth._initializationPromise; const o = un(i.auth, n); await it(!1, i, t.providerId), await yn(o, i.auth); const a = await Tn(i); return o._openRedirect(i.auth, t, "linkViaRedirect", a); })(e, t, n); }), (t.multiFactor = function (e) { const t = r.getModularInstance(e); return Lt.has(t) || Lt.set(t, Et._fromUser(t)), Lt.get(t); }), (t.onAuthStateChanged = function (e, t, n, i) { return r.getModularInstance(e).onAuthStateChanged(t, n, i); }), (t.onIdTokenChanged = wt), (t.parseActionCodeURL = function (e) { return je.parseLink(e); }), (t.prodErrorMap = c), (t.reauthenticateWithCredential = lt), (t.reauthenticateWithPhoneNumber = async function (e, t, n) { const i = r.getModularInstance(e), o = await an(i.auth, t, r.getModularInstance(n)); return new on(o, (e) => lt(i, e)); }), (t.reauthenticateWithPopup = async function (e, t, n) { const i = r.getModularInstance(e); m(i.auth, t, He); const o = un(i.auth, n); return new _n(i.auth, "reauthViaPopup", t, o, i).executeNotNull(); }), (t.reauthenticateWithRedirect = function (e, t, n) { return (async function (e, t, n) { const i = r.getModularInstance(e); m(i.auth, t, He), await i.auth._initializationPromise; const o = un(i.auth, n); await yn(o, i.auth); const a = await Tn(i); return o._openRedirect(i.auth, t, "reauthViaRedirect", a); })(e, t, n); }), (t.reload = z), (t.sendEmailVerification = async function (e, t) { const n = r.getModularInstance(e), i = { requestType: "VERIFY_EMAIL", idToken: await e.getIdToken() }; t && pt(n.auth, i, t); const { email: o } = await (async function (e, t) { return Oe(e, t); })(n.auth, i); o !== e.email && (await e.reload()); }), (t.sendPasswordResetEmail = async function (e, t, n) { var r; const i = we(e), o = { requestType: "PASSWORD_RESET", email: t, clientType: "CLIENT_TYPE_WEB" }; if (null === (r = i._getRecaptchaConfig()) || void 0 === r ? void 0 : r.emailPasswordEnabled) { const e = await ye(i, o, "getOobCode", !0); n && pt(i, e, n), await ke(i, e); } else n && pt(i, o, n), await ke(i, o).catch(async (e) => { if ("auth/missing-recaptcha-token" !== e.code) return Promise.reject(e); { console.log("Password resets are protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the password reset flow."); const e = await ye(i, o, "getOobCode", !0); n && pt(i, e, n), await ke(i, e); } }); }), (t.sendSignInLinkToEmail = async function (e, t, n) { var r; const i = we(e), o = { requestType: "EMAIL_SIGNIN", email: t, clientType: "CLIENT_TYPE_WEB" }; function a(e, t) { y(t.handleCodeInApp, i, "argument-error"), t && pt(i, e, t); } if (null === (r = i._getRecaptchaConfig()) || void 0 === r ? void 0 : r.emailPasswordEnabled) { const e = await ye(i, o, "getOobCode", !0); a(e, n), await Re(i, e); } else a(o, n), await Re(i, o).catch(async (e) => { if ("auth/missing-recaptcha-token" !== e.code) return Promise.reject(e); { console.log("Email link sign-in is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow."); const e = await ye(i, o, "getOobCode", !0); a(e, n), await Re(i, e); } }); }), (t.setPersistence = function (e, t) { return r.getModularInstance(e).setPersistence(t); }), (t.signInAnonymously = async function (e) { var t; const n = we(e); if ((await n._initializationPromise, null === (t = n.currentUser) || void 0 === t ? void 0 : t.isAnonymous)) return new Je({ user: n.currentUser, providerId: null, operationType: "signIn" }); const r = await $e(n, { returnSecureToken: !0 }), i = await Je._fromIdTokenResponse(n, "signIn", r, !0); return await n._updateCurrentUser(i.user), i; }), (t.signInWithCredential = st), (t.signInWithCustomToken = async function (e, t) { const n = we(e), r = await (async function (e, t) { return k(e, "POST", "/v1/accounts:signInWithCustomToken", M(e, t)); })(n, { token: t, returnSecureToken: !0 }), i = await Je._fromIdTokenResponse(n, "signIn", r); return await n._updateCurrentUser(i.user), i; }), (t.signInWithEmailAndPassword = function (e, t, n) { return st(r.getModularInstance(e), Ge.credential(t, n)); }), (t.signInWithEmailLink = async function (e, t, n) { const i = r.getModularInstance(e), o = Ge.credentialWithLink(t, n || w()); return y(o._tenantId === (i.tenantId || null), i, "tenant-id-mismatch"), st(i, o); }), (t.signInWithPhoneNumber = async function (e, t, n) { const i = we(e), o = await an(i, t, r.getModularInstance(n)); return new on(o, (e) => st(i, e)); }), (t.signInWithPopup = async function (e, t, n) { const r = we(e); m(e, t, He); const i = un(r, n); return new _n(r, "signInViaPopup", t, i).executeNotNull(); }), (t.signInWithRedirect = function (e, t, n) { return (async function (e, t, n) { const r = we(e); m(e, t, He), await r._initializationPromise; const i = un(r, n); return await yn(i, r), i._openRedirect(r, t, "signInViaRedirect"); })(e, t, n); }), (t.signOut = function (e) { return r.getModularInstance(e).signOut(); }), (t.unlink = async function (e, t) { const n = r.getModularInstance(e); await it(!0, n, t); const { providerUserInfo: i } = await (async function (e, t) { return P(e, "POST", "/v1/accounts:update", t); })(n.auth, { idToken: await n.getIdToken(), deleteProvider: [t] }), o = nt(i || []); return (n.providerData = n.providerData.filter((e) => o.has(e.providerId))), o.has("phone") || (n.phoneNumber = null), await n.auth._persistUserIfCurrent(n), n; }), (t.updateCurrentUser = function (e, t) { return r.getModularInstance(e).updateCurrentUser(t); }), (t.updateEmail = function (e, t) { return _t(r.getModularInstance(e), t, null); }), (t.updatePassword = function (e, t) { return _t(r.getModularInstance(e), null, t); }), (t.updatePhoneNumber = async function (e, t) { await rt(r.getModularInstance(e), t); }), (t.updateProfile = async function (e, { displayName: t, photoURL: n }) { if (void 0 === t && void 0 === n) return; const i = r.getModularInstance(e), o = { idToken: await i.getIdToken(), displayName: t, photoUrl: n, returnSecureToken: !0 }, a = await G( i, (async function (e, t) { return P(e, "POST", "/v1/accounts:update", t); })(i.auth, o) ); (i.displayName = a.displayName || null), (i.photoURL = a.photoUrl || null); const s = i.providerData.find(({ providerId: e }) => "password" === e); s && ((s.displayName = i.displayName), (s.photoURL = i.photoURL)), await i._updateTokensIfNecessary(a); }), (t.useDeviceLanguage = function (e) { r.getModularInstance(e).useDeviceLanguage(); }), (t.verifyBeforeUpdateEmail = async function (e, t, n) { const i = r.getModularInstance(e), o = { requestType: "VERIFY_AND_CHANGE_EMAIL", idToken: await e.getIdToken(), newEmail: t }; n && pt(i.auth, o, n); const { email: a } = await (async function (e, t) { return Oe(e, t); })(i.auth, o); a !== e.email && (await e.reload()); }), (t.verifyPasswordResetCode = async function (e, t) { const { data: n } = await ft(r.getModularInstance(e), t); return n.email; }); }, 77661: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(42491); n(71470), n(99413), n(22970), n(4015), n(56630), (t.ActionCodeOperation = r.ActionCodeOperation), (t.ActionCodeURL = r.ActionCodeURL), (t.AuthCredential = r.AuthCredential), (t.AuthErrorCodes = r.AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY), (t.EmailAuthCredential = r.EmailAuthCredential), (t.EmailAuthProvider = r.EmailAuthProvider), (t.FacebookAuthProvider = r.FacebookAuthProvider), (t.FactorId = r.FactorId), (t.GithubAuthProvider = r.GithubAuthProvider), (t.GoogleAuthProvider = r.GoogleAuthProvider), (t.OAuthCredential = r.OAuthCredential), (t.OAuthProvider = r.OAuthProvider), (t.OperationType = r.OperationType), (t.PhoneAuthCredential = r.PhoneAuthCredential), (t.PhoneAuthProvider = r.PhoneAuthProvider), (t.PhoneMultiFactorGenerator = r.PhoneMultiFactorGenerator), (t.ProviderId = r.ProviderId), (t.RecaptchaVerifier = r.RecaptchaVerifier), (t.SAMLAuthProvider = r.SAMLAuthProvider), (t.SignInMethod = r.SignInMethod), (t.TotpMultiFactorGenerator = r.TotpMultiFactorGenerator), (t.TotpSecret = r.TotpSecret), (t.TwitterAuthProvider = r.TwitterAuthProvider), (t.applyActionCode = r.applyActionCode), (t.beforeAuthStateChanged = r.beforeAuthStateChanged), (t.browserLocalPersistence = r.browserLocalPersistence), (t.browserPopupRedirectResolver = r.browserPopupRedirectResolver), (t.browserSessionPersistence = r.browserSessionPersistence), (t.checkActionCode = r.checkActionCode), (t.confirmPasswordReset = r.confirmPasswordReset), (t.connectAuthEmulator = r.connectAuthEmulator), (t.createUserWithEmailAndPassword = r.createUserWithEmailAndPassword), (t.debugErrorMap = r.debugErrorMap), (t.deleteUser = r.deleteUser), (t.fetchSignInMethodsForEmail = r.fetchSignInMethodsForEmail), (t.getAdditionalUserInfo = r.getAdditionalUserInfo), (t.getAuth = r.getAuth), (t.getIdToken = r.getIdToken), (t.getIdTokenResult = r.getIdTokenResult), (t.getMultiFactorResolver = r.getMultiFactorResolver), (t.getRedirectResult = r.getRedirectResult), (t.inMemoryPersistence = r.inMemoryPersistence), (t.indexedDBLocalPersistence = r.indexedDBLocalPersistence), (t.initializeAuth = r.initializeAuth), (t.initializeRecaptchaConfig = r.initializeRecaptchaConfig), (t.isSignInWithEmailLink = r.isSignInWithEmailLink), (t.linkWithCredential = r.linkWithCredential), (t.linkWithPhoneNumber = r.linkWithPhoneNumber), (t.linkWithPopup = r.linkWithPopup), (t.linkWithRedirect = r.linkWithRedirect), (t.multiFactor = r.multiFactor), (t.onAuthStateChanged = r.onAuthStateChanged), (t.onIdTokenChanged = r.onIdTokenChanged), (t.parseActionCodeURL = r.parseActionCodeURL), (t.prodErrorMap = r.prodErrorMap), (t.reauthenticateWithCredential = r.reauthenticateWithCredential), (t.reauthenticateWithPhoneNumber = r.reauthenticateWithPhoneNumber), (t.reauthenticateWithPopup = r.reauthenticateWithPopup), (t.reauthenticateWithRedirect = r.reauthenticateWithRedirect), (t.reload = r.reload), (t.sendEmailVerification = r.sendEmailVerification), (t.sendPasswordResetEmail = r.sendPasswordResetEmail), (t.sendSignInLinkToEmail = r.sendSignInLinkToEmail), (t.setPersistence = r.setPersistence), (t.signInAnonymously = r.signInAnonymously), (t.signInWithCredential = r.signInWithCredential), (t.signInWithCustomToken = r.signInWithCustomToken), (t.signInWithEmailAndPassword = r.signInWithEmailAndPassword), (t.signInWithEmailLink = r.signInWithEmailLink), (t.signInWithPhoneNumber = r.signInWithPhoneNumber), (t.signInWithPopup = r.signInWithPopup), (t.signInWithRedirect = r.signInWithRedirect), (t.signOut = r.signOut), (t.unlink = r.unlink), (t.updateCurrentUser = r.updateCurrentUser), (t.updateEmail = r.updateEmail), (t.updatePassword = r.updatePassword), (t.updatePhoneNumber = r.updatePhoneNumber), (t.updateProfile = r.updateProfile), (t.useDeviceLanguage = r.useDeviceLanguage), (t.verifyBeforeUpdateEmail = r.verifyBeforeUpdateEmail), (t.verifyPasswordResetCode = r.verifyPasswordResetCode); }, 56630: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970), i = n(71470), o = (function () { function e(e, t, n) { (this.name = e), (this.instanceFactory = t), (this.type = n), (this.multipleInstances = !1), (this.serviceProps = {}), (this.instantiationMode = "LAZY"), (this.onInstanceCreated = null); } return ( (e.prototype.setInstantiationMode = function (e) { return (this.instantiationMode = e), this; }), (e.prototype.setMultipleInstances = function (e) { return (this.multipleInstances = e), this; }), (e.prototype.setServiceProps = function (e) { return (this.serviceProps = e), this; }), (e.prototype.setInstanceCreatedCallback = function (e) { return (this.onInstanceCreated = e), this; }), e ); })(), a = "[DEFAULT]", s = (function () { function e(e, t) { (this.name = e), (this.container = t), (this.component = null), (this.instances = new Map()), (this.instancesDeferred = new Map()), (this.instancesOptions = new Map()), (this.onInitCallbacks = new Map()); } return ( (e.prototype.get = function (e) { var t = this.normalizeInstanceIdentifier(e); if (!this.instancesDeferred.has(t)) { var n = new i.Deferred(); if ((this.instancesDeferred.set(t, n), this.isInitialized(t) || this.shouldAutoInitialize())) try { var r = this.getOrInitializeService({ instanceIdentifier: t }); r && n.resolve(r); } catch (e) {} } return this.instancesDeferred.get(t).promise; }), (e.prototype.getImmediate = function (e) { var t, n = this.normalizeInstanceIdentifier(null == e ? void 0 : e.identifier), r = null !== (t = null == e ? void 0 : e.optional) && void 0 !== t && t; if (!this.isInitialized(n) && !this.shouldAutoInitialize()) { if (r) return null; throw Error("Service ".concat(this.name, " is not available")); } try { return this.getOrInitializeService({ instanceIdentifier: n }); } catch (e) { if (r) return null; throw e; } }), (e.prototype.getComponent = function () { return this.component; }), (e.prototype.setComponent = function (e) { var t, n; if (e.name !== this.name) throw Error("Mismatching Component ".concat(e.name, " for Provider ").concat(this.name, ".")); if (this.component) throw Error("Component for ".concat(this.name, " has already been provided")); if (((this.component = e), this.shouldAutoInitialize())) { if ( (function (e) { return "EAGER" === e.instantiationMode; })(e) ) try { this.getOrInitializeService({ instanceIdentifier: a }); } catch (e) {} try { for (var i = r.__values(this.instancesDeferred.entries()), o = i.next(); !o.done; o = i.next()) { var s = r.__read(o.value, 2), u = s[0], l = s[1], c = this.normalizeInstanceIdentifier(u); try { var d = this.getOrInitializeService({ instanceIdentifier: c }); l.resolve(d); } catch (e) {} } } catch (e) { t = { error: e }; } finally { try { o && !o.done && (n = i.return) && n.call(i); } finally { if (t) throw t.error; } } } }), (e.prototype.clearInstance = function (e) { void 0 === e && (e = a), this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e); }), (e.prototype.delete = function () { return r.__awaiter(this, void 0, void 0, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return ( (e = Array.from(this.instances.values())), [ 4, Promise.all( r.__spreadArray( r.__spreadArray( [], r.__read( e .filter(function (e) { return "INTERNAL" in e; }) .map(function (e) { return e.INTERNAL.delete(); }) ), !1 ), r.__read( e .filter(function (e) { return "_delete" in e; }) .map(function (e) { return e._delete(); }) ), !1 ) ), ] ); case 1: return t.sent(), [2]; } }); }); }), (e.prototype.isComponentSet = function () { return null != this.component; }), (e.prototype.isInitialized = function (e) { return void 0 === e && (e = a), this.instances.has(e); }), (e.prototype.getOptions = function (e) { return void 0 === e && (e = a), this.instancesOptions.get(e) || {}; }), (e.prototype.initialize = function (e) { var t, n; void 0 === e && (e = {}); var i = e.options, o = void 0 === i ? {} : i, a = this.normalizeInstanceIdentifier(e.instanceIdentifier); if (this.isInitialized(a)) throw Error("".concat(this.name, "(").concat(a, ") has already been initialized")); if (!this.isComponentSet()) throw Error("Component ".concat(this.name, " has not been registered yet")); var s = this.getOrInitializeService({ instanceIdentifier: a, options: o }); try { for (var u = r.__values(this.instancesDeferred.entries()), l = u.next(); !l.done; l = u.next()) { var c = r.__read(l.value, 2), d = c[0], h = c[1]; a === this.normalizeInstanceIdentifier(d) && h.resolve(s); } } catch (e) { t = { error: e }; } finally { try { l && !l.done && (n = u.return) && n.call(u); } finally { if (t) throw t.error; } } return s; }), (e.prototype.onInit = function (e, t) { var n, r = this.normalizeInstanceIdentifier(t), i = null !== (n = this.onInitCallbacks.get(r)) && void 0 !== n ? n : new Set(); i.add(e), this.onInitCallbacks.set(r, i); var o = this.instances.get(r); return ( o && e(o, r), function () { i.delete(e); } ); }), (e.prototype.invokeOnInitCallbacks = function (e, t) { var n, i, o = this.onInitCallbacks.get(t); if (o) try { for (var a = r.__values(o), s = a.next(); !s.done; s = a.next()) { var u = s.value; try { u(e, t); } catch (e) {} } } catch (e) { n = { error: e }; } finally { try { s && !s.done && (i = a.return) && i.call(a); } finally { if (n) throw n.error; } } }), (e.prototype.getOrInitializeService = function (e) { var t, n = e.instanceIdentifier, r = e.options, i = void 0 === r ? {} : r, o = this.instances.get(n); if (!o && this.component && ((o = this.component.instanceFactory(this.container, { instanceIdentifier: ((t = n), t === a ? void 0 : t), options: i })), this.instances.set(n, o), this.instancesOptions.set(n, i), this.invokeOnInitCallbacks(o, n), this.component.onInstanceCreated)) try { this.component.onInstanceCreated(this.container, n, o); } catch (e) {} return o || null; }), (e.prototype.normalizeInstanceIdentifier = function (e) { return void 0 === e && (e = a), this.component ? (this.component.multipleInstances ? e : a) : e; }), (e.prototype.shouldAutoInitialize = function () { return !!this.component && "EXPLICIT" !== this.component.instantiationMode; }), e ); })(); var u = (function () { function e(e) { (this.name = e), (this.providers = new Map()); } return ( (e.prototype.addComponent = function (e) { var t = this.getProvider(e.name); if (t.isComponentSet()) throw new Error("Component ".concat(e.name, " has already been registered with ").concat(this.name)); t.setComponent(e); }), (e.prototype.addOrOverwriteComponent = function (e) { this.getProvider(e.name).isComponentSet() && this.providers.delete(e.name), this.addComponent(e); }), (e.prototype.getProvider = function (e) { if (this.providers.has(e)) return this.providers.get(e); var t = new s(e, this); return this.providers.set(e, t), t; }), (e.prototype.getProviders = function () { return Array.from(this.providers.values()); }), e ); })(); (t.Component = o), (t.ComponentContainer = u), (t.Provider = s); }, 91363: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, i = n(99413), o = n(56630), a = n(22970), s = n(71470), u = n(55389), l = "@firebase/installations", c = "0.6.4", d = 1e4, h = "w:".concat(c), p = "FIS_v2", f = "https://firebaseinstallations.googleapis.com/v1", _ = 36e5, g = (((r = {})["missing-app-config-values"] = 'Missing App configuration value: "{$valueName}"'), (r["not-registered"] = "Firebase Installation is not registered."), (r["installation-not-found"] = "Firebase Installation not found."), (r["request-failed"] = '{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"'), (r["app-offline"] = "Could not process request. Application offline."), (r["delete-pending-registration"] = "Can't delete installation while there is a pending registration request."), r), m = new s.ErrorFactory("installations", "Installations", g); function v(e) { return e instanceof s.FirebaseError && e.code.includes("request-failed"); } function y(e) { var t = e.projectId; return "".concat(f, "/projects/").concat(t, "/installations"); } function C(e) { return { token: e.token, requestStatus: 2, expiresIn: ((t = e.expiresIn), Number(t.replace("s", "000"))), creationTime: Date.now() }; var t; } function b(e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r; return a.__generator(this, function (i) { switch (i.label) { case 0: return [4, t.json()]; case 1: return (n = i.sent()), (r = n.error), [2, m.create("request-failed", { requestName: e, serverCode: r.code, serverMessage: r.message, serverStatus: r.status })]; } }); }); } function w(e) { var t = e.apiKey; return new Headers({ "Content-Type": "application/json", Accept: "application/json", "x-goog-api-key": t }); } function S(e, t) { var n = t.refreshToken, r = w(e); return ( r.append( "Authorization", (function (e) { return "".concat(p, " ").concat(e); })(n) ), r ); } function T(e) { return a.__awaiter(this, void 0, void 0, function () { var t; return a.__generator(this, function (n) { switch (n.label) { case 0: return [4, e()]; case 1: return (t = n.sent()).status >= 500 && t.status < 600 ? [2, e()] : [2, t]; } }); }); } function x(e, t) { var n = e.appConfig, r = e.heartbeatServiceProvider, i = t.fid; return a.__awaiter(this, void 0, void 0, function () { var e, t, o, s, u, l, c, d; return a.__generator(this, function (a) { switch (a.label) { case 0: return (e = y(n)), (t = w(n)), (o = r.getImmediate({ optional: !0 })) ? [4, o.getHeartbeatsHeader()] : [3, 2]; case 1: (s = a.sent()) && t.append("x-firebase-client", s), (a.label = 2); case 2: return ( (u = { fid: i, authVersion: p, appId: n.appId, sdkVersion: h }), (l = { method: "POST", headers: t, body: JSON.stringify(u) }), [ 4, T(function () { return fetch(e, l); }), ] ); case 3: return (c = a.sent()).ok ? [4, c.json()] : [3, 5]; case 4: return (d = a.sent()), [2, { fid: d.fid || i, registrationStatus: 2, refreshToken: d.refreshToken, authToken: C(d.authToken) }]; case 5: return [4, b("Create Installation", c)]; case 6: throw a.sent(); } }); }); } function E(e) { return new Promise(function (t) { setTimeout(t, e); }); } var L = /^[cdef][\w-]{21}$/, A = ""; function I() { try { var e = new Uint8Array(17); (self.crypto || self.msCrypto).getRandomValues(e), (e[0] = 112 + (e[0] % 16)); var t = (function (e) { var t = ((n = e), btoa(String.fromCharCode.apply(String, a.__spreadArray([], a.__read(n), !1))) .replace(/\+/g, "-") .replace(/\//g, "_")); var n; return t.substr(0, 22); })(e); return L.test(t) ? t : A; } catch (e) { return A; } } function M(e) { return "".concat(e.appName, "!").concat(e.appId); } var P = new Map(); function O(e, t) { var n = M(e); k(n, t), (function (e, t) { var n = D(); n && n.postMessage({ key: e, fid: t }); N(); })(n, t); } function k(e, t) { var n, r, i = P.get(e); if (i) try { for (var o = a.__values(i), s = o.next(); !s.done; s = o.next()) { (0, s.value)(t); } } catch (e) { n = { error: e }; } finally { try { s && !s.done && (r = o.return) && r.call(o); } finally { if (n) throw n.error; } } } var R = null; function D() { return ( !R && "BroadcastChannel" in self && ((R = new BroadcastChannel("[Firebase] FID Change")).onmessage = function (e) { k(e.data.key, e.data.fid); }), R ); } function N() { 0 === P.size && R && (R.close(), (R = null)); } var B = "firebase-installations-database", F = 1, U = "firebase-installations-store", j = null; function G() { return ( j || (j = u.openDB(B, F, { upgrade: function (e, t) { if (0 === t) e.createObjectStore(U); }, })), j ); } function H(e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r, i, o, s; return a.__generator(this, function (a) { switch (a.label) { case 0: return (n = M(e)), [4, G()]; case 1: return (r = a.sent()), (i = r.transaction(U, "readwrite")), [4, (o = i.objectStore(U)).get(n)]; case 2: return (s = a.sent()), [4, o.put(t, n)]; case 3: return a.sent(), [4, i.done]; case 4: return a.sent(), (s && s.fid === t.fid) || O(e, t.fid), [2, t]; } }); }); } function V(e) { return a.__awaiter(this, void 0, void 0, function () { var t, n, r; return a.__generator(this, function (i) { switch (i.label) { case 0: return (t = M(e)), [4, G()]; case 1: return (n = i.sent()), [4, (r = n.transaction(U, "readwrite")).objectStore(U).delete(t)]; case 2: return i.sent(), [4, r.done]; case 3: return i.sent(), [2]; } }); }); } function Z(e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r, i, o, s, u; return a.__generator(this, function (a) { switch (a.label) { case 0: return (n = M(e)), [4, G()]; case 1: return (r = a.sent()), (i = r.transaction(U, "readwrite")), [4, (o = i.objectStore(U)).get(n)]; case 2: return (s = a.sent()), void 0 !== (u = t(s)) ? [3, 4] : [4, o.delete(n)]; case 3: return a.sent(), [3, 6]; case 4: return [4, o.put(u, n)]; case 5: a.sent(), (a.label = 6); case 6: return [4, i.done]; case 7: return a.sent(), !u || (s && s.fid === u.fid) || O(e, u.fid), [2, u]; } }); }); } function z(e) { return a.__awaiter(this, void 0, void 0, function () { var t, n, r; return a.__generator(this, function (i) { switch (i.label) { case 0: return [ 4, Z(e.appConfig, function (n) { var r = (function (e) { var t = e || { fid: I(), registrationStatus: 0 }; return X(t); })(n), i = (function (e, t) { if (0 === t.registrationStatus) { if (!navigator.onLine) return { installationEntry: t, registrationPromise: Promise.reject(m.create("app-offline")) }; var n = { fid: t.fid, registrationStatus: 1, registrationTime: Date.now() }, r = (function (e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r; return a.__generator(this, function (i) { switch (i.label) { case 0: return i.trys.push([0, 2, , 7]), [4, x(e, t)]; case 1: return (n = i.sent()), [2, H(e.appConfig, n)]; case 2: return v((r = i.sent())) && 409 === r.customData.serverCode ? [4, V(e.appConfig)] : [3, 4]; case 3: return i.sent(), [3, 6]; case 4: return [4, H(e.appConfig, { fid: t.fid, registrationStatus: 0 })]; case 5: i.sent(), (i.label = 6); case 6: throw r; case 7: return [2]; } }); }); })(e, n); return { installationEntry: n, registrationPromise: r }; } return 1 === t.registrationStatus ? { installationEntry: t, registrationPromise: Y(e) } : { installationEntry: t }; })(e, r); return (t = i.registrationPromise), i.installationEntry; }), ]; case 1: return (n = i.sent()).fid !== A ? [3, 3] : ((r = {}), [4, t]); case 2: return [2, ((r.installationEntry = i.sent()), r)]; case 3: return [2, { installationEntry: n, registrationPromise: t }]; } }); }); } function Y(e) { return a.__awaiter(this, void 0, void 0, function () { var t, n, r, i; return a.__generator(this, function (o) { switch (o.label) { case 0: return [4, W(e.appConfig)]; case 1: (t = o.sent()), (o.label = 2); case 2: return 1 !== t.registrationStatus ? [3, 5] : [4, E(100)]; case 3: return o.sent(), [4, W(e.appConfig)]; case 4: return (t = o.sent()), [3, 2]; case 5: return 0 !== t.registrationStatus ? [3, 7] : [4, z(e)]; case 6: return (n = o.sent()), (r = n.installationEntry), (i = n.registrationPromise) ? [2, i] : [2, r]; case 7: return [2, t]; } }); }); } function W(e) { return Z(e, function (e) { if (!e) throw m.create("installation-not-found"); return X(e); }); } function X(e) { return 1 === (t = e).registrationStatus && t.registrationTime + d < Date.now() ? { fid: e.fid, registrationStatus: 0 } : e; var t; } function q(e, t) { var n = e.appConfig, r = e.heartbeatServiceProvider; return a.__awaiter(this, void 0, void 0, function () { var e, i, o, s, u, l, c, d; return a.__generator(this, function (a) { switch (a.label) { case 0: return ( (e = (function (e, t) { var n = t.fid; return "".concat(y(e), "/").concat(n, "/authTokens:generate"); })(n, t)), (i = S(n, t)), (o = r.getImmediate({ optional: !0 })) ? [4, o.getHeartbeatsHeader()] : [3, 2] ); case 1: (s = a.sent()) && i.append("x-firebase-client", s), (a.label = 2); case 2: return ( (u = { installation: { sdkVersion: h, appId: n.appId } }), (l = { method: "POST", headers: i, body: JSON.stringify(u) }), [ 4, T(function () { return fetch(e, l); }), ] ); case 3: return (c = a.sent()).ok ? [4, c.json()] : [3, 5]; case 4: return (d = a.sent()), [2, C(d)]; case 5: return [4, b("Generate Auth Token", c)]; case 6: throw a.sent(); } }); }); } function K(e, t) { return ( void 0 === t && (t = !1), a.__awaiter(this, void 0, void 0, function () { var n, r, i; return a.__generator(this, function (o) { switch (o.label) { case 0: return [ 4, Z(e.appConfig, function (r) { if (!J(r)) throw m.create("not-registered"); var i = r.authToken; if ( !t && (function (e) { return ( 2 === e.requestStatus && !(function (e) { var t = Date.now(); return t < e.creationTime || e.creationTime + e.expiresIn < t + _; })(e) ); })(i) ) return r; if (1 === i.requestStatus) return ( (n = (function (e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r; return a.__generator(this, function (i) { switch (i.label) { case 0: return [4, $(e.appConfig)]; case 1: (n = i.sent()), (i.label = 2); case 2: return 1 !== n.authToken.requestStatus ? [3, 5] : [4, E(100)]; case 3: return i.sent(), [4, $(e.appConfig)]; case 4: return (n = i.sent()), [3, 2]; case 5: return 0 === (r = n.authToken).requestStatus ? [2, K(e, t)] : [2, r]; } }); }); })(e, t)), r ); if (!navigator.onLine) throw m.create("app-offline"); var o = (function (e) { var t = { requestStatus: 1, requestTime: Date.now() }; return a.__assign(a.__assign({}, e), { authToken: t }); })(r); return ( (n = (function (e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r, i; return a.__generator(this, function (o) { switch (o.label) { case 0: return o.trys.push([0, 3, , 8]), [4, q(e, t)]; case 1: return (n = o.sent()), (i = a.__assign(a.__assign({}, t), { authToken: n })), [4, H(e.appConfig, i)]; case 2: return o.sent(), [2, n]; case 3: return !v((r = o.sent())) || (401 !== r.customData.serverCode && 404 !== r.customData.serverCode) ? [3, 5] : [4, V(e.appConfig)]; case 4: return o.sent(), [3, 7]; case 5: return (i = a.__assign(a.__assign({}, t), { authToken: { requestStatus: 0 } })), [4, H(e.appConfig, i)]; case 6: o.sent(), (o.label = 7); case 7: throw r; case 8: return [2]; } }); }); })(e, o)), o ); }), ]; case 1: return (r = o.sent()), n ? [4, n] : [3, 3]; case 2: return (i = o.sent()), [3, 4]; case 3: (i = r.authToken), (o.label = 4); case 4: return [2, i]; } }); }) ); } function $(e) { return Z(e, function (e) { if (!J(e)) throw m.create("not-registered"); var t, n = e.authToken; return 1 === (t = n).requestStatus && t.requestTime + d < Date.now() ? a.__assign(a.__assign({}, e), { authToken: { requestStatus: 0 } }) : e; }); } function J(e) { return void 0 !== e && 2 === e.registrationStatus; } function Q(e) { return a.__awaiter(this, void 0, void 0, function () { var t, n, r, i; return a.__generator(this, function (o) { switch (o.label) { case 0: return [4, z((t = e))]; case 1: return (n = o.sent()), (r = n.installationEntry), (i = n.registrationPromise) ? i.catch(console.error) : K(t).catch(console.error), [2, r.fid]; } }); }); } function ee(e, t) { return ( void 0 === t && (t = !1), a.__awaiter(this, void 0, void 0, function () { var n; return a.__generator(this, function (r) { switch (r.label) { case 0: return [4, te((n = e))]; case 1: return r.sent(), [4, K(n, t)]; case 2: return [2, r.sent().token]; } }); }) ); } function te(e) { return a.__awaiter(this, void 0, void 0, function () { var t; return a.__generator(this, function (n) { switch (n.label) { case 0: return [4, z(e)]; case 1: return (t = n.sent().registrationPromise) ? [4, t] : [3, 3]; case 2: n.sent(), (n.label = 3); case 3: return [2]; } }); }); } function ne(e, t) { return a.__awaiter(this, void 0, void 0, function () { var n, r, i, o; return a.__generator(this, function (a) { switch (a.label) { case 0: return ( (n = (function (e, t) { var n = t.fid; return "".concat(y(e), "/").concat(n); })(e, t)), (r = S(e, t)), (i = { method: "DELETE", headers: r }), [ 4, T(function () { return fetch(n, i); }), ] ); case 1: return (o = a.sent()).ok ? [3, 3] : [4, b("Delete Installation", o)]; case 2: throw a.sent(); case 3: return [2]; } }); }); } function re(e) { return m.create("missing-app-config-values", { valueName: e }); } var ie = "installations", oe = function (e) { var t = e.getProvider("app").getImmediate(), n = (function (e) { var t, n; if (!e || !e.options) throw re("App Configuration"); if (!e.name) throw re("App Name"); try { for (var r = a.__values(["projectId", "apiKey", "appId"]), i = r.next(); !i.done; i = r.next()) { var o = i.value; if (!e.options[o]) throw re(o); } } catch (e) { t = { error: e }; } finally { try { i && !i.done && (n = r.return) && n.call(r); } finally { if (t) throw t.error; } } return { appName: e.name, projectId: e.options.projectId, apiKey: e.options.apiKey, appId: e.options.appId }; })(t); return { app: t, appConfig: n, heartbeatServiceProvider: i._getProvider(t, "heartbeat"), _delete: function () { return Promise.resolve(); }, }; }, ae = function (e) { var t = e.getProvider("app").getImmediate(), n = i._getProvider(t, ie).getImmediate(); return { getId: function () { return Q(n); }, getToken: function (e) { return ee(n, e); }, }; }; i._registerComponent(new o.Component(ie, oe, "PUBLIC")), i._registerComponent(new o.Component("installations-internal", ae, "PRIVATE")), i.registerVersion(l, c), i.registerVersion(l, c, "cjs5"), (t.deleteInstallations = function (e) { return a.__awaiter(this, void 0, void 0, function () { var t, n; return a.__generator(this, function (r) { switch (r.label) { case 0: return [ 4, Z((t = e.appConfig), function (e) { if (!e || 0 !== e.registrationStatus) return e; }), ]; case 1: if (!(n = r.sent())) return [3, 6]; if (1 !== n.registrationStatus) return [3, 2]; throw m.create("delete-pending-registration"); case 2: if (2 !== n.registrationStatus) return [3, 6]; if (navigator.onLine) return [3, 3]; throw m.create("app-offline"); case 3: return [4, ne(t, n)]; case 4: return r.sent(), [4, V(t)]; case 5: r.sent(), (r.label = 6); case 6: return [2]; } }); }); }), (t.getId = Q), (t.getInstallations = function (e) { return void 0 === e && (e = i.getApp()), i._getProvider(e, "installations").getImmediate(); }), (t.getToken = ee), (t.onIdChange = function (e, t) { var n = e.appConfig; return ( (function (e, t) { D(); var n = M(e), r = P.get(n); r || ((r = new Set()), P.set(n, r)), r.add(t); })(n, t), function () { !(function (e, t) { var n = M(e), r = P.get(n); r && (r.delete(t), 0 === r.size && P.delete(n), N()); })(n, t); } ); }); }, 4015: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r, i, o = n(22970), a = []; (t.LogLevel = void 0), ((i = t.LogLevel || (t.LogLevel = {}))[(i.DEBUG = 0)] = "DEBUG"), (i[(i.VERBOSE = 1)] = "VERBOSE"), (i[(i.INFO = 2)] = "INFO"), (i[(i.WARN = 3)] = "WARN"), (i[(i.ERROR = 4)] = "ERROR"), (i[(i.SILENT = 5)] = "SILENT"); var s = { debug: t.LogLevel.DEBUG, verbose: t.LogLevel.VERBOSE, info: t.LogLevel.INFO, warn: t.LogLevel.WARN, error: t.LogLevel.ERROR, silent: t.LogLevel.SILENT }, u = t.LogLevel.INFO, l = (((r = {})[t.LogLevel.DEBUG] = "log"), (r[t.LogLevel.VERBOSE] = "log"), (r[t.LogLevel.INFO] = "info"), (r[t.LogLevel.WARN] = "warn"), (r[t.LogLevel.ERROR] = "error"), r), c = function (e, t) { for (var n = [], r = 2; r < arguments.length; r++) n[r - 2] = arguments[r]; if (!(t < e.logLevel)) { var i = new Date().toISOString(), a = l[t]; if (!a) throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t, ")")); console[a].apply(console, o.__spreadArray(["[".concat(i, "] ").concat(e.name, ":")], n, !1)); } }, d = (function () { function e(e) { (this.name = e), (this._logLevel = u), (this._logHandler = c), (this._userLogHandler = null), a.push(this); } return ( Object.defineProperty(e.prototype, "logLevel", { get: function () { return this._logLevel; }, set: function (e) { if (!(e in t.LogLevel)) throw new TypeError('Invalid value "'.concat(e, '" assigned to `logLevel`')); this._logLevel = e; }, enumerable: !1, configurable: !0, }), (e.prototype.setLogLevel = function (e) { this._logLevel = "string" == typeof e ? s[e] : e; }), Object.defineProperty(e.prototype, "logHandler", { get: function () { return this._logHandler; }, set: function (e) { if ("function" != typeof e) throw new TypeError("Value assigned to `logHandler` must be a function"); this._logHandler = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "userLogHandler", { get: function () { return this._userLogHandler; }, set: function (e) { this._userLogHandler = e; }, enumerable: !1, configurable: !0, }), (e.prototype.debug = function () { for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n]; this._userLogHandler && this._userLogHandler.apply(this, o.__spreadArray([this, t.LogLevel.DEBUG], e, !1)), this._logHandler.apply(this, o.__spreadArray([this, t.LogLevel.DEBUG], e, !1)); }), (e.prototype.log = function () { for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n]; this._userLogHandler && this._userLogHandler.apply(this, o.__spreadArray([this, t.LogLevel.VERBOSE], e, !1)), this._logHandler.apply(this, o.__spreadArray([this, t.LogLevel.VERBOSE], e, !1)); }), (e.prototype.info = function () { for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n]; this._userLogHandler && this._userLogHandler.apply(this, o.__spreadArray([this, t.LogLevel.INFO], e, !1)), this._logHandler.apply(this, o.__spreadArray([this, t.LogLevel.INFO], e, !1)); }), (e.prototype.warn = function () { for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n]; this._userLogHandler && this._userLogHandler.apply(this, o.__spreadArray([this, t.LogLevel.WARN], e, !1)), this._logHandler.apply(this, o.__spreadArray([this, t.LogLevel.WARN], e, !1)); }), (e.prototype.error = function () { for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n]; this._userLogHandler && this._userLogHandler.apply(this, o.__spreadArray([this, t.LogLevel.ERROR], e, !1)), this._logHandler.apply(this, o.__spreadArray([this, t.LogLevel.ERROR], e, !1)); }), e ); })(); (t.Logger = d), (t.setLogLevel = function (e) { a.forEach(function (t) { t.setLogLevel(e); }); }), (t.setUserLogHandler = function (e, n) { for ( var r = function (r) { var i = null; n && n.level && (i = s[n.level]), (r.userLogHandler = null === e ? null : function (n, r) { for (var o = [], a = 2; a < arguments.length; a++) o[a - 2] = arguments[a]; var s = o .map(function (e) { if (null == e) return null; if ("string" == typeof e) return e; if ("number" == typeof e || "boolean" == typeof e) return e.toString(); if (e instanceof Error) return e.message; try { return JSON.stringify(e); } catch (e) { return null; } }) .filter(function (e) { return e; }) .join(" "); r >= (null != i ? i : n.logLevel) && e({ level: t.LogLevel[r].toLowerCase(), message: s, args: o, type: n.name }); }); }, i = 0, o = a; i < o.length; i++ ) { r(o[i]); } }); }, 19917: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(99413), i = n(71470), o = n(56630), a = n(4015), s = n(22970); n(91363); var u, l = "@firebase/remote-config", c = "0.4.4", d = (function () { function e() { this.listeners = []; } return ( (e.prototype.addEventListener = function (e) { this.listeners.push(e); }), (e.prototype.abort = function () { this.listeners.forEach(function (e) { return e(); }); }), e ); })(), h = "remote-config", p = (((u = {})["registration-window"] = "Undefined window object. This SDK only supports usage in a browser environment."), (u["registration-project-id"] = "Undefined project identifier. Check Firebase app initialization."), (u["registration-api-key"] = "Undefined API key. Check Firebase app initialization."), (u["registration-app-id"] = "Undefined app identifier. Check Firebase app initialization."), (u["storage-open"] = "Error thrown when opening storage. Original error: {$originalErrorMessage}."), (u["storage-get"] = "Error thrown when reading from storage. Original error: {$originalErrorMessage}."), (u["storage-set"] = "Error thrown when writing to storage. Original error: {$originalErrorMessage}."), (u["storage-delete"] = "Error thrown when deleting from storage. Original error: {$originalErrorMessage}."), (u["fetch-client-network"] = "Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}."), (u["fetch-timeout"] = 'The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.'), (u["fetch-throttle"] = 'The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.'), (u["fetch-client-parse"] = "Fetch client could not parse response. Original error: {$originalErrorMessage}."), (u["fetch-status"] = "Fetch server returned an HTTP error status. HTTP status: {$httpStatus}."), (u["indexed-db-unavailable"] = "Indexed DB is not supported by current browser"), u), f = new i.ErrorFactory("remoteconfig", "Remote Config", p); var _ = ["1", "true", "t", "yes", "y", "on"], g = (function () { function e(e, t) { void 0 === t && (t = ""), (this._source = e), (this._value = t); } return ( (e.prototype.asString = function () { return this._value; }), (e.prototype.asBoolean = function () { return "static" !== this._source && _.indexOf(this._value.toLowerCase()) >= 0; }), (e.prototype.asNumber = function () { if ("static" === this._source) return 0; var e = Number(this._value); return isNaN(e) && (e = 0), e; }), (e.prototype.getSource = function () { return this._source; }), e ); })(); function m(e) { return s.__awaiter(this, void 0, void 0, function () { var t, n, r, o; return s.__generator(this, function (a) { switch (a.label) { case 0: return (t = i.getModularInstance(e)), [4, Promise.all([t._storage.getLastSuccessfulFetchResponse(), t._storage.getActiveConfigEtag()])]; case 1: return (n = a.sent()), (r = n[0]), (o = n[1]), r && r.config && r.eTag && r.eTag !== o ? [4, Promise.all([t._storageCache.setActiveConfig(r.config), t._storage.setActiveConfigEtag(r.eTag)])] : [2, !1]; case 2: return a.sent(), [2, !0]; } }); }); } function v(e) { var t = i.getModularInstance(e); return ( t._initializePromise || (t._initializePromise = t._storageCache.loadFromStorage().then(function () { t._isInitializationComplete = !0; })), t._initializePromise ); } function y(e) { return s.__awaiter(this, void 0, void 0, function () { var t, n, r, o, a = this; return s.__generator(this, function (u) { switch (u.label) { case 0: (t = i.getModularInstance(e)), (n = new d()), setTimeout(function () { return s.__awaiter(a, void 0, void 0, function () { return s.__generator(this, function (e) { return n.abort(), [2]; }); }); }, t.settings.fetchTimeoutMillis), (u.label = 1); case 1: return u.trys.push([1, 4, , 6]), [4, t._client.fetch({ cacheMaxAgeMillis: t.settings.minimumFetchIntervalMillis, signal: n })]; case 2: return u.sent(), [4, t._storageCache.setLastFetchStatus("success")]; case 3: return u.sent(), [3, 6]; case 4: return (r = u.sent()), (c = "fetch-throttle"), (o = (l = r) instanceof i.FirebaseError && -1 !== l.code.indexOf(c) ? "throttle" : "failure"), [4, t._storageCache.setLastFetchStatus(o)]; case 5: throw (u.sent(), r); case 6: return [2]; } var l, c; }); }); } function C(e, t) { var n = i.getModularInstance(e); n._isInitializationComplete || n._logger.debug('A value was requested for key "'.concat(t, '" before SDK initialization completed.') + " Await on ensureInitialized if the intent was to get a previously activated value."); var r = n._storageCache.getActiveConfig(); return r && void 0 !== r[t] ? new g("remote", r[t]) : n.defaultConfig && void 0 !== n.defaultConfig[t] ? new g("default", String(n.defaultConfig[t])) : (n._logger.debug('Returning static value for key "'.concat(t, '".') + " Define a default or remote value if this is unintentional."), new g("static")); } var b = (function () { function e(e, t, n, r) { (this.client = e), (this.storage = t), (this.storageCache = n), (this.logger = r); } return ( (e.prototype.isCachedDataFresh = function (e, t) { if (!t) return this.logger.debug("Config fetch cache check. Cache unpopulated."), !1; var n = Date.now() - t, r = n <= e; return this.logger.debug("Config fetch cache check." + " Cache age millis: ".concat(n, ".") + " Cache max age millis (minimumFetchIntervalMillis setting): ".concat(e, ".") + " Is cache hit: ".concat(r, ".")), r; }), (e.prototype.fetch = function (e) { return s.__awaiter(this, void 0, void 0, function () { var t, n, r, i, o; return s.__generator(this, function (a) { switch (a.label) { case 0: return [4, Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(), this.storage.getLastSuccessfulFetchResponse()])]; case 1: return (t = a.sent()), (n = t[0]), (r = t[1]) && this.isCachedDataFresh(e.cacheMaxAgeMillis, n) ? [2, r] : ((e.eTag = r && r.eTag), [4, this.client.fetch(e)]); case 2: return (i = a.sent()), (o = [this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())]), 200 === i.status && o.push(this.storage.setLastSuccessfulFetchResponse(i)), [4, Promise.all(o)]; case 3: return a.sent(), [2, i]; } }); }); }), e ); })(); var w = (function () { function e(e, t, n, r, i, o) { (this.firebaseInstallations = e), (this.sdkVersion = t), (this.namespace = n), (this.projectId = r), (this.apiKey = i), (this.appId = o); } return ( (e.prototype.fetch = function (e) { return s.__awaiter(this, void 0, void 0, function () { var t, n, r, i, o, a, u, l, c, d, h, p, _, g, m, v, y, C, b; return s.__generator(this, function (s) { switch (s.label) { case 0: return [4, Promise.all([this.firebaseInstallations.getId(), this.firebaseInstallations.getToken()])]; case 1: (t = s.sent()), (n = t[0]), (r = t[1]), (i = window.FIREBASE_REMOTE_CONFIG_URL_BASE || "https://firebaseremoteconfig.googleapis.com"), (o = "".concat(i, "/v1/projects/").concat(this.projectId, "/namespaces/").concat(this.namespace, ":fetch?key=").concat(this.apiKey)), (a = { "Content-Type": "application/json", "Content-Encoding": "gzip", "If-None-Match": e.eTag || "*" }), (u = { sdk_version: this.sdkVersion, app_instance_id: n, app_instance_id_token: r, app_id: this.appId, language_code: (void 0 === w && (w = navigator), (w.languages && w.languages[0]) || w.language) }), (l = { method: "POST", headers: a, body: JSON.stringify(u) }), (c = fetch(o, l)), (d = new Promise(function (t, n) { e.signal.addEventListener(function () { var e = new Error("The operation was aborted."); (e.name = "AbortError"), n(e); }); })), (s.label = 2); case 2: return s.trys.push([2, 5, , 6]), [4, Promise.race([c, d])]; case 3: return s.sent(), [4, c]; case 4: return (h = s.sent()), [3, 6]; case 5: throw ((p = s.sent()), (_ = "fetch-client-network"), "AbortError" === (null == p ? void 0 : p.name) && (_ = "fetch-timeout"), f.create(_, { originalErrorMessage: null == p ? void 0 : p.message })); case 6: if (((g = h.status), (m = h.headers.get("ETag") || void 0), 200 !== h.status)) return [3, 11]; (C = void 0), (s.label = 7); case 7: return s.trys.push([7, 9, , 10]), [4, h.json()]; case 8: return (C = s.sent()), [3, 10]; case 9: throw ((b = s.sent()), f.create("fetch-client-parse", { originalErrorMessage: null == b ? void 0 : b.message })); case 10: (v = C.entries), (y = C.state), (s.label = 11); case 11: if (("INSTANCE_STATE_UNSPECIFIED" === y ? (g = 500) : "NO_CHANGE" === y ? (g = 304) : ("NO_TEMPLATE" !== y && "EMPTY_CONFIG" !== y) || (v = {}), 304 !== g && 200 !== g)) throw f.create("fetch-status", { httpStatus: g }); return [2, { status: g, eTag: m, config: v }]; } var w; }); }); }), e ); })(); function S(e, t) { return new Promise(function (n, r) { var i = Math.max(t - Date.now(), 0), o = setTimeout(n, i); e.addEventListener(function () { clearTimeout(o), r(f.create("fetch-throttle", { throttleEndTimeMillis: t })); }); }); } var T = (function () { function e(e, t) { (this.client = e), (this.storage = t); } return ( (e.prototype.fetch = function (e) { return s.__awaiter(this, void 0, void 0, function () { var t; return s.__generator(this, function (n) { switch (n.label) { case 0: return [4, this.storage.getThrottleMetadata()]; case 1: return (t = n.sent() || { backoffCount: 0, throttleEndTimeMillis: Date.now() }), [2, this.attemptFetch(e, t)]; } }); }); }), (e.prototype.attemptFetch = function (e, t) { var n = t.throttleEndTimeMillis, r = t.backoffCount; return s.__awaiter(this, void 0, void 0, function () { var t, o, a; return s.__generator(this, function (s) { switch (s.label) { case 0: return [4, S(e.signal, n)]; case 1: s.sent(), (s.label = 2); case 2: return s.trys.push([2, 5, , 7]), [4, this.client.fetch(e)]; case 3: return (t = s.sent()), [4, this.storage.deleteThrottleMetadata()]; case 4: return s.sent(), [2, t]; case 5: if ( !(function (e) { if (!(e instanceof i.FirebaseError && e.customData)) return !1; var t = Number(e.customData.httpStatus); return 429 === t || 500 === t || 503 === t || 504 === t; })((o = s.sent())) ) throw o; return (a = { throttleEndTimeMillis: Date.now() + i.calculateBackoffMillis(r), backoffCount: r + 1 }), [4, this.storage.setThrottleMetadata(a)]; case 6: return s.sent(), [2, this.attemptFetch(e, a)]; case 7: return [2]; } }); }); }), e ); })(), x = (function () { function e(e, t, n, r, i) { (this.app = e), (this._client = t), (this._storageCache = n), (this._storage = r), (this._logger = i), (this._isInitializationComplete = !1), (this.settings = { fetchTimeoutMillis: 6e4, minimumFetchIntervalMillis: 432e5 }), (this.defaultConfig = {}); } return ( Object.defineProperty(e.prototype, "fetchTimeMillis", { get: function () { return this._storageCache.getLastSuccessfulFetchTimestampMillis() || -1; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "lastFetchStatus", { get: function () { return this._storageCache.getLastFetchStatus() || "no-fetch-yet"; }, enumerable: !1, configurable: !0, }), e ); })(); function E(e, t) { var n = e.target.error || void 0; return f.create(t, { originalErrorMessage: n && (null == n ? void 0 : n.message) }); } var L = "app_namespace_store"; var A = (function () { function e(e, t, n, r) { void 0 === r && (r = new Promise(function (e, t) { try { var n = indexedDB.open("firebase_remote_config", 1); (n.onerror = function (e) { t(E(e, "storage-open")); }), (n.onsuccess = function (t) { e(t.target.result); }), (n.onupgradeneeded = function (e) { var t = e.target.result; 0 === e.oldVersion && t.createObjectStore(L, { keyPath: "compositeKey" }); }); } catch (e) { t(f.create("storage-open", { originalErrorMessage: null == e ? void 0 : e.message })); } })), (this.appId = e), (this.appName = t), (this.namespace = n), (this.openDbPromise = r); } return ( (e.prototype.getLastFetchStatus = function () { return this.get("last_fetch_status"); }), (e.prototype.setLastFetchStatus = function (e) { return this.set("last_fetch_status", e); }), (e.prototype.getLastSuccessfulFetchTimestampMillis = function () { return this.get("last_successful_fetch_timestamp_millis"); }), (e.prototype.setLastSuccessfulFetchTimestampMillis = function (e) { return this.set("last_successful_fetch_timestamp_millis", e); }), (e.prototype.getLastSuccessfulFetchResponse = function () { return this.get("last_successful_fetch_response"); }), (e.prototype.setLastSuccessfulFetchResponse = function (e) { return this.set("last_successful_fetch_response", e); }), (e.prototype.getActiveConfig = function () { return this.get("active_config"); }), (e.prototype.setActiveConfig = function (e) { return this.set("active_config", e); }), (e.prototype.getActiveConfigEtag = function () { return this.get("active_config_etag"); }), (e.prototype.setActiveConfigEtag = function (e) { return this.set("active_config_etag", e); }), (e.prototype.getThrottleMetadata = function () { return this.get("throttle_metadata"); }), (e.prototype.setThrottleMetadata = function (e) { return this.set("throttle_metadata", e); }), (e.prototype.deleteThrottleMetadata = function () { return this.delete("throttle_metadata"); }), (e.prototype.get = function (e) { return s.__awaiter(this, void 0, void 0, function () { var t, n = this; return s.__generator(this, function (r) { switch (r.label) { case 0: return [4, this.openDbPromise]; case 1: return ( (t = r.sent()), [ 2, new Promise(function (r, i) { var o = t.transaction([L], "readonly").objectStore(L), a = n.createCompositeKey(e); try { var s = o.get(a); (s.onerror = function (e) { i(E(e, "storage-get")); }), (s.onsuccess = function (e) { var t = e.target.result; r(t ? t.value : void 0); }); } catch (e) { i(f.create("storage-get", { originalErrorMessage: null == e ? void 0 : e.message })); } }), ] ); } }); }); }), (e.prototype.set = function (e, t) { return s.__awaiter(this, void 0, void 0, function () { var n, r = this; return s.__generator(this, function (i) { switch (i.label) { case 0: return [4, this.openDbPromise]; case 1: return ( (n = i.sent()), [ 2, new Promise(function (i, o) { var a = n.transaction([L], "readwrite").objectStore(L), s = r.createCompositeKey(e); try { var u = a.put({ compositeKey: s, value: t }); (u.onerror = function (e) { o(E(e, "storage-set")); }), (u.onsuccess = function () { i(); }); } catch (e) { o(f.create("storage-set", { originalErrorMessage: null == e ? void 0 : e.message })); } }), ] ); } }); }); }), (e.prototype.delete = function (e) { return s.__awaiter(this, void 0, void 0, function () { var t, n = this; return s.__generator(this, function (r) { switch (r.label) { case 0: return [4, this.openDbPromise]; case 1: return ( (t = r.sent()), [ 2, new Promise(function (r, i) { var o = t.transaction([L], "readwrite").objectStore(L), a = n.createCompositeKey(e); try { var s = o.delete(a); (s.onerror = function (e) { i(E(e, "storage-delete")); }), (s.onsuccess = function () { r(); }); } catch (e) { i(f.create("storage-delete", { originalErrorMessage: null == e ? void 0 : e.message })); } }), ] ); } }); }); }), (e.prototype.createCompositeKey = function (e) { return [this.appId, this.appName, this.namespace, e].join(); }), e ); })(), I = (function () { function e(e) { this.storage = e; } return ( (e.prototype.getLastFetchStatus = function () { return this.lastFetchStatus; }), (e.prototype.getLastSuccessfulFetchTimestampMillis = function () { return this.lastSuccessfulFetchTimestampMillis; }), (e.prototype.getActiveConfig = function () { return this.activeConfig; }), (e.prototype.loadFromStorage = function () { return s.__awaiter(this, void 0, void 0, function () { var e, t, n, r, i, o; return s.__generator(this, function (a) { switch (a.label) { case 0: return (e = this.storage.getLastFetchStatus()), (t = this.storage.getLastSuccessfulFetchTimestampMillis()), (n = this.storage.getActiveConfig()), [4, e]; case 1: return (r = a.sent()) && (this.lastFetchStatus = r), [4, t]; case 2: return (i = a.sent()) && (this.lastSuccessfulFetchTimestampMillis = i), [4, n]; case 3: return (o = a.sent()) && (this.activeConfig = o), [2]; } }); }); }), (e.prototype.setLastFetchStatus = function (e) { return (this.lastFetchStatus = e), this.storage.setLastFetchStatus(e); }), (e.prototype.setLastSuccessfulFetchTimestampMillis = function (e) { return (this.lastSuccessfulFetchTimestampMillis = e), this.storage.setLastSuccessfulFetchTimestampMillis(e); }), (e.prototype.setActiveConfig = function (e) { return (this.activeConfig = e), this.storage.setActiveConfig(e); }), e ); })(); r._registerComponent( new o.Component( h, function (e, t) { var n = t.instanceIdentifier, o = e.getProvider("app").getImmediate(), s = e.getProvider("installations-internal").getImmediate(); if ("undefined" == typeof window) throw f.create("registration-window"); if (!i.isIndexedDBAvailable()) throw f.create("indexed-db-unavailable"); var u = o.options, c = u.projectId, d = u.apiKey, h = u.appId; if (!c) throw f.create("registration-project-id"); if (!d) throw f.create("registration-api-key"); if (!h) throw f.create("registration-app-id"); n = n || "firebase"; var p = new A(h, o.name, n), _ = new I(p), g = new a.Logger(l); g.logLevel = a.LogLevel.ERROR; var m = new w(s, r.SDK_VERSION, n, c, d, h), y = new T(m, p), C = new b(y, p, _, g), S = new x(o, C, _, p, g); return v(S), S; }, "PUBLIC" ).setMultipleInstances(!0) ), r.registerVersion(l, c), r.registerVersion(l, c, "cjs5"), (t.activate = m), (t.ensureInitialized = v), (t.fetchAndActivate = function (e) { return s.__awaiter(this, void 0, void 0, function () { return s.__generator(this, function (t) { switch (t.label) { case 0: return [4, y((e = i.getModularInstance(e)))]; case 1: return t.sent(), [2, m(e)]; } }); }); }), (t.fetchConfig = y), (t.getAll = function (e) { var t = i.getModularInstance(e); return (function (e, t) { void 0 === e && (e = {}); void 0 === t && (t = {}); return Object.keys(s.__assign(s.__assign({}, e), t)); })(t._storageCache.getActiveConfig(), t.defaultConfig).reduce(function (t, n) { return (t[n] = C(e, n)), t; }, {}); }), (t.getBoolean = function (e, t) { return C(i.getModularInstance(e), t).asBoolean(); }), (t.getNumber = function (e, t) { return C(i.getModularInstance(e), t).asNumber(); }), (t.getRemoteConfig = function (e) { return void 0 === e && (e = r.getApp()), (e = i.getModularInstance(e)), r._getProvider(e, h).getImmediate(); }), (t.getString = function (e, t) { return C(i.getModularInstance(e), t).asString(); }), (t.getValue = C), (t.isSupported = function () { return s.__awaiter(this, void 0, void 0, function () { return s.__generator(this, function (e) { switch (e.label) { case 0: if (!i.isIndexedDBAvailable()) return [2, !1]; e.label = 1; case 1: return e.trys.push([1, 3, , 4]), [4, i.validateIndexedDBOpenable()]; case 2: return [2, e.sent()]; case 3: return e.sent(), [2, !1]; case 4: return [2]; } }); }); }), (t.setLogLevel = function (e, t) { var n = i.getModularInstance(e); switch (t) { case "debug": n._logger.logLevel = a.LogLevel.DEBUG; break; case "silent": n._logger.logLevel = a.LogLevel.SILENT; break; default: n._logger.logLevel = a.LogLevel.ERROR; } }); }, 71470: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); const r = { NODE_CLIENT: !1, NODE_ADMIN: !1, SDK_VERSION: "${JSCORE_VERSION}" }, i = function (e, t) { if (!e) throw o(t); }, o = function (e) { return new Error("Firebase Database (" + r.SDK_VERSION + ") INTERNAL ASSERT FAILED: " + e); }, a = function (e) { const t = []; let n = 0; for (let r = 0; r < e.length; r++) { let i = e.charCodeAt(r); i < 128 ? (t[n++] = i) : i < 2048 ? ((t[n++] = (i >> 6) | 192), (t[n++] = (63 & i) | 128)) : 55296 == (64512 & i) && r + 1 < e.length && 56320 == (64512 & e.charCodeAt(r + 1)) ? ((i = 65536 + ((1023 & i) << 10) + (1023 & e.charCodeAt(++r))), (t[n++] = (i >> 18) | 240), (t[n++] = ((i >> 12) & 63) | 128), (t[n++] = ((i >> 6) & 63) | 128), (t[n++] = (63 & i) | 128)) : ((t[n++] = (i >> 12) | 224), (t[n++] = ((i >> 6) & 63) | 128), (t[n++] = (63 & i) | 128)); } return t; }, s = { byteToCharMap_: null, charToByteMap_: null, byteToCharMapWebSafe_: null, charToByteMapWebSafe_: null, ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", get ENCODED_VALS() { return this.ENCODED_VALS_BASE + "+/="; }, get ENCODED_VALS_WEBSAFE() { return this.ENCODED_VALS_BASE + "-_."; }, HAS_NATIVE_SUPPORT: "function" == typeof atob, encodeByteArray(e, t) { if (!Array.isArray(e)) throw Error("encodeByteArray takes an array as a parameter"); this.init_(); const n = t ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = []; for (let t = 0; t < e.length; t += 3) { const i = e[t], o = t + 1 < e.length, a = o ? e[t + 1] : 0, s = t + 2 < e.length, u = s ? e[t + 2] : 0, l = i >> 2, c = ((3 & i) << 4) | (a >> 4); let d = ((15 & a) << 2) | (u >> 6), h = 63 & u; s || ((h = 64), o || (d = 64)), r.push(n[l], n[c], n[d], n[h]); } return r.join(""); }, encodeString(e, t) { return this.HAS_NATIVE_SUPPORT && !t ? btoa(e) : this.encodeByteArray(a(e), t); }, decodeString(e, t) { return this.HAS_NATIVE_SUPPORT && !t ? atob(e) : (function (e) { const t = []; let n = 0, r = 0; for (; n < e.length; ) { const i = e[n++]; if (i < 128) t[r++] = String.fromCharCode(i); else if (i > 191 && i < 224) { const o = e[n++]; t[r++] = String.fromCharCode(((31 & i) << 6) | (63 & o)); } else if (i > 239 && i < 365) { const o = (((7 & i) << 18) | ((63 & e[n++]) << 12) | ((63 & e[n++]) << 6) | (63 & e[n++])) - 65536; (t[r++] = String.fromCharCode(55296 + (o >> 10))), (t[r++] = String.fromCharCode(56320 + (1023 & o))); } else { const o = e[n++], a = e[n++]; t[r++] = String.fromCharCode(((15 & i) << 12) | ((63 & o) << 6) | (63 & a)); } } return t.join(""); })(this.decodeStringToByteArray(e, t)); }, decodeStringToByteArray(e, t) { this.init_(); const n = t ? this.charToByteMapWebSafe_ : this.charToByteMap_, r = []; for (let t = 0; t < e.length; ) { const i = n[e.charAt(t++)], o = t < e.length ? n[e.charAt(t)] : 0; ++t; const a = t < e.length ? n[e.charAt(t)] : 64; ++t; const s = t < e.length ? n[e.charAt(t)] : 64; if ((++t, null == i || null == o || null == a || null == s)) throw new u(); const l = (i << 2) | (o >> 4); if ((r.push(l), 64 !== a)) { const e = ((o << 4) & 240) | (a >> 2); if ((r.push(e), 64 !== s)) { const e = ((a << 6) & 192) | s; r.push(e); } } } return r; }, init_() { if (!this.byteToCharMap_) { (this.byteToCharMap_ = {}), (this.charToByteMap_ = {}), (this.byteToCharMapWebSafe_ = {}), (this.charToByteMapWebSafe_ = {}); for (let e = 0; e < this.ENCODED_VALS.length; e++) (this.byteToCharMap_[e] = this.ENCODED_VALS.charAt(e)), (this.charToByteMap_[this.byteToCharMap_[e]] = e), (this.byteToCharMapWebSafe_[e] = this.ENCODED_VALS_WEBSAFE.charAt(e)), (this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]] = e), e >= this.ENCODED_VALS_BASE.length && ((this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)] = e), (this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)] = e)); } }, }; class u extends Error { constructor() { super(...arguments), (this.name = "DecodeBase64StringError"); } } const l = function (e) { const t = a(e); return s.encodeByteArray(t, !0); }, c = function (e) { return l(e).replace(/\./g, ""); }, d = function (e) { try { return s.decodeString(e, !0); } catch (e) { console.error("base64Decode failed: ", e); } return null; }; function h(e, t) { if (!(t instanceof Object)) return t; switch (t.constructor) { case Date: return new Date(t.getTime()); case Object: void 0 === e && (e = {}); break; case Array: e = []; break; default: return t; } for (const n in t) t.hasOwnProperty(n) && "__proto__" !== n && (e[n] = h(e[n], t[n])); return e; } function p() { if ("undefined" != typeof self) return self; if ("undefined" != typeof window) return window; if (void 0 !== n.g) return n.g; throw new Error("Unable to locate global object."); } const f = () => { try { return ( p().__FIREBASE_DEFAULTS__ || (() => { if ("undefined" == typeof process || void 0 === process.env) return; const e = process.env.__FIREBASE_DEFAULTS__; return e ? JSON.parse(e) : void 0; })() || (() => { if ("undefined" == typeof document) return; let e; try { e = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/); } catch (e) { return; } const t = e && d(e[1]); return t && JSON.parse(t); })() ); } catch (e) { return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`); } }, _ = (e) => { var t, n; return null === (n = null === (t = f()) || void 0 === t ? void 0 : t.emulatorHosts) || void 0 === n ? void 0 : n[e]; }; class g { constructor() { (this.reject = () => {}), (this.resolve = () => {}), (this.promise = new Promise((e, t) => { (this.resolve = e), (this.reject = t); })); } wrapCallback(e) { return (t, n) => { t ? this.reject(t) : this.resolve(n), "function" == typeof e && (this.promise.catch(() => {}), 1 === e.length ? e(t) : e(t, n)); }; } } function m() { return "undefined" != typeof navigator && "string" == typeof navigator.userAgent ? navigator.userAgent : ""; } function v() { var e; const t = null === (e = f()) || void 0 === e ? void 0 : e.forceEnvironment; if ("node" === t) return !0; if ("browser" === t) return !1; try { return "[object process]" === Object.prototype.toString.call(n.g.process); } catch (e) { return !1; } } class y extends Error { constructor(e, t, n) { super(t), (this.code = e), (this.customData = n), (this.name = "FirebaseError"), Object.setPrototypeOf(this, y.prototype), Error.captureStackTrace && Error.captureStackTrace(this, C.prototype.create); } } class C { constructor(e, t, n) { (this.service = e), (this.serviceName = t), (this.errors = n); } create(e, ...t) { const n = t[0] || {}, r = `${this.service}/${e}`, i = this.errors[e], o = i ? (function (e, t) { return e.replace(b, (e, n) => { const r = t[n]; return null != r ? String(r) : `<${n}?>`; }); })(i, n) : "Error", a = `${this.serviceName}: ${o} (${r}).`; return new y(r, a, n); } } const b = /\{\$([^}]+)}/g; function w(e) { return JSON.parse(e); } const S = function (e) { let t = {}, n = {}, r = {}, i = ""; try { const o = e.split("."); (t = w(d(o[0]) || "")), (n = w(d(o[1]) || "")), (i = o[2]), (r = n.d || {}), delete n.d; } catch (e) {} return { header: t, claims: n, data: r, signature: i }; }; function T(e) { return null !== e && "object" == typeof e; } class x { constructor(e, t) { (this.observers = []), (this.unsubscribes = []), (this.observerCount = 0), (this.task = Promise.resolve()), (this.finalized = !1), (this.onNoObservers = t), this.task .then(() => { e(this); }) .catch((e) => { this.error(e); }); } next(e) { this.forEachObserver((t) => { t.next(e); }); } error(e) { this.forEachObserver((t) => { t.error(e); }), this.close(e); } complete() { this.forEachObserver((e) => { e.complete(); }), this.close(); } subscribe(e, t, n) { let r; if (void 0 === e && void 0 === t && void 0 === n) throw new Error("Missing Observer."); (r = (function (e, t) { if ("object" != typeof e || null === e) return !1; for (const n of t) if (n in e && "function" == typeof e[n]) return !0; return !1; })(e, ["next", "error", "complete"]) ? e : { next: e, error: t, complete: n }), void 0 === r.next && (r.next = E), void 0 === r.error && (r.error = E), void 0 === r.complete && (r.complete = E); const i = this.unsubscribeOne.bind(this, this.observers.length); return ( this.finalized && this.task.then(() => { try { this.finalError ? r.error(this.finalError) : r.complete(); } catch (e) {} }), this.observers.push(r), i ); } unsubscribeOne(e) { void 0 !== this.observers && void 0 !== this.observers[e] && (delete this.observers[e], (this.observerCount -= 1), 0 === this.observerCount && void 0 !== this.onNoObservers && this.onNoObservers(this)); } forEachObserver(e) { if (!this.finalized) for (let t = 0; t < this.observers.length; t++) this.sendOne(t, e); } sendOne(e, t) { this.task.then(() => { if (void 0 !== this.observers && void 0 !== this.observers[e]) try { t(this.observers[e]); } catch (e) { "undefined" != typeof console && console.error && console.error(e); } }); } close(e) { this.finalized || ((this.finalized = !0), void 0 !== e && (this.finalError = e), this.task.then(() => { (this.observers = void 0), (this.onNoObservers = void 0); })); } } function E() {} function L(e, t) { return `${e} failed: ${t} argument `; } const A = 144e5; (t.CONSTANTS = r), (t.DecodeBase64StringError = u), (t.Deferred = g), (t.ErrorFactory = C), (t.FirebaseError = y), (t.MAX_VALUE_MILLIS = A), (t.RANDOM_FACTOR = 0.5), (t.Sha1 = class { constructor() { (this.chain_ = []), (this.buf_ = []), (this.W_ = []), (this.pad_ = []), (this.inbuf_ = 0), (this.total_ = 0), (this.blockSize = 64), (this.pad_[0] = 128); for (let e = 1; e < this.blockSize; ++e) this.pad_[e] = 0; this.reset(); } reset() { (this.chain_[0] = 1732584193), (this.chain_[1] = 4023233417), (this.chain_[2] = 2562383102), (this.chain_[3] = 271733878), (this.chain_[4] = 3285377520), (this.inbuf_ = 0), (this.total_ = 0); } compress_(e, t) { t || (t = 0); const n = this.W_; if ("string" == typeof e) for (let r = 0; r < 16; r++) (n[r] = (e.charCodeAt(t) << 24) | (e.charCodeAt(t + 1) << 16) | (e.charCodeAt(t + 2) << 8) | e.charCodeAt(t + 3)), (t += 4); else for (let r = 0; r < 16; r++) (n[r] = (e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]), (t += 4); for (let e = 16; e < 80; e++) { const t = n[e - 3] ^ n[e - 8] ^ n[e - 14] ^ n[e - 16]; n[e] = 4294967295 & ((t << 1) | (t >>> 31)); } let r, i, o = this.chain_[0], a = this.chain_[1], s = this.chain_[2], u = this.chain_[3], l = this.chain_[4]; for (let e = 0; e < 80; e++) { e < 40 ? (e < 20 ? ((r = u ^ (a & (s ^ u))), (i = 1518500249)) : ((r = a ^ s ^ u), (i = 1859775393))) : e < 60 ? ((r = (a & s) | (u & (a | s))), (i = 2400959708)) : ((r = a ^ s ^ u), (i = 3395469782)); const t = (((o << 5) | (o >>> 27)) + r + l + i + n[e]) & 4294967295; (l = u), (u = s), (s = 4294967295 & ((a << 30) | (a >>> 2))), (a = o), (o = t); } (this.chain_[0] = (this.chain_[0] + o) & 4294967295), (this.chain_[1] = (this.chain_[1] + a) & 4294967295), (this.chain_[2] = (this.chain_[2] + s) & 4294967295), (this.chain_[3] = (this.chain_[3] + u) & 4294967295), (this.chain_[4] = (this.chain_[4] + l) & 4294967295); } update(e, t) { if (null == e) return; void 0 === t && (t = e.length); const n = t - this.blockSize; let r = 0; const i = this.buf_; let o = this.inbuf_; for (; r < t; ) { if (0 === o) for (; r <= n; ) this.compress_(e, r), (r += this.blockSize); if ("string" == typeof e) { for (; r < t; ) if (((i[o] = e.charCodeAt(r)), ++o, ++r, o === this.blockSize)) { this.compress_(i), (o = 0); break; } } else for (; r < t; ) if (((i[o] = e[r]), ++o, ++r, o === this.blockSize)) { this.compress_(i), (o = 0); break; } } (this.inbuf_ = o), (this.total_ += t); } digest() { const e = []; let t = 8 * this.total_; this.inbuf_ < 56 ? this.update(this.pad_, 56 - this.inbuf_) : this.update(this.pad_, this.blockSize - (this.inbuf_ - 56)); for (let e = this.blockSize - 1; e >= 56; e--) (this.buf_[e] = 255 & t), (t /= 256); this.compress_(this.buf_); let n = 0; for (let t = 0; t < 5; t++) for (let r = 24; r >= 0; r -= 8) (e[n] = (this.chain_[t] >> r) & 255), ++n; return e; } }), (t.areCookiesEnabled = function () { return !("undefined" == typeof navigator || !navigator.cookieEnabled); }), (t.assert = i), (t.assertionError = o), (t.async = function (e, t) { return (...n) => { Promise.resolve(!0) .then(() => { e(...n); }) .catch((e) => { t && t(e); }); }; }), (t.base64 = s), (t.base64Decode = d), (t.base64Encode = l), (t.base64urlEncodeWithoutPadding = c), (t.calculateBackoffMillis = function (e, t = 1e3, n = 2) { const r = t * Math.pow(n, e), i = Math.round(0.5 * r * (Math.random() - 0.5) * 2); return Math.min(A, r + i); }), (t.contains = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t); }), (t.createMockUserToken = function (e, t) { if (e.uid) throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.'); const n = t || "demo-project", r = e.iat || 0, i = e.sub || e.user_id; if (!i) throw new Error("mockUserToken must contain 'sub' or 'user_id' field!"); const o = Object.assign({ iss: `https://securetoken.google.com/${n}`, aud: n, iat: r, exp: r + 3600, auth_time: r, sub: i, user_id: i, firebase: { sign_in_provider: "custom", identities: {} } }, e); return [c(JSON.stringify({ alg: "none", type: "JWT" })), c(JSON.stringify(o)), ""].join("."); }), (t.createSubscribe = function (e, t) { const n = new x(e, t); return n.subscribe.bind(n); }), (t.decode = S), (t.deepCopy = function (e) { return h(void 0, e); }), (t.deepEqual = function e(t, n) { if (t === n) return !0; const r = Object.keys(t), i = Object.keys(n); for (const o of r) { if (!i.includes(o)) return !1; const r = t[o], a = n[o]; if (T(r) && T(a)) { if (!e(r, a)) return !1; } else if (r !== a) return !1; } for (const e of i) if (!r.includes(e)) return !1; return !0; }), (t.deepExtend = h), (t.errorPrefix = L), (t.extractQuerystring = function (e) { const t = e.indexOf("?"); if (!t) return ""; const n = e.indexOf("#", t); return e.substring(t, n > 0 ? n : void 0); }), (t.getDefaultAppConfig = () => { var e; return null === (e = f()) || void 0 === e ? void 0 : e.config; }), (t.getDefaultEmulatorHost = _), (t.getDefaultEmulatorHostnameAndPort = (e) => { const t = _(e); if (!t) return; const n = t.lastIndexOf(":"); if (n <= 0 || n + 1 === t.length) throw new Error(`Invalid host ${t} with no separate hostname and port!`); const r = parseInt(t.substring(n + 1), 10); return "[" === t[0] ? [t.substring(1, n - 1), r] : [t.substring(0, n), r]; }), (t.getDefaults = f), (t.getExperimentalSetting = (e) => { var t; return null === (t = f()) || void 0 === t ? void 0 : t[`_${e}`]; }), (t.getGlobal = p), (t.getModularInstance = function (e) { return e && e._delegate ? e._delegate : e; }), (t.getUA = m), (t.isAdmin = function (e) { const t = S(e).claims; return "object" == typeof t && !0 === t.admin; }), (t.isBrowser = function () { return "object" == typeof self && self.self === self; }), (t.isBrowserExtension = function () { const e = "object" == typeof chrome ? chrome.runtime : "object" == typeof browser ? browser.runtime : void 0; return "object" == typeof e && void 0 !== e.id; }), (t.isElectron = function () { return m().indexOf("Electron/") >= 0; }), (t.isEmpty = function (e) { for (const t in e) if (Object.prototype.hasOwnProperty.call(e, t)) return !1; return !0; }), (t.isIE = function () { const e = m(); return e.indexOf("MSIE ") >= 0 || e.indexOf("Trident/") >= 0; }), (t.isIndexedDBAvailable = function () { try { return "object" == typeof indexedDB; } catch (e) { return !1; } }), (t.isMobileCordova = function () { return "undefined" != typeof window && !!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(m()); }), (t.isNode = v), (t.isNodeSdk = function () { return !0 === r.NODE_CLIENT || !0 === r.NODE_ADMIN; }), (t.isReactNative = function () { return "object" == typeof navigator && "ReactNative" === navigator.product; }), (t.isSafari = function () { return !v() && navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome"); }), (t.isUWP = function () { return m().indexOf("MSAppHost/") >= 0; }), (t.isValidFormat = function (e) { const t = S(e).claims; return !!t && "object" == typeof t && t.hasOwnProperty("iat"); }), (t.isValidTimestamp = function (e) { const t = S(e).claims, n = Math.floor(new Date().getTime() / 1e3); let r = 0, i = 0; return "object" == typeof t && (t.hasOwnProperty("nbf") ? (r = t.nbf) : t.hasOwnProperty("iat") && (r = t.iat), (i = t.hasOwnProperty("exp") ? t.exp : r + 86400)), !!n && !!r && !!i && n >= r && n <= i; }), (t.issuedAtTime = function (e) { const t = S(e).claims; return "object" == typeof t && t.hasOwnProperty("iat") ? t.iat : null; }), (t.jsonEval = w), (t.map = function (e, t, n) { const r = {}; for (const i in e) Object.prototype.hasOwnProperty.call(e, i) && (r[i] = t.call(n, e[i], i, e)); return r; }), (t.ordinal = function (e) { return Number.isFinite(e) ? e + (function (e) { e = Math.abs(e); const t = e % 100; if (t >= 10 && t <= 20) return "th"; const n = e % 10; if (1 === n) return "st"; if (2 === n) return "nd"; if (3 === n) return "rd"; return "th"; })(e) : `${e}`; }), (t.promiseWithTimeout = function (e, t = 2e3) { const n = new g(); return setTimeout(() => n.reject("timeout!"), t), e.then(n.resolve, n.reject), n.promise; }), (t.querystring = function (e) { const t = []; for (const [n, r] of Object.entries(e)) Array.isArray(r) ? r.forEach((e) => { t.push(encodeURIComponent(n) + "=" + encodeURIComponent(e)); }) : t.push(encodeURIComponent(n) + "=" + encodeURIComponent(r)); return t.length ? "&" + t.join("&") : ""; }), (t.querystringDecode = function (e) { const t = {}; return ( e .replace(/^\?/, "") .split("&") .forEach((e) => { if (e) { const [n, r] = e.split("="); t[decodeURIComponent(n)] = decodeURIComponent(r); } }), t ); }), (t.safeGet = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0; }), (t.stringLength = function (e) { let t = 0; for (let n = 0; n < e.length; n++) { const r = e.charCodeAt(n); r < 128 ? t++ : r < 2048 ? (t += 2) : r >= 55296 && r <= 56319 ? ((t += 4), n++) : (t += 3); } return t; }), (t.stringToByteArray = function (e) { const t = []; let n = 0; for (let r = 0; r < e.length; r++) { let o = e.charCodeAt(r); if (o >= 55296 && o <= 56319) { const t = o - 55296; r++, i(r < e.length, "Surrogate pair missing trail surrogate."); o = 65536 + (t << 10) + (e.charCodeAt(r) - 56320); } o < 128 ? (t[n++] = o) : o < 2048 ? ((t[n++] = (o >> 6) | 192), (t[n++] = (63 & o) | 128)) : o < 65536 ? ((t[n++] = (o >> 12) | 224), (t[n++] = ((o >> 6) & 63) | 128), (t[n++] = (63 & o) | 128)) : ((t[n++] = (o >> 18) | 240), (t[n++] = ((o >> 12) & 63) | 128), (t[n++] = ((o >> 6) & 63) | 128), (t[n++] = (63 & o) | 128)); } return t; }), (t.stringify = function (e) { return JSON.stringify(e); }), (t.uuidv4 = function () { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => { const t = (16 * Math.random()) | 0; return ("x" === e ? t : (3 & t) | 8).toString(16); }); }), (t.validateArgCount = function (e, t, n, r) { let i; if ((r < t ? (i = "at least " + t) : r > n && (i = 0 === n ? "none" : "no more than " + n), i)) { throw new Error(e + " failed: Was called with " + r + (1 === r ? " argument." : " arguments.") + " Expects " + i + "."); } }), (t.validateCallback = function (e, t, n, r) { if ((!r || n) && "function" != typeof n) throw new Error(L(e, t) + "must be a valid function."); }), (t.validateContextObject = function (e, t, n, r) { if ((!r || n) && ("object" != typeof n || null === n)) throw new Error(L(e, t) + "must be a valid context object."); }), (t.validateIndexedDBOpenable = function () { return new Promise((e, t) => { try { let n = !0; const r = "validate-browser-context-for-indexeddb-analytics-module", i = self.indexedDB.open(r); (i.onsuccess = () => { i.result.close(), n || self.indexedDB.deleteDatabase(r), e(!0); }), (i.onupgradeneeded = () => { n = !1; }), (i.onerror = () => { var e; t((null === (e = i.error) || void 0 === e ? void 0 : e.message) || ""); }); } catch (e) { t(e); } }); }), (t.validateNamespace = function (e, t, n) { if ((!n || t) && "string" != typeof t) throw new Error(L(e, "namespace") + "must be a valid firebase namespace."); }); }, 29805: (e) => { "use strict"; var t = Object.prototype.hasOwnProperty, n = "~"; function r() {} function i(e, t, n) { (this.fn = e), (this.context = t), (this.once = n || !1); } function o(e, t, r, o, a) { if ("function" != typeof r) throw new TypeError("The listener must be a function"); var s = new i(r, o || e, a), u = n ? n + t : t; return e._events[u] ? (e._events[u].fn ? (e._events[u] = [e._events[u], s]) : e._events[u].push(s)) : ((e._events[u] = s), e._eventsCount++), e; } function a(e, t) { 0 == --e._eventsCount ? (e._events = new r()) : delete e._events[t]; } function s() { (this._events = new r()), (this._eventsCount = 0); } Object.create && ((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)), (s.prototype.eventNames = function () { var e, r, i = []; if (0 === this._eventsCount) return i; for (r in (e = this._events)) t.call(e, r) && i.push(n ? r.slice(1) : r); return Object.getOwnPropertySymbols ? i.concat(Object.getOwnPropertySymbols(e)) : i; }), (s.prototype.listeners = function (e) { var t = n ? n + e : e, r = this._events[t]; if (!r) return []; if (r.fn) return [r.fn]; for (var i = 0, o = r.length, a = new Array(o); i < o; i++) a[i] = r[i].fn; return a; }), (s.prototype.listenerCount = function (e) { var t = n ? n + e : e, r = this._events[t]; return r ? (r.fn ? 1 : r.length) : 0; }), (s.prototype.emit = function (e, t, r, i, o, a) { var s = n ? n + e : e; if (!this._events[s]) return !1; var u, l, c = this._events[s], d = arguments.length; if (c.fn) { switch ((c.once && this.removeListener(e, c.fn, void 0, !0), d)) { case 1: return c.fn.call(c.context), !0; case 2: return c.fn.call(c.context, t), !0; case 3: return c.fn.call(c.context, t, r), !0; case 4: return c.fn.call(c.context, t, r, i), !0; case 5: return c.fn.call(c.context, t, r, i, o), !0; case 6: return c.fn.call(c.context, t, r, i, o, a), !0; } for (l = 1, u = new Array(d - 1); l < d; l++) u[l - 1] = arguments[l]; c.fn.apply(c.context, u); } else { var h, p = c.length; for (l = 0; l < p; l++) switch ((c[l].once && this.removeListener(e, c[l].fn, void 0, !0), d)) { case 1: c[l].fn.call(c[l].context); break; case 2: c[l].fn.call(c[l].context, t); break; case 3: c[l].fn.call(c[l].context, t, r); break; case 4: c[l].fn.call(c[l].context, t, r, i); break; default: if (!u) for (h = 1, u = new Array(d - 1); h < d; h++) u[h - 1] = arguments[h]; c[l].fn.apply(c[l].context, u); } } return !0; }), (s.prototype.on = function (e, t, n) { return o(this, e, t, n, !1); }), (s.prototype.once = function (e, t, n) { return o(this, e, t, n, !0); }), (s.prototype.removeListener = function (e, t, r, i) { var o = n ? n + e : e; if (!this._events[o]) return this; if (!t) return a(this, o), this; var s = this._events[o]; if (s.fn) s.fn !== t || (i && !s.once) || (r && s.context !== r) || a(this, o); else { for (var u = 0, l = [], c = s.length; u < c; u++) (s[u].fn !== t || (i && !s[u].once) || (r && s[u].context !== r)) && l.push(s[u]); l.length ? (this._events[o] = 1 === l.length ? l[0] : l) : a(this, o); } return this; }), (s.prototype.removeAllListeners = function (e) { var t; return e ? ((t = n ? n + e : e), this._events[t] && a(this, t)) : ((this._events = new r()), (this._eventsCount = 0)), this; }), (s.prototype.off = s.prototype.removeListener), (s.prototype.addListener = s.prototype.on), (s.prefixed = n), (s.EventEmitter = s), (e.exports = s); }, 2922: (e, t, n) => { "use strict"; n.d(t, { N: () => B, gE: () => U }); var r = n(94610), i = n(37348), o = n(49691), a = n(67532), s = n(58536), u = n(46990), l = n(54194); const c = n(90063).n2; var d = n(7790); const h = (e, t, n) => { let r, i; return (o) => { t.value >= 0 && (o || n) && ((i = t.value - (r || 0)), (i || void 0 === r) && ((r = t.value), (t.delta = i), e(t))); }; }, p = () => c.__WEB_VITALS_POLYFILL__ ? c.performance && ((performance.getEntriesByType && performance.getEntriesByType("navigation")[0]) || (() => { const e = c.performance.timing, t = c.performance.navigation.type, n = { entryType: "navigation", startTime: 0, type: 2 == t ? "back_forward" : 1 === t ? "reload" : "navigate" }; for (const t in e) "navigationStart" !== t && "toJSON" !== t && (n[t] = Math.max(e[t] - e.navigationStart, 0)); return n; })()) : c.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0], f = () => { const e = p(); return (e && e.activationStart) || 0; }, _ = (e, t) => { const n = p(); let r = "navigate"; return n && (r = c.document.prerendering || f() > 0 ? "prerender" : n.type.replace(/_/g, "-")), { name: e, value: void 0 === t ? -1 : t, rating: "good", delta: 0, entries: [], id: `v3-${Date.now()}-${Math.floor(8999999999999 * Math.random()) + 1e12}`, navigationType: r }; }, g = (e, t, n) => { try { if (PerformanceObserver.supportedEntryTypes.includes(e)) { const r = new PerformanceObserver((e) => { t(e.getEntries()); }); return r.observe(Object.assign({ type: e, buffered: !0 }, n || {})), r; } } catch (e) {} }, m = (e, t) => { const n = (r) => { ("pagehide" !== r.type && "hidden" !== c.document.visibilityState) || (e(r), t && (removeEventListener("visibilitychange", n, !0), removeEventListener("pagehide", n, !0))); }; addEventListener("visibilitychange", n, !0), addEventListener("pagehide", n, !0); }, v = (e) => { const t = _("CLS", 0); let n, r = 0, i = []; const o = (e) => { e.forEach((e) => { if (!e.hadRecentInput) { const o = i[0], a = i[i.length - 1]; r && 0 !== i.length && e.startTime - a.startTime < 1e3 && e.startTime - o.startTime < 5e3 ? ((r += e.value), i.push(e)) : ((r = e.value), (i = [e])), r > t.value && ((t.value = r), (t.entries = i), n && n()); } }); }, a = g("layout-shift", o); if (a) { n = h(e, t); const r = () => { o(a.takeRecords()), n(!0); }; return m(r), r; } }; let y = -1; const C = () => ( y < 0 && ((y = "hidden" !== c.document.visibilityState || c.document.prerendering ? 1 / 0 : 0), m(({ timeStamp: e }) => { y = e; }, !0)), { get firstHiddenTime() { return y; }, } ), b = (e) => { const t = C(), n = _("FID"); let r; const i = (e) => { e.startTime < t.firstHiddenTime && ((n.value = e.processingStart - e.startTime), n.entries.push(e), r(!0)); }, o = (e) => { e.forEach(i); }, a = g("first-input", o); (r = h(e, n)), a && m(() => { o(a.takeRecords()), a.disconnect(); }, !0); }, w = {}, S = (e) => { const t = C(), n = _("LCP"); let r; const i = (e) => { const i = e[e.length - 1]; if (i) { const e = Math.max(i.startTime - f(), 0); e < t.firstHiddenTime && ((n.value = e), (n.entries = [i]), r()); } }, o = g("largest-contentful-paint", i); if (o) { r = h(e, n); const t = () => { w[n.id] || (i(o.takeRecords()), o.disconnect(), (w[n.id] = !0), r(!0)); }; return ( ["keydown", "click"].forEach((e) => { addEventListener(e, t, { once: !0, capture: !0 }); }), m(t, !0), t ); } }; function T(e) { return "number" == typeof e && isFinite(e); } function x(e, { startTimestamp: t, ...n }) { return t && e.startTimestamp > t && (e.startTimestamp = t), e.startChild({ startTimestamp: t, ...n }); } function E(e) { return e / 1e3; } function L() { return c && c.addEventListener && c.performance; } let A, I, M = 0, P = {}; function O() { const e = L(); if (e && d.Z1) { e.mark && c.performance.mark("sentry-tracing-init"), b((e) => { const t = e.entries.pop(); if (!t) return; const n = E(d.Z1), r = E(t.startTime); ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding FID"), (P.fid = { value: e.value, unit: "millisecond" }), (P["mark.fid"] = { value: n + r, unit: "second" }); }); const t = v((e) => { const t = e.entries.pop(); t && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding CLS"), (P.cls = { value: e.value, unit: "" }), (I = t)); }), n = S((e) => { const t = e.entries.pop(); t && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding LCP"), (P.lcp = { value: e.value, unit: "millisecond" }), (A = t)); }); return () => { t && t(), n && n(); }; } return () => {}; } function k(e) { const t = L(); if (!t || !c.performance.getEntries || !d.Z1) return; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Tracing] Adding & adjusting spans using Performance API"); const n = E(d.Z1), r = t.getEntries(); let i, o; if ( (r.slice(M).forEach((t) => { const r = E(t.startTime), a = E(t.duration); if (!("navigation" === e.op && n + r < e.startTimestamp)) switch (t.entryType) { case "navigation": !(function (e, t, n) { ["unloadEvent", "redirect", "domContentLoadedEvent", "loadEvent", "connect"].forEach((r) => { R(e, t, r, n); }), R(e, t, "secureConnection", n, "TLS/SSL", "connectEnd"), R(e, t, "fetch", n, "cache", "domainLookupStart"), R(e, t, "domainLookup", n, "DNS"), (function (e, t, n) { x(e, { op: "browser", description: "request", startTimestamp: n + E(t.requestStart), endTimestamp: n + E(t.responseEnd) }), x(e, { op: "browser", description: "response", startTimestamp: n + E(t.responseStart), endTimestamp: n + E(t.responseEnd) }); })(e, t, n); })(e, t, n), (i = n + E(t.responseStart)), (o = n + E(t.requestStart)); break; case "mark": case "paint": case "measure": { !(function (e, t, n, r, i) { const o = i + n, a = o + r; x(e, { description: t.name, endTimestamp: a, op: t.entryType, startTimestamp: o }); })(e, t, r, a, n); const i = C(), o = t.startTime < i.firstHiddenTime; "first-paint" === t.name && o && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding FP"), (P.fp = { value: t.startTime, unit: "millisecond" })), "first-contentful-paint" === t.name && o && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding FCP"), (P.fcp = { value: t.startTime, unit: "millisecond" })); break; } case "resource": { const i = t.name.replace(c.location.origin, ""); !(function (e, t, n, r, i, o) { if ("xmlhttprequest" === t.initiatorType || "fetch" === t.initiatorType) return; const a = {}; "transferSize" in t && (a["http.response_transfer_size"] = t.transferSize); "encodedBodySize" in t && (a["http.response_content_length"] = t.encodedBodySize); "decodedBodySize" in t && (a["http.decoded_response_content_length"] = t.decodedBodySize); "renderBlockingStatus" in t && (a["resource.render_blocking_status"] = t.renderBlockingStatus); const s = o + r, u = s + i; x(e, { description: n, endTimestamp: u, op: t.initiatorType ? `resource.${t.initiatorType}` : "resource.other", startTimestamp: s, data: a }); })(e, t, i, r, a, n); break; } } }), (M = Math.max(r.length - 1, 0)), (function (e) { const t = c.navigator; if (!t) return; const n = t.connection; n && (n.effectiveType && e.setTag("effectiveConnectionType", n.effectiveType), n.type && e.setTag("connectionType", n.type), T(n.rtt) && (P["connection.rtt"] = { value: n.rtt, unit: "millisecond" })); T(t.deviceMemory) && e.setTag("deviceMemory", `${t.deviceMemory} GB`); T(t.hardwareConcurrency) && e.setTag("hardwareConcurrency", String(t.hardwareConcurrency)); })(e), "pageload" === e.op) ) { "number" == typeof i && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding TTFB"), (P.ttfb = { value: 1e3 * (i - e.startTimestamp), unit: "millisecond" }), "number" == typeof o && o <= i && (P["ttfb.requestTime"] = { value: 1e3 * (i - o), unit: "millisecond" })), ["fcp", "fp", "lcp"].forEach((t) => { if (!P[t] || n >= e.startTimestamp) return; const r = P[t].value, i = n + E(r), o = Math.abs(1e3 * (i - e.startTimestamp)), a = o - r; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log(`[Measurements] Normalized ${t} from ${r} to ${o} (${a})`), (P[t].value = o); }); const t = P["mark.fid"]; t && P.fid && (x(e, { description: "first input delay", endTimestamp: t.value + E(P.fid.value), op: "ui.action", startTimestamp: t.value }), delete P["mark.fid"]), "fcp" in P || delete P.cls, Object.keys(P).forEach((t) => { e.setMeasurement(t, P[t].value, P[t].unit); }), (function (e) { A && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding LCP Data"), A.element && e.setTag("lcp.element", (0, l.Rt)(A.element)), A.id && e.setTag("lcp.id", A.id), A.url && e.setTag("lcp.url", A.url.trim().slice(0, 200)), e.setTag("lcp.size", A.size)); I && I.sources && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log("[Measurements] Adding CLS Data"), I.sources.forEach((t, n) => e.setTag(`cls.source.${n + 1}`, (0, l.Rt)(t.node)))); })(e); } (A = void 0), (I = void 0), (P = {}); } function R(e, t, n, r, i, o) { const a = o ? t[o] : t[`${n}End`], s = t[`${n}Start`]; s && a && x(e, { op: "browser", description: i || n, startTimestamp: r + E(s), endTimestamp: r + E(a) }); } var D = n(79900), N = n(29518); const B = "BrowserTracing", F = { ...r.AT, markBackgroundTransactions: !0, routingInstrumentation: function (e, t = !0, n = !0) { if (!c || !c.location) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.warn("Could not initialize routing instrumentation due to invalid location")); let r, i = c.location.href; t && (r = e({ name: c.location.pathname, startTimestamp: d.Z1 ? d.Z1 / 1e3 : void 0, op: "pageload", metadata: { source: "url" } })), n && (0, N.oq)("history", ({ to: t, from: n }) => { void 0 === n && i && -1 !== i.indexOf(t) ? (i = void 0) : n !== t && ((i = void 0), r && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log(`[Tracing] Finishing current transaction with op: ${r.op}`), r.finish()), (r = e({ name: c.location.pathname, op: "navigation", metadata: { source: "url" } }))); }); }, startTransactionOnLocationChange: !0, startTransactionOnPageLoad: !0, enableLongTask: !0, ...D.k3, }; class U { __init() { this.name = B; } __init2() { this._hasSetTracePropagationTargets = !1; } constructor(e) { U.prototype.__init.call(this), U.prototype.__init2.call(this), (0, i.T)(), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && (this._hasSetTracePropagationTargets = !(!e || (!e.tracePropagationTargets && !e.tracingOrigins))), (this.options = { ...F, ...e }), void 0 !== this.options._experiments.enableLongTask && (this.options.enableLongTask = this.options._experiments.enableLongTask), e && !e.tracePropagationTargets && e.tracingOrigins && (this.options.tracePropagationTargets = e.tracingOrigins), (this._collectWebVitals = O()), this.options.enableLongTask && g("longtask", (e) => { for (const t of e) { const e = (0, a.x1)(); if (!e) return; const n = E(d.Z1 + t.startTime), r = E(t.duration); e.startChild({ description: "Main UI thread blocked", op: "ui.long-task", startTimestamp: n, endTimestamp: n + r }); } }), this.options._experiments.enableInteractions && g( "event", (e) => { for (const t of e) { const e = (0, a.x1)(); if (!e) return; if ("click" === t.name) { const n = E(d.Z1 + t.startTime), r = E(t.duration); e.startChild({ description: (0, l.Rt)(t.target), op: `ui.interaction.${t.name}`, startTimestamp: n, endTimestamp: n + r }); } } }, { durationThreshold: 0 } ); } setupOnce(e, t) { this._getCurrentHub = t; const n = t().getClient(), r = n && n.getOptions(), { routingInstrumentation: i, startTransactionOnLocationChange: o, startTransactionOnPageLoad: u, markBackgroundTransactions: l, traceFetch: d, traceXHR: h, shouldCreateSpanForRequest: p, _experiments: f } = this.options, _ = r && r.tracePropagationTargets, g = _ || this.options.tracePropagationTargets; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && _ && s.kg.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."), i( (e) => { const n = this._createRouteTransaction(e); return this.options._experiments.onStartRouteTransaction && this.options._experiments.onStartRouteTransaction(n, e, t), n; }, u, o ), l && (c && c.document ? c.document.addEventListener("visibilitychange", () => { const e = (0, a.x1)(); if (c.document.hidden && e) { const t = "cancelled"; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`), e.status || e.setStatus(t), e.setTag("visibilitychange", "document.hidden"), e.finish(); } }) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")), f.enableInteractions && this._registerInteractionListener(), (0, D.L7)({ traceFetch: d, traceXHR: h, tracePropagationTargets: g, shouldCreateSpanForRequest: p, _experiments: { enableHTTPTimings: f.enableHTTPTimings } }); } _createRouteTransaction(e) { if (!this._getCurrentHub) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`)); const { beforeNavigate: t, idleTimeout: n, finalTimeout: r, heartbeatInterval: a } = this.options, l = "pageload" === e.op, d = l ? j("sentry-trace") : null, h = l ? j("baggage") : null, p = d ? (0, o.q)(d) : void 0, f = h ? (0, u.EN)(h) : void 0, _ = { ...e, ...p, metadata: { ...e.metadata, dynamicSamplingContext: p && !f ? {} : f }, trimEnd: !0 }, g = "function" == typeof t ? t(_) : _, m = void 0 === g ? { ..._, sampled: !1 } : g; (m.metadata = m.name !== _.name ? { ...m.metadata, source: "custom" } : m.metadata), (this._latestRouteName = m.name), (this._latestRouteSource = m.metadata && m.metadata.source), !1 === m.sampled && ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log(`[Tracing] Will not send ${m.op} transaction because of beforeNavigate.`), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.log(`[Tracing] Starting ${m.op} transaction on scope`); const v = this._getCurrentHub(), { location: y } = c, C = (0, i.l)(v, m, n, r, !0, { location: y }, a); return ( C.registerBeforeFinishCallback((e) => { this._collectWebVitals(), k(e); }), C ); } _registerInteractionListener() { let e; const t = () => { const { idleTimeout: t, finalTimeout: n, heartbeatInterval: r } = this.options, o = "ui.action.click", u = (0, a.x1)(); if (u && u.op && ["navigation", "pageload"].includes(u.op)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`)); if ((e && (e.setFinishReason("interactionInterrupted"), e.finish(), (e = void 0)), !this._getCurrentHub)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`)); if (!this._latestRouteName) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && s.kg.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`)); const l = this._getCurrentHub(), { location: d } = c, h = { name: this._latestRouteName, op: o, trimEnd: !0, metadata: { source: this._latestRouteSource || "url" } }; e = (0, i.l)(l, h, t, n, !0, { location: d }, r); }; ["click"].forEach((e) => { addEventListener(e, t, { once: !1, capture: !0 }); }); } } function j(e) { const t = (0, l.qT)(`meta[name=${e}]`); return t ? t.getAttribute("content") : null; } }, 79900: (e, t, n) => { "use strict"; n.d(t, { L7: () => p, k3: () => h }); var r = n(2803), i = n(12712), o = n(66465), a = n(29518), s = n(7790), u = n(39660), l = n(46990), c = n(81757); const d = ["localhost", /^\/(?!\/)/], h = { traceFetch: !0, traceXHR: !0, tracingOrigins: d, tracePropagationTargets: d, _experiments: {} }; function p(e) { const { traceFetch: t, traceXHR: n, tracePropagationTargets: s, tracingOrigins: p, shouldCreateSpanForRequest: _, _experiments: g } = { traceFetch: h.traceFetch, traceXHR: h.traceXHR, ...e }, m = "function" == typeof _ ? _ : (e) => !0, v = (e) => (function (e, t) { return (0, u.U0)(e, t || d); })(e, s || p), y = {}; t && (0, a.oq)("fetch", (e) => { const t = (function (e, t, n, r) { if (!(0, i.z)() || !e.fetchData || !t(e.fetchData.url)) return; if (e.endTimestamp) { const t = e.fetchData.__span; if (!t) return; const n = r[t]; if (n) { if (e.response) { n.setHttpStatus(e.response.status); const t = e.response && e.response.headers && e.response.headers.get("content-length"), r = parseInt(t); r > 0 && n.setData("http.response_content_length", r); } else e.error && n.setStatus("internal_error"); n.finish(), delete r[t]; } return; } const a = (0, o.Gd)().getScope().getSpan(), s = a && a.transaction; if (a && s) { const { method: t, url: i } = e.fetchData, o = a.startChild({ data: { url: i, type: "fetch", "http.method": t }, description: `${t} ${i}`, op: "http.client" }); (e.fetchData.__span = o.spanId), (r[o.spanId] = o); const u = e.args[0]; e.args[1] = e.args[1] || {}; const d = e.args[1]; return ( n(e.fetchData.url) && (d.headers = (function (e, t, n, r) { const i = (0, l.IQ)(t), o = n.toTraceparent(), a = "undefined" != typeof Request && (0, c.V9)(e, Request) ? e.headers : r.headers; if (a) { if ("undefined" != typeof Headers && (0, c.V9)(a, Headers)) { const e = new Headers(a); return e.append("sentry-trace", o), i && e.append(l.bU, i), e; } if (Array.isArray(a)) { const e = [...a, ["sentry-trace", o]]; return i && e.push([l.bU, i]), e; } { const e = "baggage" in a ? a.baggage : void 0, t = []; return Array.isArray(e) ? t.push(...e) : e && t.push(e), i && t.push(i), { ...a, "sentry-trace": o, baggage: t.length > 0 ? t.join(",") : void 0 }; } } return { "sentry-trace": o, baggage: i }; })(u, s.getDynamicSamplingContext(), o, d)), o ); } })(e, m, v, y); (0, r.x)([g, "optionalAccess", (e) => e.enableHTTPTimings]) && t && f(t); }), n && (0, a.oq)("xhr", (e) => { const t = (function (e, t, n, r) { const s = e.xhr, u = s && s[a.xU]; if (!(0, i.z)() || (s && s.__sentry_own_request__) || !(s && u && t(u.url))) return; if (e.endTimestamp) { const e = s.__sentry_xhr_span_id__; if (!e) return; const t = r[e]; return void (t && (t.setHttpStatus(u.status_code), t.finish(), delete r[e])); } const c = (0, o.Gd)().getScope().getSpan(), d = c && c.transaction; if (c && d) { const e = c.startChild({ data: { ...u.data, type: "xhr", "http.method": u.method, url: u.url }, description: `${u.method} ${u.url}`, op: "http.client" }); if (((s.__sentry_xhr_span_id__ = e.spanId), (r[s.__sentry_xhr_span_id__] = e), s.setRequestHeader && n(u.url))) try { s.setRequestHeader("sentry-trace", e.toTraceparent()); const t = d.getDynamicSamplingContext(), n = (0, l.IQ)(t); n && s.setRequestHeader(l.bU, n); } catch (e) {} return e; } })(e, m, v, y); (0, r.x)([g, "optionalAccess", (e) => e.enableHTTPTimings]) && t && f(t); }); } function f(e) { const t = e.data.url, n = new PerformanceObserver((r) => { r.getEntries().forEach((r) => { if (("fetch" === r.initiatorType || "xmlhttprequest" === r.initiatorType) && r.name.endsWith(t)) { (function (e) { const t = e.nextHopProtocol.split("/")[1] || "none", n = []; t && n.push(["network.protocol.version", t]); if (!s.Z1) return n; return [...n, ["http.request.connect_start", (s.Z1 + e.connectStart) / 1e3], ["http.request.request_start", (s.Z1 + e.requestStart) / 1e3], ["http.request.response_start", (s.Z1 + e.responseStart) / 1e3]]; })(r).forEach((t) => e.setData(...t)), n.disconnect(); } }); }); n.observe({ entryTypes: ["resource"] }); } }, 68997: (e, t, n) => { "use strict"; n.d(t, { r: () => a }); var r = n(66465), i = n(37348), o = n(37392); function a() { (0, i.T)(), (0, o.KV)() && (function () { const t = (0, r.cu)(); if (!t.__SENTRY__) return; const n = { mongodb: () => new ((0, o.l$)(e, "./node/integrations/mongo").Mongo)(), mongoose: () => new ((0, o.l$)(e, "./node/integrations/mongo").Mongo)(), mysql: () => new ((0, o.l$)(e, "./node/integrations/mysql").Mysql)(), pg: () => new ((0, o.l$)(e, "./node/integrations/postgres").Postgres)() }, i = Object.keys(n) .filter((e) => !!(0, o.$y)(e)) .map((e) => { try { return n[e](); } catch (e) { return; } }) .filter((e) => e); i.length > 0 && (t.__SENTRY__.integrations = [...(t.__SENTRY__.integrations || []), ...i]); })(); } e = n.hmd(e); }, 75899: (e, t, n) => { "use strict"; n.r(t), n.d(t, { Breadcrumbs: () => qe, BrowserClient: () => tt, BrowserProfilingIntegration: () => fa, BrowserTracing: () => No.gE, Dedupe: () => Ut, FunctionToString: () => s, GlobalHandlers: () => Tt, HttpContext: () => Ft, Hub: () => g.Xb, InboundFilters: () => p, Integrations: () => ga, LinkedErrors: () => Nt, Replay: () => Ro, SDK_VERSION: () => _, Scope: () => ue.s, TryCatch: () => Pt, WINDOW: () => _e, addBreadcrumb: () => b, addGlobalEventProcessor: () => ue.c, addTracingExtensions: () => le.T, captureEvent: () => y, captureException: () => m, captureMessage: () => v, captureUserFeedback: () => en, chromeStackLineParser: () => dt, close: () => $t, configureScope: () => C, createTransport: () => ne, createUserFeedbackEnvelope: () => et, defaultIntegrations: () => Zt, defaultRequestInstrumentationOptions: () => Bo.k3, defaultStackLineParsers: () => bt, defaultStackParser: () => wt, eventFromException: () => Be, eventFromMessage: () => Fe, extractTraceparentData: () => ce.q, flush: () => Kt, forceLoad: () => Xt, geckoStackLineParser: () => ft, getActiveTransaction: () => de.x1, getCurrentHub: () => g.Gd, getHubFromCarrier: () => g.vi, init: () => zt, instrumentOutgoingRequests: () => Bo.L7, lastEventId: () => Wt, makeBrowserOfflineTransport: () => Yo, makeFetchTransport: () => it, makeMain: () => g.pj, makeMultiplexedTransport: () => se, makeXHRTransport: () => at, onLoad: () => qt, onProfilingStartRouteTransaction: () => ha, opera10StackLineParser: () => vt, opera11StackLineParser: () => Ct, setContext: () => w, setExtra: () => T, setExtras: () => S, setTag: () => E, setTags: () => x, setUser: () => L, showReportDialog: () => Yt, spanStatusfromHttpCode: () => he.Zd, startTransaction: () => I, trace: () => pe.g, winjsStackLineParser: () => gt, withScope: () => A, wrap: () => Jt }); var r = {}; n.r(r), n.d(r, { FunctionToString: () => s, InboundFilters: () => p }); var i = {}; n.r(i), n.d(i, { Breadcrumbs: () => qe, Dedupe: () => Ut, GlobalHandlers: () => Tt, HttpContext: () => Ft, LinkedErrors: () => Nt, TryCatch: () => Pt }); var o = n(21995); let a; class s { constructor() { s.prototype.__init.call(this); } static __initStatic() { this.id = "FunctionToString"; } __init() { this.name = s.id; } setupOnce() { a = Function.prototype.toString; try { Function.prototype.toString = function (...e) { const t = (0, o.HK)(this) || this; return a.apply(t, e); }; } catch (e) {} } } s.__initStatic(); var u = n(58536), l = n(63699), c = n(39660); const d = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/], h = [/^.*healthcheck.*$/, /^.*healthy.*$/, /^.*live.*$/, /^.*ready.*$/, /^.*heartbeat.*$/, /^.*\/health$/, /^.*\/healthz$/]; class p { static __initStatic() { this.id = "InboundFilters"; } __init() { this.name = p.id; } constructor(e = {}) { (this._options = e), p.prototype.__init.call(this); } setupOnce(e, t) { const n = (e) => { const n = t(); if (n) { const t = n.getIntegration(p); if (t) { const r = n.getClient(), i = r ? r.getOptions() : {}, o = (function (e = {}, t = {}) { return { allowUrls: [...(e.allowUrls || []), ...(t.allowUrls || [])], denyUrls: [...(e.denyUrls || []), ...(t.denyUrls || [])], ignoreErrors: [...(e.ignoreErrors || []), ...(t.ignoreErrors || []), ...(e.disableErrorDefaults ? [] : d)], ignoreTransactions: [...(e.ignoreTransactions || []), ...(t.ignoreTransactions || []), ...(e.disableTransactionDefaults ? [] : h)], ignoreInternal: void 0 === e.ignoreInternal || e.ignoreInternal }; })(t._options, i); return (function (e, t) { if ( t.ignoreInternal && (function (e) { try { return "SentryError" === e.exception.values[0].type; } catch (e) {} return !1; })(e) ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${(0, l.jH)(e)}`), !0; if ( (function (e, t) { if (e.type || !t || !t.length) return !1; return (function (e) { if (e.message) return [e.message]; if (e.exception) { const { values: t } = e.exception; try { const { type: e = "", value: n = "" } = (t && t[t.length - 1]) || {}; return [`${n}`, `${e}: ${n}`]; } catch (t) { return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error(`Cannot extract message for event ${(0, l.jH)(e)}`), []; } } return []; })(e).some((e) => (0, c.U0)(e, t)); })(e, t.ignoreErrors) ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0, l.jH)(e)}`), !0; if ( (function (e, t) { if ("transaction" !== e.type || !t || !t.length) return !1; const n = e.transaction; return !!n && (0, c.U0)(n, t); })(e, t.ignoreTransactions) ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${(0, l.jH)(e)}`), !0; if ( (function (e, t) { if (!t || !t.length) return !1; const n = f(e); return !!n && (0, c.U0)(n, t); })(e, t.denyUrls) ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0, l.jH)(e)}.\nUrl: ${f(e)}`), !0; if ( !(function (e, t) { if (!t || !t.length) return !0; const n = f(e); return !n || (0, c.U0)(n, t); })(e, t.allowUrls) ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0, l.jH)(e)}.\nUrl: ${f(e)}`), !0; return !1; })(e, o) ? null : e; } } return e; }; (n.id = this.name), e(n); } } function f(e) { try { let t; try { t = e.exception.values[0].stacktrace.frames; } catch (e) {} return t ? (function (e = []) { for (let t = e.length - 1; t >= 0; t--) { const n = e[t]; if (n && "" !== n.filename && "[native code]" !== n.filename) return n.filename || null; } return null; })(t) : null; } catch (t) { return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error(`Cannot extract url for event ${(0, l.jH)(e)}`), null; } } p.__initStatic(); const _ = "7.57.0"; var g = n(66465); function m(e, t) { return (0, g.Gd)().captureException(e, { captureContext: t }); } function v(e, t) { const n = "string" == typeof t ? t : void 0, r = "string" != typeof t ? { captureContext: t } : void 0; return (0, g.Gd)().captureMessage(e, n, r); } function y(e, t) { return (0, g.Gd)().captureEvent(e, t); } function C(e) { (0, g.Gd)().configureScope(e); } function b(e) { (0, g.Gd)().addBreadcrumb(e); } function w(e, t) { (0, g.Gd)().setContext(e, t); } function S(e) { (0, g.Gd)().setExtras(e); } function T(e, t) { (0, g.Gd)().setExtra(e, t); } function x(e) { (0, g.Gd)().setTags(e); } function E(e, t) { (0, g.Gd)().setTag(e, t); } function L(e) { (0, g.Gd)().setUser(e); } function A(e) { (0, g.Gd)().withScope(e); } function I(e, t) { return (0, g.Gd)().startTransaction({ ...e }, t); } class M extends Error { constructor(e, t = "warn") { super(e), (this.message = e), (this.name = new.target.prototype.constructor.name), Object.setPrototypeOf(this, new.target.prototype), (this.logLevel = t); } } var P = n(97946); function O(e) { const t = []; function n(e) { return t.splice(t.indexOf(e), 1)[0]; } return { $: t, add: function (r) { if (!(void 0 === e || t.length < e)) return (0, P.$2)(new M("Not adding Promise because buffer limit was reached.")); const i = r(); return -1 === t.indexOf(i) && t.push(i), i.then(() => n(i)).then(null, () => n(i).then(null, () => {})), i; }, drain: function (e) { return new P.cW((n, r) => { let i = t.length; if (!i) return n(!0); const o = setTimeout(() => { e && e > 0 && n(!1); }, e); t.forEach((e) => { (0, P.WD)(e).then(() => { --i || (clearTimeout(o), n(!0)); }, r); }); }); }, }; } const k = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; function R(e, t = !1) { const { host: n, path: r, pass: i, port: o, projectId: a, protocol: s, publicKey: u } = e; return `${s}://${u}${t && i ? `:${i}` : ""}@${n}${o ? `:${o}` : ""}/${r ? `${r}/` : r}${a}`; } function D(e) { const t = k.exec(e); if (!t) return void console.error(`Invalid Sentry Dsn: ${e}`); const [n, r, i = "", o, a = "", s] = t.slice(1); let u = "", l = s; const c = l.split("/"); if ((c.length > 1 && ((u = c.slice(0, -1).join("/")), (l = c.pop())), l)) { const e = l.match(/^\d+/); e && (l = e[0]); } return N({ host: o, pass: i, path: u, projectId: l, port: a, protocol: n, publicKey: r }); } function N(e) { return { protocol: e.protocol, publicKey: e.publicKey || "", pass: e.pass || "", host: e.host, port: e.port || "", path: e.path || "", projectId: e.projectId }; } function B(e) { const t = "string" == typeof e ? D(e) : N(e); if ( t && (function (e) { if ("undefined" != typeof __SENTRY_DEBUG__ && !__SENTRY_DEBUG__) return !0; const { port: t, projectId: n, protocol: r } = e; return !( ["protocol", "publicKey", "host", "projectId"].find((t) => !e[t] && (u.kg.error(`Invalid Sentry Dsn: ${t} missing`), !0)) || (n.match(/^\d+$/) ? (function (e) { return "http" === e || "https" === e; })(r) ? t && isNaN(parseInt(t, 10)) && (u.kg.error(`Invalid Sentry Dsn: Invalid port ${t}`), 1) : (u.kg.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), 1) : (u.kg.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), 1)) ); })(t) ) return t; } var F = n(81757); var U = n(69038); function j(e, t = 100, n = 1 / 0) { try { return H("", e, t, n); } catch (e) { return { ERROR: `**non-serializable** (${e})` }; } } function G(e, t = 3, n = 102400) { const r = j(e, t); return ( (i = r), (function (e) { return ~-encodeURI(e).split(/%..|./).length; })(JSON.stringify(i)) > n ? G(e, t - 1, n) : r ); var i; } function H( e, t, r = 1 / 0, i = 1 / 0, a = (function () { const e = "function" == typeof WeakSet, t = e ? new WeakSet() : []; return [ function (n) { if (e) return !!t.has(n) || (t.add(n), !1); for (let e = 0; e < t.length; e++) if (t[e] === n) return !0; return t.push(n), !1; }, function (n) { if (e) t.delete(n); else for (let e = 0; e < t.length; e++) if (t[e] === n) { t.splice(e, 1); break; } }, ]; })() ) { const [s, u] = a; if (null == t || (["number", "boolean", "string"].includes(typeof t) && !(0, F.i2)(t))) return t; const l = (function (e, t) { try { if ("domain" === e && t && "object" == typeof t && t._events) return "[Domain]"; if ("domainEmitter" === e) return "[DomainEmitter]"; if (void 0 !== n.g && t === n.g) return "[Global]"; if ("undefined" != typeof window && t === window) return "[Window]"; if ("undefined" != typeof document && t === document) return "[Document]"; if ((0, F.Cy)(t)) return "[SyntheticEvent]"; if ("number" == typeof t && t != t) return "[NaN]"; if ("function" == typeof t) return `[Function: ${(0, U.$P)(t)}]`; if ("symbol" == typeof t) return `[${String(t)}]`; if ("bigint" == typeof t) return `[BigInt: ${String(t)}]`; const r = (function (e) { const t = Object.getPrototypeOf(e); return t ? t.constructor.name : "null prototype"; })(t); return /^HTML(\w*)Element$/.test(r) ? `[HTMLElement: ${r}]` : `[object ${r}]`; } catch (e) { return `**non-serializable** (${e})`; } })(e, t); if (!l.startsWith("[object ")) return l; if (t.__sentry_skip_normalization__) return t; const c = "number" == typeof t.__sentry_override_normalization_depth__ ? t.__sentry_override_normalization_depth__ : r; if (0 === c) return l.replace("object ", ""); if (s(t)) return "[Circular ~]"; const d = t; if (d && "function" == typeof d.toJSON) try { return H("", d.toJSON(), c - 1, i, a); } catch (e) {} const h = Array.isArray(t) ? [] : {}; let p = 0; const f = (0, o.Sh)(t); for (const e in f) { if (!Object.prototype.hasOwnProperty.call(f, e)) continue; if (p >= i) { h[e] = "[MaxProperties ~]"; break; } const t = f[e]; (h[e] = H(e, t, c - 1, i, a)), p++; } return u(t), h; } function V(e, t = []) { return [e, t]; } function Z(e, t) { const [n, r] = e; return [n, [...r, t]]; } function z(e, t) { const n = e[1]; for (const e of n) { if (t(e, e[0].type)) return !0; } return !1; } function Y(e, t) { return (t || new TextEncoder()).encode(e); } function W(e, t) { const [n, r] = e; let i = JSON.stringify(n); function o(e) { "string" == typeof i ? (i = "string" == typeof e ? i + e : [Y(i, t), e]) : i.push("string" == typeof e ? Y(e, t) : e); } for (const e of r) { const [t, n] = e; if ((o(`\n${JSON.stringify(t)}\n`), "string" == typeof n || n instanceof Uint8Array)) o(n); else { let e; try { e = JSON.stringify(n); } catch (t) { e = JSON.stringify(j(n)); } o(e); } } return "string" == typeof i ? i : (function (e) { const t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t); let r = 0; for (const t of e) n.set(t, r), (r += t.length); return n; })(i); } function X(e, t) { const n = "string" == typeof e.data ? Y(e.data, t) : e.data; return [(0, o.Jr)({ type: "attachment", length: n.length, filename: e.filename, content_type: e.contentType, attachment_type: e.attachmentType }), n]; } const q = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor" }; function K(e) { return q[e]; } function $(e) { if (!e || !e.sdk) return; const { name: t, version: n } = e.sdk; return { name: t, version: n }; } function J(e, t, n, r) { const i = e.sdkProcessingMetadata && e.sdkProcessingMetadata.dynamicSamplingContext; return { event_id: e.event_id, sent_at: new Date().toISOString(), ...(t && { sdk: t }), ...(!!n && { dsn: R(r) }), ...(i && { trace: (0, o.Jr)({ ...i }) }) }; } const Q = 6e4; function ee(e, t = Date.now()) { const n = parseInt(`${e}`, 10); if (!isNaN(n)) return 1e3 * n; const r = Date.parse(`${e}`); return isNaN(r) ? Q : r - t; } const te = 30; function ne(e, t, n = O(e.bufferSize || te)) { let r = {}; function i(i) { const o = []; if ( (z(i, (t, n) => { const i = K(n); if ( (function (e, t, n = Date.now()) { return ( (function (e, t) { return e[t] || e.all || 0; })(e, t) > n ); })(r, i) ) { const r = re(t, n); e.recordDroppedEvent("ratelimit_backoff", i, r); } else o.push(t); }), 0 === o.length) ) return (0, P.WD)(); const a = V(i[0], o), s = (t) => { z(a, (n, r) => { const i = re(n, r); e.recordDroppedEvent(t, K(r), i); }); }; return n .add(() => t({ body: W(a, e.textEncoder) }).then( (e) => ( void 0 !== e.statusCode && (e.statusCode < 200 || e.statusCode >= 300) && ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Sentry responded with status code ${e.statusCode} to sent event.`), (r = (function (e, { statusCode: t, headers: n }, r = Date.now()) { const i = { ...e }, o = n && n["x-sentry-rate-limits"], a = n && n["retry-after"]; if (o) for (const e of o.trim().split(",")) { const [t, n] = e.split(":", 2), o = parseInt(t, 10), a = 1e3 * (isNaN(o) ? 60 : o); if (n) for (const e of n.split(";")) i[e] = r + a; else i.all = r + a; } else a ? (i.all = r + ee(a, r)) : 429 === t && (i.all = r + 6e4); return i; })(r, e)), e ), (e) => { throw (s("network_error"), e); } ) ) .then( (e) => e, (e) => { if (e instanceof M) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("Skipped sending event because buffer is full."), s("queue_overflow"), (0, P.WD)(); throw e; } ); } return (i.__sentry__baseTransport__ = !0), { send: i, flush: (e) => n.drain(e) }; } function re(e, t) { if ("event" === t || "transaction" === t) return Array.isArray(e) ? e[1] : void 0; } const ie = "7"; function oe(e) { const t = e.protocol ? `${e.protocol}:` : "", n = e.port ? `:${e.port}` : ""; return `${t}//${e.host}${n}${e.path ? `/${e.path}` : ""}/api/`; } function ae(e, t = {}) { const n = "string" == typeof t ? t : t.tunnel, r = "string" != typeof t && t._metadata ? t._metadata.sdk : void 0; return ( n || `${(function (e) { return `${oe(e)}${e.projectId}/envelope/`; })(e)}?${(function (e, t) { return (0, o._j)({ sentry_key: e.publicKey, sentry_version: ie, ...(t && { sentry_client: `${t.name}/${t.version}` }) }); })(e, r)}` ); } function se(e, t) { return (n) => { const r = e(n), i = {}; return { send: async function (o) { const a = t({ envelope: o, getEvent: function (e) { const t = e && e.length ? e : ["event"]; return (function (e, t) { let n; return z(e, (e, r) => (t.includes(r) && (n = Array.isArray(e) ? e[1] : void 0), !!n)), n; })(o, t); }, }) .map((t) => (function (t) { if (!i[t]) { const r = D(t); if (!r) return; const o = ae(r); i[t] = e({ ...n, url: o }); } return i[t]; })(t) ) .filter((e) => !!e); return 0 === a.length && a.push(r), (await Promise.all(a.map((e) => e.send(o))))[0]; }, flush: async function (e) { const t = [...Object.keys(i).map((e) => i[e]), r]; return (await Promise.all(t.map((t) => t.flush(e)))).every((e) => e); }, }; }; } var ue = n(51877), le = n(37348), ce = n(49691), de = n(67532), he = n(91701), pe = n(42145), fe = n(90063); const _e = fe.n2; let ge = 0; function me() { return ge > 0; } function ve(e, t = {}, n) { if ("function" != typeof e) return e; try { const t = e.__sentry_wrapped__; if (t) return t; if ((0, o.HK)(e)) return e; } catch (t) { return e; } const r = function () { const r = Array.prototype.slice.call(arguments); try { n && "function" == typeof n && n.apply(this, arguments); const i = r.map((e) => ve(e, t)); return e.apply(this, i); } catch (e) { throw ( (ge++, setTimeout(() => { ge--; }), A((n) => { n.addEventProcessor((e) => (t.mechanism && ((0, l.Db)(e, void 0, void 0), (0, l.EG)(e, t.mechanism)), (e.extra = { ...e.extra, arguments: r }), e)), m(e); }), e) ); } }; try { for (const t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] = e[t]); } catch (e) {} (0, o.$Q)(r, e), (0, o.xp)(e, "__sentry_wrapped__", r); try { Object.getOwnPropertyDescriptor(r, "name").configurable && Object.defineProperty(r, "name", { get: () => e.name }); } catch (e) {} return r; } const ye = []; function Ce(e) { const t = e.defaultIntegrations || [], n = e.integrations; let r; t.forEach((e) => { e.isDefaultInstance = !0; }), (r = Array.isArray(n) ? [...t, ...n] : "function" == typeof n ? (0, l.lE)(n(t)) : t); const i = (function (e) { const t = {}; return ( e.forEach((e) => { const { name: n } = e, r = t[n]; (r && !r.isDefaultInstance && e.isDefaultInstance) || (t[n] = e); }), Object.keys(t).map((e) => t[e]) ); })(r), o = (function (e, t) { for (let n = 0; n < e.length; n++) if (!0 === t(e[n])) return n; return -1; })(i, (e) => "Debug" === e.name); if (-1 !== o) { const [e] = i.splice(o, 1); i.push(e); } return i; } function be(e, t) { (t[e.name] = e), -1 === ye.indexOf(e.name) && (e.setupOnce(ue.c, g.Gd), ye.push(e.name), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`Integration installed: ${e.name}`)); } var we = n(48364), Se = n(7790), Te = n(66417); function xe(e, t, n, r) { const { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = e, a = { ...t, event_id: t.event_id || n.event_id || (0, l.DM)(), timestamp: t.timestamp || (0, Se.yW)() }, s = n.integrations || e.integrations.map((e) => e.name); !(function (e, t) { const { environment: n, release: r, dist: i, maxValueLength: o = 250 } = t; "environment" in e || (e.environment = "environment" in t ? n : Te.J); void 0 === e.release && void 0 !== r && (e.release = r); void 0 === e.dist && void 0 !== i && (e.dist = i); e.message && (e.message = (0, c.$G)(e.message, o)); const a = e.exception && e.exception.values && e.exception.values[0]; a && a.value && (a.value = (0, c.$G)(a.value, o)); const s = e.request; s && s.url && (s.url = (0, c.$G)(s.url, o)); })(a, e), (function (e, t) { t.length > 0 && ((e.sdk = e.sdk || {}), (e.sdk.integrations = [...(e.sdk.integrations || []), ...t])); })(a, s), void 0 === t.type && (function (e, t) { const n = fe.n2._sentryDebugIds; if (!n) return; let r; const i = Ee.get(t); i ? (r = i) : ((r = new Map()), Ee.set(t, r)); const o = Object.keys(n).reduce((e, i) => { let o; const a = r.get(i); a ? (o = a) : ((o = t(i)), r.set(i, o)); for (let t = o.length - 1; t >= 0; t--) { const r = o[t]; if (r.filename) { e[r.filename] = n[i]; break; } } return e; }, {}); try { e.exception.values.forEach((e) => { e.stacktrace.frames.forEach((e) => { e.filename && (e.debug_id = o[e.filename]); }); }); } catch (e) {} })(a, e.stackParser); let u = r; n.captureContext && (u = ue.s.clone(u).update(n.captureContext)); let d = (0, P.WD)(a); if (u) { if (u.getAttachments) { const e = [...(n.attachments || []), ...u.getAttachments()]; e.length && (n.attachments = e); } d = u.applyToEvent(a, n); } return d.then( (e) => ( e && (function (e) { const t = {}; try { e.exception.values.forEach((e) => { e.stacktrace.frames.forEach((e) => { e.debug_id && (e.abs_path ? (t[e.abs_path] = e.debug_id) : e.filename && (t[e.filename] = e.debug_id), delete e.debug_id); }); }); } catch (e) {} if (0 === Object.keys(t).length) return; (e.debug_meta = e.debug_meta || {}), (e.debug_meta.images = e.debug_meta.images || []); const n = e.debug_meta.images; Object.keys(t).forEach((e) => { n.push({ type: "sourcemap", code_file: e, debug_id: t[e] }); }); })(e), "number" == typeof i && i > 0 ? (function (e, t, n) { if (!e) return null; const r = { ...e, ...(e.breadcrumbs && { breadcrumbs: e.breadcrumbs.map((e) => ({ ...e, ...(e.data && { data: j(e.data, t, n) }) })) }), ...(e.user && { user: j(e.user, t, n) }), ...(e.contexts && { contexts: j(e.contexts, t, n) }), ...(e.extra && { extra: j(e.extra, t, n) }) }; e.contexts && e.contexts.trace && r.contexts && ((r.contexts.trace = e.contexts.trace), e.contexts.trace.data && (r.contexts.trace.data = j(e.contexts.trace.data, t, n))); e.spans && (r.spans = e.spans.map((e) => (e.data && (e.data = j(e.data, t, n)), e))); return r; })(e, i, o) : e ) ); } const Ee = new WeakMap(); const Le = "Not capturing exception because it's already been captured."; class Ae { __init() { this._integrations = {}; } __init2() { this._integrationsInitialized = !1; } __init3() { this._numProcessing = 0; } __init4() { this._outcomes = {}; } __init5() { this._hooks = {}; } constructor(e) { if ((Ae.prototype.__init.call(this), Ae.prototype.__init2.call(this), Ae.prototype.__init3.call(this), Ae.prototype.__init4.call(this), Ae.prototype.__init5.call(this), (this._options = e), e.dsn ? (this._dsn = B(e.dsn)) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("No DSN provided, client will not do anything."), this._dsn)) { const t = ae(this._dsn, e); this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: t }); } } captureException(e, t, n) { if ((0, l.YO)(e)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(Le)); let r = t && t.event_id; return ( this._process( this.eventFromException(e, t) .then((e) => this._captureEvent(e, t, n)) .then((e) => { r = e; }) ), r ); } captureMessage(e, t, n, r) { let i = n && n.event_id; const o = (0, F.pt)(e) ? this.eventFromMessage(String(e), t, n) : this.eventFromException(e, n); return ( this._process( o .then((e) => this._captureEvent(e, n, r)) .then((e) => { i = e; }) ), i ); } captureEvent(e, t, n) { if (t && t.originalException && (0, l.YO)(t.originalException)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(Le)); let r = t && t.event_id; return ( this._process( this._captureEvent(e, t, n).then((e) => { r = e; }) ), r ); } captureSession(e) { this._isEnabled() ? ("string" != typeof e.release ? ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), (0, we.CT)(e, { init: !1 }))) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("SDK not enabled, will not capture session."); } getDsn() { return this._dsn; } getOptions() { return this._options; } getSdkMetadata() { return this._options._metadata; } getTransport() { return this._transport; } flush(e) { const t = this._transport; return t ? this._isClientDoneProcessing(e).then((n) => t.flush(e).then((e) => n && e)) : (0, P.WD)(!0); } close(e) { return this.flush(e).then((e) => ((this.getOptions().enabled = !1), e)); } setupIntegrations() { this._isEnabled() && !this._integrationsInitialized && ((this._integrations = (function (e) { const t = {}; return ( e.forEach((e) => { e && be(e, t); }), t ); })(this._options.integrations)), (this._integrationsInitialized = !0)); } getIntegrationById(e) { return this._integrations[e]; } getIntegration(e) { try { return this._integrations[e.id] || null; } catch (t) { return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`Cannot retrieve integration ${e.id} from the current Client`), null; } } addIntegration(e) { be(e, this._integrations); } sendEvent(e, t = {}) { if (this._dsn) { let n = (function (e, t, n, r) { const i = $(n), o = e.type && "replay_event" !== e.type ? e.type : "event"; !(function (e, t) { t && ((e.sdk = e.sdk || {}), (e.sdk.name = e.sdk.name || t.name), (e.sdk.version = e.sdk.version || t.version), (e.sdk.integrations = [...(e.sdk.integrations || []), ...(t.integrations || [])]), (e.sdk.packages = [...(e.sdk.packages || []), ...(t.packages || [])])); })(e, n && n.sdk); const a = J(e, i, r, t); return delete e.sdkProcessingMetadata, V(a, [[{ type: o }, e]]); })(e, this._dsn, this._options._metadata, this._options.tunnel); for (const e of t.attachments || []) n = Z(n, X(e, this._options.transportOptions && this._options.transportOptions.textEncoder)); const r = this._sendEnvelope(n); r && r.then((t) => this.emit("afterSendEvent", e, t), null); } } sendSession(e) { if (this._dsn) { const t = (function (e, t, n, r) { const i = $(n); return V({ sent_at: new Date().toISOString(), ...(i && { sdk: i }), ...(!!r && { dsn: R(t) }) }, ["aggregates" in e ? [{ type: "sessions" }, e] : [{ type: "session" }, e.toJSON()]]); })(e, this._dsn, this._options._metadata, this._options.tunnel); this._sendEnvelope(t); } } recordDroppedEvent(e, t, n) { if (this._options.sendClientReports) { const n = `${e}:${t}`; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`Adding outcome: "${n}"`), (this._outcomes[n] = this._outcomes[n] + 1 || 1); } } on(e, t) { this._hooks[e] || (this._hooks[e] = []), this._hooks[e].push(t); } emit(e, ...t) { this._hooks[e] && this._hooks[e].forEach((e) => e(...t)); } _updateSessionFromEvent(e, t) { let n = !1, r = !1; const i = t.exception && t.exception.values; if (i) { r = !0; for (const e of i) { const t = e.mechanism; if (t && !1 === t.handled) { n = !0; break; } } } const o = "ok" === e.status; ((o && 0 === e.errors) || (o && n)) && ((0, we.CT)(e, { ...(n && { status: "crashed" }), errors: e.errors || Number(r || n) }), this.captureSession(e)); } _isClientDoneProcessing(e) { return new P.cW((t) => { let n = 0; const r = setInterval(() => { 0 == this._numProcessing ? (clearInterval(r), t(!0)) : ((n += 1), e && n >= e && (clearInterval(r), t(!1))); }, 1); }); } _isEnabled() { return !1 !== this.getOptions().enabled && void 0 !== this._dsn; } _prepareEvent(e, t, n) { const r = this.getOptions(), i = Object.keys(this._integrations); return !t.integrations && i.length > 0 && (t.integrations = i), xe(r, e, t, n); } _captureEvent(e, t = {}, n) { return this._processEvent(e, t, n).then( (e) => e.event_id, (e) => { if ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) { const t = e; "log" === t.logLevel ? u.kg.log(t.message) : u.kg.warn(t); } } ); } _processEvent(e, t, n) { const r = this.getOptions(), { sampleRate: i } = r; if (!this._isEnabled()) return (0, P.$2)(new M("SDK not enabled, will not capture event.", "log")); const o = Me(e), a = Ie(e), s = e.type || "error", u = `before send for type \`${s}\``; if (a && "number" == typeof i && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), (0, P.$2)(new M(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log")); const l = "replay_event" === s ? "replay" : s; return this._prepareEvent(e, t, n) .then((n) => { if (null === n) throw (this.recordDroppedEvent("event_processor", l, e), new M("An event processor returned `null`, will not send event.", "log")); if (t.data && !0 === t.data.__sentry__) return n; const i = (function (e, t, n) { const { beforeSend: r, beforeSendTransaction: i } = e; if (Ie(t) && r) return r(t, n); if (Me(t) && i) return i(t, n); return t; })(r, n, t); return (function (e, t) { const n = `${t} must return \`null\` or a valid event.`; if ((0, F.J8)(e)) return e.then( (e) => { if (!(0, F.PO)(e) && null !== e) throw new M(n); return e; }, (e) => { throw new M(`${t} rejected with ${e}`); } ); if (!(0, F.PO)(e) && null !== e) throw new M(n); return e; })(i, u); }) .then((r) => { if (null === r) throw (this.recordDroppedEvent("before_send", l, e), new M(`${u} returned \`null\`, will not send event.`, "log")); const i = n && n.getSession(); !o && i && this._updateSessionFromEvent(i, r); const a = r.transaction_info; if (o && a && r.transaction !== e.transaction) { const e = "custom"; r.transaction_info = { ...a, source: e }; } return this.sendEvent(r, t), r; }) .then(null, (e) => { if (e instanceof M) throw e; throw (this.captureException(e, { data: { __sentry__: !0 }, originalException: e }), new M(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)); }); } _process(e) { this._numProcessing++, e.then( (e) => (this._numProcessing--, e), (e) => (this._numProcessing--, e) ); } _sendEnvelope(e) { if (this._transport && this._dsn) return ( this.emit("beforeEnvelope", e), this._transport.send(e).then(null, (e) => { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("Error while sending event:", e); }) ); ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("Transport disabled"); } _clearOutcomes() { const e = this._outcomes; return ( (this._outcomes = {}), Object.keys(e).map((t) => { const [n, r] = t.split(":"); return { reason: n, category: r, quantity: e[t] }; }) ); } } function Ie(e) { return void 0 === e.type; } function Me(e) { return "transaction" === e.type; } var Pe = n(4285); function Oe(e, t) { const n = Re(e, t), r = { type: t && t.name, value: Ne(t) }; return n.length && (r.stacktrace = { frames: n }), void 0 === r.type && "" === r.value && (r.value = "Unrecoverable error caught"), r; } function ke(e, t) { return { exception: { values: [Oe(e, t)] } }; } function Re(e, t) { const n = t.stacktrace || t.stack || "", r = (function (e) { if (e) { if ("number" == typeof e.framesToPop) return e.framesToPop; if (De.test(e.message)) return 1; } return 0; })(t); try { return e(n, r); } catch (e) {} return []; } const De = /Minified React error #\d+;/i; function Ne(e) { const t = e && e.message; return t ? (t.error && "string" == typeof t.error.message ? t.error.message : t) : "No error message"; } function Be(e, t, n, r) { const i = Ue(e, t, (n && n.syntheticException) || void 0, r); return (0, l.EG)(i), (i.level = "error"), n && n.event_id && (i.event_id = n.event_id), (0, P.WD)(i); } function Fe(e, t, n = "info", r, i) { const o = je(e, t, (r && r.syntheticException) || void 0, i); return (o.level = n), r && r.event_id && (o.event_id = r.event_id), (0, P.WD)(o); } function Ue(e, t, n, r, i) { let o; if ((0, F.VW)(t) && t.error) { return ke(e, t.error); } if ((0, F.TX)(t) || (0, F.fm)(t)) { const i = t; if ("stack" in t) o = ke(e, t); else { const t = i.name || ((0, F.TX)(i) ? "DOMError" : "DOMException"), a = i.message ? `${t}: ${i.message}` : t; (o = je(e, a, n, r)), (0, l.Db)(o, a); } return "code" in i && (o.tags = { ...o.tags, "DOMException.code": `${i.code}` }), o; } if ((0, F.VZ)(t)) return ke(e, t); if ((0, F.PO)(t) || (0, F.cO)(t)) { return ( (o = (function (e, t, n, r) { const i = (0, g.Gd)().getClient(), o = i && i.getOptions().normalizeDepth, a = { exception: { values: [{ type: (0, F.cO)(t) ? t.constructor.name : r ? "UnhandledRejection" : "Error", value: Ge(t, { isUnhandledRejection: r }) }] }, extra: { __serialized__: G(t, o) } }; if (n) { const t = Re(e, n); t.length && (a.exception.values[0].stacktrace = { frames: t }); } return a; })(e, t, n, i)), (0, l.EG)(o, { synthetic: !0 }), o ); } return (o = je(e, t, n, r)), (0, l.Db)(o, `${t}`, void 0), (0, l.EG)(o, { synthetic: !0 }), o; } function je(e, t, n, r) { const i = { message: t }; if (r && n) { const r = Re(e, n); r.length && (i.exception = { values: [{ value: t, stacktrace: { frames: r } }] }); } return i; } function Ge(e, { isUnhandledRejection: t }) { const n = (0, o.zf)(e), r = t ? "promise rejection" : "exception"; if ((0, F.VW)(e)) return `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``; if ((0, F.cO)(e)) { return `Event \`${(function (e) { try { const t = Object.getPrototypeOf(e); return t ? t.constructor.name : void 0; } catch (e) {} })(e)}\` (type=${e.type}) captured as ${r}`; } return `Object captured as ${r} with keys: ${n}`; } var He = n(29518), Ve = n(54194); const Ze = ["fatal", "error", "warning", "log", "info", "debug"]; function ze(e) { return "warn" === e ? "warning" : Ze.includes(e) ? e : "log"; } var Ye = n(33483); const We = 1024, Xe = "Breadcrumbs"; class qe { static __initStatic() { this.id = Xe; } __init() { this.name = qe.id; } constructor(e) { qe.prototype.__init.call(this), (this.options = { console: !0, dom: !0, fetch: !0, history: !0, sentry: !0, xhr: !0, ...e }); } setupOnce() { this.options.console && (0, He.oq)("console", Ke), this.options.dom && (0, He.oq)( "dom", (function (e) { function t(t) { let n, r = "object" == typeof e ? e.serializeAttribute : void 0, i = "object" == typeof e && "number" == typeof e.maxStringLength ? e.maxStringLength : void 0; i && i > We && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`), (i = We)), "string" == typeof r && (r = [r]); try { const e = t.event; n = (function (e) { return !!e && !!e.target; })(e) ? (0, Ve.Rt)(e.target, { keyAttrs: r, maxStringLength: i }) : (0, Ve.Rt)(e, { keyAttrs: r, maxStringLength: i }); } catch (e) { n = ""; } 0 !== n.length && (0, g.Gd)().addBreadcrumb({ category: `ui.${t.name}`, message: n }, { event: t.event, name: t.name, global: t.global }); } return t; })(this.options.dom) ), this.options.xhr && (0, He.oq)("xhr", $e), this.options.fetch && (0, He.oq)("fetch", Je), this.options.history && (0, He.oq)("history", Qe); } addSentryBreadcrumb(e) { this.options.sentry && (0, g.Gd)().addBreadcrumb({ category: "sentry." + ("transaction" === e.type ? "transaction" : "event"), event_id: e.event_id, level: e.level, message: (0, l.jH)(e) }, { event: e }); } } function Ke(e) { for (let t = 0; t < e.args.length; t++) if ("ref=Ref<" === e.args[t]) { e.args[t + 1] = "viewRef"; break; } const t = { category: "console", data: { arguments: e.args, logger: "console" }, level: ze(e.level), message: (0, c.nK)(e.args, " ") }; if ("assert" === e.level) { if (!1 !== e.args[0]) return; (t.message = `Assertion failed: ${(0, c.nK)(e.args.slice(1), " ") || "console.assert"}`), (t.data.arguments = e.args.slice(1)); } (0, g.Gd)().addBreadcrumb(t, { input: e.args, level: e.level }); } function $e(e) { const { startTimestamp: t, endTimestamp: n } = e, r = e.xhr[He.xU]; if (!t || !n || !r) return; const { method: i, url: o, status_code: a, body: s } = r, u = { method: i, url: o, status_code: a }, l = { xhr: e.xhr, input: s, startTimestamp: t, endTimestamp: n }; (0, g.Gd)().addBreadcrumb({ category: "xhr", data: u, type: "http" }, l); } function Je(e) { const { startTimestamp: t, endTimestamp: n } = e; if (n && (!e.fetchData.url.match(/sentry_key/) || "POST" !== e.fetchData.method)) if (e.error) { const r = e.fetchData, i = { data: e.error, input: e.args, startTimestamp: t, endTimestamp: n }; (0, g.Gd)().addBreadcrumb({ category: "fetch", data: r, level: "error", type: "http" }, i); } else { const r = { ...e.fetchData, status_code: e.response && e.response.status }, i = { input: e.args, response: e.response, startTimestamp: t, endTimestamp: n }; (0, g.Gd)().addBreadcrumb({ category: "fetch", data: r, type: "http" }, i); } } function Qe(e) { let t = e.from, n = e.to; const r = (0, Ye.en)(_e.location.href); let i = (0, Ye.en)(t); const o = (0, Ye.en)(n); i.path || (i = r), r.protocol === o.protocol && r.host === o.host && (n = o.relative), r.protocol === i.protocol && r.host === i.host && (t = i.relative), (0, g.Gd)().addBreadcrumb({ category: "navigation", data: { from: t, to: n } }); } function et(e, { metadata: t, tunnel: n, dsn: r }) { const i = { event_id: e.event_id, sent_at: new Date().toISOString(), ...(t && t.sdk && { sdk: { name: t.sdk.name, version: t.sdk.version } }), ...(!!n && !!r && { dsn: R(r) }) }, o = (function (e) { return [{ type: "user_report" }, e]; })(e); return V(i, [o]); } qe.__initStatic(); class tt extends Ae { constructor(e) { const t = _e.SENTRY_SDK_SOURCE || (0, Pe.S)(); (e._metadata = e._metadata || {}), (e._metadata.sdk = e._metadata.sdk || { name: "sentry.javascript.browser", packages: [{ name: `${t}:@sentry/browser`, version: _ }], version: _ }), super(e), e.sendClientReports && _e.document && _e.document.addEventListener("visibilitychange", () => { "hidden" === _e.document.visibilityState && this._flushOutcomes(); }); } eventFromException(e, t) { return Be(this._options.stackParser, e, t, this._options.attachStacktrace); } eventFromMessage(e, t = "info", n) { return Fe(this._options.stackParser, e, t, n, this._options.attachStacktrace); } sendEvent(e, t) { const n = this.getIntegrationById(Xe); n && n.addSentryBreadcrumb && n.addSentryBreadcrumb(e), super.sendEvent(e, t); } captureUserFeedback(e) { if (!this._isEnabled()) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("SDK not enabled, will not capture user feedback.")); const t = et(e, { metadata: this.getSdkMetadata(), dsn: this.getDsn(), tunnel: this.getOptions().tunnel }); this._sendEnvelope(t); } _prepareEvent(e, t, n) { return (e.platform = e.platform || "javascript"), super._prepareEvent(e, t, n); } _flushOutcomes() { const e = this._clearOutcomes(); if (0 === e.length) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("No outcomes to send")); if (!this._dsn) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("No dsn provided, will not send outcomes")); ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("Sending outcomes:", e); const t = ((n = e), V((r = this._options.tunnel && R(this._dsn)) ? { dsn: r } : {}, [[{ type: "client_report" }, { timestamp: i || (0, Se.yW)(), discarded_events: n }]])); var n, r, i; this._sendEnvelope(t); } } var nt = n(49798); let rt; function it( e, t = (function () { if (rt) return rt; if ((0, nt.Du)(_e.fetch)) return (rt = _e.fetch.bind(_e)); const e = _e.document; let t = _e.fetch; if (e && "function" == typeof e.createElement) try { const n = e.createElement("iframe"); (n.hidden = !0), e.head.appendChild(n); const r = n.contentWindow; r && r.fetch && (t = r.fetch), e.head.removeChild(n); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", e); } return (rt = t.bind(_e)); })() ) { let n = 0, r = 0; return ne(e, function (i) { const o = i.body.length; (n += o), r++; const a = { body: i.body, method: "POST", referrerPolicy: "origin", headers: e.headers, keepalive: n <= 6e4 && r < 15, ...e.fetchOptions }; try { return t(e.url, a).then((e) => ((n -= o), r--, { statusCode: e.status, headers: { "x-sentry-rate-limits": e.headers.get("X-Sentry-Rate-Limits"), "retry-after": e.headers.get("Retry-After") } })); } catch (e) { return (rt = void 0), (n -= o), r--, (0, P.$2)(e); } }); } const ot = 4; function at(e) { return ne(e, function (t) { return new P.cW((n, r) => { const i = new XMLHttpRequest(); (i.onerror = r), (i.onreadystatechange = () => { i.readyState === ot && n({ statusCode: i.status, headers: { "x-sentry-rate-limits": i.getResponseHeader("X-Sentry-Rate-Limits"), "retry-after": i.getResponseHeader("Retry-After") } }); }), i.open("POST", e.url); for (const t in e.headers) Object.prototype.hasOwnProperty.call(e.headers, t) && i.setRequestHeader(t, e.headers[t]); i.send(t.body); }); }); } const st = "?"; function ut(e, t, n, r) { const i = { filename: e, function: t, in_app: !0 }; return void 0 !== n && (i.lineno = n), void 0 !== r && (i.colno = r), i; } const lt = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, ct = /\((\S*)(?::(\d+))(?::(\d+))\)/, dt = [ 30, (e) => { const t = lt.exec(e); if (t) { if (t[2] && 0 === t[2].indexOf("eval")) { const e = ct.exec(t[2]); e && ((t[2] = e[1]), (t[3] = e[2]), (t[4] = e[3])); } const [e, n] = St(t[1] || st, t[2]); return ut(n, e, t[3] ? +t[3] : void 0, t[4] ? +t[4] : void 0); } }, ], ht = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, pt = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, ft = [ 50, (e) => { const t = ht.exec(e); if (t) { if (t[3] && t[3].indexOf(" > eval") > -1) { const e = pt.exec(t[3]); e && ((t[1] = t[1] || "eval"), (t[3] = e[1]), (t[4] = e[2]), (t[5] = "")); } let e = t[3], n = t[1] || st; return ([n, e] = St(n, e)), ut(e, n, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0); } }, ], _t = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i, gt = [ 40, (e) => { const t = _t.exec(e); return t ? ut(t[2], t[1] || st, +t[3], t[4] ? +t[4] : void 0) : void 0; }, ], mt = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i, vt = [ 10, (e) => { const t = mt.exec(e); return t ? ut(t[2], t[3] || st, +t[1]) : void 0; }, ], yt = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i, Ct = [ 20, (e) => { const t = yt.exec(e); return t ? ut(t[5], t[3] || t[4] || st, +t[1], +t[2]) : void 0; }, ], bt = [dt, ft, gt], wt = (0, U.pE)(...bt), St = (e, t) => { const n = -1 !== e.indexOf("safari-extension"), r = -1 !== e.indexOf("safari-web-extension"); return n || r ? [-1 !== e.indexOf("@") ? e.split("@")[0] : st, n ? `safari-extension:${t}` : `safari-web-extension:${t}`] : [e, t]; }; class Tt { static __initStatic() { this.id = "GlobalHandlers"; } __init() { this.name = Tt.id; } __init2() { this._installFunc = { onerror: xt, onunhandledrejection: Et }; } constructor(e) { Tt.prototype.__init.call(this), Tt.prototype.__init2.call(this), (this._options = { onerror: !0, onunhandledrejection: !0, ...e }); } setupOnce() { Error.stackTraceLimit = 50; const e = this._options; for (const n in e) { const r = this._installFunc[n]; r && e[n] && ((t = n), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`Global Handler attached: ${t}`), r(), (this._installFunc[n] = void 0)); } var t; } } function xt() { (0, He.oq)("error", (e) => { const [t, n, r] = It(); if (!t.getIntegration(Tt)) return; const { msg: i, url: o, line: a, column: s, error: u } = e; if (me() || (u && u.__sentry_own_request__)) return; const l = void 0 === u && (0, F.HD)(i) ? (function (e, t, n, r) { const i = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; let o = (0, F.VW)(e) ? e.message : e, a = "Error"; const s = o.match(i); s && ((a = s[1]), (o = s[2])); const u = { exception: { values: [{ type: a, value: o }] } }; return Lt(u, t, n, r); })(i, o, a, s) : Lt(Ue(n, u || i, void 0, r, !1), o, a, s); (l.level = "error"), At(t, u, l, "onerror"); }); } function Et() { (0, He.oq)("unhandledrejection", (e) => { const [t, n, r] = It(); if (!t.getIntegration(Tt)) return; let i = e; try { "reason" in e ? (i = e.reason) : "detail" in e && "reason" in e.detail && (i = e.detail.reason); } catch (e) {} if (me() || (i && i.__sentry_own_request__)) return !0; const o = (0, F.pt)(i) ? { exception: { values: [{ type: "UnhandledRejection", value: `Non-Error promise rejection captured with value: ${String(i)}` }] } } : Ue(n, i, void 0, r, !0); (o.level = "error"), At(t, i, o, "onunhandledrejection"); }); } function Lt(e, t, n, r) { const i = (e.exception = e.exception || {}), o = (i.values = i.values || []), a = (o[0] = o[0] || {}), s = (a.stacktrace = a.stacktrace || {}), u = (s.frames = s.frames || []), l = isNaN(parseInt(r, 10)) ? void 0 : r, c = isNaN(parseInt(n, 10)) ? void 0 : n, d = (0, F.HD)(t) && t.length > 0 ? t : (0, Ve.l4)(); return 0 === u.length && u.push({ colno: l, filename: d, function: "?", in_app: !0, lineno: c }), e; } function At(e, t, n, r) { (0, l.EG)(n, { handled: !1, type: r }), e.captureEvent(n, { originalException: t }); } function It() { const e = (0, g.Gd)(), t = e.getClient(), n = (t && t.getOptions()) || { stackParser: () => [], attachStacktrace: !1 }; return [e, n.stackParser, n.attachStacktrace]; } Tt.__initStatic(); const Mt = ["EventTarget", "Window", "Node", "ApplicationCache", "AudioTrackList", "ChannelMergerNode", "CryptoOperation", "EventSource", "FileReader", "HTMLUnknownElement", "IDBDatabase", "IDBRequest", "IDBTransaction", "KeyOperation", "MediaController", "MessagePort", "ModalWindow", "Notification", "SVGElementInstance", "Screen", "TextTrack", "TextTrackCue", "TextTrackList", "WebSocket", "WebSocketWorker", "Worker", "XMLHttpRequest", "XMLHttpRequestEventTarget", "XMLHttpRequestUpload"]; class Pt { static __initStatic() { this.id = "TryCatch"; } __init() { this.name = Pt.id; } constructor(e) { Pt.prototype.__init.call(this), (this._options = { XMLHttpRequest: !0, eventTarget: !0, requestAnimationFrame: !0, setInterval: !0, setTimeout: !0, ...e }); } setupOnce() { this._options.setTimeout && (0, o.hl)(_e, "setTimeout", Ot), this._options.setInterval && (0, o.hl)(_e, "setInterval", Ot), this._options.requestAnimationFrame && (0, o.hl)(_e, "requestAnimationFrame", kt), this._options.XMLHttpRequest && "XMLHttpRequest" in _e && (0, o.hl)(XMLHttpRequest.prototype, "send", Rt); const e = this._options.eventTarget; if (e) { (Array.isArray(e) ? e : Mt).forEach(Dt); } } } function Ot(e) { return function (...t) { const n = t[0]; return (t[0] = ve(n, { mechanism: { data: { function: (0, U.$P)(e) }, handled: !0, type: "instrument" } })), e.apply(this, t); }; } function kt(e) { return function (t) { return e.apply(this, [ve(t, { mechanism: { data: { function: "requestAnimationFrame", handler: (0, U.$P)(e) }, handled: !0, type: "instrument" } })]); }; } function Rt(e) { return function (...t) { const n = this; return ( ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((e) => { e in n && "function" == typeof n[e] && (0, o.hl)(n, e, function (t) { const n = { mechanism: { data: { function: e, handler: (0, U.$P)(t) }, handled: !0, type: "instrument" } }, r = (0, o.HK)(t); return r && (n.mechanism.data.handler = (0, U.$P)(r)), ve(t, n); }); }), e.apply(this, t) ); }; } function Dt(e) { const t = _e, n = t[e] && t[e].prototype; n && n.hasOwnProperty && n.hasOwnProperty("addEventListener") && ((0, o.hl)(n, "addEventListener", function (t) { return function (n, r, i) { try { "function" == typeof r.handleEvent && (r.handleEvent = ve(r.handleEvent, { mechanism: { data: { function: "handleEvent", handler: (0, U.$P)(r), target: e }, handled: !0, type: "instrument" } })); } catch (e) {} return t.apply(this, [n, ve(r, { mechanism: { data: { function: "addEventListener", handler: (0, U.$P)(r), target: e }, handled: !0, type: "instrument" } }), i]); }; }), (0, o.hl)(n, "removeEventListener", function (e) { return function (t, n, r) { const i = n; try { const n = i && i.__sentry_wrapped__; n && e.call(this, t, n, r); } catch (e) {} return e.call(this, t, i, r); }; })); } Pt.__initStatic(); class Nt { static __initStatic() { this.id = "LinkedErrors"; } __init() { this.name = Nt.id; } constructor(e = {}) { Nt.prototype.__init.call(this), (this._key = e.key || "cause"), (this._limit = e.limit || 5); } setupOnce() { const e = (0, g.Gd)().getClient(); e && (0, ue.c)((t, n) => { const r = (0, g.Gd)().getIntegration(Nt); return r ? (function (e, t, n, r, i) { if (!(r.exception && r.exception.values && i && (0, F.V9)(i.originalException, Error))) return r; const o = Bt(e, n, i.originalException, t); return (r.exception.values = [...o, ...r.exception.values]), r; })(e.getOptions().stackParser, r._key, r._limit, t, n) : t; }); } } function Bt(e, t, n, r, i = []) { if (!(0, F.V9)(n[r], Error) || i.length + 1 >= t) return i; const o = Oe(e, n[r]); return Bt(e, t, n[r], r, [o, ...i]); } Nt.__initStatic(); class Ft { constructor() { Ft.prototype.__init.call(this); } static __initStatic() { this.id = "HttpContext"; } __init() { this.name = Ft.id; } setupOnce() { (0, ue.c)((e) => { if ((0, g.Gd)().getIntegration(Ft)) { if (!_e.navigator && !_e.location && !_e.document) return e; const t = (e.request && e.request.url) || (_e.location && _e.location.href), { referrer: n } = _e.document || {}, { userAgent: r } = _e.navigator || {}, i = { ...(e.request && e.request.headers), ...(n && { Referer: n }), ...(r && { "User-Agent": r }) }, o = { ...e.request, ...(t && { url: t }), headers: i }; return { ...e, request: o }; } return e; }); } } Ft.__initStatic(); class Ut { constructor() { Ut.prototype.__init.call(this); } static __initStatic() { this.id = "Dedupe"; } __init() { this.name = Ut.id; } setupOnce(e, t) { const n = (e) => { if (e.type) return e; const n = t().getIntegration(Ut); if (n) { try { if ( (function (e, t) { if (!t) return !1; if ( (function (e, t) { const n = e.message, r = t.message; if (!n && !r) return !1; if ((n && !r) || (!n && r)) return !1; if (n !== r) return !1; if (!Gt(e, t)) return !1; if (!jt(e, t)) return !1; return !0; })(e, t) ) return !0; if ( (function (e, t) { const n = Ht(t), r = Ht(e); if (!n || !r) return !1; if (n.type !== r.type || n.value !== r.value) return !1; if (!Gt(e, t)) return !1; if (!jt(e, t)) return !1; return !0; })(e, t) ) return !0; return !1; })(e, n._previousEvent) ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Event dropped due to being a duplicate of previously captured event."), null; } catch (t) { return (n._previousEvent = e); } return (n._previousEvent = e); } return e; }; (n.id = this.name), e(n); } } function jt(e, t) { let n = Vt(e), r = Vt(t); if (!n && !r) return !0; if ((n && !r) || (!n && r)) return !1; if (r.length !== n.length) return !1; for (let e = 0; e < r.length; e++) { const t = r[e], i = n[e]; if (t.filename !== i.filename || t.lineno !== i.lineno || t.colno !== i.colno || t.function !== i.function) return !1; } return !0; } function Gt(e, t) { let n = e.fingerprint, r = t.fingerprint; if (!n && !r) return !0; if ((n && !r) || (!n && r)) return !1; try { return !(n.join("") !== r.join("")); } catch (e) { return !1; } } function Ht(e) { return e.exception && e.exception.values && e.exception.values[0]; } function Vt(e) { const t = e.exception; if (t) try { return t.values[0].stacktrace.frames; } catch (e) { return; } } Ut.__initStatic(); const Zt = [new p(), new s(), new Pt(), new qe(), new Tt(), new Nt(), new Ut(), new Ft()]; function zt(e = {}) { void 0 === e.defaultIntegrations && (e.defaultIntegrations = Zt), void 0 === e.release && ("string" == typeof __SENTRY_RELEASE__ && (e.release = __SENTRY_RELEASE__), _e.SENTRY_RELEASE && _e.SENTRY_RELEASE.id && (e.release = _e.SENTRY_RELEASE.id)), void 0 === e.autoSessionTracking && (e.autoSessionTracking = !0), void 0 === e.sendClientReports && (e.sendClientReports = !0); const t = { ...e, stackParser: (0, U.Sq)(e.stackParser || wt), integrations: Ce(e), transport: e.transport || ((0, nt.Ak)() ? it : at) }; !(function (e, t) { !0 === t.debug && ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__ ? u.kg.enable() : console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")); const n = (0, g.Gd)(); n.getScope().update(t.initialScope); const r = new e(t); n.bindClient(r); })(tt, t), e.autoSessionTracking && (function () { if (void 0 === _e.document) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")); const e = (0, g.Gd)(); if (!e.captureSession) return; Qt(e), (0, He.oq)("history", ({ from: e, to: t }) => { void 0 !== e && e !== t && Qt((0, g.Gd)()); }); })(); } function Yt(e = {}, t = (0, g.Gd)()) { if (!_e.document) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("Global document not defined in showReportDialog call")); const { client: n, scope: r } = t.getStackTop(), i = e.dsn || (n && n.getDsn()); if (!i) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("DSN not configured for showReportDialog call")); r && (e.user = { ...r.getUser(), ...e.user }), e.eventId || (e.eventId = t.lastEventId()); const o = _e.document.createElement("script"); (o.async = !0), (o.src = (function (e, t) { const n = B(e); if (!n) return ""; const r = `${oe(n)}embed/error-page/`; let i = `dsn=${R(n)}`; for (const e in t) if ("dsn" !== e) if ("user" === e) { const e = t.user; if (!e) continue; e.name && (i += `&name=${encodeURIComponent(e.name)}`), e.email && (i += `&email=${encodeURIComponent(e.email)}`); } else i += `&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`; return `${r}?${i}`; })(i, e)), e.onLoad && (o.onload = e.onLoad); const a = _e.document.head || _e.document.body; a ? a.appendChild(o) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("Not injecting report dialog. No injection point found in HTML"); } function Wt() { return (0, g.Gd)().lastEventId(); } function Xt() {} function qt(e) { e(); } function Kt(e) { const t = (0, g.Gd)().getClient(); return t ? t.flush(e) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Cannot flush events. No client defined."), (0, P.WD)(!1)); } function $t(e) { const t = (0, g.Gd)().getClient(); return t ? t.close(e) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Cannot flush events and disable SDK. No client defined."), (0, P.WD)(!1)); } function Jt(e) { return ve(e)(); } function Qt(e) { e.startSession({ ignoreDuration: !0 }), e.captureSession(); } function en(e) { const t = (0, g.Gd)().getClient(); t && t.captureUserFeedback(e); } var tn = n(37392); const nn = fe.n2, rn = "sentryReplaySession", on = "replay_event", an = "Unable to send Replay", sn = 15e4, un = 5e3, ln = 2e7; var cn; function dn(e) { const t = null == e ? void 0 : e.host; return Boolean(t && t.shadowRoot && t.shadowRoot === e); } function hn({ maskInputOptions: e, tagName: t, type: n }) { "option" === t.toLowerCase() && (t = "select"); const r = "string" == typeof n ? n.toLowerCase() : void 0; return e[t.toLowerCase()] || (r && e[r]) || "password" === r || ("input" === t && !n && e.text); } function pn({ input: e, maskInputSelector: t, unmaskInputSelector: n, maskInputOptions: r, tagName: i, type: o, value: a, maskInputFn: s }) { let u = a || ""; return (n && e.matches(n)) || (e.hasAttribute("data-rr-is-password") && (o = "password"), (hn({ maskInputOptions: r, tagName: i, type: o }) || (t && e.matches(t))) && (u = s ? s(u) : "*".repeat(u.length))), u; } !(function (e) { (e[(e.Document = 0)] = "Document"), (e[(e.DocumentType = 1)] = "DocumentType"), (e[(e.Element = 2)] = "Element"), (e[(e.Text = 3)] = "Text"), (e[(e.CDATA = 4)] = "CDATA"), (e[(e.Comment = 5)] = "Comment"); })(cn || (cn = {})); const fn = "__rrweb_original__"; function _n(e) { const t = e.type; return e.hasAttribute("data-rr-is-password") ? "password" : t ? t.toLowerCase() : null; } function gn(e, t, n) { return "string" == typeof n && n.toLowerCase(), "INPUT" !== t || ("radio" !== n && "checkbox" !== n) ? e.value : e.getAttribute("value") || ""; } let mn = 1; const vn = new RegExp("[^a-z0-9-_:]"), yn = -2; function Cn(e) { return e ? e.replace(/[\S]/g, "*") : ""; } function bn(e) { try { const t = e.rules || e.cssRules; return t ? Array.from(t).map(wn).join("") : null; } catch (e) { return null; } } function wn(e) { let t = e.cssText; if ( (function (e) { return "styleSheet" in e; })(e) ) try { t = bn(e.styleSheet) || t; } catch (e) {} return Sn(t); } function Sn(e) { if (e.indexOf(":") > -1) { const t = /(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm; return e.replace(t, "$1\\$2"); } return e; } let Tn, xn; const En = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, Ln = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/, An = /^(data:)([^,]*),(.*)/i; function In(e, t) { return (e || "").replace(En, (e, n, r, i, o, a) => { const s = r || o || a, u = n || i || ""; if (!s) return e; if (!Ln.test(s)) return `url(${u}${s}${u})`; if (An.test(s)) return `url(${u}${s}${u})`; if ("/" === s[0]) return `url(${u}${ (function (e) { let t = ""; return (t = e.indexOf("//") > -1 ? e.split("/").slice(0, 3).join("/") : e.split("/")[0]), (t = t.split("?")[0]), t; })(t) + s }${u})`; const l = t.split("/"), c = s.split("/"); l.pop(); for (const e of c) "." !== e && (".." === e ? l.pop() : l.push(e)); return `url(${u}${l.join("/")}${u})`; }); } const Mn = /^[^ \t\n\r\u000c]+/, Pn = /^[, \t\n\r\u000c]+/; function On(e, t) { if (!t || "" === t.trim()) return t; const n = e.createElement("a"); return (n.href = t), n.href; } function kn() { const e = document.createElement("a"); return (e.href = ""), e.href; } function Rn(e, t, n, r, i, o, a, s) { if (!i) return i; const u = r.toLowerCase(), l = n.toLowerCase(); return "src" === u || "href" === u || ("xlink:href" === u && "#" !== i[0]) ? On(e, i) : "background" !== u || ("table" !== l && "td" !== l && "th" !== l) ? "srcset" === u ? (function (e, t) { if ("" === t.trim()) return t; let n = 0; function r(e) { let r, i = e.exec(t.substring(n)); return i ? ((r = i[0]), (n += r.length), r) : ""; } let i = []; for (; r(Pn), !(n >= t.length); ) { let o = r(Mn); if ("," === o.slice(-1)) (o = On(e, o.substring(0, o.length - 1))), i.push(o); else { let r = ""; o = On(e, o); let a = !1; for (;;) { let e = t.charAt(n); if ("" === e) { i.push((o + r).trim()); break; } if (a) ")" === e && (a = !1); else { if ("," === e) { (n += 1), i.push((o + r).trim()); break; } "(" === e && (a = !0); } (r += e), (n += 1); } } } return i.join(", "); })(e, i) : "style" === u ? In(i, kn()) : "object" === l && "data" === u ? On(e, i) : o && (function (e, t, n, r) { if (r && e.matches(r)) return !1; return ["placeholder", "title", "aria-label"].indexOf(t) > -1 || ("input" === n && "value" === t && e.hasAttribute("type") && ["submit", "button"].indexOf(e.getAttribute("type").toLowerCase()) > -1); })(t, u, l, a) ? s ? s(i) : Cn(i) : i : On(e, i); } function Dn(e, t, n, r, i) { if (!e) return !1; if (e.nodeType !== e.ELEMENT_NODE) return Dn(e.parentNode, t, n, r, i); if (r && (e.matches(r) || e.closest(r))) return !1; if (i) return !0; if ("string" == typeof t) { if (e.classList.contains(t)) return !0; } else for (let n = 0; n < e.classList.length; n++) { const r = e.classList[n]; if (t.test(r)) return !0; } return !(!n || !e.matches(n)) || Dn(e.parentNode, t, n, r, i); } function Nn(e, t) { var n; const { doc: r, blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: s, maskTextSelector: u, unmaskTextSelector: l, inlineStylesheet: c, maskInputSelector: d, unmaskInputSelector: h, maskAllText: p, maskInputOptions: f = {}, maskTextFn: _, maskInputFn: g, dataURLOptions: m = {}, inlineImages: v, recordCanvas: y, keepIframeSrcFn: C } = t; let b; if (r.__sn) { const e = r.__sn.id; b = 1 === e ? void 0 : e; } switch (e.nodeType) { case e.DOCUMENT_NODE: return "CSS1Compat" !== e.compatMode ? { type: cn.Document, childNodes: [], compatMode: e.compatMode, rootId: b } : { type: cn.Document, childNodes: [], rootId: b }; case e.DOCUMENT_TYPE_NODE: return { type: cn.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: b }; case e.ELEMENT_NODE: const t = (function (e, t, n, r) { if (r && e.matches(r)) return !1; if ("string" == typeof t) { if (e.classList.contains(t)) return !0; } else for (let n = 0; n < e.classList.length; n++) { const r = e.classList[n]; if (t.test(r)) return !0; } return !!n && e.matches(n); })(e, i, o, a), T = (function (e) { if (e instanceof HTMLFormElement) return "form"; const t = e.tagName.toLowerCase().trim(); return vn.test(t) ? "div" : t; })(e); let x = {}; for (const { name: t, value: n } of Array.from(e.attributes)) Un(T, t) || (x[t] = Rn(r, e, T, t, n, p, l, _)); if ("link" === T && c) { const t = Array.from(r.styleSheets).find((t) => t.href === e.href); let n = null; t && (n = bn(t)), n && (delete x.rel, delete x.href, (x._cssText = In(n, t.href))); } if ("style" === T && e.sheet && !(e.innerText || e.textContent || "").trim().length) { const t = bn(e.sheet); t && (x._cssText = In(t, kn())); } if ("input" === T || "textarea" === T || "select" === T || "option" === T) { const t = e, n = _n(t), r = gn(t, T.toUpperCase(), n), i = e.checked; "submit" !== n && "button" !== n && r && (x.value = pn({ input: t, type: n, tagName: T, value: r, maskInputSelector: d, unmaskInputSelector: h, maskInputOptions: f, maskInputFn: g })), i && (x.checked = i); } if (("option" === T && (e.selected && !f.select ? (x.selected = !0) : delete x.selected), "canvas" === T && y)) if ("2d" === e.__context) (function (e) { const t = e.getContext("2d"); if (!t) return !0; for (let n = 0; n < e.width; n += 50) for (let r = 0; r < e.height; r += 50) { const i = t.getImageData, o = fn in i ? i[fn] : i; if (new Uint32Array(o.call(t, n, r, Math.min(50, e.width - n), Math.min(50, e.height - r)).data.buffer).some((e) => 0 !== e)) return !1; } return !0; })(e) || (x.rr_dataURL = e.toDataURL(m.type, m.quality)); else if (!("__context" in e)) { const t = e.toDataURL(m.type, m.quality), n = document.createElement("canvas"); (n.width = e.width), (n.height = e.height); t !== n.toDataURL(m.type, m.quality) && (x.rr_dataURL = t); } if ("img" === T && v) { Tn || ((Tn = r.createElement("canvas")), (xn = Tn.getContext("2d"))); const t = e, n = t.crossOrigin; t.crossOrigin = "anonymous"; const i = () => { try { (Tn.width = t.naturalWidth), (Tn.height = t.naturalHeight), xn.drawImage(t, 0, 0), (x.rr_dataURL = Tn.toDataURL(m.type, m.quality)); } catch (e) { console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`); } n ? (x.crossOrigin = n) : delete x.crossOrigin; }; t.complete && 0 !== t.naturalWidth ? i() : (t.onload = i); } if ((("audio" !== T && "video" !== T) || ((x.rr_mediaState = e.paused ? "paused" : "played"), (x.rr_mediaCurrentTime = e.currentTime)), e.scrollLeft && (x.rr_scrollLeft = e.scrollLeft), e.scrollTop && (x.rr_scrollTop = e.scrollTop), t)) { const { width: t, height: n } = e.getBoundingClientRect(); x = { class: x.class, rr_width: `${t}px`, rr_height: `${n}px` }; } return "iframe" !== T || C(x.src) || (e.contentDocument || (x.rr_src = x.src), delete x.src), { type: cn.Element, tagName: T, attributes: x, childNodes: [], isSVG: ((S = e), Boolean("svg" === S.tagName || S.ownerSVGElement) || void 0), needBlock: t, rootId: b }; case e.TEXT_NODE: const E = e.parentNode && e.parentNode.tagName; let L = e.textContent; const A = "STYLE" === E || void 0, I = "SCRIPT" === E || void 0; if (A && L) { try { e.nextSibling || e.previousSibling || ((null === (n = e.parentNode.sheet) || void 0 === n ? void 0 : n.cssRules) && (L = (w = e.parentNode.sheet).cssRules ? Array.from(w.cssRules) .map((e) => (e.cssText ? Sn(e.cssText) : "")) .join("") : "")); } catch (t) { console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`, e); } L = In(L, kn()); } if ((I && (L = "SCRIPT_PLACEHOLDER"), "TEXTAREA" === E && L)) L = ""; else if ("OPTION" === E && L) { L = pn({ input: e.parentNode, type: null, tagName: E, value: L, maskInputSelector: d, unmaskInputSelector: h, maskInputOptions: f, maskInputFn: g }); } else !A && !I && Dn(e, s, u, l, p) && L && (L = _ ? _(L) : Cn(L)); return { type: cn.Text, textContent: L || "", isStyle: A, rootId: b }; case e.CDATA_SECTION_NODE: return { type: cn.CDATA, textContent: "", rootId: b }; case e.COMMENT_NODE: return { type: cn.Comment, textContent: e.textContent || "", rootId: b }; default: return !1; } var w, S; } function Bn(e) { return null == e ? "" : e.toLowerCase(); } function Fn(e, t) { const { doc: n, map: r, blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: s, maskTextSelector: u, unmaskTextSelector: l, skipChild: c = !1, inlineStylesheet: d = !0, maskInputSelector: h, unmaskInputSelector: p, maskAllText: f, maskInputOptions: _ = {}, maskTextFn: g, maskInputFn: m, slimDOMOptions: v, dataURLOptions: y = {}, inlineImages: C = !1, recordCanvas: b = !1, onSerialize: w, onIframeLoad: S, iframeLoadTimeout: T = 5e3, keepIframeSrcFn: x = () => !1 } = t; let { preserveWhiteSpace: E = !0 } = t; const L = Nn(e, { doc: n, blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: s, maskTextSelector: u, unmaskTextSelector: l, inlineStylesheet: d, maskInputSelector: h, unmaskInputSelector: p, maskAllText: f, maskInputOptions: _, maskTextFn: g, maskInputFn: m, dataURLOptions: y, inlineImages: C, recordCanvas: b, keepIframeSrcFn: x }); if (!L) return console.warn(e, "not serialized"), null; let A; A = "__sn" in e ? e.__sn.id : !(function (e, t) { if (t.comment && e.type === cn.Comment) return !0; if (e.type === cn.Element) { if (t.script && ("script" === e.tagName || ("link" === e.tagName && ("preload" === e.attributes.rel || "modulepreload" === e.attributes.rel) && "script" === e.attributes.as) || ("link" === e.tagName && "prefetch" === e.attributes.rel && "string" == typeof e.attributes.href && e.attributes.href.endsWith(".js")))) return !0; if (t.headFavicon && (("link" === e.tagName && "shortcut icon" === e.attributes.rel) || ("meta" === e.tagName && (Bn(e.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === Bn(e.attributes.name) || "icon" === Bn(e.attributes.rel) || "apple-touch-icon" === Bn(e.attributes.rel) || "shortcut icon" === Bn(e.attributes.rel))))) return !0; if ("meta" === e.tagName) { if (t.headMetaDescKeywords && Bn(e.attributes.name).match(/^description|keywords$/)) return !0; if (t.headMetaSocial && (Bn(e.attributes.property).match(/^(og|twitter|fb):/) || Bn(e.attributes.name).match(/^(og|twitter):/) || "pinterest" === Bn(e.attributes.name))) return !0; if (t.headMetaRobots && ("robots" === Bn(e.attributes.name) || "googlebot" === Bn(e.attributes.name) || "bingbot" === Bn(e.attributes.name))) return !0; if (t.headMetaHttpEquiv && void 0 !== e.attributes["http-equiv"]) return !0; if (t.headMetaAuthorship && ("author" === Bn(e.attributes.name) || "generator" === Bn(e.attributes.name) || "framework" === Bn(e.attributes.name) || "publisher" === Bn(e.attributes.name) || "progid" === Bn(e.attributes.name) || Bn(e.attributes.property).match(/^article:/) || Bn(e.attributes.property).match(/^product:/))) return !0; if (t.headMetaVerification && ("google-site-verification" === Bn(e.attributes.name) || "yandex-verification" === Bn(e.attributes.name) || "csrf-token" === Bn(e.attributes.name) || "p:domain_verify" === Bn(e.attributes.name) || "verify-v1" === Bn(e.attributes.name) || "verification" === Bn(e.attributes.name) || "shopify-checkout-api-token" === Bn(e.attributes.name))) return !0; } } return !1; })(L, v) && (E || L.type !== cn.Text || L.isStyle || L.textContent.replace(/^\s+|\s+$/gm, "").length) ? mn++ : yn; const I = Object.assign(L, { id: A }); if (((e.__sn = I), A === yn)) return null; (r[A] = e), w && w(e); let M = !c; if ((I.type === cn.Element && ((M = M && !I.needBlock), delete I.needBlock, e.shadowRoot && (I.isShadowHost = !0)), (I.type === cn.Document || I.type === cn.Element) && M)) { v.headWhitespace && L.type === cn.Element && "head" === L.tagName && (E = !1); const t = { doc: n, map: r, blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: s, maskTextSelector: u, unmaskTextSelector: l, skipChild: c, inlineStylesheet: d, maskInputSelector: h, unmaskInputSelector: p, maskAllText: f, maskInputOptions: _, maskTextFn: g, maskInputFn: m, slimDOMOptions: v, dataURLOptions: y, inlineImages: C, recordCanvas: b, preserveWhiteSpace: E, onSerialize: w, onIframeLoad: S, iframeLoadTimeout: T, keepIframeSrcFn: x }; for (const n of Array.from(e.childNodes)) { const e = Fn(n, t); e && I.childNodes.push(e); } if ( (function (e) { return e.nodeType === e.ELEMENT_NODE; })(e) && e.shadowRoot ) for (const n of Array.from(e.shadowRoot.childNodes)) { const e = Fn(n, t); e && ((e.isShadow = !0), I.childNodes.push(e)); } } return ( e.parentNode && dn(e.parentNode) && (I.isShadow = !0), I.type === cn.Element && "iframe" === I.tagName && (function (e, t, n) { const r = e.contentWindow; if (!r) return; let i, o = !1; try { i = r.document.readyState; } catch (e) { return; } if ("complete" !== i) { const r = setTimeout(() => { o || (t(), (o = !0)); }, n); return void e.addEventListener("load", () => { clearTimeout(r), (o = !0), t(); }); } const a = "about:blank"; r.location.href === a && e.src !== a && "" !== e.src ? e.addEventListener("load", t) : setTimeout(t, 0); })( e, () => { const t = e.contentDocument; if (t && S) { const n = Fn(t, { doc: t, map: r, blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: s, maskTextSelector: u, unmaskTextSelector: l, skipChild: !1, inlineStylesheet: d, maskInputSelector: h, unmaskInputSelector: p, maskAllText: f, maskInputOptions: _, maskTextFn: g, maskInputFn: m, slimDOMOptions: v, dataURLOptions: y, inlineImages: C, recordCanvas: b, preserveWhiteSpace: E, onSerialize: w, onIframeLoad: S, iframeLoadTimeout: T, keepIframeSrcFn: x }); n && S(e, n); } }, T ), I ); } function Un(e, t, n) { return ("video" === e || "audio" === e) && "autoplay" === t; } var jn, Gn, Hn, Vn, Zn, zn; function Yn(e, t, n = document) { const r = { capture: !0, passive: !0 }; return n.addEventListener(e, t, r), () => n.removeEventListener(e, t, r); } !(function (e) { (e[(e.DomContentLoaded = 0)] = "DomContentLoaded"), (e[(e.Load = 1)] = "Load"), (e[(e.FullSnapshot = 2)] = "FullSnapshot"), (e[(e.IncrementalSnapshot = 3)] = "IncrementalSnapshot"), (e[(e.Meta = 4)] = "Meta"), (e[(e.Custom = 5)] = "Custom"), (e[(e.Plugin = 6)] = "Plugin"); })(jn || (jn = {})), (function (e) { (e[(e.Mutation = 0)] = "Mutation"), (e[(e.MouseMove = 1)] = "MouseMove"), (e[(e.MouseInteraction = 2)] = "MouseInteraction"), (e[(e.Scroll = 3)] = "Scroll"), (e[(e.ViewportResize = 4)] = "ViewportResize"), (e[(e.Input = 5)] = "Input"), (e[(e.TouchMove = 6)] = "TouchMove"), (e[(e.MediaInteraction = 7)] = "MediaInteraction"), (e[(e.StyleSheetRule = 8)] = "StyleSheetRule"), (e[(e.CanvasMutation = 9)] = "CanvasMutation"), (e[(e.Font = 10)] = "Font"), (e[(e.Log = 11)] = "Log"), (e[(e.Drag = 12)] = "Drag"), (e[(e.StyleDeclaration = 13)] = "StyleDeclaration"); })(Gn || (Gn = {})), (function (e) { (e[(e.MouseUp = 0)] = "MouseUp"), (e[(e.MouseDown = 1)] = "MouseDown"), (e[(e.Click = 2)] = "Click"), (e[(e.ContextMenu = 3)] = "ContextMenu"), (e[(e.DblClick = 4)] = "DblClick"), (e[(e.Focus = 5)] = "Focus"), (e[(e.Blur = 6)] = "Blur"), (e[(e.TouchStart = 7)] = "TouchStart"), (e[(e.TouchMove_Departed = 8)] = "TouchMove_Departed"), (e[(e.TouchEnd = 9)] = "TouchEnd"), (e[(e.TouchCancel = 10)] = "TouchCancel"); })(Hn || (Hn = {})), (function (e) { (e[(e["2D"] = 0)] = "2D"), (e[(e.WebGL = 1)] = "WebGL"), (e[(e.WebGL2 = 2)] = "WebGL2"); })(Vn || (Vn = {})), (function (e) { (e[(e.Play = 0)] = "Play"), (e[(e.Pause = 1)] = "Pause"), (e[(e.Seeked = 2)] = "Seeked"), (e[(e.VolumeChange = 3)] = "VolumeChange"); })(Zn || (Zn = {})), (function (e) { (e.Start = "start"), (e.Pause = "pause"), (e.Resume = "resume"), (e.Resize = "resize"), (e.Finish = "finish"), (e.FullsnapshotRebuilded = "fullsnapshot-rebuilded"), (e.LoadStylesheetStart = "load-stylesheet-start"), (e.LoadStylesheetEnd = "load-stylesheet-end"), (e.SkipStart = "skip-start"), (e.SkipEnd = "skip-end"), (e.MouseInteraction = "mouse-interaction"), (e.EventCast = "event-cast"), (e.CustomEvent = "custom-event"), (e.Flush = "flush"), (e.StateChange = "state-change"), (e.PlayBack = "play-back"); })(zn || (zn = {})); const Wn = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording."; let Xn = { map: {}, getId: () => (console.error(Wn), -1), getNode: () => (console.error(Wn), null), removeNodeFromMap() { console.error(Wn); }, has: () => (console.error(Wn), !1), reset() { console.error(Wn); }, }; function qn(e, t, n = {}) { let r = null, i = 0; return function (o) { let a = Date.now(); i || !1 !== n.leading || (i = a); let s = t - (a - i), u = this, l = arguments; s <= 0 || s > t ? (r && (clearTimeout(r), (r = null)), (i = a), e.apply(u, l)) : r || !1 === n.trailing || (r = setTimeout(() => { (i = !1 === n.leading ? 0 : Date.now()), (r = null), e.apply(u, l); }, s)); }; } function Kn(e, t, n, r, i = window) { const o = i.Object.getOwnPropertyDescriptor(e, t); return ( i.Object.defineProperty( e, t, r ? n : { set(e) { setTimeout(() => { n.set.call(this, e); }, 0), o && o.set && o.set.call(this, e); }, } ), () => Kn(e, t, o || {}, !0) ); } function $n(e, t, n) { try { if (!(t in e)) return () => {}; const r = e[t], i = n(r); return ( "function" == typeof i && ((i.prototype = i.prototype || {}), Object.defineProperties(i, { __rrweb_original__: { enumerable: !1, value: r } })), (e[t] = i), () => { e[t] = r; } ); } catch (e) { return () => {}; } } function Jn() { return window.innerHeight || (document.documentElement && document.documentElement.clientHeight) || (document.body && document.body.clientHeight); } function Qn() { return window.innerWidth || (document.documentElement && document.documentElement.clientWidth) || (document.body && document.body.clientWidth); } function er(e, t, n, r) { if (!e) return !1; if (e.nodeType === e.ELEMENT_NODE) { let i = !1; const o = r && e.matches(r); return ( "string" == typeof t ? (i = void 0 !== e.closest ? !o && null !== e.closest("." + t) : !o && e.classList.contains(t)) : !o && e.classList.forEach((e) => { t.test(e) && (i = !0); }), !i && n && (i = e.matches(n)), (!o && i) || er(e.parentNode, t, n, r) ); } return e.nodeType, e.TEXT_NODE, er(e.parentNode, t, n, r); } function tr(e) { return "__sn" in e && e.__sn.id === yn; } function nr(e, t) { if (dn(e)) return !1; const n = t.getId(e); return !t.has(n) || ((!e.parentNode || e.parentNode.nodeType !== e.DOCUMENT_NODE) && (!e.parentNode || nr(e.parentNode, t))); } function rr(e) { return Boolean(e.changedTouches); } function ir(e) { return "__sn" in e && e.__sn.type === cn.Element && "iframe" === e.__sn.tagName; } function or(e) { return Boolean(null == e ? void 0 : e.shadowRoot); } function ar(e) { return "__ln" in e; } "undefined" != typeof window && window.Proxy && window.Reflect && (Xn = new Proxy(Xn, { get: (e, t, n) => ("map" === t && console.error(Wn), Reflect.get(e, t, n)) })); class sr { constructor() { (this.length = 0), (this.head = null); } get(e) { if (e >= this.length) throw new Error("Position outside of list range"); let t = this.head; for (let n = 0; n < e; n++) t = (null == t ? void 0 : t.next) || null; return t; } addNode(e) { const t = { value: e, previous: null, next: null }; if (((e.__ln = t), e.previousSibling && ar(e.previousSibling))) { const n = e.previousSibling.__ln.next; (t.next = n), (t.previous = e.previousSibling.__ln), (e.previousSibling.__ln.next = t), n && (n.previous = t); } else if (e.nextSibling && ar(e.nextSibling) && e.nextSibling.__ln.previous) { const n = e.nextSibling.__ln.previous; (t.previous = n), (t.next = e.nextSibling.__ln), (e.nextSibling.__ln.previous = t), n && (n.next = t); } else this.head && (this.head.previous = t), (t.next = this.head), (this.head = t); this.length++; } removeNode(e) { const t = e.__ln; this.head && (t.previous ? ((t.previous.next = t.next), t.next && (t.next.previous = t.previous)) : ((this.head = t.next), this.head && (this.head.previous = null)), e.__ln && delete e.__ln, this.length--); } } const ur = (e, t) => `${e}@${t}`; function lr(e) { return "__sn" in e; } class cr { constructor() { (this.frozen = !1), (this.locked = !1), (this.texts = []), (this.attributes = []), (this.removes = []), (this.mapRemoves = []), (this.movedMap = {}), (this.addedSet = new Set()), (this.movedSet = new Set()), (this.droppedSet = new Set()), (this.processMutations = (e) => { e.forEach(this.processMutation), this.emit(); }), (this.emit = () => { if (this.frozen || this.locked) return; const e = [], t = new sr(), n = (e) => { let t = e, n = yn; for (; n === yn; ) (t = t && t.nextSibling), (n = t && this.mirror.getId(t)); return n; }, r = (r) => { var i, o, a, s, u; const l = r.getRootNode ? (null === (i = r.getRootNode()) || void 0 === i ? void 0 : i.host) : null; let c = l; for (; null === (a = null === (o = null == c ? void 0 : c.getRootNode) || void 0 === o ? void 0 : o.call(c)) || void 0 === a ? void 0 : a.host; ) c = (null === (u = null === (s = null == c ? void 0 : c.getRootNode) || void 0 === s ? void 0 : s.call(c)) || void 0 === u ? void 0 : u.host) || null; const d = !(this.doc.contains(r) || (c && this.doc.contains(c))); if (!r.parentNode || d) return; const h = dn(r.parentNode) ? this.mirror.getId(l) : this.mirror.getId(r.parentNode), p = n(r); if (-1 === h || -1 === p) return t.addNode(r); let f = Fn(r, { doc: this.doc, map: this.mirror.map, blockClass: this.blockClass, blockSelector: this.blockSelector, unblockSelector: this.unblockSelector, maskTextClass: this.maskTextClass, maskTextSelector: this.maskTextSelector, unmaskTextSelector: this.unmaskTextSelector, maskInputSelector: this.maskInputSelector, unmaskInputSelector: this.unmaskInputSelector, skipChild: !0, inlineStylesheet: this.inlineStylesheet, maskAllText: this.maskAllText, maskInputOptions: this.maskInputOptions, maskTextFn: this.maskTextFn, maskInputFn: this.maskInputFn, slimDOMOptions: this.slimDOMOptions, recordCanvas: this.recordCanvas, inlineImages: this.inlineImages, onSerialize: (e) => { ir(e) && this.iframeManager.addIframe(e), or(r) && this.shadowDomManager.addShadowRoot(r.shadowRoot, document); }, onIframeLoad: (e, t) => { this.iframeManager.attachIframe(e, t), this.shadowDomManager.observeAttachShadow(e); }, }); f && e.push({ parentId: h, nextId: p, node: f }); }; for (; this.mapRemoves.length; ) this.mirror.removeNodeFromMap(this.mapRemoves.shift()); for (const e of this.movedSet) (hr(this.removes, e, this.mirror) && !this.movedSet.has(e.parentNode)) || r(e); for (const e of this.addedSet) pr(this.droppedSet, e) || hr(this.removes, e, this.mirror) ? (pr(this.movedSet, e) ? r(e) : this.droppedSet.add(e)) : r(e); let i = null; for (; t.length; ) { let e = null; if (i) { const t = this.mirror.getId(i.value.parentNode), r = n(i.value); -1 !== t && -1 !== r && (e = i); } if (!e) for (let r = t.length - 1; r >= 0; r--) { const i = t.get(r); if (i) { const t = this.mirror.getId(i.value.parentNode), r = n(i.value); if (-1 !== t && -1 !== r) { e = i; break; } } } if (!e) { for (; t.head; ) t.removeNode(t.head.value); break; } (i = e.previous), t.removeNode(e.value), r(e.value); } const o = { texts: this.texts.map((e) => ({ id: this.mirror.getId(e.node), value: e.value })).filter((e) => this.mirror.has(e.id)), attributes: this.attributes.map((e) => ({ id: this.mirror.getId(e.node), attributes: e.attributes })).filter((e) => this.mirror.has(e.id)), removes: this.removes, adds: e }; (o.texts.length || o.attributes.length || o.removes.length || o.adds.length) && ((this.texts = []), (this.attributes = []), (this.removes = []), (this.addedSet = new Set()), (this.movedSet = new Set()), (this.droppedSet = new Set()), (this.movedMap = {}), this.mutationCb(o)); }), (this.processMutation = (e) => { if (!tr(e.target)) switch (e.type) { case "characterData": { const t = e.target.textContent; er(e.target, this.blockClass, this.blockSelector, this.unblockSelector) || t === e.oldValue || this.texts.push({ value: Dn(e.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextSelector, this.maskAllText) && t ? (this.maskTextFn ? this.maskTextFn(t) : t.replace(/[\S]/g, "*")) : t, node: e.target }); break; } case "attributes": { const t = e.target; let n = t.getAttribute(e.attributeName); if (("value" === e.attributeName && (n = pn({ input: t, maskInputSelector: this.maskInputSelector, unmaskInputSelector: this.unmaskInputSelector, maskInputOptions: this.maskInputOptions, tagName: t.tagName, type: t.getAttribute("type"), value: n, maskInputFn: this.maskInputFn })), er(e.target, this.blockClass, this.blockSelector, this.unblockSelector) || n === e.oldValue)) return; let r = this.attributes.find((t) => t.node === e.target); if ((r || ((r = { node: e.target, attributes: {} }), this.attributes.push(r)), "type" === e.attributeName && "INPUT" === t.tagName && "password" === (e.oldValue || "").toLowerCase() && t.setAttribute("data-rr-is-password", "true"), "style" === e.attributeName)) { const n = this.doc.createElement("span"); e.oldValue && n.setAttribute("style", e.oldValue), (void 0 !== r.attributes.style && null !== r.attributes.style) || (r.attributes.style = {}); try { const e = r.attributes.style; for (const r of Array.from(t.style)) { const i = t.style.getPropertyValue(r), o = t.style.getPropertyPriority(r); (i === n.style.getPropertyValue(r) && o === n.style.getPropertyPriority(r)) || (e[r] = "" === o ? i : [i, o]); } for (const r of Array.from(n.style)) "" === t.style.getPropertyValue(r) && (e[r] = !1); } catch (e) { console.warn("[rrweb] Error when parsing update to style attribute:", e); } } else { const t = e.target; r.attributes[e.attributeName] = Rn(this.doc, t, t.tagName, e.attributeName, n, this.maskAllText, this.unmaskTextSelector, this.maskTextFn); } break; } case "childList": e.addedNodes.forEach((t) => this.genAdds(t, e.target)), e.removedNodes.forEach((t) => { const n = this.mirror.getId(t), r = dn(e.target) ? this.mirror.getId(e.target.host) : this.mirror.getId(e.target); er(e.target, this.blockClass, this.blockSelector, this.unblockSelector) || tr(t) || (this.addedSet.has(t) ? (dr(this.addedSet, t), this.droppedSet.add(t)) : (this.addedSet.has(e.target) && -1 === n) || nr(e.target, this.mirror) || (this.movedSet.has(t) && this.movedMap[ur(n, r)] ? dr(this.movedSet, t) : this.removes.push({ parentId: r, id: n, isShadow: !!dn(e.target) || void 0 })), this.mapRemoves.push(t)); }); } }), (this.genAdds = (e, t) => { if (!t || !er(t, this.blockClass, this.blockSelector, this.unblockSelector)) { if (lr(e)) { if (tr(e)) return; this.movedSet.add(e); let n = null; t && lr(t) && (n = t.__sn.id), n && (this.movedMap[ur(e.__sn.id, n)] = !0); } else this.addedSet.add(e), this.droppedSet.delete(e); er(e, this.blockClass, this.blockSelector, this.unblockSelector) || e.childNodes.forEach((e) => this.genAdds(e)); } }); } init(e) { ["mutationCb", "blockClass", "blockSelector", "unblockSelector", "maskTextClass", "maskTextSelector", "unmaskTextSelector", "maskInputSelector", "unmaskInputSelector", "inlineStylesheet", "maskAllText", "maskInputOptions", "maskTextFn", "maskInputFn", "recordCanvas", "inlineImages", "slimDOMOptions", "doc", "mirror", "iframeManager", "shadowDomManager", "canvasManager"].forEach((t) => { this[t] = e[t]; }); } freeze() { (this.frozen = !0), this.canvasManager.freeze(); } unfreeze() { (this.frozen = !1), this.canvasManager.unfreeze(), this.emit(); } isFrozen() { return this.frozen; } lock() { (this.locked = !0), this.canvasManager.lock(); } unlock() { (this.locked = !1), this.canvasManager.unlock(), this.emit(); } reset() { this.shadowDomManager.reset(), this.canvasManager.reset(); } } function dr(e, t) { e.delete(t), t.childNodes.forEach((t) => dr(e, t)); } function hr(e, t, n) { const { parentNode: r } = t; if (!r) return !1; const i = n.getId(r); return !!e.some((e) => e.id === i) || hr(e, r, n); } function pr(e, t) { const { parentNode: n } = t; return !!n && (!!e.has(n) || pr(e, n)); } const fr = (e) => (...t) => { try { return e(...t); } catch (e) { try { e.__rrweb__ = !0; } catch (e) {} throw e; } }, _r = []; function gr(e) { try { if ("composedPath" in e) { const t = e.composedPath(); if (t.length) return t[0]; } else if ("path" in e && e.path.length) return e.path[0]; } catch (e) {} return e && e.target; } function mr(e, t) { var n, r; const i = new cr(); _r.push(i), i.init(e); let o = window.MutationObserver || window.__rrMutationObserver; const a = null === (r = null === (n = null === window || void 0 === window ? void 0 : window.Zone) || void 0 === n ? void 0 : n.__symbol__) || void 0 === r ? void 0 : r.call(n, "MutationObserver"); a && window[a] && (o = window[a]); const s = new o( fr((t) => { (e.onMutation && !1 === e.onMutation(t)) || i.processMutations(t); }) ); return s.observe(t, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), s; } function vr({ mouseInteractionCb: e, doc: t, mirror: n, blockClass: r, blockSelector: i, unblockSelector: o, sampling: a }) { if (!1 === a.mouseInteraction) return () => {}; const s = !0 === a.mouseInteraction || void 0 === a.mouseInteraction ? {} : a.mouseInteraction, u = []; return ( Object.keys(Hn) .filter((e) => Number.isNaN(Number(e)) && !e.endsWith("_Departed") && !1 !== s[e]) .forEach((a) => { const s = a.toLowerCase(), l = fr( ((t) => (a) => { const s = gr(a); if (er(s, r, i, o)) return; const u = rr(a) ? a.changedTouches[0] : a; if (!u) return; const l = n.getId(s), { clientX: c, clientY: d } = u; fr(e)({ type: Hn[t], id: l, x: c, y: d }); })(a) ); u.push(Yn(s, l, t)); }), fr(() => { u.forEach((e) => e()); }) ); } function yr({ scrollCb: e, doc: t, mirror: n, blockClass: r, blockSelector: i, unblockSelector: o, sampling: a }) { const s = qn((a) => { const s = gr(a); if (!s || er(s, r, i, o)) return; const u = n.getId(s); if (s === t) { const n = t.scrollingElement || t.documentElement; fr(e)({ id: u, x: n.scrollLeft, y: n.scrollTop }); } else fr(e)({ id: u, x: s.scrollLeft, y: s.scrollTop }); }, a.scroll || 100); return Yn("scroll", fr(s), t); } function Cr(e, t) { const n = Object.assign({}, e); return t || delete n.userTriggered, n; } const br = ["INPUT", "TEXTAREA", "SELECT"], wr = new WeakMap(); function Sr({ inputCb: e, doc: t, mirror: n, blockClass: r, blockSelector: i, unblockSelector: o, ignoreClass: a, ignoreSelector: s, maskInputSelector: u, unmaskInputSelector: l, maskInputOptions: c, maskInputFn: d, sampling: h, userTriggeredOnInput: p }) { function f(e) { let n = gr(e); const h = n && n.tagName, f = e.isTrusted; if (("OPTION" === h && (n = n.parentElement), !n || !h || br.indexOf(h) < 0 || er(n, r, i, o))) return; const g = n, m = _n(g); if (g.classList.contains(a) || (s && g.matches(s))) return; let v = gn(g, h, m), y = !1; ("radio" !== m && "checkbox" !== m) || (y = n.checked), (function ({ tagName: e, type: t, maskInputOptions: n, maskInputSelector: r }) { return r || hn({ maskInputOptions: n, tagName: e, type: t }); })({ maskInputOptions: c, maskInputSelector: u, tagName: h, type: m }) && (v = pn({ input: g, maskInputOptions: c, maskInputSelector: u, unmaskInputSelector: l, tagName: h, type: m, value: v, maskInputFn: d })), _(n, fr(Cr)({ text: v, isChecked: y, userTriggered: f }, p)); const C = n.name; "radio" === m && C && y && t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach((e) => { if (e !== n) { const t = pn({ input: e, maskInputOptions: c, maskInputSelector: u, unmaskInputSelector: l, tagName: h, type: m, value: gn(e, h, m), maskInputFn: d }); _(e, fr(Cr)({ text: t, isChecked: !y, userTriggered: !1 }, p)); } }); } function _(t, r) { const i = wr.get(t); if (!i || i.text !== r.text || i.isChecked !== r.isChecked) { wr.set(t, r); const i = n.getId(t); e(Object.assign(Object.assign({}, r), { id: i })); } } const g = ("last" === h.input ? ["change"] : ["input", "change"]).map((e) => Yn(e, fr(f), t)), m = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value"), v = [ [HTMLInputElement.prototype, "value"], [HTMLInputElement.prototype, "checked"], [HTMLSelectElement.prototype, "value"], [HTMLTextAreaElement.prototype, "value"], [HTMLSelectElement.prototype, "selectedIndex"], [HTMLOptionElement.prototype, "selected"], ]; return ( m && m.set && g.push( ...v.map((e) => Kn(e[0], e[1], { set() { fr(f)({ target: this }); }, }) ) ), fr(() => { g.forEach((e) => e()); }) ); } function Tr(e) { return (function (e, t) { if ((Er("CSSGroupingRule") && e.parentRule instanceof CSSGroupingRule) || (Er("CSSMediaRule") && e.parentRule instanceof CSSMediaRule) || (Er("CSSSupportsRule") && e.parentRule instanceof CSSSupportsRule) || (Er("CSSConditionRule") && e.parentRule instanceof CSSConditionRule)) { const n = Array.from(e.parentRule.cssRules).indexOf(e); t.unshift(n); } else { const n = Array.from(e.parentStyleSheet.cssRules).indexOf(e); t.unshift(n); } return t; })(e, []); } function xr(e, t = {}) { const n = e.doc.defaultView; if (!n) return () => {}; !(function (e, t) { const { mutationCb: n, mousemoveCb: r, mouseInteractionCb: i, scrollCb: o, viewportResizeCb: a, inputCb: s, mediaInteractionCb: u, styleSheetRuleCb: l, styleDeclarationCb: c, canvasMutationCb: d, fontCb: h } = e; (e.mutationCb = (...e) => { t.mutation && t.mutation(...e), n(...e); }), (e.mousemoveCb = (...e) => { t.mousemove && t.mousemove(...e), r(...e); }), (e.mouseInteractionCb = (...e) => { t.mouseInteraction && t.mouseInteraction(...e), i(...e); }), (e.scrollCb = (...e) => { t.scroll && t.scroll(...e), o(...e); }), (e.viewportResizeCb = (...e) => { t.viewportResize && t.viewportResize(...e), a(...e); }), (e.inputCb = (...e) => { t.input && t.input(...e), s(...e); }), (e.mediaInteractionCb = (...e) => { t.mediaInteaction && t.mediaInteaction(...e), u(...e); }), (e.styleSheetRuleCb = (...e) => { t.styleSheetRule && t.styleSheetRule(...e), l(...e); }), (e.styleDeclarationCb = (...e) => { t.styleDeclaration && t.styleDeclaration(...e), c(...e); }), (e.canvasMutationCb = (...e) => { t.canvasMutation && t.canvasMutation(...e), d(...e); }), (e.fontCb = (...e) => { t.font && t.font(...e), h(...e); }); })(e, t); const r = mr(e, e.doc), i = (function ({ mousemoveCb: e, sampling: t, doc: n, mirror: r }) { if (!1 === t.mousemove) return () => {}; const i = "number" == typeof t.mousemove ? t.mousemove : 50, o = "number" == typeof t.mousemoveCallback ? t.mousemoveCallback : 500; let a, s = []; const u = qn((t) => { const n = Date.now() - a; fr(e)( s.map((e) => ((e.timeOffset -= n), e)), t ), (s = []), (a = null); }, o), l = qn( (e) => { const t = gr(e), { clientX: n, clientY: i } = rr(e) ? e.changedTouches[0] : e; a || (a = Date.now()), s.push({ x: n, y: i, id: r.getId(t), timeOffset: Date.now() - a }), u("undefined" != typeof DragEvent && e instanceof DragEvent ? Gn.Drag : e instanceof MouseEvent ? Gn.MouseMove : Gn.TouchMove); }, i, { trailing: !1 } ), c = [Yn("mousemove", fr(l), n), Yn("touchmove", fr(l), n), Yn("drag", fr(l), n)]; return fr(() => { c.forEach((e) => e()); }); })(e), o = vr(e), a = yr(e), s = (function ({ viewportResizeCb: e }) { let t = -1, n = -1; const r = qn(() => { const r = Jn(), i = Qn(); (t === r && n === i) || (fr(e)({ width: Number(i), height: Number(r) }), (t = r), (n = i)); }, 200); return Yn("resize", fr(r), window); })(e), u = Sr(e), l = (function ({ mediaInteractionCb: e, blockClass: t, blockSelector: n, unblockSelector: r, mirror: i, sampling: o }) { const a = (a) => qn( fr((o) => { const s = gr(o); if (!s || er(s, t, n, r)) return; const { currentTime: u, volume: l, muted: c } = s; e({ type: a, id: i.getId(s), currentTime: u, volume: l, muted: c }); }), o.media || 500 ), s = [Yn("play", a(0)), Yn("pause", a(1)), Yn("seeked", a(2)), Yn("volumechange", a(3))]; return fr(() => { s.forEach((e) => e()); }); })(e), c = (function ({ styleSheetRuleCb: e, mirror: t }, { win: n }) { if (!n.CSSStyleSheet || !n.CSSStyleSheet.prototype) return () => {}; const r = n.CSSStyleSheet.prototype.insertRule; n.CSSStyleSheet.prototype.insertRule = new Proxy(r, { apply: fr((n, r, i) => { const [o, a] = i, s = t.getId(r.ownerNode); return -1 !== s && e({ id: s, adds: [{ rule: o, index: a }] }), n.apply(r, i); }), }); const i = n.CSSStyleSheet.prototype.deleteRule; n.CSSStyleSheet.prototype.deleteRule = new Proxy(i, { apply: fr((n, r, i) => { const [o] = i, a = t.getId(r.ownerNode); return -1 !== a && e({ id: a, removes: [{ index: o }] }), n.apply(r, i); }), }); const o = {}; Lr("CSSGroupingRule") ? (o.CSSGroupingRule = n.CSSGroupingRule) : (Lr("CSSMediaRule") && (o.CSSMediaRule = n.CSSMediaRule), Lr("CSSConditionRule") && (o.CSSConditionRule = n.CSSConditionRule), Lr("CSSSupportsRule") && (o.CSSSupportsRule = n.CSSSupportsRule)); const a = {}; return ( Object.entries(o).forEach(([n, r]) => { (a[n] = { insertRule: r.prototype.insertRule, deleteRule: r.prototype.deleteRule }), (r.prototype.insertRule = new Proxy(a[n].insertRule, { apply: fr((n, r, i) => { const [o, a] = i, s = t.getId(r.parentStyleSheet.ownerNode); return -1 !== s && e({ id: s, adds: [{ rule: o, index: [...Tr(r), a || 0] }] }), n.apply(r, i); }), })), (r.prototype.deleteRule = new Proxy(a[n].deleteRule, { apply: fr((n, r, i) => { const [o] = i, a = t.getId(r.parentStyleSheet.ownerNode); return -1 !== a && e({ id: a, removes: [{ index: [...Tr(r), o] }] }), n.apply(r, i); }), })); }), fr(() => { (n.CSSStyleSheet.prototype.insertRule = r), (n.CSSStyleSheet.prototype.deleteRule = i), Object.entries(o).forEach(([e, t]) => { (t.prototype.insertRule = a[e].insertRule), (t.prototype.deleteRule = a[e].deleteRule); }); }) ); })(e, { win: n }), d = (function ({ styleDeclarationCb: e, mirror: t }, { win: n }) { const r = n.CSSStyleDeclaration.prototype.setProperty; n.CSSStyleDeclaration.prototype.setProperty = new Proxy(r, { apply: fr((n, r, i) => { var o, a; const [s, u, l] = i, c = t.getId(null === (a = null === (o = r.parentRule) || void 0 === o ? void 0 : o.parentStyleSheet) || void 0 === a ? void 0 : a.ownerNode); return -1 !== c && e({ id: c, set: { property: s, value: u, priority: l }, index: Tr(r.parentRule) }), n.apply(r, i); }), }); const i = n.CSSStyleDeclaration.prototype.removeProperty; return ( (n.CSSStyleDeclaration.prototype.removeProperty = new Proxy(i, { apply: fr((n, r, i) => { var o, a; const [s] = i, u = t.getId(null === (a = null === (o = r.parentRule) || void 0 === o ? void 0 : o.parentStyleSheet) || void 0 === a ? void 0 : a.ownerNode); return -1 !== u && e({ id: u, remove: { property: s }, index: Tr(r.parentRule) }), n.apply(r, i); }), })), fr(() => { (n.CSSStyleDeclaration.prototype.setProperty = r), (n.CSSStyleDeclaration.prototype.removeProperty = i); }) ); })(e, { win: n }), h = e.collectFonts ? (function ({ fontCb: e, doc: t }) { const n = t.defaultView; if (!n) return () => {}; const r = [], i = new WeakMap(), o = n.FontFace; n.FontFace = function (e, t, n) { const r = new o(e, t, n); return i.set(r, { family: e, buffer: "string" != typeof t, descriptors: n, fontSource: "string" == typeof t ? t : JSON.stringify(Array.from(new Uint8Array(t))) }), r; }; const a = $n(t.fonts, "add", function (t) { return function (n) { return ( setTimeout(() => { const t = i.get(n); t && (e(t), i.delete(n)); }, 0), t.apply(this, [n]) ); }; }); return ( r.push(() => { n.FontFace = o; }), r.push(a), fr(() => { r.forEach((e) => e()); }) ); })(e) : () => {}, p = []; for (const t of e.plugins) p.push(t.observer(t.callback, n, t.options)); return fr(() => { _r.forEach((e) => e.reset()), r.disconnect(), i(), o(), a(), s(), u(), l(); try { c(), d(); } catch (e) {} h(), p.forEach((e) => e()); }); } function Er(e) { return void 0 !== window[e]; } function Lr(e) { return Boolean(void 0 !== window[e] && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype); } class Ar { constructor(e) { (this.iframes = new WeakMap()), (this.mutationCb = e.mutationCb); } addIframe(e) { this.iframes.set(e, !0); } addLoadListener(e) { this.loadListener = e; } attachIframe(e, t) { var n; this.mutationCb({ adds: [{ parentId: e.__sn.id, nextId: null, node: t }], removes: [], texts: [], attributes: [], isAttachIframe: !0 }), null === (n = this.loadListener) || void 0 === n || n.call(this, e); } } class Ir { constructor(e) { (this.restorePatches = []), (this.mutationCb = e.mutationCb), (this.scrollCb = e.scrollCb), (this.bypassOptions = e.bypassOptions), (this.mirror = e.mirror); const t = this; this.restorePatches.push( $n(HTMLElement.prototype, "attachShadow", function (e) { return function () { const n = e.apply(this, arguments); return this.shadowRoot && t.addShadowRoot(this.shadowRoot, this.ownerDocument), n; }; }) ); } addShadowRoot(e, t) { mr(Object.assign(Object.assign({}, this.bypassOptions), { doc: t, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), e), yr(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: e, mirror: this.mirror })); } observeAttachShadow(e) { if (e.contentWindow) { const t = this; this.restorePatches.push( $n(e.contentWindow.HTMLElement.prototype, "attachShadow", function (n) { return function () { const r = n.apply(this, arguments); return this.shadowRoot && t.addShadowRoot(this.shadowRoot, e.contentDocument), r; }; }) ); } } reset() { this.restorePatches.forEach((e) => e()); } } for (var Mr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Pr = "undefined" == typeof Uint8Array ? [] : new Uint8Array(256), Or = 0; Or < 64; Or++) Pr[Mr.charCodeAt(Or)] = Or; const kr = new Map(); const Rr = (e, t, n) => { if (!e || (!Br(e, t) && "object" != typeof e)) return; const r = (function (e, t) { let n = kr.get(e); return n || ((n = new Map()), kr.set(e, n)), n.has(t) || n.set(t, []), n.get(t); })(n, e.constructor.name); let i = r.indexOf(e); return -1 === i && ((i = r.length), r.push(e)), i; }; function Dr(e, t, n) { if (e instanceof Array) return e.map((e) => Dr(e, t, n)); if (null === e) return e; if (e instanceof Float32Array || e instanceof Float64Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Uint8Array || e instanceof Uint16Array || e instanceof Int16Array || e instanceof Int8Array || e instanceof Uint8ClampedArray) { return { rr_type: e.constructor.name, args: [Object.values(e)] }; } if (e instanceof ArrayBuffer) { const t = e.constructor.name, n = (function (e) { var t, n = new Uint8Array(e), r = n.length, i = ""; for (t = 0; t < r; t += 3) (i += Mr[n[t] >> 2]), (i += Mr[((3 & n[t]) << 4) | (n[t + 1] >> 4)]), (i += Mr[((15 & n[t + 1]) << 2) | (n[t + 2] >> 6)]), (i += Mr[63 & n[t + 2]]); return r % 3 == 2 ? (i = i.substring(0, i.length - 1) + "=") : r % 3 == 1 && (i = i.substring(0, i.length - 2) + "=="), i; })(e); return { rr_type: t, base64: n }; } if (e instanceof DataView) { return { rr_type: e.constructor.name, args: [Dr(e.buffer, t, n), e.byteOffset, e.byteLength] }; } if (e instanceof HTMLImageElement) { const t = e.constructor.name, { src: n } = e; return { rr_type: t, src: n }; } if (e instanceof ImageData) { return { rr_type: e.constructor.name, args: [Dr(e.data, t, n), e.width, e.height] }; } if (Br(e, t) || "object" == typeof e) { return { rr_type: e.constructor.name, index: Rr(e, t, n) }; } return e; } const Nr = (e, t, n) => [...e].map((e) => Dr(e, t, n)), Br = (e, t) => { const n = ["WebGLActiveInfo", "WebGLBuffer", "WebGLFramebuffer", "WebGLProgram", "WebGLRenderbuffer", "WebGLShader", "WebGLShaderPrecisionFormat", "WebGLTexture", "WebGLUniformLocation", "WebGLVertexArrayObject", "WebGLVertexArrayObjectOES"].filter((e) => "function" == typeof t[e]); return Boolean(n.find((n) => e instanceof t[n])); }; function Fr(e, t, n, r, i, o, a, s) { const u = [], l = Object.getOwnPropertyNames(e); for (const c of l) try { if ("function" != typeof e[c]) continue; const l = $n(e, c, function (u) { return function (...l) { const d = u.apply(this, l); if ((Rr(d, s, e), !er(this.canvas, r, o, i))) { a.getId(this.canvas); const r = Nr([...l], s, e), i = { type: t, property: c, args: r }; n(this.canvas, i); } return d; }; }); u.push(l); } catch (r) { const i = Kn(e, c, { set(e) { n(this.canvas, { type: t, property: c, args: [e], setter: !0 }); }, }); u.push(i); } return u; } class Ur { reset() { this.pendingCanvasMutations.clear(), this.resetObservers && this.resetObservers(); } freeze() { this.frozen = !0; } unfreeze() { this.frozen = !1; } lock() { this.locked = !0; } unlock() { this.locked = !1; } constructor(e) { (this.pendingCanvasMutations = new Map()), (this.rafStamps = { latestId: 0, invokeId: null }), (this.frozen = !1), (this.locked = !1), (this.processMutation = function (e, t) { (!(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId) && this.rafStamps.invokeId) || (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(e) || this.pendingCanvasMutations.set(e, []), this.pendingCanvasMutations.get(e).push(t); }), (this.mutationCb = e.mutationCb), (this.mirror = e.mirror), !0 === e.recordCanvas && this.initCanvasMutationObserver(e.win, e.blockClass, e.blockSelector, e.unblockSelector); } initCanvasMutationObserver(e, t, n, r) { this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher(); const i = (function (e, t, n, r) { const i = []; try { const o = $n(e.HTMLCanvasElement.prototype, "getContext", function (e) { return function (i, ...o) { return er(this, t, n, r) || "__context" in this || (this.__context = i), e.apply(this, [i, ...o]); }; }); i.push(o); } catch (e) { console.error("failed to patch HTMLCanvasElement.prototype.getContext"); } return () => { i.forEach((e) => e()); }; })(e, t, r, n), o = (function (e, t, n, r, i, o) { const a = [], s = Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype); for (const o of s) try { if ("function" != typeof t.CanvasRenderingContext2D.prototype[o]) continue; const s = $n(t.CanvasRenderingContext2D.prototype, o, function (t) { return function (...a) { return ( er(this.canvas, n, i, r) || setTimeout(() => { const t = [...a]; if ("drawImage" === o && t[0] && t[0] instanceof HTMLCanvasElement) { const e = t[0], n = e.getContext("2d"); let r = null == n ? void 0 : n.getImageData(0, 0, e.width, e.height), i = null == r ? void 0 : r.data; t[0] = JSON.stringify(i); } e(this.canvas, { type: Vn["2D"], property: o, args: t }); }, 0), t.apply(this, a) ); }; }); a.push(s); } catch (n) { const r = Kn(t.CanvasRenderingContext2D.prototype, o, { set(t) { e(this.canvas, { type: Vn["2D"], property: o, args: [t], setter: !0 }); }, }); a.push(r); } return () => { a.forEach((e) => e()); }; })(this.processMutation.bind(this), e, t, r, n, this.mirror), a = (function (e, t, n, r, i, o) { const a = []; return ( a.push(...Fr(t.WebGLRenderingContext.prototype, Vn.WebGL, e, n, r, i, o, t)), void 0 !== t.WebGL2RenderingContext && a.push(...Fr(t.WebGL2RenderingContext.prototype, Vn.WebGL2, e, n, r, i, o, t)), () => { a.forEach((e) => e()); } ); })(this.processMutation.bind(this), e, t, r, n, this.mirror); this.resetObservers = () => { i(), o(), a(); }; } startPendingCanvasMutationFlusher() { requestAnimationFrame(() => this.flushPendingCanvasMutations()); } startRAFTimestamping() { const e = (t) => { (this.rafStamps.latestId = t), requestAnimationFrame(e); }; requestAnimationFrame(e); } flushPendingCanvasMutations() { this.pendingCanvasMutations.forEach((e, t) => { const n = this.mirror.getId(t); this.flushPendingCanvasMutationFor(t, n); }), requestAnimationFrame(() => this.flushPendingCanvasMutations()); } flushPendingCanvasMutationFor(e, t) { if (this.frozen || this.locked) return; const n = this.pendingCanvasMutations.get(e); if (!n || -1 === t) return; const r = n.map((e) => { const t = (function (e, t) { var n = {}; for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (null != e && "function" == typeof Object.getOwnPropertySymbols) { var i = 0; for (r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]); } return n; })(e, ["type"]); return t; }), { type: i } = n[0]; this.mutationCb({ id: t, type: i, commands: r }), this.pendingCanvasMutations.delete(e); } } function jr(e) { return Object.assign(Object.assign({}, e), { timestamp: Date.now() }); } let Gr, Hr; const Vr = { map: {}, getId: (e) => (e && e.__sn ? e.__sn.id : -1), getNode(e) { return this.map[e] || null; }, removeNodeFromMap(e) { const t = e.__sn && e.__sn.id; delete this.map[t], e.childNodes && e.childNodes.forEach((e) => this.removeNodeFromMap(e)); }, has(e) { return this.map.hasOwnProperty(e); }, reset() { this.map = {}; }, }; function Zr(e = {}) { const { emit: t, checkoutEveryNms: n, checkoutEveryNth: r, blockClass: i = "rr-block", blockSelector: o = null, unblockSelector: a = null, ignoreClass: s = "rr-ignore", ignoreSelector: u = null, maskTextClass: l = "rr-mask", maskTextSelector: c = null, maskInputSelector: d = null, unmaskTextSelector: h = null, unmaskInputSelector: p = null, inlineStylesheet: f = !0, maskAllText: _ = !1, maskAllInputs: g, maskInputOptions: m, slimDOMOptions: v, maskInputFn: y, maskTextFn: C, hooks: b, packFn: w, sampling: S = {}, mousemoveWait: T, recordCanvas: x = !1, userTriggeredOnInput: E = !1, collectFonts: L = !1, inlineImages: A = !1, plugins: I, keepIframeSrcFn: M = () => !1, onMutation: P } = e; if (!t) throw new Error("emit function is required"); void 0 !== T && void 0 === S.mousemove && (S.mousemove = T); const O = !0 === g ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, radio: !0, checkbox: !0 } : void 0 !== m ? m : {}, k = !0 === v || "all" === v ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaVerification: !0, headMetaAuthorship: "all" === v, headMetaDescKeywords: "all" === v } : v || {}; let R; !(function (e = window) { "NodeList" in e && !e.NodeList.prototype.forEach && (e.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e && !e.DOMTokenList.prototype.forEach && (e.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = function (e) { if (!(0 in arguments)) throw new TypeError("1 argument is required"); do { if (this === e) return !0; } while ((e = e && e.parentNode)); return !1; }); })(); let D = 0; Gr = (e, i) => { var o; if ( (!(null === (o = _r[0]) || void 0 === o ? void 0 : o.isFrozen()) || e.type === jn.FullSnapshot || (e.type === jn.IncrementalSnapshot && e.data.source === Gn.Mutation) || _r.forEach((e) => e.unfreeze()), t( ((e) => { for (const t of I || []) t.eventProcessor && (e = t.eventProcessor(e)); return w && (e = w(e)), e; })(e), i ), e.type === jn.FullSnapshot) ) (R = e), (D = 0); else if (e.type === jn.IncrementalSnapshot) { if (e.data.source === Gn.Mutation && e.data.isAttachIframe) return; D++; const t = r && D >= r, i = n && e.timestamp - R.timestamp > n; (t || i) && Hr(!0); } }; const N = (e) => { Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.Mutation }, e) })); }, B = (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.Scroll }, e) })), F = (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.CanvasMutation }, e) })), U = new Ar({ mutationCb: N }), j = new Ur({ recordCanvas: x, mutationCb: F, win: window, blockClass: i, blockSelector: o, unblockSelector: a, mirror: Vr }), G = new Ir({ mutationCb: N, scrollCb: B, bypassOptions: { onMutation: P, blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: l, maskTextSelector: c, unmaskTextSelector: h, maskInputSelector: d, unmaskInputSelector: p, inlineStylesheet: f, maskAllText: _, maskInputOptions: O, maskTextFn: C, maskInputFn: y, recordCanvas: x, inlineImages: A, sampling: S, slimDOMOptions: k, iframeManager: U, canvasManager: j }, mirror: Vr }); Hr = (e = !1) => { var t, n, r, s; Gr(jr({ type: jn.Meta, data: { href: window.location.href, width: Qn(), height: Jn() } }), e), _r.forEach((e) => e.lock()); const [u, g] = (function (e, t) { const { blockClass: n = "rr-block", blockSelector: r = null, unblockSelector: i = null, maskTextClass: o = "rr-mask", maskTextSelector: a = null, unmaskTextSelector: s = null, inlineStylesheet: u = !0, inlineImages: l = !1, recordCanvas: c = !1, maskInputSelector: d = null, unmaskInputSelector: h = null, maskAllText: p = !1, maskAllInputs: f = !1, maskTextFn: _, maskInputFn: g, slimDOM: m = !1, dataURLOptions: v, preserveWhiteSpace: y, onSerialize: C, onIframeLoad: b, iframeLoadTimeout: w, keepIframeSrcFn: S = () => !1 } = t || {}, T = {}; return [Fn(e, { doc: e, map: T, blockClass: n, blockSelector: r, unblockSelector: i, maskTextClass: o, maskTextSelector: a, unmaskTextSelector: s, skipChild: !1, inlineStylesheet: u, maskInputSelector: d, unmaskInputSelector: h, maskAllText: p, maskInputOptions: !0 === f ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0 } : !1 === f ? {} : f, maskTextFn: _, maskInputFn: g, slimDOMOptions: !0 === m || "all" === m ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: "all" === m, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0 } : !1 === m ? {} : m, dataURLOptions: v, inlineImages: l, recordCanvas: c, preserveWhiteSpace: y, onSerialize: C, onIframeLoad: b, iframeLoadTimeout: w, keepIframeSrcFn: S }), T]; })(document, { blockClass: i, blockSelector: o, unblockSelector: a, maskTextClass: l, maskTextSelector: c, unmaskTextSelector: h, maskInputSelector: d, unmaskInputSelector: p, inlineStylesheet: f, maskAllText: _, maskAllInputs: O, maskTextFn: C, slimDOM: k, recordCanvas: x, inlineImages: A, onSerialize: (e) => { ir(e) && U.addIframe(e), or(e) && G.addShadowRoot(e.shadowRoot, document); }, onIframeLoad: (e, t) => { U.attachIframe(e, t), G.observeAttachShadow(e); }, keepIframeSrcFn: M, }); if (!u) return console.warn("Failed to snapshot the document"); (Vr.map = g), Gr(jr({ type: jn.FullSnapshot, data: { node: u, initialOffset: { left: void 0 !== window.pageXOffset ? window.pageXOffset : (null === document || void 0 === document ? void 0 : document.documentElement.scrollLeft) || (null === (n = null === (t = null === document || void 0 === document ? void 0 : document.body) || void 0 === t ? void 0 : t.parentElement) || void 0 === n ? void 0 : n.scrollLeft) || (null === document || void 0 === document ? void 0 : document.body.scrollLeft) || 0, top: void 0 !== window.pageYOffset ? window.pageYOffset : (null === document || void 0 === document ? void 0 : document.documentElement.scrollTop) || (null === (s = null === (r = null === document || void 0 === document ? void 0 : document.body) || void 0 === r ? void 0 : r.parentElement) || void 0 === s ? void 0 : s.scrollTop) || (null === document || void 0 === document ? void 0 : document.body.scrollTop) || 0 } } })), _r.forEach((e) => e.unlock()); }; try { const e = []; e.push( Yn("DOMContentLoaded", () => { Gr(jr({ type: jn.DomContentLoaded, data: {} })); }) ); const t = (e) => { var t; return fr(xr)({ onMutation: P, mutationCb: N, mousemoveCb: (e, t) => Gr(jr({ type: jn.IncrementalSnapshot, data: { source: t, positions: e } })), mouseInteractionCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.MouseInteraction }, e) })), scrollCb: B, viewportResizeCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.ViewportResize }, e) })), inputCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.Input }, e) })), mediaInteractionCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.MediaInteraction }, e) })), styleSheetRuleCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.StyleSheetRule }, e) })), styleDeclarationCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.StyleDeclaration }, e) })), canvasMutationCb: F, fontCb: (e) => Gr(jr({ type: jn.IncrementalSnapshot, data: Object.assign({ source: Gn.Font }, e) })), blockClass: i, ignoreClass: s, ignoreSelector: u, maskTextClass: l, maskTextSelector: c, unmaskTextSelector: h, maskInputSelector: d, unmaskInputSelector: p, maskInputOptions: O, inlineStylesheet: f, sampling: S, recordCanvas: x, inlineImages: A, userTriggeredOnInput: E, collectFonts: L, doc: e, maskAllText: _, maskInputFn: y, maskTextFn: C, blockSelector: o, unblockSelector: a, slimDOMOptions: k, mirror: Vr, iframeManager: U, shadowDomManager: G, canvasManager: j, plugins: (null === (t = null == I ? void 0 : I.filter((e) => e.observer)) || void 0 === t ? void 0 : t.map((e) => ({ observer: e.observer, options: e.options, callback: (t) => Gr(jr({ type: jn.Plugin, data: { plugin: e.name, payload: t } })) }))) || [] }, b); }; U.addLoadListener((n) => { try { e.push(t(n.contentDocument)); } catch (e) { console.warn(e); } }); const n = () => { Hr(), e.push(t(document)); }; return ( "interactive" === document.readyState || "complete" === document.readyState ? n() : e.push( Yn( "load", () => { Gr(jr({ type: jn.Load, data: {} })), n(); }, window ) ), () => { e.forEach((e) => e()); } ); } catch (e) { console.warn(e); } } function zr(e, t) { "sentry.transaction" !== t.category && (["ui.click", "ui.input"].includes(t.category) ? e.triggerUserActivity() : e.checkAndHandleExpiredSession(), e.addUpdate(() => (e.throttledAddEvent({ type: jn.Custom, timestamp: 1e3 * (t.timestamp || 0), data: { tag: "breadcrumb", payload: j(t, 10, 1e3) } }), "console" === t.category))); } (Zr.addCustomEvent = (e, t) => { if (!Gr) throw new Error("please add custom event after start recording"); Gr(jr({ type: jn.Custom, data: { tag: e, payload: t } })); }), (Zr.freezePage = () => { _r.forEach((e) => e.freeze()); }), (Zr.takeFullSnapshot = (e) => { if (!Hr) throw new Error("please take full snapshot after start recording"); Hr(e); }), (Zr.mirror = Vr); const Yr = "button,a"; function Wr(e) { const t = Xr(e); if (!(t && t instanceof Element)) return t; return t.closest(Yr) || t; } function Xr(e) { return (function (e) { return "object" == typeof e && !!e && "target" in e; })(e) ? e.target : e; } let qr; function Kr(e) { return ( qr || ((qr = []), (0, o.hl)(nn, "open", function (e) { return function (...t) { if (qr) try { qr.forEach((e) => e()); } catch (e) {} return e.apply(nn, t); }; })), qr.push(e), () => { const t = qr ? qr.indexOf(e) : -1; t > -1 && qr.splice(t, 1); } ); } class $r { __init() { this._lastMutation = 0; } __init2() { this._lastScroll = 0; } __init3() { this._clicks = []; } constructor(e, t, n = zr) { $r.prototype.__init.call(this), $r.prototype.__init2.call(this), $r.prototype.__init3.call(this), (this._timeout = t.timeout / 1e3), (this._multiClickTimeout = t.multiClickTimeout / 1e3), (this._threshold = t.threshold / 1e3), (this._scollTimeout = t.scrollTimeout / 1e3), (this._replay = e), (this._ignoreSelector = t.ignoreSelector), (this._addBreadcrumbEvent = n); } addListeners() { const e = () => { this._lastScroll = Qr(); }, t = Kr(() => { this._lastMutation = Qr(); }), n = (e) => { if (!e.target) return; const t = Wr(e); t && this._handleMultiClick(t); }, r = new MutationObserver(() => { this._lastMutation = Qr(); }); r.observe(nn.document.documentElement, { attributes: !0, characterData: !0, childList: !0, subtree: !0 }), nn.addEventListener("scroll", e, { passive: !0 }), nn.addEventListener("click", n, { passive: !0 }), (this._teardown = () => { nn.removeEventListener("scroll", e), nn.removeEventListener("click", n), t(), r.disconnect(), (this._clicks = []), (this._lastMutation = 0), (this._lastScroll = 0); }); } removeListeners() { this._teardown && this._teardown(), this._checkClickTimeout && clearTimeout(this._checkClickTimeout); } handleClick(e, t) { if ( (function (e, t) { if (!Jr.includes(e.tagName)) return !0; if ("INPUT" === e.tagName && !["submit", "button"].includes(e.getAttribute("type") || "")) return !0; if ("A" === e.tagName && (e.hasAttribute("download") || (e.hasAttribute("target") && "_self" !== e.getAttribute("target")))) return !0; if (t && e.matches(t)) return !0; return !1; })(t, this._ignoreSelector) || !(function (e) { return !(!e.data || "number" != typeof e.data.nodeId || !e.timestamp); })(e) ) return; if (this._getClick(t)) return; const n = { timestamp: e.timestamp, clickBreadcrumb: e, clickCount: 0, node: t }; this._clicks.push(n), 1 === this._clicks.length && this._scheduleCheckClicks(); } _handleMultiClick(e) { const t = this._getClick(e); t && t.clickCount++; } _getClick(e) { const t = Qr(); return this._clicks.find((n) => n.node === e && t - n.timestamp < this._multiClickTimeout); } _checkClicks() { const e = [], t = Qr(); this._clicks.forEach((n) => { !n.mutationAfter && this._lastMutation && (n.mutationAfter = n.timestamp <= this._lastMutation ? this._lastMutation - n.timestamp : void 0), !n.scrollAfter && this._lastScroll && (n.scrollAfter = n.timestamp <= this._lastScroll ? this._lastScroll - n.timestamp : void 0); const r = n.scrollAfter || n.mutationAfter || 0; ((r && r >= this._multiClickTimeout) || n.timestamp + this._timeout <= t) && e.push(n); }); for (const t of e) { this._generateBreadcrumbs(t); const e = this._clicks.indexOf(t); -1 !== e && this._clicks.splice(e, 1); } this._clicks.length && this._scheduleCheckClicks(); } _generateBreadcrumbs(e) { const t = this._replay, n = e.scrollAfter && e.scrollAfter <= this._scollTimeout, r = e.mutationAfter && e.mutationAfter <= this._threshold, i = !n && !r, { clickCount: o, clickBreadcrumb: a } = e; if (i) { const n = 1e3 * Math.min(e.mutationAfter || this._timeout, this._timeout), r = n < 1e3 * this._timeout ? "mutation" : "timeout", i = { type: "default", message: a.message, timestamp: a.timestamp, category: "ui.slowClickDetected", data: { ...a.data, url: nn.location.href, route: t.getCurrentRoute(), timeAfterClickMs: n, endReason: r, clickCount: o || 1 } }; this._addBreadcrumbEvent(t, i); } else if (o > 1) { const e = { type: "default", message: a.message, timestamp: a.timestamp, category: "ui.multiClick", data: { ...a.data, url: nn.location.href, route: t.getCurrentRoute(), clickCount: o, metric: !0 } }; this._addBreadcrumbEvent(t, e); } } _scheduleCheckClicks() { this._checkClickTimeout = setTimeout(() => this._checkClicks(), 1e3); } } const Jr = ["A", "BUTTON", "INPUT"]; function Qr() { return Date.now() / 1e3; } function ei(e) { return { timestamp: Date.now() / 1e3, type: "default", ...e }; } var ti; !(function (e) { (e[(e.Document = 0)] = "Document"), (e[(e.DocumentType = 1)] = "DocumentType"), (e[(e.Element = 2)] = "Element"), (e[(e.Text = 3)] = "Text"), (e[(e.CDATA = 4)] = "CDATA"), (e[(e.Comment = 5)] = "Comment"); })(ti || (ti = {})); const ni = new Set(["id", "class", "aria-label", "role", "name", "alt", "title", "data-test-id", "data-testid", "disabled", "aria-disabled"]); function ri(e) { const t = {}; for (const n in e) if (ni.has(n)) { let r = n; ("data-testid" !== n && "data-test-id" !== n) || (r = "testId"), (t[r] = e[n]); } return t; } const ii = (e) => (t) => { if (!e.isEnabled()) return; const n = (function (e) { const { target: t, message: n } = (function (e) { const t = "click" === e.name; let n, r = null; try { (r = t ? Wr(e.event) : Xr(e.event)), (n = (0, Ve.Rt)(r, { maxStringLength: 200 }) || ""); } catch (e) { n = ""; } return { target: r, message: n }; })(e); return ei({ category: `ui.${e.name}`, ...oi(t, n) }); })(t); if (!n) return; const r = "click" === t.name, i = r && t.event; r && e.clickDetector && i && !i.altKey && !i.metaKey && !i.ctrlKey && (function (e, t, n) { e.handleClick(t, n); })(e.clickDetector, n, Wr(t.event)), zr(e, n); }; function oi(e, t) { const n = e && (function (e) { return "__sn" in e; })(e) && e.__sn.type === ti.Element ? e.__sn : null; return { message: t, data: n ? { nodeId: n.id, node: { id: n.id, tagName: n.tagName, textContent: e ? Array.from(e.childNodes) .map((e) => "__sn" in e && e.__sn.type === ti.Text && e.__sn.textContent) .filter(Boolean) .map((e) => e.trim()) .join("") : "", attributes: ri(n.attributes), }, } : {}, }; } function ai(e, t) { if (!e.isEnabled()) return; e.updateUserActivity(); const n = (function (e) { const { metaKey: t, shiftKey: n, ctrlKey: r, altKey: i, key: o, target: a } = e; if ( !a || (function (e) { return "INPUT" === e.tagName || "TEXTAREA" === e.tagName || e.isContentEditable; })(a) || !o ) return null; const s = t || r || i, u = 1 === o.length; if (!s && u) return null; const l = (0, Ve.Rt)(a, { maxStringLength: 200 }) || "", c = oi(a, l); return ei({ category: "ui.keyDown", message: l, data: { ...c.data, metaKey: t, shiftKey: n, ctrlKey: r, altKey: i, key: o } }); })(t); n && zr(e, n); } const si = ["name", "type", "startTime", "transferSize", "duration"]; function ui(e) { return function (t) { return si.every((n) => e[n] === t[n]); }; } function li(e) { const t = new PerformanceObserver((t) => { const n = (function (e, t) { const [n, r, i] = e.reduce((e, t) => ("navigation" === t.entryType ? e[0].push(t) : "largest-contentful-paint" === t.entryType ? e[1].push(t) : e[2].push(t), e), [[], [], []]), o = [], a = []; let s = r.length ? r[r.length - 1] : void 0; return ( t.forEach((e) => { if ("largest-contentful-paint" !== e.entryType) if ("navigation" !== e.entryType) o.push(e); else { const t = e; e.duration > 0 && !n.find(ui(t)) && !a.find(ui(t)) && a.push(t); } else (!s || s.startTime < e.startTime) && (s = e); }), [...(s ? [s] : []), ...n, ...i, ...o, ...a].sort((e, t) => e.startTime - t.startTime) ); })(e.performanceEvents, t.getEntries()); e.performanceEvents = n; }); return ( ["element", "event", "first-input", "largest-contentful-paint", "layout-shift", "longtask", "navigation", "paint", "resource"].forEach((e) => { try { t.observe({ type: e, buffered: !0 }); } catch (e) {} }), t ); } const ci = '/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_outi+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_watern&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindexi&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindexi&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<>>=p,c-=p),c<15&&(f+=z[a++]<>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a>3,a-=k,c-=k<<3,f&=(1<{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whavexe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});'; function di(e) { return e > 9999999999 ? e : 1e3 * e; } class hi extends Error { constructor() { super("Event buffer exceeded maximum size of 20000000."); } } class pi { __init() { this._totalSize = 0; } constructor() { pi.prototype.__init.call(this), (this.events = []); } get hasEvents() { return this.events.length > 0; } get type() { return "sync"; } destroy() { this.events = []; } async addEvent(e) { const t = JSON.stringify(e).length; if (((this._totalSize += t), this._totalSize > ln)) throw new hi(); this.events.push(e); } finish() { return new Promise((e) => { const t = this.events; this.clear(), e(JSON.stringify(t)); }); } clear() { (this.events = []), (this._totalSize = 0); } getEarliestTimestamp() { const e = this.events.map((e) => e.timestamp).sort()[0]; return e ? di(e) : null; } } class fi { constructor(e) { (this._worker = e), (this._id = 0); } ensureReady() { return ( this._ensureReadyPromise || (this._ensureReadyPromise = new Promise((e, t) => { this._worker.addEventListener( "message", ({ data: n }) => { n.success ? e() : t(); }, { once: !0 } ), this._worker.addEventListener( "error", (e) => { t(e); }, { once: !0 } ); })), this._ensureReadyPromise ); } destroy() { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Destroying compression worker"), this._worker.terminate(); } postMessage(e, t) { const n = this._getAndIncrementId(); return new Promise((r, i) => { const o = ({ data: t }) => { const a = t; if (a.method === e && a.id === n) { if ((this._worker.removeEventListener("message", o), !a.success)) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay]", a.response), void i(new Error("Error in compression worker")); r(a.response); } }; this._worker.addEventListener("message", o), this._worker.postMessage({ id: n, method: e, arg: t }); }); } _getAndIncrementId() { return this._id++; } } class _i { __init() { this._totalSize = 0; } constructor(e) { _i.prototype.__init.call(this), (this._worker = new fi(e)), (this._earliestTimestamp = null); } get hasEvents() { return !!this._earliestTimestamp; } get type() { return "worker"; } ensureReady() { return this._worker.ensureReady(); } destroy() { this._worker.destroy(); } addEvent(e) { const t = di(e.timestamp); (!this._earliestTimestamp || t < this._earliestTimestamp) && (this._earliestTimestamp = t); const n = JSON.stringify(e); return (this._totalSize += n.length), this._totalSize > ln ? Promise.reject(new hi()) : this._sendEventToWorker(n); } finish() { return this._finishRequest(); } clear() { (this._earliestTimestamp = null), (this._totalSize = 0), this._worker.postMessage("clear"); } getEarliestTimestamp() { return this._earliestTimestamp; } _sendEventToWorker(e) { return this._worker.postMessage("addEvent", e); } async _finishRequest() { const e = await this._worker.postMessage("finish"); return (this._earliestTimestamp = null), (this._totalSize = 0), e; } } class gi { constructor(e) { (this._fallback = new pi()), (this._compression = new _i(e)), (this._used = this._fallback), (this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded()); } get type() { return this._used.type; } get hasEvents() { return this._used.hasEvents; } destroy() { this._fallback.destroy(), this._compression.destroy(); } clear() { return this._used.clear(); } getEarliestTimestamp() { return this._used.getEarliestTimestamp(); } addEvent(e) { return this._used.addEvent(e); } async finish() { return await this.ensureWorkerIsLoaded(), this._used.finish(); } ensureWorkerIsLoaded() { return this._ensureWorkerIsLoadedPromise; } async _ensureWorkerIsLoaded() { try { await this._compression.ensureReady(); } catch (e) { return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Failed to load the compression worker, falling back to simple buffer")); } await this._switchToCompressionWorker(); } async _switchToCompressionWorker() { const { events: e } = this._fallback, t = []; for (const n of e) t.push(this._compression.addEvent(n)); this._used = this._compression; try { await Promise.all(t); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("[Replay] Failed to add events when switching buffers.", e); } } } function mi({ useCompression: e }) { if (e && window.Worker) try { const e = (function () { const e = new Blob([ci]); return URL.createObjectURL(e); })(); ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Using compression worker"); const t = new Worker(e); return new gi(t); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Failed to create compression worker"); } return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Using simple buffer"), new pi(); } function vi() { return "sessionStorage" in nn && !!nn.sessionStorage; } function yi(e) { !(function () { if (!vi()) return; try { nn.sessionStorage.removeItem(rn); } catch (e) {} })(), (e.session = void 0); } function Ci(e, t, n = +new Date()) { return null === e || void 0 === t || t < 0 || (0 !== t && e + t <= n); } function bi(e, t, n = +new Date()) { return Ci(e.started, t.maxSessionLife, n) || Ci(e.lastActivity, t.sessionIdleExpire, n); } function wi(e) { return void 0 !== e && Math.random() < e; } function Si(e) { if (vi()) try { nn.sessionStorage.setItem(rn, JSON.stringify(e)); } catch (e) {} } function Ti(e) { const t = Date.now(); return { id: e.id || (0, l.DM)(), started: e.started || t, lastActivity: e.lastActivity || t, segmentId: e.segmentId || 0, sampled: e.sampled, shouldRefresh: !0 }; } function xi({ sessionSampleRate: e, allowBuffering: t, stickySession: n = !1 }) { const r = (function (e, t) { return wi(e) ? "session" : !!t && "buffer"; })(e, t), i = Ti({ sampled: r }); return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Replay] Creating new session: ${i.id}`), n && Si(i), i; } function Ei({ timeouts: e, currentSession: t, stickySession: n, sessionSampleRate: r, allowBuffering: i }) { const o = t || (n && (function () { if (!vi()) return null; try { const e = nn.sessionStorage.getItem(rn); return e ? Ti(JSON.parse(e)) : null; } catch (e) { return null; } })()); if (o) { if (!bi(o, e) || (i && o.shouldRefresh)) return { type: "saved", session: o }; if (!o.shouldRefresh) { return { type: "new", session: Ti({ sampled: !1 }) }; } ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Session has expired"); } return { type: "new", session: xi({ stickySession: n, sessionSampleRate: r, allowBuffering: i }) }; } async function Li(e, t, n) { if (!e.eventBuffer) return null; if (e.isPaused()) return null; if (di(t.timestamp) + e.timeouts.sessionIdlePause < Date.now()) return null; try { n && e.eventBuffer.clear(); const r = e.getOptions(), i = "function" == typeof r.beforeAddRecordingEvent && (function (e) { return e.type === jn.Custom; })(t) ? r.beforeAddRecordingEvent(t) : t; if (!i) return; return await e.eventBuffer.addEvent(i); } catch (t) { const n = t && t instanceof hi ? "addEventSizeExceeded" : "addEvent"; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error(t), await e.stop(n); const r = (0, g.Gd)().getClient(); r && r.recordDroppedEvent("internal_sdk_error", "replay"); } } function Ai(e) { return !e.type; } function Ii(e) { return "transaction" === e.type; } function Mi(e) { const t = (function () { const e = (0, g.Gd)().getClient(); if (!e) return !1; const t = e.getTransport(); if (!t) return !1; return t.send.__sentry__baseTransport__ || !1; })(); return (n, r) => { if (!Ai(n) && !Ii(n)) return; const i = r && r.statusCode; (t && (!i || i < 200 || i >= 300)) || (Ii(n) && n.contexts && n.contexts.trace && n.contexts.trace.trace_id ? e.getContext().traceIds.add(n.contexts.trace.trace_id) : Ai(n) && (n.event_id && e.getContext().errorIds.add(n.event_id), "buffer" === e.recordingMode && n.tags && n.tags.replayId && setTimeout(() => { e.sendBufferedReplayOrFlush(); }))); }; } function Pi(e, t = !1) { const n = t ? Mi(e) : void 0; return (t, r) => { if ( (function (e) { return "replay_event" === e.type; })(t) ) return delete t.breadcrumbs, t; if (!Ai(t) && !Ii(t)) return t; if ( (function (e, t) { return !(e.type || !e.exception || !e.exception.values || !e.exception.values.length) && (!(!t.originalException || !t.originalException.__rrweb__) || e.exception.values.some((e) => !!(e.stacktrace && e.stacktrace.frames && e.stacktrace.frames.length) && e.stacktrace.frames.some((e) => e.filename && e.filename.includes("/rrweb/src/")))); })(t, r) && !e.getOptions()._experiments.captureExceptions ) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Ignoring error from rrweb internals", t), null; const i = (function (e, t) { return "buffer" === e.recordingMode && t.message !== an && !(!t.exception || t.type) && wi(e.getOptions().errorSampleRate); })(e, t); return (i || "session" === e.recordingMode) && (t.tags = { ...t.tags, replayId: e.getSessionId() }), n && n(t, { statusCode: 200 }), t; }; } function Oi(e, t) { return t.map(({ type: t, start: n, end: r, name: i, data: o }) => { const a = e.throttledAddEvent({ type: jn.Custom, timestamp: n, data: { tag: "performanceSpan", payload: { op: t, description: i, startTimestamp: n, endTimestamp: r, data: o } } }); return "string" == typeof a ? Promise.resolve(null) : a; }); } function ki(e) { return (t) => { if (!e.isEnabled()) return; const n = (function (e) { const { from: t, to: n } = e, r = Date.now() / 1e3; return { type: "navigation.push", start: r, end: r, name: n, data: { previous: t } }; })(t); null !== n && (e.getContext().urls.push(n.name), e.triggerUserActivity(), e.addUpdate(() => (Oi(e, [n]), !1))); }; } function Ri(e, t) { return ( (("undefined" != typeof __SENTRY_DEBUG__ && !__SENTRY_DEBUG__) || !e.getOptions()._experiments.traceInternals) && (function (e) { const t = (0, g.Gd)().getClient(), n = t && t.getDsn(); return !!n && e.includes(n.host); })(t) ); } function Di(e, t) { e.isEnabled() && null !== t && (Ri(e, t.name) || e.addUpdate(() => (Oi(e, [t]), !0))); } function Ni(e) { return (t) => { if (!e.isEnabled()) return; const n = (function (e) { const { startTimestamp: t, endTimestamp: n, xhr: r } = e, i = r[He.xU]; if (!t || !n || !i) return null; const { method: o, url: a, status_code: s } = i; return void 0 === a ? null : { type: "resource.xhr", name: a, start: t / 1e3, end: n / 1e3, data: { method: o, statusCode: s } }; })(t); Di(e, n); }; } const Bi = 10, Fi = 11, Ui = 12, ji = 13, Gi = 14, Hi = 15, Vi = 20, Zi = 21, zi = 22, Yi = 23, Wi = ["true", "false", "null"]; function Xi(e, t) { if (!t.length) return e; let n = e; const r = t.length - 1; n = (function (e, t) { switch (t) { case Bi: return `${e}"~~":"~~"`; case Fi: return `${e}:"~~"`; case Ui: return `${e}~~":"~~"`; case ji: return (function (e) { const t = e.lastIndexOf(":"), n = e.slice(t + 1); if (Wi.includes(n.trim())) return `${e},"~~":"~~"`; return `${e.slice(0, t + 1)}"~~"`; })(e); case Gi: return `${e}~~"`; case Hi: return `${e},"~~":"~~"`; case Vi: return `${e}"~~"`; case Zi: return (function (e) { const t = (function (e) { for (let t = e.length - 1; t >= 0; t--) { const n = e[t]; if ("," === n || "[" === n) return t; } return -1; })(e); if (t > -1) { const n = e.slice(t + 1); return Wi.includes(n.trim()) ? `${e},"~~"` : `${e.slice(0, t + 1)}"~~"`; } return e; })(e); case zi: return `${e}~~"`; case Yi: return `${e},"~~"`; } return e; })(n, t[r]); for (let e = r; e >= 0; e--) { switch (t[e]) { case Bi: n = `${n}}`; break; case Vi: n = `${n}]`; } } return n; } function qi(e, t, n) { const r = e[e.length - 1], i = t[n]; if (!/\s/.test(i)) if ('"' !== i || Ki(t, n)) switch (i) { case "{": !(function (e, t) { if (!t) return void e.push(Bi); if (t === ji) return void e.push(Bi); t === Zi && e.push(Bi); if (t === Vi) e.push(Bi); })(e, r); break; case "[": !(function (e, t) { if (!t) return e.push(Vi), void e.push(Zi); if (t === ji) return e.push(Vi), void e.push(Zi); t === Zi && (e.push(Vi), e.push(Zi)); if (t === Vi) e.push(Vi), e.push(Zi); })(e, r); break; case ":": !(function (e, t) { t === Fi && (e.pop(), e.push(ji)); })(e, r); break; case ",": !(function (e, t) { if (t === ji) return void e.pop(); if (t === Hi) return e.pop(), void e.pop(); if (t === Zi) return; if (t === Yi) e.pop(); })(e, r); break; case "}": !(function (e, t) { t === Bi && e.pop(); t === ji && (e.pop(), e.pop()); t === Hi && (e.pop(), e.pop(), e.pop()); e[e.length - 1] === ji && e.push(Hi); e[e.length - 1] === Zi && e.push(Yi); })(e, r); break; case "]": !(function (e, t) { t === Vi && e.pop(); t === Zi && (e.pop(), e.pop()); t === Yi && (e.pop(), e.pop(), e.pop()); e[e.length - 1] === ji && e.push(Hi); e[e.length - 1] === Zi && e.push(Yi); })(e, r); } else !(function (e, t) { if (t === Gi) return e.pop(), void e.push(Hi); if (t === zi) return e.pop(), void e.push(Yi); if (t === ji) return void e.push(Gi); if (t === Zi) return void e.push(zi); if (t === Bi) return void e.push(Ui); if (t === Ui) e.pop(), e.push(Fi); })(e, r); } function Ki(e, t) { return "\\" === e[t - 1] && !Ki(e, t - 1); } function $i(e) { return Xi( e, (function (e) { const t = []; for (let n = 0; n < e.length; n++) qi(t, e, n); return t; })(e) ); } function Ji(e, t) { if (e) try { if ("string" == typeof e) return t.encode(e).length; if (e instanceof URLSearchParams) return t.encode(e.toString()).length; if (e instanceof FormData) { const n = oo(e); return t.encode(n).length; } if (e instanceof Blob) return e.size; if (e instanceof ArrayBuffer) return e.byteLength; } catch (e) {} } function Qi(e) { if (!e) return; const t = parseInt(e, 10); return isNaN(t) ? void 0 : t; } function eo(e) { return "string" == typeof e ? e : e instanceof URLSearchParams ? e.toString() : e instanceof FormData ? oo(e) : void 0; } function to(e, t) { if (!t) return null; const { startTimestamp: n, endTimestamp: r, url: i, method: a, statusCode: s, request: u, response: l } = t; return { type: e, start: n / 1e3, end: r / 1e3, name: i, data: (0, o.Jr)({ method: a, statusCode: s, request: u, response: l }) }; } function no(e) { return { headers: {}, size: e, _meta: { warnings: ["URL_SKIPPED"] } }; } function ro(e, t, n) { if (!t && 0 === Object.keys(e).length) return; if (!t) return { headers: e }; if (!n) return { headers: e, size: t }; const r = { headers: e, size: t }, { body: i, warnings: o } = (function (e) { if (!e || "string" != typeof e) return { body: e, warnings: [] }; const t = e.length > sn; if ( (function (e) { const t = e[0], n = e[e.length - 1]; return ("[" === t && "]" === n) || ("{" === t && "}" === n); })(e) ) try { const n = t ? $i(e.slice(0, sn)) : e; return { body: JSON.parse(n), warnings: t ? ["JSON_TRUNCATED"] : [] }; } catch (n) { return { body: t ? `${e.slice(0, sn)}…` : e, warnings: t ? ["INVALID_JSON", "TEXT_TRUNCATED"] : ["INVALID_JSON"] }; } return { body: t ? `${e.slice(0, sn)}…` : e, warnings: t ? ["TEXT_TRUNCATED"] : [] }; })(n); return (r.body = i), o.length > 0 && (r._meta = { warnings: o }), r; } function io(e, t) { return Object.keys(e).reduce((n, r) => { const i = r.toLowerCase(); return t.includes(i) && e[r] && (n[i] = e[r]), n; }, {}); } function oo(e) { return new URLSearchParams(e).toString(); } function ao(e, t) { const n = (function (e, t = nn.document.baseURI) { if (e.startsWith("http://") || e.startsWith("https://") || e.startsWith(nn.location.origin)) return e; const n = new URL(e, t); if (n.origin !== new URL(t).origin) return e; const r = n.href; if (!e.endsWith("/") && r.endsWith("/")) return r.slice(0, -1); return r; })(e); return (0, c.U0)(n, t); } async function so(e, t, n) { try { const r = await (async function (e, t, n) { const { startTimestamp: r, endTimestamp: i } = t, { url: o, method: a, status_code: s = 0, request_body_size: u, response_body_size: l } = e.data, c = ao(o, n.networkDetailAllowUrls), d = c ? (function ({ networkCaptureBodies: e, networkRequestHeaders: t }, n, r) { const i = (function (e, t) { if (1 === e.length && "string" != typeof e[0]) return co(e[0], t); if (2 === e.length) return co(e[1], t); return {}; })(n, t); if (!e) return ro(i, r, void 0); const o = eo(uo(n)); return ro(i, r, o); })(n, t.input, u) : no(u), h = await (async function (e, { networkCaptureBodies: t, textEncoder: n, networkResponseHeaders: r }, i, o) { if (!e && void 0 !== o) return no(o); const a = lo(i.headers, r); if (!t && void 0 !== o) return ro(a, o, void 0); try { const r = i.clone(), s = await (async function (e) { try { return await e.text(); } catch (e) { return; } })(r), u = s && s.length && void 0 === o ? Ji(s, n) : o; return e ? ro(a, u, t ? s : void 0) : no(u); } catch (e) { return ro(a, o, void 0); } })(c, n, t.response, l); return { startTimestamp: r, endTimestamp: i, url: o, method: a, statusCode: s, request: d, response: h }; })(e, t, n), i = to("resource.fetch", r); Di(n.replay, i); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay] Failed to capture fetch breadcrumb", e); } } function uo(e = []) { if (2 === e.length && "object" == typeof e[1]) return e[1].body; } function lo(e, t) { const n = {}; return ( t.forEach((t) => { e.get(t) && (n[t] = e.get(t)); }), n ); } function co(e, t) { if (!e) return {}; const n = e.headers; return n ? (n instanceof Headers ? lo(n, t) : Array.isArray(n) ? {} : io(n, t)) : {}; } async function ho(e, t, n) { try { const r = (function (e, t, n) { const { startTimestamp: r, endTimestamp: i, input: o, xhr: a } = t, { url: s, method: u, status_code: l = 0, request_body_size: c, response_body_size: d } = e.data; if (!s) return null; if (!ao(s, n.networkDetailAllowUrls)) { return { startTimestamp: r, endTimestamp: i, url: s, method: u, statusCode: l, request: no(c), response: no(d) }; } const h = a[He.xU], p = h ? io(h.request_headers, n.networkRequestHeaders) : {}, f = io( (function (e) { const t = e.getAllResponseHeaders(); if (!t) return {}; return t.split("\r\n").reduce((e, t) => { const [n, r] = t.split(": "); return (e[n.toLowerCase()] = r), e; }, {}); })(a), n.networkResponseHeaders ), _ = ro(p, c, n.networkCaptureBodies ? eo(o) : void 0), g = ro(f, d, n.networkCaptureBodies ? t.xhr.responseText : void 0); return { startTimestamp: r, endTimestamp: i, url: s, method: u, statusCode: l, request: _, response: g }; })(e, t, n), i = to("resource.xhr", r); Di(n.replay, i); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay] Failed to capture fetch breadcrumb", e); } } function po(e) { const t = (0, g.Gd)().getClient(); try { const n = new TextEncoder(), { networkDetailAllowUrls: r, networkCaptureBodies: i, networkRequestHeaders: o, networkResponseHeaders: a } = e.getOptions(), s = { replay: e, textEncoder: n, networkDetailAllowUrls: r, networkCaptureBodies: i, networkRequestHeaders: o, networkResponseHeaders: a }; t && t.on ? t.on("beforeAddBreadcrumb", (e, t) => (function (e, t, n) { if (!t.data) return; try { (function (e) { return "xhr" === e.category; })(t) && (function (e) { return e && e.xhr; })(n) && (!(function (e, t, n) { const { xhr: r, input: i } = t, o = Ji(i, n.textEncoder), a = r.getResponseHeader("content-length") ? Qi(r.getResponseHeader("content-length")) : Ji(r.response, n.textEncoder); void 0 !== o && (e.data.request_body_size = o), void 0 !== a && (e.data.response_body_size = a); })(t, n, e), ho(t, n, e)), (function (e) { return "fetch" === e.category; })(t) && (function (e) { return e && e.response; })(n) && (!(function (e, t, n) { const { input: r, response: i } = t, o = Ji(uo(r), n.textEncoder), a = i ? Qi(i.headers.get("content-length")) : void 0; void 0 !== o && (e.data.request_body_size = o), void 0 !== a && (e.data.response_body_size = a); })(t, n, e), so(t, n, e)); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("Error when enriching network breadcrumb"); } })(s, e, t) ) : ((0, He.oq)( "fetch", (function (e) { return (t) => { if (!e.isEnabled()) return; const n = (function (e) { const { startTimestamp: t, endTimestamp: n, fetchData: r, response: i } = e; if (!n) return null; const { method: o, url: a } = r; return { type: "resource.fetch", start: t / 1e3, end: n / 1e3, name: a, data: { method: o, statusCode: i ? i.status : void 0 } }; })(t); Di(e, n); }; })(e) ), (0, He.oq)("xhr", Ni(e))); } catch (e) {} } let fo = null; const _o = (e) => (t) => { if (!e.isEnabled()) return; const n = (function (e) { const t = e.getLastBreadcrumb && e.getLastBreadcrumb(); if (fo === t || !t) return null; if ( ((fo = t), !(function (e) { return !!e.category; })(t) || ["fetch", "xhr", "sentry.event", "sentry.transaction"].includes(t.category) || t.category.startsWith("ui.")) ) return null; if ("console" === t.category) return (function (e) { const t = e.data && e.data.arguments; if (!Array.isArray(t) || 0 === t.length) return ei(e); let n = !1; const r = t.map((e) => { if (!e) return e; if ("string" == typeof e) return e.length > un ? ((n = !0), `${e.slice(0, un)}…`) : e; if ("object" == typeof e) try { const t = j(e, 7), r = JSON.stringify(t); if (r.length > un) { const e = $i(r.slice(0, un)), t = JSON.parse(e); return (n = !0), t; } return t; } catch (e) {} return e; }); return ei({ ...e, data: { ...e.data, arguments: r, ...(n ? { _meta: { warnings: ["CONSOLE_ARG_TRUNCATED"] } } : {}) } }); })(t); return ei(t); })(t); n && zr(e, n); }; function go(e) { return !(!e || !e.on); } function mo(e) { const { jsHeapSizeLimit: t, totalJSHeapSize: n, usedJSHeapSize: r } = e, i = Date.now() / 1e3; return { type: "memory", name: "memory", start: i, end: i, data: { memory: { jsHeapSizeLimit: t, totalJSHeapSize: n, usedJSHeapSize: r } } }; } const vo = { resource: function (e) { const { entryType: t, initiatorType: n, name: r, responseEnd: i, startTime: o, decodedBodySize: a, encodedBodySize: s, responseStatus: u, transferSize: l } = e; if (["fetch", "xmlhttprequest"].includes(n)) return null; return { type: `${t}.${n}`, start: Co(o), end: Co(i), name: r, data: { size: l, statusCode: u, decodedBodySize: a, encodedBodySize: s } }; }, paint: function (e) { const { duration: t, entryType: n, name: r, startTime: i } = e, o = Co(i); return { type: n, name: r, start: o, end: o + t, data: void 0 }; }, navigation: function (e) { const { entryType: t, name: n, decodedBodySize: r, duration: i, domComplete: o, encodedBodySize: a, domContentLoadedEventStart: s, domContentLoadedEventEnd: u, domInteractive: l, loadEventStart: c, loadEventEnd: d, redirectCount: h, startTime: p, transferSize: f, type: _ } = e; if (0 === i) return null; return { type: `${t}.${_}`, start: Co(p), end: Co(o), name: n, data: { size: f, decodedBodySize: r, encodedBodySize: a, duration: i, domInteractive: l, domContentLoadedEventStart: s, domContentLoadedEventEnd: u, loadEventStart: c, loadEventEnd: d, domComplete: o, redirectCount: h } }; }, "largest-contentful-paint": function (e) { const { entryType: t, startTime: n, size: r } = e; let i = 0; if (nn.performance) { const e = nn.performance.getEntriesByType("navigation")[0]; i = (e && e.activationStart) || 0; } const o = Math.max(n - i, 0), a = Co(i) + o / 1e3; return { type: t, name: t, start: a, end: a, data: { value: o, size: r, nodeId: Zr.mirror.getId(e.element) } }; }, }; function yo(e) { return void 0 === vo[e.entryType] ? null : vo[e.entryType](e); } function Co(e) { return ((Se.Z1 || nn.performance.timeOrigin) + e) / 1e3; } function bo(e) { let t = !1; return (n, r) => { if (!e.checkAndHandleExpiredSession()) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("[Replay] Received replay event after session expired.")); const i = r || !t; (t = !0), e.addUpdate(() => { if (("buffer" === e.recordingMode && i && e.setInitialState(), Li(e, n, i), !i)) return !1; if ( ((function (e, t) { if (!t || !e.session || 0 !== e.session.segmentId) return Promise.resolve(null); Li( e, (function (e) { const t = e.getOptions(); return { type: jn.Custom, timestamp: Date.now(), data: { tag: "options", payload: { sessionSampleRate: t.sessionSampleRate, errorSampleRate: t.errorSampleRate, useCompressionOption: t.useCompression, blockAllMedia: t.blockAllMedia, maskAllText: t.maskAllText, maskAllInputs: t.maskAllInputs, useCompression: !!e.eventBuffer && "worker" === e.eventBuffer.type, networkDetailHasUrls: t.networkDetailAllowUrls.length > 0, networkCaptureBodies: t.networkCaptureBodies, networkRequestHasHeaders: t.networkRequestHeaders.length > 0, networkResponseHasHeaders: t.networkResponseHeaders.length > 0 } } }; })(e), !1 ); })(e, i), e.session && e.session.previousSessionId) ) return !0; if ("buffer" === e.recordingMode && e.session && e.eventBuffer) { const t = e.eventBuffer.getEarliestTimestamp(); t && ((e.session.started = t), e.getOptions().stickySession && Si(e.session)); } return "session" === e.recordingMode && e.flush(), !0; }); }; } async function wo({ recordingData: e, replayId: t, segmentId: n, eventContext: r, timestamp: i, session: o }) { const a = (function ({ recordingData: e, headers: t }) { let n; const r = `${JSON.stringify(t)}\n`; if ("string" == typeof e) n = `${r}${e}`; else { const t = new TextEncoder().encode(r); (n = new Uint8Array(t.length + e.length)), n.set(t), n.set(e, t.length); } return n; })({ recordingData: e, headers: { segment_id: n } }), { urls: s, errorIds: l, traceIds: c, initialTimestamp: d } = r, h = (0, g.Gd)(), p = h.getClient(), f = h.getScope(), _ = p && p.getTransport(), m = p && p.getDsn(); if (!(p && _ && m && o.sampled)) return; const v = { type: on, replay_start_timestamp: d / 1e3, timestamp: i / 1e3, error_ids: l, trace_ids: c, urls: s, replay_id: t, segment_id: n, replay_type: o.sampled }, y = await (async function ({ client: e, scope: t, replayId: n, event: r }) { const i = "object" != typeof e._integrations || null === e._integrations || Array.isArray(e._integrations) ? void 0 : Object.keys(e._integrations), o = await xe(e.getOptions(), r, { event_id: n, integrations: i }, t); if (!o) return null; o.platform = o.platform || "javascript"; const a = e.getSdkMetadata && e.getSdkMetadata(), { name: s, version: u } = (a && a.sdk) || {}; return (o.sdk = { ...o.sdk, name: s || "sentry.javascript.unknown", version: u || "0.0.0" }), o; })({ scope: f, client: p, replayId: t, event: v }); if (!y) return p.recordDroppedEvent("event_processor", "replay", v), void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("An event processor returned `null`, will not send event.")); const C = (function (e, t, n, r) { return V(J(e, $(e), r, n), [ [{ type: "replay_event" }, e], [{ type: "replay_recording", length: "string" == typeof t ? new TextEncoder().encode(t).length : t.length }, t], ]); })(y, a, m, p.getOptions().tunnel); let b; try { b = await _.send(C); } catch (e) { const t = new Error(an); try { t.cause = e; } catch (e) {} throw t; } if (!b) return b; if ("number" == typeof b.statusCode && (b.statusCode < 200 || b.statusCode >= 300)) throw new So(b.statusCode); return b; } class So extends Error { constructor(e) { super(`Transport returned status code ${e}`); } } async function To(e, t = { count: 0, interval: 5e3 }) { const { recordingData: n, options: r } = e; if (n.length) try { return await wo(e), !0; } catch (n) { if (n instanceof So) throw n; if ((w("Replays", { _retryCount: t.count }), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r._experiments && r._experiments.captureExceptions && m(n), t.count >= 3)) { const e = new Error(`${an} - max retries exceeded`); try { e.cause = n; } catch (e) {} throw e; } return ( (t.interval *= ++t.count), new Promise((n, r) => { setTimeout(async () => { try { await To(e, t), n(!0); } catch (e) { r(e); } }, t.interval); }) ); } } const xo = "__THROTTLED"; function Eo(e, t, n) { const r = new Map(); let i = !1; return (...o) => { const a = Math.floor(Date.now() / 1e3); if ( (((e) => { const t = e - n; r.forEach((e, n) => { n < t && r.delete(n); }); })(a), [...r.values()].reduce((e, t) => e + t, 0) >= t) ) { const e = i; return (i = !0), e ? "__SKIPPED" : xo; } i = !1; const s = r.get(a) || 0; return r.set(a, s + 1), e(...o); }; } class Lo { __init() { this.eventBuffer = null; } __init2() { this.performanceEvents = []; } __init3() { this.recordingMode = "session"; } __init4() { this.timeouts = { sessionIdlePause: 3e5, sessionIdleExpire: 9e5, maxSessionLife: 36e5 }; } __init5() { this._performanceObserver = null; } __init6() { this._flushLock = null; } __init7() { this._lastActivity = Date.now(); } __init8() { this._isEnabled = !1; } __init9() { this._isPaused = !1; } __init10() { this._hasInitializedCoreListeners = !1; } __init11() { this._stopRecording = null; } __init12() { this._context = { errorIds: new Set(), traceIds: new Set(), urls: [], initialTimestamp: Date.now(), initialUrl: "" }; } constructor({ options: e, recordingOptions: t }) { Lo.prototype.__init.call(this), Lo.prototype.__init2.call(this), Lo.prototype.__init3.call(this), Lo.prototype.__init4.call(this), Lo.prototype.__init5.call(this), Lo.prototype.__init6.call(this), Lo.prototype.__init7.call(this), Lo.prototype.__init8.call(this), Lo.prototype.__init9.call(this), Lo.prototype.__init10.call(this), Lo.prototype.__init11.call(this), Lo.prototype.__init12.call(this), Lo.prototype.__init13.call(this), Lo.prototype.__init14.call(this), Lo.prototype.__init15.call(this), Lo.prototype.__init16.call(this), Lo.prototype.__init17.call(this), Lo.prototype.__init18.call(this), (this._recordingOptions = t), (this._options = e), (this._debouncedFlush = (function (e, t, n) { let r, i, o; const a = n && n.maxWait ? Math.max(n.maxWait, t) : 0; function s() { return u(), (r = e()), r; } function u() { void 0 !== i && clearTimeout(i), void 0 !== o && clearTimeout(o), (i = o = void 0); } function l() { return i && clearTimeout(i), (i = setTimeout(s, t)), a && void 0 === o && (o = setTimeout(s, a)), r; } return ( (l.cancel = u), (l.flush = function () { return void 0 !== i || void 0 !== o ? s() : r; }), l ); })(() => this._flush(), this._options.flushMinDelay, { maxWait: this._options.flushMaxDelay })), (this._throttledAddEvent = Eo((e, t) => Li(this, e, t), 300, 5)); const { slowClickTimeout: n, slowClickIgnoreSelectors: r } = this.getOptions(), i = n ? { threshold: Math.min(3e3, n), timeout: n, scrollTimeout: 300, ignoreSelector: r ? r.join(",") : "", multiClickTimeout: 1e3 } : void 0; i && (this.clickDetector = new $r(this, i)); } getContext() { return this._context; } isEnabled() { return this._isEnabled; } isPaused() { return this._isPaused; } getOptions() { return this._options; } initializeSampling() { const { errorSampleRate: e, sessionSampleRate: t } = this._options; if (e <= 0 && t <= 0) return; this._loadAndCheckSession() && (this.session ? (this.session.sampled && "session" !== this.session.sampled && (this.recordingMode = "buffer"), this._initializeRecording()) : this._handleException(new Error("Unable to initialize and create session"))); } start() { if (this._isEnabled && "session" === this.recordingMode) throw new Error("Replay recording is already in progress"); if (this._isEnabled && "buffer" === this.recordingMode) throw new Error("Replay buffering is in progress, call `flush()` to save the replay"); const e = this.session && this.session.id, { session: t } = Ei({ timeouts: this.timeouts, stickySession: Boolean(this._options.stickySession), currentSession: this.session, sessionSampleRate: 1, allowBuffering: !1 }); (t.previousSessionId = e), (this.session = t), this._initializeRecording(); } startBuffering() { if (this._isEnabled) throw new Error("Replay recording is already in progress"); const e = this.session && this.session.id, { session: t } = Ei({ timeouts: this.timeouts, stickySession: Boolean(this._options.stickySession), currentSession: this.session, sessionSampleRate: 0, allowBuffering: !0 }); (t.previousSessionId = e), (this.session = t), (this.recordingMode = "buffer"), this._initializeRecording(); } startRecording() { try { this._stopRecording = Zr({ ...this._recordingOptions, ...("buffer" === this.recordingMode && { checkoutEveryNms: 6e4 }), emit: bo(this), onMutation: this._onMutationHandler }); } catch (e) { this._handleException(e); } } stopRecording() { try { return this._stopRecording && (this._stopRecording(), (this._stopRecording = void 0)), !0; } catch (e) { return this._handleException(e), !1; } } async stop(e) { if (this._isEnabled) try { if ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) { const t = "[Replay] Stopping Replay" + (e ? ` triggered by ${e}` : ""); (this.getOptions()._experiments.traceInternals ? console.warn : u.kg.log)(t); } (this._isEnabled = !1), this._removeListeners(), this.stopRecording(), this._debouncedFlush.cancel(), "session" === this.recordingMode && (await this._flush({ force: !0 })), this.eventBuffer && this.eventBuffer.destroy(), (this.eventBuffer = null), yi(this); } catch (e) { this._handleException(e); } } pause() { (this._isPaused = !0), this.stopRecording(); } resume() { this._loadAndCheckSession() && ((this._isPaused = !1), this.startRecording()); } async sendBufferedReplayOrFlush({ continueRecording: e = !0 } = {}) { if ("session" === this.recordingMode) return this.flushImmediate(); const t = Date.now(); await this.flushImmediate(); const n = this.stopRecording(); e && n && ((this.recordingMode = "session"), this.session && ((this.session.shouldRefresh = !1), this._updateUserActivity(t), this._updateSessionActivity(t), (this.session.started = t), this._maybeSaveSession()), this.startRecording()); } addUpdate(e) { const t = e(); "buffer" !== this.recordingMode && !0 !== t && this._debouncedFlush(); } triggerUserActivity() { if ((this._updateUserActivity(), this._stopRecording)) this.checkAndHandleExpiredSession(), this._updateSessionActivity(); else { if (!this._loadAndCheckSession()) return; this.resume(); } } updateUserActivity() { this._updateUserActivity(), this._updateSessionActivity(); } conditionalFlush() { return "buffer" === this.recordingMode ? Promise.resolve() : this.flushImmediate(); } flush() { return this._debouncedFlush(); } flushImmediate() { return this._debouncedFlush(), this._debouncedFlush.flush(); } cancelFlush() { this._debouncedFlush.cancel(); } getSessionId() { return this.session && this.session.id; } checkAndHandleExpiredSession() { const e = this.getSessionId(); if (this._lastActivity && Ci(this._lastActivity, this.timeouts.sessionIdlePause) && this.session && "session" === this.session.sampled) return void this.pause(); if (!this._loadAndCheckSession()) return; return e === this.getSessionId() || (this._triggerFullSnapshot(), !1); } setInitialState() { const e = `${nn.location.pathname}${nn.location.hash}${nn.location.search}`, t = `${nn.location.origin}${e}`; (this.performanceEvents = []), this._clearContext(), (this._context.initialUrl = t), (this._context.initialTimestamp = Date.now()), this._context.urls.push(t); } throttledAddEvent(e, t) { const n = this._throttledAddEvent(e, t); if (n === xo) { const e = ei({ category: "replay.throttled" }); this.addUpdate(() => { Li(this, { type: jn.Custom, timestamp: e.timestamp || 0, data: { tag: "breadcrumb", payload: e, metric: !0 } }); }); } return n; } getCurrentRoute() { const e = this.lastTransaction || (0, g.Gd)().getScope().getTransaction(); if (e && ["route", "custom"].includes(e.metadata.source)) return e.name; } _initializeRecording() { this.setInitialState(), this._updateSessionActivity(), (this.eventBuffer = mi({ useCompression: this._options.useCompression })), this._removeListeners(), this._addListeners(), (this._isEnabled = !0), this.startRecording(); } _handleException(e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay]", e), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && this._options._experiments && this._options._experiments.captureExceptions && m(e); } _loadAndCheckSession() { const { type: e, session: t } = Ei({ timeouts: this.timeouts, stickySession: Boolean(this._options.stickySession), currentSession: this.session, sessionSampleRate: this._options.sessionSampleRate, allowBuffering: this._options.errorSampleRate > 0 || "buffer" === this.recordingMode }); "new" === e && this.setInitialState(); const n = this.getSessionId(); return t.id !== n && (t.previousSessionId = n), (this.session = t), !!this.session.sampled || (this.stop("session unsampled"), !1); } _addListeners() { try { nn.document.addEventListener("visibilitychange", this._handleVisibilityChange), nn.addEventListener("blur", this._handleWindowBlur), nn.addEventListener("focus", this._handleWindowFocus), nn.addEventListener("keydown", this._handleKeyboardEvent), this.clickDetector && this.clickDetector.addListeners(), this._hasInitializedCoreListeners || (!(function (e) { const t = (0, g.Gd)().getScope(), n = (0, g.Gd)().getClient(); t && t.addScopeListener(_o(e)), (0, He.oq)("dom", ii(e)), (0, He.oq)("history", ki(e)), po(e), (0, ue.c)(Pi(e, !go(n))), go(n) && (n.on("afterSendEvent", Mi(e)), n.on("createDsc", (t) => { const n = e.getSessionId(); n && e.isEnabled() && "session" === e.recordingMode && (t.replay_id = n); }), n.on("startTransaction", (t) => { e.lastTransaction = t; }), n.on("finishTransaction", (t) => { e.lastTransaction = t; })); })(this), (this._hasInitializedCoreListeners = !0)); } catch (e) { this._handleException(e); } "PerformanceObserver" in nn && (this._performanceObserver = li(this)); } _removeListeners() { try { nn.document.removeEventListener("visibilitychange", this._handleVisibilityChange), nn.removeEventListener("blur", this._handleWindowBlur), nn.removeEventListener("focus", this._handleWindowFocus), nn.removeEventListener("keydown", this._handleKeyboardEvent), this.clickDetector && this.clickDetector.removeListeners(), this._performanceObserver && (this._performanceObserver.disconnect(), (this._performanceObserver = null)); } catch (e) { this._handleException(e); } } __init13() { this._handleVisibilityChange = () => { "visible" === nn.document.visibilityState ? this._doChangeToForegroundTasks() : this._doChangeToBackgroundTasks(); }; } __init14() { this._handleWindowBlur = () => { const e = ei({ category: "ui.blur" }); this._doChangeToBackgroundTasks(e); }; } __init15() { this._handleWindowFocus = () => { const e = ei({ category: "ui.focus" }); this._doChangeToForegroundTasks(e); }; } __init16() { this._handleKeyboardEvent = (e) => { ai(this, e); }; } _doChangeToBackgroundTasks(e) { if (!this.session) return; const t = bi(this.session, this.timeouts); e && !t && this._createCustomBreadcrumb(e), this.conditionalFlush(); } _doChangeToForegroundTasks(e) { if (!this.session) return; this.checkAndHandleExpiredSession() ? e && this._createCustomBreadcrumb(e) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Document has become active, but session has expired"); } _triggerFullSnapshot(e = !0) { try { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Replay] Taking full rrweb snapshot"), Zr.takeFullSnapshot(e); } catch (e) { this._handleException(e); } } _updateUserActivity(e = Date.now()) { this._lastActivity = e; } _updateSessionActivity(e = Date.now()) { this.session && ((this.session.lastActivity = e), this._maybeSaveSession()); } _createCustomBreadcrumb(e) { this.addUpdate(() => { this.throttledAddEvent({ type: jn.Custom, timestamp: e.timestamp || 0, data: { tag: "breadcrumb", payload: e } }); }); } _addPerformanceEntries() { const e = [...this.performanceEvents]; return ( (this.performanceEvents = []), Promise.all( Oi( this, (function (e) { return e.map(yo).filter(Boolean); })(e) ) ) ); } _clearContext() { this._context.errorIds.clear(), this._context.traceIds.clear(), (this._context.urls = []); } _updateInitialTimestampFromEventBuffer() { const { session: e, eventBuffer: t } = this; if (!e || !t) return; if (e.segmentId) return; const n = t.getEarliestTimestamp(); n && n < this._context.initialTimestamp && (this._context.initialTimestamp = n); } _popEventContext() { const e = { initialTimestamp: this._context.initialTimestamp, initialUrl: this._context.initialUrl, errorIds: Array.from(this._context.errorIds), traceIds: Array.from(this._context.traceIds), urls: this._context.urls }; return this._clearContext(), e; } async _runFlush() { if (this.session && this.eventBuffer) { if ( (await this._addPerformanceEntries(), this.eventBuffer && this.eventBuffer.hasEvents && (await (async function (e) { try { return Promise.all(Oi(e, [mo(nn.performance.memory)])); } catch (e) { return []; } })(this), this.eventBuffer)) ) try { this._updateInitialTimestampFromEventBuffer(); const e = await this.eventBuffer.finish(), t = this.session.id, n = this._popEventContext(), r = this.session.segmentId++; this._maybeSaveSession(), await To({ replayId: t, recordingData: e, segmentId: r, eventContext: n, session: this.session, options: this.getOptions(), timestamp: Date.now() }); } catch (e) { this._handleException(e), this.stop("sendReplay"); const t = (0, g.Gd)().getClient(); t && t.recordDroppedEvent("send_error", "replay"); } } else ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay] No session or eventBuffer found to flush."); } __init17() { this._flush = async ({ force: e = !1 } = {}) => { if (this._isEnabled || e) if (this.checkAndHandleExpiredSession()) if (this.session) { if ((this._debouncedFlush.cancel(), !this._flushLock)) return (this._flushLock = this._runFlush()), await this._flushLock, void (this._flushLock = null); try { await this._flushLock; } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error(e); } finally { this._debouncedFlush(); } } else ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay] No session found to flush."); else ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.error("[Replay] Attempting to finish replay event after session expired."); }; } _maybeSaveSession() { this.session && this._options.stickySession && Si(this.session); } __init18() { this._onMutationHandler = (e) => { const t = e.length, n = this._options.mutationLimit, r = n && t > n; if (t > this._options.mutationBreadcrumbLimit || r) { const e = ei({ category: "replay.mutations", data: { count: t, limit: r } }); this._createCustomBreadcrumb(e); } return !r || (this.stop("mutationLimit"), !1); }; } } function Ao(e, t, n, r) { const i = [...e, ...("string" == typeof r ? r.split(",") : []), ...t]; return void 0 !== n && ("string" == typeof n && i.push(`.${n}`), console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")), i.join(","); } function Io({ mask: e, unmask: t, block: n, unblock: r, ignore: i, blockClass: o, blockSelector: a, maskTextClass: s, maskTextSelector: u, ignoreClass: l }) { const c = Ao(e, [".sentry-mask", "[data-sentry-mask]"], s, u), d = Ao(t, [".sentry-unmask", "[data-sentry-unmask]"]), h = { maskTextSelector: c, unmaskTextSelector: d, maskInputSelector: c, unmaskInputSelector: d, blockSelector: Ao(n, [".sentry-block", "[data-sentry-block]", 'base[href="/"]'], o, a), unblockSelector: Ao(r, [".sentry-unblock", "[data-sentry-unblock]"]), ignoreSelector: Ao(i, [".sentry-ignore", "[data-sentry-ignore]", 'input[type="file"]'], l) }; return o instanceof RegExp && (h.blockClass = o), s instanceof RegExp && (h.maskTextClass = s), h; } function Mo() { return "undefined" != typeof window && (!(0, tn.KV)() || ("undefined" != typeof process && "renderer" === process.type)); } const Po = 'img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]', Oo = ["content-length", "content-type", "accept"]; let ko = !1; class Ro { static __initStatic() { this.id = "Replay"; } __init() { this.name = Ro.id; } constructor({ flushMinDelay: e = 5e3, flushMaxDelay: t = 5500, stickySession: n = !0, useCompression: r = !0, _experiments: i = {}, sessionSampleRate: o, errorSampleRate: a, maskAllText: s = !0, maskAllInputs: u = !0, blockAllMedia: l = !0, mutationBreadcrumbLimit: c = 750, mutationLimit: d = 1e4, slowClickTimeout: h = 7e3, slowClickIgnoreSelectors: p = [], networkDetailAllowUrls: f = [], networkCaptureBodies: _ = !0, networkRequestHeaders: g = [], networkResponseHeaders: m = [], mask: v = [], unmask: y = [], block: C = [], unblock: b = [], ignore: w = [], maskFn: S, beforeAddRecordingEvent: T, blockClass: x, blockSelector: E, maskInputOptions: L, maskTextClass: A, maskTextSelector: I, ignoreClass: M } = {}) { if ((Ro.prototype.__init.call(this), (this._recordingOptions = { maskAllInputs: u, maskAllText: s, maskInputOptions: { ...(L || {}), password: !0 }, maskTextFn: S, maskInputFn: S, ...Io({ mask: v, unmask: y, block: C, unblock: b, ignore: w, blockClass: x, blockSelector: E, maskTextClass: A, maskTextSelector: I, ignoreClass: M }), slimDOMOptions: "all", inlineStylesheet: !0, inlineImages: !1, collectFonts: !0 }), (this._initialOptions = { flushMinDelay: e, flushMaxDelay: t, stickySession: n, sessionSampleRate: o, errorSampleRate: a, useCompression: r, blockAllMedia: l, maskAllInputs: u, maskAllText: s, mutationBreadcrumbLimit: c, mutationLimit: d, slowClickTimeout: h, slowClickIgnoreSelectors: p, networkDetailAllowUrls: f, networkCaptureBodies: _, networkRequestHeaders: Do(g), networkResponseHeaders: Do(m), beforeAddRecordingEvent: T, _experiments: i }), "number" == typeof o && (console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${o} })`), (this._initialOptions.sessionSampleRate = o)), "number" == typeof a && (console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`), (this._initialOptions.errorSampleRate = a)), this._initialOptions.blockAllMedia && (this._recordingOptions.blockSelector = this._recordingOptions.blockSelector ? `${this._recordingOptions.blockSelector},${Po}` : Po), this._isInitialized && Mo())) throw new Error("Multiple Sentry Session Replay instances are not supported"); this._isInitialized = !0; } get _isInitialized() { return ko; } set _isInitialized(e) { ko = e; } setupOnce() { Mo() && (this._setup(), setTimeout(() => this._initialize())); } start() { this._replay && this._replay.start(); } startBuffering() { this._replay && this._replay.startBuffering(); } stop() { return this._replay ? this._replay.stop() : Promise.resolve(); } flush(e) { return this._replay && this._replay.isEnabled() ? this._replay.sendBufferedReplayOrFlush(e) : Promise.resolve(); } getReplayId() { if (this._replay && this._replay.isEnabled()) return this._replay.getSessionId(); } _initialize() { this._replay && this._replay.initializeSampling(); } _setup() { const e = (function (e) { const t = (0, g.Gd)().getClient(), n = t && t.getOptions(), r = { sessionSampleRate: 0, errorSampleRate: 0, ...(0, o.Jr)(e) }; if (!n) return console.warn("SDK client is not available."), r; null == e.sessionSampleRate && null == e.errorSampleRate && null == n.replaysSessionSampleRate && null == n.replaysOnErrorSampleRate && console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."); "number" == typeof n.replaysSessionSampleRate && (r.sessionSampleRate = n.replaysSessionSampleRate); "number" == typeof n.replaysOnErrorSampleRate && (r.errorSampleRate = n.replaysOnErrorSampleRate); return r; })(this._initialOptions); this._replay = new Lo({ options: e, recordingOptions: this._recordingOptions }); } } function Do(e) { return [...Oo, ...e.map((e) => e.toLowerCase())]; } Ro.__initStatic(); var No = n(2922), Bo = n(79900); const Fo = 100, Uo = 5e3, jo = 36e5; function Go(e, t) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.info(`[Offline]: ${e}`, t); } function Ho(e) { return (t) => { const n = e(t), r = t.createStore ? t.createStore(t) : void 0; let i, o = Uo; function a(e, n, r) { return (i = ["replay_event", "replay_recording", "client_report"]), !z(e, (e, t) => i.includes(t)) && (!t.shouldStore || t.shouldStore(e, n, r)); var i; } function s(e) { r && (i && clearTimeout(i), (i = setTimeout(async () => { i = void 0; const e = await r.pop(); e && (Go("Attempting to send previously queued event"), l(e).catch((e) => { Go("Failed to retry sending", e); })); }, e)), "number" != typeof i && i.unref && i.unref()); } function u() { i || (s(o), (o = Math.min(2 * o, jo))); } async function l(e) { try { const t = await n.send(e); let r = Fo; if (t) if (t.headers && t.headers["retry-after"]) r = ee(t.headers["retry-after"]); else if ((t.statusCode || 0) >= 400) return t; return s(r), (o = Uo), t; } catch (t) { if (r && (await a(e, t, o))) return await r.insert(e), u(), Go("Error sending. Event queued", t), {}; throw t; } } return t.flushAtStartup && u(), { send: l, flush: (e) => n.flush(e) }; }; } function Vo(e) { return new Promise((t, n) => { (e.oncomplete = e.onsuccess = () => t(e.result)), (e.onabort = e.onerror = () => n(e.error)); }); } function Zo(e) { return Vo(e.getAllKeys()); } function zo(e) { let t; function n() { return ( null == t && (t = (function (e, t) { const n = indexedDB.open(e); n.onupgradeneeded = () => n.result.createObjectStore(t); const r = Vo(n); return (e) => r.then((n) => e(n.transaction(t, "readwrite").objectStore(t))); })(e.dbName || "sentry-offline", e.storeName || "queue")), t ); } return { insert: async (t) => { try { const r = await W(t, e.textEncoder); await (function (e, t, n) { return e((e) => Zo(e).then((r) => { if (!(r.length >= n)) return e.put(t, Math.max(...r, 0) + 1), Vo(e.transaction); }) ); })(n(), r, e.maxQueueSize || 30); } catch (e) {} }, pop: async () => { try { const t = await (function (e) { return e((e) => Zo(e).then((t) => { if (0 !== t.length) return Vo(e.get(t[0])).then((n) => (e.delete(t[0]), Vo(e.transaction).then(() => n))); }) ); })(n()); if (t) return (function (e, t, n) { let r = "string" == typeof e ? t.encode(e) : e; function i(e) { const t = r.subarray(0, e); return (r = r.subarray(e + 1)), t; } function o() { let e = r.indexOf(10); return e < 0 && (e = r.length), JSON.parse(n.decode(i(e))); } const a = o(), s = []; for (; r.length; ) { const e = o(), t = "number" == typeof e.length ? e.length : void 0; s.push([e, t ? i(t) : o()]); } return [a, s]; })(t, e.textEncoder || new TextEncoder(), e.textDecoder || new TextDecoder()); } catch (e) {} }, }; } function Yo(e) { return (function (e) { return (t) => e({ ...t, createStore: zo }); })(Ho(e)); } const Wo = 1e6, Xo = String(0), qo = "main"; let Ko = "", $o = "", Jo = "", Qo = (_e.navigator && _e.navigator.userAgent) || "", ea = ""; const ta = (_e.navigator && _e.navigator.language) || (_e.navigator && _e.navigator.languages && _e.navigator.languages[0]) || ""; const na = _e.navigator && _e.navigator.userAgentData; var ra; function ia(e) { return (function (e) { return !("thread_metadata" in e); })(e) ? (function (e) { let t, n = 0; const r = { samples: [], stacks: [], frames: [], thread_metadata: { [Xo]: { name: qo } } }; if (!e.samples.length) return r; const i = e.samples[0].timestamp; for (let o = 0; o < e.samples.length; o++) { const a = e.samples[o]; if (void 0 === a.stackId) { void 0 === t && ((t = n), (r.stacks[t] = []), n++), (r.samples[o] = { elapsed_since_start_ns: ((a.timestamp - i) * Wo).toFixed(0), stack_id: t, thread_id: Xo }); continue; } let s = e.stacks[a.stackId]; const u = []; for (; s; ) { u.push(s.frameId); const t = e.frames[s.frameId]; void 0 === r.frames[s.frameId] && (r.frames[s.frameId] = { function: t.name, file: t.resourceId ? e.resources[t.resourceId] : void 0, line: t.line, column: t.column }), (s = void 0 === s.parentId ? void 0 : e.stacks[s.parentId]); } const l = { elapsed_since_start_ns: ((a.timestamp - i) * Wo).toFixed(0), stack_id: n, thread_id: Xo }; (r.stacks[n] = u), (r.samples[o] = l), n++; } return r; })(e) : e; } function oa(e, t, n) { if ("transaction" !== e.type) throw new TypeError("Profiling events may only be attached to transactions, this should never occur."); if (null == t) throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${t} instead.`); const r = (function (e) { const t = e && e.contexts && e.contexts.trace && e.contexts.trace.trace_id; return "string" == typeof t && 32 !== t.length && ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Profiling] Invalid traceId: ${t} on profiled event`), "string" != typeof t ? "" : t; })(e), i = ia(t), o = "number" == typeof e.start_timestamp ? 1e3 * e.start_timestamp : Date.now(), a = "number" == typeof e.timestamp ? 1e3 * e.timestamp : Date.now(); return { event_id: n, timestamp: new Date(o).toISOString(), platform: "javascript", version: "1", release: e.release || "", environment: e.environment || Te.J, runtime: { name: "javascript", version: _e.navigator.userAgent }, os: { name: Ko, version: $o, build_number: Qo }, device: { locale: ta, model: ea, manufacturer: Qo, architecture: Jo, is_emulator: !1 }, debug_meta: { images: sa(t.resources) }, profile: i, transactions: [{ name: e.transaction || "", id: e.event_id || (0, l.DM)(), trace_id: r, active_thread_id: Xo, relative_start_ns: "0", relative_end_ns: (1e6 * (a - o)).toFixed(0) }] }; } "object" == typeof (ra = na) && null !== ra && "getHighEntropyValues" in ra && na .getHighEntropyValues(["architecture", "model", "platform", "platformVersion", "fullVersionList"]) .then((e) => { if (((Ko = e.platform || ""), (Jo = e.architecture || ""), (ea = e.model || ""), ($o = e.platformVersion || ""), e.fullVersionList && e.fullVersionList.length > 0)) { const t = e.fullVersionList[e.fullVersionList.length - 1]; Qo = `${t.brand} ${t.version}`; } }) .catch((e) => {}); const aa = new WeakMap(); function sa(e) { const t = fe.n2._sentryDebugIds; if (!t) return []; const n = (0, g.Gd)(); if (!n) return []; const r = n.getClient(); if (!r) return []; const i = r.getOptions(); if (!i) return []; const o = i.stackParser; if (!o) return []; let a; const s = aa.get(o); s ? (a = s) : ((a = new Map()), aa.set(o, a)); const u = Object.keys(t).reduce((e, n) => { let r; const i = a.get(n); i ? (r = i) : ((r = o(n)), a.set(n, r)); for (let i = r.length - 1; i >= 0; i--) { const o = r[i], a = o && o.filename; if (o && a) { e[a] = t[n]; break; } } return e; }, {}), l = []; for (const t of e) t && u[t] && l.push({ type: "sourcemap", code_file: t, debug_id: u[t] }); return l; } function ua(e, t, n) { return (function (e) { return e.samples.length < 2 ? (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Discarding profile because it contains less than 2 samples"), !1) : !!e.frames.length || (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Discarding profile because it contains no frames"), !1); })(t) ? oa(n, t, e) : null; } const la = new Map(); const ca = 3e4; let da = !1; function ha(e) { return e ? pa(e) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Transaction is undefined, skipping profiling"), e); } function pa(e) { const t = _e.Profiler; if ("function" != typeof t) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."), e; if (da) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Profiling has been disabled for the duration of the current user session."), e; const n = (0, g.Gd)().getClient(), r = n && n.getOptions(); if (!r) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Profiling disabled, no options found."), e; const i = r.profilesSampleRate; if (!(("number" != typeof (o = i) && "boolean" != typeof o) || ("number" == typeof o && isNaN(o)) ? (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`), 0) : !0 === o || !1 === o || !(o < 0 || o > 1) || (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${o}.`), 0))) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.warn("[Profiling] Discarding profile because of invalid sample rate."), e; var o; if (!i) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"), e; if (!(!0 === i || Math.random() < i)) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(i)})`), e; const a = Math.floor(ca / 10); let s; try { s = new t({ sampleInterval: 10, maxBufferSize: a }); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && (u.kg.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."), u.kg.log("[Profiling] Disabling profiling for current user session.")), (da = !0); } if (!s) return e; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Profiling] started profiling transaction: ${e.name || e.description}`); const c = (0, l.DM)(); async function d() { if (!e) return null; if (!s) return null; const t = e.startChild({ description: "profiler.stop", op: "profiler" }); return s .stop() .then( (n) => ( t.finish(), h && (_e.clearTimeout(h), (h = void 0)), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Profiling] stopped profiling of transaction: ${e.name || e.description}`), n ? ((function (e, t) { if ((la.set(e, t), la.size > 30)) { const e = la.keys().next().value; la.delete(e); } })(c, n), null) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Profiling] profiler returned null profile for: ${e.name || e.description}`, "this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"), null) ) ) .catch((e) => (t.finish(), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] error while stopping profiler:", e), null)); } let h = _e.setTimeout(() => { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] max profile duration elapsed, stopping profiling for:", e.name || e.description), d(); }, ca); const p = e.finish.bind(e); return ( (e.finish = function () { return e ? (d().then( () => { e.setContext("profile", { profile_id: c }), p(); }, () => { p(); } ), e) : p(); }), e ); } class fa { constructor() { fa.prototype.__init.call(this), fa.prototype.__init2.call(this); } __init() { this.name = "BrowserProfilingIntegration"; } __init2() { this.getCurrentHub = void 0; } setupOnce(e, t) { this.getCurrentHub = t; const n = this.getCurrentHub().getClient(); n && "function" == typeof n.on ? (n.on("startTransaction", (e) => { pa(e); }), n.on("beforeEnvelope", (e) => { if (!la.size) return; const t = (function (e) { const t = []; return ( z(e, (e, n) => { if ("transaction" === n) for (let n = 1; n < e.length; n++) { const r = e[n]; r && r.contexts && r.contexts.profile && r.contexts.profile.profile_id && t.push(e[n]); } }), t ); })(e); if (!t.length) return; const n = []; for (const e of t) { const t = e && e.contexts, r = t && t.profile && t.profile.profile_id; if (!r) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log("[Profiling] cannot find profile for a transaction without a profile context"); continue; } t && t.profile && delete t.profile; const i = la.get(r); if (!i) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.kg.log(`[Profiling] Could not retrieve profile for transaction: ${r}`); continue; } la.delete(r); const o = ua(r, i, e); o && n.push(o); } !(function (e, t) { if (!t.length) return e; for (const n of t) e[1].push([{ type: "profile" }, n]); })(e, n); })) : u.kg.warn("[Profiling] Client does not support hooks, profiling will be disabled"); } } let _a = {}; _e.Sentry && _e.Sentry.Integrations && (_a = _e.Sentry.Integrations); const ga = { ..._a, ...r, ...i }; }, 66417: (e, t, n) => { "use strict"; n.d(t, { J: () => r }); const r = "production"; }, 66465: (e, t, n) => { "use strict"; n.d(t, { Gd: () => _, Xb: () => h, cu: () => p, pj: () => f, vi: () => v }); var r = n(63699), i = n(7790), o = n(58536), a = n(90063), s = n(66417), u = n(51877), l = n(48364); const c = 4, d = 100; class h { constructor(e, t = new u.s(), n = c) { (this._version = n), (this._stack = [{ scope: t }]), e && this.bindClient(e); } isOlderThan(e) { return this._version < e; } bindClient(e) { (this.getStackTop().client = e), e && e.setupIntegrations && e.setupIntegrations(); } pushScope() { const e = u.s.clone(this.getScope()); return this.getStack().push({ client: this.getClient(), scope: e }), e; } popScope() { return !(this.getStack().length <= 1) && !!this.getStack().pop(); } withScope(e) { const t = this.pushScope(); try { e(t); } finally { this.popScope(); } } getClient() { return this.getStackTop().client; } getScope() { return this.getStackTop().scope; } getStack() { return this._stack; } getStackTop() { return this._stack[this._stack.length - 1]; } captureException(e, t) { const n = (this._lastEventId = t && t.event_id ? t.event_id : (0, r.DM)()), i = new Error("Sentry syntheticException"); return ( this._withClient((r, o) => { r.captureException(e, { originalException: e, syntheticException: i, ...t, event_id: n }, o); }), n ); } captureMessage(e, t, n) { const i = (this._lastEventId = n && n.event_id ? n.event_id : (0, r.DM)()), o = new Error(e); return ( this._withClient((r, a) => { r.captureMessage(e, t, { originalException: e, syntheticException: o, ...n, event_id: i }, a); }), i ); } captureEvent(e, t) { const n = t && t.event_id ? t.event_id : (0, r.DM)(); return ( e.type || (this._lastEventId = n), this._withClient((r, i) => { r.captureEvent(e, { ...t, event_id: n }, i); }), n ); } lastEventId() { return this._lastEventId; } addBreadcrumb(e, t) { const { scope: n, client: r } = this.getStackTop(); if (!r) return; const { beforeBreadcrumb: a = null, maxBreadcrumbs: s = d } = (r.getOptions && r.getOptions()) || {}; if (s <= 0) return; const u = { timestamp: (0, i.yW)(), ...e }, l = a ? (0, o.Cf)(() => a(u, t)) : u; null !== l && (r.emit && r.emit("beforeAddBreadcrumb", l, t), n.addBreadcrumb(l, s)); } setUser(e) { this.getScope().setUser(e); } setTags(e) { this.getScope().setTags(e); } setExtras(e) { this.getScope().setExtras(e); } setTag(e, t) { this.getScope().setTag(e, t); } setExtra(e, t) { this.getScope().setExtra(e, t); } setContext(e, t) { this.getScope().setContext(e, t); } configureScope(e) { const { scope: t, client: n } = this.getStackTop(); n && e(t); } run(e) { const t = f(this); try { e(this); } finally { f(t); } } getIntegration(e) { const t = this.getClient(); if (!t) return null; try { return t.getIntegration(e); } catch (t) { return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && o.kg.warn(`Cannot retrieve integration ${e.id} from the current Hub`), null; } } startTransaction(e, t) { const n = this._callExtensionMethod("startTransaction", e, t); return ("undefined" != typeof __SENTRY_DEBUG__ && !__SENTRY_DEBUG__) || n || console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"), n; } traceHeaders() { return this._callExtensionMethod("traceHeaders"); } captureSession(e = !1) { if (e) return this.endSession(); this._sendSessionUpdate(); } endSession() { const e = this.getStackTop().scope, t = e.getSession(); t && (0, l.RJ)(t), this._sendSessionUpdate(), e.setSession(); } startSession(e) { const { scope: t, client: n } = this.getStackTop(), { release: r, environment: i = s.J } = (n && n.getOptions()) || {}, { userAgent: o } = a.n2.navigator || {}, u = (0, l.Hv)({ release: r, environment: i, user: t.getUser(), ...(o && { userAgent: o }), ...e }), c = t.getSession && t.getSession(); return c && "ok" === c.status && (0, l.CT)(c, { status: "exited" }), this.endSession(), t.setSession(u), u; } shouldSendDefaultPii() { const e = this.getClient(), t = e && e.getOptions(); return Boolean(t && t.sendDefaultPii); } _sendSessionUpdate() { const { scope: e, client: t } = this.getStackTop(), n = e.getSession(); n && t && t.captureSession && t.captureSession(n); } _withClient(e) { const { scope: t, client: n } = this.getStackTop(); n && e(n, t); } _callExtensionMethod(e, ...t) { const n = p().__SENTRY__; if (n && n.extensions && "function" == typeof n.extensions[e]) return n.extensions[e].apply(this, t); ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && o.kg.warn(`Extension method ${e} couldn't be found, doing nothing.`); } } function p() { return (a.n2.__SENTRY__ = a.n2.__SENTRY__ || { extensions: {}, hub: void 0 }), a.n2; } function f(e) { const t = p(), n = v(t); return y(t, e), n; } function _() { const e = p(); if (e.__SENTRY__ && e.__SENTRY__.acs) { const t = e.__SENTRY__.acs.getCurrentHub(); if (t) return t; } return g(e); } function g(e = p()) { return (m(e) && !v(e).isOlderThan(c)) || y(e, new h()), v(e); } function m(e) { return !!(e && e.__SENTRY__ && e.__SENTRY__.hub); } function v(e) { return (0, a.YO)("hub", () => new h(), e); } function y(e, t) { if (!e) return !1; return ((e.__SENTRY__ = e.__SENTRY__ || {}).hub = t), !0; } }, 51877: (e, t, n) => { "use strict"; n.d(t, { c: () => h, s: () => c }); var r = n(81757), i = n(7790), o = n(97946), a = n(58536), s = n(63699), u = n(90063), l = n(48364); class c { constructor() { (this._notifyingListeners = !1), (this._scopeListeners = []), (this._eventProcessors = []), (this._breadcrumbs = []), (this._attachments = []), (this._user = {}), (this._tags = {}), (this._extra = {}), (this._contexts = {}), (this._sdkProcessingMetadata = {}); } static clone(e) { const t = new c(); return e && ((t._breadcrumbs = [...e._breadcrumbs]), (t._tags = { ...e._tags }), (t._extra = { ...e._extra }), (t._contexts = { ...e._contexts }), (t._user = e._user), (t._level = e._level), (t._span = e._span), (t._session = e._session), (t._transactionName = e._transactionName), (t._fingerprint = e._fingerprint), (t._eventProcessors = [...e._eventProcessors]), (t._requestSession = e._requestSession), (t._attachments = [...e._attachments]), (t._sdkProcessingMetadata = { ...e._sdkProcessingMetadata })), t; } addScopeListener(e) { this._scopeListeners.push(e); } addEventProcessor(e) { return this._eventProcessors.push(e), this; } setUser(e) { return (this._user = e || {}), this._session && (0, l.CT)(this._session, { user: e }), this._notifyScopeListeners(), this; } getUser() { return this._user; } getRequestSession() { return this._requestSession; } setRequestSession(e) { return (this._requestSession = e), this; } setTags(e) { return (this._tags = { ...this._tags, ...e }), this._notifyScopeListeners(), this; } setTag(e, t) { return (this._tags = { ...this._tags, [e]: t }), this._notifyScopeListeners(), this; } setExtras(e) { return (this._extra = { ...this._extra, ...e }), this._notifyScopeListeners(), this; } setExtra(e, t) { return (this._extra = { ...this._extra, [e]: t }), this._notifyScopeListeners(), this; } setFingerprint(e) { return (this._fingerprint = e), this._notifyScopeListeners(), this; } setLevel(e) { return (this._level = e), this._notifyScopeListeners(), this; } setTransactionName(e) { return (this._transactionName = e), this._notifyScopeListeners(), this; } setContext(e, t) { return null === t ? delete this._contexts[e] : (this._contexts[e] = t), this._notifyScopeListeners(), this; } setSpan(e) { return (this._span = e), this._notifyScopeListeners(), this; } getSpan() { return this._span; } getTransaction() { const e = this.getSpan(); return e && e.transaction; } setSession(e) { return e ? (this._session = e) : delete this._session, this._notifyScopeListeners(), this; } getSession() { return this._session; } update(e) { if (!e) return this; if ("function" == typeof e) { const t = e(this); return t instanceof c ? t : this; } return e instanceof c ? ((this._tags = { ...this._tags, ...e._tags }), (this._extra = { ...this._extra, ...e._extra }), (this._contexts = { ...this._contexts, ...e._contexts }), e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession)) : (0, r.PO)(e) && ((this._tags = { ...this._tags, ...e.tags }), (this._extra = { ...this._extra, ...e.extra }), (this._contexts = { ...this._contexts, ...e.contexts }), e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession)), this; } clear() { return (this._breadcrumbs = []), (this._tags = {}), (this._extra = {}), (this._user = {}), (this._contexts = {}), (this._level = void 0), (this._transactionName = void 0), (this._fingerprint = void 0), (this._requestSession = void 0), (this._span = void 0), (this._session = void 0), this._notifyScopeListeners(), (this._attachments = []), this; } addBreadcrumb(e, t) { const n = "number" == typeof t ? t : 100; if (n <= 0) return this; const r = { timestamp: (0, i.yW)(), ...e }; return (this._breadcrumbs = [...this._breadcrumbs, r].slice(-n)), this._notifyScopeListeners(), this; } getLastBreadcrumb() { return this._breadcrumbs[this._breadcrumbs.length - 1]; } clearBreadcrumbs() { return (this._breadcrumbs = []), this._notifyScopeListeners(), this; } addAttachment(e) { return this._attachments.push(e), this; } getAttachments() { return this._attachments; } clearAttachments() { return (this._attachments = []), this; } applyToEvent(e, t = {}) { if ((this._extra && Object.keys(this._extra).length && (e.extra = { ...this._extra, ...e.extra }), this._tags && Object.keys(this._tags).length && (e.tags = { ...this._tags, ...e.tags }), this._user && Object.keys(this._user).length && (e.user = { ...this._user, ...e.user }), this._contexts && Object.keys(this._contexts).length && (e.contexts = { ...this._contexts, ...e.contexts }), this._level && (e.level = this._level), this._transactionName && (e.transaction = this._transactionName), this._span)) { e.contexts = { trace: this._span.getTraceContext(), ...e.contexts }; const t = this._span.transaction; if (t) { e.sdkProcessingMetadata = { dynamicSamplingContext: t.getDynamicSamplingContext(), ...e.sdkProcessingMetadata }; const n = t.name; n && (e.tags = { transaction: n, ...e.tags }); } } return this._applyFingerprint(e), (e.breadcrumbs = [...(e.breadcrumbs || []), ...this._breadcrumbs]), (e.breadcrumbs = e.breadcrumbs.length > 0 ? e.breadcrumbs : void 0), (e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata }), this._notifyEventProcessors([...d(), ...this._eventProcessors], e, t); } setSDKProcessingMetadata(e) { return (this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }), this; } _notifyEventProcessors(e, t, n, i = 0) { return new o.cW((o, s) => { const u = e[i]; if (null === t || "function" != typeof u) o(t); else { const l = u({ ...t }, n); ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && u.id && null === l && a.kg.log(`Event processor "${u.id}" dropped event`), (0, r.J8)(l) ? l.then((t) => this._notifyEventProcessors(e, t, n, i + 1).then(o)).then(null, s) : this._notifyEventProcessors(e, l, n, i + 1) .then(o) .then(null, s); } }); } _notifyScopeListeners() { this._notifyingListeners || ((this._notifyingListeners = !0), this._scopeListeners.forEach((e) => { e(this); }), (this._notifyingListeners = !1)); } _applyFingerprint(e) { (e.fingerprint = e.fingerprint ? (0, s.lE)(e.fingerprint) : []), this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint; } } function d() { return (0, u.YO)("globalEventProcessors", () => []); } function h(e) { d().push(e); } }, 48364: (e, t, n) => { "use strict"; n.d(t, { CT: () => s, Hv: () => a, RJ: () => u }); var r = n(7790), i = n(63699), o = n(21995); function a(e) { const t = (0, r.ph)(), n = { sid: (0, i.DM)(), init: !0, timestamp: t, started: t, duration: 0, status: "ok", errors: 0, ignoreDuration: !1, toJSON: () => (function (e) { return (0, o.Jr)({ sid: `${e.sid}`, init: e.init, started: new Date(1e3 * e.started).toISOString(), timestamp: new Date(1e3 * e.timestamp).toISOString(), status: e.status, errors: e.errors, did: "number" == typeof e.did || "string" == typeof e.did ? `${e.did}` : void 0, duration: e.duration, attrs: { release: e.release, environment: e.environment, ip_address: e.ipAddress, user_agent: e.userAgent } }); })(n), }; return e && s(n, e), n; } function s(e, t = {}) { if ((t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), e.did || t.did || (e.did = t.user.id || t.user.email || t.user.username)), (e.timestamp = t.timestamp || (0, r.ph)()), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = 32 === t.sid.length ? t.sid : (0, i.DM)()), void 0 !== t.init && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), "number" == typeof t.started && (e.started = t.started), e.ignoreDuration)) e.duration = void 0; else if ("number" == typeof t.duration) e.duration = t.duration; else { const t = e.timestamp - e.started; e.duration = t >= 0 ? t : 0; } t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), "number" == typeof t.errors && (e.errors = t.errors), t.status && (e.status = t.status); } function u(e, t) { let n = {}; t ? (n = { status: t }) : "ok" === e.status && (n = { status: "exited" }), s(e, n); } }, 37348: (e, t, n) => { "use strict"; n.d(t, { T: () => m, l: () => g }); var r = n(58536), i = n(81757), o = n(66465), a = n(12712), s = n(29518), u = n(67532); let l = !1; function c() { const e = (0, u.x1)(); if (e) { const t = "internal_error"; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log(`[Tracing] Transaction: ${t} -> Global error occured`), e.setStatus(t); } } c.tag = "sentry_tracingErrorCallback"; var d = n(94610), h = n(33965); function p() { const e = this.getScope().getSpan(); return e ? { "sentry-trace": e.toTraceparent() } : {}; } function f(e, t, n) { if (!(0, a.z)(t)) return (e.sampled = !1), e; if (void 0 !== e.sampled) return e.setMetadata({ sampleRate: Number(e.sampled) }), e; let o; return ( "function" == typeof t.tracesSampler ? ((o = t.tracesSampler(n)), e.setMetadata({ sampleRate: Number(o) })) : void 0 !== n.parentSampled ? (o = n.parentSampled) : void 0 !== t.tracesSampleRate ? ((o = t.tracesSampleRate), e.setMetadata({ sampleRate: Number(o) })) : ((o = 1), e.setMetadata({ sampleRate: o })), (function (e) { if ((0, i.i2)(e) || ("number" != typeof e && "boolean" != typeof e)) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`), !1; if (e < 0 || e > 1) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`), !1; return !0; })(o) ? o ? ((e.sampled = Math.random() < o), e.sampled ? (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log(`[Tracing] starting ${e.op} transaction - ${e.name}`), e) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`), e)) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log("[Tracing] Discarding transaction because " + ("function" == typeof t.tracesSampler ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0")), (e.sampled = !1), e) : (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."), (e.sampled = !1), e) ); } function _(e, t) { const n = this.getClient(), i = (n && n.getOptions()) || {}, o = i.instrumenter || "sentry", a = e.instrumenter || "sentry"; o !== a && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${o}\` instrumenter.\nThe transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`), (e.sampled = !1)); let s = new h.Y(e, this); return (s = f(s, i, { parentSampled: e.parentSampled, transactionContext: e, ...t })), s.sampled && s.initSpanRecorder(i._experiments && i._experiments.maxSpans), n && n.emit && n.emit("startTransaction", s), s; } function g(e, t, n, r, i, o, a) { const s = e.getClient(), u = (s && s.getOptions()) || {}; let l = new d.io(t, e, n, r, a, i); return (l = f(l, u, { parentSampled: t.parentSampled, transactionContext: t, ...o })), l.sampled && l.initSpanRecorder(u._experiments && u._experiments.maxSpans), s && s.emit && s.emit("startTransaction", l), l; } function m() { const e = (0, o.cu)(); e.__SENTRY__ && ((e.__SENTRY__.extensions = e.__SENTRY__.extensions || {}), e.__SENTRY__.extensions.startTransaction || (e.__SENTRY__.extensions.startTransaction = _), e.__SENTRY__.extensions.traceHeaders || (e.__SENTRY__.extensions.traceHeaders = p), l || ((l = !0), (0, s.oq)("error", c), (0, s.oq)("unhandledrejection", c))); } }, 94610: (e, t, n) => { "use strict"; n.d(t, { AT: () => s, io: () => c }); var r = n(7790), i = n(58536), o = n(91701), a = n(33965); const s = { idleTimeout: 1e3, finalTimeout: 3e4, heartbeatInterval: 5e3 }, u = ["heartbeatFailed", "idleTimeout", "documentHidden", "finalTimeout", "externalFinish", "cancelled"]; class l extends o.gB { constructor(e, t, n, r) { super(r), (this._pushActivity = e), (this._popActivity = t), (this.transactionSpanId = n); } add(e) { e.spanId !== this.transactionSpanId && ((e.finish = (t) => { (e.endTimestamp = "number" == typeof t ? t : (0, r.ph)()), this._popActivity(e.spanId); }), void 0 === e.endTimestamp && this._pushActivity(e.spanId)), super.add(e); } } class c extends a.Y { __init() { this.activities = {}; } __init2() { this._heartbeatCounter = 0; } __init3() { this._finished = !1; } __init4() { this._idleTimeoutCanceledPermanently = !1; } __init5() { this._beforeFinishCallbacks = []; } __init6() { this._finishReason = u[4]; } constructor(e, t, n = s.idleTimeout, r = s.finalTimeout, o = s.heartbeatInterval, a = !1) { super(e, t), (this._idleHub = t), (this._idleTimeout = n), (this._finalTimeout = r), (this._heartbeatInterval = o), (this._onScope = a), c.prototype.__init.call(this), c.prototype.__init2.call(this), c.prototype.__init3.call(this), c.prototype.__init4.call(this), c.prototype.__init5.call(this), c.prototype.__init6.call(this), a && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`), t.configureScope((e) => e.setSpan(this))), this._restartIdleTimeout(), setTimeout(() => { this._finished || (this.setStatus("deadline_exceeded"), (this._finishReason = u[3]), this.finish()); }, this._finalTimeout); } finish(e = (0, r.ph)()) { if (((this._finished = !0), (this.activities = {}), "ui.action.click" === this.op && this.setTag("finishReason", this._finishReason), this.spanRecorder)) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] finishing IdleTransaction", new Date(1e3 * e).toISOString(), this.op); for (const t of this._beforeFinishCallbacks) t(this, e); (this.spanRecorder.spans = this.spanRecorder.spans.filter((t) => { if (t.spanId === this.spanId) return !0; t.endTimestamp || ((t.endTimestamp = e), t.setStatus("cancelled"), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] cancelling span since transaction ended early", JSON.stringify(t, void 0, 2))); const n = t.startTimestamp < e; return n || (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] discarding Span since it happened after Transaction was finished", JSON.stringify(t, void 0, 2))), n; })), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] flushing IdleTransaction"); } else ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] No active IdleTransaction"); if (this._onScope) { const e = this._idleHub.getScope(); e.getTransaction() === this && e.setSpan(void 0); } return super.finish(e); } registerBeforeFinishCallback(e) { this._beforeFinishCallbacks.push(e); } initSpanRecorder(e) { if (!this.spanRecorder) { const t = (e) => { this._finished || this._pushActivity(e); }, n = (e) => { this._finished || this._popActivity(e); }; (this.spanRecorder = new l(t, n, this.spanId, e)), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("Starting heartbeat"), this._pingHeartbeat(); } this.spanRecorder.add(this); } cancelIdleTimeout(e, { restartOnChildSpanChange: t } = { restartOnChildSpanChange: !0 }) { (this._idleTimeoutCanceledPermanently = !1 === t), this._idleTimeoutID && (clearTimeout(this._idleTimeoutID), (this._idleTimeoutID = void 0), 0 === Object.keys(this.activities).length && this._idleTimeoutCanceledPermanently && ((this._finishReason = u[5]), this.finish(e))); } setFinishReason(e) { this._finishReason = e; } _restartIdleTimeout(e) { this.cancelIdleTimeout(), (this._idleTimeoutID = setTimeout(() => { this._finished || 0 !== Object.keys(this.activities).length || ((this._finishReason = u[1]), this.finish(e)); }, this._idleTimeout)); } _pushActivity(e) { this.cancelIdleTimeout(void 0, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently }), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log(`[Tracing] pushActivity: ${e}`), (this.activities[e] = !0), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] new activities count", Object.keys(this.activities).length); } _popActivity(e) { if ((this.activities[e] && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log(`[Tracing] popActivity ${e}`), delete this.activities[e], ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] new activities count", Object.keys(this.activities).length)), 0 === Object.keys(this.activities).length)) { const e = (0, r.ph)(); this._idleTimeoutCanceledPermanently ? ((this._finishReason = u[5]), this.finish(e)) : this._restartIdleTimeout(e + this._idleTimeout / 1e3); } } _beat() { if (this._finished) return; const e = Object.keys(this.activities).join(""); e === this._prevHeartbeatString ? this._heartbeatCounter++ : (this._heartbeatCounter = 1), (this._prevHeartbeatString = e), this._heartbeatCounter >= 3 ? (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"), this.setStatus("deadline_exceeded"), (this._finishReason = u[0]), this.finish()) : this._pingHeartbeat(); } _pingHeartbeat() { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`), setTimeout(() => { this._beat(); }, this._heartbeatInterval); } } }, 91701: (e, t, n) => { "use strict"; n.d(t, { Dr: () => u, Zd: () => l, gB: () => s }); var r = n(63699), i = n(7790), o = n(58536), a = n(21995); class s { __init() { this.spans = []; } constructor(e = 1e3) { s.prototype.__init.call(this), (this._maxlen = e); } add(e) { this.spans.length > this._maxlen ? (e.spanRecorder = void 0) : this.spans.push(e); } } class u { __init2() { this.traceId = (0, r.DM)(); } __init3() { this.spanId = (0, r.DM)().substring(16); } __init4() { this.startTimestamp = (0, i.ph)(); } __init5() { this.tags = {}; } __init6() { this.data = {}; } __init7() { this.instrumenter = "sentry"; } constructor(e) { if ((u.prototype.__init2.call(this), u.prototype.__init3.call(this), u.prototype.__init4.call(this), u.prototype.__init5.call(this), u.prototype.__init6.call(this), u.prototype.__init7.call(this), !e)) return this; e.traceId && (this.traceId = e.traceId), e.spanId && (this.spanId = e.spanId), e.parentSpanId && (this.parentSpanId = e.parentSpanId), "sampled" in e && (this.sampled = e.sampled), e.op && (this.op = e.op), e.description && (this.description = e.description), e.data && (this.data = e.data), e.tags && (this.tags = e.tags), e.status && (this.status = e.status), e.startTimestamp && (this.startTimestamp = e.startTimestamp), e.endTimestamp && (this.endTimestamp = e.endTimestamp), e.instrumenter && (this.instrumenter = e.instrumenter); } startChild(e) { const t = new u({ ...e, parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId }); if (((t.spanRecorder = this.spanRecorder), t.spanRecorder && t.spanRecorder.add(t), (t.transaction = this.transaction), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && t.transaction)) { const n = `[Tracing] Starting '${(e && e.op) || "< unknown op >"}' span on transaction '${t.transaction.name || "< unknown name >"}' (${t.transaction.spanId}).`; (t.transaction.metadata.spanMetadata[t.spanId] = { logMessage: n }), o.kg.log(n); } return t; } setTag(e, t) { return (this.tags = { ...this.tags, [e]: t }), this; } setData(e, t) { return (this.data = { ...this.data, [e]: t }), this; } setStatus(e) { return (this.status = e), this; } setHttpStatus(e) { this.setTag("http.status_code", String(e)), this.setData("http.response.status_code", e); const t = l(e); return "unknown_error" !== t && this.setStatus(t), this; } isSuccess() { return "ok" === this.status; } finish(e) { if (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && this.transaction && this.transaction.spanId !== this.spanId) { const { logMessage: e } = this.transaction.metadata.spanMetadata[this.spanId]; e && o.kg.log(e.replace("Starting", "Finishing")); } this.endTimestamp = "number" == typeof e ? e : (0, i.ph)(); } toTraceparent() { let e = ""; return void 0 !== this.sampled && (e = this.sampled ? "-1" : "-0"), `${this.traceId}-${this.spanId}${e}`; } toContext() { return (0, a.Jr)({ data: this.data, description: this.description, endTimestamp: this.endTimestamp, op: this.op, parentSpanId: this.parentSpanId, sampled: this.sampled, spanId: this.spanId, startTimestamp: this.startTimestamp, status: this.status, tags: this.tags, traceId: this.traceId }); } updateWithContext(e) { return (this.data = e.data || {}), (this.description = e.description), (this.endTimestamp = e.endTimestamp), (this.op = e.op), (this.parentSpanId = e.parentSpanId), (this.sampled = e.sampled), (this.spanId = e.spanId || this.spanId), (this.startTimestamp = e.startTimestamp || this.startTimestamp), (this.status = e.status), (this.tags = e.tags || {}), (this.traceId = e.traceId || this.traceId), this; } getTraceContext() { return (0, a.Jr)({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, trace_id: this.traceId }); } toJSON() { return (0, a.Jr)({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, start_timestamp: this.startTimestamp, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, timestamp: this.endTimestamp, trace_id: this.traceId }); } } function l(e) { if (e < 400 && e >= 100) return "ok"; if (e >= 400 && e < 500) switch (e) { case 401: return "unauthenticated"; case 403: return "permission_denied"; case 404: return "not_found"; case 409: return "already_exists"; case 413: return "failed_precondition"; case 429: return "resource_exhausted"; default: return "invalid_argument"; } if (e >= 500 && e < 600) switch (e) { case 501: return "unimplemented"; case 503: return "unavailable"; case 504: return "deadline_exceeded"; default: return "internal_error"; } return "unknown_error"; } }, 42145: (e, t, n) => { "use strict"; n.d(t, { g: () => a }); var r = n(81757), i = n(66465), o = n(12712); function a(e, t, n = () => {}) { const a = { ...e }; void 0 !== a.name && void 0 === a.description && (a.description = a.name); const s = (0, i.Gd)(), u = s.getScope(), l = u.getSpan(); const c = (function () { if ((0, o.z)()) return l ? l.startChild(a) : s.startTransaction(a); })(); function d() { c && c.finish(), s.getScope().setSpan(l); } let h; u.setSpan(c); try { h = t(c); } catch (e) { throw (c && c.setStatus("internal_error"), n(e), d(), e); } return ( (0, r.J8)(h) ? Promise.resolve(h).then( () => { d(); }, (e) => { c && c.setStatus("internal_error"), n(e), d(); } ) : d(), h ); } }, 33965: (e, t, n) => { "use strict"; n.d(t, { Y: () => u }); var r = n(58536), i = n(21995), o = n(66417), a = n(66465), s = n(91701); class u extends s.Dr { __init() { this._measurements = {}; } __init2() { this._contexts = {}; } __init3() { this._frozenDynamicSamplingContext = void 0; } constructor(e, t) { super(e), u.prototype.__init.call(this), u.prototype.__init2.call(this), u.prototype.__init3.call(this), (this._hub = t || (0, a.Gd)()), (this._name = e.name || ""), (this.metadata = { source: "custom", ...e.metadata, spanMetadata: {} }), (this._trimEnd = e.trimEnd), (this.transaction = this); const n = this.metadata.dynamicSamplingContext; n && (this._frozenDynamicSamplingContext = { ...n }); } get name() { return this._name; } set name(e) { this.setName(e); } setName(e, t = "custom") { (this._name = e), (this.metadata.source = t); } initSpanRecorder(e = 1e3) { this.spanRecorder || (this.spanRecorder = new s.gB(e)), this.spanRecorder.add(this); } setContext(e, t) { null === t ? delete this._contexts[e] : (this._contexts[e] = t); } setMeasurement(e, t, n = "") { this._measurements[e] = { value: t, unit: n }; } setMetadata(e) { this.metadata = { ...this.metadata, ...e }; } finish(e) { if (void 0 !== this.endTimestamp) return; this.name || (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.warn("Transaction has no name, falling back to ``."), (this.name = "")), super.finish(e); const t = this._hub.getClient(); if ((t && t.emit && t.emit("finishTransaction", this), !0 !== this.sampled)) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), void (t && t.recordDroppedEvent("sample_rate", "transaction")); const n = this.spanRecorder ? this.spanRecorder.spans.filter((e) => e !== this && e.endTimestamp) : []; this._trimEnd && n.length > 0 && (this.endTimestamp = n.reduce((e, t) => (e.endTimestamp && t.endTimestamp ? (e.endTimestamp > t.endTimestamp ? e : t) : e)).endTimestamp); const i = this.metadata, o = { contexts: { ...this._contexts, trace: this.getTraceContext() }, spans: n, start_timestamp: this.startTimestamp, tags: this.tags, timestamp: this.endTimestamp, transaction: this.name, type: "transaction", sdkProcessingMetadata: { ...i, dynamicSamplingContext: this.getDynamicSamplingContext() }, ...(i.source && { transaction_info: { source: i.source } }) }; return Object.keys(this._measurements).length > 0 && (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log("[Measurements] Adding measurements to transaction", JSON.stringify(this._measurements, void 0, 2)), (o.measurements = this._measurements)), ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`), this._hub.captureEvent(o); } toContext() { const e = super.toContext(); return (0, i.Jr)({ ...e, name: this.name, trimEnd: this._trimEnd }); } updateWithContext(e) { return super.updateWithContext(e), (this.name = e.name || ""), (this._trimEnd = e.trimEnd), this; } getDynamicSamplingContext() { if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext; const e = this._hub || (0, a.Gd)(), t = e && e.getClient(); if (!t) return {}; const { environment: n, release: r } = t.getOptions() || {}, { publicKey: s } = t.getDsn() || {}, u = this.metadata.sampleRate, l = void 0 !== u ? u.toString() : void 0, { segment: c } = e.getScope().getUser() || {}, d = this.metadata.source, h = d && "url" !== d ? this.name : void 0, p = (0, i.Jr)({ environment: n || o.J, release: r, transaction: h, user_segment: c, public_key: s, trace_id: this.traceId, sample_rate: l }); return t.emit && t.emit("createDsc", p), p; } setHub(e) { this._hub = e; } } }, 67532: (e, t, n) => { "use strict"; n.d(t, { x1: () => i }); var r = n(66465); function i(e) { return (e || (0, r.Gd)()).getScope().getTransaction(); } }, 12712: (e, t, n) => { "use strict"; n.d(t, { z: () => i }); var r = n(66465); function i(e) { if ("boolean" == typeof __SENTRY_TRACING__ && !__SENTRY_TRACING__) return !1; const t = (0, r.Gd)().getClient(), n = e || (t && t.getOptions()); return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n); } }, 37082: (e, t, n) => { "use strict"; n.r(t), n.d(t, { BROWSER_TRACING_INTEGRATION_ID: () => V, BrowserTracing: () => N, IdleTransaction: () => X, Integrations: () => J, Span: () => H, SpanStatus: () => $, TRACEPARENT_REGEXP: () => W, Transaction: () => G, addExtensionMethods: () => B, defaultRequestInstrumentationOptions: () => Z, extractTraceparentData: () => U, getActiveTransaction: () => F, hasTracingEnabled: () => z, instrumentOutgoingRequests: () => q, spanStatusfromHttpCode: () => j, startIdleTransaction: () => K, stripUrlQueryAndFragment: () => Y }); var r, i = n(2922), o = n(68997), a = n(67532), s = n(49691), u = n(91701), l = n(33965), c = n(79900), d = n(12712), h = n(33483), p = n(94610), f = n(37348); !(function (e) { e.Ok = "ok"; e.DeadlineExceeded = "deadline_exceeded"; e.Unauthenticated = "unauthenticated"; e.PermissionDenied = "permission_denied"; e.NotFound = "not_found"; e.ResourceExhausted = "resource_exhausted"; e.InvalidArgument = "invalid_argument"; e.Unimplemented = "unimplemented"; e.Unavailable = "unavailable"; e.InternalError = "internal_error"; e.UnknownError = "unknown_error"; e.Cancelled = "cancelled"; e.AlreadyExists = "already_exists"; e.FailedPrecondition = "failed_precondition"; e.Aborted = "aborted"; e.OutOfRange = "out_of_range"; e.DataLoss = "data_loss"; })(r || (r = {})); var _ = n(2803), g = n(37392), m = n(58536), v = n(21995), y = n(63699), C = n(81757); function b(e) { const t = (0, _.x)([e, "call", (e) => e(), "access", (e) => e.getClient, "call", (e) => e(), "optionalAccess", (e) => e.getOptions, "call", (e) => e()]); return "sentry" !== ((0, _.x)([t, "optionalAccess", (e) => e.instrumenter]) || "sentry"); } class w { static __initStatic() { this.id = "Apollo"; } __init() { this.name = w.id; } constructor(e = { useNestjs: !1 }) { w.prototype.__init.call(this), (this._useNest = !!e.useNestjs); } loadDependency() { return this._useNest ? (this._module = this._module || (0, g.$y)("@nestjs/graphql")) : (this._module = this._module || (0, g.$y)("apollo-server-core")), this._module; } setupOnce(e, t) { if (b(t)) ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.log("Apollo Integration is skipped because of instrumenter configuration."); else if (this._useNest) { const e = this.loadDependency(); if (!e) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package.")); (0, v.hl)(e.GraphQLFactory.prototype, "mergeWithSchema", function (e) { return function (...n) { return ( (0, v.hl)(this.resolversExplorerService, "explore", function (e) { return function () { return S((0, y.lE)(e.call(this)), t); }; }), e.call(this, ...n) ); }; }); } else { const e = this.loadDependency(); if (!e) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("Apollo Integration was unable to require apollo-server-core package.")); (0, v.hl)(e.ApolloServerBase.prototype, "constructSchema", function (e) { return function () { if (!this.config.resolvers) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && (this.config.schema ? (m.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."), m.kg.warn()) : this.config.modules && m.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."), m.kg.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")), e.call(this); const n = (0, y.lE)(this.config.resolvers); return (this.config.resolvers = S(n, t)), e.call(this); }; }); } } } function S(e, t) { return e.map( (e) => ( Object.keys(e).forEach((n) => { Object.keys(e[n]).forEach((r) => { "function" == typeof e[n][r] && (function (e, t, n, r) { (0, v.hl)(e[t], n, function (e) { return function (...i) { const o = r().getScope(), a = (0, _.x)([o, "optionalAccess", (e) => e.getSpan, "call", (e) => e()]), s = (0, _.x)([a, "optionalAccess", (e) => e.startChild, "call", (e) => e({ description: `${t}.${n}`, op: "graphql.resolve" })]), u = e.call(this, ...i); return (0, C.J8)(u) ? u.then((e) => ((0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), e)) : ((0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), u); }; }); })(e, n, r, t); }); }), e ) ); } w.__initStatic(); function T(e, t = {}) { const n = e.method && e.method.toUpperCase(); let r = "", i = "url"; t.customRoute || e.route ? ((r = t.customRoute || `${e.baseUrl || ""}${e.route && e.route.path}`), (i = "route")) : (e.originalUrl || e.url) && (r = (0, h.rt)(e.originalUrl || e.url || "")); let o = ""; return t.method && n && (o += n), t.method && t.path && (o += " "), t.path && r && (o += r), [o, i]; } class x { static __initStatic() { this.id = "Express"; } __init() { this.name = x.id; } constructor(e = {}) { x.prototype.__init.call(this), (this._router = e.router || e.app), (this._methods = (Array.isArray(e.methods) ? e.methods : []).concat("use")); } setupOnce(e, t) { this._router ? b(t) ? ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.log("Express Integration is skipped because of instrumenter configuration.") : ((function (e, t = []) { t.forEach((t) => (function (e, t) { const n = e[t]; return ( (e[t] = function (...e) { return n.call( this, ...(function (e, t) { return e.map((e) => ("function" == typeof e ? E(e, t) : Array.isArray(e) ? e.map((e) => ("function" == typeof e ? E(e, t) : e)) : e)); })(e, t) ); }), e ); })(e, t) ); })(this._router, this._methods), (function (e) { const t = "settings" in e; t && void 0 === e._router && e.lazyrouter && e.lazyrouter(); const n = t ? e._router : e; if (!n) return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."), void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.debug("Routing instrumentation is currently only supported in Express 4.")); const r = Object.getPrototypeOf(n), i = r.process_params; r.process_params = function (e, t, n, r, o) { n._reconstructedRoute || (n._reconstructedRoute = ""); const { layerRoutePath: a, isRegex: s, isArray: u, numExtraSegments: l, } = (function (e) { const t = (0, _.x)([e, "access", (e) => e.route, "optionalAccess", (e) => e.path]), n = (0, C.Kj)(t), r = Array.isArray(t); if (!t) return { isRegex: n, isArray: r, numExtraSegments: 0 }; const i = r ? Math.max(((a = t), a.reduce((e, t) => e + (0, h.$A)(t.toString()), 0) - (0, h.$A)(e.path || "")), 0) : 0, o = (function (e, t) { if (e) return t.map((e) => e.toString()).join(","); return t && t.toString(); })(r, t); var a; return { layerRoutePath: o, isRegex: n, isArray: r, numExtraSegments: i }; })(e); (a || s || u) && (n._hasParameters = !0); const c = (a || e.path || "") .split("/") .filter((e) => e.length > 0 && (s || u || !e.includes("*"))) .join("/"); c && c.length > 0 && (n._reconstructedRoute += `/${c}${s ? "/" : ""}`); if ((0, h.$A)(n.originalUrl || "") + l === (0, h.$A)(n._reconstructedRoute)) { n._hasParameters || (n._reconstructedRoute !== n.originalUrl && (n._reconstructedRoute = n.originalUrl ? (0, h.rt)(n.originalUrl) : n.originalUrl)); const e = r.__sentry_transaction; if (e && "custom" !== e.metadata.source) { const t = n._reconstructedRoute || "/"; e.setName(...T(n, { path: !0, method: !0, customRoute: t })); } } return i.call(this, e, t, n, r, o); }; })(this._router)) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("ExpressIntegration is missing an Express instance"); } } function E(e, t) { const n = e.length; switch (n) { case 2: return function (n, r) { const i = r.__sentry_transaction; if (i) { const n = i.startChild({ description: e.name, op: `middleware.express.${t}` }); r.once("finish", () => { n.finish(); }); } return e.call(this, n, r); }; case 3: return function (n, r, i) { const o = r.__sentry_transaction, a = (0, _.x)([o, "optionalAccess", (e) => e.startChild, "call", (n) => n({ description: e.name, op: `middleware.express.${t}` })]); e.call(this, n, r, function (...e) { (0, _.x)([a, "optionalAccess", (e) => e.finish, "call", (e) => e()]), i.call(this, ...e); }); }; case 4: return function (n, r, i, o) { const a = i.__sentry_transaction, s = (0, _.x)([a, "optionalAccess", (e) => e.startChild, "call", (n) => n({ description: e.name, op: `middleware.express.${t}` })]); e.call(this, n, r, i, function (...e) { (0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), o.call(this, ...e); }); }; default: throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`); } } x.__initStatic(); class L { constructor() { L.prototype.__init.call(this); } static __initStatic() { this.id = "GraphQL"; } __init() { this.name = L.id; } loadDependency() { return (this._module = this._module || (0, g.$y)("graphql/execution/execute.js")); } setupOnce(e, t) { if (b(t)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.log("GraphQL Integration is skipped because of instrumenter configuration.")); const n = this.loadDependency(); n ? (0, v.hl)(n, "execute", function (e) { return function (...n) { const r = t().getScope(), i = (0, _.x)([r, "optionalAccess", (e) => e.getSpan, "call", (e) => e()]), o = (0, _.x)([i, "optionalAccess", (e) => e.startChild, "call", (e) => e({ description: "execute", op: "graphql.execute" })]); (0, _.x)([r, "optionalAccess", (e) => e.setSpan, "call", (e) => e(o)]); const a = e.call(this, ...n); return (0, C.J8)(a) ? a.then((e) => ((0, _.x)([o, "optionalAccess", (e) => e.finish, "call", (e) => e()]), (0, _.x)([r, "optionalAccess", (e) => e.setSpan, "call", (e) => e(i)]), e)) : ((0, _.x)([o, "optionalAccess", (e) => e.finish, "call", (e) => e()]), (0, _.x)([r, "optionalAccess", (e) => e.setSpan, "call", (e) => e(i)]), a); }; }) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("GraphQL Integration was unable to require graphql/execution package."); } } L.__initStatic(); const A = ["aggregate", "bulkWrite", "countDocuments", "createIndex", "createIndexes", "deleteMany", "deleteOne", "distinct", "drop", "dropIndex", "dropIndexes", "estimatedDocumentCount", "find", "findOne", "findOneAndDelete", "findOneAndReplace", "findOneAndUpdate", "indexes", "indexExists", "indexInformation", "initializeOrderedBulkOp", "insertMany", "insertOne", "isCapped", "mapReduce", "options", "parallelCollectionScan", "rename", "replaceOne", "stats", "updateMany", "updateOne"], I = { bulkWrite: ["operations"], countDocuments: ["query"], createIndex: ["fieldOrSpec"], createIndexes: ["indexSpecs"], deleteMany: ["filter"], deleteOne: ["filter"], distinct: ["key", "query"], dropIndex: ["indexName"], find: ["query"], findOne: ["query"], findOneAndDelete: ["filter"], findOneAndReplace: ["filter", "replacement"], findOneAndUpdate: ["filter", "update"], indexExists: ["indexes"], insertMany: ["docs"], insertOne: ["doc"], mapReduce: ["map", "reduce"], rename: ["newName"], replaceOne: ["filter", "doc"], updateMany: ["filter", "update"], updateOne: ["filter", "update"] }; class M { static __initStatic() { this.id = "Mongo"; } __init() { this.name = M.id; } constructor(e = {}) { M.prototype.__init.call(this), (this._operations = Array.isArray(e.operations) ? e.operations : A), (this._describeOperations = !("describeOperations" in e) || e.describeOperations), (this._useMongoose = !!e.useMongoose); } loadDependency() { const e = this._useMongoose ? "mongoose" : "mongodb"; return (this._module = this._module || (0, g.$y)(e)); } setupOnce(e, t) { if (b(t)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.log("Mongo Integration is skipped because of instrumenter configuration.")); const n = this.loadDependency(); if (n) this._instrumentOperations(n.Collection, this._operations, t); else { const e = this._useMongoose ? "mongoose" : "mongodb"; ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error(`Mongo Integration was unable to require \`${e}\` package.`); } } _instrumentOperations(e, t, n) { t.forEach((t) => this._patchOperation(e, t, n)); } _patchOperation(e, t, n) { if (!(t in e.prototype)) return; const r = this._getSpanContextFromOperationArguments.bind(this); (0, v.hl)(e.prototype, t, function (e) { return function (...i) { const o = i[i.length - 1], a = n().getScope(), s = (0, _.x)([a, "optionalAccess", (e) => e.getSpan, "call", (e) => e()]); if ("function" != typeof o || ("mapReduce" === t && 2 === i.length)) { const n = (0, _.x)([s, "optionalAccess", (e) => e.startChild, "call", (e) => e(r(this, t, i))]), o = e.call(this, ...i); if ((0, C.J8)(o)) return o.then((e) => ((0, _.x)([n, "optionalAccess", (e) => e.finish, "call", (e) => e()]), e)); if ((u = o) && "object" == typeof u && u.once && "function" == typeof u.once) { const e = o; try { e.once("close", () => { (0, _.x)([n, "optionalAccess", (e) => e.finish, "call", (e) => e()]); }); } catch (e) { (0, _.x)([n, "optionalAccess", (e) => e.finish, "call", (e) => e()]); } return e; } return (0, _.x)([n, "optionalAccess", (e) => e.finish, "call", (e) => e()]), o; } var u; const l = (0, _.x)([s, "optionalAccess", (e) => e.startChild, "call", (e) => e(r(this, t, i.slice(0, -1)))]); return e.call(this, ...i.slice(0, -1), function (e, t) { (0, _.x)([l, "optionalAccess", (e) => e.finish, "call", (e) => e()]), o(e, t); }); }; }); } _getSpanContextFromOperationArguments(e, t, n) { const r = { collectionName: e.collectionName, dbName: e.dbName, namespace: e.namespace, "db.system": "mongodb" }, i = { op: "db", description: t, data: r }, o = I[t], a = Array.isArray(this._describeOperations) ? this._describeOperations.includes(t) : this._describeOperations; if (!o || !a) return i; try { if ("mapReduce" === t) { const [e, t] = n; (r[o[0]] = "string" == typeof e ? e : e.name || ""), (r[o[1]] = "string" == typeof t ? t : t.name || ""); } else for (let e = 0; e < o.length; e++) r[o[e]] = JSON.stringify(n[e]); } catch (e) {} return i; } } M.__initStatic(); class P { constructor() { P.prototype.__init.call(this); } static __initStatic() { this.id = "Mysql"; } __init() { this.name = P.id; } loadDependency() { return (this._module = this._module || (0, g.$y)("mysql/lib/Connection.js")); } setupOnce(e, t) { if (b(t)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.log("Mysql Integration is skipped because of instrumenter configuration.")); const n = this.loadDependency(); n ? (0, v.hl)(n, "createQuery", function (e) { return function (n, r, i) { const o = t().getScope(), a = (0, _.x)([o, "optionalAccess", (e) => e.getSpan, "call", (e) => e()]), s = (0, _.x)([a, "optionalAccess", (e) => e.startChild, "call", (e) => e({ description: "string" == typeof n ? n : n.sql, op: "db", data: { "db.system": "mysql" } })]); return "function" == typeof i ? e.call(this, n, r, function (e, t, n) { (0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), i(e, t, n); }) : "function" == typeof r ? e.call(this, n, function (e, t, n) { (0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), r(e, t, n); }) : e.call(this, n, r, i); }; }) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("Mysql Integration was unable to require `mysql` package."); } } P.__initStatic(); class O { static __initStatic() { this.id = "Postgres"; } __init() { this.name = O.id; } constructor(e = {}) { O.prototype.__init.call(this), (this._usePgNative = !!e.usePgNative); } loadDependency() { return (this._module = this._module || (0, g.$y)("pg")); } setupOnce(e, t) { if (b(t)) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.log("Postgres Integration is skipped because of instrumenter configuration.")); const n = this.loadDependency(); if (!n) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("Postgres Integration was unable to require `pg` package.")); if (this._usePgNative && !(0, _.x)([n, "access", (e) => e.native, "optionalAccess", (e) => e.Client])) return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.error("Postgres Integration was unable to access 'pg-native' bindings.")); const { Client: r } = this._usePgNative ? n.native : n; (0, v.hl)(r.prototype, "query", function (e) { return function (n, r, i) { const o = t().getScope(), a = (0, _.x)([o, "optionalAccess", (e) => e.getSpan, "call", (e) => e()]), s = (0, _.x)([a, "optionalAccess", (e) => e.startChild, "call", (e) => e({ description: "string" == typeof n ? n : n.text, op: "db", data: { "db.system": "postgresql" } })]); if ("function" == typeof i) return e.call(this, n, r, function (e, t) { (0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), i(e, t); }); if ("function" == typeof r) return e.call(this, n, function (e, t) { (0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), r(e, t); }); const u = void 0 !== r ? e.call(this, n, r) : e.call(this, n); return (0, C.J8)(u) ? u.then((e) => ((0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), e)) : ((0, _.x)([s, "optionalAccess", (e) => e.finish, "call", (e) => e()]), u); }; }); } } O.__initStatic(); var k = n(66465), R = n(42145); class D { static __initStatic() { this.id = "Prisma"; } __init() { this.name = D.id; } constructor(e = {}) { var t; D.prototype.__init.call(this), (t = e.client) && t.$use && !e.client._sentryInstrumented ? ((0, v.xp)(e.client, "_sentryInstrumented", !0), e.client.$use((e, t) => { if (b(k.Gd)) return t(e); const n = e.action, r = e.model; return (0, R.g)({ name: r ? `${r} ${n}` : n, op: "db.sql.prisma", data: { "db.system": "prisma" } }, () => t(e)); })) : ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && m.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(e.client)}`); } setupOnce() {} } D.__initStatic(); const N = i.gE, B = o.r, F = a.x1, U = s.q, j = u.Zd, G = l.Y, H = u.Dr, V = i.N, Z = c.k3, z = d.z, Y = h.rt, W = s.K, X = p.io, q = c.L7, K = f.l, $ = r, J = { BrowserTracing: N, Apollo: w, Express: x, GraphQL: L, Mongo: M, Mysql: P, Postgres: O, Prisma: D }; ("undefined" == typeof __SENTRY_TRACING__ || __SENTRY_TRACING__) && (0, o.r)(); }, 46990: (e, t, n) => { "use strict"; n.d(t, { EN: () => l, IQ: () => c, bU: () => o }); var r = n(81757), i = n(58536); const o = "baggage", a = "sentry-", s = /^sentry-/, u = 8192; function l(e) { if (!(0, r.HD)(e) && !Array.isArray(e)) return; let t = {}; if (Array.isArray(e)) t = e.reduce((e, t) => ({ ...e, ...d(t) }), {}); else { if (!e) return; t = d(e); } const n = Object.entries(t).reduce((e, [t, n]) => { if (t.match(s)) { e[t.slice(a.length)] = n; } return e; }, {}); return Object.keys(n).length > 0 ? n : void 0; } function c(e) { return (function (e) { if (0 === Object.keys(e).length) return; return Object.entries(e).reduce((e, [t, n], r) => { const o = `${encodeURIComponent(t)}=${encodeURIComponent(n)}`, a = 0 === r ? o : `${e},${o}`; return a.length > u ? (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`), e) : a; }, ""); })(Object.entries(e).reduce((e, [t, n]) => (n && (e[`${a}${t}`] = n), e), {})); } function d(e) { return e .split(",") .map((e) => e.split("=").map((e) => decodeURIComponent(e.trim()))) .reduce((e, [t, n]) => ((e[t] = n), e), {}); } }, 54194: (e, t, n) => { "use strict"; n.d(t, { Rt: () => a, l4: () => u, qT: () => l }); var r = n(81757); const i = (0, n(90063).Rf)(), o = 80; function a(e, t = {}) { try { let n = e; const r = 5, i = []; let a = 0, u = 0; const l = " > ", c = l.length; let d; const h = Array.isArray(t) ? t : t.keyAttrs, p = (!Array.isArray(t) && t.maxStringLength) || o; for (; n && a++ < r && ((d = s(n, h)), !("html" === d || (a > 1 && u + i.length * c + d.length >= p))); ) i.push(d), (u += d.length), (n = n.parentNode); return i.reverse().join(l); } catch (e) { return ""; } } function s(e, t) { const n = e, i = []; let o, a, s, u, l; if (!n || !n.tagName) return ""; i.push(n.tagName.toLowerCase()); const c = t && t.length ? t.filter((e) => n.getAttribute(e)).map((e) => [e, n.getAttribute(e)]) : null; if (c && c.length) c.forEach((e) => { i.push(`[${e[0]}="${e[1]}"]`); }); else if ((n.id && i.push(`#${n.id}`), (o = n.className), o && (0, r.HD)(o))) for (a = o.split(/\s+/), l = 0; l < a.length; l++) i.push(`.${a[l]}`); const d = ["aria-label", "type", "name", "title", "alt"]; for (l = 0; l < d.length; l++) (s = d[l]), (u = n.getAttribute(s)), u && i.push(`[${s}="${u}"]`); return i.join(""); } function u() { try { return i.document.location.href; } catch (e) { return ""; } } function l(e) { return i.document && i.document.querySelector ? i.document.querySelector(e) : null; } }, 2803: (e, t, n) => { "use strict"; function r(e) { let t, n = e[0], r = 1; for (; r < e.length; ) { const i = e[r], o = e[r + 1]; if (((r += 2), ("optionalAccess" === i || "optionalCall" === i) && null == n)) return; "access" === i || "optionalAccess" === i ? ((t = n), (n = o(n))) : ("call" !== i && "optionalCall" !== i) || ((n = o((...e) => n.call(t, ...e))), (t = void 0)); } return n; } n.d(t, { x: () => r }); }, 4285: (e, t, n) => { "use strict"; function r() { return "undefined" != typeof __SENTRY_BROWSER_BUNDLE__ && !!__SENTRY_BROWSER_BUNDLE__; } function i() { return "npm"; } n.d(t, { S: () => i, n: () => r }); }, 29518: (e, t, n) => { "use strict"; n.d(t, { xU: () => d, oq: () => _ }); var r = n(81757), i = n(58536), o = n(21995), a = n(69038), s = n(49798), u = n(90063); const l = (0, u.Rf)(); const c = (0, u.Rf)(), d = "__sentry_xhr_v2__", h = {}, p = {}; function f(e) { if (!p[e]) switch (((p[e] = !0), e)) { case "console": !(function () { if (!("console" in c)) return; i.RU.forEach(function (e) { e in c.console && (0, o.hl)(c.console, e, function (t) { return function (...n) { g("console", { args: n, level: e }), t && t.apply(c.console, n); }; }); }); })(); break; case "dom": !(function () { if (!("document" in c)) return; const e = g.bind(null, "dom"), t = S(e, !0); c.document.addEventListener("click", t, !1), c.document.addEventListener("keypress", t, !1), ["EventTarget", "Node"].forEach((t) => { const n = c[t] && c[t].prototype; n && n.hasOwnProperty && n.hasOwnProperty("addEventListener") && ((0, o.hl)(n, "addEventListener", function (t) { return function (n, r, i) { if ("click" === n || "keypress" == n) try { const r = this, o = (r.__sentry_instrumentation_handlers__ = r.__sentry_instrumentation_handlers__ || {}), a = (o[n] = o[n] || { refCount: 0 }); if (!a.handler) { const r = S(e); (a.handler = r), t.call(this, n, r, i); } a.refCount++; } catch (e) {} return t.call(this, n, r, i); }; }), (0, o.hl)(n, "removeEventListener", function (e) { return function (t, n, r) { if ("click" === t || "keypress" == t) try { const n = this, i = n.__sentry_instrumentation_handlers__ || {}, o = i[t]; o && (o.refCount--, o.refCount <= 0 && (e.call(this, t, o.handler, r), (o.handler = void 0), delete i[t]), 0 === Object.keys(i).length && delete n.__sentry_instrumentation_handlers__); } catch (e) {} return e.call(this, t, n, r); }; })); }); })(); break; case "xhr": !(function () { if (!("XMLHttpRequest" in c)) return; const e = XMLHttpRequest.prototype; (0, o.hl)(e, "open", function (e) { return function (...t) { const n = t[1], i = (this[d] = { method: (0, r.HD)(t[0]) ? t[0].toUpperCase() : t[0], url: t[1], request_headers: {} }); (0, r.HD)(n) && "POST" === i.method && n.match(/sentry_key/) && (this.__sentry_own_request__ = !0); const a = () => { const e = this[d]; if (e && 4 === this.readyState) { try { e.status_code = this.status; } catch (e) {} g("xhr", { args: t, endTimestamp: Date.now(), startTimestamp: Date.now(), xhr: this }); } }; return ( "onreadystatechange" in this && "function" == typeof this.onreadystatechange ? (0, o.hl)(this, "onreadystatechange", function (e) { return function (...t) { return a(), e.apply(this, t); }; }) : this.addEventListener("readystatechange", a), (0, o.hl)(this, "setRequestHeader", function (e) { return function (...t) { const [n, r] = t, i = this[d]; return i && (i.request_headers[n.toLowerCase()] = r), e.apply(this, t); }; }), e.apply(this, t) ); }; }), (0, o.hl)(e, "send", function (e) { return function (...t) { const n = this[d]; return n && void 0 !== t[0] && (n.body = t[0]), g("xhr", { args: t, startTimestamp: Date.now(), xhr: this }), e.apply(this, t); }; }); })(); break; case "fetch": !(function () { if (!(0, s.t$)()) return; (0, o.hl)(c, "fetch", function (e) { return function (...t) { const { method: n, url: r } = (function (e) { if (0 === e.length) return { method: "GET", url: "" }; if (2 === e.length) { const [t, n] = e; return { url: v(t), method: m(n, "method") ? String(n.method).toUpperCase() : "GET" }; } const t = e[0]; return { url: v(t), method: m(t, "method") ? String(t.method).toUpperCase() : "GET" }; })(t), i = { args: t, fetchData: { method: n, url: r }, startTimestamp: Date.now() }; return ( g("fetch", { ...i }), e.apply(c, t).then( (e) => (g("fetch", { ...i, endTimestamp: Date.now(), response: e }), e), (e) => { throw (g("fetch", { ...i, endTimestamp: Date.now(), error: e }), e); } ) ); }; }); })(); break; case "history": !(function () { if ( !(function () { const e = l.chrome, t = e && e.app && e.app.runtime, n = "history" in l && !!l.history.pushState && !!l.history.replaceState; return !t && n; })() ) return; const e = c.onpopstate; function t(e) { return function (...t) { const n = t.length > 2 ? t[2] : void 0; if (n) { const e = y, t = String(n); (y = t), g("history", { from: e, to: t }); } return e.apply(this, t); }; } (c.onpopstate = function (...t) { const n = c.location.href, r = y; if (((y = n), g("history", { from: r, to: n }), e)) try { return e.apply(this, t); } catch (e) {} }), (0, o.hl)(c.history, "pushState", t), (0, o.hl)(c.history, "replaceState", t); })(); break; case "error": (T = c.onerror), (c.onerror = function (e, t, n, r, i) { return g("error", { column: r, error: i, line: n, msg: e, url: t }), !(!T || T.__SENTRY_LOADER__) && T.apply(this, arguments); }), (c.onerror.__SENTRY_INSTRUMENTED__ = !0); break; case "unhandledrejection": (x = c.onunhandledrejection), (c.onunhandledrejection = function (e) { return g("unhandledrejection", e), !(x && !x.__SENTRY_LOADER__) || x.apply(this, arguments); }), (c.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0); break; default: return void (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.warn("unknown instrumentation type:", e)); } } function _(e, t) { (h[e] = h[e] || []), h[e].push(t), f(e); } function g(e, t) { if (e && h[e]) for (const n of h[e] || []) try { n(t); } catch (t) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && i.kg.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${(0, a.$P)(n)}\nError:`, t); } } function m(e, t) { return !!e && "object" == typeof e && !!e[t]; } function v(e) { return "string" == typeof e ? e : e ? (m(e, "url") ? e.url : e.toString ? e.toString() : "") : ""; } let y; const C = 1e3; let b, w; function S(e, t = !1) { return (n) => { if (!n || w === n) return; if ( (function (e) { if ("keypress" !== e.type) return !1; try { const t = e.target; if (!t || !t.tagName) return !0; if ("INPUT" === t.tagName || "TEXTAREA" === t.tagName || t.isContentEditable) return !1; } catch (e) {} return !0; })(n) ) return; const r = "keypress" === n.type ? "input" : n.type; (void 0 === b || (function (e, t) { if (!e) return !0; if (e.type !== t.type) return !0; try { if (e.target !== t.target) return !0; } catch (e) {} return !1; })(w, n)) && (e({ event: n, name: r, global: t }), (w = n)), clearTimeout(b), (b = c.setTimeout(() => { b = void 0; }, C)); }; } let T = null; let x = null; }, 81757: (e, t, n) => { "use strict"; n.d(t, { Cy: () => g, HD: () => l, J8: () => _, Kj: () => f, PO: () => d, TX: () => s, V9: () => v, VW: () => a, VZ: () => i, cO: () => h, fm: () => u, i2: () => m, kK: () => p, pt: () => c }); const r = Object.prototype.toString; function i(e) { switch (r.call(e)) { case "[object Error]": case "[object Exception]": case "[object DOMException]": return !0; default: return v(e, Error); } } function o(e, t) { return r.call(e) === `[object ${t}]`; } function a(e) { return o(e, "ErrorEvent"); } function s(e) { return o(e, "DOMError"); } function u(e) { return o(e, "DOMException"); } function l(e) { return o(e, "String"); } function c(e) { return null === e || ("object" != typeof e && "function" != typeof e); } function d(e) { return o(e, "Object"); } function h(e) { return "undefined" != typeof Event && v(e, Event); } function p(e) { return "undefined" != typeof Element && v(e, Element); } function f(e) { return o(e, "RegExp"); } function _(e) { return Boolean(e && e.then && "function" == typeof e.then); } function g(e) { return d(e) && "nativeEvent" in e && "preventDefault" in e && "stopPropagation" in e; } function m(e) { return "number" == typeof e && e != e; } function v(e, t) { try { return e instanceof t; } catch (e) { return !1; } } }, 58536: (e, t, n) => { "use strict"; n.d(t, { Cf: () => o, RU: () => i, kg: () => s }); var r = n(90063); const i = ["debug", "info", "warn", "error", "log", "assert", "trace"]; function o(e) { if (!("console" in r.n2)) return e(); const t = r.n2.console, n = {}; i.forEach((e) => { const r = t[e] && t[e].__sentry_original__; e in t && r && ((n[e] = t[e]), (t[e] = r)); }); try { return e(); } finally { Object.keys(n).forEach((e) => { t[e] = n[e]; }); } } function a() { let e = !1; const t = { enable: () => { e = !0; }, disable: () => { e = !1; }, }; return ( "undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__ ? i.forEach((n) => { t[n] = (...t) => { e && o(() => { r.n2.console[n](`Sentry Logger [${n}]:`, ...t); }); }; }) : i.forEach((e) => { t[e] = () => {}; }), t ); } let s; s = "undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__ ? (0, r.YO)("logger", a) : a(); }, 63699: (e, t, n) => { "use strict"; n.d(t, { DM: () => o, Db: () => u, EG: () => l, YO: () => c, jH: () => s, lE: () => d }); var r = n(21995), i = n(90063); function o() { const e = i.n2, t = e.crypto || e.msCrypto; if (t && t.randomUUID) return t.randomUUID().replace(/-/g, ""); const n = t && t.getRandomValues ? () => t.getRandomValues(new Uint8Array(1))[0] : () => 16 * Math.random(); return ([1e7] + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, (e) => (e ^ ((15 & n()) >> (e / 4))).toString(16)); } function a(e) { return e.exception && e.exception.values ? e.exception.values[0] : void 0; } function s(e) { const { message: t, event_id: n } = e; if (t) return t; const r = a(e); return r ? (r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "") : n || ""; } function u(e, t, n) { const r = (e.exception = e.exception || {}), i = (r.values = r.values || []), o = (i[0] = i[0] || {}); o.value || (o.value = t || ""), o.type || (o.type = n || "Error"); } function l(e, t) { const n = a(e); if (!n) return; const r = n.mechanism; if (((n.mechanism = { type: "generic", handled: !0, ...r, ...t }), t && "data" in t)) { const e = { ...(r && r.data), ...t.data }; n.mechanism.data = e; } } function c(e) { if (e && e.__sentry_captured__) return !0; try { (0, r.xp)(e, "__sentry_captured__", !0); } catch (e) {} return !1; } function d(e) { return Array.isArray(e) ? e : [e]; } }, 37392: (e, t, n) => { "use strict"; n.d(t, { $y: () => a, KV: () => i, l$: () => o }); var r = n(4285); function i() { return !(0, r.n)() && "[object process]" === Object.prototype.toString.call("undefined" != typeof process ? process : 0); } function o(e, t) { return e.require(t); } function a(t) { let n; try { n = o(e, t); } catch (e) {} try { const { cwd: r } = o(e, "process"); n = o(e, `${r()}/node_modules/${t}`); } catch (e) {} return n; } e = n.hmd(e); }, 21995: (e, t, n) => { "use strict"; n.d(t, { $Q: () => u, HK: () => l, Jr: () => _, Sh: () => d, _j: () => c, hl: () => a, xp: () => s, zf: () => f }); var r = n(54194), i = n(81757), o = n(39660); function a(e, t, n) { if (!(t in e)) return; const r = e[t], i = n(r); if ("function" == typeof i) try { u(i, r); } catch (e) {} e[t] = i; } function s(e, t, n) { Object.defineProperty(e, t, { value: n, writable: !0, configurable: !0 }); } function u(e, t) { const n = t.prototype || {}; (e.prototype = t.prototype = n), s(e, "__sentry_original__", t); } function l(e) { return e.__sentry_original__; } function c(e) { return Object.keys(e) .map((t) => `${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`) .join("&"); } function d(e) { if ((0, i.VZ)(e)) return { message: e.message, name: e.name, stack: e.stack, ...p(e) }; if ((0, i.cO)(e)) { const t = { type: e.type, target: h(e.target), currentTarget: h(e.currentTarget), ...p(e) }; return "undefined" != typeof CustomEvent && (0, i.V9)(e, CustomEvent) && (t.detail = e.detail), t; } return e; } function h(e) { try { return (0, i.kK)(e) ? (0, r.Rt)(e) : Object.prototype.toString.call(e); } catch (e) { return ""; } } function p(e) { if ("object" == typeof e && null !== e) { const t = {}; for (const n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); return t; } return {}; } function f(e, t = 40) { const n = Object.keys(d(e)); if ((n.sort(), !n.length)) return "[object has no keys]"; if (n[0].length >= t) return (0, o.$G)(n[0], t); for (let e = n.length; e > 0; e--) { const r = n.slice(0, e).join(", "); if (!(r.length > t)) return e === n.length ? r : (0, o.$G)(r, t); } return ""; } function _(e) { return g(e, new Map()); } function g(e, t) { if ((0, i.PO)(e)) { const n = t.get(e); if (void 0 !== n) return n; const r = {}; t.set(e, r); for (const n of Object.keys(e)) void 0 !== e[n] && (r[n] = g(e[n], t)); return r; } if (Array.isArray(e)) { const n = t.get(e); if (void 0 !== n) return n; const r = []; return ( t.set(e, r), e.forEach((e) => { r.push(g(e, t)); }), r ); } return e; } }, 69038: (e, t, n) => { "use strict"; n.d(t, { $P: () => u, Sq: () => a, pE: () => o }); const r = 50, i = /\(error: (.*)\)/; function o(...e) { const t = e.sort((e, t) => e[0] - t[0]).map((e) => e[1]); return (e, n = 0) => { const o = [], a = e.split("\n"); for (let e = n; e < a.length; e++) { const n = a[e]; if (n.length > 1024) continue; const s = i.test(n) ? n.replace(i, "$1") : n; if (!s.match(/\S*Error: /)) { for (const e of t) { const t = e(s); if (t) { o.push(t); break; } } if (o.length >= r) break; } } return (function (e) { if (!e.length) return []; const t = e.slice(0, r), n = t[t.length - 1].function; n && /sentryWrapped/.test(n) && t.pop(); t.reverse(); const i = t[t.length - 1].function; i && /captureMessage|captureException/.test(i) && t.pop(); return t.map((e) => ({ ...e, filename: e.filename || t[t.length - 1].filename, function: e.function || "?" })); })(o); }; } function a(e) { return Array.isArray(e) ? o(...e) : e; } const s = ""; function u(e) { try { return (e && "function" == typeof e && e.name) || s; } catch (e) { return s; } } }, 39660: (e, t, n) => { "use strict"; n.d(t, { $G: () => i, U0: () => a, nK: () => o }); var r = n(81757); function i(e, t = 0) { return "string" != typeof e || 0 === t || e.length <= t ? e : `${e.slice(0, t)}...`; } function o(e, t) { if (!Array.isArray(e)) return ""; const n = []; for (let t = 0; t < e.length; t++) { const r = e[t]; try { n.push(String(r)); } catch (e) { n.push("[value cannot be serialized]"); } } return n.join(t); } function a(e, t = [], n = !1) { return t.some((t) => (function (e, t, n = !1) { return !!(0, r.HD)(e) && ((0, r.Kj)(t) ? t.test(e) : !!(0, r.HD)(t) && (n ? e === t : e.includes(t))); })(e, t, n) ); } }, 49798: (e, t, n) => { "use strict"; n.d(t, { Ak: () => o, Du: () => a, t$: () => s }); var r = n(58536); const i = (0, n(90063).Rf)(); function o() { if (!("fetch" in i)) return !1; try { return new Headers(), new Request("http://www.example.com"), new Response(), !0; } catch (e) { return !1; } } function a(e) { return e && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString()); } function s() { if (!o()) return !1; if (a(i.fetch)) return !0; let e = !1; const t = i.document; if (t && "function" == typeof t.createElement) try { const n = t.createElement("iframe"); (n.hidden = !0), t.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (e = a(n.contentWindow.fetch)), t.head.removeChild(n); } catch (e) { ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && r.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", e); } return e; } }, 97946: (e, t, n) => { "use strict"; n.d(t, { $2: () => a, WD: () => o, cW: () => s }); var r, i = n(81757); function o(e) { return new s((t) => { t(e); }); } function a(e) { return new s((t, n) => { n(e); }); } !(function (e) { e[(e.PENDING = 0)] = "PENDING"; e[(e.RESOLVED = 1)] = "RESOLVED"; e[(e.REJECTED = 2)] = "REJECTED"; })(r || (r = {})); class s { __init() { this._state = r.PENDING; } __init2() { this._handlers = []; } constructor(e) { s.prototype.__init.call(this), s.prototype.__init2.call(this), s.prototype.__init3.call(this), s.prototype.__init4.call(this), s.prototype.__init5.call(this), s.prototype.__init6.call(this); try { e(this._resolve, this._reject); } catch (e) { this._reject(e); } } then(e, t) { return new s((n, r) => { this._handlers.push([ !1, (t) => { if (e) try { n(e(t)); } catch (e) { r(e); } else n(t); }, (e) => { if (t) try { n(t(e)); } catch (e) { r(e); } else r(e); }, ]), this._executeHandlers(); }); } catch(e) { return this.then((e) => e, e); } finally(e) { return new s((t, n) => { let r, i; return this.then( (t) => { (i = !1), (r = t), e && e(); }, (t) => { (i = !0), (r = t), e && e(); } ).then(() => { i ? n(r) : t(r); }); }); } __init3() { this._resolve = (e) => { this._setResult(r.RESOLVED, e); }; } __init4() { this._reject = (e) => { this._setResult(r.REJECTED, e); }; } __init5() { this._setResult = (e, t) => { this._state === r.PENDING && ((0, i.J8)(t) ? t.then(this._resolve, this._reject) : ((this._state = e), (this._value = t), this._executeHandlers())); }; } __init6() { this._executeHandlers = () => { if (this._state === r.PENDING) return; const e = this._handlers.slice(); (this._handlers = []), e.forEach((e) => { e[0] || (this._state === r.RESOLVED && e[1](this._value), this._state === r.REJECTED && e[2](this._value), (e[0] = !0)); }); }; } } }, 7790: (e, t, n) => { "use strict"; n.d(t, { Z1: () => h, ph: () => c, yW: () => l }); var r = n(37392), i = n(90063); e = n.hmd(e); const o = (0, i.Rf)(), a = { nowSeconds: () => Date.now() / 1e3 }; const s = (0, r.KV)() ? (function () { try { return (0, r.l$)(e, "perf_hooks").performance; } catch (e) { return; } })() : (function () { const { performance: e } = o; if (!e || !e.now) return; return { now: () => e.now(), timeOrigin: Date.now() - e.now() }; })(), u = void 0 === s ? a : { nowSeconds: () => (s.timeOrigin + s.now()) / 1e3 }, l = a.nowSeconds.bind(a), c = u.nowSeconds.bind(u); let d; const h = (() => { const { performance: e } = o; if (!e || !e.now) return void (d = "none"); const t = 36e5, n = e.now(), r = Date.now(), i = e.timeOrigin ? Math.abs(e.timeOrigin + n - r) : t, a = i < t, s = e.timing && e.timing.navigationStart, u = "number" == typeof s ? Math.abs(s + n - r) : t; return a || u < t ? (i <= u ? ((d = "timeOrigin"), e.timeOrigin) : ((d = "navigationStart"), s)) : ((d = "dateNow"), r); })(); }, 49691: (e, t, n) => { "use strict"; n.d(t, { K: () => r, q: () => i }); const r = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"); function i(e) { const t = e.match(r); if (!e || !t) return; let n; return "1" === t[3] ? (n = !0) : "0" === t[3] && (n = !1), { traceId: t[1], parentSampled: n, parentSpanId: t[2] }; } }, 33483: (e, t, n) => { "use strict"; function r(e) { if (!e) return {}; const t = e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); if (!t) return {}; const n = t[6] || "", r = t[8] || ""; return { host: t[4], path: t[5], protocol: t[2], search: n, hash: r, relative: t[5] + n + r }; } function i(e) { return e.split(/[\?#]/, 1)[0]; } function o(e) { return e.split(/\\?\//).filter((e) => e.length > 0 && "," !== e).length; } n.d(t, { $A: () => o, en: () => r, rt: () => i }); }, 90063: (e, t, n) => { "use strict"; function r(e) { return e && e.Math == Math ? e : void 0; } n.d(t, { Rf: () => o, YO: () => a, n2: () => i }); const i = ("object" == typeof globalThis && r(globalThis)) || ("object" == typeof window && r(window)) || ("object" == typeof self && r(self)) || ("object" == typeof n.g && r(n.g)) || (function () { return this; })() || {}; function o() { return i; } function a(e, t, n) { const r = n || i, o = (r.__SENTRY__ = r.__SENTRY__ || {}); return o[e] || (o[e] = t()); } }, 62680: (e, t, n) => { "use strict"; var r = n(67286), i = n(89429), o = i(r("String.prototype.indexOf")); e.exports = function (e, t) { var n = r(e, !!t); return "function" == typeof n && o(e, ".prototype.") > -1 ? i(n) : n; }; }, 89429: (e, t, n) => { "use strict"; var r = n(4090), i = n(67286), o = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), s = i("%Reflect.apply%", !0) || r.call(a, o), u = i("%Object.getOwnPropertyDescriptor%", !0), l = i("%Object.defineProperty%", !0), c = i("%Math.max%"); if (l) try { l({}, "a", { value: 1 }); } catch (e) { l = null; } e.exports = function (e) { var t = s(r, a, arguments); u && l && u(t, "length").configurable && l(t, "length", { value: 1 + c(0, e.length - (arguments.length - 1)) }); return t; }; var d = function () { return s(r, o, arguments); }; l ? l(e.exports, "apply", { value: d }) : (e.exports.apply = d); }, 72779: (e, t) => { var n; !(function () { "use strict"; var r = {}.hasOwnProperty; function i() { for (var e = [], t = 0; t < arguments.length; t++) { var n = arguments[t]; if (n) { var o = typeof n; if ("string" === o || "number" === o) e.push(n); else if (Array.isArray(n)) { if (n.length) { var a = i.apply(null, n); a && e.push(a); } } else if ("object" === o) { if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]")) { e.push(n.toString()); continue; } for (var s in n) r.call(n, s) && n[s] && e.push(s); } } } return e.join(" "); } e.exports ? ((i.default = i), (e.exports = i)) : void 0 === (n = function () { return i; }.apply(t, [])) || (e.exports = n); })(); }, 29502: (e) => { "use strict"; function t(e, t, r) { r = r || 2; var o, a, s, u, d, h, f, _ = t && t.length, g = _ ? t[0] * r : e.length, m = n(e, 0, g, r, !0), v = []; if (!m || m.next === m.prev) return v; if ( (_ && (m = (function (e, t, r, i) { var o, a, s, u = []; for (o = 0, a = t.length; o < a; o++) (s = n(e, t[o] * i, o < a - 1 ? t[o + 1] * i : e.length, i, !1)) === s.next && (s.steiner = !0), u.push(p(s)); for (u.sort(l), o = 0; o < u.length; o++) r = c(u[o], r); return r; })(e, t, m, r)), e.length > 80 * r) ) { (o = s = e[0]), (a = u = e[1]); for (var y = r; y < g; y += r) (d = e[y]) < o && (o = d), (h = e[y + 1]) < a && (a = h), d > s && (s = d), h > u && (u = h); f = 0 !== (f = Math.max(s - o, u - a)) ? 32767 / f : 0; } return i(m, v, r, o, a, f, 0), v; } function n(e, t, n, r, i) { var o, a; if (i === E(e, t, n, r) > 0) for (o = t; o < n; o += r) a = S(o, e[o], e[o + 1], a); else for (o = n - r; o >= t; o -= r) a = S(o, e[o], e[o + 1], a); return a && m(a, a.next) && (T(a), (a = a.next)), a; } function r(e, t) { if (!e) return e; t || (t = e); var n, r = e; do { if (((n = !1), r.steiner || (!m(r, r.next) && 0 !== g(r.prev, r, r.next)))) r = r.next; else { if ((T(r), (r = t = r.prev) === r.next)) break; n = !0; } } while (n || r !== t); return t; } function i(e, t, n, l, c, d, p) { if (e) { !p && d && (function (e, t, n, r) { var i = e; do { 0 === i.z && (i.z = h(i.x, i.y, t, n, r)), (i.prevZ = i.prev), (i.nextZ = i.next), (i = i.next); } while (i !== e); (i.prevZ.nextZ = null), (i.prevZ = null), (function (e) { var t, n, r, i, o, a, s, u, l = 1; do { for (n = e, e = null, o = null, a = 0; n; ) { for (a++, r = n, s = 0, t = 0; t < l && (s++, (r = r.nextZ)); t++); for (u = l; s > 0 || (u > 0 && r); ) 0 !== s && (0 === u || !r || n.z <= r.z) ? ((i = n), (n = n.nextZ), s--) : ((i = r), (r = r.nextZ), u--), o ? (o.nextZ = i) : (e = i), (i.prevZ = o), (o = i); n = r; } (o.nextZ = null), (l *= 2); } while (a > 1); })(i); })(e, l, c, d); for (var f, _, g = e; e.prev !== e.next; ) if (((f = e.prev), (_ = e.next), d ? a(e, l, c, d) : o(e))) t.push((f.i / n) | 0), t.push((e.i / n) | 0), t.push((_.i / n) | 0), T(e), (e = _.next), (g = _.next); else if ((e = _) === g) { p ? (1 === p ? i((e = s(r(e), t, n)), t, n, l, c, d, 2) : 2 === p && u(e, t, n, l, c, d)) : i(r(e), t, n, l, c, d, 1); break; } } } function o(e) { var t = e.prev, n = e, r = e.next; if (g(t, n, r) >= 0) return !1; for (var i = t.x, o = n.x, a = r.x, s = t.y, u = n.y, l = r.y, c = i < o ? (i < a ? i : a) : o < a ? o : a, d = s < u ? (s < l ? s : l) : u < l ? u : l, h = i > o ? (i > a ? i : a) : o > a ? o : a, p = s > u ? (s > l ? s : l) : u > l ? u : l, _ = r.next; _ !== t; ) { if (_.x >= c && _.x <= h && _.y >= d && _.y <= p && f(i, s, o, u, a, l, _.x, _.y) && g(_.prev, _, _.next) >= 0) return !1; _ = _.next; } return !0; } function a(e, t, n, r) { var i = e.prev, o = e, a = e.next; if (g(i, o, a) >= 0) return !1; for (var s = i.x, u = o.x, l = a.x, c = i.y, d = o.y, p = a.y, _ = s < u ? (s < l ? s : l) : u < l ? u : l, m = c < d ? (c < p ? c : p) : d < p ? d : p, v = s > u ? (s > l ? s : l) : u > l ? u : l, y = c > d ? (c > p ? c : p) : d > p ? d : p, C = h(_, m, t, n, r), b = h(v, y, t, n, r), w = e.prevZ, S = e.nextZ; w && w.z >= C && S && S.z <= b; ) { if (w.x >= _ && w.x <= v && w.y >= m && w.y <= y && w !== i && w !== a && f(s, c, u, d, l, p, w.x, w.y) && g(w.prev, w, w.next) >= 0) return !1; if (((w = w.prevZ), S.x >= _ && S.x <= v && S.y >= m && S.y <= y && S !== i && S !== a && f(s, c, u, d, l, p, S.x, S.y) && g(S.prev, S, S.next) >= 0)) return !1; S = S.nextZ; } for (; w && w.z >= C; ) { if (w.x >= _ && w.x <= v && w.y >= m && w.y <= y && w !== i && w !== a && f(s, c, u, d, l, p, w.x, w.y) && g(w.prev, w, w.next) >= 0) return !1; w = w.prevZ; } for (; S && S.z <= b; ) { if (S.x >= _ && S.x <= v && S.y >= m && S.y <= y && S !== i && S !== a && f(s, c, u, d, l, p, S.x, S.y) && g(S.prev, S, S.next) >= 0) return !1; S = S.nextZ; } return !0; } function s(e, t, n) { var i = e; do { var o = i.prev, a = i.next.next; !m(o, a) && v(o, i, i.next, a) && b(o, a) && b(a, o) && (t.push((o.i / n) | 0), t.push((i.i / n) | 0), t.push((a.i / n) | 0), T(i), T(i.next), (i = e = a)), (i = i.next); } while (i !== e); return r(i); } function u(e, t, n, o, a, s) { var u = e; do { for (var l = u.next.next; l !== u.prev; ) { if (u.i !== l.i && _(u, l)) { var c = w(u, l); return (u = r(u, u.next)), (c = r(c, c.next)), i(u, t, n, o, a, s, 0), void i(c, t, n, o, a, s, 0); } l = l.next; } u = u.next; } while (u !== e); } function l(e, t) { return e.x - t.x; } function c(e, t) { var n = (function (e, t) { var n, r = t, i = e.x, o = e.y, a = -1 / 0; do { if (o <= r.y && o >= r.next.y && r.next.y !== r.y) { var s = r.x + ((o - r.y) * (r.next.x - r.x)) / (r.next.y - r.y); if (s <= i && s > a && ((a = s), (n = r.x < r.next.x ? r : r.next), s === i)) return n; } r = r.next; } while (r !== t); if (!n) return null; var u, l = n, c = n.x, h = n.y, p = 1 / 0; r = n; do { i >= r.x && r.x >= c && i !== r.x && f(o < h ? i : a, o, c, h, o < h ? a : i, o, r.x, r.y) && ((u = Math.abs(o - r.y) / (i - r.x)), b(r, e) && (u < p || (u === p && (r.x > n.x || (r.x === n.x && d(n, r))))) && ((n = r), (p = u))), (r = r.next); } while (r !== l); return n; })(e, t); if (!n) return t; var i = w(n, e); return r(i, i.next), r(n, n.next); } function d(e, t) { return g(e.prev, e, t.prev) < 0 && g(t.next, e, e.next) < 0; } function h(e, t, n, r, i) { return (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = ((e - n) * i) | 0) | (e << 8))) | (e << 4))) | (e << 2))) | (e << 1))) | ((t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = ((t - r) * i) | 0) | (t << 8))) | (t << 4))) | (t << 2))) | (t << 1))) << 1); } function p(e) { var t = e, n = e; do { (t.x < n.x || (t.x === n.x && t.y < n.y)) && (n = t), (t = t.next); } while (t !== e); return n; } function f(e, t, n, r, i, o, a, s) { return (i - a) * (t - s) >= (e - a) * (o - s) && (e - a) * (r - s) >= (n - a) * (t - s) && (n - a) * (o - s) >= (i - a) * (r - s); } function _(e, t) { return ( e.next.i !== t.i && e.prev.i !== t.i && !(function (e, t) { var n = e; do { if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && v(n, n.next, e, t)) return !0; n = n.next; } while (n !== e); return !1; })(e, t) && ((b(e, t) && b(t, e) && (function (e, t) { var n = e, r = !1, i = (e.x + t.x) / 2, o = (e.y + t.y) / 2; do { n.y > o != n.next.y > o && n.next.y !== n.y && i < ((n.next.x - n.x) * (o - n.y)) / (n.next.y - n.y) + n.x && (r = !r), (n = n.next); } while (n !== e); return r; })(e, t) && (g(e.prev, e, t.prev) || g(e, t.prev, t))) || (m(e, t) && g(e.prev, e, e.next) > 0 && g(t.prev, t, t.next) > 0)) ); } function g(e, t, n) { return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y); } function m(e, t) { return e.x === t.x && e.y === t.y; } function v(e, t, n, r) { var i = C(g(e, t, n)), o = C(g(e, t, r)), a = C(g(n, r, e)), s = C(g(n, r, t)); return (i !== o && a !== s) || !(0 !== i || !y(e, n, t)) || !(0 !== o || !y(e, r, t)) || !(0 !== a || !y(n, e, r)) || !(0 !== s || !y(n, t, r)); } function y(e, t, n) { return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y); } function C(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; } function b(e, t) { return g(e.prev, e, e.next) < 0 ? g(e, t, e.next) >= 0 && g(e, e.prev, t) >= 0 : g(e, t, e.prev) < 0 || g(e, e.next, t) < 0; } function w(e, t) { var n = new x(e.i, e.x, e.y), r = new x(t.i, t.x, t.y), i = e.next, o = t.prev; return (e.next = t), (t.prev = e), (n.next = i), (i.prev = n), (r.next = n), (n.prev = r), (o.next = r), (r.prev = o), r; } function S(e, t, n, r) { var i = new x(e, t, n); return r ? ((i.next = r.next), (i.prev = r), (r.next.prev = i), (r.next = i)) : ((i.prev = i), (i.next = i)), i; } function T(e) { (e.next.prev = e.prev), (e.prev.next = e.next), e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ); } function x(e, t, n) { (this.i = e), (this.x = t), (this.y = n), (this.prev = null), (this.next = null), (this.z = 0), (this.prevZ = null), (this.nextZ = null), (this.steiner = !1); } function E(e, t, n, r) { for (var i = 0, o = t, a = n - r; o < n; o += r) (i += (e[a] - e[o]) * (e[o + 1] + e[a + 1])), (a = o); return i; } (e.exports = t), (e.exports.default = t), (t.deviation = function (e, t, n, r) { var i = t && t.length, o = i ? t[0] * n : e.length, a = Math.abs(E(e, 0, o, n)); if (i) for (var s = 0, u = t.length; s < u; s++) { var l = t[s] * n, c = s < u - 1 ? t[s + 1] * n : e.length; a -= Math.abs(E(e, l, c, n)); } var d = 0; for (s = 0; s < r.length; s += 3) { var h = r[s] * n, p = r[s + 1] * n, f = r[s + 2] * n; d += Math.abs((e[h] - e[f]) * (e[p + 1] - e[h + 1]) - (e[h] - e[p]) * (e[f + 1] - e[h + 1])); } return 0 === a && 0 === d ? 0 : Math.abs((d - a) / a); }), (t.flatten = function (e) { for (var t = e[0][0].length, n = { vertices: [], holes: [], dimensions: t }, r = 0, i = 0; i < e.length; i++) { for (var o = 0; o < e[i].length; o++) for (var a = 0; a < t; a++) n.vertices.push(e[i][o][a]); i > 0 && ((r += e[i - 1].length), n.holes.push(r)); } return n; }); }, 79706: function (e, t, n) { var r; !(function (i) { var o = i.Promise, a = o && "resolve" in o && "reject" in o && "all" in o && "race" in o && (function () { var e; return ( new o(function (t) { e = t; }), "function" == typeof e ); })(); t ? ((t.Promise = a ? o : E), (t.Polyfill = E)) : void 0 === (r = function () { return a ? o : E; }.call(t, n, t, e)) || (e.exports = r); var s = "pending", u = "sealed", l = "fulfilled", c = "rejected", d = function () {}; function h(e) { return "[object Array]" === Object.prototype.toString.call(e); } var p, f = "undefined" != typeof setImmediate ? setImmediate : setTimeout, _ = []; function g() { for (var e = 0; e < _.length; e++) _[e][0](_[e][1]); (_ = []), (p = !1); } function m(e, t) { _.push([e, t]), p || ((p = !0), f(g, 0)); } function v(e) { var t = e.owner, n = t.state_, r = t.data_, i = e[n], o = e.then; if ("function" == typeof i) { n = l; try { r = i(r); } catch (e) { w(o, e); } } y(o, r) || (n === l && C(o, r), n === c && w(o, r)); } function y(e, t) { var n; try { if (e === t) throw new TypeError("A promises callback cannot return that same promise."); if (t && ("function" == typeof t || "object" == typeof t)) { var r = t.then; if ("function" == typeof r) return ( r.call( t, function (r) { n || ((n = !0), t !== r ? C(e, r) : b(e, r)); }, function (t) { n || ((n = !0), w(e, t)); } ), !0 ); } } catch (t) { return n || w(e, t), !0; } return !1; } function C(e, t) { (e !== t && y(e, t)) || b(e, t); } function b(e, t) { e.state_ === s && ((e.state_ = u), (e.data_ = t), m(T, e)); } function w(e, t) { e.state_ === s && ((e.state_ = u), (e.data_ = t), m(x, e)); } function S(e) { var t = e.then_; e.then_ = void 0; for (var n = 0; n < t.length; n++) v(t[n]); } function T(e) { (e.state_ = l), S(e); } function x(e) { (e.state_ = c), S(e); } function E(e) { if ("function" != typeof e) throw new TypeError("Promise constructor takes a function argument"); if (this instanceof E == !1) throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); (this.then_ = []), (function (e, t) { function n(e) { w(t, e); } try { e(function (e) { C(t, e); }, n); } catch (e) { n(e); } })(e, this); } (E.prototype = { constructor: E, state_: s, then_: null, data_: void 0, then: function (e, t) { var n = { owner: this, then: new this.constructor(d), fulfilled: e, rejected: t }; return this.state_ === l || this.state_ === c ? m(v, n) : this.then_.push(n), n.then; }, catch: function (e) { return this.then(null, e); }, }), (E.all = function (e) { if (!h(e)) throw new TypeError("You must pass an array to Promise.all()."); return new this(function (t, n) { var r = [], i = 0; function o(e) { return ( i++, function (n) { (r[e] = n), --i || t(r); } ); } for (var a, s = 0; s < e.length; s++) (a = e[s]) && "function" == typeof a.then ? a.then(o(s), n) : (r[s] = a); i || t(r); }); }), (E.race = function (e) { if (!h(e)) throw new TypeError("You must pass an array to Promise.race()."); return new this(function (t, n) { for (var r, i = 0; i < e.length; i++) (r = e[i]) && "function" == typeof r.then ? r.then(t, n) : t(r); }); }), (E.resolve = function (e) { return e && "object" == typeof e && e.constructor === this ? e : new this(function (t) { t(e); }); }), (E.reject = function (e) { return new this(function (t, n) { n(e); }); }); })("undefined" != typeof window ? window : void 0 !== n.g ? n.g : "undefined" != typeof self ? self : this); }, 87819: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(62824); Object.keys(r).forEach(function (e) { "default" === e || t.hasOwnProperty(e) || Object.defineProperty(t, e, { enumerable: !0, get: function () { return r[e]; }, }); }); }, 10475: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(99413); r.registerVersion("firebase", "9.23.0", "app"), Object.keys(r).forEach(function (e) { "default" === e || t.hasOwnProperty(e) || Object.defineProperty(t, e, { enumerable: !0, get: function () { return r[e]; }, }); }); }, 84882: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(77661); Object.keys(r).forEach(function (e) { "default" === e || t.hasOwnProperty(e) || Object.defineProperty(t, e, { enumerable: !0, get: function () { return r[e]; }, }); }); }, 17003: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(19917); Object.keys(r).forEach(function (e) { "default" === e || t.hasOwnProperty(e) || Object.defineProperty(t, e, { enumerable: !0, get: function () { return r[e]; }, }); }); }, 20627: () => { !(function (e, t) { "use strict"; function n(e) { return document.createElement(e); } function r(e, t) { for (var n in t) try { e.style[n] = t[n]; } catch (e) {} return e; } function i(e) { return null == e ? String(e) : "object" == typeof e || "function" == typeof e ? Object.prototype.toString .call(e) .match(/\s([a-z]+)/i)[1] .toLowerCase() || "object" : typeof e; } function o(e, t) { if ("array" !== i(t)) return -1; if (t.indexOf) return t.indexOf(e); for (var n = 0, r = t.length; n < r; n++) if (t[n] === e) return n; return -1; } function a() { var e = arguments; for (var t in e[1]) if (e[1].hasOwnProperty(t)) switch (i(e[1][t])) { case "object": e[0][t] = a({}, e[0][t], e[1][t]); break; case "array": e[0][t] = e[1][t].slice(0); break; default: e[0][t] = e[1][t]; } return e.length > 2 ? a.apply(null, [e[0]].concat(Array.prototype.slice.call(e, 2))) : e[0]; } function s(e) { return 1 === (e = Math.round(255 * e).toString(16)).length ? "0" + e : e; } function u(e, t, n, r) { e.addEventListener ? e[r ? "removeEventListener" : "addEventListener"](t, n, !1) : e.attachEvent && e[r ? "detachEvent" : "attachEvent"]("on" + t, n); } var l; !(function () { var t = e.performance; if (t && (t.now || t.webkitNow)) { var n = t.now ? "now" : "webkitNow"; l = t[n].bind(t); } else l = function () { return +new Date(); }; })(); var c = e.cancelAnimationFrame || e.cancelRequestAnimationFrame, d = e.requestAnimationFrame; !(function () { for (var t = ["moz", "webkit", "o"], n = 0, r = 0, i = t.length; r < i && !c; ++r) (c = e[t[r] + "CancelAnimationFrame"] || e[t[r] + "CancelRequestAnimationFrame"]), (d = c && e[t[r] + "RequestAnimationFrame"]); c || ((d = function (t) { var r = l(), i = Math.max(0, 16 - (r - n)); return ( (n = r + i), e.setTimeout(function () { t(r + i); }, i) ); }), (c = function (e) { clearTimeout(e); })); })(); var h = "string" === i(document.createElement("div").textContent) ? "textContent" : "innerText"; function p(e, t) { "object" === i(e) && undefined === e.nodeType && ((t = e), (e = document.body)), e || (e = document.body); var g, m, v, y, C, b, w, S, T, x = this, E = a({}, p.defaults, t || {}), L = {}, A = [], I = 100, M = [], P = E.threshold, O = 0, k = l() - P, R = [], D = [], N = "fps" === E.show; function B(e, t, n, r) { return m[0 | e][Math.round(Math.min(((t - n) / (r - n)) * I, I))]; } function F() { L.legend.fps !== N && ((L.legend.fps = N), (L.legend[h] = N ? "FPS" : "ms")), (w = N ? x.fps : x.duration), (L.count[h] = w > 999 ? "999+" : w.toFixed(w > 99 ? 0 : E.decimals)); } function U() { if ( ((v = l()), k < v - E.threshold && ((x.fps -= x.fps / Math.max(1, (60 * E.smoothing) / E.interval)), (x.duration = 1e3 / x.fps)), (function () { for (S = E.history; S--; ) (R[S] = 0 === S ? x.fps : R[S - 1]), (D[S] = 0 === S ? x.duration : D[S - 1]); })(), F(), E.heat) ) { if (M.length) for (S = M.length; S--; ) M[S].el.style[g[M[S].name].heatOn] = N ? B(g[M[S].name].heatmap, x.fps, 0, E.maxFps) : B(g[M[S].name].heatmap, x.duration, E.threshold, 0); if (L.graph && g.column.heatOn) for (S = A.length; S--; ) A[S].style[g.column.heatOn] = N ? B(g.column.heatmap, R[S], 0, E.maxFps) : B(g.column.heatmap, D[S], E.threshold, 0); } if (L.graph) for (T = 0; T < E.history; T++) A[T].style.height = (N ? (R[T] ? Math.round((b / E.maxFps) * Math.min(R[T], E.maxFps)) : 0) : D[T] ? Math.round((b / E.threshold) * Math.min(D[T], E.threshold)) : 0) + "px"; } function j() { E.interval < 20 ? ((y = d(j)), U()) : ((y = setTimeout(j, E.interval)), (C = d(U))); } function G(e) { (e = e || window.event).preventDefault ? (e.preventDefault(), e.stopPropagation()) : ((e.returnValue = !1), (e.cancelBubble = !0)), x.toggle(); } function H() { E.toggleOn && u(L.container, E.toggleOn, G, 1), e.removeChild(L.container); } function V() { for (var t in (L.container && H(), (function () { if (((g = p.theme[E.theme]), !(m = g.compiledHeatmaps || []).length && g.heatmaps.length)) { for (T = 0; T < g.heatmaps.length; T++) for (m[T] = [], S = 0; S <= I; S++) m[T][S] = ((e = (0.33 / I) * S), (t = g.heatmaps[T].saturation), (r = void 0), (i = void 0), (o = void 0), (a = void 0), (u = void 0), (l = void 0), (c = void 0), 0 == (a = (n = g.heatmaps[T].lightness) <= 0.5 ? n * (1 + t) : n + t - n * t) ? "#000" : ((c = a * ((a - (u = 2 * n - a)) / a) * ((e *= 6) - (l = Math.floor(e)))), 0 === l || 6 === l ? ((r = a), (i = u + c), (o = u)) : 1 === l ? ((r = a - c), (i = a), (o = u)) : 2 === l ? ((r = u), (i = a), (o = u + c)) : 3 === l ? ((r = u), (i = a - c), (o = a)) : 4 === l ? ((r = u + c), (i = u), (o = a)) : ((r = a), (i = u), (o = a - c)), "#" + s(r) + s(i) + s(o))); g.compiledHeatmaps = m; } var e, t, n, r, i, o, a, u, l, c; })(), (L.container = r(n("div"), g.container)), (L.count = L.container.appendChild(r(n("div"), g.count))), (L.legend = L.container.appendChild(r(n("div"), g.legend))), (L.graph = E.graph ? L.container.appendChild(r(n("div"), g.graph)) : 0), (M.length = 0), L)) L[t] && g[t].heatOn && M.push({ name: t, el: L[t] }); if (((A.length = 0), L.graph)) for (L.graph.style.width = E.history * g.column.width + (E.history - 1) * g.column.spacing + "px", S = 0; S < E.history; S++) (A[S] = L.graph.appendChild(r(n("div"), g.column))), (A[S].style.position = "absolute"), (A[S].style.bottom = 0), (A[S].style.right = S * g.column.width + S * g.column.spacing + "px"), (A[S].style.width = g.column.width + "px"), (A[S].style.height = "0px"); Z(), F(), e.appendChild(L.container), L.graph && (b = L.graph.clientHeight), E.toggleOn && ("click" === E.toggleOn && (L.container.style.cursor = "pointer"), u(L.container, E.toggleOn, G)); } function Z() { r(L.container, E); } (x.options = E), (x.fps = 0), (x.duration = 0), (x.isPaused = 0), (x.tickStart = function () { O = l(); }), (x.tick = function () { (v = l()), (P += (v - k - P) / E.smoothing), (x.fps = 1e3 / P), (x.duration = O < k ? P : v - O), (k = v); }), (x.pause = function () { return y && ((x.isPaused = 1), clearTimeout(y), c(y), c(C), (y = C = 0)), x; }), (x.resume = function () { return y || ((x.isPaused = 0), j()), x; }), (x.set = function (e, t) { return (E[e] = t), (N = "fps" === E.show), -1 !== o(e, f) && V(), -1 !== o(e, _) && Z(), x; }), (x.showDuration = function () { return x.set("show", "ms"), x; }), (x.showFps = function () { return x.set("show", "fps"), x; }), (x.toggle = function () { return x.set("show", N ? "ms" : "fps"), x; }), (x.hide = function () { return x.pause(), (L.container.style.display = "none"), x; }), (x.show = function () { return x.resume(), (L.container.style.display = "block"), x; }), (x.destroy = function () { x.pause(), H(), (x.tick = x.tickStart = function () {}); }), V(), j(); } (p.extend = a), (window.FPSMeter = p), (p.defaults = { interval: 100, smoothing: 10, show: "fps", toggleOn: "click", decimals: 1, maxFps: 60, threshold: 100, position: "absolute", zIndex: 10, left: "5px", top: "5px", right: "auto", bottom: "auto", margin: "0 0 0 0", theme: "dark", heat: 0, graph: 0, history: 20 }); var f = ["toggleOn", "theme", "heat", "graph", "history"], _ = ["position", "zIndex", "left", "top", "right", "bottom", "margin"]; })(window), (function (e, t, n) { "use strict"; t.theme = {}; var r = (t.theme.base = { heatmaps: [], container: { heatOn: null, heatmap: null, padding: "5px", minWidth: "95px", height: "30px", lineHeight: "30px", textAlign: "right", textShadow: "none" }, count: { heatOn: null, heatmap: null, position: "absolute", top: 0, right: 0, padding: "5px 10px", height: "30px", fontSize: "24px", fontFamily: "Consolas, Andale Mono, monospace", zIndex: 2 }, legend: { heatOn: null, heatmap: null, position: "absolute", top: 0, left: 0, padding: "5px 10px", height: "30px", fontSize: "12px", lineHeight: "32px", fontFamily: "sans-serif", textAlign: "left", zIndex: 2 }, graph: { heatOn: null, heatmap: null, position: "relative", boxSizing: "padding-box", MozBoxSizing: "padding-box", height: "100%", zIndex: 1 }, column: { width: 4, spacing: 1, heatOn: null, heatmap: null } }); (t.theme.dark = t.extend({}, r, { heatmaps: [{ saturation: 0.8, lightness: 0.8 }], container: { background: "#222", color: "#fff", border: "1px solid #1a1a1a", textShadow: "1px 1px 0 #222" }, count: { heatOn: "color" }, column: { background: "#3f3f3f" } })), (t.theme.light = t.extend({}, r, { heatmaps: [{ saturation: 0.5, lightness: 0.5 }], container: { color: "#666", background: "#fff", textShadow: "1px 1px 0 rgba(255,255,255,.5), -1px -1px 0 rgba(255,255,255,.5)", boxShadow: "0 0 0 1px rgba(0,0,0,.1)" }, count: { heatOn: "color" }, column: { background: "#eaeaea" } })), (t.theme.colorful = t.extend({}, r, { heatmaps: [{ saturation: 0.5, lightness: 0.6 }], container: { heatOn: "backgroundColor", background: "#888", color: "#fff", textShadow: "1px 1px 0 rgba(0,0,0,.2)", boxShadow: "0 0 0 1px rgba(0,0,0,.1)" }, column: { background: "#777", backgroundColor: "rgba(0,0,0,.2)" } })), (t.theme.transparent = t.extend({}, r, { heatmaps: [{ saturation: 0.8, lightness: 0.5 }], container: { padding: 0, color: "#fff", textShadow: "1px 1px 0 rgba(0,0,0,.5)" }, count: { padding: "0 5px", height: "40px", lineHeight: "40px" }, legend: { padding: "0 5px", height: "40px", lineHeight: "42px" }, graph: { height: "40px" }, column: { width: 5, background: "#999", heatOn: "backgroundColor", opacity: 0.5 } })); })(window, FPSMeter); }, 37795: (e) => { "use strict"; var t = Array.prototype.slice, n = Object.prototype.toString; e.exports = function (e) { var r = this; if ("function" != typeof r || "[object Function]" !== n.call(r)) throw new TypeError("Function.prototype.bind called on incompatible " + r); for (var i, o = t.call(arguments, 1), a = Math.max(0, r.length - o.length), s = [], u = 0; u < a; u++) s.push("$" + u); if ( ((i = Function( "binder", "return function (" + s.join(",") + "){ return binder.apply(this,arguments); }" )(function () { if (this instanceof i) { var n = r.apply(this, o.concat(t.call(arguments))); return Object(n) === n ? n : this; } return r.apply(e, o.concat(t.call(arguments))); })), r.prototype) ) { var l = function () {}; (l.prototype = r.prototype), (i.prototype = new l()), (l.prototype = null); } return i; }; }, 4090: (e, t, n) => { "use strict"; var r = n(37795); e.exports = Function.prototype.bind || r; }, 67286: (e, t, n) => { "use strict"; var r, i = SyntaxError, o = Function, a = TypeError, s = function (e) { try { return o('"use strict"; return (' + e + ").constructor;")(); } catch (e) {} }, u = Object.getOwnPropertyDescriptor; if (u) try { u({}, ""); } catch (e) { u = null; } var l = function () { throw new a(); }, c = u ? (function () { try { return l; } catch (e) { try { return u(arguments, "callee").get; } catch (e) { return l; } } })() : l, d = n(32636)(), h = n(18486)(), p = Object.getPrototypeOf || (h ? function (e) { return e.__proto__; } : null), f = {}, _ = "undefined" != typeof Uint8Array && p ? p(Uint8Array) : r, g = { "%AggregateError%": "undefined" == typeof AggregateError ? r : AggregateError, "%Array%": Array, "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? r : ArrayBuffer, "%ArrayIteratorPrototype%": d && p ? p([][Symbol.iterator]()) : r, "%AsyncFromSyncIteratorPrototype%": r, "%AsyncFunction%": f, "%AsyncGenerator%": f, "%AsyncGeneratorFunction%": f, "%AsyncIteratorPrototype%": f, "%Atomics%": "undefined" == typeof Atomics ? r : Atomics, "%BigInt%": "undefined" == typeof BigInt ? r : BigInt, "%BigInt64Array%": "undefined" == typeof BigInt64Array ? r : BigInt64Array, "%BigUint64Array%": "undefined" == typeof BigUint64Array ? r : BigUint64Array, "%Boolean%": Boolean, "%DataView%": "undefined" == typeof DataView ? r : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": "undefined" == typeof Float32Array ? r : Float32Array, "%Float64Array%": "undefined" == typeof Float64Array ? r : Float64Array, "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? r : FinalizationRegistry, "%Function%": o, "%GeneratorFunction%": f, "%Int8Array%": "undefined" == typeof Int8Array ? r : Int8Array, "%Int16Array%": "undefined" == typeof Int16Array ? r : Int16Array, "%Int32Array%": "undefined" == typeof Int32Array ? r : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": d && p ? p(p([][Symbol.iterator]())) : r, "%JSON%": "object" == typeof JSON ? JSON : r, "%Map%": "undefined" == typeof Map ? r : Map, "%MapIteratorPrototype%": "undefined" != typeof Map && d && p ? p(new Map()[Symbol.iterator]()) : r, "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": "undefined" == typeof Promise ? r : Promise, "%Proxy%": "undefined" == typeof Proxy ? r : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": "undefined" == typeof Reflect ? r : Reflect, "%RegExp%": RegExp, "%Set%": "undefined" == typeof Set ? r : Set, "%SetIteratorPrototype%": "undefined" != typeof Set && d && p ? p(new Set()[Symbol.iterator]()) : r, "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? r : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": d && p ? p(""[Symbol.iterator]()) : r, "%Symbol%": d ? Symbol : r, "%SyntaxError%": i, "%ThrowTypeError%": c, "%TypedArray%": _, "%TypeError%": a, "%Uint8Array%": "undefined" == typeof Uint8Array ? r : Uint8Array, "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? r : Uint8ClampedArray, "%Uint16Array%": "undefined" == typeof Uint16Array ? r : Uint16Array, "%Uint32Array%": "undefined" == typeof Uint32Array ? r : Uint32Array, "%URIError%": URIError, "%WeakMap%": "undefined" == typeof WeakMap ? r : WeakMap, "%WeakRef%": "undefined" == typeof WeakRef ? r : WeakRef, "%WeakSet%": "undefined" == typeof WeakSet ? r : WeakSet }; if (p) try { null.error; } catch (e) { var m = p(p(e)); g["%Error.prototype%"] = m; } var v = function e(t) { var n; if ("%AsyncFunction%" === t) n = s("async function () {}"); else if ("%GeneratorFunction%" === t) n = s("function* () {}"); else if ("%AsyncGeneratorFunction%" === t) n = s("async function* () {}"); else if ("%AsyncGenerator%" === t) { var r = e("%AsyncGeneratorFunction%"); r && (n = r.prototype); } else if ("%AsyncIteratorPrototype%" === t) { var i = e("%AsyncGenerator%"); i && p && (n = p(i.prototype)); } return (g[t] = n), n; }, y = { "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, C = n(4090), b = n(23198), w = C.call(Function.call, Array.prototype.concat), S = C.call(Function.apply, Array.prototype.splice), T = C.call(Function.call, String.prototype.replace), x = C.call(Function.call, String.prototype.slice), E = C.call(Function.call, RegExp.prototype.exec), L = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, A = /\\(\\)?/g, I = function (e, t) { var n, r = e; if ((b(y, r) && (r = "%" + (n = y[r])[0] + "%"), b(g, r))) { var o = g[r]; if ((o === f && (o = v(r)), void 0 === o && !t)) throw new a("intrinsic " + e + " exists, but is not available. Please file an issue!"); return { alias: n, name: r, value: o }; } throw new i("intrinsic " + e + " does not exist!"); }; e.exports = function (e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); if (null === E(/^%?[^%]*%?$/, e)) throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); var n = (function (e) { var t = x(e, 0, 1), n = x(e, -1); if ("%" === t && "%" !== n) throw new i("invalid intrinsic syntax, expected closing `%`"); if ("%" === n && "%" !== t) throw new i("invalid intrinsic syntax, expected opening `%`"); var r = []; return ( T(e, L, function (e, t, n, i) { r[r.length] = n ? T(i, A, "$1") : t || e; }), r ); })(e), r = n.length > 0 ? n[0] : "", o = I("%" + r + "%", t), s = o.name, l = o.value, c = !1, d = o.alias; d && ((r = d[0]), S(n, w([0, 1], d))); for (var h = 1, p = !0; h < n.length; h += 1) { var f = n[h], _ = x(f, 0, 1), m = x(f, -1); if (('"' === _ || "'" === _ || "`" === _ || '"' === m || "'" === m || "`" === m) && _ !== m) throw new i("property names with quotes must have matching quotes"); if ((("constructor" !== f && p) || (c = !0), b(g, (s = "%" + (r += "." + f) + "%")))) l = g[s]; else if (null != l) { if (!(f in l)) { if (!t) throw new a("base intrinsic for " + e + " exists, but the property is not available."); return; } if (u && h + 1 >= n.length) { var v = u(l, f); l = (p = !!v) && "get" in v && !("originalValue" in v.get) ? v.get : l[f]; } else (p = b(l, f)), (l = l[f]); p && !c && (g[s] = l); } } return l; }; }, 64770: (e, t, n) => { "use strict"; function r(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function i(e, t) { (e.prototype = Object.create(t.prototype)), (e.prototype.constructor = e), (e.__proto__ = t); } n.r(t), n.d(t, { Animation: () => Wt, Back: () => Yn, Bounce: () => Xn, Circ: () => $n, Cubic: () => Gn, Elastic: () => zn, Expo: () => Kn, GSCache: () => Yt, Linear: () => Un, Power0: () => Rn, Power1: () => Dn, Power2: () => Nn, Power3: () => Bn, Power4: () => Fn, PropTween: () => Cn, Quad: () => jn, Quart: () => Hn, Quint: () => Vn, Sine: () => qn, SteppedEase: () => Wn, Strong: () => Zn, Timeline: () => Xt, TimelineLite: () => Xt, TimelineMax: () => Xt, Tween: () => an, TweenLite: () => an, TweenMax: () => an, _checkPlugin: () => Qt, _colorExp: () => Mt, _colorStringFilter: () => Ot, _config: () => C, _forEachName: () => fe, _getCache: () => he, _getProperty: () => pe, _getSetter: () => dn, _isString: () => M, _isUndefined: () => k, _missingPlugin: () => K, _numExp: () => G, _numWithUnitExp: () => H, _parseRelative: () => me, _plugins: () => ae, _relExp: () => Z, _removeLinkedListItem: () => Ie, _renderComplexString: () => fn, _replaceRandom: () => gt, _round: () => _e, _roundModifier: () => st, _setDefaults: () => Se, _sortPropTweensByPriority: () => yn, _ticker: () => kt, clamp: () => Qe, default: () => kn, distribute: () => at, getUnit: () => Je, gsap: () => kn, interpolate: () => vt, mapRange: () => mt, normalize: () => ht, pipe: () => ct, random: () => lt, selector: () => it, shuffle: () => ot, snap: () => ut, splitColor: () => Lt, toArray: () => rt, unitize: () => dt, wrap: () => ft, wrapYoyo: () => _t }); var o, a, s, u, l, c, d, h, p, f, _, g, m, v, y, C = { autoSleep: 120, force3D: "auto", nullTargetWarn: 1, units: { lineHeight: "" } }, b = { duration: 0.5, overwrite: !1, delay: 0 }, w = 1e8, S = 1e-8, T = 2 * Math.PI, x = T / 4, E = 0, L = Math.sqrt, A = Math.cos, I = Math.sin, M = function (e) { return "string" == typeof e; }, P = function (e) { return "function" == typeof e; }, O = function (e) { return "number" == typeof e; }, k = function (e) { return void 0 === e; }, R = function (e) { return "object" == typeof e; }, D = function (e) { return !1 !== e; }, N = function () { return "undefined" != typeof window; }, B = function (e) { return P(e) || M(e); }, F = ("function" == typeof ArrayBuffer && ArrayBuffer.isView) || function () {}, U = Array.isArray, j = /(?:-?\.?\d|\.)+/gi, G = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, H = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, V = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, Z = /[+-]=-?[.\d]+/, z = /[^,'"\[\]\s]+/gi, Y = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, W = {}, X = {}, q = function (e) { return (X = Te(e, W)) && kn; }, K = function (e, t) { return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()"); }, $ = function (e, t) { return !t && console.warn(e); }, J = function (e, t) { return (e && (W[e] = t) && X && (X[e] = t)) || W; }, Q = function () { return 0; }, ee = { suppressEvents: !0, isStart: !0, kill: !1 }, te = { suppressEvents: !0, kill: !1 }, ne = { suppressEvents: !0 }, re = {}, ie = [], oe = {}, ae = {}, se = {}, ue = 30, le = [], ce = "", de = function (e) { var t, n, r = e[0]; if ((R(r) || P(r) || (e = [e]), !(t = (r._gsap || {}).harness))) { for (n = le.length; n-- && !le[n].targetTest(r); ); t = le[n]; } for (n = e.length; n--; ) (e[n] && (e[n]._gsap || (e[n]._gsap = new Yt(e[n], t)))) || e.splice(n, 1); return e; }, he = function (e) { return e._gsap || de(rt(e))[0]._gsap; }, pe = function (e, t, n) { return (n = e[t]) && P(n) ? e[t]() : (k(n) && e.getAttribute && e.getAttribute(t)) || n; }, fe = function (e, t) { return (e = e.split(",")).forEach(t) || e; }, _e = function (e) { return Math.round(1e5 * e) / 1e5 || 0; }, ge = function (e) { return Math.round(1e7 * e) / 1e7 || 0; }, me = function (e, t) { var n = t.charAt(0), r = parseFloat(t.substr(2)); return (e = parseFloat(e)), "+" === n ? e + r : "-" === n ? e - r : "*" === n ? e * r : e / r; }, ve = function (e, t) { for (var n = t.length, r = 0; e.indexOf(t[r]) < 0 && ++r < n; ); return r < n; }, ye = function () { var e, t, n = ie.length, r = ie.slice(0); for (oe = {}, ie.length = 0, e = 0; e < n; e++) (t = r[e]) && t._lazy && (t.render(t._lazy[0], t._lazy[1], !0)._lazy = 0); }, Ce = function (e, t, n, r) { ie.length && !a && ye(), e.render(t, n, r || (a && t < 0 && (e._initted || e._startAt))), ie.length && !a && ye(); }, be = function (e) { var t = parseFloat(e); return (t || 0 === t) && (e + "").match(z).length < 2 ? t : M(e) ? e.trim() : e; }, we = function (e) { return e; }, Se = function (e, t) { for (var n in t) n in e || (e[n] = t[n]); return e; }, Te = function (e, t) { for (var n in t) e[n] = t[n]; return e; }, xe = function e(t, n) { for (var r in n) "__proto__" !== r && "constructor" !== r && "prototype" !== r && (t[r] = R(n[r]) ? e(t[r] || (t[r] = {}), n[r]) : n[r]); return t; }, Ee = function (e, t) { var n, r = {}; for (n in e) n in t || (r[n] = e[n]); return r; }, Le = function (e) { var t, n = e.parent || u, r = e.keyframes ? ((t = U(e.keyframes)), function (e, n) { for (var r in n) r in e || ("duration" === r && t) || "ease" === r || (e[r] = n[r]); }) : Se; if (D(e.inherit)) for (; n; ) r(e, n.vars.defaults), (n = n.parent || n._dp); return e; }, Ae = function (e, t, n, r, i) { void 0 === n && (n = "_first"), void 0 === r && (r = "_last"); var o, a = e[r]; if (i) for (o = t[i]; a && a[i] > o; ) a = a._prev; return a ? ((t._next = a._next), (a._next = t)) : ((t._next = e[n]), (e[n] = t)), t._next ? (t._next._prev = t) : (e[r] = t), (t._prev = a), (t.parent = t._dp = e), t; }, Ie = function (e, t, n, r) { void 0 === n && (n = "_first"), void 0 === r && (r = "_last"); var i = t._prev, o = t._next; i ? (i._next = o) : e[n] === t && (e[n] = o), o ? (o._prev = i) : e[r] === t && (e[r] = i), (t._next = t._prev = t.parent = null); }, Me = function (e, t) { e.parent && (!t || e.parent.autoRemoveChildren) && e.parent.remove && e.parent.remove(e), (e._act = 0); }, Pe = function (e, t) { if (e && (!t || t._end > e._dur || t._start < 0)) for (var n = e; n; ) (n._dirty = 1), (n = n.parent); return e; }, Oe = function (e, t, n, r) { return e._startAt && (a ? e._startAt.revert(te) : (e.vars.immediateRender && !e.vars.autoRevert) || e._startAt.render(t, !0, r)); }, ke = function e(t) { return !t || (t._ts && e(t.parent)); }, Re = function (e) { return e._repeat ? De(e._tTime, (e = e.duration() + e._rDelay)) * e : 0; }, De = function (e, t) { var n = Math.floor((e /= t)); return e && n === e ? n - 1 : n; }, Ne = function (e, t) { return (e - t._start) * t._ts + (t._ts >= 0 ? 0 : t._dirty ? t.totalDuration() : t._tDur); }, Be = function (e) { return (e._end = ge(e._start + (e._tDur / Math.abs(e._ts || e._rts || S) || 0))); }, Fe = function (e, t) { var n = e._dp; return n && n.smoothChildTiming && e._ts && ((e._start = ge(n._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts))), Be(e), n._dirty || Pe(n, e)), e; }, Ue = function (e, t) { var n; if (((t._time || (!t._dur && t._initted) || (t._start < e._time && (t._dur || !t.add))) && ((n = Ne(e.rawTime(), t)), (!t._dur || $e(0, t.totalDuration(), n) - t._tTime > S) && t.render(n, !0)), Pe(e, t)._dp && e._initted && e._time >= e._dur && e._ts)) { if (e._dur < e.duration()) for (n = e; n._dp; ) n.rawTime() >= 0 && n.totalTime(n._tTime), (n = n._dp); e._zTime = -1e-8; } }, je = function (e, t, n, r) { return t.parent && Me(t), (t._start = ge((O(n) ? n : n || e !== u ? Xe(e, n, t) : e._time) + t._delay)), (t._end = ge(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0))), Ae(e, t, "_first", "_last", e._sort ? "_start" : 0), Ze(t) || (e._recent = t), r || Ue(e, t), e._ts < 0 && Fe(e, e._tTime), e; }, Ge = function (e, t) { return (W.ScrollTrigger || K("scrollTrigger", t)) && W.ScrollTrigger.create(t, e); }, He = function (e, t, n, r, i) { return en(e, t, i), e._initted ? (!n && e._pt && !a && ((e._dur && !1 !== e.vars.lazy) || (!e._dur && e.vars.lazy)) && p !== kt.frame ? (ie.push(e), (e._lazy = [i, r]), 1) : void 0) : 1; }, Ve = function e(t) { var n = t.parent; return n && n._ts && n._initted && !n._lock && (n.rawTime() < 0 || e(n)); }, Ze = function (e) { var t = e.data; return "isFromStart" === t || "isStart" === t; }, ze = function (e, t, n, r) { var i = e._repeat, o = ge(t) || 0, a = e._tTime / e._tDur; return a && !r && (e._time *= o / e._dur), (e._dur = o), (e._tDur = i ? (i < 0 ? 1e10 : ge(o * (i + 1) + e._rDelay * i)) : o), a > 0 && !r && Fe(e, (e._tTime = e._tDur * a)), e.parent && Be(e), n || Pe(e.parent, e), e; }, Ye = function (e) { return e instanceof Xt ? Pe(e) : ze(e, e._dur); }, We = { _start: 0, endTime: Q, totalDuration: Q }, Xe = function e(t, n, r) { var i, o, a, s = t.labels, u = t._recent || We, l = t.duration() >= w ? u.endTime(!1) : t._dur; return M(n) && (isNaN(n) || n in s) ? ((o = n.charAt(0)), (a = "%" === n.substr(-1)), (i = n.indexOf("=")), "<" === o || ">" === o ? (i >= 0 && (n = n.replace(/=/, "")), ("<" === o ? u._start : u.endTime(u._repeat >= 0)) + (parseFloat(n.substr(1)) || 0) * (a ? (i < 0 ? u : r).totalDuration() / 100 : 1)) : i < 0 ? (n in s || (s[n] = l), s[n]) : ((o = parseFloat(n.charAt(i - 1) + n.substr(i + 1))), a && r && (o = (o / 100) * (U(r) ? r[0] : r).totalDuration()), i > 1 ? e(t, n.substr(0, i - 1), r) + o : l + o)) : null == n ? l : +n; }, qe = function (e, t, n) { var r, i, o = O(t[1]), a = (o ? 2 : 1) + (e < 2 ? 0 : 1), s = t[a]; if ((o && (s.duration = t[1]), (s.parent = n), e)) { for (r = s, i = n; i && !("immediateRender" in r); ) (r = i.vars.defaults || {}), (i = D(i.vars.inherit) && i.parent); (s.immediateRender = D(r.immediateRender)), e < 2 ? (s.runBackwards = 1) : (s.startAt = t[a - 1]); } return new an(t[0], s, t[a + 1]); }, Ke = function (e, t) { return e || 0 === e ? t(e) : t; }, $e = function (e, t, n) { return n < e ? e : n > t ? t : n; }, Je = function (e, t) { return M(e) && (t = Y.exec(e)) ? t[1] : ""; }, Qe = function (e, t, n) { return Ke(n, function (n) { return $e(e, t, n); }); }, et = [].slice, tt = function (e, t) { return e && R(e) && "length" in e && ((!t && !e.length) || (e.length - 1 in e && R(e[0]))) && !e.nodeType && e !== l; }, nt = function (e, t, n) { return ( void 0 === n && (n = []), e.forEach(function (e) { var r; return (M(e) && !t) || tt(e, 1) ? (r = n).push.apply(r, rt(e)) : n.push(e); }) || n ); }, rt = function (e, t, n) { return s && !t && s.selector ? s.selector(e) : !M(e) || n || (!c && Rt()) ? (U(e) ? nt(e, n) : tt(e) ? et.call(e, 0) : e ? [e] : []) : et.call((t || d).querySelectorAll(e), 0); }, it = function (e) { return ( (e = rt(e)[0] || $("Invalid scope") || {}), function (t) { var n = e.current || e.nativeElement || e; return rt(t, n.querySelectorAll ? n : n === e ? $("Invalid scope") || d.createElement("div") : e); } ); }, ot = function (e) { return e.sort(function () { return 0.5 - Math.random(); }); }, at = function (e) { if (P(e)) return e; var t = R(e) ? e : { each: e }, n = Gt(t.ease), r = t.from || 0, i = parseFloat(t.base) || 0, o = {}, a = r > 0 && r < 1, s = isNaN(r) || a, u = t.axis, l = r, c = r; return ( M(r) ? (l = c = { center: 0.5, edges: 0.5, end: 1 }[r] || 0) : !a && s && ((l = r[0]), (c = r[1])), function (e, a, d) { var h, p, f, _, g, m, v, y, C, b = (d || t).length, S = o[b]; if (!S) { if (!(C = "auto" === t.grid ? 0 : (t.grid || [1, w])[1])) { for (v = -w; v < (v = d[C++].getBoundingClientRect().left) && C < b; ); C--; } for (S = o[b] = [], h = s ? Math.min(C, b) * l - 0.5 : r % C, p = C === w ? 0 : s ? (b * c) / C - 0.5 : (r / C) | 0, v = 0, y = w, m = 0; m < b; m++) (f = (m % C) - h), (_ = p - ((m / C) | 0)), (S[m] = g = u ? Math.abs("y" === u ? _ : f) : L(f * f + _ * _)), g > v && (v = g), g < y && (y = g); "random" === r && ot(S), (S.max = v - y), (S.min = y), (S.v = b = (parseFloat(t.amount) || parseFloat(t.each) * (C > b ? b - 1 : u ? ("y" === u ? b / C : C) : Math.max(C, b / C)) || 0) * ("edges" === r ? -1 : 1)), (S.b = b < 0 ? i - b : i), (S.u = Je(t.amount || t.each) || 0), (n = n && b < 0 ? Ut(n) : n); } return (b = (S[e] - S.min) / S.max || 0), ge(S.b + (n ? n(b) : b) * S.v) + S.u; } ); }, st = function (e) { var t = Math.pow(10, ((e + "").split(".")[1] || "").length); return function (n) { var r = ge(Math.round(parseFloat(n) / e) * e * t); return (r - (r % 1)) / t + (O(n) ? 0 : Je(n)); }; }, ut = function (e, t) { var n, r, i = U(e); return ( !i && R(e) && ((n = i = e.radius || w), e.values ? ((e = rt(e.values)), (r = !O(e[0])) && (n *= n)) : (e = st(e.increment))), Ke( t, i ? P(e) ? function (t) { return (r = e(t)), Math.abs(r - t) <= n ? r : t; } : function (t) { for (var i, o, a = parseFloat(r ? t.x : t), s = parseFloat(r ? t.y : 0), u = w, l = 0, c = e.length; c--; ) (i = r ? (i = e[c].x - a) * i + (o = e[c].y - s) * o : Math.abs(e[c] - a)) < u && ((u = i), (l = c)); return (l = !n || u <= n ? e[l] : t), r || l === t || O(t) ? l : l + Je(t); } : st(e) ) ); }, lt = function (e, t, n, r) { return Ke(U(e) ? !t : !0 === n ? !!(n = 0) : !r, function () { return U(e) ? e[~~(Math.random() * e.length)] : (n = n || 1e-5) && (r = n < 1 ? Math.pow(10, (n + "").length - 2) : 1) && Math.floor(Math.round((e - n / 2 + Math.random() * (t - e + 0.99 * n)) / n) * n * r) / r; }); }, ct = function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return function (e) { return t.reduce(function (e, t) { return t(e); }, e); }; }, dt = function (e, t) { return function (n) { return e(parseFloat(n)) + (t || Je(n)); }; }, ht = function (e, t, n) { return mt(e, t, 0, 1, n); }, pt = function (e, t, n) { return Ke(n, function (n) { return e[~~t(n)]; }); }, ft = function e(t, n, r) { var i = n - t; return U(t) ? pt(t, e(0, t.length), n) : Ke(r, function (e) { return ((i + ((e - t) % i)) % i) + t; }); }, _t = function e(t, n, r) { var i = n - t, o = 2 * i; return U(t) ? pt(t, e(0, t.length - 1), n) : Ke(r, function (e) { return t + ((e = (o + ((e - t) % o)) % o || 0) > i ? o - e : e); }); }, gt = function (e) { for (var t, n, r, i, o = 0, a = ""; ~(t = e.indexOf("random(", o)); ) (r = e.indexOf(")", t)), (i = "[" === e.charAt(t + 7)), (n = e.substr(t + 7, r - t - 7).match(i ? z : j)), (a += e.substr(o, t - o) + lt(i ? n : +n[0], i ? 0 : +n[1], +n[2] || 1e-5)), (o = r + 1); return a + e.substr(o, e.length - o); }, mt = function (e, t, n, r, i) { var o = t - e, a = r - n; return Ke(i, function (t) { return n + (((t - e) / o) * a || 0); }); }, vt = function e(t, n, r, i) { var o = isNaN(t + n) ? 0 : function (e) { return (1 - e) * t + e * n; }; if (!o) { var a, s, u, l, c, d = M(t), h = {}; if ((!0 === r && (i = 1) && (r = null), d)) (t = { p: t }), (n = { p: n }); else if (U(t) && !U(n)) { for (u = [], l = t.length, c = l - 2, s = 1; s < l; s++) u.push(e(t[s - 1], t[s])); l--, (o = function (e) { e *= l; var t = Math.min(c, ~~e); return u[t](e - t); }), (r = n); } else i || (t = Te(U(t) ? [] : {}, t)); if (!u) { for (a in n) Jt.call(h, t, a, "get", n[a]); o = function (e) { return _n(e, h) || (d ? t.p : t); }; } } return Ke(r, o); }, yt = function (e, t, n) { var r, i, o, a = e.labels, s = w; for (r in a) (i = a[r] - t) < 0 == !!n && i && s > (i = Math.abs(i)) && ((o = r), (s = i)); return o; }, Ct = function (e, t, n) { var r, i, o, a = e.vars, u = a[t], l = s, c = e._ctx; if (u) return (r = a[t + "Params"]), (i = a.callbackScope || e), n && ie.length && ye(), c && (s = c), (o = r ? u.apply(i, r) : u.call(i)), (s = l), o; }, bt = function (e) { return Me(e), e.scrollTrigger && e.scrollTrigger.kill(!!a), e.progress() < 1 && Ct(e, "onInterrupt"), e; }, wt = [], St = function (e) { if (N() && e) { var t = (e = (!e.name && e.default) || e).name, n = P(e), r = t && !n && e.init ? function () { this._props = []; } : e, i = { init: Q, render: _n, add: Jt, kill: mn, modifier: gn, rawVars: 0 }, o = { targetTest: 0, get: 0, getSetter: dn, aliases: {}, register: 0 }; if ((Rt(), e !== r)) { if (ae[t]) return; Se(r, Se(Ee(e, i), o)), Te(r.prototype, Te(i, Ee(e, o))), (ae[(r.prop = t)] = r), e.targetTest && (le.push(r), (re[t] = 1)), (t = ("css" === t ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin"); } J(t, r), e.register && e.register(kn, r, Cn); } else e && wt.push(e); }, Tt = 255, xt = { aqua: [0, Tt, Tt], lime: [0, Tt, 0], silver: [192, 192, 192], black: [0, 0, 0], maroon: [128, 0, 0], teal: [0, 128, 128], blue: [0, 0, Tt], navy: [0, 0, 128], white: [Tt, Tt, Tt], olive: [128, 128, 0], yellow: [Tt, Tt, 0], orange: [Tt, 165, 0], gray: [128, 128, 128], purple: [128, 0, 128], green: [0, 128, 0], red: [Tt, 0, 0], pink: [Tt, 192, 203], cyan: [0, Tt, Tt], transparent: [Tt, Tt, Tt, 0] }, Et = function (e, t, n) { return ((6 * (e += e < 0 ? 1 : e > 1 ? -1 : 0) < 1 ? t + (n - t) * e * 6 : e < 0.5 ? n : 3 * e < 2 ? t + (n - t) * (2 / 3 - e) * 6 : t) * Tt + 0.5) | 0; }, Lt = function (e, t, n) { var r, i, o, a, s, u, l, c, d, h, p = e ? (O(e) ? [e >> 16, (e >> 8) & Tt, e & Tt] : 0) : xt.black; if (!p) { if (("," === e.substr(-1) && (e = e.substr(0, e.length - 1)), xt[e])) p = xt[e]; else if ("#" === e.charAt(0)) { if ((e.length < 6 && ((r = e.charAt(1)), (i = e.charAt(2)), (o = e.charAt(3)), (e = "#" + r + r + i + i + o + o + (5 === e.length ? e.charAt(4) + e.charAt(4) : ""))), 9 === e.length)) return [(p = parseInt(e.substr(1, 6), 16)) >> 16, (p >> 8) & Tt, p & Tt, parseInt(e.substr(7), 16) / 255]; p = [(e = parseInt(e.substr(1), 16)) >> 16, (e >> 8) & Tt, e & Tt]; } else if ("hsl" === e.substr(0, 3)) if (((p = h = e.match(j)), t)) { if (~e.indexOf("=")) return (p = e.match(G)), n && p.length < 4 && (p[3] = 1), p; } else (a = (+p[0] % 360) / 360), (s = +p[1] / 100), (r = 2 * (u = +p[2] / 100) - (i = u <= 0.5 ? u * (s + 1) : u + s - u * s)), p.length > 3 && (p[3] *= 1), (p[0] = Et(a + 1 / 3, r, i)), (p[1] = Et(a, r, i)), (p[2] = Et(a - 1 / 3, r, i)); else p = e.match(j) || xt.transparent; p = p.map(Number); } return t && !h && ((r = p[0] / Tt), (i = p[1] / Tt), (o = p[2] / Tt), (u = ((l = Math.max(r, i, o)) + (c = Math.min(r, i, o))) / 2), l === c ? (a = s = 0) : ((d = l - c), (s = u > 0.5 ? d / (2 - l - c) : d / (l + c)), (a = l === r ? (i - o) / d + (i < o ? 6 : 0) : l === i ? (o - r) / d + 2 : (r - i) / d + 4), (a *= 60)), (p[0] = ~~(a + 0.5)), (p[1] = ~~(100 * s + 0.5)), (p[2] = ~~(100 * u + 0.5))), n && p.length < 4 && (p[3] = 1), p; }, At = function (e) { var t = [], n = [], r = -1; return ( e.split(Mt).forEach(function (e) { var i = e.match(H) || []; t.push.apply(t, i), n.push((r += i.length + 1)); }), (t.c = n), t ); }, It = function (e, t, n) { var r, i, o, a, s = "", u = (e + s).match(Mt), l = t ? "hsla(" : "rgba(", c = 0; if (!u) return e; if ( ((u = u.map(function (e) { return (e = Lt(e, t, 1)) && l + (t ? e[0] + "," + e[1] + "%," + e[2] + "%," + e[3] : e.join(",")) + ")"; })), n && ((o = At(e)), (r = n.c).join(s) !== o.c.join(s))) ) for (a = (i = e.replace(Mt, "1").split(H)).length - 1; c < a; c++) s += i[c] + (~r.indexOf(c) ? u.shift() || l + "0,0,0,0)" : (o.length ? o : u.length ? u : n).shift()); if (!i) for (a = (i = e.split(Mt)).length - 1; c < a; c++) s += i[c] + u[c]; return s + i[a]; }, Mt = (function () { var e, t = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b"; for (e in xt) t += "|" + e + "\\b"; return new RegExp(t + ")", "gi"); })(), Pt = /hsl[a]?\(/, Ot = function (e) { var t, n = e.join(" "); if (((Mt.lastIndex = 0), Mt.test(n))) return (t = Pt.test(n)), (e[1] = It(e[1], t)), (e[0] = It(e[0], t, At(e[1]))), !0; }, kt = (function () { var e, t, n, r, i, o, a = Date.now, s = 500, u = 33, p = a(), f = p, g = 1e3 / 240, m = g, v = [], y = function n(l) { var c, d, h, _, y = a() - f, C = !0 === l; if ((y > s && (p += y - u), ((c = (h = (f += y) - p) - m) > 0 || C) && ((_ = ++r.frame), (i = h - 1e3 * r.time), (r.time = h /= 1e3), (m += c + (c >= g ? 4 : g - c)), (d = 1)), C || (e = t(n)), d)) for (o = 0; o < v.length; o++) v[o](h, i, _, l); }; return (r = { time: 0, frame: 0, tick: function () { y(!0); }, deltaRatio: function (e) { return i / (1e3 / (e || 60)); }, wake: function () { h && (!c && N() && ((l = c = window), (d = l.document || {}), (W.gsap = kn), (l.gsapVersions || (l.gsapVersions = [])).push(kn.version), q(X || l.GreenSockGlobals || (!l.gsap && l) || {}), (n = l.requestAnimationFrame), wt.forEach(St)), e && r.sleep(), (t = n || function (e) { return setTimeout(e, (m - 1e3 * r.time + 1) | 0); }), (_ = 1), y(2)); }, sleep: function () { (n ? l.cancelAnimationFrame : clearTimeout)(e), (_ = 0), (t = Q); }, lagSmoothing: function (e, t) { (s = e || 1 / 0), (u = Math.min(t || 33, s)); }, fps: function (e) { (g = 1e3 / (e || 240)), (m = 1e3 * r.time + g); }, add: function (e, t, n) { var i = t ? function (t, n, o, a) { e(t, n, o, a), r.remove(i); } : e; return r.remove(e), v[n ? "unshift" : "push"](i), Rt(), i; }, remove: function (e, t) { ~(t = v.indexOf(e)) && v.splice(t, 1) && o >= t && o--; }, _listeners: v, }); })(), Rt = function () { return !_ && kt.wake(); }, Dt = {}, Nt = /^[\d.\-M][\d.\-,\s]/, Bt = /["']/g, Ft = function (e) { for (var t, n, r, i = {}, o = e.substr(1, e.length - 3).split(":"), a = o[0], s = 1, u = o.length; s < u; s++) (n = o[s]), (t = s !== u - 1 ? n.lastIndexOf(",") : n.length), (r = n.substr(0, t)), (i[a] = isNaN(r) ? r.replace(Bt, "").trim() : +r), (a = n.substr(t + 1).trim()); return i; }, Ut = function (e) { return function (t) { return 1 - e(1 - t); }; }, jt = function e(t, n) { for (var r, i = t._first; i; ) i instanceof Xt ? e(i, n) : !i.vars.yoyoEase || (i._yoyo && i._repeat) || i._yoyo === n || (i.timeline ? e(i.timeline, n) : ((r = i._ease), (i._ease = i._yEase), (i._yEase = r), (i._yoyo = n))), (i = i._next); }, Gt = function (e, t) { return ( (e && (P(e) ? e : Dt[e] || (function (e) { var t, n, r, i, o = (e + "").split("("), a = Dt[o[0]]; return a && o.length > 1 && a.config ? a.config.apply(null, ~e.indexOf("{") ? [Ft(o[1])] : ((t = e), (n = t.indexOf("(") + 1), (r = t.indexOf(")")), (i = t.indexOf("(", n)), t.substring(n, ~i && i < r ? t.indexOf(")", r + 1) : r)).split(",").map(be)) : Dt._CE && Nt.test(e) ? Dt._CE("", e) : a; })(e))) || t ); }, Ht = function (e, t, n, r) { void 0 === n && (n = function (e) { return 1 - t(1 - e); }), void 0 === r && (r = function (e) { return e < 0.5 ? t(2 * e) / 2 : 1 - t(2 * (1 - e)) / 2; }); var i, o = { easeIn: t, easeOut: n, easeInOut: r }; return ( fe(e, function (e) { for (var t in ((Dt[e] = W[e] = o), (Dt[(i = e.toLowerCase())] = n), o)) Dt[i + ("easeIn" === t ? ".in" : "easeOut" === t ? ".out" : ".inOut")] = Dt[e + "." + t] = o[t]; }), o ); }, Vt = function (e) { return function (t) { return t < 0.5 ? (1 - e(1 - 2 * t)) / 2 : 0.5 + e(2 * (t - 0.5)) / 2; }; }, Zt = function e(t, n, r) { var i = n >= 1 ? n : 1, o = (r || (t ? 0.3 : 0.45)) / (n < 1 ? n : 1), a = (o / T) * (Math.asin(1 / i) || 0), s = function (e) { return 1 === e ? 1 : i * Math.pow(2, -10 * e) * I((e - a) * o) + 1; }, u = "out" === t ? s : "in" === t ? function (e) { return 1 - s(1 - e); } : Vt(s); return ( (o = T / o), (u.config = function (n, r) { return e(t, n, r); }), u ); }, zt = function e(t, n) { void 0 === n && (n = 1.70158); var r = function (e) { return e ? --e * e * ((n + 1) * e + n) + 1 : 0; }, i = "out" === t ? r : "in" === t ? function (e) { return 1 - r(1 - e); } : Vt(r); return ( (i.config = function (n) { return e(t, n); }), i ); }; fe("Linear,Quad,Cubic,Quart,Quint,Strong", function (e, t) { var n = t < 5 ? t + 1 : t; Ht( e + ",Power" + (n - 1), t ? function (e) { return Math.pow(e, n); } : function (e) { return e; }, function (e) { return 1 - Math.pow(1 - e, n); }, function (e) { return e < 0.5 ? Math.pow(2 * e, n) / 2 : 1 - Math.pow(2 * (1 - e), n) / 2; } ); }), (Dt.Linear.easeNone = Dt.none = Dt.Linear.easeIn), Ht("Elastic", Zt("in"), Zt("out"), Zt()), (g = 7.5625), (v = 1 / (m = 2.75)), Ht( "Bounce", function (e) { return 1 - y(1 - e); }, (y = function (e) { return e < v ? g * e * e : e < 0.7272727272727273 ? g * Math.pow(e - 1.5 / m, 2) + 0.75 : e < 0.9090909090909092 ? g * (e -= 2.25 / m) * e + 0.9375 : g * Math.pow(e - 2.625 / m, 2) + 0.984375; }) ), Ht("Expo", function (e) { return e ? Math.pow(2, 10 * (e - 1)) : 0; }), Ht("Circ", function (e) { return -(L(1 - e * e) - 1); }), Ht("Sine", function (e) { return 1 === e ? 1 : 1 - A(e * x); }), Ht("Back", zt("in"), zt("out"), zt()), (Dt.SteppedEase = Dt.steps = W.SteppedEase = { config: function (e, t) { void 0 === e && (e = 1); var n = 1 / e, r = e + (t ? 0 : 1), i = t ? 1 : 0; return function (e) { return (((r * $e(0, 0.99999999, e)) | 0) + i) * n; }; }, }), (b.ease = Dt["quad.out"]), fe("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function (e) { return (ce += e + "," + e + "Params,"); }); var Yt = function (e, t) { (this.id = E++), (e._gsap = this), (this.target = e), (this.harness = t), (this.get = t ? t.get : pe), (this.set = t ? t.getSetter : dn); }, Wt = (function () { function e(e) { (this.vars = e), (this._delay = +e.delay || 0), (this._repeat = e.repeat === 1 / 0 ? -2 : e.repeat || 0) && ((this._rDelay = e.repeatDelay || 0), (this._yoyo = !!e.yoyo || !!e.yoyoEase)), (this._ts = 1), ze(this, +e.duration, 1, 1), (this.data = e.data), s && ((this._ctx = s), s.data.push(this)), _ || kt.wake(); } var t = e.prototype; return ( (t.delay = function (e) { return e || 0 === e ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + e - this._delay), (this._delay = e), this) : this._delay; }), (t.duration = function (e) { return arguments.length ? this.totalDuration(this._repeat > 0 ? e + (e + this._rDelay) * this._repeat : e) : this.totalDuration() && this._dur; }), (t.totalDuration = function (e) { return arguments.length ? ((this._dirty = 0), ze(this, this._repeat < 0 ? e : (e - this._repeat * this._rDelay) / (this._repeat + 1))) : this._tDur; }), (t.totalTime = function (e, t) { if ((Rt(), !arguments.length)) return this._tTime; var n = this._dp; if (n && n.smoothChildTiming && this._ts) { for (Fe(this, e), !n._dp || n.parent || Ue(n, this); n && n.parent; ) n.parent._time !== n._start + (n._ts >= 0 ? n._tTime / n._ts : (n.totalDuration() - n._tTime) / -n._ts) && n.totalTime(n._tTime, !0), (n = n.parent); !this.parent && this._dp.autoRemoveChildren && ((this._ts > 0 && e < this._tDur) || (this._ts < 0 && e > 0) || (!this._tDur && !e)) && je(this._dp, this, this._start - this._delay); } return (this._tTime !== e || (!this._dur && !t) || (this._initted && Math.abs(this._zTime) === S) || (!e && !this._initted && (this.add || this._ptLookup))) && (this._ts || (this._pTime = e), Ce(this, e, t)), this; }), (t.time = function (e, t) { return arguments.length ? this.totalTime(Math.min(this.totalDuration(), e + Re(this)) % (this._dur + this._rDelay) || (e ? this._dur : 0), t) : this._time; }), (t.totalProgress = function (e, t) { return arguments.length ? this.totalTime(this.totalDuration() * e, t) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.ratio; }), (t.progress = function (e, t) { return arguments.length ? this.totalTime(this.duration() * (!this._yoyo || 1 & this.iteration() ? e : 1 - e) + Re(this), t) : this.duration() ? Math.min(1, this._time / this._dur) : this.ratio; }), (t.iteration = function (e, t) { var n = this.duration() + this._rDelay; return arguments.length ? this.totalTime(this._time + (e - 1) * n, t) : this._repeat ? De(this._tTime, n) + 1 : 1; }), (t.timeScale = function (e) { if (!arguments.length) return -1e-8 === this._rts ? 0 : this._rts; if (this._rts === e) return this; var t = this.parent && this._ts ? Ne(this.parent._time, this) : this._tTime; return ( (this._rts = +e || 0), (this._ts = this._ps || -1e-8 === e ? 0 : this._rts), this.totalTime($e(-Math.abs(this._delay), this._tDur, t), !0), Be(this), (function (e) { for (var t = e.parent; t && t.parent; ) (t._dirty = 1), t.totalDuration(), (t = t.parent); return e; })(this) ); }), (t.paused = function (e) { return arguments.length ? (this._ps !== e && ((this._ps = e), e ? ((this._pTime = this._tTime || Math.max(-this._delay, this.rawTime())), (this._ts = this._act = 0)) : (Rt(), (this._ts = this._rts), this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, 1 === this.progress() && Math.abs(this._zTime) !== S && (this._tTime -= S)))), this) : this._ps; }), (t.startTime = function (e) { if (arguments.length) { this._start = e; var t = this.parent || this._dp; return t && (t._sort || !this.parent) && je(t, this, e - this._delay), this; } return this._start; }), (t.endTime = function (e) { return this._start + (D(e) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1); }), (t.rawTime = function (e) { var t = this.parent || this._dp; return t ? (e && (!this._ts || (this._repeat && this._time && this.totalProgress() < 1)) ? this._tTime % (this._dur + this._rDelay) : this._ts ? Ne(t.rawTime(e), this) : this._tTime) : this._tTime; }), (t.revert = function (e) { void 0 === e && (e = ne); var t = a; return (a = e), (this._initted || this._startAt) && (this.timeline && this.timeline.revert(e), this.totalTime(-0.01, e.suppressEvents)), "nested" !== this.data && !1 !== e.kill && this.kill(), (a = t), this; }), (t.globalTime = function (e) { for (var t = this, n = arguments.length ? e : t.rawTime(); t; ) (n = t._start + n / (t._ts || 1)), (t = t._dp); return !this.parent && this._sat ? (this._sat.vars.immediateRender ? -1 / 0 : this._sat.globalTime(e)) : n; }), (t.repeat = function (e) { return arguments.length ? ((this._repeat = e === 1 / 0 ? -2 : e), Ye(this)) : -2 === this._repeat ? 1 / 0 : this._repeat; }), (t.repeatDelay = function (e) { if (arguments.length) { var t = this._time; return (this._rDelay = e), Ye(this), t ? this.time(t) : this; } return this._rDelay; }), (t.yoyo = function (e) { return arguments.length ? ((this._yoyo = e), this) : this._yoyo; }), (t.seek = function (e, t) { return this.totalTime(Xe(this, e), D(t)); }), (t.restart = function (e, t) { return this.play().totalTime(e ? -this._delay : 0, D(t)); }), (t.play = function (e, t) { return null != e && this.seek(e, t), this.reversed(!1).paused(!1); }), (t.reverse = function (e, t) { return null != e && this.seek(e || this.totalDuration(), t), this.reversed(!0).paused(!1); }), (t.pause = function (e, t) { return null != e && this.seek(e, t), this.paused(!0); }), (t.resume = function () { return this.paused(!1); }), (t.reversed = function (e) { return arguments.length ? (!!e !== this.reversed() && this.timeScale(-this._rts || (e ? -1e-8 : 0)), this) : this._rts < 0; }), (t.invalidate = function () { return (this._initted = this._act = 0), (this._zTime = -1e-8), this; }), (t.isActive = function () { var e, t = this.parent || this._dp, n = this._start; return !(t && !(this._ts && this._initted && t.isActive() && (e = t.rawTime(!0)) >= n && e < this.endTime(!0) - S)); }), (t.eventCallback = function (e, t, n) { var r = this.vars; return arguments.length > 1 ? (t ? ((r[e] = t), n && (r[e + "Params"] = n), "onUpdate" === e && (this._onUpdate = t)) : delete r[e], this) : r[e]; }), (t.then = function (e) { var t = this; return new Promise(function (n) { var r = P(e) ? e : we, i = function () { var e = t.then; (t.then = null), P(r) && (r = r(t)) && (r.then || r === t) && (t.then = e), n(r), (t.then = e); }; (t._initted && 1 === t.totalProgress() && t._ts >= 0) || (!t._tTime && t._ts < 0) ? i() : (t._prom = i); }); }), (t.kill = function () { bt(this); }), e ); })(); Se(Wt.prototype, { _time: 0, _start: 0, _end: 0, _tTime: 0, _tDur: 0, _dirty: 0, _repeat: 0, _yoyo: !1, parent: null, _initted: !1, _rDelay: 0, _ts: 1, _dp: 0, ratio: 0, _zTime: -1e-8, _prom: 0, _ps: !1, _rts: 1 }); var Xt = (function (e) { function t(t, n) { var i; return void 0 === t && (t = {}), ((i = e.call(this, t) || this).labels = {}), (i.smoothChildTiming = !!t.smoothChildTiming), (i.autoRemoveChildren = !!t.autoRemoveChildren), (i._sort = D(t.sortChildren)), u && je(t.parent || u, r(i), n), t.reversed && i.reverse(), t.paused && i.paused(!0), t.scrollTrigger && Ge(r(i), t.scrollTrigger), i; } i(t, e); var n = t.prototype; return ( (n.to = function (e, t, n) { return qe(0, arguments, this), this; }), (n.from = function (e, t, n) { return qe(1, arguments, this), this; }), (n.fromTo = function (e, t, n, r) { return qe(2, arguments, this), this; }), (n.set = function (e, t, n) { return (t.duration = 0), (t.parent = this), Le(t).repeatDelay || (t.repeat = 0), (t.immediateRender = !!t.immediateRender), new an(e, t, Xe(this, n), 1), this; }), (n.call = function (e, t, n) { return je(this, an.delayedCall(0, e, t), n); }), (n.staggerTo = function (e, t, n, r, i, o, a) { return (n.duration = t), (n.stagger = n.stagger || r), (n.onComplete = o), (n.onCompleteParams = a), (n.parent = this), new an(e, n, Xe(this, i)), this; }), (n.staggerFrom = function (e, t, n, r, i, o, a) { return (n.runBackwards = 1), (Le(n).immediateRender = D(n.immediateRender)), this.staggerTo(e, t, n, r, i, o, a); }), (n.staggerFromTo = function (e, t, n, r, i, o, a, s) { return (r.startAt = n), (Le(r).immediateRender = D(r.immediateRender)), this.staggerTo(e, t, r, i, o, a, s); }), (n.render = function (e, t, n) { var r, i, o, s, l, c, d, h, p, f, _, g, m = this._time, v = this._dirty ? this.totalDuration() : this._tDur, y = this._dur, C = e <= 0 ? 0 : ge(e), b = this._zTime < 0 != e < 0 && (this._initted || !y); if ((this !== u && C > v && e >= 0 && (C = v), C !== this._tTime || n || b)) { if ((m !== this._time && y && ((C += this._time - m), (e += this._time - m)), (r = C), (p = this._start), (c = !(h = this._ts)), b && (y || (m = this._zTime), (e || !t) && (this._zTime = e)), this._repeat)) { if (((_ = this._yoyo), (l = y + this._rDelay), this._repeat < -1 && e < 0)) return this.totalTime(100 * l + e, t, n); if (((r = ge(C % l)), C === v ? ((s = this._repeat), (r = y)) : ((s = ~~(C / l)) && s === C / l && ((r = y), s--), r > y && (r = y)), (f = De(this._tTime, l)), !m && this._tTime && f !== s && this._tTime - f * l - this._dur <= 0 && (f = s), _ && 1 & s && ((r = y - r), (g = 1)), s !== f && !this._lock)) { var w = _ && 1 & f, T = w === (_ && 1 & s); if ((s < f && (w = !w), (m = w ? 0 : C % y ? y : C), (this._lock = 1), (this.render(m || (g ? 0 : ge(s * l)), t, !y)._lock = 0), (this._tTime = C), !t && this.parent && Ct(this, "onRepeat"), this.vars.repeatRefresh && !g && (this.invalidate()._lock = 1), (m && m !== this._time) || c !== !this._ts || (this.vars.onRepeat && !this.parent && !this._act))) return this; if (((y = this._dur), (v = this._tDur), T && ((this._lock = 2), (m = w ? y : -1e-4), this.render(m, !0), this.vars.repeatRefresh && !g && this.invalidate()), (this._lock = 0), !this._ts && !c)) return this; jt(this, g); } } if ( (this._hasPause && !this._forcing && this._lock < 2 && ((d = (function (e, t, n) { var r; if (n > t) for (r = e._first; r && r._start <= n; ) { if ("isPause" === r.data && r._start > t) return r; r = r._next; } else for (r = e._last; r && r._start >= n; ) { if ("isPause" === r.data && r._start < t) return r; r = r._prev; } })(this, ge(m), ge(r))), d && (C -= r - (r = d._start))), (this._tTime = C), (this._time = r), (this._act = !h), this._initted || ((this._onUpdate = this.vars.onUpdate), (this._initted = 1), (this._zTime = e), (m = 0)), !m && r && !t && !s && (Ct(this, "onStart"), this._tTime !== C)) ) return this; if (r >= m && e >= 0) for (i = this._first; i; ) { if (((o = i._next), (i._act || r >= i._start) && i._ts && d !== i)) { if (i.parent !== this) return this.render(e, t, n); if ((i.render(i._ts > 0 ? (r - i._start) * i._ts : (i._dirty ? i.totalDuration() : i._tDur) + (r - i._start) * i._ts, t, n), r !== this._time || (!this._ts && !c))) { (d = 0), o && (C += this._zTime = -1e-8); break; } } i = o; } else { i = this._last; for (var x = e < 0 ? e : r; i; ) { if (((o = i._prev), (i._act || x <= i._end) && i._ts && d !== i)) { if (i.parent !== this) return this.render(e, t, n); if ((i.render(i._ts > 0 ? (x - i._start) * i._ts : (i._dirty ? i.totalDuration() : i._tDur) + (x - i._start) * i._ts, t, n || (a && (i._initted || i._startAt))), r !== this._time || (!this._ts && !c))) { (d = 0), o && (C += this._zTime = x ? -1e-8 : S); break; } } i = o; } } if (d && !t && (this.pause(), (d.render(r >= m ? 0 : -1e-8)._zTime = r >= m ? 1 : -1), this._ts)) return (this._start = p), Be(this), this.render(e, t, n); this._onUpdate && !t && Ct(this, "onUpdate", !0), ((C === v && this._tTime >= this.totalDuration()) || (!C && m)) && ((p !== this._start && Math.abs(h) === Math.abs(this._ts)) || this._lock || ((e || !y) && ((C === v && this._ts > 0) || (!C && this._ts < 0)) && Me(this, 1), t || (e < 0 && !m) || (!C && !m && v) || (Ct(this, C === v && e >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(C < v && this.timeScale() > 0) && this._prom()))); } return this; }), (n.add = function (e, t) { var n = this; if ((O(t) || (t = Xe(this, t, e)), !(e instanceof Wt))) { if (U(e)) return ( e.forEach(function (e) { return n.add(e, t); }), this ); if (M(e)) return this.addLabel(e, t); if (!P(e)) return this; e = an.delayedCall(0, e); } return this !== e ? je(this, e, t) : this; }), (n.getChildren = function (e, t, n, r) { void 0 === e && (e = !0), void 0 === t && (t = !0), void 0 === n && (n = !0), void 0 === r && (r = -w); for (var i = [], o = this._first; o; ) o._start >= r && (o instanceof an ? t && i.push(o) : (n && i.push(o), e && i.push.apply(i, o.getChildren(!0, t, n)))), (o = o._next); return i; }), (n.getById = function (e) { for (var t = this.getChildren(1, 1, 1), n = t.length; n--; ) if (t[n].vars.id === e) return t[n]; }), (n.remove = function (e) { return M(e) ? this.removeLabel(e) : P(e) ? this.killTweensOf(e) : (Ie(this, e), e === this._recent && (this._recent = this._last), Pe(this)); }), (n.totalTime = function (t, n) { return arguments.length ? ((this._forcing = 1), !this._dp && this._ts && (this._start = ge(kt.time - (this._ts > 0 ? t / this._ts : (this.totalDuration() - t) / -this._ts))), e.prototype.totalTime.call(this, t, n), (this._forcing = 0), this) : this._tTime; }), (n.addLabel = function (e, t) { return (this.labels[e] = Xe(this, t)), this; }), (n.removeLabel = function (e) { return delete this.labels[e], this; }), (n.addPause = function (e, t, n) { var r = an.delayedCall(0, t || Q, n); return (r.data = "isPause"), (this._hasPause = 1), je(this, r, Xe(this, e)); }), (n.removePause = function (e) { var t = this._first; for (e = Xe(this, e); t; ) t._start === e && "isPause" === t.data && Me(t), (t = t._next); }), (n.killTweensOf = function (e, t, n) { for (var r = this.getTweensOf(e, n), i = r.length; i--; ) qt !== r[i] && r[i].kill(e, t); return this; }), (n.getTweensOf = function (e, t) { for (var n, r = [], i = rt(e), o = this._first, a = O(t); o; ) o instanceof an ? ve(o._targets, i) && (a ? (!qt || (o._initted && o._ts)) && o.globalTime(0) <= t && o.globalTime(o.totalDuration()) > t : !t || o.isActive()) && r.push(o) : (n = o.getTweensOf(i, t)).length && r.push.apply(r, n), (o = o._next); return r; }), (n.tweenTo = function (e, t) { t = t || {}; var n, r = this, i = Xe(r, e), o = t, a = o.startAt, s = o.onStart, u = o.onStartParams, l = o.immediateRender, c = an.to( r, Se( { ease: t.ease || "none", lazy: !1, immediateRender: !1, time: i, overwrite: "auto", duration: t.duration || Math.abs((i - (a && "time" in a ? a.time : r._time)) / r.timeScale()) || S, onStart: function () { if ((r.pause(), !n)) { var e = t.duration || Math.abs((i - (a && "time" in a ? a.time : r._time)) / r.timeScale()); c._dur !== e && ze(c, e, 0, 1).render(c._time, !0, !0), (n = 1); } s && s.apply(c, u || []); }, }, t ) ); return l ? c.render(0) : c; }), (n.tweenFromTo = function (e, t, n) { return this.tweenTo(t, Se({ startAt: { time: Xe(this, e) } }, n)); }), (n.recent = function () { return this._recent; }), (n.nextLabel = function (e) { return void 0 === e && (e = this._time), yt(this, Xe(this, e)); }), (n.previousLabel = function (e) { return void 0 === e && (e = this._time), yt(this, Xe(this, e), 1); }), (n.currentLabel = function (e) { return arguments.length ? this.seek(e, !0) : this.previousLabel(this._time + S); }), (n.shiftChildren = function (e, t, n) { void 0 === n && (n = 0); for (var r, i = this._first, o = this.labels; i; ) i._start >= n && ((i._start += e), (i._end += e)), (i = i._next); if (t) for (r in o) o[r] >= n && (o[r] += e); return Pe(this); }), (n.invalidate = function (t) { var n = this._first; for (this._lock = 0; n; ) n.invalidate(t), (n = n._next); return e.prototype.invalidate.call(this, t); }), (n.clear = function (e) { void 0 === e && (e = !0); for (var t, n = this._first; n; ) (t = n._next), this.remove(n), (n = t); return this._dp && (this._time = this._tTime = this._pTime = 0), e && (this.labels = {}), Pe(this); }), (n.totalDuration = function (e) { var t, n, r, i = 0, o = this, a = o._last, s = w; if (arguments.length) return o.timeScale((o._repeat < 0 ? o.duration() : o.totalDuration()) / (o.reversed() ? -e : e)); if (o._dirty) { for (r = o.parent; a; ) (t = a._prev), a._dirty && a.totalDuration(), (n = a._start) > s && o._sort && a._ts && !o._lock ? ((o._lock = 1), (je(o, a, n - a._delay, 1)._lock = 0)) : (s = n), n < 0 && a._ts && ((i -= n), ((!r && !o._dp) || (r && r.smoothChildTiming)) && ((o._start += n / o._ts), (o._time -= n), (o._tTime -= n)), o.shiftChildren(-n, !1, -Infinity), (s = 0)), a._end > i && a._ts && (i = a._end), (a = t); ze(o, o === u && o._time > i ? o._time : i, 1, 1), (o._dirty = 0); } return o._tDur; }), (t.updateRoot = function (e) { if ((u._ts && (Ce(u, Ne(e, u)), (p = kt.frame)), kt.frame >= ue)) { ue += C.autoSleep || 120; var t = u._first; if ((!t || !t._ts) && C.autoSleep && kt._listeners.length < 2) { for (; t && !t._ts; ) t = t._next; t || kt.sleep(); } } }), t ); })(Wt); Se(Xt.prototype, { _lock: 0, _hasPause: 0, _forcing: 0 }); var qt, Kt, $t = function (e, t, n, r, i, o, a) { var s, u, l, c, d, h, p, f, _ = new Cn(this._pt, e, t, 0, 1, fn, null, i), g = 0, m = 0; for (_.b = n, _.e = r, n += "", (p = ~(r += "").indexOf("random(")) && (r = gt(r)), o && (o((f = [n, r]), e, t), (n = f[0]), (r = f[1])), u = n.match(V) || []; (s = V.exec(r)); ) (c = s[0]), (d = r.substring(g, s.index)), l ? (l = (l + 1) % 5) : "rgba(" === d.substr(-5) && (l = 1), c !== u[m++] && ((h = parseFloat(u[m - 1]) || 0), (_._pt = { _next: _._pt, p: d || 1 === m ? d : ",", s: h, c: "=" === c.charAt(1) ? me(h, c) - h : parseFloat(c) - h, m: l && l < 4 ? Math.round : 0 }), (g = V.lastIndex)); return (_.c = g < r.length ? r.substring(g, r.length) : ""), (_.fp = a), (Z.test(r) || p) && (_.e = 0), (this._pt = _), _; }, Jt = function (e, t, n, r, i, o, a, s, u, l) { P(r) && (r = r(i || 0, e, o)); var c, d = e[t], h = "get" !== n ? n : P(d) ? (u ? e[t.indexOf("set") || !P(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](u) : e[t]()) : d, p = P(d) ? (u ? ln : un) : sn; if ((M(r) && (~r.indexOf("random(") && (r = gt(r)), "=" === r.charAt(1) && ((c = me(h, r) + (Je(h) || 0)) || 0 === c) && (r = c)), !l || h !== r || Kt)) return isNaN(h * r) || "" === r ? (!d && !(t in e) && K(t, r), $t.call(this, e, t, h, r, p, s || C.stringFilter, u)) : ((c = new Cn(this._pt, e, t, +h || 0, r - (h || 0), "boolean" == typeof d ? pn : hn, 0, p)), u && (c.fp = u), a && c.modifier(a, this, e), (this._pt = c)); }, Qt = function (e, t, n, r, i, o) { var a, s, u, l; if ( ae[e] && !1 !== (a = new ae[e]()).init( i, a.rawVars ? t[e] : (function (e, t, n, r, i) { if ((P(e) && (e = nn(e, i, t, n, r)), !R(e) || (e.style && e.nodeType) || U(e) || F(e))) return M(e) ? nn(e, i, t, n, r) : e; var o, a = {}; for (o in e) a[o] = nn(e[o], i, t, n, r); return a; })(t[e], r, i, o, n), n, r, o ) && ((n._pt = s = new Cn(n._pt, i, e, 0, 1, a.render, a, 0, a.priority)), n !== f) ) for (u = n._ptLookup[n._targets.indexOf(i)], l = a._props.length; l--; ) u[a._props[l]] = s; return a; }, en = function e(t, n, r) { var i, s, l, c, d, h, p, f, _, g, m, v, y, C = t.vars, T = C.ease, x = C.startAt, E = C.immediateRender, L = C.lazy, A = C.onUpdate, I = C.onUpdateParams, M = C.callbackScope, P = C.runBackwards, O = C.yoyoEase, k = C.keyframes, R = C.autoRevert, N = t._dur, B = t._startAt, F = t._targets, U = t.parent, j = U && "nested" === U.data ? U.vars.targets : F, G = "auto" === t._overwrite && !o, H = t.timeline; if ((H && (!k || !T) && (T = "none"), (t._ease = Gt(T, b.ease)), (t._yEase = O ? Ut(Gt(!0 === O ? T : O, b.ease)) : 0), O && t._yoyo && !t._repeat && ((O = t._yEase), (t._yEase = t._ease), (t._ease = O)), (t._from = !H && !!C.runBackwards), !H || (k && !C.stagger))) { if (((v = (f = F[0] ? he(F[0]).harness : 0) && C[f.prop]), (i = Ee(C, re)), B && (B._zTime < 0 && B.progress(1), n < 0 && P && E && !R ? B.render(-1, !0) : B.revert(P && N ? te : ee), (B._lazy = 0)), x)) { if ((Me((t._startAt = an.set(F, Se({ data: "isStart", overwrite: !1, parent: U, immediateRender: !0, lazy: !B && D(L), startAt: null, delay: 0, onUpdate: A, onUpdateParams: I, callbackScope: M, stagger: 0 }, x)))), (t._startAt._dp = 0), (t._startAt._sat = t), n < 0 && (a || (!E && !R)) && t._startAt.revert(te), E && N && n <= 0 && r <= 0)) return void (n && (t._zTime = n)); } else if (P && N && !B) if ((n && (E = !1), (l = Se({ overwrite: !1, data: "isFromStart", lazy: E && !B && D(L), immediateRender: E, stagger: 0, parent: U }, i)), v && (l[f.prop] = v), Me((t._startAt = an.set(F, l))), (t._startAt._dp = 0), (t._startAt._sat = t), n < 0 && (a ? t._startAt.revert(te) : t._startAt.render(-1, !0)), (t._zTime = n), E)) { if (!n) return; } else e(t._startAt, S, S); for (t._pt = t._ptCache = 0, L = (N && D(L)) || (L && !N), s = 0; s < F.length; s++) { if ( ((p = (d = F[s])._gsap || de(F)[s]._gsap), (t._ptLookup[s] = g = {}), oe[p.id] && ie.length && ye(), (m = j === F ? s : j.indexOf(d)), f && !1 !== (_ = new f()).init(d, v || i, t, m, j) && ((t._pt = c = new Cn(t._pt, d, _.name, 0, 1, _.render, _, 0, _.priority)), _._props.forEach(function (e) { g[e] = c; }), _.priority && (h = 1)), !f || v) ) for (l in i) ae[l] && (_ = Qt(l, i, t, m, d, j)) ? _.priority && (h = 1) : (g[l] = c = Jt.call(t, d, l, "get", i[l], m, j, 0, C.stringFilter)); t._op && t._op[s] && t.kill(d, t._op[s]), G && t._pt && ((qt = t), u.killTweensOf(d, g, t.globalTime(n)), (y = !t.parent), (qt = 0)), t._pt && L && (oe[p.id] = 1); } h && yn(t), t._onInit && t._onInit(t); } (t._onUpdate = A), (t._initted = (!t._op || t._pt) && !y), k && n <= 0 && H.render(w, !0, !0); }, tn = function (e, t, n, r) { var i, o, a = t.ease || r || "power1.inOut"; if (U(t)) (o = n[e] || (n[e] = [])), t.forEach(function (e, n) { return o.push({ t: (n / (t.length - 1)) * 100, v: e, e: a }); }); else for (i in t) (o = n[i] || (n[i] = [])), "ease" === i || o.push({ t: parseFloat(e), v: t[i], e: a }); }, nn = function (e, t, n, r, i) { return P(e) ? e.call(t, n, r, i) : M(e) && ~e.indexOf("random(") ? gt(e) : e; }, rn = ce + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", on = {}; fe(rn + ",id,stagger,delay,duration,paused,scrollTrigger", function (e) { return (on[e] = 1); }); var an = (function (e) { function t(t, n, i, a) { var s; "number" == typeof n && ((i.duration = n), (n = i), (i = null)); var l, c, d, h, p, f, _, g, m = (s = e.call(this, a ? n : Le(n)) || this).vars, v = m.duration, y = m.delay, b = m.immediateRender, w = m.stagger, S = m.overwrite, T = m.keyframes, x = m.defaults, E = m.scrollTrigger, L = m.yoyoEase, A = n.parent || u, I = (U(t) || F(t) ? O(t[0]) : "length" in n) ? [t] : rt(t); if (((s._targets = I.length ? de(I) : $("GSAP target " + t + " not found. https://greensock.com", !C.nullTargetWarn) || []), (s._ptLookup = []), (s._overwrite = S), T || w || B(v) || B(y))) { if (((n = s.vars), (l = s.timeline = new Xt({ data: "nested", defaults: x || {}, targets: A && "nested" === A.data ? A.vars.targets : I })).kill(), (l.parent = l._dp = r(s)), (l._start = 0), w || B(v) || B(y))) { if (((h = I.length), (_ = w && at(w)), R(w))) for (p in w) ~rn.indexOf(p) && (g || (g = {}), (g[p] = w[p])); for (c = 0; c < h; c++) ((d = Ee(n, on)).stagger = 0), L && (d.yoyoEase = L), g && Te(d, g), (f = I[c]), (d.duration = +nn(v, r(s), c, f, I)), (d.delay = (+nn(y, r(s), c, f, I) || 0) - s._delay), !w && 1 === h && d.delay && ((s._delay = y = d.delay), (s._start += y), (d.delay = 0)), l.to(f, d, _ ? _(c, f, I) : 0), (l._ease = Dt.none); l.duration() ? (v = y = 0) : (s.timeline = 0); } else if (T) { Le(Se(l.vars.defaults, { ease: "none" })), (l._ease = Gt(T.ease || n.ease || "none")); var M, P, k, N = 0; if (U(T)) T.forEach(function (e) { return l.to(I, e, ">"); }), l.duration(); else { for (p in ((d = {}), T)) "ease" === p || "easeEach" === p || tn(p, T[p], d, T.easeEach); for (p in d) for ( M = d[p].sort(function (e, t) { return e.t - t.t; }), N = 0, c = 0; c < M.length; c++ ) ((k = { ease: (P = M[c]).e, duration: ((P.t - (c ? M[c - 1].t : 0)) / 100) * v })[p] = P.v), l.to(I, k, N), (N += k.duration); l.duration() < v && l.to({}, { duration: v - l.duration() }); } } v || s.duration((v = l.duration())); } else s.timeline = 0; return !0 !== S || o || ((qt = r(s)), u.killTweensOf(I), (qt = 0)), je(A, r(s), i), n.reversed && s.reverse(), n.paused && s.paused(!0), (b || (!v && !T && s._start === ge(A._time) && D(b) && ke(r(s)) && "nested" !== A.data)) && ((s._tTime = -1e-8), s.render(Math.max(0, -y) || 0)), E && Ge(r(s), E), s; } i(t, e); var n = t.prototype; return ( (n.render = function (e, t, n) { var r, i, o, s, u, l, c, d, h, p = this._time, f = this._tDur, _ = this._dur, g = e < 0, m = e > f - S && !g ? f : e < S ? 0 : e; if (_) { if (m !== this._tTime || !e || n || (!this._initted && this._tTime) || (this._startAt && this._zTime < 0 !== g)) { if (((r = m), (d = this.timeline), this._repeat)) { if (((s = _ + this._rDelay), this._repeat < -1 && g)) return this.totalTime(100 * s + e, t, n); if (((r = ge(m % s)), m === f ? ((o = this._repeat), (r = _)) : ((o = ~~(m / s)) && o === m / s && ((r = _), o--), r > _ && (r = _)), (l = this._yoyo && 1 & o) && ((h = this._yEase), (r = _ - r)), (u = De(this._tTime, s)), r === p && !n && this._initted)) return (this._tTime = m), this; o !== u && (d && this._yEase && jt(d, l), !this.vars.repeatRefresh || l || this._lock || ((this._lock = n = 1), (this.render(ge(s * o), !0).invalidate()._lock = 0))); } if (!this._initted) { if (He(this, g ? e : r, n, t, m)) return (this._tTime = 0), this; if (p !== this._time) return this; if (_ !== this._dur) return this.render(e, t, n); } if (((this._tTime = m), (this._time = r), !this._act && this._ts && ((this._act = 1), (this._lazy = 0)), (this.ratio = c = (h || this._ease)(r / _)), this._from && (this.ratio = c = 1 - c), r && !p && !t && !o && (Ct(this, "onStart"), this._tTime !== m))) return this; for (i = this._pt; i; ) i.r(c, i.d), (i = i._next); (d && d.render(e < 0 ? e : !r && l ? -1e-8 : d._dur * d._ease(r / this._dur), t, n)) || (this._startAt && (this._zTime = e)), this._onUpdate && !t && (g && Oe(this, e, 0, n), Ct(this, "onUpdate")), this._repeat && o !== u && this.vars.onRepeat && !t && this.parent && Ct(this, "onRepeat"), (m !== this._tDur && m) || this._tTime !== m || (g && !this._onUpdate && Oe(this, e, 0, !0), (e || !_) && ((m === this._tDur && this._ts > 0) || (!m && this._ts < 0)) && Me(this, 1), t || (g && !p) || !(m || p || l) || (Ct(this, m === f ? "onComplete" : "onReverseComplete", !0), this._prom && !(m < f && this.timeScale() > 0) && this._prom())); } } else !(function (e, t, n, r) { var i, o, s, u = e.ratio, l = t < 0 || (!t && ((!e._start && Ve(e) && (e._initted || !Ze(e))) || ((e._ts < 0 || e._dp._ts < 0) && !Ze(e)))) ? 0 : 1, c = e._rDelay, d = 0; if ((c && e._repeat && ((d = $e(0, e._tDur, t)), (o = De(d, c)), e._yoyo && 1 & o && (l = 1 - l), o !== De(e._tTime, c) && ((u = 1 - l), e.vars.repeatRefresh && e._initted && e.invalidate())), l !== u || a || r || e._zTime === S || (!t && e._zTime))) { if (!e._initted && He(e, t, r, n, d)) return; for (s = e._zTime, e._zTime = t || (n ? S : 0), n || (n = t && !s), e.ratio = l, e._from && (l = 1 - l), e._time = 0, e._tTime = d, i = e._pt; i; ) i.r(l, i.d), (i = i._next); t < 0 && Oe(e, t, 0, !0), e._onUpdate && !n && Ct(e, "onUpdate"), d && e._repeat && !n && e.parent && Ct(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === l && (l && Me(e, 1), n || a || (Ct(e, l ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom())); } else e._zTime || (e._zTime = t); })(this, e, t, n); return this; }), (n.targets = function () { return this._targets; }), (n.invalidate = function (t) { return (!t || !this.vars.runBackwards) && (this._startAt = 0), (this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0), (this._ptLookup = []), this.timeline && this.timeline.invalidate(t), e.prototype.invalidate.call(this, t); }), (n.resetTo = function (e, t, n, r) { _ || kt.wake(), this._ts || this.play(); var i = Math.min(this._dur, (this._dp._time - this._start) * this._ts); return ( this._initted || en(this, i), (function (e, t, n, r, i, o, a) { var s, u, l, c, d = ((e._pt && e._ptCache) || (e._ptCache = {}))[t]; if (!d) for (d = e._ptCache[t] = [], l = e._ptLookup, c = e._targets.length; c--; ) { if ((s = l[c][t]) && s.d && s.d._pt) for (s = s.d._pt; s && s.p !== t && s.fp !== t; ) s = s._next; if (!s) return (Kt = 1), (e.vars[t] = "+=0"), en(e, a), (Kt = 0), 1; d.push(s); } for (c = d.length; c--; ) ((s = (u = d[c])._pt || u).s = (!r && 0 !== r) || i ? s.s + (r || 0) + o * s.c : r), (s.c = n - s.s), u.e && (u.e = _e(n) + Je(u.e)), u.b && (u.b = s.s + Je(u.b)); })(this, e, t, n, r, this._ease(i / this._dur), i) ? this.resetTo(e, t, n, r) : (Fe(this, 0), this.parent || Ae(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0)) ); }), (n.kill = function (e, t) { if ((void 0 === t && (t = "all"), !(e || (t && "all" !== t)))) return (this._lazy = this._pt = 0), this.parent ? bt(this) : this; if (this.timeline) { var n = this.timeline.totalDuration(); return this.timeline.killTweensOf(e, t, qt && !0 !== qt.vars.overwrite)._first || bt(this), this.parent && n !== this.timeline.totalDuration() && ze(this, (this._dur * this.timeline._tDur) / n, 0, 1), this; } var r, i, o, a, s, u, l, c = this._targets, d = e ? rt(e) : c, h = this._ptLookup, p = this._pt; if ( (!t || "all" === t) && (function (e, t) { for (var n = e.length, r = n === t.length; r && n-- && e[n] === t[n]; ); return n < 0; })(c, d) ) return "all" === t && (this._pt = 0), bt(this); for ( r = this._op = this._op || [], "all" !== t && (M(t) && ((s = {}), fe(t, function (e) { return (s[e] = 1); }), (t = s)), (t = (function (e, t) { var n, r, i, o, a = e[0] ? he(e[0]).harness : 0, s = a && a.aliases; if (!s) return t; for (r in ((n = Te({}, t)), s)) if ((r in n)) for (i = (o = s[r].split(",")).length; i--; ) n[o[i]] = n[r]; return n; })(c, t))), l = c.length; l--; ) if (~d.indexOf(c[l])) for (s in ((i = h[l]), "all" === t ? ((r[l] = t), (a = i), (o = {})) : ((o = r[l] = r[l] || {}), (a = t)), a)) (u = i && i[s]) && (("kill" in u.d && !0 !== u.d.kill(s)) || Ie(this, u, "_pt"), delete i[s]), "all" !== o && (o[s] = 1); return this._initted && !this._pt && p && bt(this), this; }), (t.to = function (e, n) { return new t(e, n, arguments[2]); }), (t.from = function (e, t) { return qe(1, arguments); }), (t.delayedCall = function (e, n, r, i) { return new t(n, 0, { immediateRender: !1, lazy: !1, overwrite: !1, delay: e, onComplete: n, onReverseComplete: n, onCompleteParams: r, onReverseCompleteParams: r, callbackScope: i }); }), (t.fromTo = function (e, t, n) { return qe(2, arguments); }), (t.set = function (e, n) { return (n.duration = 0), n.repeatDelay || (n.repeat = 0), new t(e, n); }), (t.killTweensOf = function (e, t, n) { return u.killTweensOf(e, t, n); }), t ); })(Wt); Se(an.prototype, { _targets: [], _lazy: 0, _startAt: 0, _op: 0, _onInit: 0 }), fe("staggerTo,staggerFrom,staggerFromTo", function (e) { an[e] = function () { var t = new Xt(), n = et.call(arguments, 0); return n.splice("staggerFromTo" === e ? 5 : 4, 0, 0), t[e].apply(t, n); }; }); var sn = function (e, t, n) { return (e[t] = n); }, un = function (e, t, n) { return e[t](n); }, ln = function (e, t, n, r) { return e[t](r.fp, n); }, cn = function (e, t, n) { return e.setAttribute(t, n); }, dn = function (e, t) { return P(e[t]) ? un : k(e[t]) && e.setAttribute ? cn : sn; }, hn = function (e, t) { return t.set(t.t, t.p, Math.round(1e6 * (t.s + t.c * e)) / 1e6, t); }, pn = function (e, t) { return t.set(t.t, t.p, !!(t.s + t.c * e), t); }, fn = function (e, t) { var n = t._pt, r = ""; if (!e && t.b) r = t.b; else if (1 === e && t.e) r = t.e; else { for (; n; ) (r = n.p + (n.m ? n.m(n.s + n.c * e) : Math.round(1e4 * (n.s + n.c * e)) / 1e4) + r), (n = n._next); r += t.c; } t.set(t.t, t.p, r, t); }, _n = function (e, t) { for (var n = t._pt; n; ) n.r(e, n.d), (n = n._next); }, gn = function (e, t, n, r) { for (var i, o = this._pt; o; ) (i = o._next), o.p === r && o.modifier(e, t, n), (o = i); }, mn = function (e) { for (var t, n, r = this._pt; r; ) (n = r._next), (r.p === e && !r.op) || r.op === e ? Ie(this, r, "_pt") : r.dep || (t = 1), (r = n); return !t; }, vn = function (e, t, n, r) { r.mSet(e, t, r.m.call(r.tween, n, r.mt), r); }, yn = function (e) { for (var t, n, r, i, o = e._pt; o; ) { for (t = o._next, n = r; n && n.pr > o.pr; ) n = n._next; (o._prev = n ? n._prev : i) ? (o._prev._next = o) : (r = o), (o._next = n) ? (n._prev = o) : (i = o), (o = t); } e._pt = r; }, Cn = (function () { function e(e, t, n, r, i, o, a, s, u) { (this.t = t), (this.s = r), (this.c = i), (this.p = n), (this.r = o || hn), (this.d = a || this), (this.set = s || sn), (this.pr = u || 0), (this._next = e), e && (e._prev = this); } return ( (e.prototype.modifier = function (e, t, n) { (this.mSet = this.mSet || this.set), (this.set = vn), (this.m = e), (this.mt = n), (this.tween = t); }), e ); })(); fe(ce + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function (e) { return (re[e] = 1); }), (W.TweenMax = W.TweenLite = an), (W.TimelineLite = W.TimelineMax = Xt), (u = new Xt({ sortChildren: !1, defaults: b, autoRemoveChildren: !0, id: "root", smoothChildTiming: !0 })), (C.stringFilter = Ot); var bn = [], wn = {}, Sn = [], Tn = 0, xn = 0, En = function (e) { return (wn[e] || Sn).map(function (e) { return e(); }); }, Ln = function () { var e = Date.now(), t = []; e - Tn > 2 && (En("matchMediaInit"), bn.forEach(function (e) { var n, r, i, o, a = e.queries, s = e.conditions; for (r in a) (n = l.matchMedia(a[r]).matches) && (i = 1), n !== s[r] && ((s[r] = n), (o = 1)); o && (e.revert(), i && t.push(e)); }), En("matchMediaRevert"), t.forEach(function (e) { return e.onMatch(e); }), (Tn = e), En("matchMedia")); }, An = (function () { function e(e, t) { (this.selector = t && it(t)), (this.data = []), (this._r = []), (this.isReverted = !1), (this.id = xn++), e && this.add(e); } var t = e.prototype; return ( (t.add = function (e, t, n) { P(e) && ((n = t), (t = e), (e = P)); var r = this, i = function () { var e, i = s, o = r.selector; return i && i !== r && i.data.push(r), n && (r.selector = it(n)), (s = r), (e = t.apply(r, arguments)), P(e) && r._r.push(e), (s = i), (r.selector = o), (r.isReverted = !1), e; }; return (r.last = i), e === P ? i(r) : e ? (r[e] = i) : i; }), (t.ignore = function (e) { var t = s; (s = null), e(this), (s = t); }), (t.getTweens = function () { var t = []; return ( this.data.forEach(function (n) { return n instanceof e ? t.push.apply(t, n.getTweens()) : n instanceof an && !(n.parent && "nested" === n.parent.data) && t.push(n); }), t ); }), (t.clear = function () { this._r.length = this.data.length = 0; }), (t.kill = function (e, t) { var n = this; if (e) { var r = this.getTweens(); this.data.forEach(function (e) { "isFlip" === e.data && (e.revert(), e.getChildren(!0, !0, !1).forEach(function (e) { return r.splice(r.indexOf(e), 1); })); }), r .map(function (e) { return { g: e.globalTime(0), t: e }; }) .sort(function (e, t) { return t.g - e.g || -1 / 0; }) .forEach(function (t) { return t.t.revert(e); }), this.data.forEach(function (t) { return !(t instanceof an) && t.revert && t.revert(e); }), this._r.forEach(function (t) { return t(e, n); }), (this.isReverted = !0); } else this.data.forEach(function (e) { return e.kill && e.kill(); }); if ((this.clear(), t)) for (var i = bn.length; i--; ) bn[i].id === this.id && bn.splice(i, 1); }), (t.revert = function (e) { this.kill(e || {}); }), e ); })(), In = (function () { function e(e) { (this.contexts = []), (this.scope = e); } var t = e.prototype; return ( (t.add = function (e, t, n) { R(e) || (e = { matches: e }); var r, i, o, a = new An(0, n || this.scope), u = (a.conditions = {}); for (i in (s && !a.selector && (a.selector = s.selector), this.contexts.push(a), (t = a.add("onMatch", t)), (a.queries = e), e)) "all" === i ? (o = 1) : (r = l.matchMedia(e[i])) && (bn.indexOf(a) < 0 && bn.push(a), (u[i] = r.matches) && (o = 1), r.addListener ? r.addListener(Ln) : r.addEventListener("change", Ln)); return o && t(a), this; }), (t.revert = function (e) { this.kill(e || {}); }), (t.kill = function (e) { this.contexts.forEach(function (t) { return t.kill(e, !0); }); }), e ); })(), Mn = { registerPlugin: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; t.forEach(function (e) { return St(e); }); }, timeline: function (e) { return new Xt(e); }, getTweensOf: function (e, t) { return u.getTweensOf(e, t); }, getProperty: function (e, t, n, r) { M(e) && (e = rt(e)[0]); var i = he(e || {}).get, o = n ? we : be; return ( "native" === n && (n = ""), e ? t ? o(((ae[t] && ae[t].get) || i)(e, t, n, r)) : function (t, n, r) { return o(((ae[t] && ae[t].get) || i)(e, t, n, r)); } : e ); }, quickSetter: function (e, t, n) { if ((e = rt(e)).length > 1) { var r = e.map(function (e) { return kn.quickSetter(e, t, n); }), i = r.length; return function (e) { for (var t = i; t--; ) r[t](e); }; } e = e[0] || {}; var o = ae[t], a = he(e), s = (a.harness && (a.harness.aliases || {})[t]) || t, u = o ? function (t) { var r = new o(); (f._pt = 0), r.init(e, n ? t + n : t, f, 0, [e]), r.render(1, r), f._pt && _n(1, f); } : a.set(e, s); return o ? u : function (t) { return u(e, s, n ? t + n : t, a, 1); }; }, quickTo: function (e, t, n) { var r, i = kn.to(e, Te((((r = {})[t] = "+=0.1"), (r.paused = !0), r), n || {})), o = function (e, n, r) { return i.resetTo(t, e, n, r); }; return (o.tween = i), o; }, isTweening: function (e) { return u.getTweensOf(e, !0).length > 0; }, defaults: function (e) { return e && e.ease && (e.ease = Gt(e.ease, b.ease)), xe(b, e || {}); }, config: function (e) { return xe(C, e || {}); }, registerEffect: function (e) { var t = e.name, n = e.effect, r = e.plugins, i = e.defaults, o = e.extendTimeline; (r || "").split(",").forEach(function (e) { return e && !ae[e] && !W[e] && $(t + " effect requires " + e + " plugin."); }), (se[t] = function (e, t, r) { return n(rt(e), Se(t || {}, i), r); }), o && (Xt.prototype[t] = function (e, n, r) { return this.add(se[t](e, R(n) ? n : (r = n) && {}, this), r); }); }, registerEase: function (e, t) { Dt[e] = Gt(t); }, parseEase: function (e, t) { return arguments.length ? Gt(e, t) : Dt; }, getById: function (e) { return u.getById(e); }, exportRoot: function (e, t) { void 0 === e && (e = {}); var n, r, i = new Xt(e); for (i.smoothChildTiming = D(e.smoothChildTiming), u.remove(i), i._dp = 0, i._time = i._tTime = u._time, n = u._first; n; ) (r = n._next), (!t && !n._dur && n instanceof an && n.vars.onComplete === n._targets[0]) || je(i, n, n._start - n._delay), (n = r); return je(u, i, 0), i; }, context: function (e, t) { return e ? new An(e, t) : s; }, matchMedia: function (e) { return new In(e); }, matchMediaRefresh: function () { return ( bn.forEach(function (e) { var t, n, r = e.conditions; for (n in r) r[n] && ((r[n] = !1), (t = 1)); t && e.revert(); }) || Ln() ); }, addEventListener: function (e, t) { var n = wn[e] || (wn[e] = []); ~n.indexOf(t) || n.push(t); }, removeEventListener: function (e, t) { var n = wn[e], r = n && n.indexOf(t); r >= 0 && n.splice(r, 1); }, utils: { wrap: ft, wrapYoyo: _t, distribute: at, random: lt, snap: ut, normalize: ht, getUnit: Je, clamp: Qe, splitColor: Lt, toArray: rt, selector: it, mapRange: mt, pipe: ct, unitize: dt, interpolate: vt, shuffle: ot }, install: q, effects: se, ticker: kt, updateRoot: Xt.updateRoot, plugins: ae, globalTimeline: u, core: { PropTween: Cn, globals: J, Tween: an, Timeline: Xt, Animation: Wt, getCache: he, _removeLinkedListItem: Ie, reverting: function () { return a; }, context: function (e) { return e && s && (s.data.push(e), (e._ctx = s)), s; }, suppressOverwrites: function (e) { return (o = e); }, }, }; fe("to,from,fromTo,delayedCall,set,killTweensOf", function (e) { return (Mn[e] = an[e]); }), kt.add(Xt.updateRoot), (f = Mn.to({}, { duration: 0 })); var Pn = function (e, t) { for (var n = e._pt; n && n.p !== t && n.op !== t && n.fp !== t; ) n = n._next; return n; }, On = function (e, t) { return { name: e, rawVars: 1, init: function (e, n, r) { r._onInit = function (e) { var r, i; if ( (M(n) && ((r = {}), fe(n, function (e) { return (r[e] = 1); }), (n = r)), t) ) { for (i in ((r = {}), n)) r[i] = t(n[i]); n = r; } !(function (e, t) { var n, r, i, o = e._targets; for (n in t) for (r = o.length; r--; ) (i = e._ptLookup[r][n]) && (i = i.d) && (i._pt && (i = Pn(i, n)), i && i.modifier && i.modifier(t[n], e, o[r], n)); })(e, n); }; }, }; }, kn = Mn.registerPlugin( { name: "attr", init: function (e, t, n, r, i) { var o, a, s; for (o in ((this.tween = n), t)) (s = e.getAttribute(o) || ""), ((a = this.add(e, "setAttribute", (s || 0) + "", t[o], r, i, 0, 0, o)).op = o), (a.b = s), this._props.push(o); }, render: function (e, t) { for (var n = t._pt; n; ) a ? n.set(n.t, n.p, n.b, n) : n.r(e, n.d), (n = n._next); }, }, { name: "endArray", init: function (e, t) { for (var n = t.length; n--; ) this.add(e, n, e[n] || 0, t[n], 0, 0, 0, 0, 0, 1); }, }, On("roundProps", st), On("modifiers"), On("snap", ut) ) || Mn; (an.version = Xt.version = kn.version = "3.12.2"), (h = 1), N() && Rt(); var Rn = Dt.Power0, Dn = Dt.Power1, Nn = Dt.Power2, Bn = Dt.Power3, Fn = Dt.Power4, Un = Dt.Linear, jn = Dt.Quad, Gn = Dt.Cubic, Hn = Dt.Quart, Vn = Dt.Quint, Zn = Dt.Strong, zn = Dt.Elastic, Yn = Dt.Back, Wn = Dt.SteppedEase, Xn = Dt.Bounce, qn = Dt.Sine, Kn = Dt.Expo, $n = Dt.Circ; }, 52001: (e, t, n) => { "use strict"; n.r(t), n.d(t, { Back: () => d.Back, Bounce: () => d.Bounce, CSSPlugin: () => Te, Circ: () => d.Circ, Cubic: () => d.Cubic, Elastic: () => d.Elastic, Expo: () => d.Expo, Linear: () => d.Linear, Power0: () => d.Power0, Power1: () => d.Power1, Power2: () => d.Power2, Power3: () => d.Power3, Power4: () => d.Power4, Quad: () => d.Quad, Quart: () => d.Quart, Quint: () => d.Quint, Sine: () => d.Sine, SteppedEase: () => d.SteppedEase, Strong: () => d.Strong, TimelineLite: () => d.TimelineLite, TimelineMax: () => d.TimelineMax, TweenLite: () => d.TweenLite, TweenMax: () => Ee, default: () => xe, gsap: () => xe }); var r, i, o, a, s, u, l, c, d = n(64770), h = {}, p = 180 / Math.PI, f = Math.PI / 180, _ = Math.atan2, g = /([A-Z])/g, m = /(left|right|width|margin|padding|x)/i, v = /[\s,\(]\S/, y = { autoAlpha: "opacity,visibility", scale: "scaleX,scaleY", alpha: "opacity" }, C = function (e, t) { return t.set(t.t, t.p, Math.round(1e4 * (t.s + t.c * e)) / 1e4 + t.u, t); }, b = function (e, t) { return t.set(t.t, t.p, 1 === e ? t.e : Math.round(1e4 * (t.s + t.c * e)) / 1e4 + t.u, t); }, w = function (e, t) { return t.set(t.t, t.p, e ? Math.round(1e4 * (t.s + t.c * e)) / 1e4 + t.u : t.b, t); }, S = function (e, t) { var n = t.s + t.c * e; t.set(t.t, t.p, ~~(n + (n < 0 ? -0.5 : 0.5)) + t.u, t); }, T = function (e, t) { return t.set(t.t, t.p, e ? t.e : t.b, t); }, x = function (e, t) { return t.set(t.t, t.p, 1 !== e ? t.b : t.e, t); }, E = function (e, t, n) { return (e.style[t] = n); }, L = function (e, t, n) { return e.style.setProperty(t, n); }, A = function (e, t, n) { return (e._gsap[t] = n); }, I = function (e, t, n) { return (e._gsap.scaleX = e._gsap.scaleY = n); }, M = function (e, t, n, r, i) { var o = e._gsap; (o.scaleX = o.scaleY = n), o.renderTransform(i, o); }, P = function (e, t, n, r, i) { var o = e._gsap; (o[t] = n), o.renderTransform(i, o); }, O = "transform", k = O + "Origin", R = function e(t, n) { var r = this, i = this.target, o = i.style; if (t in h && o) { if (((this.tfm = this.tfm || {}), "transform" === t)) return y.transform.split(",").forEach(function (t) { return e.call(r, t, n); }); if ( (~(t = y[t] || t).indexOf(",") ? t.split(",").forEach(function (e) { return (r.tfm[e] = J(i, e)); }) : (this.tfm[t] = i._gsap.x ? i._gsap[t] : J(i, t)), this.props.indexOf(O) >= 0) ) return; i._gsap.svg && ((this.svgo = i.getAttribute("data-svg-origin")), this.props.push(k, n, "")), (t = O); } (o || n) && this.props.push(t, n, o[t]); }, D = function (e) { e.translate && (e.removeProperty("translate"), e.removeProperty("scale"), e.removeProperty("rotate")); }, N = function () { var e, t, n = this.props, r = this.target, i = r.style, o = r._gsap; for (e = 0; e < n.length; e += 3) n[e + 1] ? (r[n[e]] = n[e + 2]) : n[e + 2] ? (i[n[e]] = n[e + 2]) : i.removeProperty("--" === n[e].substr(0, 2) ? n[e] : n[e].replace(g, "-$1").toLowerCase()); if (this.tfm) { for (t in this.tfm) o[t] = this.tfm[t]; o.svg && (o.renderTransform(), r.setAttribute("data-svg-origin", this.svgo || "")), ((e = l()) && e.isStart) || i[O] || (D(i), (o.uncache = 1)); } }, B = function (e, t) { var n = { target: e, props: [], revert: N, save: R }; return ( e._gsap || d.gsap.core.getCache(e), t && t.split(",").forEach(function (e) { return n.save(e); }), n ); }, F = function (e, t) { var n = i.createElementNS ? i.createElementNS((t || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), e) : i.createElement(e); return n.style ? n : i.createElement(e); }, U = function e(t, n, r) { var i = getComputedStyle(t); return i[n] || i.getPropertyValue(n.replace(g, "-$1").toLowerCase()) || i.getPropertyValue(n) || (!r && e(t, G(n) || n, 1)) || ""; }, j = "O,Moz,ms,Ms,Webkit".split(","), G = function (e, t, n) { var r = (t || s).style, i = 5; if (e in r && !n) return e; for (e = e.charAt(0).toUpperCase() + e.substr(1); i-- && !(j[i] + e in r); ); return i < 0 ? null : (3 === i ? "ms" : i >= 0 ? j[i] : "") + e; }, H = function () { "undefined" != typeof window && window.document && ((r = window), (i = r.document), (o = i.documentElement), (s = F("div") || { style: {} }), F("div"), (O = G(O)), (k = O + "Origin"), (s.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0"), (c = !!G("perspective")), (l = d.gsap.core.reverting), (a = 1)); }, V = function e(t) { var n, r = F("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"), i = this.parentNode, a = this.nextSibling, s = this.style.cssText; if ((o.appendChild(r), r.appendChild(this), (this.style.display = "block"), t)) try { (n = this.getBBox()), (this._gsapBBox = this.getBBox), (this.getBBox = e); } catch (e) {} else this._gsapBBox && (n = this._gsapBBox()); return i && (a ? i.insertBefore(this, a) : i.appendChild(this)), o.removeChild(r), (this.style.cssText = s), n; }, Z = function (e, t) { for (var n = t.length; n--; ) if (e.hasAttribute(t[n])) return e.getAttribute(t[n]); }, z = function (e) { var t; try { t = e.getBBox(); } catch (n) { t = V.call(e, !0); } return (t && (t.width || t.height)) || e.getBBox === V || (t = V.call(e, !0)), !t || t.width || t.x || t.y ? t : { x: +Z(e, ["x", "cx", "x1"]) || 0, y: +Z(e, ["y", "cy", "y1"]) || 0, width: 0, height: 0 }; }, Y = function (e) { return !(!e.getCTM || (e.parentNode && !e.ownerSVGElement) || !z(e)); }, W = function (e, t) { if (t) { var n = e.style; t in h && t !== k && (t = O), n.removeProperty ? (("ms" !== t.substr(0, 2) && "webkit" !== t.substr(0, 6)) || (t = "-" + t), n.removeProperty(t.replace(g, "-$1").toLowerCase())) : n.removeAttribute(t); } }, X = function (e, t, n, r, i, o) { var a = new d.PropTween(e._pt, t, n, 0, 1, o ? x : T); return (e._pt = a), (a.b = r), (a.e = i), e._props.push(n), a; }, q = { deg: 1, rad: 1, turn: 1 }, K = { grid: 1, flex: 1 }, $ = function e(t, n, r, o) { var a, u, l, c, p = parseFloat(r) || 0, f = (r + "").trim().substr((p + "").length) || "px", _ = s.style, g = m.test(n), v = "svg" === t.tagName.toLowerCase(), y = (v ? "client" : "offset") + (g ? "Width" : "Height"), C = 100, b = "px" === o, w = "%" === o; return o === f || !p || q[o] || q[f] ? p : ("px" !== f && !b && (p = e(t, n, r, "px")), (c = t.getCTM && Y(t)), (!w && "%" !== f) || (!h[n] && !~n.indexOf("adius")) ? ((_[g ? "width" : "height"] = C + (b ? f : o)), (u = ~n.indexOf("adius") || ("em" === o && t.appendChild && !v) ? t : t.parentNode), c && (u = (t.ownerSVGElement || {}).parentNode), (u && u !== i && u.appendChild) || (u = i.body), (l = u._gsap) && w && l.width && g && l.time === d._ticker.time && !l.uncache ? (0, d._round)((p / l.width) * C) : ((w || "%" === f) && !K[U(u, "display")] && (_.position = U(t, "position")), u === t && (_.position = "static"), u.appendChild(s), (a = s[y]), u.removeChild(s), (_.position = "absolute"), g && w && (((l = (0, d._getCache)(u)).time = d._ticker.time), (l.width = u[y])), (0, d._round)(b ? (a * p) / C : a && p ? (C / a) * p : 0))) : ((a = c ? t.getBBox()[g ? "width" : "height"] : t[y]), (0, d._round)(w ? (p / a) * C : (p / 100) * a))); }, J = function (e, t, n, r) { var i; return a || H(), t in y && "transform" !== t && ~(t = y[t]).indexOf(",") && (t = t.split(",")[0]), h[t] && "transform" !== t ? ((i = le(e, r)), (i = "transformOrigin" !== t ? i[t] : i.svg ? i.origin : ce(U(e, k)) + " " + i.zOrigin + "px")) : (!(i = e.style[t]) || "auto" === i || r || ~(i + "").indexOf("calc(")) && (i = (ne[t] && ne[t](e, t, n)) || U(e, t) || (0, d._getProperty)(e, t) || ("opacity" === t ? 1 : 0)), n && !~(i + "").trim().indexOf(" ") ? $(e, t, i, n) + n : i; }, Q = function (e, t, n, r) { if (!n || "none" === n) { var i = G(t, e, 1), o = i && U(e, i, 1); o && o !== n ? ((t = i), (n = o)) : "borderColor" === t && (n = U(e, "borderTopColor")); } var a, s, u, l, c, h, p, f, _, g, m, v = new d.PropTween(this._pt, e.style, t, 0, 1, d._renderComplexString), y = 0, C = 0; if (((v.b = n), (v.e = r), (n += ""), "auto" === (r += "") && ((e.style[t] = r), (r = U(e, t) || r), (e.style[t] = n)), (a = [n, r]), (0, d._colorStringFilter)(a), (r = a[1]), (u = (n = a[0]).match(d._numWithUnitExp) || []), (r.match(d._numWithUnitExp) || []).length)) { for (; (s = d._numWithUnitExp.exec(r)); ) (p = s[0]), (_ = r.substring(y, s.index)), c ? (c = (c + 1) % 5) : ("rgba(" !== _.substr(-5) && "hsla(" !== _.substr(-5)) || (c = 1), p !== (h = u[C++] || "") && ((l = parseFloat(h) || 0), (m = h.substr((l + "").length)), "=" === p.charAt(1) && (p = (0, d._parseRelative)(l, p) + m), (f = parseFloat(p)), (g = p.substr((f + "").length)), (y = d._numWithUnitExp.lastIndex - g.length), g || ((g = g || d._config.units[t] || m), y === r.length && ((r += g), (v.e += g))), m !== g && (l = $(e, t, h, g) || 0), (v._pt = { _next: v._pt, p: _ || 1 === C ? _ : ",", s: l, c: f - l, m: (c && c < 4) || "zIndex" === t ? Math.round : 0 })); v.c = y < r.length ? r.substring(y, r.length) : ""; } else v.r = "display" === t && "none" === r ? x : T; return d._relExp.test(r) && (v.e = 0), (this._pt = v), v; }, ee = { top: "0%", bottom: "100%", left: "0%", right: "100%", center: "50%" }, te = function (e, t) { if (t.tween && t.tween._time === t.tween._dur) { var n, r, i, o = t.t, a = o.style, s = t.u, u = o._gsap; if ("all" === s || !0 === s) (a.cssText = ""), (r = 1); else for (i = (s = s.split(",")).length; --i > -1; ) (n = s[i]), h[n] && ((r = 1), (n = "transformOrigin" === n ? k : O)), W(o, n); r && (W(o, O), u && (u.svg && o.removeAttribute("transform"), le(o, 1), (u.uncache = 1), D(a))); } }, ne = { clearProps: function (e, t, n, r, i) { if ("isFromStart" !== i.data) { var o = (e._pt = new d.PropTween(e._pt, t, n, 0, 0, te)); return (o.u = r), (o.pr = -10), (o.tween = i), e._props.push(n), 1; } }, }, re = [1, 0, 0, 1, 0, 0], ie = {}, oe = function (e) { return "matrix(1, 0, 0, 1, 0, 0)" === e || "none" === e || !e; }, ae = function (e) { var t = U(e, O); return oe(t) ? re : t.substr(7).match(d._numExp).map(d._round); }, se = function (e, t) { var n, r, i, a, s = e._gsap || (0, d._getCache)(e), u = e.style, l = ae(e); return s.svg && e.getAttribute("transform") ? ("1,0,0,1,0,0" === (l = [(i = e.transform.baseVal.consolidate().matrix).a, i.b, i.c, i.d, i.e, i.f]).join(",") ? re : l) : (l !== re || e.offsetParent || e === o || s.svg || ((i = u.display), (u.display = "block"), ((n = e.parentNode) && e.offsetParent) || ((a = 1), (r = e.nextElementSibling), o.appendChild(e)), (l = ae(e)), i ? (u.display = i) : W(e, "display"), a && (r ? n.insertBefore(e, r) : n ? n.appendChild(e) : o.removeChild(e))), t && l.length > 6 ? [l[0], l[1], l[4], l[5], l[12], l[13]] : l); }, ue = function (e, t, n, r, i, o) { var a, s, u, l = e._gsap, c = i || se(e, !0), d = l.xOrigin || 0, h = l.yOrigin || 0, p = l.xOffset || 0, f = l.yOffset || 0, _ = c[0], g = c[1], m = c[2], v = c[3], y = c[4], C = c[5], b = t.split(" "), w = parseFloat(b[0]) || 0, S = parseFloat(b[1]) || 0; n ? c !== re && (s = _ * v - g * m) && ((u = w * (-g / s) + S * (_ / s) - (_ * C - g * y) / s), (w = w * (v / s) + S * (-m / s) + (m * C - v * y) / s), (S = u)) : ((w = (a = z(e)).x + (~b[0].indexOf("%") ? (w / 100) * a.width : w)), (S = a.y + (~(b[1] || b[0]).indexOf("%") ? (S / 100) * a.height : S))), r || (!1 !== r && l.smooth) ? ((y = w - d), (C = S - h), (l.xOffset = p + (y * _ + C * m) - y), (l.yOffset = f + (y * g + C * v) - C)) : (l.xOffset = l.yOffset = 0), (l.xOrigin = w), (l.yOrigin = S), (l.smooth = !!r), (l.origin = t), (l.originIsAbsolute = !!n), (e.style[k] = "0px 0px"), o && (X(o, l, "xOrigin", d, w), X(o, l, "yOrigin", h, S), X(o, l, "xOffset", p, l.xOffset), X(o, l, "yOffset", f, l.yOffset)), e.setAttribute("data-svg-origin", w + " " + S); }, le = function (e, t) { var n = e._gsap || new d.GSCache(e); if ("x" in n && !t && !n.uncache) return n; var r, i, o, a, s, u, l, h, g, m, v, y, C, b, w, S, T, x, E, L, A, I, M, P, R, D, N, B, F, j, G, H, V = e.style, Z = n.scaleX < 0, z = "px", W = "deg", X = getComputedStyle(e), q = U(e, k) || "0"; return (r = i = o = u = l = h = g = m = v = 0), (a = s = 1), (n.svg = !(!e.getCTM || !Y(e))), X.translate && (("none" === X.translate && "none" === X.scale && "none" === X.rotate) || (V[O] = ("none" !== X.translate ? "translate3d(" + (X.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + ("none" !== X.rotate ? "rotate(" + X.rotate + ") " : "") + ("none" !== X.scale ? "scale(" + X.scale.split(" ").join(",") + ") " : "") + ("none" !== X[O] ? X[O] : "")), (V.scale = V.rotate = V.translate = "none")), (b = se(e, n.svg)), n.svg && (n.uncache ? ((R = e.getBBox()), (q = n.xOrigin - R.x + "px " + (n.yOrigin - R.y) + "px"), (P = "")) : (P = !t && e.getAttribute("data-svg-origin")), ue(e, P || q, !!P || n.originIsAbsolute, !1 !== n.smooth, b)), (y = n.xOrigin || 0), (C = n.yOrigin || 0), b !== re && ((x = b[0]), (E = b[1]), (L = b[2]), (A = b[3]), (r = I = b[4]), (i = M = b[5]), 6 === b.length ? ((a = Math.sqrt(x * x + E * E)), (s = Math.sqrt(A * A + L * L)), (u = x || E ? _(E, x) * p : 0), (g = L || A ? _(L, A) * p + u : 0) && (s *= Math.abs(Math.cos(g * f))), n.svg && ((r -= y - (y * x + C * L)), (i -= C - (y * E + C * A)))) : ((H = b[6]), (j = b[7]), (N = b[8]), (B = b[9]), (F = b[10]), (G = b[11]), (r = b[12]), (i = b[13]), (o = b[14]), (l = (w = _(H, F)) * p), w && ((P = I * (S = Math.cos(-w)) + N * (T = Math.sin(-w))), (R = M * S + B * T), (D = H * S + F * T), (N = I * -T + N * S), (B = M * -T + B * S), (F = H * -T + F * S), (G = j * -T + G * S), (I = P), (M = R), (H = D)), (h = (w = _(-L, F)) * p), w && ((S = Math.cos(-w)), (G = A * (T = Math.sin(-w)) + G * S), (x = P = x * S - N * T), (E = R = E * S - B * T), (L = D = L * S - F * T)), (u = (w = _(E, x)) * p), w && ((P = x * (S = Math.cos(w)) + E * (T = Math.sin(w))), (R = I * S + M * T), (E = E * S - x * T), (M = M * S - I * T), (x = P), (I = R)), l && Math.abs(l) + Math.abs(u) > 359.9 && ((l = u = 0), (h = 180 - h)), (a = (0, d._round)(Math.sqrt(x * x + E * E + L * L))), (s = (0, d._round)(Math.sqrt(M * M + H * H))), (w = _(I, M)), (g = Math.abs(w) > 2e-4 ? w * p : 0), (v = G ? 1 / (G < 0 ? -G : G) : 0)), n.svg && ((P = e.getAttribute("transform")), (n.forceCSS = e.setAttribute("transform", "") || !oe(U(e, O))), P && e.setAttribute("transform", P))), Math.abs(g) > 90 && Math.abs(g) < 270 && (Z ? ((a *= -1), (g += u <= 0 ? 180 : -180), (u += u <= 0 ? 180 : -180)) : ((s *= -1), (g += g <= 0 ? 180 : -180))), (t = t || n.uncache), (n.x = r - ((n.xPercent = r && ((!t && n.xPercent) || (Math.round(e.offsetWidth / 2) === Math.round(-r) ? -50 : 0))) ? (e.offsetWidth * n.xPercent) / 100 : 0) + z), (n.y = i - ((n.yPercent = i && ((!t && n.yPercent) || (Math.round(e.offsetHeight / 2) === Math.round(-i) ? -50 : 0))) ? (e.offsetHeight * n.yPercent) / 100 : 0) + z), (n.z = o + z), (n.scaleX = (0, d._round)(a)), (n.scaleY = (0, d._round)(s)), (n.rotation = (0, d._round)(u) + W), (n.rotationX = (0, d._round)(l) + W), (n.rotationY = (0, d._round)(h) + W), (n.skewX = g + W), (n.skewY = m + W), (n.transformPerspective = v + z), (n.zOrigin = parseFloat(q.split(" ")[2]) || 0) && (V[k] = ce(q)), (n.xOffset = n.yOffset = 0), (n.force3D = d._config.force3D), (n.renderTransform = n.svg ? me : c ? ge : he), (n.uncache = 0), n; }, ce = function (e) { return (e = e.split(" "))[0] + " " + e[1]; }, de = function (e, t, n) { var r = (0, d.getUnit)(t); return (0, d._round)(parseFloat(t) + parseFloat($(e, "x", n + "px", r))) + r; }, he = function (e, t) { (t.z = "0px"), (t.rotationY = t.rotationX = "0deg"), (t.force3D = 0), ge(e, t); }, pe = "0deg", fe = "0px", _e = ") ", ge = function (e, t) { var n = t || this, r = n.xPercent, i = n.yPercent, o = n.x, a = n.y, s = n.z, u = n.rotation, l = n.rotationY, c = n.rotationX, d = n.skewX, h = n.skewY, p = n.scaleX, _ = n.scaleY, g = n.transformPerspective, m = n.force3D, v = n.target, y = n.zOrigin, C = "", b = ("auto" === m && e && 1 !== e) || !0 === m; if (y && (c !== pe || l !== pe)) { var w, S = parseFloat(l) * f, T = Math.sin(S), x = Math.cos(S); (S = parseFloat(c) * f), (w = Math.cos(S)), (o = de(v, o, T * w * -y)), (a = de(v, a, -Math.sin(S) * -y)), (s = de(v, s, x * w * -y + y)); } g !== fe && (C += "perspective(" + g + _e), (r || i) && (C += "translate(" + r + "%, " + i + "%) "), (b || o !== fe || a !== fe || s !== fe) && (C += s !== fe || b ? "translate3d(" + o + ", " + a + ", " + s + ") " : "translate(" + o + ", " + a + _e), u !== pe && (C += "rotate(" + u + _e), l !== pe && (C += "rotateY(" + l + _e), c !== pe && (C += "rotateX(" + c + _e), (d === pe && h === pe) || (C += "skew(" + d + ", " + h + _e), (1 === p && 1 === _) || (C += "scale(" + p + ", " + _ + _e), (v.style[O] = C || "translate(0, 0)"); }, me = function (e, t) { var n, r, i, o, a, s = t || this, u = s.xPercent, l = s.yPercent, c = s.x, h = s.y, p = s.rotation, _ = s.skewX, g = s.skewY, m = s.scaleX, v = s.scaleY, y = s.target, C = s.xOrigin, b = s.yOrigin, w = s.xOffset, S = s.yOffset, T = s.forceCSS, x = parseFloat(c), E = parseFloat(h); (p = parseFloat(p)), (_ = parseFloat(_)), (g = parseFloat(g)) && ((_ += g = parseFloat(g)), (p += g)), p || _ ? ((p *= f), (_ *= f), (n = Math.cos(p) * m), (r = Math.sin(p) * m), (i = Math.sin(p - _) * -v), (o = Math.cos(p - _) * v), _ && ((g *= f), (a = Math.tan(_ - g)), (i *= a = Math.sqrt(1 + a * a)), (o *= a), g && ((a = Math.tan(g)), (n *= a = Math.sqrt(1 + a * a)), (r *= a))), (n = (0, d._round)(n)), (r = (0, d._round)(r)), (i = (0, d._round)(i)), (o = (0, d._round)(o))) : ((n = m), (o = v), (r = i = 0)), ((x && !~(c + "").indexOf("px")) || (E && !~(h + "").indexOf("px"))) && ((x = $(y, "x", c, "px")), (E = $(y, "y", h, "px"))), (C || b || w || S) && ((x = (0, d._round)(x + C - (C * n + b * i) + w)), (E = (0, d._round)(E + b - (C * r + b * o) + S))), (u || l) && ((a = y.getBBox()), (x = (0, d._round)(x + (u / 100) * a.width)), (E = (0, d._round)(E + (l / 100) * a.height))), (a = "matrix(" + n + "," + r + "," + i + "," + o + "," + x + "," + E + ")"), y.setAttribute("transform", a), T && (y.style[O] = a); }, ve = function (e, t, n, r, i) { var o, a, s = 360, u = (0, d._isString)(i), l = parseFloat(i) * (u && ~i.indexOf("rad") ? p : 1) - r, c = r + l + "deg"; return u && ("short" === (o = i.split("_")[1]) && (l %= s) !== l % 180 && (l += l < 0 ? s : -360), "cw" === o && l < 0 ? (l = ((l + 36e9) % s) - ~~(l / s) * s) : "ccw" === o && l > 0 && (l = ((l - 36e9) % s) - ~~(l / s) * s)), (e._pt = a = new d.PropTween(e._pt, t, n, r, l, b)), (a.e = c), (a.u = "deg"), e._props.push(n), a; }, ye = function (e, t) { for (var n in t) e[n] = t[n]; return e; }, Ce = function (e, t, n) { var r, i, o, a, s, u, l, c = ye({}, n._gsap), p = n.style; for (i in (c.svg ? ((o = n.getAttribute("transform")), n.setAttribute("transform", ""), (p[O] = t), (r = le(n, 1)), W(n, O), n.setAttribute("transform", o)) : ((o = getComputedStyle(n)[O]), (p[O] = t), (r = le(n, 1)), (p[O] = o)), h)) (o = c[i]) !== (a = r[i]) && "perspective,force3D,transformOrigin,svgOrigin".indexOf(i) < 0 && ((s = (0, d.getUnit)(o) !== (l = (0, d.getUnit)(a)) ? $(n, i, o, l) : parseFloat(o)), (u = parseFloat(a)), (e._pt = new d.PropTween(e._pt, r, i, s, u - s, C)), (e._pt.u = l || 0), e._props.push(i)); ye(r, c); }; (0, d._forEachName)("padding,margin,Width,Radius", function (e, t) { var n = "Top", r = "Right", i = "Bottom", o = "Left", a = (t < 3 ? [n, r, i, o] : [n + o, n + r, i + r, i + o]).map(function (n) { return t < 2 ? e + n : "border" + n + e; }); ne[t > 1 ? "border" + e : e] = function (e, t, n, r, i) { var o, s; if (arguments.length < 4) return ( (o = a.map(function (t) { return J(e, t, n); })), 5 === (s = o.join(" ")).split(o[0]).length ? o[0] : s ); (o = (r + "").split(" ")), (s = {}), a.forEach(function (e, t) { return (s[e] = o[t] = o[t] || o[((t - 1) / 2) | 0]); }), e.init(t, s, i); }; }); var be, we, Se, Te = { name: "css", register: H, targetTest: function (e) { return e.style && e.nodeType; }, init: function (e, t, n, r, i) { var o, s, u, l, c, p, f, _, g, m, b, T, x, E, L, A, I, M, P, R, D = this._props, N = e.style, F = n.vars.startAt; for (f in (a || H(), (this.styles = this.styles || B(e)), (A = this.styles.props), (this.tween = n), t)) if ("autoRound" !== f && ((s = t[f]), !d._plugins[f] || !(0, d._checkPlugin)(f, t, n, r, e, i))) if (((c = typeof s), (p = ne[f]), "function" === c && (c = typeof (s = s.call(n, r, e, i))), "string" === c && ~s.indexOf("random(") && (s = (0, d._replaceRandom)(s)), p)) p(this, e, f, s, n) && (L = 1); else if ("--" === f.substr(0, 2)) (o = (getComputedStyle(e).getPropertyValue(f) + "").trim()), (s += ""), (d._colorExp.lastIndex = 0), d._colorExp.test(o) || ((_ = (0, d.getUnit)(o)), (g = (0, d.getUnit)(s))), g ? _ !== g && (o = $(e, f, o, g) + g) : _ && (s += _), this.add(N, "setProperty", o, s, r, i, 0, 0, f), D.push(f), A.push(f, 0, N[f]); else if ("undefined" !== c) { if ((F && f in F ? ((o = "function" == typeof F[f] ? F[f].call(n, r, e, i) : F[f]), (0, d._isString)(o) && ~o.indexOf("random(") && (o = (0, d._replaceRandom)(o)), (0, d.getUnit)(o + "") || (o += d._config.units[f] || (0, d.getUnit)(J(e, f)) || ""), "=" === (o + "").charAt(1) && (o = J(e, f))) : (o = J(e, f)), (l = parseFloat(o)), (m = "string" === c && "=" === s.charAt(1) && s.substr(0, 2)) && (s = s.substr(2)), (u = parseFloat(s)), f in y && ("autoAlpha" === f && (1 === l && "hidden" === J(e, "visibility") && u && (l = 0), A.push("visibility", 0, N.visibility), X(this, N, "visibility", l ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), "scale" !== f && "transform" !== f && ~(f = y[f]).indexOf(",") && (f = f.split(",")[0])), (b = f in h))) if ((this.styles.save(f), T || (((x = e._gsap).renderTransform && !t.parseTransform) || le(e, t.parseTransform), (E = !1 !== t.smoothOrigin && x.smooth), ((T = this._pt = new d.PropTween(this._pt, N, O, 0, 1, x.renderTransform, x, 0, -1)).dep = 1)), "scale" === f)) (this._pt = new d.PropTween(this._pt, x, "scaleY", x.scaleY, (m ? (0, d._parseRelative)(x.scaleY, m + u) : u) - x.scaleY || 0, C)), (this._pt.u = 0), D.push("scaleY", f), (f += "X"); else { if ("transformOrigin" === f) { A.push(k, 0, N[k]), (M = void 0), (P = void 0), (R = void 0), (M = (I = s).split(" ")), (P = M[0]), (R = M[1] || "50%"), ("top" !== P && "bottom" !== P && "left" !== R && "right" !== R) || ((I = P), (P = R), (R = I)), (M[0] = ee[P] || P), (M[1] = ee[R] || R), (s = M.join(" ")), x.svg ? ue(e, s, 0, E, 0, this) : ((g = parseFloat(s.split(" ")[2]) || 0) !== x.zOrigin && X(this, x, "zOrigin", x.zOrigin, g), X(this, N, f, ce(o), ce(s))); continue; } if ("svgOrigin" === f) { ue(e, s, 1, E, 0, this); continue; } if (f in ie) { ve(this, x, f, l, m ? (0, d._parseRelative)(l, m + s) : s); continue; } if ("smoothOrigin" === f) { X(this, x, "smooth", x.smooth, s); continue; } if ("force3D" === f) { x[f] = s; continue; } if ("transform" === f) { Ce(this, s, e); continue; } } else f in N || (f = G(f) || f); if (b || ((u || 0 === u) && (l || 0 === l) && !v.test(s) && f in N)) u || (u = 0), (_ = (o + "").substr((l + "").length)) !== (g = (0, d.getUnit)(s) || (f in d._config.units ? d._config.units[f] : _)) && (l = $(e, f, o, g)), (this._pt = new d.PropTween(this._pt, b ? x : N, f, l, (m ? (0, d._parseRelative)(l, m + u) : u) - l, b || ("px" !== g && "zIndex" !== f) || !1 === t.autoRound ? C : S)), (this._pt.u = g || 0), _ !== g && "%" !== g && ((this._pt.b = o), (this._pt.r = w)); else if (f in N) Q.call(this, e, f, o, m ? m + s : s); else if (f in e) this.add(e, f, o || e[f], m ? m + s : s, r, i); else if ("parseTransform" !== f) { (0, d._missingPlugin)(f, s); continue; } b || (f in N ? A.push(f, 0, N[f]) : A.push(f, 1, o || e[f])), D.push(f); } L && (0, d._sortPropTweensByPriority)(this); }, render: function (e, t) { if (t.tween._time || !l()) for (var n = t._pt; n; ) n.r(e, n.d), (n = n._next); else t.styles.revert(); }, get: J, aliases: y, getSetter: function (e, t, n) { var r = y[t]; return r && r.indexOf(",") < 0 && (t = r), t in h && t !== k && (e._gsap.x || J(e, "x")) ? (n && u === n ? ("scale" === t ? I : A) : (u = n || {}) && ("scale" === t ? M : P)) : e.style && !(0, d._isUndefined)(e.style[t]) ? E : ~t.indexOf("-") ? L : (0, d._getSetter)(e, t); }, core: { _removeProperty: W, _getMatrix: se }, }; (d.gsap.utils.checkPrefix = G), (d.gsap.core.getStyleSaver = B), (be = "x,y,z,scale,scaleX,scaleY,xPercent,yPercent"), (we = "rotation,rotationX,rotationY,skewX,skewY"), (Se = (0, d._forEachName)(be + "," + we + ",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", function (e) { h[e] = 1; })), (0, d._forEachName)(we, function (e) { (d._config.units[e] = "deg"), (ie[e] = 1); }), (y[Se[13]] = be + "," + we), (0, d._forEachName)("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY", function (e) { var t = e.split(":"); y[t[1]] = Se[t[0]]; }), (0, d._forEachName)("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function (e) { d._config.units[e] = "px"; }), d.gsap.registerPlugin(Te); var xe = d.gsap.registerPlugin(Te) || d.gsap, Ee = xe.core.Tween; }, 18486: (e) => { "use strict"; var t = { foo: {} }, n = Object; e.exports = function () { return { __proto__: t }.foo === t.foo && !({ __proto__: null } instanceof n); }; }, 32636: (e, t, n) => { "use strict"; var r = "undefined" != typeof Symbol && Symbol, i = n(66679); e.exports = function () { return "function" == typeof r && "function" == typeof Symbol && "symbol" == typeof r("foo") && "symbol" == typeof Symbol("bar") && i(); }; }, 66679: (e) => { "use strict"; e.exports = function () { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var e = {}, t = Symbol("test"), n = Object(t); if ("string" == typeof t) return !1; if ("[object Symbol]" !== Object.prototype.toString.call(t)) return !1; if ("[object Symbol]" !== Object.prototype.toString.call(n)) return !1; for (t in ((e[t] = 42), e)) return !1; if ("function" == typeof Object.keys && 0 !== Object.keys(e).length) return !1; if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(e).length) return !1; var r = Object.getOwnPropertySymbols(e); if (1 !== r.length || r[0] !== t) return !1; if (!Object.prototype.propertyIsEnumerable.call(e, t)) return !1; if ("function" == typeof Object.getOwnPropertyDescriptor) { var i = Object.getOwnPropertyDescriptor(e, t); if (42 !== i.value || !0 !== i.enumerable) return !1; } return !0; }; }, 23198: (e, t, n) => { "use strict"; var r = n(4090); e.exports = r.call(Function.call, Object.prototype.hasOwnProperty); }, 49081: (e, t, n) => { var r; !(function () { "use strict"; var i = function () { this.init(); }; i.prototype = { init: function () { var e = this || o; return (e._counter = 1e3), (e._html5AudioPool = []), (e.html5PoolSize = 10), (e._codecs = {}), (e._howls = []), (e._muted = !1), (e._volume = 1), (e._canPlayEvent = "canplaythrough"), (e._navigator = "undefined" != typeof window && window.navigator ? window.navigator : null), (e.masterGain = null), (e.noAudio = !1), (e.usingWebAudio = !0), (e.autoSuspend = !0), (e.ctx = null), (e.autoUnlock = !0), e._setup(), e; }, volume: function (e) { var t = this || o; if (((e = parseFloat(e)), t.ctx || p(), void 0 !== e && e >= 0 && e <= 1)) { if (((t._volume = e), t._muted)) return t; t.usingWebAudio && t.masterGain.gain.setValueAtTime(e, o.ctx.currentTime); for (var n = 0; n < t._howls.length; n++) if (!t._howls[n]._webAudio) for (var r = t._howls[n]._getSoundIds(), i = 0; i < r.length; i++) { var a = t._howls[n]._soundById(r[i]); a && a._node && (a._node.volume = a._volume * e); } return t; } return t._volume; }, mute: function (e) { var t = this || o; t.ctx || p(), (t._muted = e), t.usingWebAudio && t.masterGain.gain.setValueAtTime(e ? 0 : t._volume, o.ctx.currentTime); for (var n = 0; n < t._howls.length; n++) if (!t._howls[n]._webAudio) for (var r = t._howls[n]._getSoundIds(), i = 0; i < r.length; i++) { var a = t._howls[n]._soundById(r[i]); a && a._node && (a._node.muted = !!e || a._muted); } return t; }, stop: function () { for (var e = this || o, t = 0; t < e._howls.length; t++) e._howls[t].stop(); return e; }, unload: function () { for (var e = this || o, t = e._howls.length - 1; t >= 0; t--) e._howls[t].unload(); return e.usingWebAudio && e.ctx && void 0 !== e.ctx.close && (e.ctx.close(), (e.ctx = null), p()), e; }, codecs: function (e) { return (this || o)._codecs[e.replace(/^x-/, "")]; }, _setup: function () { var e = this || o; if (((e.state = (e.ctx && e.ctx.state) || "suspended"), e._autoSuspend(), !e.usingWebAudio)) if ("undefined" != typeof Audio) try { void 0 === new Audio().oncanplaythrough && (e._canPlayEvent = "canplay"); } catch (t) { e.noAudio = !0; } else e.noAudio = !0; try { new Audio().muted && (e.noAudio = !0); } catch (e) {} return e.noAudio || e._setupCodecs(), e; }, _setupCodecs: function () { var e = this || o, t = null; try { t = "undefined" != typeof Audio ? new Audio() : null; } catch (t) { return e; } if (!t || "function" != typeof t.canPlayType) return e; var n = t.canPlayType("audio/mpeg;").replace(/^no$/, ""), r = e._navigator ? e._navigator.userAgent : "", i = r.match(/OPR\/([0-6].)/g), a = i && parseInt(i[0].split("/")[1], 10) < 33, s = -1 !== r.indexOf("Safari") && -1 === r.indexOf("Chrome"), u = r.match(/Version\/(.*?) /), l = s && u && parseInt(u[1], 10) < 15; return (e._codecs = { mp3: !(a || (!n && !t.canPlayType("audio/mp3;").replace(/^no$/, ""))), mpeg: !!n, opus: !!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""), ogg: !!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), oga: !!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), wav: !!(t.canPlayType('audio/wav; codecs="1"') || t.canPlayType("audio/wav")).replace(/^no$/, ""), aac: !!t.canPlayType("audio/aac;").replace(/^no$/, ""), caf: !!t.canPlayType("audio/x-caf;").replace(/^no$/, ""), m4a: !!(t.canPlayType("audio/x-m4a;") || t.canPlayType("audio/m4a;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""), m4b: !!(t.canPlayType("audio/x-m4b;") || t.canPlayType("audio/m4b;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""), mp4: !!(t.canPlayType("audio/x-mp4;") || t.canPlayType("audio/mp4;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""), weba: !(l || !t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")), webm: !(l || !t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")), dolby: !!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""), flac: !!(t.canPlayType("audio/x-flac;") || t.canPlayType("audio/flac;")).replace(/^no$/, "") }), e; }, _unlockAudio: function () { var e = this || o; if (!e._audioUnlocked && e.ctx) { (e._audioUnlocked = !1), (e.autoUnlock = !1), e._mobileUnloaded || 44100 === e.ctx.sampleRate || ((e._mobileUnloaded = !0), e.unload()), (e._scratchBuffer = e.ctx.createBuffer(1, 1, 22050)); var t = function (n) { for (; e._html5AudioPool.length < e.html5PoolSize; ) try { var r = new Audio(); (r._unlocked = !0), e._releaseHtml5Audio(r); } catch (n) { e.noAudio = !0; break; } for (var i = 0; i < e._howls.length; i++) if (!e._howls[i]._webAudio) for (var o = e._howls[i]._getSoundIds(), a = 0; a < o.length; a++) { var s = e._howls[i]._soundById(o[a]); s && s._node && !s._node._unlocked && ((s._node._unlocked = !0), s._node.load()); } e._autoResume(); var u = e.ctx.createBufferSource(); (u.buffer = e._scratchBuffer), u.connect(e.ctx.destination), void 0 === u.start ? u.noteOn(0) : u.start(0), "function" == typeof e.ctx.resume && e.ctx.resume(), (u.onended = function () { u.disconnect(0), (e._audioUnlocked = !0), document.removeEventListener("touchstart", t, !0), document.removeEventListener("touchend", t, !0), document.removeEventListener("click", t, !0), document.removeEventListener("keydown", t, !0); for (var n = 0; n < e._howls.length; n++) e._howls[n]._emit("unlock"); }); }; return document.addEventListener("touchstart", t, !0), document.addEventListener("touchend", t, !0), document.addEventListener("click", t, !0), document.addEventListener("keydown", t, !0), e; } }, _obtainHtml5Audio: function () { var e = this || o; if (e._html5AudioPool.length) return e._html5AudioPool.pop(); var t = new Audio().play(); return ( t && "undefined" != typeof Promise && (t instanceof Promise || "function" == typeof t.then) && t.catch(function () { console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object."); }), new Audio() ); }, _releaseHtml5Audio: function (e) { var t = this || o; return e._unlocked && t._html5AudioPool.push(e), t; }, _autoSuspend: function () { var e = this; if (e.autoSuspend && e.ctx && void 0 !== e.ctx.suspend && o.usingWebAudio) { for (var t = 0; t < e._howls.length; t++) if (e._howls[t]._webAudio) for (var n = 0; n < e._howls[t]._sounds.length; n++) if (!e._howls[t]._sounds[n]._paused) return e; return ( e._suspendTimer && clearTimeout(e._suspendTimer), (e._suspendTimer = setTimeout(function () { if (e.autoSuspend) { (e._suspendTimer = null), (e.state = "suspending"); var t = function () { (e.state = "suspended"), e._resumeAfterSuspend && (delete e._resumeAfterSuspend, e._autoResume()); }; e.ctx.suspend().then(t, t); } }, 3e4)), e ); } }, _autoResume: function () { var e = this; if (e.ctx && void 0 !== e.ctx.resume && o.usingWebAudio) return ( "running" === e.state && "interrupted" !== e.ctx.state && e._suspendTimer ? (clearTimeout(e._suspendTimer), (e._suspendTimer = null)) : "suspended" === e.state || ("running" === e.state && "interrupted" === e.ctx.state) ? (e.ctx.resume().then(function () { e.state = "running"; for (var t = 0; t < e._howls.length; t++) e._howls[t]._emit("resume"); }), e._suspendTimer && (clearTimeout(e._suspendTimer), (e._suspendTimer = null))) : "suspending" === e.state && (e._resumeAfterSuspend = !0), e ); }, }; var o = new i(), a = function (e) { e.src && 0 !== e.src.length ? this.init(e) : console.error("An array of source files must be passed with any new Howl."); }; a.prototype = { init: function (e) { var t = this; return ( o.ctx || p(), (t._autoplay = e.autoplay || !1), (t._format = "string" != typeof e.format ? e.format : [e.format]), (t._html5 = e.html5 || !1), (t._muted = e.mute || !1), (t._loop = e.loop || !1), (t._pool = e.pool || 5), (t._preload = ("boolean" != typeof e.preload && "metadata" !== e.preload) || e.preload), (t._rate = e.rate || 1), (t._sprite = e.sprite || {}), (t._src = "string" != typeof e.src ? e.src : [e.src]), (t._volume = void 0 !== e.volume ? e.volume : 1), (t._xhr = { method: e.xhr && e.xhr.method ? e.xhr.method : "GET", headers: e.xhr && e.xhr.headers ? e.xhr.headers : null, withCredentials: !(!e.xhr || !e.xhr.withCredentials) && e.xhr.withCredentials }), (t._duration = 0), (t._state = "unloaded"), (t._sounds = []), (t._endTimers = {}), (t._queue = []), (t._playLock = !1), (t._onend = e.onend ? [{ fn: e.onend }] : []), (t._onfade = e.onfade ? [{ fn: e.onfade }] : []), (t._onload = e.onload ? [{ fn: e.onload }] : []), (t._onloaderror = e.onloaderror ? [{ fn: e.onloaderror }] : []), (t._onplayerror = e.onplayerror ? [{ fn: e.onplayerror }] : []), (t._onpause = e.onpause ? [{ fn: e.onpause }] : []), (t._onplay = e.onplay ? [{ fn: e.onplay }] : []), (t._onstop = e.onstop ? [{ fn: e.onstop }] : []), (t._onmute = e.onmute ? [{ fn: e.onmute }] : []), (t._onvolume = e.onvolume ? [{ fn: e.onvolume }] : []), (t._onrate = e.onrate ? [{ fn: e.onrate }] : []), (t._onseek = e.onseek ? [{ fn: e.onseek }] : []), (t._onunlock = e.onunlock ? [{ fn: e.onunlock }] : []), (t._onresume = []), (t._webAudio = o.usingWebAudio && !t._html5), void 0 !== o.ctx && o.ctx && o.autoUnlock && o._unlockAudio(), o._howls.push(t), t._autoplay && t._queue.push({ event: "play", action: function () { t.play(); }, }), t._preload && "none" !== t._preload && t.load(), t ); }, load: function () { var e = this, t = null; if (o.noAudio) e._emit("loaderror", null, "No audio support."); else { "string" == typeof e._src && (e._src = [e._src]); for (var n = 0; n < e._src.length; n++) { var r, i; if (e._format && e._format[n]) r = e._format[n]; else { if ("string" != typeof (i = e._src[n])) { e._emit("loaderror", null, "Non-string found in selected audio sources - ignoring."); continue; } (r = /^data:audio\/([^;,]+);/i.exec(i)) || (r = /\.([^.]+)$/.exec(i.split("?", 1)[0])), r && (r = r[1].toLowerCase()); } if ((r || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), r && o.codecs(r))) { t = e._src[n]; break; } } if (t) return (e._src = t), (e._state = "loading"), "https:" === window.location.protocol && "http:" === t.slice(0, 5) && ((e._html5 = !0), (e._webAudio = !1)), new s(e), e._webAudio && l(e), e; e._emit("loaderror", null, "No codec support for selected audio sources."); } }, play: function (e, t) { var n = this, r = null; if ("number" == typeof e) (r = e), (e = null); else { if ("string" == typeof e && "loaded" === n._state && !n._sprite[e]) return null; if (void 0 === e && ((e = "__default"), !n._playLock)) { for (var i = 0, a = 0; a < n._sounds.length; a++) n._sounds[a]._paused && !n._sounds[a]._ended && (i++, (r = n._sounds[a]._id)); 1 === i ? (e = null) : (r = null); } } var s = r ? n._soundById(r) : n._inactiveSound(); if (!s) return null; if ((r && !e && (e = s._sprite || "__default"), "loaded" !== n._state)) { (s._sprite = e), (s._ended = !1); var u = s._id; return ( n._queue.push({ event: "play", action: function () { n.play(u); }, }), u ); } if (r && !s._paused) return t || n._loadQueue("play"), s._id; n._webAudio && o._autoResume(); var l = Math.max(0, s._seek > 0 ? s._seek : n._sprite[e][0] / 1e3), c = Math.max(0, (n._sprite[e][0] + n._sprite[e][1]) / 1e3 - l), d = (1e3 * c) / Math.abs(s._rate), h = n._sprite[e][0] / 1e3, p = (n._sprite[e][0] + n._sprite[e][1]) / 1e3; (s._sprite = e), (s._ended = !1); var f = function () { (s._paused = !1), (s._seek = l), (s._start = h), (s._stop = p), (s._loop = !(!s._loop && !n._sprite[e][2])); }; if (!(l >= p)) { var _ = s._node; if (n._webAudio) { var g = function () { (n._playLock = !1), f(), n._refreshBuffer(s); var e = s._muted || n._muted ? 0 : s._volume; _.gain.setValueAtTime(e, o.ctx.currentTime), (s._playStart = o.ctx.currentTime), void 0 === _.bufferSource.start ? (s._loop ? _.bufferSource.noteGrainOn(0, l, 86400) : _.bufferSource.noteGrainOn(0, l, c)) : s._loop ? _.bufferSource.start(0, l, 86400) : _.bufferSource.start(0, l, c), d !== 1 / 0 && (n._endTimers[s._id] = setTimeout(n._ended.bind(n, s), d)), t || setTimeout(function () { n._emit("play", s._id), n._loadQueue(); }, 0); }; "running" === o.state && "interrupted" !== o.ctx.state ? g() : ((n._playLock = !0), n.once("resume", g), n._clearTimer(s._id)); } else { var m = function () { (_.currentTime = l), (_.muted = s._muted || n._muted || o._muted || _.muted), (_.volume = s._volume * o.volume()), (_.playbackRate = s._rate); try { var r = _.play(); if ( (r && "undefined" != typeof Promise && (r instanceof Promise || "function" == typeof r.then) ? ((n._playLock = !0), f(), r .then(function () { (n._playLock = !1), (_._unlocked = !0), t ? n._loadQueue() : n._emit("play", s._id); }) .catch(function () { (n._playLock = !1), n._emit("playerror", s._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), (s._ended = !0), (s._paused = !0); })) : t || ((n._playLock = !1), f(), n._emit("play", s._id)), (_.playbackRate = s._rate), _.paused) ) return void n._emit("playerror", s._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."); "__default" !== e || s._loop ? (n._endTimers[s._id] = setTimeout(n._ended.bind(n, s), d)) : ((n._endTimers[s._id] = function () { n._ended(s), _.removeEventListener("ended", n._endTimers[s._id], !1); }), _.addEventListener("ended", n._endTimers[s._id], !1)); } catch (e) { n._emit("playerror", s._id, e); } }; "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" === _.src && ((_.src = n._src), _.load()); var v = (window && window.ejecta) || (!_.readyState && o._navigator.isCocoonJS); if (_.readyState >= 3 || v) m(); else { (n._playLock = !0), (n._state = "loading"); var y = function () { (n._state = "loaded"), m(), _.removeEventListener(o._canPlayEvent, y, !1); }; _.addEventListener(o._canPlayEvent, y, !1), n._clearTimer(s._id); } } return s._id; } n._ended(s); }, pause: function (e) { var t = this; if ("loaded" !== t._state || t._playLock) return ( t._queue.push({ event: "pause", action: function () { t.pause(e); }, }), t ); for (var n = t._getSoundIds(e), r = 0; r < n.length; r++) { t._clearTimer(n[r]); var i = t._soundById(n[r]); if (i && !i._paused && ((i._seek = t.seek(n[r])), (i._rateSeek = 0), (i._paused = !0), t._stopFade(n[r]), i._node)) if (t._webAudio) { if (!i._node.bufferSource) continue; void 0 === i._node.bufferSource.stop ? i._node.bufferSource.noteOff(0) : i._node.bufferSource.stop(0), t._cleanBuffer(i._node); } else (isNaN(i._node.duration) && i._node.duration !== 1 / 0) || i._node.pause(); arguments[1] || t._emit("pause", i ? i._id : null); } return t; }, stop: function (e, t) { var n = this; if ("loaded" !== n._state || n._playLock) return ( n._queue.push({ event: "stop", action: function () { n.stop(e); }, }), n ); for (var r = n._getSoundIds(e), i = 0; i < r.length; i++) { n._clearTimer(r[i]); var o = n._soundById(r[i]); o && ((o._seek = o._start || 0), (o._rateSeek = 0), (o._paused = !0), (o._ended = !0), n._stopFade(r[i]), o._node && (n._webAudio ? o._node.bufferSource && (void 0 === o._node.bufferSource.stop ? o._node.bufferSource.noteOff(0) : o._node.bufferSource.stop(0), n._cleanBuffer(o._node)) : (isNaN(o._node.duration) && o._node.duration !== 1 / 0) || ((o._node.currentTime = o._start || 0), o._node.pause(), o._node.duration === 1 / 0 && n._clearSound(o._node))), t || n._emit("stop", o._id)); } return n; }, mute: function (e, t) { var n = this; if ("loaded" !== n._state || n._playLock) return ( n._queue.push({ event: "mute", action: function () { n.mute(e, t); }, }), n ); if (void 0 === t) { if ("boolean" != typeof e) return n._muted; n._muted = e; } for (var r = n._getSoundIds(t), i = 0; i < r.length; i++) { var a = n._soundById(r[i]); a && ((a._muted = e), a._interval && n._stopFade(a._id), n._webAudio && a._node ? a._node.gain.setValueAtTime(e ? 0 : a._volume, o.ctx.currentTime) : a._node && (a._node.muted = !!o._muted || e), n._emit("mute", a._id)); } return n; }, volume: function () { var e, t, n, r = this, i = arguments; if (0 === i.length) return r._volume; if ((1 === i.length || (2 === i.length && void 0 === i[1]) ? (r._getSoundIds().indexOf(i[0]) >= 0 ? (t = parseInt(i[0], 10)) : (e = parseFloat(i[0]))) : i.length >= 2 && ((e = parseFloat(i[0])), (t = parseInt(i[1], 10))), !(void 0 !== e && e >= 0 && e <= 1))) return (n = t ? r._soundById(t) : r._sounds[0]) ? n._volume : 0; if ("loaded" !== r._state || r._playLock) return ( r._queue.push({ event: "volume", action: function () { r.volume.apply(r, i); }, }), r ); void 0 === t && (r._volume = e), (t = r._getSoundIds(t)); for (var a = 0; a < t.length; a++) (n = r._soundById(t[a])) && ((n._volume = e), i[2] || r._stopFade(t[a]), r._webAudio && n._node && !n._muted ? n._node.gain.setValueAtTime(e, o.ctx.currentTime) : n._node && !n._muted && (n._node.volume = e * o.volume()), r._emit("volume", n._id)); return r; }, fade: function (e, t, n, r) { var i = this; if ("loaded" !== i._state || i._playLock) return ( i._queue.push({ event: "fade", action: function () { i.fade(e, t, n, r); }, }), i ); (e = Math.min(Math.max(0, parseFloat(e)), 1)), (t = Math.min(Math.max(0, parseFloat(t)), 1)), (n = parseFloat(n)), i.volume(e, r); for (var a = i._getSoundIds(r), s = 0; s < a.length; s++) { var u = i._soundById(a[s]); if (u) { if ((r || i._stopFade(a[s]), i._webAudio && !u._muted)) { var l = o.ctx.currentTime, c = l + n / 1e3; (u._volume = e), u._node.gain.setValueAtTime(e, l), u._node.gain.linearRampToValueAtTime(t, c); } i._startFadeInterval(u, e, t, n, a[s], void 0 === r); } } return i; }, _startFadeInterval: function (e, t, n, r, i, o) { var a = this, s = t, u = n - t, l = Math.abs(u / 0.01), c = Math.max(4, l > 0 ? r / l : r), d = Date.now(); (e._fadeTo = n), (e._interval = setInterval(function () { var i = (Date.now() - d) / r; (d = Date.now()), (s += u * i), (s = Math.round(100 * s) / 100), (s = u < 0 ? Math.max(n, s) : Math.min(n, s)), a._webAudio ? (e._volume = s) : a.volume(s, e._id, !0), o && (a._volume = s), ((n < t && s <= n) || (n > t && s >= n)) && (clearInterval(e._interval), (e._interval = null), (e._fadeTo = null), a.volume(n, e._id), a._emit("fade", e._id)); }, c)); }, _stopFade: function (e) { var t = this, n = t._soundById(e); return n && n._interval && (t._webAudio && n._node.gain.cancelScheduledValues(o.ctx.currentTime), clearInterval(n._interval), (n._interval = null), t.volume(n._fadeTo, e), (n._fadeTo = null), t._emit("fade", e)), t; }, loop: function () { var e, t, n, r = this, i = arguments; if (0 === i.length) return r._loop; if (1 === i.length) { if ("boolean" != typeof i[0]) return !!(n = r._soundById(parseInt(i[0], 10))) && n._loop; (e = i[0]), (r._loop = e); } else 2 === i.length && ((e = i[0]), (t = parseInt(i[1], 10))); for (var o = r._getSoundIds(t), a = 0; a < o.length; a++) (n = r._soundById(o[a])) && ((n._loop = e), r._webAudio && n._node && n._node.bufferSource && ((n._node.bufferSource.loop = e), e && ((n._node.bufferSource.loopStart = n._start || 0), (n._node.bufferSource.loopEnd = n._stop), r.playing(o[a]) && (r.pause(o[a], !0), r.play(o[a], !0))))); return r; }, rate: function () { var e, t, n, r = this, i = arguments; if (0 === i.length) t = r._sounds[0]._id; else if (1 === i.length) { r._getSoundIds().indexOf(i[0]) >= 0 ? (t = parseInt(i[0], 10)) : (e = parseFloat(i[0])); } else 2 === i.length && ((e = parseFloat(i[0])), (t = parseInt(i[1], 10))); if ("number" != typeof e) return (n = r._soundById(t)) ? n._rate : r._rate; if ("loaded" !== r._state || r._playLock) return ( r._queue.push({ event: "rate", action: function () { r.rate.apply(r, i); }, }), r ); void 0 === t && (r._rate = e), (t = r._getSoundIds(t)); for (var a = 0; a < t.length; a++) if ((n = r._soundById(t[a]))) { r.playing(t[a]) && ((n._rateSeek = r.seek(t[a])), (n._playStart = r._webAudio ? o.ctx.currentTime : n._playStart)), (n._rate = e), r._webAudio && n._node && n._node.bufferSource ? n._node.bufferSource.playbackRate.setValueAtTime(e, o.ctx.currentTime) : n._node && (n._node.playbackRate = e); var s = r.seek(t[a]), u = (1e3 * ((r._sprite[n._sprite][0] + r._sprite[n._sprite][1]) / 1e3 - s)) / Math.abs(n._rate); (!r._endTimers[t[a]] && n._paused) || (r._clearTimer(t[a]), (r._endTimers[t[a]] = setTimeout(r._ended.bind(r, n), u))), r._emit("rate", n._id); } return r; }, seek: function () { var e, t, n = this, r = arguments; if (0 === r.length) n._sounds.length && (t = n._sounds[0]._id); else if (1 === r.length) { n._getSoundIds().indexOf(r[0]) >= 0 ? (t = parseInt(r[0], 10)) : n._sounds.length && ((t = n._sounds[0]._id), (e = parseFloat(r[0]))); } else 2 === r.length && ((e = parseFloat(r[0])), (t = parseInt(r[1], 10))); if (void 0 === t) return 0; if ("number" == typeof e && ("loaded" !== n._state || n._playLock)) return ( n._queue.push({ event: "seek", action: function () { n.seek.apply(n, r); }, }), n ); var i = n._soundById(t); if (i) { if (!("number" == typeof e && e >= 0)) { if (n._webAudio) { var a = n.playing(t) ? o.ctx.currentTime - i._playStart : 0, s = i._rateSeek ? i._rateSeek - i._seek : 0; return i._seek + (s + a * Math.abs(i._rate)); } return i._node.currentTime; } var u = n.playing(t); u && n.pause(t, !0), (i._seek = e), (i._ended = !1), n._clearTimer(t), n._webAudio || !i._node || isNaN(i._node.duration) || (i._node.currentTime = e); var l = function () { u && n.play(t, !0), n._emit("seek", t); }; if (u && !n._webAudio) { var c = function () { n._playLock ? setTimeout(c, 0) : l(); }; setTimeout(c, 0); } else l(); } return n; }, playing: function (e) { var t = this; if ("number" == typeof e) { var n = t._soundById(e); return !!n && !n._paused; } for (var r = 0; r < t._sounds.length; r++) if (!t._sounds[r]._paused) return !0; return !1; }, duration: function (e) { var t = this, n = t._duration, r = t._soundById(e); return r && (n = t._sprite[r._sprite][1] / 1e3), n; }, state: function () { return this._state; }, unload: function () { for (var e = this, t = e._sounds, n = 0; n < t.length; n++) t[n]._paused || e.stop(t[n]._id), e._webAudio || (e._clearSound(t[n]._node), t[n]._node.removeEventListener("error", t[n]._errorFn, !1), t[n]._node.removeEventListener(o._canPlayEvent, t[n]._loadFn, !1), t[n]._node.removeEventListener("ended", t[n]._endFn, !1), o._releaseHtml5Audio(t[n]._node)), delete t[n]._node, e._clearTimer(t[n]._id); var r = o._howls.indexOf(e); r >= 0 && o._howls.splice(r, 1); var i = !0; for (n = 0; n < o._howls.length; n++) if (o._howls[n]._src === e._src || e._src.indexOf(o._howls[n]._src) >= 0) { i = !1; break; } return u && i && delete u[e._src], (o.noAudio = !1), (e._state = "unloaded"), (e._sounds = []), (e = null), null; }, on: function (e, t, n, r) { var i = this["_on" + e]; return "function" == typeof t && i.push(r ? { id: n, fn: t, once: r } : { id: n, fn: t }), this; }, off: function (e, t, n) { var r = this, i = r["_on" + e], o = 0; if (("number" == typeof t && ((n = t), (t = null)), t || n)) for (o = 0; o < i.length; o++) { var a = n === i[o].id; if ((t === i[o].fn && a) || (!t && a)) { i.splice(o, 1); break; } } else if (e) r["_on" + e] = []; else { var s = Object.keys(r); for (o = 0; o < s.length; o++) 0 === s[o].indexOf("_on") && Array.isArray(r[s[o]]) && (r[s[o]] = []); } return r; }, once: function (e, t, n) { return this.on(e, t, n, 1), this; }, _emit: function (e, t, n) { for (var r = this, i = r["_on" + e], o = i.length - 1; o >= 0; o--) (i[o].id && i[o].id !== t && "load" !== e) || (setTimeout( function (e) { e.call(this, t, n); }.bind(r, i[o].fn), 0 ), i[o].once && r.off(e, i[o].fn, i[o].id)); return r._loadQueue(e), r; }, _loadQueue: function (e) { var t = this; if (t._queue.length > 0) { var n = t._queue[0]; n.event === e && (t._queue.shift(), t._loadQueue()), e || n.action(); } return t; }, _ended: function (e) { var t = this, n = e._sprite; if (!t._webAudio && e._node && !e._node.paused && !e._node.ended && e._node.currentTime < e._stop) return setTimeout(t._ended.bind(t, e), 100), t; var r = !(!e._loop && !t._sprite[n][2]); if ((t._emit("end", e._id), !t._webAudio && r && t.stop(e._id, !0).play(e._id), t._webAudio && r)) { t._emit("play", e._id), (e._seek = e._start || 0), (e._rateSeek = 0), (e._playStart = o.ctx.currentTime); var i = (1e3 * (e._stop - e._start)) / Math.abs(e._rate); t._endTimers[e._id] = setTimeout(t._ended.bind(t, e), i); } return t._webAudio && !r && ((e._paused = !0), (e._ended = !0), (e._seek = e._start || 0), (e._rateSeek = 0), t._clearTimer(e._id), t._cleanBuffer(e._node), o._autoSuspend()), t._webAudio || r || t.stop(e._id, !0), t; }, _clearTimer: function (e) { var t = this; if (t._endTimers[e]) { if ("function" != typeof t._endTimers[e]) clearTimeout(t._endTimers[e]); else { var n = t._soundById(e); n && n._node && n._node.removeEventListener("ended", t._endTimers[e], !1); } delete t._endTimers[e]; } return t; }, _soundById: function (e) { for (var t = this, n = 0; n < t._sounds.length; n++) if (e === t._sounds[n]._id) return t._sounds[n]; return null; }, _inactiveSound: function () { var e = this; e._drain(); for (var t = 0; t < e._sounds.length; t++) if (e._sounds[t]._ended) return e._sounds[t].reset(); return new s(e); }, _drain: function () { var e = this, t = e._pool, n = 0, r = 0; if (!(e._sounds.length < t)) { for (r = 0; r < e._sounds.length; r++) e._sounds[r]._ended && n++; for (r = e._sounds.length - 1; r >= 0; r--) { if (n <= t) return; e._sounds[r]._ended && (e._webAudio && e._sounds[r]._node && e._sounds[r]._node.disconnect(0), e._sounds.splice(r, 1), n--); } } }, _getSoundIds: function (e) { if (void 0 === e) { for (var t = [], n = 0; n < this._sounds.length; n++) t.push(this._sounds[n]._id); return t; } return [e]; }, _refreshBuffer: function (e) { return (e._node.bufferSource = o.ctx.createBufferSource()), (e._node.bufferSource.buffer = u[this._src]), e._panner ? e._node.bufferSource.connect(e._panner) : e._node.bufferSource.connect(e._node), (e._node.bufferSource.loop = e._loop), e._loop && ((e._node.bufferSource.loopStart = e._start || 0), (e._node.bufferSource.loopEnd = e._stop || 0)), e._node.bufferSource.playbackRate.setValueAtTime(e._rate, o.ctx.currentTime), this; }, _cleanBuffer: function (e) { var t = o._navigator && o._navigator.vendor.indexOf("Apple") >= 0; if (o._scratchBuffer && e.bufferSource && ((e.bufferSource.onended = null), e.bufferSource.disconnect(0), t)) try { e.bufferSource.buffer = o._scratchBuffer; } catch (e) {} return (e.bufferSource = null), this; }, _clearSound: function (e) { /MSIE |Trident\//.test(o._navigator && o._navigator.userAgent) || (e.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"); }, }; var s = function (e) { (this._parent = e), this.init(); }; s.prototype = { init: function () { var e = this, t = e._parent; return (e._muted = t._muted), (e._loop = t._loop), (e._volume = t._volume), (e._rate = t._rate), (e._seek = 0), (e._paused = !0), (e._ended = !0), (e._sprite = "__default"), (e._id = ++o._counter), t._sounds.push(e), e.create(), e; }, create: function () { var e = this, t = e._parent, n = o._muted || e._muted || e._parent._muted ? 0 : e._volume; return t._webAudio ? ((e._node = void 0 === o.ctx.createGain ? o.ctx.createGainNode() : o.ctx.createGain()), e._node.gain.setValueAtTime(n, o.ctx.currentTime), (e._node.paused = !0), e._node.connect(o.masterGain)) : o.noAudio || ((e._node = o._obtainHtml5Audio()), (e._errorFn = e._errorListener.bind(e)), e._node.addEventListener("error", e._errorFn, !1), (e._loadFn = e._loadListener.bind(e)), e._node.addEventListener(o._canPlayEvent, e._loadFn, !1), (e._endFn = e._endListener.bind(e)), e._node.addEventListener("ended", e._endFn, !1), (e._node.src = t._src), (e._node.preload = !0 === t._preload ? "auto" : t._preload), (e._node.volume = n * o.volume()), e._node.load()), e; }, reset: function () { var e = this, t = e._parent; return (e._muted = t._muted), (e._loop = t._loop), (e._volume = t._volume), (e._rate = t._rate), (e._seek = 0), (e._rateSeek = 0), (e._paused = !0), (e._ended = !0), (e._sprite = "__default"), (e._id = ++o._counter), e; }, _errorListener: function () { var e = this; e._parent._emit("loaderror", e._id, e._node.error ? e._node.error.code : 0), e._node.removeEventListener("error", e._errorFn, !1); }, _loadListener: function () { var e = this, t = e._parent; (t._duration = Math.ceil(10 * e._node.duration) / 10), 0 === Object.keys(t._sprite).length && (t._sprite = { __default: [0, 1e3 * t._duration] }), "loaded" !== t._state && ((t._state = "loaded"), t._emit("load"), t._loadQueue()), e._node.removeEventListener(o._canPlayEvent, e._loadFn, !1); }, _endListener: function () { var e = this, t = e._parent; t._duration === 1 / 0 && ((t._duration = Math.ceil(10 * e._node.duration) / 10), t._sprite.__default[1] === 1 / 0 && (t._sprite.__default[1] = 1e3 * t._duration), t._ended(e)), e._node.removeEventListener("ended", e._endFn, !1); }, }; var u = {}, l = function (e) { var t = e._src; if (u[t]) return (e._duration = u[t].duration), void h(e); if (/^data:[^;]+;base64,/.test(t)) { for (var n = atob(t.split(",")[1]), r = new Uint8Array(n.length), i = 0; i < n.length; ++i) r[i] = n.charCodeAt(i); d(r.buffer, e); } else { var o = new XMLHttpRequest(); o.open(e._xhr.method, t, !0), (o.withCredentials = e._xhr.withCredentials), (o.responseType = "arraybuffer"), e._xhr.headers && Object.keys(e._xhr.headers).forEach(function (t) { o.setRequestHeader(t, e._xhr.headers[t]); }), (o.onload = function () { var t = (o.status + "")[0]; "0" === t || "2" === t || "3" === t ? d(o.response, e) : e._emit("loaderror", null, "Failed loading audio file with status: " + o.status + "."); }), (o.onerror = function () { e._webAudio && ((e._html5 = !0), (e._webAudio = !1), (e._sounds = []), delete u[t], e.load()); }), c(o); } }, c = function (e) { try { e.send(); } catch (t) { e.onerror(); } }, d = function (e, t) { var n = function () { t._emit("loaderror", null, "Decoding audio data failed."); }, r = function (e) { e && t._sounds.length > 0 ? ((u[t._src] = e), h(t, e)) : n(); }; "undefined" != typeof Promise && 1 === o.ctx.decodeAudioData.length ? o.ctx.decodeAudioData(e).then(r).catch(n) : o.ctx.decodeAudioData(e, r, n); }, h = function (e, t) { t && !e._duration && (e._duration = t.duration), 0 === Object.keys(e._sprite).length && (e._sprite = { __default: [0, 1e3 * e._duration] }), "loaded" !== e._state && ((e._state = "loaded"), e._emit("load"), e._loadQueue()); }, p = function () { if (o.usingWebAudio) { try { "undefined" != typeof AudioContext ? (o.ctx = new AudioContext()) : "undefined" != typeof webkitAudioContext ? (o.ctx = new webkitAudioContext()) : (o.usingWebAudio = !1); } catch (e) { o.usingWebAudio = !1; } o.ctx || (o.usingWebAudio = !1); var e = /iP(hone|od|ad)/.test(o._navigator && o._navigator.platform), t = o._navigator && o._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), n = t ? parseInt(t[1], 10) : null; if (e && n && n < 9) { var r = /safari/.test(o._navigator && o._navigator.userAgent.toLowerCase()); o._navigator && !r && (o.usingWebAudio = !1); } o.usingWebAudio && ((o.masterGain = void 0 === o.ctx.createGain ? o.ctx.createGainNode() : o.ctx.createGain()), o.masterGain.gain.setValueAtTime(o._muted ? 0 : o._volume, o.ctx.currentTime), o.masterGain.connect(o.ctx.destination)), o._setup(); } }; void 0 === (r = function () { return { Howler: o, Howl: a }; }.apply(t, [])) || (e.exports = r), (t.Howler = o), (t.Howl = a), void 0 !== n.g ? ((n.g.HowlerGlobal = i), (n.g.Howler = o), (n.g.Howl = a), (n.g.Sound = s)) : "undefined" != typeof window && ((window.HowlerGlobal = i), (window.Howler = o), (window.Howl = a), (window.Sound = s)); })(), (function () { "use strict"; var e; (HowlerGlobal.prototype._pos = [0, 0, 0]), (HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0]), (HowlerGlobal.prototype.stereo = function (e) { var t = this; if (!t.ctx || !t.ctx.listener) return t; for (var n = t._howls.length - 1; n >= 0; n--) t._howls[n].stereo(e); return t; }), (HowlerGlobal.prototype.pos = function (e, t, n) { var r = this; return r.ctx && r.ctx.listener ? ((t = "number" != typeof t ? r._pos[1] : t), (n = "number" != typeof n ? r._pos[2] : n), "number" != typeof e ? r._pos : ((r._pos = [e, t, n]), void 0 !== r.ctx.listener.positionX ? (r.ctx.listener.positionX.setTargetAtTime(r._pos[0], Howler.ctx.currentTime, 0.1), r.ctx.listener.positionY.setTargetAtTime(r._pos[1], Howler.ctx.currentTime, 0.1), r.ctx.listener.positionZ.setTargetAtTime(r._pos[2], Howler.ctx.currentTime, 0.1)) : r.ctx.listener.setPosition(r._pos[0], r._pos[1], r._pos[2]), r)) : r; }), (HowlerGlobal.prototype.orientation = function (e, t, n, r, i, o) { var a = this; if (!a.ctx || !a.ctx.listener) return a; var s = a._orientation; return (t = "number" != typeof t ? s[1] : t), (n = "number" != typeof n ? s[2] : n), (r = "number" != typeof r ? s[3] : r), (i = "number" != typeof i ? s[4] : i), (o = "number" != typeof o ? s[5] : o), "number" != typeof e ? s : ((a._orientation = [e, t, n, r, i, o]), void 0 !== a.ctx.listener.forwardX ? (a.ctx.listener.forwardX.setTargetAtTime(e, Howler.ctx.currentTime, 0.1), a.ctx.listener.forwardY.setTargetAtTime(t, Howler.ctx.currentTime, 0.1), a.ctx.listener.forwardZ.setTargetAtTime(n, Howler.ctx.currentTime, 0.1), a.ctx.listener.upX.setTargetAtTime(r, Howler.ctx.currentTime, 0.1), a.ctx.listener.upY.setTargetAtTime(i, Howler.ctx.currentTime, 0.1), a.ctx.listener.upZ.setTargetAtTime(o, Howler.ctx.currentTime, 0.1)) : a.ctx.listener.setOrientation(e, t, n, r, i, o), a); }), (Howl.prototype.init = ((e = Howl.prototype.init), function (t) { var n = this; return (n._orientation = t.orientation || [1, 0, 0]), (n._stereo = t.stereo || null), (n._pos = t.pos || null), (n._pannerAttr = { coneInnerAngle: void 0 !== t.coneInnerAngle ? t.coneInnerAngle : 360, coneOuterAngle: void 0 !== t.coneOuterAngle ? t.coneOuterAngle : 360, coneOuterGain: void 0 !== t.coneOuterGain ? t.coneOuterGain : 0, distanceModel: void 0 !== t.distanceModel ? t.distanceModel : "inverse", maxDistance: void 0 !== t.maxDistance ? t.maxDistance : 1e4, panningModel: void 0 !== t.panningModel ? t.panningModel : "HRTF", refDistance: void 0 !== t.refDistance ? t.refDistance : 1, rolloffFactor: void 0 !== t.rolloffFactor ? t.rolloffFactor : 1 }), (n._onstereo = t.onstereo ? [{ fn: t.onstereo }] : []), (n._onpos = t.onpos ? [{ fn: t.onpos }] : []), (n._onorientation = t.onorientation ? [{ fn: t.onorientation }] : []), e.call(this, t); })), (Howl.prototype.stereo = function (e, n) { var r = this; if (!r._webAudio) return r; if ("loaded" !== r._state) return ( r._queue.push({ event: "stereo", action: function () { r.stereo(e, n); }, }), r ); var i = void 0 === Howler.ctx.createStereoPanner ? "spatial" : "stereo"; if (void 0 === n) { if ("number" != typeof e) return r._stereo; (r._stereo = e), (r._pos = [e, 0, 0]); } for (var o = r._getSoundIds(n), a = 0; a < o.length; a++) { var s = r._soundById(o[a]); if (s) { if ("number" != typeof e) return s._stereo; (s._stereo = e), (s._pos = [e, 0, 0]), s._node && ((s._pannerAttr.panningModel = "equalpower"), (s._panner && s._panner.pan) || t(s, i), "spatial" === i ? (void 0 !== s._panner.positionX ? (s._panner.positionX.setValueAtTime(e, Howler.ctx.currentTime), s._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime), s._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime)) : s._panner.setPosition(e, 0, 0)) : s._panner.pan.setValueAtTime(e, Howler.ctx.currentTime)), r._emit("stereo", s._id); } } return r; }), (Howl.prototype.pos = function (e, n, r, i) { var o = this; if (!o._webAudio) return o; if ("loaded" !== o._state) return ( o._queue.push({ event: "pos", action: function () { o.pos(e, n, r, i); }, }), o ); if (((n = "number" != typeof n ? 0 : n), (r = "number" != typeof r ? -0.5 : r), void 0 === i)) { if ("number" != typeof e) return o._pos; o._pos = [e, n, r]; } for (var a = o._getSoundIds(i), s = 0; s < a.length; s++) { var u = o._soundById(a[s]); if (u) { if ("number" != typeof e) return u._pos; (u._pos = [e, n, r]), u._node && ((u._panner && !u._panner.pan) || t(u, "spatial"), void 0 !== u._panner.positionX ? (u._panner.positionX.setValueAtTime(e, Howler.ctx.currentTime), u._panner.positionY.setValueAtTime(n, Howler.ctx.currentTime), u._panner.positionZ.setValueAtTime(r, Howler.ctx.currentTime)) : u._panner.setPosition(e, n, r)), o._emit("pos", u._id); } } return o; }), (Howl.prototype.orientation = function (e, n, r, i) { var o = this; if (!o._webAudio) return o; if ("loaded" !== o._state) return ( o._queue.push({ event: "orientation", action: function () { o.orientation(e, n, r, i); }, }), o ); if (((n = "number" != typeof n ? o._orientation[1] : n), (r = "number" != typeof r ? o._orientation[2] : r), void 0 === i)) { if ("number" != typeof e) return o._orientation; o._orientation = [e, n, r]; } for (var a = o._getSoundIds(i), s = 0; s < a.length; s++) { var u = o._soundById(a[s]); if (u) { if ("number" != typeof e) return u._orientation; (u._orientation = [e, n, r]), u._node && (u._panner || (u._pos || (u._pos = o._pos || [0, 0, -0.5]), t(u, "spatial")), void 0 !== u._panner.orientationX ? (u._panner.orientationX.setValueAtTime(e, Howler.ctx.currentTime), u._panner.orientationY.setValueAtTime(n, Howler.ctx.currentTime), u._panner.orientationZ.setValueAtTime(r, Howler.ctx.currentTime)) : u._panner.setOrientation(e, n, r)), o._emit("orientation", u._id); } } return o; }), (Howl.prototype.pannerAttr = function () { var e, n, r, i = this, o = arguments; if (!i._webAudio) return i; if (0 === o.length) return i._pannerAttr; if (1 === o.length) { if ("object" != typeof o[0]) return (r = i._soundById(parseInt(o[0], 10))) ? r._pannerAttr : i._pannerAttr; (e = o[0]), void 0 === n && (e.pannerAttr || (e.pannerAttr = { coneInnerAngle: e.coneInnerAngle, coneOuterAngle: e.coneOuterAngle, coneOuterGain: e.coneOuterGain, distanceModel: e.distanceModel, maxDistance: e.maxDistance, refDistance: e.refDistance, rolloffFactor: e.rolloffFactor, panningModel: e.panningModel }), (i._pannerAttr = { coneInnerAngle: void 0 !== e.pannerAttr.coneInnerAngle ? e.pannerAttr.coneInnerAngle : i._coneInnerAngle, coneOuterAngle: void 0 !== e.pannerAttr.coneOuterAngle ? e.pannerAttr.coneOuterAngle : i._coneOuterAngle, coneOuterGain: void 0 !== e.pannerAttr.coneOuterGain ? e.pannerAttr.coneOuterGain : i._coneOuterGain, distanceModel: void 0 !== e.pannerAttr.distanceModel ? e.pannerAttr.distanceModel : i._distanceModel, maxDistance: void 0 !== e.pannerAttr.maxDistance ? e.pannerAttr.maxDistance : i._maxDistance, refDistance: void 0 !== e.pannerAttr.refDistance ? e.pannerAttr.refDistance : i._refDistance, rolloffFactor: void 0 !== e.pannerAttr.rolloffFactor ? e.pannerAttr.rolloffFactor : i._rolloffFactor, panningModel: void 0 !== e.pannerAttr.panningModel ? e.pannerAttr.panningModel : i._panningModel })); } else 2 === o.length && ((e = o[0]), (n = parseInt(o[1], 10))); for (var a = i._getSoundIds(n), s = 0; s < a.length; s++) if ((r = i._soundById(a[s]))) { var u = r._pannerAttr; u = { coneInnerAngle: void 0 !== e.coneInnerAngle ? e.coneInnerAngle : u.coneInnerAngle, coneOuterAngle: void 0 !== e.coneOuterAngle ? e.coneOuterAngle : u.coneOuterAngle, coneOuterGain: void 0 !== e.coneOuterGain ? e.coneOuterGain : u.coneOuterGain, distanceModel: void 0 !== e.distanceModel ? e.distanceModel : u.distanceModel, maxDistance: void 0 !== e.maxDistance ? e.maxDistance : u.maxDistance, refDistance: void 0 !== e.refDistance ? e.refDistance : u.refDistance, rolloffFactor: void 0 !== e.rolloffFactor ? e.rolloffFactor : u.rolloffFactor, panningModel: void 0 !== e.panningModel ? e.panningModel : u.panningModel }; var l = r._panner; l ? ((l.coneInnerAngle = u.coneInnerAngle), (l.coneOuterAngle = u.coneOuterAngle), (l.coneOuterGain = u.coneOuterGain), (l.distanceModel = u.distanceModel), (l.maxDistance = u.maxDistance), (l.refDistance = u.refDistance), (l.rolloffFactor = u.rolloffFactor), (l.panningModel = u.panningModel)) : (r._pos || (r._pos = i._pos || [0, 0, -0.5]), t(r, "spatial")); } return i; }), (Sound.prototype.init = (function (e) { return function () { var t = this, n = t._parent; (t._orientation = n._orientation), (t._stereo = n._stereo), (t._pos = n._pos), (t._pannerAttr = n._pannerAttr), e.call(this), t._stereo ? n.stereo(t._stereo) : t._pos && n.pos(t._pos[0], t._pos[1], t._pos[2], t._id); }; })(Sound.prototype.init)), (Sound.prototype.reset = (function (e) { return function () { var t = this, n = t._parent; return (t._orientation = n._orientation), (t._stereo = n._stereo), (t._pos = n._pos), (t._pannerAttr = n._pannerAttr), t._stereo ? n.stereo(t._stereo) : t._pos ? n.pos(t._pos[0], t._pos[1], t._pos[2], t._id) : t._panner && (t._panner.disconnect(0), (t._panner = void 0), n._refreshBuffer(t)), e.call(this); }; })(Sound.prototype.reset)); var t = function (e, t) { "spatial" === (t = t || "spatial") ? ((e._panner = Howler.ctx.createPanner()), (e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle), (e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle), (e._panner.coneOuterGain = e._pannerAttr.coneOuterGain), (e._panner.distanceModel = e._pannerAttr.distanceModel), (e._panner.maxDistance = e._pannerAttr.maxDistance), (e._panner.refDistance = e._pannerAttr.refDistance), (e._panner.rolloffFactor = e._pannerAttr.rolloffFactor), (e._panner.panningModel = e._pannerAttr.panningModel), void 0 !== e._panner.positionX ? (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)) : e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]), void 0 !== e._panner.orientationX ? (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime)) : e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2])) : ((e._panner = Howler.ctx.createStereoPanner()), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), e._panner.connect(e._node), e._paused || e._parent.pause(e._id, !0).play(e._id, !0); }; })(); }, 65885: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var n = Symbol.for("INJECTION"); function r(e, t, r, i) { Object.defineProperty(e, t, { configurable: !0, enumerable: !0, get: function () { return i && !Reflect.hasMetadata(n, this, t) && Reflect.defineMetadata(n, r(), this, t), Reflect.hasMetadata(n, this, t) ? Reflect.getMetadata(n, this, t) : r(); }, set: function (e) { Reflect.defineMetadata(n, e, this, t); }, }); } (t.makePropertyInjectDecorator = function (e, t) { return function (n) { return function (i, o) { r( i, o, function () { return e.get(n); }, t ); }; }; }), (t.makePropertyInjectNamedDecorator = function (e, t) { return function (n, i) { return function (o, a) { r( o, a, function () { return e.getNamed(n, i); }, t ); }; }; }), (t.makePropertyInjectTaggedDecorator = function (e, t) { return function (n, i, o) { return function (a, s) { r( a, s, function () { return e.getTagged(n, i, o); }, t ); }; }; }), (t.makePropertyMultiInjectDecorator = function (e, t) { return function (n) { return function (i, o) { r( i, o, function () { return e.getAll(n); }, t ); }; }; }); }, 83758: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(65885); t.default = function (e, t) { return void 0 === t && (t = !0), { lazyInject: r.makePropertyInjectDecorator(e, t), lazyInjectNamed: r.makePropertyInjectNamedDecorator(e, t), lazyInjectTagged: r.makePropertyInjectTaggedDecorator(e, t), lazyMultiInject: r.makePropertyMultiInjectDecorator(e, t) }; }; }, 28041: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.tagProperty = t.tagParameter = t.decorate = void 0); var r = n(25640), i = n(37425); function o(e, t, n, i, o) { var a = {}, s = "number" == typeof o, u = void 0 !== o && s ? o.toString() : n; if (s && void 0 !== n) throw new Error(r.INVALID_DECORATOR_OPERATION); Reflect.hasOwnMetadata(e, t) && (a = Reflect.getMetadata(e, t)); var l = a[u]; if (Array.isArray(l)) for (var c = 0, d = l; c < d.length; c++) { var h = d[c]; if (h.key === i.key) throw new Error(r.DUPLICATED_METADATA + " " + h.key.toString()); } else l = []; l.push(i), (a[u] = l), Reflect.defineMetadata(e, a, t); } function a(e, t) { Reflect.decorate(e, t); } function s(e, t) { return function (n, r) { t(n, r, e); }; } (t.tagParameter = function (e, t, n, r) { o(i.TAGGED, e, t, r, n); }), (t.tagProperty = function (e, t, n) { o(i.TAGGED_PROP, e.constructor, t, n); }), (t.decorate = function (e, t, n) { "number" == typeof n ? a([s(n, e)], t) : "string" == typeof n ? Reflect.decorate([e], t, n) : a([e], t); }); }, 29385: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.inject = t.LazyServiceIdentifer = void 0); var r = n(25640), i = n(37425), o = n(67258), a = n(28041), s = (function () { function e(e) { this._cb = e; } return ( (e.prototype.unwrap = function () { return this._cb(); }), e ); })(); (t.LazyServiceIdentifer = s), (t.inject = function (e) { return function (t, n, s) { if (void 0 === e) throw new Error(r.UNDEFINED_INJECT_ANNOTATION(t.name)); var u = new o.Metadata(i.INJECT_TAG, e); "number" == typeof s ? a.tagParameter(t, n, s, u) : a.tagProperty(t, n, u); }; }); }, 16504: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.injectable = void 0); var r = n(25640), i = n(37425); t.injectable = function () { return function (e) { if (Reflect.hasOwnMetadata(i.PARAM_TYPES, e)) throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR); var t = Reflect.getMetadata(i.DESIGN_PARAM_TYPES, e) || []; return Reflect.defineMetadata(i.PARAM_TYPES, t, e), e; }; }; }, 3342: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.multiInject = void 0); var r = n(37425), i = n(67258), o = n(28041); t.multiInject = function (e) { return function (t, n, a) { var s = new i.Metadata(r.MULTI_INJECT_TAG, e); "number" == typeof a ? o.tagParameter(t, n, a, s) : o.tagProperty(t, n, s); }; }; }, 44466: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.named = void 0); var r = n(37425), i = n(67258), o = n(28041); t.named = function (e) { return function (t, n, a) { var s = new i.Metadata(r.NAMED_TAG, e); "number" == typeof a ? o.tagParameter(t, n, a, s) : o.tagProperty(t, n, s); }; }; }, 5923: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.optional = void 0); var r = n(37425), i = n(67258), o = n(28041); t.optional = function () { return function (e, t, n) { var a = new i.Metadata(r.OPTIONAL_TAG, !0); "number" == typeof n ? o.tagParameter(e, t, n, a) : o.tagProperty(e, t, a); }; }; }, 76311: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.postConstruct = void 0); var r = n(25640), i = n(37425), o = n(67258); t.postConstruct = function () { return function (e, t, n) { var a = new o.Metadata(i.POST_CONSTRUCT, t); if (Reflect.hasOwnMetadata(i.POST_CONSTRUCT, e.constructor)) throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS); Reflect.defineMetadata(i.POST_CONSTRUCT, a, e.constructor); }; }; }, 91823: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.tagged = void 0); var r = n(67258), i = n(28041); t.tagged = function (e, t) { return function (n, o, a) { var s = new r.Metadata(e, t); "number" == typeof a ? i.tagParameter(n, o, a, s) : i.tagProperty(n, o, s); }; }; }, 67509: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.targetName = void 0); var r = n(37425), i = n(67258), o = n(28041); t.targetName = function (e) { return function (t, n, a) { var s = new i.Metadata(r.NAME_TAG, e); o.tagParameter(t, n, a, s); }; }; }, 53022: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.unmanaged = void 0); var r = n(37425), i = n(67258), o = n(28041); t.unmanaged = function () { return function (e, t, n) { var a = new i.Metadata(r.UNMANAGED_TAG, !0); o.tagParameter(e, t, n, a); }; }; }, 70078: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Binding = void 0); var r = n(5493), i = n(72632), o = (function () { function e(e, t) { (this.id = i.id()), (this.activated = !1), (this.serviceIdentifier = e), (this.scope = t), (this.type = r.BindingTypeEnum.Invalid), (this.constraint = function (e) { return !0; }), (this.implementationType = null), (this.cache = null), (this.factory = null), (this.provider = null), (this.onActivation = null), (this.dynamicValue = null); } return ( (e.prototype.clone = function () { var t = new e(this.serviceIdentifier, this.scope); return (t.activated = t.scope === r.BindingScopeEnum.Singleton && this.activated), (t.implementationType = this.implementationType), (t.dynamicValue = this.dynamicValue), (t.scope = this.scope), (t.type = this.type), (t.factory = this.factory), (t.provider = this.provider), (t.constraint = this.constraint), (t.onActivation = this.onActivation), (t.cache = this.cache), t; }), e ); })(); t.Binding = o; }, 57197: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingCount = void 0); t.BindingCount = { MultipleBindingsAvailable: 2, NoBindingsAvailable: 0, OnlyOneBindingAvailable: 1 }; }, 25640: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.STACK_OVERFLOW = t.CIRCULAR_DEPENDENCY_IN_FACTORY = t.POST_CONSTRUCT_ERROR = t.MULTIPLE_POST_CONSTRUCT_METHODS = t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = t.ARGUMENTS_LENGTH_MISMATCH = t.INVALID_DECORATOR_OPERATION = t.INVALID_TO_SELF_VALUE = t.INVALID_FUNCTION_BINDING = t.INVALID_MIDDLEWARE_RETURN = t.NO_MORE_SNAPSHOTS_AVAILABLE = t.INVALID_BINDING_TYPE = t.NOT_IMPLEMENTED = t.CIRCULAR_DEPENDENCY = t.UNDEFINED_INJECT_ANNOTATION = t.MISSING_INJECT_ANNOTATION = t.MISSING_INJECTABLE_ANNOTATION = t.NOT_REGISTERED = t.CANNOT_UNBIND = t.AMBIGUOUS_MATCH = t.KEY_NOT_FOUND = t.NULL_ARGUMENT = t.DUPLICATED_METADATA = t.DUPLICATED_INJECTABLE_DECORATOR = void 0), (t.DUPLICATED_INJECTABLE_DECORATOR = "Cannot apply @injectable decorator multiple times."), (t.DUPLICATED_METADATA = "Metadata key was used more than once in a parameter:"), (t.NULL_ARGUMENT = "NULL argument"), (t.KEY_NOT_FOUND = "Key Not Found"), (t.AMBIGUOUS_MATCH = "Ambiguous match found for serviceIdentifier:"), (t.CANNOT_UNBIND = "Could not unbind serviceIdentifier:"), (t.NOT_REGISTERED = "No matching bindings found for serviceIdentifier:"), (t.MISSING_INJECTABLE_ANNOTATION = "Missing required @injectable annotation in:"), (t.MISSING_INJECT_ANNOTATION = "Missing required @inject or @multiInject annotation in:"); (t.UNDEFINED_INJECT_ANNOTATION = function (e) { return "@inject called with undefined this could mean that the class " + e + " has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."; }), (t.CIRCULAR_DEPENDENCY = "Circular dependency found:"), (t.NOT_IMPLEMENTED = "Sorry, this feature is not fully implemented yet."), (t.INVALID_BINDING_TYPE = "Invalid binding type:"), (t.NO_MORE_SNAPSHOTS_AVAILABLE = "No snapshot available to restore."), (t.INVALID_MIDDLEWARE_RETURN = "Invalid return type in middleware. Middleware must return!"), (t.INVALID_FUNCTION_BINDING = "Value provided to function binding must be a function!"), (t.INVALID_TO_SELF_VALUE = "The toSelf function can only be applied when a constructor is used as service identifier"), (t.INVALID_DECORATOR_OPERATION = "The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property."); (t.ARGUMENTS_LENGTH_MISMATCH = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return "The number of constructor arguments in the derived class " + e[0] + " must be >= than the number of constructor arguments of its base class."; }), (t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = "Invalid Container constructor argument. Container options must be an object."), (t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = "Invalid Container option. Default scope must be a string ('singleton' or 'transient')."), (t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = "Invalid Container option. Auto bind injectable must be a boolean"), (t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = "Invalid Container option. Skip base check must be a boolean"), (t.MULTIPLE_POST_CONSTRUCT_METHODS = "Cannot apply @postConstruct decorator multiple times in the same class"); t.POST_CONSTRUCT_ERROR = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return "@postConstruct error in class " + e[0] + ": " + e[1]; }; (t.CIRCULAR_DEPENDENCY_IN_FACTORY = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return "It looks like there is a circular dependency in one of the '" + e[0] + "' bindings. Please investigate bindings withservice identifier '" + e[1] + "'."; }), (t.STACK_OVERFLOW = "Maximum call stack size exceeded"); }, 5493: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TargetTypeEnum = t.BindingTypeEnum = t.BindingScopeEnum = void 0); t.BindingScopeEnum = { Request: "Request", Singleton: "Singleton", Transient: "Transient" }; t.BindingTypeEnum = { ConstantValue: "ConstantValue", Constructor: "Constructor", DynamicValue: "DynamicValue", Factory: "Factory", Function: "Function", Instance: "Instance", Invalid: "Invalid", Provider: "Provider" }; t.TargetTypeEnum = { ClassProperty: "ClassProperty", ConstructorArgument: "ConstructorArgument", Variable: "Variable" }; }, 37425: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NON_CUSTOM_TAG_KEYS = t.POST_CONSTRUCT = t.DESIGN_PARAM_TYPES = t.PARAM_TYPES = t.TAGGED_PROP = t.TAGGED = t.MULTI_INJECT_TAG = t.INJECT_TAG = t.OPTIONAL_TAG = t.UNMANAGED_TAG = t.NAME_TAG = t.NAMED_TAG = void 0), (t.NAMED_TAG = "named"), (t.NAME_TAG = "name"), (t.UNMANAGED_TAG = "unmanaged"), (t.OPTIONAL_TAG = "optional"), (t.INJECT_TAG = "inject"), (t.MULTI_INJECT_TAG = "multi_inject"), (t.TAGGED = "inversify:tagged"), (t.TAGGED_PROP = "inversify:tagged_props"), (t.PARAM_TYPES = "inversify:paramtypes"), (t.DESIGN_PARAM_TYPES = "design:paramtypes"), (t.POST_CONSTRUCT = "post_construct"), (t.NON_CUSTOM_TAG_KEYS = [t.INJECT_TAG, t.MULTI_INJECT_TAG, t.NAME_TAG, t.UNMANAGED_TAG, t.NAMED_TAG, t.OPTIONAL_TAG]); }, 99700: function (e, t, n) { "use strict"; var r = (this && this.__awaiter) || function (e, t, n, r) { return new (n || (n = Promise))(function (i, o) { function a(e) { try { u(r.next(e)); } catch (e) { o(e); } } function s(e) { try { u(r.throw(e)); } catch (e) { o(e); } } function u(e) { var t; e.done ? i(e.value) : ((t = e.value), t instanceof n ? t : new n(function (e) { e(t); })).then(a, s); } u((r = r.apply(e, t || [])).next()); }); }, i = (this && this.__generator) || function (e, t) { var n, r, i, o, a = { label: 0, sent: function () { if (1 & i[0]) throw i[1]; return i[1]; }, trys: [], ops: [], }; return ( (o = { next: s(0), throw: s(1), return: s(2) }), "function" == typeof Symbol && (o[Symbol.iterator] = function () { return this; }), o ); function s(o) { return function (s) { return (function (o) { if (n) throw new TypeError("Generator is already executing."); for (; a; ) try { if (((n = 1), r && (i = 2 & o[0] ? r.return : o[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, o[1])).done)) return i; switch (((r = 0), i && (o = [2 & o[0], i.value]), o[0])) { case 0: case 1: i = o; break; case 4: return a.label++, { value: o[1], done: !1 }; case 5: a.label++, (r = o[1]), (o = [0]); continue; case 7: (o = a.ops.pop()), a.trys.pop(); continue; default: if (!((i = a.trys), (i = i.length > 0 && i[i.length - 1]) || (6 !== o[0] && 2 !== o[0]))) { a = 0; continue; } if (3 === o[0] && (!i || (o[1] > i[0] && o[1] < i[3]))) { a.label = o[1]; break; } if (6 === o[0] && a.label < i[1]) { (a.label = i[1]), (i = o); break; } if (i && a.label < i[2]) { (a.label = i[2]), a.ops.push(o); break; } i[2] && a.ops.pop(), a.trys.pop(); continue; } o = t.call(e, a); } catch (e) { (o = [6, e]), (r = 0); } finally { n = i = 0; } if (5 & o[0]) throw o[1]; return { value: o[0] ? o[1] : void 0, done: !0 }; })([o, s]); }; } }, o = (this && this.__spreadArray) || function (e, t) { for (var n = 0, r = t.length, i = e.length; n < r; n++, i++) e[i] = t[n]; return e; }; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Container = void 0); var a = n(70078), s = n(25640), u = n(5493), l = n(37425), c = n(11499), d = n(75262), h = n(85933), p = n(49825), f = n(72632), _ = n(48530), g = n(95817), m = n(62240), v = (function () { function e(e) { this._appliedMiddleware = []; var t = e || {}; if ("object" != typeof t) throw new Error("" + s.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT); if (void 0 === t.defaultScope) t.defaultScope = u.BindingScopeEnum.Transient; else if (t.defaultScope !== u.BindingScopeEnum.Singleton && t.defaultScope !== u.BindingScopeEnum.Transient && t.defaultScope !== u.BindingScopeEnum.Request) throw new Error("" + s.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE); if (void 0 === t.autoBindInjectable) t.autoBindInjectable = !1; else if ("boolean" != typeof t.autoBindInjectable) throw new Error("" + s.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE); if (void 0 === t.skipBaseClassChecks) t.skipBaseClassChecks = !1; else if ("boolean" != typeof t.skipBaseClassChecks) throw new Error("" + s.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK); (this.options = { autoBindInjectable: t.autoBindInjectable, defaultScope: t.defaultScope, skipBaseClassChecks: t.skipBaseClassChecks }), (this.id = f.id()), (this._bindingDictionary = new m.Lookup()), (this._snapshots = []), (this._middleware = null), (this.parent = null), (this._metadataReader = new c.MetadataReader()); } return ( (e.merge = function (t, n) { for (var r = [], i = 2; i < arguments.length; i++) r[i - 2] = arguments[i]; var a = new e(), s = o([t, n], r).map(function (e) { return d.getBindingDictionary(e); }), u = d.getBindingDictionary(a); return ( s.forEach(function (e) { var t; (t = u), e.traverse(function (e, n) { n.forEach(function (e) { t.add(e.serviceIdentifier, e.clone()); }); }); }), a ); }), (e.prototype.load = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; for (var n = this._getContainerModuleHelpersFactory(), r = 0, i = e; r < i.length; r++) { var o = i[r], a = n(o.id); o.registry(a.bindFunction, a.unbindFunction, a.isboundFunction, a.rebindFunction); } }), (e.prototype.loadAsync = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return r(this, void 0, void 0, function () { var t, n, r, o, a; return i(this, function (i) { switch (i.label) { case 0: (t = this._getContainerModuleHelpersFactory()), (n = 0), (r = e), (i.label = 1); case 1: return n < r.length ? ((o = r[n]), (a = t(o.id)), [4, o.registry(a.bindFunction, a.unbindFunction, a.isboundFunction, a.rebindFunction)]) : [3, 4]; case 2: i.sent(), (i.label = 3); case 3: return n++, [3, 1]; case 4: return [2]; } }); }); }), (e.prototype.unload = function () { for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; t.forEach(function (t) { var n, r = ((n = t.id), function (e) { return e.moduleId === n; }); e._bindingDictionary.removeByCondition(r); }); }), (e.prototype.bind = function (e) { var t = this.options.defaultScope || u.BindingScopeEnum.Transient, n = new a.Binding(e, t); return this._bindingDictionary.add(e, n), new p.BindingToSyntax(n); }), (e.prototype.rebind = function (e) { return this.unbind(e), this.bind(e); }), (e.prototype.unbind = function (e) { try { this._bindingDictionary.remove(e); } catch (t) { throw new Error(s.CANNOT_UNBIND + " " + _.getServiceIdentifierAsString(e)); } }), (e.prototype.unbindAll = function () { this._bindingDictionary = new m.Lookup(); }), (e.prototype.isBound = function (e) { var t = this._bindingDictionary.hasKey(e); return !t && this.parent && (t = this.parent.isBound(e)), t; }), (e.prototype.isBoundNamed = function (e, t) { return this.isBoundTagged(e, l.NAMED_TAG, t); }), (e.prototype.isBoundTagged = function (e, t, n) { var r = !1; if (this._bindingDictionary.hasKey(e)) { var i = this._bindingDictionary.get(e), o = d.createMockRequest(this, e, t, n); r = i.some(function (e) { return e.constraint(o); }); } return !r && this.parent && (r = this.parent.isBoundTagged(e, t, n)), r; }), (e.prototype.snapshot = function () { this._snapshots.push(g.ContainerSnapshot.of(this._bindingDictionary.clone(), this._middleware)); }), (e.prototype.restore = function () { var e = this._snapshots.pop(); if (void 0 === e) throw new Error(s.NO_MORE_SNAPSHOTS_AVAILABLE); (this._bindingDictionary = e.bindings), (this._middleware = e.middleware); }), (e.prototype.createChild = function (t) { var n = new e(t || this.options); return (n.parent = this), n; }), (e.prototype.applyMiddleware = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; this._appliedMiddleware = this._appliedMiddleware.concat(e); var n = this._middleware ? this._middleware : this._planAndResolve(); this._middleware = e.reduce(function (e, t) { return t(e); }, n); }), (e.prototype.applyCustomMetadataReader = function (e) { this._metadataReader = e; }), (e.prototype.get = function (e) { return this._get(!1, !1, u.TargetTypeEnum.Variable, e); }), (e.prototype.getTagged = function (e, t, n) { return this._get(!1, !1, u.TargetTypeEnum.Variable, e, t, n); }), (e.prototype.getNamed = function (e, t) { return this.getTagged(e, l.NAMED_TAG, t); }), (e.prototype.getAll = function (e) { return this._get(!0, !0, u.TargetTypeEnum.Variable, e); }), (e.prototype.getAllTagged = function (e, t, n) { return this._get(!1, !0, u.TargetTypeEnum.Variable, e, t, n); }), (e.prototype.getAllNamed = function (e, t) { return this.getAllTagged(e, l.NAMED_TAG, t); }), (e.prototype.resolve = function (e) { var t = this.createChild(); return ( t.bind(e).toSelf(), this._appliedMiddleware.forEach(function (e) { t.applyMiddleware(e); }), t.get(e) ); }), (e.prototype._getContainerModuleHelpersFactory = function () { var e = this, t = function (e, t) { e._binding.moduleId = t; }, n = function (n) { return function (r) { var i = e.rebind.bind(e)(r); return t(i, n), i; }; }; return function (r) { return { bindFunction: ((i = r), function (n) { var r = e.bind.bind(e)(n); return t(r, i), r; }), isboundFunction: function (t) { return e.isBound.bind(e)(t); }, rebindFunction: n(r), unbindFunction: function (t) { e.unbind.bind(e)(t); }, }; var i; }; }), (e.prototype._get = function (e, t, n, r, i, o) { var a = null, u = { avoidConstraints: e, contextInterceptor: function (e) { return e; }, isMultiInject: t, key: i, serviceIdentifier: r, targetType: n, value: o, }; if (this._middleware) { if (null == (a = this._middleware(u))) throw new Error(s.INVALID_MIDDLEWARE_RETURN); } else a = this._planAndResolve()(u); return a; }), (e.prototype._planAndResolve = function () { var e = this; return function (t) { var n = d.plan(e._metadataReader, e, t.isMultiInject, t.targetType, t.serviceIdentifier, t.key, t.value, t.avoidConstraints); return (n = t.contextInterceptor(n)), h.resolve(n); }; }), e ); })(); t.Container = v; }, 51164: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AsyncContainerModule = t.ContainerModule = void 0); var r = n(72632), i = function (e) { (this.id = r.id()), (this.registry = e); }; t.ContainerModule = i; var o = function (e) { (this.id = r.id()), (this.registry = e); }; t.AsyncContainerModule = o; }, 95817: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ContainerSnapshot = void 0); var n = (function () { function e() {} return ( (e.of = function (t, n) { var r = new e(); return (r.bindings = t), (r.middleware = n), r; }), e ); })(); t.ContainerSnapshot = n; }, 62240: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Lookup = void 0); var r = n(25640), i = (function () { function e() { this._map = new Map(); } return ( (e.prototype.getMap = function () { return this._map; }), (e.prototype.add = function (e, t) { if (null == e) throw new Error(r.NULL_ARGUMENT); if (null == t) throw new Error(r.NULL_ARGUMENT); var n = this._map.get(e); void 0 !== n ? (n.push(t), this._map.set(e, n)) : this._map.set(e, [t]); }), (e.prototype.get = function (e) { if (null == e) throw new Error(r.NULL_ARGUMENT); var t = this._map.get(e); if (void 0 !== t) return t; throw new Error(r.KEY_NOT_FOUND); }), (e.prototype.remove = function (e) { if (null == e) throw new Error(r.NULL_ARGUMENT); if (!this._map.delete(e)) throw new Error(r.KEY_NOT_FOUND); }), (e.prototype.removeByCondition = function (e) { var t = this; this._map.forEach(function (n, r) { var i = n.filter(function (t) { return !e(t); }); i.length > 0 ? t._map.set(r, i) : t._map.delete(r); }); }), (e.prototype.hasKey = function (e) { if (null == e) throw new Error(r.NULL_ARGUMENT); return this._map.has(e); }), (e.prototype.clone = function () { var t = new e(); return ( this._map.forEach(function (e, n) { e.forEach(function (e) { return t.add(n, e.clone()); }); }), t ); }), (e.prototype.traverse = function (e) { this._map.forEach(function (t, n) { e(n, t); }); }), e ); })(); t.Lookup = i; }, 22674: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.multiBindToService = t.getServiceIdentifierAsString = t.typeConstraint = t.namedConstraint = t.taggedConstraint = t.traverseAncerstors = t.decorate = t.id = t.MetadataReader = t.postConstruct = t.targetName = t.multiInject = t.unmanaged = t.optional = t.LazyServiceIdentifer = t.inject = t.named = t.tagged = t.injectable = t.ContainerModule = t.AsyncContainerModule = t.TargetTypeEnum = t.BindingTypeEnum = t.BindingScopeEnum = t.Container = t.METADATA_KEY = void 0); var r = n(37425); t.METADATA_KEY = r; var i = n(99700); Object.defineProperty(t, "Container", { enumerable: !0, get: function () { return i.Container; }, }); var o = n(5493); Object.defineProperty(t, "BindingScopeEnum", { enumerable: !0, get: function () { return o.BindingScopeEnum; }, }), Object.defineProperty(t, "BindingTypeEnum", { enumerable: !0, get: function () { return o.BindingTypeEnum; }, }), Object.defineProperty(t, "TargetTypeEnum", { enumerable: !0, get: function () { return o.TargetTypeEnum; }, }); var a = n(51164); Object.defineProperty(t, "AsyncContainerModule", { enumerable: !0, get: function () { return a.AsyncContainerModule; }, }), Object.defineProperty(t, "ContainerModule", { enumerable: !0, get: function () { return a.ContainerModule; }, }); var s = n(16504); Object.defineProperty(t, "injectable", { enumerable: !0, get: function () { return s.injectable; }, }); var u = n(91823); Object.defineProperty(t, "tagged", { enumerable: !0, get: function () { return u.tagged; }, }); var l = n(44466); Object.defineProperty(t, "named", { enumerable: !0, get: function () { return l.named; }, }); var c = n(29385); Object.defineProperty(t, "inject", { enumerable: !0, get: function () { return c.inject; }, }), Object.defineProperty(t, "LazyServiceIdentifer", { enumerable: !0, get: function () { return c.LazyServiceIdentifer; }, }); var d = n(5923); Object.defineProperty(t, "optional", { enumerable: !0, get: function () { return d.optional; }, }); var h = n(53022); Object.defineProperty(t, "unmanaged", { enumerable: !0, get: function () { return h.unmanaged; }, }); var p = n(3342); Object.defineProperty(t, "multiInject", { enumerable: !0, get: function () { return p.multiInject; }, }); var f = n(67509); Object.defineProperty(t, "targetName", { enumerable: !0, get: function () { return f.targetName; }, }); var _ = n(76311); Object.defineProperty(t, "postConstruct", { enumerable: !0, get: function () { return _.postConstruct; }, }); var g = n(11499); Object.defineProperty(t, "MetadataReader", { enumerable: !0, get: function () { return g.MetadataReader; }, }); var m = n(72632); Object.defineProperty(t, "id", { enumerable: !0, get: function () { return m.id; }, }); var v = n(28041); Object.defineProperty(t, "decorate", { enumerable: !0, get: function () { return v.decorate; }, }); var y = n(41146); Object.defineProperty(t, "traverseAncerstors", { enumerable: !0, get: function () { return y.traverseAncerstors; }, }), Object.defineProperty(t, "taggedConstraint", { enumerable: !0, get: function () { return y.taggedConstraint; }, }), Object.defineProperty(t, "namedConstraint", { enumerable: !0, get: function () { return y.namedConstraint; }, }), Object.defineProperty(t, "typeConstraint", { enumerable: !0, get: function () { return y.typeConstraint; }, }); var C = n(48530); Object.defineProperty(t, "getServiceIdentifierAsString", { enumerable: !0, get: function () { return C.getServiceIdentifierAsString; }, }); var b = n(14577); Object.defineProperty(t, "multiBindToService", { enumerable: !0, get: function () { return b.multiBindToService; }, }); }, 91734: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Context = void 0); var r = n(72632), i = (function () { function e(e) { (this.id = r.id()), (this.container = e); } return ( (e.prototype.addPlan = function (e) { this.plan = e; }), (e.prototype.setCurrentRequest = function (e) { this.currentRequest = e; }), e ); })(); t.Context = i; }, 67258: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Metadata = void 0); var r = n(37425), i = (function () { function e(e, t) { (this.key = e), (this.value = t); } return ( (e.prototype.toString = function () { return this.key === r.NAMED_TAG ? "named: " + this.value.toString() + " " : "tagged: { key:" + this.key.toString() + ", value: " + this.value + " }"; }), e ); })(); t.Metadata = i; }, 11499: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.MetadataReader = void 0); var r = n(37425), i = (function () { function e() {} return ( (e.prototype.getConstructorMetadata = function (e) { return { compilerGeneratedMetadata: Reflect.getMetadata(r.PARAM_TYPES, e), userGeneratedMetadata: Reflect.getMetadata(r.TAGGED, e) || {} }; }), (e.prototype.getPropertiesMetadata = function (e) { return Reflect.getMetadata(r.TAGGED_PROP, e) || []; }), e ); })(); t.MetadataReader = i; }, 4595: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Plan = void 0); var n = function (e, t) { (this.parentContext = e), (this.rootRequest = t); }; t.Plan = n; }, 75262: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.getBindingDictionary = t.createMockRequest = t.plan = void 0); var r = n(57197), i = n(25640), o = n(5493), a = n(37425), s = n(69523), u = n(48530), l = n(91734), c = n(67258), d = n(4595), h = n(34912), p = n(22929), f = n(23927); function _(e) { return e._bindingDictionary; } function g(e, t, n, o, a) { var s = v(n.container, a.serviceIdentifier), l = []; return ( s.length === r.BindingCount.NoBindingsAvailable && n.container.options.autoBindInjectable && "function" == typeof a.serviceIdentifier && e.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata && (n.container.bind(a.serviceIdentifier).toSelf(), (s = v(n.container, a.serviceIdentifier))), (l = t ? s : s.filter(function (e) { var t = new p.Request(e.serviceIdentifier, n, o, e, a); return e.constraint(t); })), (function (e, t, n, o) { switch (t.length) { case r.BindingCount.NoBindingsAvailable: if (n.isOptional()) return t; var a = u.getServiceIdentifierAsString(e), s = i.NOT_REGISTERED; throw ((s += u.listMetadataForTarget(a, n)), (s += u.listRegisteredBindingsForServiceIdentifier(o, a, v)), new Error(s)); case r.BindingCount.OnlyOneBindingAvailable: if (!n.isArray()) return t; case r.BindingCount.MultipleBindingsAvailable: default: if (n.isArray()) return t; (a = u.getServiceIdentifierAsString(e)), (s = i.AMBIGUOUS_MATCH + " " + a); throw ((s += u.listRegisteredBindingsForServiceIdentifier(o, a, v)), new Error(s)); } })(a.serviceIdentifier, l, a, n.container), l ); } function m(e, t, n, r, a, s) { var u, l; if (null === a) { (u = g(e, t, r, null, s)), (l = new p.Request(n, r, null, u, s)); var c = new d.Plan(r, l); r.addPlan(c); } else (u = g(e, t, r, a, s)), (l = a.addChildRequest(s.serviceIdentifier, u, s)); u.forEach(function (t) { var n = null; if (s.isArray()) n = l.addChildRequest(t.serviceIdentifier, t, s); else { if (t.cache) return; n = l; } if (t.type === o.BindingTypeEnum.Instance && null !== t.implementationType) { var a = h.getDependencies(e, t.implementationType); if (!r.container.options.skipBaseClassChecks) { var u = h.getBaseClassDependencyCount(e, t.implementationType); if (a.length < u) { var c = i.ARGUMENTS_LENGTH_MISMATCH(h.getFunctionName(t.implementationType)); throw new Error(c); } } a.forEach(function (t) { m(e, !1, t.serviceIdentifier, r, n, t); }); } }); } function v(e, t) { var n = [], r = _(e); return r.hasKey(t) ? (n = r.get(t)) : null !== e.parent && (n = v(e.parent, t)), n; } (t.getBindingDictionary = _), (t.plan = function (e, t, n, r, i, o, d, h) { void 0 === h && (h = !1); var p = new l.Context(t), _ = (function (e, t, n, r, i, o) { var s = e ? a.MULTI_INJECT_TAG : a.INJECT_TAG, u = new c.Metadata(s, n), l = new f.Target(t, r, n, u); if (void 0 !== i) { var d = new c.Metadata(i, o); l.metadata.push(d); } return l; })(n, r, i, "", o, d); try { return m(e, h, i, p, null, _), p; } catch (e) { throw (s.isStackOverflowExeption(e) && p.plan && u.circularDependencyToException(p.plan.rootRequest), e); } }), (t.createMockRequest = function (e, t, n, r) { var i = new f.Target(o.TargetTypeEnum.Variable, "", t, new c.Metadata(n, r)), a = new l.Context(e); return new p.Request(t, a, null, [], i); }); }, 11625: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.QueryableString = void 0); var n = (function () { function e(e) { this.str = e; } return ( (e.prototype.startsWith = function (e) { return 0 === this.str.indexOf(e); }), (e.prototype.endsWith = function (e) { var t, n = e.split("").reverse().join(""); return (t = this.str.split("").reverse().join("")), this.startsWith.call({ str: t }, n); }), (e.prototype.contains = function (e) { return -1 !== this.str.indexOf(e); }), (e.prototype.equals = function (e) { return this.str === e; }), (e.prototype.value = function () { return this.str; }), e ); })(); t.QueryableString = n; }, 34912: function (e, t, n) { "use strict"; var r = (this && this.__spreadArray) || function (e, t) { for (var n = 0, r = t.length, i = e.length; n < r; n++, i++) e[i] = t[n]; return e; }; Object.defineProperty(t, "__esModule", { value: !0 }), (t.getFunctionName = t.getBaseClassDependencyCount = t.getDependencies = void 0); var i = n(29385), o = n(25640), a = n(5493), s = n(37425), u = n(48530); Object.defineProperty(t, "getFunctionName", { enumerable: !0, get: function () { return u.getFunctionName; }, }); var l = n(23927); function c(e, t, n, i) { var a = e.getConstructorMetadata(n), s = a.compilerGeneratedMetadata; if (void 0 === s) { var u = o.MISSING_INJECTABLE_ANNOTATION + " " + t + "."; throw new Error(u); } var l = a.userGeneratedMetadata, c = Object.keys(l), p = 0 === n.length && c.length > 0, f = c.length > n.length, _ = (function (e, t, n, r, i) { for (var o = [], a = 0; a < i; a++) { var s = d(a, e, t, n, r); null !== s && o.push(s); } return o; })(i, t, s, l, p || f ? c.length : n.length), g = h(e, n); return r(r([], _), g); } function d(e, t, n, r, s) { var u = s[e.toString()] || [], c = p(u), d = !0 !== c.unmanaged, h = r[e], f = c.inject || c.multiInject; if (((h = f || h) instanceof i.LazyServiceIdentifer && (h = h.unwrap()), d)) { if (!t && (h === Object || h === Function || void 0 === h)) { var _ = o.MISSING_INJECT_ANNOTATION + " argument " + e + " in class " + n + "."; throw new Error(_); } var g = new l.Target(a.TargetTypeEnum.ConstructorArgument, c.targetName, h); return (g.metadata = u), g; } return null; } function h(e, t) { for (var n = e.getPropertiesMetadata(t), i = [], o = 0, s = Object.keys(n); o < s.length; o++) { var u = s[o], c = n[u], d = p(n[u]), f = d.targetName || u, _ = d.inject || d.multiInject, g = new l.Target(a.TargetTypeEnum.ClassProperty, f, _); (g.metadata = c), i.push(g); } var m = Object.getPrototypeOf(t.prototype).constructor; if (m !== Object) { var v = h(e, m); i = r(r([], i), v); } return i; } function p(e) { var t = {}; return ( e.forEach(function (e) { t[e.key.toString()] = e.value; }), { inject: t[s.INJECT_TAG], multiInject: t[s.MULTI_INJECT_TAG], targetName: t[s.NAME_TAG], unmanaged: t[s.UNMANAGED_TAG] } ); } (t.getDependencies = function (e, t) { return c(e, u.getFunctionName(t), t, !1); }), (t.getBaseClassDependencyCount = function e(t, n) { var r = Object.getPrototypeOf(n.prototype).constructor; if (r !== Object) { var i = c(t, u.getFunctionName(r), r, !0), o = i.map(function (e) { return e.metadata.filter(function (e) { return e.key === s.UNMANAGED_TAG; }); }), a = [].concat.apply([], o).length, l = i.length - a; return l > 0 ? l : e(t, r); } return 0; }); }, 22929: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Request = void 0); var r = n(72632), i = (function () { function e(e, t, n, i, o) { (this.id = r.id()), (this.serviceIdentifier = e), (this.parentContext = t), (this.parentRequest = n), (this.target = o), (this.childRequests = []), (this.bindings = Array.isArray(i) ? i : [i]), (this.requestScope = null === n ? new Map() : null); } return ( (e.prototype.addChildRequest = function (t, n, r) { var i = new e(t, this.parentContext, this, n, r); return this.childRequests.push(i), i; }), e ); })(); t.Request = i; }, 23927: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Target = void 0); var r = n(37425), i = n(72632), o = n(67258), a = n(11625), s = (function () { function e(e, t, n, s) { (this.id = i.id()), (this.type = e), (this.serviceIdentifier = n), (this.name = new a.QueryableString(t || "")), (this.metadata = new Array()); var u = null; "string" == typeof s ? (u = new o.Metadata(r.NAMED_TAG, s)) : s instanceof o.Metadata && (u = s), null !== u && this.metadata.push(u); } return ( (e.prototype.hasTag = function (e) { for (var t = 0, n = this.metadata; t < n.length; t++) { if (n[t].key === e) return !0; } return !1; }), (e.prototype.isArray = function () { return this.hasTag(r.MULTI_INJECT_TAG); }), (e.prototype.matchesArray = function (e) { return this.matchesTag(r.MULTI_INJECT_TAG)(e); }), (e.prototype.isNamed = function () { return this.hasTag(r.NAMED_TAG); }), (e.prototype.isTagged = function () { return this.metadata.some(function (e) { return r.NON_CUSTOM_TAG_KEYS.every(function (t) { return e.key !== t; }); }); }), (e.prototype.isOptional = function () { return this.matchesTag(r.OPTIONAL_TAG)(!0); }), (e.prototype.getNamedTag = function () { return this.isNamed() ? this.metadata.filter(function (e) { return e.key === r.NAMED_TAG; })[0] : null; }), (e.prototype.getCustomTags = function () { return this.isTagged() ? this.metadata.filter(function (e) { return r.NON_CUSTOM_TAG_KEYS.every(function (t) { return e.key !== t; }); }) : null; }), (e.prototype.matchesNamedTag = function (e) { return this.matchesTag(r.NAMED_TAG)(e); }), (e.prototype.matchesTag = function (e) { var t = this; return function (n) { for (var r = 0, i = t.metadata; r < i.length; r++) { var o = i[r]; if (o.key === e && o.value === n) return !0; } return !1; }; }), e ); })(); t.Target = s; }, 40198: function (e, t, n) { "use strict"; var r = (this && this.__spreadArray) || function (e, t) { for (var n = 0, r = t.length, i = e.length; n < r; n++, i++) e[i] = t[n]; return e; }; Object.defineProperty(t, "__esModule", { value: !0 }), (t.resolveInstance = void 0); var i = n(25640), o = n(5493), a = n(37425); t.resolveInstance = function (e, t, n) { var s, u, l = null; if (t.length > 0) { var c = t .filter(function (e) { return null !== e.target && e.target.type === o.TargetTypeEnum.ConstructorArgument; }) .map(n); (u = c), (l = (function (e, t, n) { var r = t.filter(function (e) { return null !== e.target && e.target.type === o.TargetTypeEnum.ClassProperty; }), i = r.map(n); return ( r.forEach(function (t, n) { var r; r = t.target.name.value(); var o = i[n]; e[r] = o; }), e ); })((l = new ((s = e).bind.apply(s, r([void 0], u)))()), t, n)); } else l = new e(); return ( (function (e, t) { if (Reflect.hasMetadata(a.POST_CONSTRUCT, e)) { var n = Reflect.getMetadata(a.POST_CONSTRUCT, e); try { t[n.value](); } catch (t) { throw new Error(i.POST_CONSTRUCT_ERROR(e.name, t.message)); } } })(e, l), l ); }; }, 85933: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.resolve = void 0); var r = n(25640), i = n(5493), o = n(69523), a = n(48530), s = n(40198), u = function (e, t, n) { try { return n(); } catch (n) { throw o.isStackOverflowExeption(n) ? new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(e, t.toString())) : n; } }, l = function (e) { return function (t) { t.parentContext.setCurrentRequest(t); var n = t.bindings, o = t.childRequests, c = t.target && t.target.isArray(), d = !(t.parentRequest && t.parentRequest.target && t.target && t.parentRequest.target.matchesArray(t.target.serviceIdentifier)); if (c && d) return o.map(function (t) { return l(e)(t); }); var h = null; if (!t.target.isOptional() || 0 !== n.length) { var p = n[0], f = p.scope === i.BindingScopeEnum.Singleton, _ = p.scope === i.BindingScopeEnum.Request; if (f && p.activated) return p.cache; if (_ && null !== e && e.has(p.id)) return e.get(p.id); if (p.type === i.BindingTypeEnum.ConstantValue) (h = p.cache), (p.activated = !0); else if (p.type === i.BindingTypeEnum.Function) (h = p.cache), (p.activated = !0); else if (p.type === i.BindingTypeEnum.Constructor) h = p.implementationType; else if (p.type === i.BindingTypeEnum.DynamicValue && null !== p.dynamicValue) h = u("toDynamicValue", p.serviceIdentifier, function () { return p.dynamicValue(t.parentContext); }); else if (p.type === i.BindingTypeEnum.Factory && null !== p.factory) h = u("toFactory", p.serviceIdentifier, function () { return p.factory(t.parentContext); }); else if (p.type === i.BindingTypeEnum.Provider && null !== p.provider) h = u("toProvider", p.serviceIdentifier, function () { return p.provider(t.parentContext); }); else { if (p.type !== i.BindingTypeEnum.Instance || null === p.implementationType) { var g = a.getServiceIdentifierAsString(t.serviceIdentifier); throw new Error(r.INVALID_BINDING_TYPE + " " + g); } h = s.resolveInstance(p.implementationType, o, l(e)); } return "function" == typeof p.onActivation && (h = p.onActivation(t.parentContext, h)), f && ((p.cache = h), (p.activated = !0)), _ && null !== e && !e.has(p.id) && e.set(p.id, h), h; } }; }; t.resolve = function (e) { return l(e.plan.rootRequest.requestScope)(e.plan.rootRequest); }; }, 51580: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingInSyntax = void 0); var r = n(5493), i = n(75714), o = (function () { function e(e) { this._binding = e; } return ( (e.prototype.inRequestScope = function () { return (this._binding.scope = r.BindingScopeEnum.Request), new i.BindingWhenOnSyntax(this._binding); }), (e.prototype.inSingletonScope = function () { return (this._binding.scope = r.BindingScopeEnum.Singleton), new i.BindingWhenOnSyntax(this._binding); }), (e.prototype.inTransientScope = function () { return (this._binding.scope = r.BindingScopeEnum.Transient), new i.BindingWhenOnSyntax(this._binding); }), e ); })(); t.BindingInSyntax = o; }, 61142: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingInWhenOnSyntax = void 0); var r = n(51580), i = n(1003), o = n(7190), a = (function () { function e(e) { (this._binding = e), (this._bindingWhenSyntax = new o.BindingWhenSyntax(this._binding)), (this._bindingOnSyntax = new i.BindingOnSyntax(this._binding)), (this._bindingInSyntax = new r.BindingInSyntax(e)); } return ( (e.prototype.inRequestScope = function () { return this._bindingInSyntax.inRequestScope(); }), (e.prototype.inSingletonScope = function () { return this._bindingInSyntax.inSingletonScope(); }), (e.prototype.inTransientScope = function () { return this._bindingInSyntax.inTransientScope(); }), (e.prototype.when = function (e) { return this._bindingWhenSyntax.when(e); }), (e.prototype.whenTargetNamed = function (e) { return this._bindingWhenSyntax.whenTargetNamed(e); }), (e.prototype.whenTargetIsDefault = function () { return this._bindingWhenSyntax.whenTargetIsDefault(); }), (e.prototype.whenTargetTagged = function (e, t) { return this._bindingWhenSyntax.whenTargetTagged(e, t); }), (e.prototype.whenInjectedInto = function (e) { return this._bindingWhenSyntax.whenInjectedInto(e); }), (e.prototype.whenParentNamed = function (e) { return this._bindingWhenSyntax.whenParentNamed(e); }), (e.prototype.whenParentTagged = function (e, t) { return this._bindingWhenSyntax.whenParentTagged(e, t); }), (e.prototype.whenAnyAncestorIs = function (e) { return this._bindingWhenSyntax.whenAnyAncestorIs(e); }), (e.prototype.whenNoAncestorIs = function (e) { return this._bindingWhenSyntax.whenNoAncestorIs(e); }), (e.prototype.whenAnyAncestorNamed = function (e) { return this._bindingWhenSyntax.whenAnyAncestorNamed(e); }), (e.prototype.whenAnyAncestorTagged = function (e, t) { return this._bindingWhenSyntax.whenAnyAncestorTagged(e, t); }), (e.prototype.whenNoAncestorNamed = function (e) { return this._bindingWhenSyntax.whenNoAncestorNamed(e); }), (e.prototype.whenNoAncestorTagged = function (e, t) { return this._bindingWhenSyntax.whenNoAncestorTagged(e, t); }), (e.prototype.whenAnyAncestorMatches = function (e) { return this._bindingWhenSyntax.whenAnyAncestorMatches(e); }), (e.prototype.whenNoAncestorMatches = function (e) { return this._bindingWhenSyntax.whenNoAncestorMatches(e); }), (e.prototype.onActivation = function (e) { return this._bindingOnSyntax.onActivation(e); }), e ); })(); t.BindingInWhenOnSyntax = a; }, 1003: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingOnSyntax = void 0); var r = n(7190), i = (function () { function e(e) { this._binding = e; } return ( (e.prototype.onActivation = function (e) { return (this._binding.onActivation = e), new r.BindingWhenSyntax(this._binding); }), e ); })(); t.BindingOnSyntax = i; }, 49825: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingToSyntax = void 0); var r = n(25640), i = n(5493), o = n(61142), a = n(75714), s = (function () { function e(e) { this._binding = e; } return ( (e.prototype.to = function (e) { return (this._binding.type = i.BindingTypeEnum.Instance), (this._binding.implementationType = e), new o.BindingInWhenOnSyntax(this._binding); }), (e.prototype.toSelf = function () { if ("function" != typeof this._binding.serviceIdentifier) throw new Error("" + r.INVALID_TO_SELF_VALUE); var e = this._binding.serviceIdentifier; return this.to(e); }), (e.prototype.toConstantValue = function (e) { return (this._binding.type = i.BindingTypeEnum.ConstantValue), (this._binding.cache = e), (this._binding.dynamicValue = null), (this._binding.implementationType = null), (this._binding.scope = i.BindingScopeEnum.Singleton), new a.BindingWhenOnSyntax(this._binding); }), (e.prototype.toDynamicValue = function (e) { return (this._binding.type = i.BindingTypeEnum.DynamicValue), (this._binding.cache = null), (this._binding.dynamicValue = e), (this._binding.implementationType = null), new o.BindingInWhenOnSyntax(this._binding); }), (e.prototype.toConstructor = function (e) { return (this._binding.type = i.BindingTypeEnum.Constructor), (this._binding.implementationType = e), (this._binding.scope = i.BindingScopeEnum.Singleton), new a.BindingWhenOnSyntax(this._binding); }), (e.prototype.toFactory = function (e) { return (this._binding.type = i.BindingTypeEnum.Factory), (this._binding.factory = e), (this._binding.scope = i.BindingScopeEnum.Singleton), new a.BindingWhenOnSyntax(this._binding); }), (e.prototype.toFunction = function (e) { if ("function" != typeof e) throw new Error(r.INVALID_FUNCTION_BINDING); var t = this.toConstantValue(e); return (this._binding.type = i.BindingTypeEnum.Function), (this._binding.scope = i.BindingScopeEnum.Singleton), t; }), (e.prototype.toAutoFactory = function (e) { return ( (this._binding.type = i.BindingTypeEnum.Factory), (this._binding.factory = function (t) { return function () { return t.container.get(e); }; }), (this._binding.scope = i.BindingScopeEnum.Singleton), new a.BindingWhenOnSyntax(this._binding) ); }), (e.prototype.toProvider = function (e) { return (this._binding.type = i.BindingTypeEnum.Provider), (this._binding.provider = e), (this._binding.scope = i.BindingScopeEnum.Singleton), new a.BindingWhenOnSyntax(this._binding); }), (e.prototype.toService = function (e) { this.toDynamicValue(function (t) { return t.container.get(e); }); }), e ); })(); t.BindingToSyntax = s; }, 75714: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingWhenOnSyntax = void 0); var r = n(1003), i = n(7190), o = (function () { function e(e) { (this._binding = e), (this._bindingWhenSyntax = new i.BindingWhenSyntax(this._binding)), (this._bindingOnSyntax = new r.BindingOnSyntax(this._binding)); } return ( (e.prototype.when = function (e) { return this._bindingWhenSyntax.when(e); }), (e.prototype.whenTargetNamed = function (e) { return this._bindingWhenSyntax.whenTargetNamed(e); }), (e.prototype.whenTargetIsDefault = function () { return this._bindingWhenSyntax.whenTargetIsDefault(); }), (e.prototype.whenTargetTagged = function (e, t) { return this._bindingWhenSyntax.whenTargetTagged(e, t); }), (e.prototype.whenInjectedInto = function (e) { return this._bindingWhenSyntax.whenInjectedInto(e); }), (e.prototype.whenParentNamed = function (e) { return this._bindingWhenSyntax.whenParentNamed(e); }), (e.prototype.whenParentTagged = function (e, t) { return this._bindingWhenSyntax.whenParentTagged(e, t); }), (e.prototype.whenAnyAncestorIs = function (e) { return this._bindingWhenSyntax.whenAnyAncestorIs(e); }), (e.prototype.whenNoAncestorIs = function (e) { return this._bindingWhenSyntax.whenNoAncestorIs(e); }), (e.prototype.whenAnyAncestorNamed = function (e) { return this._bindingWhenSyntax.whenAnyAncestorNamed(e); }), (e.prototype.whenAnyAncestorTagged = function (e, t) { return this._bindingWhenSyntax.whenAnyAncestorTagged(e, t); }), (e.prototype.whenNoAncestorNamed = function (e) { return this._bindingWhenSyntax.whenNoAncestorNamed(e); }), (e.prototype.whenNoAncestorTagged = function (e, t) { return this._bindingWhenSyntax.whenNoAncestorTagged(e, t); }), (e.prototype.whenAnyAncestorMatches = function (e) { return this._bindingWhenSyntax.whenAnyAncestorMatches(e); }), (e.prototype.whenNoAncestorMatches = function (e) { return this._bindingWhenSyntax.whenNoAncestorMatches(e); }), (e.prototype.onActivation = function (e) { return this._bindingOnSyntax.onActivation(e); }), e ); })(); t.BindingWhenOnSyntax = o; }, 7190: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BindingWhenSyntax = void 0); var r = n(1003), i = n(41146), o = (function () { function e(e) { this._binding = e; } return ( (e.prototype.when = function (e) { return (this._binding.constraint = e), new r.BindingOnSyntax(this._binding); }), (e.prototype.whenTargetNamed = function (e) { return (this._binding.constraint = i.namedConstraint(e)), new r.BindingOnSyntax(this._binding); }), (e.prototype.whenTargetIsDefault = function () { return ( (this._binding.constraint = function (e) { return null !== e.target && !e.target.isNamed() && !e.target.isTagged(); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenTargetTagged = function (e, t) { return (this._binding.constraint = i.taggedConstraint(e)(t)), new r.BindingOnSyntax(this._binding); }), (e.prototype.whenInjectedInto = function (e) { return ( (this._binding.constraint = function (t) { return i.typeConstraint(e)(t.parentRequest); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenParentNamed = function (e) { return ( (this._binding.constraint = function (t) { return i.namedConstraint(e)(t.parentRequest); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenParentTagged = function (e, t) { return ( (this._binding.constraint = function (n) { return i.taggedConstraint(e)(t)(n.parentRequest); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenAnyAncestorIs = function (e) { return ( (this._binding.constraint = function (t) { return i.traverseAncerstors(t, i.typeConstraint(e)); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenNoAncestorIs = function (e) { return ( (this._binding.constraint = function (t) { return !i.traverseAncerstors(t, i.typeConstraint(e)); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenAnyAncestorNamed = function (e) { return ( (this._binding.constraint = function (t) { return i.traverseAncerstors(t, i.namedConstraint(e)); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenNoAncestorNamed = function (e) { return ( (this._binding.constraint = function (t) { return !i.traverseAncerstors(t, i.namedConstraint(e)); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenAnyAncestorTagged = function (e, t) { return ( (this._binding.constraint = function (n) { return i.traverseAncerstors(n, i.taggedConstraint(e)(t)); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenNoAncestorTagged = function (e, t) { return ( (this._binding.constraint = function (n) { return !i.traverseAncerstors(n, i.taggedConstraint(e)(t)); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenAnyAncestorMatches = function (e) { return ( (this._binding.constraint = function (t) { return i.traverseAncerstors(t, e); }), new r.BindingOnSyntax(this._binding) ); }), (e.prototype.whenNoAncestorMatches = function (e) { return ( (this._binding.constraint = function (t) { return !i.traverseAncerstors(t, e); }), new r.BindingOnSyntax(this._binding) ); }), e ); })(); t.BindingWhenSyntax = o; }, 41146: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.typeConstraint = t.namedConstraint = t.taggedConstraint = t.traverseAncerstors = void 0); var r = n(37425), i = n(67258), o = function (e, t) { var n = e.parentRequest; return null !== n && (!!t(n) || o(n, t)); }; t.traverseAncerstors = o; var a = function (e) { return function (t) { var n = function (n) { return null !== n && null !== n.target && n.target.matchesTag(e)(t); }; return (n.metaData = new i.Metadata(e, t)), n; }; }; t.taggedConstraint = a; var s = a(r.NAMED_TAG); t.namedConstraint = s; t.typeConstraint = function (e) { return function (t) { var n = null; if (null !== t) { if (((n = t.bindings[0]), "string" == typeof e)) return n.serviceIdentifier === e; var r = t.bindings[0].implementationType; return e === r; } return !1; }; }; }, 14577: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.multiBindToService = void 0); t.multiBindToService = function (e) { return function (t) { return function () { for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r]; return n.forEach(function (n) { return e.bind(n).toService(t); }); }; }; }; }, 69523: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.isStackOverflowExeption = void 0); var r = n(25640); t.isStackOverflowExeption = function (e) { return e instanceof RangeError || e.message === r.STACK_OVERFLOW; }; }, 72632: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.id = void 0); var n = 0; t.id = function () { return n++; }; }, 48530: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.circularDependencyToException = t.listMetadataForTarget = t.listRegisteredBindingsForServiceIdentifier = t.getServiceIdentifierAsString = t.getFunctionName = void 0); var r = n(25640); function i(e) { return "function" == typeof e ? e.name : "symbol" == typeof e ? e.toString() : e; } function o(e, t) { return null !== e.parentRequest && (e.parentRequest.serviceIdentifier === t || o(e.parentRequest, t)); } function a(e) { if (e.name) return e.name; var t = e.toString(), n = t.match(/^function\s*([^\s(]+)/); return n ? n[1] : "Anonymous function: " + t; } (t.getServiceIdentifierAsString = i), (t.listRegisteredBindingsForServiceIdentifier = function (e, t, n) { var r = "", i = n(e, t); return ( 0 !== i.length && ((r = "\nRegistered bindings:"), i.forEach(function (e) { var t = "Object"; null !== e.implementationType && (t = a(e.implementationType)), (r = r + "\n " + t), e.constraint.metaData && (r = r + " - " + e.constraint.metaData); })), r ); }), (t.circularDependencyToException = function e(t) { t.childRequests.forEach(function (t) { if (o(t, t.serviceIdentifier)) { var n = (function (e) { var t = (function e(t, n) { void 0 === n && (n = []); var r = i(t.serviceIdentifier); return n.push(r), null !== t.parentRequest ? e(t.parentRequest, n) : n; })(e); return t.reverse().join(" --\x3e "); })(t); throw new Error(r.CIRCULAR_DEPENDENCY + " " + n); } e(t); }); }), (t.listMetadataForTarget = function (e, t) { if (t.isTagged() || t.isNamed()) { var n = "", r = t.getNamedTag(), i = t.getCustomTags(); return ( null !== r && (n += r.toString() + "\n"), null !== i && i.forEach(function (e) { n += e.toString() + "\n"; }), " " + e + "\n " + e + " - " + n ); } return " " + e; }), (t.getFunctionName = a); }, 90903: (e, t, n) => { "use strict"; n.r(t); }, 42607: (e, t, n) => { "use strict"; n.r(t); }, 89365: (e, t, n) => { "use strict"; n.r(t); }, 38724: (e, t, n) => { "use strict"; n.r(t); }, 37163: (e, t, n) => { "use strict"; n.r(t); }, 17173: (e, t, n) => { "use strict"; n.r(t); }, 936: (e, t, n) => { "use strict"; n.r(t); }, 39249: (e, t, n) => { "use strict"; n.r(t); }, 78819: (e, t, n) => { "use strict"; n.r(t); }, 49989: (e, t, n) => { "use strict"; n.r(t); }, 13843: (e, t, n) => { "use strict"; n.r(t); }, 53591: (e, t, n) => { "use strict"; n.r(t); }, 20656: (e, t, n) => { "use strict"; n.r(t); }, 28847: (e, t, n) => { "use strict"; n.r(t); }, 91217: (e, t, n) => { "use strict"; n.r(t); }, 96328: (e, t, n) => { "use strict"; n.r(t); }, 72383: (e, t, n) => { "use strict"; n.r(t); }, 2974: (e, t, n) => { "use strict"; n.r(t); }, 62478: (e, t, n) => { "use strict"; n.r(t); }, 7035: (e, t, n) => { "use strict"; n.r(t); }, 92046: (e, t, n) => { "use strict"; n.r(t); }, 24565: (e, t, n) => { "use strict"; n.r(t); }, 46095: (e, t, n) => { "use strict"; n.r(t); }, 21001: (e, t, n) => { "use strict"; n.r(t); }, 85912: (e, t, n) => { "use strict"; n.r(t); }, 19638: (e, t, n) => { "use strict"; n.r(t); }, 35268: (e, t, n) => { "use strict"; n.r(t); }, 45159: (e, t, n) => { "use strict"; n.r(t); }, 11767: (e, t, n) => { "use strict"; n.r(t); }, 53334: (e, t, n) => { "use strict"; n.r(t); }, 18580: (e, t, n) => { "use strict"; n.r(t); }, 91259: (e, t, n) => { "use strict"; n.r(t); }, 77398: (e, t, n) => { "use strict"; n.r(t); }, 51307: (e, t, n) => { "use strict"; n.r(t); }, 55675: (e, t, n) => { "use strict"; n.r(t); }, 32714: (e, t, n) => { "use strict"; n.r(t); }, 79090: (e, t, n) => { "use strict"; n.r(t); }, 78170: (e, t, n) => { "use strict"; n.r(t); }, 42605: (e, t, n) => { "use strict"; n.r(t); }, 11936: (e, t, n) => { "use strict"; n.r(t); }, 48150: (e, t, n) => { "use strict"; n.r(t); }, 95239: (e, t, n) => { "use strict"; n.r(t); }, 38232: (e, t, n) => { "use strict"; n.r(t); }, 2634: (e, t, n) => { "use strict"; n.r(t); }, 67946: (e, t, n) => { "use strict"; n.r(t); }, 5881: (e, t, n) => { "use strict"; n.r(t); }, 3652: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var n = (function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; (r.enumerable = r.enumerable || !1), (r.configurable = !0), "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t; }; })(); function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } var i = (function () { function e(t, n, i) { void 0 === n && (n = !1), r(this, e), (this._fn = t), (this._once = n), (this._thisArg = i), (this._next = this._prev = this._owner = null); } return ( n(e, [ { key: "detach", value: function () { return null !== this._owner && (this._owner.detach(this), !0); }, }, ]), e ); })(); function o(e, t) { return e._head ? ((e._tail._next = t), (t._prev = e._tail), (e._tail = t)) : ((e._head = t), (e._tail = t)), (t._owner = e), t; } var a = (function () { function e() { r(this, e), (this._head = this._tail = void 0); } return ( n(e, [ { key: "handlers", value: function () { var e = !(arguments.length <= 0 || void 0 === arguments[0]) && arguments[0], t = this._head; if (e) return !!t; for (var n = []; t; ) n.push(t), (t = t._next); return n; }, }, { key: "has", value: function (e) { if (!(e instanceof i)) throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object."); return e._owner === this; }, }, { key: "dispatch", value: function () { var e = this._head; if (!e) return !1; for (; e; ) e._once && this.detach(e), e._fn.apply(e._thisArg, arguments), (e = e._next); return !0; }, }, { key: "add", value: function (e) { var t = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1]; if ("function" != typeof e) throw new Error("MiniSignal#add(): First arg must be a Function."); return o(this, new i(e, !1, t)); }, }, { key: "once", value: function (e) { var t = arguments.length <= 1 || void 0 === arguments[1] ? null : arguments[1]; if ("function" != typeof e) throw new Error("MiniSignal#once(): First arg must be a Function."); return o(this, new i(e, !0, t)); }, }, { key: "detach", value: function (e) { if (!(e instanceof i)) throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object."); return e._owner !== this || (e._prev && (e._prev._next = e._next), e._next && (e._next._prev = e._prev), e === this._head ? ((this._head = e._next), null === e._next && (this._tail = null)) : e === this._tail && ((this._tail = e._prev), (this._tail._next = null)), (e._owner = null)), this; }, }, { key: "detachAll", value: function () { var e = this._head; if (!e) return this; for (this._head = this._tail = null; e; ) (e._owner = null), (e = e._next); return this; }, }, ]), e ); })(); (a.MiniSignalBinding = i), (t.default = a), (e.exports = t.default); }, 37320: (e) => { "use strict"; var t = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable; e.exports = (function () { try { if (!Object.assign) return !1; var e = new String("abc"); if (((e[5] = "de"), "5" === Object.getOwnPropertyNames(e)[0])) return !1; for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n; if ( "0123456789" !== Object.getOwnPropertyNames(t) .map(function (e) { return t[e]; }) .join("") ) return !1; var r = {}; return ( "abcdefghijklmnopqrst".split("").forEach(function (e) { r[e] = e; }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, r)).join("") ); } catch (e) { return !1; } })() ? Object.assign : function (e, i) { for ( var o, a, s = (function (e) { if (null == e) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(e); })(e), u = 1; u < arguments.length; u++ ) { for (var l in (o = Object(arguments[u]))) n.call(o, l) && (s[l] = o[l]); if (t) { a = t(o); for (var c = 0; c < a.length; c++) r.call(o, a[c]) && (s[a[c]] = o[a[c]]); } } return s; }; }, 99500: (e, t, n) => { var r = "function" == typeof Map && Map.prototype, i = Object.getOwnPropertyDescriptor && r ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, o = r && i && "function" == typeof i.get ? i.get : null, a = r && Map.prototype.forEach, s = "function" == typeof Set && Set.prototype, u = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, l = s && u && "function" == typeof u.get ? u.get : null, c = s && Set.prototype.forEach, d = "function" == typeof WeakMap && WeakMap.prototype ? WeakMap.prototype.has : null, h = "function" == typeof WeakSet && WeakSet.prototype ? WeakSet.prototype.has : null, p = "function" == typeof WeakRef && WeakRef.prototype ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, _ = Object.prototype.toString, g = Function.prototype.toString, m = String.prototype.match, v = String.prototype.slice, y = String.prototype.replace, C = String.prototype.toUpperCase, b = String.prototype.toLowerCase, w = RegExp.prototype.test, S = Array.prototype.concat, T = Array.prototype.join, x = Array.prototype.slice, E = Math.floor, L = "function" == typeof BigInt ? BigInt.prototype.valueOf : null, A = Object.getOwnPropertySymbols, I = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol.prototype.toString : null, M = "function" == typeof Symbol && "object" == typeof Symbol.iterator, P = "function" == typeof Symbol && Symbol.toStringTag && (typeof Symbol.toStringTag === M || "symbol") ? Symbol.toStringTag : null, O = Object.prototype.propertyIsEnumerable, k = ("function" == typeof Reflect ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function (e) { return e.__proto__; } : null); function R(e, t) { if (e === 1 / 0 || e === -1 / 0 || e != e || (e && e > -1e3 && e < 1e3) || w.call(/e/, t)) return t; var n = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if ("number" == typeof e) { var r = e < 0 ? -E(-e) : E(e); if (r !== e) { var i = String(r), o = v.call(t, i.length + 1); return y.call(i, n, "$&_") + "." + y.call(y.call(o, /([0-9]{3})/g, "$&_"), /_$/, ""); } } return y.call(t, n, "$&_"); } var D = n(53260), N = D.custom, B = H(N) ? N : null; function F(e, t, n) { var r = "double" === (n.quoteStyle || t) ? '"' : "'"; return r + e + r; } function U(e) { return y.call(String(e), /"/g, """); } function j(e) { return !("[object Array]" !== z(e) || (P && "object" == typeof e && P in e)); } function G(e) { return !("[object RegExp]" !== z(e) || (P && "object" == typeof e && P in e)); } function H(e) { if (M) return e && "object" == typeof e && e instanceof Symbol; if ("symbol" == typeof e) return !0; if (!e || "object" != typeof e || !I) return !1; try { return I.call(e), !0; } catch (e) {} return !1; } e.exports = function e(t, n, r, i) { var s = n || {}; if (Z(s, "quoteStyle") && "single" !== s.quoteStyle && "double" !== s.quoteStyle) throw new TypeError('option "quoteStyle" must be "single" or "double"'); if (Z(s, "maxStringLength") && ("number" == typeof s.maxStringLength ? s.maxStringLength < 0 && s.maxStringLength !== 1 / 0 : null !== s.maxStringLength)) throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); var u = !Z(s, "customInspect") || s.customInspect; if ("boolean" != typeof u && "symbol" !== u) throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); if (Z(s, "indent") && null !== s.indent && "\t" !== s.indent && !(parseInt(s.indent, 10) === s.indent && s.indent > 0)) throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); if (Z(s, "numericSeparator") && "boolean" != typeof s.numericSeparator) throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); var _ = s.numericSeparator; if (void 0 === t) return "undefined"; if (null === t) return "null"; if ("boolean" == typeof t) return t ? "true" : "false"; if ("string" == typeof t) return W(t, s); if ("number" == typeof t) { if (0 === t) return 1 / 0 / t > 0 ? "0" : "-0"; var C = String(t); return _ ? R(t, C) : C; } if ("bigint" == typeof t) { var w = String(t) + "n"; return _ ? R(t, w) : w; } var E = void 0 === s.depth ? 5 : s.depth; if ((void 0 === r && (r = 0), r >= E && E > 0 && "object" == typeof t)) return j(t) ? "[Array]" : "[Object]"; var A = (function (e, t) { var n; if ("\t" === e.indent) n = "\t"; else { if (!("number" == typeof e.indent && e.indent > 0)) return null; n = T.call(Array(e.indent + 1), " "); } return { base: n, prev: T.call(Array(t + 1), n) }; })(s, r); if (void 0 === i) i = []; else if (Y(i, t) >= 0) return "[Circular]"; function N(t, n, o) { if ((n && (i = x.call(i)).push(n), o)) { var a = { depth: s.depth }; return Z(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, i); } return e(t, s, r + 1, i); } if ("function" == typeof t && !G(t)) { var V = (function (e) { if (e.name) return e.name; var t = m.call(g.call(e), /^function\s*([\w$]+)/); if (t) return t[1]; return null; })(t), X = Q(t, N); return "[Function" + (V ? ": " + V : " (anonymous)") + "]" + (X.length > 0 ? " { " + T.call(X, ", ") + " }" : ""); } if (H(t)) { var ee = M ? y.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : I.call(t); return "object" != typeof t || M ? ee : q(ee); } if ( (function (e) { if (!e || "object" != typeof e) return !1; if ("undefined" != typeof HTMLElement && e instanceof HTMLElement) return !0; return "string" == typeof e.nodeName && "function" == typeof e.getAttribute; })(t) ) { for (var te = "<" + b.call(String(t.nodeName)), ne = t.attributes || [], re = 0; re < ne.length; re++) te += " " + ne[re].name + "=" + F(U(ne[re].value), "double", s); return (te += ">"), t.childNodes && t.childNodes.length && (te += "..."), (te += ""); } if (j(t)) { if (0 === t.length) return "[]"; var ie = Q(t, N); return A && !(function (e) { for (var t = 0; t < e.length; t++) if (Y(e[t], "\n") >= 0) return !1; return !0; })(ie) ? "[" + J(ie, A) + "]" : "[ " + T.call(ie, ", ") + " ]"; } if ( (function (e) { return !("[object Error]" !== z(e) || (P && "object" == typeof e && P in e)); })(t) ) { var oe = Q(t, N); return "cause" in Error.prototype || !("cause" in t) || O.call(t, "cause") ? (0 === oe.length ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + T.call(oe, ", ") + " }") : "{ [" + String(t) + "] " + T.call(S.call("[cause]: " + N(t.cause), oe), ", ") + " }"; } if ("object" == typeof t && u) { if (B && "function" == typeof t[B] && D) return D(t, { depth: E - r }); if ("symbol" !== u && "function" == typeof t.inspect) return t.inspect(); } if ( (function (e) { if (!o || !e || "object" != typeof e) return !1; try { o.call(e); try { l.call(e); } catch (e) { return !0; } return e instanceof Map; } catch (e) {} return !1; })(t) ) { var ae = []; return ( a && a.call(t, function (e, n) { ae.push(N(n, t, !0) + " => " + N(e, t)); }), $("Map", o.call(t), ae, A) ); } if ( (function (e) { if (!l || !e || "object" != typeof e) return !1; try { l.call(e); try { o.call(e); } catch (e) { return !0; } return e instanceof Set; } catch (e) {} return !1; })(t) ) { var se = []; return ( c && c.call(t, function (e) { se.push(N(e, t)); }), $("Set", l.call(t), se, A) ); } if ( (function (e) { if (!d || !e || "object" != typeof e) return !1; try { d.call(e, d); try { h.call(e, h); } catch (e) { return !0; } return e instanceof WeakMap; } catch (e) {} return !1; })(t) ) return K("WeakMap"); if ( (function (e) { if (!h || !e || "object" != typeof e) return !1; try { h.call(e, h); try { d.call(e, d); } catch (e) { return !0; } return e instanceof WeakSet; } catch (e) {} return !1; })(t) ) return K("WeakSet"); if ( (function (e) { if (!p || !e || "object" != typeof e) return !1; try { return p.call(e), !0; } catch (e) {} return !1; })(t) ) return K("WeakRef"); if ( (function (e) { return !("[object Number]" !== z(e) || (P && "object" == typeof e && P in e)); })(t) ) return q(N(Number(t))); if ( (function (e) { if (!e || "object" != typeof e || !L) return !1; try { return L.call(e), !0; } catch (e) {} return !1; })(t) ) return q(N(L.call(t))); if ( (function (e) { return !("[object Boolean]" !== z(e) || (P && "object" == typeof e && P in e)); })(t) ) return q(f.call(t)); if ( (function (e) { return !("[object String]" !== z(e) || (P && "object" == typeof e && P in e)); })(t) ) return q(N(String(t))); if ( !(function (e) { return !("[object Date]" !== z(e) || (P && "object" == typeof e && P in e)); })(t) && !G(t) ) { var ue = Q(t, N), le = k ? k(t) === Object.prototype : t instanceof Object || t.constructor === Object, ce = t instanceof Object ? "" : "null prototype", de = !le && P && Object(t) === t && P in t ? v.call(z(t), 8, -1) : ce ? "Object" : "", he = (le || "function" != typeof t.constructor ? "" : t.constructor.name ? t.constructor.name + " " : "") + (de || ce ? "[" + T.call(S.call([], de || [], ce || []), ": ") + "] " : ""); return 0 === ue.length ? he + "{}" : A ? he + "{" + J(ue, A) + "}" : he + "{ " + T.call(ue, ", ") + " }"; } return String(t); }; var V = Object.prototype.hasOwnProperty || function (e) { return e in this; }; function Z(e, t) { return V.call(e, t); } function z(e) { return _.call(e); } function Y(e, t) { if (e.indexOf) return e.indexOf(t); for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; return -1; } function W(e, t) { if (e.length > t.maxStringLength) { var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : ""); return W(v.call(e, 0, t.maxStringLength), t) + r; } return F(y.call(y.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, X), "single", t); } function X(e) { var t = e.charCodeAt(0), n = { 8: "b", 9: "t", 10: "n", 12: "f", 13: "r" }[t]; return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + C.call(t.toString(16)); } function q(e) { return "Object(" + e + ")"; } function K(e) { return e + " { ? }"; } function $(e, t, n, r) { return e + " (" + t + ") {" + (r ? J(n, r) : T.call(n, ", ")) + "}"; } function J(e, t) { if (0 === e.length) return ""; var n = "\n" + t.prev + t.base; return n + T.call(e, "," + n) + "\n" + t.prev; } function Q(e, t) { var n = j(e), r = []; if (n) { r.length = e.length; for (var i = 0; i < e.length; i++) r[i] = Z(e, i) ? t(e[i], e) : ""; } var o, a = "function" == typeof A ? A(e) : []; if (M) { o = {}; for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s]; } for (var u in e) Z(e, u) && ((n && String(Number(u)) === u && u < e.length) || (M && o["$" + u] instanceof Symbol) || (w.call(/[^\w$]/, u) ? r.push(t(u, e) + ": " + t(e[u], e)) : r.push(u + ": " + t(e[u], e)))); if ("function" == typeof A) for (var l = 0; l < a.length; l++) O.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e)); return r; } }, 7281: (e) => { "use strict"; e.exports = (e, t = {}) => { if (!e) return; const n = { key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], q: { name: "queryKey", parser: /(?:^|&)([^&=]*)=?([^&]*)/g }, parser: { strict: /^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/ } }, r = n.parser[t.strictMode ? "strict" : "loose"].exec(e), i = {}; let o = 14; for (; o--; ) i[n.key[o]] = r[o] || ""; return ( (i[n.q.name] = {}), i[n.key[12]].replace(n.q.parser, function (e, t, r) { t && (i[n.q.name][t] = r); }), i ); }; }, 940: (e, t, n) => { "use strict"; n.r(t), n.d(t, { ALPHA_MODES: () => j, AbstractBatchRenderer: () => kr, AbstractRenderer: () => xr, AccessibilityManager: () => _t, AnimatedSprite: () => Qa, AppLoaderPlugin: () => gi, Application: () => jr, Attribute: () => nn, BLEND_MODES: () => O, BUFFER_BITS: () => P, BasePrepare: () => Lo, BaseRenderTexture: () => qt, BaseTexture: () => Dt, BatchDrawCall: () => Mr, BatchGeometry: () => Dr, BatchPluginFactory: () => Fr, BatchRenderer: () => Ur, BatchShaderGenerator: () => Rr, BatchTextureArray: () => Pr, BitmapFont: () => ia, BitmapFontData: () => $o, BitmapFontLoader: () => ua, BitmapText: () => sa, Bounds: () => ot, Buffer: () => on, CLEAR_MODES: () => G, CanvasExtract: () => ws, CanvasGraphicsRenderer: () => ms, CanvasMeshRenderer: () => fs, CanvasPrepare: () => xs, CanvasRenderer: () => ds, CanvasSpriteRenderer: () => Cs, Circle: () => Ve, Container: () => dt, CountLimiter: () => yo, DEG_TO_RAD: () => Ge, DRAW_MODES: () => k, DisplayObject: () => ut, ENV: () => I, Ellipse: () => Ze, Extract: () => Vr, FORMATS: () => R, FillStyle: () => xi, Filter: () => tr, FilterState: () => gn, Framebuffer: () => Xt, GC_MODES: () => H, GLFramebuffer: () => wn, GLProgram: () => _r, GLTexture: () => br, GRAPHICS_CURVES: () => Ti, Geometry: () => dn, Graphics: () => eo, GraphicsData: () => Wi, GraphicsGeometry: () => Ki, IGLUniformData: () => fr, InteractionData: () => yt, InteractionEvent: () => bt, InteractionManager: () => Et, InteractionTrackingData: () => wt, LINE_CAP: () => Ci, LINE_JOIN: () => yi, LineStyle: () => $i, Loader: () => _i, LoaderResource: () => hi, MASK_TYPES: () => Z, MIPMAP_MODES: () => U, MSAA_QUALITY: () => z, MaskData: () => An, Matrix: () => qe, Mesh: () => Wo, MeshBatchUvs: () => Zo, MeshGeometry: () => qo, MeshMaterial: () => Xo, NineSlicePlane: () => $a, ObjectRenderer: () => vn, ObservablePoint: () => Xe, PI_2: () => Ue, PRECISION: () => V, ParticleContainer: () => bi, ParticleRenderer: () => Si, PlaneGeometry: () => Ya, Point: () => We, Polygon: () => ze, Prepare: () => Po, Program: () => Jn, Quad: () => hn, QuadUv: () => pn, RAD_TO_DEG: () => je, RENDERER_TYPE: () => M, Rectangle: () => He, RenderTexture: () => en, RenderTexturePool: () => tn, Renderer: () => Er, RopeGeometry: () => Wa, RoundedRectangle: () => Ye, Runner: () => Lt, SCALE_MODES: () => B, SHAPES: () => Fe, Shader: () => Qn, SimpleMesh: () => Ka, SimplePlane: () => qa, SimpleRope: () => Xa, Sprite: () => oo, SpriteMaskFilter: () => ir, Spritesheet: () => ko, SpritesheetLoader: () => Ro, State: () => er, System: () => Yt, TARGETS: () => D, TEXT_GRADIENT: () => no, TYPES: () => N, TemporaryDisplayObject: () => lt, Text: () => mo, TextMetrics: () => fo, TextStyle: () => lo, Texture: () => Jt, TextureLoader: () => fi, TextureMatrix: () => rr, TextureUvs: () => Kt, Ticker: () => mt, TickerPlugin: () => vt, TilingSprite: () => Fo, TilingSpriteRenderer: () => Go, TimeLimiter: () => Oo, Transform: () => it, UPDATE_PRIORITY: () => pt, UniformGroup: () => _n, VERSION: () => is, ViewableBuffer: () => Or, WRAP_MODES: () => F, accessibleTarget: () => ht, autoDetectRenderer: () => Lr, canvasUtils: () => hs, checkMaxIfStatementsInShader: () => qn, defaultFilterVertex: () => Ir, defaultVertex: () => Ar, filters: () => os, graphicsUtils: () => Yi, groupD8: () => rt, interactiveTarget: () => Tt, isMobile: () => A, resources: () => zt, settings: () => Y, systems: () => Sr, uniformParsers: () => Vn, useDeprecated: () => rs, utils: () => r }); var r = {}; n.r(r), n.d(r, { BaseTextureCache: () => Ae, CanvasRenderTarget: () => Pe, DATA_URI: () => Re, EventEmitter: () => X(), ProgramCache: () => Ee, TextureCache: () => Le, clearTextureCache: () => Me, correctBlendMode: () => le, createIndicesForQuads: () => pe, decomposeDataUri: () => De, deprecation: () => xe, destroyTextureCache: () => Ie, determineCrossOrigin: () => Ne, earcut: () => K(), getBufferType: () => fe, getResolutionOfUrl: () => Be, hex2rgb: () => ie, hex2string: () => oe, interleaveTypedArrays: () => ge, isMobile: () => A, isPow2: () => ve, isWebGLSupported: () => re, log2: () => ye, nextPow2: () => me, premultiplyBlendMode: () => ue, premultiplyRgba: () => ce, premultiplyTint: () => de, premultiplyTintToRgba: () => he, removeItems: () => Ce, rgb2hex: () => se, sayHello: () => ne, sign: () => be, skipHello: () => te, string2hex: () => ae, trimCanvas: () => Oe, uid: () => Se, url: () => $ }); var i = n(79706), o = n(37320), a = n.n(o); window.Promise || (window.Promise = i.Polyfill), Object.assign || (Object.assign = a()); if ( ((Date.now && Date.prototype.getTime) || (Date.now = function () { return new Date().getTime(); }), !window.performance || !window.performance.now) ) { var s = Date.now(); window.performance || (window.performance = {}), (window.performance.now = function () { return Date.now() - s; }); } for (var u = Date.now(), l = ["ms", "moz", "webkit", "o"], c = 0; c < l.length && !window.requestAnimationFrame; ++c) { var d = l[c]; (window.requestAnimationFrame = window[d + "RequestAnimationFrame"]), (window.cancelAnimationFrame = window[d + "CancelAnimationFrame"] || window[d + "CancelRequestAnimationFrame"]); } window.requestAnimationFrame || (window.requestAnimationFrame = function (e) { if ("function" != typeof e) throw new TypeError(e + "is not a function"); var t = Date.now(), n = 16 + u - t; return ( n < 0 && (n = 0), (u = t), window.setTimeout(function () { (u = Date.now()), e(performance.now()); }, n) ); }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (e) { return clearTimeout(e); }), Math.sign || (Math.sign = function (e) { return 0 === (e = Number(e)) || isNaN(e) ? e : e > 0 ? 1 : -1; }), Number.isInteger || (Number.isInteger = function (e) { return "number" == typeof e && isFinite(e) && Math.floor(e) === e; }), window.ArrayBuffer || (window.ArrayBuffer = Array), window.Float32Array || (window.Float32Array = Array), window.Uint32Array || (window.Uint32Array = Array), window.Uint16Array || (window.Uint16Array = Array), window.Uint8Array || (window.Uint8Array = Array), window.Int32Array || (window.Int32Array = Array); var h = /iPhone/i, p = /iPod/i, f = /iPad/i, _ = /\biOS-universal(?:.+)Mac\b/i, g = /\bAndroid(?:.+)Mobile\b/i, m = /Android/i, v = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, y = /Silk/i, C = /Windows Phone/i, b = /\bWindows(?:.+)ARM\b/i, w = /BlackBerry/i, S = /BB10/i, T = /Opera Mini/i, x = /\b(CriOS|Chrome)(?:.+)Mobile/i, E = /Mobile(?:.+)Firefox\b/i, L = function (e) { return void 0 !== e && "MacIntel" === e.platform && "number" == typeof e.maxTouchPoints && e.maxTouchPoints > 1 && "undefined" == typeof MSStream; }; var A = (function (e) { var t = { userAgent: "", platform: "", maxTouchPoints: 0 }; e || "undefined" == typeof navigator ? ("string" == typeof e ? (t.userAgent = e) : e && e.userAgent && (t = { userAgent: e.userAgent, platform: e.platform, maxTouchPoints: e.maxTouchPoints || 0 })) : (t = { userAgent: navigator.userAgent, platform: navigator.platform, maxTouchPoints: navigator.maxTouchPoints || 0 }); var n = t.userAgent, r = n.split("[FBAN"); void 0 !== r[1] && (n = r[0]), void 0 !== (r = n.split("Twitter"))[1] && (n = r[0]); var i = (function (e) { return function (t) { return t.test(e); }; })(n), o = { apple: { phone: i(h) && !i(C), ipod: i(p), tablet: !i(h) && (i(f) || L(t)) && !i(C), universal: i(_), device: (i(h) || i(p) || i(f) || i(_) || L(t)) && !i(C) }, amazon: { phone: i(v), tablet: !i(v) && i(y), device: i(v) || i(y) }, android: { phone: (!i(C) && i(v)) || (!i(C) && i(g)), tablet: !i(C) && !i(v) && !i(g) && (i(y) || i(m)), device: (!i(C) && (i(v) || i(y) || i(g) || i(m))) || i(/\bokhttp\b/i) }, windows: { phone: i(C), tablet: i(b), device: i(C) || i(b) }, other: { blackberry: i(w), blackberry10: i(S), opera: i(T), firefox: i(E), chrome: i(x), device: i(w) || i(S) || i(T) || i(E) || i(x) }, any: !1, phone: !1, tablet: !1 }; return (o.any = o.apple.device || o.android.device || o.windows.device || o.other.device), (o.phone = o.apple.phone || o.android.phone || o.windows.phone), (o.tablet = o.apple.tablet || o.android.tablet || o.windows.tablet), o; })(window.navigator); var I, M, P, O, k, R, D, N, B, F, U, j, G, H, V, Z, z, Y = { MIPMAP_TEXTURES: 1, ANISOTROPIC_LEVEL: 0, RESOLUTION: 1, FILTER_RESOLUTION: 1, SPRITE_MAX_TEXTURES: (function (e) { var t = !0; if (A.tablet || A.phone) { var n; if (A.apple.device) if ((n = navigator.userAgent.match(/OS (\d+)_(\d+)?/))) parseInt(n[1], 10) < 11 && (t = !1); if (A.android.device) if ((n = navigator.userAgent.match(/Android\s([0-9.]*)/))) parseInt(n[1], 10) < 7 && (t = !1); } return t ? e : 4; })(32), SPRITE_BATCH_SIZE: 4096, RENDER_OPTIONS: { view: null, antialias: !1, autoDensity: !1, transparent: !1, backgroundColor: 0, clearBeforeRender: !0, preserveDrawingBuffer: !1, width: 800, height: 600, legacy: !1 }, GC_MODE: 0, GC_MAX_IDLE: 3600, GC_MAX_CHECK_COUNT: 600, WRAP_MODE: 33071, SCALE_MODE: 1, PRECISION_VERTEX: "highp", PRECISION_FRAGMENT: A.apple.device ? "highp" : "mediump", CAN_UPLOAD_SAME_BUFFER: !A.apple.device, CREATE_IMAGE_BITMAP: !1, ROUND_PIXELS: !1, }, W = n(29805), X = n.n(W), q = n(29502), K = n.n(q), $ = n(883); !(function (e) { (e[(e.WEBGL_LEGACY = 0)] = "WEBGL_LEGACY"), (e[(e.WEBGL = 1)] = "WEBGL"), (e[(e.WEBGL2 = 2)] = "WEBGL2"); })(I || (I = {})), (function (e) { (e[(e.UNKNOWN = 0)] = "UNKNOWN"), (e[(e.WEBGL = 1)] = "WEBGL"), (e[(e.CANVAS = 2)] = "CANVAS"); })(M || (M = {})), (function (e) { (e[(e.COLOR = 16384)] = "COLOR"), (e[(e.DEPTH = 256)] = "DEPTH"), (e[(e.STENCIL = 1024)] = "STENCIL"); })(P || (P = {})), (function (e) { (e[(e.NORMAL = 0)] = "NORMAL"), (e[(e.ADD = 1)] = "ADD"), (e[(e.MULTIPLY = 2)] = "MULTIPLY"), (e[(e.SCREEN = 3)] = "SCREEN"), (e[(e.OVERLAY = 4)] = "OVERLAY"), (e[(e.DARKEN = 5)] = "DARKEN"), (e[(e.LIGHTEN = 6)] = "LIGHTEN"), (e[(e.COLOR_DODGE = 7)] = "COLOR_DODGE"), (e[(e.COLOR_BURN = 8)] = "COLOR_BURN"), (e[(e.HARD_LIGHT = 9)] = "HARD_LIGHT"), (e[(e.SOFT_LIGHT = 10)] = "SOFT_LIGHT"), (e[(e.DIFFERENCE = 11)] = "DIFFERENCE"), (e[(e.EXCLUSION = 12)] = "EXCLUSION"), (e[(e.HUE = 13)] = "HUE"), (e[(e.SATURATION = 14)] = "SATURATION"), (e[(e.COLOR = 15)] = "COLOR"), (e[(e.LUMINOSITY = 16)] = "LUMINOSITY"), (e[(e.NORMAL_NPM = 17)] = "NORMAL_NPM"), (e[(e.ADD_NPM = 18)] = "ADD_NPM"), (e[(e.SCREEN_NPM = 19)] = "SCREEN_NPM"), (e[(e.NONE = 20)] = "NONE"), (e[(e.SRC_OVER = 0)] = "SRC_OVER"), (e[(e.SRC_IN = 21)] = "SRC_IN"), (e[(e.SRC_OUT = 22)] = "SRC_OUT"), (e[(e.SRC_ATOP = 23)] = "SRC_ATOP"), (e[(e.DST_OVER = 24)] = "DST_OVER"), (e[(e.DST_IN = 25)] = "DST_IN"), (e[(e.DST_OUT = 26)] = "DST_OUT"), (e[(e.DST_ATOP = 27)] = "DST_ATOP"), (e[(e.ERASE = 26)] = "ERASE"), (e[(e.SUBTRACT = 28)] = "SUBTRACT"), (e[(e.XOR = 29)] = "XOR"); })(O || (O = {})), (function (e) { (e[(e.POINTS = 0)] = "POINTS"), (e[(e.LINES = 1)] = "LINES"), (e[(e.LINE_LOOP = 2)] = "LINE_LOOP"), (e[(e.LINE_STRIP = 3)] = "LINE_STRIP"), (e[(e.TRIANGLES = 4)] = "TRIANGLES"), (e[(e.TRIANGLE_STRIP = 5)] = "TRIANGLE_STRIP"), (e[(e.TRIANGLE_FAN = 6)] = "TRIANGLE_FAN"); })(k || (k = {})), (function (e) { (e[(e.RGBA = 6408)] = "RGBA"), (e[(e.RGB = 6407)] = "RGB"), (e[(e.ALPHA = 6406)] = "ALPHA"), (e[(e.LUMINANCE = 6409)] = "LUMINANCE"), (e[(e.LUMINANCE_ALPHA = 6410)] = "LUMINANCE_ALPHA"), (e[(e.DEPTH_COMPONENT = 6402)] = "DEPTH_COMPONENT"), (e[(e.DEPTH_STENCIL = 34041)] = "DEPTH_STENCIL"); })(R || (R = {})), (function (e) { (e[(e.TEXTURE_2D = 3553)] = "TEXTURE_2D"), (e[(e.TEXTURE_CUBE_MAP = 34067)] = "TEXTURE_CUBE_MAP"), (e[(e.TEXTURE_2D_ARRAY = 35866)] = "TEXTURE_2D_ARRAY"), (e[(e.TEXTURE_CUBE_MAP_POSITIVE_X = 34069)] = "TEXTURE_CUBE_MAP_POSITIVE_X"), (e[(e.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070)] = "TEXTURE_CUBE_MAP_NEGATIVE_X"), (e[(e.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071)] = "TEXTURE_CUBE_MAP_POSITIVE_Y"), (e[(e.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072)] = "TEXTURE_CUBE_MAP_NEGATIVE_Y"), (e[(e.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073)] = "TEXTURE_CUBE_MAP_POSITIVE_Z"), (e[(e.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074)] = "TEXTURE_CUBE_MAP_NEGATIVE_Z"); })(D || (D = {})), (function (e) { (e[(e.UNSIGNED_BYTE = 5121)] = "UNSIGNED_BYTE"), (e[(e.UNSIGNED_SHORT = 5123)] = "UNSIGNED_SHORT"), (e[(e.UNSIGNED_SHORT_5_6_5 = 33635)] = "UNSIGNED_SHORT_5_6_5"), (e[(e.UNSIGNED_SHORT_4_4_4_4 = 32819)] = "UNSIGNED_SHORT_4_4_4_4"), (e[(e.UNSIGNED_SHORT_5_5_5_1 = 32820)] = "UNSIGNED_SHORT_5_5_5_1"), (e[(e.FLOAT = 5126)] = "FLOAT"), (e[(e.HALF_FLOAT = 36193)] = "HALF_FLOAT"); })(N || (N = {})), (function (e) { (e[(e.NEAREST = 0)] = "NEAREST"), (e[(e.LINEAR = 1)] = "LINEAR"); })(B || (B = {})), (function (e) { (e[(e.CLAMP = 33071)] = "CLAMP"), (e[(e.REPEAT = 10497)] = "REPEAT"), (e[(e.MIRRORED_REPEAT = 33648)] = "MIRRORED_REPEAT"); })(F || (F = {})), (function (e) { (e[(e.OFF = 0)] = "OFF"), (e[(e.POW2 = 1)] = "POW2"), (e[(e.ON = 2)] = "ON"); })(U || (U = {})), (function (e) { (e[(e.NPM = 0)] = "NPM"), (e[(e.UNPACK = 1)] = "UNPACK"), (e[(e.PMA = 2)] = "PMA"), (e[(e.NO_PREMULTIPLIED_ALPHA = 0)] = "NO_PREMULTIPLIED_ALPHA"), (e[(e.PREMULTIPLY_ON_UPLOAD = 1)] = "PREMULTIPLY_ON_UPLOAD"), (e[(e.PREMULTIPLY_ALPHA = 2)] = "PREMULTIPLY_ALPHA"); })(j || (j = {})), (function (e) { (e[(e.NO = 0)] = "NO"), (e[(e.YES = 1)] = "YES"), (e[(e.AUTO = 2)] = "AUTO"), (e[(e.BLEND = 0)] = "BLEND"), (e[(e.CLEAR = 1)] = "CLEAR"), (e[(e.BLIT = 2)] = "BLIT"); })(G || (G = {})), (function (e) { (e[(e.AUTO = 0)] = "AUTO"), (e[(e.MANUAL = 1)] = "MANUAL"); })(H || (H = {})), (function (e) { (e.LOW = "lowp"), (e.MEDIUM = "mediump"), (e.HIGH = "highp"); })(V || (V = {})), (function (e) { (e[(e.NONE = 0)] = "NONE"), (e[(e.SCISSOR = 1)] = "SCISSOR"), (e[(e.STENCIL = 2)] = "STENCIL"), (e[(e.SPRITE = 3)] = "SPRITE"); })(Z || (Z = {})), (function (e) { (e[(e.NONE = 0)] = "NONE"), (e[(e.LOW = 2)] = "LOW"), (e[(e.MEDIUM = 4)] = "MEDIUM"), (e[(e.HIGH = 8)] = "HIGH"); })(z || (z = {})), (Y.RETINA_PREFIX = /@([0-9\.]+)x/), (Y.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !0); var J, Q = !1, ee = "5.3.12"; function te() { Q = !0; } function ne(e) { var t; if (!Q) { if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) { var n = ["\n %c %c %c PixiJS " + ee + " - ✰ " + e + " ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n", "background: #ff66a5; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff66a5; background: #030307; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "background: #ffc3dc; padding:5px 0;", "background: #ff66a5; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;", "color: #ff2424; background: #fff; padding:5px 0;"]; (t = window.console).log.apply(t, n); } else window.console && window.console.log("PixiJS " + ee + " - " + e + " - http://www.pixijs.com/"); Q = !0; } } function re() { return ( void 0 === J && (J = (function () { var e = { stencil: !0, failIfMajorPerformanceCaveat: Y.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT }; try { if (!window.WebGLRenderingContext) return !1; var t = document.createElement("canvas"), n = t.getContext("webgl", e) || t.getContext("experimental-webgl", e), r = !(!n || !n.getContextAttributes().stencil); if (n) { var i = n.getExtension("WEBGL_lose_context"); i && i.loseContext(); } return (n = null), r; } catch (e) { return !1; } })()), J ); } function ie(e, t) { return void 0 === t && (t = []), (t[0] = ((e >> 16) & 255) / 255), (t[1] = ((e >> 8) & 255) / 255), (t[2] = (255 & e) / 255), t; } function oe(e) { var t = e.toString(16); return "#" + (t = "000000".substr(0, 6 - t.length) + t); } function ae(e) { return "string" == typeof e && "#" === e[0] && (e = e.substr(1)), parseInt(e, 16); } function se(e) { return ((255 * e[0]) << 16) + ((255 * e[1]) << 8) + ((255 * e[2]) | 0); } var ue = (function () { for (var e = [], t = [], n = 0; n < 32; n++) (e[n] = n), (t[n] = n); (e[O.NORMAL_NPM] = O.NORMAL), (e[O.ADD_NPM] = O.ADD), (e[O.SCREEN_NPM] = O.SCREEN), (t[O.NORMAL] = O.NORMAL_NPM), (t[O.ADD] = O.ADD_NPM), (t[O.SCREEN] = O.SCREEN_NPM); var r = []; return r.push(t), r.push(e), r; })(); function le(e, t) { return ue[t ? 1 : 0][e]; } function ce(e, t, n, r) { return (n = n || new Float32Array(4)), r || void 0 === r ? ((n[0] = e[0] * t), (n[1] = e[1] * t), (n[2] = e[2] * t)) : ((n[0] = e[0]), (n[1] = e[1]), (n[2] = e[2])), (n[3] = t), n; } function de(e, t) { if (1 === t) return ((255 * t) << 24) + e; if (0 === t) return 0; var n = (e >> 16) & 255, r = (e >> 8) & 255, i = 255 & e; return ((255 * t) << 24) + ((n = (n * t + 0.5) | 0) << 16) + ((r = (r * t + 0.5) | 0) << 8) + (i = (i * t + 0.5) | 0); } function he(e, t, n, r) { return ((n = n || new Float32Array(4))[0] = ((e >> 16) & 255) / 255), (n[1] = ((e >> 8) & 255) / 255), (n[2] = (255 & e) / 255), (r || void 0 === r) && ((n[0] *= t), (n[1] *= t), (n[2] *= t)), (n[3] = t), n; } function pe(e, t) { void 0 === t && (t = null); var n = 6 * e; if ((t = t || new Uint16Array(n)).length !== n) throw new Error("Out buffer length is incorrect, got " + t.length + " and expected " + n); for (var r = 0, i = 0; r < n; r += 6, i += 4) (t[r + 0] = i + 0), (t[r + 1] = i + 1), (t[r + 2] = i + 2), (t[r + 3] = i + 0), (t[r + 4] = i + 2), (t[r + 5] = i + 3); return t; } function fe(e) { if (4 === e.BYTES_PER_ELEMENT) return e instanceof Float32Array ? "Float32Array" : e instanceof Uint32Array ? "Uint32Array" : "Int32Array"; if (2 === e.BYTES_PER_ELEMENT) { if (e instanceof Uint16Array) return "Uint16Array"; } else if (1 === e.BYTES_PER_ELEMENT && e instanceof Uint8Array) return "Uint8Array"; return null; } var _e = { Float32Array, Uint32Array, Int32Array, Uint8Array }; function ge(e, t) { for (var n = 0, r = 0, i = {}, o = 0; o < e.length; o++) (r += t[o]), (n += e[o].length); var a = new ArrayBuffer(4 * n), s = null, u = 0; for (o = 0; o < e.length; o++) { var l = t[o], c = e[o], d = fe(c); i[d] || (i[d] = new _e[d](a)), (s = i[d]); for (var h = 0; h < c.length; h++) { s[((h / l) | 0) * r + u + (h % l)] = c[h]; } u += l; } return new Float32Array(a); } function me(e) { return (e += 0 === e ? 1 : 0), --e, (e |= e >>> 1), (e |= e >>> 2), (e |= e >>> 4), (e |= e >>> 8), (e |= e >>> 16) + 1; } function ve(e) { return !(e & (e - 1) || !e); } function ye(e) { var t = (e > 65535 ? 1 : 0) << 4, n = ((e >>>= t) > 255 ? 1 : 0) << 3; return (t |= n), (t |= n = ((e >>>= n) > 15 ? 1 : 0) << 2), (t |= n = ((e >>>= n) > 3 ? 1 : 0) << 1) | ((e >>>= n) >> 1); } function Ce(e, t, n) { var r, i = e.length; if (!(t >= i || 0 === n)) { var o = i - (n = t + n > i ? i - t : n); for (r = t; r < o; ++r) e[r] = e[r + n]; e.length = o; } } function be(e) { return 0 === e ? 0 : e < 0 ? -1 : 1; } var we = 0; function Se() { return ++we; } var Te = {}; function xe(e, t, n) { if ((void 0 === n && (n = 3), !Te[t])) { var r = new Error().stack; void 0 === r ? console.warn("PixiJS Deprecation Warning: ", t + "\nDeprecated since v" + e) : ((r = r.split("\n").splice(n).join("\n")), console.groupCollapsed ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", t + "\nDeprecated since v" + e), console.warn(r), console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", t + "\nDeprecated since v" + e), console.warn(r))), (Te[t] = !0); } } var Ee = {}, Le = Object.create(null), Ae = Object.create(null); function Ie() { var e; for (e in Le) Le[e].destroy(); for (e in Ae) Ae[e].destroy(); } function Me() { var e; for (e in Le) delete Le[e]; for (e in Ae) delete Ae[e]; } var Pe = (function () { function e(e, t, n) { (this.canvas = document.createElement("canvas")), (this.context = this.canvas.getContext("2d")), (this.resolution = n || Y.RESOLUTION), this.resize(e, t); } return ( (e.prototype.clear = function () { this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); }), (e.prototype.resize = function (e, t) { (this.canvas.width = e * this.resolution), (this.canvas.height = t * this.resolution); }), (e.prototype.destroy = function () { (this.context = null), (this.canvas = null); }), Object.defineProperty(e.prototype, "width", { get: function () { return this.canvas.width; }, set: function (e) { this.canvas.width = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "height", { get: function () { return this.canvas.height; }, set: function (e) { this.canvas.height = e; }, enumerable: !1, configurable: !0, }), e ); })(); function Oe(e) { var t, n, r, i = e.width, o = e.height, a = e.getContext("2d"), s = a.getImageData(0, 0, i, o).data, u = s.length, l = { top: null, left: null, right: null, bottom: null }, c = null; for (t = 0; t < u; t += 4) 0 !== s[t + 3] && ((n = (t / 4) % i), (r = ~~(t / 4 / i)), null === l.top && (l.top = r), (null === l.left || n < l.left) && (l.left = n), (null === l.right || l.right < n) && (l.right = n + 1), (null === l.bottom || l.bottom < r) && (l.bottom = r)); return null !== l.top && ((i = l.right - l.left), (o = l.bottom - l.top + 1), (c = a.getImageData(l.left, l.top, i, o))), { height: o, width: i, data: c }; } var ke, Re = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i; function De(e) { var t = Re.exec(e); if (t) return { mediaType: t[1] ? t[1].toLowerCase() : void 0, subType: t[2] ? t[2].toLowerCase() : void 0, charset: t[3] ? t[3].toLowerCase() : void 0, encoding: t[4] ? t[4].toLowerCase() : void 0, data: t[5] }; } function Ne(e, t) { if ((void 0 === t && (t = window.location), 0 === e.indexOf("data:"))) return ""; (t = t || window.location), ke || (ke = document.createElement("a")), (ke.href = e); var n = (0, $.parse)(ke.href), r = (!n.port && "" === t.port) || n.port === t.port; return n.hostname === t.hostname && r && n.protocol === t.protocol ? "" : "anonymous"; } function Be(e, t) { var n = Y.RETINA_PREFIX.exec(e); return n ? parseFloat(n[1]) : void 0 !== t ? t : 1; } var Fe, Ue = 2 * Math.PI, je = 180 / Math.PI, Ge = Math.PI / 180; !(function (e) { (e[(e.POLY = 0)] = "POLY"), (e[(e.RECT = 1)] = "RECT"), (e[(e.CIRC = 2)] = "CIRC"), (e[(e.ELIP = 3)] = "ELIP"), (e[(e.RREC = 4)] = "RREC"); })(Fe || (Fe = {})); var He = (function () { function e(e, t, n, r) { void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === r && (r = 0), (this.x = Number(e)), (this.y = Number(t)), (this.width = Number(n)), (this.height = Number(r)), (this.type = Fe.RECT); } return ( Object.defineProperty(e.prototype, "left", { get: function () { return this.x; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "right", { get: function () { return this.x + this.width; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "top", { get: function () { return this.y; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "bottom", { get: function () { return this.y + this.height; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e, "EMPTY", { get: function () { return new e(0, 0, 0, 0); }, enumerable: !1, configurable: !0, }), (e.prototype.clone = function () { return new e(this.x, this.y, this.width, this.height); }), (e.prototype.copyFrom = function (e) { return (this.x = e.x), (this.y = e.y), (this.width = e.width), (this.height = e.height), this; }), (e.prototype.copyTo = function (e) { return (e.x = this.x), (e.y = this.y), (e.width = this.width), (e.height = this.height), e; }), (e.prototype.contains = function (e, t) { return !(this.width <= 0 || this.height <= 0) && e >= this.x && e < this.x + this.width && t >= this.y && t < this.y + this.height; }), (e.prototype.pad = function (e, t) { return void 0 === e && (e = 0), void 0 === t && (t = e), (this.x -= e), (this.y -= t), (this.width += 2 * e), (this.height += 2 * t), this; }), (e.prototype.fit = function (e) { var t = Math.max(this.x, e.x), n = Math.min(this.x + this.width, e.x + e.width), r = Math.max(this.y, e.y), i = Math.min(this.y + this.height, e.y + e.height); return (this.x = t), (this.width = Math.max(n - t, 0)), (this.y = r), (this.height = Math.max(i - r, 0)), this; }), (e.prototype.ceil = function (e, t) { void 0 === e && (e = 1), void 0 === t && (t = 0.001); var n = Math.ceil((this.x + this.width - t) * e) / e, r = Math.ceil((this.y + this.height - t) * e) / e; return (this.x = Math.floor((this.x + t) * e) / e), (this.y = Math.floor((this.y + t) * e) / e), (this.width = n - this.x), (this.height = r - this.y), this; }), (e.prototype.enlarge = function (e) { var t = Math.min(this.x, e.x), n = Math.max(this.x + this.width, e.x + e.width), r = Math.min(this.y, e.y), i = Math.max(this.y + this.height, e.y + e.height); return (this.x = t), (this.width = n - t), (this.y = r), (this.height = i - r), this; }), e ); })(), Ve = (function () { function e(e, t, n) { void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), (this.x = e), (this.y = t), (this.radius = n), (this.type = Fe.CIRC); } return ( (e.prototype.clone = function () { return new e(this.x, this.y, this.radius); }), (e.prototype.contains = function (e, t) { if (this.radius <= 0) return !1; var n = this.radius * this.radius, r = this.x - e, i = this.y - t; return (r *= r) + (i *= i) <= n; }), (e.prototype.getBounds = function () { return new He(this.x - this.radius, this.y - this.radius, 2 * this.radius, 2 * this.radius); }), e ); })(), Ze = (function () { function e(e, t, n, r) { void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === r && (r = 0), (this.x = e), (this.y = t), (this.width = n), (this.height = r), (this.type = Fe.ELIP); } return ( (e.prototype.clone = function () { return new e(this.x, this.y, this.width, this.height); }), (e.prototype.contains = function (e, t) { if (this.width <= 0 || this.height <= 0) return !1; var n = (e - this.x) / this.width, r = (t - this.y) / this.height; return (n *= n) + (r *= r) <= 1; }), (e.prototype.getBounds = function () { return new He(this.x - this.width, this.y - this.height, this.width, this.height); }), e ); })(), ze = (function () { function e() { for (var e = arguments, t = [], n = 0; n < arguments.length; n++) t[n] = e[n]; var r = Array.isArray(t[0]) ? t[0] : t; if ("number" != typeof r[0]) { for (var i = [], o = 0, a = r.length; o < a; o++) i.push(r[o].x, r[o].y); r = i; } (this.points = r), (this.type = Fe.POLY), (this.closeStroke = !0); } return ( (e.prototype.clone = function () { var t = new e(this.points.slice()); return (t.closeStroke = this.closeStroke), t; }), (e.prototype.contains = function (e, t) { for (var n = !1, r = this.points.length / 2, i = 0, o = r - 1; i < r; o = i++) { var a = this.points[2 * i], s = this.points[2 * i + 1], u = this.points[2 * o], l = this.points[2 * o + 1]; s > t != l > t && e < ((t - s) / (l - s)) * (u - a) + a && (n = !n); } return n; }), e ); })(), Ye = (function () { function e(e, t, n, r, i) { void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === r && (r = 0), void 0 === i && (i = 20), (this.x = e), (this.y = t), (this.width = n), (this.height = r), (this.radius = i), (this.type = Fe.RREC); } return ( (e.prototype.clone = function () { return new e(this.x, this.y, this.width, this.height, this.radius); }), (e.prototype.contains = function (e, t) { if (this.width <= 0 || this.height <= 0) return !1; if (e >= this.x && e <= this.x + this.width && t >= this.y && t <= this.y + this.height) { if ((t >= this.y + this.radius && t <= this.y + this.height - this.radius) || (e >= this.x + this.radius && e <= this.x + this.width - this.radius)) return !0; var n = e - (this.x + this.radius), r = t - (this.y + this.radius), i = this.radius * this.radius; if (n * n + r * r <= i) return !0; if ((n = e - (this.x + this.width - this.radius)) * n + r * r <= i) return !0; if (n * n + (r = t - (this.y + this.height - this.radius)) * r <= i) return !0; if ((n = e - (this.x + this.radius)) * n + r * r <= i) return !0; } return !1; }), e ); })(), We = (function () { function e(e, t) { void 0 === e && (e = 0), void 0 === t && (t = 0), (this.x = e), (this.y = t); } return ( (e.prototype.clone = function () { return new e(this.x, this.y); }), (e.prototype.copyFrom = function (e) { return this.set(e.x, e.y), this; }), (e.prototype.copyTo = function (e) { return e.set(this.x, this.y), e; }), (e.prototype.equals = function (e) { return e.x === this.x && e.y === this.y; }), (e.prototype.set = function (e, t) { return void 0 === e && (e = 0), void 0 === t && (t = e), (this.x = e), (this.y = t), this; }), e ); })(), Xe = (function () { function e(e, t, n, r) { void 0 === n && (n = 0), void 0 === r && (r = 0), (this._x = n), (this._y = r), (this.cb = e), (this.scope = t); } return ( (e.prototype.clone = function (t, n) { return void 0 === t && (t = this.cb), void 0 === n && (n = this.scope), new e(t, n, this._x, this._y); }), (e.prototype.set = function (e, t) { return void 0 === e && (e = 0), void 0 === t && (t = e), (this._x === e && this._y === t) || ((this._x = e), (this._y = t), this.cb.call(this.scope)), this; }), (e.prototype.copyFrom = function (e) { return (this._x === e.x && this._y === e.y) || ((this._x = e.x), (this._y = e.y), this.cb.call(this.scope)), this; }), (e.prototype.copyTo = function (e) { return e.set(this._x, this._y), e; }), (e.prototype.equals = function (e) { return e.x === this._x && e.y === this._y; }), Object.defineProperty(e.prototype, "x", { get: function () { return this._x; }, set: function (e) { this._x !== e && ((this._x = e), this.cb.call(this.scope)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "y", { get: function () { return this._y; }, set: function (e) { this._y !== e && ((this._y = e), this.cb.call(this.scope)); }, enumerable: !1, configurable: !0, }), e ); })(), qe = (function () { function e(e, t, n, r, i, o) { void 0 === e && (e = 1), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === r && (r = 1), void 0 === i && (i = 0), void 0 === o && (o = 0), (this.array = null), (this.a = e), (this.b = t), (this.c = n), (this.d = r), (this.tx = i), (this.ty = o); } return ( (e.prototype.fromArray = function (e) { (this.a = e[0]), (this.b = e[1]), (this.c = e[3]), (this.d = e[4]), (this.tx = e[2]), (this.ty = e[5]); }), (e.prototype.set = function (e, t, n, r, i, o) { return (this.a = e), (this.b = t), (this.c = n), (this.d = r), (this.tx = i), (this.ty = o), this; }), (e.prototype.toArray = function (e, t) { this.array || (this.array = new Float32Array(9)); var n = t || this.array; return e ? ((n[0] = this.a), (n[1] = this.b), (n[2] = 0), (n[3] = this.c), (n[4] = this.d), (n[5] = 0), (n[6] = this.tx), (n[7] = this.ty), (n[8] = 1)) : ((n[0] = this.a), (n[1] = this.c), (n[2] = this.tx), (n[3] = this.b), (n[4] = this.d), (n[5] = this.ty), (n[6] = 0), (n[7] = 0), (n[8] = 1)), n; }), (e.prototype.apply = function (e, t) { t = t || new We(); var n = e.x, r = e.y; return (t.x = this.a * n + this.c * r + this.tx), (t.y = this.b * n + this.d * r + this.ty), t; }), (e.prototype.applyInverse = function (e, t) { t = t || new We(); var n = 1 / (this.a * this.d + this.c * -this.b), r = e.x, i = e.y; return (t.x = this.d * n * r + -this.c * n * i + (this.ty * this.c - this.tx * this.d) * n), (t.y = this.a * n * i + -this.b * n * r + (-this.ty * this.a + this.tx * this.b) * n), t; }), (e.prototype.translate = function (e, t) { return (this.tx += e), (this.ty += t), this; }), (e.prototype.scale = function (e, t) { return (this.a *= e), (this.d *= t), (this.c *= e), (this.b *= t), (this.tx *= e), (this.ty *= t), this; }), (e.prototype.rotate = function (e) { var t = Math.cos(e), n = Math.sin(e), r = this.a, i = this.c, o = this.tx; return (this.a = r * t - this.b * n), (this.b = r * n + this.b * t), (this.c = i * t - this.d * n), (this.d = i * n + this.d * t), (this.tx = o * t - this.ty * n), (this.ty = o * n + this.ty * t), this; }), (e.prototype.append = function (e) { var t = this.a, n = this.b, r = this.c, i = this.d; return (this.a = e.a * t + e.b * r), (this.b = e.a * n + e.b * i), (this.c = e.c * t + e.d * r), (this.d = e.c * n + e.d * i), (this.tx = e.tx * t + e.ty * r + this.tx), (this.ty = e.tx * n + e.ty * i + this.ty), this; }), (e.prototype.setTransform = function (e, t, n, r, i, o, a, s, u) { return (this.a = Math.cos(a + u) * i), (this.b = Math.sin(a + u) * i), (this.c = -Math.sin(a - s) * o), (this.d = Math.cos(a - s) * o), (this.tx = e - (n * this.a + r * this.c)), (this.ty = t - (n * this.b + r * this.d)), this; }), (e.prototype.prepend = function (e) { var t = this.tx; if (1 !== e.a || 0 !== e.b || 0 !== e.c || 1 !== e.d) { var n = this.a, r = this.c; (this.a = n * e.a + this.b * e.c), (this.b = n * e.b + this.b * e.d), (this.c = r * e.a + this.d * e.c), (this.d = r * e.b + this.d * e.d); } return (this.tx = t * e.a + this.ty * e.c + e.tx), (this.ty = t * e.b + this.ty * e.d + e.ty), this; }), (e.prototype.decompose = function (e) { var t = this.a, n = this.b, r = this.c, i = this.d, o = -Math.atan2(-r, i), a = Math.atan2(n, t), s = Math.abs(o + a); return s < 1e-5 || Math.abs(Ue - s) < 1e-5 ? ((e.rotation = a), (e.skew.x = e.skew.y = 0)) : ((e.rotation = 0), (e.skew.x = o), (e.skew.y = a)), (e.scale.x = Math.sqrt(t * t + n * n)), (e.scale.y = Math.sqrt(r * r + i * i)), (e.position.x = this.tx), (e.position.y = this.ty), e; }), (e.prototype.invert = function () { var e = this.a, t = this.b, n = this.c, r = this.d, i = this.tx, o = e * r - t * n; return (this.a = r / o), (this.b = -t / o), (this.c = -n / o), (this.d = e / o), (this.tx = (n * this.ty - r * i) / o), (this.ty = -(e * this.ty - t * i) / o), this; }), (e.prototype.identity = function () { return (this.a = 1), (this.b = 0), (this.c = 0), (this.d = 1), (this.tx = 0), (this.ty = 0), this; }), (e.prototype.clone = function () { var t = new e(); return (t.a = this.a), (t.b = this.b), (t.c = this.c), (t.d = this.d), (t.tx = this.tx), (t.ty = this.ty), t; }), (e.prototype.copyTo = function (e) { return (e.a = this.a), (e.b = this.b), (e.c = this.c), (e.d = this.d), (e.tx = this.tx), (e.ty = this.ty), e; }), (e.prototype.copyFrom = function (e) { return (this.a = e.a), (this.b = e.b), (this.c = e.c), (this.d = e.d), (this.tx = e.tx), (this.ty = e.ty), this; }), Object.defineProperty(e, "IDENTITY", { get: function () { return new e(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e, "TEMP_MATRIX", { get: function () { return new e(); }, enumerable: !1, configurable: !0, }), e ); })(), Ke = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], $e = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], Je = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Qe = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], et = [], tt = [], nt = Math.sign; !(function () { for (var e = 0; e < 16; e++) { var t = []; et.push(t); for (var n = 0; n < 16; n++) for (var r = nt(Ke[e] * Ke[n] + Je[e] * $e[n]), i = nt($e[e] * Ke[n] + Qe[e] * $e[n]), o = nt(Ke[e] * Je[n] + Je[e] * Qe[n]), a = nt($e[e] * Je[n] + Qe[e] * Qe[n]), s = 0; s < 16; s++) if (Ke[s] === r && $e[s] === i && Je[s] === o && Qe[s] === a) { t.push(s); break; } } for (e = 0; e < 16; e++) { var u = new qe(); u.set(Ke[e], $e[e], Je[e], Qe[e], 0, 0), tt.push(u); } })(); var rt = { E: 0, SE: 1, S: 2, SW: 3, W: 4, NW: 5, N: 6, NE: 7, MIRROR_VERTICAL: 8, MAIN_DIAGONAL: 10, MIRROR_HORIZONTAL: 12, REVERSE_DIAGONAL: 14, uX: function (e) { return Ke[e]; }, uY: function (e) { return $e[e]; }, vX: function (e) { return Je[e]; }, vY: function (e) { return Qe[e]; }, inv: function (e) { return 8 & e ? 15 & e : 7 & -e; }, add: function (e, t) { return et[e][t]; }, sub: function (e, t) { return et[e][rt.inv(t)]; }, rotate180: function (e) { return 4 ^ e; }, isVertical: function (e) { return 2 == (3 & e); }, byDirection: function (e, t) { return 2 * Math.abs(e) <= Math.abs(t) ? (t >= 0 ? rt.S : rt.N) : 2 * Math.abs(t) <= Math.abs(e) ? (e > 0 ? rt.E : rt.W) : t > 0 ? (e > 0 ? rt.SE : rt.SW) : e > 0 ? rt.NE : rt.NW; }, matrixAppendRotationInv: function (e, t, n, r) { void 0 === n && (n = 0), void 0 === r && (r = 0); var i = tt[rt.inv(t)]; (i.tx = n), (i.ty = r), e.append(i); }, }, it = (function () { function e() { (this.worldTransform = new qe()), (this.localTransform = new qe()), (this.position = new Xe(this.onChange, this, 0, 0)), (this.scale = new Xe(this.onChange, this, 1, 1)), (this.pivot = new Xe(this.onChange, this, 0, 0)), (this.skew = new Xe(this.updateSkew, this, 0, 0)), (this._rotation = 0), (this._cx = 1), (this._sx = 0), (this._cy = 0), (this._sy = 1), (this._localID = 0), (this._currentLocalID = 0), (this._worldID = 0), (this._parentID = 0); } return ( (e.prototype.onChange = function () { this._localID++; }), (e.prototype.updateSkew = function () { (this._cx = Math.cos(this._rotation + this.skew.y)), (this._sx = Math.sin(this._rotation + this.skew.y)), (this._cy = -Math.sin(this._rotation - this.skew.x)), (this._sy = Math.cos(this._rotation - this.skew.x)), this._localID++; }), (e.prototype.updateLocalTransform = function () { var e = this.localTransform; this._localID !== this._currentLocalID && ((e.a = this._cx * this.scale.x), (e.b = this._sx * this.scale.x), (e.c = this._cy * this.scale.y), (e.d = this._sy * this.scale.y), (e.tx = this.position.x - (this.pivot.x * e.a + this.pivot.y * e.c)), (e.ty = this.position.y - (this.pivot.x * e.b + this.pivot.y * e.d)), (this._currentLocalID = this._localID), (this._parentID = -1)); }), (e.prototype.updateTransform = function (e) { var t = this.localTransform; if ((this._localID !== this._currentLocalID && ((t.a = this._cx * this.scale.x), (t.b = this._sx * this.scale.x), (t.c = this._cy * this.scale.y), (t.d = this._sy * this.scale.y), (t.tx = this.position.x - (this.pivot.x * t.a + this.pivot.y * t.c)), (t.ty = this.position.y - (this.pivot.x * t.b + this.pivot.y * t.d)), (this._currentLocalID = this._localID), (this._parentID = -1)), this._parentID !== e._worldID)) { var n = e.worldTransform, r = this.worldTransform; (r.a = t.a * n.a + t.b * n.c), (r.b = t.a * n.b + t.b * n.d), (r.c = t.c * n.a + t.d * n.c), (r.d = t.c * n.b + t.d * n.d), (r.tx = t.tx * n.a + t.ty * n.c + n.tx), (r.ty = t.tx * n.b + t.ty * n.d + n.ty), (this._parentID = e._worldID), this._worldID++; } }), (e.prototype.setFromMatrix = function (e) { e.decompose(this), this._localID++; }), Object.defineProperty(e.prototype, "rotation", { get: function () { return this._rotation; }, set: function (e) { this._rotation !== e && ((this._rotation = e), this.updateSkew()); }, enumerable: !1, configurable: !0, }), (e.IDENTITY = new e()), e ); })(); Y.SORTABLE_CHILDREN = !1; var ot = (function () { function e() { (this.minX = 1 / 0), (this.minY = 1 / 0), (this.maxX = -1 / 0), (this.maxY = -1 / 0), (this.rect = null), (this.updateID = -1); } return ( (e.prototype.isEmpty = function () { return this.minX > this.maxX || this.minY > this.maxY; }), (e.prototype.clear = function () { (this.minX = 1 / 0), (this.minY = 1 / 0), (this.maxX = -1 / 0), (this.maxY = -1 / 0); }), (e.prototype.getRectangle = function (e) { return this.minX > this.maxX || this.minY > this.maxY ? He.EMPTY : (((e = e || new He(0, 0, 1, 1)).x = this.minX), (e.y = this.minY), (e.width = this.maxX - this.minX), (e.height = this.maxY - this.minY), e); }), (e.prototype.addPoint = function (e) { (this.minX = Math.min(this.minX, e.x)), (this.maxX = Math.max(this.maxX, e.x)), (this.minY = Math.min(this.minY, e.y)), (this.maxY = Math.max(this.maxY, e.y)); }), (e.prototype.addQuad = function (e) { var t = this.minX, n = this.minY, r = this.maxX, i = this.maxY, o = e[0], a = e[1]; (t = o < t ? o : t), (n = a < n ? a : n), (r = o > r ? o : r), (i = a > i ? a : i), (t = (o = e[2]) < t ? o : t), (n = (a = e[3]) < n ? a : n), (r = o > r ? o : r), (i = a > i ? a : i), (t = (o = e[4]) < t ? o : t), (n = (a = e[5]) < n ? a : n), (r = o > r ? o : r), (i = a > i ? a : i), (t = (o = e[6]) < t ? o : t), (n = (a = e[7]) < n ? a : n), (r = o > r ? o : r), (i = a > i ? a : i), (this.minX = t), (this.minY = n), (this.maxX = r), (this.maxY = i); }), (e.prototype.addFrame = function (e, t, n, r, i) { this.addFrameMatrix(e.worldTransform, t, n, r, i); }), (e.prototype.addFrameMatrix = function (e, t, n, r, i) { var o = e.a, a = e.b, s = e.c, u = e.d, l = e.tx, c = e.ty, d = this.minX, h = this.minY, p = this.maxX, f = this.maxY, _ = o * t + s * n + l, g = a * t + u * n + c; (d = _ < d ? _ : d), (h = g < h ? g : h), (p = _ > p ? _ : p), (f = g > f ? g : f), (d = (_ = o * r + s * n + l) < d ? _ : d), (h = (g = a * r + u * n + c) < h ? g : h), (p = _ > p ? _ : p), (f = g > f ? g : f), (d = (_ = o * t + s * i + l) < d ? _ : d), (h = (g = a * t + u * i + c) < h ? g : h), (p = _ > p ? _ : p), (f = g > f ? g : f), (d = (_ = o * r + s * i + l) < d ? _ : d), (h = (g = a * r + u * i + c) < h ? g : h), (p = _ > p ? _ : p), (f = g > f ? g : f), (this.minX = d), (this.minY = h), (this.maxX = p), (this.maxY = f); }), (e.prototype.addVertexData = function (e, t, n) { for (var r = this.minX, i = this.minY, o = this.maxX, a = this.maxY, s = t; s < n; s += 2) { var u = e[s], l = e[s + 1]; (r = u < r ? u : r), (i = l < i ? l : i), (o = u > o ? u : o), (a = l > a ? l : a); } (this.minX = r), (this.minY = i), (this.maxX = o), (this.maxY = a); }), (e.prototype.addVertices = function (e, t, n, r) { this.addVerticesMatrix(e.worldTransform, t, n, r); }), (e.prototype.addVerticesMatrix = function (e, t, n, r, i, o) { void 0 === i && (i = 0), void 0 === o && (o = i); for (var a = e.a, s = e.b, u = e.c, l = e.d, c = e.tx, d = e.ty, h = this.minX, p = this.minY, f = this.maxX, _ = this.maxY, g = n; g < r; g += 2) { var m = t[g], v = t[g + 1], y = a * m + u * v + c, C = l * v + s * m + d; (h = Math.min(h, y - i)), (f = Math.max(f, y + i)), (p = Math.min(p, C - o)), (_ = Math.max(_, C + o)); } (this.minX = h), (this.minY = p), (this.maxX = f), (this.maxY = _); }), (e.prototype.addBounds = function (e) { var t = this.minX, n = this.minY, r = this.maxX, i = this.maxY; (this.minX = e.minX < t ? e.minX : t), (this.minY = e.minY < n ? e.minY : n), (this.maxX = e.maxX > r ? e.maxX : r), (this.maxY = e.maxY > i ? e.maxY : i); }), (e.prototype.addBoundsMask = function (e, t) { var n = e.minX > t.minX ? e.minX : t.minX, r = e.minY > t.minY ? e.minY : t.minY, i = e.maxX < t.maxX ? e.maxX : t.maxX, o = e.maxY < t.maxY ? e.maxY : t.maxY; if (n <= i && r <= o) { var a = this.minX, s = this.minY, u = this.maxX, l = this.maxY; (this.minX = n < a ? n : a), (this.minY = r < s ? r : s), (this.maxX = i > u ? i : u), (this.maxY = o > l ? o : l); } }), (e.prototype.addBoundsMatrix = function (e, t) { this.addFrameMatrix(t, e.minX, e.minY, e.maxX, e.maxY); }), (e.prototype.addBoundsArea = function (e, t) { var n = e.minX > t.x ? e.minX : t.x, r = e.minY > t.y ? e.minY : t.y, i = e.maxX < t.x + t.width ? e.maxX : t.x + t.width, o = e.maxY < t.y + t.height ? e.maxY : t.y + t.height; if (n <= i && r <= o) { var a = this.minX, s = this.minY, u = this.maxX, l = this.maxY; (this.minX = n < a ? n : a), (this.minY = r < s ? r : s), (this.maxX = i > u ? i : u), (this.maxY = o > l ? o : l); } }), (e.prototype.pad = function (e, t) { void 0 === e && (e = 0), void 0 === t && (t = e), this.isEmpty() || ((this.minX -= e), (this.maxX += e), (this.minY -= t), (this.maxY += t)); }), (e.prototype.addFramePad = function (e, t, n, r, i, o) { (e -= i), (t -= o), (n += i), (r += o), (this.minX = this.minX < e ? this.minX : e), (this.maxX = this.maxX > n ? this.maxX : n), (this.minY = this.minY < t ? this.minY : t), (this.maxY = this.maxY > r ? this.maxY : r); }), e ); })(), at = function (e, t) { return ( (at = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), at(e, t) ); }; function st(e, t) { function n() { this.constructor = e; } at(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var ut = (function (e) { function t() { var t = e.call(this) || this; return (t.tempDisplayObjectParent = null), (t.transform = new it()), (t.alpha = 1), (t.visible = !0), (t.renderable = !0), (t.parent = null), (t.worldAlpha = 1), (t._lastSortedIndex = 0), (t._zIndex = 0), (t.filterArea = null), (t.filters = null), (t._enabledFilters = null), (t._bounds = new ot()), (t._localBounds = null), (t._boundsID = 0), (t._boundsRect = null), (t._localBoundsRect = null), (t._mask = null), (t._destroyed = !1), (t.isSprite = !1), (t.isMask = !1), t; } return ( st(t, e), (t.mixin = function (e) { for (var n = Object.keys(e), r = 0; r < n.length; ++r) { var i = n[r]; Object.defineProperty(t.prototype, i, Object.getOwnPropertyDescriptor(e, i)); } }), (t.prototype._recursivePostUpdateTransform = function () { this.parent ? (this.parent._recursivePostUpdateTransform(), this.transform.updateTransform(this.parent.transform)) : this.transform.updateTransform(this._tempDisplayObjectParent.transform); }), (t.prototype.updateTransform = function () { this._boundsID++, this.transform.updateTransform(this.parent.transform), (this.worldAlpha = this.alpha * this.parent.worldAlpha); }), (t.prototype.getBounds = function (e, t) { return e || (this.parent ? (this._recursivePostUpdateTransform(), this.updateTransform()) : ((this.parent = this._tempDisplayObjectParent), this.updateTransform(), (this.parent = null))), this._bounds.updateID !== this._boundsID && (this.calculateBounds(), (this._bounds.updateID = this._boundsID)), t || (this._boundsRect || (this._boundsRect = new He()), (t = this._boundsRect)), this._bounds.getRectangle(t); }), (t.prototype.getLocalBounds = function (e) { e || (this._localBoundsRect || (this._localBoundsRect = new He()), (e = this._localBoundsRect)), this._localBounds || (this._localBounds = new ot()); var t = this.transform, n = this.parent; (this.parent = null), (this.transform = this._tempDisplayObjectParent.transform); var r = this._bounds, i = this._boundsID; this._bounds = this._localBounds; var o = this.getBounds(!1, e); return (this.parent = n), (this.transform = t), (this._bounds = r), (this._bounds.updateID += this._boundsID - i), o; }), (t.prototype.toGlobal = function (e, t, n) { return void 0 === n && (n = !1), n || (this._recursivePostUpdateTransform(), this.parent ? this.displayObjectUpdateTransform() : ((this.parent = this._tempDisplayObjectParent), this.displayObjectUpdateTransform(), (this.parent = null))), this.worldTransform.apply(e, t); }), (t.prototype.toLocal = function (e, t, n, r) { return t && (e = t.toGlobal(e, n, r)), r || (this._recursivePostUpdateTransform(), this.parent ? this.displayObjectUpdateTransform() : ((this.parent = this._tempDisplayObjectParent), this.displayObjectUpdateTransform(), (this.parent = null))), this.worldTransform.applyInverse(e, n); }), (t.prototype.setParent = function (e) { if (!e || !e.addChild) throw new Error("setParent: Argument must be a Container"); return e.addChild(this), e; }), (t.prototype.setTransform = function (e, t, n, r, i, o, a, s, u) { return void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 1), void 0 === r && (r = 1), void 0 === i && (i = 0), void 0 === o && (o = 0), void 0 === a && (a = 0), void 0 === s && (s = 0), void 0 === u && (u = 0), (this.position.x = e), (this.position.y = t), (this.scale.x = n || 1), (this.scale.y = r || 1), (this.rotation = i), (this.skew.x = o), (this.skew.y = a), (this.pivot.x = s), (this.pivot.y = u), this; }), (t.prototype.destroy = function (e) { this.parent && this.parent.removeChild(this), this.removeAllListeners(), (this.transform = null), (this.parent = null), (this._bounds = null), (this._mask = null), (this.filters = null), (this.filterArea = null), (this.hitArea = null), (this.interactive = !1), (this.interactiveChildren = !1), (this._destroyed = !0); }), Object.defineProperty(t.prototype, "_tempDisplayObjectParent", { get: function () { return null === this.tempDisplayObjectParent && (this.tempDisplayObjectParent = new lt()), this.tempDisplayObjectParent; }, enumerable: !1, configurable: !0, }), (t.prototype.enableTempParent = function () { var e = this.parent; return (this.parent = this._tempDisplayObjectParent), e; }), (t.prototype.disableTempParent = function (e) { this.parent = e; }), Object.defineProperty(t.prototype, "x", { get: function () { return this.position.x; }, set: function (e) { this.transform.position.x = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "y", { get: function () { return this.position.y; }, set: function (e) { this.transform.position.y = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "worldTransform", { get: function () { return this.transform.worldTransform; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "localTransform", { get: function () { return this.transform.localTransform; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "position", { get: function () { return this.transform.position; }, set: function (e) { this.transform.position.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "scale", { get: function () { return this.transform.scale; }, set: function (e) { this.transform.scale.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "pivot", { get: function () { return this.transform.pivot; }, set: function (e) { this.transform.pivot.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "skew", { get: function () { return this.transform.skew; }, set: function (e) { this.transform.skew.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "rotation", { get: function () { return this.transform.rotation; }, set: function (e) { this.transform.rotation = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "angle", { get: function () { return this.transform.rotation * je; }, set: function (e) { this.transform.rotation = e * Ge; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "zIndex", { get: function () { return this._zIndex; }, set: function (e) { (this._zIndex = e), this.parent && (this.parent.sortDirty = !0); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "worldVisible", { get: function () { var e = this; do { if (!e.visible) return !1; e = e.parent; } while (e); return !0; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "mask", { get: function () { return this._mask; }, set: function (e) { var t; this._mask && (((t = this._mask.maskObject || this._mask).renderable = !0), (t.isMask = !1)); ((this._mask = e), this._mask) && (((t = this._mask.maskObject || this._mask).renderable = !1), (t.isMask = !0)); }, enumerable: !1, configurable: !0, }), t ); })(X()), lt = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.sortDirty = null), t; } return st(t, e), t; })(ut); function ct(e, t) { return e.zIndex === t.zIndex ? e._lastSortedIndex - t._lastSortedIndex : e.zIndex - t.zIndex; } ut.prototype.displayObjectUpdateTransform = ut.prototype.updateTransform; var dt = (function (e) { function t() { var t = e.call(this) || this; return (t.children = []), (t.sortableChildren = Y.SORTABLE_CHILDREN), (t.sortDirty = !1), t; } return ( st(t, e), (t.prototype.onChildrenChange = function (e) {}), (t.prototype.addChild = function () { for (var e = arguments, t = [], n = 0; n < arguments.length; n++) t[n] = e[n]; if (t.length > 1) for (var r = 0; r < t.length; r++) this.addChild(t[r]); else { var i = t[0]; i.parent && i.parent.removeChild(i), (i.parent = this), (this.sortDirty = !0), (i.transform._parentID = -1), this.children.push(i), this._boundsID++, this.onChildrenChange(this.children.length - 1), this.emit("childAdded", i, this, this.children.length - 1), i.emit("added", this); } return t[0]; }), (t.prototype.addChildAt = function (e, t) { if (t < 0 || t > this.children.length) throw new Error(e + "addChildAt: The index " + t + " supplied is out of bounds " + this.children.length); return e.parent && e.parent.removeChild(e), (e.parent = this), (this.sortDirty = !0), (e.transform._parentID = -1), this.children.splice(t, 0, e), this._boundsID++, this.onChildrenChange(t), e.emit("added", this), this.emit("childAdded", e, this, t), e; }), (t.prototype.swapChildren = function (e, t) { if (e !== t) { var n = this.getChildIndex(e), r = this.getChildIndex(t); (this.children[n] = t), (this.children[r] = e), this.onChildrenChange(n < r ? n : r); } }), (t.prototype.getChildIndex = function (e) { var t = this.children.indexOf(e); if (-1 === t) throw new Error("The supplied DisplayObject must be a child of the caller"); return t; }), (t.prototype.setChildIndex = function (e, t) { if (t < 0 || t >= this.children.length) throw new Error("The index " + t + " supplied is out of bounds " + this.children.length); var n = this.getChildIndex(e); Ce(this.children, n, 1), this.children.splice(t, 0, e), this.onChildrenChange(t); }), (t.prototype.getChildAt = function (e) { if (e < 0 || e >= this.children.length) throw new Error("getChildAt: Index (" + e + ") does not exist."); return this.children[e]; }), (t.prototype.removeChild = function () { for (var e = arguments, t = [], n = 0; n < arguments.length; n++) t[n] = e[n]; if (t.length > 1) for (var r = 0; r < t.length; r++) this.removeChild(t[r]); else { var i = t[0], o = this.children.indexOf(i); if (-1 === o) return null; (i.parent = null), (i.transform._parentID = -1), Ce(this.children, o, 1), this._boundsID++, this.onChildrenChange(o), i.emit("removed", this), this.emit("childRemoved", i, this, o); } return t[0]; }), (t.prototype.removeChildAt = function (e) { var t = this.getChildAt(e); return (t.parent = null), (t.transform._parentID = -1), Ce(this.children, e, 1), this._boundsID++, this.onChildrenChange(e), t.emit("removed", this), this.emit("childRemoved", t, this, e), t; }), (t.prototype.removeChildren = function (e, t) { void 0 === e && (e = 0), void 0 === t && (t = this.children.length); var n, r = e, i = t - r; if (i > 0 && i <= t) { n = this.children.splice(r, i); for (var o = 0; o < n.length; ++o) (n[o].parent = null), n[o].transform && (n[o].transform._parentID = -1); this._boundsID++, this.onChildrenChange(e); for (o = 0; o < n.length; ++o) n[o].emit("removed", this), this.emit("childRemoved", n[o], this, o); return n; } if (0 === i && 0 === this.children.length) return []; throw new RangeError("removeChildren: numeric values are outside the acceptable range."); }), (t.prototype.sortChildren = function () { for (var e = !1, t = 0, n = this.children.length; t < n; ++t) { var r = this.children[t]; (r._lastSortedIndex = t), e || 0 === r.zIndex || (e = !0); } e && this.children.length > 1 && this.children.sort(ct), (this.sortDirty = !1); }), (t.prototype.updateTransform = function () { this.sortableChildren && this.sortDirty && this.sortChildren(), this._boundsID++, this.transform.updateTransform(this.parent.transform), (this.worldAlpha = this.alpha * this.parent.worldAlpha); for (var e = 0, t = this.children.length; e < t; ++e) { var n = this.children[e]; n.visible && n.updateTransform(); } }), (t.prototype.calculateBounds = function () { this._bounds.clear(), this._calculateBounds(); for (var e = 0; e < this.children.length; e++) { var t = this.children[e]; if (t.visible && t.renderable) if ((t.calculateBounds(), t._mask)) { var n = t._mask.maskObject || t._mask; n.calculateBounds(), this._bounds.addBoundsMask(t._bounds, n._bounds); } else t.filterArea ? this._bounds.addBoundsArea(t._bounds, t.filterArea) : this._bounds.addBounds(t._bounds); } this._bounds.updateID = this._boundsID; }), (t.prototype.getLocalBounds = function (t, n) { void 0 === n && (n = !1); var r = e.prototype.getLocalBounds.call(this, t); if (!n) for (var i = 0, o = this.children.length; i < o; ++i) { var a = this.children[i]; a.visible && a.updateTransform(); } return r; }), (t.prototype._calculateBounds = function () {}), (t.prototype.render = function (e) { if (this.visible && !(this.worldAlpha <= 0) && this.renderable) if (this._mask || (this.filters && this.filters.length)) this.renderAdvanced(e); else { this._render(e); for (var t = 0, n = this.children.length; t < n; ++t) this.children[t].render(e); } }), (t.prototype.renderAdvanced = function (e) { e.batch.flush(); var t = this.filters, n = this._mask; if (t) { this._enabledFilters || (this._enabledFilters = []), (this._enabledFilters.length = 0); for (var r = 0; r < t.length; r++) t[r].enabled && this._enabledFilters.push(t[r]); this._enabledFilters.length && e.filter.push(this, this._enabledFilters); } n && e.mask.push(this, this._mask), this._render(e); r = 0; for (var i = this.children.length; r < i; r++) this.children[r].render(e); e.batch.flush(), n && e.mask.pop(this), t && this._enabledFilters && this._enabledFilters.length && e.filter.pop(); }), (t.prototype._render = function (e) {}), (t.prototype.destroy = function (t) { e.prototype.destroy.call(this), (this.sortDirty = !1); var n = "boolean" == typeof t ? t : t && t.children, r = this.removeChildren(0, this.children.length); if (n) for (var i = 0; i < r.length; ++i) r[i].destroy(t); }), Object.defineProperty(t.prototype, "width", { get: function () { return this.scale.x * this.getLocalBounds().width; }, set: function (e) { var t = this.getLocalBounds().width; (this.scale.x = 0 !== t ? e / t : 1), (this._width = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return this.scale.y * this.getLocalBounds().height; }, set: function (e) { var t = this.getLocalBounds().height; (this.scale.y = 0 !== t ? e / t : 1), (this._height = e); }, enumerable: !1, configurable: !0, }), t ); })(ut); dt.prototype.containerUpdateTransform = dt.prototype.updateTransform; var ht = { accessible: !1, accessibleTitle: null, accessibleHint: null, tabIndex: 0, _accessibleActive: !1, _accessibleDiv: null, accessibleType: "button", accessiblePointerEvents: "auto", accessibleChildren: !0, renderId: -1 }; ut.mixin(ht); var pt, ft = 100, _t = (function () { function e(e) { (this._hookDiv = null), (A.tablet || A.phone) && this.createTouchHook(); var t = document.createElement("div"); (t.style.width = ft + "px"), (t.style.height = ft + "px"), (t.style.position = "absolute"), (t.style.top = "0px"), (t.style.left = "0px"), (t.style.zIndex = (2).toString()), (this.div = t), (this.pool = []), (this.renderId = 0), (this.debug = !1), (this.renderer = e), (this.children = []), (this._onKeyDown = this._onKeyDown.bind(this)), (this._onMouseMove = this._onMouseMove.bind(this)), (this._isActive = !1), (this._isMobileAccessibility = !1), (this.androidUpdateCount = 0), (this.androidUpdateFrequency = 500), window.addEventListener("keydown", this._onKeyDown, !1); } return ( Object.defineProperty(e.prototype, "isActive", { get: function () { return this._isActive; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isMobileAccessibility", { get: function () { return this._isMobileAccessibility; }, enumerable: !1, configurable: !0, }), (e.prototype.createTouchHook = function () { var e = this, t = document.createElement("button"); (t.style.width = "1px"), (t.style.height = "1px"), (t.style.position = "absolute"), (t.style.top = "-1000px"), (t.style.left = "-1000px"), (t.style.zIndex = (2).toString()), (t.style.backgroundColor = "#FF0000"), (t.title = "select to enable accessability for this content"), t.addEventListener("focus", function () { (e._isMobileAccessibility = !0), e.activate(), e.destroyTouchHook(); }), document.body.appendChild(t), (this._hookDiv = t); }), (e.prototype.destroyTouchHook = function () { this._hookDiv && (document.body.removeChild(this._hookDiv), (this._hookDiv = null)); }), (e.prototype.activate = function () { this._isActive || ((this._isActive = !0), window.document.addEventListener("mousemove", this._onMouseMove, !0), window.removeEventListener("keydown", this._onKeyDown, !1), this.renderer.on("postrender", this.update, this), this.renderer.view.parentNode && this.renderer.view.parentNode.appendChild(this.div)); }), (e.prototype.deactivate = function () { this._isActive && !this._isMobileAccessibility && ((this._isActive = !1), window.document.removeEventListener("mousemove", this._onMouseMove, !0), window.addEventListener("keydown", this._onKeyDown, !1), this.renderer.off("postrender", this.update), this.div.parentNode && this.div.parentNode.removeChild(this.div)); }), (e.prototype.updateAccessibleObjects = function (e) { if (e.visible && e.accessibleChildren) { e.accessible && e.interactive && (e._accessibleActive || this.addChild(e), (e.renderId = this.renderId)); for (var t = e.children, n = 0; n < t.length; n++) this.updateAccessibleObjects(t[n]); } }), (e.prototype.update = function () { var e = performance.now(); if (!(A.android.device && e < this.androidUpdateCount) && ((this.androidUpdateCount = e + this.androidUpdateFrequency), this.renderer.renderingToScreen)) { this.renderer._lastObjectRendered && this.updateAccessibleObjects(this.renderer._lastObjectRendered); var t = this.renderer.view.getBoundingClientRect(), n = this.renderer.resolution, r = (t.width / this.renderer.width) * n, i = (t.height / this.renderer.height) * n, o = this.div; (o.style.left = t.left + "px"), (o.style.top = t.top + "px"), (o.style.width = this.renderer.width + "px"), (o.style.height = this.renderer.height + "px"); for (var a = 0; a < this.children.length; a++) { var s = this.children[a]; if (s.renderId !== this.renderId) (s._accessibleActive = !1), Ce(this.children, a, 1), this.div.removeChild(s._accessibleDiv), this.pool.push(s._accessibleDiv), (s._accessibleDiv = null), a--; else { o = s._accessibleDiv; var u = s.hitArea, l = s.worldTransform; s.hitArea ? ((o.style.left = (l.tx + u.x * l.a) * r + "px"), (o.style.top = (l.ty + u.y * l.d) * i + "px"), (o.style.width = u.width * l.a * r + "px"), (o.style.height = u.height * l.d * i + "px")) : ((u = s.getBounds()), this.capHitArea(u), (o.style.left = u.x * r + "px"), (o.style.top = u.y * i + "px"), (o.style.width = u.width * r + "px"), (o.style.height = u.height * i + "px"), o.title !== s.accessibleTitle && null !== s.accessibleTitle && (o.title = s.accessibleTitle), o.getAttribute("aria-label") !== s.accessibleHint && null !== s.accessibleHint && o.setAttribute("aria-label", s.accessibleHint)), (s.accessibleTitle === o.title && s.tabIndex === o.tabIndex) || ((o.title = s.accessibleTitle), (o.tabIndex = s.tabIndex), this.debug && this.updateDebugHTML(o)); } } this.renderId++; } }), (e.prototype.updateDebugHTML = function (e) { e.innerHTML = "type: " + e.type + "
title : " + e.title + "
tabIndex: " + e.tabIndex; }), (e.prototype.capHitArea = function (e) { e.x < 0 && ((e.width += e.x), (e.x = 0)), e.y < 0 && ((e.height += e.y), (e.y = 0)), e.x + e.width > this.renderer.width && (e.width = this.renderer.width - e.x), e.y + e.height > this.renderer.height && (e.height = this.renderer.height - e.y); }), (e.prototype.addChild = function (e) { var t = this.pool.pop(); t || (((t = document.createElement("button")).style.width = ft + "px"), (t.style.height = ft + "px"), (t.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent"), (t.style.position = "absolute"), (t.style.zIndex = (2).toString()), (t.style.borderStyle = "none"), navigator.userAgent.toLowerCase().indexOf("chrome") > -1 ? t.setAttribute("aria-live", "off") : t.setAttribute("aria-live", "polite"), navigator.userAgent.match(/rv:.*Gecko\//) ? t.setAttribute("aria-relevant", "additions") : t.setAttribute("aria-relevant", "text"), t.addEventListener("click", this._onClick.bind(this)), t.addEventListener("focus", this._onFocus.bind(this)), t.addEventListener("focusout", this._onFocusOut.bind(this))), (t.style.pointerEvents = e.accessiblePointerEvents), (t.type = e.accessibleType), e.accessibleTitle && null !== e.accessibleTitle ? (t.title = e.accessibleTitle) : (e.accessibleHint && null !== e.accessibleHint) || (t.title = "displayObject " + e.tabIndex), e.accessibleHint && null !== e.accessibleHint && t.setAttribute("aria-label", e.accessibleHint), this.debug && this.updateDebugHTML(t), (e._accessibleActive = !0), (e._accessibleDiv = t), (t.displayObject = e), this.children.push(e), this.div.appendChild(e._accessibleDiv), (e._accessibleDiv.tabIndex = e.tabIndex); }), (e.prototype._onClick = function (e) { var t = this.renderer.plugins.interaction; t.dispatchEvent(e.target.displayObject, "click", t.eventData), t.dispatchEvent(e.target.displayObject, "pointertap", t.eventData), t.dispatchEvent(e.target.displayObject, "tap", t.eventData); }), (e.prototype._onFocus = function (e) { e.target.getAttribute("aria-live") || e.target.setAttribute("aria-live", "assertive"); var t = this.renderer.plugins.interaction; t.dispatchEvent(e.target.displayObject, "mouseover", t.eventData); }), (e.prototype._onFocusOut = function (e) { e.target.getAttribute("aria-live") || e.target.setAttribute("aria-live", "polite"); var t = this.renderer.plugins.interaction; t.dispatchEvent(e.target.displayObject, "mouseout", t.eventData); }), (e.prototype._onKeyDown = function (e) { 9 === e.keyCode && this.activate(); }), (e.prototype._onMouseMove = function (e) { (0 === e.movementX && 0 === e.movementY) || this.deactivate(); }), (e.prototype.destroy = function () { this.destroyTouchHook(), (this.div = null), window.document.removeEventListener("mousemove", this._onMouseMove, !0), window.removeEventListener("keydown", this._onKeyDown), (this.pool = null), (this.children = null), (this.renderer = null); }), e ); })(); (Y.TARGET_FPMS = 0.06), (function (e) { (e[(e.INTERACTION = 50)] = "INTERACTION"), (e[(e.HIGH = 25)] = "HIGH"), (e[(e.NORMAL = 0)] = "NORMAL"), (e[(e.LOW = -25)] = "LOW"), (e[(e.UTILITY = -50)] = "UTILITY"); })(pt || (pt = {})); var gt = (function () { function e(e, t, n, r) { void 0 === t && (t = null), void 0 === n && (n = 0), void 0 === r && (r = !1), (this.fn = e), (this.context = t), (this.priority = n), (this.once = r), (this.next = null), (this.previous = null), (this._destroyed = !1); } return ( (e.prototype.match = function (e, t) { return void 0 === t && (t = null), this.fn === e && this.context === t; }), (e.prototype.emit = function (e) { this.fn && (this.context ? this.fn.call(this.context, e) : this.fn(e)); var t = this.next; return this.once && this.destroy(!0), this._destroyed && (this.next = null), t; }), (e.prototype.connect = function (e) { (this.previous = e), e.next && (e.next.previous = this), (this.next = e.next), (e.next = this); }), (e.prototype.destroy = function (e) { void 0 === e && (e = !1), (this._destroyed = !0), (this.fn = null), (this.context = null), this.previous && (this.previous.next = this.next), this.next && (this.next.previous = this.previous); var t = this.next; return (this.next = e ? null : t), (this.previous = null), t; }), e ); })(), mt = (function () { function e() { var e = this; (this._head = new gt(null, null, 1 / 0)), (this._requestId = null), (this._maxElapsedMS = 100), (this._minElapsedMS = 0), (this.autoStart = !1), (this.deltaTime = 1), (this.deltaMS = 1 / Y.TARGET_FPMS), (this.elapsedMS = 1 / Y.TARGET_FPMS), (this.lastTime = -1), (this.speed = 1), (this.started = !1), (this._protected = !1), (this._lastFrame = -1), (this._tick = function (t) { (e._requestId = null), e.started && (e.update(t), e.started && null === e._requestId && e._head.next && (e._requestId = requestAnimationFrame(e._tick))); }); } return ( (e.prototype._requestIfNeeded = function () { null === this._requestId && this._head.next && ((this.lastTime = performance.now()), (this._lastFrame = this.lastTime), (this._requestId = requestAnimationFrame(this._tick))); }), (e.prototype._cancelIfNeeded = function () { null !== this._requestId && (cancelAnimationFrame(this._requestId), (this._requestId = null)); }), (e.prototype._startIfPossible = function () { this.started ? this._requestIfNeeded() : this.autoStart && this.start(); }), (e.prototype.add = function (e, t, n) { return void 0 === n && (n = pt.NORMAL), this._addListener(new gt(e, t, n)); }), (e.prototype.addOnce = function (e, t, n) { return void 0 === n && (n = pt.NORMAL), this._addListener(new gt(e, t, n, !0)); }), (e.prototype._addListener = function (e) { var t = this._head.next, n = this._head; if (t) { for (; t; ) { if (e.priority > t.priority) { e.connect(n); break; } (n = t), (t = t.next); } e.previous || e.connect(n); } else e.connect(n); return this._startIfPossible(), this; }), (e.prototype.remove = function (e, t) { for (var n = this._head.next; n; ) n = n.match(e, t) ? n.destroy() : n.next; return this._head.next || this._cancelIfNeeded(), this; }), Object.defineProperty(e.prototype, "count", { get: function () { if (!this._head) return 0; for (var e = 0, t = this._head; (t = t.next); ) e++; return e; }, enumerable: !1, configurable: !0, }), (e.prototype.start = function () { this.started || ((this.started = !0), this._requestIfNeeded()); }), (e.prototype.stop = function () { this.started && ((this.started = !1), this._cancelIfNeeded()); }), (e.prototype.destroy = function () { if (!this._protected) { this.stop(); for (var e = this._head.next; e; ) e = e.destroy(!0); this._head.destroy(), (this._head = null); } }), (e.prototype.update = function (e) { var t; if ((void 0 === e && (e = performance.now()), e > this.lastTime)) { if (((t = this.elapsedMS = e - this.lastTime) > this._maxElapsedMS && (t = this._maxElapsedMS), (t *= this.speed), this._minElapsedMS)) { var n = (e - this._lastFrame) | 0; if (n < this._minElapsedMS) return; this._lastFrame = e - (n % this._minElapsedMS); } (this.deltaMS = t), (this.deltaTime = this.deltaMS * Y.TARGET_FPMS); for (var r = this._head, i = r.next; i; ) i = i.emit(this.deltaTime); r.next || this._cancelIfNeeded(); } else this.deltaTime = this.deltaMS = this.elapsedMS = 0; this.lastTime = e; }), Object.defineProperty(e.prototype, "FPS", { get: function () { return 1e3 / this.elapsedMS; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "minFPS", { get: function () { return 1e3 / this._maxElapsedMS; }, set: function (e) { var t = Math.min(this.maxFPS, e), n = Math.min(Math.max(0, t) / 1e3, Y.TARGET_FPMS); this._maxElapsedMS = 1 / n; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "maxFPS", { get: function () { return this._minElapsedMS ? Math.round(1e3 / this._minElapsedMS) : 0; }, set: function (e) { if (0 === e) this._minElapsedMS = 0; else { var t = Math.max(this.minFPS, e); this._minElapsedMS = 1 / (t / 1e3); } }, enumerable: !1, configurable: !0, }), Object.defineProperty(e, "shared", { get: function () { if (!e._shared) { var t = (e._shared = new e()); (t.autoStart = !0), (t._protected = !0); } return e._shared; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e, "system", { get: function () { if (!e._system) { var t = (e._system = new e()); (t.autoStart = !0), (t._protected = !0); } return e._system; }, enumerable: !1, configurable: !0, }), e ); })(), vt = (function () { function e() {} return ( (e.init = function (e) { var t = this; (e = Object.assign({ autoStart: !0, sharedTicker: !1 }, e)), Object.defineProperty(this, "ticker", { set: function (e) { this._ticker && this._ticker.remove(this.render, this), (this._ticker = e), e && e.add(this.render, this, pt.LOW); }, get: function () { return this._ticker; }, }), (this.stop = function () { t._ticker.stop(); }), (this.start = function () { t._ticker.start(); }), (this._ticker = null), (this.ticker = e.sharedTicker ? mt.shared : new mt()), e.autoStart && this.start(); }), (e.destroy = function () { if (this._ticker) { var e = this._ticker; (this.ticker = null), e.destroy(); } }), e ); })(), yt = (function () { function e() { (this.pressure = 0), (this.rotationAngle = 0), (this.twist = 0), (this.tangentialPressure = 0), (this.global = new We()), (this.target = null), (this.originalEvent = null), (this.identifier = null), (this.isPrimary = !1), (this.button = 0), (this.buttons = 0), (this.width = 0), (this.height = 0), (this.tiltX = 0), (this.tiltY = 0), (this.pointerType = null), (this.pressure = 0), (this.rotationAngle = 0), (this.twist = 0), (this.tangentialPressure = 0); } return ( Object.defineProperty(e.prototype, "pointerId", { get: function () { return this.identifier; }, enumerable: !1, configurable: !0, }), (e.prototype.getLocalPosition = function (e, t, n) { return e.worldTransform.applyInverse(n || this.global, t); }), (e.prototype.copyEvent = function (e) { "isPrimary" in e && e.isPrimary && (this.isPrimary = !0), (this.button = "button" in e && e.button); var t = "buttons" in e && e.buttons; (this.buttons = Number.isInteger(t) ? t : "which" in e && e.which), (this.width = "width" in e && e.width), (this.height = "height" in e && e.height), (this.tiltX = "tiltX" in e && e.tiltX), (this.tiltY = "tiltY" in e && e.tiltY), (this.pointerType = "pointerType" in e && e.pointerType), (this.pressure = "pressure" in e && e.pressure), (this.rotationAngle = "rotationAngle" in e && e.rotationAngle), (this.twist = ("twist" in e && e.twist) || 0), (this.tangentialPressure = ("tangentialPressure" in e && e.tangentialPressure) || 0); }), (e.prototype.reset = function () { this.isPrimary = !1; }), e ); })(), Ct = function (e, t) { return ( (Ct = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ct(e, t) ); }; var bt = (function () { function e() { (this.stopped = !1), (this.stopsPropagatingAt = null), (this.stopPropagationHint = !1), (this.target = null), (this.currentTarget = null), (this.type = null), (this.data = null); } return ( (e.prototype.stopPropagation = function () { (this.stopped = !0), (this.stopPropagationHint = !0), (this.stopsPropagatingAt = this.currentTarget); }), (e.prototype.reset = function () { (this.stopped = !1), (this.stopsPropagatingAt = null), (this.stopPropagationHint = !1), (this.currentTarget = null), (this.target = null); }), e ); })(), wt = (function () { function e(t) { (this._pointerId = t), (this._flags = e.FLAGS.NONE); } return ( (e.prototype._doSet = function (e, t) { this._flags = t ? this._flags | e : this._flags & ~e; }), Object.defineProperty(e.prototype, "pointerId", { get: function () { return this._pointerId; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "flags", { get: function () { return this._flags; }, set: function (e) { this._flags = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "none", { get: function () { return this._flags === e.FLAGS.NONE; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "over", { get: function () { return 0 != (this._flags & e.FLAGS.OVER); }, set: function (t) { this._doSet(e.FLAGS.OVER, t); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "rightDown", { get: function () { return 0 != (this._flags & e.FLAGS.RIGHT_DOWN); }, set: function (t) { this._doSet(e.FLAGS.RIGHT_DOWN, t); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "leftDown", { get: function () { return 0 != (this._flags & e.FLAGS.LEFT_DOWN); }, set: function (t) { this._doSet(e.FLAGS.LEFT_DOWN, t); }, enumerable: !1, configurable: !0, }), (e.FLAGS = Object.freeze({ NONE: 0, OVER: 1, LEFT_DOWN: 2, RIGHT_DOWN: 4 })), e ); })(), St = (function () { function e() { this._tempPoint = new We(); } return ( (e.prototype.recursiveFindHit = function (e, t, n, r, i) { if (!t || !t.visible) return !1; var o = e.data.global, a = !1, s = (i = t.interactive || i), u = !0; if ((t.hitArea ? (r && (t.worldTransform.applyInverse(o, this._tempPoint), t.hitArea.contains(this._tempPoint.x, this._tempPoint.y) ? (a = !0) : ((r = !1), (u = !1))), (s = !1)) : t._mask && r && ((t._mask.containsPoint && t._mask.containsPoint(o)) || (r = !1)), u && t.interactiveChildren && t.children)) for (var l = t.children, c = l.length - 1; c >= 0; c--) { var d = l[c], h = this.recursiveFindHit(e, d, n, r, s); if (h) { if (!d.parent) continue; (s = !1), h && (e.target && (r = !1), (a = !0)); } } return i && (r && !e.target && !t.hitArea && t.containsPoint && t.containsPoint(o) && (a = !0), t.interactive && (a && !e.target && (e.target = t), n && n(e, t, !!a))), a; }), (e.prototype.findHit = function (e, t, n, r) { this.recursiveFindHit(e, t, n, r, !1); }), e ); })(), Tt = { interactive: !1, interactiveChildren: !0, hitArea: null, get buttonMode() { return "pointer" === this.cursor; }, set buttonMode(e) { e ? (this.cursor = "pointer") : "pointer" === this.cursor && (this.cursor = null); }, cursor: null, get trackedPointers() { return void 0 === this._trackedPointers && (this._trackedPointers = {}), this._trackedPointers; }, _trackedPointers: void 0, }; ut.mixin(Tt); var xt = { target: null, data: { global: null } }, Et = (function (e) { function t(t, n) { var r = e.call(this) || this; return (n = n || {}), (r.renderer = t), (r.autoPreventDefault = void 0 === n.autoPreventDefault || n.autoPreventDefault), (r.interactionFrequency = n.interactionFrequency || 10), (r.mouse = new yt()), (r.mouse.identifier = 1), r.mouse.global.set(-999999), (r.activeInteractionData = {}), (r.activeInteractionData[1] = r.mouse), (r.interactionDataPool = []), (r.eventData = new bt()), (r.interactionDOMElement = null), (r.moveWhenInside = !1), (r.eventsAdded = !1), (r.tickerAdded = !1), (r.mouseOverRenderer = !1), (r.supportsTouchEvents = "ontouchstart" in window), (r.supportsPointerEvents = !!window.PointerEvent), (r.onPointerUp = r.onPointerUp.bind(r)), (r.processPointerUp = r.processPointerUp.bind(r)), (r.onPointerCancel = r.onPointerCancel.bind(r)), (r.processPointerCancel = r.processPointerCancel.bind(r)), (r.onPointerDown = r.onPointerDown.bind(r)), (r.processPointerDown = r.processPointerDown.bind(r)), (r.onPointerMove = r.onPointerMove.bind(r)), (r.processPointerMove = r.processPointerMove.bind(r)), (r.onPointerOut = r.onPointerOut.bind(r)), (r.processPointerOverOut = r.processPointerOverOut.bind(r)), (r.onPointerOver = r.onPointerOver.bind(r)), (r.cursorStyles = { default: "inherit", pointer: "pointer" }), (r.currentCursorMode = null), (r.cursor = null), (r.resolution = 1), (r.delayedEvents = []), (r.search = new St()), (r._tempDisplayObject = new lt()), (r._useSystemTicker = void 0 === n.useSystemTicker || n.useSystemTicker), r.setTargetElement(r.renderer.view, r.renderer.resolution), r; } return ( (function (e, t) { function n() { this.constructor = e; } Ct(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), Object.defineProperty(t.prototype, "useSystemTicker", { get: function () { return this._useSystemTicker; }, set: function (e) { (this._useSystemTicker = e), e ? this.addTickerListener() : this.removeTickerListener(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "lastObjectRendered", { get: function () { return this.renderer._lastObjectRendered || this._tempDisplayObject; }, enumerable: !1, configurable: !0, }), (t.prototype.hitTest = function (e, t) { return (xt.target = null), (xt.data.global = e), t || (t = this.lastObjectRendered), this.processInteractive(xt, t, null, !0), xt.target; }), (t.prototype.setTargetElement = function (e, t) { void 0 === t && (t = 1), this.removeTickerListener(), this.removeEvents(), (this.interactionDOMElement = e), (this.resolution = t), this.addEvents(), this.addTickerListener(); }), (t.prototype.addTickerListener = function () { !this.tickerAdded && this.interactionDOMElement && this._useSystemTicker && (mt.system.add(this.tickerUpdate, this, pt.INTERACTION), (this.tickerAdded = !0)); }), (t.prototype.removeTickerListener = function () { this.tickerAdded && (mt.system.remove(this.tickerUpdate, this), (this.tickerAdded = !1)); }), (t.prototype.addEvents = function () { if (!this.eventsAdded && this.interactionDOMElement) { var e = this.interactionDOMElement.style; window.navigator.msPointerEnabled ? ((e.msContentZooming = "none"), (e.msTouchAction = "none")) : this.supportsPointerEvents && (e.touchAction = "none"), this.supportsPointerEvents ? (window.document.addEventListener("pointermove", this.onPointerMove, !0), this.interactionDOMElement.addEventListener("pointerdown", this.onPointerDown, !0), this.interactionDOMElement.addEventListener("pointerleave", this.onPointerOut, !0), this.interactionDOMElement.addEventListener("pointerover", this.onPointerOver, !0), window.addEventListener("pointercancel", this.onPointerCancel, !0), window.addEventListener("pointerup", this.onPointerUp, !0)) : (window.document.addEventListener("mousemove", this.onPointerMove, !0), this.interactionDOMElement.addEventListener("mousedown", this.onPointerDown, !0), this.interactionDOMElement.addEventListener("mouseout", this.onPointerOut, !0), this.interactionDOMElement.addEventListener("mouseover", this.onPointerOver, !0), window.addEventListener("mouseup", this.onPointerUp, !0)), this.supportsTouchEvents && (this.interactionDOMElement.addEventListener("touchstart", this.onPointerDown, !0), this.interactionDOMElement.addEventListener("touchcancel", this.onPointerCancel, !0), this.interactionDOMElement.addEventListener("touchend", this.onPointerUp, !0), this.interactionDOMElement.addEventListener("touchmove", this.onPointerMove, !0)), (this.eventsAdded = !0); } }), (t.prototype.removeEvents = function () { if (this.eventsAdded && this.interactionDOMElement) { var e = this.interactionDOMElement.style; window.navigator.msPointerEnabled ? ((e.msContentZooming = ""), (e.msTouchAction = "")) : this.supportsPointerEvents && (e.touchAction = ""), this.supportsPointerEvents ? (window.document.removeEventListener("pointermove", this.onPointerMove, !0), this.interactionDOMElement.removeEventListener("pointerdown", this.onPointerDown, !0), this.interactionDOMElement.removeEventListener("pointerleave", this.onPointerOut, !0), this.interactionDOMElement.removeEventListener("pointerover", this.onPointerOver, !0), window.removeEventListener("pointercancel", this.onPointerCancel, !0), window.removeEventListener("pointerup", this.onPointerUp, !0)) : (window.document.removeEventListener("mousemove", this.onPointerMove, !0), this.interactionDOMElement.removeEventListener("mousedown", this.onPointerDown, !0), this.interactionDOMElement.removeEventListener("mouseout", this.onPointerOut, !0), this.interactionDOMElement.removeEventListener("mouseover", this.onPointerOver, !0), window.removeEventListener("mouseup", this.onPointerUp, !0)), this.supportsTouchEvents && (this.interactionDOMElement.removeEventListener("touchstart", this.onPointerDown, !0), this.interactionDOMElement.removeEventListener("touchcancel", this.onPointerCancel, !0), this.interactionDOMElement.removeEventListener("touchend", this.onPointerUp, !0), this.interactionDOMElement.removeEventListener("touchmove", this.onPointerMove, !0)), (this.interactionDOMElement = null), (this.eventsAdded = !1); } }), (t.prototype.tickerUpdate = function (e) { (this._deltaTime += e), this._deltaTime < this.interactionFrequency || ((this._deltaTime = 0), this.update()); }), (t.prototype.update = function () { if (this.interactionDOMElement) if (this._didMove) this._didMove = !1; else { for (var e in ((this.cursor = null), this.activeInteractionData)) if (this.activeInteractionData.hasOwnProperty(e)) { var t = this.activeInteractionData[e]; if (t.originalEvent && "touch" !== t.pointerType) { var n = this.configureInteractionEventForDOMEvent(this.eventData, t.originalEvent, t); this.processInteractive(n, this.lastObjectRendered, this.processPointerOverOut, !0); } } this.setCursorMode(this.cursor); } }), (t.prototype.setCursorMode = function (e) { if (((e = e || "default"), this.currentCursorMode !== e)) { this.currentCursorMode = e; var t = this.cursorStyles[e]; if (t) switch (typeof t) { case "string": this.interactionDOMElement.style.cursor = t; break; case "function": t(e); break; case "object": Object.assign(this.interactionDOMElement.style, t); } else "string" != typeof e || Object.prototype.hasOwnProperty.call(this.cursorStyles, e) || (this.interactionDOMElement.style.cursor = e); } }), (t.prototype.dispatchEvent = function (e, t, n) { (n.stopPropagationHint && e !== n.stopsPropagatingAt) || ((n.currentTarget = e), (n.type = t), e.emit(t, n), e[t] && e[t](n)); }), (t.prototype.delayDispatchEvent = function (e, t, n) { this.delayedEvents.push({ displayObject: e, eventString: t, eventData: n }); }), (t.prototype.mapPositionToPoint = function (e, t, n) { var r; r = this.interactionDOMElement.parentElement ? this.interactionDOMElement.getBoundingClientRect() : { x: 0, y: 0, width: 0, height: 0 }; var i = 1 / this.resolution; (e.x = (t - r.left) * (this.interactionDOMElement.width / r.width) * i), (e.y = (n - r.top) * (this.interactionDOMElement.height / r.height) * i); }), (t.prototype.processInteractive = function (e, t, n, r) { var i = this.search.findHit(e, t, n, r), o = this.delayedEvents; if (!o.length) return i; e.stopPropagationHint = !1; var a = o.length; this.delayedEvents = []; for (var s = 0; s < a; s++) { var u = o[s], l = u.displayObject, c = u.eventString, d = u.eventData; d.stopsPropagatingAt === l && (d.stopPropagationHint = !0), this.dispatchEvent(l, c, d); } return i; }), (t.prototype.onPointerDown = function (e) { if (!this.supportsTouchEvents || "touch" !== e.pointerType) { var t = this.normalizeToPointerData(e); if (this.autoPreventDefault && t[0].isNormalized) (e.cancelable || !("cancelable" in e)) && e.preventDefault(); for (var n = t.length, r = 0; r < n; r++) { var i = t[r], o = this.getInteractionDataForPointerId(i), a = this.configureInteractionEventForDOMEvent(this.eventData, i, o); if (((a.data.originalEvent = e), this.processInteractive(a, this.lastObjectRendered, this.processPointerDown, !0), this.emit("pointerdown", a), "touch" === i.pointerType)) this.emit("touchstart", a); else if ("mouse" === i.pointerType || "pen" === i.pointerType) { var s = 2 === i.button; this.emit(s ? "rightdown" : "mousedown", this.eventData); } } } }), (t.prototype.processPointerDown = function (e, t, n) { var r = e.data, i = e.data.identifier; if (n) if ((t.trackedPointers[i] || (t.trackedPointers[i] = new wt(i)), this.dispatchEvent(t, "pointerdown", e), "touch" === r.pointerType)) this.dispatchEvent(t, "touchstart", e); else if ("mouse" === r.pointerType || "pen" === r.pointerType) { var o = 2 === r.button; o ? (t.trackedPointers[i].rightDown = !0) : (t.trackedPointers[i].leftDown = !0), this.dispatchEvent(t, o ? "rightdown" : "mousedown", e); } }), (t.prototype.onPointerComplete = function (e, t, n) { for (var r = this.normalizeToPointerData(e), i = r.length, o = e.target !== this.interactionDOMElement ? "outside" : "", a = 0; a < i; a++) { var s = r[a], u = this.getInteractionDataForPointerId(s), l = this.configureInteractionEventForDOMEvent(this.eventData, s, u); if (((l.data.originalEvent = e), this.processInteractive(l, this.lastObjectRendered, n, t || !o), this.emit(t ? "pointercancel" : "pointerup" + o, l), "mouse" === s.pointerType || "pen" === s.pointerType)) { var c = 2 === s.button; this.emit(c ? "rightup" + o : "mouseup" + o, l); } else "touch" === s.pointerType && (this.emit(t ? "touchcancel" : "touchend" + o, l), this.releaseInteractionDataForPointerId(s.pointerId)); } }), (t.prototype.onPointerCancel = function (e) { (this.supportsTouchEvents && "touch" === e.pointerType) || this.onPointerComplete(e, !0, this.processPointerCancel); }), (t.prototype.processPointerCancel = function (e, t) { var n = e.data, r = e.data.identifier; void 0 !== t.trackedPointers[r] && (delete t.trackedPointers[r], this.dispatchEvent(t, "pointercancel", e), "touch" === n.pointerType && this.dispatchEvent(t, "touchcancel", e)); }), (t.prototype.onPointerUp = function (e) { (this.supportsTouchEvents && "touch" === e.pointerType) || this.onPointerComplete(e, !1, this.processPointerUp); }), (t.prototype.processPointerUp = function (e, t, n) { var r = e.data, i = e.data.identifier, o = t.trackedPointers[i], a = "touch" === r.pointerType, s = "mouse" === r.pointerType || "pen" === r.pointerType, u = !1; if (s) { var l = 2 === r.button, c = wt.FLAGS, d = l ? c.RIGHT_DOWN : c.LEFT_DOWN, h = void 0 !== o && o.flags & d; n ? (this.dispatchEvent(t, l ? "rightup" : "mouseup", e), h && (this.dispatchEvent(t, l ? "rightclick" : "click", e), (u = !0))) : h && this.dispatchEvent(t, l ? "rightupoutside" : "mouseupoutside", e), o && (l ? (o.rightDown = !1) : (o.leftDown = !1)); } n ? (this.dispatchEvent(t, "pointerup", e), a && this.dispatchEvent(t, "touchend", e), o && ((s && !u) || this.dispatchEvent(t, "pointertap", e), a && (this.dispatchEvent(t, "tap", e), (o.over = !1)))) : o && (this.dispatchEvent(t, "pointerupoutside", e), a && this.dispatchEvent(t, "touchendoutside", e)), o && o.none && delete t.trackedPointers[i]; }), (t.prototype.onPointerMove = function (e) { if (!this.supportsTouchEvents || "touch" !== e.pointerType) { var t = this.normalizeToPointerData(e); ("mouse" !== t[0].pointerType && "pen" !== t[0].pointerType) || ((this._didMove = !0), (this.cursor = null)); for (var n = t.length, r = 0; r < n; r++) { var i = t[r], o = this.getInteractionDataForPointerId(i), a = this.configureInteractionEventForDOMEvent(this.eventData, i, o); (a.data.originalEvent = e), this.processInteractive(a, this.lastObjectRendered, this.processPointerMove, !0), this.emit("pointermove", a), "touch" === i.pointerType && this.emit("touchmove", a), ("mouse" !== i.pointerType && "pen" !== i.pointerType) || this.emit("mousemove", a); } "mouse" === t[0].pointerType && this.setCursorMode(this.cursor); } }), (t.prototype.processPointerMove = function (e, t, n) { var r = e.data, i = "touch" === r.pointerType, o = "mouse" === r.pointerType || "pen" === r.pointerType; o && this.processPointerOverOut(e, t, n), (this.moveWhenInside && !n) || (this.dispatchEvent(t, "pointermove", e), i && this.dispatchEvent(t, "touchmove", e), o && this.dispatchEvent(t, "mousemove", e)); }), (t.prototype.onPointerOut = function (e) { if (!this.supportsTouchEvents || "touch" !== e.pointerType) { var t = this.normalizeToPointerData(e)[0]; "mouse" === t.pointerType && ((this.mouseOverRenderer = !1), this.setCursorMode(null)); var n = this.getInteractionDataForPointerId(t), r = this.configureInteractionEventForDOMEvent(this.eventData, t, n); (r.data.originalEvent = t), this.processInteractive(r, this.lastObjectRendered, this.processPointerOverOut, !1), this.emit("pointerout", r), "mouse" === t.pointerType || "pen" === t.pointerType ? this.emit("mouseout", r) : this.releaseInteractionDataForPointerId(n.identifier); } }), (t.prototype.processPointerOverOut = function (e, t, n) { var r = e.data, i = e.data.identifier, o = "mouse" === r.pointerType || "pen" === r.pointerType, a = t.trackedPointers[i]; n && !a && (a = t.trackedPointers[i] = new wt(i)), void 0 !== a && (n && this.mouseOverRenderer ? (a.over || ((a.over = !0), this.delayDispatchEvent(t, "pointerover", e), o && this.delayDispatchEvent(t, "mouseover", e)), o && null === this.cursor && (this.cursor = t.cursor)) : a.over && ((a.over = !1), this.dispatchEvent(t, "pointerout", this.eventData), o && this.dispatchEvent(t, "mouseout", e), a.none && delete t.trackedPointers[i])); }), (t.prototype.onPointerOver = function (e) { var t = this.normalizeToPointerData(e)[0], n = this.getInteractionDataForPointerId(t), r = this.configureInteractionEventForDOMEvent(this.eventData, t, n); (r.data.originalEvent = t), "mouse" === t.pointerType && (this.mouseOverRenderer = !0), this.emit("pointerover", r), ("mouse" !== t.pointerType && "pen" !== t.pointerType) || this.emit("mouseover", r); }), (t.prototype.getInteractionDataForPointerId = function (e) { var t, n = e.pointerId; return 1 === n || "mouse" === e.pointerType ? (t = this.mouse) : this.activeInteractionData[n] ? (t = this.activeInteractionData[n]) : (((t = this.interactionDataPool.pop() || new yt()).identifier = n), (this.activeInteractionData[n] = t)), t.copyEvent(e), t; }), (t.prototype.releaseInteractionDataForPointerId = function (e) { var t = this.activeInteractionData[e]; t && (delete this.activeInteractionData[e], t.reset(), this.interactionDataPool.push(t)); }), (t.prototype.configureInteractionEventForDOMEvent = function (e, t, n) { return (e.data = n), this.mapPositionToPoint(n.global, t.clientX, t.clientY), "touch" === t.pointerType && ((t.globalX = n.global.x), (t.globalY = n.global.y)), (n.originalEvent = t), e.reset(), e; }), (t.prototype.normalizeToPointerData = function (e) { var t = []; if (this.supportsTouchEvents && e instanceof TouchEvent) for (var n = 0, r = e.changedTouches.length; n < r; n++) { var i = e.changedTouches[n]; void 0 === i.button && (i.button = e.touches.length ? 1 : 0), void 0 === i.buttons && (i.buttons = e.touches.length ? 1 : 0), void 0 === i.isPrimary && (i.isPrimary = 1 === e.touches.length && "touchstart" === e.type), void 0 === i.width && (i.width = i.radiusX || 1), void 0 === i.height && (i.height = i.radiusY || 1), void 0 === i.tiltX && (i.tiltX = 0), void 0 === i.tiltY && (i.tiltY = 0), void 0 === i.pointerType && (i.pointerType = "touch"), void 0 === i.pointerId && (i.pointerId = i.identifier || 0), void 0 === i.pressure && (i.pressure = i.force || 0.5), void 0 === i.twist && (i.twist = 0), void 0 === i.tangentialPressure && (i.tangentialPressure = 0), void 0 === i.layerX && (i.layerX = i.offsetX = i.clientX), void 0 === i.layerY && (i.layerY = i.offsetY = i.clientY), (i.isNormalized = !0), t.push(i); } else if (!(e instanceof MouseEvent) || (this.supportsPointerEvents && e instanceof window.PointerEvent)) t.push(e); else { var o = e; void 0 === o.isPrimary && (o.isPrimary = !0), void 0 === o.width && (o.width = 1), void 0 === o.height && (o.height = 1), void 0 === o.tiltX && (o.tiltX = 0), void 0 === o.tiltY && (o.tiltY = 0), void 0 === o.pointerType && (o.pointerType = "mouse"), void 0 === o.pointerId && (o.pointerId = 1), void 0 === o.pressure && (o.pressure = 0.5), void 0 === o.twist && (o.twist = 0), void 0 === o.tangentialPressure && (o.tangentialPressure = 0), (o.isNormalized = !0), t.push(o); } return t; }), (t.prototype.destroy = function () { this.removeEvents(), this.removeTickerListener(), this.removeAllListeners(), (this.renderer = null), (this.mouse = null), (this.eventData = null), (this.interactionDOMElement = null), (this.onPointerDown = null), (this.processPointerDown = null), (this.onPointerUp = null), (this.processPointerUp = null), (this.onPointerCancel = null), (this.processPointerCancel = null), (this.onPointerMove = null), (this.processPointerMove = null), (this.onPointerOut = null), (this.processPointerOverOut = null), (this.onPointerOver = null), (this.search = null); }), t ); })(X()), Lt = (function () { function e(e) { (this.items = []), (this._name = e), (this._aliasCount = 0); } return ( (e.prototype.emit = function (e, t, n, r, i, o, a, s) { if (arguments.length > 8) throw new Error("max arguments reached"); var u = this.name, l = this.items; this._aliasCount++; for (var c = 0, d = l.length; c < d; c++) l[c][u](e, t, n, r, i, o, a, s); return l === this.items && this._aliasCount--, this; }), (e.prototype.ensureNonAliasedItems = function () { this._aliasCount > 0 && this.items.length > 1 && ((this._aliasCount = 0), (this.items = this.items.slice(0))); }), (e.prototype.add = function (e) { return e[this._name] && (this.ensureNonAliasedItems(), this.remove(e), this.items.push(e)), this; }), (e.prototype.remove = function (e) { var t = this.items.indexOf(e); return -1 !== t && (this.ensureNonAliasedItems(), this.items.splice(t, 1)), this; }), (e.prototype.contains = function (e) { return -1 !== this.items.indexOf(e); }), (e.prototype.removeAll = function () { return this.ensureNonAliasedItems(), (this.items.length = 0), this; }), (e.prototype.destroy = function () { this.removeAll(), (this.items = null), (this._name = null); }), Object.defineProperty(e.prototype, "empty", { get: function () { return 0 === this.items.length; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "name", { get: function () { return this._name; }, enumerable: !1, configurable: !0, }), e ); })(); Object.defineProperties(Lt.prototype, { dispatch: { value: Lt.prototype.emit }, run: { value: Lt.prototype.emit } }), (Y.PREFER_ENV = A.any ? I.WEBGL : I.WEBGL2), (Y.STRICT_TEXTURE_CACHE = !1); var At = []; function It(e, t) { if (!e) return null; var n = ""; if ("string" == typeof e) { var r = /\.(\w{3,4})(?:$|\?|#)/i.exec(e); r && (n = r[1].toLowerCase()); } for (var i = At.length - 1; i >= 0; --i) { var o = At[i]; if (o.test && o.test(e, n)) return new o(e, t); } throw new Error("Unrecognized source type to auto-detect Resource"); } var Mt = function (e, t) { return ( (Mt = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Mt(e, t) ); }; function Pt(e, t) { function n() { this.constructor = e; } Mt(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var Ot = (function () { function e(e, t) { void 0 === e && (e = 0), void 0 === t && (t = 0), (this._width = e), (this._height = t), (this.destroyed = !1), (this.internal = !1), (this.onResize = new Lt("setRealSize")), (this.onUpdate = new Lt("update")), (this.onError = new Lt("onError")); } return ( (e.prototype.bind = function (e) { this.onResize.add(e), this.onUpdate.add(e), this.onError.add(e), (this._width || this._height) && this.onResize.emit(this._width, this._height); }), (e.prototype.unbind = function (e) { this.onResize.remove(e), this.onUpdate.remove(e), this.onError.remove(e); }), (e.prototype.resize = function (e, t) { (e === this._width && t === this._height) || ((this._width = e), (this._height = t), this.onResize.emit(e, t)); }), Object.defineProperty(e.prototype, "valid", { get: function () { return !!this._width && !!this._height; }, enumerable: !1, configurable: !0, }), (e.prototype.update = function () { this.destroyed || this.onUpdate.emit(); }), (e.prototype.load = function () { return Promise.resolve(this); }), Object.defineProperty(e.prototype, "width", { get: function () { return this._width; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "height", { get: function () { return this._height; }, enumerable: !1, configurable: !0, }), (e.prototype.style = function (e, t, n) { return !1; }), (e.prototype.dispose = function () {}), (e.prototype.destroy = function () { this.destroyed || ((this.destroyed = !0), this.dispose(), this.onError.removeAll(), (this.onError = null), this.onResize.removeAll(), (this.onResize = null), this.onUpdate.removeAll(), (this.onUpdate = null)); }), (e.test = function (e, t) { return !1; }), e ); })(), kt = (function (e) { function t(t, n) { var r = this, i = n || {}, o = i.width, a = i.height; if (!o || !a) throw new Error("BufferResource width or height invalid"); return ((r = e.call(this, o, a) || this).data = t), r; } return ( Pt(t, e), (t.prototype.upload = function (e, t, n) { var r = e.gl; return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.alphaMode === j.UNPACK), n.width === t.width && n.height === t.height ? r.texSubImage2D(t.target, 0, 0, 0, t.width, t.height, t.format, t.type, this.data) : ((n.width = t.width), (n.height = t.height), r.texImage2D(t.target, 0, n.internalFormat, t.width, t.height, 0, t.format, n.type, this.data)), !0; }), (t.prototype.dispose = function () { this.data = null; }), (t.test = function (e) { return e instanceof Float32Array || e instanceof Uint8Array || e instanceof Uint32Array; }), t ); })(Ot), Rt = { scaleMode: B.NEAREST, format: R.RGBA, alphaMode: j.NPM }, Dt = (function (e) { function t(t, n) { void 0 === t && (t = null), void 0 === n && (n = null); var r = e.call(this) || this, i = (n = n || {}).alphaMode, o = n.mipmap, a = n.anisotropicLevel, s = n.scaleMode, u = n.width, l = n.height, c = n.wrapMode, d = n.format, h = n.type, p = n.target, f = n.resolution, _ = n.resourceOptions; return !t || t instanceof Ot || ((t = It(t, _)).internal = !0), (r.width = u || 0), (r.height = l || 0), (r.resolution = f || Y.RESOLUTION), (r.mipmap = void 0 !== o ? o : Y.MIPMAP_TEXTURES), (r.anisotropicLevel = void 0 !== a ? a : Y.ANISOTROPIC_LEVEL), (r.wrapMode = c || Y.WRAP_MODE), (r.scaleMode = void 0 !== s ? s : Y.SCALE_MODE), (r.format = d || R.RGBA), (r.type = h || N.UNSIGNED_BYTE), (r.target = p || D.TEXTURE_2D), (r.alphaMode = void 0 !== i ? i : j.UNPACK), void 0 !== n.premultiplyAlpha && (r.premultiplyAlpha = n.premultiplyAlpha), (r.uid = Se()), (r.touched = 0), (r.isPowerOfTwo = !1), r._refreshPOT(), (r._glTextures = {}), (r.dirtyId = 0), (r.dirtyStyleId = 0), (r.cacheId = null), (r.valid = u > 0 && l > 0), (r.textureCacheIds = []), (r.destroyed = !1), (r.resource = null), (r._batchEnabled = 0), (r._batchLocation = 0), (r.parentTextureArray = null), r.setResource(t), r; } return ( Pt(t, e), Object.defineProperty(t.prototype, "realWidth", { get: function () { return Math.ceil(this.width * this.resolution - 1e-4); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "realHeight", { get: function () { return Math.ceil(this.height * this.resolution - 1e-4); }, enumerable: !1, configurable: !0, }), (t.prototype.setStyle = function (e, t) { var n; return void 0 !== e && e !== this.scaleMode && ((this.scaleMode = e), (n = !0)), void 0 !== t && t !== this.mipmap && ((this.mipmap = t), (n = !0)), n && this.dirtyStyleId++, this; }), (t.prototype.setSize = function (e, t, n) { return (this.resolution = n || this.resolution), (this.width = e), (this.height = t), this._refreshPOT(), this.update(), this; }), (t.prototype.setRealSize = function (e, t, n) { return (this.resolution = n || this.resolution), (this.width = e / this.resolution), (this.height = t / this.resolution), this._refreshPOT(), this.update(), this; }), (t.prototype._refreshPOT = function () { this.isPowerOfTwo = ve(this.realWidth) && ve(this.realHeight); }), (t.prototype.setResolution = function (e) { var t = this.resolution; return t === e || ((this.resolution = e), this.valid && ((this.width = (this.width * t) / e), (this.height = (this.height * t) / e), this.emit("update", this)), this._refreshPOT()), this; }), (t.prototype.setResource = function (e) { if (this.resource === e) return this; if (this.resource) throw new Error("Resource can be set only once"); return e.bind(this), (this.resource = e), this; }), (t.prototype.update = function () { this.valid ? (this.dirtyId++, this.dirtyStyleId++, this.emit("update", this)) : this.width > 0 && this.height > 0 && ((this.valid = !0), this.emit("loaded", this), this.emit("update", this)); }), (t.prototype.onError = function (e) { this.emit("error", this, e); }), (t.prototype.destroy = function () { this.resource && (this.resource.unbind(this), this.resource.internal && this.resource.destroy(), (this.resource = null)), this.cacheId && (delete Ae[this.cacheId], delete Le[this.cacheId], (this.cacheId = null)), this.dispose(), t.removeFromCache(this), (this.textureCacheIds = null), (this.destroyed = !0); }), (t.prototype.dispose = function () { this.emit("dispose", this); }), (t.prototype.castToBaseTexture = function () { return this; }), (t.from = function (e, n, r) { void 0 === r && (r = Y.STRICT_TEXTURE_CACHE); var i = "string" == typeof e, o = null; i ? (o = e) : (e._pixiId || (e._pixiId = "pixiid_" + Se()), (o = e._pixiId)); var a = Ae[o]; if (i && r && !a) throw new Error('The cacheId "' + o + '" does not exist in BaseTextureCache.'); return a || (((a = new t(e, n)).cacheId = o), t.addToCache(a, o)), a; }), (t.fromBuffer = function (e, n, r, i) { e = e || new Float32Array(n * r * 4); var o = new kt(e, { width: n, height: r }), a = e instanceof Float32Array ? N.FLOAT : N.UNSIGNED_BYTE; return new t(o, Object.assign(Rt, i || { width: n, height: r, type: a })); }), (t.addToCache = function (e, t) { t && (-1 === e.textureCacheIds.indexOf(t) && e.textureCacheIds.push(t), Ae[t] && console.warn("BaseTexture added to the cache with an id [" + t + "] that already had an entry"), (Ae[t] = e)); }), (t.removeFromCache = function (e) { if ("string" == typeof e) { var t = Ae[e]; if (t) { var n = t.textureCacheIds.indexOf(e); return n > -1 && t.textureCacheIds.splice(n, 1), delete Ae[e], t; } } else if (e && e.textureCacheIds) { for (var r = 0; r < e.textureCacheIds.length; ++r) delete Ae[e.textureCacheIds[r]]; return (e.textureCacheIds.length = 0), e; } return null; }), (t._globalBatch = 0), t ); })(X()), Nt = (function (e) { function t(t, n) { var r = this, i = n || {}, o = i.width, a = i.height; ((r = e.call(this, o, a) || this).items = []), (r.itemDirtyIds = []); for (var s = 0; s < t; s++) { var u = new Dt(); r.items.push(u), r.itemDirtyIds.push(-2); } return (r.length = t), (r._load = null), (r.baseTexture = null), r; } return ( Pt(t, e), (t.prototype.initFromArray = function (e, t) { for (var n = 0; n < this.length; n++) e[n] && (e[n].castToBaseTexture ? this.addBaseTextureAt(e[n].castToBaseTexture(), n) : e[n] instanceof Ot ? this.addResourceAt(e[n], n) : this.addResourceAt(It(e[n], t), n)); }), (t.prototype.dispose = function () { for (var e = 0, t = this.length; e < t; e++) this.items[e].destroy(); (this.items = null), (this.itemDirtyIds = null), (this._load = null); }), (t.prototype.addResourceAt = function (e, t) { if (!this.items[t]) throw new Error("Index " + t + " is out of bounds"); return e.valid && !this.valid && this.resize(e.width, e.height), this.items[t].setResource(e), this; }), (t.prototype.bind = function (t) { if (null !== this.baseTexture) throw new Error("Only one base texture per TextureArray is allowed"); e.prototype.bind.call(this, t); for (var n = 0; n < this.length; n++) (this.items[n].parentTextureArray = t), this.items[n].on("update", t.update, t); }), (t.prototype.unbind = function (t) { e.prototype.unbind.call(this, t); for (var n = 0; n < this.length; n++) (this.items[n].parentTextureArray = null), this.items[n].off("update", t.update, t); }), (t.prototype.load = function () { var e = this; if (this._load) return this._load; var t = this.items .map(function (e) { return e.resource; }) .filter(function (e) { return e; }) .map(function (e) { return e.load(); }); return ( (this._load = Promise.all(t).then(function () { var t = e.items[0], n = t.realWidth, r = t.realHeight; return e.resize(n, r), Promise.resolve(e); })), this._load ); }), t ); })(Ot), Bt = (function (e) { function t(t, n) { var r, i, o = this, a = n || {}, s = a.width, u = a.height; return Array.isArray(t) ? ((r = t), (i = t.length)) : (i = t), (o = e.call(this, i, { width: s, height: u }) || this), r && o.initFromArray(r, n), o; } return ( Pt(t, e), (t.prototype.addBaseTextureAt = function (e, t) { if (!e.resource) throw new Error("ArrayResource does not support RenderTexture"); return this.addResourceAt(e.resource, t), this; }), (t.prototype.bind = function (t) { e.prototype.bind.call(this, t), (t.target = D.TEXTURE_2D_ARRAY); }), (t.prototype.upload = function (e, t, n) { var r = this, i = r.length, o = r.itemDirtyIds, a = r.items, s = e.gl; n.dirtyId < 0 && s.texImage3D(s.TEXTURE_2D_ARRAY, 0, t.format, this._width, this._height, i, 0, t.format, t.type, null); for (var u = 0; u < i; u++) { var l = a[u]; o[u] < l.dirtyId && ((o[u] = l.dirtyId), l.valid && s.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, u, l.resource.width, l.resource.height, 1, t.format, t.type, l.resource.source)); } return !0; }), t ); })(Nt), Ft = (function (e) { function t(t) { var n = this, r = t, i = r.naturalWidth || r.videoWidth || r.width, o = r.naturalHeight || r.videoHeight || r.height; return ((n = e.call(this, i, o) || this).source = t), (n.noSubImage = !1), n; } return ( Pt(t, e), (t.crossOrigin = function (e, t, n) { void 0 === n && 0 !== t.indexOf("data:") ? (e.crossOrigin = Ne(t)) : !1 !== n && (e.crossOrigin = "string" == typeof n ? n : "anonymous"); }), (t.prototype.upload = function (e, t, n, r) { var i = e.gl, o = t.realWidth, a = t.realHeight; return (r = r || this.source), i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.alphaMode === j.UNPACK), this.noSubImage || t.target !== i.TEXTURE_2D || n.width !== o || n.height !== a ? ((n.width = o), (n.height = a), i.texImage2D(t.target, 0, t.format, t.format, t.type, r)) : i.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, t.format, t.type, r), !0; }), (t.prototype.update = function () { if (!this.destroyed) { var t = this.source, n = t.naturalWidth || t.videoWidth || t.width, r = t.naturalHeight || t.videoHeight || t.height; this.resize(n, r), e.prototype.update.call(this); } }), (t.prototype.dispose = function () { this.source = null; }), t ); })(Ot), Ut = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( Pt(t, e), (t.test = function (e) { var t = window.OffscreenCanvas; return !!(t && e instanceof t) || e instanceof HTMLCanvasElement; }), t ); })(Ft), jt = (function (e) { function t(n, r) { var i = this, o = r || {}, a = o.width, s = o.height, u = o.autoLoad, l = o.linkBaseTexture; if (n && n.length !== t.SIDES) throw new Error("Invalid length. Got " + n.length + ", expected 6"); i = e.call(this, 6, { width: a, height: s }) || this; for (var c = 0; c < t.SIDES; c++) i.items[c].target = D.TEXTURE_CUBE_MAP_POSITIVE_X + c; return (i.linkBaseTexture = !1 !== l), n && i.initFromArray(n, r), !1 !== u && i.load(), i; } return ( Pt(t, e), (t.prototype.bind = function (t) { e.prototype.bind.call(this, t), (t.target = D.TEXTURE_CUBE_MAP); }), (t.prototype.addBaseTextureAt = function (e, t, n) { if ((void 0 === n && (n = this.linkBaseTexture), !this.items[t])) throw new Error("Index " + t + " is out of bounds"); if (!this.linkBaseTexture || e.parentTextureArray || Object.keys(e._glTextures).length > 0) { if (!e.resource) throw new Error("CubeResource does not support copying of renderTexture."); this.addResourceAt(e.resource, t); } else (e.target = D.TEXTURE_CUBE_MAP_POSITIVE_X + t), (e.parentTextureArray = this.baseTexture), (this.items[t] = e); return e.valid && !this.valid && this.resize(e.realWidth, e.realHeight), (this.items[t] = e), this; }), (t.prototype.upload = function (e, n, r) { for (var i = this.itemDirtyIds, o = 0; o < t.SIDES; o++) { var a = this.items[o]; i[o] < a.dirtyId && (a.valid && a.resource ? (a.resource.upload(e, a, r), (i[o] = a.dirtyId)) : i[o] < -1 && (e.gl.texImage2D(a.target, 0, r.internalFormat, n.realWidth, n.realHeight, 0, n.format, r.type, null), (i[o] = -1))); } return !0; }), (t.test = function (e) { return Array.isArray(e) && e.length === t.SIDES; }), (t.SIDES = 6), t ); })(Nt), Gt = (function (e) { function t(t, n) { var r = this; if (((n = n || {}), !(t instanceof HTMLImageElement))) { var i = new Image(); Ft.crossOrigin(i, t, n.crossorigin), (i.src = t), (t = i); } return (r = e.call(this, t) || this), !t.complete && r._width && r._height && ((r._width = 0), (r._height = 0)), (r.url = t.src), (r._process = null), (r.preserveBitmap = !1), (r.createBitmap = (void 0 !== n.createBitmap ? n.createBitmap : Y.CREATE_IMAGE_BITMAP) && !!window.createImageBitmap), (r.alphaMode = "number" == typeof n.alphaMode ? n.alphaMode : null), void 0 !== n.premultiplyAlpha && (r.premultiplyAlpha = n.premultiplyAlpha), (r.bitmap = null), (r._load = null), !1 !== n.autoLoad && r.load(), r; } return ( Pt(t, e), (t.prototype.load = function (e) { var t = this; return ( this._load || (void 0 !== e && (this.createBitmap = e), (this._load = new Promise(function (e, n) { var r = t.source; t.url = r.src; var i = function () { t.destroyed || ((r.onload = null), (r.onerror = null), t.resize(r.width, r.height), (t._load = null), t.createBitmap ? e(t.process()) : e(t)); }; r.complete && r.src ? i() : ((r.onload = i), (r.onerror = function (e) { n(e), t.onError.emit(e); })); }))), this._load ); }), (t.prototype.process = function () { var e = this, t = this.source; return null !== this._process ? this._process : null === this.bitmap && window.createImageBitmap ? ((this._process = window.createImageBitmap(t, 0, 0, t.width, t.height, { premultiplyAlpha: this.alphaMode === j.UNPACK ? "premultiply" : "none" }).then(function (t) { return e.destroyed ? Promise.reject() : ((e.bitmap = t), e.update(), (e._process = null), Promise.resolve(e)); })), this._process) : Promise.resolve(this); }), (t.prototype.upload = function (t, n, r) { if (("number" == typeof this.alphaMode && (n.alphaMode = this.alphaMode), !this.createBitmap)) return e.prototype.upload.call(this, t, n, r); if (!this.bitmap && (this.process(), !this.bitmap)) return !1; if ((e.prototype.upload.call(this, t, n, r, this.bitmap), !this.preserveBitmap)) { var i = !0, o = n._glTextures; for (var a in o) { var s = o[a]; if (s !== r && s.dirtyId !== n.dirtyId) { i = !1; break; } } i && (this.bitmap.close && this.bitmap.close(), (this.bitmap = null)); } return !0; }), (t.prototype.dispose = function () { (this.source.onload = null), (this.source.onerror = null), e.prototype.dispose.call(this), this.bitmap && (this.bitmap.close(), (this.bitmap = null)), (this._process = null), (this._load = null); }), (t.test = function (e) { return "string" == typeof e || e instanceof HTMLImageElement; }), t ); })(Ft), Ht = (function (e) { function t(t, n) { var r = this; return (n = n || {}), ((r = e.call(this, document.createElement("canvas")) || this)._width = 0), (r._height = 0), (r.svg = t), (r.scale = n.scale || 1), (r._overrideWidth = n.width), (r._overrideHeight = n.height), (r._resolve = null), (r._crossorigin = n.crossorigin), (r._load = null), !1 !== n.autoLoad && r.load(), r; } return ( Pt(t, e), (t.prototype.load = function () { var e = this; return ( this._load || (this._load = new Promise(function (t) { if ( ((e._resolve = function () { e.resize(e.source.width, e.source.height), t(e); }), /^\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i), t ); })(Ft), Vt = (function (e) { function t(n, r) { var i = this; if (((r = r || {}), !(n instanceof HTMLVideoElement))) { var o = document.createElement("video"); o.setAttribute("preload", "auto"), o.setAttribute("webkit-playsinline", ""), o.setAttribute("playsinline", ""), "string" == typeof n && (n = [n]); var a = n[0].src || n[0]; Ft.crossOrigin(o, a, r.crossorigin); for (var s = 0; s < n.length; ++s) { var u = document.createElement("source"), l = n[s], c = l.src, d = l.mime, h = (c = c || n[s]).split("?").shift().toLowerCase(), p = h.substr(h.lastIndexOf(".") + 1); (d = d || t.MIME_TYPES[p] || "video/" + p), (u.src = c), (u.type = d), o.appendChild(u); } n = o; } return ((i = e.call(this, n) || this).noSubImage = !0), (i._autoUpdate = !0), (i._isConnectedToTicker = !1), (i._updateFPS = r.updateFPS || 0), (i._msToNextUpdate = 0), (i.autoPlay = !1 !== r.autoPlay), (i._load = null), (i._resolve = null), (i._onCanPlay = i._onCanPlay.bind(i)), (i._onError = i._onError.bind(i)), !1 !== r.autoLoad && i.load(), i; } return ( Pt(t, e), (t.prototype.update = function (t) { if ((void 0 === t && (t = 0), !this.destroyed)) { var n = mt.shared.elapsedMS * this.source.playbackRate; (this._msToNextUpdate = Math.floor(this._msToNextUpdate - n)), (!this._updateFPS || this._msToNextUpdate <= 0) && (e.prototype.update.call(this), (this._msToNextUpdate = this._updateFPS ? Math.floor(1e3 / this._updateFPS) : 0)); } }), (t.prototype.load = function () { var e = this; if (this._load) return this._load; var t = this.source; return ( (t.readyState === t.HAVE_ENOUGH_DATA || t.readyState === t.HAVE_FUTURE_DATA) && t.width && t.height && (t.complete = !0), t.addEventListener("play", this._onPlayStart.bind(this)), t.addEventListener("pause", this._onPlayStop.bind(this)), this._isSourceReady() ? this._onCanPlay() : (t.addEventListener("canplay", this._onCanPlay), t.addEventListener("canplaythrough", this._onCanPlay), t.addEventListener("error", this._onError, !0)), (this._load = new Promise(function (n) { e.valid ? n(e) : ((e._resolve = n), t.load()); })), this._load ); }), (t.prototype._onError = function (e) { this.source.removeEventListener("error", this._onError, !0), this.onError.emit(e); }), (t.prototype._isSourcePlaying = function () { var e = this.source; return e.currentTime > 0 && !1 === e.paused && !1 === e.ended && e.readyState > 2; }), (t.prototype._isSourceReady = function () { var e = this.source; return 3 === e.readyState || 4 === e.readyState; }), (t.prototype._onPlayStart = function () { this.valid || this._onCanPlay(), this.autoUpdate && !this._isConnectedToTicker && (mt.shared.add(this.update, this), (this._isConnectedToTicker = !0)); }), (t.prototype._onPlayStop = function () { this._isConnectedToTicker && (mt.shared.remove(this.update, this), (this._isConnectedToTicker = !1)); }), (t.prototype._onCanPlay = function () { var e = this.source; e.removeEventListener("canplay", this._onCanPlay), e.removeEventListener("canplaythrough", this._onCanPlay); var t = this.valid; this.resize(e.videoWidth, e.videoHeight), !t && this._resolve && (this._resolve(this), (this._resolve = null)), this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && e.play(); }), (t.prototype.dispose = function () { this._isConnectedToTicker && mt.shared.remove(this.update, this); var t = this.source; t && (t.removeEventListener("error", this._onError, !0), t.pause(), (t.src = ""), t.load()), e.prototype.dispose.call(this); }), Object.defineProperty(t.prototype, "autoUpdate", { get: function () { return this._autoUpdate; }, set: function (e) { e !== this._autoUpdate && ((this._autoUpdate = e), !this._autoUpdate && this._isConnectedToTicker ? (mt.shared.remove(this.update, this), (this._isConnectedToTicker = !1)) : this._autoUpdate && !this._isConnectedToTicker && this._isSourcePlaying() && (mt.shared.add(this.update, this), (this._isConnectedToTicker = !0))); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "updateFPS", { get: function () { return this._updateFPS; }, set: function (e) { e !== this._updateFPS && (this._updateFPS = e); }, enumerable: !1, configurable: !0, }), (t.test = function (e, n) { return e instanceof HTMLVideoElement || t.TYPES.indexOf(n) > -1; }), (t.TYPES = ["mp4", "m4v", "webm", "ogg", "ogv", "h264", "avi", "mov"]), (t.MIME_TYPES = { ogv: "video/ogg", mov: "video/quicktime", m4v: "video/mp4" }), t ); })(Ft), Zt = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( Pt(t, e), (t.test = function (e) { return !!window.createImageBitmap && e instanceof ImageBitmap; }), t ); })(Ft); At.push(Gt, Zt, Ut, Vt, Ht, kt, jt, Bt); var zt = { Resource: Ot, BaseImageResource: Ft, INSTALLED: At, autoDetectResource: It, AbstractMultiResource: Nt, ArrayResource: Bt, BufferResource: kt, CanvasResource: Ut, CubeResource: jt, ImageResource: Gt, SVGResource: Ht, VideoResource: Vt, ImageBitmapResource: Zt }, Yt = (function () { function e(e) { this.renderer = e; } return ( (e.prototype.destroy = function () { this.renderer = null; }), e ); })(), Wt = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( Pt(t, e), (t.prototype.upload = function (e, t, n) { var r = e.gl; return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.alphaMode === j.UNPACK), n.width === t.width && n.height === t.height ? r.texSubImage2D(t.target, 0, 0, 0, t.width, t.height, t.format, t.type, this.data) : ((n.width = t.width), (n.height = t.height), r.texImage2D(t.target, 0, 1 === e.context.webGLVersion ? r.DEPTH_COMPONENT : r.DEPTH_COMPONENT16, t.width, t.height, 0, t.format, t.type, this.data)), !0; }), t ); })(kt), Xt = (function () { function e(e, t) { (this.width = Math.ceil(e || 100)), (this.height = Math.ceil(t || 100)), (this.stencil = !1), (this.depth = !1), (this.dirtyId = 0), (this.dirtyFormat = 0), (this.dirtySize = 0), (this.depthTexture = null), (this.colorTextures = []), (this.glFramebuffers = {}), (this.disposeRunner = new Lt("disposeFramebuffer")), (this.multisample = z.NONE); } return ( Object.defineProperty(e.prototype, "colorTexture", { get: function () { return this.colorTextures[0]; }, enumerable: !1, configurable: !0, }), (e.prototype.addColorTexture = function (e, t) { return void 0 === e && (e = 0), (this.colorTextures[e] = t || new Dt(null, { scaleMode: B.NEAREST, resolution: 1, mipmap: U.OFF, width: this.width, height: this.height })), this.dirtyId++, this.dirtyFormat++, this; }), (e.prototype.addDepthTexture = function (e) { return (this.depthTexture = e || new Dt(new Wt(null, { width: this.width, height: this.height }), { scaleMode: B.NEAREST, resolution: 1, width: this.width, height: this.height, mipmap: U.OFF, format: R.DEPTH_COMPONENT, type: N.UNSIGNED_SHORT })), this.dirtyId++, this.dirtyFormat++, this; }), (e.prototype.enableDepth = function () { return (this.depth = !0), this.dirtyId++, this.dirtyFormat++, this; }), (e.prototype.enableStencil = function () { return (this.stencil = !0), this.dirtyId++, this.dirtyFormat++, this; }), (e.prototype.resize = function (e, t) { if (((e = Math.ceil(e)), (t = Math.ceil(t)), e !== this.width || t !== this.height)) { (this.width = e), (this.height = t), this.dirtyId++, this.dirtySize++; for (var n = 0; n < this.colorTextures.length; n++) { var r = this.colorTextures[n], i = r.resolution; r.setSize(e / i, t / i); } if (this.depthTexture) { i = this.depthTexture.resolution; this.depthTexture.setSize(e / i, t / i); } } }), (e.prototype.dispose = function () { this.disposeRunner.emit(this, !1); }), (e.prototype.destroyDepthTexture = function () { this.depthTexture && (this.depthTexture.destroy(), (this.depthTexture = null), ++this.dirtyId, ++this.dirtyFormat); }), e ); })(), qt = (function (e) { function t(t) { var n = this; "number" == typeof t && (t = { width: arguments[0], height: arguments[1], scaleMode: arguments[2], resolution: arguments[3] }); n = e.call(this, null, t) || this; var r = t || {}, i = r.width, o = r.height; return (n.mipmap = 0), (n.width = Math.ceil(i) || 100), (n.height = Math.ceil(o) || 100), (n.valid = !0), (n.clearColor = [0, 0, 0, 0]), (n.framebuffer = new Xt(n.width * n.resolution, n.height * n.resolution).addColorTexture(0, n)), (n.maskStack = []), (n.filterStack = [{}]), n; } return ( Pt(t, e), (t.prototype.resize = function (e, t) { (e = Math.ceil(e)), (t = Math.ceil(t)), this.framebuffer.resize(e * this.resolution, t * this.resolution); }), (t.prototype.dispose = function () { this.framebuffer.dispose(), e.prototype.dispose.call(this); }), (t.prototype.destroy = function () { e.prototype.destroy.call(this), this.framebuffer.destroyDepthTexture(), (this.framebuffer = null); }), t ); })(Dt), Kt = (function () { function e() { (this.x0 = 0), (this.y0 = 0), (this.x1 = 1), (this.y1 = 0), (this.x2 = 1), (this.y2 = 1), (this.x3 = 0), (this.y3 = 1), (this.uvsFloat32 = new Float32Array(8)); } return ( (e.prototype.set = function (e, t, n) { var r = t.width, i = t.height; if (n) { var o = e.width / 2 / r, a = e.height / 2 / i, s = e.x / r + o, u = e.y / i + a; (n = rt.add(n, rt.NW)), (this.x0 = s + o * rt.uX(n)), (this.y0 = u + a * rt.uY(n)), (n = rt.add(n, 2)), (this.x1 = s + o * rt.uX(n)), (this.y1 = u + a * rt.uY(n)), (n = rt.add(n, 2)), (this.x2 = s + o * rt.uX(n)), (this.y2 = u + a * rt.uY(n)), (n = rt.add(n, 2)), (this.x3 = s + o * rt.uX(n)), (this.y3 = u + a * rt.uY(n)); } else (this.x0 = e.x / r), (this.y0 = e.y / i), (this.x1 = (e.x + e.width) / r), (this.y1 = e.y / i), (this.x2 = (e.x + e.width) / r), (this.y2 = (e.y + e.height) / i), (this.x3 = e.x / r), (this.y3 = (e.y + e.height) / i); (this.uvsFloat32[0] = this.x0), (this.uvsFloat32[1] = this.y0), (this.uvsFloat32[2] = this.x1), (this.uvsFloat32[3] = this.y1), (this.uvsFloat32[4] = this.x2), (this.uvsFloat32[5] = this.y2), (this.uvsFloat32[6] = this.x3), (this.uvsFloat32[7] = this.y3); }), e ); })(), $t = new Kt(), Jt = (function (e) { function t(n, r, i, o, a, s) { var u = e.call(this) || this; if (((u.noFrame = !1), r || ((u.noFrame = !0), (r = new He(0, 0, 1, 1))), n instanceof t && (n = n.baseTexture), (u.baseTexture = n), (u._frame = r), (u.trim = o), (u.valid = !1), (u._uvs = $t), (u.uvMatrix = null), (u.orig = i || r), (u._rotate = Number(a || 0)), !0 === a)) u._rotate = 2; else if (u._rotate % 2 != 0) throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually"); return (u.defaultAnchor = s ? new We(s.x, s.y) : new We(0, 0)), (u._updateID = 0), (u.textureCacheIds = []), n.valid ? (u.noFrame ? n.valid && u.onBaseTextureUpdated(n) : (u.frame = r)) : n.once("loaded", u.onBaseTextureUpdated, u), u.noFrame && n.on("update", u.onBaseTextureUpdated, u), u; } return ( Pt(t, e), (t.prototype.update = function () { this.baseTexture.resource && this.baseTexture.resource.update(); }), (t.prototype.onBaseTextureUpdated = function (e) { if (this.noFrame) { if (!this.baseTexture.valid) return; (this._frame.width = e.width), (this._frame.height = e.height), (this.valid = !0), this.updateUvs(); } else this.frame = this._frame; this.emit("update", this); }), (t.prototype.destroy = function (e) { if (this.baseTexture) { if (e) { var n = this.baseTexture; n && n.url && Le[n.url] && t.removeFromCache(n.url), this.baseTexture.destroy(); } this.baseTexture.off("loaded", this.onBaseTextureUpdated, this), this.baseTexture.off("update", this.onBaseTextureUpdated, this), (this.baseTexture = null); } (this._frame = null), (this._uvs = null), (this.trim = null), (this.orig = null), (this.valid = !1), t.removeFromCache(this), (this.textureCacheIds = null); }), (t.prototype.clone = function () { return new t(this.baseTexture, this.frame.clone(), this.orig.clone(), this.trim && this.trim.clone(), this.rotate, this.defaultAnchor); }), (t.prototype.updateUvs = function () { this._uvs === $t && (this._uvs = new Kt()), this._uvs.set(this._frame, this.baseTexture, this.rotate), this._updateID++; }), (t.from = function (e, n, r) { void 0 === n && (n = {}), void 0 === r && (r = Y.STRICT_TEXTURE_CACHE); var i = "string" == typeof e, o = null; i ? (o = e) : (e._pixiId || (e._pixiId = "pixiid_" + Se()), (o = e._pixiId)); var a = Le[o]; if (i && r && !a) throw new Error('The cacheId "' + o + '" does not exist in TextureCache.'); return a || (n.resolution || (n.resolution = Be(e)), ((a = new t(new Dt(e, n))).baseTexture.cacheId = o), Dt.addToCache(a.baseTexture, o), t.addToCache(a, o)), a; }), (t.fromURL = function (e, n) { var r = Object.assign({ autoLoad: !1 }, null == n ? void 0 : n.resourceOptions), i = t.from(e, Object.assign({ resourceOptions: r }, n), !1), o = i.baseTexture.resource; return i.baseTexture.valid ? Promise.resolve(i) : o.load().then(function () { return Promise.resolve(i); }); }), (t.fromBuffer = function (e, n, r, i) { return new t(Dt.fromBuffer(e, n, r, i)); }), (t.fromLoader = function (e, n, r) { var i = new Gt(e); i.url = n; var o = new t(new Dt(i, { scaleMode: Y.SCALE_MODE, resolution: Be(n) })); return r || (r = n), Dt.addToCache(o.baseTexture, r), t.addToCache(o, r), r !== n && (Dt.addToCache(o.baseTexture, n), t.addToCache(o, n)), o; }), (t.addToCache = function (e, t) { t && (-1 === e.textureCacheIds.indexOf(t) && e.textureCacheIds.push(t), Le[t] && console.warn("Texture added to the cache with an id [" + t + "] that already had an entry"), (Le[t] = e)); }), (t.removeFromCache = function (e) { if ("string" == typeof e) { var t = Le[e]; if (t) { var n = t.textureCacheIds.indexOf(e); return n > -1 && t.textureCacheIds.splice(n, 1), delete Le[e], t; } } else if (e && e.textureCacheIds) { for (var r = 0; r < e.textureCacheIds.length; ++r) Le[e.textureCacheIds[r]] === e && delete Le[e.textureCacheIds[r]]; return (e.textureCacheIds.length = 0), e; } return null; }), Object.defineProperty(t.prototype, "resolution", { get: function () { return this.baseTexture.resolution; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "frame", { get: function () { return this._frame; }, set: function (e) { (this._frame = e), (this.noFrame = !1); var t = e.x, n = e.y, r = e.width, i = e.height, o = t + r > this.baseTexture.width, a = n + i > this.baseTexture.height; if (o || a) { var s = o && a ? "and" : "or", u = "X: " + t + " + " + r + " = " + (t + r) + " > " + this.baseTexture.width, l = "Y: " + n + " + " + i + " = " + (n + i) + " > " + this.baseTexture.height; throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: " + u + " " + s + " " + l); } (this.valid = r && i && this.baseTexture.valid), this.trim || this.rotate || (this.orig = e), this.valid && this.updateUvs(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "rotate", { get: function () { return this._rotate; }, set: function (e) { (this._rotate = e), this.valid && this.updateUvs(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "width", { get: function () { return this.orig.width; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return this.orig.height; }, enumerable: !1, configurable: !0, }), (t.prototype.castToBaseTexture = function () { return this.baseTexture; }), t ); })(X()); function Qt(e) { (e.destroy = function () {}), (e.on = function () {}), (e.once = function () {}), (e.emit = function () {}); } (Jt.EMPTY = new Jt(new Dt())), Qt(Jt.EMPTY), Qt(Jt.EMPTY.baseTexture), (Jt.WHITE = (function () { var e = document.createElement("canvas"); (e.width = 16), (e.height = 16); var t = e.getContext("2d"); return (t.fillStyle = "white"), t.fillRect(0, 0, 16, 16), new Jt(new Dt(new Ut(e))); })()), Qt(Jt.WHITE), Qt(Jt.WHITE.baseTexture); var en = (function (e) { function t(t, n) { var r = this, i = null; if (!(t instanceof qt)) { var o = arguments[1], a = arguments[2], s = arguments[3], u = arguments[4]; console.warn("Please use RenderTexture.create(" + o + ", " + a + ") instead of the ctor directly."), (i = arguments[0]), (n = null), (t = new qt({ width: o, height: a, scaleMode: s, resolution: u })); } return ((r = e.call(this, t, n) || this).legacyRenderer = i), (r.valid = !0), (r.filterFrame = null), (r.filterPoolKey = null), r.updateUvs(), r; } return ( Pt(t, e), Object.defineProperty(t.prototype, "framebuffer", { get: function () { return this.baseTexture.framebuffer; }, enumerable: !1, configurable: !0, }), (t.prototype.resize = function (e, t, n) { void 0 === n && (n = !0), (e = Math.ceil(e)), (t = Math.ceil(t)), (this.valid = e > 0 && t > 0), (this._frame.width = this.orig.width = e), (this._frame.height = this.orig.height = t), n && this.baseTexture.resize(e, t), this.updateUvs(); }), (t.prototype.setResolution = function (e) { var t = this.baseTexture; t.resolution !== e && (t.setResolution(e), this.resize(t.width, t.height, !1)); }), (t.create = function (e) { return "number" == typeof e && (e = { width: e, height: arguments[1], scaleMode: arguments[2], resolution: arguments[3] }), new t(new qt(e)); }), t ); })(Jt), tn = (function () { function e(e) { (this.texturePool = {}), (this.textureOptions = e || {}), (this.enableFullScreen = !1), (this._pixelsWidth = 0), (this._pixelsHeight = 0); } return ( (e.prototype.createTexture = function (e, t) { var n = new qt(Object.assign({ width: e, height: t, resolution: 1 }, this.textureOptions)); return new en(n); }), (e.prototype.getOptimalTexture = function (t, n, r) { void 0 === r && (r = 1); var i = e.SCREEN_KEY; (t *= r), (n *= r), (this.enableFullScreen && t === this._pixelsWidth && n === this._pixelsHeight) || (i = ((65535 & (t = me(t))) << 16) | (65535 & (n = me(n)))), this.texturePool[i] || (this.texturePool[i] = []); var o = this.texturePool[i].pop(); return o || (o = this.createTexture(t, n)), (o.filterPoolKey = i), o.setResolution(r), o; }), (e.prototype.getFilterTexture = function (e, t) { var n = this.getOptimalTexture(e.width, e.height, t || e.resolution); return (n.filterFrame = e.filterFrame), n; }), (e.prototype.returnTexture = function (e) { var t = e.filterPoolKey; (e.filterFrame = null), this.texturePool[t].push(e); }), (e.prototype.returnFilterTexture = function (e) { this.returnTexture(e); }), (e.prototype.clear = function (e) { if ((e = !1 !== e)) for (var t in this.texturePool) { var n = this.texturePool[t]; if (n) for (var r = 0; r < n.length; r++) n[r].destroy(!0); } this.texturePool = {}; }), (e.prototype.setScreenSize = function (t) { if (t.width !== this._pixelsWidth || t.height !== this._pixelsHeight) { var n = e.SCREEN_KEY, r = this.texturePool[n]; if (((this.enableFullScreen = t.width > 0 && t.height > 0), r)) for (var i = 0; i < r.length; i++) r[i].destroy(!0); (this.texturePool[n] = []), (this._pixelsWidth = t.width), (this._pixelsHeight = t.height); } }), (e.SCREEN_KEY = "screen"), e ); })(), nn = (function () { function e(e, t, n, r, i, o, a) { void 0 === t && (t = 0), void 0 === n && (n = !1), void 0 === r && (r = 5126), (this.buffer = e), (this.size = t), (this.normalized = n), (this.type = r), (this.stride = i), (this.start = o), (this.instance = a); } return ( (e.prototype.destroy = function () { this.buffer = null; }), (e.from = function (t, n, r, i, o) { return new e(t, n, r, i, o); }), e ); })(), rn = 0, on = (function () { function e(e, t, n) { void 0 === t && (t = !0), void 0 === n && (n = !1), (this.data = e || new Float32Array(1)), (this._glBuffers = {}), (this._updateID = 0), (this.index = n), (this.static = t), (this.id = rn++), (this.disposeRunner = new Lt("disposeBuffer")); } return ( (e.prototype.update = function (e) { (this.data = e || this.data), this._updateID++; }), (e.prototype.dispose = function () { this.disposeRunner.emit(this, !1); }), (e.prototype.destroy = function () { this.dispose(), (this.data = null); }), (e.from = function (t) { return t instanceof Array && (t = new Float32Array(t)), new e(t); }), e ); })(); function an(e) { if (4 === e.BYTES_PER_ELEMENT) return e instanceof Float32Array ? "Float32Array" : e instanceof Uint32Array ? "Uint32Array" : "Int32Array"; if (2 === e.BYTES_PER_ELEMENT) { if (e instanceof Uint16Array) return "Uint16Array"; } else if (1 === e.BYTES_PER_ELEMENT && e instanceof Uint8Array) return "Uint8Array"; return null; } var sn = { Float32Array, Uint32Array, Int32Array, Uint8Array }; var un = { 5126: 4, 5123: 2, 5121: 1 }, ln = 0, cn = { Float32Array, Uint32Array, Int32Array, Uint8Array, Uint16Array }, dn = (function () { function e(e, t) { void 0 === e && (e = []), void 0 === t && (t = {}), (this.buffers = e), (this.indexBuffer = null), (this.attributes = t), (this.glVertexArrayObjects = {}), (this.id = ln++), (this.instanced = !1), (this.instanceCount = 1), (this.disposeRunner = new Lt("disposeGeometry")), (this.refCount = 0); } return ( (e.prototype.addAttribute = function (e, t, n, r, i, o, a, s) { if ((void 0 === n && (n = 0), void 0 === r && (r = !1), void 0 === s && (s = !1), !t)) throw new Error("You must pass a buffer when creating an attribute"); t instanceof on || (t instanceof Array && (t = new Float32Array(t)), (t = new on(t))); var u = e.split("|"); if (u.length > 1) { for (var l = 0; l < u.length; l++) this.addAttribute(u[l], t, n, r, i); return this; } var c = this.buffers.indexOf(t); return -1 === c && (this.buffers.push(t), (c = this.buffers.length - 1)), (this.attributes[e] = new nn(c, n, r, i, o, a, s)), (this.instanced = this.instanced || s), this; }), (e.prototype.getAttribute = function (e) { return this.attributes[e]; }), (e.prototype.getBuffer = function (e) { return this.buffers[this.getAttribute(e).buffer]; }), (e.prototype.addIndex = function (e) { return e instanceof on || (e instanceof Array && (e = new Uint16Array(e)), (e = new on(e))), (e.index = !0), (this.indexBuffer = e), -1 === this.buffers.indexOf(e) && this.buffers.push(e), this; }), (e.prototype.getIndex = function () { return this.indexBuffer; }), (e.prototype.interleave = function () { if (1 === this.buffers.length || (2 === this.buffers.length && this.indexBuffer)) return this; var e, t = [], n = [], r = new on(); for (e in this.attributes) { var i = this.attributes[e], o = this.buffers[i.buffer]; t.push(o.data), n.push((i.size * un[i.type]) / 4), (i.buffer = 0); } for ( r.data = (function (e, t) { for (var n = 0, r = 0, i = {}, o = 0; o < e.length; o++) (r += t[o]), (n += e[o].length); var a = new ArrayBuffer(4 * n), s = null, u = 0; for (o = 0; o < e.length; o++) { var l = t[o], c = e[o], d = an(c); i[d] || (i[d] = new sn[d](a)), (s = i[d]); for (var h = 0; h < c.length; h++) s[((h / l) | 0) * r + u + (h % l)] = c[h]; u += l; } return new Float32Array(a); })(t, n), e = 0; e < this.buffers.length; e++ ) this.buffers[e] !== this.indexBuffer && this.buffers[e].destroy(); return (this.buffers = [r]), this.indexBuffer && this.buffers.push(this.indexBuffer), this; }), (e.prototype.getSize = function () { for (var e in this.attributes) { var t = this.attributes[e]; return this.buffers[t.buffer].data.length / (t.stride / 4 || t.size); } return 0; }), (e.prototype.dispose = function () { this.disposeRunner.emit(this, !1); }), (e.prototype.destroy = function () { this.dispose(), (this.buffers = null), (this.indexBuffer = null), (this.attributes = null); }), (e.prototype.clone = function () { for (var t = new e(), n = 0; n < this.buffers.length; n++) t.buffers[n] = new on(this.buffers[n].data.slice(0)); for (var n in this.attributes) { var r = this.attributes[n]; t.attributes[n] = new nn(r.buffer, r.size, r.normalized, r.type, r.stride, r.start, r.instance); } return this.indexBuffer && ((t.indexBuffer = t.buffers[this.buffers.indexOf(this.indexBuffer)]), (t.indexBuffer.index = !0)), t; }), (e.merge = function (t) { for (var n, r = new e(), i = [], o = [], a = [], s = 0; s < t.length; s++) { n = t[s]; for (var u = 0; u < n.buffers.length; u++) (o[u] = o[u] || 0), (o[u] += n.buffers[u].data.length), (a[u] = 0); } for (s = 0; s < n.buffers.length; s++) (i[s] = new cn[an(n.buffers[s].data)](o[s])), (r.buffers[s] = new on(i[s])); for (s = 0; s < t.length; s++) { n = t[s]; for (u = 0; u < n.buffers.length; u++) i[u].set(n.buffers[u].data, a[u]), (a[u] += n.buffers[u].data.length); } if (((r.attributes = n.attributes), n.indexBuffer)) { (r.indexBuffer = r.buffers[n.buffers.indexOf(n.indexBuffer)]), (r.indexBuffer.index = !0); var l = 0, c = 0, d = 0, h = 0; for (s = 0; s < n.buffers.length; s++) if (n.buffers[s] !== n.indexBuffer) { h = s; break; } for (var s in n.attributes) { var p = n.attributes[s]; (0 | p.buffer) === h && (c += (p.size * un[p.type]) / 4); } for (s = 0; s < t.length; s++) { var f = t[s].indexBuffer.data; for (u = 0; u < f.length; u++) r.indexBuffer.data[u + d] += l; (l += n.buffers[h].data.length / c), (d += f.length); } } return r; }), e ); })(), hn = (function (e) { function t() { var t = e.call(this) || this; return t.addAttribute("aVertexPosition", new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])).addIndex([0, 1, 3, 2]), t; } return Pt(t, e), t; })(dn), pn = (function (e) { function t() { var t = e.call(this) || this; return (t.vertices = new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1])), (t.uvs = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])), (t.vertexBuffer = new on(t.vertices)), (t.uvBuffer = new on(t.uvs)), t.addAttribute("aVertexPosition", t.vertexBuffer).addAttribute("aTextureCoord", t.uvBuffer).addIndex([0, 1, 2, 0, 2, 3]), t; } return ( Pt(t, e), (t.prototype.map = function (e, t) { var n = 0, r = 0; return (this.uvs[0] = n), (this.uvs[1] = r), (this.uvs[2] = n + t.width / e.width), (this.uvs[3] = r), (this.uvs[4] = n + t.width / e.width), (this.uvs[5] = r + t.height / e.height), (this.uvs[6] = n), (this.uvs[7] = r + t.height / e.height), (n = t.x), (r = t.y), (this.vertices[0] = n), (this.vertices[1] = r), (this.vertices[2] = n + t.width), (this.vertices[3] = r), (this.vertices[4] = n + t.width), (this.vertices[5] = r + t.height), (this.vertices[6] = n), (this.vertices[7] = r + t.height), this.invalidate(), this; }), (t.prototype.invalidate = function () { return this.vertexBuffer._updateID++, this.uvBuffer._updateID++, this; }), t ); })(dn), fn = 0, _n = (function () { function e(e, t) { (this.uniforms = e), (this.group = !0), (this.syncUniforms = {}), (this.dirtyId = 0), (this.id = fn++), (this.static = !!t); } return ( (e.prototype.update = function () { this.dirtyId++; }), (e.prototype.add = function (t, n, r) { this.uniforms[t] = new e(n, r); }), (e.from = function (t, n) { return new e(t, n); }), e ); })(), gn = (function () { function e() { (this.renderTexture = null), (this.target = null), (this.legacy = !1), (this.resolution = 1), (this.sourceFrame = new He()), (this.destinationFrame = new He()), (this.filters = []); } return ( (e.prototype.clear = function () { (this.target = null), (this.filters = null), (this.renderTexture = null); }), e ); })(), mn = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.defaultFilterStack = [{}]), (n.texturePool = new tn()), n.texturePool.setScreenSize(t.view), (n.statePool = []), (n.quad = new hn()), (n.quadUv = new pn()), (n.tempRect = new He()), (n.activeState = {}), (n.globalUniforms = new _n({ outputFrame: n.tempRect, inputSize: new Float32Array(4), inputPixel: new Float32Array(4), inputClamp: new Float32Array(4), resolution: 1, filterArea: new Float32Array(4), filterClamp: new Float32Array(4) }, !0)), (n.forceClear = !1), (n.useMaxPadding = !1), n; } return ( Pt(t, e), (t.prototype.push = function (e, t) { for (var n = this.renderer, r = this.defaultFilterStack, i = this.statePool.pop() || new gn(), o = t[0].resolution, a = t[0].padding, s = t[0].autoFit, u = t[0].legacy, l = 1; l < t.length; l++) { var c = t[l]; (o = Math.min(o, c.resolution)), (a = this.useMaxPadding ? Math.max(a, c.padding) : a + c.padding), (s = s && c.autoFit), (u = u || c.legacy); } 1 === r.length && (this.defaultFilterStack[0].renderTexture = n.renderTexture.current), r.push(i), (i.resolution = o), (i.legacy = u), (i.target = e), i.sourceFrame.copyFrom(e.filterArea || e.getBounds(!0)), i.sourceFrame.pad(a), s && i.sourceFrame.fit(this.renderer.renderTexture.sourceFrame), i.sourceFrame.ceil(o), (i.renderTexture = this.getOptimalFilterTexture(i.sourceFrame.width, i.sourceFrame.height, o)), (i.filters = t), (i.destinationFrame.width = i.renderTexture.width), (i.destinationFrame.height = i.renderTexture.height); var d = this.tempRect; (d.width = i.sourceFrame.width), (d.height = i.sourceFrame.height), (i.renderTexture.filterFrame = i.sourceFrame), n.renderTexture.bind(i.renderTexture, i.sourceFrame, d), n.renderTexture.clear(); }), (t.prototype.pop = function () { var e = this.defaultFilterStack, t = e.pop(), n = t.filters; this.activeState = t; var r = this.globalUniforms.uniforms; (r.outputFrame = t.sourceFrame), (r.resolution = t.resolution); var i = r.inputSize, o = r.inputPixel, a = r.inputClamp; if (((i[0] = t.destinationFrame.width), (i[1] = t.destinationFrame.height), (i[2] = 1 / i[0]), (i[3] = 1 / i[1]), (o[0] = i[0] * t.resolution), (o[1] = i[1] * t.resolution), (o[2] = 1 / o[0]), (o[3] = 1 / o[1]), (a[0] = 0.5 * o[2]), (a[1] = 0.5 * o[3]), (a[2] = t.sourceFrame.width * i[2] - 0.5 * o[2]), (a[3] = t.sourceFrame.height * i[3] - 0.5 * o[3]), t.legacy)) { var s = r.filterArea; (s[0] = t.destinationFrame.width), (s[1] = t.destinationFrame.height), (s[2] = t.sourceFrame.x), (s[3] = t.sourceFrame.y), (r.filterClamp = r.inputClamp); } this.globalUniforms.update(); var u = e[e.length - 1]; if ((t.renderTexture.framebuffer.multisample > 1 && this.renderer.framebuffer.blit(), 1 === n.length)) n[0].apply(this, t.renderTexture, u.renderTexture, G.BLEND, t), this.returnFilterTexture(t.renderTexture); else { var l = t.renderTexture, c = this.getOptimalFilterTexture(l.width, l.height, t.resolution); c.filterFrame = l.filterFrame; var d = 0; for (d = 0; d < n.length - 1; ++d) { n[d].apply(this, l, c, G.CLEAR, t); var h = l; (l = c), (c = h); } n[d].apply(this, l, u.renderTexture, G.BLEND, t), this.returnFilterTexture(l), this.returnFilterTexture(c); } t.clear(), this.statePool.push(t); }), (t.prototype.bindAndClear = function (e, t) { if ((void 0 === t && (t = G.CLEAR), e && e.filterFrame)) { var n = this.tempRect; (n.width = e.filterFrame.width), (n.height = e.filterFrame.height), this.renderer.renderTexture.bind(e, e.filterFrame, n); } else this.renderer.renderTexture.bind(e); "boolean" == typeof t && ((t = t ? G.CLEAR : G.BLEND), xe("5.2.1", "Use CLEAR_MODES when using clear applyFilter option")), (t === G.CLEAR || (t === G.BLIT && this.forceClear)) && this.renderer.renderTexture.clear(); }), (t.prototype.applyFilter = function (e, t, n, r) { var i = this.renderer; this.bindAndClear(n, r), (e.uniforms.uSampler = t), (e.uniforms.filterGlobals = this.globalUniforms), i.state.set(e.state), i.shader.bind(e), e.legacy ? (this.quadUv.map(t._frame, t.filterFrame), i.geometry.bind(this.quadUv), i.geometry.draw(k.TRIANGLES)) : (i.geometry.bind(this.quad), i.geometry.draw(k.TRIANGLE_STRIP)); }), (t.prototype.calculateSpriteMatrix = function (e, t) { var n = this.activeState, r = n.sourceFrame, i = n.destinationFrame, o = t._texture.orig, a = e.set(i.width, 0, 0, i.height, r.x, r.y), s = t.worldTransform.copyTo(qe.TEMP_MATRIX); return s.invert(), a.prepend(s), a.scale(1 / o.width, 1 / o.height), a.translate(t.anchor.x, t.anchor.y), a; }), (t.prototype.destroy = function () { this.texturePool.clear(!1); }), (t.prototype.getOptimalFilterTexture = function (e, t, n) { return void 0 === n && (n = 1), this.texturePool.getOptimalTexture(e, t, n); }), (t.prototype.getFilterTexture = function (e, t) { if ("number" == typeof e) { var n = e; (e = t), (t = n); } e = e || this.activeState.renderTexture; var r = this.texturePool.getOptimalTexture(e.width, e.height, t || e.resolution); return (r.filterFrame = e.filterFrame), r; }), (t.prototype.returnFilterTexture = function (e) { this.texturePool.returnTexture(e); }), (t.prototype.emptyPool = function () { this.texturePool.clear(!0); }), (t.prototype.resize = function () { this.texturePool.setScreenSize(this.renderer.view); }), t ); })(Yt), vn = (function () { function e(e) { this.renderer = e; } return ( (e.prototype.flush = function () {}), (e.prototype.destroy = function () { this.renderer = null; }), (e.prototype.start = function () {}), (e.prototype.stop = function () { this.flush(); }), (e.prototype.render = function (e) {}), e ); })(), yn = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.emptyRenderer = new vn(t)), (n.currentRenderer = n.emptyRenderer), n; } return ( Pt(t, e), (t.prototype.setObjectRenderer = function (e) { this.currentRenderer !== e && (this.currentRenderer.stop(), (this.currentRenderer = e), this.currentRenderer.start()); }), (t.prototype.flush = function () { this.setObjectRenderer(this.emptyRenderer); }), (t.prototype.reset = function () { this.setObjectRenderer(this.emptyRenderer); }), (t.prototype.copyBoundTextures = function (e, t) { for (var n = this.renderer.texture.boundTextures, r = t - 1; r >= 0; --r) (e[r] = n[r] || null), e[r] && (e[r]._batchLocation = r); }), (t.prototype.boundArray = function (e, t, n, r) { for (var i = e.elements, o = e.ids, a = e.count, s = 0, u = 0; u < a; u++) { var l = i[u], c = l._batchLocation; if (c >= 0 && c < r && t[c] === l) o[u] = c; else for (; s < r; ) { var d = t[s]; if (!d || d._batchEnabled !== n || d._batchLocation !== s) { (o[u] = s), (l._batchLocation = s), (t[s] = l); break; } s++; } } }), t ); })(Yt), Cn = 0, bn = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.webGLVersion = 1), (n.extensions = {}), (n.supports = { uint32Indices: !1 }), (n.handleContextLost = n.handleContextLost.bind(n)), (n.handleContextRestored = n.handleContextRestored.bind(n)), t.view.addEventListener("webglcontextlost", n.handleContextLost, !1), t.view.addEventListener("webglcontextrestored", n.handleContextRestored, !1), n; } return ( Pt(t, e), Object.defineProperty(t.prototype, "isLost", { get: function () { return !this.gl || this.gl.isContextLost(); }, enumerable: !1, configurable: !0, }), (t.prototype.contextChange = function (e) { (this.gl = e), (this.renderer.gl = e), (this.renderer.CONTEXT_UID = Cn++), e.isContextLost() && e.getExtension("WEBGL_lose_context") && e.getExtension("WEBGL_lose_context").restoreContext(); }), (t.prototype.initFromContext = function (e) { (this.gl = e), this.validateContext(e), (this.renderer.gl = e), (this.renderer.CONTEXT_UID = Cn++), this.renderer.runners.contextChange.emit(e); }), (t.prototype.initFromOptions = function (e) { var t = this.createContext(this.renderer.view, e); this.initFromContext(t); }), (t.prototype.createContext = function (e, t) { var n; if ((Y.PREFER_ENV >= I.WEBGL2 && (n = e.getContext("webgl2", t)), n)) this.webGLVersion = 2; else if (((this.webGLVersion = 1), !(n = e.getContext("webgl", t) || e.getContext("experimental-webgl", t)))) throw new Error("This browser does not support WebGL. Try using the canvas renderer"); return (this.gl = n), this.getExtensions(), this.gl; }), (t.prototype.getExtensions = function () { var e = this.gl; 1 === this.webGLVersion ? Object.assign(this.extensions, { drawBuffers: e.getExtension("WEBGL_draw_buffers"), depthTexture: e.getExtension("WEBGL_depth_texture"), loseContext: e.getExtension("WEBGL_lose_context"), vertexArrayObject: e.getExtension("OES_vertex_array_object") || e.getExtension("MOZ_OES_vertex_array_object") || e.getExtension("WEBKIT_OES_vertex_array_object"), anisotropicFiltering: e.getExtension("EXT_texture_filter_anisotropic"), uint32ElementIndex: e.getExtension("OES_element_index_uint"), floatTexture: e.getExtension("OES_texture_float"), floatTextureLinear: e.getExtension("OES_texture_float_linear"), textureHalfFloat: e.getExtension("OES_texture_half_float"), textureHalfFloatLinear: e.getExtension("OES_texture_half_float_linear") }) : 2 === this.webGLVersion && Object.assign(this.extensions, { anisotropicFiltering: e.getExtension("EXT_texture_filter_anisotropic"), colorBufferFloat: e.getExtension("EXT_color_buffer_float"), floatTextureLinear: e.getExtension("OES_texture_float_linear") }); }), (t.prototype.handleContextLost = function (e) { e.preventDefault(); }), (t.prototype.handleContextRestored = function () { this.renderer.runners.contextChange.emit(this.gl); }), (t.prototype.destroy = function () { var e = this.renderer.view; e.removeEventListener("webglcontextlost", this.handleContextLost), e.removeEventListener("webglcontextrestored", this.handleContextRestored), this.gl.useProgram(null), this.extensions.loseContext && this.extensions.loseContext.loseContext(); }), (t.prototype.postrender = function () { this.renderer.renderingToScreen && this.gl.flush(); }), (t.prototype.validateContext = function (e) { var t = e.getContextAttributes(), n = "WebGL2RenderingContext" in window && e instanceof window.WebGL2RenderingContext; n && (this.webGLVersion = 2), t.stencil || console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly"); var r = n || !!e.getExtension("OES_element_index_uint"); (this.supports.uint32Indices = r), r || console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly"); }), t ); })(Yt), wn = function (e) { (this.framebuffer = e), (this.stencil = null), (this.dirtyId = 0), (this.dirtyFormat = 0), (this.dirtySize = 0), (this.multisample = z.NONE), (this.msaaBuffer = null), (this.blitFramebuffer = null); }, Sn = new He(), Tn = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.managedFramebuffers = []), (n.unknownFramebuffer = new Xt(10, 10)), (n.msaaSamples = null), n; } return ( Pt(t, e), (t.prototype.contextChange = function () { var e = (this.gl = this.renderer.gl); if (((this.CONTEXT_UID = this.renderer.CONTEXT_UID), (this.current = this.unknownFramebuffer), (this.viewport = new He()), (this.hasMRT = !0), (this.writeDepthTexture = !0), this.disposeAll(!0), 1 === this.renderer.context.webGLVersion)) { var t = this.renderer.context.extensions.drawBuffers, n = this.renderer.context.extensions.depthTexture; Y.PREFER_ENV === I.WEBGL_LEGACY && ((t = null), (n = null)), t ? (e.drawBuffers = function (e) { return t.drawBuffersWEBGL(e); }) : ((this.hasMRT = !1), (e.drawBuffers = function () {})), n || (this.writeDepthTexture = !1); } else this.msaaSamples = e.getInternalformatParameter(e.RENDERBUFFER, e.RGBA8, e.SAMPLES); }), (t.prototype.bind = function (e, t) { var n = this.gl; if (e) { var r = e.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(e); this.current !== e && ((this.current = e), n.bindFramebuffer(n.FRAMEBUFFER, r.framebuffer)), r.dirtyId !== e.dirtyId && ((r.dirtyId = e.dirtyId), r.dirtyFormat !== e.dirtyFormat ? ((r.dirtyFormat = e.dirtyFormat), this.updateFramebuffer(e)) : r.dirtySize !== e.dirtySize && ((r.dirtySize = e.dirtySize), this.resizeFramebuffer(e))); for (var i = 0; i < e.colorTextures.length; i++) { var o = e.colorTextures[i]; this.renderer.texture.unbind(o.parentTextureArray || o); } e.depthTexture && this.renderer.texture.unbind(e.depthTexture), t ? this.setViewport(t.x, t.y, t.width, t.height) : this.setViewport(0, 0, e.width, e.height); } else this.current && ((this.current = null), n.bindFramebuffer(n.FRAMEBUFFER, null)), t ? this.setViewport(t.x, t.y, t.width, t.height) : this.setViewport(0, 0, this.renderer.width, this.renderer.height); }), (t.prototype.setViewport = function (e, t, n, r) { var i = this.viewport; (i.width === n && i.height === r && i.x === e && i.y === t) || ((i.x = e), (i.y = t), (i.width = n), (i.height = r), this.gl.viewport(e, t, n, r)); }), Object.defineProperty(t.prototype, "size", { get: function () { return this.current ? { x: 0, y: 0, width: this.current.width, height: this.current.height } : { x: 0, y: 0, width: this.renderer.width, height: this.renderer.height }; }, enumerable: !1, configurable: !0, }), (t.prototype.clear = function (e, t, n, r, i) { void 0 === i && (i = P.COLOR | P.DEPTH); var o = this.gl; o.clearColor(e, t, n, r), o.clear(i); }), (t.prototype.initFramebuffer = function (e) { var t = this.gl, n = new wn(t.createFramebuffer()); return (n.multisample = this.detectSamples(e.multisample)), (e.glFramebuffers[this.CONTEXT_UID] = n), this.managedFramebuffers.push(e), e.disposeRunner.add(this), n; }), (t.prototype.resizeFramebuffer = function (e) { var t = this.gl, n = e.glFramebuffers[this.CONTEXT_UID]; n.stencil && (t.bindRenderbuffer(t.RENDERBUFFER, n.stencil), t.renderbufferStorage(t.RENDERBUFFER, t.DEPTH_STENCIL, e.width, e.height)); for (var r = e.colorTextures, i = 0; i < r.length; i++) this.renderer.texture.bind(r[i], 0); e.depthTexture && this.renderer.texture.bind(e.depthTexture, 0); }), (t.prototype.updateFramebuffer = function (e) { var t = this.gl, n = e.glFramebuffers[this.CONTEXT_UID], r = e.colorTextures.length; t.drawBuffers || (r = Math.min(r, 1)), n.multisample > 1 && ((n.msaaBuffer = t.createRenderbuffer()), t.bindRenderbuffer(t.RENDERBUFFER, n.msaaBuffer), t.renderbufferStorageMultisample(t.RENDERBUFFER, n.multisample, t.RGBA8, e.width, e.height), t.framebufferRenderbuffer(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.RENDERBUFFER, n.msaaBuffer)); for (var i = [], o = 0; o < r; o++) if (!(0 === o && n.multisample > 1)) { var a = e.colorTextures[o], s = a.parentTextureArray || a; this.renderer.texture.bind(s, 0), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0 + o, a.target, s._glTextures[this.CONTEXT_UID].texture, 0), i.push(t.COLOR_ATTACHMENT0 + o); } if ((i.length > 1 && t.drawBuffers(i), e.depthTexture) && this.writeDepthTexture) { var u = e.depthTexture; this.renderer.texture.bind(u, 0), t.framebufferTexture2D(t.FRAMEBUFFER, t.DEPTH_ATTACHMENT, t.TEXTURE_2D, u._glTextures[this.CONTEXT_UID].texture, 0); } n.stencil || (!e.stencil && !e.depth) || ((n.stencil = t.createRenderbuffer()), t.bindRenderbuffer(t.RENDERBUFFER, n.stencil), t.renderbufferStorage(t.RENDERBUFFER, t.DEPTH_STENCIL, e.width, e.height), e.depthTexture || t.framebufferRenderbuffer(t.FRAMEBUFFER, t.DEPTH_STENCIL_ATTACHMENT, t.RENDERBUFFER, n.stencil)); }), (t.prototype.detectSamples = function (e) { var t = this.msaaSamples, n = z.NONE; if (e <= 1 || null === t) return n; for (var r = 0; r < t.length; r++) if (t[r] <= e) { n = t[r]; break; } return 1 === n && (n = z.NONE), n; }), (t.prototype.blit = function (e, t, n) { var r = this, i = r.current, o = r.renderer, a = r.gl, s = r.CONTEXT_UID; if (2 === o.context.webGLVersion && i) { var u = i.glFramebuffers[s]; if (u) { if (!e) { if (u.multisample <= 1) return; u.blitFramebuffer || ((u.blitFramebuffer = new Xt(i.width, i.height)), u.blitFramebuffer.addColorTexture(0, i.colorTextures[0])), ((e = u.blitFramebuffer).width = i.width), (e.height = i.height); } t || (((t = Sn).width = i.width), (t.height = i.height)), n || (n = t); var l = t.width === n.width && t.height === n.height; this.bind(e), a.bindFramebuffer(a.READ_FRAMEBUFFER, u.framebuffer), a.blitFramebuffer(t.x, t.y, t.width, t.height, n.x, n.y, n.width, n.height, a.COLOR_BUFFER_BIT, l ? a.NEAREST : a.LINEAR); } } }), (t.prototype.disposeFramebuffer = function (e, t) { var n = e.glFramebuffers[this.CONTEXT_UID], r = this.gl; if (n) { delete e.glFramebuffers[this.CONTEXT_UID]; var i = this.managedFramebuffers.indexOf(e); i >= 0 && this.managedFramebuffers.splice(i, 1), e.disposeRunner.remove(this), t || (r.deleteFramebuffer(n.framebuffer), n.stencil && r.deleteRenderbuffer(n.stencil)); } }), (t.prototype.disposeAll = function (e) { var t = this.managedFramebuffers; this.managedFramebuffers = []; for (var n = 0; n < t.length; n++) this.disposeFramebuffer(t[n], e); }), (t.prototype.forceStencil = function () { var e = this.current; if (e) { var t = e.glFramebuffers[this.CONTEXT_UID]; if (t && !t.stencil) { e.enableStencil(); var n = e.width, r = e.height, i = this.gl, o = i.createRenderbuffer(); i.bindRenderbuffer(i.RENDERBUFFER, o), i.renderbufferStorage(i.RENDERBUFFER, i.DEPTH_STENCIL, n, r), (t.stencil = o), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.DEPTH_STENCIL_ATTACHMENT, i.RENDERBUFFER, o); } } }), (t.prototype.reset = function () { (this.current = this.unknownFramebuffer), (this.viewport = new He()); }), t ); })(Yt), xn = function (e) { (this.buffer = e || null), (this.updateID = -1), (this.byteLength = -1), (this.refCount = 0); }, En = { 5126: 4, 5123: 2, 5121: 1 }, Ln = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n._activeGeometry = null), (n._activeVao = null), (n.hasVao = !0), (n.hasInstance = !0), (n.canUseUInt32ElementIndex = !1), (n.managedGeometries = {}), (n.managedBuffers = {}), n; } return ( Pt(t, e), (t.prototype.contextChange = function () { this.disposeAll(!0); var e = (this.gl = this.renderer.gl), t = this.renderer.context; if (((this.CONTEXT_UID = this.renderer.CONTEXT_UID), 2 !== t.webGLVersion)) { var n = this.renderer.context.extensions.vertexArrayObject; Y.PREFER_ENV === I.WEBGL_LEGACY && (n = null), n ? ((e.createVertexArray = function () { return n.createVertexArrayOES(); }), (e.bindVertexArray = function (e) { return n.bindVertexArrayOES(e); }), (e.deleteVertexArray = function (e) { return n.deleteVertexArrayOES(e); })) : ((this.hasVao = !1), (e.createVertexArray = function () { return null; }), (e.bindVertexArray = function () { return null; }), (e.deleteVertexArray = function () { return null; })); } if (2 !== t.webGLVersion) { var r = e.getExtension("ANGLE_instanced_arrays"); r ? ((e.vertexAttribDivisor = function (e, t) { return r.vertexAttribDivisorANGLE(e, t); }), (e.drawElementsInstanced = function (e, t, n, i, o) { return r.drawElementsInstancedANGLE(e, t, n, i, o); }), (e.drawArraysInstanced = function (e, t, n, i) { return r.drawArraysInstancedANGLE(e, t, n, i); })) : (this.hasInstance = !1); } this.canUseUInt32ElementIndex = 2 === t.webGLVersion || !!t.extensions.uint32ElementIndex; }), (t.prototype.bind = function (e, t) { t = t || this.renderer.shader.shader; var n = this.gl, r = e.glVertexArrayObjects[this.CONTEXT_UID], i = !1; r || ((this.managedGeometries[e.id] = e), e.disposeRunner.add(this), (e.glVertexArrayObjects[this.CONTEXT_UID] = r = {}), (i = !0)); var o = r[t.program.id] || this.initGeometryVao(e, t.program, i); (this._activeGeometry = e), this._activeVao !== o && ((this._activeVao = o), this.hasVao ? n.bindVertexArray(o) : this.activateVao(e, t.program)), this.updateBuffers(); }), (t.prototype.reset = function () { this.unbind(); }), (t.prototype.updateBuffers = function () { for (var e = this._activeGeometry, t = this.gl, n = 0; n < e.buffers.length; n++) { var r = e.buffers[n], i = r._glBuffers[this.CONTEXT_UID]; if (r._updateID !== i.updateID) { i.updateID = r._updateID; var o = r.index ? t.ELEMENT_ARRAY_BUFFER : t.ARRAY_BUFFER; if ((t.bindBuffer(o, i.buffer), (this._boundBuffer = i), i.byteLength >= r.data.byteLength)) t.bufferSubData(o, 0, r.data); else { var a = r.static ? t.STATIC_DRAW : t.DYNAMIC_DRAW; (i.byteLength = r.data.byteLength), t.bufferData(o, r.data, a); } } } }), (t.prototype.checkCompatibility = function (e, t) { var n = e.attributes, r = t.attributeData; for (var i in r) if (!n[i]) throw new Error('shader and geometry incompatible, geometry missing the "' + i + '" attribute'); }), (t.prototype.getSignature = function (e, t) { var n = e.attributes, r = t.attributeData, i = ["g", e.id]; for (var o in n) r[o] && i.push(o); return i.join("-"); }), (t.prototype.initGeometryVao = function (e, t, n) { void 0 === n && (n = !0), this.checkCompatibility(e, t); var r = this.gl, i = this.CONTEXT_UID, o = this.getSignature(e, t), a = e.glVertexArrayObjects[this.CONTEXT_UID], s = a[o]; if (s) return (a[t.id] = s), s; var u = e.buffers, l = e.attributes, c = {}, d = {}; for (var h in u) (c[h] = 0), (d[h] = 0); for (var h in l) !l[h].size && t.attributeData[h] ? (l[h].size = t.attributeData[h].size) : l[h].size || console.warn("PIXI Geometry attribute '" + h + "' size cannot be determined (likely the bound shader does not have the attribute)"), (c[l[h].buffer] += l[h].size * En[l[h].type]); for (var h in l) { var p = l[h], f = p.size; void 0 === p.stride && (c[p.buffer] === f * En[p.type] ? (p.stride = 0) : (p.stride = c[p.buffer])), void 0 === p.start && ((p.start = d[p.buffer]), (d[p.buffer] += f * En[p.type])); } (s = r.createVertexArray()), r.bindVertexArray(s); for (var _ = 0; _ < u.length; _++) { var g = u[_]; g._glBuffers[i] || ((g._glBuffers[i] = new xn(r.createBuffer())), (this.managedBuffers[g.id] = g), g.disposeRunner.add(this)), n && g._glBuffers[i].refCount++; } return this.activateVao(e, t), (this._activeVao = s), (a[t.id] = s), (a[o] = s), s; }), (t.prototype.disposeBuffer = function (e, t) { if (this.managedBuffers[e.id]) { delete this.managedBuffers[e.id]; var n = e._glBuffers[this.CONTEXT_UID], r = this.gl; e.disposeRunner.remove(this), n && (t || r.deleteBuffer(n.buffer), delete e._glBuffers[this.CONTEXT_UID]); } }), (t.prototype.disposeGeometry = function (e, t) { if (this.managedGeometries[e.id]) { delete this.managedGeometries[e.id]; var n = e.glVertexArrayObjects[this.CONTEXT_UID], r = this.gl, i = e.buffers; if ((e.disposeRunner.remove(this), n)) { for (var o = 0; o < i.length; o++) { var a = i[o]._glBuffers[this.CONTEXT_UID]; a.refCount--, 0 !== a.refCount || t || this.disposeBuffer(i[o], t); } if (!t) for (var s in n) if ("g" === s[0]) { var u = n[s]; this._activeVao === u && this.unbind(), r.deleteVertexArray(u); } delete e.glVertexArrayObjects[this.CONTEXT_UID]; } } }), (t.prototype.disposeAll = function (e) { for (var t = Object.keys(this.managedGeometries), n = 0; n < t.length; n++) this.disposeGeometry(this.managedGeometries[t[n]], e); t = Object.keys(this.managedBuffers); for (n = 0; n < t.length; n++) this.disposeBuffer(this.managedBuffers[t[n]], e); }), (t.prototype.activateVao = function (e, t) { var n = this.gl, r = this.CONTEXT_UID, i = e.buffers, o = e.attributes; e.indexBuffer && n.bindBuffer(n.ELEMENT_ARRAY_BUFFER, e.indexBuffer._glBuffers[r].buffer); var a = null; for (var s in o) { var u = o[s], l = i[u.buffer]._glBuffers[r]; if (t.attributeData[s]) { a !== l && (n.bindBuffer(n.ARRAY_BUFFER, l.buffer), (a = l)); var c = t.attributeData[s].location; if ((n.enableVertexAttribArray(c), n.vertexAttribPointer(c, u.size, u.type || n.FLOAT, u.normalized, u.stride, u.start), u.instance)) { if (!this.hasInstance) throw new Error("geometry error, GPU Instancing is not supported on this device"); n.vertexAttribDivisor(c, 1); } } } }), (t.prototype.draw = function (e, t, n, r) { var i = this.gl, o = this._activeGeometry; if (o.indexBuffer) { var a = o.indexBuffer.data.BYTES_PER_ELEMENT, s = 2 === a ? i.UNSIGNED_SHORT : i.UNSIGNED_INT; 2 === a || (4 === a && this.canUseUInt32ElementIndex) ? (o.instanced ? i.drawElementsInstanced(e, t || o.indexBuffer.data.length, s, (n || 0) * a, r || 1) : i.drawElements(e, t || o.indexBuffer.data.length, s, (n || 0) * a)) : console.warn("unsupported index buffer type: uint32"); } else o.instanced ? i.drawArraysInstanced(e, n, t || o.getSize(), r || 1) : i.drawArrays(e, n, t || o.getSize()); return this; }), (t.prototype.unbind = function () { this.gl.bindVertexArray(null), (this._activeVao = null), (this._activeGeometry = null); }), t ); })(Yt), An = (function () { function e(e) { void 0 === e && (e = null), (this.type = Z.NONE), (this.autoDetect = !0), (this.maskObject = e || null), (this.pooled = !1), (this.isMaskData = !0), (this._stencilCounter = 0), (this._scissorCounter = 0), (this._scissorRect = null), (this._target = null); } return ( (e.prototype.reset = function () { this.pooled && ((this.maskObject = null), (this.type = Z.NONE), (this.autoDetect = !0)), (this._target = null); }), (e.prototype.copyCountersOrReset = function (e) { e ? ((this._stencilCounter = e._stencilCounter), (this._scissorCounter = e._scissorCounter), (this._scissorRect = e._scissorRect)) : ((this._stencilCounter = 0), (this._scissorCounter = 0), (this._scissorRect = null)); }), e ); })(); function In(e, t, n) { var r = e.createShader(t); return e.shaderSource(r, n), e.compileShader(r), r; } function Mn(e, t, n, r) { var i = In(e, e.VERTEX_SHADER, t), o = In(e, e.FRAGMENT_SHADER, n), a = e.createProgram(); if ((e.attachShader(a, i), e.attachShader(a, o), r)) for (var s in r) e.bindAttribLocation(a, r[s], s); return e.linkProgram(a), e.getProgramParameter(a, e.LINK_STATUS) || (e.getShaderParameter(i, e.COMPILE_STATUS) || (console.warn(t), console.error(e.getShaderInfoLog(i))), e.getShaderParameter(o, e.COMPILE_STATUS) || (console.warn(n), console.error(e.getShaderInfoLog(o))), console.error("Pixi.js Error: Could not initialize shader."), console.error("gl.VALIDATE_STATUS", e.getProgramParameter(a, e.VALIDATE_STATUS)), console.error("gl.getError()", e.getError()), "" !== e.getProgramInfoLog(a) && console.warn("Pixi.js Warning: gl.getProgramInfoLog()", e.getProgramInfoLog(a)), e.deleteProgram(a), (a = null)), e.deleteShader(i), e.deleteShader(o), a; } function Pn(e) { for (var t = new Array(e), n = 0; n < t.length; n++) t[n] = !1; return t; } function On(e, t) { switch (e) { case "float": case "int": case "sampler2D": case "sampler2DArray": return 0; case "vec2": return new Float32Array(2 * t); case "vec3": return new Float32Array(3 * t); case "vec4": return new Float32Array(4 * t); case "ivec2": return new Int32Array(2 * t); case "ivec3": return new Int32Array(3 * t); case "ivec4": return new Int32Array(4 * t); case "bool": return !1; case "bvec2": return Pn(2 * t); case "bvec3": return Pn(3 * t); case "bvec4": return Pn(4 * t); case "mat2": return new Float32Array([1, 0, 0, 1]); case "mat3": return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); case "mat4": return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]); } return null; } var kn, Rn = {}, Dn = Rn; function Nn() { if (Dn === Rn || (Dn && Dn.isContextLost())) { var e = document.createElement("canvas"), t = void 0; Y.PREFER_ENV >= I.WEBGL2 && (t = e.getContext("webgl2", {})), t || ((t = e.getContext("webgl", {}) || e.getContext("experimental-webgl", {})) ? t.getExtension("WEBGL_draw_buffers") : (t = null)), (Dn = t); } return Dn; } function Bn(e, t, n) { if ("precision" !== e.substring(0, 9)) { var r = t; return t === V.HIGH && n !== V.HIGH && (r = V.MEDIUM), "precision " + r + " float;\n" + e; } return n !== V.HIGH && "precision highp" === e.substring(0, 15) ? e.replace("precision highp", "precision mediump") : e; } var Fn = { float: 1, vec2: 2, vec3: 3, vec4: 4, int: 1, ivec2: 2, ivec3: 3, ivec4: 4, bool: 1, bvec2: 2, bvec3: 3, bvec4: 4, mat2: 4, mat3: 9, mat4: 16, sampler2D: 1 }; function Un(e) { return Fn[e]; } var jn = null, Gn = { FLOAT: "float", FLOAT_VEC2: "vec2", FLOAT_VEC3: "vec3", FLOAT_VEC4: "vec4", INT: "int", INT_VEC2: "ivec2", INT_VEC3: "ivec3", INT_VEC4: "ivec4", BOOL: "bool", BOOL_VEC2: "bvec2", BOOL_VEC3: "bvec3", BOOL_VEC4: "bvec4", FLOAT_MAT2: "mat2", FLOAT_MAT3: "mat3", FLOAT_MAT4: "mat4", SAMPLER_2D: "sampler2D", INT_SAMPLER_2D: "sampler2D", UNSIGNED_INT_SAMPLER_2D: "sampler2D", SAMPLER_CUBE: "samplerCube", INT_SAMPLER_CUBE: "samplerCube", UNSIGNED_INT_SAMPLER_CUBE: "samplerCube", SAMPLER_2D_ARRAY: "sampler2DArray", INT_SAMPLER_2D_ARRAY: "sampler2DArray", UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray" }; function Hn(e, t) { if (!jn) { var n = Object.keys(Gn); jn = {}; for (var r = 0; r < n.length; ++r) { var i = n[r]; jn[e[i]] = Gn[i]; } } return jn[t]; } var Vn = [ { test: function (e) { return "float" === e.type && 1 === e.size; }, code: function (e) { return '\n if(uv["' + e + '"] !== ud["' + e + '"].value)\n {\n ud["' + e + '"].value = uv["' + e + '"]\n gl.uniform1f(ud["' + e + '"].location, uv["' + e + '"])\n }\n '; }, }, { test: function (e) { return ("sampler2D" === e.type || "samplerCube" === e.type || "sampler2DArray" === e.type) && 1 === e.size && !e.isArray; }, code: function (e) { return 't = syncData.textureCount++;\n\n renderer.texture.bind(uv["' + e + '"], t);\n\n if(ud["' + e + '"].value !== t)\n {\n ud["' + e + '"].value = t;\n gl.uniform1i(ud["' + e + '"].location, t);\n; // eslint-disable-line max-len\n }'; }, }, { test: function (e, t) { return "mat3" === e.type && 1 === e.size && void 0 !== t.a; }, code: function (e) { return '\n gl.uniformMatrix3fv(ud["' + e + '"].location, false, uv["' + e + '"].toArray(true));\n '; }, }, { test: function (e, t) { return "vec2" === e.type && 1 === e.size && void 0 !== t.x; }, code: function (e) { return '\n cv = ud["' + e + '"].value;\n v = uv["' + e + '"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["' + e + '"].location, v.x, v.y);\n }'; }, }, { test: function (e) { return "vec2" === e.type && 1 === e.size; }, code: function (e) { return '\n cv = ud["' + e + '"].value;\n v = uv["' + e + '"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["' + e + '"].location, v[0], v[1]);\n }\n '; }, }, { test: function (e, t) { return "vec4" === e.type && 1 === e.size && void 0 !== t.width; }, code: function (e) { return '\n cv = ud["' + e + '"].value;\n v = uv["' + e + '"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["' + e + '"].location, v.x, v.y, v.width, v.height)\n }'; }, }, { test: function (e) { return "vec4" === e.type && 1 === e.size; }, code: function (e) { return '\n cv = ud["' + e + '"].value;\n v = uv["' + e + '"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["' + e + '"].location, v[0], v[1], v[2], v[3])\n }'; }, }, ], Zn = { float: "\n if(cv !== v)\n {\n cv.v = v;\n gl.uniform1f(location, v)\n }", vec2: "\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1])\n }", vec3: "\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }", vec4: "gl.uniform4f(location, v[0], v[1], v[2], v[3])", int: "gl.uniform1i(location, v)", ivec2: "gl.uniform2i(location, v[0], v[1])", ivec3: "gl.uniform3i(location, v[0], v[1], v[2])", ivec4: "gl.uniform4i(location, v[0], v[1], v[2], v[3])", bool: "gl.uniform1i(location, v)", bvec2: "gl.uniform2i(location, v[0], v[1])", bvec3: "gl.uniform3i(location, v[0], v[1], v[2])", bvec4: "gl.uniform4i(location, v[0], v[1], v[2], v[3])", mat2: "gl.uniformMatrix2fv(location, false, v)", mat3: "gl.uniformMatrix3fv(location, false, v)", mat4: "gl.uniformMatrix4fv(location, false, v)", sampler2D: "gl.uniform1i(location, v)", samplerCube: "gl.uniform1i(location, v)", sampler2DArray: "gl.uniform1i(location, v)" }, zn = { float: "gl.uniform1fv(location, v)", vec2: "gl.uniform2fv(location, v)", vec3: "gl.uniform3fv(location, v)", vec4: "gl.uniform4fv(location, v)", mat4: "gl.uniformMatrix4fv(location, false, v)", mat3: "gl.uniformMatrix3fv(location, false, v)", mat2: "gl.uniformMatrix2fv(location, false, v)", int: "gl.uniform1iv(location, v)", ivec2: "gl.uniform2iv(location, v)", ivec3: "gl.uniform3iv(location, v)", ivec4: "gl.uniform4iv(location, v)", bool: "gl.uniform1iv(location, v)", bvec2: "gl.uniform2iv(location, v)", bvec3: "gl.uniform3iv(location, v)", bvec4: "gl.uniform4iv(location, v)", sampler2D: "gl.uniform1iv(location, v)", samplerCube: "gl.uniform1iv(location, v)", sampler2DArray: "gl.uniform1iv(location, v)" }; var Yn, Wn = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join("\n"); function Xn(e) { for (var t = "", n = 0; n < e; ++n) n > 0 && (t += "\nelse "), n < e - 1 && (t += "if(test == " + n + ".0){}"); return t; } function qn(e, t) { if (0 === e) throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`"); for (var n = t.createShader(t.FRAGMENT_SHADER); ; ) { var r = Wn.replace(/%forloop%/gi, Xn(e)); if ((t.shaderSource(n, r), t.compileShader(n), t.getShaderParameter(n, t.COMPILE_STATUS))) break; e = (e / 2) | 0; } return e; } var Kn = 0, $n = {}, Jn = (function () { function e(t, n, r) { void 0 === r && (r = "pixi-shader"), (this.id = Kn++), (this.vertexSrc = t || e.defaultVertexSrc), (this.fragmentSrc = n || e.defaultFragmentSrc), (this.vertexSrc = this.vertexSrc.trim()), (this.fragmentSrc = this.fragmentSrc.trim()), "#version" !== this.vertexSrc.substring(0, 8) && ((r = r.replace(/\s+/g, "-")), $n[r] ? ($n[r]++, (r += "-" + $n[r])) : ($n[r] = 1), (this.vertexSrc = "#define SHADER_NAME " + r + "\n" + this.vertexSrc), (this.fragmentSrc = "#define SHADER_NAME " + r + "\n" + this.fragmentSrc), (this.vertexSrc = Bn(this.vertexSrc, Y.PRECISION_VERTEX, V.HIGH)), (this.fragmentSrc = Bn( this.fragmentSrc, Y.PRECISION_FRAGMENT, (function () { if (!kn) { kn = V.MEDIUM; var e = Nn(); if (e && e.getShaderPrecisionFormat) { var t = e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.HIGH_FLOAT); kn = t.precision ? V.HIGH : V.MEDIUM; } } return kn; })() ))), this.extractData(this.vertexSrc, this.fragmentSrc), (this.glPrograms = {}), (this.syncUniforms = null); } return ( (e.prototype.extractData = function (e, t) { var n = Nn(); if (n) { var r = Mn(n, e, t); (this.attributeData = this.getAttributeData(r, n)), (this.uniformData = this.getUniformData(r, n)), n.deleteProgram(r); } else (this.uniformData = {}), (this.attributeData = {}); }), (e.prototype.getAttributeData = function (e, t) { for (var n = {}, r = [], i = t.getProgramParameter(e, t.ACTIVE_ATTRIBUTES), o = 0; o < i; o++) { var a = t.getActiveAttrib(e, o), s = Hn(t, a.type), u = { type: s, name: a.name, size: Un(s), location: 0 }; (n[a.name] = u), r.push(u); } r.sort(function (e, t) { return e.name > t.name ? 1 : -1; }); for (o = 0; o < r.length; o++) r[o].location = o; return n; }), (e.prototype.getUniformData = function (e, t) { for (var n = {}, r = t.getProgramParameter(e, t.ACTIVE_UNIFORMS), i = 0; i < r; i++) { var o = t.getActiveUniform(e, i), a = o.name.replace(/\[.*?\]$/, ""), s = o.name.match(/\[.*?\]$/), u = Hn(t, o.type); n[a] = { type: u, size: o.size, isArray: s, value: On(u, o.size) }; } return n; }), Object.defineProperty(e, "defaultVertexSrc", { get: function () { return "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n"; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e, "defaultFragmentSrc", { get: function () { return "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"; }, enumerable: !1, configurable: !0, }), (e.from = function (t, n, r) { var i = t + n, o = Ee[i]; return o || (Ee[i] = o = new e(t, n, r)), o; }), e ); })(), Qn = (function () { function e(e, t) { for (var n in ((this.program = e), (this.uniformGroup = t ? (t instanceof _n ? t : new _n(t)) : new _n({})), e.uniformData)) this.uniformGroup.uniforms[n] instanceof Array && (this.uniformGroup.uniforms[n] = new Float32Array(this.uniformGroup.uniforms[n])); } return ( (e.prototype.checkUniformExists = function (e, t) { if (t.uniforms[e]) return !0; for (var n in t.uniforms) { var r = t.uniforms[n]; if (r.group && this.checkUniformExists(e, r)) return !0; } return !1; }), (e.prototype.destroy = function () { this.uniformGroup = null; }), Object.defineProperty(e.prototype, "uniforms", { get: function () { return this.uniformGroup.uniforms; }, enumerable: !1, configurable: !0, }), (e.from = function (t, n, r) { return new e(Jn.from(t, n), r); }), e ); })(), er = (function () { function e() { (this.data = 0), (this.blendMode = O.NORMAL), (this.polygonOffset = 0), (this.blend = !0); } return ( Object.defineProperty(e.prototype, "blend", { get: function () { return !!(1 & this.data); }, set: function (e) { !!(1 & this.data) !== e && (this.data ^= 1); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "offsets", { get: function () { return !!(2 & this.data); }, set: function (e) { !!(2 & this.data) !== e && (this.data ^= 2); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "culling", { get: function () { return !!(4 & this.data); }, set: function (e) { !!(4 & this.data) !== e && (this.data ^= 4); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "depthTest", { get: function () { return !!(8 & this.data); }, set: function (e) { !!(8 & this.data) !== e && (this.data ^= 8); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "clockwiseFrontFace", { get: function () { return !!(16 & this.data); }, set: function (e) { !!(16 & this.data) !== e && (this.data ^= 16); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "blendMode", { get: function () { return this._blendMode; }, set: function (e) { (this.blend = e !== O.NONE), (this._blendMode = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "polygonOffset", { get: function () { return this._polygonOffset; }, set: function (e) { (this.offsets = !!e), (this._polygonOffset = e); }, enumerable: !1, configurable: !0, }), (e.for2d = function () { var t = new e(); return (t.depthTest = !1), (t.blend = !0), t; }), e ); })(), tr = (function (e) { function t(n, r, i) { var o = this, a = Jn.from(n || t.defaultVertexSrc, r || t.defaultFragmentSrc); return ((o = e.call(this, a, i) || this).padding = 0), (o.resolution = Y.FILTER_RESOLUTION), (o.enabled = !0), (o.autoFit = !0), (o.legacy = !!o.program.attributeData.aTextureCoord), (o.state = new er()), o; } return ( Pt(t, e), (t.prototype.apply = function (e, t, n, r, i) { e.applyFilter(this, t, n, r); }), Object.defineProperty(t.prototype, "blendMode", { get: function () { return this.state.blendMode; }, set: function (e) { this.state.blendMode = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t, "defaultVertexSrc", { get: function () { return "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n"; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t, "defaultFragmentSrc", { get: function () { return "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"; }, enumerable: !1, configurable: !0, }), t ); })(Qn), nr = new qe(), rr = (function () { function e(e, t) { (this._texture = e), (this.mapCoord = new qe()), (this.uClampFrame = new Float32Array(4)), (this.uClampOffset = new Float32Array(2)), (this._textureID = -1), (this._updateID = 0), (this.clampOffset = 0), (this.clampMargin = void 0 === t ? 0.5 : t), (this.isSimple = !1); } return ( Object.defineProperty(e.prototype, "texture", { get: function () { return this._texture; }, set: function (e) { (this._texture = e), (this._textureID = -1); }, enumerable: !1, configurable: !0, }), (e.prototype.multiplyUvs = function (e, t) { void 0 === t && (t = e); for (var n = this.mapCoord, r = 0; r < e.length; r += 2) { var i = e[r], o = e[r + 1]; (t[r] = i * n.a + o * n.c + n.tx), (t[r + 1] = i * n.b + o * n.d + n.ty); } return t; }), (e.prototype.update = function (e) { var t = this._texture; if (!t || !t.valid) return !1; if (!e && this._textureID === t._updateID) return !1; (this._textureID = t._updateID), this._updateID++; var n = t._uvs; this.mapCoord.set(n.x1 - n.x0, n.y1 - n.y0, n.x3 - n.x0, n.y3 - n.y0, n.x0, n.y0); var r = t.orig, i = t.trim; i && (nr.set(r.width / i.width, 0, 0, r.height / i.height, -i.x / i.width, -i.y / i.height), this.mapCoord.append(nr)); var o = t.baseTexture, a = this.uClampFrame, s = this.clampMargin / o.resolution, u = this.clampOffset; return (a[0] = (t._frame.x + s + u) / o.width), (a[1] = (t._frame.y + s + u) / o.height), (a[2] = (t._frame.x + t._frame.width - s + u) / o.width), (a[3] = (t._frame.y + t._frame.height - s + u) / o.height), (this.uClampOffset[0] = u / o.realWidth), (this.uClampOffset[1] = u / o.realHeight), (this.isSimple = t._frame.width === o.width && t._frame.height === o.height && 0 === t.rotate), !0; }), e ); })(), ir = (function (e) { function t(t) { var n = this, r = new qe(); return (n = e.call(this, "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n", "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n") || this), (t.renderable = !1), (n.maskSprite = t), (n.maskMatrix = r), n; } return ( Pt(t, e), (t.prototype.apply = function (e, t, n, r) { var i = this.maskSprite, o = i._texture; o.valid && (o.uvMatrix || (o.uvMatrix = new rr(o, 0)), o.uvMatrix.update(), (this.uniforms.npmAlpha = o.baseTexture.alphaMode ? 0 : 1), (this.uniforms.mask = o), (this.uniforms.otherMatrix = e.calculateSpriteMatrix(this.maskMatrix, i).prepend(o.uvMatrix.mapCoord)), (this.uniforms.alpha = i.worldAlpha), (this.uniforms.maskClamp = o.uvMatrix.uClampFrame), e.applyFilter(this, t, n, r)); }), t ); })(tr), or = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.enableScissor = !1), (n.alphaMaskPool = []), (n.maskDataPool = []), (n.maskStack = []), (n.alphaMaskIndex = 0), n; } return ( Pt(t, e), (t.prototype.setMaskStack = function (e) { (this.maskStack = e), this.renderer.scissor.setMaskStack(e), this.renderer.stencil.setMaskStack(e); }), (t.prototype.push = function (e, t) { var n = t; if (!n.isMaskData) { var r = this.maskDataPool.pop() || new An(); (r.pooled = !0), (r.maskObject = t), (n = r); } switch ((n.autoDetect && this.detect(n), n.copyCountersOrReset(this.maskStack[this.maskStack.length - 1]), (n._target = e), n.type)) { case Z.SCISSOR: this.maskStack.push(n), this.renderer.scissor.push(n); break; case Z.STENCIL: this.maskStack.push(n), this.renderer.stencil.push(n); break; case Z.SPRITE: n.copyCountersOrReset(null), this.pushSpriteMask(n), this.maskStack.push(n); } }), (t.prototype.pop = function (e) { var t = this.maskStack.pop(); if (t && t._target === e) { switch (t.type) { case Z.SCISSOR: this.renderer.scissor.pop(); break; case Z.STENCIL: this.renderer.stencil.pop(t.maskObject); break; case Z.SPRITE: this.popSpriteMask(); } t.reset(), t.pooled && this.maskDataPool.push(t); } }), (t.prototype.detect = function (e) { var t = e.maskObject; if (t.isSprite) e.type = Z.SPRITE; else if (((e.type = Z.STENCIL), this.enableScissor && t.isFastRect && t.isFastRect())) { var n = t.worldTransform, r = Math.atan2(n.b, n.a), i = Math.atan2(n.d, n.c); (r = Math.round(r * (180 / Math.PI) * 100)), (i = (((i = Math.round(i * (180 / Math.PI) * 100) - r) % 18e3) + 18e3) % 18e3), 0 === (r = ((r % 9e3) + 9e3) % 9e3) && 9e3 === i && (e.type = Z.SCISSOR); } }), (t.prototype.pushSpriteMask = function (e) { var t = e.maskObject, n = e._target, r = this.alphaMaskPool[this.alphaMaskIndex]; r || (r = this.alphaMaskPool[this.alphaMaskIndex] = [new ir(t)]), (r[0].resolution = this.renderer.resolution), (r[0].maskSprite = t); var i = n.filterArea; (n.filterArea = t.getBounds(!0)), this.renderer.filter.push(n, r), (n.filterArea = i), this.alphaMaskIndex++; }), (t.prototype.popSpriteMask = function () { this.renderer.filter.pop(), this.alphaMaskIndex--; }), t ); })(Yt), ar = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.maskStack = []), (n.glConst = 0), n; } return ( Pt(t, e), (t.prototype.getStackLength = function () { return this.maskStack.length; }), (t.prototype.setMaskStack = function (e) { var t = this.renderer.gl, n = this.getStackLength(); this.maskStack = e; var r = this.getStackLength(); r !== n && (0 === r ? t.disable(this.glConst) : (t.enable(this.glConst), this._useCurrent())); }), (t.prototype._useCurrent = function () {}), (t.prototype.destroy = function () { e.prototype.destroy.call(this), (this.maskStack = null); }), t ); })(Yt), sr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.glConst = WebGLRenderingContext.SCISSOR_TEST), n; } return ( Pt(t, e), (t.prototype.getStackLength = function () { var e = this.maskStack[this.maskStack.length - 1]; return e ? e._scissorCounter : 0; }), (t.prototype.push = function (e) { var t = e.maskObject; t.renderable = !0; var n = e._scissorRect, r = t.getBounds(!0), i = this.renderer.gl; (t.renderable = !1), n ? r.fit(n) : i.enable(i.SCISSOR_TEST), e._scissorCounter++, (e._scissorRect = r), this._useCurrent(); }), (t.prototype.pop = function () { var e = this.renderer.gl; this.getStackLength() > 0 ? this._useCurrent() : e.disable(e.SCISSOR_TEST); }), (t.prototype._useCurrent = function () { var e = this.maskStack[this.maskStack.length - 1]._scissorRect, t = this.renderer.renderTexture.current, n = this.renderer.projection, r = n.transform, i = n.sourceFrame, o = n.destinationFrame, a = t ? t.resolution : this.renderer.resolution, s = (e.x - i.x) * a + o.x, u = (e.y - i.y) * a + o.y, l = e.width * a, c = e.height * a; r && ((s += r.tx * a), (u += r.ty * a)), t || (u = this.renderer.height - c - u), this.renderer.gl.scissor(s, u, l, c); }), t ); })(ar), ur = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.glConst = WebGLRenderingContext.STENCIL_TEST), n; } return ( Pt(t, e), (t.prototype.getStackLength = function () { var e = this.maskStack[this.maskStack.length - 1]; return e ? e._stencilCounter : 0; }), (t.prototype.push = function (e) { var t = e.maskObject, n = this.renderer.gl, r = e._stencilCounter; 0 === r && (this.renderer.framebuffer.forceStencil(), n.enable(n.STENCIL_TEST)), e._stencilCounter++, n.colorMask(!1, !1, !1, !1), n.stencilFunc(n.EQUAL, r, this._getBitwiseMask()), n.stencilOp(n.KEEP, n.KEEP, n.INCR), (t.renderable = !0), t.render(this.renderer), this.renderer.batch.flush(), (t.renderable = !1), this._useCurrent(); }), (t.prototype.pop = function (e) { var t = this.renderer.gl; 0 === this.getStackLength() ? (t.disable(t.STENCIL_TEST), t.clear(t.STENCIL_BUFFER_BIT), t.clearStencil(0)) : (t.colorMask(!1, !1, !1, !1), t.stencilOp(t.KEEP, t.KEEP, t.DECR), (e.renderable = !0), e.render(this.renderer), this.renderer.batch.flush(), (e.renderable = !1), this._useCurrent()); }), (t.prototype._useCurrent = function () { var e = this.renderer.gl; e.colorMask(!0, !0, !0, !0), e.stencilFunc(e.EQUAL, this.getStackLength(), this._getBitwiseMask()), e.stencilOp(e.KEEP, e.KEEP, e.KEEP); }), (t.prototype._getBitwiseMask = function () { return (1 << this.getStackLength()) - 1; }), t ); })(ar), lr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.destinationFrame = null), (n.sourceFrame = null), (n.defaultFrame = null), (n.projectionMatrix = new qe()), (n.transform = null), n; } return ( Pt(t, e), (t.prototype.update = function (e, t, n, r) { (this.destinationFrame = e || this.destinationFrame || this.defaultFrame), (this.sourceFrame = t || this.sourceFrame || e), this.calculateProjection(this.destinationFrame, this.sourceFrame, n, r), this.transform && this.projectionMatrix.append(this.transform); var i = this.renderer; (i.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix), i.globalUniforms.update(), i.shader.shader && i.shader.syncUniformGroup(i.shader.shader.uniforms.globals); }), (t.prototype.calculateProjection = function (e, t, n, r) { var i = this.projectionMatrix, o = r ? -1 : 1; i.identity(), (i.a = (1 / t.width) * 2), (i.d = o * ((1 / t.height) * 2)), (i.tx = -1 - t.x * i.a), (i.ty = -o - t.y * i.d); }), (t.prototype.setTransform = function (e) {}), t ); })(Yt), cr = new He(), dr = new He(), hr = new He(), pr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.clearColor = t._backgroundColorRgba), (n.defaultMaskStack = []), (n.current = null), (n.sourceFrame = new He()), (n.destinationFrame = new He()), n; } return ( Pt(t, e), (t.prototype.bind = function (e, t, n) { void 0 === e && (e = null); var r, i, o, a = this.renderer; (this.current = e), e ? ((o = (r = e.baseTexture).resolution), t || ((cr.width = e.frame.width), (cr.height = e.frame.height), (t = cr)), n || ((dr.x = e.frame.x), (dr.y = e.frame.y), (dr.width = t.width), (dr.height = t.height), (n = dr)), (i = r.framebuffer)) : ((o = a.resolution), t || ((cr.width = a.screen.width), (cr.height = a.screen.height), (t = cr)), n || (((n = cr).width = t.width), (n.height = t.height))), (hr.x = n.x * o), (hr.y = n.y * o), (hr.width = n.width * o), (hr.height = n.height * o), this.renderer.framebuffer.bind(i, hr), this.renderer.projection.update(n, t, o, !i), e ? this.renderer.mask.setMaskStack(r.maskStack) : this.renderer.mask.setMaskStack(this.defaultMaskStack), this.sourceFrame.copyFrom(t), this.destinationFrame.copyFrom(n); }), (t.prototype.clear = function (e, t) { (e = this.current ? e || this.current.baseTexture.clearColor : e || this.clearColor), this.renderer.framebuffer.clear(e[0], e[1], e[2], e[3], t); }), (t.prototype.resize = function () { this.bind(null); }), (t.prototype.reset = function () { this.bind(null); }), t ); })(Yt), fr = function () {}, _r = (function () { function e(e, t) { (this.program = e), (this.uniformData = t), (this.uniformGroups = {}); } return ( (e.prototype.destroy = function () { (this.uniformData = null), (this.uniformGroups = null), (this.program = null); }), e ); })(), gr = 0, mr = { textureCount: 0 }, vr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.destroyed = !1), n.systemCheck(), (n.gl = null), (n.shader = null), (n.program = null), (n.cache = {}), (n.id = gr++), n; } return ( Pt(t, e), (t.prototype.systemCheck = function () { if ( !(function () { if ("boolean" == typeof Yn) return Yn; try { var e = new Function("param1", "param2", "param3", "return param1[param2] === param3;"); Yn = !0 === e({ a: "b" }, "a", "b"); } catch (e) { Yn = !1; } return Yn; })() ) throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support."); }), (t.prototype.contextChange = function (e) { (this.gl = e), this.reset(); }), (t.prototype.bind = function (e, t) { e.uniforms.globals = this.renderer.globalUniforms; var n = e.program, r = n.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(e); return (this.shader = e), this.program !== n && ((this.program = n), this.gl.useProgram(r.program)), t || ((mr.textureCount = 0), this.syncUniformGroup(e.uniformGroup, mr)), r; }), (t.prototype.setUniforms = function (e) { var t = this.shader.program, n = t.glPrograms[this.renderer.CONTEXT_UID]; t.syncUniforms(n.uniformData, e, this.renderer); }), (t.prototype.syncUniformGroup = function (e, t) { var n = this.getglProgram(); (e.static && e.dirtyId === n.uniformGroups[e.id]) || ((n.uniformGroups[e.id] = e.dirtyId), this.syncUniforms(e, n, t)); }), (t.prototype.syncUniforms = function (e, t, n) { (e.syncUniforms[this.shader.program.id] || this.createSyncGroups(e))(t.uniformData, e.uniforms, this.renderer, n); }), (t.prototype.createSyncGroups = function (e) { var t = this.getSignature(e, this.shader.program.uniformData); return ( this.cache[t] || (this.cache[t] = (function (e, t) { var n = ["\n var v = null;\n var cv = null\n var t = 0;\n var gl = renderer.gl\n "]; for (var r in e.uniforms) { var i = t[r]; if (i) { for (var o = e.uniforms[r], a = !1, s = 0; s < Vn.length; s++) if (Vn[s].test(i, o)) { n.push(Vn[s].code(r, o)), (a = !0); break; } if (!a) { var u = (1 === i.size ? Zn : zn)[i.type].replace("location", 'ud["' + r + '"].location'); n.push('\n cv = ud["' + r + '"].value;\n v = uv["' + r + '"];\n ' + u + ";"); } } else e.uniforms[r].group && n.push('\n renderer.shader.syncUniformGroup(uv["' + r + '"], syncData);\n '); } return new Function("ud", "uv", "renderer", "syncData", n.join("\n")); })(e, this.shader.program.uniformData)), (e.syncUniforms[this.shader.program.id] = this.cache[t]), e.syncUniforms[this.shader.program.id] ); }), (t.prototype.getSignature = function (e, t) { var n = e.uniforms, r = []; for (var i in n) r.push(i), t[i] && r.push(t[i].type); return r.join("-"); }), (t.prototype.getglProgram = function () { return this.shader ? this.shader.program.glPrograms[this.renderer.CONTEXT_UID] : null; }), (t.prototype.generateShader = function (e) { var t = this.gl, n = e.program, r = {}; for (var i in n.attributeData) r[i] = n.attributeData[i].location; var o = Mn(t, n.vertexSrc, n.fragmentSrc, r), a = {}; for (var i in n.uniformData) { var s = n.uniformData[i]; a[i] = { location: t.getUniformLocation(o, i), value: On(s.type, s.size) }; } var u = new _r(o, a); return (n.glPrograms[this.renderer.CONTEXT_UID] = u), u; }), (t.prototype.reset = function () { (this.program = null), (this.shader = null); }), (t.prototype.destroy = function () { this.destroyed = !0; }), t ); })(Yt); var yr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.gl = null), (n.stateId = 0), (n.polygonOffset = 0), (n.blendMode = O.NONE), (n._blendEq = !1), (n.map = []), (n.map[0] = n.setBlend), (n.map[1] = n.setOffset), (n.map[2] = n.setCullFace), (n.map[3] = n.setDepthTest), (n.map[4] = n.setFrontFace), (n.checks = []), (n.defaultState = new er()), (n.defaultState.blend = !0), n; } return ( Pt(t, e), (t.prototype.contextChange = function (e) { (this.gl = e), (this.blendModes = (function (e, t) { return void 0 === t && (t = []), (t[O.NORMAL] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.ADD] = [e.ONE, e.ONE]), (t[O.MULTIPLY] = [e.DST_COLOR, e.ONE_MINUS_SRC_ALPHA, e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.SCREEN] = [e.ONE, e.ONE_MINUS_SRC_COLOR, e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.OVERLAY] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.DARKEN] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.LIGHTEN] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.COLOR_DODGE] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.COLOR_BURN] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.HARD_LIGHT] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.SOFT_LIGHT] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.DIFFERENCE] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.EXCLUSION] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.HUE] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.SATURATION] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.COLOR] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.LUMINOSITY] = [e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.NONE] = [0, 0]), (t[O.NORMAL_NPM] = [e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA, e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.ADD_NPM] = [e.SRC_ALPHA, e.ONE, e.ONE, e.ONE]), (t[O.SCREEN_NPM] = [e.SRC_ALPHA, e.ONE_MINUS_SRC_COLOR, e.ONE, e.ONE_MINUS_SRC_ALPHA]), (t[O.SRC_IN] = [e.DST_ALPHA, e.ZERO]), (t[O.SRC_OUT] = [e.ONE_MINUS_DST_ALPHA, e.ZERO]), (t[O.SRC_ATOP] = [e.DST_ALPHA, e.ONE_MINUS_SRC_ALPHA]), (t[O.DST_OVER] = [e.ONE_MINUS_DST_ALPHA, e.ONE]), (t[O.DST_IN] = [e.ZERO, e.SRC_ALPHA]), (t[O.DST_OUT] = [e.ZERO, e.ONE_MINUS_SRC_ALPHA]), (t[O.DST_ATOP] = [e.ONE_MINUS_DST_ALPHA, e.SRC_ALPHA]), (t[O.XOR] = [e.ONE_MINUS_DST_ALPHA, e.ONE_MINUS_SRC_ALPHA]), (t[O.SUBTRACT] = [e.ONE, e.ONE, e.ONE, e.ONE, e.FUNC_REVERSE_SUBTRACT, e.FUNC_ADD]), t; })(e)), this.set(this.defaultState), this.reset(); }), (t.prototype.set = function (e) { if (((e = e || this.defaultState), this.stateId !== e.data)) { for (var t = this.stateId ^ e.data, n = 0; t; ) 1 & t && this.map[n].call(this, !!(e.data & (1 << n))), (t >>= 1), n++; this.stateId = e.data; } for (n = 0; n < this.checks.length; n++) this.checks[n](this, e); }), (t.prototype.forceState = function (e) { e = e || this.defaultState; for (var t = 0; t < this.map.length; t++) this.map[t].call(this, !!(e.data & (1 << t))); for (t = 0; t < this.checks.length; t++) this.checks[t](this, e); this.stateId = e.data; }), (t.prototype.setBlend = function (e) { this.updateCheck(t.checkBlendMode, e), this.gl[e ? "enable" : "disable"](this.gl.BLEND); }), (t.prototype.setOffset = function (e) { this.updateCheck(t.checkPolygonOffset, e), this.gl[e ? "enable" : "disable"](this.gl.POLYGON_OFFSET_FILL); }), (t.prototype.setDepthTest = function (e) { this.gl[e ? "enable" : "disable"](this.gl.DEPTH_TEST); }), (t.prototype.setCullFace = function (e) { this.gl[e ? "enable" : "disable"](this.gl.CULL_FACE); }), (t.prototype.setFrontFace = function (e) { this.gl.frontFace(this.gl[e ? "CW" : "CCW"]); }), (t.prototype.setBlendMode = function (e) { if (e !== this.blendMode) { this.blendMode = e; var t = this.blendModes[e], n = this.gl; 2 === t.length ? n.blendFunc(t[0], t[1]) : n.blendFuncSeparate(t[0], t[1], t[2], t[3]), 6 === t.length ? ((this._blendEq = !0), n.blendEquationSeparate(t[4], t[5])) : this._blendEq && ((this._blendEq = !1), n.blendEquationSeparate(n.FUNC_ADD, n.FUNC_ADD)); } }), (t.prototype.setPolygonOffset = function (e, t) { this.gl.polygonOffset(e, t); }), (t.prototype.reset = function () { this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1), this.forceState(this.defaultState), (this._blendEq = !0), (this.blendMode = -1), this.setBlendMode(0); }), (t.prototype.updateCheck = function (e, t) { var n = this.checks.indexOf(e); t && -1 === n ? this.checks.push(e) : t || -1 === n || this.checks.splice(n, 1); }), (t.checkBlendMode = function (e, t) { e.setBlendMode(t.blendMode); }), (t.checkPolygonOffset = function (e, t) { e.setPolygonOffset(1, t.polygonOffset); }), t ); })(Yt), Cr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.count = 0), (n.checkCount = 0), (n.maxIdle = Y.GC_MAX_IDLE), (n.checkCountMax = Y.GC_MAX_CHECK_COUNT), (n.mode = Y.GC_MODE), n; } return ( Pt(t, e), (t.prototype.postrender = function () { this.renderer.renderingToScreen && (this.count++, this.mode !== H.MANUAL && (this.checkCount++, this.checkCount > this.checkCountMax && ((this.checkCount = 0), this.run()))); }), (t.prototype.run = function () { for (var e = this.renderer.texture, t = e.managedTextures, n = !1, r = 0; r < t.length; r++) { var i = t[r]; !i.framebuffer && this.count - i.touched > this.maxIdle && (e.destroyTexture(i, !0), (t[r] = null), (n = !0)); } if (n) { var o = 0; for (r = 0; r < t.length; r++) null !== t[r] && (t[o++] = t[r]); t.length = o; } }), (t.prototype.unload = function (e) { var t = this.renderer.texture, n = e._texture; n && !n.framebuffer && t.destroyTexture(n); for (var r = e.children.length - 1; r >= 0; r--) this.unload(e.children[r]); }), t ); })(Yt), br = function (e) { (this.texture = e), (this.width = -1), (this.height = -1), (this.dirtyId = -1), (this.dirtyStyleId = -1), (this.mipmap = !1), (this.wrapMode = 33071), (this.type = 6408), (this.internalFormat = 5121); }, wr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.boundTextures = []), (n.currentLocation = -1), (n.managedTextures = []), (n._unknownBoundTextures = !1), (n.unknownTexture = new Dt()), n; } return ( Pt(t, e), (t.prototype.contextChange = function () { var e = (this.gl = this.renderer.gl); (this.CONTEXT_UID = this.renderer.CONTEXT_UID), (this.webGLVersion = this.renderer.context.webGLVersion); var t = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS); this.boundTextures.length = t; for (var n = 0; n < t; n++) this.boundTextures[n] = null; this.emptyTextures = {}; var r = new br(e.createTexture()); e.bindTexture(e.TEXTURE_2D, r.texture), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, new Uint8Array(4)), (this.emptyTextures[e.TEXTURE_2D] = r), (this.emptyTextures[e.TEXTURE_CUBE_MAP] = new br(e.createTexture())), e.bindTexture(e.TEXTURE_CUBE_MAP, this.emptyTextures[e.TEXTURE_CUBE_MAP].texture); for (n = 0; n < 6; n++) e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + n, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, null); e.texParameteri(e.TEXTURE_CUBE_MAP, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_CUBE_MAP, e.TEXTURE_MIN_FILTER, e.LINEAR); for (n = 0; n < this.boundTextures.length; n++) this.bind(null, n); }), (t.prototype.bind = function (e, t) { void 0 === t && (t = 0); var n = this.gl; if (e) { if ((e = e.castToBaseTexture()).parentTextureArray) return; if (e.valid) { e.touched = this.renderer.textureGC.count; var r = e._glTextures[this.CONTEXT_UID] || this.initTexture(e); this.boundTextures[t] !== e && (this.currentLocation !== t && ((this.currentLocation = t), n.activeTexture(n.TEXTURE0 + t)), n.bindTexture(e.target, r.texture)), r.dirtyId !== e.dirtyId && (this.currentLocation !== t && ((this.currentLocation = t), n.activeTexture(n.TEXTURE0 + t)), this.updateTexture(e)), (this.boundTextures[t] = e); } } else this.currentLocation !== t && ((this.currentLocation = t), n.activeTexture(n.TEXTURE0 + t)), n.bindTexture(n.TEXTURE_2D, this.emptyTextures[n.TEXTURE_2D].texture), (this.boundTextures[t] = null); }), (t.prototype.reset = function () { (this._unknownBoundTextures = !0), (this.currentLocation = -1); for (var e = 0; e < this.boundTextures.length; e++) this.boundTextures[e] = this.unknownTexture; }), (t.prototype.unbind = function (e) { var t = this.gl, n = this.boundTextures; if (this._unknownBoundTextures) { this._unknownBoundTextures = !1; for (var r = 0; r < n.length; r++) n[r] === this.unknownTexture && this.bind(null, r); } for (r = 0; r < n.length; r++) n[r] === e && (this.currentLocation !== r && (t.activeTexture(t.TEXTURE0 + r), (this.currentLocation = r)), t.bindTexture(e.target, this.emptyTextures[e.target].texture), (n[r] = null)); }), (t.prototype.initTexture = function (e) { var t = new br(this.gl.createTexture()); return (t.dirtyId = -1), (e._glTextures[this.CONTEXT_UID] = t), this.managedTextures.push(e), e.on("dispose", this.destroyTexture, this), t; }), (t.prototype.initTextureType = function (e, t) { if (((t.internalFormat = e.format), (t.type = e.type), 2 === this.webGLVersion)) { var n = this.renderer.gl; e.type === n.FLOAT && e.format === n.RGBA && (t.internalFormat = n.RGBA32F), e.type === N.HALF_FLOAT && (t.type = n.HALF_FLOAT), t.type === n.HALF_FLOAT && e.format === n.RGBA && (t.internalFormat = n.RGBA16F); } }), (t.prototype.updateTexture = function (e) { var t = e._glTextures[this.CONTEXT_UID]; if (t) { var n = this.renderer; if ((this.initTextureType(e, t), e.resource && e.resource.upload(n, e, t))); else { var r = e.realWidth, i = e.realHeight, o = n.gl; (t.width !== r || t.height !== i || t.dirtyId < 0) && ((t.width = r), (t.height = i), o.texImage2D(e.target, 0, t.internalFormat, r, i, 0, e.format, t.type, null)); } e.dirtyStyleId !== t.dirtyStyleId && this.updateTextureStyle(e), (t.dirtyId = e.dirtyId); } }), (t.prototype.destroyTexture = function (e, t) { var n = this.gl; if ((e = e.castToBaseTexture())._glTextures[this.CONTEXT_UID] && (this.unbind(e), n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture), e.off("dispose", this.destroyTexture, this), delete e._glTextures[this.CONTEXT_UID], !t)) { var r = this.managedTextures.indexOf(e); -1 !== r && Ce(this.managedTextures, r, 1); } }), (t.prototype.updateTextureStyle = function (e) { var t = e._glTextures[this.CONTEXT_UID]; t && ((e.mipmap !== U.POW2 && 2 === this.webGLVersion) || e.isPowerOfTwo ? (t.mipmap = e.mipmap >= 1) : (t.mipmap = !1), 2 === this.webGLVersion || e.isPowerOfTwo ? (t.wrapMode = e.wrapMode) : (t.wrapMode = F.CLAMP), (e.resource && e.resource.style(this.renderer, e, t)) || this.setStyle(e, t), (t.dirtyStyleId = e.dirtyStyleId)); }), (t.prototype.setStyle = function (e, t) { var n = this.gl; if ((t.mipmap && n.generateMipmap(e.target), n.texParameteri(e.target, n.TEXTURE_WRAP_S, t.wrapMode), n.texParameteri(e.target, n.TEXTURE_WRAP_T, t.wrapMode), t.mipmap)) { n.texParameteri(e.target, n.TEXTURE_MIN_FILTER, e.scaleMode === B.LINEAR ? n.LINEAR_MIPMAP_LINEAR : n.NEAREST_MIPMAP_NEAREST); var r = this.renderer.context.extensions.anisotropicFiltering; if (r && e.anisotropicLevel > 0 && e.scaleMode === B.LINEAR) { var i = Math.min(e.anisotropicLevel, n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT)); n.texParameterf(e.target, r.TEXTURE_MAX_ANISOTROPY_EXT, i); } } else n.texParameteri(e.target, n.TEXTURE_MIN_FILTER, e.scaleMode === B.LINEAR ? n.LINEAR : n.NEAREST); n.texParameteri(e.target, n.TEXTURE_MAG_FILTER, e.scaleMode === B.LINEAR ? n.LINEAR : n.NEAREST); }), t ); })(Yt), Sr = { FilterSystem: mn, BatchSystem: yn, ContextSystem: bn, FramebufferSystem: Tn, GeometrySystem: Ln, MaskSystem: or, ScissorSystem: sr, StencilSystem: ur, ProjectionSystem: lr, RenderTextureSystem: pr, ShaderSystem: vr, StateSystem: yr, TextureGCSystem: Cr, TextureSystem: wr }, Tr = new qe(), xr = (function (e) { function t(t, n) { void 0 === t && (t = M.UNKNOWN); var r = e.call(this) || this; return (n = Object.assign({}, Y.RENDER_OPTIONS, n)).roundPixels && ((Y.ROUND_PIXELS = n.roundPixels), xe("5.0.0", "Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS", 2)), (r.options = n), (r.type = t), (r.screen = new He(0, 0, n.width, n.height)), (r.view = n.view || document.createElement("canvas")), (r.resolution = n.resolution || Y.RESOLUTION), (r.transparent = n.transparent), (r.autoDensity = n.autoDensity || n.autoResize || !1), (r.preserveDrawingBuffer = n.preserveDrawingBuffer), (r.clearBeforeRender = n.clearBeforeRender), (r._backgroundColor = 0), (r._backgroundColorRgba = [0, 0, 0, 0]), (r._backgroundColorString = "#000000"), (r.backgroundColor = n.backgroundColor || r._backgroundColor), (r._lastObjectRendered = null), (r.plugins = {}), r; } return ( Pt(t, e), (t.prototype.initPlugins = function (e) { for (var t in e) this.plugins[t] = new e[t](this); }), Object.defineProperty(t.prototype, "width", { get: function () { return this.view.width; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return this.view.height; }, enumerable: !1, configurable: !0, }), (t.prototype.resize = function (e, t) { (this.screen.width = e), (this.screen.height = t), (this.view.width = e * this.resolution), (this.view.height = t * this.resolution), this.autoDensity && ((this.view.style.width = e + "px"), (this.view.style.height = t + "px")), this.emit("resize", e, t); }), (t.prototype.generateTexture = function (e, t, n, r) { 0 === (r = r || e.getLocalBounds(null, !0)).width && (r.width = 1), 0 === r.height && (r.height = 1); var i = en.create({ width: 0 | r.width, height: 0 | r.height, scaleMode: t, resolution: n }); return (Tr.tx = -r.x), (Tr.ty = -r.y), this.render(e, i, !1, Tr, !!e.parent), i; }), (t.prototype.destroy = function (e) { for (var t in this.plugins) this.plugins[t].destroy(), (this.plugins[t] = null); e && this.view.parentNode && this.view.parentNode.removeChild(this.view); var n = this; (n.plugins = null), (n.type = M.UNKNOWN), (n.view = null), (n.screen = null), (n._tempDisplayObjectParent = null), (n.options = null), (this._backgroundColorRgba = null), (this._backgroundColorString = null), (this._lastObjectRendered = null); }), Object.defineProperty(t.prototype, "backgroundColor", { get: function () { return this._backgroundColor; }, set: function (e) { (this._backgroundColor = e), (this._backgroundColorString = oe(e)), ie(e, this._backgroundColorRgba); }, enumerable: !1, configurable: !0, }), t ); })(X()), Er = (function (e) { function t(n) { var r = e.call(this, M.WEBGL, n) || this; return (n = r.options), (r.gl = null), (r.CONTEXT_UID = 0), (r.runners = { destroy: new Lt("destroy"), contextChange: new Lt("contextChange"), reset: new Lt("reset"), update: new Lt("update"), postrender: new Lt("postrender"), prerender: new Lt("prerender"), resize: new Lt("resize") }), (r.globalUniforms = new _n({ projectionMatrix: new qe() }, !0)), r.addSystem(or, "mask").addSystem(bn, "context").addSystem(yr, "state").addSystem(vr, "shader").addSystem(wr, "texture").addSystem(Ln, "geometry").addSystem(Tn, "framebuffer").addSystem(sr, "scissor").addSystem(ur, "stencil").addSystem(lr, "projection").addSystem(Cr, "textureGC").addSystem(mn, "filter").addSystem(pr, "renderTexture").addSystem(yn, "batch"), r.initPlugins(t.__plugins), n.context ? r.context.initFromContext(n.context) : r.context.initFromOptions({ alpha: !!r.transparent, antialias: n.antialias, premultipliedAlpha: r.transparent && "notMultiplied" !== r.transparent, stencil: !0, preserveDrawingBuffer: n.preserveDrawingBuffer, powerPreference: r.options.powerPreference }), (r.renderingToScreen = !0), ne(2 === r.context.webGLVersion ? "WebGL 2" : "WebGL 1"), r.resize(r.options.width, r.options.height), r; } return ( Pt(t, e), (t.create = function (e) { if (re()) return new t(e); throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.'); }), (t.prototype.addSystem = function (e, t) { t || (t = e.name); var n = new e(this); if (this[t]) throw new Error('Whoops! The name "' + t + '" is already in use'); for (var r in ((this[t] = n), this.runners)) this.runners[r].add(n); return this; }), (t.prototype.render = function (e, t, n, r, i) { if (((this.renderingToScreen = !t), this.runners.prerender.emit(), this.emit("prerender"), (this.projection.transform = r), !this.context.isLost)) { if ((t || (this._lastObjectRendered = e), !i)) { var o = e.enableTempParent(); e.updateTransform(), e.disableTempParent(o); } this.renderTexture.bind(t), this.batch.currentRenderer.start(), (void 0 !== n ? n : this.clearBeforeRender) && this.renderTexture.clear(), e.render(this), this.batch.currentRenderer.flush(), t && t.baseTexture.update(), this.runners.postrender.emit(), (this.projection.transform = null), this.emit("postrender"); } }), (t.prototype.resize = function (t, n) { e.prototype.resize.call(this, t, n), this.runners.resize.emit(t, n); }), (t.prototype.reset = function () { return this.runners.reset.emit(), this; }), (t.prototype.clear = function () { this.renderTexture.bind(), this.renderTexture.clear(); }), (t.prototype.destroy = function (t) { for (var n in (this.runners.destroy.emit(), this.runners)) this.runners[n].destroy(); e.prototype.destroy.call(this, t), (this.gl = null); }), (t.registerPlugin = function (e, n) { (t.__plugins = t.__plugins || {}), (t.__plugins[e] = n); }), t ); })(xr); function Lr(e) { return Er.create(e); } var Ar = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}", Ir = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n", Mr = function () { (this.texArray = null), (this.blend = 0), (this.type = k.TRIANGLES), (this.start = 0), (this.size = 0), (this.data = null); }, Pr = (function () { function e() { (this.elements = []), (this.ids = []), (this.count = 0); } return ( (e.prototype.clear = function () { for (var e = 0; e < this.count; e++) this.elements[e] = null; this.count = 0; }), e ); })(), Or = (function () { function e(e) { (this.rawBinaryData = new ArrayBuffer(e)), (this.uint32View = new Uint32Array(this.rawBinaryData)), (this.float32View = new Float32Array(this.rawBinaryData)); } return ( Object.defineProperty(e.prototype, "int8View", { get: function () { return this._int8View || (this._int8View = new Int8Array(this.rawBinaryData)), this._int8View; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "uint8View", { get: function () { return this._uint8View || (this._uint8View = new Uint8Array(this.rawBinaryData)), this._uint8View; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "int16View", { get: function () { return this._int16View || (this._int16View = new Int16Array(this.rawBinaryData)), this._int16View; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "uint16View", { get: function () { return this._uint16View || (this._uint16View = new Uint16Array(this.rawBinaryData)), this._uint16View; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "int32View", { get: function () { return this._int32View || (this._int32View = new Int32Array(this.rawBinaryData)), this._int32View; }, enumerable: !1, configurable: !0, }), (e.prototype.view = function (e) { return this[e + "View"]; }), (e.prototype.destroy = function () { (this.rawBinaryData = null), (this._int8View = null), (this._uint8View = null), (this._int16View = null), (this._uint16View = null), (this._int32View = null), (this.uint32View = null), (this.float32View = null); }), (e.sizeOf = function (e) { switch (e) { case "int8": case "uint8": return 1; case "int16": case "uint16": return 2; case "int32": case "uint32": case "float32": return 4; default: throw new Error(e + " isn't a valid view type"); } }), e ); })(), kr = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.shaderGenerator = null), (n.geometryClass = null), (n.vertexSize = null), (n.state = er.for2d()), (n.size = 4 * Y.SPRITE_BATCH_SIZE), (n._vertexCount = 0), (n._indexCount = 0), (n._bufferedElements = []), (n._bufferedTextures = []), (n._bufferSize = 0), (n._shader = null), (n._packedGeometries = []), (n._packedGeometryPoolSize = 2), (n._flushId = 0), (n._aBuffers = {}), (n._iBuffers = {}), (n.MAX_TEXTURES = 1), n.renderer.on("prerender", n.onPrerender, n), t.runners.contextChange.add(n), (n._dcIndex = 0), (n._aIndex = 0), (n._iIndex = 0), (n._attributeBuffer = null), (n._indexBuffer = null), (n._tempBoundTextures = []), n; } return ( Pt(t, e), (t.prototype.contextChange = function () { var e = this.renderer.gl; Y.PREFER_ENV === I.WEBGL_LEGACY ? (this.MAX_TEXTURES = 1) : ((this.MAX_TEXTURES = Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), Y.SPRITE_MAX_TEXTURES)), (this.MAX_TEXTURES = qn(this.MAX_TEXTURES, e))), (this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES)); for (var t = 0; t < this._packedGeometryPoolSize; t++) this._packedGeometries[t] = new this.geometryClass(); this.initFlushBuffers(); }), (t.prototype.initFlushBuffers = function () { for (var e = t._drawCallPool, n = t._textureArrayPool, r = this.size / 4, i = Math.floor(r / this.MAX_TEXTURES) + 1; e.length < r; ) e.push(new Mr()); for (; n.length < i; ) n.push(new Pr()); for (var o = 0; o < this.MAX_TEXTURES; o++) this._tempBoundTextures[o] = null; }), (t.prototype.onPrerender = function () { this._flushId = 0; }), (t.prototype.render = function (e) { e._texture.valid && (this._vertexCount + e.vertexData.length / 2 > this.size && this.flush(), (this._vertexCount += e.vertexData.length / 2), (this._indexCount += e.indices.length), (this._bufferedTextures[this._bufferSize] = e._texture.baseTexture), (this._bufferedElements[this._bufferSize++] = e)); }), (t.prototype.buildTexturesAndDrawCalls = function () { var e = this._bufferedTextures, n = this.MAX_TEXTURES, r = t._textureArrayPool, i = this.renderer.batch, o = this._tempBoundTextures, a = this.renderer.textureGC.count, s = ++Dt._globalBatch, u = 0, l = r[0], c = 0; i.copyBoundTextures(o, n); for (var d = 0; d < this._bufferSize; ++d) { var h = e[d]; (e[d] = null), h._batchEnabled !== s && (l.count >= n && (i.boundArray(l, o, s, n), this.buildDrawCalls(l, c, d), (c = d), (l = r[++u]), ++s), (h._batchEnabled = s), (h.touched = a), (l.elements[l.count++] = h)); } l.count > 0 && (i.boundArray(l, o, s, n), this.buildDrawCalls(l, c, this._bufferSize), ++u, ++s); for (d = 0; d < o.length; d++) o[d] = null; Dt._globalBatch = s; }), (t.prototype.buildDrawCalls = function (e, n, r) { var i = this, o = i._bufferedElements, a = i._attributeBuffer, s = i._indexBuffer, u = i.vertexSize, l = t._drawCallPool, c = this._dcIndex, d = this._aIndex, h = this._iIndex, p = l[c]; (p.start = this._iIndex), (p.texArray = e); for (var f = n; f < r; ++f) { var _ = o[f], g = _._texture.baseTexture, m = ue[g.alphaMode ? 1 : 0][_.blendMode]; (o[f] = null), n < f && p.blend !== m && ((p.size = h - p.start), (n = f), ((p = l[++c]).texArray = e), (p.start = h)), this.packInterleavedGeometry(_, a, s, d, h), (d += (_.vertexData.length / 2) * u), (h += _.indices.length), (p.blend = m); } n < r && ((p.size = h - p.start), ++c), (this._dcIndex = c), (this._aIndex = d), (this._iIndex = h); }), (t.prototype.bindAndClearTexArray = function (e) { for (var t = this.renderer.texture, n = 0; n < e.count; n++) t.bind(e.elements[n], e.ids[n]), (e.elements[n] = null); e.count = 0; }), (t.prototype.updateGeometry = function () { var e = this, t = e._packedGeometries, n = e._attributeBuffer, r = e._indexBuffer; Y.CAN_UPLOAD_SAME_BUFFER ? (t[this._flushId]._buffer.update(n.rawBinaryData), t[this._flushId]._indexBuffer.update(r), this.renderer.geometry.updateBuffers()) : (this._packedGeometryPoolSize <= this._flushId && (this._packedGeometryPoolSize++, (t[this._flushId] = new this.geometryClass())), t[this._flushId]._buffer.update(n.rawBinaryData), t[this._flushId]._indexBuffer.update(r), this.renderer.geometry.bind(t[this._flushId]), this.renderer.geometry.updateBuffers(), this._flushId++); }), (t.prototype.drawBatches = function () { for (var e = this._dcIndex, n = this.renderer, r = n.gl, i = n.state, o = t._drawCallPool, a = null, s = 0; s < e; s++) { var u = o[s], l = u.texArray, c = u.type, d = u.size, h = u.start, p = u.blend; a !== l && ((a = l), this.bindAndClearTexArray(l)), (this.state.blendMode = p), i.set(this.state), r.drawElements(c, d, r.UNSIGNED_SHORT, 2 * h); } }), (t.prototype.flush = function () { 0 !== this._vertexCount && ((this._attributeBuffer = this.getAttributeBuffer(this._vertexCount)), (this._indexBuffer = this.getIndexBuffer(this._indexCount)), (this._aIndex = 0), (this._iIndex = 0), (this._dcIndex = 0), this.buildTexturesAndDrawCalls(), this.updateGeometry(), this.drawBatches(), (this._bufferSize = 0), (this._vertexCount = 0), (this._indexCount = 0)); }), (t.prototype.start = function () { this.renderer.state.set(this.state), this.renderer.shader.bind(this._shader), Y.CAN_UPLOAD_SAME_BUFFER && this.renderer.geometry.bind(this._packedGeometries[this._flushId]); }), (t.prototype.stop = function () { this.flush(); }), (t.prototype.destroy = function () { for (var t = 0; t < this._packedGeometryPoolSize; t++) this._packedGeometries[t] && this._packedGeometries[t].destroy(); this.renderer.off("prerender", this.onPrerender, this), (this._aBuffers = null), (this._iBuffers = null), (this._packedGeometries = null), (this._attributeBuffer = null), (this._indexBuffer = null), this._shader && (this._shader.destroy(), (this._shader = null)), e.prototype.destroy.call(this); }), (t.prototype.getAttributeBuffer = function (e) { var t = me(Math.ceil(e / 8)), n = ye(t), r = 8 * t; this._aBuffers.length <= n && (this._iBuffers.length = n + 1); var i = this._aBuffers[r]; return i || (this._aBuffers[r] = i = new Or(r * this.vertexSize * 4)), i; }), (t.prototype.getIndexBuffer = function (e) { var t = me(Math.ceil(e / 12)), n = ye(t), r = 12 * t; this._iBuffers.length <= n && (this._iBuffers.length = n + 1); var i = this._iBuffers[n]; return i || (this._iBuffers[n] = i = new Uint16Array(r)), i; }), (t.prototype.packInterleavedGeometry = function (e, t, n, r, i) { for (var o = t.uint32View, a = t.float32View, s = r / this.vertexSize, u = e.uvs, l = e.indices, c = e.vertexData, d = e._texture.baseTexture._batchLocation, h = Math.min(e.worldAlpha, 1), p = h < 1 && e._texture.baseTexture.alphaMode ? de(e._tintRGB, h) : e._tintRGB + ((255 * h) << 24), f = 0; f < c.length; f += 2) (a[r++] = c[f]), (a[r++] = c[f + 1]), (a[r++] = u[f]), (a[r++] = u[f + 1]), (o[r++] = p), (a[r++] = d); for (f = 0; f < l.length; f++) n[i++] = s + l[f]; }), (t._drawCallPool = []), (t._textureArrayPool = []), t ); })(vn), Rr = (function () { function e(e, t) { if (((this.vertexSrc = e), (this.fragTemplate = t), (this.programCache = {}), (this.defaultGroupCache = {}), t.indexOf("%count%") < 0)) throw new Error('Fragment template must contain "%count%".'); if (t.indexOf("%forloop%") < 0) throw new Error('Fragment template must contain "%forloop%".'); } return ( (e.prototype.generateShader = function (e) { if (!this.programCache[e]) { for (var t = new Int32Array(e), n = 0; n < e; n++) t[n] = n; this.defaultGroupCache[e] = _n.from({ uSamplers: t }, !0); var r = this.fragTemplate; (r = (r = r.replace(/%count%/gi, "" + e)).replace(/%forloop%/gi, this.generateSampleSrc(e))), (this.programCache[e] = new Jn(this.vertexSrc, r)); } var i = { tint: new Float32Array([1, 1, 1, 1]), translationMatrix: new qe(), default: this.defaultGroupCache[e] }; return new Qn(this.programCache[e], i); }), (e.prototype.generateSampleSrc = function (e) { var t = ""; (t += "\n"), (t += "\n"); for (var n = 0; n < e; n++) n > 0 && (t += "\nelse "), n < e - 1 && (t += "if(vTextureId < " + n + ".5)"), (t += "\n{"), (t += "\n\tcolor = texture2D(uSamplers[" + n + "], vTextureCoord);"), (t += "\n}"); return (t += "\n"), (t += "\n"); }), e ); })(), Dr = (function (e) { function t(t) { void 0 === t && (t = !1); var n = e.call(this) || this; return (n._buffer = new on(null, t, !1)), (n._indexBuffer = new on(null, t, !0)), n.addAttribute("aVertexPosition", n._buffer, 2, !1, N.FLOAT).addAttribute("aTextureCoord", n._buffer, 2, !1, N.FLOAT).addAttribute("aColor", n._buffer, 4, !0, N.UNSIGNED_BYTE).addAttribute("aTextureId", n._buffer, 1, !0, N.FLOAT).addIndex(n._indexBuffer), n; } return Pt(t, e), t; })(dn), Nr = "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n", Br = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n", Fr = (function () { function e() {} return ( (e.create = function (e) { var t = Object.assign({ vertex: Nr, fragment: Br, geometryClass: Dr, vertexSize: 6 }, e), n = t.vertex, r = t.fragment, i = t.vertexSize, o = t.geometryClass; return (function (e) { function t(t) { var a = e.call(this, t) || this; return (a.shaderGenerator = new Rr(n, r)), (a.geometryClass = o), (a.vertexSize = i), a; } return Pt(t, e), t; })(kr); }), Object.defineProperty(e, "defaultVertexSrc", { get: function () { return Nr; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e, "defaultFragmentTemplate", { get: function () { return Br; }, enumerable: !1, configurable: !0, }), e ); })(), Ur = Fr.create(), jr = (function () { function e(t) { var n = this; (t = Object.assign({ forceCanvas: !1 }, t)), (this.renderer = Lr(t)), (this.stage = new dt()), e._plugins.forEach(function (e) { e.init.call(n, t); }); } return ( (e.registerPlugin = function (t) { e._plugins.push(t); }), (e.prototype.render = function () { this.renderer.render(this.stage); }), Object.defineProperty(e.prototype, "view", { get: function () { return this.renderer.view; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "screen", { get: function () { return this.renderer.screen; }, enumerable: !1, configurable: !0, }), (e.prototype.destroy = function (t, n) { var r = this, i = e._plugins.slice(0); i.reverse(), i.forEach(function (e) { e.destroy.call(r); }), this.stage.destroy(n), (this.stage = null), this.renderer.destroy(t), (this.renderer = null); }), e ); })(); jr._plugins = []; var Gr = (function () { function e() {} return ( (e.init = function (e) { var t = this; Object.defineProperty(this, "resizeTo", { set: function (e) { window.removeEventListener("resize", this.queueResize), (this._resizeTo = e), e && (window.addEventListener("resize", this.queueResize), this.resize()); }, get: function () { return this._resizeTo; }, }), (this.queueResize = function () { t._resizeTo && (t.cancelResize(), (t._resizeId = requestAnimationFrame(function () { return t.resize(); }))); }), (this.cancelResize = function () { t._resizeId && (cancelAnimationFrame(t._resizeId), (t._resizeId = null)); }), (this.resize = function () { if (t._resizeTo) { var e, n; if ((t.cancelResize(), t._resizeTo === window)) (e = window.innerWidth), (n = window.innerHeight); else { var r = t._resizeTo; (e = r.clientWidth), (n = r.clientHeight); } t.renderer.resize(e, n); } }), (this._resizeId = null), (this._resizeTo = null), (this.resizeTo = e.resizeTo || null); }), (e.destroy = function () { window.removeEventListener("resize", this.queueResize), this.cancelResize(), (this.cancelResize = null), (this.queueResize = null), (this.resizeTo = null), (this.resize = null); }), e ); })(); jr.registerPlugin(Gr); var Hr = new He(), Vr = (function () { function e(e) { (this.renderer = e), (e.extract = this); } return ( (e.prototype.image = function (e, t, n) { var r = new Image(); return (r.src = this.base64(e, t, n)), r; }), (e.prototype.base64 = function (e, t, n) { return this.canvas(e).toDataURL(t, n); }), (e.prototype.canvas = function (t) { var n, r, i, o = this.renderer, a = !1, s = !1; t && (t instanceof en ? (i = t) : ((i = this.renderer.generateTexture(t)), (s = !0))), i ? ((n = i.baseTexture.resolution), (r = i.frame), (a = !1), o.renderTexture.bind(i)) : ((n = this.renderer.resolution), (a = !0), ((r = Hr).width = this.renderer.width), (r.height = this.renderer.height), o.renderTexture.bind(null)); var u = Math.floor(r.width * n + 1e-4), l = Math.floor(r.height * n + 1e-4), c = new Pe(u, l, 1), d = new Uint8Array(4 * u * l), h = o.gl; h.readPixels(r.x * n, r.y * n, u, l, h.RGBA, h.UNSIGNED_BYTE, d); var p = c.context.getImageData(0, 0, u, l); if ((e.arrayPostDivide(d, p.data), c.context.putImageData(p, 0, 0), a)) { var f = new Pe(c.width, c.height, 1); f.context.scale(1, -1), f.context.drawImage(c.canvas, 0, -l), c.destroy(), (c = f); } return s && i.destroy(!0), c.canvas; }), (e.prototype.pixels = function (t) { var n, r, i, o = this.renderer, a = !1; t && (t instanceof en ? (i = t) : ((i = this.renderer.generateTexture(t)), (a = !0))), i ? ((n = i.baseTexture.resolution), (r = i.frame), o.renderTexture.bind(i)) : ((n = o.resolution), ((r = Hr).width = o.width), (r.height = o.height), o.renderTexture.bind(null)); var s = r.width * n, u = r.height * n, l = new Uint8Array(4 * s * u), c = o.gl; return c.readPixels(r.x * n, r.y * n, s, u, c.RGBA, c.UNSIGNED_BYTE, l), a && i.destroy(!0), e.arrayPostDivide(l, l), l; }), (e.prototype.destroy = function () { (this.renderer.extract = null), (this.renderer = null); }), (e.arrayPostDivide = function (e, t) { for (var n = 0; n < e.length; n += 4) { var r = (t[n + 3] = e[n + 3]); 0 !== r ? ((t[n] = Math.round(Math.min((255 * e[n]) / r, 255))), (t[n + 1] = Math.round(Math.min((255 * e[n + 1]) / r, 255))), (t[n + 2] = Math.round(Math.min((255 * e[n + 2]) / r, 255)))) : ((t[n] = e[n]), (t[n + 1] = e[n + 1]), (t[n + 2] = e[n + 2])); } }), e ); })(), Zr = n(7281), zr = n.n(Zr), Yr = n(3652), Wr = n.n(Yr); function Xr() {} function qr(e, t, n, r) { var i = 0, o = e.length; !(function a(s) { s || i === o ? n && n(s) : r ? setTimeout(function () { t(e[i++], a); }, 1) : t(e[i++], a); })(); } function Kr(e) { return function () { if (null === e) throw new Error("Callback was already called."); var t = e; (e = null), t.apply(this, arguments); }; } function $r(e, t) { if (null == t) t = 1; else if (0 === t) throw new Error("Concurrency must not be zero"); var n = 0, r = { _tasks: [], concurrency: t, saturated: Xr, unsaturated: Xr, buffer: t / 4, empty: Xr, drain: Xr, error: Xr, started: !1, paused: !1, push: function (e, t) { i(e, !1, t); }, kill: function () { (n = 0), (r.drain = Xr), (r.started = !1), (r._tasks = []); }, unshift: function (e, t) { i(e, !0, t); }, process: function () { for (; !r.paused && n < r.concurrency && r._tasks.length; ) { var t = r._tasks.shift(); 0 === r._tasks.length && r.empty(), (n += 1) === r.concurrency && r.saturated(), e(t.data, Kr(o(t))); } }, length: function () { return r._tasks.length; }, running: function () { return n; }, idle: function () { return r._tasks.length + n === 0; }, pause: function () { !0 !== r.paused && (r.paused = !0); }, resume: function () { if (!1 !== r.paused) { r.paused = !1; for (var e = 1; e <= r.concurrency; e++) r.process(); } }, }; function i(e, t, n) { if (null != n && "function" != typeof n) throw new Error("task callback must be a function"); if (((r.started = !0), null == e && r.idle())) setTimeout(function () { return r.drain(); }, 1); else { var i = { data: e, callback: "function" == typeof n ? n : Xr }; t ? r._tasks.unshift(i) : r._tasks.push(i), setTimeout(function () { return r.process(); }, 1); } } function o(e) { return function () { (n -= 1), e.callback.apply(e, arguments), null != arguments[0] && r.error(arguments[0], e.data), n <= r.concurrency - r.buffer && r.unsaturated(), r.idle() && r.drain(), r.process(); }; } return r; } var Jr = {}; function Qr(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; (r.enumerable = r.enumerable || !1), (r.configurable = !0), "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function ei(e, t, n) { return t && Qr(e.prototype, t), n && Qr(e, n), e; } var ti = !(!window.XDomainRequest || "withCredentials" in new XMLHttpRequest()), ni = null; function ri() {} var ii = (function () { function e(t, n, r) { if ("string" != typeof t || "string" != typeof n) throw new Error("Both name and url are required for constructing a resource."); (r = r || {}), (this._flags = 0), this._setFlag(e.STATUS_FLAGS.DATA_URL, 0 === n.indexOf("data:")), (this.name = t), (this.url = n), (this.extension = this._getExtension()), (this.data = null), (this.crossOrigin = !0 === r.crossOrigin ? "anonymous" : r.crossOrigin), (this.timeout = r.timeout || 0), (this.loadType = r.loadType || this._determineLoadType()), (this.xhrType = r.xhrType), (this.metadata = r.metadata || {}), (this.error = null), (this.xhr = null), (this.children = []), (this.type = e.TYPE.UNKNOWN), (this.progressChunk = 0), (this._dequeue = ri), (this._onLoadBinding = null), (this._elementTimer = 0), (this._boundComplete = this.complete.bind(this)), (this._boundOnError = this._onError.bind(this)), (this._boundOnProgress = this._onProgress.bind(this)), (this._boundOnTimeout = this._onTimeout.bind(this)), (this._boundXhrOnError = this._xhrOnError.bind(this)), (this._boundXhrOnTimeout = this._xhrOnTimeout.bind(this)), (this._boundXhrOnAbort = this._xhrOnAbort.bind(this)), (this._boundXhrOnLoad = this._xhrOnLoad.bind(this)), (this.onStart = new (Wr())()), (this.onProgress = new (Wr())()), (this.onComplete = new (Wr())()), (this.onAfterMiddleware = new (Wr())()); } (e.setExtensionLoadType = function (t, n) { oi(e._loadTypeMap, t, n); }), (e.setExtensionXhrType = function (t, n) { oi(e._xhrTypeMap, t, n); }); var t = e.prototype; return ( (t.complete = function () { this._clearEvents(), this._finish(); }), (t.abort = function (t) { if (!this.error) { if (((this.error = new Error(t)), this._clearEvents(), this.xhr)) this.xhr.abort(); else if (this.xdr) this.xdr.abort(); else if (this.data) if (this.data.src) this.data.src = e.EMPTY_GIF; else for (; this.data.firstChild; ) this.data.removeChild(this.data.firstChild); this._finish(); } }), (t.load = function (t) { var n = this; if (!this.isLoading) if (this.isComplete) t && setTimeout(function () { return t(n); }, 1); else switch ((t && this.onComplete.once(t), this._setFlag(e.STATUS_FLAGS.LOADING, !0), this.onStart.dispatch(this), (!1 !== this.crossOrigin && "string" == typeof this.crossOrigin) || (this.crossOrigin = this._determineCrossOrigin(this.url)), this.loadType)) { case e.LOAD_TYPE.IMAGE: (this.type = e.TYPE.IMAGE), this._loadElement("image"); break; case e.LOAD_TYPE.AUDIO: (this.type = e.TYPE.AUDIO), this._loadSourceElement("audio"); break; case e.LOAD_TYPE.VIDEO: (this.type = e.TYPE.VIDEO), this._loadSourceElement("video"); break; case e.LOAD_TYPE.XHR: default: ti && this.crossOrigin ? this._loadXdr() : this._loadXhr(); } }), (t._hasFlag = function (e) { return 0 != (this._flags & e); }), (t._setFlag = function (e, t) { this._flags = t ? this._flags | e : this._flags & ~e; }), (t._clearEvents = function () { clearTimeout(this._elementTimer), this.data && this.data.removeEventListener && (this.data.removeEventListener("error", this._boundOnError, !1), this.data.removeEventListener("load", this._boundComplete, !1), this.data.removeEventListener("progress", this._boundOnProgress, !1), this.data.removeEventListener("canplaythrough", this._boundComplete, !1)), this.xhr && (this.xhr.removeEventListener ? (this.xhr.removeEventListener("error", this._boundXhrOnError, !1), this.xhr.removeEventListener("timeout", this._boundXhrOnTimeout, !1), this.xhr.removeEventListener("abort", this._boundXhrOnAbort, !1), this.xhr.removeEventListener("progress", this._boundOnProgress, !1), this.xhr.removeEventListener("load", this._boundXhrOnLoad, !1)) : ((this.xhr.onerror = null), (this.xhr.ontimeout = null), (this.xhr.onprogress = null), (this.xhr.onload = null))); }), (t._finish = function () { if (this.isComplete) throw new Error("Complete called again for an already completed resource."); this._setFlag(e.STATUS_FLAGS.COMPLETE, !0), this._setFlag(e.STATUS_FLAGS.LOADING, !1), this.onComplete.dispatch(this); }), (t._loadElement = function (e) { this.metadata.loadElement ? (this.data = this.metadata.loadElement) : "image" === e && void 0 !== window.Image ? (this.data = new Image()) : (this.data = document.createElement(e)), this.crossOrigin && (this.data.crossOrigin = this.crossOrigin), this.metadata.skipSource || (this.data.src = this.url), this.data.addEventListener("error", this._boundOnError, !1), this.data.addEventListener("load", this._boundComplete, !1), this.data.addEventListener("progress", this._boundOnProgress, !1), this.timeout && (this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout)); }), (t._loadSourceElement = function (e) { if ((this.metadata.loadElement ? (this.data = this.metadata.loadElement) : "audio" === e && void 0 !== window.Audio ? (this.data = new Audio()) : (this.data = document.createElement(e)), null !== this.data)) { if ((this.crossOrigin && (this.data.crossOrigin = this.crossOrigin), !this.metadata.skipSource)) if (navigator.isCocoonJS) this.data.src = Array.isArray(this.url) ? this.url[0] : this.url; else if (Array.isArray(this.url)) for (var t = this.metadata.mimeType, n = 0; n < this.url.length; ++n) this.data.appendChild(this._createSource(e, this.url[n], Array.isArray(t) ? t[n] : t)); else { var r = this.metadata.mimeType; this.data.appendChild(this._createSource(e, this.url, Array.isArray(r) ? r[0] : r)); } this.data.addEventListener("error", this._boundOnError, !1), this.data.addEventListener("load", this._boundComplete, !1), this.data.addEventListener("progress", this._boundOnProgress, !1), this.data.addEventListener("canplaythrough", this._boundComplete, !1), this.data.load(), this.timeout && (this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout)); } else this.abort("Unsupported element: " + e); }), (t._loadXhr = function () { "string" != typeof this.xhrType && (this.xhrType = this._determineXhrType()); var t = (this.xhr = new XMLHttpRequest()); t.open("GET", this.url, !0), (t.timeout = this.timeout), this.xhrType === e.XHR_RESPONSE_TYPE.JSON || this.xhrType === e.XHR_RESPONSE_TYPE.DOCUMENT ? (t.responseType = e.XHR_RESPONSE_TYPE.TEXT) : (t.responseType = this.xhrType), t.addEventListener("error", this._boundXhrOnError, !1), t.addEventListener("timeout", this._boundXhrOnTimeout, !1), t.addEventListener("abort", this._boundXhrOnAbort, !1), t.addEventListener("progress", this._boundOnProgress, !1), t.addEventListener("load", this._boundXhrOnLoad, !1), t.send(); }), (t._loadXdr = function () { "string" != typeof this.xhrType && (this.xhrType = this._determineXhrType()); var e = (this.xhr = new XDomainRequest()); (e.timeout = this.timeout || 5e3), (e.onerror = this._boundXhrOnError), (e.ontimeout = this._boundXhrOnTimeout), (e.onprogress = this._boundOnProgress), (e.onload = this._boundXhrOnLoad), e.open("GET", this.url, !0), setTimeout(function () { return e.send(); }, 1); }), (t._createSource = function (e, t, n) { n || (n = e + "/" + this._getExtension(t)); var r = document.createElement("source"); return (r.src = t), (r.type = n), r; }), (t._onError = function (e) { this.abort("Failed to load element using: " + e.target.nodeName); }), (t._onProgress = function (e) { e && e.lengthComputable && this.onProgress.dispatch(this, e.loaded / e.total); }), (t._onTimeout = function () { this.abort("Load timed out."); }), (t._xhrOnError = function () { var e = this.xhr; this.abort(ai(e) + " Request failed. Status: " + e.status + ', text: "' + e.statusText + '"'); }), (t._xhrOnTimeout = function () { var e = this.xhr; this.abort(ai(e) + " Request timed out."); }), (t._xhrOnAbort = function () { var e = this.xhr; this.abort(ai(e) + " Request was aborted by the user."); }), (t._xhrOnLoad = function () { var t = this.xhr, n = "", r = void 0 === t.status ? 200 : t.status; if ((("" !== t.responseType && "text" !== t.responseType && void 0 !== t.responseType) || (n = t.responseText), 0 === r && (n.length > 0 || t.responseType === e.XHR_RESPONSE_TYPE.BUFFER) ? (r = 200) : 1223 === r && (r = 204), 2 === ((r / 100) | 0))) { if (this.xhrType === e.XHR_RESPONSE_TYPE.TEXT) (this.data = n), (this.type = e.TYPE.TEXT); else if (this.xhrType === e.XHR_RESPONSE_TYPE.JSON) try { (this.data = JSON.parse(n)), (this.type = e.TYPE.JSON); } catch (e) { return void this.abort("Error trying to parse loaded json: " + e); } else if (this.xhrType === e.XHR_RESPONSE_TYPE.DOCUMENT) try { if (window.DOMParser) { var i = new DOMParser(); this.data = i.parseFromString(n, "text/xml"); } else { var o = document.createElement("div"); (o.innerHTML = n), (this.data = o); } this.type = e.TYPE.XML; } catch (e) { return void this.abort("Error trying to parse loaded xml: " + e); } else this.data = t.response || n; this.complete(); } else this.abort("[" + t.status + "] " + t.statusText + ": " + t.responseURL); }), (t._determineCrossOrigin = function (e, t) { if (0 === e.indexOf("data:")) return ""; if (window.origin !== window.location.origin) return "anonymous"; (t = t || window.location), ni || (ni = document.createElement("a")), (ni.href = e); var n = (!(e = zr()(ni.href, { strictMode: !0 })).port && "" === t.port) || e.port === t.port, r = e.protocol ? e.protocol + ":" : ""; return e.host === t.hostname && n && r === t.protocol ? "" : "anonymous"; }), (t._determineXhrType = function () { return e._xhrTypeMap[this.extension] || e.XHR_RESPONSE_TYPE.TEXT; }), (t._determineLoadType = function () { return e._loadTypeMap[this.extension] || e.LOAD_TYPE.XHR; }), (t._getExtension = function () { var e = this.url, t = ""; if (this.isDataUrl) { var n = e.indexOf("/"); t = e.substring(n + 1, e.indexOf(";", n)); } else { var r = e.indexOf("?"), i = e.indexOf("#"), o = Math.min(r > -1 ? r : e.length, i > -1 ? i : e.length); t = (e = e.substring(0, o)).substring(e.lastIndexOf(".") + 1); } return t.toLowerCase(); }), (t._getMimeFromXhrType = function (t) { switch (t) { case e.XHR_RESPONSE_TYPE.BUFFER: return "application/octet-binary"; case e.XHR_RESPONSE_TYPE.BLOB: return "application/blob"; case e.XHR_RESPONSE_TYPE.DOCUMENT: return "application/xml"; case e.XHR_RESPONSE_TYPE.JSON: return "application/json"; case e.XHR_RESPONSE_TYPE.DEFAULT: case e.XHR_RESPONSE_TYPE.TEXT: default: return "text/plain"; } }), ei(e, [ { key: "isDataUrl", get: function () { return this._hasFlag(e.STATUS_FLAGS.DATA_URL); }, }, { key: "isComplete", get: function () { return this._hasFlag(e.STATUS_FLAGS.COMPLETE); }, }, { key: "isLoading", get: function () { return this._hasFlag(e.STATUS_FLAGS.LOADING); }, }, ]), e ); })(); function oi(e, t, n) { t && 0 === t.indexOf(".") && (t = t.substring(1)), t && (e[t] = n); } function ai(e) { return e.toString().replace("object ", ""); } (ii.STATUS_FLAGS = { NONE: 0, DATA_URL: 1, COMPLETE: 2, LOADING: 4 }), (ii.TYPE = { UNKNOWN: 0, JSON: 1, XML: 2, IMAGE: 3, AUDIO: 4, VIDEO: 5, TEXT: 6 }), (ii.LOAD_TYPE = { XHR: 1, IMAGE: 2, AUDIO: 3, VIDEO: 4 }), (ii.XHR_RESPONSE_TYPE = { DEFAULT: "text", BUFFER: "arraybuffer", BLOB: "blob", DOCUMENT: "document", JSON: "json", TEXT: "text" }), (ii._loadTypeMap = { gif: ii.LOAD_TYPE.IMAGE, png: ii.LOAD_TYPE.IMAGE, bmp: ii.LOAD_TYPE.IMAGE, jpg: ii.LOAD_TYPE.IMAGE, jpeg: ii.LOAD_TYPE.IMAGE, tif: ii.LOAD_TYPE.IMAGE, tiff: ii.LOAD_TYPE.IMAGE, webp: ii.LOAD_TYPE.IMAGE, tga: ii.LOAD_TYPE.IMAGE, svg: ii.LOAD_TYPE.IMAGE, "svg+xml": ii.LOAD_TYPE.IMAGE, mp3: ii.LOAD_TYPE.AUDIO, ogg: ii.LOAD_TYPE.AUDIO, wav: ii.LOAD_TYPE.AUDIO, mp4: ii.LOAD_TYPE.VIDEO, webm: ii.LOAD_TYPE.VIDEO }), (ii._xhrTypeMap = { xhtml: ii.XHR_RESPONSE_TYPE.DOCUMENT, html: ii.XHR_RESPONSE_TYPE.DOCUMENT, htm: ii.XHR_RESPONSE_TYPE.DOCUMENT, xml: ii.XHR_RESPONSE_TYPE.DOCUMENT, tmx: ii.XHR_RESPONSE_TYPE.DOCUMENT, svg: ii.XHR_RESPONSE_TYPE.DOCUMENT, tsx: ii.XHR_RESPONSE_TYPE.DOCUMENT, gif: ii.XHR_RESPONSE_TYPE.BLOB, png: ii.XHR_RESPONSE_TYPE.BLOB, bmp: ii.XHR_RESPONSE_TYPE.BLOB, jpg: ii.XHR_RESPONSE_TYPE.BLOB, jpeg: ii.XHR_RESPONSE_TYPE.BLOB, tif: ii.XHR_RESPONSE_TYPE.BLOB, tiff: ii.XHR_RESPONSE_TYPE.BLOB, webp: ii.XHR_RESPONSE_TYPE.BLOB, tga: ii.XHR_RESPONSE_TYPE.BLOB, json: ii.XHR_RESPONSE_TYPE.JSON, text: ii.XHR_RESPONSE_TYPE.TEXT, txt: ii.XHR_RESPONSE_TYPE.TEXT, ttf: ii.XHR_RESPONSE_TYPE.BUFFER, otf: ii.XHR_RESPONSE_TYPE.BUFFER }), (ii.EMPTY_GIF = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="); var si = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var ui = window.URL || window.webkitURL; var li = { caching: function (e, t) { var n = this; Jr[e.url] ? ((e.data = Jr[e.url]), e.complete()) : e.onComplete.once(function () { return (Jr[n.url] = n.data); }), t(); }, parsing: function (e, t) { if (e.data) { if (e.xhr && e.xhrType === ii.XHR_RESPONSE_TYPE.BLOB) if (window.Blob && "string" != typeof e.data) { if (0 === e.data.type.indexOf("image")) { var n = ui.createObjectURL(e.data); return ( (e.blob = e.data), (e.data = new Image()), (e.data.src = n), (e.type = ii.TYPE.IMAGE), void (e.data.onload = function () { ui.revokeObjectURL(n), (e.data.onload = null), t(); }) ); } } else { var r = e.xhr.getResponseHeader("content-type"); if (r && 0 === r.indexOf("image")) return ( (e.data = new Image()), (e.data.src = "data:" + r + ";base64," + (function (e) { for (var t = "", n = 0; n < e.length; ) { for (var r = [0, 0, 0], i = [0, 0, 0, 0], o = 0; o < r.length; ++o) n < e.length ? (r[o] = 255 & e.charCodeAt(n++)) : (r[o] = 0); switch (((i[0] = r[0] >> 2), (i[1] = ((3 & r[0]) << 4) | (r[1] >> 4)), (i[2] = ((15 & r[1]) << 2) | (r[2] >> 6)), (i[3] = 63 & r[2]), n - (e.length - 1))) { case 2: (i[3] = 64), (i[2] = 64); break; case 1: i[3] = 64; } for (var a = 0; a < i.length; ++a) t += si.charAt(i[a]); } return t; })(e.xhr.responseText)), (e.type = ii.TYPE.IMAGE), void (e.data.onload = function () { (e.data.onload = null), t(); }) ); } t(); } else t(); }, }, ci = /(#[\w-]+)?$/, di = (function () { function e(t, n) { var r = this; void 0 === t && (t = ""), void 0 === n && (n = 10), (this.baseUrl = t), (this.progress = 0), (this.loading = !1), (this.defaultQueryString = ""), (this._beforeMiddleware = []), (this._afterMiddleware = []), (this._resourcesParsing = []), (this._boundLoadResource = function (e, t) { return r._loadResource(e, t); }), (this._queue = $r(this._boundLoadResource, n)), this._queue.pause(), (this.resources = {}), (this.onProgress = new (Wr())()), (this.onError = new (Wr())()), (this.onLoad = new (Wr())()), (this.onStart = new (Wr())()), (this.onComplete = new (Wr())()); for (var i = 0; i < e._defaultBeforeMiddleware.length; ++i) this.pre(e._defaultBeforeMiddleware[i]); for (var o = 0; o < e._defaultAfterMiddleware.length; ++o) this.use(e._defaultAfterMiddleware[o]); } var t = e.prototype; return ( (t.add = function (e, t, n, r) { if (Array.isArray(e)) { for (var i = 0; i < e.length; ++i) this.add(e[i]); return this; } if (("object" == typeof e && ((r = t || e.callback || e.onComplete), (n = e), (t = e.url), (e = e.name || e.key || e.url)), "string" != typeof t && ((r = n), (n = t), (t = e)), "string" != typeof t)) throw new Error("No url passed to add resource to loader."); if (("function" == typeof n && ((r = n), (n = null)), this.loading && (!n || !n.parentResource))) throw new Error("Cannot add resources while the loader is running."); if (this.resources[e]) throw new Error('Resource named "' + e + '" already exists.'); if (((t = this._prepareUrl(t)), (this.resources[e] = new ii(e, t, n)), "function" == typeof r && this.resources[e].onAfterMiddleware.once(r), this.loading)) { for (var o = n.parentResource, a = [], s = 0; s < o.children.length; ++s) o.children[s].isComplete || a.push(o.children[s]); var u = (o.progressChunk * (a.length + 1)) / (a.length + 2); o.children.push(this.resources[e]), (o.progressChunk = u); for (var l = 0; l < a.length; ++l) a[l].progressChunk = u; this.resources[e].progressChunk = u; } return this._queue.push(this.resources[e]), this; }), (t.pre = function (e) { return this._beforeMiddleware.push(e), this; }), (t.use = function (e) { return this._afterMiddleware.push(e), this; }), (t.reset = function () { for (var e in ((this.progress = 0), (this.loading = !1), this._queue.kill(), this._queue.pause(), this.resources)) { var t = this.resources[e]; t._onLoadBinding && t._onLoadBinding.detach(), t.isLoading && t.abort(); } return (this.resources = {}), this; }), (t.load = function (e) { if (("function" == typeof e && this.onComplete.once(e), this.loading)) return this; if (this._queue.idle()) this._onStart(), this._onComplete(); else { for (var t = 100 / this._queue._tasks.length, n = 0; n < this._queue._tasks.length; ++n) this._queue._tasks[n].data.progressChunk = t; this._onStart(), this._queue.resume(); } return this; }), (t._prepareUrl = function (e) { var t, n = zr()(e, { strictMode: !0 }); if (((t = n.protocol || !n.path || 0 === e.indexOf("//") ? e : this.baseUrl.length && this.baseUrl.lastIndexOf("/") !== this.baseUrl.length - 1 && "/" !== e.charAt(0) ? this.baseUrl + "/" + e : this.baseUrl + e), this.defaultQueryString)) { var r = ci.exec(t)[0]; -1 !== (t = t.substr(0, t.length - r.length)).indexOf("?") ? (t += "&" + this.defaultQueryString) : (t += "?" + this.defaultQueryString), (t += r); } return t; }), (t._loadResource = function (e, t) { var n = this; (e._dequeue = t), qr( this._beforeMiddleware, function (t, r) { t.call(n, e, function () { r(e.isComplete ? {} : null); }); }, function () { e.isComplete ? n._onLoad(e) : ((e._onLoadBinding = e.onComplete.once(n._onLoad, n)), e.load()); }, !0 ); }), (t._onStart = function () { (this.progress = 0), (this.loading = !0), this.onStart.dispatch(this); }), (t._onComplete = function () { (this.progress = 100), (this.loading = !1), this.onComplete.dispatch(this, this.resources); }), (t._onLoad = function (e) { var t = this; (e._onLoadBinding = null), this._resourcesParsing.push(e), e._dequeue(), qr( this._afterMiddleware, function (n, r) { n.call(t, e, r); }, function () { e.onAfterMiddleware.dispatch(e), (t.progress = Math.min(100, t.progress + e.progressChunk)), t.onProgress.dispatch(t, e), e.error ? t.onError.dispatch(e.error, t, e) : t.onLoad.dispatch(t, e), t._resourcesParsing.splice(t._resourcesParsing.indexOf(e), 1), t._queue.idle() && 0 === t._resourcesParsing.length && t._onComplete(); }, !0 ); }), ei(e, [ { key: "concurrency", get: function () { return this._queue.concurrency; }, set: function (e) { this._queue.concurrency = e; }, }, ]), e ); })(); (di._defaultBeforeMiddleware = []), (di._defaultAfterMiddleware = []), (di.pre = function (e) { return di._defaultBeforeMiddleware.push(e), di; }), (di.use = function (e) { return di._defaultAfterMiddleware.push(e), di; }); var hi = ii, pi = function (e, t) { return ( (pi = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), pi(e, t) ); }; var fi = (function () { function e() {} return ( (e.use = function (e, t) { e.data && e.type === ii.TYPE.IMAGE && (e.texture = Jt.fromLoader(e.data, e.url, e.name)), t(); }), e ); })(), _i = (function (e) { function t(n, r) { for (var i = e.call(this, n, r) || this, o = 0; o < t._plugins.length; ++o) { var a = t._plugins[o], s = a.pre, u = a.use; s && i.pre(s), u && i.use(u); } return (i._protected = !1), i; } return ( (function (e, t) { function n() { this.constructor = e; } pi(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.destroy = function () { this._protected || this.reset(); }), Object.defineProperty(t, "shared", { get: function () { var e = t._shared; return e || (((e = new t())._protected = !0), (t._shared = e)), e; }, enumerable: !1, configurable: !0, }), (t.registerPlugin = function (e) { return t._plugins.push(e), e.add && e.add(), t; }), (t._plugins = []), t ); })(di); _i.registerPlugin({ use: li.parsing }), _i.registerPlugin(fi); var gi = (function () { function e() {} return ( (e.init = function (e) { (e = Object.assign({ sharedLoader: !1 }, e)), (this.loader = e.sharedLoader ? _i.shared : new _i()); }), (e.destroy = function () { this.loader && (this.loader.destroy(), (this.loader = null)); }), e ); })(), mi = function (e, t) { return ( (mi = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), mi(e, t) ); }; function vi(e, t) { function n() { this.constructor = e; } mi(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var yi, Ci, bi = (function (e) { function t(t, n, r, i) { void 0 === t && (t = 1500), void 0 === r && (r = 16384), void 0 === i && (i = !1); var o = e.call(this) || this; return r > 16384 && (r = 16384), (o._properties = [!1, !0, !1, !1, !1]), (o._maxSize = t), (o._batchSize = r), (o._buffers = null), (o._bufferUpdateIDs = []), (o._updateID = 0), (o.interactiveChildren = !1), (o.blendMode = O.NORMAL), (o.autoResize = i), (o.roundPixels = !0), (o.baseTexture = null), o.setProperties(n), (o._tint = 0), (o.tintRgb = new Float32Array(4)), (o.tint = 16777215), o; } return ( vi(t, e), (t.prototype.setProperties = function (e) { e && ((this._properties[0] = "vertices" in e || "scale" in e ? !!e.vertices || !!e.scale : this._properties[0]), (this._properties[1] = "position" in e ? !!e.position : this._properties[1]), (this._properties[2] = "rotation" in e ? !!e.rotation : this._properties[2]), (this._properties[3] = "uvs" in e ? !!e.uvs : this._properties[3]), (this._properties[4] = "tint" in e || "alpha" in e ? !!e.tint || !!e.alpha : this._properties[4])); }), (t.prototype.updateTransform = function () { this.displayObjectUpdateTransform(); }), Object.defineProperty(t.prototype, "tint", { get: function () { return this._tint; }, set: function (e) { (this._tint = e), ie(e, this.tintRgb); }, enumerable: !1, configurable: !0, }), (t.prototype.render = function (e) { var t = this; this.visible && !(this.worldAlpha <= 0) && this.children.length && this.renderable && (this.baseTexture || ((this.baseTexture = this.children[0]._texture.baseTexture), this.baseTexture.valid || this.baseTexture.once("update", function () { return t.onChildrenChange(0); })), e.batch.setObjectRenderer(e.plugins.particle), e.plugins.particle.render(this)); }), (t.prototype.onChildrenChange = function (e) { for (var t = Math.floor(e / this._batchSize); this._bufferUpdateIDs.length < t; ) this._bufferUpdateIDs.push(0); this._bufferUpdateIDs[t] = ++this._updateID; }), (t.prototype.dispose = function () { if (this._buffers) { for (var e = 0; e < this._buffers.length; ++e) this._buffers[e].destroy(); this._buffers = null; } }), (t.prototype.destroy = function (t) { e.prototype.destroy.call(this, t), this.dispose(), (this._properties = null), (this._buffers = null), (this._bufferUpdateIDs = null); }), t ); })(dt), wi = (function () { function e(e, t, n) { (this.geometry = new dn()), (this.indexBuffer = null), (this.size = n), (this.dynamicProperties = []), (this.staticProperties = []); for (var r = 0; r < e.length; ++r) { var i = e[r]; (i = { attributeName: i.attributeName, size: i.size, uploadFunction: i.uploadFunction, type: i.type || N.FLOAT, offset: i.offset }), t[r] ? this.dynamicProperties.push(i) : this.staticProperties.push(i); } (this.staticStride = 0), (this.staticBuffer = null), (this.staticData = null), (this.staticDataUint32 = null), (this.dynamicStride = 0), (this.dynamicBuffer = null), (this.dynamicData = null), (this.dynamicDataUint32 = null), (this._updateID = 0), this.initBuffers(); } return ( (e.prototype.initBuffers = function () { var e = this.geometry, t = 0; (this.indexBuffer = new on(pe(this.size), !0, !0)), e.addIndex(this.indexBuffer), (this.dynamicStride = 0); for (var n = 0; n < this.dynamicProperties.length; ++n) { ((a = this.dynamicProperties[n]).offset = t), (t += a.size), (this.dynamicStride += a.size); } var r = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4); (this.dynamicData = new Float32Array(r)), (this.dynamicDataUint32 = new Uint32Array(r)), (this.dynamicBuffer = new on(this.dynamicData, !1, !1)); var i = 0; this.staticStride = 0; for (n = 0; n < this.staticProperties.length; ++n) { ((a = this.staticProperties[n]).offset = i), (i += a.size), (this.staticStride += a.size); } var o = new ArrayBuffer(this.size * this.staticStride * 4 * 4); (this.staticData = new Float32Array(o)), (this.staticDataUint32 = new Uint32Array(o)), (this.staticBuffer = new on(this.staticData, !0, !1)); for (n = 0; n < this.dynamicProperties.length; ++n) { var a = this.dynamicProperties[n]; e.addAttribute(a.attributeName, this.dynamicBuffer, 0, a.type === N.UNSIGNED_BYTE, a.type, 4 * this.dynamicStride, 4 * a.offset); } for (n = 0; n < this.staticProperties.length; ++n) { a = this.staticProperties[n]; e.addAttribute(a.attributeName, this.staticBuffer, 0, a.type === N.UNSIGNED_BYTE, a.type, 4 * this.staticStride, 4 * a.offset); } }), (e.prototype.uploadDynamic = function (e, t, n) { for (var r = 0; r < this.dynamicProperties.length; r++) { var i = this.dynamicProperties[r]; i.uploadFunction(e, t, n, i.type === N.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData, this.dynamicStride, i.offset); } this.dynamicBuffer._updateID++; }), (e.prototype.uploadStatic = function (e, t, n) { for (var r = 0; r < this.staticProperties.length; r++) { var i = this.staticProperties[r]; i.uploadFunction(e, t, n, i.type === N.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData, this.staticStride, i.offset); } this.staticBuffer._updateID++; }), (e.prototype.destroy = function () { (this.indexBuffer = null), (this.dynamicProperties = null), (this.dynamicBuffer = null), (this.dynamicData = null), (this.dynamicDataUint32 = null), (this.staticProperties = null), (this.staticBuffer = null), (this.staticData = null), (this.staticDataUint32 = null), this.geometry.destroy(); }), e ); })(), Si = (function (e) { function t(t) { var n = e.call(this, t) || this; return ( (n.shader = null), (n.properties = null), (n.tempMatrix = new qe()), (n.properties = [ { attributeName: "aVertexPosition", size: 2, uploadFunction: n.uploadVertices, offset: 0 }, { attributeName: "aPositionCoord", size: 2, uploadFunction: n.uploadPosition, offset: 0 }, { attributeName: "aRotation", size: 1, uploadFunction: n.uploadRotation, offset: 0 }, { attributeName: "aTextureCoord", size: 2, uploadFunction: n.uploadUvs, offset: 0 }, { attributeName: "aColor", size: 1, type: N.UNSIGNED_BYTE, uploadFunction: n.uploadTint, offset: 0 }, ]), (n.shader = Qn.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n vec2 v = vec2(x, y);\n v = v + aPositionCoord;\n\n gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vColor = aColor * uColor;\n}\n", "varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n gl_FragColor = color;\n}", {})), (n.state = er.for2d()), n ); } return ( vi(t, e), (t.prototype.render = function (e) { var t = e.children, n = e._maxSize, r = e._batchSize, i = this.renderer, o = t.length; if (0 !== o) { o > n && !e.autoResize && (o = n); var a = e._buffers; a || (a = e._buffers = this.generateBuffers(e)); var s = t[0]._texture.baseTexture; (this.state.blendMode = le(e.blendMode, s.alphaMode)), i.state.set(this.state); var u = i.gl, l = e.worldTransform.copyTo(this.tempMatrix); l.prepend(i.globalUniforms.uniforms.projectionMatrix), (this.shader.uniforms.translationMatrix = l.toArray(!0)), (this.shader.uniforms.uColor = ce(e.tintRgb, e.worldAlpha, this.shader.uniforms.uColor, s.alphaMode)), (this.shader.uniforms.uSampler = s), this.renderer.shader.bind(this.shader); for (var c = !1, d = 0, h = 0; d < o; d += r, h += 1) { var p = o - d; p > r && (p = r), h >= a.length && a.push(this._generateOneMoreBuffer(e)); var f = a[h]; f.uploadDynamic(t, d, p); var _ = e._bufferUpdateIDs[h] || 0; (c = c || f._updateID < _) && ((f._updateID = e._updateID), f.uploadStatic(t, d, p)), i.geometry.bind(f.geometry), u.drawElements(u.TRIANGLES, 6 * p, u.UNSIGNED_SHORT, 0); } } }), (t.prototype.generateBuffers = function (e) { for (var t = [], n = e._maxSize, r = e._batchSize, i = e._properties, o = 0; o < n; o += r) t.push(new wi(this.properties, i, r)); return t; }), (t.prototype._generateOneMoreBuffer = function (e) { var t = e._batchSize, n = e._properties; return new wi(this.properties, n, t); }), (t.prototype.uploadVertices = function (e, t, n, r, i, o) { for (var a = 0, s = 0, u = 0, l = 0, c = 0; c < n; ++c) { var d = e[t + c], h = d._texture, p = d.scale.x, f = d.scale.y, _ = h.trim, g = h.orig; _ ? ((a = (s = _.x - d.anchor.x * g.width) + _.width), (u = (l = _.y - d.anchor.y * g.height) + _.height)) : ((a = g.width * (1 - d.anchor.x)), (s = g.width * -d.anchor.x), (u = g.height * (1 - d.anchor.y)), (l = g.height * -d.anchor.y)), (r[o] = s * p), (r[o + 1] = l * f), (r[o + i] = a * p), (r[o + i + 1] = l * f), (r[o + 2 * i] = a * p), (r[o + 2 * i + 1] = u * f), (r[o + 3 * i] = s * p), (r[o + 3 * i + 1] = u * f), (o += 4 * i); } }), (t.prototype.uploadPosition = function (e, t, n, r, i, o) { for (var a = 0; a < n; a++) { var s = e[t + a].position; (r[o] = s.x), (r[o + 1] = s.y), (r[o + i] = s.x), (r[o + i + 1] = s.y), (r[o + 2 * i] = s.x), (r[o + 2 * i + 1] = s.y), (r[o + 3 * i] = s.x), (r[o + 3 * i + 1] = s.y), (o += 4 * i); } }), (t.prototype.uploadRotation = function (e, t, n, r, i, o) { for (var a = 0; a < n; a++) { var s = e[t + a].rotation; (r[o] = s), (r[o + i] = s), (r[o + 2 * i] = s), (r[o + 3 * i] = s), (o += 4 * i); } }), (t.prototype.uploadUvs = function (e, t, n, r, i, o) { for (var a = 0; a < n; ++a) { var s = e[t + a]._texture._uvs; s ? ((r[o] = s.x0), (r[o + 1] = s.y0), (r[o + i] = s.x1), (r[o + i + 1] = s.y1), (r[o + 2 * i] = s.x2), (r[o + 2 * i + 1] = s.y2), (r[o + 3 * i] = s.x3), (r[o + 3 * i + 1] = s.y3), (o += 4 * i)) : ((r[o] = 0), (r[o + 1] = 0), (r[o + i] = 0), (r[o + i + 1] = 0), (r[o + 2 * i] = 0), (r[o + 2 * i + 1] = 0), (r[o + 3 * i] = 0), (r[o + 3 * i + 1] = 0), (o += 4 * i)); } }), (t.prototype.uploadTint = function (e, t, n, r, i, o) { for (var a = 0; a < n; ++a) { var s = e[t + a], u = s._texture.baseTexture.alphaMode > 0, l = s.alpha, c = l < 1 && u ? de(s._tintRGB, l) : s._tintRGB + ((255 * l) << 24); (r[o] = c), (r[o + i] = c), (r[o + 2 * i] = c), (r[o + 3 * i] = c), (o += 4 * i); } }), (t.prototype.destroy = function () { e.prototype.destroy.call(this), this.shader && (this.shader.destroy(), (this.shader = null)), (this.tempMatrix = null); }), t ); })(vn); !(function (e) { (e.MITER = "miter"), (e.BEVEL = "bevel"), (e.ROUND = "round"); })(yi || (yi = {})), (function (e) { (e.BUTT = "butt"), (e.ROUND = "round"), (e.SQUARE = "square"); })(Ci || (Ci = {})); var Ti = { adaptive: !0, maxLength: 10, minSegments: 8, maxSegments: 2048, epsilon: 1e-4, _segmentsCount: function (e, t) { if ((void 0 === t && (t = 20), !this.adaptive || !e || isNaN(e))) return t; var n = Math.ceil(e / this.maxLength); return n < this.minSegments ? (n = this.minSegments) : n > this.maxSegments && (n = this.maxSegments), n; }, }, xi = (function () { function e() { (this.color = 16777215), (this.alpha = 1), (this.texture = Jt.WHITE), (this.matrix = null), (this.visible = !1), this.reset(); } return ( (e.prototype.clone = function () { var t = new e(); return (t.color = this.color), (t.alpha = this.alpha), (t.texture = this.texture), (t.matrix = this.matrix), (t.visible = this.visible), t; }), (e.prototype.reset = function () { (this.color = 16777215), (this.alpha = 1), (this.texture = Jt.WHITE), (this.matrix = null), (this.visible = !1); }), (e.prototype.destroy = function () { (this.texture = null), (this.matrix = null); }), e ); })(), Ei = function (e, t) { return ( (Ei = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ei(e, t) ); }; function Li(e, t) { function n() { this.constructor = e; } Ei(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var Ai = { build: function (e) { e.points = e.shape.points.slice(); }, triangulate: function (e, t) { var n = e.points, r = e.holes, i = t.points, o = t.indices; if (n.length >= 6) { for (var a = [], s = 0; s < r.length; s++) { var u = r[s]; a.push(n.length / 2), (n = n.concat(u.points)); } var l = K()(n, a, 2); if (!l) return; var c = i.length / 2; for (s = 0; s < l.length; s += 3) o.push(l[s] + c), o.push(l[s + 1] + c), o.push(l[s + 2] + c); for (s = 0; s < n.length; s++) i.push(n[s]); } }, }, Ii = { build: function (e) { var t, n, r = e.shape, i = e.points, o = r.x, a = r.y; if (((i.length = 0), e.type === Fe.CIRC)) (t = r.radius), (n = r.radius); else { var s = e.shape; (t = s.width), (n = s.height); } if (0 !== t && 0 !== n) { var u = Math.floor(30 * Math.sqrt(r.radius)) || Math.floor(15 * Math.sqrt(t + n)); u /= 2.3; for (var l = (2 * Math.PI) / u, c = 0; c < u - 0.5; c++) i.push(o + Math.sin(-l * c) * t, a + Math.cos(-l * c) * n); i.push(i[0], i[1]); } }, triangulate: function (e, t) { var n = e.points, r = t.points, i = t.indices, o = r.length / 2, a = o, s = e.shape, u = e.matrix, l = s.x, c = s.y; r.push(e.matrix ? u.a * l + u.c * c + u.tx : l, e.matrix ? u.b * l + u.d * c + u.ty : c); for (var d = 0; d < n.length; d += 2) r.push(n[d], n[d + 1]), i.push(o++, a, o); }, }, Mi = { build: function (e) { var t = e.shape, n = t.x, r = t.y, i = t.width, o = t.height, a = e.points; (a.length = 0), a.push(n, r, n + i, r, n + i, r + o, n, r + o); }, triangulate: function (e, t) { var n = e.points, r = t.points, i = r.length / 2; r.push(n[0], n[1], n[2], n[3], n[6], n[7], n[4], n[5]), t.indices.push(i, i + 1, i + 2, i + 1, i + 2, i + 3); }, }; function Pi(e, t, n) { return e + (t - e) * n; } function Oi(e, t, n, r, i, o, a) { void 0 === a && (a = []); for (var s = a, u = 0, l = 0, c = 0, d = 0, h = 0, p = 0, f = 0, _ = 0; f <= 20; ++f) (u = Pi(e, n, (_ = f / 20))), (l = Pi(t, r, _)), (c = Pi(n, i, _)), (d = Pi(r, o, _)), (h = Pi(u, c, _)), (p = Pi(l, d, _)), s.push(h, p); return s; } var ki = { build: function (e) { var t = e.shape, n = e.points, r = t.x, i = t.y, o = t.width, a = t.height, s = Math.max(0, Math.min(t.radius, Math.min(o, a) / 2)); (n.length = 0), s ? (Oi(r, i + s, r, i, r + s, i, n), Oi(r + o - s, i, r + o, i, r + o, i + s, n), Oi(r + o, i + a - s, r + o, i + a, r + o - s, i + a, n), Oi(r + s, i + a, r, i + a, r, i + a - s, n)) : n.push(r, i, r + o, i, r + o, i + a, r, i + a); }, triangulate: function (e, t) { for (var n = e.points, r = t.points, i = t.indices, o = r.length / 2, a = K()(n, null, 2), s = 0, u = a.length; s < u; s += 3) i.push(a[s] + o), i.push(a[s + 1] + o), i.push(a[s + 2] + o); for (s = 0, u = n.length; s < u; s++) r.push(n[s], n[++s]); }, }; function Ri(e, t, n, r, i, o, a, s) { var u, l; a ? ((u = r), (l = -n)) : ((u = -r), (l = n)); var c = e - n * i + u, d = t - r * i + l, h = e + n * o + u, p = t + r * o + l; return s.push(c, d), s.push(h, p), 2; } function Di(e, t, n, r, i, o, a, s) { var u = n - e, l = r - t, c = Math.atan2(u, l), d = Math.atan2(i - e, o - t); s && c < d ? (c += 2 * Math.PI) : !s && c > d && (d += 2 * Math.PI); var h = c, p = d - c, f = Math.abs(p), _ = Math.sqrt(u * u + l * l), g = 1 + (((15 * f * Math.sqrt(_)) / Math.PI) >> 0), m = p / g; if (((h += m), s)) { a.push(e, t), a.push(n, r); for (var v = 1, y = h; v < g; v++, y += m) a.push(e, t), a.push(e + Math.sin(y) * _, t + Math.cos(y) * _); a.push(e, t), a.push(i, o); } else { a.push(n, r), a.push(e, t); for (v = 1, y = h; v < g; v++, y += m) a.push(e + Math.sin(y) * _, t + Math.cos(y) * _), a.push(e, t); a.push(i, o), a.push(e, t); } return 2 * g; } function Ni(e, t) { e.lineStyle.native ? (function (e, t) { var n = 0, r = e.shape, i = e.points || r.points, o = r.type !== Fe.POLY || r.closeStroke; if (0 !== i.length) { var a = t.points, s = t.indices, u = i.length / 2, l = a.length / 2, c = l; for (a.push(i[0], i[1]), n = 1; n < u; n++) a.push(i[2 * n], i[2 * n + 1]), s.push(c, c + 1), c++; o && s.push(c, l); } })(e, t) : (function (e, t) { var n = e.shape, r = e.points || n.points.slice(), i = t.closePointEps; if (0 !== r.length) { var o = e.lineStyle, a = new We(r[0], r[1]), s = new We(r[r.length - 2], r[r.length - 1]), u = n.type !== Fe.POLY || n.closeStroke, l = Math.abs(a.x - s.x) < i && Math.abs(a.y - s.y) < i; if (u) { (r = r.slice()), l && (r.pop(), r.pop(), s.set(r[r.length - 2], r[r.length - 1])); var c = 0.5 * (a.x + s.x), d = 0.5 * (s.y + a.y); r.unshift(c, d), r.push(c, d); } var h = t.points, p = r.length / 2, f = r.length, _ = h.length / 2, g = o.width / 2, m = g * g, v = o.miterLimit * o.miterLimit, y = r[0], C = r[1], b = r[2], w = r[3], S = 0, T = 0, x = -(C - w), E = y - b, L = 0, A = 0, I = Math.sqrt(x * x + E * E); (x /= I), (E /= I), (x *= g), (E *= g); var M = o.alignment, P = 2 * (1 - M), O = 2 * M; u || (o.cap === Ci.ROUND ? (f += Di(y - x * (P - O) * 0.5, C - E * (P - O) * 0.5, y - x * P, C - E * P, y + x * O, C + E * O, h, !0) + 2) : o.cap === Ci.SQUARE && (f += Ri(y, C, x, E, P, O, !0, h))), h.push(y - x * P, C - E * P), h.push(y + x * O, C + E * O); for (var k = 1; k < p - 1; ++k) { (y = r[2 * (k - 1)]), (C = r[2 * (k - 1) + 1]), (b = r[2 * k]), (w = r[2 * k + 1]), (S = r[2 * (k + 1)]), (T = r[2 * (k + 1) + 1]), (x = -(C - w)), (E = y - b), (x /= I = Math.sqrt(x * x + E * E)), (E /= I), (x *= g), (E *= g), (L = -(w - T)), (A = b - S), (L /= I = Math.sqrt(L * L + A * A)), (A /= I), (L *= g), (A *= g); var R = b - y, D = C - w, N = b - S, B = T - w, F = D * N - B * R, U = F < 0; if (Math.abs(F) < 0.1) h.push(b - x * P, w - E * P), h.push(b + x * O, w + E * O); else { var j = (-x + y) * (-E + w) - (-x + b) * (-E + C), G = (-L + S) * (-A + w) - (-L + b) * (-A + T), H = (R * G - N * j) / F, V = (B * j - D * G) / F, Z = (H - b) * (H - b) + (V - w) * (V - w), z = b + (H - b) * P, Y = w + (V - w) * P, W = b - (H - b) * O, X = w - (V - w) * O, q = U ? P : O; Z <= Math.min(R * R + D * D, N * N + B * B) + q * q * m ? (o.join === yi.BEVEL || Z / m > v ? (U ? (h.push(z, Y), h.push(b + x * O, w + E * O), h.push(z, Y), h.push(b + L * O, w + A * O)) : (h.push(b - x * P, w - E * P), h.push(W, X), h.push(b - L * P, w - A * P), h.push(W, X)), (f += 2)) : o.join === yi.ROUND ? (U ? (h.push(z, Y), h.push(b + x * O, w + E * O), (f += Di(b, w, b + x * O, w + E * O, b + L * O, w + A * O, h, !0) + 4), h.push(z, Y), h.push(b + L * O, w + A * O)) : (h.push(b - x * P, w - E * P), h.push(W, X), (f += Di(b, w, b - x * P, w - E * P, b - L * P, w - A * P, h, !1) + 4), h.push(b - L * P, w - A * P), h.push(W, X))) : (h.push(z, Y), h.push(W, X))) : (h.push(b - x * P, w - E * P), h.push(b + x * O, w + E * O), o.join === yi.BEVEL || Z / m > v || (o.join === yi.ROUND ? (f += U ? Di(b, w, b + x * O, w + E * O, b + L * O, w + A * O, h, !0) + 2 : Di(b, w, b - x * P, w - E * P, b - L * P, w - A * P, h, !1) + 2) : (U ? (h.push(W, X), h.push(W, X)) : (h.push(z, Y), h.push(z, Y)), (f += 2))), h.push(b - L * P, w - A * P), h.push(b + L * O, w + A * O), (f += 2)); } } (y = r[2 * (p - 2)]), (C = r[2 * (p - 2) + 1]), (b = r[2 * (p - 1)]), (x = -(C - (w = r[2 * (p - 1) + 1]))), (E = y - b), (x /= I = Math.sqrt(x * x + E * E)), (E /= I), (x *= g), (E *= g), h.push(b - x * P, w - E * P), h.push(b + x * O, w + E * O), u || (o.cap === Ci.ROUND ? (f += Di(b - x * (P - O) * 0.5, w - E * (P - O) * 0.5, b - x * P, w - E * P, b + x * O, w + E * O, h, !1) + 2) : o.cap === Ci.SQUARE && (f += Ri(b, w, x, E, P, O, !1, h))); var K = t.indices, $ = Ti.epsilon * Ti.epsilon; for (k = _; k < f + _ - 2; ++k) (y = h[2 * k]), (C = h[2 * k + 1]), (b = h[2 * (k + 1)]), (w = h[2 * (k + 1) + 1]), (S = h[2 * (k + 2)]), (T = h[2 * (k + 2) + 1]), Math.abs(y * (w - T) + b * (T - C) + S * (C - w)) < $ || K.push(k, k + 1, k + 2); } })(e, t); } var Bi, Fi = (function (e) { function t(t, n, r, i, o, a) { void 0 === a && (a = 0); o = o || i / 2; for (var s = (-1 * Math.PI) / 2 + a, u = 2 * r, l = Ue / u, c = [], d = 0; d < u; d++) { var h = d % 2 ? o : i, p = d * l + s; c.push(t + h * Math.cos(p), n + h * Math.sin(p)); } return e.call(this, c) || this; } return Li(t, e), t; })(ze), Ui = (function () { function e() {} return ( (e.curveTo = function (e, t, n, r, i, o) { var a = o[o.length - 2], s = o[o.length - 1] - t, u = a - e, l = r - t, c = n - e, d = Math.abs(s * c - u * l); if (d < 1e-8 || 0 === i) return (o[o.length - 2] === e && o[o.length - 1] === t) || o.push(e, t), null; var h = s * s + u * u, p = l * l + c * c, f = s * l + u * c, _ = (i * Math.sqrt(h)) / d, g = (i * Math.sqrt(p)) / d, m = (_ * f) / h, v = (g * f) / p, y = _ * c + g * u, C = _ * l + g * s, b = u * (g + m), w = s * (g + m), S = c * (_ + v), T = l * (_ + v); return { cx: y + e, cy: C + t, radius: i, startAngle: Math.atan2(w - C, b - y), endAngle: Math.atan2(T - C, S - y), anticlockwise: u * l > c * s }; }), (e.arc = function (e, t, n, r, i, o, a, s, u) { for (var l = a - o, c = Ti._segmentsCount(Math.abs(l) * i, 40 * Math.ceil(Math.abs(l) / Ue)), d = l / (2 * c), h = 2 * d, p = Math.cos(d), f = Math.sin(d), _ = c - 1, g = (_ % 1) / _, m = 0; m <= _; ++m) { var v = d + o + h * (m + g * m), y = Math.cos(v), C = -Math.sin(v); u.push((p * y + f * C) * i + n, (p * -C + f * y) * i + r); } }), e ); })(), ji = (function () { function e() {} return ( (e.curveLength = function (e, t, n, r, i, o, a, s) { for (var u = 0, l = 0, c = 0, d = 0, h = 0, p = 0, f = 0, _ = 0, g = 0, m = 0, v = 0, y = e, C = t, b = 1; b <= 10; ++b) (m = y - (_ = (f = (p = (h = 1 - (l = b / 10)) * h) * h) * e + 3 * p * l * n + 3 * h * (c = l * l) * i + (d = c * l) * a)), (v = C - (g = f * t + 3 * p * l * r + 3 * h * c * o + d * s)), (y = _), (C = g), (u += Math.sqrt(m * m + v * v)); return u; }), (e.curveTo = function (t, n, r, i, o, a, s) { var u = s[s.length - 2], l = s[s.length - 1]; s.length -= 2; var c = Ti._segmentsCount(e.curveLength(u, l, t, n, r, i, o, a)), d = 0, h = 0, p = 0, f = 0, _ = 0; s.push(u, l); for (var g = 1, m = 0; g <= c; ++g) (p = (h = (d = 1 - (m = g / c)) * d) * d), (_ = (f = m * m) * m), s.push(p * u + 3 * h * m * t + 3 * d * f * r + _ * o, p * l + 3 * h * m * n + 3 * d * f * i + _ * a); }), e ); })(), Gi = (function () { function e() {} return ( (e.curveLength = function (e, t, n, r, i, o) { var a = e - 2 * n + i, s = t - 2 * r + o, u = 2 * n - 2 * e, l = 2 * r - 2 * t, c = 4 * (a * a + s * s), d = 4 * (a * u + s * l), h = u * u + l * l, p = 2 * Math.sqrt(c + d + h), f = Math.sqrt(c), _ = 2 * c * f, g = 2 * Math.sqrt(h), m = d / f; return (_ * p + f * d * (p - g) + (4 * h * c - d * d) * Math.log((2 * f + m + p) / (m + g))) / (4 * _); }), (e.curveTo = function (t, n, r, i, o) { for (var a = o[o.length - 2], s = o[o.length - 1], u = Ti._segmentsCount(e.curveLength(a, s, t, n, r, i)), l = 0, c = 0, d = 1; d <= u; ++d) { var h = d / u; (l = a + (t - a) * h), (c = s + (n - s) * h), o.push(l + (t + (r - t) * h - l) * h, c + (n + (i - n) * h - c) * h); } }), e ); })(), Hi = (function () { function e() { this.reset(); } return ( (e.prototype.begin = function (e, t, n) { this.reset(), (this.style = e), (this.start = t), (this.attribStart = n); }), (e.prototype.end = function (e, t) { (this.attribSize = t - this.attribStart), (this.size = e - this.start); }), (e.prototype.reset = function () { (this.style = null), (this.size = 0), (this.start = 0), (this.attribStart = 0), (this.attribSize = 0); }), e ); })(), Vi = (((Bi = {})[Fe.POLY] = Ai), (Bi[Fe.CIRC] = Ii), (Bi[Fe.ELIP] = Ii), (Bi[Fe.RECT] = Mi), (Bi[Fe.RREC] = ki), Bi), Zi = [], zi = [], Yi = { buildPoly: Ai, buildCircle: Ii, buildRectangle: Mi, buildRoundedRectangle: ki, FILL_COMMANDS: Vi, BATCH_POOL: Zi, DRAW_CALL_POOL: zi, buildLine: Ni, Star: Fi, ArcUtils: Ui, BezierUtils: ji, QuadraticUtils: Gi, BatchPart: Hi }, Wi = (function () { function e(e, t, n, r) { void 0 === t && (t = null), void 0 === n && (n = null), void 0 === r && (r = null), (this.shape = e), (this.lineStyle = n), (this.fillStyle = t), (this.matrix = r), (this.type = e.type), (this.points = []), (this.holes = []); } return ( (e.prototype.clone = function () { return new e(this.shape, this.fillStyle, this.lineStyle, this.matrix); }), (e.prototype.destroy = function () { (this.shape = null), (this.holes.length = 0), (this.holes = null), (this.points.length = 0), (this.points = null), (this.lineStyle = null), (this.fillStyle = null); }), e ); })(), Xi = new We(), qi = new ot(), Ki = (function (e) { function t() { var t = e.call(this) || this; return (t.uvsFloat32 = null), (t.indicesUint16 = null), (t.points = []), (t.colors = []), (t.uvs = []), (t.indices = []), (t.textureIds = []), (t.graphicsData = []), (t.dirty = 0), (t.batchDirty = -1), (t.cacheDirty = -1), (t.clearDirty = 0), (t.drawCalls = []), (t.batches = []), (t.shapeIndex = 0), (t._bounds = new ot()), (t.boundsDirty = -1), (t.boundsPadding = 0), (t.batchable = !1), (t.indicesUint16 = null), (t.uvsFloat32 = null), (t.closePointEps = 1e-4), t; } return ( Li(t, e), Object.defineProperty(t.prototype, "bounds", { get: function () { return this.boundsDirty !== this.dirty && ((this.boundsDirty = this.dirty), this.calculateBounds()), this._bounds; }, enumerable: !1, configurable: !0, }), (t.prototype.invalidate = function () { (this.boundsDirty = -1), this.dirty++, this.batchDirty++, (this.shapeIndex = 0), (this.points.length = 0), (this.colors.length = 0), (this.uvs.length = 0), (this.indices.length = 0), (this.textureIds.length = 0); for (var e = 0; e < this.drawCalls.length; e++) this.drawCalls[e].texArray.clear(), zi.push(this.drawCalls[e]); this.drawCalls.length = 0; for (e = 0; e < this.batches.length; e++) { var t = this.batches[e]; t.reset(), Zi.push(t); } this.batches.length = 0; }), (t.prototype.clear = function () { return this.graphicsData.length > 0 && (this.invalidate(), this.clearDirty++, (this.graphicsData.length = 0)), this; }), (t.prototype.drawShape = function (e, t, n, r) { void 0 === t && (t = null), void 0 === n && (n = null), void 0 === r && (r = null); var i = new Wi(e, t, n, r); return this.graphicsData.push(i), this.dirty++, this; }), (t.prototype.drawHole = function (e, t) { if ((void 0 === t && (t = null), !this.graphicsData.length)) return null; var n = new Wi(e, null, null, t), r = this.graphicsData[this.graphicsData.length - 1]; return (n.lineStyle = r.lineStyle), r.holes.push(n), this.dirty++, this; }), (t.prototype.destroy = function () { e.prototype.destroy.call(this); for (var t = 0; t < this.graphicsData.length; ++t) this.graphicsData[t].destroy(); (this.points.length = 0), (this.points = null), (this.colors.length = 0), (this.colors = null), (this.uvs.length = 0), (this.uvs = null), (this.indices.length = 0), (this.indices = null), this.indexBuffer.destroy(), (this.indexBuffer = null), (this.graphicsData.length = 0), (this.graphicsData = null), (this.drawCalls.length = 0), (this.drawCalls = null), (this.batches.length = 0), (this.batches = null), (this._bounds = null); }), (t.prototype.containsPoint = function (e) { for (var t = this.graphicsData, n = 0; n < t.length; ++n) { var r = t[n]; if (r.fillStyle.visible && r.shape && (r.matrix ? r.matrix.applyInverse(e, Xi) : Xi.copyFrom(e), r.shape.contains(Xi.x, Xi.y))) { var i = !1; if (r.holes) for (var o = 0; o < r.holes.length; o++) { if (r.holes[o].shape.contains(Xi.x, Xi.y)) { i = !0; break; } } if (!i) return !0; } } return !1; }), (t.prototype.updateBatches = function (e) { if (this.graphicsData.length) { if (this.validateBatching()) { this.cacheDirty = this.dirty; var t = this.uvs, n = this.graphicsData, r = null, i = null; this.batches.length > 0 && (i = (r = this.batches[this.batches.length - 1]).style); for (var o = this.shapeIndex; o < n.length; o++) { this.shapeIndex++; var a = n[o], s = a.fillStyle, u = a.lineStyle; Vi[a.type].build(a), a.matrix && this.transformPoints(a.points, a.matrix); for (var l = 0; l < 2; l++) { var c = 0 === l ? s : u; if (c.visible) { var d = c.texture.baseTexture, h = this.indices.length, p = this.points.length / 2; (d.wrapMode = F.REPEAT), 0 === l ? this.processFill(a) : this.processLine(a); var f = this.points.length / 2 - p; 0 !== f && (r && !this._compareStyles(i, c) && (r.end(h, p), (r = null)), r || ((r = Zi.pop() || new Hi()).begin(c, h, p), this.batches.push(r), (i = c)), this.addUvs(this.points, t, c.texture, p, f, c.matrix)); } } } var _ = this.indices.length, g = this.points.length / 2; if ((r && r.end(_, g), 0 !== this.batches.length)) { if (this.indicesUint16 && this.indices.length === this.indicesUint16.length) this.indicesUint16.set(this.indices); else { var m = g > 65535 && e; this.indicesUint16 = m ? new Uint32Array(this.indices) : new Uint16Array(this.indices); } (this.batchable = this.isBatchable()), this.batchable ? this.packBatches() : this.buildDrawCalls(); } else this.batchable = !0; } } else this.batchable = !0; }), (t.prototype._compareStyles = function (e, t) { return !(!e || !t) && e.texture.baseTexture === t.texture.baseTexture && e.color + e.alpha === t.color + t.alpha && !!e.native == !!t.native; }), (t.prototype.validateBatching = function () { if (this.dirty === this.cacheDirty || !this.graphicsData.length) return !1; for (var e = 0, t = this.graphicsData.length; e < t; e++) { var n = this.graphicsData[e], r = n.fillStyle, i = n.lineStyle; if (r && !r.texture.baseTexture.valid) return !1; if (i && !i.texture.baseTexture.valid) return !1; } return !0; }), (t.prototype.packBatches = function () { this.batchDirty++, (this.uvsFloat32 = new Float32Array(this.uvs)); for (var e = this.batches, t = 0, n = e.length; t < n; t++) for (var r = e[t], i = 0; i < r.size; i++) { var o = r.start + i; this.indicesUint16[o] = this.indicesUint16[o] - r.attribStart; } }), (t.prototype.isBatchable = function () { if (this.points.length > 131070) return !1; for (var e = this.batches, n = 0; n < e.length; n++) if (e[n].style.native) return !1; return this.points.length < 2 * t.BATCHABLE_SIZE; }), (t.prototype.buildDrawCalls = function () { for (var e = ++Dt._globalBatch, t = 0; t < this.drawCalls.length; t++) this.drawCalls[t].texArray.clear(), zi.push(this.drawCalls[t]); this.drawCalls.length = 0; var n = this.colors, r = this.textureIds, i = zi.pop(); i || ((i = new Mr()).texArray = new Pr()), (i.texArray.count = 0), (i.start = 0), (i.size = 0), (i.type = k.TRIANGLES); var o = 0, a = null, s = 0, u = !1, l = k.TRIANGLES, c = 0; this.drawCalls.push(i); for (t = 0; t < this.batches.length; t++) { var d = this.batches[t], h = d.style, p = h.texture.baseTexture; u !== !!h.native && ((l = (u = !!h.native) ? k.LINES : k.TRIANGLES), (a = null), (o = 8), e++), a !== p && ((a = p), p._batchEnabled !== e && (8 === o && (e++, (o = 0), i.size > 0 && ((i = zi.pop()) || ((i = new Mr()).texArray = new Pr()), this.drawCalls.push(i)), (i.start = c), (i.size = 0), (i.texArray.count = 0), (i.type = l)), (p.touched = 1), (p._batchEnabled = e), (p._batchLocation = o), (p.wrapMode = 10497), (i.texArray.elements[i.texArray.count++] = p), o++)), (i.size += d.size), (c += d.size), (s = p._batchLocation), this.addColors(n, h.color, h.alpha, d.attribSize, d.attribStart), this.addTextureIds(r, s, d.attribSize, d.attribStart); } (Dt._globalBatch = e), this.packAttributes(); }), (t.prototype.packAttributes = function () { for (var e = this.points, t = this.uvs, n = this.colors, r = this.textureIds, i = new ArrayBuffer(3 * e.length * 4), o = new Float32Array(i), a = new Uint32Array(i), s = 0, u = 0; u < e.length / 2; u++) (o[s++] = e[2 * u]), (o[s++] = e[2 * u + 1]), (o[s++] = t[2 * u]), (o[s++] = t[2 * u + 1]), (a[s++] = n[u]), (o[s++] = r[u]); this._buffer.update(i), this._indexBuffer.update(this.indicesUint16); }), (t.prototype.processFill = function (e) { e.holes.length ? (this.processHoles(e.holes), Ai.triangulate(e, this)) : Vi[e.type].triangulate(e, this); }), (t.prototype.processLine = function (e) { Ni(e, this); for (var t = 0; t < e.holes.length; t++) Ni(e.holes[t], this); }), (t.prototype.processHoles = function (e) { for (var t = 0; t < e.length; t++) { var n = e[t]; Vi[n.type].build(n), n.matrix && this.transformPoints(n.points, n.matrix); } }), (t.prototype.calculateBounds = function () { var e = this._bounds, t = qi, n = qe.IDENTITY; this._bounds.clear(), t.clear(); for (var r = 0; r < this.graphicsData.length; r++) { var i = this.graphicsData[r], o = i.shape, a = i.type, s = i.lineStyle, u = i.matrix || qe.IDENTITY, l = 0; if (s && s.visible) { var c = s.alignment; (l = s.width), a === Fe.POLY ? (l *= 0.5 + Math.abs(0.5 - c)) : (l *= Math.max(0, c)); } if ((n !== u && (t.isEmpty() || (e.addBoundsMatrix(t, n), t.clear()), (n = u)), a === Fe.RECT || a === Fe.RREC)) { var d = o; t.addFramePad(d.x, d.y, d.x + d.width, d.y + d.height, l, l); } else if (a === Fe.CIRC) { var h = o; t.addFramePad(h.x, h.y, h.x, h.y, h.radius + l, h.radius + l); } else if (a === Fe.ELIP) { var p = o; t.addFramePad(p.x, p.y, p.x, p.y, p.width + l, p.height + l); } else { var f = o; e.addVerticesMatrix(n, f.points, 0, f.points.length, l, l); } } t.isEmpty() || e.addBoundsMatrix(t, n), e.pad(this.boundsPadding, this.boundsPadding); }), (t.prototype.transformPoints = function (e, t) { for (var n = 0; n < e.length / 2; n++) { var r = e[2 * n], i = e[2 * n + 1]; (e[2 * n] = t.a * r + t.c * i + t.tx), (e[2 * n + 1] = t.b * r + t.d * i + t.ty); } }), (t.prototype.addColors = function (e, t, n, r, i) { void 0 === i && (i = 0); var o = de((t >> 16) + (65280 & t) + ((255 & t) << 16), n); e.length = Math.max(e.length, i + r); for (var a = 0; a < r; a++) e[i + a] = o; }), (t.prototype.addTextureIds = function (e, t, n, r) { void 0 === r && (r = 0), (e.length = Math.max(e.length, r + n)); for (var i = 0; i < n; i++) e[r + i] = t; }), (t.prototype.addUvs = function (e, t, n, r, i, o) { void 0 === o && (o = null); for (var a = 0, s = t.length, u = n.frame; a < i; ) { var l = e[2 * (r + a)], c = e[2 * (r + a) + 1]; if (o) { var d = o.a * l + o.c * c + o.tx; (c = o.b * l + o.d * c + o.ty), (l = d); } a++, t.push(l / u.width, c / u.height); } var h = n.baseTexture; (u.width < h.width || u.height < h.height) && this.adjustUvs(t, n, s, i); }), (t.prototype.adjustUvs = function (e, t, n, r) { for (var i = t.baseTexture, o = 1e-6, a = n + 2 * r, s = t.frame, u = s.width / i.width, l = s.height / i.height, c = s.x / s.width, d = s.y / s.height, h = Math.floor(e[n] + o), p = Math.floor(e[n + 1] + o), f = n + 2; f < a; f += 2) (h = Math.min(h, Math.floor(e[f] + o))), (p = Math.min(p, Math.floor(e[f + 1] + o))); (c -= h), (d -= p); for (f = n; f < a; f += 2) (e[f] = (e[f] + c) * u), (e[f + 1] = (e[f + 1] + d) * l); }), (t.BATCHABLE_SIZE = 100), t ); })(Dr), $i = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.width = 0), (t.alignment = 0.5), (t.native = !1), (t.cap = Ci.BUTT), (t.join = yi.MITER), (t.miterLimit = 10), t; } return ( Li(t, e), (t.prototype.clone = function () { var e = new t(); return (e.color = this.color), (e.alpha = this.alpha), (e.texture = this.texture), (e.matrix = this.matrix), (e.visible = this.visible), (e.width = this.width), (e.alignment = this.alignment), (e.native = this.native), (e.cap = this.cap), (e.join = this.join), (e.miterLimit = this.miterLimit), e; }), (t.prototype.reset = function () { e.prototype.reset.call(this), (this.color = 0), (this.alignment = 0.5), (this.width = 0), (this.native = !1); }), t ); })(xi), Ji = new Float32Array(3), Qi = {}, eo = (function (e) { function t(t) { void 0 === t && (t = null); var n = e.call(this) || this; return (n._geometry = t || new Ki()), n._geometry.refCount++, (n.shader = null), (n.state = er.for2d()), (n._fillStyle = new xi()), (n._lineStyle = new $i()), (n._matrix = null), (n._holeMode = !1), (n.currentPath = null), (n.batches = []), (n.batchTint = -1), (n.batchDirty = -1), (n.vertexData = null), (n.pluginName = "batch"), (n._transformID = -1), (n.tint = 16777215), (n.blendMode = O.NORMAL), n; } return ( Li(t, e), Object.defineProperty(t.prototype, "geometry", { get: function () { return this._geometry; }, enumerable: !1, configurable: !0, }), (t.prototype.clone = function () { return this.finishPoly(), new t(this._geometry); }), Object.defineProperty(t.prototype, "blendMode", { get: function () { return this.state.blendMode; }, set: function (e) { this.state.blendMode = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "tint", { get: function () { return this._tint; }, set: function (e) { this._tint = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "fill", { get: function () { return this._fillStyle; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "line", { get: function () { return this._lineStyle; }, enumerable: !1, configurable: !0, }), (t.prototype.lineStyle = function (e) { if ((void 0 === e && (e = null), "number" == typeof e)) { var t = arguments; e = { width: t[0] || 0, color: t[1] || 0, alpha: void 0 !== t[2] ? t[2] : 1, alignment: void 0 !== t[3] ? t[3] : 0.5, native: !!t[4] }; } return this.lineTextureStyle(e); }), (t.prototype.lineTextureStyle = function (e) { if ("number" == typeof e) { xe("v5.2.0", "Please use object-based options for Graphics#lineTextureStyle"); var t = arguments; (e = { width: t[0], texture: t[1], color: t[2], alpha: t[3], matrix: t[4], alignment: t[5], native: t[6] }), Object.keys(e).forEach(function (t) { return void 0 === e[t] && delete e[t]; }); } (e = Object.assign({ width: 0, texture: Jt.WHITE, color: e && e.texture ? 16777215 : 0, alpha: 1, matrix: null, alignment: 0.5, native: !1, cap: Ci.BUTT, join: yi.MITER, miterLimit: 10 }, e)), this.currentPath && this.startPoly(); var n = e.width > 0 && e.alpha > 0; return n ? (e.matrix && ((e.matrix = e.matrix.clone()), e.matrix.invert()), Object.assign(this._lineStyle, { visible: n }, e)) : this._lineStyle.reset(), this; }), (t.prototype.startPoly = function () { if (this.currentPath) { var e = this.currentPath.points, t = this.currentPath.points.length; t > 2 && (this.drawShape(this.currentPath), (this.currentPath = new ze()), (this.currentPath.closeStroke = !1), this.currentPath.points.push(e[t - 2], e[t - 1])); } else (this.currentPath = new ze()), (this.currentPath.closeStroke = !1); }), (t.prototype.finishPoly = function () { this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), (this.currentPath = null)) : (this.currentPath.points.length = 0)); }), (t.prototype.moveTo = function (e, t) { return this.startPoly(), (this.currentPath.points[0] = e), (this.currentPath.points[1] = t), this; }), (t.prototype.lineTo = function (e, t) { this.currentPath || this.moveTo(0, 0); var n = this.currentPath.points, r = n[n.length - 2], i = n[n.length - 1]; return (r === e && i === t) || n.push(e, t), this; }), (t.prototype._initCurve = function (e, t) { void 0 === e && (e = 0), void 0 === t && (t = 0), this.currentPath ? 0 === this.currentPath.points.length && (this.currentPath.points = [e, t]) : this.moveTo(e, t); }), (t.prototype.quadraticCurveTo = function (e, t, n, r) { this._initCurve(); var i = this.currentPath.points; return 0 === i.length && this.moveTo(0, 0), Gi.curveTo(e, t, n, r, i), this; }), (t.prototype.bezierCurveTo = function (e, t, n, r, i, o) { return this._initCurve(), ji.curveTo(e, t, n, r, i, o, this.currentPath.points), this; }), (t.prototype.arcTo = function (e, t, n, r, i) { this._initCurve(e, t); var o = this.currentPath.points, a = Ui.curveTo(e, t, n, r, i, o); if (a) { var s = a.cx, u = a.cy, l = a.radius, c = a.startAngle, d = a.endAngle, h = a.anticlockwise; this.arc(s, u, l, c, d, h); } return this; }), (t.prototype.arc = function (e, t, n, r, i, o) { if ((void 0 === o && (o = !1), r === i)) return this; if ((!o && i <= r ? (i += Ue) : o && r <= i && (r += Ue), 0 === i - r)) return this; var a = e + Math.cos(r) * n, s = t + Math.sin(r) * n, u = this._geometry.closePointEps, l = this.currentPath ? this.currentPath.points : null; if (l) { var c = Math.abs(l[l.length - 2] - a), d = Math.abs(l[l.length - 1] - s); (c < u && d < u) || l.push(a, s); } else this.moveTo(a, s), (l = this.currentPath.points); return Ui.arc(a, s, e, t, n, r, i, o, l), this; }), (t.prototype.beginFill = function (e, t) { return void 0 === e && (e = 0), void 0 === t && (t = 1), this.beginTextureFill({ texture: Jt.WHITE, color: e, alpha: t }); }), (t.prototype.beginTextureFill = function (e) { if (e instanceof Jt) { xe("v5.2.0", "Please use object-based options for Graphics#beginTextureFill"); var t = arguments; (e = { texture: t[0], color: t[1], alpha: t[2], matrix: t[3] }), Object.keys(e).forEach(function (t) { return void 0 === e[t] && delete e[t]; }); } (e = Object.assign({ texture: Jt.WHITE, color: 16777215, alpha: 1, matrix: null }, e)), this.currentPath && this.startPoly(); var n = e.alpha > 0; return n ? (e.matrix && ((e.matrix = e.matrix.clone()), e.matrix.invert()), Object.assign(this._fillStyle, { visible: n }, e)) : this._fillStyle.reset(), this; }), (t.prototype.endFill = function () { return this.finishPoly(), this._fillStyle.reset(), this; }), (t.prototype.drawRect = function (e, t, n, r) { return this.drawShape(new He(e, t, n, r)); }), (t.prototype.drawRoundedRect = function (e, t, n, r, i) { return this.drawShape(new Ye(e, t, n, r, i)); }), (t.prototype.drawCircle = function (e, t, n) { return this.drawShape(new Ve(e, t, n)); }), (t.prototype.drawEllipse = function (e, t, n, r) { return this.drawShape(new Ze(e, t, n, r)); }), (t.prototype.drawPolygon = function () { for (var e, t = arguments, n = [], r = 0; r < arguments.length; r++) n[r] = t[r]; var i = !0, o = n[0]; o.points ? ((i = o.closeStroke), (e = o.points)) : (e = Array.isArray(n[0]) ? n[0] : n); var a = new ze(e); return (a.closeStroke = i), this.drawShape(a), this; }), (t.prototype.drawShape = function (e) { return this._holeMode ? this._geometry.drawHole(e, this._matrix) : this._geometry.drawShape(e, this._fillStyle.clone(), this._lineStyle.clone(), this._matrix), this; }), (t.prototype.drawStar = function (e, t, n, r, i, o) { return void 0 === o && (o = 0), this.drawPolygon(new Fi(e, t, n, r, i, o)); }), (t.prototype.clear = function () { return this._geometry.clear(), this._lineStyle.reset(), this._fillStyle.reset(), this._boundsID++, (this._matrix = null), (this._holeMode = !1), (this.currentPath = null), this; }), (t.prototype.isFastRect = function () { var e = this._geometry.graphicsData; return 1 === e.length && e[0].shape.type === Fe.RECT && !(e[0].lineStyle.visible && e[0].lineStyle.width); }), (t.prototype._render = function (e) { this.finishPoly(); var t = this._geometry, n = e.context.supports.uint32Indices; t.updateBatches(n), t.batchable ? (this.batchDirty !== t.batchDirty && this._populateBatches(), this._renderBatched(e)) : (e.batch.flush(), this._renderDirect(e)); }), (t.prototype._populateBatches = function () { var e = this._geometry, t = this.blendMode, n = e.batches.length; (this.batchTint = -1), (this._transformID = -1), (this.batchDirty = e.batchDirty), (this.batches.length = n), (this.vertexData = new Float32Array(e.points)); for (var r = 0; r < n; r++) { var i = e.batches[r], o = i.style.color, a = new Float32Array(this.vertexData.buffer, 4 * i.attribStart * 2, 2 * i.attribSize), s = new Float32Array(e.uvsFloat32.buffer, 4 * i.attribStart * 2, 2 * i.attribSize), u = { vertexData: a, blendMode: t, indices: new Uint16Array(e.indicesUint16.buffer, 2 * i.start, i.size), uvs: s, _batchRGB: ie(o), _tintRGB: o, _texture: i.style.texture, alpha: i.style.alpha, worldAlpha: 1 }; this.batches[r] = u; } }), (t.prototype._renderBatched = function (e) { if (this.batches.length) { e.batch.setObjectRenderer(e.plugins[this.pluginName]), this.calculateVertices(), this.calculateTints(); for (var t = 0, n = this.batches.length; t < n; t++) { var r = this.batches[t]; (r.worldAlpha = this.worldAlpha * r.alpha), e.plugins[this.pluginName].render(r); } } }), (t.prototype._renderDirect = function (e) { var t = this._resolveDirectShader(e), n = this._geometry, r = this.tint, i = this.worldAlpha, o = t.uniforms, a = n.drawCalls; (o.translationMatrix = this.transform.worldTransform), (o.tint[0] = (((r >> 16) & 255) / 255) * i), (o.tint[1] = (((r >> 8) & 255) / 255) * i), (o.tint[2] = ((255 & r) / 255) * i), (o.tint[3] = i), e.shader.bind(t), e.geometry.bind(n, t), e.state.set(this.state); for (var s = 0, u = a.length; s < u; s++) this._renderDrawCallDirect(e, n.drawCalls[s]); }), (t.prototype._renderDrawCallDirect = function (e, t) { for (var n = t.texArray, r = t.type, i = t.size, o = t.start, a = n.count, s = 0; s < a; s++) e.texture.bind(n.elements[s], s); e.geometry.draw(r, i, o); }), (t.prototype._resolveDirectShader = function (e) { var t = this.shader, n = this.pluginName; if (!t) { if (!Qi[n]) { for (var r = e.plugins.batch.MAX_TEXTURES, i = new Int32Array(r), o = 0; o < r; o++) i[o] = o; var a = { tint: new Float32Array([1, 1, 1, 1]), translationMatrix: new qe(), default: _n.from({ uSamplers: i }, !0) }, s = e.plugins[n]._shader.program; Qi[n] = new Qn(s, a); } t = Qi[n]; } return t; }), (t.prototype._calculateBounds = function () { this.finishPoly(); var e = this._geometry; if (e.graphicsData.length) { var t = e.bounds, n = t.minX, r = t.minY, i = t.maxX, o = t.maxY; this._bounds.addFrame(this.transform, n, r, i, o); } }), (t.prototype.containsPoint = function (e) { return this.worldTransform.applyInverse(e, t._TEMP_POINT), this._geometry.containsPoint(t._TEMP_POINT); }), (t.prototype.calculateTints = function () { if (this.batchTint !== this.tint) { this.batchTint = this.tint; for (var e = ie(this.tint, Ji), t = 0; t < this.batches.length; t++) { var n = this.batches[t], r = n._batchRGB, i = ((e[0] * r[0] * 255) << 16) + ((e[1] * r[1] * 255) << 8) + (0 | (e[2] * r[2] * 255)); n._tintRGB = (i >> 16) + (65280 & i) + ((255 & i) << 16); } } }), (t.prototype.calculateVertices = function () { var e = this.transform._worldID; if (this._transformID !== e) { this._transformID = e; for (var t = this.transform.worldTransform, n = t.a, r = t.b, i = t.c, o = t.d, a = t.tx, s = t.ty, u = this._geometry.points, l = this.vertexData, c = 0, d = 0; d < u.length; d += 2) { var h = u[d], p = u[d + 1]; (l[c++] = n * h + i * p + a), (l[c++] = o * p + r * h + s); } } }), (t.prototype.closePath = function () { var e = this.currentPath; return e && (e.closeStroke = !0), this; }), (t.prototype.setMatrix = function (e) { return (this._matrix = e), this; }), (t.prototype.beginHole = function () { return this.finishPoly(), (this._holeMode = !0), this; }), (t.prototype.endHole = function () { return this.finishPoly(), (this._holeMode = !1), this; }), (t.prototype.destroy = function (t) { this._geometry.refCount--, 0 === this._geometry.refCount && this._geometry.dispose(), (this._matrix = null), (this.currentPath = null), this._lineStyle.destroy(), (this._lineStyle = null), this._fillStyle.destroy(), (this._fillStyle = null), (this._geometry = null), (this.shader = null), (this.vertexData = null), (this.batches.length = 0), (this.batches = null), e.prototype.destroy.call(this, t); }), (t._TEMP_POINT = new We()), t ); })(dt), to = function (e, t) { return ( (to = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), to(e, t) ); }; var no, ro = new We(), io = new Uint16Array([0, 1, 2, 0, 2, 3]), oo = (function (e) { function t(t) { var n = e.call(this) || this; return (n._anchor = new Xe(n._onAnchorUpdate, n, t ? t.defaultAnchor.x : 0, t ? t.defaultAnchor.y : 0)), (n._texture = null), (n._width = 0), (n._height = 0), (n._tint = null), (n._tintRGB = null), (n.tint = 16777215), (n.blendMode = O.NORMAL), (n._cachedTint = 16777215), (n.uvs = null), (n.texture = t || Jt.EMPTY), (n.vertexData = new Float32Array(8)), (n.vertexTrimmedData = null), (n._transformID = -1), (n._textureID = -1), (n._transformTrimmedID = -1), (n._textureTrimmedID = -1), (n.indices = io), (n.pluginName = "batch"), (n.isSprite = !0), (n._roundPixels = Y.ROUND_PIXELS), n; } return ( (function (e, t) { function n() { this.constructor = e; } to(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype._onTextureUpdate = function () { (this._textureID = -1), (this._textureTrimmedID = -1), (this._cachedTint = 16777215), this._width && (this.scale.x = (be(this.scale.x) * this._width) / this._texture.orig.width), this._height && (this.scale.y = (be(this.scale.y) * this._height) / this._texture.orig.height); }), (t.prototype._onAnchorUpdate = function () { (this._transformID = -1), (this._transformTrimmedID = -1); }), (t.prototype.calculateVertices = function () { var e = this._texture; if (this._transformID !== this.transform._worldID || this._textureID !== e._updateID) { this._textureID !== e._updateID && (this.uvs = this._texture._uvs.uvsFloat32), (this._transformID = this.transform._worldID), (this._textureID = e._updateID); var t = this.transform.worldTransform, n = t.a, r = t.b, i = t.c, o = t.d, a = t.tx, s = t.ty, u = this.vertexData, l = e.trim, c = e.orig, d = this._anchor, h = 0, p = 0, f = 0, _ = 0; if ((l ? ((h = (p = l.x - d._x * c.width) + l.width), (f = (_ = l.y - d._y * c.height) + l.height)) : ((h = (p = -d._x * c.width) + c.width), (f = (_ = -d._y * c.height) + c.height)), (u[0] = n * p + i * _ + a), (u[1] = o * _ + r * p + s), (u[2] = n * h + i * _ + a), (u[3] = o * _ + r * h + s), (u[4] = n * h + i * f + a), (u[5] = o * f + r * h + s), (u[6] = n * p + i * f + a), (u[7] = o * f + r * p + s), this._roundPixels)) for (var g = Y.RESOLUTION, m = 0; m < u.length; ++m) u[m] = Math.round(((u[m] * g) | 0) / g); } }), (t.prototype.calculateTrimmedVertices = function () { if (this.vertexTrimmedData) { if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID) return; } else this.vertexTrimmedData = new Float32Array(8); (this._transformTrimmedID = this.transform._worldID), (this._textureTrimmedID = this._texture._updateID); var e = this._texture, t = this.vertexTrimmedData, n = e.orig, r = this._anchor, i = this.transform.worldTransform, o = i.a, a = i.b, s = i.c, u = i.d, l = i.tx, c = i.ty, d = -r._x * n.width, h = d + n.width, p = -r._y * n.height, f = p + n.height; (t[0] = o * d + s * p + l), (t[1] = u * p + a * d + c), (t[2] = o * h + s * p + l), (t[3] = u * p + a * h + c), (t[4] = o * h + s * f + l), (t[5] = u * f + a * h + c), (t[6] = o * d + s * f + l), (t[7] = u * f + a * d + c); }), (t.prototype._render = function (e) { this.calculateVertices(), e.batch.setObjectRenderer(e.plugins[this.pluginName]), e.plugins[this.pluginName].render(this); }), (t.prototype._calculateBounds = function () { var e = this._texture.trim, t = this._texture.orig; !e || (e.width === t.width && e.height === t.height) ? (this.calculateVertices(), this._bounds.addQuad(this.vertexData)) : (this.calculateTrimmedVertices(), this._bounds.addQuad(this.vertexTrimmedData)); }), (t.prototype.getLocalBounds = function (t) { return 0 === this.children.length ? ((this._bounds.minX = this._texture.orig.width * -this._anchor._x), (this._bounds.minY = this._texture.orig.height * -this._anchor._y), (this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x)), (this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y)), t || (this._localBoundsRect || (this._localBoundsRect = new He()), (t = this._localBoundsRect)), this._bounds.getRectangle(t)) : e.prototype.getLocalBounds.call(this, t); }), (t.prototype.containsPoint = function (e) { this.worldTransform.applyInverse(e, ro); var t = this._texture.orig.width, n = this._texture.orig.height, r = -t * this.anchor.x, i = 0; return ro.x >= r && ro.x < r + t && ((i = -n * this.anchor.y), ro.y >= i && ro.y < i + n); }), (t.prototype.destroy = function (t) { if ((e.prototype.destroy.call(this, t), this._texture.off("update", this._onTextureUpdate, this), (this._anchor = null), "boolean" == typeof t ? t : t && t.texture)) { var n = "boolean" == typeof t ? t : t && t.baseTexture; this._texture.destroy(!!n); } this._texture = null; }), (t.from = function (e, n) { return new t(e instanceof Jt ? e : Jt.from(e, n)); }), Object.defineProperty(t.prototype, "roundPixels", { get: function () { return this._roundPixels; }, set: function (e) { this._roundPixels !== e && (this._transformID = -1), (this._roundPixels = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "width", { get: function () { return Math.abs(this.scale.x) * this._texture.orig.width; }, set: function (e) { var t = be(this.scale.x) || 1; (this.scale.x = (t * e) / this._texture.orig.width), (this._width = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return Math.abs(this.scale.y) * this._texture.orig.height; }, set: function (e) { var t = be(this.scale.y) || 1; (this.scale.y = (t * e) / this._texture.orig.height), (this._height = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "anchor", { get: function () { return this._anchor; }, set: function (e) { this._anchor.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "tint", { get: function () { return this._tint; }, set: function (e) { (this._tint = e), (this._tintRGB = (e >> 16) + (65280 & e) + ((255 & e) << 16)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "texture", { get: function () { return this._texture; }, set: function (e) { this._texture !== e && (this._texture && this._texture.off("update", this._onTextureUpdate, this), (this._texture = e || Jt.EMPTY), (this._cachedTint = 16777215), (this._textureID = -1), (this._textureTrimmedID = -1), e && (e.baseTexture.valid ? this._onTextureUpdate() : e.once("update", this._onTextureUpdate, this))); }, enumerable: !1, configurable: !0, }), t ); })(dt), ao = function (e, t) { return ( (ao = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), ao(e, t) ); }; !(function (e) { (e[(e.LINEAR_VERTICAL = 0)] = "LINEAR_VERTICAL"), (e[(e.LINEAR_HORIZONTAL = 1)] = "LINEAR_HORIZONTAL"); })(no || (no = {})); var so = { align: "left", breakWords: !1, dropShadow: !1, dropShadowAlpha: 1, dropShadowAngle: Math.PI / 6, dropShadowBlur: 0, dropShadowColor: "black", dropShadowDistance: 5, fill: "black", fillGradientType: no.LINEAR_VERTICAL, fillGradientStops: [], fontFamily: "Arial", fontSize: 26, fontStyle: "normal", fontVariant: "normal", fontWeight: "normal", letterSpacing: 0, lineHeight: 0, lineJoin: "miter", miterLimit: 10, padding: 0, stroke: "black", strokeThickness: 0, textBaseline: "alphabetic", trim: !1, whiteSpace: "pre", wordWrap: !1, wordWrapWidth: 100, leading: 0 }, uo = ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui"], lo = (function () { function e(e) { (this.styleID = 0), this.reset(), po(this, e, e); } return ( (e.prototype.clone = function () { var t = {}; return po(t, this, so), new e(t); }), (e.prototype.reset = function () { po(this, so, so); }), Object.defineProperty(e.prototype, "align", { get: function () { return this._align; }, set: function (e) { this._align !== e && ((this._align = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "breakWords", { get: function () { return this._breakWords; }, set: function (e) { this._breakWords !== e && ((this._breakWords = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "dropShadow", { get: function () { return this._dropShadow; }, set: function (e) { this._dropShadow !== e && ((this._dropShadow = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "dropShadowAlpha", { get: function () { return this._dropShadowAlpha; }, set: function (e) { this._dropShadowAlpha !== e && ((this._dropShadowAlpha = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "dropShadowAngle", { get: function () { return this._dropShadowAngle; }, set: function (e) { this._dropShadowAngle !== e && ((this._dropShadowAngle = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "dropShadowBlur", { get: function () { return this._dropShadowBlur; }, set: function (e) { this._dropShadowBlur !== e && ((this._dropShadowBlur = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "dropShadowColor", { get: function () { return this._dropShadowColor; }, set: function (e) { var t = ho(e); this._dropShadowColor !== t && ((this._dropShadowColor = t), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "dropShadowDistance", { get: function () { return this._dropShadowDistance; }, set: function (e) { this._dropShadowDistance !== e && ((this._dropShadowDistance = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fill", { get: function () { return this._fill; }, set: function (e) { var t = ho(e); this._fill !== t && ((this._fill = t), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fillGradientType", { get: function () { return this._fillGradientType; }, set: function (e) { this._fillGradientType !== e && ((this._fillGradientType = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fillGradientStops", { get: function () { return this._fillGradientStops; }, set: function (e) { (function (e, t) { if (!Array.isArray(e) || !Array.isArray(t)) return !1; if (e.length !== t.length) return !1; for (var n = 0; n < e.length; ++n) if (e[n] !== t[n]) return !1; return !0; })(this._fillGradientStops, e) || ((this._fillGradientStops = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fontFamily", { get: function () { return this._fontFamily; }, set: function (e) { this.fontFamily !== e && ((this._fontFamily = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fontSize", { get: function () { return this._fontSize; }, set: function (e) { this._fontSize !== e && ((this._fontSize = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fontStyle", { get: function () { return this._fontStyle; }, set: function (e) { this._fontStyle !== e && ((this._fontStyle = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fontVariant", { get: function () { return this._fontVariant; }, set: function (e) { this._fontVariant !== e && ((this._fontVariant = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "fontWeight", { get: function () { return this._fontWeight; }, set: function (e) { this._fontWeight !== e && ((this._fontWeight = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "letterSpacing", { get: function () { return this._letterSpacing; }, set: function (e) { this._letterSpacing !== e && ((this._letterSpacing = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "lineHeight", { get: function () { return this._lineHeight; }, set: function (e) { this._lineHeight !== e && ((this._lineHeight = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "leading", { get: function () { return this._leading; }, set: function (e) { this._leading !== e && ((this._leading = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "lineJoin", { get: function () { return this._lineJoin; }, set: function (e) { this._lineJoin !== e && ((this._lineJoin = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "miterLimit", { get: function () { return this._miterLimit; }, set: function (e) { this._miterLimit !== e && ((this._miterLimit = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "padding", { get: function () { return this._padding; }, set: function (e) { this._padding !== e && ((this._padding = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "stroke", { get: function () { return this._stroke; }, set: function (e) { var t = ho(e); this._stroke !== t && ((this._stroke = t), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "strokeThickness", { get: function () { return this._strokeThickness; }, set: function (e) { this._strokeThickness !== e && ((this._strokeThickness = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "textBaseline", { get: function () { return this._textBaseline; }, set: function (e) { this._textBaseline !== e && ((this._textBaseline = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "trim", { get: function () { return this._trim; }, set: function (e) { this._trim !== e && ((this._trim = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "whiteSpace", { get: function () { return this._whiteSpace; }, set: function (e) { this._whiteSpace !== e && ((this._whiteSpace = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "wordWrap", { get: function () { return this._wordWrap; }, set: function (e) { this._wordWrap !== e && ((this._wordWrap = e), this.styleID++); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "wordWrapWidth", { get: function () { return this._wordWrapWidth; }, set: function (e) { this._wordWrapWidth !== e && ((this._wordWrapWidth = e), this.styleID++); }, enumerable: !1, configurable: !0, }), (e.prototype.toFontString = function () { var e = "number" == typeof this.fontSize ? this.fontSize + "px" : this.fontSize, t = this.fontFamily; Array.isArray(this.fontFamily) || (t = this.fontFamily.split(",")); for (var n = t.length - 1; n >= 0; n--) { var r = t[n].trim(); !/([\"\'])[^\'\"]+\1/.test(r) && uo.indexOf(r) < 0 && (r = '"' + r + '"'), (t[n] = r); } return this.fontStyle + " " + this.fontVariant + " " + this.fontWeight + " " + e + " " + t.join(","); }), e ); })(); function co(e) { return "number" == typeof e ? oe(e) : ("string" == typeof e && 0 === e.indexOf("0x") && (e = e.replace("0x", "#")), e); } function ho(e) { if (Array.isArray(e)) { for (var t = 0; t < e.length; ++t) e[t] = co(e[t]); return e; } return co(e); } function po(e, t, n) { for (var r in n) Array.isArray(t[r]) ? (e[r] = t[r].slice()) : (e[r] = t[r]); } var fo = (function () { function e(e, t, n, r, i, o, a, s, u) { (this.text = e), (this.style = t), (this.width = n), (this.height = r), (this.lines = i), (this.lineWidths = o), (this.lineHeight = a), (this.maxLineWidth = s), (this.fontProperties = u); } return ( (e.measureText = function (t, n, r, i) { void 0 === i && (i = e._canvas), (r = null == r ? n.wordWrap : r); var o = n.toFontString(), a = e.measureFont(o); 0 === a.fontSize && ((a.fontSize = n.fontSize), (a.ascent = n.fontSize)); var s = i.getContext("2d"); s.font = o; for (var u = (r ? e.wordWrap(t, n, i) : t).split(/(?:\r\n|\r|\n)/), l = new Array(u.length), c = 0, d = 0; d < u.length; d++) { var h = s.measureText(u[d]).width + (u[d].length - 1) * n.letterSpacing; (l[d] = h), (c = Math.max(c, h)); } var p = c + n.strokeThickness; n.dropShadow && (p += n.dropShadowDistance); var f = n.lineHeight || a.fontSize + n.strokeThickness, _ = Math.max(f, a.fontSize + n.strokeThickness) + (u.length - 1) * (f + n.leading); return n.dropShadow && (_ += n.dropShadowDistance), new e(t, n, p, _, u, l, f + n.leading, c, a); }), (e.wordWrap = function (t, n, r) { void 0 === r && (r = e._canvas); for (var i = r.getContext("2d"), o = 0, a = "", s = "", u = Object.create(null), l = n.letterSpacing, c = n.whiteSpace, d = e.collapseSpaces(c), h = e.collapseNewlines(c), p = !d, f = n.wordWrapWidth + l, _ = e.tokenize(t), g = 0; g < _.length; g++) { var m = _[g]; if (e.isNewline(m)) { if (!h) { (s += e.addLine(a)), (p = !d), (a = ""), (o = 0); continue; } m = " "; } if (d) { var v = e.isBreakingSpace(m), y = e.isBreakingSpace(a[a.length - 1]); if (v && y) continue; } var C = e.getFromCache(m, l, u, i); if (C > f) if (("" !== a && ((s += e.addLine(a)), (a = ""), (o = 0)), e.canBreakWords(m, n.breakWords))) for (var b = e.wordWrapSplit(m), w = 0; w < b.length; w++) { for (var S = b[w], T = 1; b[w + T]; ) { var x = b[w + T], E = S[S.length - 1]; if (e.canBreakChars(E, x, m, w, n.breakWords)) break; (S += x), T++; } w += S.length - 1; var L = e.getFromCache(S, l, u, i); L + o > f && ((s += e.addLine(a)), (p = !1), (a = ""), (o = 0)), (a += S), (o += L); } else { a.length > 0 && ((s += e.addLine(a)), (a = ""), (o = 0)); var A = g === _.length - 1; (s += e.addLine(m, !A)), (p = !1), (a = ""), (o = 0); } else C + o > f && ((p = !1), (s += e.addLine(a)), (a = ""), (o = 0)), (a.length > 0 || !e.isBreakingSpace(m) || p) && ((a += m), (o += C)); } return (s += e.addLine(a, !1)); }), (e.addLine = function (t, n) { return void 0 === n && (n = !0), (t = e.trimRight(t)), (t = n ? t + "\n" : t); }), (e.getFromCache = function (e, t, n, r) { var i = n[e]; if ("number" != typeof i) { var o = e.length * t; (i = r.measureText(e).width + o), (n[e] = i); } return i; }), (e.collapseSpaces = function (e) { return "normal" === e || "pre-line" === e; }), (e.collapseNewlines = function (e) { return "normal" === e; }), (e.trimRight = function (t) { if ("string" != typeof t) return ""; for (var n = t.length - 1; n >= 0; n--) { var r = t[n]; if (!e.isBreakingSpace(r)) break; t = t.slice(0, -1); } return t; }), (e.isNewline = function (t) { return "string" == typeof t && e._newlines.indexOf(t.charCodeAt(0)) >= 0; }), (e.isBreakingSpace = function (t) { return "string" == typeof t && e._breakingSpaces.indexOf(t.charCodeAt(0)) >= 0; }), (e.tokenize = function (t) { var n = [], r = ""; if ("string" != typeof t) return n; for (var i = 0; i < t.length; i++) { var o = t[i]; e.isBreakingSpace(o) || e.isNewline(o) ? ("" !== r && (n.push(r), (r = "")), n.push(o)) : (r += o); } return "" !== r && n.push(r), n; }), (e.canBreakWords = function (e, t) { return t; }), (e.canBreakChars = function (e, t, n, r, i) { return !0; }), (e.wordWrapSplit = function (e) { return e.split(""); }), (e.measureFont = function (t) { if (e._fonts[t]) return e._fonts[t]; var n = { ascent: 0, descent: 0, fontSize: 0 }, r = e._canvas, i = e._context; i.font = t; var o = e.METRICS_STRING + e.BASELINE_SYMBOL, a = Math.ceil(i.measureText(o).width), s = Math.ceil(i.measureText(e.BASELINE_SYMBOL).width), u = 2 * s; (s = (s * e.BASELINE_MULTIPLIER) | 0), (r.width = a), (r.height = u), (i.fillStyle = "#f00"), i.fillRect(0, 0, a, u), (i.font = t), (i.textBaseline = "alphabetic"), (i.fillStyle = "#000"), i.fillText(o, 0, s); var l = i.getImageData(0, 0, a, u).data, c = l.length, d = 4 * a, h = 0, p = 0, f = !1; for (h = 0; h < s; ++h) { for (var _ = 0; _ < d; _ += 4) if (255 !== l[p + _]) { f = !0; break; } if (f) break; p += d; } for (n.ascent = s - h, p = c - d, f = !1, h = u; h > s; --h) { for (_ = 0; _ < d; _ += 4) if (255 !== l[p + _]) { f = !0; break; } if (f) break; p -= d; } return (n.descent = h - s), (n.fontSize = n.ascent + n.descent), (e._fonts[t] = n), n; }), (e.clearMetrics = function (t) { void 0 === t && (t = ""), t ? delete e._fonts[t] : (e._fonts = {}); }), e ); })(), _o = (function () { try { var e = new OffscreenCanvas(0, 0), t = e.getContext("2d"); return t && t.measureText ? e : document.createElement("canvas"); } catch (e) { return document.createElement("canvas"); } })(); (_o.width = _o.height = 10), (fo._canvas = _o), (fo._context = _o.getContext("2d")), (fo._fonts = {}), (fo.METRICS_STRING = "|ÉqÅ"), (fo.BASELINE_SYMBOL = "M"), (fo.BASELINE_MULTIPLIER = 1.4), (fo._newlines = [10, 13]), (fo._breakingSpaces = [9, 32, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8200, 8201, 8202, 8287, 12288]); var go = { texture: !0, children: !1, baseTexture: !0 }, mo = (function (e) { function t(t, n, r) { var i = this, o = !1; r || ((r = document.createElement("canvas")), (o = !0)), (r.width = 3), (r.height = 3); var a = Jt.from(r); return (a.orig = new He()), (a.trim = new He()), ((i = e.call(this, a) || this)._ownCanvas = o), (i.canvas = r), (i.context = i.canvas.getContext("2d")), (i._resolution = Y.RESOLUTION), (i._autoResolution = !0), (i._text = null), (i._style = null), (i._styleListener = null), (i._font = ""), (i.text = t), (i.style = n), (i.localStyleID = -1), i; } return ( (function (e, t) { function n() { this.constructor = e; } ao(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.updateText = function (e) { var t = this._style; if ((this.localStyleID !== t.styleID && ((this.dirty = !0), (this.localStyleID = t.styleID)), this.dirty || !e)) { this._font = this._style.toFontString(); var n, r, i = this.context, o = fo.measureText(this._text || " ", this._style, this._style.wordWrap, this.canvas), a = o.width, s = o.height, u = o.lines, l = o.lineHeight, c = o.lineWidths, d = o.maxLineWidth, h = o.fontProperties; (this.canvas.width = Math.ceil((Math.max(1, a) + 2 * t.padding) * this._resolution)), (this.canvas.height = Math.ceil((Math.max(1, s) + 2 * t.padding) * this._resolution)), i.scale(this._resolution, this._resolution), i.clearRect(0, 0, this.canvas.width, this.canvas.height), (i.font = this._font), (i.lineWidth = t.strokeThickness), (i.textBaseline = t.textBaseline), (i.lineJoin = t.lineJoin), (i.miterLimit = t.miterLimit); for (var p = t.dropShadow ? 2 : 1, f = 0; f < p; ++f) { var _ = t.dropShadow && 0 === f, g = _ ? Math.ceil(Math.max(1, s) + 2 * t.padding) : 0, m = g * this._resolution; if (_) { (i.fillStyle = "black"), (i.strokeStyle = "black"); var v = t.dropShadowColor, y = ie("number" == typeof v ? v : ae(v)), C = t.dropShadowBlur * this._resolution, b = t.dropShadowDistance * this._resolution; (i.shadowColor = "rgba(" + 255 * y[0] + "," + 255 * y[1] + "," + 255 * y[2] + "," + t.dropShadowAlpha + ")"), (i.shadowBlur = C), (i.shadowOffsetX = Math.cos(t.dropShadowAngle) * b), (i.shadowOffsetY = Math.sin(t.dropShadowAngle) * b + m); } else (i.fillStyle = this._generateFillStyle(t, u, o)), (i.strokeStyle = t.stroke), (i.shadowColor = "black"), (i.shadowBlur = 0), (i.shadowOffsetX = 0), (i.shadowOffsetY = 0); for (var w = 0; w < u.length; w++) (n = t.strokeThickness / 2), (r = t.strokeThickness / 2 + w * l + h.ascent), "right" === t.align ? (n += d - c[w]) : "center" === t.align && (n += (d - c[w]) / 2), t.stroke && t.strokeThickness && this.drawLetterSpacing(u[w], n + t.padding, r + t.padding - g, !0), t.fill && this.drawLetterSpacing(u[w], n + t.padding, r + t.padding - g); } this.updateTexture(); } }), (t.prototype.drawLetterSpacing = function (e, t, n, r) { void 0 === r && (r = !1); var i = this._style.letterSpacing; if (0 !== i) for (var o = t, a = Array.from ? Array.from(e) : e.split(""), s = this.context.measureText(e).width, u = 0, l = 0; l < a.length; ++l) { var c = a[l]; r ? this.context.strokeText(c, o, n) : this.context.fillText(c, o, n), (o += s - (u = this.context.measureText(e.substring(l + 1)).width) + i), (s = u); } else r ? this.context.strokeText(e, t, n) : this.context.fillText(e, t, n); }), (t.prototype.updateTexture = function () { var e = this.canvas; if (this._style.trim) { var t = Oe(e); t.data && ((e.width = t.width), (e.height = t.height), this.context.putImageData(t.data, 0, 0)); } var n = this._texture, r = this._style, i = r.trim ? 0 : r.padding, o = n.baseTexture; (n.trim.width = n._frame.width = Math.ceil(e.width / this._resolution)), (n.trim.height = n._frame.height = Math.ceil(e.height / this._resolution)), (n.trim.x = -i), (n.trim.y = -i), (n.orig.width = n._frame.width - 2 * i), (n.orig.height = n._frame.height - 2 * i), this._onTextureUpdate(), o.setRealSize(e.width, e.height, this._resolution), this._recursivePostUpdateTransform(), (this.dirty = !1); }), (t.prototype._render = function (t) { this._autoResolution && this._resolution !== t.resolution && ((this._resolution = t.resolution), (this.dirty = !0)), this.updateText(!0), e.prototype._render.call(this, t); }), (t.prototype.getLocalBounds = function (t) { return this.updateText(!0), e.prototype.getLocalBounds.call(this, t); }), (t.prototype._calculateBounds = function () { this.updateText(!0), this.calculateVertices(), this._bounds.addQuad(this.vertexData); }), (t.prototype._generateFillStyle = function (e, t, n) { var r, i = e.fill; if (!Array.isArray(i)) return i; if (1 === i.length) return i[0]; var o = e.dropShadow ? e.dropShadowDistance : 0, a = e.padding || 0, s = Math.ceil(this.canvas.width / this._resolution) - o - 2 * a, u = Math.ceil(this.canvas.height / this._resolution) - o - 2 * a, l = i.slice(), c = e.fillGradientStops.slice(); if (!c.length) for (var d = l.length + 1, h = 1; h < d; ++h) c.push(h / d); if ((l.unshift(i[0]), c.unshift(0), l.push(i[i.length - 1]), c.push(1), e.fillGradientType === no.LINEAR_VERTICAL)) { r = this.context.createLinearGradient(s / 2, a, s / 2, u + a); var p = 0, f = (n.fontProperties.fontSize + e.strokeThickness) / u; for (h = 0; h < t.length; h++) for (var _ = n.lineHeight * h, g = 0; g < l.length; g++) { var m = _ / u + ("number" == typeof c[g] ? c[g] : g / l.length) * f, v = Math.max(p, m); (v = Math.min(v, 1)), r.addColorStop(v, l[g]), (p = v); } } else { r = this.context.createLinearGradient(a, u / 2, s + a, u / 2); var y = l.length + 1, C = 1; for (h = 0; h < l.length; h++) { var b = void 0; (b = "number" == typeof c[h] ? c[h] : C / y), r.addColorStop(b, l[h]), C++; } } return r; }), (t.prototype.destroy = function (t) { "boolean" == typeof t && (t = { children: t }), (t = Object.assign({}, go, t)), e.prototype.destroy.call(this, t), this._ownCanvas && (this.canvas.height = this.canvas.width = 0), (this.context = null), (this.canvas = null), (this._style = null); }), Object.defineProperty(t.prototype, "width", { get: function () { return this.updateText(!0), Math.abs(this.scale.x) * this._texture.orig.width; }, set: function (e) { this.updateText(!0); var t = be(this.scale.x) || 1; (this.scale.x = (t * e) / this._texture.orig.width), (this._width = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return this.updateText(!0), Math.abs(this.scale.y) * this._texture.orig.height; }, set: function (e) { this.updateText(!0); var t = be(this.scale.y) || 1; (this.scale.y = (t * e) / this._texture.orig.height), (this._height = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "style", { get: function () { return this._style; }, set: function (e) { (e = e || {}), (this._style = e instanceof lo ? e : new lo(e)), (this.localStyleID = -1), (this.dirty = !0); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "text", { get: function () { return this._text; }, set: function (e) { (e = String(null == e ? "" : e)), this._text !== e && ((this._text = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "resolution", { get: function () { return this._resolution; }, set: function (e) { (this._autoResolution = !1), this._resolution !== e && ((this._resolution = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), t ); })(oo); Y.UPLOADS_PER_FRAME = 4; var vo = function (e, t) { return ( (vo = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), vo(e, t) ); }; var yo = (function () { function e(e) { (this.maxItemsPerFrame = e), (this.itemsLeft = 0); } return ( (e.prototype.beginFrame = function () { this.itemsLeft = this.maxItemsPerFrame; }), (e.prototype.allowedToUpload = function () { return this.itemsLeft-- > 0; }), e ); })(); function Co(e, t) { var n = !1; if (e && e._textures && e._textures.length) for (var r = 0; r < e._textures.length; r++) if (e._textures[r] instanceof Jt) { var i = e._textures[r].baseTexture; -1 === t.indexOf(i) && (t.push(i), (n = !0)); } return n; } function bo(e, t) { if (e.baseTexture instanceof Dt) { var n = e.baseTexture; return -1 === t.indexOf(n) && t.push(n), !0; } return !1; } function wo(e, t) { if (e._texture && e._texture instanceof Jt) { var n = e._texture.baseTexture; return -1 === t.indexOf(n) && t.push(n), !0; } return !1; } function So(e, t) { return t instanceof mo && (t.updateText(!0), !0); } function To(e, t) { if (t instanceof lo) { var n = t.toFontString(); return fo.measureFont(n), !0; } return !1; } function xo(e, t) { if (e instanceof mo) { -1 === t.indexOf(e.style) && t.push(e.style), -1 === t.indexOf(e) && t.push(e); var n = e._texture.baseTexture; return -1 === t.indexOf(n) && t.push(n), !0; } return !1; } function Eo(e, t) { return e instanceof lo && (-1 === t.indexOf(e) && t.push(e), !0); } var Lo = (function () { function e(e) { var t = this; (this.limiter = new yo(Y.UPLOADS_PER_FRAME)), (this.renderer = e), (this.uploadHookHelper = null), (this.queue = []), (this.addHooks = []), (this.uploadHooks = []), (this.completes = []), (this.ticking = !1), (this.delayedTick = function () { t.queue && t.prepareItems(); }), this.registerFindHook(xo), this.registerFindHook(Eo), this.registerFindHook(Co), this.registerFindHook(bo), this.registerFindHook(wo), this.registerUploadHook(So), this.registerUploadHook(To); } return ( (e.prototype.upload = function (e, t) { "function" == typeof e && ((t = e), (e = null)), e && this.add(e), this.queue.length ? (t && this.completes.push(t), this.ticking || ((this.ticking = !0), mt.system.addOnce(this.tick, this, pt.UTILITY))) : t && t(); }), (e.prototype.tick = function () { setTimeout(this.delayedTick, 0); }), (e.prototype.prepareItems = function () { for (this.limiter.beginFrame(); this.queue.length && this.limiter.allowedToUpload(); ) { var e = this.queue[0], t = !1; if (e && !e._destroyed) for (var n = 0, r = this.uploadHooks.length; n < r; n++) if (this.uploadHooks[n](this.uploadHookHelper, e)) { this.queue.shift(), (t = !0); break; } t || this.queue.shift(); } if (this.queue.length) mt.system.addOnce(this.tick, this, pt.UTILITY); else { this.ticking = !1; var i = this.completes.slice(0); this.completes.length = 0; for (n = 0, r = i.length; n < r; n++) i[n](); } }), (e.prototype.registerFindHook = function (e) { return e && this.addHooks.push(e), this; }), (e.prototype.registerUploadHook = function (e) { return e && this.uploadHooks.push(e), this; }), (e.prototype.add = function (e) { for (var t = 0, n = this.addHooks.length; t < n && !this.addHooks[t](e, this.queue); t++); if (e instanceof dt) for (t = e.children.length - 1; t >= 0; t--) this.add(e.children[t]); return this; }), (e.prototype.destroy = function () { this.ticking && mt.system.remove(this.tick, this), (this.ticking = !1), (this.addHooks = null), (this.uploadHooks = null), (this.renderer = null), (this.completes = null), (this.queue = null), (this.limiter = null), (this.uploadHookHelper = null); }), e ); })(); function Ao(e, t) { return t instanceof Dt && (t._glTextures[e.CONTEXT_UID] || e.texture.bind(t), !0); } function Io(e, t) { if (!(t instanceof eo)) return !1; var n = t.geometry; t.finishPoly(), n.updateBatches(); for (var r = n.batches, i = 0; i < r.length; i++) { var o = r[i].style.texture; o && Ao(e, o.baseTexture); } return n.batchable || e.geometry.bind(n, t._resolveDirectShader(e)), !0; } function Mo(e, t) { return e instanceof eo && (t.push(e), !0); } var Po = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.uploadHookHelper = n.renderer), n.registerFindHook(Mo), n.registerUploadHook(Ao), n.registerUploadHook(Io), n; } return ( (function (e, t) { function n() { this.constructor = e; } vo(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), t ); })(Lo), Oo = (function () { function e(e) { (this.maxMilliseconds = e), (this.frameStart = 0); } return ( (e.prototype.beginFrame = function () { this.frameStart = Date.now(); }), (e.prototype.allowedToUpload = function () { return Date.now() - this.frameStart < this.maxMilliseconds; }), e ); })(), ko = (function () { function e(e, t, n) { void 0 === n && (n = null), (this._texture = e instanceof Jt ? e : null), (this.baseTexture = e instanceof Dt ? e : this._texture.baseTexture), (this.textures = {}), (this.animations = {}), (this.data = t); var r = this.baseTexture.resource; (this.resolution = this._updateResolution(n || (r ? r.url : null))), (this._frames = this.data.frames), (this._frameKeys = Object.keys(this._frames)), (this._batchIndex = 0), (this._callback = null); } return ( (e.prototype._updateResolution = function (e) { void 0 === e && (e = null); var t = this.data.meta.scale, n = Be(e, null); return null === n && (n = void 0 !== t ? parseFloat(t) : 1), 1 !== n && this.baseTexture.setResolution(n), n; }), (e.prototype.parse = function (t) { (this._batchIndex = 0), (this._callback = t), this._frameKeys.length <= e.BATCH_SIZE ? (this._processFrames(0), this._processAnimations(), this._parseComplete()) : this._nextBatch(); }), (e.prototype._processFrames = function (t) { for (var n = t, r = e.BATCH_SIZE; n - t < r && n < this._frameKeys.length; ) { var i = this._frameKeys[n], o = this._frames[i], a = o.frame; if (a) { var s = null, u = null, l = !1 !== o.trimmed && o.sourceSize ? o.sourceSize : o.frame, c = new He(0, 0, Math.floor(l.w) / this.resolution, Math.floor(l.h) / this.resolution); (s = o.rotated ? new He(Math.floor(a.x) / this.resolution, Math.floor(a.y) / this.resolution, Math.floor(a.h) / this.resolution, Math.floor(a.w) / this.resolution) : new He(Math.floor(a.x) / this.resolution, Math.floor(a.y) / this.resolution, Math.floor(a.w) / this.resolution, Math.floor(a.h) / this.resolution)), !1 !== o.trimmed && o.spriteSourceSize && (u = new He(Math.floor(o.spriteSourceSize.x) / this.resolution, Math.floor(o.spriteSourceSize.y) / this.resolution, Math.floor(a.w) / this.resolution, Math.floor(a.h) / this.resolution)), (this.textures[i] = new Jt(this.baseTexture, s, c, u, o.rotated ? 2 : 0, o.anchor)), Jt.addToCache(this.textures[i], i); } n++; } }), (e.prototype._processAnimations = function () { var e = this.data.animations || {}; for (var t in e) { this.animations[t] = []; for (var n = 0; n < e[t].length; n++) { var r = e[t][n]; this.animations[t].push(this.textures[r]); } } }), (e.prototype._parseComplete = function () { var e = this._callback; (this._callback = null), (this._batchIndex = 0), e.call(this, this.textures); }), (e.prototype._nextBatch = function () { var t = this; this._processFrames(this._batchIndex * e.BATCH_SIZE), this._batchIndex++, setTimeout(function () { t._batchIndex * e.BATCH_SIZE < t._frameKeys.length ? t._nextBatch() : (t._processAnimations(), t._parseComplete()); }, 0); }), (e.prototype.destroy = function (e) { var t; for (var n in (void 0 === e && (e = !1), this.textures)) this.textures[n].destroy(); (this._frames = null), (this._frameKeys = null), (this.data = null), (this.textures = null), e && (null === (t = this._texture) || void 0 === t || t.destroy(), this.baseTexture.destroy()), (this._texture = null), (this.baseTexture = null); }), (e.BATCH_SIZE = 1e3), e ); })(), Ro = (function () { function e() {} return ( (e.use = function (t, n) { var r = this, i = t.name + "_image"; if (t.data && t.type === hi.TYPE.JSON && t.data.frames && !r.resources[i]) { var o = { crossOrigin: t.crossOrigin, metadata: t.metadata.imageMetadata, parentResource: t }, a = e.getResourcePath(t, r.baseUrl); r.add(i, a, o, function (e) { if (e.error) n(e.error); else { var r = new ko(e.texture, t.data, t.url); r.parse(function () { (t.spritesheet = r), (t.textures = r.textures), n(); }); } }); } else n(); }), (e.getResourcePath = function (e, t) { return e.isDataUrl ? e.data.meta.image : $.resolve(e.url.replace(t, ""), e.data.meta.image); }), e ); })(), Do = function (e, t) { return ( (Do = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Do(e, t) ); }; function No(e, t) { function n() { this.constructor = e; } Do(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var Bo = new We(), Fo = (function (e) { function t(t, n, r) { void 0 === n && (n = 100), void 0 === r && (r = 100); var i = e.call(this, t) || this; return (i.tileTransform = new it()), (i._width = n), (i._height = r), (i.uvMatrix = i.texture.uvMatrix || new rr(t)), (i.pluginName = "tilingSprite"), (i.uvRespectAnchor = !1), i; } return ( No(t, e), Object.defineProperty(t.prototype, "clampMargin", { get: function () { return this.uvMatrix.clampMargin; }, set: function (e) { (this.uvMatrix.clampMargin = e), this.uvMatrix.update(!0); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "tileScale", { get: function () { return this.tileTransform.scale; }, set: function (e) { this.tileTransform.scale.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "tilePosition", { get: function () { return this.tileTransform.position; }, set: function (e) { this.tileTransform.position.copyFrom(e); }, enumerable: !1, configurable: !0, }), (t.prototype._onTextureUpdate = function () { this.uvMatrix && (this.uvMatrix.texture = this._texture), (this._cachedTint = 16777215); }), (t.prototype._render = function (e) { var t = this._texture; t && t.valid && (this.tileTransform.updateLocalTransform(), this.uvMatrix.update(), e.batch.setObjectRenderer(e.plugins[this.pluginName]), e.plugins[this.pluginName].render(this)); }), (t.prototype._calculateBounds = function () { var e = this._width * -this._anchor._x, t = this._height * -this._anchor._y, n = this._width * (1 - this._anchor._x), r = this._height * (1 - this._anchor._y); this._bounds.addFrame(this.transform, e, t, n, r); }), (t.prototype.getLocalBounds = function (t) { return 0 === this.children.length ? ((this._bounds.minX = this._width * -this._anchor._x), (this._bounds.minY = this._height * -this._anchor._y), (this._bounds.maxX = this._width * (1 - this._anchor._x)), (this._bounds.maxY = this._height * (1 - this._anchor._y)), t || (this._localBoundsRect || (this._localBoundsRect = new He()), (t = this._localBoundsRect)), this._bounds.getRectangle(t)) : e.prototype.getLocalBounds.call(this, t); }), (t.prototype.containsPoint = function (e) { this.worldTransform.applyInverse(e, Bo); var t = this._width, n = this._height, r = -t * this.anchor._x; if (Bo.x >= r && Bo.x < r + t) { var i = -n * this.anchor._y; if (Bo.y >= i && Bo.y < i + n) return !0; } return !1; }), (t.prototype.destroy = function (t) { e.prototype.destroy.call(this, t), (this.tileTransform = null), (this.uvMatrix = null); }), (t.from = function (e, n) { return "number" == typeof n && (xe("5.3.0", "TilingSprite.from use options instead of width and height args"), (n = { width: n, height: arguments[2] })), new t(Jt.from(e, n), n.width, n.height); }), Object.defineProperty(t.prototype, "width", { get: function () { return this._width; }, set: function (e) { this._width = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return this._height; }, set: function (e) { this._height = e; }, enumerable: !1, configurable: !0, }), t ); })(oo), Uo = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n", jo = new qe(), Go = (function (e) { function t(t) { var n = e.call(this, t) || this, r = { globals: n.renderer.globalUniforms }; return (n.shader = Qn.from(Uo, "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n", r)), (n.simpleShader = Qn.from(Uo, "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 texSample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = texSample * uColor;\n}\n", r)), (n.quad = new pn()), (n.state = er.for2d()), n; } return ( No(t, e), (t.prototype.render = function (e) { var t = this.renderer, n = this.quad, r = n.vertices; (r[0] = r[6] = e._width * -e.anchor.x), (r[1] = r[3] = e._height * -e.anchor.y), (r[2] = r[4] = e._width * (1 - e.anchor.x)), (r[5] = r[7] = e._height * (1 - e.anchor.y)), e.uvRespectAnchor && (((r = n.uvs)[0] = r[6] = -e.anchor.x), (r[1] = r[3] = -e.anchor.y), (r[2] = r[4] = 1 - e.anchor.x), (r[5] = r[7] = 1 - e.anchor.y)), n.invalidate(); var i = e._texture, o = i.baseTexture, a = e.tileTransform.localTransform, s = e.uvMatrix, u = o.isPowerOfTwo && i.frame.width === o.width && i.frame.height === o.height; u && (o._glTextures[t.CONTEXT_UID] ? (u = o.wrapMode !== F.CLAMP) : o.wrapMode === F.CLAMP && (o.wrapMode = F.REPEAT)); var l = u ? this.simpleShader : this.shader, c = i.width, d = i.height, h = e._width, p = e._height; jo.set((a.a * c) / h, (a.b * c) / p, (a.c * d) / h, (a.d * d) / p, a.tx / h, a.ty / p), jo.invert(), u ? jo.prepend(s.mapCoord) : ((l.uniforms.uMapCoord = s.mapCoord.toArray(!0)), (l.uniforms.uClampFrame = s.uClampFrame), (l.uniforms.uClampOffset = s.uClampOffset)), (l.uniforms.uTransform = jo.toArray(!0)), (l.uniforms.uColor = he(e.tint, e.worldAlpha, l.uniforms.uColor, o.alphaMode)), (l.uniforms.translationMatrix = e.transform.worldTransform.toArray(!0)), (l.uniforms.uSampler = i), t.shader.bind(l), t.geometry.bind(n), (this.state.blendMode = le(e.blendMode, o.alphaMode)), t.state.set(this.state), t.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0); }), t ); })(vn), Ho = function (e, t) { return ( (Ho = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ho(e, t) ); }; function Vo(e, t) { function n() { this.constructor = e; } Ho(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var Zo = (function () { function e(e, t) { (this.uvBuffer = e), (this.uvMatrix = t), (this.data = null), (this._bufferUpdateId = -1), (this._textureUpdateId = -1), (this._updateID = 0); } return ( (e.prototype.update = function (e) { if (e || this._bufferUpdateId !== this.uvBuffer._updateID || this._textureUpdateId !== this.uvMatrix._updateID) { (this._bufferUpdateId = this.uvBuffer._updateID), (this._textureUpdateId = this.uvMatrix._updateID); var t = this.uvBuffer.data; (this.data && this.data.length === t.length) || (this.data = new Float32Array(t.length)), this.uvMatrix.multiplyUvs(t, this.data), this._updateID++; } }), e ); })(), zo = new We(), Yo = new ze(), Wo = (function (e) { function t(t, n, r, i) { void 0 === i && (i = k.TRIANGLES); var o = e.call(this) || this; return (o.geometry = t), t.refCount++, (o.shader = n), (o.state = r || er.for2d()), (o.drawMode = i), (o.start = 0), (o.size = 0), (o.uvs = null), (o.indices = null), (o.vertexData = new Float32Array(1)), (o.vertexDirty = 0), (o._transformID = -1), (o._roundPixels = Y.ROUND_PIXELS), (o.batchUvs = null), o; } return ( Vo(t, e), Object.defineProperty(t.prototype, "uvBuffer", { get: function () { return this.geometry.buffers[1]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "verticesBuffer", { get: function () { return this.geometry.buffers[0]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "material", { get: function () { return this.shader; }, set: function (e) { this.shader = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "blendMode", { get: function () { return this.state.blendMode; }, set: function (e) { this.state.blendMode = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "roundPixels", { get: function () { return this._roundPixels; }, set: function (e) { this._roundPixels !== e && (this._transformID = -1), (this._roundPixels = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "tint", { get: function () { return this.shader.tint; }, set: function (e) { this.shader.tint = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "texture", { get: function () { return this.shader.texture; }, set: function (e) { this.shader.texture = e; }, enumerable: !1, configurable: !0, }), (t.prototype._render = function (e) { var n = this.geometry.buffers[0].data; this.shader.batchable && this.drawMode === k.TRIANGLES && n.length < 2 * t.BATCHABLE_SIZE ? this._renderToBatch(e) : this._renderDefault(e); }), (t.prototype._renderDefault = function (e) { var t = this.shader; (t.alpha = this.worldAlpha), t.update && t.update(), e.batch.flush(), t.program.uniformData.translationMatrix && (t.uniforms.translationMatrix = this.transform.worldTransform.toArray(!0)), e.shader.bind(t), e.state.set(this.state), e.geometry.bind(this.geometry, t), e.geometry.draw(this.drawMode, this.size, this.start, this.geometry.instanceCount); }), (t.prototype._renderToBatch = function (e) { var t = this.geometry; this.shader.uvMatrix && (this.shader.uvMatrix.update(), this.calculateUvs()), this.calculateVertices(), (this.indices = t.indexBuffer.data), (this._tintRGB = this.shader._tintRGB), (this._texture = this.shader.texture); var n = this.material.pluginName; e.batch.setObjectRenderer(e.plugins[n]), e.plugins[n].render(this); }), (t.prototype.calculateVertices = function () { var e = this.geometry, t = e.buffers[0].data; if (e.vertexDirtyId !== this.vertexDirty || this._transformID !== this.transform._worldID) { (this._transformID = this.transform._worldID), this.vertexData.length !== t.length && (this.vertexData = new Float32Array(t.length)); for (var n = this.transform.worldTransform, r = n.a, i = n.b, o = n.c, a = n.d, s = n.tx, u = n.ty, l = this.vertexData, c = 0; c < l.length / 2; c++) { var d = t[2 * c], h = t[2 * c + 1]; (l[2 * c] = r * d + o * h + s), (l[2 * c + 1] = i * d + a * h + u); } if (this._roundPixels) { var p = Y.RESOLUTION; for (c = 0; c < l.length; ++c) l[c] = Math.round(((l[c] * p) | 0) / p); } this.vertexDirty = e.vertexDirtyId; } }), (t.prototype.calculateUvs = function () { var e = this.geometry.buffers[1]; this.shader.uvMatrix.isSimple ? (this.uvs = e.data) : (this.batchUvs || (this.batchUvs = new Zo(e, this.shader.uvMatrix)), this.batchUvs.update(), (this.uvs = this.batchUvs.data)); }), (t.prototype._calculateBounds = function () { this.calculateVertices(), this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length); }), (t.prototype.containsPoint = function (e) { if (!this.getBounds().contains(e.x, e.y)) return !1; this.worldTransform.applyInverse(e, zo); for (var t = this.geometry.getBuffer("aVertexPosition").data, n = Yo.points, r = this.geometry.getIndex().data, i = r.length, o = 4 === this.drawMode ? 3 : 1, a = 0; a + 2 < i; a += o) { var s = 2 * r[a], u = 2 * r[a + 1], l = 2 * r[a + 2]; if (((n[0] = t[s]), (n[1] = t[s + 1]), (n[2] = t[u]), (n[3] = t[u + 1]), (n[4] = t[l]), (n[5] = t[l + 1]), Yo.contains(zo.x, zo.y))) return !0; } return !1; }), (t.prototype.destroy = function (t) { e.prototype.destroy.call(this, t), this.geometry.refCount--, 0 === this.geometry.refCount && this.geometry.dispose(), (this.geometry = null), (this.shader = null), (this.state = null), (this.uvs = null), (this.indices = null), (this.vertexData = null); }), (t.BATCHABLE_SIZE = 100), t ); })(dt), Xo = (function (e) { function t(t, n) { var r = this, i = { uSampler: t, alpha: 1, uTextureMatrix: qe.IDENTITY, uColor: new Float32Array([1, 1, 1, 1]) }; return (n = Object.assign({ tint: 16777215, alpha: 1, pluginName: "batch" }, n)).uniforms && Object.assign(i, n.uniforms), ((r = e.call(this, n.program || Jn.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n", "varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"), i) || this)._colorDirty = !1), (r.uvMatrix = new rr(t)), (r.batchable = void 0 === n.program), (r.pluginName = n.pluginName), (r.tint = n.tint), (r.alpha = n.alpha), r; } return ( Vo(t, e), Object.defineProperty(t.prototype, "texture", { get: function () { return this.uniforms.uSampler; }, set: function (e) { this.uniforms.uSampler !== e && ((this.uniforms.uSampler = e), (this.uvMatrix.texture = e)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "alpha", { get: function () { return this._alpha; }, set: function (e) { e !== this._alpha && ((this._alpha = e), (this._colorDirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "tint", { get: function () { return this._tint; }, set: function (e) { e !== this._tint && ((this._tint = e), (this._tintRGB = (e >> 16) + (65280 & e) + ((255 & e) << 16)), (this._colorDirty = !0)); }, enumerable: !1, configurable: !0, }), (t.prototype.update = function () { if (this._colorDirty) { this._colorDirty = !1; var e = this.texture.baseTexture; he(this._tint, this._alpha, this.uniforms.uColor, e.alphaMode); } this.uvMatrix.update() && (this.uniforms.uTextureMatrix = this.uvMatrix.mapCoord); }), t ); })(Qn), qo = (function (e) { function t(t, n, r) { var i = e.call(this) || this, o = new on(t), a = new on(n, !0), s = new on(r, !0, !0); return i.addAttribute("aVertexPosition", o, 2, !1, N.FLOAT).addAttribute("aTextureCoord", a, 2, !1, N.FLOAT).addIndex(s), (i._updateId = -1), i; } return ( Vo(t, e), Object.defineProperty(t.prototype, "vertexDirtyId", { get: function () { return this.buffers[0]._updateID; }, enumerable: !1, configurable: !0, }), t ); })(dn), Ko = function (e, t) { return ( (Ko = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ko(e, t) ); }; var $o = function () { (this.info = []), (this.common = []), (this.page = []), (this.char = []), (this.kerning = []); }, Jo = (function () { function e() {} return ( (e.test = function (e) { return "string" == typeof e && 0 === e.indexOf("info face="); }), (e.parse = function (e) { var t = e.match(/^[a-z]+\s+.+$/gm), n = { info: [], common: [], page: [], char: [], chars: [], kerning: [], kernings: [] }; for (var r in t) { var i = t[r].match(/^[a-z]+/gm)[0], o = t[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm), a = {}; for (var s in o) { var u = o[s].split("="), l = u[0], c = u[1].replace(/"/gm, ""), d = parseFloat(c), h = isNaN(d) ? c : d; a[l] = h; } n[i].push(a); } var p = new $o(); return ( n.info.forEach(function (e) { return p.info.push({ face: e.face, size: parseInt(e.size, 10) }); }), n.common.forEach(function (e) { return p.common.push({ lineHeight: parseInt(e.lineHeight, 10) }); }), n.page.forEach(function (e) { return p.page.push({ id: parseInt(e.id, 10), file: e.file }); }), n.char.forEach(function (e) { return p.char.push({ id: parseInt(e.id, 10), page: parseInt(e.page, 10), x: parseInt(e.x, 10), y: parseInt(e.y, 10), width: parseInt(e.width, 10), height: parseInt(e.height, 10), xoffset: parseInt(e.xoffset, 10), yoffset: parseInt(e.yoffset, 10), xadvance: parseInt(e.xadvance, 10) }); }), n.kerning.forEach(function (e) { return p.kerning.push({ first: parseInt(e.first, 10), second: parseInt(e.second, 10), amount: parseInt(e.amount, 10) }); }), p ); }), e ); })(), Qo = (function () { function e() {} return ( (e.test = function (e) { return e instanceof XMLDocument && e.getElementsByTagName("page").length && null !== e.getElementsByTagName("info")[0].getAttribute("face"); }), (e.parse = function (e) { for (var t = new $o(), n = e.getElementsByTagName("info"), r = e.getElementsByTagName("common"), i = e.getElementsByTagName("page"), o = e.getElementsByTagName("char"), a = e.getElementsByTagName("kerning"), s = 0; s < n.length; s++) t.info.push({ face: n[s].getAttribute("face"), size: parseInt(n[s].getAttribute("size"), 10) }); for (s = 0; s < r.length; s++) t.common.push({ lineHeight: parseInt(r[s].getAttribute("lineHeight"), 10) }); for (s = 0; s < i.length; s++) t.page.push({ id: parseInt(i[s].getAttribute("id"), 10) || 0, file: i[s].getAttribute("file") }); for (s = 0; s < o.length; s++) { var u = o[s]; t.char.push({ id: parseInt(u.getAttribute("id"), 10), page: parseInt(u.getAttribute("page"), 10) || 0, x: parseInt(u.getAttribute("x"), 10), y: parseInt(u.getAttribute("y"), 10), width: parseInt(u.getAttribute("width"), 10), height: parseInt(u.getAttribute("height"), 10), xoffset: parseInt(u.getAttribute("xoffset"), 10), yoffset: parseInt(u.getAttribute("yoffset"), 10), xadvance: parseInt(u.getAttribute("xadvance"), 10) }); } for (s = 0; s < a.length; s++) t.kerning.push({ first: parseInt(a[s].getAttribute("first"), 10), second: parseInt(a[s].getAttribute("second"), 10), amount: parseInt(a[s].getAttribute("amount"), 10) }); return t; }), e ); })(), ea = (function () { function e() {} return ( (e.test = function (e) { if ("string" == typeof e && e.indexOf("") > -1) { var t = new self.DOMParser().parseFromString(e, "text/xml"); return Qo.test(t); } return !1; }), (e.parse = function (e) { var t = new window.DOMParser().parseFromString(e, "text/xml"); return Qo.parse(t); }), e ); })(), ta = [Jo, Qo, ea]; function na(e) { for (var t = 0; t < ta.length; t++) if (ta[t].test(e)) return ta[t]; return null; } function ra(e, t, n, r, i, o, a) { var s = n.text, u = n.fontProperties; t.translate(r, i), t.scale(o, o); var l = a.strokeThickness / 2, c = -a.strokeThickness / 2; if ( ((t.font = a.toFontString()), (t.lineWidth = a.strokeThickness), (t.textBaseline = a.textBaseline), (t.lineJoin = a.lineJoin), (t.miterLimit = a.miterLimit), (t.fillStyle = (function (e, t, n, r, i, o) { var a, s = n.fill; if (!Array.isArray(s)) return s; if (1 === s.length) return s[0]; var u = n.dropShadow ? n.dropShadowDistance : 0, l = n.padding || 0, c = Math.ceil(e.width / r) - u - 2 * l, d = Math.ceil(e.height / r) - u - 2 * l, h = s.slice(), p = n.fillGradientStops.slice(); if (!p.length) for (var f = h.length + 1, _ = 1; _ < f; ++_) p.push(_ / f); if ((h.unshift(s[0]), p.unshift(0), h.push(s[s.length - 1]), p.push(1), n.fillGradientType === no.LINEAR_VERTICAL)) { a = t.createLinearGradient(c / 2, l, c / 2, d + l); var g = 0, m = (o.fontProperties.fontSize + n.strokeThickness) / d; for (_ = 0; _ < i.length; _++) for (var v = o.lineHeight * _, y = 0; y < h.length; y++) { var C = v / d + ("number" == typeof p[y] ? p[y] : y / h.length) * m, b = Math.max(g, C); (b = Math.min(b, 1)), a.addColorStop(b, h[y]), (g = b); } } else { a = t.createLinearGradient(l, d / 2, c + l, d / 2); var w = h.length + 1, S = 1; for (_ = 0; _ < h.length; _++) { var T = void 0; (T = "number" == typeof p[_] ? p[_] : S / w), a.addColorStop(T, h[_]), S++; } } return a; })(e, t, a, o, [s], n)), (t.strokeStyle = a.stroke), a.dropShadow) ) { var d = a.dropShadowColor, h = ie("number" == typeof d ? d : ae(d)), p = a.dropShadowBlur * o, f = a.dropShadowDistance * o; (t.shadowColor = "rgba(" + 255 * h[0] + "," + 255 * h[1] + "," + 255 * h[2] + "," + a.dropShadowAlpha + ")"), (t.shadowBlur = p), (t.shadowOffsetX = Math.cos(a.dropShadowAngle) * f), (t.shadowOffsetY = Math.sin(a.dropShadowAngle) * f); } else (t.shadowColor = "black"), (t.shadowBlur = 0), (t.shadowOffsetX = 0), (t.shadowOffsetY = 0); a.stroke && a.strokeThickness && t.strokeText(s, l, c + n.lineHeight - u.descent), a.fill && t.fillText(s, l, c + n.lineHeight - u.descent), t.setTransform(1, 0, 0, 1, 0, 0), (t.fillStyle = "rgba(0, 0, 0, 0)"); } var ia = (function () { function e(e, t, n) { var r = e.info[0], i = e.common[0], o = Be(e.page[0].file), a = {}; (this._ownsTextures = n), (this.font = r.face), (this.size = r.size), (this.lineHeight = i.lineHeight / o), (this.chars = {}), (this.pageTextures = a); for (var s = 0; s < e.page.length; s++) { var u = e.page[s], l = u.id, c = u.file; a[l] = t instanceof Array ? t[s] : t[c]; } for (s = 0; s < e.char.length; s++) { var d = e.char[s], h = ((l = d.id), d.page), p = e.char[s], f = p.x, _ = p.y, g = p.width, m = p.height, v = p.xoffset, y = p.yoffset, C = p.xadvance; (_ /= o), (g /= o), (m /= o), (v /= o), (y /= o), (C /= o); var b = new He((f /= o) + a[h].frame.x / o, _ + a[h].frame.y / o, g, m); this.chars[l] = { xOffset: v, yOffset: y, xAdvance: C, kerning: {}, texture: new Jt(a[h].baseTexture, b), page: h }; } for (s = 0; s < e.kerning.length; s++) { var w = e.kerning[s], S = w.first, T = w.second, x = w.amount; (S /= o), (T /= o), (x /= o), this.chars[T] && (this.chars[T].kerning[S] = x); } } return ( (e.prototype.destroy = function () { for (var e in this.chars) this.chars[e].texture.destroy(), (this.chars[e].texture = null); for (var e in this.pageTextures) this._ownsTextures && this.pageTextures[e].destroy(!0), (this.pageTextures[e] = null); (this.chars = null), (this.pageTextures = null); }), (e.install = function (t, n, r) { var i; if (t instanceof $o) i = t; else { var o = na(t); if (!o) throw new Error("Unrecognized data format for font."); i = o.parse(t); } n instanceof Jt && (n = [n]); var a = new e(i, n, r); return (e.available[a.font] = a), a; }), (e.uninstall = function (t) { var n = e.available[t]; if (!n) throw new Error("No font found named '" + t + "'"); n.destroy(), delete e.available[t]; }), (e.from = function (t, n, r) { if (!t) throw new Error("[BitmapFont] Property `name` is required."); var i = Object.assign({}, e.defaultOptions, r), o = i.chars, a = i.padding, s = i.resolution, u = i.textureWidth, l = i.textureHeight, c = (function (e) { "string" == typeof e && (e = [e]); for (var t = [], n = 0, r = e.length; n < r; n++) { var i = e[n]; if (Array.isArray(i)) { if (2 !== i.length) throw new Error("[BitmapFont]: Invalid character range length, expecting 2 got " + i.length + "."); var o = i[0].charCodeAt(0), a = i[1].charCodeAt(0); if (a < o) throw new Error("[BitmapFont]: Invalid character range."); for (var s = o, u = a; s <= u; s++) t.push(String.fromCharCode(s)); } else t.push.apply(t, i.split("")); } if (0 === t.length) throw new Error("[BitmapFont]: Empty set when resolving characters."); return t; })(o), d = n instanceof lo ? n : new lo(n), h = u, p = new $o(); (p.info[0] = { face: d.fontFamily, size: d.fontSize }), (p.common[0] = { lineHeight: d.fontSize }); for (var f, _, g, m = 0, v = 0, y = 0, C = [], b = 0; b < c.length; b++) { f || (((f = document.createElement("canvas")).width = u), (f.height = l), (_ = f.getContext("2d")), (g = new Dt(f, { resolution: s })), C.push(new Jt(g)), p.page.push({ id: C.length - 1, file: "" })); var w = fo.measureText(c[b], d, !1, f), S = w.width, T = Math.ceil(w.height), x = Math.ceil(("italic" === d.fontStyle ? 2 : 1) * S); if (v >= l - T * s) { if (0 === v) throw new Error("[BitmapFont] textureHeight " + l + "px is too small for " + d.fontSize + "px fonts"); --b, (f = null), (_ = null), (g = null), (v = 0), (m = 0), (y = 0); } else if (((y = Math.max(T + w.fontProperties.descent, y)), x * s + m >= h)) --b, (v += y * s), (v = Math.ceil(v)), (m = 0), (y = 0); else { ra(f, _, w, m, v, s, d); var E = w.text.charCodeAt(0); p.char.push({ id: E, page: C.length - 1, x: m / s, y: v / s, width: x, height: T, xoffset: 0, yoffset: 0, xadvance: Math.ceil(S - (d.dropShadow ? d.dropShadowDistance : 0) - (d.stroke ? d.strokeThickness : 0)) }), (m += (x + 2 * a) * s), (m = Math.ceil(m)); } } var L = new e(p, C, !0); return void 0 !== e.available[t] && e.uninstall(t), (e.available[t] = L), L; }), (e.ALPHA = [["a", "z"], ["A", "Z"], " "]), (e.NUMERIC = [["0", "9"]]), (e.ALPHANUMERIC = [["a", "z"], ["A", "Z"], ["0", "9"], " "]), (e.ASCII = [[" ", "~"]]), (e.defaultOptions = { resolution: 1, textureWidth: 512, textureHeight: 512, padding: 4, chars: e.ALPHANUMERIC }), (e.available = {}), e ); })(), oa = [], aa = [], sa = (function (e) { function t(n, r) { void 0 === r && (r = {}); var i = e.call(this) || this; (i._tint = 16777215), r.font && (xe("5.3.0", "PIXI.BitmapText constructor style.font property is deprecated."), i._upgradeStyle(r)); var o = Object.assign({}, t.styleDefaults, r), a = o.align, s = o.tint, u = o.maxWidth, l = o.letterSpacing, c = o.fontName, d = o.fontSize; if (!ia.available[c]) throw new Error('Missing BitmapFont "' + c + '"'); return ( (i._activePagesMeshData = []), (i._textWidth = 0), (i._textHeight = 0), (i._align = a), (i._tint = s), (i._fontName = c), (i._fontSize = d || ia.available[c].size), (i._text = n), (i._maxWidth = u), (i._maxLineHeight = 0), (i._letterSpacing = l), (i._anchor = new Xe( function () { i.dirty = !0; }, i, 0, 0 )), (i._roundPixels = Y.ROUND_PIXELS), (i.dirty = !0), (i._textureCache = {}), i ); } return ( (function (e, t) { function n() { this.constructor = e; } Ko(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.updateText = function () { for (var e, t = ia.available[this._fontName], n = this._fontSize / t.size, r = new We(), i = [], o = [], a = this._text.replace(/(?:\r\n|\r)/g, "\n") || " ", s = a.length, u = (this._maxWidth * t.size) / this._fontSize, l = null, c = 0, d = 0, h = 0, p = -1, f = 0, _ = 0, g = 0, m = 0; m < s; m++) { var v = a.charCodeAt(m), y = a.charAt(m); if ((/(?:\s)/.test(y) && ((p = m), (f = c)), "\r" !== y && "\n" !== y)) { var C = t.chars[v]; if (C) { l && C.kerning[l] && (r.x += C.kerning[l]); var b = aa.pop() || { texture: Jt.EMPTY, line: 0, charCode: 0, position: new We() }; (b.texture = C.texture), (b.line = h), (b.charCode = v), (b.position.x = r.x + C.xOffset + this._letterSpacing / 2), (b.position.y = r.y + C.yOffset), i.push(b), (r.x += C.xAdvance + this._letterSpacing), (c = r.x), (g = Math.max(g, C.yOffset + C.texture.height)), (l = v), -1 !== p && u > 0 && r.x > u && (Ce(i, 1 + p - ++_, 1 + m - p), (m = p), (p = -1), o.push(f), (d = Math.max(d, f)), h++, (r.x = 0), (r.y += t.lineHeight), (l = null)); } } else o.push(c), (d = Math.max(d, c)), ++h, ++_, (r.x = 0), (r.y += t.lineHeight), (l = null); } var w = a.charAt(a.length - 1); "\r" !== w && "\n" !== w && (/(?:\s)/.test(w) && (c = f), o.push(c), (d = Math.max(d, c))); var S = []; for (m = 0; m <= h; m++) { var T = 0; "right" === this._align ? (T = d - o[m]) : "center" === this._align && (T = (d - o[m]) / 2), S.push(T); } var x = i.length, E = {}, L = [], A = this._activePagesMeshData; for (m = 0; m < A.length; m++) oa.push(A[m]); for (m = 0; m < x; m++) { var I = (F = i[m].texture).baseTexture.uid; if (!E[I]) { if (!(z = oa.pop())) { var M = new qo(), P = new Xo(Jt.EMPTY); z = { index: 0, indexCount: 0, vertexCount: 0, uvsCount: 0, total: 0, mesh: new Wo(M, P), vertices: null, uvs: null, indices: null }; } (z.index = 0), (z.indexCount = 0), (z.vertexCount = 0), (z.uvsCount = 0), (z.total = 0); var O = this._textureCache; (O[I] = O[I] || new Jt(F.baseTexture)), (z.mesh.texture = O[I]), (z.mesh.tint = this._tint), L.push(z), (E[I] = z); } E[I].total++; } for (m = 0; m < A.length; m++) -1 === L.indexOf(A[m]) && this.removeChild(A[m].mesh); for (m = 0; m < L.length; m++) L[m].mesh.parent !== this && this.addChild(L[m].mesh); for (var m in ((this._activePagesMeshData = L), E)) { var k = (z = E[m]).total; if (!((null === (e = z.indices) || void 0 === e ? void 0 : e.length) > 6 * k) || z.vertices.length < 2 * Wo.BATCHABLE_SIZE) (z.vertices = new Float32Array(8 * k)), (z.uvs = new Float32Array(8 * k)), (z.indices = new Uint16Array(6 * k)); else for (var R = z.total, D = z.vertices, N = 4 * R * 2; N < D.length; N++) D[N] = 0; z.mesh.size = 6 * k; } for (m = 0; m < x; m++) { var B = (y = i[m]).position.x + S[y.line]; this._roundPixels && (B = Math.round(B)); var F, U = B * n, j = y.position.y * n, G = E[(F = y.texture).baseTexture.uid], H = F.frame, V = F._uvs, Z = G.index++; (G.indices[6 * Z + 0] = 0 + 4 * Z), (G.indices[6 * Z + 1] = 1 + 4 * Z), (G.indices[6 * Z + 2] = 2 + 4 * Z), (G.indices[6 * Z + 3] = 0 + 4 * Z), (G.indices[6 * Z + 4] = 2 + 4 * Z), (G.indices[6 * Z + 5] = 3 + 4 * Z), (G.vertices[8 * Z + 0] = U), (G.vertices[8 * Z + 1] = j), (G.vertices[8 * Z + 2] = U + H.width * n), (G.vertices[8 * Z + 3] = j), (G.vertices[8 * Z + 4] = U + H.width * n), (G.vertices[8 * Z + 5] = j + H.height * n), (G.vertices[8 * Z + 6] = U), (G.vertices[8 * Z + 7] = j + H.height * n), (G.uvs[8 * Z + 0] = V.x0), (G.uvs[8 * Z + 1] = V.y0), (G.uvs[8 * Z + 2] = V.x1), (G.uvs[8 * Z + 3] = V.y1), (G.uvs[8 * Z + 4] = V.x2), (G.uvs[8 * Z + 5] = V.y2), (G.uvs[8 * Z + 6] = V.x3), (G.uvs[8 * Z + 7] = V.y3); } for (var m in ((this._textWidth = d * n), (this._textHeight = (r.y + t.lineHeight) * n), E)) { var z = E[m]; if (0 !== this.anchor.x || 0 !== this.anchor.y) for (var Y = 0, W = this._textWidth * this.anchor.x, X = this._textHeight * this.anchor.y, q = 0; q < z.total; q++) (z.vertices[Y++] -= W), (z.vertices[Y++] -= X), (z.vertices[Y++] -= W), (z.vertices[Y++] -= X), (z.vertices[Y++] -= W), (z.vertices[Y++] -= X), (z.vertices[Y++] -= W), (z.vertices[Y++] -= X); this._maxLineHeight = g * n; var K = z.mesh.geometry.getBuffer("aVertexPosition"), $ = z.mesh.geometry.getBuffer("aTextureCoord"), J = z.mesh.geometry.getIndex(); (K.data = z.vertices), ($.data = z.uvs), (J.data = z.indices), K.update(), $.update(), J.update(); } for (m = 0; m < i.length; m++) aa.push(i[m]); }), (t.prototype.updateTransform = function () { this.validate(), this.containerUpdateTransform(); }), (t.prototype.getLocalBounds = function () { return this.validate(), e.prototype.getLocalBounds.call(this); }), (t.prototype.validate = function () { this.dirty && (this.updateText(), (this.dirty = !1)); }), Object.defineProperty(t.prototype, "tint", { get: function () { return this._tint; }, set: function (e) { if (this._tint !== e) { this._tint = e; for (var t = 0; t < this._activePagesMeshData.length; t++) this._activePagesMeshData[t].mesh.tint = e; } }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "align", { get: function () { return this._align; }, set: function (e) { this._align !== e && ((this._align = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "fontName", { get: function () { return this._fontName; }, set: function (e) { if (!ia.available[e]) throw new Error('Missing BitmapFont "' + e + '"'); this._fontName !== e && ((this._fontName = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "fontSize", { get: function () { return this._fontSize; }, set: function (e) { this._fontSize !== e && ((this._fontSize = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "anchor", { get: function () { return this._anchor; }, set: function (e) { "number" == typeof e ? this._anchor.set(e) : this._anchor.copyFrom(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "text", { get: function () { return this._text; }, set: function (e) { (e = String(null == e ? "" : e)), this._text !== e && ((this._text = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "maxWidth", { get: function () { return this._maxWidth; }, set: function (e) { this._maxWidth !== e && ((this._maxWidth = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "maxLineHeight", { get: function () { return this.validate(), this._maxLineHeight; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "textWidth", { get: function () { return this.validate(), this._textWidth; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "letterSpacing", { get: function () { return this._letterSpacing; }, set: function (e) { this._letterSpacing !== e && ((this._letterSpacing = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "roundPixels", { get: function () { return this._roundPixels; }, set: function (e) { e !== this._roundPixels && ((this._roundPixels = e), (this.dirty = !0)); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "textHeight", { get: function () { return this.validate(), this._textHeight; }, enumerable: !1, configurable: !0, }), (t.prototype._upgradeStyle = function (e) { if ("string" == typeof e.font) { var t = e.font.split(" "); (e.fontName = 1 === t.length ? t[0] : t.slice(1).join(" ")), t.length >= 2 && (e.fontSize = parseInt(t[0], 10)); } else (e.fontName = e.font.name), (e.fontSize = "number" == typeof e.font.size ? e.font.size : parseInt(e.font.size, 10)); }), (t.prototype.destroy = function (t) { var n = this._textureCache; for (var r in n) { n[r].destroy(), delete n[r]; } (this._textureCache = null), e.prototype.destroy.call(this, t); }), (t.registerFont = function (e, t) { return xe("5.3.0", "PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"), ia.install(e, t); }), Object.defineProperty(t, "fonts", { get: function () { return xe("5.3.0", "PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"), ia.available; }, enumerable: !1, configurable: !0, }), (t.styleDefaults = { align: "left", tint: 16777215, maxWidth: 0, letterSpacing: 0 }), t ); })(dt), ua = (function () { function e() {} return ( (e.add = function () { hi.setExtensionXhrType("fnt", hi.XHR_RESPONSE_TYPE.TEXT); }), (e.use = function (t, n) { var r = na(t.data); if (r) for ( var i = e.getBaseUrl(this, t), o = r.parse(t.data), a = {}, s = function (e) { (a[e.metadata.pageFile] = e.texture), Object.keys(a).length === o.page.length && ((t.bitmapFont = ia.install(o, a, !0)), n()); }, u = 0; u < o.page.length; ++u ) { var l = o.page[u].file, c = i + l, d = !1; for (var h in this.resources) { var p = this.resources[h]; if (p.url === c) { (p.metadata.pageFile = l), p.texture ? s(p) : p.onAfterMiddleware.add(s), (d = !0); break; } } if (!d) { var f = { crossOrigin: t.crossOrigin, loadType: hi.LOAD_TYPE.IMAGE, metadata: Object.assign({ pageFile: l }, t.metadata.imageMetadata), parentResource: t }; this.add(c, f, s); } } else n(); }), (e.getBaseUrl = function (t, n) { var r = n.isDataUrl ? "" : e.dirname(n.url); return n.isDataUrl && ("." === r && (r = ""), t.baseUrl && r && "/" === t.baseUrl.charAt(t.baseUrl.length - 1) && (r += "/")), (r = r.replace(t.baseUrl, "")) && "/" !== r.charAt(r.length - 1) && (r += "/"), r; }), (e.dirname = function (e) { var t = e .replace(/\\/g, "/") .replace(/\/$/, "") .replace(/\/[^\/]*$/, ""); return t === e ? "." : "" === t ? "/" : t; }), e ); })(), la = function (e, t) { return ( (la = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), la(e, t) ); }; var ca = (function (e) { function t(t) { void 0 === t && (t = 1); var n = e.call(this, Ar, "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n", { uAlpha: 1 }) || this; return (n.alpha = t), n; } return ( (function (e, t) { function n() { this.constructor = e; } la(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), Object.defineProperty(t.prototype, "alpha", { get: function () { return this.uniforms.uAlpha; }, set: function (e) { this.uniforms.uAlpha = e; }, enumerable: !1, configurable: !0, }), t ); })(tr), da = function (e, t) { return ( (da = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), da(e, t) ); }; function ha(e, t) { function n() { this.constructor = e; } da(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var pa, fa, _a, ga, ma, va, ya, Ca, ba, wa, Sa, Ta, xa, Ea, La, Aa, Ia, Ma = { 5: [0.153388, 0.221461, 0.250301], 7: [0.071303, 0.131514, 0.189879, 0.214607], 9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236], 11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596], 13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641], 15: [489e-6, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448] }, Pa = ["varying vec2 vBlurTexCoords[%size%];", "uniform sampler2D uSampler;", "void main(void)", "{", " gl_FragColor = vec4(0.0);", " %blur%", "}"].join("\n"); !(function (e) { (e[(e.WEBGL_LEGACY = 0)] = "WEBGL_LEGACY"), (e[(e.WEBGL = 1)] = "WEBGL"), (e[(e.WEBGL2 = 2)] = "WEBGL2"); })(pa || (pa = {})), (function (e) { (e[(e.UNKNOWN = 0)] = "UNKNOWN"), (e[(e.WEBGL = 1)] = "WEBGL"), (e[(e.CANVAS = 2)] = "CANVAS"); })(fa || (fa = {})), (function (e) { (e[(e.COLOR = 16384)] = "COLOR"), (e[(e.DEPTH = 256)] = "DEPTH"), (e[(e.STENCIL = 1024)] = "STENCIL"); })(_a || (_a = {})), (function (e) { (e[(e.NORMAL = 0)] = "NORMAL"), (e[(e.ADD = 1)] = "ADD"), (e[(e.MULTIPLY = 2)] = "MULTIPLY"), (e[(e.SCREEN = 3)] = "SCREEN"), (e[(e.OVERLAY = 4)] = "OVERLAY"), (e[(e.DARKEN = 5)] = "DARKEN"), (e[(e.LIGHTEN = 6)] = "LIGHTEN"), (e[(e.COLOR_DODGE = 7)] = "COLOR_DODGE"), (e[(e.COLOR_BURN = 8)] = "COLOR_BURN"), (e[(e.HARD_LIGHT = 9)] = "HARD_LIGHT"), (e[(e.SOFT_LIGHT = 10)] = "SOFT_LIGHT"), (e[(e.DIFFERENCE = 11)] = "DIFFERENCE"), (e[(e.EXCLUSION = 12)] = "EXCLUSION"), (e[(e.HUE = 13)] = "HUE"), (e[(e.SATURATION = 14)] = "SATURATION"), (e[(e.COLOR = 15)] = "COLOR"), (e[(e.LUMINOSITY = 16)] = "LUMINOSITY"), (e[(e.NORMAL_NPM = 17)] = "NORMAL_NPM"), (e[(e.ADD_NPM = 18)] = "ADD_NPM"), (e[(e.SCREEN_NPM = 19)] = "SCREEN_NPM"), (e[(e.NONE = 20)] = "NONE"), (e[(e.SRC_OVER = 0)] = "SRC_OVER"), (e[(e.SRC_IN = 21)] = "SRC_IN"), (e[(e.SRC_OUT = 22)] = "SRC_OUT"), (e[(e.SRC_ATOP = 23)] = "SRC_ATOP"), (e[(e.DST_OVER = 24)] = "DST_OVER"), (e[(e.DST_IN = 25)] = "DST_IN"), (e[(e.DST_OUT = 26)] = "DST_OUT"), (e[(e.DST_ATOP = 27)] = "DST_ATOP"), (e[(e.ERASE = 26)] = "ERASE"), (e[(e.SUBTRACT = 28)] = "SUBTRACT"), (e[(e.XOR = 29)] = "XOR"); })(ga || (ga = {})), (function (e) { (e[(e.POINTS = 0)] = "POINTS"), (e[(e.LINES = 1)] = "LINES"), (e[(e.LINE_LOOP = 2)] = "LINE_LOOP"), (e[(e.LINE_STRIP = 3)] = "LINE_STRIP"), (e[(e.TRIANGLES = 4)] = "TRIANGLES"), (e[(e.TRIANGLE_STRIP = 5)] = "TRIANGLE_STRIP"), (e[(e.TRIANGLE_FAN = 6)] = "TRIANGLE_FAN"); })(ma || (ma = {})), (function (e) { (e[(e.RGBA = 6408)] = "RGBA"), (e[(e.RGB = 6407)] = "RGB"), (e[(e.ALPHA = 6406)] = "ALPHA"), (e[(e.LUMINANCE = 6409)] = "LUMINANCE"), (e[(e.LUMINANCE_ALPHA = 6410)] = "LUMINANCE_ALPHA"), (e[(e.DEPTH_COMPONENT = 6402)] = "DEPTH_COMPONENT"), (e[(e.DEPTH_STENCIL = 34041)] = "DEPTH_STENCIL"); })(va || (va = {})), (function (e) { (e[(e.TEXTURE_2D = 3553)] = "TEXTURE_2D"), (e[(e.TEXTURE_CUBE_MAP = 34067)] = "TEXTURE_CUBE_MAP"), (e[(e.TEXTURE_2D_ARRAY = 35866)] = "TEXTURE_2D_ARRAY"), (e[(e.TEXTURE_CUBE_MAP_POSITIVE_X = 34069)] = "TEXTURE_CUBE_MAP_POSITIVE_X"), (e[(e.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070)] = "TEXTURE_CUBE_MAP_NEGATIVE_X"), (e[(e.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071)] = "TEXTURE_CUBE_MAP_POSITIVE_Y"), (e[(e.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072)] = "TEXTURE_CUBE_MAP_NEGATIVE_Y"), (e[(e.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073)] = "TEXTURE_CUBE_MAP_POSITIVE_Z"), (e[(e.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074)] = "TEXTURE_CUBE_MAP_NEGATIVE_Z"); })(ya || (ya = {})), (function (e) { (e[(e.UNSIGNED_BYTE = 5121)] = "UNSIGNED_BYTE"), (e[(e.UNSIGNED_SHORT = 5123)] = "UNSIGNED_SHORT"), (e[(e.UNSIGNED_SHORT_5_6_5 = 33635)] = "UNSIGNED_SHORT_5_6_5"), (e[(e.UNSIGNED_SHORT_4_4_4_4 = 32819)] = "UNSIGNED_SHORT_4_4_4_4"), (e[(e.UNSIGNED_SHORT_5_5_5_1 = 32820)] = "UNSIGNED_SHORT_5_5_5_1"), (e[(e.FLOAT = 5126)] = "FLOAT"), (e[(e.HALF_FLOAT = 36193)] = "HALF_FLOAT"); })(Ca || (Ca = {})), (function (e) { (e[(e.NEAREST = 0)] = "NEAREST"), (e[(e.LINEAR = 1)] = "LINEAR"); })(ba || (ba = {})), (function (e) { (e[(e.CLAMP = 33071)] = "CLAMP"), (e[(e.REPEAT = 10497)] = "REPEAT"), (e[(e.MIRRORED_REPEAT = 33648)] = "MIRRORED_REPEAT"); })(wa || (wa = {})), (function (e) { (e[(e.OFF = 0)] = "OFF"), (e[(e.POW2 = 1)] = "POW2"), (e[(e.ON = 2)] = "ON"); })(Sa || (Sa = {})), (function (e) { (e[(e.NPM = 0)] = "NPM"), (e[(e.UNPACK = 1)] = "UNPACK"), (e[(e.PMA = 2)] = "PMA"), (e[(e.NO_PREMULTIPLIED_ALPHA = 0)] = "NO_PREMULTIPLIED_ALPHA"), (e[(e.PREMULTIPLY_ON_UPLOAD = 1)] = "PREMULTIPLY_ON_UPLOAD"), (e[(e.PREMULTIPLY_ALPHA = 2)] = "PREMULTIPLY_ALPHA"); })(Ta || (Ta = {})), (function (e) { (e[(e.NO = 0)] = "NO"), (e[(e.YES = 1)] = "YES"), (e[(e.AUTO = 2)] = "AUTO"), (e[(e.BLEND = 0)] = "BLEND"), (e[(e.CLEAR = 1)] = "CLEAR"), (e[(e.BLIT = 2)] = "BLIT"); })(xa || (xa = {})), (function (e) { (e[(e.AUTO = 0)] = "AUTO"), (e[(e.MANUAL = 1)] = "MANUAL"); })(Ea || (Ea = {})), (function (e) { (e.LOW = "lowp"), (e.MEDIUM = "mediump"), (e.HIGH = "highp"); })(La || (La = {})), (function (e) { (e[(e.NONE = 0)] = "NONE"), (e[(e.SCISSOR = 1)] = "SCISSOR"), (e[(e.STENCIL = 2)] = "STENCIL"), (e[(e.SPRITE = 3)] = "SPRITE"); })(Aa || (Aa = {})), (function (e) { (e[(e.NONE = 0)] = "NONE"), (e[(e.LOW = 2)] = "LOW"), (e[(e.MEDIUM = 4)] = "MEDIUM"), (e[(e.HIGH = 8)] = "HIGH"); })(Ia || (Ia = {})); var Oa = (function (e) { function t(t, n, r, i, o) { void 0 === n && (n = 8), void 0 === r && (r = 4), void 0 === i && (i = Y.FILTER_RESOLUTION), void 0 === o && (o = 5); var a = this, s = (function (e, t) { var n, r = Math.ceil(e / 2), i = "\n attribute vec2 aVertexPosition;\n\n uniform mat3 projectionMatrix;\n\n uniform float strength;\n\n varying vec2 vBlurTexCoords[%size%];\n\n uniform vec4 inputSize;\n uniform vec4 outputFrame;\n\n vec4 filterVertexPosition( void )\n {\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n }\n\n vec2 filterTextureCoord( void )\n {\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n }\n\n void main(void)\n {\n gl_Position = filterVertexPosition();\n\n vec2 textureCoord = filterTextureCoord();\n %blur%\n }", o = ""; n = t ? "vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);" : "vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);"; for (var a = 0; a < e; a++) { var s = n.replace("%index%", a.toString()); (o += s = s.replace("%sampleIndex%", a - (r - 1) + ".0")), (o += "\n"); } return (i = i.replace("%blur%", o)).replace("%size%", e.toString()); })(o, t), u = (function (e) { for (var t, n = Ma[e], r = n.length, i = Pa, o = "", a = 0; a < e; a++) { var s = "gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%", a.toString()); (t = a), a >= r && (t = e - a - 1), (o += s = s.replace("%value%", n[t].toString())), (o += "\n"); } return (i = i.replace("%blur%", o)).replace("%size%", e.toString()); })(o); return ((a = e.call(this, s, u) || this).horizontal = t), (a.resolution = i), (a._quality = 0), (a.quality = r), (a.blur = n), a; } return ( ha(t, e), (t.prototype.apply = function (e, t, n, r) { if ((n ? (this.horizontal ? (this.uniforms.strength = (1 / n.width) * (n.width / t.width)) : (this.uniforms.strength = (1 / n.height) * (n.height / t.height))) : this.horizontal ? (this.uniforms.strength = (1 / e.renderer.width) * (e.renderer.width / t.width)) : (this.uniforms.strength = (1 / e.renderer.height) * (e.renderer.height / t.height)), (this.uniforms.strength *= this.strength), (this.uniforms.strength /= this.passes), 1 === this.passes)) e.applyFilter(this, t, n, r); else { var i = e.getFilterTexture(), o = e.renderer, a = t, s = i; (this.state.blend = !1), e.applyFilter(this, a, s, xa.CLEAR); for (var u = 1; u < this.passes - 1; u++) { e.bindAndClear(a, xa.BLIT), (this.uniforms.uSampler = s); var l = s; (s = a), (a = l), o.shader.bind(this), o.geometry.draw(5); } (this.state.blend = !0), e.applyFilter(this, s, n, r), e.returnFilterTexture(i); } }), Object.defineProperty(t.prototype, "blur", { get: function () { return this.strength; }, set: function (e) { (this.padding = 1 + 2 * Math.abs(e)), (this.strength = e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "quality", { get: function () { return this._quality; }, set: function (e) { (this._quality = e), (this.passes = e); }, enumerable: !1, configurable: !0, }), t ); })(tr), ka = (function (e) { function t(t, n, r, i) { void 0 === t && (t = 8), void 0 === n && (n = 4), void 0 === r && (r = Y.FILTER_RESOLUTION), void 0 === i && (i = 5); var o = e.call(this) || this; return (o.blurXFilter = new Oa(!0, t, n, r, i)), (o.blurYFilter = new Oa(!1, t, n, r, i)), (o.resolution = r), (o.quality = n), (o.blur = t), (o.repeatEdgePixels = !1), o; } return ( ha(t, e), (t.prototype.apply = function (e, t, n, r) { var i = Math.abs(this.blurXFilter.strength), o = Math.abs(this.blurYFilter.strength); if (i && o) { var a = e.getFilterTexture(); this.blurXFilter.apply(e, t, a, xa.CLEAR), this.blurYFilter.apply(e, a, n, r), e.returnFilterTexture(a); } else o ? this.blurYFilter.apply(e, t, n, r) : this.blurXFilter.apply(e, t, n, r); }), (t.prototype.updatePadding = function () { this._repeatEdgePixels ? (this.padding = 0) : (this.padding = 2 * Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength))); }), Object.defineProperty(t.prototype, "blur", { get: function () { return this.blurXFilter.blur; }, set: function (e) { (this.blurXFilter.blur = this.blurYFilter.blur = e), this.updatePadding(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "quality", { get: function () { return this.blurXFilter.quality; }, set: function (e) { this.blurXFilter.quality = this.blurYFilter.quality = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "blurX", { get: function () { return this.blurXFilter.blur; }, set: function (e) { (this.blurXFilter.blur = e), this.updatePadding(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "blurY", { get: function () { return this.blurYFilter.blur; }, set: function (e) { (this.blurYFilter.blur = e), this.updatePadding(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "blendMode", { get: function () { return this.blurYFilter.blendMode; }, set: function (e) { this.blurYFilter.blendMode = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "repeatEdgePixels", { get: function () { return this._repeatEdgePixels; }, set: function (e) { (this._repeatEdgePixels = e), this.updatePadding(); }, enumerable: !1, configurable: !0, }), t ); })(tr), Ra = function (e, t) { return ( (Ra = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ra(e, t) ); }; var Da = (function (e) { function t() { var t = this, n = { m: new Float32Array([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]), uAlpha: 1 }; return ((t = e.call(this, Ir, "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n", n) || this).alpha = 1), t; } return ( (function (e, t) { function n() { this.constructor = e; } Ra(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype._loadMatrix = function (e, t) { void 0 === t && (t = !1); var n = e; t && (this._multiply(n, this.uniforms.m, e), (n = this._colorMatrix(n))), (this.uniforms.m = n); }), (t.prototype._multiply = function (e, t, n) { return (e[0] = t[0] * n[0] + t[1] * n[5] + t[2] * n[10] + t[3] * n[15]), (e[1] = t[0] * n[1] + t[1] * n[6] + t[2] * n[11] + t[3] * n[16]), (e[2] = t[0] * n[2] + t[1] * n[7] + t[2] * n[12] + t[3] * n[17]), (e[3] = t[0] * n[3] + t[1] * n[8] + t[2] * n[13] + t[3] * n[18]), (e[4] = t[0] * n[4] + t[1] * n[9] + t[2] * n[14] + t[3] * n[19] + t[4]), (e[5] = t[5] * n[0] + t[6] * n[5] + t[7] * n[10] + t[8] * n[15]), (e[6] = t[5] * n[1] + t[6] * n[6] + t[7] * n[11] + t[8] * n[16]), (e[7] = t[5] * n[2] + t[6] * n[7] + t[7] * n[12] + t[8] * n[17]), (e[8] = t[5] * n[3] + t[6] * n[8] + t[7] * n[13] + t[8] * n[18]), (e[9] = t[5] * n[4] + t[6] * n[9] + t[7] * n[14] + t[8] * n[19] + t[9]), (e[10] = t[10] * n[0] + t[11] * n[5] + t[12] * n[10] + t[13] * n[15]), (e[11] = t[10] * n[1] + t[11] * n[6] + t[12] * n[11] + t[13] * n[16]), (e[12] = t[10] * n[2] + t[11] * n[7] + t[12] * n[12] + t[13] * n[17]), (e[13] = t[10] * n[3] + t[11] * n[8] + t[12] * n[13] + t[13] * n[18]), (e[14] = t[10] * n[4] + t[11] * n[9] + t[12] * n[14] + t[13] * n[19] + t[14]), (e[15] = t[15] * n[0] + t[16] * n[5] + t[17] * n[10] + t[18] * n[15]), (e[16] = t[15] * n[1] + t[16] * n[6] + t[17] * n[11] + t[18] * n[16]), (e[17] = t[15] * n[2] + t[16] * n[7] + t[17] * n[12] + t[18] * n[17]), (e[18] = t[15] * n[3] + t[16] * n[8] + t[17] * n[13] + t[18] * n[18]), (e[19] = t[15] * n[4] + t[16] * n[9] + t[17] * n[14] + t[18] * n[19] + t[19]), e; }), (t.prototype._colorMatrix = function (e) { var t = new Float32Array(e); return (t[4] /= 255), (t[9] /= 255), (t[14] /= 255), (t[19] /= 255), t; }), (t.prototype.brightness = function (e, t) { var n = [e, 0, 0, 0, 0, 0, e, 0, 0, 0, 0, 0, e, 0, 0, 0, 0, 0, 1, 0]; this._loadMatrix(n, t); }), (t.prototype.greyscale = function (e, t) { var n = [e, e, e, 0, 0, e, e, e, 0, 0, e, e, e, 0, 0, 0, 0, 0, 1, 0]; this._loadMatrix(n, t); }), (t.prototype.blackAndWhite = function (e) { this._loadMatrix([0.3, 0.6, 0.1, 0, 0, 0.3, 0.6, 0.1, 0, 0, 0.3, 0.6, 0.1, 0, 0, 0, 0, 0, 1, 0], e); }), (t.prototype.hue = function (e, t) { e = ((e || 0) / 180) * Math.PI; var n = Math.cos(e), r = Math.sin(e), i = 1 / 3, o = (0, Math.sqrt)(i), a = [n + (1 - n) * i, i * (1 - n) - o * r, i * (1 - n) + o * r, 0, 0, i * (1 - n) + o * r, n + i * (1 - n), i * (1 - n) - o * r, 0, 0, i * (1 - n) - o * r, i * (1 - n) + o * r, n + i * (1 - n), 0, 0, 0, 0, 0, 1, 0]; this._loadMatrix(a, t); }), (t.prototype.contrast = function (e, t) { var n = (e || 0) + 1, r = -0.5 * (n - 1), i = [n, 0, 0, 0, r, 0, n, 0, 0, r, 0, 0, n, 0, r, 0, 0, 0, 1, 0]; this._loadMatrix(i, t); }), (t.prototype.saturate = function (e, t) { void 0 === e && (e = 0); var n = (2 * e) / 3 + 1, r = -0.5 * (n - 1), i = [n, r, r, 0, 0, r, n, r, 0, 0, r, r, n, 0, 0, 0, 0, 0, 1, 0]; this._loadMatrix(i, t); }), (t.prototype.desaturate = function () { this.saturate(-1); }), (t.prototype.negative = function (e) { this._loadMatrix([-1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0], e); }), (t.prototype.sepia = function (e) { this._loadMatrix([0.393, 0.7689999, 0.18899999, 0, 0, 0.349, 0.6859999, 0.16799999, 0, 0, 0.272, 0.5339999, 0.13099999, 0, 0, 0, 0, 0, 1, 0], e); }), (t.prototype.technicolor = function (e) { this._loadMatrix([1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337, -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398, -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138, 0, 0, 0, 1, 0], e); }), (t.prototype.polaroid = function (e) { this._loadMatrix([1.438, -0.062, -0.062, 0, 0, -0.122, 1.378, -0.122, 0, 0, -0.016, -0.016, 1.483, 0, 0, 0, 0, 0, 1, 0], e); }), (t.prototype.toBGR = function (e) { this._loadMatrix([0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0], e); }), (t.prototype.kodachrome = function (e) { this._loadMatrix([1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502, -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203, -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946, 0, 0, 0, 1, 0], e); }), (t.prototype.browni = function (e) { this._loadMatrix([0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873, -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127, 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283, 0, 0, 0, 1, 0], e); }), (t.prototype.vintage = function (e) { this._loadMatrix([0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123, 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591, 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296, 0, 0, 0, 1, 0], e); }), (t.prototype.colorTone = function (e, t, n, r, i) { var o = (((n = n || 16770432) >> 16) & 255) / 255, a = ((n >> 8) & 255) / 255, s = (255 & n) / 255, u = (((r = r || 3375104) >> 16) & 255) / 255, l = ((r >> 8) & 255) / 255, c = (255 & r) / 255, d = [0.3, 0.59, 0.11, 0, 0, o, a, s, (e = e || 0.2), 0, u, l, c, (t = t || 0.15), 0, o - u, a - l, s - c, 0, 0]; this._loadMatrix(d, i); }), (t.prototype.night = function (e, t) { var n = [-2 * (e = e || 0.1), -e, 0, 0, 0, -e, 0, e, 0, 0, 0, e, 2 * e, 0, 0, 0, 0, 0, 1, 0]; this._loadMatrix(n, t); }), (t.prototype.predator = function (e, t) { var n = [11.224130630493164 * e, -4.794486999511719 * e, -2.8746118545532227 * e, 0 * e, 0.40342438220977783 * e, -3.6330697536468506 * e, 9.193157196044922 * e, -2.951810836791992 * e, 0 * e, -1.316135048866272 * e, -3.2184197902679443 * e, -4.2375030517578125 * e, 7.476448059082031 * e, 0 * e, 0.8044459223747253 * e, 0, 0, 0, 1, 0]; this._loadMatrix(n, t); }), (t.prototype.lsd = function (e) { this._loadMatrix([2, -0.4, 0.5, 0, 0, -0.5, 2, -0.4, 0, 0, -0.4, -0.5, 3, 0, 0, 0, 0, 0, 1, 0], e); }), (t.prototype.reset = function () { this._loadMatrix([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], !1); }), Object.defineProperty(t.prototype, "matrix", { get: function () { return this.uniforms.m; }, set: function (e) { this.uniforms.m = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "alpha", { get: function () { return this.uniforms.uAlpha; }, set: function (e) { this.uniforms.uAlpha = e; }, enumerable: !1, configurable: !0, }), t ); })(tr); Da.prototype.grayscale = Da.prototype.greyscale; var Na = function (e, t) { return ( (Na = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Na(e, t) ); }; var Ba = (function (e) { function t(t, n) { var r = this, i = new qe(); return (t.renderable = !1), ((r = e.call(this, "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n", "varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n", { mapSampler: t._texture, filterMatrix: i, scale: { x: 1, y: 1 }, rotation: new Float32Array([1, 0, 0, 1]) }) || this).maskSprite = t), (r.maskMatrix = i), null == n && (n = 20), (r.scale = new We(n, n)), r; } return ( (function (e, t) { function n() { this.constructor = e; } Na(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.apply = function (e, t, n, r) { (this.uniforms.filterMatrix = e.calculateSpriteMatrix(this.maskMatrix, this.maskSprite)), (this.uniforms.scale.x = this.scale.x), (this.uniforms.scale.y = this.scale.y); var i = this.maskSprite.worldTransform, o = Math.sqrt(i.a * i.a + i.b * i.b), a = Math.sqrt(i.c * i.c + i.d * i.d); 0 !== o && 0 !== a && ((this.uniforms.rotation[0] = i.a / o), (this.uniforms.rotation[1] = i.b / o), (this.uniforms.rotation[2] = i.c / a), (this.uniforms.rotation[3] = i.d / a)), e.applyFilter(this, t, n, r); }), Object.defineProperty(t.prototype, "map", { get: function () { return this.uniforms.mapSampler; }, set: function (e) { this.uniforms.mapSampler = e; }, enumerable: !1, configurable: !0, }), t ); })(tr), Fa = function (e, t) { return ( (Fa = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Fa(e, t) ); }; var Ua = (function (e) { function t() { return e.call(this, "\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n", 'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n') || this; } return ( (function (e, t) { function n() { this.constructor = e; } Fa(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), t ); })(tr), ja = function (e, t) { return ( (ja = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), ja(e, t) ); }; var Ga = (function (e) { function t(t, n) { void 0 === t && (t = 0.5), void 0 === n && (n = Math.random()); var r = e.call(this, Ir, "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n", { uNoise: 0, uSeed: 0 }) || this; return (r.noise = t), (r.seed = n), r; } return ( (function (e, t) { function n() { this.constructor = e; } ja(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), Object.defineProperty(t.prototype, "noise", { get: function () { return this.uniforms.uNoise; }, set: function (e) { this.uniforms.uNoise = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "seed", { get: function () { return this.uniforms.uSeed; }, set: function (e) { this.uniforms.uSeed = e; }, enumerable: !1, configurable: !0, }), t ); })(tr), Ha = new qe(); (ut.prototype._cacheAsBitmap = !1), (ut.prototype._cacheData = null); var Va = function () { (this.textureCacheId = null), (this.originalRender = null), (this.originalRenderCanvas = null), (this.originalCalculateBounds = null), (this.originalGetLocalBounds = null), (this.originalUpdateTransform = null), (this.originalDestroy = null), (this.originalMask = null), (this.originalFilterArea = null), (this.originalContainsPoint = null), (this.sprite = null); }; Object.defineProperties(ut.prototype, { cacheAsBitmap: { get: function () { return this._cacheAsBitmap; }, set: function (e) { var t; this._cacheAsBitmap !== e && ((this._cacheAsBitmap = e), e ? (this._cacheData || (this._cacheData = new Va()), ((t = this._cacheData).originalRender = this.render), (t.originalRenderCanvas = this.renderCanvas), (t.originalUpdateTransform = this.updateTransform), (t.originalCalculateBounds = this.calculateBounds), (t.originalGetLocalBounds = this.getLocalBounds), (t.originalDestroy = this.destroy), (t.originalContainsPoint = this.containsPoint), (t.originalMask = this._mask), (t.originalFilterArea = this.filterArea), (this.render = this._renderCached), (this.renderCanvas = this._renderCachedCanvas), (this.destroy = this._cacheAsBitmapDestroy)) : ((t = this._cacheData).sprite && this._destroyCachedDisplayObject(), (this.render = t.originalRender), (this.renderCanvas = t.originalRenderCanvas), (this.calculateBounds = t.originalCalculateBounds), (this.getLocalBounds = t.originalGetLocalBounds), (this.destroy = t.originalDestroy), (this.updateTransform = t.originalUpdateTransform), (this.containsPoint = t.originalContainsPoint), (this._mask = t.originalMask), (this.filterArea = t.originalFilterArea))); }, }, }), (ut.prototype._renderCached = function (e) { !this.visible || this.worldAlpha <= 0 || !this.renderable || (this._initCachedDisplayObject(e), (this._cacheData.sprite.transform._worldID = this.transform._worldID), (this._cacheData.sprite.worldAlpha = this.worldAlpha), this._cacheData.sprite._render(e)); }), (ut.prototype._initCachedDisplayObject = function (e) { if (!this._cacheData || !this._cacheData.sprite) { var t = this.alpha; (this.alpha = 1), e.batch.flush(); var n = this.getLocalBounds(null, !0).clone(); if (this.filters) { var r = this.filters[0].padding; n.pad(r); } n.ceil(Y.RESOLUTION); var i = e.renderTexture.current, o = e.renderTexture.sourceFrame.clone(), a = e.renderTexture.destinationFrame.clone(), s = e.projection.transform, u = en.create({ width: n.width, height: n.height }), l = "cacheAsBitmap_" + Se(); (this._cacheData.textureCacheId = l), Dt.addToCache(u.baseTexture, l), Jt.addToCache(u, l); var c = this.transform.localTransform.copyTo(Ha).invert().translate(-n.x, -n.y); (this.render = this._cacheData.originalRender), e.render(this, u, !0, c, !1), (e.projection.transform = s), e.renderTexture.bind(i, o, a), (this.render = this._renderCached), (this.updateTransform = this.displayObjectUpdateTransform), (this.calculateBounds = this._calculateCachedBounds), (this.getLocalBounds = this._getCachedLocalBounds), (this._mask = null), (this.filterArea = null); var d = new oo(u); (d.transform.worldTransform = this.transform.worldTransform), (d.anchor.x = -n.x / n.width), (d.anchor.y = -n.y / n.height), (d.alpha = t), (d._bounds = this._bounds), (this._cacheData.sprite = d), (this.transform._parentID = -1), this.parent ? this.updateTransform() : (this.enableTempParent(), this.updateTransform(), this.disableTempParent(null)), (this.containsPoint = d.containsPoint.bind(d)); } }), (ut.prototype._renderCachedCanvas = function (e) { !this.visible || this.worldAlpha <= 0 || !this.renderable || (this._initCachedDisplayObjectCanvas(e), (this._cacheData.sprite.worldAlpha = this.worldAlpha), this._cacheData.sprite._renderCanvas(e)); }), (ut.prototype._initCachedDisplayObjectCanvas = function (e) { if (!this._cacheData || !this._cacheData.sprite) { var t = this.getLocalBounds(null, !0), n = this.alpha; this.alpha = 1; var r = e.context, i = e._projTransform; t.ceil(Y.RESOLUTION); var o = en.create({ width: t.width, height: t.height }), a = "cacheAsBitmap_" + Se(); (this._cacheData.textureCacheId = a), Dt.addToCache(o.baseTexture, a), Jt.addToCache(o, a); var s = Ha; this.transform.localTransform.copyTo(s), s.invert(), (s.tx -= t.x), (s.ty -= t.y), (this.renderCanvas = this._cacheData.originalRenderCanvas), e.render(this, o, !0, s, !1), (e.context = r), (e._projTransform = i), (this.renderCanvas = this._renderCachedCanvas), (this.updateTransform = this.displayObjectUpdateTransform), (this.calculateBounds = this._calculateCachedBounds), (this.getLocalBounds = this._getCachedLocalBounds), (this._mask = null), (this.filterArea = null); var u = new oo(o); (u.transform.worldTransform = this.transform.worldTransform), (u.anchor.x = -t.x / t.width), (u.anchor.y = -t.y / t.height), (u.alpha = n), (u._bounds = this._bounds), (this._cacheData.sprite = u), (this.transform._parentID = -1), this.parent ? this.updateTransform() : ((this.parent = e._tempDisplayObjectParent), this.updateTransform(), (this.parent = null)), (this.containsPoint = u.containsPoint.bind(u)); } }), (ut.prototype._calculateCachedBounds = function () { this._bounds.clear(), (this._cacheData.sprite.transform._worldID = this.transform._worldID), this._cacheData.sprite._calculateBounds(), (this._bounds.updateID = this._boundsID); }), (ut.prototype._getCachedLocalBounds = function () { return this._cacheData.sprite.getLocalBounds(null); }), (ut.prototype._destroyCachedDisplayObject = function () { this._cacheData.sprite._texture.destroy(!0), (this._cacheData.sprite = null), Dt.removeFromCache(this._cacheData.textureCacheId), Jt.removeFromCache(this._cacheData.textureCacheId), (this._cacheData.textureCacheId = null); }), (ut.prototype._cacheAsBitmapDestroy = function (e) { (this.cacheAsBitmap = !1), this.destroy(e); }), (ut.prototype.name = null), (dt.prototype.getChildByName = function (e, t) { for (var n = 0, r = this.children.length; n < r; n++) if (this.children[n].name === e) return this.children[n]; if (t) for (n = 0, r = this.children.length; n < r; n++) { if (this.children[n].getChildByName) { var i = this.children[n].getChildByName(e, !0); if (i) return i; } } return null; }), (ut.prototype.getGlobalPosition = function (e, t) { return void 0 === e && (e = new We()), void 0 === t && (t = !1), this.parent ? this.parent.toGlobal(this.position, e, t) : ((e.x = this.position.x), (e.y = this.position.y)), e; }); var Za = function (e, t) { return ( (Za = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Za(e, t) ); }; function za(e, t) { function n() { this.constructor = e; } Za(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var Ya = (function (e) { function t(t, n, r, i) { void 0 === t && (t = 100), void 0 === n && (n = 100), void 0 === r && (r = 10), void 0 === i && (i = 10); var o = e.call(this) || this; return (o.segWidth = r), (o.segHeight = i), (o.width = t), (o.height = n), o.build(), o; } return ( za(t, e), (t.prototype.build = function () { for (var e = this.segWidth * this.segHeight, t = [], n = [], r = [], i = this.segWidth - 1, o = this.segHeight - 1, a = this.width / i, s = this.height / o, u = 0; u < e; u++) { var l = u % this.segWidth, c = (u / this.segWidth) | 0; t.push(l * a, c * s), n.push(l / i, c / o); } var d = i * o; for (u = 0; u < d; u++) { var h = u % i, p = (u / i) | 0, f = p * this.segWidth + h, _ = p * this.segWidth + h + 1, g = (p + 1) * this.segWidth + h, m = (p + 1) * this.segWidth + h + 1; r.push(f, _, g, _, m, g); } (this.buffers[0].data = new Float32Array(t)), (this.buffers[1].data = new Float32Array(n)), (this.indexBuffer.data = new Uint16Array(r)), this.buffers[0].update(), this.buffers[1].update(), this.indexBuffer.update(); }), t ); })(qo), Wa = (function (e) { function t(t, n, r) { void 0 === t && (t = 200), void 0 === r && (r = 0); var i = e.call(this, new Float32Array(4 * n.length), new Float32Array(4 * n.length), new Uint16Array(6 * (n.length - 1))) || this; return (i.points = n), (i._width = t), (i.textureScale = r), i.build(), i; } return ( za(t, e), Object.defineProperty(t.prototype, "width", { get: function () { return this._width; }, enumerable: !1, configurable: !0, }), (t.prototype.build = function () { var e = this.points; if (e) { var t = this.getBuffer("aVertexPosition"), n = this.getBuffer("aTextureCoord"), r = this.getIndex(); if (!(e.length < 1)) { t.data.length / 4 !== e.length && ((t.data = new Float32Array(4 * e.length)), (n.data = new Float32Array(4 * e.length)), (r.data = new Uint16Array(6 * (e.length - 1)))); var i = n.data, o = r.data; (i[0] = 0), (i[1] = 0), (i[2] = 0), (i[3] = 1); for (var a = 0, s = e[0], u = this._width * this.textureScale, l = e.length, c = 0; c < l; c++) { var d = 4 * c; if (this.textureScale > 0) { var h = s.x - e[c].x, p = s.y - e[c].y, f = Math.sqrt(h * h + p * p); (s = e[c]), (a += f / u); } else a = c / (l - 1); (i[d] = a), (i[d + 1] = 0), (i[d + 2] = a), (i[d + 3] = 1); } var _ = 0; for (c = 0; c < l - 1; c++) { d = 2 * c; (o[_++] = d), (o[_++] = d + 1), (o[_++] = d + 2), (o[_++] = d + 2), (o[_++] = d + 1), (o[_++] = d + 3); } n.update(), r.update(), this.updateVertices(); } } }), (t.prototype.updateVertices = function () { var e = this.points; if (!(e.length < 1)) { for (var t, n = e[0], r = 0, i = 0, o = this.buffers[0].data, a = e.length, s = 0; s < a; s++) { var u = e[s], l = 4 * s; (i = -((t = s < e.length - 1 ? e[s + 1] : u).x - n.x)), (r = t.y - n.y); var c = Math.sqrt(r * r + i * i), d = this.textureScale > 0 ? (this.textureScale * this._width) / 2 : this._width / 2; (r /= c), (i /= c), (r *= d), (i *= d), (o[l] = u.x + r), (o[l + 1] = u.y + i), (o[l + 2] = u.x - r), (o[l + 3] = u.y - i), (n = u); } this.buffers[0].update(); } }), (t.prototype.update = function () { this.textureScale > 0 ? this.build() : this.updateVertices(); }), t ); })(qo), Xa = (function (e) { function t(t, n, r) { void 0 === r && (r = 0); var i = this, o = new Wa(t.height, n, r), a = new Xo(t); return r > 0 && (t.baseTexture.wrapMode = F.REPEAT), ((i = e.call(this, o, a) || this).autoUpdate = !0), i; } return ( za(t, e), (t.prototype._render = function (t) { var n = this.geometry; (this.autoUpdate || n._width !== this.shader.texture.height) && ((n._width = this.shader.texture.height), n.update()), e.prototype._render.call(this, t); }), t ); })(Wo), qa = (function (e) { function t(t, n, r) { var i = this, o = new Ya(t.width, t.height, n, r), a = new Xo(Jt.WHITE); return ((i = e.call(this, o, a) || this).texture = t), i; } return ( za(t, e), (t.prototype.textureUpdated = function () { this._textureID = this.shader.texture._updateID; var e = this.geometry; (e.width = this.shader.texture.width), (e.height = this.shader.texture.height), e.build(); }), Object.defineProperty(t.prototype, "texture", { get: function () { return this.shader.texture; }, set: function (e) { this.shader.texture !== e && ((this.shader.texture = e), (this._textureID = -1), e.baseTexture.valid ? this.textureUpdated() : e.once("update", this.textureUpdated, this)); }, enumerable: !1, configurable: !0, }), (t.prototype._render = function (t) { this._textureID !== this.shader.texture._updateID && this.textureUpdated(), e.prototype._render.call(this, t); }), (t.prototype.destroy = function (t) { this.shader.texture.off("update", this.textureUpdated, this), e.prototype.destroy.call(this, t); }), t ); })(Wo), Ka = (function (e) { function t(t, n, r, i, o) { void 0 === t && (t = Jt.EMPTY); var a = this, s = new qo(n, r, i); s.getBuffer("aVertexPosition").static = !1; var u = new Xo(t); return ((a = e.call(this, s, u, null, o) || this).autoUpdate = !0), a; } return ( za(t, e), Object.defineProperty(t.prototype, "vertices", { get: function () { return this.geometry.getBuffer("aVertexPosition").data; }, set: function (e) { this.geometry.getBuffer("aVertexPosition").data = e; }, enumerable: !1, configurable: !0, }), (t.prototype._render = function (t) { this.autoUpdate && this.geometry.getBuffer("aVertexPosition").update(), e.prototype._render.call(this, t); }), t ); })(Wo), $a = (function (e) { function t(t, n, r, i, o) { void 0 === n && (n = 10), void 0 === r && (r = 10), void 0 === i && (i = 10), void 0 === o && (o = 10); var a = e.call(this, Jt.WHITE, 4, 4) || this; return (a._origWidth = t.orig.width), (a._origHeight = t.orig.height), (a._width = a._origWidth), (a._height = a._origHeight), (a._leftWidth = n), (a._rightWidth = i), (a._topHeight = r), (a._bottomHeight = o), (a.texture = t), a; } return ( za(t, e), (t.prototype.textureUpdated = function () { (this._textureID = this.shader.texture._updateID), this._refresh(); }), Object.defineProperty(t.prototype, "vertices", { get: function () { return this.geometry.getBuffer("aVertexPosition").data; }, set: function (e) { this.geometry.getBuffer("aVertexPosition").data = e; }, enumerable: !1, configurable: !0, }), (t.prototype.updateHorizontalVertices = function () { var e = this.vertices, t = this._getMinScale(); (e[9] = e[11] = e[13] = e[15] = this._topHeight * t), (e[17] = e[19] = e[21] = e[23] = this._height - this._bottomHeight * t), (e[25] = e[27] = e[29] = e[31] = this._height); }), (t.prototype.updateVerticalVertices = function () { var e = this.vertices, t = this._getMinScale(); (e[2] = e[10] = e[18] = e[26] = this._leftWidth * t), (e[4] = e[12] = e[20] = e[28] = this._width - this._rightWidth * t), (e[6] = e[14] = e[22] = e[30] = this._width); }), (t.prototype._getMinScale = function () { var e = this._leftWidth + this._rightWidth, t = this._width > e ? 1 : this._width / e, n = this._topHeight + this._bottomHeight, r = this._height > n ? 1 : this._height / n; return Math.min(t, r); }), Object.defineProperty(t.prototype, "width", { get: function () { return this._width; }, set: function (e) { (this._width = e), this._refresh(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "height", { get: function () { return this._height; }, set: function (e) { (this._height = e), this._refresh(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "leftWidth", { get: function () { return this._leftWidth; }, set: function (e) { (this._leftWidth = e), this._refresh(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "rightWidth", { get: function () { return this._rightWidth; }, set: function (e) { (this._rightWidth = e), this._refresh(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "topHeight", { get: function () { return this._topHeight; }, set: function (e) { (this._topHeight = e), this._refresh(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "bottomHeight", { get: function () { return this._bottomHeight; }, set: function (e) { (this._bottomHeight = e), this._refresh(); }, enumerable: !1, configurable: !0, }), (t.prototype._refresh = function () { var e = this.texture, t = this.geometry.buffers[1].data; (this._origWidth = e.orig.width), (this._origHeight = e.orig.height); var n = 1 / this._origWidth, r = 1 / this._origHeight; (t[0] = t[8] = t[16] = t[24] = 0), (t[1] = t[3] = t[5] = t[7] = 0), (t[6] = t[14] = t[22] = t[30] = 1), (t[25] = t[27] = t[29] = t[31] = 1), (t[2] = t[10] = t[18] = t[26] = n * this._leftWidth), (t[4] = t[12] = t[20] = t[28] = 1 - n * this._rightWidth), (t[9] = t[11] = t[13] = t[15] = r * this._topHeight), (t[17] = t[19] = t[21] = t[23] = 1 - r * this._bottomHeight), this.updateHorizontalVertices(), this.updateVerticalVertices(), this.geometry.buffers[0].update(), this.geometry.buffers[1].update(); }), t ); })(qa), Ja = function (e, t) { return ( (Ja = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ja(e, t) ); }; var Qa = (function (e) { function t(t, n) { void 0 === n && (n = !0); var r = e.call(this, t[0] instanceof Jt ? t[0] : t[0].texture) || this; return (r._textures = null), (r._durations = null), (r._autoUpdate = n), (r._isConnectedToTicker = !1), (r.animationSpeed = 1), (r.loop = !0), (r.updateAnchor = !1), (r.onComplete = null), (r.onFrameChange = null), (r.onLoop = null), (r._currentTime = 0), (r._playing = !1), (r._previousFrame = null), (r.textures = t), r; } return ( (function (e, t) { function n() { this.constructor = e; } Ja(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.stop = function () { this._playing && ((this._playing = !1), this._autoUpdate && this._isConnectedToTicker && (mt.shared.remove(this.update, this), (this._isConnectedToTicker = !1))); }), (t.prototype.play = function () { this._playing || ((this._playing = !0), this._autoUpdate && !this._isConnectedToTicker && (mt.shared.add(this.update, this, pt.HIGH), (this._isConnectedToTicker = !0))); }), (t.prototype.gotoAndStop = function (e) { this.stop(); var t = this.currentFrame; (this._currentTime = e), t !== this.currentFrame && this.updateTexture(); }), (t.prototype.gotoAndPlay = function (e) { var t = this.currentFrame; (this._currentTime = e), t !== this.currentFrame && this.updateTexture(), this.play(); }), (t.prototype.update = function (e) { if (this._playing) { var t = this.animationSpeed * e, n = this.currentFrame; if (null !== this._durations) { var r = (this._currentTime % 1) * this._durations[this.currentFrame]; for (r += (t / 60) * 1e3; r < 0; ) this._currentTime--, (r += this._durations[this.currentFrame]); var i = Math.sign(this.animationSpeed * e); for (this._currentTime = Math.floor(this._currentTime); r >= this._durations[this.currentFrame]; ) (r -= this._durations[this.currentFrame] * i), (this._currentTime += i); this._currentTime += r / this._durations[this.currentFrame]; } else this._currentTime += t; this._currentTime < 0 && !this.loop ? (this.gotoAndStop(0), this.onComplete && this.onComplete()) : this._currentTime >= this._textures.length && !this.loop ? (this.gotoAndStop(this._textures.length - 1), this.onComplete && this.onComplete()) : n !== this.currentFrame && (this.loop && this.onLoop && ((this.animationSpeed > 0 && this.currentFrame < n) || (this.animationSpeed < 0 && this.currentFrame > n)) && this.onLoop(), this.updateTexture()); } }), (t.prototype.updateTexture = function () { var e = this.currentFrame; this._previousFrame !== e && ((this._previousFrame = e), (this._texture = this._textures[e]), (this._textureID = -1), (this._textureTrimmedID = -1), (this._cachedTint = 16777215), (this.uvs = this._texture._uvs.uvsFloat32), this.updateAnchor && this._anchor.copyFrom(this._texture.defaultAnchor), this.onFrameChange && this.onFrameChange(this.currentFrame)); }), (t.prototype.destroy = function (t) { this.stop(), e.prototype.destroy.call(this, t), (this.onComplete = null), (this.onFrameChange = null), (this.onLoop = null); }), (t.fromFrames = function (e) { for (var n = [], r = 0; r < e.length; ++r) n.push(Jt.from(e[r])); return new t(n); }), (t.fromImages = function (e) { for (var n = [], r = 0; r < e.length; ++r) n.push(Jt.from(e[r])); return new t(n); }), Object.defineProperty(t.prototype, "totalFrames", { get: function () { return this._textures.length; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "textures", { get: function () { return this._textures; }, set: function (e) { if (e[0] instanceof Jt) (this._textures = e), (this._durations = null); else { (this._textures = []), (this._durations = []); for (var t = 0; t < e.length; t++) this._textures.push(e[t].texture), this._durations.push(e[t].time); } (this._previousFrame = null), this.gotoAndStop(0), this.updateTexture(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "currentFrame", { get: function () { var e = Math.floor(this._currentTime) % this._textures.length; return e < 0 && (e += this._textures.length), e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "playing", { get: function () { return this._playing; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "autoUpdate", { get: function () { return this._autoUpdate; }, set: function (e) { e !== this._autoUpdate && ((this._autoUpdate = e), !this._autoUpdate && this._isConnectedToTicker ? (mt.shared.remove(this.update, this), (this._isConnectedToTicker = !1)) : this._autoUpdate && !this._isConnectedToTicker && this._playing && (mt.shared.add(this.update, this), (this._isConnectedToTicker = !0))); }, enumerable: !1, configurable: !0, }), t ); })(oo), es = function (e, t) { return ( (es = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), es(e, t) ); }; function ts(e, t) { function n() { this.constructor = e; } es(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var ns = "5.0.0"; function rs() { var e = this; Object.defineProperties(e, { SVG_SIZE: { get: function () { return xe(ns, "PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE"), e.SVGResource.SVG_SIZE; }, }, TransformStatic: { get: function () { return xe(ns, "PIXI.TransformStatic class has been removed, use PIXI.Transform"), e.Transform; }, }, TransformBase: { get: function () { return xe(ns, "PIXI.TransformBase class has been removed, use PIXI.Transform"), e.Transform; }, }, TRANSFORM_MODE: { get: function () { return xe(ns, "PIXI.TRANSFORM_MODE property has been removed"), { STATIC: 0, DYNAMIC: 1 }; }, }, WebGLRenderer: { get: function () { return xe(ns, "PIXI.WebGLRenderer class has moved to PIXI.Renderer"), e.Renderer; }, }, CanvasRenderTarget: { get: function () { return xe(ns, "PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget"), e.utils.CanvasRenderTarget; }, }, loader: { get: function () { return xe(ns, "PIXI.loader instance has moved to PIXI.Loader.shared"), e.Loader.shared; }, }, FilterManager: { get: function () { return xe(ns, "PIXI.FilterManager class has moved to PIXI.systems.FilterSystem"), e.systems.FilterSystem; }, }, CanvasTinter: { get: function () { return xe("5.2.0", "PIXI.CanvasTinter namespace has moved to PIXI.canvasUtils"), e.canvasUtils; }, }, GroupD8: { get: function () { return xe("5.2.0", "PIXI.GroupD8 namespace has moved to PIXI.groupD8"), e.groupD8; }, }, }), (e.accessibility = {}), Object.defineProperties(e.accessibility, { AccessibilityManager: { get: function () { return xe("5.3.0", "PIXI.accessibility.AccessibilityManager moved to PIXI.AccessibilityManager"), e.AccessibilityManager; }, }, }), (e.interaction = {}), Object.defineProperties(e.interaction, { InteractionManager: { get: function () { return xe("5.3.0", "PIXI.interaction.InteractionManager moved to PIXI.InteractionManager"), e.InteractionManager; }, }, InteractionData: { get: function () { return xe("5.3.0", "PIXI.interaction.InteractionData moved to PIXI.InteractionData"), e.InteractionData; }, }, InteractionEvent: { get: function () { return xe("5.3.0", "PIXI.interaction.InteractionEvent moved to PIXI.InteractionEvent"), e.InteractionEvent; }, }, }), (e.prepare = {}), Object.defineProperties(e.prepare, { BasePrepare: { get: function () { return xe("5.2.1", "PIXI.prepare.BasePrepare moved to PIXI.BasePrepare"), e.BasePrepare; }, }, Prepare: { get: function () { return xe("5.2.1", "PIXI.prepare.Prepare moved to PIXI.Prepare"), e.Prepare; }, }, CanvasPrepare: { get: function () { return xe("5.2.1", "PIXI.prepare.CanvasPrepare moved to PIXI.CanvasPrepare"), e.CanvasPrepare; }, }, }), (e.extract = {}), Object.defineProperties(e.extract, { Extract: { get: function () { return xe("5.2.1", "PIXI.extract.Extract moved to PIXI.Extract"), e.Extract; }, }, CanvasExtract: { get: function () { return xe("5.2.1", "PIXI.extract.CanvasExtract moved to PIXI.CanvasExtract"), e.CanvasExtract; }, }, }), (e.extras = {}), Object.defineProperties(e.extras, { TilingSprite: { get: function () { return xe(ns, "PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite"), e.TilingSprite; }, }, TilingSpriteRenderer: { get: function () { return xe(ns, "PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer"), e.TilingSpriteRenderer; }, }, AnimatedSprite: { get: function () { return xe(ns, "PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite"), e.AnimatedSprite; }, }, BitmapText: { get: function () { return xe(ns, "PIXI.extras.BitmapText class has moved to PIXI.BitmapText"), e.BitmapText; }, }, }), (e.TilingSprite.fromFrame = function (t, n, r) { return xe("5.3.0", "TilingSprite.fromFrame is deprecated, use TilingSprite.from"), e.TilingSprite.from(t, { width: n, height: r }); }), (e.TilingSprite.fromImage = function (t, n, r, i) { return void 0 === i && (i = {}), xe("5.3.0", "TilingSprite.fromImage is deprecated, use TilingSprite.from"), i && "object" != typeof i && (i = { scaleMode: arguments[4], resourceOptions: { crossorigin: arguments[3] } }), (i.width = n), (i.height = r), e.TilingSprite.from(t, i); }), Object.defineProperties(e.utils, { getSvgSize: { get: function () { return xe(ns, "PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize"), e.resources.SVGResource.getSize; }, }, }), (e.mesh = {}), Object.defineProperties(e.mesh, { Mesh: { get: function () { return xe(ns, "PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh"), e.SimpleMesh; }, }, NineSlicePlane: { get: function () { return xe(ns, "PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane"), e.NineSlicePlane; }, }, Plane: { get: function () { return xe(ns, "PIXI.mesh.Plane class has moved to PIXI.SimplePlane"), e.SimplePlane; }, }, Rope: { get: function () { return xe(ns, "PIXI.mesh.Rope class has moved to PIXI.SimpleRope"), e.SimpleRope; }, }, RawMesh: { get: function () { return xe(ns, "PIXI.mesh.RawMesh class has moved to PIXI.Mesh"), e.Mesh; }, }, CanvasMeshRenderer: { get: function () { return xe(ns, "PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer"), e.CanvasMeshRenderer; }, }, MeshRenderer: { get: function () { return xe(ns, "PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer"), e.MeshRenderer; }, }, }), (e.particles = {}), Object.defineProperties(e.particles, { ParticleContainer: { get: function () { return xe(ns, "PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer"), e.ParticleContainer; }, }, ParticleRenderer: { get: function () { return xe(ns, "PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer"), e.ParticleRenderer; }, }, }), (e.ticker = {}), Object.defineProperties(e.ticker, { Ticker: { get: function () { return xe(ns, "PIXI.ticker.Ticker class has moved to PIXI.Ticker"), e.Ticker; }, }, shared: { get: function () { return xe(ns, "PIXI.ticker.shared instance has moved to PIXI.Ticker.shared"), e.Ticker.shared; }, }, }), (e.loaders = {}), Object.defineProperties(e.loaders, { Loader: { get: function () { return xe(ns, "PIXI.loaders.Loader class has moved to PIXI.Loader"), e.Loader; }, }, Resource: { get: function () { return xe(ns, "PIXI.loaders.Resource class has moved to PIXI.LoaderResource"), e.LoaderResource; }, }, bitmapFontParser: { get: function () { return xe(ns, "PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use"), e.BitmapFontLoader.use; }, }, parseBitmapFontData: { get: function () { xe(ns, "PIXI.loaders.parseBitmapFontData function has removed"); }, }, spritesheetParser: { get: function () { return xe(ns, "PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use"), e.SpritesheetLoader.use; }, }, getResourcePath: { get: function () { return xe(ns, "PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath"), e.SpritesheetLoader.getResourcePath; }, }, }), (e.Loader.addPixiMiddleware = function (t) { return xe(ns, "PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin"), e.loaders.Loader.registerPlugin({ use: t() }); }); var t = function (e) { return "on" + e.charAt(0).toUpperCase() + e.slice(1); }; Object.assign(e.Loader.prototype, { on: function (e) { var n = t(e); xe(ns, "PIXI.Loader#on is completely deprecated, use PIXI.Loader#" + n + ".add"); }, once: function (e) { var n = t(e); xe(ns, "PIXI.Loader#once is completely deprecated, use PIXI.Loader#" + n + ".once"); }, off: function (e) { var n = t(e); xe(ns, "PIXI.Loader#off is completely deprecated, use PIXI.Loader#" + n + ".detach"); }, }), Object.defineProperty(e.extract, "WebGLExtract", { get: function () { return xe(ns, "PIXI.extract.WebGLExtract method has moved to PIXI.Extract"), e.Extract; }, }), Object.defineProperty(e.prepare, "WebGLPrepare", { get: function () { return xe(ns, "PIXI.prepare.WebGLPrepare class has moved to PIXI.Prepare"), e.Prepare; }, }), (e.Container.prototype._renderWebGL = function (e) { xe(ns, "PIXI.Container._renderWebGL method has moved to PIXI.Container._render"), this._render(e); }), (e.Container.prototype.renderWebGL = function (e) { xe(ns, "PIXI.Container.renderWebGL method has moved to PIXI.Container.render"), this.render(e); }), (e.DisplayObject.prototype.renderWebGL = function (e) { xe(ns, "PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render"), this.render(e); }), (e.Container.prototype.renderAdvancedWebGL = function (e) { xe(ns, "PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced"), this.renderAdvanced(e); }), Object.defineProperties(e.settings, { TRANSFORM_MODE: { get: function () { return xe(ns, "PIXI.settings.TRANSFORM_MODE property has been removed"), 0; }, set: function () { xe(ns, "PIXI.settings.TRANSFORM_MODE property has been removed"); }, }, }); var n = e.BaseTexture; n.prototype.loadSource = function (t) { xe(ns, "PIXI.BaseTexture.loadSource method has been deprecated"); var n = e.resources.autoDetectResource(t); (n.internal = !0), this.setResource(n), this.update(); }; var r = !1; Object.defineProperties(n.prototype, { hasLoaded: { get: function () { return xe(ns, "PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid"), this.valid; }, }, imageUrl: { get: function () { var e; return xe(ns, "PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"), null === (e = this.resource) || void 0 === e ? void 0 : e.url; }, set: function (e) { xe(ns, "PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"), this.resource && (this.resource.url = e); }, }, source: { get: function () { return xe(ns, "PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`"), this.resource.source; }, set: function (e) { xe(ns, "PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture."), this.resource && (this.resource.source = e); }, }, premultiplyAlpha: { get: function () { return xe("5.2.0", "PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"), 0 !== this.alphaMode; }, set: function (e) { xe("5.2.0", "PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"), (this.alphaMode = Number(e)); }, }, _id: { get: function () { return r || (xe("5.2.0", "PIXI.BaseTexture._id batch local field has been changed to `_batchLocation`"), (r = !0)), this._batchLocation; }, set: function (e) { this._batchLocation = e; }, }, }), (n.fromImage = function (e, t, r, i) { xe(ns, "PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from"); var o = { scale: i, crossorigin: t }; return n.from(e, { scaleMode: r, resourceOptions: o }); }), (n.fromCanvas = function (e, t) { return xe(ns, "PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from"), n.from(e, { scaleMode: t }); }), (n.fromSVG = function (e, t, r, i) { xe(ns, "PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from"); var o = { scale: i, crossorigin: t }; return n.from(e, { scaleMode: r, resourceOptions: o }); }), Object.defineProperties(e.resources.ImageResource.prototype, { premultiplyAlpha: { get: function () { return xe("5.2.0", "PIXI.resources.ImageResource.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"), 0 !== this.alphaMode; }, set: function (e) { xe("5.2.0", "PIXI.resources.ImageResource.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"), (this.alphaMode = Number(e)); }, }, }), (e.Point.prototype.copy = function (e) { return xe(ns, "PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom"), this.copyFrom(e); }), (e.ObservablePoint.prototype.copy = function (e) { return xe(ns, "PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom"), this.copyFrom(e); }), (e.Rectangle.prototype.copy = function (e) { return xe(ns, "PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom"), this.copyFrom(e); }), (e.Matrix.prototype.copy = function (e) { return xe(ns, "PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo"), this.copyTo(e); }), (e.systems.StateSystem.prototype.setState = function (e) { return xe("v5.1.0", "StateSystem.setState has been renamed to StateSystem.set"), this.set(e); }), Object.assign(e.systems.FilterSystem.prototype, { getRenderTarget: function (e, t) { return xe(ns, "PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture"), this.getFilterTexture(null, t); }, returnRenderTarget: function (e) { xe(ns, "PIXI.FilterManager.returnRenderTarget method has been replaced with PIXI.systems.FilterSystem.returnFilterTexture"), this.returnFilterTexture(e); }, calculateScreenSpaceMatrix: function (e) { xe(ns, "PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead"); var t = e.identity(), n = this.activeState, r = n.sourceFrame, i = n.destinationFrame; return t.translate(r.x / i.width, r.y / i.height), t.scale(i.width, i.height), t; }, calculateNormalizedScreenSpaceMatrix: function (e) { xe(ns, "PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead."); var t = this.activeState, n = t.sourceFrame, r = t.destinationFrame, i = e.identity(); i.translate(n.x / r.width, n.y / r.height); var o = r.width / n.width, a = r.height / n.height; return i.scale(o, a), i; }, }), Object.defineProperties(e.RenderTexture.prototype, { sourceFrame: { get: function () { return xe(ns, "PIXI.RenderTexture.sourceFrame property has been removed"), this.filterFrame; }, }, size: { get: function () { return xe(ns, "PIXI.RenderTexture.size property has been removed"), this._frame; }, }, }); var i = (function (e) { function t(t, n, r, i) { return xe(ns, "PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass"), e.call(this, !0, t, n, r, i) || this; } return ts(t, e), t; })(e.filters.BlurFilterPass), o = (function (e) { function t(t, n, r, i) { return xe(ns, "PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass"), e.call(this, !1, t, n, r, i) || this; } return ts(t, e), t; })(e.filters.BlurFilterPass); Object.assign(e.filters, { BlurXFilter: i, BlurYFilter: o }); var a = e.Sprite, s = e.Texture, u = e.Graphics; function l(e, t, n, r) { return xe(ns, "PIXI.Sprite." + e + " method is deprecated, use PIXI.Sprite.from"), a.from(t, { resourceOptions: { scale: r, crossorigin: n } }); } function c(e, t, n, r) { return xe(ns, "PIXI.Texture." + e + " method is deprecated, use PIXI.Texture.from"), s.from(t, { resourceOptions: { scale: r, crossorigin: n } }); } u.prototype.generateCanvasTexture || (u.prototype.generateCanvasTexture = function () { xe(ns, 'PIXI.Graphics.generateCanvasTexture method is only available in "pixi.js-legacy"'); }), Object.defineProperty(u.prototype, "graphicsData", { get: function () { return xe(ns, "PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData"), this.geometry.graphicsData; }, }), (a.fromImage = l.bind(null, "fromImage")), (a.fromSVG = l.bind(null, "fromSVG")), (a.fromCanvas = l.bind(null, "fromCanvas")), (a.fromVideo = l.bind(null, "fromVideo")), (a.fromFrame = l.bind(null, "fromFrame")), (s.fromImage = c.bind(null, "fromImage")), (s.fromSVG = c.bind(null, "fromSVG")), (s.fromCanvas = c.bind(null, "fromCanvas")), (s.fromVideo = c.bind(null, "fromVideo")), (s.fromFrame = c.bind(null, "fromFrame")), Object.defineProperty(e.AbstractRenderer.prototype, "autoResize", { get: function () { return xe(ns, "PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"), this.autoDensity; }, set: function (e) { xe(ns, "PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"), (this.autoDensity = e); }, }), Object.defineProperty(e.Renderer.prototype, "textureManager", { get: function () { return xe(ns, "PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture"), this.texture; }, }), (e.utils.mixins = { mixin: function () { xe(ns, "PIXI.utils.mixins.mixin function is no longer available"); }, delayMixin: function () { xe(ns, "PIXI.utils.mixins.delayMixin function is no longer available"); }, performMixins: function () { xe(ns, "PIXI.utils.mixins.performMixins function is no longer available"); }, }), Object.defineProperty(e.BitmapText.prototype, "font", { get: function () { return xe("5.3.0", "PIXI.BitmapText.font property is deprecated, use fontName, fontSize, tint or align properties"), { name: this._fontName, size: this._fontSize, tint: this._tint, align: this._align }; }, set: function (t) { if ((xe("5.3.0", "PIXI.BitmapText.font property is deprecated, use fontName, fontSize, tint or align properties"), t)) { var n = { font: t }; this._upgradeStyle(n), (n.fontSize = n.fontSize || e.BitmapFont.available[n.fontName].size), (this._fontName = n.fontName), (this._fontSize = n.fontSize), (this.dirty = !0); } }, }); } Er.registerPlugin("accessibility", _t), Er.registerPlugin("extract", Vr), Er.registerPlugin("interaction", Et), Er.registerPlugin("particle", Si), Er.registerPlugin("prepare", Po), Er.registerPlugin("batch", Ur), Er.registerPlugin("tilingSprite", Go), _i.registerPlugin(ua), _i.registerPlugin(Ro), jr.registerPlugin(vt), jr.registerPlugin(gi); var is = "5.3.12", os = { AlphaFilter: ca, BlurFilter: ka, BlurFilterPass: Oa, ColorMatrixFilter: Da, DisplacementFilter: Ba, FXAAFilter: Ua, NoiseFilter: Ga }, as = function (e, t) { return ( (as = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), as(e, t) ); }; var ss = (function () { function e(e) { (this.renderer = e), (this._foundShapes = []); } return ( (e.prototype.pushMask = function (e) { var t = this.renderer, n = e.maskObject || e; t.context.save(); var r = this._foundShapes; if ((this.recursiveFindShapes(n, r), r.length > 0)) { var i = t.context; i.beginPath(); for (var o = 0; o < r.length; o++) { var a = r[o], s = a.transform.worldTransform; this.renderer.setContextTransform(s), this.renderGraphicsShape(a); } (r.length = 0), i.clip(); } }), (e.prototype.recursiveFindShapes = function (e, t) { e.geometry && e.geometry.graphicsData && t.push(e); var n = e.children; if (n) for (var r = 0; r < n.length; r++) this.recursiveFindShapes(n[r], t); }), (e.prototype.renderGraphicsShape = function (e) { e.finishPoly(); var t = this.renderer.context, n = e.geometry.graphicsData, r = n.length; if (0 !== r) for (var i = 0; i < r; i++) { var o = n[i].shape; if (o.type === Fe.POLY) { var a = o.points; t.moveTo(a[0], a[1]); for (var s = 1; s < a.length / 2; s++) t.lineTo(a[2 * s], a[2 * s + 1]); a[0] === a[a.length - 2] && a[1] === a[a.length - 1] && t.closePath(); } else if (o.type === Fe.RECT) t.rect(o.x, o.y, o.width, o.height), t.closePath(); else if (o.type === Fe.CIRC) t.arc(o.x, o.y, o.radius, 0, 2 * Math.PI), t.closePath(); else if (o.type === Fe.ELIP) { var u = 2 * o.width, l = 2 * o.height, c = o.x - u / 2, d = o.y - l / 2, h = 0.5522848, p = (u / 2) * h, f = (l / 2) * h, _ = c + u, g = d + l, m = c + u / 2, v = d + l / 2; t.moveTo(c, v), t.bezierCurveTo(c, v - f, m - p, d, m, d), t.bezierCurveTo(m + p, d, _, v - f, _, v), t.bezierCurveTo(_, v + f, m + p, g, m, g), t.bezierCurveTo(m - p, g, c, v + f, c, v), t.closePath(); } else if (o.type === Fe.RREC) { var y = o.x, C = o.y, b = o.width, w = o.height, S = o.radius, T = (Math.min(b, w) / 2) | 0; (S = S > T ? T : S), t.moveTo(y, C + S), t.lineTo(y, C + w - S), t.quadraticCurveTo(y, C + w, y + S, C + w), t.lineTo(y + b - S, C + w), t.quadraticCurveTo(y + b, C + w, y + b, C + w - S), t.lineTo(y + b, C + S), t.quadraticCurveTo(y + b, C, y + b - S, C), t.lineTo(y + S, C), t.quadraticCurveTo(y, C, y, C + S), t.closePath(); } } }), (e.prototype.popMask = function (e) { e.context.restore(), e.invalidateBlendMode(); }), (e.prototype.destroy = function () {}), e ); })(); function us(e) { var t = document.createElement("canvas"); (t.width = 6), (t.height = 1); var n = t.getContext("2d"); return (n.fillStyle = e), n.fillRect(0, 0, 6, 1), t; } function ls() { if ("undefined" == typeof document) return !1; var e = us("#ff00ff"), t = us("#ffff00"), n = document.createElement("canvas"); (n.width = 6), (n.height = 1); var r = n.getContext("2d"); (r.globalCompositeOperation = "multiply"), r.drawImage(e, 0, 0), r.drawImage(t, 2, 0); var i = r.getImageData(2, 0, 1, 1); if (!i) return !1; var o = i.data; return 255 === o[0] && 0 === o[1] && 0 === o[2]; } var cs = new qe(), ds = (function (e) { function t(n) { var r, i = e.call(this, M.CANVAS, n) || this; if (((i.rootContext = i.view.getContext("2d", { alpha: i.transparent })), (i.context = i.rootContext), (i.refresh = !0), (i.maskManager = new ss(i)), (i.smoothProperty = "imageSmoothingEnabled"), !i.rootContext.imageSmoothingEnabled)) { var o = i.rootContext; o.webkitImageSmoothingEnabled ? (i.smoothProperty = "webkitImageSmoothingEnabled") : o.mozImageSmoothingEnabled ? (i.smoothProperty = "mozImageSmoothingEnabled") : o.oImageSmoothingEnabled ? (i.smoothProperty = "oImageSmoothingEnabled") : o.msImageSmoothingEnabled && (i.smoothProperty = "msImageSmoothingEnabled"); } return i.initPlugins(t.__plugins), (i.blendModes = (void 0 === r && (r = []), ls() ? ((r[O.NORMAL] = "source-over"), (r[O.ADD] = "lighter"), (r[O.MULTIPLY] = "multiply"), (r[O.SCREEN] = "screen"), (r[O.OVERLAY] = "overlay"), (r[O.DARKEN] = "darken"), (r[O.LIGHTEN] = "lighten"), (r[O.COLOR_DODGE] = "color-dodge"), (r[O.COLOR_BURN] = "color-burn"), (r[O.HARD_LIGHT] = "hard-light"), (r[O.SOFT_LIGHT] = "soft-light"), (r[O.DIFFERENCE] = "difference"), (r[O.EXCLUSION] = "exclusion"), (r[O.HUE] = "hue"), (r[O.SATURATION] = "saturate"), (r[O.COLOR] = "color"), (r[O.LUMINOSITY] = "luminosity")) : ((r[O.NORMAL] = "source-over"), (r[O.ADD] = "lighter"), (r[O.MULTIPLY] = "source-over"), (r[O.SCREEN] = "source-over"), (r[O.OVERLAY] = "source-over"), (r[O.DARKEN] = "source-over"), (r[O.LIGHTEN] = "source-over"), (r[O.COLOR_DODGE] = "source-over"), (r[O.COLOR_BURN] = "source-over"), (r[O.HARD_LIGHT] = "source-over"), (r[O.SOFT_LIGHT] = "source-over"), (r[O.DIFFERENCE] = "source-over"), (r[O.EXCLUSION] = "source-over"), (r[O.HUE] = "source-over"), (r[O.SATURATION] = "source-over"), (r[O.COLOR] = "source-over"), (r[O.LUMINOSITY] = "source-over")), (r[O.NORMAL_NPM] = r[O.NORMAL]), (r[O.ADD_NPM] = r[O.ADD]), (r[O.SCREEN_NPM] = r[O.SCREEN]), (r[O.SRC_IN] = "source-in"), (r[O.SRC_OUT] = "source-out"), (r[O.SRC_ATOP] = "source-atop"), (r[O.DST_OVER] = "destination-over"), (r[O.DST_IN] = "destination-in"), (r[O.DST_OUT] = "destination-out"), (r[O.DST_ATOP] = "destination-atop"), (r[O.XOR] = "xor"), (r[O.SUBTRACT] = "source-over"), r)), (i._activeBlendMode = null), (i._outerBlend = !1), (i._projTransform = null), (i.renderingToScreen = !1), ne("Canvas"), i.resize(i.options.width, i.options.height), i; } return ( (function (e, t) { function n() { this.constructor = e; } as(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.render = function (e, t, n, r, i) { if (this.view) { (this.renderingToScreen = !t), this.emit("prerender"); var o = this.resolution; t ? ((t = t.castToBaseTexture())._canvasRenderTarget || ((t._canvasRenderTarget = new Pe(t.width, t.height, t.resolution)), (t.resource = new zt.CanvasResource(t._canvasRenderTarget.canvas)), (t.valid = !0)), (this.context = t._canvasRenderTarget.context), (this.resolution = t._canvasRenderTarget.resolution)) : (this.context = this.rootContext); var a = this.context; if (((this._projTransform = r || null), t || (this._lastObjectRendered = e), !i)) { var s = e.enableTempParent(); e.updateTransform(), e.disableTempParent(s); } if ((a.save(), a.setTransform(1, 0, 0, 1, 0, 0), (a.globalAlpha = 1), (this._activeBlendMode = O.NORMAL), (this._outerBlend = !1), (a.globalCompositeOperation = this.blendModes[O.NORMAL]), void 0 !== n ? n : this.clearBeforeRender)) if (this.renderingToScreen) this.transparent ? a.clearRect(0, 0, this.width, this.height) : ((a.fillStyle = this._backgroundColorString), a.fillRect(0, 0, this.width, this.height)); else { t._canvasRenderTarget.clear(); var u = t.clearColor; u[3] > 0 && ((a.fillStyle = oe(se(u))), a.fillRect(0, 0, t.realWidth, t.realHeight)); } var l = this.context; (this.context = a), e.renderCanvas(this), (this.context = l), a.restore(), (this.resolution = o), (this._projTransform = null), this.emit("postrender"); } }), (t.prototype.setContextTransform = function (e, t, n) { var r = e, i = this._projTransform, o = this.resolution; (n = n || o), i && ((r = cs).copyFrom(e), r.prepend(i)), t ? this.context.setTransform(r.a * n, r.b * n, r.c * n, r.d * n, (r.tx * o) | 0, (r.ty * o) | 0) : this.context.setTransform(r.a * n, r.b * n, r.c * n, r.d * n, r.tx * o, r.ty * o); }), (t.prototype.clear = function (e) { var t = this.context; (e = e || this._backgroundColorString), !this.transparent && e ? ((t.fillStyle = e), t.fillRect(0, 0, this.width, this.height)) : t.clearRect(0, 0, this.width, this.height); }), (t.prototype.setBlendMode = function (e, t) { var n = e === O.SRC_IN || e === O.SRC_OUT || e === O.DST_IN || e === O.DST_ATOP; !t && n && (e = O.NORMAL), this._activeBlendMode !== e && ((this._activeBlendMode = e), (this._outerBlend = n), (this.context.globalCompositeOperation = this.blendModes[e])); }), (t.prototype.destroy = function (t) { e.prototype.destroy.call(this, t), (this.context = null), (this.refresh = !0), this.maskManager.destroy(), (this.maskManager = null), (this.smoothProperty = null); }), (t.prototype.resize = function (t, n) { e.prototype.resize.call(this, t, n), this.smoothProperty && (this.rootContext[this.smoothProperty] = Y.SCALE_MODE === B.LINEAR); }), (t.prototype.invalidateBlendMode = function () { this._activeBlendMode = this.blendModes.indexOf(this.context.globalCompositeOperation); }), (t.registerPlugin = function (e, n) { (t.__plugins = t.__plugins || {}), (t.__plugins[e] = n); }), t ); })(xr), hs = { canvas: null, getTintedCanvas: function (e, t) { var n = e.texture, r = "#" + ("00000" + (0 | (t = hs.roundColor(t))).toString(16)).substr(-6); n.tintCache = n.tintCache || {}; var i, o = n.tintCache[r]; if (o) { if (o.tintId === n._updateID) return n.tintCache[r]; i = n.tintCache[r]; } else i = document.createElement("canvas"); if ((hs.tintMethod(n, t, i), (i.tintId = n._updateID), hs.convertTintToImage)) { var a = new Image(); (a.src = i.toDataURL()), (n.tintCache[r] = a); } else n.tintCache[r] = i; return i; }, getTintedPattern: function (e, t) { var n = "#" + ("00000" + (0 | (t = hs.roundColor(t))).toString(16)).substr(-6); e.patternCache = e.patternCache || {}; var r = e.patternCache[n]; return (r && r.tintId === e._updateID) || (hs.canvas || (hs.canvas = document.createElement("canvas")), hs.tintMethod(e, t, hs.canvas), ((r = hs.canvas.getContext("2d").createPattern(hs.canvas, "repeat")).tintId = e._updateID), (e.patternCache[n] = r)), r; }, tintWithMultiply: function (e, t, n) { var r = n.getContext("2d"), i = e._frame.clone(), o = e.baseTexture.resolution; (i.x *= o), (i.y *= o), (i.width *= o), (i.height *= o), (n.width = Math.ceil(i.width)), (n.height = Math.ceil(i.height)), r.save(), (r.fillStyle = "#" + ("00000" + (0 | t).toString(16)).substr(-6)), r.fillRect(0, 0, i.width, i.height), (r.globalCompositeOperation = "multiply"); var a = e.baseTexture.getDrawableSource(); r.drawImage(a, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), (r.globalCompositeOperation = "destination-atop"), r.drawImage(a, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), r.restore(); }, tintWithOverlay: function (e, t, n) { var r = n.getContext("2d"), i = e._frame.clone(), o = e.baseTexture.resolution; (i.x *= o), (i.y *= o), (i.width *= o), (i.height *= o), (n.width = Math.ceil(i.width)), (n.height = Math.ceil(i.height)), r.save(), (r.globalCompositeOperation = "copy"), (r.fillStyle = "#" + ("00000" + (0 | t).toString(16)).substr(-6)), r.fillRect(0, 0, i.width, i.height), (r.globalCompositeOperation = "destination-atop"), r.drawImage(e.baseTexture.getDrawableSource(), i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), r.restore(); }, tintWithPerPixel: function (e, t, n) { var r = n.getContext("2d"), i = e._frame.clone(), o = e.baseTexture.resolution; (i.x *= o), (i.y *= o), (i.width *= o), (i.height *= o), (n.width = Math.ceil(i.width)), (n.height = Math.ceil(i.height)), r.save(), (r.globalCompositeOperation = "copy"), r.drawImage(e.baseTexture.getDrawableSource(), i.x, i.y, i.width, i.height, 0, 0, i.width, i.height), r.restore(); for (var a = ie(t), s = a[0], u = a[1], l = a[2], c = r.getImageData(0, 0, i.width, i.height), d = c.data, h = 0; h < d.length; h += 4) (d[h + 0] *= s), (d[h + 1] *= u), (d[h + 2] *= l); r.putImageData(c, 0, 0); }, roundColor: function (e) { var t = hs.cacheStepsPerColorChannel, n = ie(e); return (n[0] = Math.min(255, (n[0] / t) * t)), (n[1] = Math.min(255, (n[1] / t) * t)), (n[2] = Math.min(255, (n[2] / t) * t)), se(n); }, cacheStepsPerColorChannel: 8, convertTintToImage: !1, canUseMultiply: ls(), tintMethod: null, }; hs.tintMethod = hs.canUseMultiply ? hs.tintWithMultiply : hs.tintWithPerPixel; var ps = Er.create; (Er.create = function (e) { if (!(e && e.forceCanvas)) try { return ps(e); } catch (e) {} return new ds(e); }), (Dt.prototype.getDrawableSource = function () { var e = this.resource; return e ? e.bitmap || e.source : null; }), (qt.prototype._canvasRenderTarget = null), (Jt.prototype.patternCache = null), (Jt.prototype.tintCache = null); var fs = (function () { function e(e) { this.renderer = e; } return ( (e.prototype.render = function (e) { var t = this.renderer, n = e.worldTransform; (t.context.globalAlpha = e.worldAlpha), t.setBlendMode(e.blendMode), t.setContextTransform(n, e.roundPixels), e.drawMode !== k.TRIANGLES ? this._renderTriangleMesh(e) : this._renderTriangles(e); }), (e.prototype._renderTriangleMesh = function (e) { for (var t = e.geometry.buffers[0].data.length, n = 0; n < t - 2; n++) { var r = 2 * n; this._renderDrawTriangle(e, r, r + 2, r + 4); } }), (e.prototype._renderTriangles = function (e) { for (var t = e.geometry.getIndex().data, n = t.length, r = 0; r < n; r += 3) { var i = 2 * t[r], o = 2 * t[r + 1], a = 2 * t[r + 2]; this._renderDrawTriangle(e, i, o, a); } }), (e.prototype._renderDrawTriangle = function (e, t, n, r) { var i = this.renderer.context, o = e.geometry.buffers[0].data, a = e.uvs, s = e.texture; if (s.valid) { var u = 16777215 !== e.tint, l = s.baseTexture, c = l.width, d = l.height; u && e._cachedTint !== e.tint && ((e._cachedTint = e.tint), (e._tintedCanvas = hs.getTintedCanvas(e, e.tint))); var h = u ? e._tintedCanvas : l.getDrawableSource(), p = a[t] * l.width, f = a[n] * l.width, _ = a[r] * l.width, g = a[t + 1] * l.height, m = a[n + 1] * l.height, v = a[r + 1] * l.height, y = o[t], C = o[n], b = o[r], w = o[t + 1], S = o[n + 1], T = o[r + 1], x = e.canvasPadding / this.renderer.resolution; if (x > 0) { var E = x / Math.abs(e.worldTransform.a), L = x / Math.abs(e.worldTransform.d), A = (y + C + b) / 3, I = (w + S + T) / 3, M = y - A, P = w - I, O = Math.sqrt(M * M + P * P); (y = A + (M / O) * (O + E)), (w = I + (P / O) * (O + L)), (P = S - I), (C = A + ((M = C - A) / (O = Math.sqrt(M * M + P * P))) * (O + E)), (S = I + (P / O) * (O + L)), (P = T - I), (b = A + ((M = b - A) / (O = Math.sqrt(M * M + P * P))) * (O + E)), (T = I + (P / O) * (O + L)); } i.save(), i.beginPath(), i.moveTo(y, w), i.lineTo(C, S), i.lineTo(b, T), i.closePath(), i.clip(); var k = p * m + g * _ + f * v - m * _ - g * f - p * v, R = y * m + g * b + C * v - m * b - g * C - y * v, D = p * C + y * _ + f * b - C * _ - y * f - p * b, N = p * m * b + g * C * _ + y * f * v - y * m * _ - g * f * b - p * C * v, B = w * m + g * T + S * v - m * T - g * S - w * v, F = p * S + w * _ + f * T - S * _ - w * f - p * T, U = p * m * T + g * S * _ + w * f * v - w * m * _ - g * f * T - p * S * v; i.transform(R / k, B / k, D / k, F / k, N / k, U / k), i.drawImage(h, 0, 0, c * l.resolution, d * l.resolution, 0, 0, c, d), i.restore(), this.renderer.invalidateBlendMode(); } }), (e.prototype.renderMeshFlat = function (e) { var t = this.renderer.context, n = e.geometry.getBuffer("aVertexPosition").data, r = n.length / 2; t.beginPath(); for (var i = 1; i < r - 2; ++i) { var o = 2 * i, a = n[o], s = n[o + 1], u = n[o + 2], l = n[o + 3], c = n[o + 4], d = n[o + 5]; t.moveTo(a, s), t.lineTo(u, l), t.lineTo(c, d); } (t.fillStyle = "#FF0000"), t.fill(), t.closePath(); }), (e.prototype.destroy = function () { this.renderer = null; }), e ); })(); (Y.MESH_CANVAS_PADDING = 0), (Xo.prototype._renderCanvas = function (e, t) { e.plugins.mesh.render(t); }), ($a.prototype._cachedTint = 16777215), ($a.prototype._tintedCanvas = null), ($a.prototype._canvasUvs = null), ($a.prototype._renderCanvas = function (e) { var t = e.context, n = this.worldTransform, r = 16777215 !== this.tint, i = this.texture; if (i.valid) { r && this._cachedTint !== this.tint && ((this._cachedTint = this.tint), (this._tintedCanvas = hs.getTintedCanvas(this, this.tint))); var o = r ? this._tintedCanvas : i.baseTexture.getDrawableSource(); this._canvasUvs || (this._canvasUvs = [0, 0, 0, 0, 0, 0, 0, 0]); var a = this.vertices, s = this._canvasUvs, u = r ? 0 : i.frame.x, l = r ? 0 : i.frame.y, c = u + i.frame.width, d = l + i.frame.height; (s[0] = u), (s[1] = u + this._leftWidth), (s[2] = c - this._rightWidth), (s[3] = c), (s[4] = l), (s[5] = l + this._topHeight), (s[6] = d - this._bottomHeight), (s[7] = d); for (var h = 0; h < 8; h++) s[h] *= i.baseTexture.resolution; (t.globalAlpha = this.worldAlpha), e.setBlendMode(this.blendMode), e.setContextTransform(n, this.roundPixels); for (var p = 0; p < 3; p++) for (var f = 0; f < 3; f++) { var _ = 2 * f + 8 * p, g = Math.max(1, s[f + 1] - s[f]), m = Math.max(1, s[p + 5] - s[p + 4]), v = Math.max(1, a[_ + 10] - a[_]), y = Math.max(1, a[_ + 11] - a[_ + 1]); t.drawImage(o, s[f], s[p + 4], g, m, a[_], a[_ + 1], v, y); } } }); var _s = !1; (Wo.prototype._cachedTint = 16777215), (Wo.prototype._tintedCanvas = null), (Wo.prototype._renderCanvas = function (e) { this.shader.uvMatrix && (this.shader.uvMatrix.update(), this.calculateUvs()), this.material._renderCanvas ? this.material._renderCanvas(e, this) : _s || ((_s = !0), window.console && console.warn("Mesh with custom shaders are not supported in CanvasRenderer.")); }), (Wo.prototype._canvasPadding = null), Object.defineProperty(Wo.prototype, "canvasPadding", { get: function () { return null !== this._canvasPadding ? this._canvasPadding : Y.MESH_CANVAS_PADDING; }, set: function (e) { this._canvasPadding = e; }, }), (Ka.prototype._renderCanvas = function (e) { this.autoUpdate && this.geometry.getBuffer("aVertexPosition").update(), this.shader.update && this.shader.update(), this.calculateUvs(), this.material._renderCanvas(e, this); }), (Xa.prototype._renderCanvas = function (e) { (this.autoUpdate || this.geometry._width !== this.shader.texture.height) && ((this.geometry._width = this.shader.texture.height), this.geometry.update()), this.shader.update && this.shader.update(), this.calculateUvs(), this.material._renderCanvas(e, this); }); var gs, ms = (function () { function e(e) { (this.renderer = e), (this._svgMatrix = null), (this._tempMatrix = new qe()); } return ( (e.prototype._calcCanvasStyle = function (e, t) { var n; return e.texture && e.texture.baseTexture !== Jt.WHITE.baseTexture ? (e.texture.valid ? ((n = hs.getTintedPattern(e.texture, t)), this.setPatternTransform(n, e.matrix || qe.IDENTITY)) : (n = "#808080")) : (n = "#" + ("00000" + (0 | t).toString(16)).substr(-6)), n; }), (e.prototype.render = function (e) { var t = this.renderer, n = t.context, r = e.worldAlpha, i = e.transform.worldTransform; t.setContextTransform(i), t.setBlendMode(e.blendMode); for (var o, a, s = e.geometry.graphicsData, u = ((e.tint >> 16) & 255) / 255, l = ((e.tint >> 8) & 255) / 255, c = (255 & e.tint) / 255, d = 0; d < s.length; d++) { var h = s[d], p = h.shape, f = h.fillStyle, _ = h.lineStyle, g = 0 | h.fillStyle.color, m = 0 | h.lineStyle.color; if ((h.matrix && t.setContextTransform(i.copyTo(this._tempMatrix).append(h.matrix)), f.visible)) { var v = (((((g >> 16) & 255) / 255) * u * 255) << 16) + (((((g >> 8) & 255) / 255) * l * 255) << 8) + ((255 & g) / 255) * c * 255; o = this._calcCanvasStyle(f, v); } if (_.visible) { var y = (((((m >> 16) & 255) / 255) * u * 255) << 16) + (((((m >> 8) & 255) / 255) * l * 255) << 8) + ((255 & m) / 255) * c * 255; a = this._calcCanvasStyle(_, y); } if (((n.lineWidth = _.width), (n.lineCap = _.cap), (n.lineJoin = _.join), (n.miterLimit = _.miterLimit), h.type === Fe.POLY)) { n.beginPath(); var C = (A = p).points, b = h.holes, w = void 0, S = void 0, T = void 0, x = void 0; n.moveTo(C[0], C[1]); for (var E = 2; E < C.length; E += 2) n.lineTo(C[E], C[E + 1]); if ((A.closeStroke && n.closePath(), b.length > 0)) { (w = 0), (T = C[0]), (x = C[1]); for (E = 2; E + 2 < C.length; E += 2) w += (C[E] - T) * (C[E + 3] - x) - (C[E + 2] - T) * (C[E + 1] - x); for (var L = 0; L < b.length; L++) if ((C = b[L].shape.points)) { (S = 0), (T = C[0]), (x = C[1]); for (E = 2; E + 2 < C.length; E += 2) S += (C[E] - T) * (C[E + 3] - x) - (C[E + 2] - T) * (C[E + 1] - x); if (S * w < 0) { n.moveTo(C[0], C[1]); for (E = 2; E < C.length; E += 2) n.lineTo(C[E], C[E + 1]); } else { n.moveTo(C[C.length - 2], C[C.length - 1]); for (E = C.length - 4; E >= 0; E -= 2) n.lineTo(C[E], C[E + 1]); } b[L].shape.closeStroke && n.closePath(); } } f.visible && ((n.globalAlpha = f.alpha * r), (n.fillStyle = o), n.fill()), _.visible && ((n.globalAlpha = _.alpha * r), (n.strokeStyle = a), n.stroke()); } else if (h.type === Fe.RECT) { var A = p; f.visible && ((n.globalAlpha = f.alpha * r), (n.fillStyle = o), n.fillRect(A.x, A.y, A.width, A.height)), _.visible && ((n.globalAlpha = _.alpha * r), (n.strokeStyle = a), n.strokeRect(A.x, A.y, A.width, A.height)); } else if (h.type === Fe.CIRC) { A = p; n.beginPath(), n.arc(A.x, A.y, A.radius, 0, 2 * Math.PI), n.closePath(), f.visible && ((n.globalAlpha = f.alpha * r), (n.fillStyle = o), n.fill()), _.visible && ((n.globalAlpha = _.alpha * r), (n.strokeStyle = a), n.stroke()); } else if (h.type === Fe.ELIP) { var I = 2 * (A = p).width, M = 2 * A.height, P = A.x - I / 2, O = A.y - M / 2; n.beginPath(); var k = 0.5522848, R = (I / 2) * k, D = (M / 2) * k, N = P + I, B = O + M, F = P + I / 2, U = O + M / 2; n.moveTo(P, U), n.bezierCurveTo(P, U - D, F - R, O, F, O), n.bezierCurveTo(F + R, O, N, U - D, N, U), n.bezierCurveTo(N, U + D, F + R, B, F, B), n.bezierCurveTo(F - R, B, P, U + D, P, U), n.closePath(), f.visible && ((n.globalAlpha = f.alpha * r), (n.fillStyle = o), n.fill()), _.visible && ((n.globalAlpha = _.alpha * r), (n.strokeStyle = a), n.stroke()); } else if (h.type === Fe.RREC) { var j = (A = p).x, G = A.y, H = A.width, V = A.height, Z = A.radius, z = (Math.min(H, V) / 2) | 0; (Z = Z > z ? z : Z), n.beginPath(), n.moveTo(j, G + Z), n.lineTo(j, G + V - Z), n.quadraticCurveTo(j, G + V, j + Z, G + V), n.lineTo(j + H - Z, G + V), n.quadraticCurveTo(j + H, G + V, j + H, G + V - Z), n.lineTo(j + H, G + Z), n.quadraticCurveTo(j + H, G, j + H - Z, G), n.lineTo(j + Z, G), n.quadraticCurveTo(j, G, j, G + Z), n.closePath(), f.visible && ((n.globalAlpha = f.alpha * r), (n.fillStyle = o), n.fill()), _.visible && ((n.globalAlpha = _.alpha * r), (n.strokeStyle = a), n.stroke()); } } }), (e.prototype.setPatternTransform = function (e, t) { if (!1 !== this._svgMatrix) { if (!this._svgMatrix) { var n = document.createElementNS("http://www.w3.org/2000/svg", "svg"); if ((n && n.createSVGMatrix && (this._svgMatrix = n.createSVGMatrix()), !this._svgMatrix || !e.setTransform)) return void (this._svgMatrix = !1); } (this._svgMatrix.a = t.a), (this._svgMatrix.b = t.b), (this._svgMatrix.c = t.c), (this._svgMatrix.d = t.d), (this._svgMatrix.e = t.tx), (this._svgMatrix.f = t.ty), e.setTransform(this._svgMatrix.inverse()); } }), (e.prototype.destroy = function () { (this.renderer = null), (this._svgMatrix = null), (this._tempMatrix = null); }), e ); })(), vs = new qe(); (eo.prototype.generateCanvasTexture = function (e, t) { void 0 === t && (t = 1); var n = this.getLocalBounds(), r = en.create({ width: n.width, height: n.height, scaleMode: e, resolution: t }); gs || (gs = new ds()), this.transform.updateLocalTransform(), this.transform.localTransform.copyTo(vs), vs.invert(), (vs.tx -= n.x), (vs.ty -= n.y), gs.render(this, r, !0, vs); var i = Jt.from(r.baseTexture._canvasRenderTarget.canvas, { scaleMode: e }); return i.baseTexture.setResolution(t), i; }), (eo.prototype.cachedGraphicsData = []), (eo.prototype._renderCanvas = function (e) { !0 !== this.isMask && (this.finishPoly(), e.plugins.graphics.render(this)); }); var ys = new qe(), Cs = (function () { function e(e) { this.renderer = e; } return ( (e.prototype.render = function (e) { var t = e._texture, n = this.renderer, r = n.context, i = t._frame.width, o = t._frame.height, a = e.transform.worldTransform, s = 0, u = 0, l = t.baseTexture.getDrawableSource(); if (!(t.orig.width <= 0 || t.orig.height <= 0) && t.valid && l && t.valid) { n.setBlendMode(e.blendMode, !0), (n.context.globalAlpha = e.worldAlpha); var c = t.baseTexture.scaleMode === B.LINEAR; n.smoothProperty && n.context[n.smoothProperty] !== c && (r[n.smoothProperty] = c), t.trim ? ((s = t.trim.width / 2 + t.trim.x - e.anchor.x * t.orig.width), (u = t.trim.height / 2 + t.trim.y - e.anchor.y * t.orig.height)) : ((s = (0.5 - e.anchor.x) * t.orig.width), (u = (0.5 - e.anchor.y) * t.orig.height)), t.rotate && (a.copyTo(ys), (a = ys), rt.matrixAppendRotationInv(a, t.rotate, s, u), (s = 0), (u = 0)), (s -= i / 2), (u -= o / 2), n.setContextTransform(a, e.roundPixels, 1), e.roundPixels && ((s |= 0), (u |= 0)); var d = t.baseTexture.resolution, h = n._outerBlend; h && (r.save(), r.beginPath(), r.rect(s * n.resolution, u * n.resolution, i * n.resolution, o * n.resolution), r.clip()), 16777215 !== e.tint ? ((e._cachedTint === e.tint && e._tintedCanvas.tintId === e._texture._updateID) || ((e._cachedTint = e.tint), (e._tintedCanvas = hs.getTintedCanvas(e, e.tint))), r.drawImage(e._tintedCanvas, 0, 0, Math.floor(i * d), Math.floor(o * d), Math.floor(s * n.resolution), Math.floor(u * n.resolution), Math.floor(i * n.resolution), Math.floor(o * n.resolution))) : r.drawImage(l, t._frame.x * d, t._frame.y * d, Math.floor(i * d), Math.floor(o * d), Math.floor(s * n.resolution), Math.floor(u * n.resolution), Math.floor(i * n.resolution), Math.floor(o * n.resolution)), h && r.restore(), n.setBlendMode(O.NORMAL); } }), (e.prototype.destroy = function () { this.renderer = null; }), e ); })(); (oo.prototype._tintedCanvas = null), (oo.prototype._renderCanvas = function (e) { e.plugins.sprite.render(this); }); var bs = new He(), ws = (function () { function e(e) { this.renderer = e; } return ( (e.prototype.image = function (e, t, n) { var r = new Image(); return (r.src = this.base64(e, t, n)), r; }), (e.prototype.base64 = function (e, t, n) { return this.canvas(e).toDataURL(t, n); }), (e.prototype.canvas = function (e) { var t, n, r, i, o = this.renderer; e && (i = e instanceof en ? e : o.generateTexture(e)), i ? ((t = i.baseTexture._canvasRenderTarget.context), (n = i.baseTexture._canvasRenderTarget.resolution), (r = i.frame)) : ((t = o.rootContext), (n = o.resolution), ((r = bs).width = this.renderer.width), (r.height = this.renderer.height)); var a = Math.floor(r.width * n + 1e-4), s = Math.floor(r.height * n + 1e-4), u = new Pe(a, s, 1), l = t.getImageData(r.x * n, r.y * n, a, s); return u.context.putImageData(l, 0, 0), u.canvas; }), (e.prototype.pixels = function (e) { var t, n, r, i, o = this.renderer; return e && (i = e instanceof en ? e : o.generateTexture(e)), i ? ((t = i.baseTexture._canvasRenderTarget.context), (n = i.baseTexture._canvasRenderTarget.resolution), (r = i.frame)) : ((t = o.rootContext), ((r = bs).width = o.width), (r.height = o.height)), t.getImageData(0, 0, r.width * n, r.height * n).data; }), (e.prototype.destroy = function () { this.renderer = null; }), e ); })(); Object.defineProperty(ds.prototype, "extract", { get: function () { return xe("v5.3.0", "CanvasRenderer#extract is deprecated, use CanvasRenderer#plugins.extract"), this.plugins.extract; }, }); var Ss = function (e, t) { return ( (Ss = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); }), Ss(e, t) ); }; function Ts(e, t) { var n = e; if (t instanceof Dt) { var r = t.source, i = 0 === r.width ? n.canvas.width : Math.min(n.canvas.width, r.width), o = 0 === r.height ? n.canvas.height : Math.min(n.canvas.height, r.height); return n.ctx.drawImage(r, 0, 0, i, o, 0, 0, n.canvas.width, n.canvas.height), !0; } return !1; } var xs = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n.uploadHookHelper = n), (n.canvas = document.createElement("canvas")), (n.canvas.width = 16), (n.canvas.height = 16), (n.ctx = n.canvas.getContext("2d")), n.registerUploadHook(Ts), n; } return ( (function (e, t) { function n() { this.constructor = e; } Ss(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); })(t, e), (t.prototype.destroy = function () { e.prototype.destroy.call(this), (this.ctx = null), (this.canvas = null); }), t ); })(Lo); (Fo.prototype._renderCanvas = function (e) { var t = this._texture; if (t.baseTexture.valid) { var n = e.context, r = this.worldTransform, i = t.baseTexture, o = i.getDrawableSource(), a = i.resolution, s = ((this.tilePosition.x / this.tileScale.x) % t._frame.width) * a, u = ((this.tilePosition.y / this.tileScale.y) % t._frame.height) * a; if (this._textureID !== this._texture._updateID || this._cachedTint !== this.tint) { this._textureID = this._texture._updateID; var l = new Pe(t._frame.width, t._frame.height, a); 16777215 !== this.tint ? ((this._tintedCanvas = hs.getTintedCanvas(this, this.tint)), l.context.drawImage(this._tintedCanvas, 0, 0)) : l.context.drawImage(o, -t._frame.x * a, -t._frame.y * a), (this._cachedTint = this.tint), (this._canvasPattern = l.context.createPattern(l.canvas, "repeat")); } (n.globalAlpha = this.worldAlpha), e.setBlendMode(this.blendMode), e.setContextTransform(r), (n.fillStyle = this._canvasPattern), n.scale(this.tileScale.x / a, this.tileScale.y / a); var c = this.anchor.x * -this._width, d = this.anchor.y * -this._height; this.uvRespectAnchor ? (n.translate(s, u), n.fillRect(-s + c, -u + d, (this._width / this.tileScale.x) * a, (this._height / this.tileScale.y) * a)) : (n.translate(s + c, u + d), n.fillRect(-s, -u, (this._width / this.tileScale.x) * a, (this._height / this.tileScale.y) * a)); } }), (bi.prototype.renderCanvas = function (e) { if (this.visible && !(this.worldAlpha <= 0) && this.children.length && this.renderable) { var t = e.context, n = this.worldTransform, r = !0, i = 0, o = 0, a = 0, s = 0; e.setBlendMode(this.blendMode), (t.globalAlpha = this.worldAlpha), this.displayObjectUpdateTransform(); for (var u = 0; u < this.children.length; ++u) { var l = this.children[u]; if (l.visible && l._texture.valid) { var c = l._texture.frame; if (((t.globalAlpha = this.worldAlpha * l.alpha), l.rotation % (2 * Math.PI) == 0)) r && (e.setContextTransform(n, !1, 1), (r = !1)), (i = l.anchor.x * (-c.width * l.scale.x) + l.position.x + 0.5), (o = l.anchor.y * (-c.height * l.scale.y) + l.position.y + 0.5), (a = c.width * l.scale.x), (s = c.height * l.scale.y); else { r || (r = !0), l.displayObjectUpdateTransform(); var d = l.worldTransform; e.setContextTransform(d, this.roundPixels, 1), (i = l.anchor.x * -c.width + 0.5), (o = l.anchor.y * -c.height + 0.5), (a = c.width), (s = c.height); } var h = l._texture.baseTexture.resolution; t.drawImage(l._texture.baseTexture.getDrawableSource(), c.x * h, c.y * h, c.width * h, c.height * h, i * e.resolution, o * e.resolution, a * e.resolution, s * e.resolution); } } } }), (dt.prototype._renderCanvas = function (e) {}), (dt.prototype.renderCanvas = function (e) { if (this.visible && !(this.worldAlpha <= 0) && this.renderable) { this._mask && e.maskManager.pushMask(this._mask), this._renderCanvas(e); for (var t = 0, n = this.children.length; t < n; ++t) this.children[t].renderCanvas(e); this._mask && e.maskManager.popMask(e); } }), (ut.prototype.renderCanvas = function (e) {}), (mo.prototype._renderCanvas = function (e) { this._autoResolution && this._resolution !== e.resolution && ((this._resolution = e.resolution), (this.dirty = !0)), this.updateText(!0), oo.prototype._renderCanvas.call(this, e); }), ds.registerPlugin("accessibility", _t), ds.registerPlugin("extract", ws), ds.registerPlugin("graphics", ms), ds.registerPlugin("interaction", Et), ds.registerPlugin("mesh", fs), ds.registerPlugin("prepare", xs), ds.registerPlugin("sprite", Cs); }, 33847: (e, t, n) => { "use strict"; n.r(t), n.d(t, { Component: () => w, Fragment: () => b, cloneElement: () => Z, createContext: () => z, createElement: () => v, createRef: () => C, h: () => v, hydrate: () => V, isValidElement: () => a, options: () => i, render: () => H, toChildArray: () => I }); var r, i, o, a, s, u, l, c, d, h = {}, p = [], f = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, _ = Array.isArray; function g(e, t) { for (var n in t) e[n] = t[n]; return e; } function m(e) { var t = e.parentNode; t && t.removeChild(e); } function v(e, t, n) { var i, o, a, s = {}; for (a in t) "key" == a ? (i = t[a]) : "ref" == a ? (o = t[a]) : (s[a] = t[a]); if ((arguments.length > 2 && (s.children = arguments.length > 3 ? r.call(arguments, 2) : n), "function" == typeof e && null != e.defaultProps)) for (a in e.defaultProps) void 0 === s[a] && (s[a] = e.defaultProps[a]); return y(e, s, i, o, null); } function y(e, t, n, r, a) { var s = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == a ? ++o : a }; return null == a && null != i.vnode && i.vnode(s), s; } function C() { return { current: null }; } function b(e) { return e.children; } function w(e, t) { (this.props = e), (this.context = t); } function S(e, t) { if (null == t) return e.__ ? S(e.__, e.__.__k.indexOf(e) + 1) : null; for (var n; t < e.__k.length; t++) if (null != (n = e.__k[t]) && null != n.__e) return n.__e; return "function" == typeof e.type ? S(e) : null; } function T(e) { var t, n; if (null != (e = e.__) && null != e.__c) { for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if (null != (n = e.__k[t]) && null != n.__e) { e.__e = e.__c.base = n.__e; break; } return T(e); } } function x(e) { ((!e.__d && (e.__d = !0) && s.push(e) && !E.__r++) || u !== i.debounceRendering) && ((u = i.debounceRendering) || l)(E); } function E() { var e, t, n, r, i, o, a, u; for (s.sort(c); (e = s.shift()); ) e.__d && ((t = s.length), (r = void 0), (i = void 0), (a = (o = (n = e).__v).__e), (u = n.__P) && ((r = []), ((i = g({}, o)).__v = o.__v + 1), N(u, o, i, n.__n, void 0 !== u.ownerSVGElement, null != o.__h ? [a] : null, r, null == a ? S(o) : a, o.__h), B(r, o), o.__e != a && T(o)), s.length > t && s.sort(c)); E.__r = 0; } function L(e, t, n, r, i, o, a, s, u, l) { var c, d, f, g, m, v, C, w = (r && r.__k) || p, T = w.length; for (n.__k = [], c = 0; c < t.length; c++) if (null != (g = n.__k[c] = null == (g = t[c]) || "boolean" == typeof g || "function" == typeof g ? null : "string" == typeof g || "number" == typeof g || "bigint" == typeof g ? y(null, g, null, null, g) : _(g) ? y(b, { children: g }, null, null, null) : g.__b > 0 ? y(g.type, g.props, g.key, g.ref ? g.ref : null, g.__v) : g)) { if (((g.__ = n), (g.__b = n.__b + 1), null === (f = w[c]) || (f && g.key == f.key && g.type === f.type))) w[c] = void 0; else for (d = 0; d < T; d++) { if ((f = w[d]) && g.key == f.key && g.type === f.type) { w[d] = void 0; break; } f = null; } N(e, g, (f = f || h), i, o, a, s, u, l), (m = g.__e), (d = g.ref) && f.ref != d && (C || (C = []), f.ref && C.push(f.ref, null, g), C.push(d, g.__c || m, g)), null != m ? (null == v && (v = m), "function" == typeof g.type && g.__k === f.__k ? (g.__d = u = A(g, u, e)) : (u = M(e, g, f, w, m, u)), "function" == typeof n.type && (n.__d = u)) : u && f.__e == u && u.parentNode != e && (u = S(f)); } for (n.__e = v, c = T; c--; ) null != w[c] && ("function" == typeof n.type && null != w[c].__e && w[c].__e == n.__d && (n.__d = P(r).nextSibling), j(w[c], w[c])); if (C) for (c = 0; c < C.length; c++) U(C[c], C[++c], C[++c]); } function A(e, t, n) { for (var r, i = e.__k, o = 0; i && o < i.length; o++) (r = i[o]) && ((r.__ = e), (t = "function" == typeof r.type ? A(r, t, n) : M(n, r, r, i, r.__e, t))); return t; } function I(e, t) { return ( (t = t || []), null == e || "boolean" == typeof e || (_(e) ? e.some(function (e) { I(e, t); }) : t.push(e)), t ); } function M(e, t, n, r, i, o) { var a, s, u; if (void 0 !== t.__d) (a = t.__d), (t.__d = void 0); else if (null == n || i != o || null == i.parentNode) e: if (null == o || o.parentNode !== e) e.appendChild(i), (a = null); else { for (s = o, u = 0; (s = s.nextSibling) && u < r.length; u += 1) if (s == i) break e; e.insertBefore(i, o), (a = o); } return void 0 !== a ? a : i.nextSibling; } function P(e) { var t, n, r; if (null == e.type || "string" == typeof e.type) return e.__e; if (e.__k) for (t = e.__k.length - 1; t >= 0; t--) if ((n = e.__k[t]) && (r = P(n))) return r; return null; } function O(e, t, n) { "-" === t[0] ? e.setProperty(t, null == n ? "" : n) : (e[t] = null == n ? "" : "number" != typeof n || f.test(t) ? n : n + "px"); } function k(e, t, n, r, i) { var o; e: if ("style" === t) if ("string" == typeof n) e.style.cssText = n; else { if (("string" == typeof r && (e.style.cssText = r = ""), r)) for (t in r) (n && t in n) || O(e.style, t, ""); if (n) for (t in n) (r && n[t] === r[t]) || O(e.style, t, n[t]); } else if ("o" === t[0] && "n" === t[1]) (o = t !== (t = t.replace(/Capture$/, ""))), (t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2)), e.l || (e.l = {}), (e.l[t + o] = n), n ? r || e.addEventListener(t, o ? D : R, o) : e.removeEventListener(t, o ? D : R, o); else if ("dangerouslySetInnerHTML" !== t) { if (i) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if ("width" !== t && "height" !== t && "href" !== t && "list" !== t && "form" !== t && "tabIndex" !== t && "download" !== t && "rowSpan" !== t && "colSpan" !== t && t in e) try { e[t] = null == n ? "" : n; break e; } catch (e) {} "function" == typeof n || (null == n || (!1 === n && "-" !== t[4]) ? e.removeAttribute(t) : e.setAttribute(t, n)); } } function R(e) { return this.l[e.type + !1](i.event ? i.event(e) : e); } function D(e) { return this.l[e.type + !0](i.event ? i.event(e) : e); } function N(e, t, n, r, o, a, s, u, l) { var c, d, h, p, f, m, v, y, C, S, T, x, E, A, I, M = t.type; if (void 0 !== t.constructor) return null; null != n.__h && ((l = n.__h), (u = t.__e = n.__e), (t.__h = null), (a = [u])), (c = i.__b) && c(t); try { e: if ("function" == typeof M) { if (((y = t.props), (C = (c = M.contextType) && r[c.__c]), (S = c ? (C ? C.props.value : c.__) : r), n.__c ? (v = (d = t.__c = n.__c).__ = d.__E) : ("prototype" in M && M.prototype.render ? (t.__c = d = new M(y, S)) : ((t.__c = d = new w(y, S)), (d.constructor = M), (d.render = G)), C && C.sub(d), (d.props = y), d.state || (d.state = {}), (d.context = S), (d.__n = r), (h = d.__d = !0), (d.__h = []), (d._sb = [])), null == d.__s && (d.__s = d.state), null != M.getDerivedStateFromProps && (d.__s == d.state && (d.__s = g({}, d.__s)), g(d.__s, M.getDerivedStateFromProps(y, d.__s))), (p = d.props), (f = d.state), (d.__v = t), h)) null == M.getDerivedStateFromProps && null != d.componentWillMount && d.componentWillMount(), null != d.componentDidMount && d.__h.push(d.componentDidMount); else { if ((null == M.getDerivedStateFromProps && y !== p && null != d.componentWillReceiveProps && d.componentWillReceiveProps(y, S), (!d.__e && null != d.shouldComponentUpdate && !1 === d.shouldComponentUpdate(y, d.__s, S)) || t.__v === n.__v)) { for ( t.__v !== n.__v && ((d.props = y), (d.state = d.__s), (d.__d = !1)), d.__e = !1, t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function (e) { e && (e.__ = t); }), T = 0; T < d._sb.length; T++ ) d.__h.push(d._sb[T]); (d._sb = []), d.__h.length && s.push(d); break e; } null != d.componentWillUpdate && d.componentWillUpdate(y, d.__s, S), null != d.componentDidUpdate && d.__h.push(function () { d.componentDidUpdate(p, f, m); }); } if (((d.context = S), (d.props = y), (d.__P = e), (x = i.__r), (E = 0), "prototype" in M && M.prototype.render)) { for (d.state = d.__s, d.__d = !1, x && x(t), c = d.render(d.props, d.state, d.context), A = 0; A < d._sb.length; A++) d.__h.push(d._sb[A]); d._sb = []; } else do { (d.__d = !1), x && x(t), (c = d.render(d.props, d.state, d.context)), (d.state = d.__s); } while (d.__d && ++E < 25); (d.state = d.__s), null != d.getChildContext && (r = g(g({}, r), d.getChildContext())), h || null == d.getSnapshotBeforeUpdate || (m = d.getSnapshotBeforeUpdate(p, f)), L(e, _((I = null != c && c.type === b && null == c.key ? c.props.children : c)) ? I : [I], t, n, r, o, a, s, u, l), (d.base = t.__e), (t.__h = null), d.__h.length && s.push(d), v && (d.__E = d.__ = null), (d.__e = !1); } else null == a && t.__v === n.__v ? ((t.__k = n.__k), (t.__e = n.__e)) : (t.__e = F(n.__e, t, n, r, o, a, s, l)); (c = i.diffed) && c(t); } catch (e) { (t.__v = null), (l || null != a) && ((t.__e = u), (t.__h = !!l), (a[a.indexOf(u)] = null)), i.__e(e, t, n); } } function B(e, t) { i.__c && i.__c(t, e), e.some(function (t) { try { (e = t.__h), (t.__h = []), e.some(function (e) { e.call(t); }); } catch (e) { i.__e(e, t.__v); } }); } function F(e, t, n, i, o, a, s, u) { var l, c, d, p = n.props, f = t.props, g = t.type, v = 0; if (("svg" === g && (o = !0), null != a)) for (; v < a.length; v++) if ((l = a[v]) && "setAttribute" in l == !!g && (g ? l.localName === g : 3 === l.nodeType)) { (e = l), (a[v] = null); break; } if (null == e) { if (null === g) return document.createTextNode(f); (e = o ? document.createElementNS("http://www.w3.org/2000/svg", g) : document.createElement(g, f.is && f)), (a = null), (u = !1); } if (null === g) p === f || (u && e.data === f) || (e.data = f); else { if (((a = a && r.call(e.childNodes)), (c = (p = n.props || h).dangerouslySetInnerHTML), (d = f.dangerouslySetInnerHTML), !u)) { if (null != a) for (p = {}, v = 0; v < e.attributes.length; v++) p[e.attributes[v].name] = e.attributes[v].value; (d || c) && ((d && ((c && d.__html == c.__html) || d.__html === e.innerHTML)) || (e.innerHTML = (d && d.__html) || "")); } if ( ((function (e, t, n, r, i) { var o; for (o in n) "children" === o || "key" === o || o in t || k(e, o, null, n[o], r); for (o in t) (i && "function" != typeof t[o]) || "children" === o || "key" === o || "value" === o || "checked" === o || n[o] === t[o] || k(e, o, t[o], n[o], r); })(e, f, p, o, u), d) ) t.__k = []; else if ((L(e, _((v = t.props.children)) ? v : [v], t, n, i, o && "foreignObject" !== g, a, s, a ? a[0] : n.__k && S(n, 0), u), null != a)) for (v = a.length; v--; ) null != a[v] && m(a[v]); u || ("value" in f && void 0 !== (v = f.value) && (v !== e.value || ("progress" === g && !v) || ("option" === g && v !== p.value)) && k(e, "value", v, p.value, !1), "checked" in f && void 0 !== (v = f.checked) && v !== e.checked && k(e, "checked", v, p.checked, !1)); } return e; } function U(e, t, n) { try { "function" == typeof e ? e(t) : (e.current = t); } catch (e) { i.__e(e, n); } } function j(e, t, n) { var r, o; if ((i.unmount && i.unmount(e), (r = e.ref) && ((r.current && r.current !== e.__e) || U(r, null, t)), null != (r = e.__c))) { if (r.componentWillUnmount) try { r.componentWillUnmount(); } catch (e) { i.__e(e, t); } (r.base = r.__P = null), (e.__c = void 0); } if ((r = e.__k)) for (o = 0; o < r.length; o++) r[o] && j(r[o], t, n || "function" != typeof e.type); n || null == e.__e || m(e.__e), (e.__ = e.__e = e.__d = void 0); } function G(e, t, n) { return this.constructor(e, n); } function H(e, t, n) { var o, a, s; i.__ && i.__(e, t), (a = (o = "function" == typeof n) ? null : (n && n.__k) || t.__k), (s = []), N(t, (e = ((!o && n) || t).__k = v(b, null, [e])), a || h, h, void 0 !== t.ownerSVGElement, !o && n ? [n] : a ? null : t.firstChild ? r.call(t.childNodes) : null, s, !o && n ? n : a ? a.__e : t.firstChild, o), B(s, e); } function V(e, t) { H(e, t, V); } function Z(e, t, n) { var i, o, a, s, u = g({}, e.props); for (a in (e.type && e.type.defaultProps && (s = e.type.defaultProps), t)) "key" == a ? (i = t[a]) : "ref" == a ? (o = t[a]) : (u[a] = void 0 === t[a] && void 0 !== s ? s[a] : t[a]); return arguments.length > 2 && (u.children = arguments.length > 3 ? r.call(arguments, 2) : n), y(e.type, u, i || e.key, o || e.ref, null); } function z(e, t) { var n = { __c: (t = "__cC" + d++), __: e, Consumer: function (e, t) { return e.children(t); }, Provider: function (e) { var n, r; return ( this.getChildContext || ((n = []), ((r = {})[t] = this), (this.getChildContext = function () { return r; }), (this.shouldComponentUpdate = function (e) { this.props.value !== e.value && n.some(function (e) { (e.__e = !0), x(e); }); }), (this.sub = function (e) { n.push(e); var t = e.componentWillUnmount; e.componentWillUnmount = function () { n.splice(n.indexOf(e), 1), t && t.call(e); }; })), e.children ); }, }; return (n.Provider.__ = n.Consumer.contextType = n); } (r = p.slice), (i = { __e: function (e, t, n, r) { for (var i, o, a; (t = t.__); ) if ((i = t.__c) && !i.__) try { if (((o = i.constructor) && null != o.getDerivedStateFromError && (i.setState(o.getDerivedStateFromError(e)), (a = i.__d)), null != i.componentDidCatch && (i.componentDidCatch(e, r || {}), (a = i.__d)), a)) return (i.__E = i); } catch (t) { e = t; } throw e; }, }), (o = 0), (a = function (e) { return null != e && void 0 === e.constructor; }), (w.prototype.setState = function (e, t) { var n; (n = null != this.__s && this.__s !== this.state ? this.__s : (this.__s = g({}, this.state))), "function" == typeof e && (e = e(g({}, n), this.props)), e && g(n, e), null != e && this.__v && (t && this._sb.push(t), x(this)); }), (w.prototype.forceUpdate = function (e) { this.__v && ((this.__e = !0), e && this.__h.push(e), x(this)); }), (w.prototype.render = b), (s = []), (l = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout), (c = function (e, t) { return e.__v.__b - t.__v.__b; }), (E.__r = 0), (d = 0); }, 34619: (e, t, n) => { "use strict"; n.r(t), n.d(t, { useCallback: () => T, useContext: () => x, useDebugValue: () => E, useEffect: () => y, useErrorBoundary: () => L, useId: () => A, useImperativeHandle: () => w, useLayoutEffect: () => C, useMemo: () => S, useReducer: () => v, useRef: () => b, useState: () => m }); var r, i, o, a, s = n(33847), u = 0, l = [], c = [], d = s.options.__b, h = s.options.__r, p = s.options.diffed, f = s.options.__c, _ = s.options.unmount; function g(e, t) { s.options.__h && s.options.__h(i, e, u || t), (u = 0); var n = i.__H || (i.__H = { __: [], __h: [] }); return e >= n.__.length && n.__.push({ __V: c }), n.__[e]; } function m(e) { return (u = 1), v(D, e); } function v(e, t, n) { var o = g(r++, 2); if ( ((o.t = e), !o.__c && ((o.__ = [ n ? n(t) : D(void 0, t), function (e) { var t = o.__N ? o.__N[0] : o.__[0], n = o.t(t, e); t !== n && ((o.__N = [n, o.__[1]]), o.__c.setState({})); }, ]), (o.__c = i), !i.u)) ) { var a = function (e, t, n) { if (!o.__c.__H) return !0; var r = o.__c.__H.__.filter(function (e) { return e.__c; }); if ( r.every(function (e) { return !e.__N; }) ) return !s || s.call(this, e, t, n); var i = !1; return ( r.forEach(function (e) { if (e.__N) { var t = e.__[0]; (e.__ = e.__N), (e.__N = void 0), t !== e.__[0] && (i = !0); } }), !(!i && o.__c.props === e) && (!s || s.call(this, e, t, n)) ); }; i.u = !0; var s = i.shouldComponentUpdate, u = i.componentWillUpdate; (i.componentWillUpdate = function (e, t, n) { if (this.__e) { var r = s; (s = void 0), a(e, t, n), (s = r); } u && u.call(this, e, t, n); }), (i.shouldComponentUpdate = a); } return o.__N || o.__; } function y(e, t) { var n = g(r++, 3); !s.options.__s && R(n.__H, t) && ((n.__ = e), (n.i = t), i.__H.__h.push(n)); } function C(e, t) { var n = g(r++, 4); !s.options.__s && R(n.__H, t) && ((n.__ = e), (n.i = t), i.__h.push(n)); } function b(e) { return ( (u = 5), S(function () { return { current: e }; }, []) ); } function w(e, t, n) { (u = 6), C( function () { return "function" == typeof e ? (e(t()), function () { return e(null); }) : e ? ((e.current = t()), function () { return (e.current = null); }) : void 0; }, null == n ? n : n.concat(e) ); } function S(e, t) { var n = g(r++, 7); return R(n.__H, t) ? ((n.__V = e()), (n.i = t), (n.__h = e), n.__V) : n.__; } function T(e, t) { return ( (u = 8), S(function () { return e; }, t) ); } function x(e) { var t = i.context[e.__c], n = g(r++, 9); return (n.c = e), t ? (null == n.__ && ((n.__ = !0), t.sub(i)), t.props.value) : e.__; } function E(e, t) { s.options.useDebugValue && s.options.useDebugValue(t ? t(e) : e); } function L(e) { var t = g(r++, 10), n = m(); return ( (t.__ = e), i.componentDidCatch || (i.componentDidCatch = function (e, r) { t.__ && t.__(e, r), n[1](e); }), [ n[0], function () { n[1](void 0); }, ] ); } function A() { var e = g(r++, 11); if (!e.__) { for (var t = i.__v; null !== t && !t.__m && null !== t.__; ) t = t.__; var n = t.__m || (t.__m = [0, 0]); e.__ = "P" + n[0] + "-" + n[1]++; } return e.__; } function I() { for (var e; (e = l.shift()); ) if (e.__P && e.__H) try { e.__H.__h.forEach(O), e.__H.__h.forEach(k), (e.__H.__h = []); } catch (t) { (e.__H.__h = []), s.options.__e(t, e.__v); } } (s.options.__b = function (e) { (i = null), d && d(e); }), (s.options.__r = function (e) { h && h(e), (r = 0); var t = (i = e.__c).__H; t && (o === i ? ((t.__h = []), (i.__h = []), t.__.forEach(function (e) { e.__N && (e.__ = e.__N), (e.__V = c), (e.__N = e.i = void 0); })) : (t.__h.forEach(O), t.__h.forEach(k), (t.__h = []), (r = 0))), (o = i); }), (s.options.diffed = function (e) { p && p(e); var t = e.__c; t && t.__H && (t.__H.__h.length && ((1 !== l.push(t) && a === s.options.requestAnimationFrame) || ((a = s.options.requestAnimationFrame) || P)(I)), t.__H.__.forEach(function (e) { e.i && (e.__H = e.i), e.__V !== c && (e.__ = e.__V), (e.i = void 0), (e.__V = c); })), (o = i = null); }), (s.options.__c = function (e, t) { t.some(function (e) { try { e.__h.forEach(O), (e.__h = e.__h.filter(function (e) { return !e.__ || k(e); })); } catch (n) { t.some(function (e) { e.__h && (e.__h = []); }), (t = []), s.options.__e(n, e.__v); } }), f && f(e, t); }), (s.options.unmount = function (e) { _ && _(e); var t, n = e.__c; n && n.__H && (n.__H.__.forEach(function (e) { try { O(e); } catch (e) { t = e; } }), (n.__H = void 0), t && s.options.__e(t, n.__v)); }); var M = "function" == typeof requestAnimationFrame; function P(e) { var t, n = function () { clearTimeout(r), M && cancelAnimationFrame(t), setTimeout(e); }, r = setTimeout(n, 100); M && (t = requestAnimationFrame(n)); } function O(e) { var t = i, n = e.__c; "function" == typeof n && ((e.__c = void 0), n()), (i = t); } function k(e) { var t = i; (e.__c = e.__()), (i = t); } function R(e, t) { return ( !e || e.length !== t.length || t.some(function (t, n) { return t !== e[n]; }) ); } function D(e, t) { return "function" == typeof t ? t(e) : t; } }, 10348: (e, t, n) => { "use strict"; n.r(t), n.d(t, { Fragment: () => r.Fragment, jsx: () => o, jsxDEV: () => o, jsxs: () => o }); var r = n(33847), i = 0; function o(e, t, n, o, a, s) { var u, l, c = {}; for (l in t) "ref" == l ? (u = t[l]) : (c[l] = t[l]); var d = { type: e, props: c, key: n, ref: u, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --i, __source: a, __self: s }; if ("function" == typeof e && (u = e.defaultProps)) for (l in u) void 0 === c[l] && (c[l] = u[l]); return r.options.vnode && r.options.vnode(d), d; } }, 1738: (e, t, n) => { var r; !(function (e) { !(function (t) { var r = "object" == typeof n.g ? n.g : "object" == typeof self ? self : "object" == typeof this ? this : Function("return this;")(), i = o(e); function o(e, t) { return function (n, r) { "function" != typeof e[n] && Object.defineProperty(e, n, { configurable: !0, writable: !0, value: r }), t && t(n, r); }; } void 0 === r.Reflect ? (r.Reflect = e) : (i = o(r.Reflect, i)), (function (e) { var t = Object.prototype.hasOwnProperty, n = "function" == typeof Symbol, r = n && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive", i = n && void 0 !== Symbol.iterator ? Symbol.iterator : "@@iterator", o = "function" == typeof Object.create, a = { __proto__: [] } instanceof Array, s = !o && !a, u = { create: o ? function () { return re(Object.create(null)); } : a ? function () { return re({ __proto__: null }); } : function () { return re({}); }, has: s ? function (e, n) { return t.call(e, n); } : function (e, t) { return t in e; }, get: s ? function (e, n) { return t.call(e, n) ? e[n] : void 0; } : function (e, t) { return e[t]; }, }, l = Object.getPrototypeOf(Function), c = "object" == typeof process && process.env && "true" === process.env.REFLECT_METADATA_USE_MAP_POLYFILL, d = c || "function" != typeof Map || "function" != typeof Map.prototype.entries ? ee() : Map, h = c || "function" != typeof Set || "function" != typeof Set.prototype.entries ? te() : Set, p = new (c || "function" != typeof WeakMap ? ne() : WeakMap)(); function f(e, t, n, r) { if (D(n)) { if (!Z(e)) throw new TypeError(); if (!Y(t)) throw new TypeError(); return T(e, t); } if (!Z(e)) throw new TypeError(); if (!F(t)) throw new TypeError(); if (!F(r) && !D(r) && !N(r)) throw new TypeError(); return N(r) && (r = void 0), x(e, t, (n = V(n)), r); } function _(e, t) { function n(n, r) { if (!F(n)) throw new TypeError(); if (!D(r) && !W(r)) throw new TypeError(); P(e, t, n, r); } return n; } function g(e, t, n, r) { if (!F(n)) throw new TypeError(); return D(r) || (r = V(r)), P(e, t, n, r); } function m(e, t, n) { if (!F(t)) throw new TypeError(); return D(n) || (n = V(n)), L(e, t, n); } function v(e, t, n) { if (!F(t)) throw new TypeError(); return D(n) || (n = V(n)), A(e, t, n); } function y(e, t, n) { if (!F(t)) throw new TypeError(); return D(n) || (n = V(n)), I(e, t, n); } function C(e, t, n) { if (!F(t)) throw new TypeError(); return D(n) || (n = V(n)), M(e, t, n); } function b(e, t) { if (!F(e)) throw new TypeError(); return D(t) || (t = V(t)), O(e, t); } function w(e, t) { if (!F(e)) throw new TypeError(); return D(t) || (t = V(t)), k(e, t); } function S(e, t, n) { if (!F(t)) throw new TypeError(); D(n) || (n = V(n)); var r = E(t, n, !1); if (D(r)) return !1; if (!r.delete(e)) return !1; if (r.size > 0) return !0; var i = p.get(t); return i.delete(n), i.size > 0 || p.delete(t), !0; } function T(e, t) { for (var n = e.length - 1; n >= 0; --n) { var r = (0, e[n])(t); if (!D(r) && !N(r)) { if (!Y(r)) throw new TypeError(); t = r; } } return t; } function x(e, t, n, r) { for (var i = e.length - 1; i >= 0; --i) { var o = (0, e[i])(t, n, r); if (!D(o) && !N(o)) { if (!F(o)) throw new TypeError(); r = o; } } return r; } function E(e, t, n) { var r = p.get(e); if (D(r)) { if (!n) return; (r = new d()), p.set(e, r); } var i = r.get(t); if (D(i)) { if (!n) return; (i = new d()), r.set(t, i); } return i; } function L(e, t, n) { if (A(e, t, n)) return !0; var r = Q(t); return !N(r) && L(e, r, n); } function A(e, t, n) { var r = E(t, n, !1); return !D(r) && G(r.has(e)); } function I(e, t, n) { if (A(e, t, n)) return M(e, t, n); var r = Q(t); return N(r) ? void 0 : I(e, r, n); } function M(e, t, n) { var r = E(t, n, !1); if (!D(r)) return r.get(e); } function P(e, t, n, r) { E(n, r, !0).set(e, t); } function O(e, t) { var n = k(e, t), r = Q(e); if (null === r) return n; var i = O(r, t); if (i.length <= 0) return n; if (n.length <= 0) return i; for (var o = new h(), a = [], s = 0, u = n; s < u.length; s++) { var l = u[s]; o.has(l) || (o.add(l), a.push(l)); } for (var c = 0, d = i; c < d.length; c++) { l = d[c]; o.has(l) || (o.add(l), a.push(l)); } return a; } function k(e, t) { var n = [], r = E(e, t, !1); if (D(r)) return n; for (var i = q(r.keys()), o = 0; ; ) { var a = $(i); if (!a) return (n.length = o), n; var s = K(a); try { n[o] = s; } catch (e) { try { J(i); } finally { throw e; } } o++; } } function R(e) { if (null === e) return 1; switch (typeof e) { case "undefined": return 0; case "boolean": return 2; case "string": return 3; case "symbol": return 4; case "number": return 5; case "object": return null === e ? 1 : 6; default: return 6; } } function D(e) { return void 0 === e; } function N(e) { return null === e; } function B(e) { return "symbol" == typeof e; } function F(e) { return "object" == typeof e ? null !== e : "function" == typeof e; } function U(e, t) { switch (R(e)) { case 0: case 1: case 2: case 3: case 4: case 5: return e; } var n = 3 === t ? "string" : 5 === t ? "number" : "default", i = X(e, r); if (void 0 !== i) { var o = i.call(e, n); if (F(o)) throw new TypeError(); return o; } return j(e, "default" === n ? "number" : n); } function j(e, t) { if ("string" === t) { var n = e.toString; if (z(n)) if (!F((i = n.call(e)))) return i; if (z((r = e.valueOf))) if (!F((i = r.call(e)))) return i; } else { var r; if (z((r = e.valueOf))) if (!F((i = r.call(e)))) return i; var i, o = e.toString; if (z(o)) if (!F((i = o.call(e)))) return i; } throw new TypeError(); } function G(e) { return !!e; } function H(e) { return "" + e; } function V(e) { var t = U(e, 3); return B(t) ? t : H(t); } function Z(e) { return Array.isArray ? Array.isArray(e) : e instanceof Object ? e instanceof Array : "[object Array]" === Object.prototype.toString.call(e); } function z(e) { return "function" == typeof e; } function Y(e) { return "function" == typeof e; } function W(e) { switch (R(e)) { case 3: case 4: return !0; default: return !1; } } function X(e, t) { var n = e[t]; if (null != n) { if (!z(n)) throw new TypeError(); return n; } } function q(e) { var t = X(e, i); if (!z(t)) throw new TypeError(); var n = t.call(e); if (!F(n)) throw new TypeError(); return n; } function K(e) { return e.value; } function $(e) { var t = e.next(); return !t.done && t; } function J(e) { var t = e.return; t && t.call(e); } function Q(e) { var t = Object.getPrototypeOf(e); if ("function" != typeof e || e === l) return t; if (t !== l) return t; var n = e.prototype, r = n && Object.getPrototypeOf(n); if (null == r || r === Object.prototype) return t; var i = r.constructor; return "function" != typeof i || i === e ? t : i; } function ee() { var e = {}, t = [], n = (function () { function e(e, t, n) { (this._index = 0), (this._keys = e), (this._values = t), (this._selector = n); } return ( (e.prototype["@@iterator"] = function () { return this; }), (e.prototype[i] = function () { return this; }), (e.prototype.next = function () { var e = this._index; if (e >= 0 && e < this._keys.length) { var n = this._selector(this._keys[e], this._values[e]); return e + 1 >= this._keys.length ? ((this._index = -1), (this._keys = t), (this._values = t)) : this._index++, { value: n, done: !1 }; } return { value: void 0, done: !0 }; }), (e.prototype.throw = function (e) { throw (this._index >= 0 && ((this._index = -1), (this._keys = t), (this._values = t)), e); }), (e.prototype.return = function (e) { return this._index >= 0 && ((this._index = -1), (this._keys = t), (this._values = t)), { value: e, done: !0 }; }), e ); })(); return (function () { function t() { (this._keys = []), (this._values = []), (this._cacheKey = e), (this._cacheIndex = -2); } return ( Object.defineProperty(t.prototype, "size", { get: function () { return this._keys.length; }, enumerable: !0, configurable: !0, }), (t.prototype.has = function (e) { return this._find(e, !1) >= 0; }), (t.prototype.get = function (e) { var t = this._find(e, !1); return t >= 0 ? this._values[t] : void 0; }), (t.prototype.set = function (e, t) { var n = this._find(e, !0); return (this._values[n] = t), this; }), (t.prototype.delete = function (t) { var n = this._find(t, !1); if (n >= 0) { for (var r = this._keys.length, i = n + 1; i < r; i++) (this._keys[i - 1] = this._keys[i]), (this._values[i - 1] = this._values[i]); return this._keys.length--, this._values.length--, t === this._cacheKey && ((this._cacheKey = e), (this._cacheIndex = -2)), !0; } return !1; }), (t.prototype.clear = function () { (this._keys.length = 0), (this._values.length = 0), (this._cacheKey = e), (this._cacheIndex = -2); }), (t.prototype.keys = function () { return new n(this._keys, this._values, r); }), (t.prototype.values = function () { return new n(this._keys, this._values, o); }), (t.prototype.entries = function () { return new n(this._keys, this._values, a); }), (t.prototype["@@iterator"] = function () { return this.entries(); }), (t.prototype[i] = function () { return this.entries(); }), (t.prototype._find = function (e, t) { return this._cacheKey !== e && (this._cacheIndex = this._keys.indexOf((this._cacheKey = e))), this._cacheIndex < 0 && t && ((this._cacheIndex = this._keys.length), this._keys.push(e), this._values.push(void 0)), this._cacheIndex; }), t ); })(); function r(e, t) { return e; } function o(e, t) { return t; } function a(e, t) { return [e, t]; } } function te() { return (function () { function e() { this._map = new d(); } return ( Object.defineProperty(e.prototype, "size", { get: function () { return this._map.size; }, enumerable: !0, configurable: !0, }), (e.prototype.has = function (e) { return this._map.has(e); }), (e.prototype.add = function (e) { return this._map.set(e, e), this; }), (e.prototype.delete = function (e) { return this._map.delete(e); }), (e.prototype.clear = function () { this._map.clear(); }), (e.prototype.keys = function () { return this._map.keys(); }), (e.prototype.values = function () { return this._map.values(); }), (e.prototype.entries = function () { return this._map.entries(); }), (e.prototype["@@iterator"] = function () { return this.keys(); }), (e.prototype[i] = function () { return this.keys(); }), e ); })(); } function ne() { var e = 16, n = u.create(), r = i(); return (function () { function e() { this._key = i(); } return ( (e.prototype.has = function (e) { var t = o(e, !1); return void 0 !== t && u.has(t, this._key); }), (e.prototype.get = function (e) { var t = o(e, !1); return void 0 !== t ? u.get(t, this._key) : void 0; }), (e.prototype.set = function (e, t) { return (o(e, !0)[this._key] = t), this; }), (e.prototype.delete = function (e) { var t = o(e, !1); return void 0 !== t && delete t[this._key]; }), (e.prototype.clear = function () { this._key = i(); }), e ); })(); function i() { var e; do { e = "@@WeakMap@@" + l(); } while (u.has(n, e)); return (n[e] = !0), e; } function o(e, n) { if (!t.call(e, r)) { if (!n) return; Object.defineProperty(e, r, { value: u.create() }); } return e[r]; } function a(e, t) { for (var n = 0; n < t; ++n) e[n] = (255 * Math.random()) | 0; return e; } function s(e) { return "function" == typeof Uint8Array ? ("undefined" != typeof crypto ? crypto.getRandomValues(new Uint8Array(e)) : "undefined" != typeof msCrypto ? msCrypto.getRandomValues(new Uint8Array(e)) : a(new Uint8Array(e), e)) : a(new Array(e), e); } function l() { var t = s(e); (t[6] = (79 & t[6]) | 64), (t[8] = (191 & t[8]) | 128); for (var n = "", r = 0; r < e; ++r) { var i = t[r]; (4 !== r && 6 !== r && 8 !== r) || (n += "-"), i < 16 && (n += "0"), (n += i.toString(16).toLowerCase()); } return n; } } function re(e) { return (e.__ = void 0), delete e.__, e; } e("decorate", f), e("metadata", _), e("defineMetadata", g), e("hasMetadata", m), e("hasOwnMetadata", v), e("getMetadata", y), e("getOwnMetadata", C), e("getMetadataKeys", b), e("getOwnMetadataKeys", w), e("deleteMetadata", S); })(i); })(); })(r || (r = {})); }, 74294: (e, t, n) => { "use strict"; var r = n(67286), i = n(62680), o = n(99500), a = r("%TypeError%"), s = r("%WeakMap%", !0), u = r("%Map%", !0), l = i("WeakMap.prototype.get", !0), c = i("WeakMap.prototype.set", !0), d = i("WeakMap.prototype.has", !0), h = i("Map.prototype.get", !0), p = i("Map.prototype.set", !0), f = i("Map.prototype.has", !0), _ = function (e, t) { for (var n, r = e; null !== (n = r.next); r = n) if (n.key === t) return (r.next = n.next), (n.next = e.next), (e.next = n), n; }; e.exports = function () { var e, t, n, r = { assert: function (e) { if (!r.has(e)) throw new a("Side channel does not contain " + o(e)); }, get: function (r) { if (s && r && ("object" == typeof r || "function" == typeof r)) { if (e) return l(e, r); } else if (u) { if (t) return h(t, r); } else if (n) return (function (e, t) { var n = _(e, t); return n && n.value; })(n, r); }, has: function (r) { if (s && r && ("object" == typeof r || "function" == typeof r)) { if (e) return d(e, r); } else if (u) { if (t) return f(t, r); } else if (n) return (function (e, t) { return !!_(e, t); })(n, r); return !1; }, set: function (r, i) { s && r && ("object" == typeof r || "function" == typeof r) ? (e || (e = new s()), c(e, r, i)) : u ? (t || (t = new u()), p(t, r, i)) : (n || (n = { key: {}, next: null }), (function (e, t, n) { var r = _(e, t); r ? (r.value = n) : (e.next = { key: t, next: e.next, value: n }); })(n, r, i)); }, }; return r; }; }, 45966: function (e, t, n) { e.exports = (function () { "use strict"; var e = function (e) { var t = e.id, n = e.viewBox, r = e.content; (this.id = t), (this.viewBox = n), (this.content = r); }; (e.prototype.stringify = function () { return this.content; }), (e.prototype.toString = function () { return this.stringify(); }), (e.prototype.destroy = function () { var e = this; ["id", "viewBox", "content"].forEach(function (t) { return delete e[t]; }); }); var t = function (e) { var t = !!document.importNode, n = new DOMParser().parseFromString(e, "image/svg+xml").documentElement; return t ? document.importNode(n, !0) : n; }; function r(e, t) { return e((t = { exports: {} }), t.exports), t.exports; } "undefined" != typeof window ? window : void 0 !== n.g ? n.g : "undefined" != typeof self && self; var i = r(function (e, t) { !(function (t, n) { e.exports = n(); })(0, function () { function e(e) { return e && "object" == typeof e && "[object RegExp]" !== Object.prototype.toString.call(e) && "[object Date]" !== Object.prototype.toString.call(e); } function t(e) { return Array.isArray(e) ? [] : {}; } function n(n, r) { return r && !0 === r.clone && e(n) ? o(t(n), n, r) : n; } function r(t, r, i) { var a = t.slice(); return ( r.forEach(function (r, s) { void 0 === a[s] ? (a[s] = n(r, i)) : e(r) ? (a[s] = o(t[s], r, i)) : -1 === t.indexOf(r) && a.push(n(r, i)); }), a ); } function i(t, r, i) { var a = {}; return ( e(t) && Object.keys(t).forEach(function (e) { a[e] = n(t[e], i); }), Object.keys(r).forEach(function (s) { e(r[s]) && t[s] ? (a[s] = o(t[s], r[s], i)) : (a[s] = n(r[s], i)); }), a ); } function o(e, t, o) { var a = Array.isArray(t), s = (o || { arrayMerge: r }).arrayMerge || r; return a ? (Array.isArray(e) ? s(e, t, o) : n(t, o)) : i(e, t, o); } return ( (o.all = function (e, t) { if (!Array.isArray(e) || e.length < 2) throw new Error("first argument should be an array with at least two elements"); return e.reduce(function (e, n) { return o(e, n, t); }); }), o ); }); }), o = r(function (e, t) { var n = { svg: { name: "xmlns", uri: "http://www.w3.org/2000/svg" }, xlink: { name: "xmlns:xlink", uri: "http://www.w3.org/1999/xlink" } }; (t.default = n), (e.exports = t.default); }), a = function (e) { return Object.keys(e) .map(function (t) { return t + '="' + e[t].toString().replace(/"/g, """) + '"'; }) .join(" "); }, s = o.svg, u = o.xlink, l = {}; (l[s.name] = s.uri), (l[u.name] = u.uri); var c = function (e, t) { void 0 === e && (e = ""); var n = i(l, t || {}); return "" + e + ""; }, d = (function (e) { function n() { e.apply(this, arguments); } e && (n.__proto__ = e), (n.prototype = Object.create(e && e.prototype)), (n.prototype.constructor = n); var r = { isMounted: {} }; return ( (r.isMounted.get = function () { return !!this.node; }), (n.createFromExistingNode = function (e) { return new n({ id: e.getAttribute("id"), viewBox: e.getAttribute("viewBox"), content: e.outerHTML }); }), (n.prototype.destroy = function () { this.isMounted && this.unmount(), e.prototype.destroy.call(this); }), (n.prototype.mount = function (e) { if (this.isMounted) return this.node; var t = "string" == typeof e ? document.querySelector(e) : e, n = this.render(); return (this.node = n), t.appendChild(n), n; }), (n.prototype.render = function () { var e = this.stringify(); return t(c(e)).childNodes[0]; }), (n.prototype.unmount = function () { this.node.parentNode.removeChild(this.node); }), Object.defineProperties(n.prototype, r), n ); })(e); return d; })(); }, 55883: (e) => { e.exports = ''; }, 1569: (e) => { e.exports = ''; }, 58986: (e) => { e.exports = ''; }, 76533: (e) => { e.exports = ''; }, 29177: (e) => { e.exports = ''; }, 89352: (e) => { e.exports = ''; }, 5480: (e) => { e.exports = ''; }, 38006: (e) => { e.exports = ''; }, 19423: (e) => { e.exports = ''; }, 37543: (e) => { e.exports = ''; }, 91112: (e) => { e.exports = ''; }, 8541: (e) => { e.exports = ''; }, 11575: (e) => { e.exports = ''; }, 19666: (e) => { e.exports = ''; }, 46015: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "popup-lose", use: "popup-lose-usage", viewBox: "0 0 592 565", content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 88937: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "popup-win-cup", use: "popup-win-cup-usage", viewBox: "0 0 608 590", content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 24071: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "win-rays", use: "win-rays-usage", viewBox: "0 0 886 1270", content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 752: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "win-stars", use: "win-stars-usage", viewBox: "0 0 698 555", content: '\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 12022: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "back-button-icon", use: "back-button-icon-usage", viewBox: "0 0 39 60", content: '\n\n' }); a().add(s); const u = s; }, 74983: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "offline-earnings-icon", use: "offline-earnings-icon-usage", viewBox: "0 0 51 92", content: '\n\n\n\n\n' }); a().add(s); const u = s; }, 87018: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "produce-speed-icon", use: "produce-speed-icon-usage", viewBox: "0 0 63 93", content: '\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 26398: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "produce-speed-image", use: "produce-speed-image-usage", viewBox: "0 0 172 115", content: '\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 42152: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "start-units-icon", use: "start-units-icon-usage", viewBox: "0 0 55 93", content: '\n\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 12766: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "start-units-image", use: "start-units-image-usage", viewBox: "0 0 142 123", content: '\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 74817: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "cancel-icon", use: "cancel-icon-usage", viewBox: "0 0 66 64", content: '\n\n' }); a().add(s); const u = s; }, 93364: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "confirm-icon", use: "confirm-icon-usage", viewBox: "0 0 82 58", content: '\n\n' }); a().add(s); const u = s; }, 46136: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "laederboard-cup-icon", use: "laederboard-cup-icon-usage", viewBox: "0 0 47 33", content: '\n\n' }); a().add(s); const u = s; }, 49654: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "leaderboard-play-icon", use: "leaderboard-play-icon-usage", viewBox: "0 0 72 90", content: '\n\n\n' }); a().add(s); const u = s; }, 84784: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "money-icon", use: "money-icon-usage", viewBox: "0 0 82 82", content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 81797: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "music-icon", use: "music-icon-usage", viewBox: "0 0 114 111", content: '\n\n' }); a().add(s); const u = s; }, 99498: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "no-ads-icon", use: "no-ads-icon-usage", viewBox: "0 0 110 110", content: '\n\n\n\n' }); a().add(s); const u = s; }, 98656: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "offline-earnings", use: "offline-earnings-usage", viewBox: "0 0 361 349", content: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' }); a().add(s); const u = s; }, 82595: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "settings-icon", use: "settings-icon-usage", viewBox: "0 0 122 122", content: '\n\n\n' }); a().add(s); const u = s; }, 2823: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "shop-icon", use: "shop-icon-usage", viewBox: "0 0 108 108", content: '\n\n' }); a().add(s); const u = s; }, 92483: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "sound-icon", use: "sound-icon-usage", viewBox: "0 0 114 87", content: '\n\n' }); a().add(s); const u = s; }, 95880: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "vibrate-icon", use: "vibrate-icon-usage", viewBox: "0 0 114 85", content: '\n\n' }); a().add(s); const u = s; }, 85681: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "victory-framing", use: "victory-framing-usage", viewBox: "0 0 222 181", content: '\n \n \n' }); a().add(s); const u = s; }, 57937: (e, t, n) => { "use strict"; n.r(t), n.d(t, { default: () => u }); var r = n(45966), i = n.n(r), o = n(10045), a = n.n(o), s = new (i())({ id: "video_ad-icon", use: "video_ad-icon-usage", viewBox: "0 0 79 57", content: '\n\n' }); a().add(s); const u = s; }, 10045: function (e, t, n) { e.exports = (function () { "use strict"; function e(e, t) { return e((t = { exports: {} }), t.exports), t.exports; } "undefined" != typeof window ? window : void 0 !== n.g ? n.g : "undefined" != typeof self && self; var t = e(function (e, t) { !(function (t, n) { e.exports = n(); })(0, function () { function e(e) { return e && "object" == typeof e && "[object RegExp]" !== Object.prototype.toString.call(e) && "[object Date]" !== Object.prototype.toString.call(e); } function t(e) { return Array.isArray(e) ? [] : {}; } function n(n, r) { return r && !0 === r.clone && e(n) ? o(t(n), n, r) : n; } function r(t, r, i) { var a = t.slice(); return ( r.forEach(function (r, s) { void 0 === a[s] ? (a[s] = n(r, i)) : e(r) ? (a[s] = o(t[s], r, i)) : -1 === t.indexOf(r) && a.push(n(r, i)); }), a ); } function i(t, r, i) { var a = {}; return ( e(t) && Object.keys(t).forEach(function (e) { a[e] = n(t[e], i); }), Object.keys(r).forEach(function (s) { e(r[s]) && t[s] ? (a[s] = o(t[s], r[s], i)) : (a[s] = n(r[s], i)); }), a ); } function o(e, t, o) { var a = Array.isArray(t), s = (o || { arrayMerge: r }).arrayMerge || r; return a ? (Array.isArray(e) ? s(e, t, o) : n(t, o)) : i(e, t, o); } return ( (o.all = function (e, t) { if (!Array.isArray(e) || e.length < 2) throw new Error("first argument should be an array with at least two elements"); return e.reduce(function (e, n) { return o(e, n, t); }); }), o ); }); }); function r(e) { return ( (e = e || Object.create(null)), { on: function (t, n) { (e[t] || (e[t] = [])).push(n); }, off: function (t, n) { e[t] && e[t].splice(e[t].indexOf(n) >>> 0, 1); }, emit: function (t, n) { (e[t] || []).map(function (e) { e(n); }), (e["*"] || []).map(function (e) { e(t, n); }); }, } ); } var i = e(function (e, t) { var n = { svg: { name: "xmlns", uri: "http://www.w3.org/2000/svg" }, xlink: { name: "xmlns:xlink", uri: "http://www.w3.org/1999/xlink" } }; (t.default = n), (e.exports = t.default); }), o = function (e) { return Object.keys(e) .map(function (t) { return t + '="' + e[t].toString().replace(/"/g, """) + '"'; }) .join(" "); }, a = i.svg, s = i.xlink, u = {}; (u[a.name] = a.uri), (u[s.name] = s.uri); var l, c = function (e, n) { void 0 === e && (e = ""); var r = t(u, n || {}); return "" + e + ""; }, d = i.svg, h = i.xlink, p = { attrs: ((l = { style: ["position: absolute", "width: 0", "height: 0"].join("; "), "aria-hidden": "true" }), (l[d.name] = d.uri), (l[h.name] = h.uri), l) }, f = function (e) { (this.config = t(p, e || {})), (this.symbols = []); }; (f.prototype.add = function (e) { var t = this.symbols, n = this.find(e.id); return n ? ((t[t.indexOf(n)] = e), !1) : (t.push(e), !0); }), (f.prototype.remove = function (e) { var t = this.symbols, n = this.find(e); return !!n && (t.splice(t.indexOf(n), 1), n.destroy(), !0); }), (f.prototype.find = function (e) { return ( this.symbols.filter(function (t) { return t.id === e; })[0] || null ); }), (f.prototype.has = function (e) { return null !== this.find(e); }), (f.prototype.stringify = function () { var e = this.config.attrs, t = this.symbols .map(function (e) { return e.stringify(); }) .join(""); return c(t, e); }), (f.prototype.toString = function () { return this.stringify(); }), (f.prototype.destroy = function () { this.symbols.forEach(function (e) { return e.destroy(); }); }); var _ = function (e) { var t = e.id, n = e.viewBox, r = e.content; (this.id = t), (this.viewBox = n), (this.content = r); }; (_.prototype.stringify = function () { return this.content; }), (_.prototype.toString = function () { return this.stringify(); }), (_.prototype.destroy = function () { var e = this; ["id", "viewBox", "content"].forEach(function (t) { return delete e[t]; }); }); var g = function (e) { var t = !!document.importNode, n = new DOMParser().parseFromString(e, "image/svg+xml").documentElement; return t ? document.importNode(n, !0) : n; }, m = (function (e) { function t() { e.apply(this, arguments); } e && (t.__proto__ = e), (t.prototype = Object.create(e && e.prototype)), (t.prototype.constructor = t); var n = { isMounted: {} }; return ( (n.isMounted.get = function () { return !!this.node; }), (t.createFromExistingNode = function (e) { return new t({ id: e.getAttribute("id"), viewBox: e.getAttribute("viewBox"), content: e.outerHTML }); }), (t.prototype.destroy = function () { this.isMounted && this.unmount(), e.prototype.destroy.call(this); }), (t.prototype.mount = function (e) { if (this.isMounted) return this.node; var t = "string" == typeof e ? document.querySelector(e) : e, n = this.render(); return (this.node = n), t.appendChild(n), n; }), (t.prototype.render = function () { var e = this.stringify(); return g(c(e)).childNodes[0]; }), (t.prototype.unmount = function () { this.node.parentNode.removeChild(this.node); }), Object.defineProperties(t.prototype, n), t ); })(_), v = { autoConfigure: !0, mountTo: "body", syncUrlsWithBaseTag: !1, listenLocationChangeEvent: !0, locationChangeEvent: "locationChange", locationChangeAngularEmitter: !1, usagesToUpdate: "use[*|href]", moveGradientsOutsideSymbol: !1 }, y = function (e) { return Array.prototype.slice.call(e, 0); }, C = { isChrome: function () { return /chrome/i.test(navigator.userAgent); }, isFirefox: function () { return /firefox/i.test(navigator.userAgent); }, isIE: function () { return /msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent); }, isEdge: function () { return /edge/i.test(navigator.userAgent); }, }, b = function (e, t) { var n = document.createEvent("CustomEvent"); n.initCustomEvent(e, !1, !1, t), window.dispatchEvent(n); }, w = function (e) { var t = []; return ( y(e.querySelectorAll("style")).forEach(function (e) { (e.textContent += ""), t.push(e); }), t ); }, S = function (e) { return (e || window.location.href).split("#")[0]; }, T = function (e) { angular.module("ng").run([ "$rootScope", function (t) { t.$on("$locationChangeSuccess", function (t, n, r) { b(e, { oldUrl: r, newUrl: n }); }); }, ]); }, x = "linearGradient, radialGradient, pattern, mask, clipPath", E = function (e, t) { return ( void 0 === t && (t = x), y(e.querySelectorAll("symbol")).forEach(function (e) { y(e.querySelectorAll(t)).forEach(function (t) { e.parentNode.insertBefore(t, e); }); }), e ); }; function L(e, t) { return y(e).reduce(function (e, n) { if (!n.attributes) return e; var r = y(n.attributes), i = t ? r.filter(t) : r; return e.concat(i); }, []); } var A = i.xlink.uri, I = "xlink:href", M = /[{}|\\\^\[\]`"<>]/g; function P(e) { return e.replace(M, function (e) { return "%" + e[0].charCodeAt(0).toString(16).toUpperCase(); }); } function O(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function k(e, t, n) { return ( y(e).forEach(function (e) { var r = e.getAttribute(I); if (r && 0 === r.indexOf(t)) { var i = r.replace(t, n); e.setAttributeNS(A, I, i); } }), e ); } var R, D = ["clipPath", "colorProfile", "src", "cursor", "fill", "filter", "marker", "markerStart", "markerMid", "markerEnd", "mask", "stroke", "style"], N = D.map(function (e) { return "[" + e + "]"; }).join(","), B = function (e, t, n, r) { var i = P(n), o = P(r); L(e.querySelectorAll(N), function (e) { var t = e.localName, n = e.value; return -1 !== D.indexOf(t) && -1 !== n.indexOf("url(" + i); }).forEach(function (e) { return (e.value = e.value.replace(new RegExp(O(i), "g"), o)); }), k(t, i, o); }, F = { MOUNT: "mount", SYMBOL_MOUNT: "symbol_mount" }, U = (function (e) { function n(n) { var i = this; void 0 === n && (n = {}), e.call(this, t(v, n)); var o = r(); (this._emitter = o), (this.node = null); var a = this.config; if ((a.autoConfigure && this._autoConfigure(n), a.syncUrlsWithBaseTag)) { var s = document.getElementsByTagName("base")[0].getAttribute("href"); o.on(F.MOUNT, function () { return i.updateUrls("#", s); }); } var u = this._handleLocationChange.bind(this); (this._handleLocationChange = u), a.listenLocationChangeEvent && window.addEventListener(a.locationChangeEvent, u), a.locationChangeAngularEmitter && T(a.locationChangeEvent), o.on(F.MOUNT, function (e) { a.moveGradientsOutsideSymbol && E(e); }), o.on(F.SYMBOL_MOUNT, function (e) { a.moveGradientsOutsideSymbol && E(e.parentNode), (C.isIE() || C.isEdge()) && w(e); }); } e && (n.__proto__ = e), (n.prototype = Object.create(e && e.prototype)), (n.prototype.constructor = n); var i = { isMounted: {} }; return ( (i.isMounted.get = function () { return !!this.node; }), (n.prototype._autoConfigure = function (e) { var t = this.config; void 0 === e.syncUrlsWithBaseTag && (t.syncUrlsWithBaseTag = void 0 !== document.getElementsByTagName("base")[0]), void 0 === e.locationChangeAngularEmitter && (t.locationChangeAngularEmitter = void 0 !== window.angular), void 0 === e.moveGradientsOutsideSymbol && (t.moveGradientsOutsideSymbol = C.isFirefox()); }), (n.prototype._handleLocationChange = function (e) { var t = e.detail, n = t.oldUrl, r = t.newUrl; this.updateUrls(n, r); }), (n.prototype.add = function (t) { var n = this, r = e.prototype.add.call(this, t); return this.isMounted && r && (t.mount(n.node), this._emitter.emit(F.SYMBOL_MOUNT, t.node)), r; }), (n.prototype.attach = function (e) { var t = this, n = this; if (n.isMounted) return n.node; var r = "string" == typeof e ? document.querySelector(e) : e; return ( (n.node = r), this.symbols.forEach(function (e) { e.mount(n.node), t._emitter.emit(F.SYMBOL_MOUNT, e.node); }), y(r.querySelectorAll("symbol")).forEach(function (e) { var t = m.createFromExistingNode(e); (t.node = e), n.add(t); }), this._emitter.emit(F.MOUNT, r), r ); }), (n.prototype.destroy = function () { var e = this, t = e.config, n = e.symbols, r = e._emitter; n.forEach(function (e) { return e.destroy(); }), r.off("*"), window.removeEventListener(t.locationChangeEvent, this._handleLocationChange), this.isMounted && this.unmount(); }), (n.prototype.mount = function (e, t) { void 0 === e && (e = this.config.mountTo), void 0 === t && (t = !1); var n = this; if (n.isMounted) return n.node; var r = "string" == typeof e ? document.querySelector(e) : e, i = n.render(); return (this.node = i), t && r.childNodes[0] ? r.insertBefore(i, r.childNodes[0]) : r.appendChild(i), this._emitter.emit(F.MOUNT, i), i; }), (n.prototype.render = function () { return g(this.stringify()); }), (n.prototype.unmount = function () { this.node.parentNode.removeChild(this.node); }), (n.prototype.updateUrls = function (e, t) { if (!this.isMounted) return !1; var n = document.querySelectorAll(this.config.usagesToUpdate); return B(this.node, n, S(e) + "#", S(t) + "#"), !0; }), Object.defineProperties(n.prototype, i), n ); })(f), j = e(function (e) { var t; (t = function () { var e, t = [], n = document, r = n.documentElement.doScroll, i = "DOMContentLoaded", o = (r ? /^loaded|^c/ : /^loaded|^i|^c/).test(n.readyState); return ( o || n.addEventListener( i, (e = function () { for (n.removeEventListener(i, e), o = 1; (e = t.shift()); ) e(); }) ), function (e) { o ? setTimeout(e, 0) : t.push(e); } ); }), (e.exports = t()); }), G = "__SVG_SPRITE_NODE__", H = "__SVG_SPRITE__"; window[H] ? (R = window[H]) : ((R = new U({ attrs: { id: G, "aria-hidden": "true" } })), (window[H] = R)); var V = function () { var e = document.getElementById(G); e ? R.attach(e) : R.mount(document.body, !0); }; return document.body ? V() : j(V), R; })(); }, 13758: (e, t, n) => { "use strict"; e.exports = n(94146); }, 85560: (e) => { "use strict"; var t = 2 * Math.PI; function n(e, t, n, r) { var i = e * n + t * r; return i > 1 && (i = 1), i < -1 && (i = -1), (e * r - t * n < 0 ? -1 : 1) * Math.acos(i); } function r(e, t) { var n = (4 / 3) * Math.tan(t / 4), r = Math.cos(e), i = Math.sin(e), o = Math.cos(e + t), a = Math.sin(e + t); return [r, i, r - i * n, i + r * n, o + a * n, a - o * n, o, a]; } e.exports = function (e, i, o, a, s, u, l, c, d) { var h = Math.sin((d * t) / 360), p = Math.cos((d * t) / 360), f = (p * (e - o)) / 2 + (h * (i - a)) / 2, _ = (-h * (e - o)) / 2 + (p * (i - a)) / 2; if (0 === f && 0 === _) return []; if (0 === l || 0 === c) return []; (l = Math.abs(l)), (c = Math.abs(c)); var g = (f * f) / (l * l) + (_ * _) / (c * c); g > 1 && ((l *= Math.sqrt(g)), (c *= Math.sqrt(g))); var m = (function (e, r, i, o, a, s, u, l, c, d) { var h = (d * (e - i)) / 2 + (c * (r - o)) / 2, p = (-c * (e - i)) / 2 + (d * (r - o)) / 2, f = u * u, _ = l * l, g = h * h, m = p * p, v = f * _ - f * m - _ * g; v < 0 && (v = 0), (v /= f * m + _ * g); var y = (((v = Math.sqrt(v) * (a === s ? -1 : 1)) * u) / l) * p, C = ((v * -l) / u) * h, b = d * y - c * C + (e + i) / 2, w = c * y + d * C + (r + o) / 2, S = (h - y) / u, T = (p - C) / l, x = (-h - y) / u, E = (-p - C) / l, L = n(1, 0, S, T), A = n(S, T, x, E); return 0 === s && A > 0 && (A -= t), 1 === s && A < 0 && (A += t), [b, w, L, A]; })(e, i, o, a, s, u, l, c, h, p), v = [], y = m[2], C = m[3], b = Math.max(Math.ceil(Math.abs(C) / (t / 4)), 1); C /= b; for (var w = 0; w < b; w++) v.push(r(y, C)), (y += C); return v.map(function (e) { for (var t = 0; t < e.length; t += 2) { var n = e[t + 0], r = e[t + 1], i = p * (n *= l) - h * (r *= c), o = h * n + p * r; (e[t + 0] = i + m[0]), (e[t + 1] = o + m[1]); } return e; }); }; }, 40714: (e) => { "use strict"; var t = 1e-10, n = Math.PI / 180; function r(e, t, n) { if (!(this instanceof r)) return new r(e, t, n); (this.rx = e), (this.ry = t), (this.ax = n); } (r.prototype.transform = function (e) { var r = Math.cos(this.ax * n), i = Math.sin(this.ax * n), o = [this.rx * (e[0] * r + e[2] * i), this.rx * (e[1] * r + e[3] * i), this.ry * (-e[0] * i + e[2] * r), this.ry * (-e[1] * i + e[3] * r)], a = o[0] * o[0] + o[2] * o[2], s = o[1] * o[1] + o[3] * o[3], u = ((o[0] - o[3]) * (o[0] - o[3]) + (o[2] + o[1]) * (o[2] + o[1])) * ((o[0] + o[3]) * (o[0] + o[3]) + (o[2] - o[1]) * (o[2] - o[1])), l = (a + s) / 2; if (u < t * l) return (this.rx = this.ry = Math.sqrt(l)), (this.ax = 0), this; var c = o[0] * o[1] + o[2] * o[3], d = l + (u = Math.sqrt(u)) / 2, h = l - u / 2; return (this.ax = Math.abs(c) < t && Math.abs(d - s) < t ? 90 : (180 * Math.atan(Math.abs(c) > Math.abs(d - s) ? (d - a) / c : c / (d - s))) / Math.PI), this.ax >= 0 ? ((this.rx = Math.sqrt(d)), (this.ry = Math.sqrt(h))) : ((this.ax += 90), (this.rx = Math.sqrt(h)), (this.ry = Math.sqrt(d))), this; }), (r.prototype.isDegenerate = function () { return this.rx < t * this.ry || this.ry < t * this.rx; }), (e.exports = r); }, 3156: (e) => { "use strict"; function t() { if (!(this instanceof t)) return new t(); (this.queue = []), (this.cache = null); } (t.prototype.matrix = function (e) { return (1 === e[0] && 0 === e[1] && 0 === e[2] && 1 === e[3] && 0 === e[4] && 0 === e[5]) || ((this.cache = null), this.queue.push(e)), this; }), (t.prototype.translate = function (e, t) { return (0 === e && 0 === t) || ((this.cache = null), this.queue.push([1, 0, 0, 1, e, t])), this; }), (t.prototype.scale = function (e, t) { return (1 === e && 1 === t) || ((this.cache = null), this.queue.push([e, 0, 0, t, 0, 0])), this; }), (t.prototype.rotate = function (e, t, n) { var r, i, o; return 0 !== e && (this.translate(t, n), (r = (e * Math.PI) / 180), (i = Math.cos(r)), (o = Math.sin(r)), this.queue.push([i, o, -o, i, 0, 0]), (this.cache = null), this.translate(-t, -n)), this; }), (t.prototype.skewX = function (e) { return 0 !== e && ((this.cache = null), this.queue.push([1, 0, Math.tan((e * Math.PI) / 180), 1, 0, 0])), this; }), (t.prototype.skewY = function (e) { return 0 !== e && ((this.cache = null), this.queue.push([1, Math.tan((e * Math.PI) / 180), 0, 1, 0, 0])), this; }), (t.prototype.toArray = function () { if (this.cache) return this.cache; if (!this.queue.length) return (this.cache = [1, 0, 0, 1, 0, 0]), this.cache; if (((this.cache = this.queue[0]), 1 === this.queue.length)) return this.cache; for (var e = 1; e < this.queue.length; e++) this.cache = ((t = this.cache), (n = this.queue[e]), [t[0] * n[0] + t[2] * n[1], t[1] * n[0] + t[3] * n[1], t[0] * n[2] + t[2] * n[3], t[1] * n[2] + t[3] * n[3], t[0] * n[4] + t[2] * n[5] + t[4], t[1] * n[4] + t[3] * n[5] + t[5]]); var t, n; return this.cache; }), (t.prototype.calc = function (e, t, n) { var r; return this.queue.length ? (this.cache || (this.cache = this.toArray()), [e * (r = this.cache)[0] + t * r[2] + (n ? 0 : r[4]), e * r[1] + t * r[3] + (n ? 0 : r[5])]) : [e, t]; }), (e.exports = t); }, 32037: (e) => { "use strict"; var t = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, n = [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279]; function r(e) { return e >= 48 && e <= 57; } function i(e) { return (e >= 48 && e <= 57) || 43 === e || 45 === e || 46 === e; } function o(e) { (this.index = 0), (this.path = e), (this.max = e.length), (this.result = []), (this.param = 0), (this.err = ""), (this.segmentStart = 0), (this.data = []); } function a(e) { for (; e.index < e.max && (10 === (t = e.path.charCodeAt(e.index)) || 13 === t || 8232 === t || 8233 === t || 32 === t || 9 === t || 11 === t || 12 === t || 160 === t || (t >= 5760 && n.indexOf(t) >= 0)); ) e.index++; var t; } function s(e) { var t = e.path.charCodeAt(e.index); return 48 === t ? ((e.param = 0), void e.index++) : 49 === t ? ((e.param = 1), void e.index++) : void (e.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + e.index + ")"); } function u(e) { var t, n = e.index, i = n, o = e.max, a = !1, s = !1, u = !1, l = !1; if (i >= o) e.err = "SvgPath: missed param (at pos " + i + ")"; else if (((43 !== (t = e.path.charCodeAt(i)) && 45 !== t) || (t = ++i < o ? e.path.charCodeAt(i) : 0), r(t) || 46 === t)) { if (46 !== t) { if (((a = 48 === t), (t = ++i < o ? e.path.charCodeAt(i) : 0), a && i < o && t && r(t))) return void (e.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + n + ")"); for (; i < o && r(e.path.charCodeAt(i)); ) i++, (s = !0); t = i < o ? e.path.charCodeAt(i) : 0; } if (46 === t) { for (l = !0, i++; r(e.path.charCodeAt(i)); ) i++, (u = !0); t = i < o ? e.path.charCodeAt(i) : 0; } if (101 === t || 69 === t) { if (l && !s && !u) return void (e.err = "SvgPath: invalid float exponent (at pos " + i + ")"); if (((43 !== (t = ++i < o ? e.path.charCodeAt(i) : 0) && 45 !== t) || i++, !(i < o && r(e.path.charCodeAt(i))))) return void (e.err = "SvgPath: invalid float exponent (at pos " + i + ")"); for (; i < o && r(e.path.charCodeAt(i)); ) i++; } (e.index = i), (e.param = parseFloat(e.path.slice(n, i)) + 0); } else e.err = "SvgPath: param should start with 0..9 or `.` (at pos " + i + ")"; } function l(e) { var n, r; r = (n = e.path[e.segmentStart]).toLowerCase(); var i = e.data; if (("m" === r && i.length > 2 && (e.result.push([n, i[0], i[1]]), (i = i.slice(2)), (r = "l"), (n = "m" === n ? "l" : "L")), "r" === r)) e.result.push([n].concat(i)); else for (; i.length >= t[r] && (e.result.push([n].concat(i.splice(0, t[r]))), t[r]); ); } function c(e) { var n, r, o, c, d, h = e.max; if ( ((e.segmentStart = e.index), (n = e.path.charCodeAt(e.index)), (r = 97 == (32 | n)), (function (e) { switch (32 | e) { case 109: case 122: case 108: case 104: case 118: case 99: case 115: case 113: case 116: case 97: case 114: return !0; } return !1; })(n)) ) if (((c = t[e.path[e.index].toLowerCase()]), e.index++, a(e), (e.data = []), c)) { for (o = !1; ; ) { for (d = c; d > 0; d--) { if ((!r || (3 !== d && 4 !== d) ? u(e) : s(e), e.err.length)) return void l(e); e.data.push(e.param), a(e), (o = !1), e.index < h && 44 === e.path.charCodeAt(e.index) && (e.index++, a(e), (o = !0)); } if (!o) { if (e.index >= e.max) break; if (!i(e.path.charCodeAt(e.index))) break; } } l(e); } else l(e); else e.err = "SvgPath: bad command " + e.path[e.index] + " (at pos " + e.index + ")"; } e.exports = function (e) { var t = new o(e), n = t.max; for (a(t); t.index < n && !t.err.length; ) c(t); return t.result.length && ("mM".indexOf(t.result[0][0]) < 0 ? ((t.err = "SvgPath: string should start with `M` or `m`"), (t.result = [])) : (t.result[0][0] = "M")), { err: t.err, segments: t.result }; }; }, 94146: (e, t, n) => { "use strict"; var r = n(32037), i = n(48391), o = n(3156), a = n(85560), s = n(40714); function u(e) { if (!(this instanceof u)) return new u(e); var t = r(e); (this.segments = t.segments), (this.err = t.err), (this.__stack = []); } (u.from = function (e) { if ("string" == typeof e) return new u(e); if (e instanceof u) { var t = new u(""); return ( (t.err = e.err), (t.segments = e.segments.map(function (e) { return e.slice(); })), (t.__stack = e.__stack.map(function (e) { return o().matrix(e.toArray()); })), t ); } throw new Error("SvgPath.from: invalid param type " + e); }), (u.prototype.__matrix = function (e) { var t, n = this; e.queue.length && this.iterate(function (r, i, o, a) { var u, l, c, d; switch (r[0]) { case "v": l = 0 === (u = e.calc(0, r[1], !0))[0] ? ["v", u[1]] : ["l", u[0], u[1]]; break; case "V": l = (u = e.calc(o, r[1], !1))[0] === e.calc(o, a, !1)[0] ? ["V", u[1]] : ["L", u[0], u[1]]; break; case "h": l = 0 === (u = e.calc(r[1], 0, !0))[1] ? ["h", u[0]] : ["l", u[0], u[1]]; break; case "H": l = (u = e.calc(r[1], a, !1))[1] === e.calc(o, a, !1)[1] ? ["H", u[0]] : ["L", u[0], u[1]]; break; case "a": case "A": var h = e.toArray(), p = s(r[1], r[2], r[3]).transform(h); if ((h[0] * h[3] - h[1] * h[2] < 0 && (r[5] = r[5] ? "0" : "1"), (u = e.calc(r[6], r[7], "a" === r[0])), ("A" === r[0] && r[6] === o && r[7] === a) || ("a" === r[0] && 0 === r[6] && 0 === r[7]))) { l = ["a" === r[0] ? "l" : "L", u[0], u[1]]; break; } l = p.isDegenerate() ? ["a" === r[0] ? "l" : "L", u[0], u[1]] : [r[0], p.rx, p.ry, p.ax, r[4], r[5], u[0], u[1]]; break; case "m": (d = i > 0), (l = ["m", (u = e.calc(r[1], r[2], d))[0], u[1]]); break; default: for (l = [(c = r[0])], d = c.toLowerCase() === c, t = 1; t < r.length; t += 2) (u = e.calc(r[t], r[t + 1], d)), l.push(u[0], u[1]); } n.segments[i] = l; }, !0); }), (u.prototype.__evaluateStack = function () { var e, t; if (this.__stack.length) { if (1 === this.__stack.length) return this.__matrix(this.__stack[0]), void (this.__stack = []); for (e = o(), t = this.__stack.length; --t >= 0; ) e.matrix(this.__stack[t].toArray()); this.__matrix(e), (this.__stack = []); } }), (u.prototype.toString = function () { var e = "", t = "", n = !1; this.__evaluateStack(); for (var r = 0, i = this.segments.length; r < i; r++) { var o = this.segments[r], a = o[0]; a !== t || "m" === a || "M" === a ? ("m" === a && "z" === t && (e += " "), (e += a), (n = !1)) : (n = !0); for (var s = 1; s < o.length; s++) { var u = o[s]; 1 === s ? n && u >= 0 && (e += " ") : u >= 0 && (e += " "), (e += u); } t = a; } return e; }), (u.prototype.translate = function (e, t) { return this.__stack.push(o().translate(e, t || 0)), this; }), (u.prototype.scale = function (e, t) { return this.__stack.push(o().scale(e, t || 0 === t ? t : e)), this; }), (u.prototype.rotate = function (e, t, n) { return this.__stack.push(o().rotate(e, t || 0, n || 0)), this; }), (u.prototype.skewX = function (e) { return this.__stack.push(o().skewX(e)), this; }), (u.prototype.skewY = function (e) { return this.__stack.push(o().skewY(e)), this; }), (u.prototype.matrix = function (e) { return this.__stack.push(o().matrix(e)), this; }), (u.prototype.transform = function (e) { return e.trim() ? (this.__stack.push(i(e)), this) : this; }), (u.prototype.round = function (e) { var t, n = 0, r = 0, i = 0, o = 0; return ( (e = e || 0), this.__evaluateStack(), this.segments.forEach(function (a) { var s = a[0].toLowerCase() === a[0]; switch (a[0]) { case "H": case "h": return s && (a[1] += i), (i = a[1] - a[1].toFixed(e)), void (a[1] = +a[1].toFixed(e)); case "V": case "v": return s && (a[1] += o), (o = a[1] - a[1].toFixed(e)), void (a[1] = +a[1].toFixed(e)); case "Z": case "z": return (i = n), void (o = r); case "M": case "m": return s && ((a[1] += i), (a[2] += o)), (i = a[1] - a[1].toFixed(e)), (o = a[2] - a[2].toFixed(e)), (n = i), (r = o), (a[1] = +a[1].toFixed(e)), void (a[2] = +a[2].toFixed(e)); case "A": case "a": return s && ((a[6] += i), (a[7] += o)), (i = a[6] - a[6].toFixed(e)), (o = a[7] - a[7].toFixed(e)), (a[1] = +a[1].toFixed(e)), (a[2] = +a[2].toFixed(e)), (a[3] = +a[3].toFixed(e + 2)), (a[6] = +a[6].toFixed(e)), void (a[7] = +a[7].toFixed(e)); default: return ( (t = a.length), s && ((a[t - 2] += i), (a[t - 1] += o)), (i = a[t - 2] - a[t - 2].toFixed(e)), (o = a[t - 1] - a[t - 1].toFixed(e)), void a.forEach(function (t, n) { n && (a[n] = +a[n].toFixed(e)); }) ); } }), this ); }), (u.prototype.iterate = function (e, t) { var n, r, i, o = this.segments, a = {}, s = !1, u = 0, l = 0, c = 0, d = 0; if ( (t || this.__evaluateStack(), o.forEach(function (t, n) { var r = e(t, n, u, l); Array.isArray(r) && ((a[n] = r), (s = !0)); var i = t[0] === t[0].toLowerCase(); switch (t[0]) { case "m": case "M": return (u = t[1] + (i ? u : 0)), (l = t[2] + (i ? l : 0)), (c = u), void (d = l); case "h": case "H": return void (u = t[1] + (i ? u : 0)); case "v": case "V": return void (l = t[1] + (i ? l : 0)); case "z": case "Z": return (u = c), void (l = d); default: (u = t[t.length - 2] + (i ? u : 0)), (l = t[t.length - 1] + (i ? l : 0)); } }), !s) ) return this; for (i = [], n = 0; n < o.length; n++) if (void 0 !== a[n]) for (r = 0; r < a[n].length; r++) i.push(a[n][r]); else i.push(o[n]); return (this.segments = i), this; }), (u.prototype.abs = function () { return ( this.iterate(function (e, t, n, r) { var i, o = e[0], a = o.toUpperCase(); if (o !== a) switch (((e[0] = a), o)) { case "v": return void (e[1] += r); case "a": return (e[6] += n), void (e[7] += r); default: for (i = 1; i < e.length; i++) e[i] += i % 2 ? n : r; } }, !0), this ); }), (u.prototype.rel = function () { return ( this.iterate(function (e, t, n, r) { var i, o = e[0], a = o.toLowerCase(); if (o !== a && (0 !== t || "M" !== o)) switch (((e[0] = a), o)) { case "V": return void (e[1] -= r); case "A": return (e[6] -= n), void (e[7] -= r); default: for (i = 1; i < e.length; i++) e[i] -= i % 2 ? n : r; } }, !0), this ); }), (u.prototype.unarc = function () { return ( this.iterate(function (e, t, n, r) { var i, o, s, u = [], l = e[0]; return "A" !== l && "a" !== l ? null : ("a" === l ? ((o = n + e[6]), (s = r + e[7])) : ((o = e[6]), (s = e[7])), 0 === (i = a(n, r, o, s, e[4], e[5], e[1], e[2], e[3])).length ? [["a" === e[0] ? "l" : "L", e[6], e[7]]] : (i.forEach(function (e) { u.push(["C", e[2], e[3], e[4], e[5], e[6], e[7]]); }), u)); }), this ); }), (u.prototype.unshort = function () { var e, t, n, r, i, o = this.segments; return ( this.iterate(function (a, s, u, l) { var c, d = a[0], h = d.toUpperCase(); s && ("T" === h ? ((c = "t" === d), "Q" === (n = o[s - 1])[0] ? ((e = n[1] - u), (t = n[2] - l)) : "q" === n[0] ? ((e = n[1] - n[3]), (t = n[2] - n[4])) : ((e = 0), (t = 0)), (r = -e), (i = -t), c || ((r += u), (i += l)), (o[s] = [c ? "q" : "Q", r, i, a[1], a[2]])) : "S" === h && ((c = "s" === d), "C" === (n = o[s - 1])[0] ? ((e = n[3] - u), (t = n[4] - l)) : "c" === n[0] ? ((e = n[3] - n[5]), (t = n[4] - n[6])) : ((e = 0), (t = 0)), (r = -e), (i = -t), c || ((r += u), (i += l)), (o[s] = [c ? "c" : "C", r, i, a[1], a[2], a[3], a[4]]))); }), this ); }), (e.exports = u); }, 48391: (e, t, n) => { "use strict"; var r = n(3156), i = { matrix: !0, scale: !0, rotate: !0, translate: !0, skewX: !0, skewY: !0 }, o = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, a = /[\s,]+/; e.exports = function (e) { var t, n, s = new r(); return ( e.split(o).forEach(function (e) { if (e.length) if (void 0 === i[e]) switch ( ((n = e.split(a).map(function (e) { return +e || 0; })), t) ) { case "matrix": return void (6 === n.length && s.matrix(n)); case "scale": return void (1 === n.length ? s.scale(n[0], n[0]) : 2 === n.length && s.scale(n[0], n[1])); case "rotate": return void (1 === n.length ? s.rotate(n[0], 0, 0) : 3 === n.length && s.rotate(n[0], n[1], n[2])); case "translate": return void (1 === n.length ? s.translate(n[0], 0) : 2 === n.length && s.translate(n[0], n[1])); case "skewX": return void (1 === n.length && s.skewX(n[0])); case "skewY": return void (1 === n.length && s.skewY(n[0])); } else t = e; }), s ); }; }, 2463: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.getComponentClass = t.getComponentId = void 0), (t.getComponentId = function (e, t) { return void 0 === t && (t = !1), e.hasOwnProperty(n) ? e[n] : t ? (e[n] = r++) : void 0; }), (t.getComponentClass = function (e, t) { var n = Object.getPrototypeOf(e).constructor; if (t) { if (!(e instanceof t || n === t)) throw new Error("Resolve class should be an ancestor of component class"); n = t; } return n; }); var n = "__componentClassId__", r = 1; }, 56772: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Engine = void 0); var r = n(22970), i = n(66037), o = n(43744), a = n(21240), s = (function () { function e() { var e = this; (this.onEntityAdded = new a.Signal()), (this.onEntityRemoved = new a.Signal()), (this._entityMap = new Map()), (this._entities = []), (this._systems = []), (this._queries = []), (this._subscriptions = []), (this._sharedConfig = new i.Entity()), (this.onComponentAdded = function (t, n, r) { e._queries.forEach(function (e) { return e.entityComponentAdded(t, n, r); }); }), (this.onInvalidationRequested = function (t) { e._queries.forEach(function (e) { return e.validateEntity(t); }); }), (this.onComponentRemoved = function (t, n, r) { e._queries.forEach(function (e) { return e.entityComponentRemoved(t, n, r); }); }), this.connectEntity(this._sharedConfig); } return ( Object.defineProperty(e.prototype, "entities", { get: function () { return Array.from(this._entities); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "systems", { get: function () { return this._systems; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "queries", { get: function () { return this._queries; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "subscriptions", { get: function () { return this._subscriptions; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "sharedConfig", { get: function () { return this._sharedConfig; }, enumerable: !1, configurable: !0, }), (e.prototype.addEntity = function (e) { return this._entityMap.has(e.id) || (this._entities.push(e), this._entityMap.set(e.id, e), this.onEntityAdded.emit(e), this.connectEntity(e)), this; }), (e.prototype.removeEntity = function (e) { if (!this._entityMap.has(e.id)) return this; var t = this._entities.indexOf(e); return this._entities.splice(t, 1), this._entityMap.delete(e.id), this.onEntityRemoved.emit(e), this.disconnectEntity(e), this; }), (e.prototype.removeSystem = function (e) { var t = this._systems.indexOf(e); return -1 === t || (this._systems.splice(t, 1), e.onRemovedFromEngine(), e.setEngine(void 0)), this; }), (e.prototype.getEntityById = function (e) { return this._entityMap.get(e); }), (e.prototype.getSystem = function (e) { return this._systems.find(function (t) { return t instanceof e; }); }), (e.prototype.removeAllSystems = function () { var e, t, n = this._systems; this._systems = []; try { for (var i = r.__values(n), o = i.next(); !o.done; o = i.next()) { o.value.onRemovedFromEngine(); } } catch (t) { e = { error: t }; } finally { try { o && !o.done && (t = i.return) && t.call(i); } finally { if (e) throw e.error; } } }), (e.prototype.removeAllQueries = function () { var e, t, n = this._queries; this._queries = []; try { for (var i = r.__values(n), o = i.next(); !o.done; o = i.next()) { var a = o.value; this.disconnectQuery(a), a.clear(); } } catch (t) { e = { error: t }; } finally { try { o && !o.done && (t = i.return) && t.call(i); } finally { if (e) throw e.error; } } }), (e.prototype.removeAllEntities = function () { this.removeAllEntitiesInternal(!1); }), (e.prototype.clear = function () { this.removeAllEntitiesInternal(!0), this.removeAllSystems(), this.removeAllQueries(); }), (e.prototype.update = function (e) { var t, n; try { for (var i = r.__values(this._systems), o = i.next(); !o.done; o = i.next()) { var a = o.value; a.update(e), a.isRemovalRequested && this.removeSystem(a); } } catch (e) { t = { error: e }; } finally { try { o && !o.done && (n = i.return) && n.call(i); } finally { if (t) throw t.error; } } }), (e.prototype.addQuery = function (e) { return this.connectQuery(e), e.matchEntities(this.entities), (this._queries[this._queries.length] = e), this; }), (e.prototype.addSystem = function (e, t) { if ((void 0 === t && (t = 0), e.setPriority(t), 0 === this._systems.length)) this._systems[0] = e; else { var n = this._systems.findIndex(function (e) { return e.priority > t; }); -1 === n ? (this._systems[this._systems.length] = e) : this._systems.splice(n, 0, e); } return e.setEngine(this), e.onAddedToEngine(), this; }), (e.prototype.removeQuery = function (e) { var t = this._queries.indexOf(e); if (-1 != t) return this._queries.splice(t, 1), this.disconnectQuery(e), e.clear(), this; }), (e.prototype.subscribe = function (e, t) { this.addSubscription(e, t); }), (e.prototype.unsubscribe = function (e, t) { this.removeSubscription(e, t); }), (e.prototype.unsubscribeAll = function () { this._subscriptions.length = 0; }), (e.prototype.addSubscription = function (e, t) { var n, i; try { for (var a = r.__values(this._subscriptions), s = a.next(); !s.done; s = a.next()) { var u = s.value; if (u.equals(e, t)) return u; } } catch (e) { n = { error: e }; } finally { try { s && !s.done && (i = a.return) && i.call(a); } finally { if (n) throw n.error; } } var l = new o.Subscription(e, t); return this._subscriptions.push(l), l; }), (e.prototype.removeSubscription = function (e, t) { for (var n = this._subscriptions.length; --n >= 0; ) { if (this._subscriptions[n].equals(e, t) && (this._subscriptions.splice(n, 1), void 0 !== t)) return; } }), (e.prototype.dispatch = function (e) { var t, n; try { for (var i = r.__values(this._subscriptions), o = i.next(); !o.done; o = i.next()) { var a = o.value; (("function" == typeof a.messageType && e instanceof a.messageType) || e === a.messageType) && a.handler(e); } } catch (e) { t = { error: e }; } finally { try { o && !o.done && (n = i.return) && n.call(i); } finally { if (t) throw t.error; } } }), (e.prototype.connectEntity = function (e) { e.onComponentAdded.connect(this.onComponentAdded, Number.POSITIVE_INFINITY), e.onComponentRemoved.connect(this.onComponentRemoved, Number.POSITIVE_INFINITY), e.onInvalidationRequested.connect(this.onInvalidationRequested, Number.NEGATIVE_INFINITY); }), (e.prototype.disconnectEntity = function (e) { e.onComponentAdded.disconnect(this.onComponentAdded), e.onComponentRemoved.disconnect(this.onComponentRemoved), e.onInvalidationRequested.disconnect(this.onInvalidationRequested); }), (e.prototype.connectQuery = function (e) { this.onEntityAdded.connect(e.entityAdded), this.onEntityRemoved.connect(e.entityRemoved); }), (e.prototype.disconnectQuery = function (e) { this.onEntityAdded.disconnect(e.entityAdded), this.onEntityRemoved.disconnect(e.entityRemoved); }), (e.prototype.removeAllEntitiesInternal = function (e) { var t, n, i = this._entities; (this._entities = []), this._entityMap.clear(); try { for (var o = r.__values(i), a = o.next(); !a.done; a = o.next()) { var s = a.value; e || this.onEntityRemoved.emit(s), this.disconnectEntity(s); } } catch (e) { t = { error: e }; } finally { try { a && !a.done && (n = o.return) && n.call(o); } finally { if (t) throw t.error; } } }), e ); })(); t.Engine = s; }, 66037: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.EntitySnapshot = t.Entity = void 0); var r = n(22970), i = n(2463), o = n(21240), a = n(22887), s = n(32121), u = n(82346), l = (function () { function e() { (this.onComponentAdded = new o.Signal()), (this.onComponentRemoved = new o.Signal()), (this.onInvalidationRequested = new o.Signal()), (this.id = d++), (this._components = {}), (this._linkedComponents = {}), (this._tags = new Set()); } return ( Object.defineProperty(e.prototype, "components", { get: function () { return this._components; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "tags", { get: function () { return this._tags; }, enumerable: !1, configurable: !0, }), (e.prototype.add = function (e, t) { return (0, a.isTag)(e) ? this.addTag(e) : this.addComponent(e, t), this; }), (e.prototype.append = function (e, t) { return this.appendComponent(e, t); }), (e.prototype.withdraw = function (e) { var t = this.get(e); if (void 0 !== t) return (0, s.isLinkedComponent)(t) ? this.withdrawComponent(t, e) : this.remove(e); }), (e.prototype.pick = function (e, t) { if ("string" == typeof t) { var n = this.find(e, function (e) { return (0, s.isLinkedComponent)(e) && e.id === t; }); return (0, s.isLinkedComponent)(n) ? this.withdrawComponent(n, e) : void 0; } return (0, s.isLinkedComponent)(e) ? this.withdrawComponent(e, t) : this.remove(null != t ? t : (0, i.getComponentClass)(e)); }), (e.prototype.addComponent = function (e, t) { var n = (0, i.getComponentClass)(e, t), r = (0, i.getComponentId)(n, !0), o = (0, s.isLinkedComponent)(e); if (void 0 !== this._components[r]) { if (!o && e === this._components[r]) return; this.remove(n); } o ? this.append(e, t) : ((this._components[r] = e), this.dispatchOnComponentAdded(e)); }), (e.prototype.appendComponent = function (e, t) { var n = (0, i.getComponentClass)(e, t), r = (0, i.getComponentId)(n, !0), o = this.getLinkedComponentList(r); return o.add(e), void 0 === this._components[r] && (this._components[r] = o.head), this.dispatchOnComponentAdded(e), this; }), (e.prototype.addTag = function (e) { this._tags.has(e) || (this._tags.add(e), this.dispatchOnComponentAdded(e)); }), (e.prototype.has = function (e, t) { return (0, a.isTag)(e) ? this.hasTag(e) : this.hasComponent(e, t); }), (e.prototype.contains = function (e, t) { var n = (0, i.getComponentClass)(e, t); return (0, s.isLinkedComponent)(e) ? void 0 !== this.find(n, function (t) { return t === e; }) : this.get(n) === e; }), (e.prototype.hasComponent = function (e, t) { return void 0 !== this.get(e, t); }), (e.prototype.hasTag = function (e) { return this._tags.has(e); }), (e.prototype.hasAny = function () { for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return t.some(function (t) { return e.has(t); }); }), (e.prototype.hasAll = function () { for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return t.every(function (t) { return e.has(t); }); }), (e.prototype.get = function (e, t) { var n = (0, i.getComponentId)(e); if (void 0 !== n) { var r = this._components[n]; if (void 0 === t) return this._components[n]; if ((0, s.isLinkedComponent)(r)) for (; void 0 !== r; ) { if (r.id === t) return r; r = r.next; } } }), (e.prototype.getComponents = function () { return Array.from(Object.values(this._components)); }), (e.prototype.getTags = function () { return Array.from(this._tags); }), (e.prototype.remove = function (e) { if (!(0, a.isTag)(e)) return this.removeComponent(e); this.removeTag(e); }), (e.prototype.removeComponent = function (e) { var t = (0, i.getComponentId)(e); if (void 0 !== t && void 0 !== this._components[t]) { var n = this._components[t]; if ((0, s.isLinkedComponent)(n)) for (var r = this.getLinkedComponentList(e); !r.isEmpty; ) this.withdraw(e); else delete this._components[t], this.dispatchOnComponentRemoved(n); return n; } }), (e.prototype.removeTag = function (e) { this._tags.has(e) && (this._tags.delete(e), this.dispatchOnComponentRemoved(e)); }), (e.prototype.clear = function () { (this._components = {}), (this._linkedComponents = {}), this._tags.clear(); }), (e.prototype.copyFrom = function (e) { return (this._components = Object.assign({}, e._components)), (this._linkedComponents = Object.assign({}, e._linkedComponents)), (this._tags = new Set(e._tags)), this; }), (e.prototype.iterate = function (e, t) { var n; this.hasComponent(e) && (null === (n = this.getLinkedComponentList(e)) || void 0 === n || n.iterate(t)); }), (e.prototype.getAll = function (e) { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return this.hasComponent(e) ? (void 0 === (t = this.getLinkedComponentList(e, !1)) ? [2, void 0] : [5, r.__values(t.nodes())]) : [2]; case 1: return n.sent(), [2]; } }); }), (e.prototype.find = function (e, t) { var n = (0, i.getComponentId)(e, !1); if (void 0 !== n) { var r = this._components[n]; if (void 0 !== r) { if (!(0, s.isLinkedComponent)(r)) return t(r) ? r : void 0; for (var o = r; void 0 !== o; ) { if (t(o)) return o; o = o.next; } } } }), (e.prototype.lengthOf = function (e) { var t = 0; return ( this.iterate(e, function () { t++; }), t ); }), (e.prototype.invalidate = function () { this.onInvalidationRequested.emit(this); }), (e.prototype.takeSnapshot = function (e, t, n) { var r = e.previous; if ((e.current !== this && ((e.current = this), r.copyFrom(this)), void 0 !== t)) if ((0, a.isTag)(t)) { var o = r._tags; this.has(t) ? o.delete(t) : o.add(t); } else { var s = null != n ? n : Object.getPrototypeOf(t).constructor, u = (0, i.getComponentId)(s, !0), l = r._components; this.has(s) ? delete l[u] : (l[u] = t); } }), (e.prototype.getLinkedComponentList = function (e, t) { return void 0 === t && (t = !0), "number" != typeof e && (e = (0, i.getComponentId)(e)), void 0 === this._linkedComponents[e] && t ? (this._linkedComponents[e] = new u.LinkedComponentList()) : this._linkedComponents[e]; }), (e.prototype.withdrawComponent = function (e, t) { var n = (0, i.getComponentClass)(e, t), r = this.getLinkedComponentList(n, !1); if (this.hasComponent(n) && void 0 !== r) { var o = r.remove(e) ? e : void 0, a = (0, i.getComponentId)(n, !0); return r.isEmpty ? (delete this._components[a], delete this._linkedComponents[a]) : (this._components[a] = r.head), void 0 !== o && this.dispatchOnComponentRemoved(o), o; } }), (e.prototype.dispatchOnComponentAdded = function (e) { this.onComponentAdded.hasHandlers && this.onComponentAdded.emit(this, e); }), (e.prototype.dispatchOnComponentRemoved = function (e) { this.onComponentRemoved.hasHandlers && this.onComponentRemoved.emit(this, e); }), e ); })(); t.Entity = l; var c = (function () { function e() { this._previous = new l(); } return ( Object.defineProperty(e.prototype, "current", { get: function () { return this._current; }, set: function (e) { this._current = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "previous", { get: function () { return this._previous; }, enumerable: !1, configurable: !0, }), e ); })(); t.EntitySnapshot = c; var d = 1; }, 25217: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.IterativeSystem = void 0); var r = n(22970), i = (function (e) { function t(t) { var n = e.call(this, t) || this; return (n._removed = !1), n; } return ( r.__extends(t, e), (t.prototype.update = function (e) { this.updateEntities(e); }), (t.prototype.onAddedToEngine = function () { (this._removed = !1), e.prototype.onAddedToEngine.call(this); }), (t.prototype.onRemovedFromEngine = function () { (this._removed = !0), e.prototype.onRemovedFromEngine.call(this); }), (t.prototype.updateEntities = function (e) { var t, n; try { for (var i = r.__values(this.query.entities), o = i.next(); !o.done; o = i.next()) { var a = o.value; if (this._removed) return; this.updateEntity(a, e); } } catch (e) { t = { error: e }; } finally { try { o && !o.done && (n = i.return) && n.call(i); } finally { if (t) throw t.error; } } }), t ); })(n(90415).ReactionSystem); t.IterativeSystem = i; }, 32121: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.isLinkedComponent = t.LinkedComponent = void 0); var n = function (e) { (this.id = e), (this.next = void 0); }; (t.LinkedComponent = n), (t.isLinkedComponent = function (e) { return void 0 !== e && e.hasOwnProperty("next"); }); }, 82346: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LinkedComponentList = void 0); var r = n(22970), i = (function () { function e() {} return ( Object.defineProperty(e.prototype, "head", { get: function () { return this._head; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isEmpty", { get: function () { return void 0 === this._head; }, enumerable: !1, configurable: !0, }), (e.prototype.add = function (e) { for (var t = void 0, n = this._head; void 0 !== n; ) { if (n === e) throw new Error("Component is already appended, appending it once again will break linked items order"); (t = n), (n = n.next); } void 0 === this._head ? (this._head = e) : (t.next = e); }), (e.prototype.remove = function (e) { var t = r.__read(this.find(e), 2), n = t[0], i = t[1]; return void 0 !== i && (void 0 === n ? (this._head = i.next) : (n.next = i.next), !0); }), (e.prototype.nodes = function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: (e = this.head), (t.label = 1); case 1: return void 0 === e ? [3, 3] : [4, e]; case 2: return t.sent(), (e = e.next), [3, 1]; case 3: return [2]; } }); }), (e.prototype.iterate = function (e) { var t, n; try { for (var i = r.__values(this.nodes()), o = i.next(); !o.done; o = i.next()) { e(o.value); } } catch (e) { t = { error: e }; } finally { try { o && !o.done && (n = i.return) && n.call(i); } finally { if (t) throw t.error; } } }), (e.prototype.clear = function () { this._head = void 0; }), (e.prototype.find = function (e) { for (var t, n = this._head; void 0 !== n; ) { if (n === e) return [t, n]; (t = n), (n = n.next); } return [void 0, void 0]; }), e ); })(); t.LinkedComponentList = i; }, 90271: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.isQueryBuilder = t.isQueryPredicate = t.QueryBuilder = t.Query = void 0); var r = n(22970), i = n(2463), o = n(66037), a = n(22887), s = n(21240), u = n(32121), l = (function () { function e(e) { var t = this; (this.onEntityAdded = new s.Signal()), (this.onEntityRemoved = new s.Signal()), (this._helper = new o.Entity()), (this._snapshot = new o.EntitySnapshot()), (this._entities = []), (this.entityAdded = function (e) { -1 === t._entities.indexOf(e) && t._predicate(e) && (t._entities.push(e), t.onEntityAdded.hasHandlers && (e.takeSnapshot(t._snapshot), t.onEntityAdded.emit(t._snapshot))); }), (this.entityRemoved = function (e) { var n = t._entities.indexOf(e); -1 !== n && (t._entities.splice(n, 1), t.onEntityRemoved.hasHandlers && (e.takeSnapshot(t._snapshot), t.onEntityRemoved.emit(t._snapshot))); }), (this.entityComponentAdded = function (e, n, r) { var i = t.onEntityAdded.hasHandlers, o = t.onEntityRemoved.hasHandlers; t.updateHelper(e, n, r); var a = t._entities.indexOf(e), s = t._predicate(t._helper); -1 === a && s ? (t._entities.push(e), i && (e.takeSnapshot(t._snapshot, n, r), t.onEntityAdded.emit(t._snapshot))) : -1 === a || s || (t._entities.splice(a, 1), o && (e.takeSnapshot(t._snapshot, n, r), t.onEntityRemoved.emit(t._snapshot))); }), (this.entityComponentRemoved = function (e, n, r) { var i = t.onEntityAdded.hasHandlers, o = t.onEntityRemoved.hasHandlers; t.updateHelper(e, n, r); var a = t._entities.indexOf(e); -1 !== a && t._predicate(t._helper) && !t._predicate(e) ? (t._entities.splice(a, 1), o && (e.takeSnapshot(t._snapshot, n, r), t.onEntityRemoved.emit(t._snapshot))) : -1 === a && t._predicate(e) && !t._predicate(t._helper) && (t._entities.push(e), i && (e.takeSnapshot(t._snapshot, n, r), t.onEntityAdded.emit(t._snapshot))); }), (this._predicate = e); } return ( Object.defineProperty(e.prototype, "entities", { get: function () { return this._entities; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "first", { get: function () { if (0 !== this._entities.length) return this._entities[0]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "last", { get: function () { if (0 !== this._entities.length) return this._entities[this._entities.length - 1]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "length", { get: function () { return this._entities.length; }, enumerable: !1, configurable: !0, }), (e.prototype.countBy = function (e) { var t, n, i = 0; try { for (var o = r.__values(this._entities), a = o.next(); !a.done; a = o.next()) { e(a.value) && i++; } } catch (e) { t = { error: e }; } finally { try { a && !a.done && (n = o.return) && n.call(o); } finally { if (t) throw t.error; } } return i; }), (e.prototype.find = function (e) { return this._entities.find(e); }), (e.prototype.filter = function (e) { return this._entities.filter(e); }), (e.prototype.has = function (e) { return -1 !== this._entities.indexOf(e); }), (e.prototype.matchEntities = function (e) { var t = this; e.forEach(function (e) { return t.entityAdded(e); }); }), Object.defineProperty(e.prototype, "isEmpty", { get: function () { return 0 == this.entities.length; }, enumerable: !1, configurable: !0, }), (e.prototype.clear = function () { this._entities = []; }), (e.prototype.validateEntity = function (e) { var t = this.entities.indexOf(e), n = this._predicate(e); -1 === t || n ? this.entityAdded(e) : this.entityRemoved(e); }), (e.prototype.updateHelper = function (e, t, n) { this._helper.clear(), this._helper.copyFrom(e), (0, u.isLinkedComponent)(t) ? this._helper.has((0, i.getComponentClass)(t, n)) || this._helper.append(t) : this._helper.add(t); }), e ); })(); t.Query = l; var c = (function () { function e() { (this._components = new Set()), (this._tags = new Set()); } return ( (e.prototype.contains = function () { for (var e, t, n = [], o = 0; o < arguments.length; o++) n[o] = arguments[o]; try { for (var s = r.__values(n), u = s.next(); !u.done; u = s.next()) { var l = u.value; if ((0, a.isTag)(l)) this._tags.has(l) || this._tags.add(l); else { var c = (0, i.getComponentId)(l, !0); this._components.has(c) || this._components.add(c); } } } catch (t) { e = { error: t }; } finally { try { u && !u.done && (t = s.return) && t.call(s); } finally { if (e) throw e.error; } } return this; }), (e.prototype.build = function () { var e = this; return new l(function (t) { return (function (e, t, n) { var i, o, a, s; if (t.size > 0) try { for (var u = r.__values(t), l = u.next(); !l.done; l = u.next()) { var c = l.value; if (void 0 === e.components[c]) return !1; } } catch (e) { i = { error: e }; } finally { try { l && !l.done && (o = u.return) && o.call(u); } finally { if (i) throw i.error; } } if (n.size > 0) try { for (var d = r.__values(n), h = d.next(); !h.done; h = d.next()) { var p = h.value; if (!e.tags.has(p)) return !1; } } catch (e) { a = { error: e }; } finally { try { h && !h.done && (s = d.return) && s.call(d); } finally { if (a) throw a.error; } } return !0; })(t, e._components, e._tags); }); }), (e.prototype.getComponents = function () { return this._components; }), (e.prototype.getTags = function () { return this._tags; }), e ); })(); (t.QueryBuilder = c), (t.isQueryPredicate = function (e) { return "function" == typeof e; }), (t.isQueryBuilder = function (e) { return e instanceof c; }); }, 90415: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ReactionSystem = void 0); var r = n(22970), i = n(90271), o = (function (e) { function t(t) { var n = e.call(this) || this; return (n.entityAdded = function (e) {}), (n.entityRemoved = function (e) {}), (0, i.isQueryBuilder)(t) ? (n.query = t.build()) : (0, i.isQueryPredicate)(t) ? (n.query = new i.Query(t)) : (n.query = t), n; } return ( r.__extends(t, e), Object.defineProperty(t.prototype, "entities", { get: function () { return this.query.entities; }, enumerable: !1, configurable: !0, }), (t.prototype.onAddedToEngine = function () { this.engine.addQuery(this.query), this.prepare(), this.query.onEntityAdded.connect(this.entityAdded), this.query.onEntityRemoved.connect(this.entityRemoved); }), (t.prototype.onRemovedFromEngine = function () { this.engine.removeQuery(this.query), this.query.onEntityAdded.disconnect(this.entityAdded), this.query.onEntityRemoved.disconnect(this.entityRemoved), this.query.clear(); }), (t.prototype.prepare = function () {}), t ); })(n(79101).System); t.ReactionSystem = o; }, 43744: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Subscription = void 0); var n = (function () { function e(e, t) { (this.messageType = e), (this.handler = t); } return ( (e.prototype.equals = function (e, t) { return this.messageType === e && (void 0 === t || this.handler === t); }), e ); })(); t.Subscription = n; }, 79101: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.System = void 0); var n = (function () { function e() { (this._priority = 0), (this._isRemovalRequested = !1); } return ( Object.defineProperty(e.prototype, "engine", { get: function () { if (void 0 === this._engine) throw new Error('Property "engine" can\'t be accessed when system is not added to the engine'); return this._engine; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isRemovalRequested", { get: function () { return this._isRemovalRequested; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "sharedConfig", { get: function () { if (void 0 === this._engine) throw new Error('Property "sharedConfig" can\'t be accessed when system is not added to the engine'); return this._engine.sharedConfig; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "priority", { get: function () { return this._priority; }, enumerable: !1, configurable: !0, }), (e.prototype.update = function (e) {}), (e.prototype.onAddedToEngine = function () {}), (e.prototype.onRemovedFromEngine = function () {}), (e.prototype.dispatch = function (e) { if (void 0 === this._engine) throw new Error("Dispatching a message can't be done while system is not attached to the engine"); this.engine.dispatch(e); }), (e.prototype.setEngine = function (e) { this._engine = e; }), (e.prototype.setPriority = function (e) { this._priority = e; }), (e.prototype.requestRemoval = function () { this._isRemovalRequested = !0; }), e ); })(); t.System = n; }, 22887: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.isTag = void 0), (t.isTag = function (e) { var t = typeof e; return "string" === t || "number" === t; }); }, 7687: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(96145), t), r.__exportStar(n(21240), t), r.__exportStar(n(2463), t), r.__exportStar(n(22887), t), r.__exportStar(n(32121), t), r.__exportStar(n(56772), t), r.__exportStar(n(66037), t), r.__exportStar(n(79101), t), r.__exportStar(n(90271), t), r.__exportStar(n(25217), t), r.__exportStar(n(90415), t); }, 96145: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 21240: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Signal = void 0); var r = n(22970), i = (function () { function e() { this.handlers = []; } return ( Object.defineProperty(e.prototype, "hasHandlers", { get: function () { return this.handlers.length > 0; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "handlersAmount", { get: function () { return this.handlers.length; }, enumerable: !1, configurable: !0, }), (e.prototype.connect = function (e, t) { void 0 === t && (t = 0); var n, r = this.handlers.find(function (t) { return t.equals(e); }); if (void 0 !== r) (n = r.priority !== t), (r.priority = t); else { var i = this.handlers[this.handlers.length - 1]; this.handlers.push(new o(e, t)), (n = void 0 !== i && i.priority > t); } n && this.handlers.sort(function (e, t) { return e.priority - t.priority; }); }), (e.prototype.disconnect = function (e) { var t = this.handlers.findIndex(function (t) { return t.equals(e); }); t >= 0 && this.handlers.splice(t, 1); }), (e.prototype.disconnectAll = function () { this.handlers.length = 0; }), (e.prototype.emit = function () { for (var e, t, n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i]; try { for (var o = r.__values(this.handlers), a = o.next(); !a.done; a = o.next()) { var s = a.value; s.handle.apply(s, r.__spreadArray([], r.__read(n), !1)); } } catch (t) { e = { error: t }; } finally { try { a && !a.done && (t = o.return) && t.call(o); } finally { if (e) throw e.error; } } }), e ); })(); t.Signal = i; var o = (function () { function e(e, t) { (this.handler = e), (this.priority = t); } return ( (e.prototype.equals = function (e) { return this.handler === e; }), (e.prototype.handle = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; this.handler.apply(this, r.__spreadArray([], r.__read(e), !1)); }), e ); })(); }, 55904: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameModule = void 0); n(22970); var r = n(30627), i = n(46595), o = n(37394), a = n(47166), s = n(71808), u = (n(67675), n(92033)), l = n(90770), c = n(22674), d = n(51155), h = n(87115); t.GameModule = new c.ContainerModule(function (e, t, n, c) { i.di.load(r.PIXIUIModule), i.di.load(a.HTMLUIModule), i.di.load(h.CoreGameModule), i.di.load(l.GameUIModule), n(o.TypesNotification.start) && c(o.TypesNotification.start).to(s.NAStartSIO), e(o.TypesFlow.assetsPreload).to(u.SIOPreloadAssetsAction), e(o.TypesFlow.mainAction).to(d.MainAction); }); }, 78620: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesGame = void 0); var n = function (e) { return Symbol(e); }; t.TypesGame = { model: n(), cookieModel: n(), levelModel: n(), inputManager: n(), skinManager: n(), spritesPool: n(), actions: { startGame: n(), burst: n(), createMap: n(), createMapPart: n(), submitContextScore: n(), endStage: n(), giftPopup: n(), levelCompletePopup: n(), loadLevel: n(), battleResultsPopup: n(), winPopup: n(), tournamentCreate: n(), tournamentPostScore: n(), tournamentReShare: n(), suggestAuthorizeAction: n(), syncYandexLeaderboardsAction: n(), levelRestartAfterYandexLoginAction: n(), bannerControllerGameDistribution: n(), updateBotLevelAction: n() }, botPresetsModel: n(), botLogic: n(), botCalculationLogic: n(), views: { fieldClass: n(), fieldInstance: n(), fighter: n(), arrows: n(), arrow: n(), state: n(), stateShape: n(), population: n() } }; }, 90976: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BattleResultsPopupAction = void 0); var r = n(22970), i = n(46595), o = n(17905), a = n(22674), s = n(78620), u = n(16638), l = n(47166), c = n(25417), d = n(37394), h = n(57228), p = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return ( void 0 === e && (e = !0), r.__awaiter(this, void 0, Promise, function () { var t, n = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return [ 4, new Promise(function (t) { var r = { win: e, onContinue: t }; n.dispatch(l.UIEvents.POPUP, { id: c.PopupType.BATTLE_RESULTS, props: r }); }), ]; case 1: return (t = r.sent()), o.log.debug("BattleResultsPopupAction shared", t), [2]; } }); }) ); }), r.__decorate([(0, a.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, a.inject)(d.TypesSocial.model), r.__metadata("design:type", "function" == typeof (i = void 0 !== h.ISocial && h.ISocial) ? i : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.Action); t.BattleResultsPopupAction = p; }, 88765: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GenerateShareImageAction = void 0); var r = n(22970), i = n(30627), o = n(46595), a = n(51159), s = n(37394), u = n(57228), l = n(14791), c = n(16638), d = r.__importDefault(n(86352)), h = n(78620), p = n(22674), f = n(940), _ = l.GameConstants.LevelCompletedScreenShot, g = _.subTitleFontStyle, m = _.scoreFontStyle, v = _.scoreBarStyle, y = _.layoutSettings, C = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, l, _, C; return ( r.__extends(t, e), (t.prototype.execute = function (e) { var t = e.points; return r.__awaiter(this, void 0, Promise, function () { var e; return r.__generator(this, function (n) { switch (n.label) { case 0: return [4, this.drawScreenShot(t, this.social.me)]; case 1: return (e = n.sent()), [2, { image: this.rootView.app.renderer.extract.base64(e) }]; } }); }); }), (t.prototype.drawScreenShot = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n, i, o, a, s, u, l, c, d, h; return r.__generator(this, function (p) { switch (p.label) { case 0: return [4, Promise.all([this.createAvatar(e, t), this.createFieldSprite()])]; case 1: return (n = r.__read.apply(void 0, [p.sent(), 2])), (i = n[0]), (o = n[1]), (a = new f.Graphics().beginFill(13684944).drawRect(0, 0, 10, 10).endFill()), (s = new f.Graphics().beginFill(0, 0.2).drawRect(0, 0, 10, 10).endFill()), (u = new f.Container()), (l = o.getBounds().pad(20, 20)), u.addChild(a, o, i), (s.width = a.width = l.width), (s.height = a.height = l.height), (o.x = 0.5 * (l.width - o.width)), (o.y = 0.5 * (l.height - o.height)), (i.x = 0.5 * (l.width - y.avatarWidth)), (i.y = 0.5 * (l.height - y.avatarHeight)), (c = { width: l.width, height: l.height }), (d = f.RenderTexture.create(c)), this.rootView.app.renderer.render(i, d), (h = new f.Sprite(d)), f.Texture.removeFromCache(d), u.removeChild(i), u.addChild(s), u.addChild(h), [2, u]; } }); }); }), (t.prototype.createFieldSprite = function () { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, o.di.get(h.TypesGame.actions.createMap).run({ activeStage: Number.MAX_SAFE_INTEGER, data: this.model.currentContinent.data, area: { width: 640, height: 640 } })]; case 1: return [2, e.sent()]; } }); }); }), (t.prototype.createAvatar = function (e, t) { var n; return r.__awaiter(this, void 0, void 0, function () { var o, s, u, l, c, d, h, p, _, C, b, w, S, T, x, E, L; return r.__generator(this, function (A) { switch (A.label) { case 0: return (o = new f.Container()), (s = new f.Container()), (u = new i.UserPic()), (l = y.avatarRadius), (u.width = y.avatarWidth), (u.height = y.avatarHeight), s.addChild(u), t ? [4, (0, i.loadTexture)(t.photo)] : [3, 2]; case 1: (c = A.sent()) && ((c.textureCacheIds[0] = "user-photo-".concat(t.id)), (f.utils.TextureCache[t.photo] = c)), (A.label = 2); case 2: return (d = new f.Sprite(f.utils.TextureCache["victory-framing.svg"])).anchor.set(0.5, 1), (d.x = 0.5 * y.avatarWidth), (d.y = y.avatarHeight + 40), (h = new f.Sprite(f.utils.TextureCache["animation/win-rays.svg"])).anchor.set(0.5), (h.blendMode = f.BLEND_MODES.OVERLAY), (h.width = y.maxWidth), (h.alpha = 0.6), (0, i.aspectFit)({ width: 540, height: 774 }, h), (h.x = 0.5 * y.avatarWidth), (h.y = 0.5 * y.avatarHeight), (u.user = t), (p = new f.Graphics().beginFill(16777215).drawCircle(l, l, l).endFill()), s.addChild(p), (s.mask = p), (_ = new f.BitmapText("" + e, r.__assign(r.__assign({}, m), { fontName: "Helvetica" }))), (C = new f.Graphics()), (b = new f.Container()).addChild(C, _), (b.y = y.badgeOffsetY), (_.text = "" + e), (w = v.color), (S = v.width), (T = v.height), (x = v.radius), C.clear().beginFill(w).drawRoundedRect(0, 0, S, T, x), (0, i.centerSize)(C, _), (E = a.Localize.get("level_completed_message", "ALL STAGES COMPLETED!")), ((L = new f.BitmapText(E, r.__assign(r.__assign({}, g), { fontName: "Helvetica" }))).x = 0.5 * (y.avatarWidth - L.width)), (L.y = y.subtitleOffsetY), o.addChild(h), o.addChild(s), o.addChild(d), o.addChild(L), o.addChild(b), f.Texture.removeFromCache(null === (n = u.sprite) || void 0 === n ? void 0 : n.texture), [2, o]; } }); }); }), r.__decorate([(0, p.inject)(s.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== d.default && d.default) ? n : Object)], t.prototype, "rootView", void 0), r.__decorate([(0, p.inject)(s.TypesSocial.model), r.__metadata("design:type", "function" == typeof (l = void 0 !== u.ISocial && u.ISocial) ? l : Object)], t.prototype, "social", void 0), r.__decorate([(0, p.inject)(h.TypesGame.model), r.__metadata("design:type", "function" == typeof (_ = void 0 !== c.GameModel && c.GameModel) ? _ : Object)], t.prototype, "model", void 0), r.__decorate([(0, o.lazyInject)(s.Types2D.screenShotAction), r.__metadata("design:type", "function" == typeof (C = void 0 !== o.Action && o.Action) ? C : Object)], t.prototype, "screenshotAction", void 0), (t = r.__decorate([(0, p.injectable)()], t)) ); })(o.Action); t.GenerateShareImageAction = C; }, 80921: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelCompletedPopupAction = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(22674), s = n(78620), u = n(16638), l = n(47166), c = n(25417), d = n(37394), h = n(57228), p = n(88765), f = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, f; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n, o, a, s = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return (e = this.model.currentContinent.data.id), (t = +this.social.me.scoreSession.toFixed()), ["ya", "vk", "gd"].includes(this.social.socialPlatform) ? ((o = void 0), [3, 3]) : [3, 1]; case 1: return [4, this.generateImage(e, t)]; case 2: (o = r.sent()), (r.label = 3); case 3: return ( (n = o), [ 4, new Promise(function (r) { s.dispatch(l.UIEvents.POPUP, { id: c.PopupType.LEVEL_COMPLETED, props: { levelName: e, points: t, shareImage: n, onContinue: r } }); }), ] ); case 4: return (a = r.sent()), i.log.debug("LevelCompletedPopupAction shared", a), [2]; } }); }); }), (t.prototype.generateImage = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var e, n; return r.__generator(this, function (r) { switch (r.label) { case 0: return r.trys.push([0, 2, , 3]), [4, o.di.get(p.GenerateShareImageAction).run({ points: t })]; case 1: return (e = r.sent()), [2, e.image]; case 2: return (n = r.sent()), i.log.warn("Image generation failed", n), [3, 3]; case 3: return [2]; } }); }); }), r.__decorate([(0, a.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, a.inject)(d.TypesSocial.model), r.__metadata("design:type", "function" == typeof (f = void 0 !== h.ISocial && h.ISocial) ? f : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.LevelCompletedPopupAction = f; }, 40511: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelEndActionSIO = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(6585), s = n(47166), u = n(16638), l = n(78620), c = n(25417), d = n(22674), h = n(86322), p = n(12242), f = n(70789), _ = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, a, _; return ( r.__extends(t, e), (t.prototype.launch = function (e) { var t, n; return ( void 0 === e && (e = !1), r.__awaiter(this, void 0, void 0, function () { var o, a; return r.__generator(this, function (r) { switch (r.label) { case 0: return (o = this.model), (a = o.meta), o.cookie.absoluteTryNum++, f.SIOConstants.REWARD_AD_PLAYED.delete("boosters"), [4, null === (t = i.di.get(l.TypesGame.actions.tournamentPostScore)) || void 0 === t ? void 0 : t.run()]; case 1: return r.sent(), null === (n = i.di.get(l.TypesGame.actions.updateBotLevelAction)) || void 0 === n || n.run(e), e ? (this.model.cookie.absoluteLevelNum++, this.social.inSolo ? [4, this.popupWin()] : [3, 6]) : [3, 13]; case 2: return r.sent(), [4, this.popupLevelComplete()]; case 3: return r.sent(), [4, this.popupGift()]; case 4: return r.sent(), [4, this.levelNext.run()]; case 5: return r.sent(), (this.model.state = p.GameState.LOBBY), [3, 12]; case 6: return [4, this.popupBattleResults()]; case 7: return r.sent(), [4, this.popupLevelComplete()]; case 8: return r.sent(), [4, this.updateTournament()]; case 9: return r.sent(), [4, this.social.playSolo()]; case 10: return r.sent(), [4, this.levelNext.run()]; case 11: r.sent(), (this.model.state = p.GameState.LOBBY), (r.label = 12); case 12: return [3, 14]; case 13: this.dispatch(s.UIEvents.POPUP, { id: c.PopupType.LOSE, props: { coins: a.getReward() * a.loseMultiplier } }), (r.label = 14); case 14: return this.assets.purge(), [2]; } }); }) ); }), (t.prototype.popupGift = function () { var e; return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, null === (e = i.di.get(l.TypesGame.actions.giftPopup)) || void 0 === e ? void 0 : e.run()]; case 1: return t.sent(), [2]; } }); }); }), (t.prototype.updateTournament = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, i.di.get(l.TypesGame.actions.tournamentReShare).run()]; case 1: return [2, e.sent()]; } }); }); }), (t.prototype.createTournament = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, i.di.get(l.TypesGame.actions.tournamentCreate).run()]; case 1: return [2, e.sent()]; } }); }); }), (t.prototype.popupWin = function () { var e; return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, null === (e = i.di.get(l.TypesGame.actions.winPopup)) || void 0 === e ? void 0 : e.run({ id: c.PopupType.WIN_LEVEL })]; case 1: return t.sent(), [2]; } }); }); }), (t.prototype.popupLevelComplete = function () { var e; return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, null === (e = i.di.get(l.TypesGame.actions.levelCompletePopup)) || void 0 === e ? void 0 : e.run()]; case 1: return t.sent(), [2]; } }); }); }), (t.prototype.popupBattleResults = function () { var e; return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, null === (e = i.di.get(l.TypesGame.actions.battleResultsPopup)) || void 0 === e ? void 0 : e.run(this.data)]; case 1: return t.sent(), [2]; } }); }); }), (t.prototype.submitScore = function () { var e; return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { return (t = this.model.currentContinent), (this.social.me.scoreSession = t.getTotalScore()), this.social.inSolo && (null === (e = this.leaderboardGlobal) || void 0 === e || e.submit(this.model.absoluteLevelNum, { continent: t.data.id })), [2]; }); }); }), (t.prototype.needToShowAD = function () { return !1; }), r.__decorate([(0, d.inject)(l.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, d.inject)(l.TypesGame.spritesPool), r.__metadata("design:type", "function" == typeof (a = void 0 !== h.SpritesPool && h.SpritesPool) ? a : Object)], t.prototype, "assets", void 0), r.__decorate([(0, d.inject)(o.TypesFlow.LevelNext), r.__metadata("design:type", "function" == typeof (_ = void 0 !== i.Action && i.Action) ? _ : Object)], t.prototype, "levelNext", void 0), (t = r.__decorate([(0, d.injectable)()], t)) ); })(a.LevelEndAction); t.LevelEndActionSIO = _; }, 36939: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelNextActionSIO = void 0); var r = n(22970), i = n(46595), o = n(6585), a = n(37394), s = n(47166), u = n(16638), l = n(12242), c = n(78620), d = n(22674), h = n(57228), p = n(81599), f = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.gotoNextLevel = function (e) { return ( void 0 === e && (e = !1), r.__awaiter(this, void 0, void 0, function () { var t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return (this.levelStart.waitForContextChange = e), this.model.cookie.syncTime(), this.model.gotoNextLevelStage() ? (this.model.startStage(), [3, 4]) : [3, 1]; case 1: return [4, i.di.get(p.DestroyFieldAction).run()]; case 2: return n.sent(), [4, this.levelStart.run()]; case 3: n.sent(), (n.label = 4); case 4: return ( new Promise(function (e) { return t.social.once(h.SocialEvents.CONTEXT_CHANGE, e); }).then(function () { if (t.model.state === l.GameState.GAMEPLAY) { var e = t.model.getAssociatedUsers(); t.dispatch(s.UIEvents.SCREEN_CHANGED, { id: a.TypesUI.screen.GAMEPLAY, props: { participants: e } }); } }), [2] ); } }); }) ); }), (t.prototype.playNextSolo = function () { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { return [2, this.gotoNextLevel()]; }); }); }), r.__decorate([(0, d.inject)(c.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, d.injectable)()], t)) ); })(o.LevelNextAction); t.LevelNextActionSIO = f; }, 50657: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelRestartActionSIO = void 0); var r = n(22970), i = n(37394), o = n(6585), a = n(79295), s = n(16638), u = r.__importDefault(n(86352)), l = n(78620), c = n(22674), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, o, d; return ( r.__extends(t, e), (t.prototype.launch = function (t) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return this.root.progressBar.hide(), this.root.overlay.unblur(), this.model.restartLevel(), [4, e.prototype.launch.call(this)]; case 1: return t.sent(), [2]; } }); }); }), r.__decorate([(0, c.inject)(i.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.default && u.default) ? n : Object)], t.prototype, "root", void 0), r.__decorate([(0, c.inject)(l.TypesGame.model), r.__metadata("design:type", "function" == typeof (o = void 0 !== s.GameModel && s.GameModel) ? o : Object)], t.prototype, "model", void 0), r.__decorate([(0, c.inject)(l.TypesGame.inputManager), r.__metadata("design:type", "function" == typeof (d = void 0 !== a.InputManager && a.InputManager) ? d : Object)], t.prototype, "inputManager", void 0), (t = r.__decorate([(0, c.injectable)()], t)) ); })(o.LevelRestartAction); t.LevelRestartActionSIO = d; }, 76431: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelStartActionSIO = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(6585), s = n(79295), u = n(16638), l = n(12242), c = r.__importDefault(n(86352)), d = n(78620), h = n(22674), p = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, a, p; return ( r.__extends(t, e), (t.prototype.beforeLaunch = function () { var t; return r.__awaiter(this, void 0, Promise, function () { var n, i, a = this; return r.__generator(this, function (s) { switch (s.label) { case 0: return [4, this.model.disposeCurrentLevel()]; case 1: return s.sent(), this.data ? [3, 3] : [4, this._contextChangePromise]; case 2: s.sent(), (this.contextData = this.model.getContextData()), (s.label = 3); case 3: return (n = this.data || (null === (t = this.contextData) || void 0 === t ? void 0 : t.l) || u.GameModel.LEVELS_PREDEFINED[0]) && this.model.levels[n] ? [4, e.prototype.beforeLaunch.call(this)] : [3, 5]; case 4: return s.sent(), [3, 7]; case 5: return ( this.root.overlay.blur(), this.root.spinner.show(), (this.model.state = l.GameState.LOADING), (i = function () { return r.__awaiter(a, void 0, void 0, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return (e = this), [4, o.di.get(d.TypesGame.actions.loadLevel).run(n)]; case 1: return (e.levelData = t.sent()), [2]; } }); }); }), [4, Promise.all([i(), e.prototype.beforeLaunch.call(this)])] ); case 6: s.sent(), (s.label = 7); case 7: return [2]; } }); }); }), (t.prototype.launch = function (t) { var n; return r.__awaiter(this, void 0, Promise, function () { var a, s, u; return r.__generator(this, function (r) { switch (r.label) { case 0: return this.root.progressBar.hide(), this.root.spinner.hide(), this.root.overlay.unblur(), (a = o.di.get(d.TypesGame.views.fieldClass)), o.di.bind(d.TypesGame.views.fieldInstance).toConstantValue(a), this.root.addChild(a), ((s = this.model.levels[t] || o.di.get(d.TypesGame.levelModel).init(this.levelData)).stageLevel = (null === (n = this.contextData) || void 0 === n ? void 0 : n.c) || 0), this.model.setCurrentContinent(s), this.social.inSolo ? [3, 2] : [4, null == (u = (0, o.lazyGet)(i.TypesNotification.start)) ? void 0 : u.run()]; case 1: r.sent(), (r.label = 2); case 2: return [4, e.prototype.launch.call(this)]; case 3: return r.sent(), this.inputManager.start(), this.social.inSolo ? (this.model.state = l.GameState.LOBBY) : this.model.startStage(), [2]; } }); }); }), (t.prototype.sendPush = function (e, t) {}), r.__decorate([(0, h.inject)(i.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== c.default && c.default) ? n : Object)], t.prototype, "root", void 0), r.__decorate([(0, h.inject)(d.TypesGame.model), r.__metadata("design:type", "function" == typeof (a = void 0 !== u.GameModel && u.GameModel) ? a : Object)], t.prototype, "model", void 0), r.__decorate([(0, h.inject)(d.TypesGame.inputManager), r.__metadata("design:type", "function" == typeof (p = void 0 !== s.InputManager && s.InputManager) ? p : Object)], t.prototype, "inputManager", void 0), (t = r.__decorate([(0, h.injectable)()], t)) ); })(a.LevelStartAction); t.LevelStartActionSIO = p; }, 59437: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LoadLevelAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = n(74353), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, o, s, u; return r.__generator(this, function (r) { switch (r.label) { case 0: (t = (null == e ? void 0 : e.endsWith(".svg")) ? e : e + ".svg"), (r.label = 1); case 1: return r.trys.push([1, 3, , 4]), (o = i.IS_ODR_BUILD ? i.ODR_BUILD_ORIGIN : i.GAME_SCRIPT_ORIGIN), [4, fetch("".concat(o, "assets/maps/").concat(t))]; case 2: return (n = r.sent()), [3, 4]; case 3: throw ((s = r.sent()), new Error(s)); case 4: return [4, n.text()]; case 5: return (u = r.sent()), [2, (0, a.parseLevelSVG)(new window.DOMParser().parseFromString(u, "text/xml"))]; } }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.LoadLevelAction = s; }, 51155: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.MainAction = void 0); var r = n(22970), i = n(46595), o = n(6585), a = n(37394), s = n(70600), u = n(16638), l = n(78620), c = n(22674), d = n(76431), h = n(80367), p = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, o, p; return ( r.__extends(t, e), (t.prototype.beforeLaunch = function () { var t; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (n) { switch (n.label) { case 0: return null === (t = (0, i.lazyGet)(a.TypesDevice.initAction)) || void 0 === t || t.run(), [4, e.prototype.beforeLaunch.call(this)]; case 1: return n.sent(), [2]; } }); }); }), (t.prototype.launch = function () { var e, t, n; return r.__awaiter(this, void 0, void 0, function () { var o; return r.__generator(this, function (r) { switch (r.label) { case 0: return (o = this.social.syncLeaderboards()), null === (e = (0, i.lazyGet)(a.TypesSocial.vibrationManager)) || void 0 === e || e.init(), [4, this.cookies.sync()]; case 1: return r.sent(), this.social.inSolo ? [3, 3] : [4, o]; case 2: r.sent(), (r.label = 3); case 3: return null === (t = (0, i.lazyGet)(h.SetCalculatedConstantValuesAction)) || void 0 === t || t.run(), null === (n = (0, i.lazyGet)(l.TypesGame.skinManager)) || void 0 === n || n.updateSkins(), [4, this.levelStart.run()]; case 4: return r.sent(), [2]; } }); }); }), r.__decorate([(0, c.inject)(l.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, c.inject)(a.TypesFlow.LevelStart), r.__metadata("design:type", "function" == typeof (o = void 0 !== d.LevelStartActionSIO && d.LevelStartActionSIO) ? o : Object)], t.prototype, "levelStart", void 0), r.__decorate([(0, c.inject)(l.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (p = void 0 !== s.CookieModel && s.CookieModel) ? p : Object)], t.prototype, "cookies", void 0), (t = r.__decorate([(0, c.injectable)()], t)) ); })(o.SocialFlowAction); t.MainAction = p; }, 71808: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NAStartSIO = void 0); var r = n(22970), i = n(57228), o = n(22674), a = n(78620), s = n(16638), u = n(3416), l = n(37394), c = n(30627), d = n(940), h = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.strategy = "IMMEDIATE"), t; } var n, h, p; return ( r.__extends(t, e), (t.prototype.getImage = function () { return r.__awaiter(this, void 0, Promise, function () { var t, n, o, a, s, u, l; return r.__generator(this, function (r) { switch (r.label) { case 0: return (t = this.model.currentContinent) ? [4, this.createMapAction.run({ activeStage: t.stageLevel, data: t.data })] : [3, 3]; case 1: return (n = r.sent()), (o = new d.Container()), (a = new d.Graphics().beginFill(13684944).drawRect(0, 0, i.NotificationAction.WIDTH_FULL, i.NotificationAction.HEIGHT_FULL)), o.addChild(a), (s = this.aspectFactor(n.width, n.height, a.width, a.height)), (n.width *= s), (n.height *= s), [4, this.avatar(this.social.me.photo)]; case 2: return ((u = r.sent()).height = 0.8 * i.NotificationAction.HEIGHT_FULL), (u.scale.x = u.scale.y), (u.x = 0.25 * a.width), (u.y = 0.5 * a.height), (n.x = 0.75 * (a.width - n.width)), (n.y = 0.5 * (a.height - n.height)), o.addChild(n, u), (l = this.rootView.app.renderer.extract.base64(o)), d.Texture.removeFromCache(n.texture), [2, l]; case 3: return [2, e.prototype.getImage.call(this)]; } }); }); }), (t.prototype.aspectFactor = function (e, t, n, r) { return e / t >= n / r ? n / e : r / t; }), (t.prototype.avatar = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n, i, o, a, s; return r.__generator(this, function (r) { switch (r.label) { case 0: return (t = 140), (n = new d.Graphics().lineStyle(40, 9034543).drawCircle(0, 0, t)), (o = d.Sprite.bind), [4, (0, c.loadTexture)(e)]; case 1: return (i = new (o.apply(d.Sprite, [void 0, r.sent()]))()).anchor.set(0.5), (a = new d.Graphics().beginFill(0).drawCircle(0, 0, t).endFill()), (s = new d.Container()).addChild(i), s.addChild(a), (i.mask = a), s.addChild(n), d.Texture.removeFromCache(i.texture), [2, s]; } }); }); }), r.__decorate([(0, o.inject)(a.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.GameModel && s.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, o.inject)(l.Types2D.rootView), r.__metadata("design:type", "function" == typeof (h = void 0 !== c.RootView && c.RootView) ? h : Object)], t.prototype, "rootView", void 0), r.__decorate([(0, o.inject)(a.TypesGame.actions.createMap), r.__metadata("design:type", "function" == typeof (p = void 0 !== u.GenerateMapSpriteAction && u.GenerateMapSpriteAction) ? p : Object)], t.prototype, "createMapAction", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.NAStart); t.NAStartSIO = h; }, 23909: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlayWithOpponentActionSIO = void 0); var r = n(22970), i = n(6585), o = n(57228), a = n(78620), s = n(22674), u = n(16638), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, this.social.playWith(e, !1)]; case 1: return t.sent() !== o.SOCIAL_POPUP.ACCEPTED ? [3, 3] : [4, this.levelStart.run()]; case 2: t.sent(), this.model.startStage(), (t.label = 3); case 3: return [2]; } }); }); }), r.__decorate([(0, s.inject)(a.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), t ); })(i.PlayWithOpponentAction); t.PlayWithOpponentActionSIO = l; }, 92033: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SIOPreloadAssetsAction = void 0); var r = n(22970), i = n(30627), o = (n(46595), n(37394)), a = n(57228), s = (n(88765), n(75747)), u = r.__importDefault(n(86352)), l = (n(78620), n(40094), n(79870), n(25417), n(22674)), c = n(940), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var t, n, i, o = this; return r.__generator(this, function (a) { switch (a.label) { case 0: return ( console.error("start preload"), (t = r.__spreadArray( [], r.__read( Array.from(s.SelectableBuildingDataSet.concat(s.SelectableFighterDataSet), function (e) { return e.textureUrl || ""; }) ), !1 )), { assets: 0 }, c.BitmapFont.from("Helvetica", { fill: "black", fontFamily: "Helvetica", fontSize: 24, fontWeight: "800" }, { chars: "0123456789- ", resolution: devicePixelRatio }), (n = r.__spreadArray(["Notification.png", "spinner.svg", "skull.svg", "finger.svg", "animation/win-rays.svg", "victory-framing.svg"], r.__read(t), !1)), (i = e.prototype.execute.call(this, { assets: n, onProgress: function (e) { o.pageModel.assetsProgress = e / 100; }, })), [4, Promise.all([i])] ); case 1: return a.sent(), c.utils.TextureCache["Notification.png"].baseTexture.setResolution(1), this.root.onAdded(), this.root.spinner.show(), [2]; } }); }); }), r.__decorate([(0, l.inject)(o.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.default && u.default) ? n : Object)], t.prototype, "root", void 0), r.__decorate([(0, l.inject)(o.TypesApp.pageModel), r.__metadata("design:type", "function" == typeof (i = void 0 !== a.PageModel && a.PageModel) ? i : Object)], t.prototype, "pageModel", void 0), (t = r.__decorate([(0, l.injectable)()], t)) ); })(i.PreloadAssetsAction); t.SIOPreloadAssetsAction = d; }, 80367: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SetCalculatedConstantValuesAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(22674), s = n(57228), u = (n(70789), n(37394), (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return 106, !1, [2]; }); }); }), r.__decorate([(0, a.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.ISocial && s.ISocial) ? n : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.Action)); t.SetCalculatedConstantValuesAction = u; }, 67675: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShareActionOk = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(22674), u = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return ( (e = { media: [ { type: "text", text: "Никто не может победить ".concat(this.social.me.name, " в битве за территории") }, { type: "app-ref", appId: 512000948950 }, ], }), [4, this.social.share(e)] ); case 1: return t.sent(), [2]; } }); }); }), r.__decorate([(0, s.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.Action); t.ShareActionOk = u; }, 24635: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShowGiftPopupAction = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(22674), s = n(78620), u = n(16638), l = n(47166), c = n(25417), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return [ 4, new Promise(function (e) { var n, r = { captured: t.model.currentContinent.stageLevel, total: t.model.currentContinent.totalStages, reward: null === (n = (0, o.lazyGet)(s.TypesGame.skinManager)) || void 0 === n ? void 0 : n.getGift(), onContinue: e }; t.dispatch(l.UIEvents.POPUP, { id: c.PopupType.GIFT, props: r }); }), ]; case 1: return (e = n.sent()), i.log.debug("giftWasCollected", e), [2]; } }); }); }), r.__decorate([(0, a.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.ShowGiftPopupAction = d; }, 79153: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShowWinPopupAction = void 0); var r = n(22970), i = n(46595), o = n(47166), a = n(17905), s = n(16638), u = n(78620), l = n(22674), c = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n = this; return r.__generator(this, function (i) { switch (i.label) { case 0: return [ 4, new Promise(function (t) { var i, a = r.__assign({ coins: n.model.meta.getReward(), scoreStage: (null === (i = n.model.currentContinent) || void 0 === i ? void 0 : i.getStageScore()) || 0, onContinue: t, showRewardAd: n.model.offerX3() }, e.props); n.dispatch(o.UIEvents.POPUP, { id: e.id, props: a }); }), ]; case 1: return (t = i.sent()), a.log.debug("win reward collected", t), [2]; } }); }); }), r.__decorate([(0, l.inject)(u.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.GameModel && s.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, l.injectable)()], t)) ); })(i.Action); t.ShowWinPopupAction = c; }, 73704: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StageEndAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(6585), s = n(47166), u = n(16638), l = n(78620), c = n(25417), d = n(22674), h = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, a; return ( r.__extends(t, e), (t.prototype.launch = function (e) { var t, n, o; return ( void 0 === e && (e = !1), r.__awaiter(this, void 0, void 0, function () { var a, u, d, h, p; return r.__generator(this, function (r) { switch (r.label) { case 0: return (a = this.model), (u = a.meta), (d = a.cookie), (h = a.social), (p = a.currentContinent), d.absoluteTryNum++, (this.social.me.scoreSession = Math.round(p.getTotalScore())), [4, null === (t = i.di.get(l.TypesGame.actions.tournamentPostScore)) || void 0 === t ? void 0 : t.run()]; case 1: return r.sent(), null === (n = i.di.get(l.TypesGame.actions.updateBotLevelAction)) || void 0 === n || n.run(e), h.inSolo ? (e ? [4, this.winSolo()] : [3, 3]) : [3, 5]; case 2: return r.sent(), [3, 4]; case 3: this.dispatch(s.UIEvents.POPUP, { id: c.PopupType.LOSE, props: { coins: u.getReward() * u.loseMultiplier } }), (r.label = 4); case 4: return [3, 8]; case 5: return [4, null === (o = i.di.get(l.TypesGame.actions.battleResultsPopup)) || void 0 === o ? void 0 : o.run(e)]; case 6: return r.sent(), [4, this.levelNext.run()]; case 7: r.sent(), (r.label = 8); case 8: return [2]; } }); }) ); }), (t.prototype.winSolo = function () { var e, t; return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (n) { switch (n.label) { case 0: return [4, null === (e = i.di.get(l.TypesGame.actions.winPopup)) || void 0 === e ? void 0 : e.run({ id: c.PopupType.WIN_STAGE, props: { showRewardAd: this.model.offerX3() } })]; case 1: return n.sent(), [4, null === (t = i.di.get(l.TypesGame.actions.giftPopup)) || void 0 === t ? void 0 : t.run()]; case 2: return n.sent(), [4, this.levelNext.run()]; case 3: return n.sent(), [2]; } }); }); }), (t.prototype.needToShowAD = function () { return !1; }), r.__decorate([(0, d.inject)(l.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, d.inject)(o.TypesFlow.LevelNext), r.__metadata("design:type", "function" == typeof (a = void 0 !== i.Action && i.Action) ? a : Object)], t.prototype, "levelNext", void 0), (t = r.__decorate([(0, d.injectable)()], t)) ); })(a.SocialFlowAction); t.StageEndAction = h; }, 9990: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StartGameAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = n(78620), s = n(16638), u = n(57228), l = n(37394), c = n(36939), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, d, h; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, this.social.showBotPopup()]; case 1: return e.sent(), [4, this.levelNext.run()]; case 2: return e.sent(), (0, i.lazyGet)(a.TypesGame.actions.bannerControllerGameDistribution), [2]; } }); }); }), r.__decorate([(0, o.inject)(a.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.GameModel && s.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, o.inject)(l.TypesSocial.model), r.__metadata("design:type", "function" == typeof (d = void 0 !== u.ISocial && u.ISocial) ? d : Object)], t.prototype, "social", void 0), r.__decorate([(0, o.inject)(l.TypesFlow.LevelNext), r.__metadata("design:type", "function" == typeof (h = void 0 !== c.LevelNextActionSIO && c.LevelNextActionSIO) ? h : Object)], t.prototype, "levelNext", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.StartGameAction = d; }, 43758: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SubmitContextScoreAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(16638), s = n(78620), u = n(22674), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, void 0, function () { var e, t, n, a; return r.__generator(this, function (r) { return (e = this.model), e.meta, (t = e.social), (n = e.currentContinent), t.context_id && !t.inSolo && (null == (a = (0, i.lazyGet)(o.TypesSocial.leaderboardContext)) || a.submit(t.me.scoreContext + 1, n.getHistory())), [2]; }); }); }), r.__decorate([(0, u.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.GameModel && a.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, u.injectable)()], t)) ); })(i.Action); t.SubmitContextScoreAction = l; }, 74962: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UpdateBotLevelAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(17905), u = n(78620), l = n(67768), c = n(22674), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return ( void 0 === e && (e = !1), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return this.social.inSolo ? [4, this.updateBot(e)] : [3, 2]; case 1: return t.sent(), [3, 3]; case 2: s.log.warn("Bot level updates only in solo mode."), (t.label = 3); case 3: return [2]; } }); }) ); }), (t.prototype.updateBot = function (e) { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { return this.botPresetsModel.updateBotLevel(e), [2]; }); }); }), r.__decorate([(0, c.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], t.prototype, "social", void 0), r.__decorate([(0, c.inject)(u.TypesGame.botPresetsModel), r.__metadata("design:type", "function" == typeof (i = void 0 !== l.BotPresetsModel && l.BotPresetsModel) ? i : Object)], t.prototype, "botPresetsModel", void 0), (t = r.__decorate([(0, c.injectable)()], t)) ); })(i.Action); t.UpdateBotLevelAction = d; }, 1475: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TournamentCreateAction = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(22674), s = n(78620), u = n(16638), l = n(57228), c = n(37394), d = n(30627), h = n(940), p = n(3416), f = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, o, f, _, g; return ( r.__extends(t, e), (n = t), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n, o, a, s, u; return r.__generator(this, function (r) { switch (r.label) { case 0: return "fb" !== this.social.socialPlatform ? [2, !1] : ((e = this.model.currentContinent), (n = (t = FBInstant.tournament).createAsync), (s = { initialScore: e.getTotalScore(), data: e.getHistory() }), (u = { title: e.data.id }), (a = (o = this.rootView.app.renderer.extract).base64), [4, this.generateTournamentImage(this.model.currentContinent)]); case 1: return [ 4, n .apply(t, [((s.config = ((u.image = a.apply(o, [r.sent()])), u)), s)]) .then(function () { return !0; }) .catch(function (e) { return i.log.warn("FBInstant.tournament.createAsync", e), !1; }), ]; case 2: return [2, r.sent()]; } }); }); }), (t.prototype.generateTournamentImage = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, i, o, a, s, u; return r.__generator(this, function (r) { switch (r.label) { case 0: return (t = new h.Container()), (i = new h.Graphics().beginFill(13684944).drawRect(0, 0, n.POST_WIDTH, n.POST_HEIGHT)), t.addChild(i), [4, this.createMapAction.run({ activeStage: e.stageLevel, data: e.data })]; case 1: return (o = r.sent()), (a = 0.9 * i.width), (s = 0.9 * i.height), (u = this.aspectFactor(o.width, o.height, a, s)), (o.width *= u), (o.height *= u), (o.x = 0.5 * (i.width - o.width)), (o.y = 0.5 * (i.height - o.height)), t.addChild(i, o), [2, t]; } }); }); }), (t.prototype.aspectFactor = function (e, t, n, r) { return e / t >= n / r ? n / e : r / t; }), (t.POST_WIDTH = 680), (t.POST_HEIGHT = 340), r.__decorate([(0, a.inject)(c.Types2D.rootView), r.__metadata("design:type", "function" == typeof (o = void 0 !== d.RootView && d.RootView) ? o : Object)], t.prototype, "rootView", void 0), r.__decorate([(0, a.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (f = void 0 !== u.GameModel && u.GameModel) ? f : Object)], t.prototype, "model", void 0), r.__decorate([(0, a.inject)(c.TypesSocial.model), r.__metadata("design:type", "function" == typeof (_ = void 0 !== l.ISocial && l.ISocial) ? _ : Object)], t.prototype, "social", void 0), r.__decorate([(0, a.inject)(s.TypesGame.actions.createMap), r.__metadata("design:type", "function" == typeof (g = void 0 !== p.GenerateMapSpriteAction && p.GenerateMapSpriteAction) ? g : Object)], t.prototype, "createMapAction", void 0), (t = n = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.TournamentCreateAction = f; }, 93357: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TournamentPostScoreAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(17905), u = n(16638), l = n(78620), c = n(22674), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e; return r.__generator(this, function (t) { return ( "fb" !== this.social.socialPlatform || ((e = this.model.currentContinent), FBInstant.tournament.postScoreAsync(e.getTotalScore()).catch(function (e) { return s.log.warn("FBInstant.tournament.postScoreAsync", e); })), [2] ); }); }); }), r.__decorate([(0, c.inject)(l.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, c.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (i = void 0 !== a.ISocial && a.ISocial) ? i : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, c.injectable)()], t)) ); })(i.Action); t.TournamentPostScoreAction = d; }, 14285: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TournamentShareAction = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(22674), s = n(78620), u = n(16638), l = n(37394), c = n(57228), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, o; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return "fb" !== this.social.socialPlatform ? [2, !1] : ((e = this.model.currentContinent), [ 4, FBInstant.tournament .shareAsync({ score: e.getTotalScore(), data: e.getHistory() }) .then(function () { return !0; }) .catch(function (e) { return i.log.warn("FBInstant.tournament.createAsync", e), !1; }), ]); case 1: return [2, t.sent()]; } }); }); }), r.__decorate([(0, a.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameModel && u.GameModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, a.inject)(l.TypesSocial.model), r.__metadata("design:type", "function" == typeof (o = void 0 !== c.ISocial && c.ISocial) ? o : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.TournamentShareAction = d; }, 1413: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(1475), t), r.__exportStar(n(93357), t), r.__exportStar(n(14285), t); }, 36373: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelCompletedPopupActionYoutube = void 0); var r = n(22970), i = n(46595), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.LevelCompletedPopupActionYoutube = a; }, 70789: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SIOConstants = void 0), (t.SIOConstants = { INTER: "159047249520140_192930072798524", REWARD: "159047249520140_192930196131845", BANNER_PLACEMENT: "159047249520140_192929926131872", PLACEMENTS: {}, CLAIM_FACTOR: 3, BANNER_HEIGHT: 70, MAX_REWARD_CAP_IN_MS: 432e5, MIN_OFFLINE_EARNINGS_PERIOD_IN_MIN: 5, COINS_REWARD_FOR_INVITE: 1e3, REWARD_AD_PLAYED: new Map(), IN_GAME_AUDIO_CONTROL_ALLOWED: !0, REWARDED_AD_ALLOWED: !0, INTER_AD_ALLOWED: !0, OFFLINE_EARNINGS_ALLOWED: !0, HARD_VERSION: "30082023" }); }, 87115: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoreGameModule = void 0); var r = n(22970), i = n(37394), o = n(30627), a = n(46595), s = n(76431), u = n(16638), l = n(68606), c = n(78620), d = n(22674), h = n(79295), p = n(9305), f = n(39833), _ = n(59248), g = n(45117), m = n(90418), v = n(97725), y = n(13631), C = r.__importDefault(n(86352)), b = n(29157), w = n(41368), S = n(23678), T = n(35139), x = n(7687), E = n(41245), L = n(47268), A = n(85928), I = n(62471), M = n(92731), P = n(50657), O = n(36939), k = n(13169), R = n(40511), D = n(3806), N = n(46598), B = n(40424), F = n(70600), U = n(76713), j = (n(97214), n(57228), n(73704)), G = n(23909), H = n(43758), V = (n(70789), n(88765)), Z = n(33404), z = n(86322), Y = n(81599), W = n(767), X = n(3416), q = n(53679), K = n(24635), $ = n(79153), J = n(80921), Q = n(90976), ee = n(59437), te = n(9990), ne = n(1413), re = n(80367), ie = n(67768), oe = n(74962); (0, d.decorate)((0, d.injectable)(), x.Entity), (0, d.decorate)((0, d.injectable)(), p.InputManagerBase), (t.CoreGameModule = new d.ContainerModule(function (e, t, n, r) { e(c.TypesGame.actions.startGame).to(te.StartGameAction), e(c.TypesGame.actions.giftPopup).to(K.ShowGiftPopupAction), e(c.TypesGame.actions.levelCompletePopup).to(J.LevelCompletedPopupAction), e(c.TypesGame.actions.battleResultsPopup).to(Q.BattleResultsPopupAction), e(c.TypesGame.actions.tournamentReShare).to(ne.TournamentShareAction), e(c.TypesGame.actions.tournamentCreate).to(ne.TournamentCreateAction), e(c.TypesGame.actions.tournamentPostScore).to(ne.TournamentPostScoreAction), e(c.TypesGame.actions.winPopup).to($.ShowWinPopupAction), e(c.TypesGame.actions.loadLevel).to(ee.LoadLevelAction), e(c.TypesGame.spritesPool).to(z.SpritesPool).inSingletonScope(), e(c.TypesGame.model).to(u.GameModel).inSingletonScope(), e(c.TypesGame.levelModel).to(l.ContinentModel), e(c.TypesGame.botLogic).to(D.BotLogic), e(c.TypesGame.botCalculationLogic).to(N.BotCalculationLogic), r(i.TypesFlow.LevelStart).to(s.LevelStartActionSIO), r(i.TypesFlow.LevelRestart).to(P.LevelRestartActionSIO), r(i.TypesFlow.LevelNext).to(O.LevelNextActionSIO), r(i.TypesFlow.LevelEnd).to(R.LevelEndActionSIO), r(i.TypesFlow.PlayWith).to(G.PlayWithOpponentActionSIO), e(c.TypesGame.actions.endStage).to(j.StageEndAction), e(c.TypesGame.actions.submitContextScore).to(H.SubmitContextScoreAction), e(o.ProgressBar).toSelf(), r(i.Types2D.rootView) .to(C.default) .inSingletonScope() .onActivation((0, o.bindMediator)(k.RootMediator)), r(i.Types2D.screenShotAction).to(Z.ScreenShotActionSIO), e(Y.DestroyFieldAction).toSelf(), e(B.FighterDeathEffectAction).toSelf(), e(c.TypesGame.actions.createMapPart).to(W.GenerateMapShapeAction), e(c.TypesGame.actions.createMap).to(X.GenerateMapSpriteAction), e(V.GenerateShareImageAction).toSelf(), e(M.MetaModel).toSelf().inSingletonScope(), e(c.TypesGame.cookieModel).to(F.CookieModel).inSingletonScope(), e(U.TutorialFingerView).toSelf(), e(T.Building).toSelf(), e(E.Field).toSelf(), e(L.Spawner).toSelf(), e(A.Fighter).toSelf(), e(re.SetCalculatedConstantValuesAction).toSelf(), e(c.TypesGame.views.fieldClass) .to(v.FieldView) .onActivation((0, o.bindMediator)(f.FieldMediator)), e(c.TypesGame.views.fighter).to(I.FighterView), e(c.TypesGame.views.state).to(b.CapitalView), e(c.TypesGame.views.stateShape).to(y.StateShapeView), e(c.TypesGame.views.population).to(w.Population), e(c.TypesGame.views.arrow).to(m.ArrowView), e(c.TypesGame.views.arrows) .to(g.ArrowsView) .onActivation((0, o.bindMediator)(_.ArrowsMediator)), e(c.TypesGame.actions.burst).to(S.BurstWaveAction), e(c.TypesGame.skinManager).to(q.SkinManager).inSingletonScope(), e(c.TypesGame.inputManager) .to(h.InputManager) .inSingletonScope() .onActivation(function (e, t) { return t.init(document.getElementById(a.CANVAS_ID)); }), e(c.TypesGame.botPresetsModel).to(ie.BotPresetsModel).inSingletonScope(), e(c.TypesGame.actions.updateBotLevelAction).to(oe.UpdateBotLevelAction).inSingletonScope(); })); }, 73218: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameEvents = void 0), (t.GameEvents = { RESIZE: "GameEvents.RESIZE", STATS_UPDATED: "GameEvents.STATS_UPDATED", STATE_CHANGED: "GameModel.STATE_CHANGED", LEVEL_LOADED: "GameModel.LEVEL_LOADED", RESTART_LEVEL: "GameModel.RESTART_LEVEL", AIM_CREATE: "AIM_CREATE", AIM_REMOVE: "AIM_REMOVE", AIM_HIDE: "AIM_HIDE", AIM_SET: "AIM_SET", AIM_UPDATE: "AIM_UPDATE", COINS_UPDATED: "COINS_UPDATED", SELECTABLE_ITEM_CHANGED: "SELECTABLE_ITEM_CHANGED" }); }, 23678: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BurstWaveAction = void 0); var r = n(22970), i = r.__importStar(n(75899)), o = n(46595), a = n(85928), s = n(16638), u = n(78620), l = n(22674), c = n(75205), d = n(79207), h = n(49088), p = n(47268), f = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n, o, s, u, l, f, _; return r.__generator(this, function (g) { for ( t = e.amount, n = e.target, o = e.spawner, s = 1 / (p.Spawner.UNITS_PER_WAVE - 1), u = Math.ceil(t), 1, l = function (e) { var u = e % 2 == 0 ? 0.5 - s * Math.ceil(e / 2) : 0.5 + s * Math.ceil(e / 2), l = 1; t < 1 ? (l = t) : (t -= 1); var p = o.selfBuilding; if (p === n) return i.captureMessage("BurstWaveAction. from === target – logical mistake"), { value: void 0 }; var f = p.get(c.PathHolder), _ = []; if (f) { var g = f.get(n); if (!g) return i.captureMessage("BurstWaveAction. Path is undefined, something weren't disposed properly"), { value: void 0 }; _ = g.map(function (e) { return h.math.lerp.apply(h.math, r.__spreadArray(r.__spreadArray([], r.__read(e), !1), [u], !1)); }); } var m = 1 * a.Fighter.NORMAL_SPEED, v = d.FighterGroupsSystem.CreateNewGroup(_, m, p.owner, n, p); d.FighterGroupsSystem.AddFighterToGroup(v, new a.Fighter(p.owner, p, n, u, _, l, m, 1)); }, f = 0; f < u; f++ ) if ("object" == typeof (_ = l(f))) return [2, _.value]; return [2]; }); }); }), r.__decorate([(0, l.inject)(u.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.GameModel && s.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, l.injectable)()], t)) ); })(o.Action); t.BurstWaveAction = f; }, 81599: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DestroyFieldAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = n(78620), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e; return r.__generator(this, function (t) { return i.di.isBound(a.TypesGame.views.fieldInstance) && (null == (e = i.di.get(a.TypesGame.views.fieldInstance)) || e.parent.removeChild(e), i.di.unbind(a.TypesGame.views.fieldInstance)), [2]; }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.DestroyFieldAction = s; }, 40424: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FighterDeathEffectAction = void 0); var r = n(22970), i = n(64770), o = n(17905), a = n(46595), s = n(22674), u = n(940), l = n(62471), c = n(78620), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { var t; return r.__awaiter(this, void 0, void 0, function () { var n, s, d; return r.__generator(this, function (r) { for ( n = function (n) { var r = e[n], d = e[n + 1], h = r.get(l.FighterView), p = d.get(l.FighterView), f = h.position, _ = p.position, g = s.skull; (g.tint = o.Random.from(r.color, d.color)), (g.width = h.width), g.pivot.set(0.5), g.scale.set(0.15), g.position.set((f.x + _.x) / 2, (f.y + _.y) / 2); var m = new u.Point((f.x + _.x) / 2, (f.y + _.y) / 2), v = m.clone(), y = g.scale.clone(); (y.x *= 2), (y.y *= 2), (v.y -= 5 * g.height), i.gsap .timeline() .fromTo(g, { x: m.x, y: m.y, alpha: 0 }, { x: v.x, y: v.y, alpha: 0.5 }) .add( i.gsap.to(g.scale, { x: y.x, y: y.y, onComplete: function () { var e; null === (e = g.parent) || void 0 === e || e.removeChild(g); }, }), 0 ) .add(i.gsap.to(g, { alpha: 0 }), 0.3), null === (t = (0, a.lazyGet)(c.TypesGame.views.fieldInstance)) || void 0 === t || t.addChild(g); }, s = this, d = 0; d < e.length; d += 2 ) n(d); return [2]; }); }); }), r.__decorate([(0, s.inject)("skull.svg"), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.Sprite && u.Sprite) ? n : Object)], t.prototype, "skull", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(a.Action); t.FighterDeathEffectAction = d; }, 767: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GenerateMapShapeAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = r.__importDefault(n(15063)), s = n(940), u = n(37394), l = n(30627), c = n(86322), d = n(78620), h = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i, o, u, l, c, d, h, p = this; return r.__generator(this, function (f) { switch (f.label) { case 0: return ( (t = e.shapes), (n = void 0 === e.keepCache || e.keepCache), (null == t ? void 0 : t.length) ? ((i = 1 / 0), (o = 1 / 0), (u = []), [ 4, Promise.all( t.map(function (t, s) { return r.__awaiter(p, void 0, void 0, function () { var l, c, d, h; return r.__generator(this, function (p) { switch (p.label) { case 0: return (l = r.__read((0, a.default)(t), 2)), (c = l[0]), (d = l[1]), (i = Math.min(i, c)), (o = Math.min(o, d)), [4, this.spritesPool.createShape("".concat(e.id).concat(s > 0 ? s : ""), t, n)]; case 1: return (h = p.sent()), u.push([c, d]), [2, h]; } }); }); }) || [] ), ]) : [3, 2] ); case 1: return ( (l = f.sent()), (c = new s.Sprite()), l.forEach(function (e, t) { var n = u[t], a = r.__read(n, 2), s = a[0], l = a[1]; e.position.set(s - i, l - o), c.addChild(e); }), (d = this.rootView.app.renderer.generateTexture(c, s.SCALE_MODES.LINEAR, window.devicePixelRatio)), (h = new s.Sprite(d)).position.set(i, o), !n && l.forEach(function (e) { return s.Texture.removeFromCache(e.texture); }), s.Texture.removeFromCache(d), [2, h] ); case 2: return [2, new s.Sprite(s.Texture.EMPTY)]; } }); }); }), r.__decorate([(0, o.inject)(u.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== l.RootView && l.RootView) ? n : Object)], t.prototype, "rootView", void 0), r.__decorate([(0, o.inject)(d.TypesGame.spritesPool), r.__metadata("design:type", "function" == typeof (i = void 0 !== c.SpritesPool && c.SpritesPool) ? i : Object)], t.prototype, "spritesPool", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.GenerateMapShapeAction = h; }, 3416: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GenerateMapSpriteAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = n(940), s = n(37394), u = n(30627), l = n(78620), c = n(767), d = n(49088), h = n(18184), p = n(86322), f = n(70600), _ = n(53679), g = n(17905), m = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i, m, v, y; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i = this; return r.__generator(this, function (o) { switch (o.label) { case 0: return ( (t = []), e.data.stages.forEach(function (n, o) { n.states.map(function (n) { return r.__awaiter(i, void 0, void 0, function () { var i, a; return r.__generator(this, function (r) { return (i = "sprite-".concat(e.data.id, "-").concat(n.id)), (a = this.getPlayerColor(o)), t.push(this.createStateSprite(i, n, a)), [2]; }); }); }); }), [4, Promise.all(t)] ); case 1: return (n = o.sent()), [2, this.mergeSprites(n, e.area)]; } }); }); }), (t.prototype.fit = function (e, t) { var n = this.aspectFactor(e.width, e.height, t.width, t.height); (e.width *= n), (e.height *= n); }), (t.prototype.aspectFactor = function (e, t, n, r) { return e / t >= n / r ? n / e : r / t; }), (t.prototype.mergeSprites = function (e, t) { var n = new a.Sprite(); n.addChild.apply(n, r.__spreadArray([], r.__read(e), !1)), t ? (this.fit(n, t), g.log.debug("mergeSprites", t.width, t.height)) : (t = n.getLocalBounds()); var i = { width: t.width, height: t.height }, o = a.RenderTexture.create(i); this.rootView.app.renderer.render(n, o); var s = new a.Sprite(o); return a.Texture.removeFromCache(o), s; }), (t.prototype.createStateSprite = function (e, t, n) { return r.__awaiter(this, void 0, void 0, function () { var i, o, s, u, l, c, h, p; return r.__generator(this, function (f) { switch (f.label) { case 0: return [4, this.createMapPart.run({ id: e, shapes: t.shapes })]; case 1: return ( (i = f.sent()), (o = new a.Sprite()), (s = t.radius || 20), (u = this.spritesPool.fromDisplayObject("base".concat(s, "-static"), function () { return new a.Graphics().beginFill(16777215).drawCircle(0, 0, s).endFill(); })).anchor.set(0.5), u.position.set(t.x, t.y), (l = r.__read(n, 3)), (c = l[0]), (h = l[1]), (p = l[2]), (i.tint = d.color.fromHex(c)), (u.tint = d.color.fromHex(p || h)), o.addChild(i), o.addChild(u), [2, o] ); } }); }); }), (t.prototype.getPlayerColor = function (e) { var t; return void 0 === e && (e = 0), e <= (null === (t = this.data) || void 0 === t ? void 0 : t.activeStage) ? this.skinManager.getColorBy(h.PlayerType.First) : this.skinManager.getColorBy(h.PlayerType.Neutral); }), r.__decorate([(0, o.inject)(l.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (n = void 0 !== f.CookieModel && f.CookieModel) ? n : Object)], t.prototype, "cookies", void 0), r.__decorate([(0, o.inject)(l.TypesGame.skinManager), r.__metadata("design:type", "function" == typeof (i = void 0 !== _.SkinManager && _.SkinManager) ? i : Object)], t.prototype, "skinManager", void 0), r.__decorate([(0, o.inject)(s.Types2D.rootView), r.__metadata("design:type", "function" == typeof (m = void 0 !== u.RootView && u.RootView) ? m : Object)], t.prototype, "rootView", void 0), r.__decorate([(0, o.inject)(l.TypesGame.spritesPool), r.__metadata("design:type", "function" == typeof (v = void 0 !== p.SpritesPool && p.SpritesPool) ? v : Object)], t.prototype, "spritesPool", void 0), r.__decorate([(0, o.inject)(l.TypesGame.actions.createMapPart), r.__metadata("design:type", "function" == typeof (y = void 0 !== c.GenerateMapShapeAction && c.GenerateMapShapeAction) ? y : Object)], t.prototype, "createMapPart", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.GenerateMapSpriteAction = m; }, 33404: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ScreenShotActionSIO = void 0); var r = n(22970), i = n(37394), o = n(30627), a = n(46595), s = n(22674), u = n(940), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { var t = e.image, n = e.imageScale, i = void 0 === n ? 0.5 : n; return r.__awaiter(this, void 0, Promise, function () { var e, n, o, a; return r.__generator(this, function (r) { return (e = this.root.app.renderer), t || (t = this.root.app.stage), (n = u.RenderTexture.create({ width: t.width * i, height: t.height * i })), e.render(t, n, !1, new u.Matrix(i, 0, 0, i)), (o = new u.Sprite(n)), (a = e.extract.base64(o, "image/webp")), u.Texture.removeFromCache(n), [2, a]; }); }); }), r.__decorate([(0, s.inject)(i.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== o.RootView && o.RootView) ? n : Object)], t.prototype, "root", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(a.Action); t.ScreenShotActionSIO = l; }, 14791: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameConstants = void 0), (t.GameConstants = { StartScreen: { focusHeightFactor: 0.45 }, LevelCompletedScreenShot: { titleFontStyle: { fontSize: 36, fill: ["#9dfd6c"], lineHeight: 54 }, subTitleFontStyle: { fontSize: 18, fill: ["#9dfd6c"], lineHeight: 18 }, scoreFontStyle: { fontSize: 27, fontWeight: "bold", fill: ["#4A74C6"], lineHeight: 20 }, scoreBarStyle: { color: 16777215, width: 120, height: 40, radius: 40 * 0.47 }, layoutSettings: { titleOffsetY: 90, subtitleOffsetY: -50, avatarOffsetY: 209, avatarWidth: 134, avatarHeight: 134, avatarImageYOffset: 18, avatarRadius: 67, badgeOffsetY: 137, winRaysOffsetY: -154, maxWidth: 640, fieldOffsetY: 241 } } }); }, 3806: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BotLogic = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(38694), s = n(78620), u = n(22674), l = n(46598), c = (function () { function e(e, t) { void 0 === e && (e = 1e3), void 0 === t && (t = Date.now()), (this.delayMs = e), (this._startTime = t); } return ( Object.defineProperty(e.prototype, "running", { get: function () { return Date.now() - this._startTime < this.delayMs; }, enumerable: !1, configurable: !0, }), e ); })(), d = (function () { function e() { (this._lastCalculationTimestamp = Date.now()), (this._sendingDelay = { x: 0.1, y: 0.5 }), (this._executingDecision = !1); } var t; return ( Object.defineProperty(e.prototype, "initialized", { get: function () { return void 0 !== this._preset; }, enumerable: !1, configurable: !0, }), (e.prototype.init = function (e) { return (this._preset = e), this._logic.init(this._preset), this; }), (e.prototype.decide = function (e) { if (this._preset && ((this._building = e), this._startDelay || (this._startDelay = new c(1e3 * i.Random.range(3))), !this._startDelay.running && !this._logic.busy)) return this.isReadyForNextDecision && ((this._lastCalculationTimestamp = Date.now()), this._logic.calculate(e), (this._executingDecision = !1)), this._logic.getLastCommand(); }), (e.prototype.executeDecision = function (e) { var t = this; if (!this._executingDecision) if (e.Type === a.DecisionType.Move) { (this._executingDecision = !0), r.__awaiter(t, void 0, void 0, function () { var t, n, a, s, u, l, c, d; return r.__generator(this, function (h) { switch (h.label) { case 0: (t = e.Subject), (n = e.Objects), (h.label = 1); case 1: h.trys.push([1, 6, 7, 8]), (a = r.__values(n)), (s = a.next()), (h.label = 2); case 2: return s.done ? [3, 5] : (u = s.value) == t || u.owner !== this._building.owner ? [3, 4] : (this._building.sendTo(t), [4, o.WaitAction.sec(i.Random.rangeFloat(this._sendingDelay.x, this._sendingDelay.y))]); case 3: if ((h.sent(), !this._executingDecision)) return [3, 5]; h.label = 4; case 4: return (s = a.next()), [3, 2]; case 5: return [3, 8]; case 6: return (l = h.sent()), (c = { error: l }), [3, 8]; case 7: try { s && !s.done && (d = a.return) && d.call(a); } finally { if (c) throw c.error; } return [7]; case 8: return (this._executingDecision = !1), [2]; } }); }); } else i.log.info("executeDecision", a.DecisionType[e.Type]); }), Object.defineProperty(e.prototype, "isReadyForNextDecision", { get: function () { return Date.now() - this._lastCalculationTimestamp >= 1e3 * this._preset.waitTimeBetweenDecisions; }, enumerable: !1, configurable: !0, }), (e.prototype.terminate = function () { this._logic.terminate(); }), r.__decorate([(0, u.inject)(s.TypesGame.botCalculationLogic), r.__metadata("design:type", "function" == typeof (t = void 0 !== l.BotCalculationLogic && l.BotCalculationLogic) ? t : Object)], e.prototype, "_logic", void 0), (e = r.__decorate([(0, u.injectable)()], e)) ); })(); t.BotLogic = d; }, 75205: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PathHolder = void 0); var n = (function () { function e() { this._cachedWays = new Map(); } return ( (e.prototype.addPath = function (e, t) { this._cachedWays.set(e.stateId, t); }), (e.prototype.get = function (e) { return this._cachedWays.get(e.stateId); }), (e.prototype.getPath = function (e) { return this._cachedWays.get(e); }), (e.prototype.getPathWidth = function () { return e.MAX_SPAWN_LEN_ONE_DIRECTION; }), (e.prototype.clearCache = function () { this._cachedWays.clear(); }), (e.MAX_SPAWN_LEN_ONE_DIRECTION = 30), e ); })(); t.PathHolder = n; }, 77016: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BState = void 0); var n = (function () { function e(e, t, n) { (this.buildings = e), (this.groups = t), (this.timestamp = n); } return ( (e.prototype.clone = function () { return new e(this.buildings, this.groups, this.timestamp); }), e ); })(); t.BState = n; }, 46598: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BotCalculationLogic = void 0); var r = n(22970), i = n(17905), o = n(49088), a = n(38694), s = n(18184), u = n(16638), l = n(41368), c = n(47268), d = n(78620), h = n(22674), p = n(35139), f = n(79207), _ = n(75205), g = n(21569), m = n(77016), v = n(43887), y = n(19317), C = function (e, t) { var n, i; try { for (var o = r.__values(e), a = o.next(); !a.done; a = o.next()) { var s = a.value; if (s.Id === t) return s; } } catch (e) { n = { error: e }; } finally { try { a && !a.done && (i = o.return) && i.call(o); } finally { if (n) throw n.error; } } }, b = function (e, t, n) { var r = n * t; return o.math.clamp(r, 0, e); }, w = function (e, t) { var n = function (e) { return e.Owner === t; }, r = function (e, t) { return t + e; }; return ( e.buildings .filter(n) .map(function (e) { return e.CurrentPopulation; }) .reduce(r, 0) + e.groups .filter(n) .map(function (e) { return e.Amount; }) .reduce(r, 0) ); }, S = (function () { function e() {} var t; return ( (e.prototype.init = function (e) { this._preset = e; }), (e.prototype.calculate = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return (t = e.owner), (this._owner = t), [4, this._calculationPromise || (this._calculationPromise = this._calculate())]; case 1: return n.sent(), delete this._calculationPromise, [2]; } }); }); }), (e.prototype._calculate = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n, o, a, s, u, l, c, d, h, p = this; return r.__generator(this, function (f) { switch (f.label) { case 0: (this._initialWaitPromise = new Promise(function (e, t) { (p._rejectInitialPromise = t), setTimeout(e, i.Random.rangeFloat(0, 3e3)); })), (f.label = 1); case 1: return f.trys.push([1, 3, 4, 5]), [4, this._initialWaitPromise]; case 2: return f.sent(), [3, 5]; case 3: return f.sent(), [2]; case 4: return delete this._initialWaitPromise, delete this._rejectInitialPromise, [7]; case 5: (e = this.generateStartState()), (t = v.CommandsGenerator.GeneratePossibleCommands(e, this._owner, this._preset)), (n = []), (o = 0), (f.label = 6); case 6: return o < t.length ? [4, this.calculateCommandScore(e, t[o])] : [3, 9]; case 7: (a = f.sent()), n.push({ index: o, score: a }), (f.label = 8); case 8: return o++, [3, 6]; case 9: return ( (s = n.sort(function (e, t) { return t.score - e.score; })), (u = r.__read(this._preset.commandInDecisionOrder, 2)), (l = u[0]), (c = u[1]), (d = i.Random.range(Math.min(l, n.length - 1), Math.min(c, n.length))), (h = s[d].index), (this._lastCommand = t[h]), [2] ); } }); }); }), (e.prototype.calculateCommandScore = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n, i, o, u, l, c, d; return r.__generator(this, function (r) { for (n = this._preset, i = n.traceDuration, o = n.stepDuration, u = this.executeCommand(e, t), l = NaN, c = 0; c <= i; c += o) this.traceState(u, o), isNaN(l) && this.isTargetReached(u, t) && (l = c); return (d = this.CalculateStateScore(e, u, l)), t.Type == a.DecisionType.Move && t.Subject.Owner == s.PlayerType.Neutral && (d *= 2), [2, d]; }); }); }), (e.prototype.CalculateStateScore = function (e, t, n) { var r = this, i = w(e, this._owner), a = ((w(t, this._owner) - i) / (0 == i ? 1 : i)) * this._preset.forcesBalanceFactor, s = e.buildings.filter(function (e) { return e.Owner == r._owner; }).length, u = a + ((t.buildings.filter(function (e) { return e.Owner == r._owner; }).length - s) / (0 == s ? 1 : s)) * this._preset.buildingsBalanceFactor; if (!isNaN(n)) { var l = 1 - o.math.remap(n, 0, t.timestamp, 0, 1); u += Math.abs(u) * this._preset.targetReachedTimeBoost * l; } return u; }), (e.prototype.generateStartState = function () { var e = []; this.model.currentContinent.buildings.forEach(function (t) { t.hasTag(p.Building.ACTIVE_TAG) && e.push(t.getSnapshot()); }); var t = Date.now(), n = f.FighterGroupsSystem.GetActiveGroups().map(function (e) { if (e.Source.has(c.Spawner)) { var n = new y.GroupModel(e.Owner, e.Speed, e.Amount, e.Path, e.Target.stateId, e.Source.stateId, 0, -1); return n.Init(e.StartTimestamp, (t - e.StartTimestamp) * e.Speed, e.BurstDelay, e.BurstWidth), n; } }); return new m.BState( e, n.filter(function (e) { return !!e; }), t ); }), (e.prototype.moveState = function (e, t) { var n = this, i = e.timestamp, a = e.buildings.slice(0), s = e.groups.slice(0), u = this.model.currentContinent.buildings.get(t.Subject.Id); return ( t.Objects.forEach(function (l) { var d = n.model.currentContinent.buildings .get(l.Id) .get(_.PathHolder) .getPath(u.stateId) .map(function (e) { return o.math.lerp.apply(o.math, r.__spreadArray(r.__spreadArray([], r.__read(e), !1), [0.5], !1)); }), h = o.math.clamp(l.CurrentPopulation - c.Spawner.UNITS_PER_WAVE, 0, c.Spawner.UNITS_PER_WAVE), p = l.CurrentPopulation - h, f = new y.GroupModel(l.Owner, l.FighterSpeed, p, d, t.Subject.Id, l.Id, 0, i); f.Init(e.timestamp, 0, l.BurstDelay, l.BurstWidth), s.push(f), (l.CurrentPopulation -= h), (l.LastActionTimestamp = i); for (var g = 0; g < a.length; g++) if (a[g].Id === l.Id) { a[g] = l; break; } }), new m.BState(a, s, i) ); }), (e.prototype.traceState = function (e, t) { var n = e.buildings.slice(0), r = e.groups.slice(0), i = e.timestamp + t; return this.calculateGroupsMoving(n, r, t), this.calculateBuildingsToGroupAmount(n, r, i), this.calculateGroupToBuildingsAmount(n, r, i), this.updateSpawnBuildings(n, i, t), new m.BState(n, r, i); }), (e.prototype.calculateGroupsMoving = function (e, t, n) { var i, o; try { for (var a = r.__values(t), s = a.next(); !s.done; s = a.next()) { var u = s.value; (u.Amount = this.CalculateTowersIntersectionAmount(e, u, n)), u.AccumPath(u.Speed * n); } } catch (e) { i = { error: e }; } finally { try { s && !s.done && (o = a.return) && o.call(a); } finally { if (i) throw i.error; } } if (this._preset.isConsiderGroupToGroupIntersection) { for (var l = new Array(t.length).fill(0), c = 0; c < t.length; c++) l[c] = this.CalculateGroupsIntersectionAmount(t, t[c], n); for (c = 0; c < t.length; c++) { var d = t[c]; (d.Amount = l[c]), (t[c] = d); } } }), (e.prototype.CalculateTowersIntersectionAmount = function (e, t, n) { var i, o, a, s, u = t.Amount; try { for (var l = r.__values(e), c = l.next(); !c.done; c = l.next()) { var d = c.value; if (!(d.Owner == t.Owner || d.AttackRate <= 0)) { var h = t.GenerateSegments(this._preset.fightersInSegment); try { for (var p = ((a = void 0), r.__values(h)), f = p.next(); !f.done; f = p.next()) { var _ = f.value; if (g.BotUtility.IsSegmentIntersectCircle(d.Position, d.AttackRadius, _)) { b(_.Amount, n, d.AttackRate); u -= b(_.Amount, n, d.AttackRate); } } } catch (e) { a = { error: e }; } finally { try { f && !f.done && (s = p.return) && s.call(p); } finally { if (a) throw a.error; } } } } } catch (e) { i = { error: e }; } finally { try { c && !c.done && (o = l.return) && o.call(l); } finally { if (i) throw i.error; } } return u; }), (e.prototype.CalculateGroupsIntersectionAmount = function (e, t, n) { var i, o, a, s, u, l, c = t.GenerateSegments(this._preset.fightersInSegment); try { for (var d = r.__values(e), h = d.next(); !h.done; h = d.next()) { var p = h.value; if (!(p.Owner == t.Owner || p.Amount <= 0)) for (var f = p.GenerateSegments(this._preset.fightersInSegment), _ = 0; _ < c.length; _++) try { for (var m = ((a = void 0), r.__values(f)), v = m.next(); !v.done; v = m.next()) { var y = v.value; if (g.BotUtility.IsSegmentIntersectSegment(c[_], y)) { c[_].Amount; c[_].Amount = ((u = c[_].Amount), (l = p.Amount), Math.max(u - l, 0)); } } } catch (e) { a = { error: e }; } finally { try { v && !v.done && (s = m.return) && s.call(m); } finally { if (a) throw a.error; } } } } catch (e) { i = { error: e }; } finally { try { h && !h.done && (o = d.return) && o.call(d); } finally { if (i) throw i.error; } } return c .map(function (e) { return e.Amount; }) .reduce(function (e, t) { return e + t; }, 0); }), (e.prototype.calculateBuildingsToGroupAmount = function (e, t, n) { var i, a; try { for (var s = r.__values(t), u = s.next(); !u.done; u = s.next()) { var l = u.value; if (n - l.LastBurstTimestamp >= l.BurstDelay) { var d = C(e, l.Source); if (!d) continue; if (((d.CurrentPopulation <= 0 || d.Owner != l.Owner) && (l.TargetAmount = 0), l.TargetAmount > 0)) { d.CurrentPopulation < l.TargetAmount && (l.TargetAmount = d.CurrentPopulation); var h = o.math.clamp(l.TargetAmount, 0, c.Spawner.UNITS_PER_WAVE); (l.Amount += h), (l.TargetAmount -= h), (l.LastBurstTimestamp = n), (d.CurrentPopulation -= h), (d.LastActionTimestamp = n); } } } } catch (e) { i = { error: e }; } finally { try { u && !u.done && (a = s.return) && a.call(s); } finally { if (i) throw i.error; } } }), (e.prototype.calculateGroupToBuildingsAmount = function (e, t, n) { var i, a; try { for (var s = r.__values(t), u = s.next(); !u.done; u = s.next()) { var d = u.value; if (d.IsReachedEnd && d.Amount > 0) { var h = C(e, d.Target); if (!h) continue; var p = o.math.clamp(d.Amount, 0, c.Spawner.UNITS_PER_WAVE); (d.Amount = Math.max(d.Amount - p, 0)), h.Owner == d.Owner ? (h.CurrentPopulation += p) : h.CurrentPopulation >= p ? (h.CurrentPopulation -= p) : ((h.Owner = d.Owner), (h.CurrentPopulation = p - h.CurrentPopulation + l.Population.SPAWN_AMOUNT_ON_OCCUPATION), (h.AttackRadius = 0), (h.AttackRate = 0), (h.SpawnLimit = this.model.meta.getBuildingPopulationLimit(d.Owner)), (h.SpawnRate = this.model.meta.getPopulationRate(d.Owner))), (h.LastActionTimestamp = n); } } } catch (e) { i = { error: e }; } finally { try { u && !u.done && (a = s.return) && a.call(s); } finally { if (i) throw i.error; } } }), (e.prototype.updateSpawnBuildings = function (e, t, n) { for (var r = 0; r < e.length; r++) { var i = e[r], o = t - i.LastActionTimestamp, a = Math.max(l.Population.BLOCK_POPULATION_SECONDS - o, 0), s = Math.max(n - a, 0), u = i.SpawnRate * s, c = Math.min(i.CurrentPopulation + u, i.SpawnLimit); (i.CurrentPopulation = c), (e[r] = i); } }), (e.prototype.isTargetReached = function (e, t) { var n, i, o = this; switch (t.Type) { case a.DecisionType.Upgrade: case a.DecisionType.MakeTower: case a.DecisionType.MakeBuilding: case a.DecisionType.Wait: return !0; case a.DecisionType.Move: var s = e.groups.slice(0), u = s.filter(function (e) { return ( e.Owner == o._owner && (function (e) { var n, i; try { for (var o = r.__values(t.Objects), a = o.next(); !a.done; a = o.next()) if (a.value.Id === e) return !0; } catch (e) { n = { error: e }; } finally { try { a && !a.done && (i = o.return) && i.call(o); } finally { if (n) throw n.error; } } return !1; })(e.Source) && e.Target == t.Subject.Id && 0 == e.CreationTimestamp ); }); try { for (var l = r.__values(u), c = l.next(); !c.done; c = l.next()) { if (c.value.IsReachedEnd) return !0; } } catch (e) { n = { error: e }; } finally { try { c && !c.done && (i = l.return) && i.call(l); } finally { if (n) throw n.error; } } return !1; default: throw new Error("ArgumentOutOfRangeException()"); } }), (e.prototype.executeCommand = function (e, t) { switch (t.Type) { case a.DecisionType.Move: return this.moveState(e, t); case a.DecisionType.Wait: return e.clone(); default: return e; } }), (e.prototype.getLastCommand = function () { var e = this._lastCommand; return delete this._lastCommand, e; }), Object.defineProperty(e.prototype, "busy", { get: function () { return !!this._calculationPromise; }, enumerable: !1, configurable: !0, }), (e.prototype.terminate = function () { var e; null === (e = this._rejectInitialPromise) || void 0 === e || e.call(null); }), r.__decorate([(0, h.inject)(d.TypesGame.model), r.__metadata("design:type", "function" == typeof (t = void 0 !== u.GameModel && u.GameModel) ? t : Object)], e.prototype, "model", void 0), (e = r.__decorate([(0, h.injectable)()], e)) ); })(); t.BotCalculationLogic = S; }, 21569: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BotUtility = void 0); var r = n(22970), i = n(49088), o = function (e) { this.Points = a.CalculateBounds(e.Center, e.Width, e.Height, e.Angle); }, a = (function () { function e() {} return ( (e.IsSegmentIntersectCircle = function (t, n, r) { return e.IsRectIntersectCircle(t, n, r.Center, r.Width, r.Height, r.Angle); }), (e.IsRectIntersectCircle = function (t, n, r, i, o, a) { var s = e.CalculateBounds(r, i, o, a); return e.IsPointInRectangle(t, s) || e.IsLineIntersectCircle(t, n, s[0], s[1]) || e.IsLineIntersectCircle(t, n, s[1], s[2]) || e.IsLineIntersectCircle(t, n, s[2], s[3]) || e.IsLineIntersectCircle(t, n, s[3], s[0]); }), (e.CalculateBounds = function (e, t, n, r) { var o = [], a = 0.5 * t, s = 0.5 * n, u = r * i.math.DEG2RAD; return (o[0] = i.math.rotateAround(e, [-a, s], u)), (o[1] = i.math.rotateAround(e, [a, s], u)), (o[2] = i.math.rotateAround(e, [a, -s], u)), (o[3] = i.math.rotateAround(e, [-a, -s], u)), o; }), (e.DrawBox = function (e) {}), (e.IsPointInRectangle = function (e, t) { var n = i.math.sub(t[0], e), r = i.math.sub(t[0], t[1]), o = i.math.sub(t[0], t[3]); return 0 <= i.math.dot(n, r) && i.math.dot(n, r) <= i.math.dot(r, r) && 0 <= i.math.dot(n, o) && i.math.dot(n, o) <= i.math.dot(o, o); }), (e.IsLineIntersectCircle = function (e, t, n, o) { var a = i.math.dist(e, n) <= t, s = i.math.dist(e, o) <= t, u = r.__read(n, 2), l = u[0], c = u[1], d = r.__read(o, 2), h = d[0], p = d[1], f = r.__read(e, 2), _ = h - l, g = p - c, m = ((f[0] - l) * _ + (f[1] - c) * g) / (_ * _ + g * g), v = [l + m * _, c + m * g], y = i.math.approximately(i.math.dist(n, v) + i.math.dist(o, v), i.math.dist(n, o)), C = i.math.dist(e, v) <= t; return (y && C) || a || s; }), (e.IsSegmentIntersectSegment = function (t, n) { return e.IsRectanglesIntersecting(new o(t), new o(n)); }), (e.IsRectanglesIntersecting = function (e, t) { var n, i, o, a, s, u, l = [e, t]; try { for (var c = r.__values(l), d = c.next(); !d.done; d = c.next()) for (var h = d.value, p = 0; p < h.Points.length; p++) { var f = (p + 1) % h.Points.length, _ = r.__read(h.Points[p], 2), g = _[0], m = _[1], v = r.__read(h.Points[f], 2), y = v[0], C = [v[1] - m, g - y], b = NaN, w = NaN; try { for (var S = ((o = void 0), r.__values(e.Points)), T = S.next(); !T.done; T = S.next()) { var x = T.value, E = r.__read(x, 2), L = E[0], A = E[1], I = r.__read(C, 2), M = I[0] * L + I[1] * A; (isNaN(b) || M < b) && (b = M), (isNaN(w) || M > w) && (w = M); } } catch (e) { o = { error: e }; } finally { try { T && !T.done && (a = S.return) && a.call(S); } finally { if (o) throw o.error; } } var P = NaN, O = NaN; try { for (var k = ((s = void 0), r.__values(t.Points)), R = k.next(); !R.done; R = k.next()) { x = R.value; var D = r.__read(x, 2), N = ((L = D[0]), (A = D[1]), r.__read(C, 2)); M = N[0] * L + N[1] * A; (isNaN(P) || M < P) && (P = M), (isNaN(O) || M > O) && (O = M); } } catch (e) { s = { error: e }; } finally { try { R && !R.done && (u = k.return) && u.call(k); } finally { if (s) throw s.error; } } if (w < P || O < b) return !1; } } catch (e) { n = { error: e }; } finally { try { d && !d.done && (i = c.return) && i.call(c); } finally { if (n) throw n.error; } } return !0; }), e ); })(); t.BotUtility = a; }, 43887: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CommandsGenerator = void 0); var r = n(22970), i = n(38694), o = n(18184), a = function (e, t) { return e.filter(function (e) { return e.Owner == t; }); }, s = function (e, t) { return e.filter(function (e) { return e.Owner !== t; }); }; function u(e, t) { var n, i, o, a; return r.__generator(this, function (r) { switch (r.label) { case 0: (n = new Array(e)), (i = new Array()).push(0), (r.label = 1); case 1: if (!(i.length > 0)) return [3, 6]; (o = i.length - 1), (a = i.pop()), (r.label = 2); case 2: return a < t ? ((n[o++] = a++), i.unshift(a), o != e ? [3, 4] : [4, n]) : [3, 5]; case 3: r.sent(), (r.label = 4); case 4: return [3, 2]; case 5: return [3, 1]; case 6: return [2]; } }); } var l = (function () { function e() {} return ( (e.GeneratePossibleCommands = function (e, t, n) { var o = []; return o.push.apply(o, r.__spreadArray([], r.__read(this.GenerateAttackCommands(e, t, n)), !1)), o.push.apply(o, r.__spreadArray([], r.__read(this.GenerateDefenceCommands(e, t, n)), !1)), o.push.apply(o, r.__spreadArray([], r.__read(this.GenerateWaitCommands(e, t)), !1)), o.length < 1 ? [{ Type: i.DecisionType.Wait }] : o; }), (e.GenerateAttackCommands = function (e, t, n) { var l, c, d, h, p, f, _ = [], g = a(e.buildings, o.PlayerType.First).length; if (-1 != n.alivePlayerBuildingsLimit && n.alivePlayerBuildingsLimit > g) return _; for (var m = a(e.buildings, t), v = Math.min(m.length, n.maxBuildingsMove), y = 1; y <= v; y++) { var C = u(y, m.length), b = n.alivePlayerBuildingsLimit == g ? a(e.buildings, o.PlayerType.Neutral) : s(e.buildings, t); try { for (var w = ((l = void 0), r.__values(b)), S = w.next(); !S.done; S = w.next()) { var T = S.value; try { for (var x = ((d = void 0), r.__values(C)), E = x.next(); !E.done; E = x.next()) { var L = E.value, A = []; try { for (var I = ((p = void 0), r.__values(L)), M = I.next(); !M.done; M = I.next()) { var P = M.value; A.push(m[P]); } } catch (e) { p = { error: e }; } finally { try { M && !M.done && (f = I.return) && f.call(I); } finally { if (p) throw p.error; } } _.push({ Type: i.DecisionType.Move, Objects: A, Subject: T }); } } catch (e) { d = { error: e }; } finally { try { E && !E.done && (h = x.return) && h.call(x); } finally { if (d) throw d.error; } } } } catch (e) { l = { error: e }; } finally { try { S && !S.done && (c = w.return) && c.call(w); } finally { if (l) throw l.error; } } } return _; }), (e.GenerateDefenceCommands = function (e, t, n) { for (var o, s, l, c, d, h, p = [], f = a(e.buildings, t), _ = Math.min(f.length, n.maxBuildingsMove), g = 1; g <= _; g++) { var m = u(_, f.length); try { for (var v = ((o = void 0), r.__values(f)), y = v.next(); !y.done; y = v.next()) { var C = y.value; try { for (var b = ((l = void 0), r.__values(m)), w = b.next(); !w.done; w = b.next()) { var S = w.value, T = !1, x = []; try { for (var E = ((d = void 0), r.__values(S)), L = E.next(); !L.done; L = E.next()) { var A = f[L.value]; if (A == C) { T = !0; break; } x.push(A); } } catch (e) { d = { error: e }; } finally { try { L && !L.done && (h = E.return) && h.call(E); } finally { if (d) throw d.error; } } T || p.push({ Type: i.DecisionType.Move, Objects: x, Subject: C }); } } catch (e) { l = { error: e }; } finally { try { w && !w.done && (c = b.return) && c.call(b); } finally { if (l) throw l.error; } } } } catch (e) { o = { error: e }; } finally { try { y && !y.done && (s = v.return) && s.call(v); } finally { if (o) throw o.error; } } } return p; }), (e.GenerateWaitCommands = function (e, t) { return [{ Type: i.DecisionType.Wait, Objects: [], Subject: {} }]; }), e ); })(); t.CommandsGenerator = l; }, 19317: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GroupModel = void 0); var r = n(22970), i = n(49535), o = n(47268), a = (function () { function e(e, t, n, r, i, o, a, s) { (this.Owner = e), (this.Speed = t), (this.Amount = n), (this.Path = r), (this.Target = i), (this.Source = o), (this.TargetAmount = a), (this.LastBurstTimestamp = s); } return ( (e.prototype.GenerateSegments = function (e) { for (var t = [], n = this.Amount, i = 0; n > 0; ) { var a = Math.max(n - e, 0), s = n - a; n = a; var u = (s / o.Spawner.UNITS_PER_WAVE) * this.BurstDelay * this.Speed, l = 2 * this.SegmentLen * (Math.min(s, o.Spawner.UNITS_PER_WAVE) / o.Spawner.UNITS_PER_WAVE), c = Math.max(this._accumulatedLen - i, 0), d = r.__read(this.TracePath(c), 2), h = d[0], p = d[1]; t.push({ Width: u, Height: l, Angle: p, Center: h, Amount: s }), (i += u); } return t; }), Object.defineProperty(e.prototype, "IsReachedEnd", { get: function () { return this._accumulatedLen >= this._maxLen; }, enumerable: !1, configurable: !0, }), (e.prototype.Init = function (e, t, n, r) { (this.CreationTimestamp = e), (this._accumulatedLen = 0), (this.BurstDelay = n), (this.SegmentLen = r), this.CalculateMaxLen(), this.AccumPath(t); }), (e.prototype.CalculateMaxLen = function () { for (var e = 0, t = 1; t < this.Path.length; t++) { e += i.math.dist(this.Path[t - 1], this.Path[t]); } this._maxLen = e; }), (e.prototype.AccumPath = function (e) { this._accumulatedLen = Math.min(this._accumulatedLen + e, this._maxLen); }), (e.prototype.TracePath = function (e) { for (var t = 0, n = this.Path[0], o = i.math.angle(this.Path[0], this.Path[1]), a = 1; a < this.Path.length; a++) { var s = i.math.dist(this.Path[a - 1], this.Path[a]); if ((t += s) >= e) { var u = a - 1, l = a, c = t, d = t - s, h = i.math.remap(e, d, c, 0, 1); n = i.math.lerp(this.Path[u], this.Path[l], h); var p = i.math.norm(i.math.sub(this.Path[l], n)), f = r.__read(p, 2), _ = f[0], g = f[1]; o = Math.atan2(g, _) * i.math.RAD2DEG; break; } } return [n, o]; }), e ); })(); t.GroupModel = a; }, 35139: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Building = void 0); var r = n(22970), i = n(22674), o = n(7687), a = (n(17905), n(46595)), s = n(78620), u = n(29157), l = n(13631), c = n(41368), d = n(47268), h = n(85928), p = n(18184), f = n(16638), _ = n(3806), g = n(75205), m = (n(940), n(75747)), v = n(49088), y = n(37394), C = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._selected = !1), (t._pathHolder = new g.PathHolder()), t; } var n, o, C, b, w; return ( r.__extends(t, e), (n = t), (t.prototype.init = function (e, t) { return this.addTag(n.ACTIVE_TAG), (this._data = t), (this._stateId = e), this._spawner || (this._spawner = a.di.get(d.Spawner)), (this._spawner.selfBuilding = this), this._population.init(t), this._capital.init(t), this._shape.init(t, e), (this._shape.interactive = !0), this.addMainComponents(), this.updatePopulationRateAndLimit(), this; }), (t.prototype.sendTo = function (e) { this._spawner.spawnAndSend(this._population.current, e); }), (t.prototype.setInactive = function (e) { var t; e ? (this.removeTag(n.ACTIVE_TAG), null === (t = this.get(d.Spawner)) || void 0 === t || t.stopRoutine(), this.removeComponent(g.PathHolder), this.removeComponent(d.Spawner)) : (this.addTag(n.ACTIVE_TAG), this.addMainComponents()), this.updateAllSkins(), this.onComponentListUpdated(); }), (t.prototype.toggleActive = function (e, t) { var r = isNaN(e) || this.hasTag(n.ACTIVE_TAG); this._shape.setActive(r, t), this._capital.setActive(r, t), (this._population.active = r); }), (t.prototype.setStartOwner = function (e) { (this.owner = e), (this._population.current = this.model.meta.getStartPopulation(e)), this.updatePopulationRateAndLimit(); }), (t.prototype.tryOccupy = function (e) { var t = this.get(c.Population), n = this.get(d.Spawner); if (t) if ((t.block(), this._owner == e.owner)) t.current += e.amount; else { var r = this.get(u.CapitalView); if ((null == r || r.shake(0.3, 0.2), e.owner == p.PlayerType.First)) { var i = (0, a.lazyGet)(y.TypesSocial.vibrationManager); null == i || i.vibrate(); } 0 == t.remove(e.amount) && (null == r || r.occupiedAnimation(0.2), (t.current += c.Population.SPAWN_AMOUNT_ON_OCCUPATION), (this.owner = e.owner), n.stopRoutine(), this._selected && this.deselect()); } }), (t.prototype.selectAsTarget = function () { var e = r.__read(this.isFirstPlayer ? m.GameColors.aims.allied : m.GameColors.aims.enemy, 2), t = e[0], n = e[1]; this.showSelection(v.color.fromHex(t), n); }), (t.prototype.selectAsSource = function () { this._selected = !0; var e = r.__read(m.GameColors.aims.allied, 2), t = e[0], n = e[1]; this.showSelection(v.color.fromHex(t), n); }), (t.prototype.showSelection = function (e, t) { void 0 === t && (t = 0.5); var n = this.get(u.CapitalView); null == n || n.showSelection(e, t); }), (t.prototype.updatePopulationRateAndLimit = function () { var e, t = this.get(c.Population); t && (t.setPopulationLimit(this.model.meta.getBuildingPopulationLimit(this._owner)), t.setPopulationRate(this.model.meta.getPopulationRate(this._owner)), null === (e = this.get(l.StateShapeView)) || void 0 === e || e.updateWithPopulation(t)); }), (t.prototype.deselect = function () { (this._selected = !1), this.showSelection(NaN); }), Object.defineProperty(t.prototype, "selected", { get: function () { return this._selected; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "isFirstPlayer", { get: function () { return this._owner === p.PlayerType.First; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "stateId", { get: function () { return this._stateId; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "owner", { get: function () { return this._owner; }, set: function (e) { var t = this; switch (((this._owner = e), this.addMainComponents(), this.updateAllSkins(), e)) { case p.PlayerType.Default: [d.Spawner, g.PathHolder, _.BotLogic].forEach(function (e) { return t.remove(e); }); break; case p.PlayerType.Neutral: case p.PlayerType.First: this.remove(_.BotLogic); break; default: this.add(a.di.get(s.TypesGame.botLogic)); } this.onComponentListUpdated(), this.updatePopulationRateAndLimit(); }, enumerable: !1, configurable: !0, }), (t.prototype.onComponentListUpdated = function () { (this._population.visible = this.has(c.Population)), (this._capital.visible = this.has(u.CapitalView)); }), (t.prototype.getSnapshot = function () { var e = Date.now(), t = this.get(c.Population), n = this.get(d.Spawner), r = this.get(g.PathHolder); return { Owner: this._owner, SpawnRate: this.model.meta.getPopulationRate(this._owner), AttackRate: 0, AttackRadius: 0, Id: this.stateId, Position: this._data.statePos.slice(0), CurrentPopulation: (null == t ? void 0 : t.current) || 0, SpawnLimit: this.model.meta.getBuildingPopulationLimit(this._owner), FighterSpeed: h.Fighter.NORMAL_SPEED, LastActionTimestamp: 0 - (e - ((null == t ? void 0 : t.lastBlockTimestamp) || 0)), BurstDelay: (null == n ? void 0 : n.burstDelay) || 0, BurstWidth: (null == r ? void 0 : r.getPathWidth()) || 0 }; }), (t.prototype.updateAllSkins = function () { var e, t, r = this.hasTag(n.ACTIVE_TAG); null === (e = this.get(l.StateShapeView)) || void 0 === e || e.updateSkin(this._owner), null === (t = this.get(u.CapitalView)) || void 0 === t || t.updateSkin(this._owner, r); }), (t.prototype.addMainComponents = function () { var e = this, t = [this._capital, this._spawner, this._shape, this._population, this._pathHolder]; this.hasAll.apply(this, r.__spreadArray([], r.__read(t), !1)) || t.forEach(function (t) { return e.add(t); }); }), Object.defineProperty(t.prototype, "data", { get: function () { return this._data; }, enumerable: !1, configurable: !0, }), (t.prototype.destroy = function () {}), (t.ACTIVE_TAG = "active"), r.__decorate([(0, i.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (o = void 0 !== f.GameModel && f.GameModel) ? o : Object)], t.prototype, "model", void 0), r.__decorate([(0, i.inject)(s.TypesGame.views.state), r.__metadata("design:type", "function" == typeof (C = void 0 !== u.CapitalView && u.CapitalView) ? C : Object)], t.prototype, "_capital", void 0), r.__decorate([(0, i.inject)(s.TypesGame.views.stateShape), r.__metadata("design:type", "function" == typeof (b = void 0 !== l.StateShapeView && l.StateShapeView) ? b : Object)], t.prototype, "_shape", void 0), r.__decorate([(0, i.inject)(s.TypesGame.views.population), r.__metadata("design:type", "function" == typeof (w = void 0 !== c.Population && c.Population) ? w : Object)], t.prototype, "_population", void 0), (t = n = r.__decorate([(0, i.injectable)()], t)) ); })(o.Entity); t.Building = C; }, 41245: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Field = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.init = function (e) { return (this._fieldId = e.data.id), this; }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(7687).Entity); t.Field = o; }, 85928: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Fighter = void 0); var r = n(22970), i = n(35139), o = n(49088), a = n(18184), s = n(75747), u = n(22674), l = n(7687), c = n(70600), d = n(78620), h = (0, s.getFightersSpeedPreset)(), p = (function (e) { function t(t, i, a, u, l, c, d, h) { void 0 === h && (h = 1); var p = e.call(this) || this; (p.owner = t), (p.source = i), (p.target = a), (p.step = u), (p.path = l), (p.amount = c), (p.speed = d), (p.scaleFactor = h), (p.color = 16711680), (p.position = [0, 0]), (p._rotation = 0); var f = r.__read(s.GameColors.players[t], 2)[1]; return (p.color = o.color.fromHex(f)), p.add(n.TAG), p; } var n, l, p, f, _, g, m, v, y; return ( r.__extends(t, e), (n = t), (t.prototype.getPositionOnGrid = function (e) { void 0 === e && (e = 100); var t = r.__read(this.position, 2), n = t[0], i = t[1]; return [Math.round(n / e), Math.round(i / e)]; }), (t.prototype.move = function (e) { void 0 === e && (e = 0); var t = this.path[0]; if (!t) return !0; var i = r.__read(t, 2), a = i[0], s = i[1], u = r.__read(this.position, 2), l = u[0], c = u[1], d = Math.atan2(s - c, a - l), h = n.DEFAULT_SIZE; if (((l += (Math.cos(d) * this.speed * e) / h), (c += (Math.sin(d) * this.speed * e) / h), (this.position[0] = l), (this.position[1] = c), (this._rotation = d + Math.PI / 2), this.path.length > 0)) { o.math.dist(this.position, t) <= 30 * n.DISTANCE_TOLERANCE && this.path.shift(); } return 0 == this.path.length; }), Object.defineProperty(t.prototype, "rotation", { get: function () { return this._rotation; }, enumerable: !1, configurable: !0, }), (t.TAG = "fighter"), (t.TAG_DIED = "fighter_died"), (t.DEFAULT_SIZE = h.DEFAULT_SIZE), (t.NORMAL_SPEED = h.NORMAL_SPEED), (t.DISTANCE_TOLERANCE = 0.5), r.__decorate([(0, u.inject)(d.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (y = void 0 !== c.CookieModel && c.CookieModel) ? y : Object)], t.prototype, "cookies", void 0), (t = n = r.__decorate([(0, u.injectable)(), r.__metadata("design:paramtypes", ["function" == typeof (l = void 0 !== a.PlayerType && a.PlayerType) ? l : Object, "function" == typeof (p = void 0 !== i.Building && i.Building) ? p : Object, "function" == typeof (f = void 0 !== i.Building && i.Building) ? f : Object, "function" == typeof (_ = "undefined" != typeof float && float) ? _ : Object, Array, "function" == typeof (g = "undefined" != typeof int && int) ? g : Object, "function" == typeof (m = "undefined" != typeof float && float) ? m : Object, "function" == typeof (v = "undefined" != typeof float && float) ? v : Object])], t)) ); })(l.Entity); t.Fighter = p; }, 92800: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PCell = void 0); var r = n(22970), i = n(22674), o = n(85928), a = n(49088), s = (function () { function e() { (this._owners = []), (this._fighters = new Set()); } return ( (e.prototype.add = function (e) { -1 == this._owners.indexOf(e.owner) && this._owners.push(e.owner), this._fighters.add(e); }), (e.prototype.getCollisions = function () { var e, t, n, i; if (this._owners.length < 2) return []; var s = []; try { e: for (var u = r.__values(this._fighters), l = u.next(); !l.done; l = u.next()) { var c = l.value; try { for (var d = ((n = void 0), r.__values(this._fighters)), h = d.next(); !h.done; h = d.next()) { var p = h.value; if (c.owner !== p.owner && a.math.dist(c.position, p.position) < 2 * o.Fighter.DEFAULT_SIZE) { this._fighters.delete(c), s.push([c, p]); continue e; } } } catch (e) { n = { error: e }; } finally { try { h && !h.done && (i = d.return) && i.call(d); } finally { if (n) throw n.error; } } } } catch (t) { e = { error: t }; } finally { try { l && !l.done && (t = u.return) && t.call(u); } finally { if (e) throw e.error; } } return this._owners.splice(0, this._owners.length), this._fighters.clear(), s; }), (e.SIZE = 100), (e = r.__decorate([(0, i.injectable)()], e)) ); })(); t.PCell = s; }, 63880: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ActiveBuildingsQuery = void 0); var r = n(7687), i = n(18184), o = n(47268); t.ActiveBuildingsQuery = new r.Query(function (e) { return e.has(o.Spawner) && e.owner !== i.PlayerType.Default; }); }, 96669: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AllBuildingsQuery = void 0); var r = n(7687), i = n(29157); t.AllBuildingsQuery = new r.Query(function (e) { return e.has(i.CapitalView); }); }, 7407: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BotsSystem = void 0); var r = n(22970), i = n(46595), o = n(3806), a = n(38694), s = n(84616), u = n(78620), l = n(7687), c = n(497), d = (function (e) { function t() { var t = e.call(this, function (e) { return e.has(o.BotLogic); }) || this; return ( (t._presets = [ [3, 0, [[s.BotPreset1Easy, 1]]], [2, 1, [[s.BotPreset2Medium, 1]]], [3, 1, [[s.BotPreset3UpperMedium, 1]]], [3, 1, [[s.BotPreset4Hard, 1]]], [3, 1, [[s.BotPreset6FinalAgressive, 1]]], ]), (t._startBot = s.BotPreset0Vegetable), (t._lowLevelPresetEveryFights = 3), (t._gameplayEventHandler = t.gameplayEventHandler.bind(t)), (t.entityAdded = function (e) { e.current.get(o.BotLogic).init(t.selectPreset()); }), t ); } return ( r.__extends(t, e), (t.prototype.updateEntity = function (e, t) { var n = e.get(o.BotLogic); if (n) { n.initialized || n.init(this.selectPreset()); var r = n.decide(e); r && n.executeDecision(this.convertToDecision(r)); } }), (t.prototype.convertToDecision = function (e) { var t, n, o = i.di.get(u.TypesGame.model), s = function (e) { return o.currentContinent.buildings.get(e); }; if (e.Type === a.DecisionType.Move) { var l = []; try { for (var c = r.__values(e.Objects), d = c.next(); !d.done; d = c.next()) { var h = d.value; l.push(s(h.Id)); } } catch (e) { t = { error: e }; } finally { try { d && !d.done && (n = c.return) && n.call(c); } finally { if (t) throw t.error; } } return { Type: a.DecisionType.Move, Subject: s(e.Subject.Id), Objects: l }; } return { Type: a.DecisionType.Wait, Objects: [], Subject: {} }; }), (t.prototype.selectPreset = function () { return i.di.get(u.TypesGame.botPresetsModel).selectPreset(); }), (t.prototype.gameplayEventHandler = function () {}), (t.prototype.onAddedToEngine = function () { e.prototype.onAddedToEngine.call(this), (this.cookie = i.di.get(u.TypesGame.cookieModel)), (this.model = i.di.get(u.TypesGame.model)), this.engine.subscribe(c.GamePlayEvent, this._gameplayEventHandler); }), (t.prototype.onRemovedFromEngine = function () { this.entities.forEach(function (e) { var t; return null === (t = e.get(o.BotLogic)) || void 0 === t ? void 0 : t.terminate(); }), this.engine.unsubscribe(c.GamePlayEvent, this._gameplayEventHandler), e.prototype.onRemovedFromEngine.call(this); }), t ); })(l.IterativeSystem); t.BotsSystem = d; }, 3915: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DisplaySystem = void 0); var r = n(22970), i = n(7687), o = n(41368), a = n(13631), s = n(29157), u = n(76713), l = (function (e) { function t(t) { var n = e.call(this, function (e) { return e.hasAny(o.Population, a.StateShapeView, s.CapitalView, u.TutorialFingerView); }) || this; return ( (n.fieldView = t), (n.entityAdded = function (e) { var t = e.current, r = t.get(o.Population), i = t.get(a.StateShapeView), l = t.get(s.CapitalView), c = t.get(u.TutorialFingerView); r && n.fieldView.labels.addChild(r), i && n.fieldView.shapes.addChild(i), l && n.fieldView.capitals.addChild(l), c && n.fieldView.addChild(c); }), (n.entityRemoved = function (e) { var t = e.previous; [o.Population, a.StateShapeView, s.CapitalView, u.TutorialFingerView].forEach(function (e) { var n, r = t.get(e); null === (n = null == r ? void 0 : r.parent) || void 0 === n || n.removeChild(r); }); }), n ); } return r.__extends(t, e), t; })(i.ReactionSystem); t.DisplaySystem = l; }, 79207: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FighterGroupsSystem = void 0); var r = n(49088), i = n(79840), o = (function () { function e() {} return ( (e.GetActiveGroups = function () { return e._groups.filter(function (e) { return null !== e; }); }), (e.CreateNewGroup = function (t, n, o, a, s) { return ( (e._lastIndex = r.math.repeat(e._lastIndex + 1, 100)), (e._groups[e._lastIndex] = new i.FighterGroup(e._lastIndex, t, n, o, a, s)), e.GetActiveGroups().forEach(function (e) { return null == e ? void 0 : e.Check(); }), e._lastIndex ); }), (e.AddFighterToGroup = function (t, n) { var r; null === (r = e._groups[t]) || void 0 === r || r.AddFighter(n); }), (e.RemoveGroup = function (t) { e._groups[t] = null; }), (e.Clear = function () { e._groups.fill(null); }), (e._groups = new Array(100).fill(null)), (e._lastIndex = -1), e ); })(); t.FighterGroupsSystem = o; }, 65200: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FighterMovementSystem = t.FighterEvent = void 0); var r = n(22970), i = n(46595), o = n(7687), a = n(62471), s = n(85928), u = n(92800), l = n(40424), c = n(29157), d = n(78620), h = (function () { function e(e, t) { (this.type = e), (this.fighter = t); } return (e.FIGHTER_CREATED = "FighterCreated"), (e.FIGHTER_DIED = "FighterDied"), e; })(); t.FighterEvent = h; var p = (function (e) { function t() { var t = e.call(this, function (e) { return e.has(a.FighterView); }) || this; return ( (t.cells = new Map()), (t.entityAdded = function (e) { var n = e.current; t.addView(n), t.dispatch(new h(h.FIGHTER_CREATED, n)); }), (t.entityRemoved = function (e) { var n = e.current; t.removeView(n), t.dispatch(new h(h.FIGHTER_DIED, n)); }), t ); } return ( r.__extends(t, e), (t.prototype.update = function (t) { e.prototype.update.call(this, t), this.checkCollisions(); }), (t.prototype.checkCollisions = function () { var e = this; this.cells.forEach(function (t) { t.getCollisions().forEach(function (t) { i.di.get(l.FighterDeathEffectAction).run(t), t.forEach(function (t) { var n; t.hasTag(s.Fighter.TAG_DIED) || (t.addTag(s.Fighter.TAG_DIED), null === (n = t.group) || void 0 === n || n.OnFighterDied()), e.engine.removeEntity(t); }); }); }); }), (t.prototype.updateEntity = function (e, t) { var n; if (e.move(t)) e.target.tryOccupy(e), this.engine.removeEntity(e); else { var i = r.__read( e.position.map(function (e) { return Math.round(e / u.PCell.SIZE); }), 2 ), o = i[0], s = i[1], l = "".concat(o, "_").concat(s), c = this.cells.get(l) || new u.PCell(); c.add(e), this.cells.set(l, c); } if (e.has(a.FighterView)) { var d = e.get(a.FighterView); (n = d.position).set.apply(n, r.__spreadArray([], r.__read(e.position), !1)), (d.rotation = e.rotation); } }), (t.prototype.addView = function (e) { var t, n = e.get(a.FighterView), r = e.source.get(c.CapitalView), o = null === (t = (0, i.lazyGet)(d.TypesGame.views.fieldInstance)) || void 0 === t ? void 0 : t.fighters; if (n && o) { var s = (n.position = o.toLocal(r.position, r.parent)), u = s.x, l = s.y; (e.position[0] = u), (e.position[1] = l), o.addChild(n); } }), (t.prototype.removeView = function (e) { var t, n = e.get(a.FighterView); null === (t = null == n ? void 0 : n.parent) || void 0 === t || t.removeChild(n); }), (t.prototype.onRemovedFromEngine = function () { this.cells.clear(); for (var t = this.engine.entities.length; t; ) this.entities[0] && this.engine.removeEntity(this.entities[0]), t--; e.prototype.onRemovedFromEngine.call(this); }), t ); })(o.IterativeSystem); t.FighterMovementSystem = p; }, 497: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GamePlaySystem = t.GamePlayEvent = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(35139), s = n(73218), u = n(18184), l = n(41368), c = n(78620), d = n(7687), h = n(65200), p = function (e) { void 0 === e && (e = !1), (this.won = e); }; t.GamePlayEvent = p; var f = (function (e) { function t() { var t = e.call(this, function (e) { return e.has(l.Population) && e.hasTag(a.Building.ACTIVE_TAG); }) || this; return ( (t._freeCounts = new Map()), (t._fullAmount = new Map()), (t._isAnyBuilding = new Map()), (t._players = [u.PlayerType.Neutral, u.PlayerType.First, u.PlayerType.Second, u.PlayerType.Third, u.PlayerType.Fourth, u.PlayerType.Fifth, u.PlayerType.Sixth, u.PlayerType.Seventh, u.PlayerType.Eighth]), (t._fighterEntityCreated = function (e) { return t.onFighterEnitityHandler(e); }), t ); } return ( r.__extends(t, e), (t.prototype.update = function (e) { var t, n, a, d = this; void 0 === e && (e = 0); var h, f = !1; try { for (var _ = r.__values(this._players), g = _.next(); !g.done; g = _.next()) { var m = g.value; this._fullAmount.set(m, this._freeCounts.get(m)), this._isAnyBuilding.delete(m); } } catch (e) { t = { error: e }; } finally { try { g && !g.done && (n = _.return) && n.call(_); } finally { if (t) throw t.error; } } this.entities.forEach(function (e) { var t = e.get(l.Population), n = (d._fullAmount.get(e.owner) || 0) + t.current; d._fullAmount.set(e.owner, n), d._isAnyBuilding.set(e.owner, !0); }), h || this.isAnyBotAlive() || ((h = !0), (f = !0)), h || this.isAlive(u.PlayerType.First) || ((h = !0), (f = !1)); var v = [], y = 0; this._fullAmount.forEach(function (e, t) { void 0 !== e && (v.push({ owner: t, count: e }), (y += e)); }), o.di.get(i.TypesCore.dispatcher).emit(s.GameEvents.STATS_UPDATED, { items: v.sort(function (e, t) { return e.owner - t.owner; }), totalValue: y, }), h && (this.dispatch(new p(f)), null === (a = (0, o.lazyGet)(c.TypesGame.model)) || void 0 === a || a.endStage(f)); }), (t.prototype.isAlive = function (e) { return (this._fullAmount.get(e) || 0) > 0 || this._isAnyBuilding.get(e); }), (t.prototype.isAnyBotAlive = function () { var e, t; try { for (var n = r.__values(this._players), i = n.next(); !i.done; i = n.next()) { var o = i.value; if (o !== u.PlayerType.Neutral && o !== u.PlayerType.First && this.isAlive(o)) return !0; } } catch (t) { e = { error: t }; } finally { try { i && !i.done && (t = n.return) && t.call(n); } finally { if (e) throw e.error; } } return !1; }), (t.prototype.onFighterEnitityHandler = function (e) { var t = e.fighter, n = this._freeCounts.get(t.owner) || 0; switch (e.type) { case h.FighterEvent.FIGHTER_DIED: n--; break; case h.FighterEvent.FIGHTER_CREATED: n++; } this._freeCounts.set(t.owner, n); }), (t.prototype.onAddedToEngine = function () { e.prototype.onAddedToEngine.call(this), this.engine.subscribe(h.FighterEvent, this._fighterEntityCreated); }), (t.prototype.onRemovedFromEngine = function () { this.engine.unsubscribe(h.FighterEvent, this._fighterEntityCreated), this._freeCounts.clear(), this._fullAmount.clear(), this._isAnyBuilding.clear(), e.prototype.onRemovedFromEngine.call(this); }), t ); })(d.ReactionSystem); t.GamePlaySystem = f; }, 12714: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InitStageSystem = void 0); var r = n(22970), i = n(7687), o = n(18184), a = n(46595), s = n(37394), u = n(73218), l = n(13631), c = (function (e) { function t(t, n) { var r = e.call(this) || this; return (r.currentContinent = t), (r.stageLevel = n), r; } return ( r.__extends(t, e), (t.prototype.onAddedToEngine = function () { var t = this; e.prototype.onAddedToEngine.call(this); var n = []; this.currentContinent.parsed.forEach(function (e, r) { var i, a = t.currentContinent.getOrCreateBuildingEntity(r, e); t.engine.addEntity(a); var s = t.stageLevel - e.stage; 0 === s ? a.setStartOwner(e.startOwner) : s > 0 ? a.setStartOwner(o.PlayerType.First) : a.setStartOwner(o.PlayerType.Neutral), a.setInactive(0 !== s), n.push(null === (i = a.get(l.StateShapeView)) || void 0 === i ? void 0 : i.initialPromise); }), Promise.all(n).then(function () { var e; null === (e = (0, a.lazyGet)(s.TypesCore.dispatcher)) || void 0 === e || e.emit(u.GameEvents.LEVEL_LOADED); }), this.engine.removeSystem(this); }), t ); })(i.System); t.InitStageSystem = c; }, 2609: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InputSystem = t.distanceBetweenPoints = void 0); var r = n(22970), i = n(7687), o = n(29157), a = n(37394), s = n(46595), u = n(49088), l = n(73218), c = n(63880), d = n(940); t.distanceBetweenPoints = function (e, t) { return u.math.dist([e.x, e.y], [t.x, t.y]); }; var h = (function (e) { function n() { var t = e.call(this, c.ActiveBuildingsQuery) || this; return (t._selected = new Set()), (t._isTouchStartedOnBuilding = !1), (t._wasBuildingInteracted = !1), (t._multiselectTimer = 0), t; } return ( r.__extends(n, e), Object.defineProperty(n.prototype, "dispatcher", { get: function () { return this._dispatcher || (this._dispatcher = s.di.get(a.TypesCore.dispatcher)); }, enumerable: !1, configurable: !0, }), (n.prototype.onCancel = function (e) { this.dispatcher.emit(l.GameEvents.AIM_REMOVE), this.deselectLast(); }), (n.prototype.onStart = function (e) { var t; (this._buildingHitThisFrame = this.getClosest(new d.Point(e.clientX, e.clientY))), (null === (t = this._buildingHitThisFrame) || void 0 === t ? void 0 : t.isFirstPlayer) && ((this._isTouchStartedOnBuilding = !0), this._buildingHitThisFrame.selected || this.selectAsSource(this._buildingHitThisFrame)); }), (n.prototype.onDrag = function (e) { var r, i, a; if (0 != this._selected.size && this._isTouchStartedOnBuilding) { var s = new d.Point(e.clientX, e.clientY), u = this.getClosest(s); u != this._buildingHitLastFrame && (this._wasBuildingInteracted = !1); var c = d.Ticker.shared.deltaMS / 1e3; if (u) { var h = u.get(o.CapitalView); if (h) { var p = h.toGlobal(new d.Point(0, 0)); if (this._selected.has(u)) { if (u.isFirstPlayer && this._selected.size > 1 && !this._wasBuildingInteracted) (0, t.distanceBetweenPoints)(p, s) < n._multiselectDistanceMax && (this._buildingHitLastFrame == u ? ((this._multiselectTimer += c), this._multiselectTimer >= n._timeForMultiselectAdding && (this.removeSource(u), (this._multiselectTimer = 0), (this._wasBuildingInteracted = !0))) : (this._multiselectTimer = 0)); this._lastSelectedTargetBuilding && (null === (r = this._lastSelectedTargetBuilding) || void 0 === r || r.deselect(), delete this._lastSelectedTargetBuilding); } else { if (u.isFirstPlayer && !this._wasBuildingInteracted) (0, t.distanceBetweenPoints)(p, s) < n._multiselectDistanceMax && (this._buildingHitLastFrame == u ? ((this._multiselectTimer += c), this._multiselectTimer >= n._timeForMultiselectAdding && (this.selectAsSource(u), (this._multiselectTimer = 0), (this._wasBuildingInteracted = !0))) : (this._multiselectTimer = 0)); } } u != this._lastSelectedTargetBuilding && (null === (i = this._lastSelectedTargetBuilding) || void 0 === i || i.deselect(), (this._lastSelectedTargetBuilding = u), this._lastSelectedTargetBuilding.selectAsTarget()); } else null === (a = this._lastSelectedTargetBuilding) || void 0 === a || a.deselect(), delete this._lastSelectedTargetBuilding, this.dispatcher.emit(l.GameEvents.AIM_SET, null); (this._buildingHitLastFrame = this.getClosest(s)), this.dispatcher.emit(l.GameEvents.AIM_UPDATE, e); } }), (n.prototype.onEnd = function (e) { var t = this; if (this._lastSelectedTargetBuilding) { this._selected.forEach(function (e) { e !== t._lastSelectedTargetBuilding && e.isFirstPlayer && e.sendTo(t._lastSelectedTargetBuilding); }); var n = this._lastSelectedTargetBuilding.get(o.CapitalView); n && this.dispatcher.emit(l.GameEvents.AIM_SET, n.toGlobal(new d.Point(0, 0))), this._lastSelectedTargetBuilding.deselect(), delete this._lastSelectedTargetBuilding; } this.dispatcher.emit(l.GameEvents.AIM_REMOVE), this.deselectLast(); }), (n.prototype.getClosest = function (e) { var t, n = Number.MAX_VALUE; return ( this.entities.forEach(function (r) { var i = r.get(o.CapitalView); if (i) { var a = i.toLocal(e), s = Math.sqrt(a.x * a.x + a.y * a.y); s < n && ((t = r), (n = s)); } }), t ); }), (n.prototype.selectAsSource = function (e) { this._selected.add(e), e.selectAsSource(), this.dispatcher.emit(l.GameEvents.AIM_CREATE, e), this.vibratePeek(); }), (n.prototype.removeSource = function (e) { this._selected.has(e) && (this._selected.delete(e), this.dispatcher.emit(l.GameEvents.AIM_HIDE, e), this.vibratePeek()); }), (n.prototype.vibratePeek = function () { var e = (0, s.lazyGet)(a.TypesSocial.vibrationManager); null == e || e.vibrate(); }), (n.prototype.deselectLast = function () { this._selected.forEach(function (e) { return e.deselect(); }), this._selected.clear(); }), (n.prototype.updateEntity = function () {}), (n._multiselectDistanceMax = Number.MAX_VALUE), (n._timeForMultiselectAdding = 0.25), n ); })(i.IterativeSystem); t.InputSystem = h; }, 76221: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelEndSystem = void 0); var r = n(22970), i = n(7687), o = n(47268), a = n(79207), s = (function (e) { function t() { var t = e.call(this, function (e) { return e.has(o.Spawner); }) || this; return a.FighterGroupsSystem.Clear(), t; } return ( r.__extends(t, e), (t.prototype.update = function () { this.entities.forEach(function (e) { var t; return null === (t = e.get(o.Spawner)) || void 0 === t ? void 0 : t.stopRoutine(); }), this.engine.removeSystem(this); }), t ); })(i.ReactionSystem); t.LevelEndSystem = s; }, 65451: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PathsGenerationSystem = void 0); var r = n(22970), i = n(7687), o = n(75205), a = n(29157), s = n(49535), u = (function (e) { function t() { return ( e.call(this, function (e) { return e.has(a.CapitalView); }) || this ); } return ( r.__extends(t, e), (t.prototype.update = function (t) { e.prototype.update.call(this, t), this.engine.removeSystem(this); }), (t.prototype.updateEntity = function (e, t) { var n, i, a = e.get(o.PathHolder); if (a) { a.clearCache(); try { for (var u = r.__values(this.entities), l = u.next(); !l.done; l = u.next()) { var c = l.value; if (c != e) { var d = c.data.statePos, h = e.data.statePos, p = 0.5 * c.data.stateRadius, f = [], _ = s.math.norm(s.math.sub(d, h)); f.push(h), f.push(s.math.sum(h, s.math.scale(_, p))), f.push(s.math.sub(d, s.math.scale(_, p))), f.push(d); var g = []; g.push([h, h]); for (var m = o.PathHolder.MAX_SPAWN_LEN_ONE_DIRECTION, v = 1; v < f.length - 1; v++) { var y = s.math.norm(s.math.sub(f[v + 1], f[v])), C = s.math.rotate(y, -Math.PI / 2), b = s.math.rotate(y, Math.PI / 2), w = s.math.sum(f[v], s.math.scale(C, m)), S = s.math.sum(f[v], s.math.scale(b, m)); g.push([w, S]); } g.push([d, d]), a.addPath(c, g); } } } catch (e) { n = { error: e }; } finally { try { l && !l.done && (i = u.return) && i.call(u); } finally { if (n) throw n.error; } } } }), t ); })(i.IterativeSystem); t.PathsGenerationSystem = u; }, 97649: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PopulationSystem = void 0); var r = n(22970), i = n(7687), o = n(41368), a = n(35139), s = n(13631), u = (function (e) { function t() { var t = e.call(this, function (e) { return e.hasAll(o.Population, s.StateShapeView) && e.hasTag(a.Building.ACTIVE_TAG); }) || this; return (t.entityAdded = function (e) {}), t; } return ( r.__extends(t, e), (t.prototype.updateEntity = function (e, t) { var n = e.get(o.Population); n.tryPopulate(t), e.get(s.StateShapeView).updateWithPopulation(n); }), t ); })(i.IterativeSystem); t.PopulationSystem = u; }, 61751: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TutorialSystem = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(49088), s = n(18184), u = n(76713), l = n(64770), c = n(7687), d = n(35139), h = (function (e) { function t() { var t = e.call(this, function (e) { return e.has(d.Building.ACTIVE_TAG); }) || this; return (t._tutorialFingerEntityId = NaN), t; } return ( r.__extends(t, e), (t.prototype.update = function () {}), (t.prototype.onAddedToEngine = function () { e.prototype.onAddedToEngine.call(this); var t = o.di.get(u.TutorialFingerView), n = new c.Entity().add(t); this.engine.addEntity(n), (this._tutorialFingerEntityId = n.id); var d = this.entities.find(function (e) { return e.owner === s.PlayerType.First; }); if (!d) return i.log.warn("Tutorial failed, from is " + d), this.engine.removeSystem(this); var h = d.data.statePos, p = r.__read( this.entities .filter(function (e) { return e.owner !== s.PlayerType.First; }) .sort(function (e, t) { return a.math.dist(h, e.data.statePos) - a.math.dist(h, t.data.statePos); }), 1 )[0]; if (!p) return i.log.warn("Tutorial failed, nearest is " + p), this.engine.removeSystem(this); var f = r.__read(h, 2), _ = f[0], g = f[1], m = r.__read(p.data.statePos, 2), v = m[0], y = m[1], C = 1.2, b = 0.7; l.gsap .timeline({ repeat: -1 }) .add(l.gsap.fromTo(t, { alpha: 0 }, { alpha: 1 }), "appear") .add(l.gsap.fromTo(t.scale, { x: C, y: C }, { x: b, y: b }), "appear") .fromTo(t, { x: _, y: g }, { x: v, y }) .add(l.gsap.fromTo(t, { alpha: 1 }, { alpha: 0 }), "disappear") .add(l.gsap.fromTo(t.scale, { x: b, y: b }, { x: C, y: C }), "disappear"); }), (t.prototype.onRemovedFromEngine = function () { var t = this.engine.getEntityById(this._tutorialFingerEntityId); t && this.engine.removeEntity(t), e.prototype.onRemovedFromEngine.call(this); }), t ); })(c.ReactionSystem); t.TutorialSystem = h; }, 88931: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UpdateSkinsSystem = void 0); var r = n(22970), i = n(7687), o = n(29157), a = n(13631), s = (function (e) { function t() { return ( e.call(this, function (e) { return e.hasAny(o.CapitalView, a.StateShapeView); }) || this ); } return ( r.__extends(t, e), (t.prototype.updateEntity = function (e, t) { e.updateAllSkins(); }), (t.prototype.update = function (t) { void 0 === t && (t = 0), e.prototype.update.call(this, t), this.engine.removeSystem(this); }), t ); })(i.IterativeSystem); t.UpdateSkinsSystem = s; }, 54656: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.color = void 0); var r = n(22970), i = function (e, t, n) { return e + n * (t - e); }, o = function (e) { return [e >> 16, (e >> 8) & 255, 255 & e]; }, a = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = r.__read(e, 3); return ((n[0] << 16) + (n[1] << 8) + n[2]) | 0; }; t.color = { fromHex: function (e) { return parseInt(e.substr(1), 16); }, toRGB: o, fromRGB: a, lerp: function (e, t, n) { if (n <= 0) return e; if (n >= 1) return t; var s = r.__read(o(e), 3), u = s[0], l = s[1], c = s[2], d = r.__read(o(t), 3), h = d[0], p = d[1], f = d[2]; return a(i(u, h, n), i(l, p, n), i(c, f, n)); }, pale: function (e, t) { return ( void 0 === t && (t = 0.5), a.apply( void 0, r.__spreadArray( [], r.__read( o(e).map(function (e) { return Math.floor(((n = e * t), void 0 === (r = 0) && (r = 0), void 0 === (i = 255) && (i = 1), Math.max(r, Math.min(i, n)))); var n, r, i; }) ), !1 ) ) ); }, rgbToHsl: function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = r.__read(e, 3), i = n[0], o = n[1], a = n[2]; (i /= 255), (o /= 255), (a /= 255); var s = Math.max(i, o, a), u = Math.min(i, o, a), l = (s + u) / 2, c = l, d = c; if (s == u) l = c = 0; else { var h = s - u; switch (((c = d > 0.5 ? h / (2 - s - u) : h / (s + u)), s)) { case i: l = (o - a) / h + (o < a ? 6 : 0); break; case o: l = (a - i) / h + 2; break; case a: l = (i - o) / h + 4; } l /= 6; } return [Math.floor(360 * l), Math.floor(100 * c), Math.floor(100 * d)]; }, }; }, 49088: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.getOwnerGenerator = void 0); var r = n(22970), i = n(18184); r.__exportStar(n(49535), t), r.__exportStar(n(54656), t), (t.getOwnerGenerator = function (e) { return ( void 0 === e && (e = [i.PlayerType.Second, i.PlayerType.Third, i.PlayerType.Fourth, i.PlayerType.Fifth, i.PlayerType.Sixth, i.PlayerType.Seventh, i.PlayerType.Eighth]), function (t) { var n = o(t, e); return n > i.PlayerType.First && n !== i.PlayerType.Neutral && e.splice(e.indexOf(n), 1), n; } ); }); var o = function (e, t) { switch (null == e ? void 0 : e.toUpperCase()) { case "#DE7676": return t[0]; case "#74BCFF": return i.PlayerType.First; } return i.PlayerType.Neutral; }; }, 49535: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.math = t.dist = void 0); var r = n(22970), i = 11754944e-45; t.dist = function (e, t) { var n = r.__read(e, 2), i = n[0], o = n[1], a = r.__read(t, 2), s = a[0], u = a[1]; return Math.sqrt((s - i) * (s - i) + (u - o) * (u - o)); }; var o = function (e, t, n) { return e * n + t * (1 - n); }, a = function (e) { var t = r.__read(e, 2), n = t[0], i = t[1]; return Math.sqrt(n * n + i * i); }, s = function (e, t) { var n = r.__read(e, 2), i = n[0], o = n[1]; return [i * Math.cos(t) - o * Math.sin(t), i * Math.sin(t) + o * Math.cos(t)]; }, u = function (e, t, n) { return e < t ? (e = t) : e > n && (e = n), e; }; t.math = { lerp: function (e, t, n) { var i = r.__read(e, 2), a = i[0], s = i[1], u = r.__read(t, 2), l = u[0], c = u[1]; return [o(a, l, n), o(s, c, n)]; }, len: a, sum: function (e, t) { var n = r.__read(e, 2), i = n[0], o = n[1], a = r.__read(t, 2); return [i + a[0], o + a[1]]; }, sub: function (e, t) { var n = r.__read(e, 2), i = n[0], o = n[1], a = r.__read(t, 2); return [i - a[0], o - a[1]]; }, scale: function (e, t) { return e.map(function (e) { return e * t; }); }, rotate: s, rotateAround: function (e, t, n) { var i = r.__read(e, 2), o = i[0], a = i[1], u = r.__read(t, 2), l = u[0], c = u[1], d = r.__read(s([l, c], n), 2); return [d[0] + o, d[1] + a]; }, norm: function (e) { var t = a(e), n = r.__read(e, 2); return [n[0] / t, n[1] / t]; }, dist: t.dist, dot: function (e, t) { var n = r.__read(e, 2), i = n[0], o = n[1], a = r.__read(t, 2); return i * a[0] + o * a[1]; }, clamp: u, repeat: function (e, t) { return u(e - Math.floor(e / t) * t, 0, t); }, remap: function (e, t, n, r, i) { return ((e - t) * (i - r)) / (n - t) + r; }, approximately: function (e, t) { return Math.abs(t - e) < Math.max(1e-6 * Math.max(Math.abs(e), Math.abs(t)), 8 * i); }, angle: function (e, t) { var n = r.__read(e, 2), i = n[0], o = n[1], a = r.__read(t, 2), s = a[0], u = a[1]; return Math.atan2(u - o, s - i); }, round: function (e, t) { return void 0 === t && (t = 1e3), Math.round(e * t) / t; }, array_summ: function (e) { return e.reduce(function (e, t) { return e + t; }, 0); }, RAD2DEG: 57.29578, DEG2RAD: 0.017453292, EPSILON: i, }; }, 74353: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.parseLevelSVG = void 0); var r = n(22970), i = n(17905), o = function (e) { for ( var t = function (t) { if (t) { if (t.id.startsWith("Centre")) return !0; if (t.id.startsWith("Сentre")) return e.id.startsWith("Сentre") || console.warn(e.id, "starts with Сentre"), !0; } return !1; }, n = e.getElementsByTagName("g"), r = 0; r < n.length; r++ ) if (t(n[r])) { var i = o(n[r]); if (i) return i; } var a = e.getElementsByTagName("circle"); for (r = 0; r < a.length; r++) if (t(a[r].parentNode)) return a[r]; var s = e.getElementsByTagName("ellipse"); for (r = 0; r < s.length; r++) if (t(s[r].parentNode)) return s[r]; }; t.parseLevelSVG = function (e) { var t = e.children[0].children[0]; i.log.debug("parse", t.id); for ( var n = { id: t.id, states: [], stages: [] }, a = function (e) { var t = o(e), n = (function (e) { var t = e.getAttribute("cx"), n = e.getAttribute("cy"); return { x: parseInt(t, 10), y: parseInt(n, 10) }; })(t), i = (function (e) { return parseInt(e.getAttribute("r"), 10); })(t), a = (function (e) { for (var t = e.getElementsByTagName("path"), n = 0; n < t.length; n++) { var r = t[n].getAttribute("fill"); if (r) return r; } return null; })(e), s = (function (e) { for (var t = e.getElementsByTagName("path"), n = [], r = 0; r < t.length; r++) { var i = t[r].getAttribute("d"); i && n.push(i); } return n; })(e); return r.__assign(r.__assign({}, n), { radius: i, id: e.id, fillColor: a, shapes: s }); }, s = 0; s < t.childElementCount; s++ ) { var u = t.children[s]; if (u.id.toLocaleLowerCase().startsWith("stage")) { var l = { id: u.id, states: [] }; n.stages.push(l); for (var c = 0; c < u.childElementCount; c++) l.states.push(a(u.children[c])); } else 2 === u.children.length && n.states.push(a(u)); } return ( n.stages.length || (n.stages = [{ id: n.id, states: n.states }]), (n.stages = n.stages.sort(function (e, t) { return e.id < t.id ? -1 : 1; })), n ); }; }, 38694: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DecisionType = void 0), (function (e) { (e[(e.Upgrade = 0)] = "Upgrade"), (e[(e.MakeTower = 1)] = "MakeTower"), (e[(e.MakeBuilding = 2)] = "MakeBuilding"), (e[(e.Wait = 3)] = "Wait"), (e[(e.Move = 4)] = "Move"); })(t.DecisionType || (t.DecisionType = {})); }, 18184: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlayerType = void 0), (function (e) { (e[(e.Default = 0)] = "Default"), (e[(e.First = 1)] = "First"), (e[(e.Second = 2)] = "Second"), (e[(e.Third = 3)] = "Third"), (e[(e.Fourth = 4)] = "Fourth"), (e[(e.Fifth = 5)] = "Fifth"), (e[(e.Sixth = 6)] = "Sixth"), (e[(e.Seventh = 7)] = "Seventh"), (e[(e.Eighth = 8)] = "Eighth"), (e[(e.Nine = 9)] = "Nine"), (e[(e.Neutral = 10)] = "Neutral"); })(t.PlayerType || (t.PlayerType = {})); }, 79295: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InputManager = void 0); var r = n(22970), i = n(9305), o = n(22674), a = n(16638), s = n(78620), u = n(2609), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.onCancel = function (e) { var t; null === (t = this.inputSystem) || void 0 === t || t.onCancel(e); }), (t.prototype.onStart = function (e) { var t; this.model.cancelTutorial(), null === (t = this.inputSystem) || void 0 === t || t.onStart(e); }), (t.prototype.onDrag = function (e) { var t; null === (t = this.inputSystem) || void 0 === t || t.onDrag(e); }), (t.prototype.onEnd = function (e) { var t; null === (t = this.inputSystem) || void 0 === t || t.onEnd(e); }), Object.defineProperty(t.prototype, "inputSystem", { get: function () { return this.model.engine.getSystem(u.InputSystem); }, enumerable: !1, configurable: !0, }), r.__decorate([(0, o.inject)(s.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.GameModel && a.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.InputManagerBase); t.InputManager = l; }, 9305: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InputManagerBase = void 0); var n = (function () { function e() { (this._handler = this.onPointerEvent.bind(this)), (this._started = !1); } return ( (e.prototype.init = function (e) { return (this.canvas = e), this; }), (e.prototype.start = function () { this._started || (this.canvas.addEventListener("pointerdown", this._handler), this.canvas.addEventListener("pointercancel", this._handler), this.canvas.addEventListener("pointerleave", this._handler), (this._started = !0)); }), (e.prototype.onPointerEvent = function (e) { switch (e.type) { case "pointerdown": this.onStart(e), this.addListeners(); break; case "pointermove": this.onDrag(e); break; case "pointerup": this.onDrag(e), this.onEnd(e); case "pointerleave": case "pointercancel": this.removeListeners(), this.onCancel(e); break; case "pointerout": e.target === e.currentTarget && this.removeListeners(); } }), (e.prototype.onCancel = function (e) {}), (e.prototype.addListeners = function () { this.canvas.addEventListener("pointerup", this._handler), this.canvas.addEventListener("pointermove", this._handler), this.canvas.addEventListener("pointerout", this._handler); }), (e.prototype.removeListeners = function () { this.canvas.removeEventListener("pointerup", this._handler), this.canvas.removeEventListener("pointermove", this._handler), this.canvas.removeEventListener("pointerout", this._handler); }), (e.prototype.stop = function () { this.canvas.removeEventListener("pointerdown", this._handler), this.canvas.removeEventListener("pointerup", this._handler), this.canvas.removeEventListener("pointermove", this._handler), this.canvas.removeEventListener("pointerout", this._handler), this.canvas.removeEventListener("pointercancel", this._handler), this.canvas.removeEventListener("pointerleave", this._handler), (this._started = !1); }), e ); })(); t.InputManagerBase = n; }, 53679: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SkinManager = void 0); var r = n(22970), i = n(17905), o = n(78620), a = n(22674), s = n(70600), u = n(18184), l = n(75747), c = (function () { function e() { (this.fighters = new Map()), (this.buildings = new Map()); } var t; return ( (e.prototype.fillSkins = function () { var e = this, t = this.cookies.absoluteLevelNum, n = l.SelectableBuildingDataSet[0], o = l.SelectableFighterDataSet[0], a = r.__read( l.SelectableFighterDataSet.filter(function (t) { return t.id === e.cookies.selected_fighter_id; }), 1 )[0], s = r.__read( l.SelectableBuildingDataSet.filter(function (t) { return t.id === e.cookies.selected_building_id; }), 1 )[0]; this.fighters.set(u.PlayerType.First, (a || o).textureUrl), this.buildings.set(u.PlayerType.First, (s || n).textureUrl), this.buildings.set(u.PlayerType.Neutral, n.textureUrl), Object.keys(u.PlayerType).forEach(function (r, a) { a != u.PlayerType.First && a !== u.PlayerType.Neutral && (t <= 5 ? (e.fighters.set(a, o.textureUrl), e.buildings.set(a, n.textureUrl)) : (e.fighters.set(a, i.Random.from(l.SelectableFighterDataSet).textureUrl), e.buildings.set(a, i.Random.from(l.SelectableBuildingDataSet).textureUrl))); }); }), (e.prototype.clearSkins = function () { this.fighters.clear(), this.buildings.clear(); }), (e.prototype.getGift = function () { var e = this.cookies.absoluteLevelNum, t = this.cookies.getUserFighterSet(), n = this.cookies.getUserBuildingSet(), r = l.SelectableFighterDataSet.concat(l.SelectableBuildingDataSet).filter(function (r) { if (r.playerLevelUnlock <= e) { if (r.type === l.SkinType.FIGHTER) return !t.includes(r.id); if (r.type === l.SkinType.BUILDING) return !n.includes(r.id); } return !1; }); return i.Random.from(r); }), (e.prototype.updateSkins = function () { this.clearSkins(), this.fillSkins(); }), Object.defineProperty(e.prototype, "selectedColorSet", { get: function () { var e = this; return l.SelectableColorsDataSet.filter(function (t) { return t.id === e.cookies.selected_color_set_id; }).map(function (e) { return r.__assign(r.__assign({}, e), { selected: !0, stored: !0 }); })[0]; }, enumerable: !1, configurable: !0, }), (e.prototype.getBuildingTextureBy = function (e) { return this.buildings.get(e); }), (e.prototype.getFighterTextureBy = function (e) { return this.fighters.get(e); }), (e.prototype.getColorBy = function (e) { var t, n, r = l.GameColors.players[e]; if (e === u.PlayerType.First) (null === (t = this.selectedColorSet) || void 0 === t ? void 0 : t.data) && (r = this.selectedColorSet.data); else if (e === u.PlayerType.Second && (null === (n = this.selectedColorSet) || void 0 === n ? void 0 : n.id)) { var i = l.SelectableColorsDataSet.filter(function (e) { return e.id === l.UserSelectableColorsSet.BLUE; }); this.selectedColorSet.id === l.UserSelectableColorsSet.BLUE && (i = l.SelectableColorsDataSet.filter(function (e) { return e.id === l.UserSelectableColorsSet.RED; })), i.length && (r = i[0].data); } return r; }), Object.defineProperty(e.prototype, "availableBuildings", { get: function () { return this.selectFrom(l.SelectableBuildingDataSet, this.cookies.getUserBuildingSet(), this.cookies.selected_building_id); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "availableFighters", { get: function () { return this.selectFrom(l.SelectableFighterDataSet, this.cookies.getUserFighterSet(), this.cookies.selected_fighter_id); }, enumerable: !1, configurable: !0, }), (e.prototype.selectFrom = function (e, t, n) { var i = this; return e .filter(function (e) { return i.cookies.absoluteLevelNum > e.playerLevelUnlock || -1 !== t.indexOf(e.id); }) .map(function (e) { var i = e.id === n, o = -1 !== t.indexOf(e.id); return r.__assign(r.__assign({}, e), { selected: i, stored: o }); }); }), r.__decorate([(0, a.inject)(o.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (t = void 0 !== s.CookieModel && s.CookieModel) ? t : Object)], e.prototype, "cookies", void 0), (e = r.__decorate([(0, a.injectable)()], e)) ); })(); t.SkinManager = c; }, 59248: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ArrowsMediator = void 0); var r = n(22970), i = n(30627), o = n(22674), a = n(73218), s = n(16638), u = n(78620), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.initialize = function () { var e = this; this.addListener(a.GameEvents.AIM_UPDATE, function (t) { return e.view.update(t); }), this.addListener(a.GameEvents.AIM_CREATE, function (t) { return e.view.createArrow(t); }), this.addListener(a.GameEvents.AIM_REMOVE, function () { return e.view.removeAim(); }), this.addListener(a.GameEvents.AIM_SET, function (t) { return e.view.setAim(t); }), this.addListener(a.GameEvents.AIM_HIDE, function (t) { return e.view.hideArrow(t); }); }), r.__decorate([(0, o.inject)(u.TypesGame.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.GameModel && s.GameModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Mediator); t.ArrowsMediator = l; }, 39833: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FieldMediator = void 0); var r = n(22970), i = n(64770), o = n(37394), a = n(30627), s = n(16638), u = n(78620), l = n(22674), c = n(73218), d = n(3915), h = r.__importDefault(n(15063)), p = r.__importDefault(n(86352)), f = n(12242), _ = n(14791), g = n(70789), m = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, a; return ( r.__extends(t, e), (t.prototype.initialize = function () { var e = this; this._renderingSystem || (this._renderingSystem = new d.DisplaySystem(this.view)), this.model.engine.addSystem(this._renderingSystem), (this.view.alpha = 0), this.addListener(c.GameEvents.LEVEL_LOADED, function () { e.onStateChanged(e.model.state), i.gsap.to(e.view, { alpha: 1 }); }), this.addListener(c.GameEvents.RESTART_LEVEL, function () { return e.focusOn(e.model.currentContinent.stageLevel); }), this.addListener(c.GameEvents.STATE_CHANGED, this.onStateChanged), this.addListener(c.GameEvents.RESIZE, this.onResize); }), (t.prototype.onResize = function () { this.onStateChanged(this.model.state); }), (t.prototype.onStateChanged = function (e) { switch (e) { case f.GameState.GAMEPLAY: this.focusOn(this.model.currentContinent.stageLevel); break; case f.GameState.LOBBY: this.focusOn(NaN, 0); break; case f.GameState.LOOSE: case f.GameState.WIN_STAGE: case f.GameState.WIN_CONTINENT: this.focusOn(NaN); } }), (t.prototype.getMapBounds = function (e, t) { if ((void 0 === t && (t = 150), isNaN(e))) { var n = this.view.getLocalBounds(); return [n.left, n.top, n.right, n.bottom]; } var i = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; return ( this.model.currentContinent.parsed.forEach(function (n, o) { var a; if (n.stage === e) if (isNaN(t)) null === (a = n.shapes) || void 0 === a || a.forEach(function (e) { var t = (0, h.default)(e); (i[0] = Math.min(i[0], t[0])), (i[1] = Math.min(i[1], t[1])), (i[2] = Math.max(i[2], t[2])), (i[3] = Math.max(i[3], t[3])); }); else { var s = r.__read(n.statePos, 2), u = s[0], l = s[1]; (i[0] = Math.min(i[0], u - t)), (i[1] = Math.min(i[1], l - t)), (i[2] = Math.max(i[2], u + t)), (i[3] = Math.max(i[3], l + t)); } }), i ); }), (t.prototype.focusOn = function (e, t) { void 0 === e && (e = 0), void 0 === t && (t = 1); var n = _.GameConstants.StartScreen.focusHeightFactor, o = isNaN(e) ? 0 : 100, a = this.root.size, s = a.width, u = a.height, l = isNaN(e) ? u * n : u, c = r.__read(this.getMapBounds(e), 4), d = c[0], h = c[1], p = c[2], f = c[3]; h -= o; var m = p - d, v = (f += g.SIOConstants.BANNER_HEIGHT) - h, y = s / m, C = l / v, b = Math.min(1, Math.min(y, C)), w = m * b, S = v * b, T = d * b, x = h * b; i.gsap.to(this.view.scale, { x: b, y: b, duration: t }), i.gsap.to(this.view, { x: 0.5 * (s - w) - T, y: 0.5 * (l - S) - x, duration: t }), this.model.currentContinent.buildings.forEach(function (n) { return n.toggleActive(e, t); }); }), (t.prototype.destroy = function () { this.model.engine.removeSystem(this._renderingSystem), e.prototype.destroy.call(this); }), r.__decorate([(0, l.inject)(o.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== p.default && p.default) ? n : Object)], t.prototype, "root", void 0), r.__decorate([(0, l.inject)(u.TypesGame.model), r.__metadata("design:type", "function" == typeof (a = void 0 !== s.GameModel && s.GameModel) ? a : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, l.injectable)()], t)) ); })(a.Mediator); t.FieldMediator = m; }, 13169: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.RootMediator = void 0); var r = n(22970), i = n(30627), o = n(22674), a = n(73218), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.getConfig = function () { return r.__assign(r.__assign({}, e.prototype.getConfig.call(this)), { backgroundColor: 13684944 }); }), (t.prototype.onResize = function () { e.prototype.onResize.call(this); var t = this.view.app; this.dispatch(a.GameEvents.RESIZE, { width: t.view.clientWidth, height: t.view.clientHeight }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.RootMediator); t.RootMediator = s; }, 84616: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BotPreset6FinalAgressive = t.BotPreset5Final = t.BotPreset4Hard = t.BotPreset3UpperMedium = t.BotPreset2Medium = t.BotPreset1Easy = t.BotPreset0Vegetable = void 0); var r = n(22970), i = function (e, t) { return void 0 === t && (t = { waitTimeBetweenDecisions: 1, traceDuration: 6, stepDuration: 0.5, forcesBalanceFactor: 1, buildingsBalanceFactor: 1, spawnBalanceFactor: 1, fightersInSegment: 10, isConsiderGroupToGroupIntersection: !1, commandInDecisionOrder: [0, 0], maxBuildingsMove: 3, targetReachedTimeBoost: 0, alivePlayerBuildingsLimit: -1, isForbiddenUpgrade: !1 }), r.__assign(r.__assign({}, t), e); }; (t.BotPreset0Vegetable = i({ name: "0Vegetable", waitTimeBetweenDecisions: 10, traceDuration: 10, stepDuration: 0.5, forcesBalanceFactor: 0.2, buildingsBalanceFactor: 1, spawnBalanceFactor: 0, fightersInSegment: 10, maxBuildingsMove: 3, targetReachedTimeBoost: 2, alivePlayerBuildingsLimit: 2 })), (t.BotPreset1Easy = i({ name: "1Easy", waitTimeBetweenDecisions: 12, traceDuration: 15, stepDuration: 0.5, forcesBalanceFactor: 0.1, buildingsBalanceFactor: 1, spawnBalanceFactor: 0, fightersInSegment: 10, maxBuildingsMove: 2, targetReachedTimeBoost: 2, alivePlayerBuildingsLimit: -1 })), (t.BotPreset2Medium = i({ name: "2Medium", waitTimeBetweenDecisions: 7, traceDuration: 10, stepDuration: 0.5, forcesBalanceFactor: 1, buildingsBalanceFactor: 2, spawnBalanceFactor: 0, fightersInSegment: 10, maxBuildingsMove: 3, targetReachedTimeBoost: 2, alivePlayerBuildingsLimit: -1 })), (t.BotPreset3UpperMedium = i({ name: "3UpperMedium", waitTimeBetweenDecisions: 5, traceDuration: 10, stepDuration: 0.25, forcesBalanceFactor: 1, buildingsBalanceFactor: 2, spawnBalanceFactor: 1, fightersInSegment: 10, maxBuildingsMove: 3, targetReachedTimeBoost: 1, alivePlayerBuildingsLimit: -1 })), (t.BotPreset4Hard = i({ name: "4Hard", waitTimeBetweenDecisions: 5, traceDuration: 20, stepDuration: 0.2, forcesBalanceFactor: 0, buildingsBalanceFactor: 1, spawnBalanceFactor: 0, fightersInSegment: 10, maxBuildingsMove: 4, targetReachedTimeBoost: 1, alivePlayerBuildingsLimit: -1 })), (t.BotPreset5Final = i({ name: "5Final", waitTimeBetweenDecisions: 4, traceDuration: 20, stepDuration: 0.1, forcesBalanceFactor: 1, buildingsBalanceFactor: 1, spawnBalanceFactor: 1, fightersInSegment: 10, maxBuildingsMove: 3, targetReachedTimeBoost: 0, alivePlayerBuildingsLimit: -1 })), (t.BotPreset6FinalAgressive = i({ name: "6FinalAgressive", waitTimeBetweenDecisions: 4, traceDuration: 30, stepDuration: 0.1, forcesBalanceFactor: 1, buildingsBalanceFactor: 0 })); }, 67768: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BotPresetsModel = void 0); var r = n(22970), i = n(17905), o = n(78620), a = n(49088), s = n(84616), u = n(22674), l = n(70600), c = n(16638), d = (function () { function e() { (this._startBot = s.BotPreset0Vegetable), (this._currentPresetName = ""), (this._lowLevelPresetEveryFights = 3), (this._presets = [ [3, 0, [[s.BotPreset1Easy, 1]]], [2, 1, [[s.BotPreset2Medium, 1]]], [3, 1, [[s.BotPreset3UpperMedium, 1]]], [3, 1, [[s.BotPreset4Hard, 1]]], [3, 1, [[s.BotPreset6FinalAgressive, 1]]], ]); } var t, n; return ( (e.prototype.selectPreset = function () { if (1 === this.cookie.absoluteLevelNum && this.cookie.currentStage < 2) return (this._currentPresetName = this._startBot.name), this._startBot; if (this.isLowLevelFight) { var e = this.getPrevLevel(this.cookie.botLevel), t = r.__read(this._presets[e], 3)[2], n = this.selectRandom(t); return (this._currentPresetName = n.name), n; } var i = r.__read(this._presets[this.cookie.botLevel], 3)[2], o = this.selectRandom(i); return (this._currentPresetName = o.name), o; }), (e.prototype.selectRandom = function (e) { return r.__read(i.Random.from(e), 1)[0]; }), (e.prototype.updateBotLevel = function (e) { if (e) { if (this.isLowLevelFight) return void this.cookie.fightsPassed++; this.cookie.fightsPassed++, this.cookie.wins++, this.cookie.wins > this._presets[this.cookie.botLevel][0] && ((this.cookie.wins = 0), (this.cookie.loses = 0), (this.cookie.fightsPassed = 0), (this.cookie.botLevel = Math.min(this.cookie.botLevel + 1, this._presets.length - 1))); } else { if (this.isLowLevelFight) return void this.cookie.fightsPassed++; this.cookie.fightsPassed++, this.cookie.loses++, this.cookie.loses > this._presets[this.cookie.botLevel][1] && ((this.cookie.wins = 0), (this.cookie.loses = 0), (this.cookie.fightsPassed = 0), (this.cookie.botLevel = Math.max(this.cookie.botLevel - 1, 0))); } }), (e.prototype.getPrevLevel = function (e) { return a.math.clamp(e - 1, 0, this._presets.length - 1); }), Object.defineProperty(e.prototype, "isLowLevelFight", { get: function () { return this.cookie.fightsPassed % this._lowLevelPresetEveryFights == 1 && this.cookie.botLevel > 0; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "currentPresetName", { get: function () { return this._currentPresetName || ""; }, enumerable: !1, configurable: !0, }), r.__decorate([(0, u.inject)(o.TypesGame.model), r.__metadata("design:type", "function" == typeof (t = void 0 !== c.GameModel && c.GameModel) ? t : Object)], e.prototype, "model", void 0), r.__decorate([(0, u.inject)(o.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (n = void 0 !== l.CookieModel && l.CookieModel) ? n : Object)], e.prototype, "cookie", void 0), (e = r.__decorate([(0, u.injectable)()], e)) ); })(); t.BotPresetsModel = d; }, 68606: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ContinentModel = void 0); var r = n(22970), i = n(46595), o = n(17905), a = n(35139), s = n(22674), u = n(18184), l = n(41368), c = n(79207), d = n(54626), h = n(49088), p = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.parsed = new Map()), (t.buildings = new Map()), (t._stageScores = []), (t._stageLevel = 0), (t.time = new d.TimeTrack(1e3)), t; } return ( r.__extends(t, e), Object.defineProperty(t.prototype, "data", { get: function () { return this._data; }, enumerable: !1, configurable: !0, }), (t.prototype.init = function (e) { var t = this; this._data = e; for ( var n = function (n) { var i = (0, h.getOwnerGenerator)(); r._data.stages[n].states.forEach(function (r) { return (function (n, r, i) { void 0 === r && (r = 0); var a = n.shapes; if (a) { var s = i(n.fillColor); t.parsed.set("".concat(e.id, "-").concat(n.id), { stage: r, shapes: a, shapePos: [NaN, NaN], statePos: [n.x, n.y], stateRadius: n.radius || 40, startOwner: s }); } else o.log.warn("Failed to parse", n.id); })(r, n, i); }); }, r = this, i = 0; i < this._data.stages.length; i++ ) n(i); return ( (this._stageScores = this._data.stages.map(function (e) { return 0; })), this ); }), (t.prototype.captureStage = function () { this.time.stop(), (this._stageScores[this._stageLevel] = this.getStageScore()), this._stageLevel++; }), Object.defineProperty(t.prototype, "isFinished", { get: function () { return this._stageLevel > this._data.stages.length - 1; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "stageLevel", { get: function () { return this._stageLevel; }, set: function (e) { this._stageLevel = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "totalStages", { get: function () { return this._data.stages.length; }, enumerable: !1, configurable: !0, }), (t.prototype.getOrCreateBuildingEntity = function (e, t) { return this.buildings.has(e) || this.buildings.set(e, i.di.get(a.Building).init(e, t)), this.buildings.get(e); }), (t.prototype.getTotalScore = function () { return this._stageScores.reduce(function (e, t) { return e + t; }); }), (t.prototype.getStageScore = function (e) { var t, n, i = 0.001 * this.time.getTotalTime(), o = 0, a = 0; this.buildings.forEach(function (e) { var t; e.owner === u.PlayerType.First && (a++, (o += (null === (t = e.get(l.Population)) || void 0 === t ? void 0 : t.current) || 0)); }); var s = c.FighterGroupsSystem.GetActiveGroups(); try { for (var d = r.__values(s), h = d.next(); !h.done; h = d.next()) { var p = h.value; p.Owner === u.PlayerType.First && (o += p.Amount); } } catch (e) { t = { error: e }; } finally { try { h && !h.done && (n = d.return) && n.call(d); } finally { if (t) throw t.error; } } var f = (a * o) / i; return Math.round(f); }), (t.prototype.getHistory = function () { return { l: this.data.id, c: this.stageLevel, s: this._stageScores }; }), (t.prototype.dispose = function () { this.buildings.forEach(function (e) { return e.destroy(); }), this.buildings.clear(), this.parsed.clear(), this.time.stop(); }), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.GlobalEventProvider); t.ContinentModel = p; }, 70600: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CookieModel = t.CookieModelKey = void 0); var r, i = n(22970), o = n(46595), a = n(37394), s = n(17905), u = n(70789), l = n(73218), c = n(78940), d = n(75747), h = n(22674), p = n(18184); !(function (e) { (e.coins = "coins"), (e.bot_level = "bot_level"), (e.fights_passed = "fights_passed"), (e.wins = "wins"), (e.loses = "loses"), (e.absoluteTryNum = "absoluteTryNum"), (e.absoluteLevelNum = "absoluteLevelNum"), (e.localLevelNum = "localLevelNum"), (e.currentStage = "currentStage"), (e.playerOfflineLevel = "playerOfflineLevel"), (e.playerSpawnLevel = "playerSpawnLevel"), (e.playerStartPopulation = "playerStartPopulation"), (e.lastLaunch = "lastLaunch"), (e.timeDiff = "timeDiff"), (e.ctx_history = "ctx_history"), (e.selected_color_set_id = "selected_color_set_id"), (e.selected_building_id = "selected_building_id"), (e.selected_fighter_id = "selected_fighter_id"), (e.user_buildings_set = "user_buildings_set"), (e.user_fighter_set = "user_fighter_set"); })((r = t.CookieModelKey || (t.CookieModelKey = {}))); var f = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( i.__extends(t, e), (t.prototype.getDefaultStore = function () { var e; return ((e = {})[r.coins] = 0), (e[r.bot_level] = 0), (e[r.fights_passed] = 0), (e[r.wins] = 0), (e[r.loses] = 0), (e[r.absoluteTryNum] = 0), (e[r.absoluteLevelNum] = 1), (e[r.localLevelNum] = 1), (e[r.currentStage] = 0), (e[r.playerOfflineLevel] = 1), (e[r.playerSpawnLevel] = 1), (e[r.playerStartPopulation] = 1), (e[r.lastLaunch] = 0), (e[r.timeDiff] = 0), (e[r.ctx_history] = "{}"), (e[r.selected_color_set_id] = d.UserSelectableColorsSet.BLUE), (e[r.selected_building_id] = 1), (e[r.selected_fighter_id] = 1), (e[r.user_buildings_set] = "[1]"), (e[r.user_fighter_set] = "[1]"), e; }), Object.defineProperty(t.prototype, "playerOfflineLevel", { get: function () { return this.get(r.playerOfflineLevel); }, set: function (e) { this.set(r.playerOfflineLevel, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "playerSpawnLevel", { get: function () { return this.get(r.playerSpawnLevel); }, set: function (e) { this.set(r.playerSpawnLevel, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "absoluteLevelNum", { get: function () { return this.get(r.absoluteLevelNum); }, set: function (e) { this.set(r.absoluteLevelNum, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "absoluteTryNum", { get: function () { return this.get(r.absoluteTryNum); }, set: function (e) { this.set(r.absoluteTryNum, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "coins", { get: function () { return 1 * this.get(r.coins); }, set: function (e) { this.set(r.coins, e), o.di.get(a.TypesCore.dispatcher).emit(l.GameEvents.COINS_UPDATED, { coins: this.coins }); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "playerStartPopulation", { get: function () { return this.get(r.playerStartPopulation); }, set: function (e) { this.set(r.playerStartPopulation, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "currentStage", { get: function () { return this.get(r.currentStage); }, set: function (e) { this.set(r.currentStage, e); }, enumerable: !1, configurable: !0, }), (t.prototype.isEnoughCoins = function (e) { return this.coins - e >= 0; }), Object.defineProperty(t.prototype, "fightsPassed", { get: function () { return this.get(r.fights_passed); }, set: function (e) { this.set(r.fights_passed, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "botLevel", { get: function () { return this.get(r.bot_level); }, set: function (e) { this.set(r.bot_level, e); }, enumerable: !1, configurable: !0, }), (t.prototype.spendCoins = function (e) { this.coins -= e; }), Object.defineProperty(t.prototype, "lastLaunch", { get: function () { return this.get(r.lastLaunch); }, set: function (e) { this.set(r.lastLaunch, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "timeDiff", { get: function () { return this.get(r.timeDiff); }, set: function (e) { this.set(r.timeDiff, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "wins", { get: function () { return this.get(r.wins); }, set: function (e) { this.set(r.wins, e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "loses", { get: function () { return this.get(r.loses); }, set: function (e) { this.set(r.loses, e); }, enumerable: !1, configurable: !0, }), (t.prototype.sync = function () { return i.__awaiter(this, void 0, Promise, function () { return i.__generator(this, function (t) { switch (t.label) { case 0: return [4, e.prototype.sync.call(this)]; case 1: return t.sent(), this.syncTime(), [2]; } }); }); }), (t.prototype.syncTime = function () { var e = !this.social.inSolo, t = Date.now(); 0 === this.lastLaunch && (this.lastLaunch = t), e || (this.timeDiff = t - this.lastLaunch), this.timeDiff >= u.SIOConstants.MAX_REWARD_CAP_IN_MS && (this.timeDiff = u.SIOConstants.MAX_REWARD_CAP_IN_MS), e || (this.lastLaunch = t); }), (t.prototype.getContextHistory = function (e) { var t = this.get(r.ctx_history), n = {}; try { n = JSON.parse(t); } catch (e) { s.log.warn("Failed to load ctx history", t); } var i = n[e].length; return n[e][i - 1]; }), (t.prototype.getContextHistories = function () { var e = this.get(r.ctx_history), t = {}; try { t = JSON.parse(e); } catch (t) { s.log.warn("Failed to load ctx history", e); } return t; }), (t.prototype.setContextHistory = function (e, t) { var n = this.get(r.ctx_history), i = {}; try { i = JSON.parse(n); } catch (e) { s.log.warn("Failed to load ctx history"); } if (i) { var o = i[e]; t.c >= t.s.length - 1 && (o.length < 3 || o.shift(), o.push(t)); } this.set(r.ctx_history, JSON.stringify(i)); }), Object.defineProperty(t.prototype, "selectedColorSet", { get: function () { var e = this.get(r.selected_color_set_id); return d.SelectableColorsDataSet.filter(function (t) { return t.id === e; }).map(function (e) { return i.__assign(i.__assign({}, e), { selected: !0, stored: !0 }); })[0]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "selectedBuilding", { get: function () { var e = this; return d.SelectableBuildingDataSet.filter(function (t) { return t.id === e.get(r.selected_building_id); }).map(function (e) { return i.__assign(i.__assign({}, e), { selected: !0, stored: !0 }); })[0]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "selectedFighter", { get: function () { var e = this; return d.SelectableFighterDataSet.filter(function (t) { return t.id === e.get(r.selected_fighter_id); }).map(function (e) { return i.__assign(i.__assign({}, e), { selected: !0, stored: !0 }); })[0]; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "user_buildings_set", { get: function () { return this.get(r.user_buildings_set); }, enumerable: !1, configurable: !0, }), (t.prototype.getUserBuildingSet = function () { var e = []; try { e = e.concat(Array.isArray(this.user_buildings_set) ? this.user_buildings_set : JSON.parse(this.user_buildings_set)); } catch (e) { s.log.warn("Failed to load user stored buildings"); } return e; }), (t.prototype.getUserFighterSet = function () { var e = []; try { e = e.concat(Array.isArray(this.user_fighter_set) ? this.user_fighter_set : JSON.parse(this.user_fighter_set)); } catch (e) { s.log.warn("Failed to load user stored fighters"); } return e; }), Object.defineProperty(t.prototype, "user_fighter_set", { get: function () { return this.get(r.user_fighter_set); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "availableColors", { get: function () { var e = this; return d.SelectableColorsDataSet.map(function (t) { var n = t.id === e.get(r.selected_color_set_id); return i.__assign(i.__assign({}, t), { stored: !0, selected: n }); }); }, enumerable: !1, configurable: !0, }), (t.prototype.addUserBuilding = function (e) { this.addUserSet(e, r.user_buildings_set); }), (t.prototype.addUserFighter = function (e) { this.addUserSet(e, r.user_fighter_set); }), (t.prototype.addUserSet = function (e, t) { var n = this.get(t); try { var r = [].concat(Array.isArray(n) ? n : JSON.parse(n)); -1 === r.indexOf(e) && r.push(e), this.set(t, JSON.stringify(r)); } catch (e) { s.log.warn("Failed to load user stored fighters"); } }), Object.defineProperty(t.prototype, "selected_color_set_id", { get: function () { return this.get(r.selected_color_set_id); }, set: function (e) { e !== this.get(r.selected_color_set_id) && (this.set(r.selected_color_set_id, e), this.onUserSelectableKeyChanged()); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "selected_building_id", { get: function () { return 1 * this.get(r.selected_building_id); }, set: function (e) { e !== this.get(r.selected_building_id) && (this.set(r.selected_building_id, e), this.onUserSelectableKeyChanged()); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "selected_fighter_id", { get: function () { return 1 * this.get(r.selected_fighter_id); }, set: function (e) { e !== this.get(r.selected_fighter_id) && (this.set(r.selected_fighter_id, e), this.onUserSelectableKeyChanged()); }, enumerable: !1, configurable: !0, }), (t.prototype.onUserSelectableKeyChanged = function () { o.di.get(a.TypesCore.dispatcher).emit(l.GameEvents.SELECTABLE_ITEM_CHANGED); }), (t.prototype.getColorByPlayerType = function (e) { var t, n, r = d.GameColors.players[e]; if (e === p.PlayerType.First) (null === (t = this.selectedColorSet) || void 0 === t ? void 0 : t.data) && (r = this.selectedColorSet.data); else if (e === p.PlayerType.Second && (null === (n = this.selectedColorSet) || void 0 === n ? void 0 : n.id)) { var i = d.SelectableColorsDataSet.filter(function (e) { return e.id === d.UserSelectableColorsSet.BLUE; }); this.selectedColorSet.id === d.UserSelectableColorsSet.BLUE && (i = d.SelectableColorsDataSet.filter(function (e) { return e.id === d.UserSelectableColorsSet.RED; })), i.length && (r = i[0].data); } return r; }), (t.prototype.get = function (t) { var n = e.prototype.get.call(this, t); (void 0 !== n && "undefined" !== n) || (n = this.getDefaultStore()[t]); return n; }), (t = i.__decorate([(0, h.injectable)()], t)) ); })(c.CookieModelBase); t.CookieModel = f; }, 78940: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CookieModelBase = void 0); var r = n(22970), i = n(17905), o = n(37394), a = n(57228), s = n(22674), u = (function () { function e() { this._store = this.getDefaultStore(); } var t; return ( (e.prototype.sync = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return [4, (e = this.social.cookie).get(Object.keys(this._store))]; case 1: return ( (t = r.sent()), Object.keys(t).forEach(function (r) { if (void 0 === t[r]) { var o = n._store[r]; i.log.debug(r, "set to default", o), e.save(r, o); } else n._store[r] = t[r]; }), [2] ); } }); }); }), (e.prototype.get = function (e) { return this._store[e]; }), (e.prototype.set = function (e, t) { (this._store[e] = t), this.social.cookie.save(e, t); }), (e.prototype.clear = function () { var e = this; (this._store = this.getDefaultStore()), Object.keys(this._store).forEach(function (t) { var n = e._store[t]; i.log.debug(t, "set to default", n), e.social.cookie.save(t, n); }); }), r.__decorate([(0, s.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (t = void 0 !== a.ISocial && a.ISocial) ? t : Object)], e.prototype, "social", void 0), (e = r.__decorate([(0, s.injectable)(), r.__metadata("design:paramtypes", [])], e)) ); })(); t.CookieModelBase = u; }, 16638: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameModel = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(37394), s = n(57228), u = n(47166), l = n(70789), c = n(63880), d = n(96669), h = n(7407), p = n(65200), f = n(497), _ = n(12714), g = n(2609), m = n(76221), v = n(65451), y = n(97649), C = n(12242), b = n(92731), w = n(78620), S = n(25417), T = n(22674), x = n(7687), E = n(61751), L = n(73218), A = n(18184), I = n(70600), M = n(940), P = n(53679), O = n(88931), k = n(81599), R = function (e) { var t; void 0 === e && (e = !1), null === (t = (0, o.lazyGet)(w.TypesGame.actions.endStage)) || void 0 === t || t.run(e); }, D = (function (e) { function t() { var t = e.call(this) || this; return ( (t.levels = {}), (t.engine = new x.Engine()), (t._engineTick = function (e) { return void 0 === e && (e = 0), t.engine.update(e); }), (t.screenshots = []), (t.gameplaySystems = [new y.PopulationSystem(), new h.BotsSystem(), new f.GamePlaySystem(), new g.InputSystem(), new p.FighterMovementSystem()]), (t._rewardedAdsAllowed = l.SIOConstants.REWARDED_AD_ALLOWED), (t.paused = !1), t ); } var n, D, N, B, F; return ( r.__extends(t, e), (n = t), Object.defineProperty(t.prototype, "currentContinent", { get: function () { return this._currentContinent; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "rewardedAdsAllowed", { get: function () { return this._rewardedAdsAllowed; }, enumerable: !1, configurable: !0, }), (t.prototype.offerX3 = function () { return this._rewardedAdsAllowed && !0; }), (t.prototype.setCurrentContinent = function (e, t) { void 0 === t && (t = 0), this._currentContinent !== e && ((this._currentContinent = e), this.engine.addQuery(c.ActiveBuildingsQuery), this.engine.addQuery(d.AllBuildingsQuery), this.engine.addSystem(new _.InitStageSystem(e, e.stageLevel))); }), (t.prototype.startStage = function (e) { void 0 === e && (e = this._currentContinent), this.screenshots.splice(0, Number.MAX_SAFE_INTEGER), e.time.start(), this.engine.addSystem(new _.InitStageSystem(e, e.stageLevel)), this.engine.addSystem(new v.PathsGenerationSystem()), (this.state = C.GameState.GAMEPLAY); }), (t.prototype.gotoNextLevelStage = function () { return this._state !== C.GameState.WIN_CONTINENT || (this.engine.clear(), !1); }), (t.prototype.endStage = function (e, t) { if ((void 0 === e && (e = !1), void 0 === t && (t = !1), e)) { if (t) return (this.currentContinent.stageLevel = this.currentContinent.data.stages.length), (this.cookie.currentStage = 0), void (this.state = C.GameState.WIN_CONTINENT); this.currentContinent.captureStage(), this.incrementContextScore(), (this.cookie.currentStage = this.currentContinent.stageLevel), this.currentContinent.isFinished ? ((this.cookie.currentStage = 0), (this.state = C.GameState.WIN_CONTINENT)) : (this.state = C.GameState.WIN_STAGE); } else this.state = C.GameState.LOOSE; }), (t.prototype.restartLevel = function () { this.currentContinent.buildings.clear(), this.engine.removeAllEntities(), this.dispatch(L.GameEvents.RESTART_LEVEL); }), Object.defineProperty(t.prototype, "paused", { get: function () { return this._paused; }, set: function (e) { var t, n; this._paused !== e && ((this._paused = e), this._paused ? (null === (t = this._currentContinent) || void 0 === t || t.time.pause(), M.Ticker.shared.remove(this._engineTick)) : (null === (n = this._currentContinent) || void 0 === n || n.time.resume(), M.Ticker.shared.add(this._engineTick))); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "state", { get: function () { return this._state; }, set: function (e) { this._state !== e && ((this._state = e), this.onStateChanged()); }, enumerable: !1, configurable: !0, }), (t.prototype.createFieldScreenShot = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n; return r.__generator(this, function (r) { switch (r.label) { case 0: return (e = o.di.get(w.TypesGame.views.fieldInstance)), [4, null == (t = (0, o.lazyGet)(a.Types2D.screenShotAction)) ? void 0 : t.run({ image: e.map })]; case 1: if ((n = r.sent())) { for (this.screenshots.push(n); this.screenshots.length > 2; ) this.screenshots.shift(); return [2, n]; } return i.log.warn("Screenshot creation failed"), [2]; } }); }); }), (t.prototype.exitTheGame = function () { var e = this; (this.paused = !0), this.dispatch(u.UIEvents.POPUP, { id: S.PopupType.CONFIRM, props: { onConfirm: function (t) { return ( void 0 === t && (t = !1), r.__awaiter(e, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return this.cookie.syncTime(), t ? (this.social.inSolo ? [3, 3] : [4, this.social.playSolo()]) : [3, 4]; case 1: return e.sent(), [4, o.di.get(a.TypesFlow.LevelStart).run()]; case 2: e.sent(), (e.label = 3); case 3: (this.state = C.GameState.LOBBY), (e.label = 4); case 4: return (this.paused = !1), this.dispatch(u.UIEvents.POPUP, { id: null }), [2]; } }); }) ); }, }, }); }), (t.prototype.cancelTutorial = function () { var e = this.engine.getSystem(E.TutorialSystem); e && this.engine.removeSystem(e); }), (t.prototype.onStateChanged = function () { var e = this, t = function () { e.dispatch(L.GameEvents.AIM_REMOVE), e.gameplaySystems.forEach(function (t) { return e.engine.removeSystem(t); }), e.engine.addSystem(new m.LevelEndSystem()), e.cancelTutorial(); }; switch (this._state) { case C.GameState.LOOSE: t(), R(!1); break; case C.GameState.WIN_STAGE: t(), this.createFieldScreenShot(), R(!0); break; case C.GameState.WIN_CONTINENT: t(), this.createFieldScreenShot(), (function (e) { var t; void 0 === e && (e = !1), null === (t = (0, o.lazyGet)(a.TypesFlow.LevelEnd)) || void 0 === t || t.run(e); })(!0); break; case C.GameState.LOBBY: t(), this.dispatch(u.UIEvents.SCREEN_CHANGED, { id: a.TypesUI.screen.HOME }); break; case C.GameState.GAMEPLAY: this.gameplaySystems.forEach(function (t) { return e.engine.addSystem(t); }), this.engine.addSystem(new E.TutorialSystem()), this.dispatch(u.UIEvents.SCREEN_CHANGED, { id: a.TypesUI.screen.GAMEPLAY, props: { participants: this.getAssociatedUsers() } }); } i.log.debug("GameState ->", C.GameState[this._state]), this.dispatch(L.GameEvents.STATE_CHANGED, this._state); }), Object.defineProperty(t.prototype, "absoluteLevelNum", { get: function () { return this.cookie.absoluteLevelNum; }, enumerable: !1, configurable: !0, }), (t.prototype.getAssociatedUsers = function (e) { var t = this; void 0 === e && (e = this.currentContinent.stageLevel); var n = this.social, i = new Map(), o = n.inSolo ? [] : n.contextPlayers.slice(0); o.sort(function (e, t) { return e === n.me ? -1 : 0; }); var a = new Set(); this.currentContinent.parsed.forEach(function (t) { t.stage === e && a.add(t.startOwner); }); for ( var s = Array.from(a).sort(function (e, t) { return e - t; }), u = 0; u < s.length; u++ ) { var l = null; switch (s[u]) { case A.PlayerType.First: l = o.shift(); break; case A.PlayerType.Neutral: break; default: l = o.pop(); } l && i.set(s[u], l); } return Array.from(i, function (e) { var n = r.__read(e, 2), i = n[0]; return { owner: i, data: n[1], color: t.skinManager.getColorBy(i)[0] }; }); }), (t.prototype.goToLobby = function () { (this.state = C.GameState.LOBBY), this.onStateChanged(); }), (t.prototype.getOfflineEarning = function () { var e = new Date(this.cookie.timeDiff), t = this.meta.getOfflineEarning(), n = !1, r = 0, i = this.cookie.timeDiff / 1e3; if (i > 60 * l.SIOConstants.MIN_OFFLINE_EARNINGS_PERIOD_IN_MIN) { var o = (t / 60 / 60) * i; o >= 1 && ((n = !0), (r = Math.round(o))); } return { isRewarded: n, reward: r, date: e }; }), (t.prototype.getLevelNameByAbsoluteNum = function (e) { return n.LEVELS_PREDEFINED[Math.floor(e % n.LEVELS_PREDEFINED.length)]; }), (t.prototype.onShopScreenChanged = function () { this.skinManager.updateSkins(), this.engine.addSystem(new O.UpdateSkinsSystem()); }), (t.prototype.disposeCurrentLevel = function () { var e; return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, o.di.get(k.DestroyFieldAction).run()]; case 1: return t.sent(), null === (e = this._currentContinent) || void 0 === e || e.dispose(), (this._currentContinent = null), this.engine.clear(), o.di.get(w.TypesGame.spritesPool).purge(), [2]; } }); }); }), (t.prototype.incrementContextScore = function () { return r.__awaiter(this, void 0, void 0, function () { var e; return r.__generator(this, function (t) { return this.social.context_id && !this.social.inSolo && (null == (e = (0, o.lazyGet)(a.TypesSocial.leaderboardContext)) || e.submit(this.social.me.scoreContext + 1, this.currentContinent.getHistory())), [2]; }); }); }), (t.prototype.getContextData = function () { if (this.social.inSolo) return { l: this.getLevelNameByAbsoluteNum(this.absoluteLevelNum - 1), c: this.cookie.currentStage, s: [] }; var e, t; if (this.social.context_id) { var r = this.social.me.scores.getEntry(s.ScoreType.CONTEXT), o = null == r ? void 0 : r.getExtraData(); if (o) { var a = JSON.parse(o); if (a) { if ((a.c || 0) >= (a.s.length || Number.MAX_SAFE_INTEGER)) { var u = a.l || i.Random.from(n.LEVELS_PREDEFINED), l = n.LEVELS_PREDEFINED.indexOf((void 0 === (t = "svg") && (t = "svg"), (e = u).endsWith(".".concat(t)) ? e : "".concat(e, ".").concat(t))); -1 == l && (l = 0), ++l >= n.LEVELS_PREDEFINED.length && (l = 0), (a.l = n.LEVELS_PREDEFINED[l]), (a.s = []), (a.c = 0), i.log.debug("new context data generated", a); } return a; } } } return n.DEFAULT_CTX_DATA; }), (t.LEVELS_PREDEFINED = ["United-States.svg", "Latin-America.svg", "Africa.svg", "UK.svg", "EuropeanUnion.svg", "Italy.svg", "Arabic.svg", "Central-Asia.svg", "Japan.svg", "China,Russia,Korea,Japan.svg", "Korea.svg", "China-Oceania-Australia.svg", "United-States2.svg"].filter(function (e, t, n) { return n.indexOf(e) === t; })), (t.DEFAULT_CTX_DATA = { l: n.LEVELS_PREDEFINED[0], c: 0, s: [] }), r.__decorate([(0, o.lazyInject)(b.MetaModel), r.__metadata("design:type", "function" == typeof (D = void 0 !== b.MetaModel && b.MetaModel) ? D : Object)], t.prototype, "meta", void 0), r.__decorate([(0, o.lazyInject)(w.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (N = void 0 !== I.CookieModel && I.CookieModel) ? N : Object)], t.prototype, "cookie", void 0), r.__decorate([(0, o.lazyInject)(a.TypesSocial.model), r.__metadata("design:type", "function" == typeof (B = void 0 !== s.ISocial && s.ISocial) ? B : Object)], t.prototype, "social", void 0), r.__decorate([(0, o.lazyInject)(w.TypesGame.skinManager), r.__metadata("design:type", "function" == typeof (F = void 0 !== P.SkinManager && P.SkinManager) ? F : Object)], t.prototype, "skinManager", void 0), (t = n = r.__decorate([(0, T.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(o.GlobalEventProvider); t.GameModel = D; }, 12242: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameState = void 0), (function (e) { (e[(e.LOBBY = 0)] = "LOBBY"), (e[(e.WIN_STAGE = 1)] = "WIN_STAGE"), (e[(e.WIN_CONTINENT = 2)] = "WIN_CONTINENT"), (e[(e.LOOSE = 3)] = "LOOSE"), (e[(e.LOADING = 4)] = "LOADING"), (e[(e.GAMEPLAY = 5)] = "GAMEPLAY"); })(t.GameState || (t.GameState = {})); }, 97214: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GiftTypeReward = void 0), (function (e) { (e[(e.NONE = 0)] = "NONE"), (e.COINS = "coins"); })(t.GiftTypeReward || (t.GiftTypeReward = {})); }, 4488: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.MetaConfig = void 0); var r = n(22970), i = n(17905), o = function (e, t, n) { return e * n + t * (1 - n); }, a = (function () { function e() { (this._levelFinishReward = { Start: 200, GainBalance: [[0, 160]] }), (this._startPopulation = { Start: 10, GainBalance: [[0, 1]] }), (this._generationSpeed = { Start: 1, GainBalance: [ [0, 0.073], [151, 0.079], ], }), (this._offlineEarning = { Start: 100, GainBalance: [ [0, 75], [10, 150], [20, 300], [30, 375], [40, 450], [50, 675], [60, 750], [70, 825], [80, 900], [90, 975], [100, 1050], [110, 1500], [120, 2e3], [130, 2500], ], }), (this._boostersCost = { Start: 50, GainBalance: [ [0, 95], [20, 155], [40, 250], ], }), (this._neutralRate = { Start: 1, GainBalance: [ [10, 1.7], [20, 2.4], [30, 3.1], [40, 3.8], [50, 4.6], [60, 5.4], [70, 6], [80, 6.8], [90, 7.5], [100, 8.2], ], }), (this._neutralStart = { Start: 10, GainBalance: [ [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], ], }), (this._neutralCap = { Start: 10, GainBalance: [ [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 60], ], }), (this._commonCap = { Start: 50, GainBalance: [ [1, 50], [20, 80], [30, 100], [40, 120], ], }), (this._boostersCostTable = { Start: 0, GainBalance: [ [0, 4e4], [0, 5e4], [0, 7e4], [0, 85e3], [0, 1e5], [0, 15e4], [0, 2e5], [0, 25e4], [0, 3e5], [0, 35e4], [0, 4e5], [0, 45e4], [0, 5e5], [0, 55e4], [0, 6e5], [0, 65e4], [0, 7e5], [0, 75e4], [0, 8e5], [0, 85e4], [0, 9e5], [0, 95e4], [0, 1e6], [0, 105e4], [0, 11e5], [0, 115e4], [0, 12e5], [0, 125e4], [0, 13e5], [0, 135e4], [0, 14e5], [0, 145e4], [0, 15e5], [0, 155e4], [0, 16e5], [0, 165e4], [0, 17e5], [0, 175e4], [0, 18e5], [0, 185e4], [0, 19e5], [0, 195e4], [0, 2e6], [0, 205e4], [0, 21e5], [0, 215e4], [0, 22e5], [0, 225e4], [0, 23e5], [0, 235e4], ], }), (this._botUpgrade = 1.5), (this._botRandomOffset = 2); } return ( (e.prototype.GetLevelFinishReward = function (e) { return this.GetBalanceValueByLevelIntegral(e, this._levelFinishReward); }), (e.prototype.GetStartPopulation = function (e) { return this.GetBalanceValueByLevelIntegral(e, this._startPopulation); }), (e.prototype.GetGenerationSpeed = function (e) { return this.GetBalanceValueByLevelIntegral(e, this._generationSpeed); }), (e.prototype.GetOfflineEarning = function (e) { return e <= 150 ? this.GetBalanceValueByLevelIntegral(e, this._offlineEarning) : Math.ceil(0.8 * e) + 150275; }), (e.prototype.GetBoosterCost = function (e) { return e <= 150 ? this.GetBalanceValueByLevelIntegral(e, this._boostersCost) : e <= 200 ? this.GetBalanceFromTable(e - 151, this._boostersCostTable) : Math.pow(e, 3) + this.GetBoosterCost(200); }), (e.prototype.GetBalanceFromTable = function (e, t) { if (e <= 0 || e >= t.GainBalance.length) { var n = r.__read(t.GainBalance[0], 2); n[0]; return n[1]; } var i = r.__read(t.GainBalance[e], 2); i[0]; return i[1]; }), (e.prototype.GetNeutralRate = function (e) { return this.GetBalanceValueByLevelStairs(e, this._neutralRate); }), (e.prototype.GetNeutralCap = function (e) { return this.GetBalanceValueByLevelStairs(e, this._neutralCap); }), (e.prototype.GetCommonCap = function (e) { return this.GetBalanceValueByLevelStairs(e, this._commonCap); }), (e.prototype.GetNeutralStartPopulation = function (e) { return this.GetBalanceValueByLevelStairs(e, this._neutralStart); }), (e.prototype.GetBotUpgradeLevelsCap = function (e) { return 1 == e ? 1 : Math.ceil(e * this._botUpgrade) + i.Random.from(-this._botRandomOffset, this._botRandomOffset); }), (e.prototype.GetBalanceValueByLevelIntegral = function (e, t) { for (var n = t.Start, i = 1, o = 0; o < t.GainBalance.length; o++) { var a = r.__read(t.GainBalance[o], 2), s = a[0], u = a[1]; if (!(e >= s)) break; var l = Number.MAX_SAFE_INTEGER; o + 1 < t.GainBalance.length && (l = r.__read(t.GainBalance[o + 1], 1)[0]), (n += ((s = Math.min(l, e)) - i) * u), (i = l); } return n; }), (e.prototype.GetBalanceValueByLevelStairs = function (e, t) { for (var n = t.Start, i = 0; i < t.GainBalance.length - 1; i++) { var o = r.__read(t.GainBalance[i], 2), a = o[0], s = o[1]; if (0 == i && e < a) return n; var u = r.__read(t.GainBalance[i + 1], 2), l = u[0]; u[1]; if (a <= e && e < l) return s; } var c = r.__read(t.GainBalance[t.GainBalance.length - 1], 2); c[0]; return c[1]; }), (e.prototype.GetBalanceValueByLevelInterpolate = function (e, t) { var n = t.Start; if (t.GainBalance.length <= 1) { var i = r.__read(t.GainBalance[t.GainBalance.length - 1], 2), a = i[0], s = i[1]; return o(t.Start, s, e / a); } for (var u = 0; u < t.GainBalance.length - 1; u++) { var l = r.__read(t.GainBalance[u], 2), c = l[0], d = l[1], h = r.__read(t.GainBalance[u + 1], 2), p = h[0], f = h[1]; if (0 == u && c > e) return o(n, d, e / c); if (c >= e && e < p) return o(d, f, e / (p - c)); } var _ = r.__read(t.GainBalance[t.GainBalance.length - 1], 2); _[0]; return _[1]; }), e ); })(); t.MetaConfig = a; }, 92731: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.MetaModel = void 0); var r = n(22970), i = n(46595), o = n(18184), a = n(78620), s = n(22674), u = n(70600), l = n(4488), c = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._metaConfig = new l.MetaConfig()), (t.loseMultiplier = 0.2), t; } var n; return ( r.__extends(t, e), (t.prototype.getReward = function (e) { return void 0 === e && (e = this.cookie.absoluteLevelNum), this._metaConfig.GetLevelFinishReward(e); }), (t.prototype.getBuildingPopulationLimit = function (e) { return e == o.PlayerType.Neutral ? this._metaConfig.GetNeutralCap(this.cookie.absoluteLevelNum) : this._metaConfig.GetCommonCap(this.cookie.absoluteLevelNum); }), (t.prototype.getPopulationRate = function (e) { return e == o.PlayerType.Neutral ? this._metaConfig.GetNeutralRate(this.cookie.absoluteLevelNum) : e == o.PlayerType.First ? this.getPlayerGenerationRate(this.cookie.playerSpawnLevel) : this.getBotGenerationRate(this.cookie.absoluteLevelNum); }), (t.prototype.getPlayerGenerationRate = function (e) { return this._metaConfig.GetGenerationSpeed(e); }), (t.prototype.getBotGenerationRate = function (e) { var t = this._metaConfig.GetBotUpgradeLevelsCap(e); return this._metaConfig.GetGenerationSpeed(t); }), (t.prototype.getStartPopulation = function (e) { switch (e) { case o.PlayerType.Neutral: return this._metaConfig.GetNeutralStartPopulation(this.cookie.absoluteLevelNum); case o.PlayerType.First: return this.getPlayerStartPopulation(this.cookie.playerStartPopulation); } return this.getBotStartPopulation(this.cookie.absoluteLevelNum); }), (t.prototype.getPlayerStartPopulation = function (e) { return this._metaConfig.GetStartPopulation(e); }), (t.prototype.getBotStartPopulation = function (e) { var t = this._metaConfig.GetBotUpgradeLevelsCap(e); return this._metaConfig.GetStartPopulation(t); }), (t.prototype.getStartPopulationCost = function () { return this._metaConfig.GetBoosterCost(this.cookie.playerStartPopulation); }), (t.prototype.getPopulationRateCost = function () { return this._metaConfig.GetBoosterCost(this.cookie.playerSpawnLevel); }), (t.prototype.getOfflineEarningCost = function () { return this._metaConfig.GetBoosterCost(this.cookie.playerOfflineLevel); }), (t.prototype.getNextStartPopulation = function (e) { return e == o.PlayerType.Neutral ? this._metaConfig.GetNeutralStartPopulation(this.cookie.playerStartPopulation + 1) : e == o.PlayerType.First ? this.getPlayerStartPopulation(this.cookie.playerStartPopulation + 1) : this.getBotStartPopulation(this.cookie.absoluteLevelNum + 1); }), (t.prototype.getNextPopulationRate = function (e) { return e == o.PlayerType.Neutral ? this._metaConfig.GetNeutralRate(this.cookie.playerStartPopulation + 1) : e == o.PlayerType.First ? this.getPlayerGenerationRate(this.cookie.playerSpawnLevel + 1) : this.getBotGenerationRate(this.cookie.absoluteLevelNum + 1); }), (t.prototype.getNextOfflineEarning = function () { return this._metaConfig.GetOfflineEarning(this.cookie.playerOfflineLevel + 1); }), (t.prototype.getOfflineEarning = function () { return this._metaConfig.GetOfflineEarning(this.cookie.playerOfflineLevel); }), (t.prototype.increaseStartPopulation = function () { var e = this._metaConfig.GetBoosterCost(this.cookie.playerStartPopulation); this.cookie.isEnoughCoins(e) && (this.cookie.playerStartPopulation++, this.cookie.spendCoins(e), this.upgraded()); }), (t.prototype.increaseStartPopulationFree = function () { this.cookie.playerStartPopulation++, this.upgradedForFree(), this.upgraded(); }), (t.prototype.increaseSpawn = function () { var e = this._metaConfig.GetBoosterCost(this.cookie.playerSpawnLevel); this.cookie.isEnoughCoins(e) && (this.cookie.playerSpawnLevel++, this.cookie.spendCoins(e), this.upgraded()); }), (t.prototype.increaseSpawnFree = function () { this.cookie.playerSpawnLevel++, this.upgradedForFree(), this.upgraded(); }), (t.prototype.increaseOffline = function () { var e = this._metaConfig.GetBoosterCost(this.cookie.playerOfflineLevel); this.cookie.isEnoughCoins(e) && (this.cookie.playerOfflineLevel++, this.cookie.spendCoins(e), this.upgraded()); }), (t.prototype.increaseOfflineFree = function () { this.cookie.playerOfflineLevel++, this.upgradedForFree(), this.upgraded(); }), (t.prototype.upgradedForFree = function () {}), (t.prototype.upgraded = function () {}), (t.prototype.getPlayerGenerationRateValue = function (e) { return this._metaConfig.GetGenerationSpeed(e); }), r.__decorate([(0, i.lazyInject)(a.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.CookieModel && u.CookieModel) ? n : Object)], t.prototype, "cookie", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.GlobalEventProvider); t.MetaModel = c; }, 75747: (e, t, n) => { "use strict"; var r; Object.defineProperty(t, "__esModule", { value: !0 }), (t.getFightersSpeedPreset = t.SelectableFighterDataSet = t.SelectableBuildingDataSet = t.SelectableColorsDataSet = t.SelectableColorCss = t.UserSelectableColorsSet = t.SkinType = t.GameColors = void 0); var i, o = n(22970), a = n(18184), s = ["#4BB4F8", "#33698D"], u = ["#F53514", "#77160D"]; (t.GameColors = { players: ((r = {}), (r[a.PlayerType.Default] = ["#4BB4F8", "#33698D"]), (r[a.PlayerType.First] = s), (r[a.PlayerType.Second] = u), (r[a.PlayerType.Third] = ["#59D267", "#1E7824"]), (r[a.PlayerType.Fourth] = ["#A563F2", "#501E84"]), (r[a.PlayerType.Fifth] = ["#EE3B82", "#680443"]), (r[a.PlayerType.Sixth] = ["#30CFAF", "#066056"]), (r[a.PlayerType.Seventh] = ["#F8AE20", "#895E0B"]), (r[a.PlayerType.Eighth] = ["#BAAB2A", "#323B0E"]), (r[a.PlayerType.Nine] = ["#DC6CC5", "#5F297D"]), (r[a.PlayerType.Neutral] = ["#A2A2A2", "#1C1C1C", "#ffffff"]), r), aims: { allied: ["#4ab4f9", 0.298], enemy: ["#f43514", 0.298] } }), (function (e) { (e.BUILDING = "SkinType.BUILDING"), (e.FIGHTER = "SkinType.FIGHTER"), (e.COLOR = "SkinType.COLOR"); })((i = t.SkinType || (t.SkinType = {}))); var l, c, d = function (e, t) { return t + e.toString() + ".svg"; }; !(function (e) { (e.BLUE = "UserSelectableColorsSet.BLUE"), (e.RED = "UserSelectableColorsSet.RED"); })((l = t.UserSelectableColorsSet || (t.UserSelectableColorsSet = {}))), (t.SelectableColorCss = [ { id: l.BLUE, className: "skins-blue-color-set" }, { id: l.RED, className: "skins-red-color-set" }, ]), (t.SelectableColorsDataSet = [ { id: l.BLUE, data: s }, { id: l.RED, data: u }, ]), (t.SelectableBuildingDataSet = [ { id: 1, enemyLevelUnlock: 1, playerLevelUnlock: 1, coinPrice: 5e3 }, { id: 2, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 3, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 4, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 5, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 6, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 7, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 8, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 9, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 10, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 11, enemyLevelUnlock: 10, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 12, enemyLevelUnlock: 10, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 13, enemyLevelUnlock: 10, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 14, enemyLevelUnlock: 12, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 15, enemyLevelUnlock: 12, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 16, enemyLevelUnlock: 12, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 17, enemyLevelUnlock: 14, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 18, enemyLevelUnlock: 14, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 19, enemyLevelUnlock: 14, playerLevelUnlock: 10, coinsPrice: 1e4 }, { id: 20, enemyLevelUnlock: 16, playerLevelUnlock: 10, coinsPrice: 1e4 }, { id: 21, enemyLevelUnlock: 16, playerLevelUnlock: 10, coinsPrice: 1e4 }, { id: 22, enemyLevelUnlock: 16, playerLevelUnlock: 14, coinsPrice: 12e3 }, { id: 23, enemyLevelUnlock: 18, playerLevelUnlock: 14, coinsPrice: 12e3 }, { id: 24, enemyLevelUnlock: 18, playerLevelUnlock: 14, coinsPrice: 12e3 }, { id: 25, enemyLevelUnlock: 18, playerLevelUnlock: 18, coinsPrice: 15e3 }, { id: 26, enemyLevelUnlock: 20, playerLevelUnlock: 18, coinsPrice: 15e3 }, { id: 27, enemyLevelUnlock: 20, playerLevelUnlock: 18, coinsPrice: 15e3 }, { id: 28, enemyLevelUnlock: 20, playerLevelUnlock: 20, coinsPrice: 17500 }, { id: 29, enemyLevelUnlock: 22, playerLevelUnlock: 20, coinsPrice: 17500 }, { id: 30, enemyLevelUnlock: 22, playerLevelUnlock: 20, coinsPrice: 17500 }, { id: 31, enemyLevelUnlock: 22, playerLevelUnlock: 24, coinsPrice: 17500 }, { id: 32, enemyLevelUnlock: 24, playerLevelUnlock: 24, coinsPrice: 17500 }, { id: 33, enemyLevelUnlock: 24, playerLevelUnlock: 24, coinsPrice: 17500 }, ].map(function (e) { return o.__assign(o.__assign({}, e), { type: i.BUILDING, textureUrl: d(e.id, "buildings/"), ui_textureUrl: d(e.id, "buildings-ui/") }); })), (t.SelectableFighterDataSet = [ { id: 1, enemyLevelUnlock: 1, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 2, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 3, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 4, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 5, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 6, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 7, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 8, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 9, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 10, enemyLevelUnlock: 8, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 11, enemyLevelUnlock: 10, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 12, enemyLevelUnlock: 10, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 13, enemyLevelUnlock: 10, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 14, enemyLevelUnlock: 12, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 15, enemyLevelUnlock: 12, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 16, enemyLevelUnlock: 12, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 17, enemyLevelUnlock: 14, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 18, enemyLevelUnlock: 14, playerLevelUnlock: 1, coinsPrice: 5e3 }, { id: 19, enemyLevelUnlock: 14, playerLevelUnlock: 4, coinsPrice: 1e4 }, { id: 20, enemyLevelUnlock: 16, playerLevelUnlock: 4, coinsPrice: 1e4 }, { id: 21, enemyLevelUnlock: 16, playerLevelUnlock: 4, coinsPrice: 1e4 }, { id: 22, enemyLevelUnlock: 16, playerLevelUnlock: 12, coinsPrice: 12e3 }, { id: 23, enemyLevelUnlock: 18, playerLevelUnlock: 12, coinsPrice: 12e3 }, { id: 24, enemyLevelUnlock: 18, playerLevelUnlock: 12, coinsPrice: 12e3 }, { id: 25, enemyLevelUnlock: 18, playerLevelUnlock: 18, coinsPrice: 15e3 }, { id: 26, enemyLevelUnlock: 20, playerLevelUnlock: 18, coinsPrice: 15e3 }, { id: 27, enemyLevelUnlock: 20, playerLevelUnlock: 18, coinsPrice: 15e3 }, { id: 28, enemyLevelUnlock: 20, playerLevelUnlock: 30, coinsPrice: 17500 }, { id: 29, enemyLevelUnlock: 30, playerLevelUnlock: 30, coinsPrice: 17500 }, { id: 30, enemyLevelUnlock: 40, playerLevelUnlock: 30, coinsPrice: 17500 }, ].map(function (e) { return o.__assign(o.__assign({}, e), { type: i.FIGHTER, textureUrl: d(e.id, "fighters/"), ui_textureUrl: d(e.id, "fighters-ui/") }); })), (function (e) { (e.default = "FightersSpeedSet.default"), (e.wechat = "FightersSpeedSet.wechat"), (e.facebook = "FightersSpeedSet.facebook"), (e.youtube = "FightersSpeedSet.youtube"); })(c || (c = {})); var h = c.youtube, p = { DEFAULT_SIZE: 7, NORMAL_SPEED: 6, BURST_WAVES_LEN: 0.75, BURST_DELAY: 0.3 }, f = { DEFAULT_SIZE: 9, NORMAL_SPEED: 13, BURST_WAVES_LEN: 0.87, BURST_DELAY: 0.2 }, _ = { DEFAULT_SIZE: 9, NORMAL_SPEED: 13, BURST_WAVES_LEN: 0.87, BURST_DELAY: 0.2 }, g = { DEFAULT_SIZE: 9, NORMAL_SPEED: 13, BURST_WAVES_LEN: 0.87, BURST_DELAY: 0.2 }; t.getFightersSpeedPreset = function (e) { switch ((void 0 === e && (e = h), e)) { case c.default: return p; case c.wechat: return _; case c.facebook: return f; case c.youtube: return g; default: return p; } }; }, 86322: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SpritesPool = void 0); var r = n(22970), i = n(22674), o = n(940), a = n(37394), s = n(30627), u = r.__importDefault(n(15063)), l = (function () { function e() { (this._textures = new Map()), (this._shapeTextures = new Map()), (this._pendingShapeTextures = new Map()); } var t; return ( (e.prototype.fromDisplayObject = function (e, t) { return this._textures.has(e) || this._textures.set(e, this.rootView.app.renderer.generateTexture(t(), o.SCALE_MODES.LINEAR, window.devicePixelRatio)), new o.Sprite(this._textures.get(e)); }), (e.prototype.createShape = function (e, t, n) { return ( void 0 === n && (n = !0), r.__awaiter(this, void 0, Promise, function () { var i, a, s; return r.__generator(this, function (r) { switch (r.label) { case 0: return (i = "".concat(e)), this._shapeTextures.has(i) ? [3, 2] : [4, this.loadShapeTexture(t, e)]; case 1: if ((((a = r.sent()).textureCacheIds[0] = i), !n)) return (s = new o.Sprite(a)), o.Texture.removeFromCache(a), [2, s]; this._shapeTextures.set(i, a), (r.label = 2); case 2: return [2, new o.Sprite(this._shapeTextures.get(i))]; } }); }) ); }), (e.prototype.loadShapeTexture = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n; return r.__generator(this, function (r) { return (n = this._pendingShapeTextures.get(t) || this._loadShapeTexture(e)), this._pendingShapeTextures.set(t, n), [2, n]; }); }); }), (e.prototype._loadShapeTexture = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i, a, s; return r.__generator(this, function (l) { return (t = r.__read((0, u.default)(e), 4)), (n = t[0]), (i = t[1]), (a = t[2]), (s = t[3]), (a -= n), (s -= i), [2, o.Texture.fromURL(URL.createObjectURL(new Blob([' \n \n ')], { type: "image/svg+xml" })))]; }); }); }), (e.prototype.purge = function () { this._shapeTextures.forEach(o.Texture.removeFromCache), this._textures.forEach(o.Texture.removeFromCache), this._pendingShapeTextures.clear(), this._textures.clear(), this._shapeTextures.clear(); }), r.__decorate([(0, i.inject)(a.Types2D.rootView), r.__metadata("design:type", "function" == typeof (t = void 0 !== s.RootView && s.RootView) ? t : Object)], e.prototype, "rootView", void 0), (e = r.__decorate([(0, i.injectable)()], e)) ); })(); t.SpritesPool = l; }, 54626: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TimeTrack = void 0); var n = function () { return Date.now(); }, r = (function () { function e(e, t) { void 0 === e && (e = 250), (this.interval = e), (this.onTick = t), (this._started = NaN), (this._paused = NaN), (this._tid = NaN), (this._isRunning = !1); } return ( Object.defineProperty(e.prototype, "isRunning", { get: function () { return this._isRunning; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "startTime", { get: function () { return this._started; }, enumerable: !1, configurable: !0, }), (e.prototype.start = function () { (this._isRunning = !0), (this._started = n()), this.startTimer(); }), (e.prototype.stop = function () { (this._isRunning = !1), clearInterval(this._tid); }), (e.prototype.pause = function () { this._isRunning && ((this._paused = n()), clearInterval(this._tid), (this._isRunning = !1)); }), (e.prototype.resume = function () { this._isRunning || ((this._started += n() - this._paused), this.start()); }), (e.prototype.getTotalTime = function () { return n() - this._started; }), (e.prototype.startTimer = function () { var e = this, t = function () { return e.onTick && e.onTick(); }; clearTimeout(this._tid), (this._tid = setInterval(function () { t(); }, this.interval)), t(); }), e ); })(); t.TimeTrack = r; }, 90418: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ArrowView = void 0); var r = n(22970), i = n(22674), o = n(940), a = n(30627), s = 6258909, u = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.arrowCont = new o.Container()), (t.arrowTip = new o.Graphics()), (t.graphics = new o.Graphics().beginFill(s, 0.7).drawRect(0, 0, 20, 20).endFill()), t; } return ( r.__extends(t, e), (t.prototype.onAdded = function () { this.arrowTip.beginFill(s, 0.7).lineTo(-20, 0).lineTo(0, 30).lineTo(20, 0).endFill(), this.addChild(this.arrowCont), (this.graphics.x = 0.5 * -this.graphics.width), this.arrowCont.addChild(this.graphics), this.arrowCont.addChild(this.arrowTip), e.prototype.onAdded.call(this); }), (t.prototype.setUpDirection = function (e, t) { void 0 === t && (t = !1); var n = this.toLocal(e), r = Math.sqrt(n.x * n.x + n.y * n.y); (this.visible = r > this.arrowTip.height), (this.arrowTip.y = this.graphics.height = r - this.arrowTip.height), (this.arrowCont.rotation = Math.atan2(n.y, n.x) - Math.PI / 2); }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(a.View); t.ArrowView = u; }, 45117: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ArrowsView = void 0); var r = n(22970), i = n(30627), o = n(46595), a = n(78620), s = n(22674), u = n(940), l = n(79295), c = n(29157), d = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._arrows = new Map()), t; } var n; return ( r.__extends(t, e), (t.prototype.createArrow = function (e) { var t = e.get(c.CapitalView); if (t) { var n = o.di.get(a.TypesGame.views.arrow); (n.position = t.position.clone()), this.addChild(n), this._arrows.set(e.stateId, n); } }), (t.prototype.hideArrow = function (e) { var t, n = this._arrows.get(e.stateId); null === (t = null == n ? void 0 : n.parent) || void 0 === t || t.removeChild(n), this._arrows.delete(e.stateId); }), (t.prototype.removeAim = function () { (this._priorTarget = null), this._arrows.forEach(function (e) { var t; return null === (t = e.parent) || void 0 === t ? void 0 : t.removeChild(e); }), this._arrows.clear(); }), (t.prototype.setAim = function (e) { this._priorTarget = e; }), (t.prototype.update = function (e) { this._arrows.size > 0 && this.setArrows(this._priorTarget || new u.Point(e.clientX, e.clientY)); }), (t.prototype.setArrows = function (e) { this._arrows.forEach(function (t) { return t.setUpDirection(e); }); }), r.__decorate([(0, s.inject)(a.TypesGame.inputManager), r.__metadata("design:type", "function" == typeof (n = void 0 !== l.InputManager && l.InputManager) ? n : Object)], t.prototype, "inputManager", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.View); t.ArrowsView = d; }, 29157: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CapitalView = void 0); var r = n(22970), i = n(30627), o = n(17905), a = n(18184), s = n(64770), u = n(22674), l = n(49088), c = n(940), d = n(78620), h = n(86322), p = n(70600), f = n(53679), _ = function (e) { return void 0 === e && (e = 20), new c.Graphics().beginFill(16777215).drawCircle(0, 0, e).endFill(); }, g = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._radius = 20), (t._active = !0), t; } var n, i, g; return ( r.__extends(t, e), (t.prototype.init = function (e) { var t; (this._radius = e.stateRadius), (t = this.position).set.apply(t, r.__spreadArray([], r.__read(e.statePos), !1)); }), (t.prototype.initBaseGraphics = function () { var e, t, n = "base".concat(this._radius), r = null === (e = this.cookies.selectedBuilding) || void 0 === e ? void 0 : e.textureUrl, i = 2 * this._radius; if (r) { if ((t = new c.Sprite(c.utils.TextureCache[r]))) { var o = i / Math.max(t.getBounds().height, t.getBounds().width); t.scale.set(o), t.anchor.set(0.5), (n = r); } } else t = _(this._radius); return { id: n, obj: t }; }), (t.prototype.occupiedAnimation = function (e) { void 0 === e && (e = 0.5), s.gsap.killTweensOf(this.base.scale), s.gsap.fromTo(this.base.scale, { x: 1.5, y: 1.5 }, { x: 1, y: 1, duration: e }); }), (t.prototype.shake = function (e, t) { if (!s.gsap.isTweening(this.base)) { var n = this.base.width * t, r = this.base.height * t, i = o.Random.rangeFloat(-n, n), a = o.Random.rangeFloat(-r, r); s.gsap.fromTo(this.base.position, { x: i, y: a }, { x: 0, y: 0, ease: "elastic.out", duration: e }); } }), (t.prototype.showSelection = function (e, t) { var n = this; void 0 === t && (t = 0.5), s.gsap.killTweensOf(this), this.selection || ((this.selection = this.spritesPool.fromDisplayObject("base_selection".concat(this._radius), function () { return _(2 * n._radius); })), this.selection.anchor.set(0.5), (this.selection.alpha = 0), this.addChildAt(this.selection, 0)), e ? ((this.selection.tint = e), s.gsap.to(this.selection, { alpha: t })) : s.gsap.to(this.selection, { alpha: 0 }); }), (t.prototype.updateSkin = function (e, t) { var n = this; void 0 === e && (e = a.PlayerType.Default), void 0 === t && (t = !0); var i = r.__read(this.skinManager.getColorBy(e), 2)[1], o = this.skinManager.getBuildingTextureBy(t ? e : a.PlayerType.Neutral); this.base && this.removeChild(this.base), (this.base = this.spritesPool.fromDisplayObject(o, function () { var e = new c.Sprite(c.utils.TextureCache[o]), t = e.getBounds(), r = (2 * n._radius) / Math.max(t.height, t.width); return e.anchor.set(0.5), e.scale.set(r), e; })), this.base.anchor.set(0.5), this.addChild(this.base), (this.base.tint = e === a.PlayerType.Neutral ? 16777215 : l.color.fromHex(i)); }), (t.prototype.setActive = function (e, t) { (this._active = e), s.gsap.killTweensOf(this, "alpha"), s.gsap.to(this, { alpha: this._active ? 1 : 0.25, duration: t }); }), r.__decorate([(0, u.inject)(d.TypesGame.spritesPool), r.__metadata("design:type", "function" == typeof (n = void 0 !== h.SpritesPool && h.SpritesPool) ? n : Object)], t.prototype, "spritesPool", void 0), r.__decorate([(0, u.inject)(d.TypesGame.cookieModel), r.__metadata("design:type", "function" == typeof (i = void 0 !== p.CookieModel && p.CookieModel) ? i : Object)], t.prototype, "cookies", void 0), r.__decorate([(0, u.inject)(d.TypesGame.skinManager), r.__metadata("design:type", "function" == typeof (g = void 0 !== f.SkinManager && f.SkinManager) ? g : Object)], t.prototype, "skinManager", void 0), (t = r.__decorate([(0, u.injectable)()], t)) ); })(i.View); t.CapitalView = g; }, 97725: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FieldView = void 0); var r = n(22970), i = n(30627), o = n(78620), a = n(22674), s = n(940), u = n(45117), l = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.labels = new s.Container()), (t.map = new s.Container()), (t.capitals = new s.Container()), (t.fighters = new s.Container()), (t.shapes = new i.View()), t; } var n; return ( r.__extends(t, e), (t.prototype.onAdded = function () { this.addChild(this.map), this.map.addChild(this.shapes), this.map.addChild(this.fighters), this.map.addChild(this.capitals), this.map.addChild(this.labels), this.addChild(this.arrows), e.prototype.onAdded.call(this); }), r.__decorate([(0, a.inject)(o.TypesGame.views.arrows), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.ArrowsView && u.ArrowsView) ? n : Object)], t.prototype, "arrows", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.View); t.FieldView = l; }, 79840: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FighterGroup = void 0); var r = n(46595), i = n(62471), o = n(78620), a = n(75205), s = n(85928), u = n(79207), l = n(49088), c = n(47268), d = n(940), h = n(49088), p = (function () { function e(e, t, n, r, i, o) { (this.id = e), (this.Path = t), (this.Speed = n), (this.Owner = r), (this.Target = i), (this.Source = o), (this.Amount = 0), (this.StartTimestamp = 0), (this.StartTimestamp = Date.now()); } return ( Object.defineProperty(e.prototype, "BurstWidth", { get: function () { return this.Source.get(a.PathHolder).getPathWidth(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "BurstDelay", { get: function () { return this.Source.get(c.Spawner).burstDelay; }, enumerable: !1, configurable: !0, }), (e.prototype.GetPathLen = function () { for (var e = 0, t = 1; t < this.Path.length; t++) e += l.math.dist(this.Path[t - 1], this.Path[t]); return e; }), (e.prototype.initUnitGraphics = function (e) { var t = r.di.get(o.TypesGame.skinManager), n = r.di.get(o.TypesGame.spritesPool), i = t.getFighterTextureBy(e.owner), a = s.Fighter.DEFAULT_SIZE * e.scaleFactor * 1.5, u = n.fromDisplayObject(i, function () { var e = new d.Sprite(d.utils.TextureCache[i]), t = e.getBounds(); return e.anchor.set(0.5), e.scale.set(a / Math.max(t.height, t.width)), e; }); return (u.tint = h.color.fromHex(t.getColorBy(e.owner)[1])), u; }), (e.prototype.AddFighter = function (e) { this.Amount++, (this.StartTimestamp = Date.now()); var t = r.di.get(o.TypesGame.model), n = new i.FighterView(), a = this.initUnitGraphics(e); a.anchor.set(0.5), n.addChild(a), e.add(n), t.engine.addEntity(e), (e.group = this); }), (e.prototype.Check = function () { ((Date.now() - this.StartTimestamp) * this.Speed) / this.GetPathLen() >= 1 && this.Amount <= 0 && u.FighterGroupsSystem.RemoveGroup(this.id); }), (e.prototype.OnFighterDied = function () { this.Amount--; }), e ); })(); t.FighterGroup = p; }, 62471: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FighterView = void 0); var r = n(22970), i = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return r.__extends(t, e), t; })(n(940).Container); t.FighterView = i; }, 41368: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Population = void 0); var r = n(22970), i = n(30627), o = n(22674), a = n(940), s = (function (e) { function t() { var t = e.call(this) || this; return ( (t._active = !0), (t._populationSpeed = 1.5), (t._populationLimit = 60), (t._rate = 1e3), (t._lastSpawnTimestamp = -1), (t._lastBlockTimestamp = -1), (t._current = 0), (t.updateLabel = function () { (t._label.text = "" + t._current), (t._label.x = 0.5 * -t._label.width); }), t ); } var n; return ( r.__extends(t, e), (n = t), (t.prototype.setPopulationLimit = function (e) { this._populationLimit = e; }), (t.prototype.setPopulationRate = function (e) { (this._populationSpeed = e), (this._rate = 1 / e); }), Object.defineProperty(t.prototype, "lastBlockTimestamp", { get: function () { return this._lastBlockTimestamp; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "active", { get: function () { return this._active; }, set: function (e) { (this._active = e), (this.alpha = this._active ? 1 : 0.25), (this._label.visible = this._active); }, enumerable: !1, configurable: !0, }), (t.prototype.init = function (e) { var t; (this._label = new a.BitmapText("-", { fontName: "Helvetica" })), (this._label.y = e.stateRadius), (t = this.position).set.apply(t, r.__spreadArray([], r.__read(e.statePos), !1)), this.addChild(this._label), this.updateLabel(); }), (t.prototype.block = function () { this._lastBlockTimestamp = Date.now(); }), (t.prototype.allocate = function (e) { var t = Math.max(this.current - e, 0), n = Math.max(this.current - t, 0); return (this.current = t), n > 0 && this.block(), n; }), (t.prototype.remove = function (e) { var t = this.current, n = Math.max(t - e, 0), r = Math.max(t - n, 0); return (this.current = n), r; }), (t.prototype.tryPopulate = function (e) { void 0 === e && (e = 0); var t = Date.now(); -1 == this._lastSpawnTimestamp && (this._lastSpawnTimestamp = t); var r = (t - this._lastSpawnTimestamp) / 1e3; if (r >= this._rate) { this._current < this._populationLimit && t - this._lastBlockTimestamp >= 1e3 * n.BLOCK_POPULATION_SECONDS && (this.current += 1); var i = r - this._rate; this._lastSpawnTimestamp = t - i; } }), Object.defineProperty(t.prototype, "current", { get: function () { return this._current; }, set: function (e) { (this._current = e), this.updateLabel(); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "cap", { get: function () { return this._populationLimit; }, enumerable: !1, configurable: !0, }), (t.BLOCK_POPULATION_SECONDS = 0.5), (t.SPAWN_AMOUNT_ON_OCCUPATION = 0), (t = n = r.__decorate([(0, o.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(i.View); t.Population = s; }, 86352: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970), i = n(30627), o = n(37394), a = n(22674), s = n(940), u = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, u, l, c, d; return ( r.__extends(t, e), (t.prototype.onAdded = function () { this.progressBar.init({ width: 200, height: 7 }), (this.progressBar.visible = !1), this.overlay.addChild(new s.Graphics().beginFill(13684944).drawRect(0, 0, 10, 10).endFill()), this.addChild(this.screenContainer), this.addChild(this.popupContainer), this.addChild(this.overlay), this.addChild(this.spinner), this.addChild(this.progressBar), e.prototype.onAdded.call(this); }), (t.prototype.goToScreen = function (e, t) { return ( void 0 === t && (t = !0), r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, this.screenContainer.setScreen(e)]; case 1: return t.sent(), [4, this.overlay.unblur()]; case 2: return t.sent(), [2]; } }); }) ); }), (t.prototype.freeze = function () {}), (t.prototype.unfreeze = function () {}), (t.prototype.onResize = function () { var e = this; (this.spinner.x = 0.5 * (this.size.width - this.spinner.width)), (this.spinner.y = 0.5 * (this.size.height - this.spinner.height)), [this.overlay].forEach(function (t) { (t.width = e.size.width), (t.height = e.size.height); }), (this.progressBar.x = 0.5 * this.size.width), (this.progressBar.y = 0.75 * this.size.height), [this.screenContainer, this.popupContainer].forEach(function (t) { (t.size = e.size), t.onResize(); }); }), r.__decorate([(0, a.inject)(o.Types2D.spinner), r.__metadata("design:type", "function" == typeof (n = void 0 !== i.Spinner && i.Spinner) ? n : Object)], t.prototype, "spinner", void 0), r.__decorate([(0, a.inject)(o.Types2D.screenContainer), r.__metadata("design:type", "function" == typeof (u = void 0 !== i.ScreenContainer && i.ScreenContainer) ? u : Object)], t.prototype, "popupContainer", void 0), r.__decorate([(0, a.inject)(o.Types2D.screenContainer), r.__metadata("design:type", "function" == typeof (l = void 0 !== i.ScreenContainer && i.ScreenContainer) ? l : Object)], t.prototype, "screenContainer", void 0), r.__decorate([(0, a.inject)(o.Types2D.overlay), r.__metadata("design:type", "function" == typeof (c = void 0 !== i.Overlay && i.Overlay) ? c : Object)], t.prototype, "overlay", void 0), r.__decorate([(0, a.inject)(i.ProgressBar), r.__metadata("design:type", "function" == typeof (d = void 0 !== i.ProgressBar && i.ProgressBar) ? d : Object)], t.prototype, "progressBar", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.RootView); t.default = u; }, 47268: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Spawner = void 0); var r = n(22970), i = n(46595), o = n(85928), a = n(41368), s = n(78620), u = n(22674), l = n(7687), c = (0, n(75747).getFightersSpeedPreset)(), d = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return ( (t._spawnRoutine = function () { return t.spawnRoutine(); }), t ); } var n; return ( r.__extends(t, e), (n = t), (t.prototype.spawnAndSend = function (e, t) { this.stopRoutine(), (this._targetAmount = e), (this._targetBuilding = t), this.startRoutine(); }), (t.prototype.spawnRoutine = function () { var e, t = Math.min(this._targetAmount, n.UNITS_PER_WAVE), r = null === (e = this.selfBuilding) || void 0 === e ? void 0 : e.get(a.Population); if (r) { var o = r.allocate(t); o > 0 && this._targetAmount > 0 && ((this._targetAmount -= o), i.di.get(s.TypesGame.actions.burst).run({ spawner: this, amount: o, target: this._targetBuilding }), (this._spawnRoutineTimeout = setTimeout(this._spawnRoutine, 1e3 * this.burstDelay))); } }), Object.defineProperty(t.prototype, "burstDelay", { get: function () { o.Fighter.NORMAL_SPEED; return c.BURST_DELAY; }, enumerable: !1, configurable: !0, }), (t.prototype.startRoutine = function () { this.spawnRoutine(); }), (t.prototype.stopRoutine = function () { clearTimeout(this._spawnRoutineTimeout); }), (t.UNITS_PER_WAVE = 5), (t.BURST_WAVES_LEN = c.BURST_WAVES_LEN), (t = n = r.__decorate([(0, u.injectable)()], t)) ); })(l.Entity); t.Spawner = d; }, 13631: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StateShapeView = void 0); var r = n(22970), i = n(46595), o = n(17905), a = n(49088), s = n(64770), u = n(940), l = n(78620), c = n(22674), d = n(53679), h = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._container = new u.Container()), (t._color = 0), (t._baseColorMin = 65280), (t._baseColorMax = 16711680), (t._fill = 1), (t._initialPromise = Promise.resolve()), (t._active = !0), t; } var n; return ( r.__extends(t, e), Object.defineProperty(t.prototype, "initialPromise", { get: function () { return this._initialPromise; }, enumerable: !1, configurable: !0, }), (t.prototype.init = function (e, t) { return ( void 0 === t && (t = o.Random.UUID()), r.__awaiter(this, void 0, void 0, function () { var n = this; return r.__generator(this, function (o) { return ( this.addChild(this._container), (this._initialPromise = r.__awaiter(n, void 0, void 0, function () { var n; return r.__generator(this, function (r) { switch (r.label) { case 0: return (n = this), [4, i.di.get(l.TypesGame.actions.createMapPart).run({ id: "field-".concat(t), shapes: e.shapes || [] })]; case 1: return (n._shapesSprite = r.sent()), (this._shapesSprite.tint = this._color), this._container.addChild(this._shapesSprite), [2]; } }); })), [2] ); }); }) ); }), (t.prototype.updateSkin = function (e) { var t = r.__read(this.skinManager.getColorBy(e), 1)[0]; (this._baseColorMax = a.color.fromHex(t)), (this._baseColorMin = a.color.lerp(16777215, this._baseColorMax, 0.4)), this.updateFill(); }), (t.prototype.updateWithPopulation = function (e, t) { void 0 === t && (t = !1), s.gsap.isTweening(this) && s.gsap.killTweensOf(this, "fill"), t ? s.gsap.to(this, { fill: Math.min(1, e.current / e.cap) }) : ((this._fill = Math.min(1, e.current / e.cap)), this.updateFill()); }), Object.defineProperty(t.prototype, "fill", { get: function () { return this._fill; }, set: function (e) { (this._fill = e), this.updateFill(); }, enumerable: !1, configurable: !0, }), (t.prototype.updateFill = function () { this.color = a.color.lerp(this._baseColorMin, this._baseColorMax, this._fill); }), Object.defineProperty(t.prototype, "color", { set: function (e) { (this._color = e), this._shapesSprite && (this._shapesSprite.tint = this._color); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "baseColorMax", { get: function () { return this._baseColorMax; }, enumerable: !1, configurable: !0, }), (t.prototype.setActive = function (e, t) { (this._active = e), s.gsap.killTweensOf(this, "alpha"), s.gsap.to(this, { alpha: this._active ? 1 : 0.25, duration: t }); }), r.__decorate([(0, c.inject)(l.TypesGame.skinManager), r.__metadata("design:type", "function" == typeof (n = void 0 !== d.SkinManager && d.SkinManager) ? n : Object)], t.prototype, "skinManager", void 0), (t = r.__decorate([(0, c.injectable)()], t)) ); })(u.Container); t.StateShapeView = h; }, 76713: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TutorialFingerView = void 0); var r = n(22970), i = n(64770), o = n(22674), a = n(940), s = n(30627), u = n(46595), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.onAdded = function () { this.sprite.anchor.set(0.5, 20 / this.sprite.height), this.sprite.position.set(0, 0), this.addChild(this.sprite), e.prototype.onAdded.call(this); }), (t.prototype.hold = function (e) { return ( void 0 === e && (e = 0.5), r.__awaiter(this, void 0, Promise, function () { var t, n, o = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return ( this.cancelTweens(), (t = 0.4 * this.sprite.width), (n = -Math.tan(t / this.sprite.height)), 0.9, [ 4, new Promise(function (r) { i.gsap .timeline() .to(o.sprite, { y: 0.9 * t, duration: e, rotation: n }) .to(o.sprite.scale, { x: 0.9, y: 0.9, duration: e, onComplete: r }, 0); }), ] ); case 1: return r.sent(), [2]; } }); }) ); }), (t.prototype.release = function (e) { return ( void 0 === e && (e = 0.5), r.__awaiter(this, void 0, Promise, function () { var t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return ( this.cancelTweens(), [ 4, new Promise(function (n) { i.gsap.timeline().to(t.sprite, { x: 0, y: 0, duration: e, rotation: 0 }).to(t.sprite.scale, { x: 1, y: 1, duration: e, onComplete: n }, 0); }), ] ); case 1: return n.sent(), [2]; } }); }) ); }), (t.prototype.cancelTweens = function () { i.gsap.killTweensOf(this.sprite), i.gsap.killTweensOf(this.sprite.scale); }), (t.prototype.tap = function (e) { return ( void 0 === e && (e = 200), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, this.hold()]; case 1: case 3: return t.sent(), [4, u.WaitAction.ms(e)]; case 2: return t.sent(), [4, this.release()]; case 4: return t.sent(), [2]; } }); }) ); }), r.__decorate([(0, o.inject)("finger.svg"), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.Sprite && a.Sprite) ? n : Object)], t.prototype, "sprite", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(s.View); t.TutorialFingerView = l; }, 15276: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.playUIClickSound = t.playSound = t.showReward = t.showAd = t.isRankableUser = void 0); var r = n(22970), i = n(46595), o = n(37394); t.isRankableUser = function (e) { return void 0 !== e.getLbRecord; }; t.showAd = function (e) { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, i.di.get(o.TypesAds.adAction).showAd(e)]; case 1: return [2, t.sent()]; } }); }); }; t.showReward = function (e) { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, i.di.get(o.TypesAds.adAction).showAd(e, !0)]; case 1: return [2, t.sent()]; } }); }); }; t.playSound = function (e) { return r.__awaiter(void 0, void 0, void 0, function () { var t; return r.__generator(this, function (n) { return [2, null === (t = (0, i.lazyGet)(o.TypesAudio.soundAction)) || void 0 === t ? void 0 : t.run(e)]; }); }); }; t.playUIClickSound = function () { (0, t.playSound)("click_ui"); }; }, 90770: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameUIModule = void 0); var r = n(22674), i = n(37394), o = n(26962), a = n(14227), s = n(10341), u = n(41720), l = n(25417), c = n(30772), d = n(88188), h = n(10285), p = n(31217), f = n(33725), _ = n(33369), g = n(86317), m = n(21177); t.GameUIModule = new r.ContainerModule(function (e, t, n, r) { e(i.TypesUI.screen.GAMEPLAY).toConstantValue(o.GamePlayScreen), e(i.TypesUI.screen.HOME).toConstantValue(a.StartScreen), e(i.TypesUI.screen.LEADERBOARD).toConstantValue(p.LeaderboardScreen), e(i.TypesUI.screen.SHOP).toConstantValue(m.ShopScreen), e(l.PopupType.WIN_LEVEL).toConstantValue(s.WinStagePopup), e(l.PopupType.WIN_STAGE).toConstantValue(s.WinStagePopup), e(l.PopupType.BATTLE_RESULTS).toConstantValue(f.BattleResultsPopup), e(l.PopupType.LEVEL_COMPLETED).toConstantValue(_.ShareLevelResultPopup), e(l.PopupType.SETTINGS).toConstantValue(g.SettingsPopup), e(l.PopupType.LOSE).toConstantValue(u.LosePopup), e(l.PopupType.CONFIRM).toConstantValue(c.ConfirmPopup), e(l.PopupType.GIFT).toConstantValue(d.GiftPopup), e(l.PopupType.OFFLINE_EARNINGS).toConstantValue(h.OfflineEarningsPopup); }); }, 25417: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PopupType = void 0), (function (e) { (e.BATTLE_RESULTS = "PopupType.BATTLE_RESULTS"), (e.LOSE = "PopupType.LOSE"), (e.WIN_LEVEL = "PopupType.WIN_LEVEL"), (e.WIN_STAGE = "PopupType.WIN_STAGE"), (e.CONFIRM = "PopupType.CONFIRM"), (e.SETTINGS = "PopupType.SETTINGS"), (e.GIFT = "PopupType.GIFT"), (e.OFFLINE_EARNINGS = "PopupType.OFFLINE_EARNINGS"), (e.LEVEL_COMPLETED = "PopupType.LEVEL_COMPLETED"), (e.SUGGEST_LOGIN = "PopupType.SUGGEST_LOGIN"); })(t.PopupType || (t.PopupType = {})); }, 45900: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BackButton = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(89225), s = r.__importDefault(n(72779)); n(90903); var u = n(15276); t.BackButton = function (e) { return (0, i.jsx)( o.Button, r.__assign( { className: (0, s.default)("back-button", e.className), onClick: function () { e.onClick && ((0, u.playUIClickSound)(), e.onClick()); }, }, { children: (0, i.jsx)(a.SVG.BackButton, {}) } ) ); }; }, 39163: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Booster = t.BoosterType = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(89225), s = r.__importDefault(n(72779)), u = n(31063); n(42607); var l, c = n(15276); !(function (e) { (e.START_UNITS = "BoosterType.START_UNITS"), (e.START_PRODUCE = "BoosterType.START_PRODUCE"), (e.OFFLINE_EARNINGS = "BoosterType.OFFLINE_EARNINGS"); })((l = t.BoosterType || (t.BoosterType = {}))); var d = function (e, t) { switch ((void 0 === t && (t = !1), e)) { case l.START_UNITS: return t ? (0, i.jsx)(a.SVG.BoosterStartUnitsIcon, {}) : (0, i.jsx)(a.SVG.BoosterStartUnits, {}); case l.START_PRODUCE: return t ? (0, i.jsx)(a.SVG.BoosterProduceSpeedIcon, {}) : (0, i.jsx)(a.SVG.BoosterProduceSpeed, {}); default: return t ? (0, i.jsx)(a.SVG.BoosterOfflineEarningsIcon, {}) : (0, i.jsx)(a.SVG.COINS, {}); } }; t.Booster = function (e) { var t = e.id, n = e.title, l = e.disabled, h = void 0 === l || l, p = e.isFree, f = void 0 === p || p, _ = e.defaultCount, g = void 0 === _ ? "10" : _, m = e.description, v = e.price, y = void 0 === v ? 50 : v, C = e.onClick, b = e.className, w = e.levelNum, S = void 0 === w ? 10 : w; return (0, i.jsxs)( "div", r.__assign( { disabled: h, className: (0, s.default)("booster", b, { disabled: h }) }, { children: [ (0, i.jsxs)("div", r.__assign({ className: (0, s.default)("booster-head") }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-head__icon") }, { children: d(t, !0) })), (0, i.jsxs)("div", r.__assign({ className: (0, s.default)("booster-head__info") }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-head__total", (0, u.getFontClassByDigits)(g, 2, 7)) }, { children: g })), (0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-head__description") }, { children: o.Localize.get(null == m ? void 0 : m.i18n, null == m ? void 0 : m.default) }))] }))] })), (0, i.jsxs)( "button", r.__assign( { onClick: function () { C && (!h && (0, c.playUIClickSound)(), C()); }, disabled: h, className: (0, s.default)("booster-body", "btn", { "booster-body_free": f }), }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__title") }, { children: o.Localize.get(null == n ? void 0 : n.i18n, null == n ? void 0 : n.default) })), (0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__image") }, { children: d(t) })), (0, i.jsxs)("div", r.__assign({ className: (0, s.default)("booster-body__level", (0, u.getFontClassByDigits)(S, 1, 3)) }, { children: [o.Localize.get("ui-menu-lvl", "LVL"), " ", S] })), (0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__price") }, { children: f ? (0, i.jsxs)(i.Fragment, { children: [(0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__price-free") }, { children: o.Localize.get("ui-common-free", "FREE") })), (0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__price-icon-free") }, { children: (0, i.jsx)(a.SVG.Video, {}) }))] }) : (0, i.jsxs)(i.Fragment, { children: [(0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__price-total", (0, u.getFontClassByDigits)(y, 2, 7)) }, { children: y })), (0, i.jsx)("div", r.__assign({ className: (0, s.default)("booster-body__price-icon") }, { children: (0, i.jsx)(a.SVG.COINS, {}) }))] }) }))] } ) ), ], } ) ); }; }, 4405: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Boosters = void 0); var r = n(22970), i = n(10348), o = n(37394), a = n(37394), s = n(47166), u = n(49088), l = n(18184), c = n(15276), d = n(78620), h = n(39163), p = n(28886), f = r.__importDefault(n(72779)), _ = n(34619), g = n(31063); n(89365); var m = n(73218), v = n(70789), y = !0; t.Boosters = function (e) { var t = e.className, n = p.UIConstants.boosters, C = (0, s.useInjection)(d.TypesGame.model), b = (0, s.useInjection)(o.TypesSocial.model); (0, s.useEventListener)("YANDEX_SYNC", function () { x(function (e) { return r.__assign(r.__assign({}, e), { coins: C.cookie.coins }); }); }); var w = { coins: C.cookie.coins, startCoins: C.cookie.coins, boosters: n, adViewed: !1 }, S = r.__read( (0, _.useState)(function () { return w; }), 2 ), T = S[0], x = S[1], E = (T.startCoins, T.coins), L = T.adViewed, A = function () { var e = I(); x(function (t) { return r.__assign(r.__assign({}, t), { boosters: e }); }), y && (y = !1); }; (0, _.useEffect)(A, [E, L, y]), (0, s.useEventListener)(m.GameEvents.COINS_UPDATED, A); Date.now(); var I = function () { for (var e = b.session.ftue && y, t = C.absoluteLevelNum > 1 && C.rewardedAdsAllowed, i = [], o = 0; o < n.length; o++) i[o] = r.__assign(r.__assign({}, n[o]), M(n[o])); var s = []; i.forEach(function (e) { s.push({ id: e.id, price: e.price }); }), s.sort(function (e, t) { return t.price - e.price; }); var u = s[0].id; return ( i.forEach(function (n) { (n.isFree = !1), (n.disabled = !C.cookie.isEnoughCoins(n.price)), n.id === u && n.disabled && t && ((n.disabled = !1), (n.isFree = !0)); var i = function () {}, o = function () {}; switch (n.id) { case h.BoosterType.START_UNITS: (o = function () { C.meta.increaseStartPopulation(); }), (i = function () { C.meta.increaseStartPopulationFree(); }); break; case h.BoosterType.START_PRODUCE: (o = function () { C.meta.increaseSpawn(); }), (i = function () { C.meta.increaseSpawnFree(); }); break; case h.BoosterType.OFFLINE_EARNINGS: (o = function () { C.meta.increaseOffline(); }), (i = function () { C.meta.increaseOfflineFree(); }); } (n.onClick = function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return ( x(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !1 }); }), n.isFree && t ? [4, (0, c.showReward)()] : [3, 2] ); case 1: return ( e.sent() === a.AdResponse.PLAYED && (v.SIOConstants.REWARD_AD_PLAYED.set("boosters", Date.now()), i(), x(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !0 }); })), [3, 3] ); case 2: o(), x(function (e) { return r.__assign(r.__assign({}, e), { coins: C.cookie.coins }); }), (e.label = 3); case 3: return [2]; } }); }); }), e && ((n.disabled = !0), (n.isFree = !1)); }), i ); }, M = function (e) { var t = 11, n = r.__read([99, 66, !1], 3), i = n[0], o = n[1], a = n[2]; switch (e.id) { case h.BoosterType.START_UNITS: (o = C.cookie.playerStartPopulation), (i = C.meta.getStartPopulationCost()), (t = C.meta.getStartPopulation(l.PlayerType.First)); break; case h.BoosterType.START_PRODUCE: (o = C.cookie.playerSpawnLevel), (i = C.meta.getPopulationRateCost()), (t = u.math.round(C.meta.getPlayerGenerationRateValue(o), 100)); break; default: (o = C.cookie.playerOfflineLevel), (i = C.meta.getOfflineEarningCost()), (t = C.meta.getOfflineEarning()); } return { defaultCount: (t = (0, g.toFixedString)(t)), price: i, levelNum: o, disabled: a, isFree: !1, onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { return [2]; }); }); }, }; }; return (0, i.jsx)( "div", r.__assign( { className: (0, f.default)("boosters", t) }, { children: T.boosters .filter(function (e) { return e.allowed; }) .map(function (e) { return (0, i.jsx)(h.Booster, r.__assign({}, e)); }), } ) ); }; }, 82641: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CancelButton = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(89225), s = r.__importDefault(n(72779)); t.CancelButton = function (e) { return (0, i.jsx)("button", r.__assign({ className: (0, s.default)("btn", "btn-red", "cancel-button") }, e, { type: "button" }, { children: (0, i.jsx)(o.Graphics, { svg: a.cancel_icon, inline: !1 }) })); }; }, 62838: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Capturing = void 0); var r = n(22970), i = n(10348), o = n(22653), a = n(89225); n(38724); t.Capturing = function (e) { var t = e.stages, n = void 0 === t ? 4 : t, s = e.captured, u = void 0 === s ? 0.01 : s, l = e.title, c = e.showGift, d = void 0 === c || c; return (0, i.jsxs)("div", r.__assign({ className: "capturing" }, { children: [l ? (0, i.jsx)("div", r.__assign({ className: "capturing__title" }, { children: l })) : null, (0, i.jsx)("div", r.__assign({ className: "capturing__progress" }, { children: (0, i.jsx)(o.SvgCapturingProgress, { width: 482, height: 76, captured: u, stages: n }) })), d ? (0, i.jsx)("div", r.__assign({ className: "capturing__gift-image" }, { children: (0, i.jsx)(a.Images.Gift, {}) })) : null] })); }; }, 57224: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CapturingAnimated = void 0); var r = n(22970), i = n(10348), o = n(64770), a = n(34619), s = n(62838); t.CapturingAnimated = function (e) { var t = e.from, n = e.to, u = e.total, l = e.startDelay, c = void 0 === l ? 1 : l, d = e.onAnimationComplete, h = r.__read((0, a.useState)({ captured: t / u, showGift: !1 }), 2), p = h[0], f = h[1]; return ( (0, a.useLayoutEffect)( function () { var e = { value: t / u }; o.gsap.fromTo(e, e, { delay: c, duration: 1, value: n / u, ease: "sine.in", onUpdate: function () { f({ captured: e.value, showGift: !1 }); }, onComplete: d, }); }, [t, n] ), (0, i.jsx)(s.Capturing, { captured: p.captured, stages: u, showGift: p.showGift }) ); }; }, 91568: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FilledRects = void 0); var r = n(10348); t.FilledRects = function (e) { var t = e.stages, n = e.fill, i = e.width, o = e.height, a = e.pad, s = e.gap, u = (i - 2 * a - s * (t + 1)) / t, l = o - 2 * a, c = new Array(t).fill(null); return (0, r.jsx)(r.Fragment, { children: c.map(function (e, t) { return (0, r.jsx)("rect", { x: a + s + (u + s) * t, y: a, fill: n, width: u, height: l, rx: l / 2 }); }), }); }; }, 22653: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SvgCapturingProgress = void 0); var r = n(22970), i = n(10348), o = n(91568); t.SvgCapturingProgress = function (e) { var t = e.width, n = e.height, a = e.captured, s = e.stages; return (0, i.jsxs)("svg", r.__assign({ width: t, height: n, viewBox: "0 0 ".concat(t, " ").concat(n), fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, i.jsx)("rect", { width: t, height: n, rx: n / 2, fill: "#FEEB5D", className: "background" }), (0, i.jsx)(o.FilledRects, { fill: "#B3B3B3", stages: s, width: t, height: n, pad: 10, gap: 5 }), (0, i.jsx)("mask", r.__assign({ id: "mask-capturing", "mask-type": "alpha", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: t, height: n }, { children: (0, i.jsx)("rect", { width: t * a, height: n, fill: "#000" }) })), (0, i.jsx)("g", r.__assign({ mask: "url(#mask-capturing)" }, { children: (0, i.jsx)(o.FilledRects, { fill: "#77D982", stages: s, width: t, height: n, pad: 10, gap: 5 }) }))] })); }; }, 85013: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ClaimButton = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(47166), s = n(89225), u = r.__importDefault(n(72779)), l = n(15276); t.ClaimButton = function (e) { var t = e.onClick, n = e.className, c = (e.placement, e.reward), d = void 0 === c ? 0 : c, h = e.text, p = void 0 === h ? o.Localize.get("ui-win-claim", "CLAIM") : h, f = e.multiplierText, _ = void 0 === f ? "X3" : f, g = e.showIcom, m = void 0 === g || g; return (0, i.jsxs)( a.Button, r.__assign( { className: (0, u.default)("btn-green", n, { "btn-multiline": d }), onClick: function () { t && ((0, l.playUIClickSound)(), t()); }, }, { children: [m ? (0, i.jsx)(s.SVG.Video, {}) : null, d ? (0, i.jsxs)("span", r.__assign({ className: "column" }, { children: [(0, i.jsxs)("span", r.__assign({ className: (0, u.default)("btn-content-title") }, { children: [p, " ", _] })), (0, i.jsxs)("span", r.__assign({ className: (0, u.default)("row", "row_centred") }, { children: [(0, i.jsx)("span", r.__assign({ className: (0, u.default)("btn-content-important") }, { children: d })), (0, i.jsx)(s.SVG.COINS, { className: (0, u.default)("icon-coins") })] }))] })) : (0, i.jsx)("span", r.__assign({ className: "btn-content-title" }, { children: p }))] } ) ); }; }, 60294: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoinsField = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(31063), s = n(98051), u = n(28886), l = n(34619); t.CoinsField = function (e) { var t = e.total, n = void 0 === t ? 0 : t, c = e.className, d = e.tickupDuration, h = void 0 === d ? u.UIConstants.coinsIndicator.updateDelay : d, p = r.__read((0, l.useState)(n), 2), f = p[0], _ = p[1]; return ( h && (0, l.useLayoutEffect)( function () { return (0, s.tickup)(f, n, h, function (e) { return _(Math.round(e)); }); }, [n] ), (0, i.jsx)("div", r.__assign({ className: (0, o.default)("coins-field", c, (0, a.getFontClassByDigits)(f)) }, { children: f })) ); }; }, 83951: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoinsIndicator = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(73218), s = n(60294), u = n(89225), l = r.__importDefault(n(72779)), c = n(34619); n(37163); t.CoinsIndicator = function (e) { var t = e.className, n = e.total, d = void 0 === n ? 600 : n, h = r.__read((0, c.useState)(d), 2), p = h[0], f = h[1]; return ( (0, o.useEventListener)(a.GameEvents.COINS_UPDATED, function (e) { return f(e.coins); }), (0, o.useEventListener)("YANDEX_SYNC", function (e) { f(e.coins); }), (0, i.jsxs)("div", r.__assign({ className: (0, l.default)(t) }, { children: [(0, i.jsx)(s.CoinsField, { className: (0, l.default)("coins-indicator__total"), total: p }), (0, i.jsx)("div", r.__assign({ className: (0, l.default)("coins-indicator__icon") }, { children: (0, i.jsx)(u.SVG.COINS, {}) }))] })) ); }; }, 82126: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PopupWinIndicator = void 0); var r = n(22970), i = n(10348), o = n(60294), a = n(89225), s = r.__importDefault(n(72779)); n(37163); var u = n(28886); t.PopupWinIndicator = function (e) { var t = e.className, n = e.total, l = void 0 === n ? 600 : n; return (0, i.jsx)("div", r.__assign({ className: "absolute_box" }, { children: (0, i.jsxs)("div", r.__assign({ className: (0, s.default)(t) }, { children: [(0, i.jsx)(o.CoinsField, { className: (0, s.default)("coins-indicator__total", "coins-indicator__plus"), total: l, tickupDuration: l > 0 ? u.UIConstants.popup.updateCoinsTime : 0 }), (0, i.jsx)("div", r.__assign({ className: (0, s.default)("coins-indicator__icon") }, { children: (0, i.jsx)(a.SVG.COINS, {}) }))] })) })); }; }, 98051: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.tickup = void 0); var r = n(64770); t.tickup = function (e, t, n, i) { void 0 === n && (n = 1e3); var o = { value: e }; return ( r.gsap.fromTo(o, o, { duration: 0.001 * n, value: t, ease: "linear", onUpdate: function () { return i(o.value); }, }), function () { return r.gsap.killTweensOf(o); } ); }; }, 19059: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ConfirmButton = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(89225), s = r.__importDefault(n(72779)), u = n(15276); t.ConfirmButton = function (e) { return (0, i.jsx)( "button", r.__assign( { className: (0, s.default)("btn", "btn-green", "confirm-button"), onClick: function () { e.onClick && ((0, u.playUIClickSound)(), e.onClick()); }, type: "button", }, { children: (0, i.jsx)(o.Graphics, { svg: a.confirm_icon, inline: !1 }) } ) ); }; }, 26425: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ContinueButton = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(47166), s = r.__importDefault(n(72779)), u = n(15276); t.ContinueButton = function (e) { var t = e.onClick; return (0, i.jsx)( a.Button, r.__assign( { className: (0, s.default)("continue-button"), onClick: function () { t && ((0, u.playUIClickSound)(), t()); }, }, { children: o.Localize.get("ui-win-continue", "CONTINUE") } ) ); }; }, 86541: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InviteButton = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(37394), s = n(57228), u = n(47166), l = r.__importDefault(n(72779)), c = n(15276); t.InviteButton = function (e) { return (0, i.jsx)(u.Button, { icon: "friends", className: (0, l.default)("btn-blue"), onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return (0, c.playUIClickSound)(), [4, o.di.get(a.TypesSocial.model).invite(e.options, !1)]; case 1: switch (((t = n.sent()), t)) { case s.SOCIAL_POPUP.ACCEPTED: return [3, 2]; case s.SOCIAL_POPUP.CANCELLED: return [3, 4]; } return [3, 5]; case 2: return [4, o.di.get(a.TypesFlow.LevelStart).run()]; case 3: return n.sent(), [3, 5]; case 4: return [3, 5]; case 5: return e.onClick && e.onClick(), [2]; } }); }); }, }); }; }, 48877: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderboardButton = void 0); var r = n(22970), i = n(10348), o = n(47166), a = r.__importDefault(n(72779)), s = n(15276), u = n(37394), l = n(47166), c = n(78620), d = n(46595); t.LeaderboardButton = function (e) { var t = (0, l.useInjection)(u.TypesSocial.model); return (0, i.jsx)(o.Button, { className: (0, a.default)("btn-blue", "leaderboard-button", e.className), icon: "leaderboard", onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var n, i, o; return r.__generator(this, function (r) { switch (r.label) { case 0: return e.onClick ? ((0, s.playUIClickSound)(), (n = void 0 === t.userAuthorized || void 0 === t.authorizeUser || t.userAuthorized) ? [3, 2] : [4, null === (i = (0, d.lazyGet)(c.TypesGame.actions.suggestAuthorizeAction)) || void 0 === i ? void 0 : i.run()]) : [3, 4]; case 1: (n = r.sent()), (r.label = 2); case 2: return n ? [4, null === (o = (0, d.lazyGet)(c.TypesGame.actions.syncYandexLeaderboardsAction)) || void 0 === o ? void 0 : o.run()] : [3, 4]; case 3: r.sent(), e.onClick(), (r.label = 4); case 4: return [2]; } }); }); }, }); }; }, 6161: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderBoardTabs = void 0); var r = n(22970), i = n(10348), o = n(76072); n(17173); t.LeaderBoardTabs = function (e) { return (0, i.jsx)(i.Fragment, { children: (0, i.jsx)(o.LeaderBoard, r.__assign({}, e.leaderboardsProps)) }); }; }, 95941: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelTitle = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(51159), s = n(78620); n(936); t.LevelTitle = function () { var e = (0, o.lazyGet)(s.TypesGame.model); return (0, i.jsxs)("div", r.__assign({ className: "level-number" }, { children: [a.Localize.get("ui-menu-level_num", "LEVEL"), " ", (null == e ? void 0 : e.absoluteLevelNum) || "-"] })); }; }, 62873: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.MultiplyArrow = void 0); var r = n(22970), i = n(10348), o = n(64770), a = n(34619), s = Math.PI / 2, u = (Math.PI / 180) * 73, l = [2, 3, 4, 3, 2], c = [0.15, 0.35, 0.62, 0.82]; t.MultiplyArrow = function (e) { e.className; var t = e.paused, n = void 0 !== t && t, d = e.onPause, h = r.__read( (0, a.useState)(function () { return { paused: n, progress: 0 }; }), 2 ), p = h[0], f = h[1], _ = p.progress; (0, a.useLayoutEffect)( function () { if (!n) { var e = { value: 0 }; return ( o.gsap.fromTo( e, { value: 0 }, { value: 1, repeat: 1 / 0, yoyo: !0, ease: "linear", onUpdate: function () { return f(function (t) { return r.__assign(r.__assign({}, t), { progress: e.value }); }); }, } ), function () { return o.gsap.killTweensOf(e); } ); } if (d) { var t = (function (e) { void 0 === e && (e = 0); var t = 0; return e > c[3] ? (t = 4) : e > c[2] && e <= c[3] ? (t = 3) : e > c[1] && e <= c[2] ? (t = 2) : e > c[0] && e <= c[1] && (t = 1), l[t]; })(_); d(t); } }, [n] ); var g = u * (_ - 0.5) - s, m = 118 + 190 * Math.cos(g), v = 200 + 160 * Math.sin(g); return (0, i.jsx)("div", { style: { transform: "translate(" .concat(m, "px, ") .concat(v, "px) rotate(") .concat(g + s, "rad)"), }, className: "multiply-arrow", }); }; }, 57205: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.MultiplyBonus = void 0); var r = n(22970), i = n(10348), o = n(62873); t.MultiplyBonus = function (e) { e.className; var t = e.paused, n = void 0 !== t && t, a = e.onPause; return (0, i.jsxs)("div", r.__assign({ className: "animation-wrapper" }, { children: [(0, i.jsxs)("svg", r.__assign({ width: "534", height: "138", viewBox: "0 0 534 138", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.394 66.7194C93.9547 22.7412 179.736 -0.286157 267.016 0.00268419C354.296 0.291529 439.926 23.8861 515.198 68.363C532.791 78.7583 538.625 101.447 528.23 119.04C517.835 136.633 495.146 142.468 477.553 132.072C413.584 94.2742 340.861 74.2475 266.771 74.0023C192.682 73.7571 119.831 93.302 55.6181 130.675C37.9571 140.955 15.3072 134.97 5.02805 117.309C-5.25108 99.6485 0.73308 76.9986 18.394 66.7194Z", fill: "#0C4BA8" }), (0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M343.702 6.29639C383.419 12.7244 422.205 24.0182 459.199 39.9244L429.969 107.907C398.541 94.394 365.601 84.8036 331.879 79.3458L343.702 6.29639Z", fill: "#4A74C6" }), (0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M187.087 6.29639C147.37 12.7244 108.584 24.0182 71.5898 39.9244L100.82 107.907C132.248 94.394 165.188 84.8036 198.91 79.3458L187.087 6.29639Z", fill: "#4A74C6" }), (0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M343.778 6.3089C291.888 -2.09773 238.999 -2.103 187.107 6.2933L198.927 79.3432C242.985 72.2145 287.887 72.2189 331.944 79.3565L343.778 6.3089Z", fill: "#9AAFFD" }), (0, i.jsx)("path", { d: "M241.92 43.684H256.968V52H261.236V43.684H265.46V40.032H261.236V20.936H256.308L241.92 40.956V43.684ZM246.716 40.032V39.944L255.516 28.152C256.352 27.052 257.056 25.556 257.056 25.556H257.144C257.144 25.556 256.968 27.228 256.968 28.68V40.032H246.716ZM267.983 52H272.823L278.455 42.452C279.423 40.736 280.347 38.888 280.347 38.888H280.435C280.435 38.888 281.403 40.736 282.371 42.452L288.047 52H292.931L283.119 35.984L292.359 20.936H287.343L282.415 29.34C281.403 31.056 280.523 33.036 280.523 33.036H280.435C280.435 33.036 279.379 31.012 278.455 29.34L273.571 20.936H268.599L277.751 35.984L267.983 52Z", fill: "white" }), (0, i.jsx)("path", { d: "M241.92 43.684H240.92V44.684H241.92V43.684ZM256.968 43.684H257.968V42.684H256.968V43.684ZM256.968 52H255.968V53H256.968V52ZM261.236 52V53H262.236V52H261.236ZM261.236 43.684V42.684H260.236V43.684H261.236ZM265.46 43.684V44.684H266.46V43.684H265.46ZM265.46 40.032H266.46V39.032H265.46V40.032ZM261.236 40.032H260.236V41.032H261.236V40.032ZM261.236 20.936H262.236V19.936H261.236V20.936ZM256.308 20.936V19.936H255.795L255.496 20.3524L256.308 20.936ZM241.92 40.956L241.108 40.3724L240.92 40.6339V40.956H241.92ZM246.716 40.032H245.716V41.032H246.716V40.032ZM246.716 39.944L245.914 39.3459L245.716 39.612V39.944H246.716ZM255.516 28.152L254.72 27.5469L254.714 27.5539L255.516 28.152ZM257.056 25.556V24.556H256.421L256.151 25.1302L257.056 25.556ZM257.144 25.556L258.138 25.6607L258.255 24.556H257.144V25.556ZM256.968 40.032V41.032H257.968V40.032H256.968ZM241.92 44.684H256.968V42.684H241.92V44.684ZM255.968 43.684V52H257.968V43.684H255.968ZM256.968 53H261.236V51H256.968V53ZM262.236 52V43.684H260.236V52H262.236ZM261.236 44.684H265.46V42.684H261.236V44.684ZM266.46 43.684V40.032H264.46V43.684H266.46ZM265.46 39.032H261.236V41.032H265.46V39.032ZM262.236 40.032V20.936H260.236V40.032H262.236ZM261.236 19.936H256.308V21.936H261.236V19.936ZM255.496 20.3524L241.108 40.3724L242.732 41.5396L257.12 21.5196L255.496 20.3524ZM240.92 40.956V43.684H242.92V40.956H240.92ZM247.716 40.032V39.944H245.716V40.032H247.716ZM247.517 40.5421L256.317 28.7501L254.714 27.5539L245.914 39.3459L247.517 40.5421ZM256.312 28.7571C256.773 28.1501 257.186 27.452 257.476 26.9223C257.623 26.6541 257.743 26.4218 257.826 26.2557C257.868 26.1726 257.901 26.1057 257.924 26.0588C257.935 26.0354 257.944 26.017 257.95 26.004C257.953 25.9975 257.956 25.9923 257.957 25.9886C257.958 25.9868 257.959 25.9853 257.96 25.9841C257.96 25.9836 257.96 25.9831 257.96 25.9827C257.96 25.9825 257.96 25.9823 257.96 25.9822C257.961 25.9821 257.961 25.982 257.961 25.982C257.961 25.9819 257.961 25.9818 257.056 25.556C256.151 25.1302 256.151 25.1301 256.151 25.1301C256.151 25.1301 256.151 25.13 256.151 25.13C256.151 25.1299 256.151 25.1299 256.151 25.1299C256.151 25.1298 256.151 25.1299 256.151 25.13C256.151 25.1304 256.151 25.131 256.15 25.132C256.149 25.134 256.148 25.1374 256.145 25.1422C256.141 25.1516 256.134 25.1664 256.124 25.186C256.105 25.2253 256.076 25.2839 256.039 25.3582C255.964 25.5069 255.856 25.7174 255.723 25.9607C255.452 26.454 255.094 27.0539 254.72 27.5469L256.312 28.7571ZM257.056 26.556H257.144V24.556H257.056V26.556ZM257.144 25.556C256.149 25.4513 256.149 25.4514 256.149 25.4514C256.149 25.4514 256.149 25.4515 256.149 25.4516C256.149 25.4517 256.149 25.4518 256.149 25.452C256.149 25.4523 256.149 25.4527 256.149 25.4532C256.149 25.4543 256.149 25.4557 256.149 25.4576C256.148 25.4613 256.148 25.4666 256.147 25.4734C256.146 25.487 256.144 25.5067 256.141 25.532C256.136 25.5828 256.129 25.6561 256.121 25.7484C256.104 25.9328 256.081 26.1934 256.059 26.5003C256.014 27.1106 255.968 27.919 255.968 28.68H257.968C257.968 27.989 258.01 27.2354 258.053 26.6467C258.075 26.3541 258.096 26.106 258.112 25.9315C258.12 25.8443 258.127 25.7757 258.131 25.7293C258.134 25.7061 258.135 25.6885 258.137 25.6769C258.137 25.6711 258.138 25.6668 258.138 25.6641C258.138 25.6627 258.138 25.6618 258.138 25.6612C258.138 25.6609 258.138 25.6607 258.138 25.6606C258.138 25.6606 258.138 25.6606 258.138 25.6606C258.138 25.6606 258.138 25.6606 258.138 25.6606C258.138 25.6606 258.138 25.6607 257.144 25.556ZM255.968 28.68V40.032H257.968V28.68H255.968ZM256.968 39.032H246.716V41.032H256.968V39.032ZM267.983 52L267.13 51.4793L266.202 53H267.983V52ZM272.823 52V53H273.394L273.685 52.5081L272.823 52ZM278.455 42.452L279.317 42.9601L279.322 42.9517L279.326 42.9433L278.455 42.452ZM280.347 38.888V37.888H279.729L279.453 38.4408L280.347 38.888ZM280.435 38.888L281.321 38.424L281.04 37.888H280.435V38.888ZM282.371 42.452L281.5 42.9433L281.506 42.9532L281.512 42.963L282.371 42.452ZM288.047 52L287.188 52.511L287.478 53H288.047V52ZM292.931 52V53H294.717L293.784 51.4776L292.931 52ZM283.119 35.984L282.267 35.4607L281.946 35.9834L282.267 36.5064L283.119 35.984ZM292.359 20.936L293.211 21.4593L294.147 19.936H292.359V20.936ZM287.343 20.936V19.936H286.77L286.481 20.4302L287.343 20.936ZM282.415 29.34L283.277 29.848L283.278 29.8458L282.415 29.34ZM280.523 33.036V34.036H281.173L281.437 33.4421L280.523 33.036ZM280.435 33.036L279.549 33.4986L279.829 34.036H280.435V33.036ZM278.455 29.34L279.331 28.8563L279.325 28.8469L279.32 28.8375L278.455 29.34ZM273.571 20.936L274.436 20.4335L274.147 19.936H273.571V20.936ZM268.599 20.936V19.936H266.821L267.745 21.4556L268.599 20.936ZM277.751 35.984L278.605 36.5047L278.922 35.9847L278.606 35.4644L277.751 35.984ZM267.983 53H272.823V51H267.983V53ZM273.685 52.5081L279.317 42.9601L277.594 41.9439L271.962 51.4919L273.685 52.5081ZM279.326 42.9433C279.818 42.0717 280.297 41.1698 280.651 40.4881C280.829 40.1467 280.976 39.8592 281.079 39.6569C281.131 39.5557 281.171 39.4757 281.199 39.4208C281.213 39.3934 281.223 39.3722 281.23 39.3578C281.234 39.3505 281.237 39.345 281.239 39.3412C281.24 39.3394 281.24 39.3379 281.241 39.3369C281.241 39.3364 281.241 39.336 281.241 39.3357C281.242 39.3356 281.242 39.3355 281.242 39.3354C281.242 39.3353 281.242 39.3353 281.242 39.3353C281.242 39.3352 281.242 39.3352 280.347 38.888C279.453 38.4408 279.453 38.4408 279.453 38.4408C279.453 38.4408 279.453 38.4408 279.453 38.4408C279.453 38.4408 279.453 38.4409 279.453 38.441C279.453 38.4411 279.453 38.4414 279.452 38.4418C279.452 38.4426 279.451 38.4438 279.451 38.4455C279.449 38.4488 279.446 38.4538 279.443 38.4606C279.436 38.4741 279.426 38.4943 279.413 38.5207C279.386 38.5736 279.347 38.6514 279.296 38.7502C279.196 38.948 279.052 39.2298 278.877 39.5649C278.528 40.2362 278.061 41.1163 277.584 41.9607L279.326 42.9433ZM280.347 39.888H280.435V37.888H280.347V39.888ZM280.435 38.888C279.549 39.352 279.549 39.352 279.549 39.3521C279.549 39.3521 279.55 39.3521 279.55 39.3521C279.55 39.3522 279.55 39.3523 279.55 39.3524C279.55 39.3527 279.55 39.3531 279.55 39.3536C279.551 39.3545 279.552 39.3559 279.552 39.3578C279.554 39.3615 279.557 39.3669 279.561 39.374C279.568 39.3883 279.58 39.4093 279.594 39.4365C279.623 39.491 279.664 39.5706 279.718 39.6713C279.824 39.8728 279.977 40.1591 280.159 40.4993C280.524 41.179 281.012 42.0768 281.5 42.9433L283.242 41.9607C282.763 41.1112 282.283 40.227 281.921 39.5537C281.741 39.2174 281.591 38.9345 281.486 38.7358C281.433 38.6365 281.392 38.5583 281.364 38.505C281.35 38.4784 281.339 38.458 281.332 38.4443C281.328 38.4375 281.326 38.4323 281.324 38.4289C281.323 38.4272 281.322 38.426 281.322 38.4251C281.322 38.4247 281.321 38.4244 281.321 38.4242C281.321 38.4241 281.321 38.4241 281.321 38.424C281.321 38.424 281.321 38.424 281.321 38.424C281.321 38.424 281.321 38.424 280.435 38.888ZM281.512 42.963L287.188 52.511L288.907 51.489L283.231 41.941L281.512 42.963ZM288.047 53H292.931V51H288.047V53ZM293.784 51.4776L283.972 35.4616L282.267 36.5064L292.079 52.5224L293.784 51.4776ZM283.971 36.5073L293.211 21.4593L291.507 20.4127L282.267 35.4607L283.971 36.5073ZM292.359 19.936H287.343V21.936H292.359V19.936ZM286.481 20.4302L281.553 28.8342L283.278 29.8458L288.206 21.4418L286.481 20.4302ZM281.554 28.832C281.029 29.7216 280.543 30.6715 280.191 31.3927C280.014 31.7547 279.87 32.0622 279.769 32.2798C279.719 32.3887 279.679 32.4752 279.652 32.535C279.639 32.5649 279.628 32.5881 279.621 32.6041C279.617 32.6121 279.615 32.6183 279.613 32.6226C279.612 32.6248 279.611 32.6264 279.61 32.6277C279.61 32.6283 279.61 32.6288 279.61 32.6291C279.61 32.6293 279.61 32.6295 279.61 32.6296C279.61 32.6296 279.61 32.6297 279.61 32.6297C279.61 32.6298 279.609 32.6299 280.523 33.036C281.437 33.4421 281.437 33.4422 281.437 33.4422L281.437 33.4422C281.437 33.4422 281.437 33.4422 281.437 33.4422C281.437 33.442 281.437 33.4418 281.437 33.4415C281.438 33.4407 281.438 33.4396 281.439 33.4379C281.44 33.4347 281.443 33.4295 281.446 33.4226C281.452 33.4087 281.462 33.3877 281.474 33.3601C281.499 33.3049 281.536 33.2234 281.584 33.1198C281.68 32.9126 281.819 32.6178 281.988 32.2703C282.329 31.5725 282.789 30.6744 283.277 29.848L281.554 28.832ZM280.523 32.036H280.435V34.036H280.523V32.036ZM280.435 33.036C281.322 32.5734 281.322 32.5734 281.322 32.5734C281.322 32.5734 281.322 32.5733 281.322 32.5733C281.322 32.5732 281.322 32.5731 281.322 32.573C281.322 32.5727 281.321 32.5723 281.321 32.5718C281.321 32.5708 281.32 32.5693 281.319 32.5673C281.317 32.5633 281.314 32.5574 281.309 32.5497C281.301 32.5343 281.29 32.5115 281.274 32.482C281.243 32.423 281.198 32.3369 281.141 32.2285C281.027 32.0116 280.866 31.7051 280.675 31.3462C280.294 30.6291 279.796 29.6995 279.331 28.8563L277.58 29.8237C278.038 30.6525 278.53 31.5709 278.909 32.2838C279.097 32.6399 279.258 32.9439 279.371 33.1588C279.427 33.2662 279.472 33.3513 279.502 33.4095C279.517 33.4386 279.529 33.461 279.537 33.476C279.541 33.4835 279.544 33.4892 279.546 33.493C279.547 33.4949 279.548 33.4963 279.548 33.4972C279.548 33.4977 279.548 33.498 279.549 33.4983C279.549 33.4984 279.549 33.4985 279.549 33.4985C279.549 33.4985 279.549 33.4985 279.549 33.4986C279.549 33.4986 279.549 33.4986 280.435 33.036ZM279.32 28.8375L274.436 20.4335L272.707 21.4385L277.591 29.8425L279.32 28.8375ZM273.571 19.936H268.599V21.936H273.571V19.936ZM267.745 21.4556L276.897 36.5036L278.606 35.4644L269.454 20.4164L267.745 21.4556ZM276.898 35.4633L267.13 51.4793L268.837 52.5207L278.605 36.5047L276.898 35.4633Z", fill: "black" }), (0, i.jsx)("path", { d: "M369.928 60.1009C371.419 63.0205 374.167 65.2116 377.183 66.1337C382.452 67.7447 387.082 64.9481 388.415 60.5874C389.948 55.5725 386.472 52.1256 383.193 50.7653L392.636 44.831L393.336 42.5417L378.001 37.8532L377.045 40.9784L385.731 43.6337C387.148 44.067 387.944 44.1913 387.944 44.1913L387.922 44.264C387.922 44.264 386.923 44.6737 385.812 45.4467L378.205 50.3133L378.452 52.4948L380.196 53.0281C383.394 54.0058 385.714 56.4238 384.748 59.5854C383.904 62.3472 380.916 63.5399 378.082 62.6733C375.611 61.9178 373.649 59.8875 372.723 57.9754L369.928 60.1009ZM388.595 69.146L392.593 70.3681L399.655 63.9045C400.888 62.7317 402.118 61.4388 402.118 61.4388L402.19 61.461C402.19 61.461 402.523 63.2317 402.889 64.8933L405.166 74.2122L409.2 75.4455L405.14 59.7403L416.571 49.6453L412.428 48.3787L406.236 54.0752C404.967 55.237 403.741 56.65 403.741 56.65L403.668 56.6278C403.668 56.6278 403.307 54.6896 402.966 53.0753L401.054 44.9013L396.948 43.6458L400.707 58.3849L388.595 69.146Z", fill: "white" }), (0, i.jsx)("path", { d: "M369.928 60.1009L369.322 59.3048L368.657 59.811L369.037 60.5558L369.928 60.1009ZM383.193 50.7653L382.661 49.9186L381.023 50.9478L382.81 51.689L383.193 50.7653ZM392.636 44.831L393.168 45.6778L393.484 45.4796L393.593 45.1234L392.636 44.831ZM393.336 42.5417L394.293 42.834L394.585 41.8777L393.629 41.5853L393.336 42.5417ZM378.001 37.8532L378.293 36.8969L377.337 36.6045L377.045 37.5608L378.001 37.8532ZM377.045 40.9784L376.089 40.686L375.797 41.6423L376.753 41.9347L377.045 40.9784ZM387.944 44.1913L388.901 44.4837L389.238 43.381L388.099 43.2033L387.944 44.1913ZM387.922 44.264L388.301 45.1893L388.74 45.0095L388.878 44.5563L387.922 44.264ZM385.812 45.4467L386.351 46.2891L386.367 46.2786L386.383 46.2675L385.812 45.4467ZM378.205 50.3133L377.666 49.4709L377.141 49.8066L377.211 50.4257L378.205 50.3133ZM378.452 52.4948L377.458 52.6073L377.532 53.2593L378.159 53.4511L378.452 52.4948ZM372.723 57.9754L373.623 57.5397L373.091 56.4396L372.118 57.1793L372.723 57.9754ZM369.037 60.5558C370.658 63.7288 373.628 66.0927 376.89 67.09L377.475 65.1774C374.705 64.3304 372.18 62.3123 370.818 59.6459L369.037 60.5558ZM376.89 67.09C382.68 68.86 387.874 65.7767 389.371 60.8798L387.459 60.295C386.29 64.1195 382.224 66.6294 377.475 65.1774L376.89 67.09ZM389.371 60.8798C390.23 58.073 389.686 55.6511 388.445 53.7576C387.225 51.8964 385.358 50.581 383.576 49.8416L382.81 51.689C384.307 52.3099 385.818 53.398 386.772 54.8541C387.706 56.2779 388.134 58.0869 387.459 60.295L389.371 60.8798ZM383.725 51.612L393.168 45.6778L392.104 43.9843L382.661 49.9186L383.725 51.612ZM393.593 45.1234L394.293 42.834L392.38 42.2493L391.68 44.5387L393.593 45.1234ZM393.629 41.5853L378.293 36.8969L377.709 38.8095L393.044 43.498L393.629 41.5853ZM377.045 37.5608L376.089 40.686L378.002 41.2708L378.957 38.1456L377.045 37.5608ZM376.753 41.9347L385.438 44.59L386.023 42.6774L377.338 40.0221L376.753 41.9347ZM385.438 44.59C386.171 44.8142 386.749 44.9598 387.148 45.0503C387.348 45.0955 387.503 45.1269 387.611 45.1475C387.665 45.1577 387.707 45.1653 387.737 45.1705C387.752 45.1731 387.764 45.1751 387.773 45.1765C387.777 45.1773 387.781 45.1779 387.784 45.1783C387.785 45.1786 387.786 45.1788 387.788 45.1789C387.788 45.179 387.789 45.1791 387.789 45.1792C387.789 45.1792 387.789 45.1792 387.79 45.1793C387.79 45.1793 387.79 45.1793 387.79 45.1793C387.79 45.1793 387.79 45.1793 387.944 44.1913C388.099 43.2033 388.099 43.2033 388.099 43.2033C388.099 43.2033 388.099 43.2033 388.099 43.2033C388.099 43.2033 388.099 43.2034 388.099 43.2034C388.1 43.2034 388.1 43.2035 388.1 43.2035C388.1 43.2035 388.1 43.2035 388.1 43.2035C388.1 43.2035 388.099 43.2033 388.097 43.203C388.094 43.2025 388.087 43.2014 388.078 43.1997C388.059 43.1964 388.028 43.1909 387.985 43.1827C387.899 43.1664 387.766 43.1397 387.59 43.0997C387.237 43.0197 386.707 42.8866 386.023 42.6774L385.438 44.59ZM386.988 43.8989L386.966 43.9716L388.878 44.5563L388.901 44.4837L386.988 43.8989ZM387.922 44.264C387.543 43.3387 387.543 43.3387 387.543 43.3388C387.543 43.3388 387.542 43.3389 387.542 43.3389C387.542 43.339 387.542 43.3391 387.542 43.3392C387.541 43.3394 387.541 43.3396 387.54 43.3398C387.539 43.3403 387.538 43.3409 387.536 43.3415C387.533 43.3429 387.528 43.3447 387.523 43.3468C387.513 43.3512 387.499 43.3571 387.481 43.3647C387.446 43.3799 387.397 43.4016 387.335 43.4297C387.211 43.4859 387.037 43.568 386.828 43.6754C386.41 43.8894 385.842 44.2077 385.241 44.626L386.383 46.2675C386.893 45.9127 387.38 45.6396 387.739 45.4555C387.918 45.3638 388.064 45.2952 388.162 45.2504C388.212 45.228 388.249 45.2117 388.273 45.2014C388.285 45.1963 388.293 45.1927 388.298 45.1907C388.3 45.1897 388.302 45.1891 388.302 45.1888C388.303 45.1887 388.303 45.1887 388.303 45.1887C388.303 45.1888 388.302 45.1888 388.302 45.1889C388.302 45.189 388.302 45.189 388.302 45.1891C388.302 45.1891 388.302 45.1891 388.302 45.1892C388.302 45.1892 388.301 45.1893 387.922 44.264ZM385.273 44.6044L377.666 49.4709L378.744 51.1556L386.351 46.2891L385.273 44.6044ZM377.211 50.4257L377.458 52.6073L379.446 52.3823L379.199 50.2008L377.211 50.4257ZM378.159 53.4511L379.904 53.9844L380.489 52.0718L378.744 51.5385L378.159 53.4511ZM379.904 53.9844C381.363 54.4305 382.541 55.1829 383.24 56.0957C383.913 56.9745 384.176 58.0365 383.792 59.293L385.704 59.8778C386.287 57.9727 385.873 56.2449 384.828 54.8799C383.809 53.5489 382.227 52.6033 380.489 52.0718L379.904 53.9844ZM383.792 59.293C383.147 61.4028 380.814 62.4628 378.374 61.717L377.789 63.6296C381.019 64.617 384.66 63.2916 385.704 59.8778L383.792 59.293ZM378.374 61.717C376.216 61.0572 374.45 59.2487 373.623 57.5397L371.823 58.411C372.847 60.5262 375.005 62.7785 377.789 63.6296L378.374 61.717ZM372.118 57.1793L369.322 59.3048L370.533 60.8969L373.328 58.7714L372.118 57.1793ZM388.595 69.146L387.931 68.3985L386.6 69.5815L388.303 70.1023L388.595 69.146ZM392.593 70.3681L392.3 71.3244L392.846 71.4914L393.268 71.1058L392.593 70.3681ZM399.655 63.9045L400.33 64.6422L400.337 64.6357L400.344 64.629L399.655 63.9045ZM402.118 61.4388L402.41 60.4825L401.819 60.3018L401.393 60.7496L402.118 61.4388ZM402.19 61.461L403.173 61.2762L403.061 60.6816L402.483 60.5047L402.19 61.461ZM402.889 64.8933L401.913 65.1085L401.915 65.1196L401.918 65.1307L402.889 64.8933ZM405.166 74.2122L404.195 74.4496L404.33 75.0022L404.874 75.1685L405.166 74.2122ZM409.2 75.4455L408.907 76.4018L410.615 76.9238L410.168 75.1952L409.2 75.4455ZM405.14 59.7403L404.478 58.9907L404.019 59.3967L404.172 59.9906L405.14 59.7403ZM416.571 49.6453L417.233 50.3948L418.573 49.2116L416.864 48.689L416.571 49.6453ZM412.428 48.3787L412.721 47.4224L412.173 47.2549L411.751 47.6428L412.428 48.3787ZM406.236 54.0752L406.912 54.8129L406.913 54.8112L406.236 54.0752ZM403.741 56.65L403.448 57.6063L404.07 57.7963L404.496 57.3056L403.741 56.65ZM403.668 56.6278L402.685 56.811L402.796 57.4069L403.375 57.5841L403.668 56.6278ZM402.966 53.0753L403.944 52.8687L403.942 52.8581L403.94 52.8476L402.966 53.0753ZM401.054 44.9013L402.028 44.6735L401.897 44.1132L401.347 43.9449L401.054 44.9013ZM396.948 43.6458L397.24 42.6895L395.539 42.1695L395.979 43.8929L396.948 43.6458ZM400.707 58.3849L401.371 59.1324L401.826 58.7279L401.676 58.1377L400.707 58.3849ZM388.303 70.1023L392.3 71.3244L392.885 69.4118L388.888 68.1897L388.303 70.1023ZM393.268 71.1058L400.33 64.6422L398.98 63.1668L391.917 69.6304L393.268 71.1058ZM400.344 64.629C400.972 64.0319 401.596 63.4067 402.062 62.9326C402.295 62.6951 402.49 62.4946 402.626 62.3532C402.694 62.2825 402.748 62.2266 402.785 62.1881C402.803 62.1689 402.817 62.154 402.827 62.1439C402.832 62.1388 402.835 62.1349 402.838 62.1322C402.839 62.1309 402.84 62.1299 402.841 62.1292C402.841 62.1288 402.842 62.1285 402.842 62.1283C402.842 62.1282 402.842 62.1281 402.842 62.1281C402.842 62.128 402.842 62.128 402.842 62.128C402.842 62.128 402.842 62.1279 402.118 61.4388C401.393 60.7496 401.393 60.7496 401.393 60.7496C401.393 60.7496 401.393 60.7496 401.393 60.7496C401.393 60.7496 401.393 60.7496 401.393 60.7497C401.393 60.7498 401.393 60.75 401.392 60.7503C401.392 60.7508 401.391 60.7516 401.39 60.7528C401.388 60.7551 401.384 60.7586 401.38 60.7633C401.371 60.7727 401.357 60.7867 401.34 60.8051C401.305 60.842 401.253 60.8962 401.186 60.965C401.053 61.1027 400.863 61.2987 400.635 61.5311C400.178 61.9967 399.571 62.6044 398.966 63.18L400.344 64.629ZM401.825 62.3951L401.898 62.4173L402.483 60.5047L402.41 60.4825L401.825 62.3951ZM402.19 61.461C401.207 61.6457 401.207 61.6457 401.207 61.6458C401.207 61.6458 401.207 61.6458 401.207 61.6459C401.207 61.6459 401.207 61.646 401.207 61.6462C401.208 61.6464 401.208 61.6468 401.208 61.6472C401.208 61.6482 401.208 61.6495 401.208 61.6513C401.209 61.6549 401.21 61.6601 401.211 61.6669C401.214 61.6806 401.218 61.7008 401.223 61.727C401.233 61.7793 401.247 61.8557 401.266 61.9525C401.303 62.146 401.357 62.4212 401.421 62.7486C401.551 63.4025 401.727 64.2682 401.913 65.1085L403.866 64.6781C403.685 63.8568 403.512 63.0063 403.383 62.3595C403.319 62.0365 403.267 61.7651 403.23 61.5747C403.212 61.4795 403.197 61.4046 403.188 61.3536C403.183 61.3282 403.179 61.3087 403.177 61.2956C403.175 61.2891 403.174 61.2842 403.174 61.2809C403.174 61.2793 403.173 61.2781 403.173 61.2773C403.173 61.2769 403.173 61.2766 403.173 61.2765C403.173 61.2764 403.173 61.2763 403.173 61.2763C403.173 61.2763 403.173 61.2762 403.173 61.2762C403.173 61.2762 403.173 61.2762 402.19 61.461ZM401.918 65.1307L404.195 74.4496L406.138 73.9749L403.861 64.656L401.918 65.1307ZM404.874 75.1685L408.907 76.4018L409.492 74.4891L405.458 73.2559L404.874 75.1685ZM410.168 75.1952L406.108 59.49L404.172 59.9906L408.232 75.6957L410.168 75.1952ZM405.802 60.4898L417.233 50.3948L415.909 48.8957L404.478 58.9907L405.802 60.4898ZM416.864 48.689L412.721 47.4224L412.136 49.335L416.279 50.6016L416.864 48.689ZM411.751 47.6428L405.559 53.3393L406.913 54.8112L413.105 49.1147L411.751 47.6428ZM405.561 53.3376C404.9 53.9433 404.256 54.6079 403.782 55.1159C403.543 55.3711 403.346 55.5892 403.207 55.7441C403.138 55.8216 403.083 55.8834 403.045 55.9262C403.026 55.9476 403.012 55.9642 403.002 55.9758C402.997 55.9815 402.993 55.986 402.99 55.9891C402.989 55.9907 402.988 55.9919 402.987 55.9928C402.986 55.9933 402.986 55.9936 402.986 55.9939C402.986 55.994 402.986 55.9942 402.986 55.9943C402.986 55.9943 402.985 55.9944 402.985 55.9944C402.985 55.9944 402.985 55.9945 403.741 56.65C404.496 57.3056 404.496 57.3056 404.496 57.3057C404.496 57.3057 404.496 57.3057 404.496 57.3057C404.496 57.3057 404.496 57.3057 404.496 57.3057C404.496 57.3056 404.496 57.3054 404.496 57.3052C404.496 57.3047 404.497 57.3039 404.498 57.3028C404.5 57.3005 404.503 57.2969 404.508 57.292C404.516 57.2823 404.529 57.2674 404.546 57.2479C404.581 57.2089 404.632 57.1512 404.697 57.0781C404.828 56.9317 405.016 56.724 405.244 56.4807C405.7 55.9917 406.304 55.3689 406.912 54.8129L405.561 53.3376ZM404.033 55.6937L403.96 55.6715L403.375 57.5841L403.448 57.6063L404.033 55.6937ZM403.668 56.6278C404.651 56.4447 404.651 56.4447 404.651 56.4446C404.651 56.4446 404.651 56.4446 404.651 56.4445C404.651 56.4445 404.651 56.4444 404.651 56.4442C404.651 56.444 404.651 56.4436 404.651 56.4431C404.65 56.4421 404.65 56.4407 404.65 56.4388C404.649 56.4349 404.648 56.4293 404.647 56.4219C404.644 56.4071 404.64 56.3852 404.634 56.3569C404.624 56.3003 404.608 56.2177 404.589 56.1137C404.549 55.9057 404.493 55.6116 404.426 55.2668C404.293 54.5782 404.116 53.6838 403.944 52.8687L401.987 53.282C402.156 54.0811 402.33 54.963 402.463 55.647C402.529 55.9886 402.585 56.2799 402.624 56.4858C402.643 56.5887 402.658 56.6702 402.669 56.7259C402.674 56.7537 402.678 56.7751 402.681 56.7894C402.682 56.7966 402.683 56.8021 402.684 56.8057C402.684 56.8075 402.684 56.8088 402.685 56.8097C402.685 56.8101 402.685 56.8105 402.685 56.8107C402.685 56.8108 402.685 56.8109 402.685 56.8109C402.685 56.8109 402.685 56.8109 402.685 56.811C402.685 56.811 402.685 56.811 403.668 56.6278ZM403.94 52.8476L402.028 44.6735L400.08 45.129L401.992 53.3031L403.94 52.8476ZM401.347 43.9449L397.24 42.6895L396.655 44.6021L400.762 45.8576L401.347 43.9449ZM395.979 43.8929L399.738 58.632L401.676 58.1377L397.917 43.3987L395.979 43.8929ZM400.043 57.6373L387.931 68.3985L389.259 69.8936L401.371 59.1324L400.043 57.6373Z", fill: "black" }), (0, i.jsx)("path", { d: "M117.662 72.0669C120.532 73.6534 124.034 73.9334 127.051 73.0113C132.32 71.4003 134.594 66.4929 133.261 62.1321C131.728 57.1173 126.919 56.2034 123.439 56.9096L127.95 46.7091L127.25 44.4197L111.915 49.1082L112.87 52.2334L121.555 49.5781C122.973 49.1448 123.702 48.8024 123.702 48.8024L123.725 48.8751C123.725 48.8751 123.125 49.7737 122.637 51.0356L119.051 59.324L120.476 60.9945L122.22 60.4612C125.418 59.4835 128.694 60.1906 129.661 63.3522C130.505 66.114 128.695 68.7732 125.861 69.6398C123.39 70.3953 120.628 69.8092 118.791 68.7415L117.662 72.0669ZM138.196 69.1268L142.194 67.9047L144.434 58.5969C144.801 56.9353 145.097 55.1757 145.097 55.1757L145.17 55.1535C145.17 55.1535 146.436 56.4353 147.669 57.6081L154.767 64.0606L158.801 62.8274L146.653 52.0773L150.485 37.3161L146.342 38.5826L144.394 46.7678C143.992 48.4406 143.765 50.2981 143.765 50.2981L143.692 50.3203C143.692 50.3203 142.309 48.9153 141.124 47.7677L134.968 42.0601L130.862 43.3156L142.22 53.4328L138.196 69.1268Z", fill: "white" }), (0, i.jsx)("path", { d: "M117.662 72.0669L116.715 71.7454L116.447 72.5374L117.178 72.9421L117.662 72.0669ZM123.439 56.9096L122.525 56.5052L121.742 58.2744L123.638 57.8897L123.439 56.9096ZM127.95 46.7091L128.864 47.1135L129.015 46.7729L128.906 46.4167L127.95 46.7091ZM127.25 44.4197L128.206 44.1273L127.914 43.171L126.958 43.4634L127.25 44.4197ZM111.915 49.1082L111.622 48.1519L110.666 48.4442L110.958 49.4006L111.915 49.1082ZM112.87 52.2334L111.914 52.5258L112.206 53.4821L113.163 53.1897L112.87 52.2334ZM123.702 48.8024L124.659 48.5101L124.322 47.4074L123.278 47.8971L123.702 48.8024ZM123.725 48.8751L124.556 49.4301L124.819 49.0359L124.681 48.5827L123.725 48.8751ZM122.637 51.0356L123.554 51.4326L123.562 51.4147L123.569 51.3965L122.637 51.0356ZM119.051 59.324L118.134 58.927L117.886 59.4988L118.29 59.9729L119.051 59.324ZM120.476 60.9945L119.715 61.6434L120.141 62.1426L120.768 61.9508L120.476 60.9945ZM118.791 68.7415L119.294 67.877L118.237 67.2627L117.844 68.42L118.791 68.7415ZM117.178 72.9421C120.297 74.6662 124.081 74.9649 127.343 73.9676L126.758 72.055C123.988 72.902 120.766 72.6406 118.146 71.1918L117.178 72.9421ZM127.343 73.9676C133.132 72.1977 135.715 66.7368 134.218 61.8398L132.305 62.4245C133.474 66.249 131.507 70.603 126.758 72.055L127.343 73.9676ZM134.218 61.8398C133.359 59.033 131.555 57.329 129.467 56.4533C127.415 55.5926 125.132 55.5458 123.24 55.9296L123.638 57.8897C125.226 57.5673 127.088 57.6243 128.693 58.2977C130.263 58.9561 131.63 60.2164 132.305 62.4245L134.218 61.8398ZM124.354 57.3141L128.864 47.1135L127.035 46.3047L122.525 56.5052L124.354 57.3141ZM128.906 46.4167L128.206 44.1273L126.294 44.7121L126.994 47.0015L128.906 46.4167ZM126.958 43.4634L111.622 48.1519L112.207 50.0645L127.542 45.376L126.958 43.4634ZM110.958 49.4006L111.914 52.5258L113.826 51.941L112.871 48.8158L110.958 49.4006ZM113.163 53.1897L121.848 50.5344L121.263 48.6218L112.578 51.2771L113.163 53.1897ZM121.848 50.5344C122.581 50.3102 123.141 50.1082 123.523 49.9599C123.713 49.8857 123.86 49.825 123.961 49.7817C124.011 49.76 124.05 49.7427 124.078 49.7302C124.092 49.724 124.103 49.7189 124.111 49.7152C124.115 49.7133 124.119 49.7117 124.121 49.7105C124.123 49.7099 124.124 49.7094 124.125 49.7089C124.125 49.7087 124.126 49.7085 124.126 49.7083C124.126 49.7082 124.126 49.7081 124.127 49.708C124.127 49.708 124.127 49.7079 124.127 49.7079C124.127 49.7078 124.127 49.7078 123.702 48.8024C123.278 47.8971 123.278 47.897 123.278 47.897C123.278 47.897 123.278 47.8969 123.278 47.8969C123.278 47.8968 123.278 47.8968 123.278 47.8967C123.279 47.8966 123.279 47.8965 123.279 47.8965C123.279 47.8964 123.279 47.8963 123.279 47.8964C123.279 47.8965 123.278 47.8969 123.277 47.8976C123.273 47.8991 123.267 47.9018 123.258 47.9058C123.241 47.9137 123.212 47.9265 123.172 47.9437C123.092 47.9781 122.967 48.0301 122.798 48.0957C122.461 48.2269 121.947 48.4126 121.263 48.6218L121.848 50.5344ZM122.746 49.0948L122.768 49.1675L124.681 48.5827L124.659 48.5101L122.746 49.0948ZM123.725 48.8751C122.893 48.3201 122.893 48.3202 122.893 48.3204C122.893 48.3204 122.892 48.3205 122.892 48.3206C122.892 48.3208 122.892 48.321 122.892 48.3212C122.892 48.3216 122.891 48.322 122.891 48.3226C122.89 48.3236 122.89 48.3248 122.889 48.3263C122.887 48.3293 122.884 48.3331 122.881 48.3378C122.875 48.3472 122.867 48.36 122.856 48.3762C122.835 48.4085 122.807 48.4541 122.771 48.512C122.7 48.6276 122.602 48.7929 122.488 48.9991C122.261 49.4102 121.968 49.9918 121.704 50.6747L123.569 51.3965C123.793 50.8175 124.044 50.3188 124.239 49.9651C124.337 49.789 124.419 49.6507 124.475 49.5585C124.504 49.5124 124.526 49.478 124.539 49.4562C124.546 49.4453 124.551 49.4376 124.554 49.4332C124.556 49.431 124.557 49.4297 124.557 49.4291C124.557 49.4289 124.557 49.4288 124.557 49.429C124.557 49.4291 124.557 49.4292 124.557 49.4294C124.557 49.4295 124.557 49.4296 124.557 49.4297C124.557 49.4298 124.557 49.4299 124.557 49.4299C124.556 49.43 124.556 49.4301 123.725 48.8751ZM121.719 50.6386L118.134 58.927L119.969 59.721L123.554 51.4326L121.719 50.6386ZM118.29 59.9729L119.715 61.6434L121.237 60.3456L119.812 58.6751L118.29 59.9729ZM120.768 61.9508L122.513 61.4175L121.928 59.5049L120.184 60.0382L120.768 61.9508ZM122.513 61.4175C123.972 60.9714 125.369 60.9365 126.459 61.3025C127.508 61.6548 128.32 62.3881 128.704 63.6445L130.617 63.0598C130.034 61.1547 128.725 59.9537 127.095 59.4065C125.506 58.8729 123.667 58.9733 121.928 59.5049L122.513 61.4175ZM128.704 63.6445C129.349 65.7543 128.008 67.9377 125.569 68.6835L126.153 70.5961C129.383 69.6088 131.661 66.4736 130.617 63.0598L128.704 63.6445ZM125.569 68.6835C123.41 69.3434 120.935 68.8313 119.294 67.877L118.289 69.606C120.32 70.7872 123.369 71.4473 126.153 70.5961L125.569 68.6835ZM117.844 68.42L116.715 71.7454L118.609 72.3884L119.738 69.063L117.844 68.42ZM138.196 69.1268L137.228 68.8785L136.785 70.6039L138.489 70.0831L138.196 69.1268ZM142.194 67.9047L142.486 68.861L143.032 68.694L143.166 68.1388L142.194 67.9047ZM144.434 58.5969L145.407 58.831L145.409 58.8216L145.411 58.8121L144.434 58.5969ZM145.097 55.1757L144.805 54.2194L144.214 54.4001L144.111 55.0095L145.097 55.1757ZM145.17 55.1535L145.881 54.4508L145.456 54.0203L144.877 54.1972L145.17 55.1535ZM147.669 57.6081L146.979 58.3326L146.988 58.3405L146.996 58.3481L147.669 57.6081ZM154.767 64.0606L154.095 64.8006L154.516 65.1833L155.06 65.0169L154.767 64.0606ZM158.801 62.8274L159.093 63.7837L160.801 63.2617L159.464 62.0785L158.801 62.8274ZM146.653 52.0773L145.685 51.8261L145.531 52.4198L145.991 52.8262L146.653 52.0773ZM150.485 37.3161L151.453 37.5673L151.902 35.8372L150.193 36.3598L150.485 37.3161ZM146.342 38.5826L146.05 37.6263L145.502 37.7938L145.369 38.3511L146.342 38.5826ZM144.394 46.7678L145.366 47.0018L145.367 46.9994L144.394 46.7678ZM143.765 50.2981L144.057 51.2544L144.679 51.0644L144.757 50.4193L143.765 50.2981ZM143.692 50.3203L142.98 51.0219L143.405 51.4539L143.985 51.2766L143.692 50.3203ZM141.124 47.7677L141.819 47.0493L141.811 47.0418L141.804 47.0345L141.124 47.7677ZM134.968 42.0601L135.648 41.3268L135.226 40.9356L134.676 41.1038L134.968 42.0601ZM130.862 43.3156L130.569 42.3592L128.868 42.8793L130.196 44.0623L130.862 43.3156ZM142.22 53.4328L143.188 53.6811L143.34 53.0912L142.885 52.6861L142.22 53.4328ZM138.489 70.0831L142.486 68.861L141.901 66.9484L137.904 68.1705L138.489 70.0831ZM143.166 68.1388L145.407 58.831L143.462 58.3629L141.222 67.6707L143.166 68.1388ZM145.411 58.8121C145.597 57.9661 145.765 57.0986 145.886 56.4452C145.947 56.1179 145.996 55.843 146.03 55.6495C146.047 55.5528 146.06 55.4763 146.069 55.4239C146.074 55.3976 146.077 55.3774 146.08 55.3635C146.081 55.3566 146.082 55.3513 146.082 55.3477C146.083 55.3459 146.083 55.3445 146.083 55.3435C146.083 55.343 146.083 55.3426 146.083 55.3424C146.083 55.3422 146.083 55.3421 146.083 55.342C146.083 55.342 146.083 55.342 146.083 55.3419C146.083 55.3419 146.083 55.3419 145.097 55.1757C144.111 55.0095 144.111 55.0095 144.111 55.0095C144.111 55.0095 144.111 55.0095 144.111 55.0095C144.111 55.0095 144.111 55.0096 144.111 55.0097C144.111 55.0098 144.111 55.0101 144.111 55.0104C144.111 55.0112 144.111 55.0123 144.11 55.0139C144.11 55.017 144.109 55.0218 144.108 55.0282C144.106 55.041 144.102 55.0601 144.098 55.0852C144.089 55.1355 144.077 55.2095 144.06 55.3037C144.027 55.4921 143.979 55.7609 143.92 56.0811C143.801 56.7229 143.638 57.5661 143.458 58.3817L145.411 58.8121ZM145.389 56.132L145.462 56.1098L144.877 54.1972L144.805 54.2194L145.389 56.132ZM145.17 55.1535C144.458 55.8562 144.458 55.8562 144.458 55.8562C144.458 55.8563 144.458 55.8563 144.458 55.8563C144.458 55.8564 144.459 55.8564 144.459 55.8565C144.459 55.8567 144.459 55.857 144.459 55.8573C144.46 55.858 144.461 55.859 144.462 55.8602C144.465 55.8628 144.469 55.8666 144.474 55.8716C144.483 55.8815 144.498 55.8961 144.517 55.915C144.554 55.9528 144.609 56.008 144.678 56.0778C144.817 56.2174 145.016 56.4157 145.253 56.6508C145.726 57.1204 146.356 57.7395 146.979 58.3326L148.358 56.8836C147.749 56.304 147.129 55.6957 146.661 55.2312C146.428 54.9992 146.232 54.8037 146.095 54.6664C146.027 54.5977 145.973 54.5436 145.937 54.5067C145.918 54.4883 145.904 54.4742 145.895 54.4648C145.89 54.46 145.887 54.4565 145.885 54.4541C145.883 54.453 145.883 54.4521 145.882 54.4515C145.882 54.4512 145.882 54.451 145.881 54.4509C145.881 54.4508 145.881 54.4508 145.881 54.4508C145.881 54.4508 145.881 54.4508 145.881 54.4508C145.881 54.4508 145.881 54.4508 145.17 55.1535ZM146.996 58.3481L154.095 64.8006L155.44 63.3206L148.341 56.8682L146.996 58.3481ZM155.06 65.0169L159.093 63.7837L158.509 61.8711L154.475 63.1043L155.06 65.0169ZM159.464 62.0785L147.316 51.3285L145.991 52.8262L158.138 63.5763L159.464 62.0785ZM147.621 52.3286L151.453 37.5673L149.517 37.0648L145.685 51.8261L147.621 52.3286ZM150.193 36.3598L146.05 37.6263L146.635 39.5389L150.777 38.2724L150.193 36.3598ZM145.369 38.3511L143.421 46.5363L145.367 46.9994L147.315 38.8142L145.369 38.3511ZM143.422 46.5339C143.212 47.406 143.05 48.317 142.941 49.0033C142.886 49.348 142.844 49.6395 142.816 49.8454C142.802 49.9485 142.791 50.0303 142.784 50.0868C142.78 50.1151 142.777 50.1371 142.775 50.1522C142.774 50.1598 142.774 50.1657 142.773 50.1698C142.773 50.1719 142.773 50.1735 142.772 50.1747C142.772 50.1753 142.772 50.1758 142.772 50.1761C142.772 50.1763 142.772 50.1765 142.772 50.1766C142.772 50.1766 142.772 50.1767 142.772 50.1768C142.772 50.1768 142.772 50.1769 143.765 50.2981C144.757 50.4193 144.757 50.4194 144.757 50.4194C144.757 50.4194 144.757 50.4194 144.757 50.4194C144.757 50.4194 144.757 50.4194 144.757 50.4194C144.757 50.4193 144.757 50.4191 144.758 50.4188C144.758 50.4182 144.758 50.4171 144.758 50.4156C144.758 50.4126 144.759 50.4078 144.76 50.4014C144.761 50.3886 144.764 50.369 144.767 50.3432C144.774 50.2917 144.784 50.2153 144.797 50.118C144.824 49.9234 144.864 49.6459 144.916 49.3172C145.021 48.6565 145.174 47.8025 145.366 47.0018L143.422 46.5339ZM143.472 49.3418L143.4 49.364L143.985 51.2766L144.057 51.2544L143.472 49.3418ZM143.692 50.3203C144.405 49.6187 144.405 49.6187 144.405 49.6187C144.405 49.6187 144.405 49.6187 144.405 49.6187C144.405 49.6186 144.405 49.6185 144.404 49.6184C144.404 49.6182 144.404 49.618 144.404 49.6176C144.403 49.6169 144.402 49.6158 144.401 49.6145C144.398 49.6117 144.394 49.6076 144.388 49.6022C144.378 49.5915 144.362 49.5757 144.342 49.5552C144.302 49.5142 144.243 49.4544 144.168 49.3792C144.019 49.2288 143.808 49.0163 143.56 48.7678C143.064 48.2714 142.418 47.6288 141.819 47.0493L140.428 48.4862C141.015 49.0543 141.652 49.6879 142.145 50.181C142.391 50.4272 142.6 50.6377 142.747 50.7865C142.821 50.8609 142.879 50.9199 142.919 50.9602C142.939 50.9804 142.954 50.9959 142.964 51.0063C142.969 51.0115 142.973 51.0154 142.976 51.018C142.977 51.0194 142.978 51.0203 142.979 51.021C142.979 51.0213 142.979 51.0215 142.979 51.0217C142.979 51.0218 142.979 51.0218 142.979 51.0218C142.98 51.0219 142.98 51.0219 142.98 51.0219C142.98 51.0219 142.98 51.0219 143.692 50.3203ZM141.804 47.0345L135.648 41.3268L134.288 42.7934L140.444 48.501L141.804 47.0345ZM134.676 41.1038L130.569 42.3592L131.154 44.2719L135.26 43.0164L134.676 41.1038ZM130.196 44.0623L141.555 54.1795L142.885 52.6861L131.527 42.5688L130.196 44.0623ZM141.251 53.1845L137.228 68.8785L139.165 69.3752L143.188 53.6811L141.251 53.1845Z", fill: "black" }), (0, i.jsx)("path", { d: "M467.426 93.6972L481.33 100.479L482.612 97.8507L471.855 92.6043C474.377 87.7439 485.212 91.6667 488.67 84.577C490.488 80.8488 488.854 76.9874 484.912 75.0647C481.733 73.5146 478.394 74.1558 476.069 75.8209L477.57 78.4064C479.247 77.295 481.478 76.9081 483.281 77.7874C485.573 78.9053 486.477 81.162 485.449 83.2706C482.975 88.3434 471.819 84.3022 468.078 91.9725C467.825 92.492 467.617 93.0719 467.426 93.6972ZM483.599 101.585L486.961 103.225L494.106 98.5014C495.36 97.6375 496.628 96.667 496.628 96.667L496.689 96.6968C496.689 96.6968 496.735 98.3082 496.826 99.8279L497.534 108.382L500.926 110.036L499.537 95.5891L511.051 88.2679L507.568 86.5687L501.298 90.7362C500.014 91.5852 498.732 92.6623 498.732 92.6623L498.671 92.6324C498.671 92.6324 498.623 90.869 498.548 89.3948L498.003 81.9036L494.55 80.2194L495.808 93.7707L483.599 101.585Z", fill: "white" }), (0, i.jsx)("path", { d: "M467.426 93.6972L466.47 93.4044L466.22 94.2214L466.988 94.596L467.426 93.6972ZM481.33 100.479L480.892 101.378L481.791 101.816L482.229 100.917L481.33 100.479ZM482.612 97.8507L483.511 98.2891L483.949 97.3903L483.05 96.9519L482.612 97.8507ZM471.855 92.6043L470.968 92.1438L470.496 93.0537L471.417 93.5031L471.855 92.6043ZM476.069 75.8209L475.487 75.0079L474.748 75.537L475.204 76.3229L476.069 75.8209ZM477.57 78.4064L476.705 78.9083L477.237 79.8262L478.122 79.2399L477.57 78.4064ZM466.988 94.596L480.892 101.378L481.769 99.58L467.864 92.7984L466.988 94.596ZM482.229 100.917L483.511 98.2891L481.713 97.4124L480.432 100.04L482.229 100.917ZM483.05 96.9519L472.294 91.7055L471.417 93.5031L482.174 98.7495L483.05 96.9519ZM472.743 93.0649C473.194 92.1957 474.04 91.6459 475.347 91.2545C476.681 90.8551 478.267 90.6817 480.059 90.4158C483.482 89.9076 487.588 89.0769 489.569 85.0153L487.771 84.1386C486.294 87.1667 483.254 87.9195 479.765 88.4375C478.1 88.6846 476.288 88.885 474.773 89.3386C473.232 89.8002 471.778 90.5827 470.968 92.1438L472.743 93.0649ZM489.569 85.0153C490.596 82.9091 490.664 80.7166 489.878 78.7698C489.098 76.8343 487.508 75.2182 485.35 74.1659L484.473 75.9635C486.258 76.8338 487.456 78.1098 488.024 79.5178C488.587 80.9144 488.562 82.5167 487.771 84.1386L489.569 85.0153ZM485.35 74.1659C481.8 72.4346 478.072 73.157 475.487 75.0079L476.651 76.634C478.717 75.1545 481.667 74.5946 484.473 75.9635L485.35 74.1659ZM475.204 76.3229L476.705 78.9083L478.435 77.9044L476.934 75.319L475.204 76.3229ZM478.122 79.2399C479.585 78.2706 481.437 78.0006 482.843 78.6862L483.719 76.8886C481.519 75.8155 478.908 76.3194 477.017 77.5728L478.122 79.2399ZM482.843 78.6862C483.797 79.1517 484.401 79.8221 484.68 80.5264C484.957 81.2221 484.946 82.0205 484.55 82.8322L486.347 83.709C486.98 82.4121 487.031 81.0279 486.539 79.7886C486.051 78.558 485.057 77.541 483.719 76.8886L482.843 78.6862ZM484.55 82.8322C484.104 83.7455 483.25 84.3207 481.918 84.7374C480.555 85.1638 478.928 85.3581 477.077 85.6606C473.52 86.2417 469.293 87.2002 467.179 91.5341L468.977 92.4109C470.604 89.0745 473.825 88.2185 477.4 87.6344C479.114 87.3543 480.974 87.1284 482.515 86.6461C484.088 86.154 485.556 85.3321 486.347 83.709L484.55 82.8322ZM467.179 91.5341C466.893 92.1203 466.668 92.7557 466.47 93.4044L468.382 93.99C468.566 93.388 468.756 92.8637 468.977 92.4109L467.179 91.5341ZM483.599 101.585L483.06 100.743L481.56 101.703L483.161 102.484L483.599 101.585ZM486.961 103.225L486.522 104.124L487.036 104.374L487.512 104.059L486.961 103.225ZM494.106 98.5014L494.658 99.3356L494.666 99.3303L494.674 99.3248L494.106 98.5014ZM496.628 96.667L497.066 95.7682L496.511 95.4973L496.02 95.8729L496.628 96.667ZM496.689 96.6968L497.688 96.6681L497.671 96.0632L497.127 95.798L496.689 96.6968ZM496.826 99.8279L495.828 99.8877L495.829 99.899L495.83 99.9103L496.826 99.8279ZM497.534 108.382L496.537 108.464L496.584 109.031L497.096 109.281L497.534 108.382ZM500.926 110.036L500.488 110.935L502.092 111.718L501.921 109.941L500.926 110.036ZM499.537 95.5891L499 94.7452L498.483 95.0743L498.541 95.6848L499.537 95.5891ZM511.051 88.2679L511.588 89.1117L513.096 88.1527L511.49 87.3691L511.051 88.2679ZM507.568 86.5687L508.006 85.67L507.491 85.4188L507.014 85.736L507.568 86.5687ZM501.298 90.7362L501.85 91.5704L501.852 91.569L501.298 90.7362ZM498.732 92.6623L498.294 93.561L498.878 93.8459L499.376 93.4279L498.732 92.6623ZM498.671 92.6324L497.672 92.6595L497.688 93.2655L498.233 93.5312L498.671 92.6324ZM498.548 89.3948L499.547 89.3437L499.546 89.3329L499.545 89.3222L498.548 89.3948ZM498.003 81.9036L499 81.831L498.958 81.2571L498.441 81.0048L498.003 81.9036ZM494.55 80.2194L494.988 79.3206L493.389 78.5409L493.554 80.3119L494.55 80.2194ZM495.808 93.7707L496.348 94.613L496.86 94.2846L496.804 93.6782L495.808 93.7707ZM483.161 102.484L486.522 104.124L487.399 102.326L484.037 100.687L483.161 102.484ZM487.512 104.059L494.658 99.3356L493.555 97.6671L486.409 102.391L487.512 104.059ZM494.674 99.3248C495.314 98.884 495.954 98.4181 496.432 98.064C496.672 97.8865 496.872 97.7363 497.012 97.6303C497.083 97.5773 497.138 97.5353 497.176 97.5063C497.195 97.4919 497.21 97.4807 497.22 97.4731C497.225 97.4693 497.229 97.4663 497.231 97.4643C497.233 97.4633 497.234 97.4625 497.234 97.462C497.235 97.4617 497.235 97.4615 497.235 97.4613C497.235 97.4612 497.235 97.4612 497.235 97.4611C497.235 97.4611 497.236 97.4611 497.236 97.4611C497.236 97.461 497.236 97.461 496.628 96.667C496.02 95.8729 496.02 95.8729 496.02 95.8729C496.02 95.8729 496.02 95.8729 496.02 95.8729C496.02 95.8729 496.02 95.873 496.02 95.873C496.02 95.8731 496.019 95.8732 496.019 95.8734C496.019 95.8738 496.018 95.8744 496.017 95.8753C496.015 95.877 496.011 95.8796 496.007 95.8831C495.997 95.8901 495.984 95.9006 495.965 95.9144C495.929 95.9419 495.876 95.9825 495.808 96.0339C495.671 96.1369 495.476 96.2833 495.242 96.4565C494.773 96.8036 494.153 97.2549 493.539 97.678L494.674 99.3248ZM496.189 97.5658L496.25 97.5956L497.127 95.798L497.066 95.7682L496.189 97.5658ZM496.689 96.6968C495.689 96.7255 495.689 96.7255 495.689 96.7256C495.689 96.7256 495.689 96.7256 495.689 96.7256C495.689 96.7257 495.689 96.7258 495.689 96.7259C495.689 96.7262 495.689 96.7265 495.689 96.7269C495.689 96.7278 495.689 96.729 495.689 96.7307C495.689 96.7339 495.69 96.7387 495.69 96.7449C495.69 96.7574 495.691 96.7758 495.691 96.7997C495.693 96.8474 495.695 96.917 495.698 97.0053C495.704 97.1817 495.713 97.4325 495.724 97.7311C495.747 98.3276 495.782 99.118 495.828 99.8877L497.824 99.7681C497.779 99.018 497.745 98.2429 497.723 97.6538C497.711 97.3596 497.703 97.1126 497.697 96.9394C497.694 96.8528 497.692 96.7846 497.691 96.7383C497.69 96.7151 497.689 96.6974 497.689 96.6856C497.689 96.6797 497.689 96.6752 497.689 96.6723C497.689 96.6708 497.688 96.6697 497.688 96.669C497.688 96.6687 497.688 96.6684 497.688 96.6682C497.688 96.6682 497.688 96.6681 497.688 96.6681C497.688 96.6681 497.688 96.6681 497.688 96.6681C497.688 96.6681 497.688 96.6681 496.689 96.6968ZM495.83 99.9103L496.537 108.464L498.531 108.299L497.823 99.7454L495.83 99.9103ZM497.096 109.281L500.488 110.935L501.364 109.137L497.972 107.483L497.096 109.281ZM501.921 109.941L500.532 95.4934L498.541 95.6848L499.931 110.132L501.921 109.941ZM500.073 96.433L511.588 89.1117L510.515 87.424L499 94.7452L500.073 96.433ZM511.49 87.3691L508.006 85.67L507.129 87.4675L510.613 89.1667L511.49 87.3691ZM507.014 85.736L500.745 89.9034L501.852 91.569L508.121 87.4015L507.014 85.736ZM500.747 89.902C500.074 90.3468 499.41 90.8459 498.918 91.2293C498.672 91.4219 498.466 91.5875 498.321 91.7054C498.249 91.7643 498.191 91.8115 498.152 91.8442C498.132 91.8605 498.117 91.8733 498.106 91.8821C498.101 91.8866 498.097 91.89 498.094 91.8924C498.093 91.8937 498.091 91.8946 498.091 91.8953C498.09 91.8957 498.09 91.8959 498.09 91.8962C498.089 91.8963 498.089 91.8964 498.089 91.8964C498.089 91.8965 498.089 91.8965 498.089 91.8966C498.089 91.8966 498.089 91.8966 498.732 92.6623C499.376 93.4279 499.376 93.4279 499.376 93.4279C499.375 93.4279 499.375 93.428 499.375 93.428C499.375 93.428 499.375 93.428 499.375 93.4279C499.376 93.4279 499.376 93.4278 499.376 93.4276C499.376 93.4273 499.377 93.4267 499.378 93.4258C499.38 93.4241 499.383 93.4214 499.388 93.4178C499.396 93.4104 499.41 93.3992 499.428 93.3845C499.463 93.3549 499.516 93.3113 499.584 93.256C499.72 93.1454 499.915 92.9886 500.149 92.8059C500.62 92.4385 501.238 91.9746 501.85 91.5704L500.747 89.902ZM499.171 91.7635L499.11 91.7336L498.233 93.5312L498.294 93.561L499.171 91.7635ZM498.671 92.6324C499.671 92.6053 499.671 92.6053 499.671 92.6053C499.671 92.6053 499.671 92.6053 499.671 92.6052C499.671 92.6052 499.671 92.6051 499.671 92.6049C499.671 92.6047 499.671 92.6044 499.671 92.6039C499.671 92.603 499.671 92.6017 499.671 92.5999C499.671 92.5964 499.67 92.5913 499.67 92.5845C499.67 92.571 499.669 92.5511 499.669 92.5253C499.667 92.4738 499.665 92.3986 499.662 92.3038C499.656 92.1144 499.648 91.8465 499.637 91.5323C499.616 90.9048 499.585 90.089 499.547 89.3437L497.549 89.4458C497.587 90.1748 497.617 90.9778 497.638 91.6006C497.649 91.9116 497.657 92.1767 497.663 92.3639C497.666 92.4575 497.668 92.5316 497.669 92.5822C497.67 92.6075 497.671 92.627 497.671 92.64C497.671 92.6466 497.671 92.6515 497.671 92.6548C497.671 92.6564 497.671 92.6576 497.671 92.6584C497.672 92.6588 497.672 92.6591 497.672 92.6593C497.672 92.6594 497.672 92.6595 497.672 92.6595C497.672 92.6595 497.672 92.6595 497.672 92.6595C497.672 92.6595 497.672 92.6595 498.671 92.6324ZM499.545 89.3222L499 81.831L497.005 81.9762L497.551 89.4674L499.545 89.3222ZM498.441 81.0048L494.988 79.3206L494.111 81.1182L497.564 82.8024L498.441 81.0048ZM493.554 80.3119L494.813 93.8632L496.804 93.6782L495.545 80.1269L493.554 80.3119ZM495.269 92.9285L483.06 100.743L484.138 102.428L496.348 94.613L495.269 92.9285Z", fill: "black" }), (0, i.jsx)("path", { d: "M34.9466 109.361L48.8509 102.579L47.5691 99.9508L36.8123 105.197C34.5349 100.218 44.2967 94.0947 40.8389 87.005C39.0205 83.2768 34.9712 82.1876 31.0291 84.1103C27.851 85.6604 26.3006 88.6863 26.1811 91.5439L29.1423 91.9532C29.2989 89.9476 30.3678 87.9509 32.1708 87.0716C34.4627 85.9537 36.7978 86.6306 37.8262 88.7392C40.3004 93.812 30.2479 100.115 33.9889 107.785C34.2423 108.304 34.5717 108.825 34.9466 109.361ZM51.1197 101.472L54.4812 99.8329L55.1584 91.2938C55.2494 89.7741 55.2652 88.1776 55.2652 88.1776L55.3263 88.1478C55.3263 88.1478 56.6246 89.1034 57.8782 89.9673L65.0546 94.6759L68.4466 93.0214L56.2067 85.2217L57.5267 71.6406L54.043 73.3397L53.4671 80.8458C53.3456 82.3804 53.4051 84.0536 53.4051 84.0536L53.344 84.0834C53.344 84.0834 51.9249 83.0354 50.7168 82.1872L44.478 78.0048L41.0248 79.689L52.4785 87.0401L51.1197 101.472Z", fill: "white" }), (0, i.jsx)("path", { d: "M34.9466 109.361L34.1271 109.934L34.6169 110.634L35.3849 110.259L34.9466 109.361ZM48.8509 102.579L49.2893 103.478L50.1881 103.039L49.7497 102.141L48.8509 102.579ZM47.5691 99.9508L48.4679 99.5125L48.0295 98.6137L47.1307 99.052L47.5691 99.9508ZM36.8123 105.197L35.9029 105.613L36.3293 106.545L37.2507 106.096L36.8123 105.197ZM26.1811 91.5439L25.182 91.5021L25.1441 92.41L26.0442 92.5345L26.1811 91.5439ZM29.1423 91.9532L29.0053 92.9438L30.0566 93.0891L30.1392 92.0311L29.1423 91.9532ZM35.3849 110.259L49.2893 103.478L48.4125 101.68L34.5082 108.462L35.3849 110.259ZM49.7497 102.141L48.4679 99.5125L46.6703 100.389L47.9521 103.017L49.7497 102.141ZM47.1307 99.052L36.374 104.298L37.2507 106.096L48.0075 100.85L47.1307 99.052ZM37.7217 104.781C37.3145 103.891 37.4021 102.886 37.8985 101.615C38.405 100.318 39.2449 98.9609 40.1382 97.3857C41.8453 94.3751 43.7186 90.6282 41.7377 86.5666L39.9401 87.4434C41.417 90.4715 40.1383 93.3309 38.3984 96.3991C37.5681 97.8634 36.6107 99.4142 36.0355 100.887C35.45 102.386 35.1715 104.014 35.9029 105.613L37.7217 104.781ZM41.7377 86.5666C40.7104 84.4604 39.0242 83.0574 37.0067 82.4775C35.001 81.9009 32.7484 82.1592 30.5908 83.2115L31.4675 85.0091C33.252 84.1388 34.9951 83.9802 36.4541 84.3997C37.9014 84.8157 39.149 85.8214 39.9401 87.4434L41.7377 86.5666ZM30.5908 83.2115C27.0412 84.9428 25.3147 88.3259 25.182 91.5021L27.1803 91.5856C27.2864 89.0467 28.6608 86.378 31.4675 85.0091L30.5908 83.2115ZM26.0442 92.5345L29.0053 92.9438L29.2792 90.9626L26.3181 90.5533L26.0442 92.5345ZM30.1392 92.0311C30.2759 90.2817 31.2034 88.656 32.6092 87.9704L31.7324 86.1728C29.5322 87.2459 28.322 89.6134 28.1453 91.8754L30.1392 92.0311ZM32.6092 87.9704C33.5635 87.5049 34.4636 87.4417 35.1908 87.655C35.909 87.8657 36.5315 88.3658 36.9274 89.1775L38.725 88.3008C38.0925 87.0039 37.0333 86.1113 35.7538 85.7359C34.4834 85.3631 33.07 85.5204 31.7324 86.1728L32.6092 87.9704ZM36.9274 89.1775C37.3728 90.0908 37.2999 91.1184 36.8084 92.4242C36.3053 93.7609 35.4568 95.1625 34.5555 96.8074C32.8236 99.968 30.9763 103.889 33.0901 108.223L34.8877 107.346C33.2604 104.01 34.5688 100.945 36.3094 97.7685C37.1443 96.2448 38.1113 94.6403 38.6802 93.1288C39.2608 91.5864 39.5166 89.9239 38.725 88.3008L36.9274 89.1775ZM33.0901 108.223C33.376 108.809 33.7383 109.378 34.1271 109.934L35.766 108.787C35.4051 108.271 35.1086 107.799 34.8877 107.346L33.0901 108.223ZM51.1197 101.472L50.1241 101.379L49.9571 103.152L51.558 102.371L51.1197 101.472ZM54.4812 99.8329L54.9195 100.732L55.4329 100.481L55.478 99.9119L54.4812 99.8329ZM55.1584 91.2938L56.1553 91.3728L56.156 91.3632L56.1566 91.3535L55.1584 91.2938ZM55.2652 88.1776L54.8268 87.2788L54.2713 87.5497L54.2652 88.1677L55.2652 88.1776ZM55.3263 88.1478L55.9191 87.3424L55.4318 86.9837L54.8879 87.249L55.3263 88.1478ZM57.8782 89.9673L57.3107 90.7907L57.3201 90.7971L57.3296 90.8033L57.8782 89.9673ZM65.0546 94.6759L64.506 95.512L64.9816 95.824L65.4929 95.5747L65.0546 94.6759ZM68.4466 93.0214L68.885 93.9202L70.4897 93.1376L68.984 92.1781L68.4466 93.0214ZM56.2067 85.2217L55.2114 85.125L55.152 85.7354L55.6693 86.065L56.2067 85.2217ZM57.5267 71.6406L58.522 71.7373L58.6949 69.9582L57.0883 70.7418L57.5267 71.6406ZM54.043 73.3397L53.6046 72.4409L53.0897 72.692L53.0459 73.2632L54.043 73.3397ZM53.4671 80.8458L54.464 80.9247L54.4642 80.9223L53.4671 80.8458ZM53.4051 84.0536L53.8435 84.9524L54.4276 84.6675L54.4045 84.0181L53.4051 84.0536ZM53.344 84.0834L52.7499 84.8878L53.2375 85.248L53.7823 84.9822L53.344 84.0834ZM50.7168 82.1872L51.2915 81.3688L51.2826 81.3626L51.2737 81.3566L50.7168 82.1872ZM44.478 78.0048L45.0348 77.1742L44.5568 76.8538L44.0396 77.106L44.478 78.0048ZM41.0248 79.689L40.5865 78.7903L38.9879 79.5699L40.4847 80.5306L41.0248 79.689ZM52.4785 87.0401L53.4741 87.1338L53.5312 86.5274L53.0186 86.1985L52.4785 87.0401ZM51.558 102.371L54.9195 100.732L54.0428 98.9341L50.6813 100.574L51.558 102.371ZM55.478 99.9119L56.1553 91.3728L54.1615 91.2147L53.4843 99.7538L55.478 99.9119ZM56.1566 91.3535C56.2031 90.5781 56.2301 89.7868 56.2456 89.1918C56.2533 88.8937 56.2582 88.6435 56.2611 88.4675C56.2626 88.3795 56.2636 88.31 56.2642 88.2622C56.2645 88.2383 56.2648 88.2199 56.2649 88.2073C56.265 88.201 56.265 88.1962 56.2651 88.1928C56.2651 88.1912 56.2651 88.1899 56.2651 88.189C56.2651 88.1885 56.2651 88.1882 56.2651 88.1879C56.2651 88.1878 56.2651 88.1877 56.2651 88.1876C56.2651 88.1876 56.2651 88.1875 56.2651 88.1875C56.2651 88.1875 56.2651 88.1874 55.2652 88.1776C54.2652 88.1677 54.2652 88.1677 54.2652 88.1677C54.2652 88.1677 54.2652 88.1677 54.2652 88.1677C54.2652 88.1677 54.2652 88.1678 54.2652 88.1678C54.2652 88.168 54.2652 88.1682 54.2652 88.1685C54.2652 88.1692 54.2652 88.1702 54.2652 88.1716C54.2651 88.1744 54.2651 88.1787 54.265 88.1845C54.2649 88.196 54.2647 88.2134 54.2644 88.2361C54.2638 88.2816 54.2629 88.3487 54.2614 88.4341C54.2586 88.6049 54.2538 88.8488 54.2463 89.1398C54.2311 89.723 54.2048 90.4897 54.1602 91.234L56.1566 91.3535ZM55.7035 89.0764L55.7647 89.0466L54.8879 87.249L54.8268 87.2788L55.7035 89.0764ZM55.3263 88.1478C54.7335 88.9531 54.7335 88.9532 54.7336 88.9532C54.7336 88.9532 54.7336 88.9532 54.7336 88.9532C54.7337 88.9533 54.7337 88.9533 54.7338 88.9534C54.734 88.9535 54.7343 88.9537 54.7346 88.954C54.7353 88.9545 54.7363 88.9552 54.7377 88.9562C54.7403 88.9581 54.7441 88.9609 54.7492 88.9647C54.7592 88.9721 54.7741 88.9829 54.7933 88.9971C54.8318 89.0253 54.8881 89.0664 54.9594 89.1185C55.102 89.2225 55.305 89.3701 55.5474 89.5448C56.0316 89.8938 56.6759 90.3532 57.3107 90.7907L58.4456 89.1438C57.8269 88.7174 57.1952 88.2671 56.7168 87.9223C56.478 87.7502 56.2781 87.6049 56.1381 87.5027C56.0681 87.4516 56.0131 87.4114 55.9757 87.384C55.957 87.3703 55.9427 87.3598 55.9332 87.3528C55.9284 87.3493 55.9248 87.3466 55.9224 87.3449C55.9213 87.344 55.9204 87.3434 55.9198 87.343C55.9195 87.3428 55.9193 87.3426 55.9192 87.3425C55.9191 87.3425 55.9191 87.3424 55.9191 87.3424C55.9191 87.3424 55.9191 87.3424 55.9191 87.3424C55.9191 87.3424 55.9191 87.3424 55.3263 88.1478ZM57.3296 90.8033L64.506 95.512L65.6032 93.8398L58.4267 89.1312L57.3296 90.8033ZM65.4929 95.5747L68.885 93.9202L68.0082 92.1227L64.6162 93.7771L65.4929 95.5747ZM68.984 92.1781L56.7441 84.3784L55.6693 86.065L67.9092 93.8648L68.984 92.1781ZM57.202 85.3184L58.522 71.7373L56.5314 71.5438L55.2114 85.125L57.202 85.3184ZM57.0883 70.7418L53.6046 72.4409L54.4813 74.2385L57.9651 72.5393L57.0883 70.7418ZM53.0459 73.2632L52.4701 80.7693L54.4642 80.9223L55.04 73.4162L53.0459 73.2632ZM52.4703 80.7668C52.4066 81.5707 52.3908 82.4015 52.3905 83.0247C52.3904 83.3378 52.3941 83.602 52.3979 83.7885C52.3998 83.8819 52.4017 83.956 52.4032 84.0072C52.4039 84.0329 52.4045 84.0528 52.405 84.0666C52.4052 84.0735 52.4054 84.0789 52.4055 84.0827C52.4056 84.0845 52.4056 84.086 52.4057 84.0871C52.4057 84.0877 52.4057 84.0881 52.4057 84.0885C52.4057 84.0886 52.4057 84.0888 52.4057 84.0889C52.4057 84.089 52.4057 84.089 52.4057 84.0891C52.4057 84.0891 52.4057 84.0892 53.4051 84.0536C54.4045 84.0181 54.4045 84.0181 54.4045 84.0182C54.4045 84.0182 54.4045 84.0182 54.4045 84.0182C54.4045 84.0182 54.4045 84.0182 54.4045 84.0182C54.4045 84.0181 54.4045 84.0179 54.4044 84.0177C54.4044 84.0171 54.4044 84.0162 54.4044 84.0149C54.4043 84.0122 54.4041 84.008 54.4039 84.0023C54.4036 83.9908 54.403 83.9733 54.4024 83.9502C54.401 83.904 54.3993 83.8353 54.3975 83.7478C54.3939 83.5727 54.3904 83.3227 54.3905 83.0257C54.3908 82.4285 54.4061 81.6554 54.464 80.9247L52.4703 80.7668ZM52.9667 83.1548L52.9056 83.1846L53.7823 84.9822L53.8435 84.9524L52.9667 83.1548ZM53.344 84.0834C53.9381 83.279 53.938 83.279 53.938 83.279C53.938 83.279 53.938 83.279 53.938 83.279C53.9379 83.2789 53.9378 83.2789 53.9377 83.2788C53.9375 83.2786 53.9373 83.2784 53.9369 83.2782C53.9362 83.2776 53.9351 83.2768 53.9337 83.2758C53.9309 83.2737 53.9267 83.2707 53.9213 83.2667C53.9104 83.2586 53.8944 83.2468 53.8736 83.2315C53.8321 83.2009 53.7715 83.1564 53.6951 83.1003C53.5423 82.9881 53.326 82.8298 53.0718 82.6448C52.5641 82.2754 51.9022 81.7976 51.2915 81.3688L50.1422 83.0056C50.7396 83.425 51.3912 83.8953 51.8951 84.262C52.1466 84.445 52.3606 84.6017 52.5117 84.7126C52.5872 84.768 52.6469 84.8119 52.6876 84.8419C52.708 84.857 52.7237 84.8685 52.7342 84.8762C52.7394 84.8801 52.7434 84.883 52.746 84.885C52.7474 84.886 52.7483 84.8867 52.749 84.8872C52.7493 84.8874 52.7495 84.8876 52.7497 84.8877C52.7498 84.8877 52.7498 84.8878 52.7499 84.8878C52.7499 84.8878 52.7499 84.8878 52.7499 84.8878C52.7499 84.8878 52.7499 84.8878 53.344 84.0834ZM51.2737 81.3566L45.0348 77.1742L43.9212 78.8355L50.16 83.0178L51.2737 81.3566ZM44.0396 77.106L40.5865 78.7903L41.4632 80.5878L44.9164 78.9036L44.0396 77.106ZM40.4847 80.5306L51.9384 87.8816L53.0186 86.1985L41.565 78.8475L40.4847 80.5306ZM51.4829 86.9463L50.1241 101.379L52.1153 101.566L53.4741 87.1338L51.4829 86.9463Z", fill: "black" })] })), (0, i.jsx)(o.MultiplyArrow, { paused: n, onPause: a })] })); }; }, 2545: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NoAdsButton = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)); t.NoAdsButton = function (e) { return (0, i.jsx)("button", r.__assign({ className: (0, o.default)("btn", "btn-blue", "no-ads-button", e.className), onClick: e.onClick, type: "button" }, { children: (0, i.jsx)("span", r.__assign({ className: (0, o.default)("icon") }, { children: (0, i.jsxs)("svg", r.__assign({ width: "110", height: "110", viewBox: "0 0 110 110", style: "enable-background:new 0 0 110 110;", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M55 101C64.9821 101 74.2217 97.8204 81.761 92.4189L74 84.1653L80.5566 78L88.536 86.4857C96.2654 78.2563 101 67.1811 101 55C101 29.5949 80.4051 9 55 9C43.3902 9 32.785 13.301 24.6907 20.3965L31.5172 27.6561L24.9606 33.8215L18.521 26.9733C12.5503 34.7331 9 44.452 9 55C9 80.4051 29.5949 101 55 101ZM55 110C85.3757 110 110 85.3757 110 55C110 24.6243 85.3757 0 55 0C24.6243 0 0 24.6243 0 55C0 85.3757 24.6243 110 55 110Z", fill: "white" }), (0, i.jsx)("path", { d: "M36.8838 36.833H42.708L54.3154 67H48.3477L45.9893 60.7861H33.6846L31.2236 67H25.2559L36.8838 36.833ZM39.8369 44.8311L35.8174 55.1875H43.8359L39.8369 44.8311ZM58.8066 36.833H65.6152C70.0039 36.833 73.2646 37.3799 75.3975 38.4736C77.5303 39.5537 79.2871 41.3174 80.668 43.7646C82.0488 46.2119 82.7393 49.0693 82.7393 52.3369C82.7393 54.6611 82.3496 56.8008 81.5703 58.7559C80.8047 60.6973 79.7383 62.3105 78.3711 63.5957C77.0176 64.8809 75.5479 65.7695 73.9619 66.2617C72.376 66.7539 69.6279 67 65.7178 67H58.8066V36.833ZM64.5283 42.3701V61.3809H67.1943C69.8193 61.3809 71.7197 61.0801 72.8955 60.4785C74.085 59.877 75.0557 58.8652 75.8076 57.4434C76.5596 56.0215 76.9355 54.2715 76.9355 52.1934C76.9355 48.9941 76.04 46.5127 74.249 44.749C72.6357 43.1631 70.0449 42.3701 66.4766 42.3701H64.5283Z", fill: "white" }), (0, i.jsx)("path", { d: "M36.8838 36.833V35.833H36.1975L35.9507 36.4733L36.8838 36.833ZM42.708 36.833L43.6413 36.4739L43.3947 35.833H42.708V36.833ZM54.3154 67V68H55.7717L55.2487 66.6409L54.3154 67ZM48.3477 67L47.4127 67.3548L47.6576 68H48.3477V67ZM45.9893 60.7861L46.9242 60.4313L46.6793 59.7861H45.9893V60.7861ZM33.6846 60.7861V59.7861H33.005L32.7548 60.4179L33.6846 60.7861ZM31.2236 67V68H31.9032L32.1534 67.3682L31.2236 67ZM25.2559 67L24.3228 66.6403L23.7987 68H25.2559V67ZM39.8369 44.8311L40.7698 44.4708L39.8393 42.0611L38.9047 44.4692L39.8369 44.8311ZM35.8174 55.1875L34.8851 54.8257L34.3566 56.1875H35.8174V55.1875ZM43.8359 55.1875V56.1875H45.294L44.7688 54.8273L43.8359 55.1875ZM36.8838 37.833H42.708V35.833H36.8838V37.833ZM41.7747 37.1921L53.3821 67.3591L55.2487 66.6409L43.6413 36.4739L41.7747 37.1921ZM54.3154 66H48.3477V68H54.3154V66ZM49.2826 66.6452L46.9242 60.4313L45.0543 61.141L47.4127 67.3548L49.2826 66.6452ZM45.9893 59.7861H33.6846V61.7861H45.9893V59.7861ZM32.7548 60.4179L30.2939 66.6318L32.1534 67.3682L34.6143 61.1543L32.7548 60.4179ZM31.2236 66H25.2559V68H31.2236V66ZM26.1889 67.3597L37.8169 37.1927L35.9507 36.4733L24.3228 66.6403L26.1889 67.3597ZM38.9047 44.4692L34.8851 54.8257L36.7496 55.5493L40.7692 45.1929L38.9047 44.4692ZM35.8174 56.1875H43.8359V54.1875H35.8174V56.1875ZM44.7688 54.8273L40.7698 44.4708L38.904 45.1913L42.9031 55.5477L44.7688 54.8273ZM58.8066 36.833V35.833H57.8066V36.833H58.8066ZM75.3975 38.4736L74.9411 39.3635L74.9457 39.3658L75.3975 38.4736ZM81.5703 58.7559L80.6414 58.3856L80.64 58.389L81.5703 58.7559ZM78.3711 63.5957L77.6862 62.8671L77.6825 62.8705L78.3711 63.5957ZM58.8066 67H57.8066V68H58.8066V67ZM64.5283 42.3701V41.3701H63.5283V42.3701H64.5283ZM64.5283 61.3809H63.5283V62.3809H64.5283V61.3809ZM72.8955 60.4785L72.4442 59.5861L72.44 59.5883L72.8955 60.4785ZM74.249 44.749L74.9507 44.0365L74.9501 44.0359L74.249 44.749ZM58.8066 37.833H65.6152V35.833H58.8066V37.833ZM65.6152 37.833C69.9564 37.833 73.0232 38.3799 74.9411 39.3635L75.8538 37.5838C73.5061 36.3799 70.0514 35.833 65.6152 35.833V37.833ZM74.9457 39.3658C76.8731 40.3418 78.4959 41.95 79.797 44.2561L81.5389 43.2732C80.0784 40.6847 78.1874 38.7656 75.8492 37.5815L74.9457 39.3658ZM79.797 44.2561C81.0804 46.5305 81.7393 49.2132 81.7393 52.3369H83.7393C83.7393 48.9254 83.0173 45.8933 81.5389 43.2732L79.797 44.2561ZM81.7393 52.3369C81.7393 54.5476 81.3691 56.56 80.6414 58.3856L82.4992 59.1261C83.3302 57.0415 83.7393 54.7747 83.7393 52.3369H81.7393ZM80.64 58.389C79.9224 60.2087 78.9344 61.6938 77.6862 62.8671L79.056 64.3243C80.5422 62.9273 81.687 61.1858 82.5006 59.1227L80.64 58.389ZM77.6825 62.8705C76.4264 64.0632 75.0875 64.8653 73.6655 65.3067L74.2583 67.2168C76.0082 66.6737 77.6087 65.6985 79.0597 64.3209L77.6825 62.8705ZM73.6655 65.3067C72.2384 65.7496 69.6265 66 65.7178 66V68C69.6294 68 72.5136 67.7583 74.2583 67.2168L73.6655 65.3067ZM65.7178 66H58.8066V68H65.7178V66ZM59.8066 67V36.833H57.8066V67H59.8066ZM63.5283 42.3701V61.3809H65.5283V42.3701H63.5283ZM64.5283 62.3809H67.1943V60.3809H64.5283V62.3809ZM67.1943 62.3809C69.8508 62.3809 71.9533 62.0839 73.351 61.3688L72.44 59.5883C71.4862 60.0763 69.7878 60.3809 67.1943 60.3809V62.3809ZM73.3468 61.3709C74.7565 60.658 75.8633 59.4771 76.6916 57.9109L74.9236 56.9759C74.248 58.2533 73.4135 59.0959 72.4442 59.5861L73.3468 61.3709ZM76.6916 57.9109C77.5387 56.309 77.9355 54.3883 77.9355 52.1934H75.9355C75.9355 54.1547 75.5804 55.734 74.9236 56.9759L76.6916 57.9109ZM77.9355 52.1934C77.9355 48.8032 76.9812 46.036 74.9507 44.0365L73.5474 45.4615C75.0989 46.9894 75.9355 49.1851 75.9355 52.1934H77.9355ZM74.9501 44.0359C73.0665 42.1842 70.161 41.3701 66.4766 41.3701V43.3701C69.9289 43.3701 72.205 44.1419 73.548 45.4621L74.9501 44.0359ZM66.4766 41.3701H64.5283V43.3701H66.4766V41.3701Z", fill: "white" })] })) })) })); }; }, 84296: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NoThanksButton = void 0); var r = n(22970), i = n(10348); n(39249); var o = n(51159), a = n(47166), s = r.__importDefault(n(72779)), u = n(15276); t.NoThanksButton = function (e) { var t = e.className, n = e.onClick, l = e.delay, c = void 0 === l ? 0 : l, d = r.__read((0, a.visibilityEffect)(c), 1)[0]; return (0, i.jsx)( a.Button, r.__assign( { className: (0, s.default)("no-thanks-button", t, { invisible: d }), onClick: function () { n && ((0, u.playUIClickSound)(), n()); }, }, { children: o.Localize.get("ui-win-continue", "CONTINUE") } ) ); }; }, 53650: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ExclamationMarkNotificator = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)); n(78819); t.ExclamationMarkNotificator = function (e) { var t = e.className, n = void 0 === t ? "" : t; return (0, i.jsx)("div", { className: (0, o.default)("exclamation-mark-notificator", n) }); }; }, 51146: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Participants = void 0); var r = n(22970), i = n(10348); n(49989); var o = n(47166), a = r.__importDefault(n(72779)); t.Participants = function (e) { var t = e.users; return (0, i.jsx)( "div", r.__assign( { className: (0, a.default)("participants-bar") }, { children: t.map(function (e) { return (0, i.jsx)("span", r.__assign({ className: (0, a.default)("avatar", "participant") }, { children: (0, i.jsx)("span", r.__assign({ className: "avatar-inner", style: { borderColor: e.color } }, { children: e.data.photo ? (0, i.jsx)("img", { src: e.data.photo, alt: e.data.name }) : (0, i.jsx)(o.Icon, { type: "placeholder-avatar", className: "avatar-bg" }) })) })); }), } ) ); }; }, 18525: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProgressBar = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(73218), s = n(47166), u = n(78620), l = r.__importDefault(n(72779)), c = n(34619), d = n(51146); n(13843); var h = n(24805); t.ProgressBar = function (e) { var t = e.participants, n = (0, s.useInjection)(u.TypesGame.skinManager), p = r.__read((0, c.useState)({ items: [], totalValue: 0 }), 2), f = p[0], _ = p[1]; (0, o.useEventListener)(a.GameEvents.STATS_UPDATED, _, t); var g = 0, m = (f.items || []).map(function (e) { var t = e.count / f.totalValue, i = g; g += t; var o = r.__read(n.getColorBy(e.owner), 2), a = o[0]; o[1]; return [i, t, a]; }); return (0, i.jsxs)("div", r.__assign({ class: (0, l.default)("progress-bar") }, { children: [t ? (0, i.jsx)(d.Participants, { users: t }) : null, (0, i.jsx)(h.ProgressIndicator, { itemsToDiplay: m })] })); }; }, 24805: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProgressIndicator = void 0); var r = n(22970), i = n(10348); n(53591); var o = n(30944); t.ProgressIndicator = function (e) { var t = e.itemsToDiplay; return (0, i.jsxs)( "svg", r.__assign( { className: "progress-indicator", width: "596", height: "38", viewBox: "0 0 596 38", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [ (0, i.jsx)("rect", { className: "progress-indicator__background", x: "2", y: "2", width: "592", height: "34", rx: "17", style: { fill: "#C4C4C4", stroke: "white", strokeWidth: "4px" } }), (0, i.jsx)("mask", r.__assign({ id: "mask0", "mask-type": "alpha", width: "592", height: "34" }, { children: (0, i.jsx)("rect", { width: "588", x: "4", y: "4", height: "30", rx: "13", fill: "#000" }) })), (0, i.jsx)( "g", r.__assign( { mask: "url(#mask0)" }, { children: t.map(function (e) { var t = r.__read(e, 3), n = t[0], a = t[1], s = t[2]; return (0, i.jsx)(o.ProgressSection, { className: "progress-indicator__section", x: n, progress: a, fill: s }); }), } ) ), ], } ) ); }; }, 30944: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProgressSection = void 0); var r = n(22970), i = n(10348); t.ProgressSection = function (e) { var t = e.x, n = e.progress, o = e.fill, a = e.className, s = 596, u = "transform 0.2s"; return (0, i.jsxs)("g", r.__assign({ className: a }, { children: [(0, i.jsx)("rect", { style: { width: s, height: 38, fill: o, transform: "translateX(".concat(s * t, "px) scaleX(").concat(n, ")"), transition: u } }), (0, i.jsx)("rect", { style: { width: 4, height: 38, fill: "white", transform: "translateX(".concat(s * t + s * n - 4, "px)"), transition: u } })] })); }; }, 82105: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SettingsButton = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(89225), s = r.__importDefault(n(72779)); n(20656); var u = n(15276); t.SettingsButton = function (e) { var t = e.className, n = e.onClick; return (0, i.jsx)( o.Button, r.__assign( { className: (0, s.default)("button", "settings-button", t), onClick: function () { n && ((0, u.playUIClickSound)(), n()); }, }, { children: (0, i.jsx)(a.SVG.Settings, {}) } ) ); }; }, 76471: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BuildingItem = void 0); var r = n(22970), i = n(10348); n(28847); var o = n(42883); t.BuildingItem = function (e) { var t = e.textureUrl, n = void 0 === t ? "" : t, a = e.playerColor, s = void 0 === a ? void 0 : a, u = e.className, l = void 0 === u ? "" : u; return (0, i.jsx)("div", r.__assign({ className: "shop-item-building" }, { children: (0, i.jsx)(o.TexturedShopItem, { textureUrl: n, className: l, playerColor: s }) })); }; }, 47833: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ColorItem = void 0); var r = n(10348); t.ColorItem = function (e) { var t = e.colorData; return (0, r.jsx)("div", { className: "shop-item-color", style: t ? "background:".concat(t[0]) : "" }); }; }, 14143: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FighterItem = void 0); var r = n(22970), i = n(10348); n(91217); var o = n(34619), a = n(42883); t.FighterItem = function (e) { var t = e.textureUrl, n = void 0 === t ? "" : t, s = e.playerColor, u = void 0 === s ? void 0 : s, l = e.className, c = void 0 === l ? "" : l, d = (0, o.useRef)(null); return (0, i.jsxs)("div", r.__assign({ className: "shop-item-fighter" }, { children: [(0, i.jsx)("div", r.__assign({ ref: d, className: "shop-item-fighter__cell" }, { children: (0, i.jsx)(a.TexturedShopItem, { className: c, textureUrl: n, playerColor: u }) })), (0, i.jsxs)("div", r.__assign({ className: "shop-item-fighter__cell" }, { children: [(0, i.jsx)("div", r.__assign({ className: "shop-item-fighter__cell" }, { children: (0, i.jsx)(a.TexturedShopItem, { className: c, textureUrl: n, playerColor: u }) })), (0, i.jsx)("div", r.__assign({ className: "shop-item-fighter__cell" }, { children: (0, i.jsx)(a.TexturedShopItem, { className: c, textureUrl: n, playerColor: u }) }))] }))] })); }; }, 44304: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShopItem = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(47166), s = n(28886), u = n(89225), l = r.__importDefault(n(72779)), c = n(76471), d = n(14143), h = n(47833), p = function () { return (0, i.jsxs)("div", r.__assign({ className: "shop-item__price" }, { children: [(0, i.jsx)("div", r.__assign({ className: "shop-item__price-text" }, { children: (0, i.jsx)("span", { children: o.Localize.get("ui-fillbox-get", "GET") }) })), (0, i.jsx)("div", r.__assign({ className: "shop-item__price-video-icon" }, { children: (0, i.jsx)(u.SVG.Video, {}) }))] })); }, f = function (e) { var t = e.price; return (0, i.jsxs)("div", r.__assign({ className: "shop-item__price" }, { children: [(0, i.jsx)("div", r.__assign({ className: "shop-item__price-text" }, { children: (0, i.jsx)("span", { children: t || 5e3 }) })), (0, i.jsx)("div", r.__assign({ className: "shop-item__price-video-icon for-coins" }, { children: (0, i.jsx)(u.SVG.COINS, {}) }))] })); }; t.ShopItem = function (e) { var t = e.colorClassName, n = void 0 === t ? "" : t, o = e.className, u = void 0 === o ? "" : o, _ = e.isSelected, g = void 0 !== _ && _, m = e.onClick, v = void 0 === m ? function () {} : m, y = e.stored, C = void 0 !== y && y, b = e.textureUrl, w = void 0 === b ? "" : b, S = e.selectedColorSet, T = void 0 === S ? void 0 : S, x = e.type, E = void 0 === x ? s.ShopType.COLOR : x, L = e.colorData, A = void 0 === L ? void 0 : L, I = e.forCoins, M = void 0 === I ? void 0 : I, P = r.__read((0, a.visibilityEffect)(200), 1)[0]; return (0, i.jsxs)("div", r.__assign({ onClick: v, className: (0, l.default)("shop-item", u, { invisible: P, "shop-item_selected": g }) }, { children: [(0, i.jsx)("div", { className: "shop-item__overlay" }), E === s.ShopType.COLOR ? (0, i.jsx)(h.ColorItem, { colorData: A }) : E === s.ShopType.BUILDING ? (0, i.jsx)(c.BuildingItem, { textureUrl: w, className: n, playerColor: T }) : (0, i.jsx)(d.FighterItem, { textureUrl: w, className: n, playerColor: T }), (0, i.jsx)("div", { className: (0, l.default)("shop-item-icon", { "shop-item-icon_selected": g }) }), C ? null : M ? (0, i.jsx)(f, { price: M }) : (0, i.jsx)(p, {})] })); }; }, 5907: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShopMenu = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(37394), s = n(47166), u = n(75747), l = n(15276), c = n(78620), d = n(44304), h = n(28886), p = r.__importDefault(n(72779)), f = n(34619), _ = n(23576), g = h.UIConstants.shop.defaultTabType, m = function (e) { 0; }; t.ShopMenu = function () { var e = (0, s.useInjection)(c.TypesGame.model), t = (0, s.useInjection)(c.TypesGame.skinManager), n = { shopItems: [], adViewed: !1, lastOpenedTab: g, selectedItemId: null }, v = r.__read( (0, f.useState)(function () { return n; }), 2 ), y = v[0], C = v[1], b = y.shopItems, w = y.adViewed, S = function (t, n) { return r.__awaiter(void 0, void 0, void 0, function () { var i; return r.__generator(this, function (o) { switch (o.label) { case 0: return ( C(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !1 }); }), e.rewardedAdsAllowed ? [4, (0, l.showReward)()] : [3, 2] ); case 1: return (i = o.sent()), [3, 3]; case 2: (i = T(n)), (o.label = 3); case 3: return ( i === a.AdResponse.PLAYED && (t(), C(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !0 }); })), [2] ); } }); }); }, T = function (t) { if (t && t.coinsPrice) { var n = t.coinsPrice; if (e.cookie.isEnoughCoins(n)) return e.cookie.spendCoins(n), a.AdResponse.PLAYED; } return a.AdResponse.NOT_SUPPORTED; }, x = function (e, t) { e.selected || ((0, l.playUIClickSound)(), t(), C(function (t) { return r.__assign(r.__assign({}, t), { selectedItemId: e.id }); })); }, E = function (t) { return function (n) { if (t.stored) x(t, function () { return (e.cookie.selected_fighter_id = t.id); }); else { if (m()) return void e.cookie.addUserFighter(t.id); S(function () { return e.cookie.addUserFighter(t.id); }, t); } }; }, L = function (t) { return function (n) { if (t.stored) x(t, function () { return (e.cookie.selected_building_id = t.id); }); else { if (m()) return void e.cookie.addUserBuilding(t.id); S(function () { return e.cookie.addUserBuilding(t.id); }, t); } }; }, A = function (t) { return function () { return ( t.stored && x(t, function () { return (e.cookie.selected_color_set_id = t.id); }) ); }; }, I = function () { return h.UIConstants.shop.tabTypes.map(function (n) { var i = n === g, a = (function (e) { switch (e) { case h.ShopType.BUILDING: return o.Localize.get("ui-store-building", "BUILDING"); case h.ShopType.FIGHTER: return o.Localize.get("ui-store-fighter", "FIGHTER"); default: return o.Localize.get("ui-store-color", "COLOR"); } })(n), s = (function (n) { var r, i, o = null === (r = e.cookie.selectedColorSet) || void 0 === r ? void 0 : r.data, a = (null === (i = u.SelectableColorCss.find(function (t) { var n; return t.id === (null === (n = e.cookie.selectedColorSet) || void 0 === n ? void 0 : n.id); })) || void 0 === i ? void 0 : i.className) || ""; switch (n) { case h.ShopType.BUILDING: return t.availableBuildings.map(function (e) { return { id: e.id, type: n, content: { selectedColorSet: o, textureUrl: e.ui_textureUrl, isSelected: e.selected, stored: e.stored, colorClassName: a, onClick: L(e), forCoins: e.coinsPrice } }; }); case h.ShopType.FIGHTER: return t.availableFighters.map(function (e) { return { id: e.id, type: n, content: { selectedColorSet: o, textureUrl: e.ui_textureUrl, isSelected: e.selected, stored: e.stored, colorClassName: a, onClick: E(e), forCoins: e.coinsPrice } }; }); case h.ShopType.COLOR: return e.cookie.availableColors.map(function (e) { return { id: e.id, type: n, content: { isSelected: e.selected, stored: e.stored, colorData: e.data, onClick: A(e) } }; }); } return []; })(n), c = s.filter(function (e) { var t; return !(null === (t = e.content) || void 0 === t ? void 0 : t.stored); }).length > 0; return { type: n, isActive: i, items: s, header: { className: i ? "shop-menu__tab-header_active" : "", showNotification: c, title: a, onClick: function () { (0, l.playUIClickSound)(), (g = n), C(function (e) { return r.__assign(r.__assign({}, e), { lastOpenedTab: n }); }); }, }, }; }); }; return ( (0, f.useEffect)( function () { var e = I(); C(function (t) { return r.__assign(r.__assign({}, t), { shopItems: e }); }); }, [w, y.lastOpenedTab, y.selectedItemId, y.shopItems] ), (0, i.jsxs)( "div", r.__assign( { className: (0, p.default)("shop-menu") }, { children: [ (0, i.jsx)( "div", r.__assign( { className: (0, p.default)("shop-menu__tabs-header") }, { children: b.map(function (e) { return (0, i.jsx)(_.ShopTabHeader, r.__assign({}, e.header)); }), } ) ), (0, i.jsx)( "div", r.__assign( { className: (0, p.default)("shop-menu__tabs-content") }, { children: (0, i.jsx)( "div", r.__assign( { className: (0, p.default)("shop-menu__tab-content") }, { children: b.map(function (e) { return e.isActive ? e.items.map(function (e) { return (0, i.jsx)(d.ShopItem, r.__assign({ id: e.id, type: e.type }, e.content)); }) : null; }), } ) ), } ) ), ], } ) ) ); }; }, 18108: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShopPreview = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(73218), s = n(75747), u = n(78620), l = r.__importDefault(n(72779)), c = n(34619); n(96328); t.ShopPreview = function () { var e = (0, o.useInjection)(u.TypesGame.model), t = (0, c.useRef)(null), n = (0, c.useRef)(null), d = (0, c.useRef)(null), h = (0, c.useRef)(null), p = (0, c.useRef)(null), f = (0, c.useRef)(null), _ = (0, c.useRef)(null), g = { fighter: e.cookie.selectedFighter, building: e.cookie.selectedBuilding, colorSet: e.cookie.selectedColorSet, iterationCounter: 0 }, m = r.__read( (0, c.useState)(function () { return g; }), 2 ), v = m[0], y = m[1], C = v.fighter, b = v.building, w = v.colorSet, S = (v.iterationCounter, function (t, n, r) { var i; if ((void 0 === r && (r = ""), t && n)) { var o = n.getElementsByTagName("object")[0]; if (o) o.setAttribute("data", "assets/".concat(t.ui_textureUrl)), (o.onload = function () { var e = o.contentDocument; if (e) { var t = e.getElementsByTagName("svg")[0]; t && (t.setAttribute("fill", "".concat(r)), t.setAttribute("style", "fill:".concat(r))); } }); else { var a = n.getElementsByTagName("img")[0]; a && ((a.src = "assets/".concat(t.ui_textureUrl)), (a.className = (null === (i = s.SelectableColorCss.find(function (t) { var n; return t.id === (null === (n = e.cookie.selectedColorSet) || void 0 === n ? void 0 : n.id); })) || void 0 === i ? void 0 : i.className) || "")); } } }); return ( (0, o.useEventListener)(a.GameEvents.SELECTABLE_ITEM_CHANGED, function () { y(function (t) { return r.__assign(r.__assign({}, t), { fighter: e.cookie.selectedFighter, colorSet: e.cookie.selectedColorSet, building: e.cookie.selectedBuilding }); }); }), (0, c.useLayoutEffect)( function () { var e = [t, n, d], r = [h, p], i = [f, _]; e.map(function (e) { return S(C, e.current, null == w ? void 0 : w.data[1]); }), r.map(function (e) { return S(b, e.current, null == w ? void 0 : w.data[1]); }), i.map(function (e) { if (e.current) { var t = e.current.getElementsByTagName("svg")[0]; if (t) { var n = null == w ? void 0 : w.data[0]; t.setAttribute("fill", "".concat(n)), t.setAttribute("style", "fill:".concat(n)); } } }); var o = e.map(function (e) { var r, i, o = function (r) { var i, o, a, s, u, l, c, h, p, g, m; null === (s = e.current) || void 0 === s || s.classList.toggle("to-right"); var v = (null === (u = e.current) || void 0 === u ? void 0 : u.classList.contains("to-right")) ? _ : f; e === t ? (null === (l = v.current) || void 0 === l || (i = l.classList).remove.apply(i, ["intensity-1", "intensity-2", "intensity-3"]), null === (c = v.current) || void 0 === c || c.classList.add("intensity-3")) : e === n ? (null === (h = v.current) || void 0 === h || (o = h.classList).remove.apply(o, ["intensity-1", "intensity-2", "intensity-3"]), null === (p = v.current) || void 0 === p || p.classList.add("intensity-2")) : e === d && (null === (g = v.current) || void 0 === g || (a = g.classList).remove.apply(a, ["intensity-1", "intensity-2", "intensity-3"]), null === (m = v.current) || void 0 === m || m.classList.add("intensity-1")); }, a = function () { var r, i, o, a, s, u, l, c, h; e === t ? (null === (a = f.current) || void 0 === a || (r = a.classList).remove.apply(r, ["intensity-1", "intensity-2", "intensity-3"]), null === (s = f.current) || void 0 === s || s.classList.add("intensity-1")) : e === n ? (null === (u = f.current) || void 0 === u || (i = u.classList).remove.apply(i, ["intensity-1", "intensity-2", "intensity-3"]), null === (l = f.current) || void 0 === l || l.classList.add("intensity-2")) : e === d && (null === (c = f.current) || void 0 === c || (o = c.classList).remove.apply(o, ["intensity-1", "intensity-2", "intensity-3"]), null === (h = f.current) || void 0 === h || h.classList.add("intensity-3")); }; return ( null === (r = e.current) || void 0 === r || r.addEventListener("animationiteration", o), null === (i = e.current) || void 0 === i || i.addEventListener("animationstart", a), function () { var t, n; null === (t = e.current) || void 0 === t || t.removeEventListener("animationiteration", o), null === (n = e.current) || void 0 === n || n.removeEventListener("animationstart", a); } ); }); return function () { o.map(function (e) { return e(); }); }; }, [C, b, w] ), (0, i.jsxs)("div", r.__assign({ className: (0, l.default)("shop-preview") }, { children: [(0, i.jsx)("div", r.__assign({ ref: f, className: (0, l.default)("shop-preview-left", "intensity-1") }, { children: (0, i.jsx)("svg", r.__assign({ width: "214", height: "320", viewBox: "0 0 214 320", xmlns: "http://www.w3.org/2000/svg", className: "first-state" }, { children: (0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M50.3529 10.0787L27.6941 68.0315L30.2118 85.6693L25.1765 93.2283V98.2677L22.6588 105.827L27.6941 108.346L25.1765 110.866V120.945H30.2118L25.1765 131.024V138.583L17.6235 148.661L15.1059 156.22L20.1412 161.26L17.6235 166.299L12.5882 163.78V166.299V176.378L5.03529 168.819L0 176.378L40.2824 294.803V302.362L50.3529 307.402V314.961L60.4235 320L62.9412 307.402L60.4235 297.323L67.9765 292.283L70.4941 289.764L67.9765 279.685L75.5294 277.165L70.4941 267.087L80.5647 254.488H85.6V262.047L88.1176 257.008L93.1529 262.047L95.6706 257.008L83.0824 241.89L95.6706 251.969V239.37L103.224 251.969L108.259 234.331L115.812 239.37L120.847 234.331L123.365 224.252L120.847 206.614L123.365 201.575L128.4 194.016L130.918 199.055L135.953 206.614H143.506L146.024 196.535L153.576 199.055L158.612 204.094L163.647 188.976L158.612 183.937L168.682 188.976L176.235 183.937L183.788 168.819H188.824L198.894 163.78L211.482 153.701L214 143.622L206.447 146.142V136.063L196.376 128.504L191.341 131.024L181.271 125.984L178.753 120.945L176.235 113.386L178.753 105.827L173.718 103.307H161.129L156.094 100.787L153.576 85.6693L128.4 12.5984L115.812 7.55906L108.259 0L98.1882 2.51969L93.1529 10.0787L83.0824 15.1181L73.0118 20.1575L65.4588 17.6378L62.9412 7.55906L50.3529 10.0787Z" }) })) })), (0, i.jsxs)("div", r.__assign({ className: (0, l.default)("animation-shoot-area", "animation-shoot-area_static") }, { children: [(0, i.jsx)("div", r.__assign({ ref: h, className: "building-one" }, { children: (0, i.jsx)("img", {}) })), (0, i.jsx)("div", r.__assign({ ref: t, className: "fighter-one" }, { children: (0, i.jsx)("img", {}) })), (0, i.jsx)("div", r.__assign({ ref: n, className: "fighter-two" }, { children: (0, i.jsx)("img", {}) })), (0, i.jsx)("div", r.__assign({ ref: d, className: "fighter-three" }, { children: (0, i.jsx)("img", {}) })), (0, i.jsx)("div", r.__assign({ ref: p, className: "building-two" }, { children: (0, i.jsx)("img", {}) }))] })), (0, i.jsx)("div", r.__assign({ ref: _, className: (0, l.default)("shop-preview-right", "intensity-3") }, { children: (0, i.jsx)("svg", r.__assign({ width: "144", height: "334", viewBox: "0 0 144 334", xmlns: "http://www.w3.org/2000/svg", className: "second-state" }, { children: (0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M34.7586 0L124.138 29.9104L129.103 34.8955L124.138 54.8358V69.791L114.207 74.7761L109.241 84.7463L104.276 99.7015L109.241 109.672L129.103 114.657H139.034L144 139.582L139.034 164.507V179.463V194.418L134.069 199.403L139.034 209.373L134.069 229.313L129.103 234.299H119.172L129.103 249.254H119.172V259.224L124.138 264.209H114.207L109.241 274.179L99.3103 279.164L109.241 284.149L99.3103 304.09V309.075L94.3448 314.06V324.03L84.4138 334V324.03V299.104H74.4828H64.5517L54.6207 304.09L49.6552 294.119H34.7586L29.7931 284.149H19.8621L4.96552 274.179V259.224L0 254.239L4.96552 239.284V229.313H9.93103L19.8621 214.358L29.7931 204.388V194.418L64.5517 164.507V154.537L34.7586 134.597H24.8276L19.8621 114.657L4.96552 119.642L0 99.7015L4.96552 84.7463L9.93103 74.7761L0 64.806V54.8358L9.93103 44.8657L19.8621 24.9254V14.9552L34.7586 0Z" }) })) }))] })) ); }; }, 23576: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShopTabHeader = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(53650); t.ShopTabHeader = function (e) { var t = e.className, n = void 0 === t ? "" : t, s = e.title, u = void 0 === s ? "Test" : s, l = e.showNotification, c = void 0 !== l && l, d = e.onClick, h = void 0 === d ? function () {} : d; return (0, i.jsxs)("div", r.__assign({ onClick: h, className: (0, o.default)("shop-menu__tab-header", n) }, { children: [(0, i.jsx)("span", { children: u }), c ? (0, i.jsx)("p", { children: (0, i.jsx)(a.ExclamationMarkNotificator, { className: (0, o.default)("exclamation-mark-notificator_top-right", "exclamation-mark-notificator_animated") }) }) : null] })); }; }, 42883: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TexturedShopItem = void 0); var r = n(22970), i = n(10348), o = n(34619), a = r.__importDefault(n(72779)); t.TexturedShopItem = function (e) { var t = e.textureUrl, n = void 0 === t ? "" : t, r = e.playerColor, s = void 0 === r ? void 0 : r, u = e.useImage, l = void 0 === u || u, c = e.className, d = void 0 === c ? "" : c, h = (0, o.useRef)(null); return (0, i.jsx)(i.Fragment, { children: l ? (0, i.jsx)("img", { className: (0, a.default)("shop-item-media-object", d), src: "assets/".concat(n) }) : (0, i.jsx)("object", { ref: h, onLoad: function () { if (h.current) { var e = h.current.contentDocument; if (e) { var t = e.getElementsByTagName("svg")[0]; if (t) { var n = "#000000"; s && (n = s[0]), t.setAttribute("style", "fill:".concat(n)); } } } }, type: "image/svg+xml", className: (0, a.default)("shop-item-media-object"), data: "assets/".concat(n), }), }); }; }, 10574: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShopButton = void 0); var r = n(22970), i = n(10348), o = n(53650), a = r.__importDefault(n(72779)); t.ShopButton = function (e) { return (0, i.jsxs)("button", r.__assign({ onClick: e.onClick, className: (0, a.default)("btn", "btn-blue", "shop-button", e.className), type: "button" }, { children: [(0, i.jsx)("span", r.__assign({ className: (0, a.default)("icon") }, { children: (0, i.jsx)("svg", r.__assign({ width: "108", height: "108", viewBox: "0 0 108 108", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, i.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.3653 6.35365L12.7525 13.7559L25.1751 76.4441C25.4905 78.0359 26.9937 79.0506 28.5326 78.833C28.6369 78.844 28.7428 78.8496 28.85 78.8496H93.85C95.5068 78.8496 96.85 77.5065 96.85 75.8496V74.8496C96.85 73.1928 95.5068 71.8496 93.85 71.8496H31.3162L30.332 66.8496H94.0206C96.8402 66.8496 99.2794 64.8863 99.882 62.1318L107.226 28.5592C108.317 23.57 104.518 18.8496 99.4108 18.8496H20.8835L19.2976 10.7932C19.1263 9.92276 18.5945 9.21493 17.8878 8.79425C17.7702 8.68773 17.6424 8.58899 17.5047 8.49941L5.18056 0.485338C3.7914 -0.418 1.93295 -0.024006 1.02984 1.3653L0.485078 2.20332C-0.417938 3.59247 -0.0238486 5.45064 1.3653 6.35365ZM41.85 98.8496C46.2682 98.8496 49.85 95.2679 49.85 90.8496C49.85 86.4314 46.2682 82.8496 41.85 82.8496C37.4317 82.8496 33.85 86.4314 33.85 90.8496C33.85 95.2679 37.4317 98.8496 41.85 98.8496ZM81.85 98.8496C86.2682 98.8496 89.85 95.2679 89.85 90.8496C89.85 86.4314 86.2682 82.8496 81.85 82.8496C77.4317 82.8496 73.85 86.4314 73.85 90.8496C73.85 95.2679 77.4317 98.8496 81.85 98.8496Z", fill: "white" }) })) })), e.showNotification ? (0, i.jsx)(o.ExclamationMarkNotificator, { className: (0, a.default)("exclamation-mark-notificator_animated", "exclamation-mark-notificator_top-left") }) : null] })); }; }, 72578: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TapToPlayButton = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(46595), s = n(47166), u = n(28886), l = r.__importDefault(n(72779)), c = n(34619); n(72383); t.TapToPlayButton = function (e) { var t = { text: o.Localize.get("ui-menu-tap_to_play", "TAP TO PLAY"), animationStarted: !1, clicked: !1 }, n = u.UIConstants.tapToPlayButton, d = n.showGoDelay, h = n.hideDelay, p = r.__read( (0, c.useState)(function () { return t; }), 2 ), f = p[0], _ = p[1]; return (0, i.jsx)( s.Button, r.__assign( { disabled: f.clicked, className: (0, l.default)("button", "start-button", { "start-button_clicked": f.clicked, "start-button_animated": f.animationStarted }) }, e, { onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return ( (t = o.Localize.get("tap_to_play_go", "GO!")), _(function (e) { return r.__assign(r.__assign({}, e), { text: t, clicked: !0 }); }), e.onDown && e.onDown(), [4, a.WaitAction.ms(d)] ); case 1: return ( n.sent(), _(function (e) { return r.__assign(r.__assign({}, e), { animationStarted: !0 }); }), [4, a.WaitAction.ms(h - d)] ); case 2: return n.sent(), e.onClick && e.onClick(), [2]; } }); }); }, }, { children: f.text } ) ); }; }, 76871: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserIdLabel = void 0); n(22970), n(10348); var r = n(47166); n(2974); var i = n(37394); t.UserIdLabel = function () { (0, r.useInjection)(i.TypesSocial.model); return null; }; }, 50869: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserStatusInfo = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(47166), s = n(37394); n(62478); n(51159); var u = n(70789); t.UserStatusInfo = function (e) { e.className, e.authorized, e.onLogin, (0, a.useInjection)(s.TypesSocial.model); return (0, i.jsx)("div", r.__assign({ className: (0, o.default)("user-status-info"), style: "visibility: visible; display: block;" }, { children: u.SIOConstants.HARD_VERSION })); }; }, 34395: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.WinRays = void 0); var r = n(22970), i = n(10348), o = n(89225), a = r.__importDefault(n(72779)); t.WinRays = function () { return (0, i.jsx)("div", r.__assign({ className: (0, a.default)("popup__win-rays") }, { children: (0, i.jsx)(o.SVG.WinRays, {}) })); }; }, 35196: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.WinStars = void 0); var r = n(22970), i = n(10348), o = n(89225), a = r.__importDefault(n(72779)); t.WinStars = function () { return (0, i.jsx)("div", r.__assign({ className: (0, a.default)("popup__win-stars") }, { children: (0, i.jsx)(o.SVG.WinStars, {}) })); }; }, 38950: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Winner = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(89225), s = r.__importDefault(n(72779)); n(7035); t.Winner = function (e) { var t = e.user, n = e.className; return (0, i.jsxs)("div", r.__assign({ className: (0, s.default)("winner-container", n) }, { children: [(0, i.jsx)(o.Avatar, { imgPath: t.photo, score: t.scoreSession }), (0, i.jsx)(a.SVG.VictoryFraming, {})] })); }; }, 28886: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UIConstants = t.ShopType = void 0); var r, i = n(70789); !(function (e) { (e.BUILDING = "ShopType.BUILDING"), (e.FIGHTER = "ShopType.FIGHTER"), (e.COLOR = "ShopType.COLOR"); })((r = t.ShopType || (t.ShopType = {}))), (t.UIConstants = { tapToPlayButton: { showGoDelay: 200, hideDelay: 800 }, coinsIndicator: { updateDelay: 350 }, popup: { startDelay: 100, noThanksButtonDelay: 0, updateCoinsTime: 800, updateCoinsInterval: 25 }, boosters: [ { id: "BoosterType.START_UNITS", className: "booster-start-units", icon: "", disabled: !0, defaultCount: 10, title: { i18n: "ui-upgrade-start_units", default: "START UNITS" }, description: { i18n: "ui-upgrade-units", default: "units" }, allowed: !0 }, { id: "BoosterType.START_PRODUCE", className: "booster-produce-speed", disabled: !1, icon: "", defaultCount: "10", title: { i18n: "ui-upgrade-produce_speed", default: "PRODUCE SPEED" }, description: { i18n: "ui-upgrate-rate", default: "units per second" }, allowed: !0 }, { id: "BoosterType.OFFLINE_EARNINGS", className: "booster-offline-earnings", icon: "", defaultCount: 10, disabled: !1, title: { i18n: "ui-offline-title", default: "OFFLINE EARNINGS" }, description: { i18n: "ui-upgrade-offline", default: "coins per hour" }, allowed: i.SIOConstants.OFFLINE_EARNINGS_ALLOWED }, ], shop: { tabTypes: [r.BUILDING, r.FIGHTER, r.COLOR], defaultTabType: r.BUILDING }, }); }, 55328: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DebugLevelPicker = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(37394), s = n(74353), u = n(16638), l = n(78620), c = n(34619), d = n(4382), h = function (e) { return new Promise(function (t, n) { var r = new FileReader(); r.readAsText(e, "UTF-8"), (r.onload = function (e) { var r; try { var i = null === (r = e.target) || void 0 === r ? void 0 : r.result, o = new window.DOMParser().parseFromString(i, "text/xml"); t((0, s.parseLevelSVG)(o)); } catch (e) { n(e); } }); }); }, p = function () { o.di.get(l.TypesGame.model).disposeCurrentLevel(); }; t.DebugLevelPicker = function () { var e = r.__read((0, c.useState)({}), 2)[1], t = (0, c.useCallback)(function () { return e({}); }, []), n = o.di.get(l.TypesGame.model); return (0, i.jsxs)("div", { children: [ (0, i.jsx)( "select", r.__assign( { name: "levels", id: "levels-picker", onChange: function (e) { var t = e.currentTarget, r = t.item(t.selectedIndex), i = null == r ? void 0 : r.value; i && (i.startsWith(n.currentContinent.data.id) || (p(), o.di.get(a.TypesFlow.LevelStart).run(i))); }, }, { children: u.GameModel.LEVELS_PREDEFINED.concat(Object.keys(n.levels)).map(function (e) { return (0, i.jsx)("option", r.__assign({ value: e, selected: e.startsWith(n.currentContinent.data.id) }, { children: "".concat(n.levels[e] ? "+" : "").concat(e) })); }), } ) ), (0, i.jsx)(d.FileDropArea, { handleDrop: function (e) { if (e && e.length > 0) for (var n = [], i = 0; i < e.length; i++) { var s = e[i]; s.name.endsWith(".svg") && n.push( h(s).then(function (e) { var t = o.di.get(l.TypesGame.model), n = o.di.get(l.TypesGame.levelModel).init(e); return (t.levels[e.id] = n), Promise.resolve(n); }) ), Promise.all(n).then(function (e) { if (1 == e.length) { var n = r.__read(e, 1)[0]; p(), o.di.get(a.TypesFlow.LevelStart).run(n.data.id); } t(); }); } }, }), ], }); }; }, 68071: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DebugPanel = void 0); var r = n(22970), i = n(10348), o = n(55328), a = n(38090); t.DebugPanel = function () { return (0, i.jsxs)("span", r.__assign({ id: "debug-panel", style: { zIndex: 10, pointerEvents: "all", position: "absolute", left: "50%", bottom: "90px" } }, { children: [(0, i.jsx)(a.DebugPanelNotifications, {}), (0, i.jsx)(o.DebugLevelPicker, {})] })); }; }, 89692: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DebugPanelGamePlay = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(78620), s = n(47166), u = n(34619), l = n(37394); t.DebugPanelGamePlay = function () { var e = (0, s.useInjection)(a.TypesGame.model), t = (0, s.useInjection)(a.TypesGame.botPresetsModel), n = { name: t.currentPresetName }, c = r.__read( (0, u.useState)(function () { return n; }), 2 ), d = c[0], h = c[1]; return ( (0, u.useEffect)( function () { h(function (e) { return r.__assign(r.__assign({}, e), { name: t.currentPresetName }); }); }, [t.currentPresetName] ), (0, i.jsxs)( "div", r.__assign( { style: "pointer-events: auto; position: absolute; right: 10px; bottom: 80px; display: flex; flex-direction: column;" }, { children: [ (0, i.jsx)("span", { children: o.di.get(a.TypesGame.model).currentContinent.data.id }), (0, i.jsx)("span", { children: d.name }), (0, i.jsx)( "button", r.__assign( { onClick: function () { return e.endStage(!1); }, }, { children: "Loose" } ) ), (0, i.jsx)("br", {}), (0, i.jsx)( "button", r.__assign( { onClick: function () { return e.endStage(!0); }, }, { children: "Win Stage" } ) ), (0, i.jsx)( "button", r.__assign( { onClick: function () { return e.endStage(!0, !0); }, }, { children: "Win Level" } ) ), (0, i.jsx)( "button", r.__assign( { onClick: function () { e.cookie.clear(), o.di.get(l.TypesFlow.LevelStart).run(); }, }, { children: "Clear progress" } ) ), ], } ) ) ); }; }, 38090: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DebugPanelNotifications = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(46595), s = n(37394); t.DebugPanelNotifications = function () { return (0, i.jsxs)("div", { children: [ (0, i.jsx)("span", { children: "Notifications" }), (0, i.jsx)( o.Button, r.__assign( { onClick: function () { var e; return null === (e = (0, a.lazyGet)(s.TypesNotification.start)) || void 0 === e ? void 0 : e.run(); }, }, { children: "Send notification" } ) ), ], }); }; }, 40094: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DebugPopup = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(37394), s = n(47166), u = n(70600), l = n(78620), c = r.__importDefault(n(72779)), d = n(34619), h = n(68071); n(92046); var p = n(81599); t.DebugPopup = function () { var e = r.__read((0, d.useState)({}), 2)[1], t = (0, s.useInjection)(l.TypesGame.model); return (0, i.jsx)( "div", r.__assign( { className: "popups", style: { width: "100%", height: "100%", background: "rgba(black, 0.5)" } }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, c.default)("debug-popup") }, { children: [ (0, i.jsx)( "ul", r.__assign( { style: { color: "white" } }, { children: Object.keys(u.CookieModelKey).map(function (e) { return (0, i.jsxs)("li", { children: [e, " ", (0, i.jsx)("b", { children: t.cookie.get(e) })] }); }), } ) ), (0, i.jsx)( s.Button, r.__assign( { onClick: function () { return o.di.get(a.TypesCore.dispatcher).emit(s.UIEvents.POPUP, { id: null }); }, }, { children: "Close" } ) ), (0, i.jsx)( s.Button, r.__assign( { onClick: function () { o.di.get(p.DestroyFieldAction).run(), t.cookie.clear(), t.currentContinent.buildings.clear(), t.engine.removeAllEntities(), o.di.get(a.TypesFlow.LevelStart).run(), e({}); }, }, { children: "Clear cookies" } ) ), (0, i.jsx)(h.DebugPanel, {}), ], } ) ), } ) ); }; }, 4382: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FileDropArea = void 0); var r = n(22970), i = n(10348), o = n(33847), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return ( (t.dropRef = (0, o.createRef)()), (t.dragCounter = 0), (t.handleDrag = function (e) { e.preventDefault(), e.stopPropagation(); }), (t.handleDragIn = function (e) { var n; e.preventDefault(), e.stopPropagation(), t.dragCounter++, (null === (n = e.dataTransfer) || void 0 === n ? void 0 : n.items) && e.dataTransfer.items.length > 0 && t.setState({ drag: !0 }); }), (t.handleDragOut = function (e) { e.preventDefault(), e.stopPropagation(), t.dragCounter--, 0 === t.dragCounter && t.setState({ drag: !1 }); }), (t.handleDrop = function (e) { var n; e.preventDefault(), e.stopPropagation(), t.setState({ drag: !1 }), (null === (n = e.dataTransfer) || void 0 === n ? void 0 : n.files) && e.dataTransfer.files.length > 0 && (t.props.handleDrop(e.dataTransfer.files), e.dataTransfer.clearData(), (t.dragCounter = 0)); }), t ); } return ( r.__extends(t, e), (t.prototype.componentDidMount = function () { var e = this.dropRef.current; e.addEventListener("dragenter", this.handleDragIn), e.addEventListener("dragleave", this.handleDragOut), e.addEventListener("dragover", this.handleDrag), e.addEventListener("drop", this.handleDrop); }), (t.prototype.componentWillUnmount = function () { var e = this.dropRef.current; e.removeEventListener("dragenter", this.handleDragIn), e.removeEventListener("dragleave", this.handleDragOut), e.removeEventListener("dragover", this.handleDrag), e.removeEventListener("drop", this.handleDrop); }), (t.prototype.render = function () { return (0, i.jsx)("div", r.__assign({ style: r.__assign({ border: " 2px dotted gray", color: "white", padding: "10px", borderRadius: "5px" }, this.props.style), ref: this.dropRef }, { children: "Drop *.svg file here" })); }), t ); })(o.Component); t.FileDropArea = a; }, 61440: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CreateTournamentFormDebug = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(34619), s = n(78620); t.CreateTournamentFormDebug = function () { var e = r.__read((0, a.useState)({ title: "", initialScore: 0 }), 2), t = e[0], n = e[1]; return (0, i.jsxs)("form", { children: [ (0, i.jsxs)("div", { children: [ (0, i.jsx)("label", r.__assign({ for: "iscore" }, { children: "Initial score:" })), (0, i.jsx)("input", { type: "text", id: "iscore", name: "iscore", value: t.initialScore, onChange: function (e) { return n(r.__assign(r.__assign({}, t), { initialScore: parseInt(e.currentTarget.value || 0) })); }, }), ], }), (0, i.jsxs)("div", { children: [ (0, i.jsx)("label", r.__assign({ for: "ttitle" }, { children: "Title:" })), (0, i.jsx)("input", { type: "text", id: "ttitle", name: "ttitle", onChange: function (e) { return n(r.__assign(r.__assign({}, t), { title: e.currentTarget.value || 0 })); }, }), ], }), (0, i.jsx)( "a", r.__assign( { href: "#", onClick: function () { return o.di.get(s.TypesGame.actions.tournamentCreate).run(); }, }, { children: "Create tournament" } ) ), ], }); }; }, 32921: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShareTournamentFormDebug = void 0); var r = n(22970), i = n(10348), o = n(17905), a = n(34619); t.ShareTournamentFormDebug = function () { var e = r.__read((0, a.useState)({ data: void 0, score: 0 }), 2), t = e[0], n = e[1]; return (0, i.jsxs)("form", { children: [ (0, i.jsxs)("div", { children: [ (0, i.jsx)("label", r.__assign({ for: "iscore" }, { children: "Score:" })), (0, i.jsx)("input", { type: "text", id: "iscore", name: "iscore", value: t.score, onChange: function (e) { return n(r.__assign(r.__assign({}, t), { score: parseInt(e.currentTarget.value || 0) })); }, }), ], }), (0, i.jsxs)("div", { children: [ (0, i.jsx)("label", r.__assign({ for: "ttitle" }, { children: "Data (JSON):" })), (0, i.jsx)("input", { type: "text", id: "ttitle", name: "ttitle", onChange: function (e) { return n(r.__assign(r.__assign({}, t), { data: e.currentTarget.value || 0 })); }, }), ], }), (0, i.jsx)( "a", r.__assign( { href: "#", onClick: function () { return FBInstant.tournament .shareAsync(t) .then(function (e) {}) .catch(o.log.error); }, }, { children: "Update" } ) ), ], }); }; }, 79870: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TournamentsDebugPanel = void 0); var r = n(22970), i = n(10348); n(24565); var o = n(34619), a = n(47166), s = n(61440), u = n(37394), l = n(46595), c = n(32921); t.TournamentsDebugPanel = function () { var e = r.__read((0, o.useState)({ tournaments: [] }), 2), t = e[0], n = e[1]; return ( (0, o.useEffect)(function () { FBInstant.tournament.getTournamentsAsync().then(function (e) { n({ tournaments: e }); }); }, []), (0, i.jsx)( "div", r.__assign( { className: "popups", style: { width: "100%", height: "100%", paddingTop: "20px", background: "rgba(black, 0.5)" } }, { children: (0, i.jsxs)( "div", r.__assign( { class: "debug-tournaments-popup" }, { children: [ "Tournaments", (0, i.jsx)("ul", { children: t.tournaments.map(function (e) { return (0, i.jsxs)("li", { children: [ "".concat(e.getID(), " ").concat(e.getTitle()), (0, i.jsx)( "a", r.__assign( { href: "#", onClick: function () { FBInstant.tournament.joinAsync("" + e.getID()).then(function () {}); }, }, { children: "Join" } ) ), ], }); }), }), (0, i.jsx)("br", {}), (0, i.jsx)("hr", {}), (0, i.jsx)(s.CreateTournamentFormDebug, {}), (0, i.jsx)("hr", {}), (0, i.jsx)(c.ShareTournamentFormDebug, {}), (0, i.jsx)("br", {}), (0, i.jsx)( a.Button, r.__assign( { onClick: function () { return l.di.get(u.TypesCore.dispatcher).emit(a.UIEvents.POPUP, { id: null }); }, }, { children: "Close" } ) ), ], } ) ), } ) ) ); }; }, 89225: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.win_rays = t.confirm_icon = t.cancel_icon = t.no_ads_icon = t.SVG = t.Images = void 0); var r = n(22970), i = n(10348), o = r.__importStar(n(46015)), a = r.__importStar(n(88937)), s = r.__importStar(n(24071)); t.win_rays = s; var u = r.__importStar(n(752)), l = r.__importStar(n(12022)), c = r.__importStar(n(74983)), d = r.__importStar(n(87018)), h = r.__importStar(n(26398)), p = r.__importStar(n(42152)), f = r.__importStar(n(12766)), _ = r.__importStar(n(74817)); t.cancel_icon = _; var g = r.__importStar(n(93364)); t.confirm_icon = g; var m = r.__importStar(n(84784)), v = r.__importStar(n(99498)); t.no_ads_icon = v; var y = r.__importStar(n(98656)), C = r.__importStar(n(82595)), b = r.__importStar(n(92483)), w = r.__importStar(n(81797)), S = r.__importStar(n(95880)), T = r.__importStar(n(2823)), x = r.__importStar(n(57937)), E = r.__importStar(n(49654)), L = r.__importStar(n(46136)), A = r.__importStar(n(85681)), I = n(47166), M = function (e, t) { return (0, i.jsx)(I.Graphics, { svg: e, className: t.className, inline: !1 }); }; (t.Images = { Gift: function () { return (0, i.jsx)("img", { src: "./assets/gift-icon.svg" }); }, Star: function () { return (0, i.jsx)("img", { src: "./assets/star-icon.svg" }); }, }), (t.SVG = { Shop: function (e) { return M(T, e); }, NO_ADS: function (e) { return M(v, e); }, COINS: function (e) { return M(m, e); }, BoosterOfflineEarningsIcon: function (e) { return M(c, e); }, BoosterProduceSpeedIcon: function (e) { return M(d, e); }, BoosterProduceSpeed: function (e) { return M(h, e); }, BoosterStartUnitsIcon: function (e) { return M(p, e); }, BoosterStartUnits: function (e) { return M(f, e); }, BackButton: function (e) { return M(l, e); }, PopupWinCup: function (e) { return M(a, e); }, PopupLose: function (e) { return M(o, e); }, WinRays: function (e) { return M(s, e); }, WinStars: function (e) { return M(u, e); }, Video: function (e) { return M(x, e); }, OfflineEarnings: function (e) { return M(y, e); }, Settings: function (e) { return M(C, e); }, Sounds: function (e) { return M(b, e); }, Vibrate: function (e) { return M(S, e); }, Music: function (e) { return M(w, e); }, Cancel: function (e) { return M(_, e); }, Confirm: function (e) { return M(g, e); }, LeaderBoardPlayIcon: function (e) { return M(E, e); }, LeaderBoardCupIcon: function (e) { return M(L, e); }, VictoryFraming: function (e) { return M(A, e); }, }); }, 76072: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderBoard = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(57228), s = n(37394), u = n(46595), l = n(10039), c = n(49620); n(85912); t.LeaderBoard = function (e) { var t, n, d = (null === (t = (0, u.lazyGet)(s.TypesSocial.refRewardsModel)) || void 0 === t ? void 0 : t.getPendingItems()) || [], h = (null === (n = (0, u.lazyGet)(s.TypesSocial.refRewardsModel)) || void 0 === n ? void 0 : n.getAvailableItems()) || [], p = function (e, t) { return e .filter(function (e) { return e.rf === t; }) .map(function (e) { return e.value; })[0]; }, f = function (e, t) { switch (t) { case a.ScoreType.GLOBAL: return e.scoreGlobal; case a.ScoreType.CONTEXT: return e.scoreContext; } return e.scores.getScore(); }, _ = ( e.users.map(function (t) { return { name: t.name, image_url: t.photo, score: f(t, e.scoreType), reward: p(h, t.id), origin: t }; }) || [] ).map(function (e) { return { user: e }; }), g = d.map(function (e) { return { reward: e.value, pending: !!e.rf }; }) || [], m = (e.onClose, (function (e, t) { return ( void 0 === e && (e = []), void 0 === t && (t = []), e.sort(function (e, t) { return (t.user.score || 0) - (e.user.score || 0); }), (e = e.map(function (e, t) { return r.__assign(r.__assign({}, e), { rank: t + 1 }); })), r.__spreadArray(r.__spreadArray([], r.__read(e), !1), r.__read(t), !1) ); })(_, g)); return (0, i.jsx)(i.Fragment, { children: (0, i.jsx)( "div", r.__assign( { className: (0, o.default)("leaderboard") }, { children: (0, i.jsx)( "ul", r.__assign( { className: (0, o.default)("leaderboard__scroll") }, { children: m.map(function (e) { return (function (e) { return e && e.user ? (0, i.jsx)(l.LeaderBoardItem, r.__assign({}, e)) : (0, i.jsx)(c.LeaderBoardInviteItem, r.__assign({}, e)); })(e); }), } ) ), } ) ), }); }; }, 49620: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderBoardInviteItem = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(51159), s = n(37394), u = n(47166), l = r.__importDefault(n(72779)), c = n(34619), d = n(89225); n(85912); t.LeaderBoardInviteItem = function (e) { var t = e.className, n = e.pending, h = e.reward, p = { isPending: n }, f = r.__read( (0, c.useState)(function () { return p; }), 2 ), _ = f[0], g = f[1]; return (0, i.jsx)( "li", r.__assign( { className: (0, l.default)("leaderboard__item", "leaderboard__item-invite", { "leaderboard__item-invite_disabled": _.isPending }, t) }, { children: (0, i.jsx)( u.Button, r.__assign( { disabled: _.isPending, onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, o.di.get(s.TypesSocial.refRewardsModel).request(h)]; case 1: return t.sent() ? (g(function (e) { return r.__assign(r.__assign({}, e), { isPending: !0 }); }), ((e = o.di.get(s.TypesFlow.LevelStart)).waitForContextChange = !0), [4, e.run()]) : [3, 3]; case 2: t.sent(), (t.label = 3); case 3: return [2]; } }); }); }, className: (0, l.default)("btn-green"), }, { children: (0, i.jsxs)("div", r.__assign({ className: (0, l.default)("button-invite") }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, l.default)("button-invite__icon") }, { children: (0, i.jsx)(u.Icon, { type: "friends" }) })), (0, i.jsxs)("div", r.__assign({ className: (0, l.default)("button-invite__text") }, { children: [_.isPending ? a.Localize.get("game_pending", "Pending...") : a.Localize.get("game_invite", "Invite Friend"), _.isPending ? (0, i.jsx)("span", r.__assign({ className: (0, l.default)("button-invite__description") }, { children: a.Localize.get("game_pending_description", "The reward is given when your friend launch the game.") })) : null] })), (0, i.jsxs)("div", r.__assign({ className: (0, l.default)("button-invite__reward") }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, l.default)("button-invite__reward-icon") }, { children: (0, i.jsx)(d.SVG.COINS, {}) })), (0, i.jsxs)("div", r.__assign({ className: (0, l.default)("button-invite__reward-count") }, { children: ["+", h.count] }))] }))] })) } ) ), } ) ); }; }, 10039: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderBoardItem = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(46595), s = n(34619), u = n(37394), l = n(78620), c = n(47166), d = n(85013), h = n(89225), p = r.__importDefault(n(72779)), f = n(15276), _ = n(31063); t.LeaderBoardItem = function (e) { var t, n, g = e.user, m = e.rank, v = e.isSolo, y = void 0 === v || v, C = (0, c.useInjection)(u.TypesSocial.model), b = (0, c.useInjection)(l.TypesGame.model), w = g.origin === C.me, S = g.origin !== C.opponent, T = r.__read((0, s.useState)(!1), 2), x = T[0], E = T[1]; return (0, i.jsx)(i.Fragment, { children: (0, i.jsxs)( "li", r.__assign( { className: (0, p.default)("leaderboard__item", { leaderboard__item_me: w, leaderboard__item_disabled: !S }) }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, p.default)("leaderboard__item-rank", (0, _.getFontClassByDigits)((0, f.isRankableUser)(g.origin) ? (null === (t = g.origin.getLbRecord()) || void 0 === t ? void 0 : t.rank) : m, 2, 3)) }, { children: (0, f.isRankableUser)(g.origin) ? (null === (n = g.origin.getLbRecord()) || void 0 === n ? void 0 : n.rank) : m || "-" })), (0, i.jsx)(c.Avatar, { imgPath: g.image_url, imgAlt: "" }), (0, i.jsxs)("div", r.__assign({ className: (0, p.default)("leaderboard__item-info", { "leaderboard__item-info_social": !y }) }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, p.default)("leaderboard__item-name", { "leaderboard__item-name_social": !y }) }, { children: g.name })), (0, i.jsxs)("div", r.__assign({ className: (0, p.default)("leaderboard__item-points", { "leaderboard__item-points_social": !y }) }, { children: [y ? (0, i.jsx)("div", r.__assign({ className: (0, p.default)("leaderboard__item-score-key") }, { children: o.Localize.get("ui-menu-lvl", "LVL") })) : (0, i.jsx)("div", r.__assign({ className: "cup-icon" }, { children: (0, i.jsx)(h.SVG.LeaderBoardCupIcon, {}) })), (0, i.jsx)("div", r.__assign({ className: (0, p.default)("leaderboard__item-score") }, { children: g.score || "-" }))] }))] })), y ? g.reward && !x ? (0, i.jsx)(d.ClaimButton, { reward: g.reward.count, multiplierText: "", onClick: function () { var e, t; (0, f.playUIClickSound)(), g.reward && ((e = g.reward), (t = g.origin.id), r.__awaiter(void 0, void 0, Promise, function () { return r.__generator(this, function (n) { return a.di.get(u.TypesSocial.refRewardsModel).claim(t), (b.cookie.coins += e.count), E(!0), [2]; }); })); }, }) : (0, i.jsx)(i.Fragment, { children: (0, i.jsx)( "div", r.__assign( { className: (0, p.default)("leaderboard__item-button") }, { children: "ya" === C.socialPlatform ? null : (0, i.jsx)( c.Button, r.__assign( { className: (0, p.default)("leaderboard__play-button"), onClick: function () { (0, f.playUIClickSound)(), (function () { var e; null === (e = (0, a.lazyGet)(u.TypesFlow.PlayWith)) || void 0 === e || e.run(g.origin); })(); }, }, { children: (0, i.jsx)(h.SVG.LeaderBoardPlayIcon, {}) } ) ), } ) ), }) : null, ], } ) ), }); }; }, 30772: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ConfirmPopup = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(82641), s = n(19059), u = n(28886), l = r.__importDefault(n(72779)), c = n(47166); n(19638); t.ConfirmPopup = function (e) { var t = e.onConfirm, n = r.__read((0, c.visibilityEffect)(u.UIConstants.popup.startDelay), 1)[0]; return (0, i.jsx)( "div", r.__assign( { className: "popups" }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, l.default)("popup-confirm") }, { children: [ (0, i.jsxs)( "div", r.__assign( { className: (0, l.default)("popup", { invisible: n }) }, { children: [ (0, i.jsx)("div", r.__assign({ className: "popup__title" }, { children: o.Localize.get("ui-exit-exit_label", "EXIT") })), (0, i.jsx)("div", r.__assign({ className: "popup__body" }, { children: (0, i.jsx)("div", { children: o.Localize.get("ui-exit-description", "Leave the game?") }) })), (0, i.jsxs)( "div", r.__assign( { className: "popup__body-buttons" }, { children: [ (0, i.jsx)( "div", r.__assign( { className: (0, l.default)("popup__body-button", "left") }, { children: (0, i.jsx)("div", { children: (0, i.jsx)(s.ConfirmButton, { onClick: function () { return t(!0); }, }), }), } ) ), (0, i.jsx)( "div", r.__assign( { className: (0, l.default)("popup__body-button", "right") }, { children: (0, i.jsx)("div", { children: (0, i.jsx)(a.CancelButton, { onClick: function () { return t(!1); }, }), }), } ) ), ], } ) ), ], } ) ), (0, i.jsx)(c.CrossPromo, { delay: u.UIConstants.popup.startDelay + 100 }), ], } ) ), } ) ); }; }, 96137: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GiftItem = void 0); var r = n(22970), i = n(10348); n(35268); var o = n(75747), a = n(47166), s = n(78620), u = r.__importDefault(n(72779)), l = n(76471), c = n(14143), d = n(89225), h = function (e) { var t, n, r, u = e.type, d = e.id, h = (0, a.useInjection)(s.TypesGame.model).cookie.selectedColorSet, p = null == h ? void 0 : h.data, f = (null === (t = o.SelectableColorCss.find(function (e) { return e.id === (null == h ? void 0 : h.id); })) || void 0 === t ? void 0 : t.className) || ""; switch (u) { case o.SkinType.BUILDING: return (0, i.jsx)(l.BuildingItem, { textureUrl: null === (n = o.SelectableBuildingDataSet.find(function (e) { return e.id === d; })) || void 0 === n ? void 0 : n.ui_textureUrl, className: f, playerColor: p, }); case o.SkinType.FIGHTER: return (0, i.jsx)(c.FighterItem, { textureUrl: null === (r = o.SelectableFighterDataSet.find(function (e) { return e.id === d; })) || void 0 === r ? void 0 : r.ui_textureUrl, className: f, playerColor: p, }); } }; t.GiftItem = function (e) { var t = e.reward; return (0, i.jsx)("span", r.__assign({ className: (0, u.default)("shop-item", "gift-item") }, { children: t ? (0, i.jsx)(h, { id: t.id, type: t.type }) : (0, i.jsx)(d.Images.Gift, {}) })); }; }, 88188: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GiftPopup = void 0); var r = n(22970), i = n(10348); n(45159); var o = n(51159), a = n(46595), s = n(37394), u = n(37394), l = n(47166), c = n(15276), d = n(78620), h = n(85013), p = n(26425), f = n(84296), _ = n(28886), g = r.__importDefault(n(72779)), m = n(34619), v = n(89225), y = n(83951), C = n(57224), b = n(75747), w = n(96137); t.GiftPopup = function (e) { var t = { adViewed: !1, canCollect: !1 }, n = e.captured, S = e.total, T = (0, l.useInjection)(d.TypesGame.model), x = (0, l.useInjection)(s.TypesCore.dispatcher), E = n >= S, L = r.__read((0, l.visibilityEffect)(_.UIConstants.popup.startDelay), 1)[0], A = r.__read( (0, m.useState)(function () { return t; }), 2 ), I = A[0], M = A[1], P = function () { M(function (e) { return r.__assign({}, e); }), x.emit(l.UIEvents.POPUP, { id: null }); }; return (0, i.jsxs)( "div", r.__assign( { className: "popups" }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, g.default)("coins-bar") }, { children: (0, i.jsx)(y.CoinsIndicator, { className: (0, g.default)("coins-indicator", "coins-indicator_filled"), total: T.cookie.coins }) })), (0, i.jsx)( "div", r.__assign( { className: (0, g.default)("popup-gift") }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, g.default)("popup", { invisible: L }) }, { children: [ (0, i.jsx)("div", r.__assign({ className: "popup__title" }, { children: o.Localize.get("ui-fillbox-title", "GIFT") })), (0, i.jsxs)( "div", r.__assign( { className: "popup__body" }, { children: [ (0, i.jsx)(w.GiftItem, { reward: I.adViewed ? e.reward : null }), (0, i.jsx)(C.CapturingAnimated, { from: n - 1, to: n, startDelay: 1, total: S, onAnimationComplete: function () { E && M(r.__assign(r.__assign({}, I), { canCollect: !0 })); }, }), (0, i.jsx)("div", r.__assign({ className: (0, g.default)("decoration-gift", "decoration-gift_top-left") }, { children: (0, i.jsx)(v.Images.Gift, {}) })), (0, i.jsx)("div", r.__assign({ className: (0, g.default)("decoration-gift", "decoration-gift_right-bottom", "decoration-gift_small") }, { children: (0, i.jsx)(v.Images.Gift, {}) })), ], } ) ), (0, i.jsx)( "div", r.__assign( { className: "popup__body-buttons" }, { children: (0, i.jsx)( "div", r.__assign( { className: (0, g.default)("popup__body-button", "center", { invisible: I.adViewed || !I.canCollect }) }, { children: I.adViewed ? null : (0, i.jsx)(h.ClaimButton, { showIcom: T.rewardedAdsAllowed, onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return T.rewardedAdsAllowed ? [4, (0, c.showReward)()] : [3, 2]; case 1: return (t = n.sent()), [3, 3]; case 2: (t = u.AdResponse.PLAYED), (n.label = 3); case 3: if (t === u.AdResponse.PLAYED) { if (e.reward) { switch (e.reward.type) { case b.SkinType.BUILDING: T.cookie.addUserBuilding(e.reward.id); break; case b.SkinType.FIGHTER: T.cookie.addUserFighter(e.reward.id); } T.onShopScreenChanged(); } M(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !0 }); }); } return [2]; } }); }); }, }), } ) ), } ) ), I.adViewed || !E ? (0, i.jsx)(p.ContinueButton, { onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var t; return r.__generator(this, function (n) { return P(), e.onContinue ? [2, e.onContinue(!0)] : [2, null === (t = (0, a.lazyGet)(s.TypesFlow.LevelNext)) || void 0 === t ? void 0 : t.run()]; }); }); }, }) : (0, i.jsx)(f.NoThanksButton, { delay: _.UIConstants.popup.noThanksButtonDelay + 1e3, onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, (0, c.showAd)()]; case 1: return t.sent(), P(), [2, e.onContinue && e.onContinue(!1)]; } }); }); }, }), ], } ) ), } ) ), ], } ) ); }; }, 41720: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LosePopup = void 0); var r = n(22970), i = n(10348), o = n(37394), a = n(51159), s = n(46595), u = n(47166), l = n(78620), c = n(83951), d = n(82126), h = n(26425), p = n(28886), f = r.__importDefault(n(72779)), _ = n(34619), g = n(89225); n(11767); t.LosePopup = function (e) { var t = e.animationEnabled, n = void 0 === t || t, m = e.coins, v = void 0 === m ? 999 : m, y = (0, u.useInjection)(l.TypesGame.model), C = (0, u.useInjection)(o.TypesCore.dispatcher), b = { startCoinsTotal: y.cookie.coins, reward: v, visible: !1 }, w = p.UIConstants.coinsIndicator.updateDelay, S = r.__read( (0, _.useState)(function () { return b; }), 2 ), T = S[0], x = S[1]; (0, _.useEffect)(function () { var e = setTimeout(function () { return x(function (e) { return r.__assign(r.__assign({}, e), { visible: !0 }); }); }, p.UIConstants.popup.startDelay); return function () { clearTimeout(e); }; }, []); var E = function (e) { y.cookie.coins += e; }; return (0, i.jsxs)( "div", r.__assign( { className: "popups" }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, f.default)("coins-bar") }, { children: (0, i.jsx)(c.CoinsIndicator, { className: (0, f.default)("coins-indicator", "coins-indicator_filled"), total: T.startCoinsTotal }) })), (0, i.jsx)( "div", r.__assign( { className: "popup-lose" }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, f.default)("popup", { visible: T.visible }) }, { children: [ (0, i.jsx)("div", r.__assign({ className: "popup__title" }, { children: a.Localize.get("ui-lose-lose_label", "YOU LOSE") })), n ? (0, i.jsx)("div", r.__assign({ className: "popup__main-animation" }, { children: (0, i.jsx)(g.SVG.PopupLose, {}) })) : null, (0, i.jsx)("div", r.__assign({ className: "popup__body" }, { children: (0, i.jsx)(d.PopupWinIndicator, { className: (0, f.default)("coins-indicator", "coins-indicator_internal"), total: T.reward }) })), (0, i.jsx)(h.ContinueButton, { onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return [ 4, r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return E(T.reward), [4, s.WaitAction.ms(w)]; case 1: return e.sent(), C.emit(u.UIEvents.POPUP, { id: null }), [2]; } }); }), ]; case 1: return t.sent(), null === (e = (0, s.lazyGet)(o.TypesFlow.LevelNext)) || void 0 === e || e.run(), [2]; } }); }); }, }), ], } ) ), } ) ), ], } ) ); }; }, 10285: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.OfflineEarningsPopup = void 0); var r = n(22970), i = n(10348), o = n(37394), a = n(51159), s = n(46595), u = n(37394), l = n(47166), c = n(15276), d = n(78620), h = n(85013), p = n(83951), f = n(82126), _ = n(26425), g = n(84296), m = n(34395), v = n(35196), y = n(28886), C = r.__importDefault(n(72779)), b = n(34619), w = n(57205), S = n(89225); n(53334); var T = function (e) { return e >= 10 ? "".concat(e) : "0".concat(e); }; t.OfflineEarningsPopup = function (e) { var t = e.coins, n = void 0 === t ? 1e3 : t, x = e.hours, E = void 0 === x ? 23 : x, L = e.minutes, A = void 0 === L ? 59 : L, I = e.seconds, M = void 0 === I ? 59 : I, P = e.animationEnabled, O = void 0 === P || P, k = e.days, R = void 0 === k ? 0 : k, D = (0, l.useInjection)(d.TypesGame.model), N = (0, l.useInjection)(o.TypesCore.dispatcher), B = { startCoinsTotal: D.cookie.coins, adViewed: !1, multiplierSelected: !1, mult: 1, reward: n }, F = r.__read( (0, b.useState)(function () { return B; }), 2 ), U = F[0], j = F[1], G = r.__read((0, l.visibilityEffect)(y.UIConstants.popup.startDelay, !1, [U.adViewed]), 1)[0], H = y.UIConstants.coinsIndicator.updateDelay; (0, b.useEffect)( function () { U.adViewed && U.multiplierSelected && U.mult > 1 && j(function (e) { return r.__assign(r.__assign({}, e), { reward: e.reward * e.mult }); }); }, [U.multiplierSelected, U.adViewed, U.mult] ); var V = function (e) { D.cookie.coins += e; }, Z = function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return ( D.cookie.syncTime(), [ 4, r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return V(U.reward), [4, s.WaitAction.ms(H)]; case 1: return e.sent(), N.emit(l.UIEvents.POPUP, { id: null }), [2]; } }); }), ] ); case 1: return e.sent(), [2]; } }); }); }; return (0, i.jsxs)( "div", r.__assign( { className: "popups" }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, C.default)("coins-bar") }, { children: (0, i.jsx)(p.CoinsIndicator, { className: (0, C.default)("coins-indicator", "coins-indicator_filled"), total: U.startCoinsTotal }) })), (0, i.jsx)( "div", r.__assign( { className: (0, C.default)("popup-offline-earnings") }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, C.default)("popup", { invisible: G }) }, { children: [ (0, i.jsx)("div", r.__assign({ className: "popup__title" }, { children: a.Localize.get("ui-offline-title", "OFFLINE EARNINGS") })), O ? (0, i.jsxs)("div", r.__assign({ className: "popup__main-animation" }, { children: [(0, i.jsx)(S.SVG.OfflineEarnings, {}), (0, i.jsx)(m.WinRays, {}), (0, i.jsx)(v.WinStars, {})] })) : null, (0, i.jsxs)( "div", r.__assign( { className: "popup__body" }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, C.default)("popup__body-line") }, { children: a.Localize.get("ui-offline-description", "YOU WERE AWAY FOR:") })), (0, i.jsx)("div", r.__assign({ className: (0, C.default)("popup__body-line", "time-away") }, { children: (0, i.jsxs)(i.Fragment, { children: [R ? (0, i.jsxs)("span", { children: [T(R), "D:"] }) : null, (0, i.jsxs)("span", { children: [T(E), "H:"] }), (0, i.jsxs)("span", { children: [T(A), "M:"] }), (0, i.jsxs)("span", { children: [T(M), "S"] })] }) })), (0, i.jsx)(f.PopupWinIndicator, { total: U.reward, className: (0, C.default)("coins-indicator", "coins-indicator_internal", "coins-indicator_filled") }), D.rewardedAdsAllowed ? (0, i.jsx)( "div", r.__assign( { className: (0, C.default)("popup__body-line") }, { children: (0, i.jsx)(w.MultiplyBonus, { paused: U.multiplierSelected, onPause: function (e) { j(function (t) { return r.__assign(r.__assign({}, t), { mult: e }); }); }, }), } ) ) : null, ], } ) ), !U.adViewed && D.rewardedAdsAllowed ? (0, i.jsx)( "div", r.__assign( { className: "popup__body-buttons" }, { children: (0, i.jsx)( "div", r.__assign( { className: (0, C.default)("popup__body-button", "center") }, { children: U.adViewed ? null : (0, i.jsx)(h.ClaimButton, { onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return ( j(function (e) { return r.__assign(r.__assign({}, e), { multiplierSelected: !0 }); }), [4, (0, c.showReward)()] ); case 1: return ( e.sent() === u.AdResponse.PLAYED && j(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !0 }); }), [2] ); } }); }); }, text: a.Localize.get("ui-offline-mult_button", "MULTIPLY"), }), } ) ), } ) ) : null, U.adViewed ? (0, i.jsx)(_.ContinueButton, { onClick: Z }) : (0, i.jsx)(g.NoThanksButton, { delay: y.UIConstants.popup.noThanksButtonDelay, onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, (0, c.showAd)()]; case 1: return e.sent(), Z(), [2]; } }); }); }, }), ], } ) ), } ) ), ], } ) ); }; }, 86317: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SettingsPopup = void 0); var r = n(22970), i = n(10348), o = n(37394), a = n(46595), s = n(47166), u = n(34619), l = r.__importDefault(n(72779)), c = n(45900), d = n(28886), h = n(89225); n(18580); var p = n(56572), f = n(15276), _ = n(76871), g = n(70789), m = function (e) { var t = r.__read((0, u.useState)(e.toggled), 2), n = t[0], o = t[1]; return (0, i.jsx)( s.Button, r.__assign( { className: (0, l.default)("toggle-btn", e.className, { toggled: n }), onClick: function () { e.onToggled && e.onToggled(!n), (0, f.playUIClickSound)(), o(!n); }, }, { children: e.children } ) ); }; t.SettingsPopup = function () { var e = r.__read((0, u.useState)({}), 2)[1], t = (0, u.useCallback)(function () { return e({}); }, []), n = r.__read((0, s.visibilityEffect)(d.UIConstants.popup.startDelay), 2), f = n[0], v = n[1], y = (0, s.useInjection)(o.TypesCore.dispatcher), C = (0, s.useInjection)(o.TypesAudio.model), b = (0, a.lazyGet)(o.TypesSocial.vibrationManager), w = g.SIOConstants.IN_GAME_AUDIO_CONTROL_ALLOWED; (0, s.useEventListener)( p.AudioModel.MUTE_SOUNDS, function () { return t; }, [] ), (0, s.useEventListener)( p.AudioModel.MUTE_MUSIC, function () { return t; }, [] ); var S = function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return v(!0), [4, a.WaitAction.ms(300)]; case 1: return e.sent(), y.emit(s.UIEvents.POPUP, { id: null }), [2]; } }); }); }; return (0, i.jsxs)( "div", r.__assign( { className: "popups", onClick: function (e) { return e.target === e.currentTarget && S(); }, }, { children: [ (0, i.jsx)(c.BackButton, { className: "white", onClick: S }), (0, i.jsxs)( "div", r.__assign( { className: (0, l.default)("popup-settings") }, { children: [ (0, i.jsxs)( "div", r.__assign( { className: (0, l.default)("popup", { invisible: f }) }, { children: [ (0, i.jsxs)( "div", r.__assign( { className: (0, l.default)("popup__body") }, { children: [ b ? (0, i.jsx)( m, r.__assign( { toggled: !b.enabled, onToggled: function (e) { (b.enabled = !e), b.enabled && b.vibrate(); }, }, { children: (0, i.jsx)(h.SVG.Vibrate, {}) } ) ) : null, w ? (0, i.jsx)( m, r.__assign( { toggled: C.soundsMuted(), onToggled: function (e) { return C.muteSounds(e); }, }, { children: (0, i.jsx)(h.SVG.Sounds, {}) } ) ) : null, ], } ) ), (0, i.jsx)(_.UserIdLabel, {}), ], } ) ), (0, i.jsx)(s.CrossPromo, { delay: d.UIConstants.popup.startDelay + 100 }), (0, i.jsx)(s.VersionLabel, {}), ], } ) ), ], } ) ); }; }, 33369: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShareLevelResultPopup = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(78620), s = n(37394), u = n(83951), l = n(84296), c = n(38950), d = n(34395), h = n(35196), p = n(28886), f = r.__importDefault(n(72779)); n(91259); var _ = n(46595), g = n(51159), m = n(26425); t.ShareLevelResultPopup = function (e) { var t = e.shareImage, n = e.onContinue, v = (0, o.useInjection)(a.TypesGame.model), y = (0, o.useInjection)(s.TypesSocial.model), C = (0, o.useInjection)(s.TypesCore.dispatcher), b = r.__read((0, o.visibilityEffect)(p.UIConstants.popup.startDelay), 2), w = b[0], S = b[1], T = v.screenshots[v.screenshots.length - 1], x = function (e) { return ( void 0 === e && (e = !1), r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return S(!0), [4, _.WaitAction.ms(p.UIConstants.coinsIndicator.updateDelay)]; case 1: return t.sent(), C.emit(o.UIEvents.POPUP, { id: null }), n ? [4, n(e)] : [3, 3]; case 2: t.sent(), (t.label = 3); case 3: return [2]; } }); }) ); }; return (0, i.jsxs)("div", r.__assign({ className: (0, f.default)("popups") }, { children: [(0, i.jsx)("div", r.__assign({ className: (0, f.default)("coins-bar") }, { children: (0, i.jsx)(u.CoinsIndicator, { className: (0, f.default)("coins-indicator", "coins-indicator_filled"), total: v.cookie.coins }) })), (0, i.jsx)("div", r.__assign({ className: (0, f.default)("popup-share-level-completed") }, { children: (0, i.jsxs)("div", r.__assign({ className: (0, f.default)("popup", { invisible: w }) }, { children: [(0, i.jsx)("div", r.__assign({ className: "popup__title" }, { children: (0, i.jsx)("div", r.__assign({ className: "popup__title-detailed" }, { children: g.Localize.get("level_completed_message", "ALL STAGES COMPLETED!") })) })), (0, i.jsxs)("div", r.__assign({ className: "popup__body" }, { children: [(0, i.jsx)(c.Winner, { user: y.me }), (0, i.jsx)(d.WinRays, {}), (0, i.jsx)(h.WinStars, {}), (0, i.jsx)("img", { className: (0, f.default)("level-image"), src: T })] })), (0, i.jsx)(o.ShareComponent, { invisible: w || !t, screenshot: t, onShare: x }), t && "" !== t ? (0, i.jsx)(l.NoThanksButton, { delay: p.UIConstants.popup.noThanksButtonDelay, onClick: x }) : (0, i.jsx)(m.ContinueButton, { onClick: x })] })) }))] })); }; }, 10341: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.WinStagePopup = void 0); var r = n(22970), i = n(10348), o = n(37394), a = n(51159), s = n(37394), u = n(47166), l = n(70789), c = n(15276), d = n(78620), h = n(83951), p = n(82126), f = n(26425), _ = n(84296), g = n(34395), m = n(35196), v = n(28886), y = r.__importDefault(n(72779)), C = n(34619), b = n(85013), w = n(89225); n(77398); var S = n(46595); t.WinStagePopup = function (e) { var t = e.animationEnabled, n = void 0 === t || t, T = e.coins, x = void 0 === T ? 9999 : T, E = e.showRewardAd, L = void 0 === E || E, A = e.onContinue, I = (0, u.useInjection)(d.TypesGame.model), M = (0, u.useInjection)(o.TypesCore.dispatcher), P = r.__read((0, u.visibilityEffect)(v.UIConstants.popup.startDelay), 2), O = P[0], k = P[1], R = r.__read((0, C.useState)({ startCoinsTotal: I.cookie.coins, adViewed: !1, reward: 0 }), 2), D = R[0], N = R[1], B = x * l.SIOConstants.CLAIM_FACTOR; (0, C.useEffect)( function () { if (!D.adViewed) { var e = setTimeout(function () { return N(r.__assign(r.__assign({}, D), { reward: x })); }, 200); return function () { return clearTimeout(e); }; } N(r.__assign(r.__assign({}, D), { reward: B })); }, [D.adViewed] ); var F = function (e) { return ( void 0 === e && (e = !1), r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return k(!0), (I.cookie.coins += D.reward), [4, S.WaitAction.ms(v.UIConstants.coinsIndicator.updateDelay)]; case 1: return t.sent(), M.emit(u.UIEvents.POPUP, { id: null }), A ? [4, A(e)] : [3, 3]; case 2: t.sent(), (t.label = 3); case 3: return [2]; } }); }) ); }, U = L && !D.adViewed; return (0, i.jsxs)( "div", r.__assign( { className: "popups" }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, y.default)("coins-bar") }, { children: (0, i.jsx)(h.CoinsIndicator, { className: (0, y.default)("coins-indicator", "coins-indicator_filled"), total: D.startCoinsTotal }) })), (0, i.jsx)( "div", r.__assign( { className: "popup-win-level" }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, y.default)("popup", { invisible: O }) }, { children: [ (0, i.jsx)("div", r.__assign({ className: "popup__title" }, { children: a.Localize.get("ui-win-win_label", "YOU WON") })), n ? (0, i.jsxs)("div", r.__assign({ className: "popup__main-animation" }, { children: [(0, i.jsx)(w.SVG.PopupWinCup, {}), (0, i.jsx)(g.WinRays, {}), (0, i.jsx)(m.WinStars, {})] })) : null, (0, i.jsxs)("div", r.__assign({ className: "popup__body" }, { children: [(0, i.jsx)("div", r.__assign({ className: "popup__sub-title" }, { children: a.Localize.get("ui-win-reward_label", "YOUR REWARD") })), (0, i.jsx)(p.PopupWinIndicator, { className: (0, y.default)("coins-indicator", "coins-indicator_internal"), total: D.reward })] })), U ? (0, i.jsx)( "div", r.__assign( { className: "popup__body-buttons" }, { children: (0, i.jsx)( "div", r.__assign( { className: (0, y.default)("popup__body-button", "center") }, { children: D.adViewed ? null : (0, i.jsx)(b.ClaimButton, { onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, (0, c.showReward)()]; case 1: return ( e.sent() === s.AdResponse.PLAYED && N(function (e) { return r.__assign(r.__assign({}, e), { adViewed: !0 }); }), [2] ); } }); }); }, reward: B, }), } ) ), } ) ) : null, U ? (0, i.jsx)(_.NoThanksButton, { delay: v.UIConstants.popup.noThanksButtonDelay, onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, (0, c.showAd)()]; case 1: e.sent(), (e.label = 2); case 2: return [4, F(!1)]; case 3: return e.sent(), [2]; } }); }); }, }) : (0, i.jsx)(f.ContinueButton, { onClick: function () { return F(!0); }, }), ], } ) ), } ) ), ], } ) ); }; }, 72134: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BattleResults = void 0); var r = n(22970), i = n(10348); n(51307); var o = n(47166), a = n(37394), s = n(57228), u = n(78620), l = n(49088), c = r.__importDefault(n(72779)), d = n(10039); t.BattleResults = function (e) { var t = e.passedStage, n = e.isLevelFinished, h = void 0 !== n && n, p = (0, o.useInjection)(a.TypesSocial.model), f = (0, o.useInjection)(u.TypesGame.model), _ = function (e) { var t; if (e === p.me) return f.currentContinent.getHistory(); var n = null === (t = e.scores.getEntry(s.ScoreType.CONTEXT)) || void 0 === t ? void 0 : t.getExtraData(); return n ? JSON.parse(n) : { c: f.currentContinent.stageLevel, l: f.currentContinent.data.id, s: f.currentContinent.data.stages.map(function (e) { return 0; }), }; }, g = p.contextPlayers .map(function (e) { return { user: r.__assign(r.__assign({}, e), { name: e.name, image_url: e.photo, origin: e }), scores: _(e) }; }) .map(function (e) { return (e.user.score = h ? l.math.array_summ(e.scores.s) : e.scores.s[t] || 0), e; }) .sort(function (e, n) { return h ? l.math.array_summ(n.scores.s) - l.math.array_summ(e.scores.s) : n.scores.s[t] - e.scores.s[t]; }) .map(function (e, t) { return r.__assign(r.__assign({}, e), { rank: t + 1 }); }); return (0, i.jsx)( "div", r.__assign( { className: (0, c.default)("leaderboard") }, { children: (0, i.jsx)( "ul", r.__assign( { className: (0, c.default)("leaderboard__scroll") }, { children: g.map(function (e) { return (0, i.jsx)(d.LeaderBoardItem, { user: e.user, rank: e.rank, isSolo: !1 }); }), } ) ), } ) ); }; }, 33725: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BattleResultsPopup = void 0); var r = n(22970), i = n(10348), o = n(37394), a = n(51159), s = n(47166), u = n(78620), l = n(26425), c = n(28886), d = n(83951), h = r.__importDefault(n(72779)), p = n(72134); n(55675); t.BattleResultsPopup = function (e) { var t = e.win, n = void 0 !== t && t, f = e.onContinue, _ = (0, s.useInjection)(o.TypesCore.dispatcher), g = (0, s.useInjection)(u.TypesGame.model), m = r.__read((0, s.visibilityEffect)(c.UIConstants.popup.startDelay), 1)[0], v = g.currentContinent.stageLevel - 1, y = g.currentContinent.data.id, C = function (e) { return ( void 0 === e && (e = !0), r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return _.emit(s.UIEvents.POPUP, { id: null }), f ? [4, f(e)] : [3, 2]; case 1: t.sent(), (t.label = 2); case 2: return [2]; } }); }) ); }; return (0, i.jsxs)( "div", r.__assign( { className: "popups" }, { children: [ (0, i.jsx)("div", r.__assign({ className: (0, h.default)("coins-bar") }, { children: (0, i.jsx)(d.CoinsIndicator, { className: (0, h.default)("coins-indicator", "coins-indicator_filled"), total: g.cookie.coins }) })), (0, i.jsx)( "div", r.__assign( { className: (0, h.default)("popup-battle-results") }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, h.default)("popup", { invisible: m }) }, { children: [ (0, i.jsxs)("div", r.__assign({ className: "popup__title" }, { children: [a.Localize.get("ui-battle-battle_title", "Battle Results"), (0, i.jsxs)("div", r.__assign({ className: (0, h.default)("popup__title-detailed", { "popup__title-detailed_lose": !n }) }, { children: [(0, i.jsxs)("span", { children: [y, " "] }), (0, i.jsx)("span", { children: " stage " }), "#".concat(n ? v + 1 : v + 2)] }))] })), (0, i.jsx)("div", r.__assign({ className: "popup__body" }, { children: (0, i.jsx)(p.BattleResults, { passedStage: v, isLevelFinished: g.currentContinent.isFinished }) })), n ? (0, i.jsx)(l.ContinueButton, { onClick: function () { return C(!0); }, }) : (0, i.jsx)( s.Button, r.__assign( { className: (0, h.default)("try-again-button", "btn-green"), onClick: function () { return C(!1); }, }, { children: a.Localize.get("ui-try-again-button", "TRY AGAIN") } ) ), ], } ) ), } ) ), ], } ) ); }; }, 26962: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GamePlayScreen = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(78620), s = n(45900), u = n(18525), l = r.__importDefault(n(72779)); n(89692); n(32714); t.GamePlayScreen = function (e) { return (0, i.jsxs)( "div", r.__assign( { className: (0, l.default)("screen", "screen__game-play") }, { children: [ (0, i.jsx)( "div", r.__assign( { className: (0, l.default)("container", "back-btn") }, { children: (0, i.jsx)(s.BackButton, { onClick: function () { return o.di.get(a.TypesGame.model).exitTheGame(); }, }), } ) ), (0, i.jsx)("div", r.__assign({ className: "container" }, { children: (0, i.jsx)(u.ProgressBar, { participants: e.participants }) })), null, ], } ) ); }; }, 31217: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderboardScreen = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(37394), s = n(73218), u = n(78620), l = n(45900), c = n(6161), d = n(83951), h = r.__importDefault(n(72779)), p = n(34619); n(79090); t.LeaderboardScreen = function (e) { var t = (0, o.useInjection)(u.TypesGame.model), n = ((0, o.useInjection)(a.TypesSocial.model), { coins: t.cookie.coins, startCoins: t.cookie.coins }), f = r.__read( (0, p.useState)(function () { return n; }), 2 ), _ = (f[0], f[1]); return ( (0, o.useEventListener)(s.GameEvents.COINS_UPDATED, function (e) { _(function (t) { return r.__assign(r.__assign({}, t), e); }); }), (0, i.jsxs)( "div", r.__assign( { className: (0, h.default)("screen", "screen__leaderboard") }, { children: [ (0, i.jsx)( "div", r.__assign( { className: (0, h.default)("screen-top", "visible") }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, h.default)("container", "top-bar") }, { children: [ (0, i.jsx)(l.BackButton, { onClick: function () { t.goToLobby(); }, }), (0, i.jsx)(d.CoinsIndicator, { className: (0, h.default)("coins-indicator", "coins-indicator_filled"), total: t.cookie.coins }), ], } ) ), } ) ), (0, i.jsx)("div", r.__assign({ className: (0, h.default)("container") }, { children: (0, i.jsx)(c.LeaderBoardTabs, { activeTab: 0, className: "leaderboards-tabs", leaderboardsProps: e }) })), ], } ) ) ); }; }, 21177: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShopScreen = void 0); var r = n(22970), i = n(10348), o = n(47166), a = n(78620), s = n(45900), u = n(83951), l = n(18108), c = r.__importDefault(n(72779)), d = n(5907); n(78170); var h = n(34619); t.ShopScreen = function () { var e = (0, o.useInjection)(a.TypesGame.model); return ( (0, h.useEffect)(function () { return function () { return e.onShopScreenChanged(); }; }), (0, i.jsxs)( "div", r.__assign( { className: (0, c.default)("screen", "screen__shop") }, { children: [ (0, i.jsx)( "div", r.__assign( { className: (0, c.default)("screen-top", "visible") }, { children: (0, i.jsxs)( "div", r.__assign( { className: (0, c.default)("container", "top-bar") }, { children: [ (0, i.jsx)(s.BackButton, { onClick: function () { e.goToLobby(); }, }), (0, i.jsx)(u.CoinsIndicator, { className: (0, c.default)("coins-indicator", "coins-indicator_filled"), total: e.cookie.coins }), ], } ) ), } ) ), (0, i.jsxs)("div", r.__assign({ className: (0, c.default)("container", "shop-area") }, { children: [(0, i.jsx)(l.ShopPreview, {}), (0, i.jsx)(d.ShopMenu, {})] })), ], } ) ) ); }; }, 14227: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StartScreen = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(46595), s = n(37394), u = n(57228), l = n(47166), c = n(78620), d = n(4405), h = n(62838), p = n(86541), f = n(48877), _ = n(95941), g = n(83951), m = n(2545), v = n(82105), y = n(10574), C = n(72578), b = r.__importDefault(n(72779)), w = n(34619), S = n(25417); n(42605); var T = n(15276), x = n(50869), E = n(34619), L = n(70789), A = !1; t.StartScreen = function () { var e = (0, l.useInjection)(c.TypesGame.model), t = (0, l.useInjection)(s.TypesSocial.model), n = (0, l.useInjection)(c.TypesGame.skinManager), I = (0, l.useInjection)(s.TypesCore.dispatcher), M = (0, l.useInjection)(c.TypesGame.cookieModel), P = (0, a.lazyGet)(s.TypesSocial.vibrationManager), O = L.SIOConstants.IN_GAME_AUDIO_CONTROL_ALLOWED || (P && P.supported), k = { authorized: void 0 === t.userAuthorized || t.userAuthorized, stageLevel: e.currentContinent.stageLevel, totalStages: e.currentContinent.totalStages }, R = r.__read( (0, E.useState)(function () { return k; }), 2 ), D = R[0], N = R[1], B = r.__read((0, l.visibilityEffect)(), 2), F = B[0], U = B[1], j = r.__spreadArray(r.__spreadArray(r.__spreadArray([], r.__read(n.availableBuildings), !1), r.__read(n.availableFighters), !1), r.__read(e.cookie.availableColors), !1).filter(function (e) { return !e.stored; }).length > 0, G = function () { var t, n = e.getOfflineEarning(); if (n.isRewarded) { var r = (n.date, (t = M.timeDiff), { days: Math.floor(t / 864e5), hours: Math.floor((t / 36e5) % 24), minutes: Math.floor((t / 6e4) % 60), seconds: Math.floor((t / 1e3) % 60) }), i = r.days, o = r.hours, a = r.minutes, s = r.seconds, u = n.reward; I.emit(l.UIEvents.POPUP, { id: S.PopupType.OFFLINE_EARNINGS, props: { coins: u, hours: o, minutes: a, seconds: s, days: i } }); } }; return ( (0, w.useEffect)( function () { !t.session.ftue && t.inSolo && !A && L.SIOConstants.OFFLINE_EARNINGS_ALLOWED && (G(), (A = !0)); }, [A] ), (0, i.jsxs)( "div", r.__assign( { className: (0, b.default)("screen", "screen__start") }, { children: [ (0, i.jsxs)( "div", r.__assign( { className: (0, b.default)("screen-top", { invisible: F }) }, { children: [ (0, i.jsxs)( "div", r.__assign( { className: (0, b.default)("container", "top-bar") }, { children: [ O ? (0, i.jsx)(v.SettingsButton, { onClick: function () { return I.emit(l.UIEvents.POPUP, { id: S.PopupType.SETTINGS }); }, }) : (0, i.jsx)("div", { className: (0, b.default)("stub", "button", "settings-button") }), (0, i.jsx)(_.LevelTitle, {}), (0, i.jsx)(g.CoinsIndicator, { total: e.cookie.coins, className: (0, b.default)("coins-indicator", "coins-indicator_filled") }), ], } ) ), (0, i.jsx)(h.Capturing, { captured: D.stageLevel / D.totalStages, title: o.Localize.get("ui-menu-capturing", "CAPTURING"), stages: D.totalStages, showGift: t.inSolo }), (0, i.jsxs)( "div", r.__assign( { className: (0, b.default)("container", "buttons-container", { invisible: F }) }, { children: [ (0, i.jsxs)( "span", r.__assign( { className: (0, b.default)("buttons-group", "buttons-group_left") }, { children: [ ["ya", "gd", "yt"].includes(t.socialPlatform) ? null : (0, i.jsx)(p.InviteButton, {}), ["gd", "yt"].includes(t.socialPlatform) ? null : (0, i.jsx)(f.LeaderboardButton, { onClick: function () { return I.emit(l.UIEvents.SCREEN_CHANGED, { id: s.TypesUI.screen.LEADERBOARD, props: { scoreType: u.ScoreType.GLOBAL, users: t.friends.concat(t.me) } }); }, }), ], } ) ), (0, i.jsxs)( "span", r.__assign( { className: (0, b.default)("buttons-group", "buttons-group_right") }, { children: [ (0, i.jsx)(m.NoAdsButton, { className: "btn-unsupported", onClick: function () {} }), (0, i.jsx)(y.ShopButton, { showNotification: j, onClick: function () { (0, T.playUIClickSound)(), I.emit(l.UIEvents.SCREEN_CHANGED, { id: s.TypesUI.screen.SHOP, props: {} }); }, }), ], } ) ), ], } ) ), ], } ) ), (0, i.jsx)(C.TapToPlayButton, { onDown: function () { return U(!0); }, onClick: function () { var e; return null === (e = (0, a.lazyGet)(c.TypesGame.actions.startGame)) || void 0 === e ? void 0 : e.run(); }, }), (0, i.jsx)("div", r.__assign({ className: (0, b.default)("screen-bottom", { invisible: F }) }, { children: (0, i.jsx)(d.Boosters, {}) })), (0, i.jsx)(x.UserStatusInfo, { authorized: D.authorized, onLogin: function () { return r.__awaiter(void 0, void 0, void 0, function () { var n, i; return r.__generator(this, function (o) { switch (o.label) { case 0: return t.authorizeUser ? [4, t.authorizeUser()] : [3, 4]; case 1: return (n = o.sent()) && M.syncAfterAuthStateChange ? [4, M.syncAfterAuthStateChange()] : [3, 4]; case 2: return o.sent() ? [4, null === (i = (0, a.lazyGet)(c.TypesGame.actions.levelRestartAfterYandexLoginAction)) || void 0 === i ? void 0 : i.run()] : [3, 4]; case 3: o.sent(), N(function (t) { return r.__assign(r.__assign({}, t), { authorized: n, stageLevel: e.currentContinent.stageLevel, totalStages: e.currentContinent.totalStages }); }), (o.label = 4); case 4: return [2]; } }); }); }, }), ], } ) ) ); }; }, 31063: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.toFixedString = t.getFontClassByDigits = void 0); t.getFontClassByDigits = function (e, t, n) { void 0 === t && (t = 4), void 0 === n && (n = 9); var r = ""; if (e) { var i = e.toString().length; i <= t && (r = ""), i > t && i < n && (r = "f".concat(i.toString(), "-digits")), i >= n && (r = "f".concat(n, "-digits")); } return r; }; t.toFixedString = function (e, t, n) { void 0 === t && (t = 2), void 0 === n && (n = "."); var r = e.toString(10), i = r.indexOf(n); return (r = -1 === i ? r : r.substr(0, i + 1 + t)); }; }, 77634: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PreloadAssetsAction = void 0); var r = n(22970), i = n(46595), o = n(17905), a = n(22674), s = n(940), u = i.IS_ODR_BUILD ? i.ODR_BUILD_ORIGIN : i.GAME_SCRIPT_ORIGIN, l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return ( (t = new s.Loader()), e.assets .filter(function (e) { return -1 !== ["svg", "jpg", "png"].indexOf("" + e.split(".").pop()); }) .forEach(function (e) { var r = n.transformAssetPath(e); t.add(e, r, null, function (t) { o.log.trace("preloaded", t.name, "from:", r), n.bindAsset(e, t); }); }), e.onProgress && t.onProgress.add(function () { e.onProgress(t.progress); }), [ 4, new Promise(function (e) { return t.load(e); }), ] ); case 1: return r.sent(), [2]; } }); }); }), (t.prototype.transformAssetPath = function (e) { return "".concat(u, "assets/").concat(e); }), (t.prototype.bindAsset = function (e, t) { var n, r = "".concat((null === (n = this.data) || void 0 === n ? void 0 : n.prefix) || "").concat(e); i.di.bind(r).toDynamicValue(function () { return new s.Sprite(t.texture); }); }), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.Action); t.PreloadAssetsAction = l; }, 14610: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ScreenshotAction = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(22674), s = n(940), u = n(38631), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n; return r.__generator(this, function (r) { return (t = this.root.app.renderer), e || (e = this.root.app.stage), (n = s.RenderTexture.create({ width: 0.5 * e.width, height: 0.5 * e.height })), t.render(e, n, !1, new s.Matrix(0.5, 0, 0, 0.5)), [2, t.extract.base64(new s.Sprite(n), "image/webp")]; }); }); }), r.__decorate([(0, a.inject)(i.Types2D.rootView), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.RootView && u.RootView) ? n : Object)], t.prototype, "root", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.ScreenshotAction = l; }, 60933: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), n(22970).__exportStar(n(77634), t); }, 89440: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), n(22970).__exportStar(n(96131), t); }, 96131: (e, t) => { "use strict"; function n(e, t) { var n = "number" == typeof e ? e : e.width; if (void 0 === t) return 0.5 * n; var r = 0.5 * (n - ("number" == typeof t ? t : t.width)); return (t.x = r); } function r(e, t) { var n = "number" == typeof e ? e : e.height; if (void 0 === t) return 0.5 * n; var r = 0.5 * (n - ("number" == typeof t ? t : t.height)); return (t.y = r); } Object.defineProperty(t, "__esModule", { value: !0 }), (t.aspectFill = t.aspectFit = t.centerHeight = t.centerWidth = t.centerSize = void 0), (t.centerSize = function (e, t) { return { x: n(e, t), y: r(e, t) }; }), (t.centerWidth = n), (t.centerHeight = r), (t.aspectFit = function (e, t) { var n = t.width / e.width, r = t.height / e.height; return r < n ? (t.width = (t.height / e.height) * e.width) : n < r && (t.height = (t.width / e.width) * e.height), t; }), (t.aspectFill = function (e, t) { var n = e.width / e.scale.x, r = e.height / e.scale.y, i = t.width / n, o = t.height / r; return o > i ? ((e.width = (t.height / r) * n), (e.scale.y = e.scale.x)) : i > o && ((e.height = (t.width / n) * r), (e.scale.x = e.scale.y)), e; }); }, 30627: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(63421), t), r.__exportStar(n(38631), t), r.__exportStar(n(26914), t), r.__exportStar(n(60933), t), r.__exportStar(n(89440), t); }, 27293: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 75355: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 28897: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Mediator = void 0); var r = n(22970), i = n(22674), o = n(17905), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.viewListenersMap = {}), t; } return ( r.__extends(t, e), (t.prototype.destroy = function () { this.removeAllViewListeners(), delete this.view, o.log.trace("destroyed", this), e.prototype.destroy.call(this); }), (t.prototype.setView = function (e) { (this.view = e), this.initialize(); }), (t.prototype.addViewListener = function (e, t) { if (!this.view) throw new Error("View listener can't be added when view not initialized!!!"); this.mapListenerToEvent(e, t, this.viewListenersMap) ? this.view.on(e, t) : o.log.error("View listener " + t + " for event " + e + " is already exists"); }), (t.prototype.addViewListenerOnce = function (e, t) { var n = this, r = function (i) { t.call(n, i), n.removeViewListener(e, r); }; this.addViewListener(e, r); }), (t.prototype.removeViewListener = function (e, t) { var n; this.unMapListenerToEvent(e, t, this.viewListenersMap) ? null === (n = this.view) || void 0 === n || n.off(e, t) : o.log.error(t + " is not a listener for event " + e); }), (t.prototype.removeViewListeners = function (e) { var t, n, i, a = this.viewListenersMap[e]; if (a) { try { for (var s = r.__values(a), u = s.next(); !u.done; u = s.next()) { var l = u.value; null === (i = this.view) || void 0 === i || i.off(e, l); } } catch (e) { t = { error: e }; } finally { try { u && !u.done && (n = s.return) && n.call(s); } finally { if (t) throw t.error; } } delete this.viewListenersMap[e]; } else o.log.error("There are no any listeners for event " + e); }), (t.prototype.removeAllViewListeners = function () { var e, t; try { for (var n = r.__values(Object.keys(this.viewListenersMap)), i = n.next(); !i.done; i = n.next()) { var o = i.value; this.removeViewListeners(o); } } catch (t) { e = { error: t }; } finally { try { i && !i.done && (t = n.return) && t.call(n); } finally { if (e) throw e.error; } } this.viewListenersMap = {}; }), (t.prototype.bindDebug = function () { var e, t = null === (e = this.view) || void 0 === e ? void 0 : e.debugId; void 0 !== t && (window[t] = this.view); }), (t.prototype.unbindDebug = function () { var e, t = null === (e = this.view) || void 0 === e ? void 0 : e.debugId; void 0 !== t && delete window[t]; }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(46595).GlobalEventProvider); t.Mediator = a; }, 86889: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.View = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { var t = e.call(this) || this; return (t._addedToScene = !1), t.on(n.ADDED_TO_SCENE, t.onAdded).on(n.REMOVED_FROM_SCENE, t.onRemoved), t; } var n; return ( r.__extends(t, e), (n = t), Object.defineProperty(t.prototype, "mediator", { set: function (e) { this._mediator = e; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "addedToScene", { get: function () { return this._addedToScene; }, enumerable: !1, configurable: !0, }), (t.prototype.addChild = function (t) { for (var n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i]; var o = e.prototype.addChild.apply(this, r.__spreadArray([t], r.__read(n), !1)); return this.postAddChild(o); }), (t.prototype.addChildAt = function (t, n) { return this.postAddChild(e.prototype.addChildAt.call(this, t, n)); }), (t.prototype.removeChild = function (t) { return this.postRemoveChild(e.prototype.removeChild.call(this, t)); }), (t.prototype.removeChildAt = function (t) { return this.postRemoveChild(e.prototype.removeChildAt.call(this, t)); }), (t.prototype.onAdded = function () { var e, t, i; if (!this._addedToScene) { this._addedToScene = !0; try { for (var o = r.__values(this.children), a = o.next(); !a.done; a = o.next()) { a.value.emit(n.ADDED_TO_SCENE); } } catch (t) { e = { error: t }; } finally { try { a && !a.done && (t = o.return) && t.call(o); } finally { if (e) throw e.error; } } null === (i = this._mediator) || void 0 === i || i.setView(this); } }), (t.prototype.onRemoved = function () { var e, t, i; if (this._addedToScene) { (this._addedToScene = !1), null === (i = this._mediator) || void 0 === i || i.destroy(); try { for (var o = r.__values(this.children), a = o.next(); !a.done; a = o.next()) { a.value.emit(n.REMOVED_FROM_SCENE); } } catch (t) { e = { error: t }; } finally { try { a && !a.done && (t = o.return) && t.call(o); } finally { if (e) throw e.error; } } } }), (t.prototype.destroy = function () { this.off(n.ADDED_TO_SCENE, this.onAdded).off(n.REMOVED_FROM_SCENE, this.onRemoved), e.prototype.destroy.call(this); }), (t.prototype.postAddChild = function (e) { return this._addedToScene && e && e.emit(n.ADDED_TO_SCENE), e; }), (t.prototype.postRemoveChild = function (e) { return this._addedToScene && e && e.emit(n.REMOVED_FROM_SCENE), e; }), Object.defineProperty(t.prototype, "debugId", { get: function () { return "v_".concat(this.constructor.name); }, enumerable: !1, configurable: !0, }), (t.ADDED_TO_SCENE = "onAddedToScene"), (t.REMOVED_FROM_SCENE = "onRemovedFromScene"), (t = n = r.__decorate([(0, i.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(n(940).Container); t.View = o; }, 92663: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.bindMediator = void 0), (t.bindMediator = function (e) { return function (t, n) { return t.container.isBound(e) || t.container.bind(e).toSelf(), (n.mediator = t.container.get(e)), n; }; }); }, 63421: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(92663), t), r.__exportStar(n(27293), t), r.__exportStar(n(75355), t), r.__exportStar(n(86889), t), r.__exportStar(n(28897), t); }, 97564: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PIXIUIModule = void 0); var r = n(940), i = n(22674), o = n(37394), a = n(14610), s = n(74086), u = n(60933), l = n(18959), c = n(63421), d = n(65874); (0, i.decorate)((0, i.injectable)(), r.utils.EventEmitter), (0, i.decorate)((0, i.injectable)(), r.Container), (0, i.decorate)((0, i.injectable)(), r.DisplayObject), (0, i.decorate)((0, i.injectable)(), r.Sprite), (t.PIXIUIModule = new i.ContainerModule(function (e, t, n, i) { e(o.Types2D.screenContainer).to(s.ScreenContainer), e(o.Types2D.overlay).to(s.Overlay), e(o.Types2D.finger).to(s.FingerView), e(o.Types2D.preloadAssetsAction).to(u.PreloadAssetsAction), e(o.Types2D.screenShotAction).to(a.ScreenshotAction), e(o.Types2D.blackSquareGraphics).toDynamicValue(function () { return new r.Graphics().beginFill(0).drawRect(0, 0, 10, 10).endFill(); }), e(o.Types2D.whiteSquareGraphics).toDynamicValue(function () { return new r.Graphics().beginFill(16777215).drawRect(0, 0, 10, 10).endFill(); }), e(o.Types2D.spinner).to(s.Spinner), e(o.Types2D.userPic).to(s.UserPic), e(o.Types2D.circleAvatar).to(s.CircleAvatar), e(o.Types2D.rootView) .to(l.RootView) .inSingletonScope() .onActivation((0, c.bindMediator)(d.RootMediator)); })); }, 65874: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.RootMediator = void 0); var r = n(22970), i = n(46595), o = n(22674), a = n(940), s = n(63421), u = n(18959), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.initialize = function () { var e = this; (this.view.app = new a.Application(this.getConfig())), window.addEventListener("resize", function () { return e.onResize(); }), this.view.app.stage.addChild(this.view), this.onResize(); }), (t.prototype.getConfig = function () { return { resolution: window.devicePixelRatio, view: document.getElementById(i.CANVAS_ID), backgroundColor: u.RootView.BACKGROUND_COLOR, antialias: !0, legacy: !0 }; }), (t.prototype.onResize = function () { var e = this.view.app, t = e.view, n = t.clientWidth, r = t.clientHeight; e.renderer.resize(n, r), this.view.resize(n, r); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(s.Mediator); t.RootMediator = l; }, 18959: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.RootView = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.size = { width: 0, height: 0 }), t; } return ( r.__extends(t, e), (t.prototype.resize = function (e, t, n) { void 0 === n && (n = !1), (this.size.width = e), (this.size.height = t), this.onResize(); }), (t.prototype.onResize = function () {}), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(63421).View); t.RootView = o; }, 38631: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(18959), t), r.__exportStar(n(65874), t), r.__exportStar(n(44931), t), r.__exportStar(n(19824), t), r.__exportStar(n(74086), t), r.__exportStar(n(97564), t); }, 19824: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 44931: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 37106: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BaseScreen = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.fadeIn = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, Promise.resolve(void 0)]; }); }); }), (t.prototype.fadeOut = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, Promise.resolve(void 0)]; }); }); }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(63421).View); t.BaseScreen = o; }, 58628: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CircleAvatar = void 0); var r = n(22970), i = n(22674), o = n(940), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.circleBg = new o.Graphics()), (t._bgColor = 16777215), t; } return ( r.__extends(t, e), (t.prototype.onAdded = function () { e.prototype.onAdded.call(this); var t = this.bg.width, n = this.bg.height, r = 0.5 * Math.max(t, n), i = new o.Graphics().beginFill(16777215).drawCircle(r, r, r).endFill(); this.bgAndImgCont.addChild(i), (this.bgAndImgCont.mask = i), this.updateColor(), this.addChildAt(this.circleBg, 0); }), Object.defineProperty(t.prototype, "bgColor", { get: function () { return this._bgColor; }, set: function (e) { (this._bgColor = e), this.updateColor(); }, enumerable: !1, configurable: !0, }), (t.prototype.onImageLoaded = function () { (this.bgAndImgCont.width = this.circleBg.width - 20), (this.bgAndImgCont.scale.y = this.bgAndImgCont.scale.x), (this.bgAndImgCont.x = 0.5 * (this.circleBg.width - this.bgAndImgCont.width)), (this.bgAndImgCont.y = 0.5 * (this.circleBg.height - this.bgAndImgCont.height)); }), (t.prototype.updateColor = function () { var e = this.bg.width, t = this.bg.height, n = 0.5 * Math.max(e, t); this.circleBg.clear().beginFill(this._bgColor).drawCircle(n, n, n).endFill(); }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(54658).UserPic); t.CircleAvatar = a; }, 34809: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FingerView = void 0); var r = n(22970), i = n(64770), o = n(22674), a = n(940), s = n(63421), u = function (e) { return new Promise(function (t) { return setTimeout(t, e); }); }, l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.onAdded = function () { this.sprite.anchor.set(0.5, 20 / this.sprite.height), this.sprite.position.set(0, 0), this.addChild(this.sprite), e.prototype.onAdded.call(this); }), (t.prototype.hold = function (e) { return ( void 0 === e && (e = 0.5), r.__awaiter(this, void 0, Promise, function () { var t, n, o = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return ( this.cancelTweens(), (t = 0.4 * this.sprite.width), (n = -Math.tan(t / this.sprite.height)), 0.9, [ 4, new Promise(function (r) { i.gsap .timeline() .to(o.sprite, { y: 0.9 * t, duration: e, rotation: n }) .to(o.sprite.scale, { x: 0.9, y: 0.9, duration: e, onComplete: r }, 0); }), ] ); case 1: return r.sent(), [2]; } }); }) ); }), (t.prototype.release = function (e) { return ( void 0 === e && (e = 0.5), r.__awaiter(this, void 0, Promise, function () { var t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return ( this.cancelTweens(), [ 4, new Promise(function (n) { i.gsap.timeline().to(t.sprite, { x: 0, y: 0, duration: e, rotation: 0 }).to(t.sprite.scale, { x: 1, y: 1, duration: e, onComplete: n }, 0); }), ] ); case 1: return n.sent(), [2]; } }); }) ); }), (t.prototype.cancelTweens = function () { i.gsap.killTweensOf(this.sprite), i.gsap.killTweensOf(this.sprite.scale); }), (t.prototype.tap = function (e) { return ( void 0 === e && (e = 200), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, this.hold()]; case 1: case 3: return t.sent(), [4, u(e)]; case 2: return t.sent(), [4, this.release()]; case 4: return t.sent(), [2]; } }); }) ); }), r.__decorate([(0, o.inject)("finger.svg"), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.Sprite && a.Sprite) ? n : Object)], t.prototype, "sprite", void 0), (t = r.__decorate([(0, o.injectable)()], t)) ); })(s.View); t.FingerView = l; }, 23221: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Overlay = void 0); var r = n(22970), i = r.__importDefault(n(52001)), o = n(22674), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._blured = !1), t; } return ( r.__extends(t, e), (t.prototype.onAdded = function () { e.prototype.onAdded.call(this), (this.renderable = !1); }), (t.prototype.blur = function (e) { return ( void 0 === e && (e = 0.3), r.__awaiter(this, void 0, Promise, function () { var t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return this._blured ? [2] : this.blurTween && this.blurTween.isActive() ? [4, this.blurTween.then()] : [3, 2]; case 1: return n.sent(), [3, 4]; case 2: return ( this.setBlured(!0), [ 4, new Promise(function (n) { (t.alpha = 0), (t.renderable = !0), (t.blurTween = i.default.to(t, { duration: e, alpha: 1, onComplete: n, ease: "sine.out" })); }), ] ); case 3: n.sent(), (n.label = 4); case 4: return [2]; } }); }) ); }), (t.prototype.unblur = function (e) { return ( void 0 === e && (e = 0.5), r.__awaiter(this, void 0, Promise, function () { var t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return this.unblurTween && this.unblurTween.isActive() ? [4, this.unblurTween.then()] : [3, 2]; case 1: return n.sent(), [3, 4]; case 2: return ( this.setBlured(!1), [ 4, new Promise(function (n) { t.unblurTween = i.default.to(t, { duration: e, alpha: 0, onComplete: function () { (t.renderable = !1), n(); }, ease: "sine.in", }); }), ] ); case 3: n.sent(), (n.label = 4); case 4: return [2]; } }); }) ); }), (t.prototype.setBlured = function (e) { (this._blured = e), (this.interactive = this._blured); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(n(63421).View); t.Overlay = a; }, 2318: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProgressBar = void 0); var r = n(22970), i = n(22674), o = n(940), a = n(64770), s = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._progress = 0), (t.fg = new o.Graphics()), (t.bg = new o.Graphics()), (t._barWidth = 0), (t._config = { width: 150, height: 3 }), t; } return ( r.__extends(t, e), (t.prototype.init = function (e) { (this._config = e), this.bg.clear().lineTextureStyle({ cap: o.LINE_CAP.ROUND, width: this._config.height, color: 16777215, alpha: 0.3 }).lineTo(this._config.width, 0), (this.barWidth = e.width); }), (t.prototype.onAdded = function () { this.addChild(this.bg, this.fg), e.prototype.onAdded.call(this); }), (t.prototype.show = function (e) { void 0 === e && (e = 1), (this.visible = !0), a.gsap.killTweensOf(this.fg), a.gsap.fromTo(this, { alpha: 0 }, { alpha: 1, duration: 0.5, delay: e, ease: a.Sine.easeOut }); }), (t.prototype.hide = function () { var e = this; a.gsap.to(this, { duration: 0.5, alpha: 0, onComplete: function () { e.visible = !1; }, }); }), Object.defineProperty(t.prototype, "progress", { get: function () { return this._progress; }, set: function (e) { (this._progress = e), a.gsap.killTweensOf(this.fg), a.gsap.to(this, { duration: 0.1, barWidth: this._config.width * this._progress }); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "barWidth", { get: function () { return this._barWidth; }, set: function (e) { (this._barWidth = e), this.fg .clear() .lineTextureStyle({ cap: o.LINE_CAP.ROUND, width: 0.8 * this._config.height, color: 16777215 }) .lineTo(this._barWidth, 0); }, enumerable: !1, configurable: !0, }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(63421).View); t.ProgressBar = s; }, 82732: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ScreenContainer = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.size = {}), t; } return ( r.__extends(t, e), Object.defineProperty(t.prototype, "screen", { get: function () { return this._screen; }, enumerable: !1, configurable: !0, }), (t.prototype.setScreen = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return ( (t = this._screen), (this._screen = e), this._screen && this.addChild(this._screen), this.onResize(), [ 4, Promise.all([(null == t ? void 0 : t.fadeOut) && t.fadeOut(), (null == e ? void 0 : e.fadeIn) && e.fadeIn()]).then(function () { return t && n.removeChild(t); }), ] ); case 1: return r.sent(), [2]; } }); }); }), (t.prototype.onResize = function () { this._screen && this._screen.resize && this._screen.resize(this.size.width, this.size.height); }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(63421).View); t.ScreenContainer = o; }, 29622: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Spinner = void 0); var r = n(22970), i = n(46595), o = n(64770), a = n(22674), s = n(940), u = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.spinning = !1), t; } var n; return ( r.__extends(t, e), (t.prototype.onAdded = function () { this.graphics.scale.set(0.7), this.graphics.anchor.set(0.5), (this.graphics.visible = !1), this.addChild(this.graphics), e.prototype.onAdded.call(this); }), (t.prototype.show = function () { (this.graphics.visible = !0), clearTimeout(this.timeout), o.gsap.killTweensOf(this.graphics), o.gsap.fromTo(this.graphics, { alpha: 0 }, { alpha: 1, duration: 0.5, delay: 1, ease: o.Sine.easeOut }), (this.spinning = !0), this.spin(); }), (t.prototype.hide = function () { var e = this; this.spinning && (o.gsap.killTweensOf(this.graphics), o.gsap.to(this.graphics, { alpha: 0, duration: 0.2, ease: o.Sine.easeIn, onComplete: function () { (e.spinning = !1), (e.graphics.visible = !1), clearTimeout(e.timeout); }, })); }), (t.prototype.spin = function () { var e = this; this.spinning && ((this.graphics.rotation += Math.PI / 6.5), (this.timeout = setTimeout(function () { return e.spin(); }, 100))); }), r.__decorate([(0, i.lazyInject)("spinner.svg"), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.Sprite && s.Sprite) ? n : Object)], t.prototype, "graphics", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(n(63421).View); t.Spinner = u; }, 54658: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserPic = void 0); var r = n(22970), i = n(22674), o = n(940), a = n(63421), s = n(26914), u = (function (e) { function t() { var t = e.call(this) || this; return (t.bgAndImgCont = new o.Container()), (t.bg = new o.Graphics().beginFill(15724527).drawRect(0, 0, 10, 10).endFill()), (t.bg.width = 320), (t.bg.height = 320), t.bgAndImgCont.addChild(t.bg), t.addChild(t.bgAndImgCont), t; } return ( r.__extends(t, e), Object.defineProperty(t.prototype, "user", { get: function () { return this._user; }, set: function (e) { (this._user = e), this._updateInternal(); }, enumerable: !1, configurable: !0, }), (t.prototype._updateInternal = function () { return r.__awaiter(this, void 0, void 0, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return this._sprite && (this.bgAndImgCont.removeChild(this._sprite), delete this._sprite), this._user ? [4, (0, s.loadTexture)(this._user.photo)] : [3, 2]; case 1: ((e = t.sent()).textureCacheIds[0] = "user-photo-".concat(this._user.id)), (this._sprite = new o.Sprite(e)), this.bgAndImgCont.addChild(this._sprite), (this._sprite.width = this.bg.width), (this._sprite.height = this.bg.height), this.onImageLoaded(), (t.label = 2); case 2: return [2]; } }); }); }), (t.prototype.onImageLoaded = function () {}), Object.defineProperty(t.prototype, "sprite", { get: function () { return this._sprite; }, enumerable: !1, configurable: !0, }), (t = r.__decorate([(0, i.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(a.View); t.UserPic = u; }, 74086: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(54658), t), r.__exportStar(n(58628), t), r.__exportStar(n(37106), t), r.__exportStar(n(34809), t), r.__exportStar(n(23221), t), r.__exportStar(n(82732), t), r.__exportStar(n(2318), t), r.__exportStar(n(29622), t); }, 26914: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.loadImage = t.loadTexture = void 0); var r = n(22970), i = n(940), o = n(17905); function a(e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { return [ 2, new Promise(function (t, n) { var r = new Image(); (r.crossOrigin = "Anonymous"), (r.src = e), (r.onload = function () { t(r); }), (r.onerror = function (e) { n(e); }); }), ]; }); }); } (t.loadTexture = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, s; return r.__generator(this, function (r) { switch (r.label) { case 0: if ((t = i.utils.TextureCache[e])) return [2, t]; r.label = 1; case 1: return r.trys.push([1, 3, , 4]), [4, a(e)]; case 2: return (n = r.sent()), [3, 4]; case 3: return (s = r.sent()), o.log.warn("loadImage", s), [3, 4]; case 4: return [2, n ? i.Texture.from(n) : i.Texture.EMPTY]; } }); }); }), (t.loadImage = a); }, 29125: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AnalyticsModule = void 0); var r = n(22674), i = n(37394), o = n(5773); t.AnalyticsModule = new r.ContainerModule(function (e) { e(i.TypesAnalytics.tracker).to(o.AnalyticsTracker).inSingletonScope(); }); }, 5773: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AnalyticsTracker = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(22674), s = (function () { function e() { (this.providers = new Set()), (this._useFb = !0); } return ( (e.prototype.init = function () { var e = o.di.get(i.TypesCore.gameConfig).analytics; if (e) { var t = e.fb; e.firebase; "boolean" == typeof t && (this._useFb = t); } }), (e.prototype.addProvider = function (e) { this.providers.add(e); }), (e.prototype.removeProvider = function (e) { this.providers.delete(e); }), (e.prototype.track = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = r.__read(e, 3), i = n[0], o = n[1], a = n[2]; "object" == typeof o && ((a = o), (o = 0)), o || (o = 0), i && this.providers.forEach(function (e) { return e.track(i, o, a); }); }), (e = r.__decorate([(0, a.injectable)()], e)) ); })(); t.AnalyticsTracker = s; }, 43328: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(29125), t), r.__exportStar(n(24055), t); }, 32031: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.FirebaseAnalyticsProvider = void 0); var r = n(22970), i = n(87819), o = n(22674), a = (function () { function e() {} return ( (e.prototype.init = function (e) { var t = this; (0, i.isSupported)().then(function (n) { n && (t.firebaseAnalytics = (0, i.getAnalytics)(e)); }); }), (e.prototype.track = function (e, t, n) { this.logEvent(e, r.__assign({ value: t }, n)); }), (e.prototype.logEvent = function (e, t) { this.firebaseAnalytics && (0, i.logEvent)(this.firebaseAnalytics, e, t); }), (e = r.__decorate([(0, o.injectable)()], e)) ); })(); t.FirebaseAnalyticsProvider = a; }, 22851: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GTAGAnalyticsProvider = void 0); var r = n(22970), i = n(22674), o = (function () { function e() {} return ( (e.prototype.track = function (e, t, n) { gtag && gtag("event", e, n); }), (e = r.__decorate([(0, i.injectable)()], e)) ); })(); t.GTAGAnalyticsProvider = o; }, 24055: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(32031), t), r.__exportStar(n(22851), t); }, 70685: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AudioModule = void 0); var r = n(22674), i = n(37394), o = n(25359), a = n(66291), s = n(92724), u = n(77795); t.AudioModule = new r.ContainerModule(function (e) { e(i.TypesAudio.model).to(o.AudioModel).inSingletonScope(), e(i.TypesAudio.initAction).to(u.InitAudioAction), e(i.TypesAudio.soundAction).to(s.PlaySoundAction), e(i.TypesAudio.musicAction).to(a.PlayMusicAction); }); }, 77795: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InitAudioAction = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(49081), s = n(22674), u = n(27280), l = n(25359), c = n(46595), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, d, h; return ( r.__extends(t, e), (t.prototype.execute = function () { var e, t; return r.__awaiter(this, void 0, void 0, function () { var n, i, s, u, c, d, h, p, f; return r.__generator(this, function (_) { switch (_.label) { case 0: return (n = this.gameConfig.audio) ? [4, this.cookie.get(l.AudioModel.COOKIE_KEY)] : [3, 2]; case 1: i = _.sent(); try { for (s = r.__values(Object.keys(n)), u = s.next(); !u.done; u = s.next()) (c = u.value), n[c] && ((d = new a.Howl(this.fixPaths(n[c]))), (h = "howl_".concat(c)), o.di.bind(h).toConstantValue(d)); } catch (e) { p = { error: e }; } finally { try { u && !u.done && (f = s.return) && f.call(s); } finally { if (p) throw p.error; } } return this.model.init(null === (e = i[l.AudioModel.COOKIE_KEY]) || void 0 === e ? void 0 : e.sounds, null === (t = i[l.AudioModel.COOKIE_KEY]) || void 0 === t ? void 0 : t.music), [3, 2]; case 2: return [2]; } }); }); }), (t.prototype.fixPaths = function (e, t) { return ( void 0 === t && (t = c.IS_ODR_BUILD ? c.ODR_BUILD_ORIGIN : o.GAME_SCRIPT_ORIGIN), Array.isArray(e.src) ? (e.src = e.src.map(function (e) { return "".concat(t).concat(e); })) : "string" == typeof e.src && (e.src = "".concat(t).concat(e.src)), e ); }), r.__decorate([(0, s.inject)(i.TypesCore.gameConfig), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.GameConfigAudio && u.GameConfigAudio) ? n : Object)], t.prototype, "gameConfig", void 0), r.__decorate([(0, s.inject)(i.TypesAudio.model), r.__metadata("design:type", "function" == typeof (d = void 0 !== l.AudioModel && l.AudioModel) ? d : Object)], t.prototype, "model", void 0), r.__decorate([(0, s.inject)(i.TypesSocial.cookie), r.__metadata("design:type", "function" == typeof (h = void 0 !== i.IUserData && i.IUserData) ? h : Object)], t.prototype, "cookie", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(o.Action); t.InitAudioAction = d; }, 66291: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlayMusicAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (n = t), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, o, a, s, u; return r.__generator(this, function (r) { return (t = e.active), (o = e.sprite), (a = e.howlInstance), (s = a || (0, i.lazyGet)("howl_music")) ? ((u = !isNaN(n.activeMusicState.instance)), t ? (u ? n.activeMusicState.playing || ((n.activeMusicState.playing = !0), this.fadeTo(s, 1, n.activeMusicState.instance)) : ((n.activeMusicState.instance = s.play(o || "track") || NaN), (n.activeMusicState.playing = !0))) : n.activeMusicState.playing && ((n.activeMusicState.playing = !1), u && this.fadeTo(s, 0, n.activeMusicState.instance)), [2]) : [2]; }); }); }), (t.prototype.fadeTo = function (e, t, n, r) { void 0 === r && (r = 500); var i = e.volume(); (r *= Math.abs(Math.min(i, t) - Math.max(i, t))), e.fade(i, t, r, n); }), (t.activeMusicState = { playing: !1 }), (t = n = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.PlayMusicAction = a; }, 92724: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlaySoundAction = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(22674), s = n(25359), u = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { var t; return r.__awaiter(this, void 0, Promise, function () { var n; return r.__generator(this, function (r) { return !this.model.soundsMuted() && (n = this.transformSound(e)) ? [2, (null === (t = (0, o.lazyGet)("howl_sounds")) || void 0 === t ? void 0 : t.play(n)) || -1] : [2, -1]; }); }); }), (t.prototype.transformSound = function (e) { return e; }), r.__decorate([(0, a.inject)(i.TypesAudio.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== s.AudioModel && s.AudioModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.PlaySoundAction = u; }, 56572: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(25359), t), r.__exportStar(n(66291), t), r.__exportStar(n(92724), t), r.__exportStar(n(70685), t); }, 27280: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 25359: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AudioModel = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(22674), s = n(49081), u = (function (e) { function t() { var t = e.call(this) || this; return ( (t._paused = !1), (t._started = !1), (t._ready = !1), (t._isAdPlaying = !1), (t._onBackgroundLoopEnded = function () { return t.onBackgroundLoopEnded(); }), (t.backgroundSounds = [{ id: "howl_music", default: !0 }]), t ); } var n, u, l; return ( r.__extends(t, e), (n = t), (t.prototype.initBackgroundSounds = function () { this.backgroundSounds.forEach(function (e) { (e.howl = (0, i.lazyGet)(e.id)), (e.initiated = !0); }); }), (t.prototype.init = function (e, t) { return ( void 0 === e && (e = !1), void 0 === t && (t = !1), r.__awaiter(this, void 0, Promise, function () { var n; return r.__generator(this, function (r) { return ( this.initBackgroundSounds(), this.addListener(o.AdEvents.STARTED, this.onAdStarted), this.addListener(o.AdEvents.ENDED, this.onAdEnded), this.addListener(i.CommonEvents.PAUSE, this.onPause), this.muteMusic(t), this.muteSounds(e), (null == (n = this.backgroundSounds.find(function (e) { return e.default; })) ? void 0 : n.howl) && (this.activeBackgroundHowl = n.howl), (this._ready = !0), [2, this] ); }); }) ); }), (t.prototype.soundsMuted = function () { return this._sounds; }), (t.prototype.musicMuted = function () { return this._music; }), (t.prototype.muteSounds = function (e) { return this._sounds !== e && ((this._sounds = e), this.dispatch(n.MUTE_SOUNDS, e), this.postData()), this._sounds; }), (t.prototype.muteMusic = function (e) { return this._music !== e && ((this._music = e), this.tapMusic(), this.dispatch(n.MUTE_MUSIC, e), this.postData()), this._music; }), (t.prototype.activateBackgroundMusic = function () { (this._started = !0), this.tapMusic(); }), Object.defineProperty(t.prototype, "ready", { get: function () { return this._ready; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "paused", { get: function () { return this._paused; }, set: function (e) { (this._paused = e), this.tapMusic(); }, enumerable: !1, configurable: !0, }), (t.prototype.onAdStarted = function () { this.isAdPlaying = !0; }), (t.prototype.onAdEnded = function () { this.isAdPlaying = !1; }), Object.defineProperty(t.prototype, "isAdPlaying", { get: function () { return this._isAdPlaying; }, set: function (e) { (this._isAdPlaying = e), this.tapMusic(); }, enumerable: !1, configurable: !0, }), (t.prototype.onPause = function (e) { this.paused = e; }), (t.prototype.postData = function () { var e = this._sounds, t = this._music; this.cookie.save(n.COOKIE_KEY, { sounds: e, music: t }); }), (t.prototype.tapMusic = function () { if (this._ready && this._started) { var e = this._isAdPlaying || (!this._isAdPlaying && this._paused); this.runMusicAction(!this._music && !e); } }), (t.prototype.runMusicAction = function (e) { var t; return r.__awaiter(this, void 0, void 0, function () { var n; return r.__generator(this, function (r) { return (n = this._activeBackgroundHowl), [2, null === (t = (0, i.lazyGet)(o.TypesAudio.musicAction)) || void 0 === t ? void 0 : t.run({ active: e, howlInstance: n })]; }); }); }), (t.prototype.onBackgroundLoopEnded = function () { this.changeBackgroundMusic(); }), (t.prototype.changeBackgroundMusic = function (e) { var t; this.activeBackgroundHowl = null === (t = this.backgroundSounds.find(function (t) { return t.id === e; })) || void 0 === t ? void 0 : t.howl; }), (t.prototype.disableOnBackgroundLoopEnded = function (e) { e && e.off("end", this._onBackgroundLoopEnded); }), (t.prototype.enableOnBackgroundLoopEnded = function (e) { e && e.on("end", this._onBackgroundLoopEnded); }), Object.defineProperty(t.prototype, "activeBackgroundHowl", { get: function () { return this._activeBackgroundHowl; }, set: function (e) { if (e && this._activeBackgroundHowl !== e) { var t = this._activeBackgroundHowl; this.disableOnBackgroundLoopEnded(this._activeBackgroundHowl), this._activeBackgroundHowl && this.runMusicAction(!1), (this._activeBackgroundHowl = e), this.enableOnBackgroundLoopEnded(this._activeBackgroundHowl), t !== this._activeBackgroundHowl && this.activateBackgroundMusic(); } }, enumerable: !1, configurable: !0, }), (t.COOKIE_KEY = "audio"), (t.MUTE_MUSIC = "AudioModel.MUTE_MUSIC"), (t.MUTE_SOUNDS = "AudioModel.MUTE_SOUNDS"), r.__decorate([(0, i.lazyInject)("howl_sounds"), r.__metadata("design:type", "function" == typeof (u = void 0 !== s.Howl && s.Howl) ? u : Object)], t.prototype, "howl", void 0), r.__decorate([(0, a.inject)(o.TypesSocial.cookie), r.__metadata("design:type", "function" == typeof (l = void 0 !== o.IUserData && o.IUserData) ? l : Object)], t.prototype, "cookie", void 0), (t = n = r.__decorate([(0, a.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(i.GlobalEventProvider); t.AudioModel = u; }, 98163: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoreModule = void 0); var r = n(37394), i = n(22674), o = n(3687); t.CoreModule = new i.ContainerModule(function (e) { e(r.TypesCore.gameConfig).toConstantValue({ id: "unset", sid: "unset" }), e(r.TypesCore.dispatcher).to(o.EventDispatcher).inSingletonScope(), e(r.TypesCore.eventProvider).to(o.GlobalEventProvider); }); }, 46021: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Action = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.run = function (e) { var t, n; return r.__awaiter(this, void 0, Promise, function () { var i, o, a, s, u = this; return r.__generator(this, function (r) { switch (r.label) { case 0: (this.data = e), (i = void 0), (o = this.execute(this.data)), (a = new Promise(function (e, t) { (u._resolve = e), (u._reject = t); })), (r.label = 1); case 1: return r.trys.push([1, 3, , 4]), [4, Promise.race([o, a])]; case 2: return (i = r.sent()), [3, 4]; case 3: if (((s = r.sent()), !this.onFailed)) throw s; return null === (t = this.onFailed) || void 0 === t || t.call(null), [3, 4]; case 4: return null === (n = this.onFinish) || void 0 === n || n.call(null), [2, i]; } }); }); }), (t.prototype.terminate = function (e) { var t; null === (t = this._reject) || void 0 === t || t.call(null, e); }), (t.prototype.destroy = function () { delete this.data, delete this._resolve, delete this._reject, delete this.onFinish, delete this.onFailed; }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(3687).GlobalEventProvider); t.Action = o; }, 6210: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LazyAction = void 0); var r = n(22970), i = (function (e) { function t(t) { var n = e.call(this) || this; return (n.callback = t), n; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return (t = this.callback(e)) instanceof Promise ? [4, t] : [3, 2]; case 1: return [2, n.sent()]; case 2: return [2, t]; } }); }); }), t ); })(n(46021).Action); t.LazyAction = i; }, 40073: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParallelAction = void 0); var r = n(22970), i = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i, o, a, s; return r.__generator(this, function (u) { switch (u.label) { case 0: t = []; try { for (n = r.__values(e), i = n.next(); !i.done; i = n.next()) (o = i.value), t.push(o.run()); } catch (e) { a = { error: e }; } finally { try { i && !i.done && (s = n.return) && s.call(n); } finally { if (a) throw a.error; } } return [4, Promise.all(t)]; case 1: return [2, u.sent()]; } }); }); }), t ); })(n(46021).Action); t.ParallelAction = i; }, 44388: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SequenceAction = void 0); var r = n(22970), i = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i, o, a; return r.__generator(this, function (s) { switch (s.label) { case 0: s.trys.push([0, 5, 6, 7]), (t = r.__values(e)), (n = t.next()), (s.label = 1); case 1: return n.done ? [3, 4] : [4, n.value.run()]; case 2: s.sent(), (s.label = 3); case 3: return (n = t.next()), [3, 1]; case 4: return [3, 7]; case 5: return (i = s.sent()), (o = { error: i }), [3, 7]; case 6: try { n && !n.done && (a = t.return) && a.call(t); } finally { if (o) throw o.error; } return [7]; case 7: return [2]; } }); }); }), t ); })(n(46021).Action); t.SequenceAction = i; }, 71269: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.WaitAction = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (n = t), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { return [ 2, new Promise(function (t) { return setTimeout(t, e); }), ]; }); }); }), (t.ms = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { return [2, new n().run(e)]; }); }); }), (t.sec = function (e) { return ( void 0 === e && (e = 1), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { return [2, new n().run(1e3 * e)]; }); }) ); }), (t.frame = function (e) { return ( void 0 === e && (e = 1), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return --e >= 0 ? [ 4, new Promise(function (e) { return requestAnimationFrame(e); }), ] : [3, 2]; case 1: return t.sent(), [3, 0]; case 2: return [2]; } }); }) ); }), (t = n = r.__decorate([(0, i.injectable)()], t)) ); })(n(46021).Action); t.WaitAction = o; }, 44754: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(46021), t), r.__exportStar(n(6210), t), r.__exportStar(n(40073), t), r.__exportStar(n(44388), t), r.__exportStar(n(71269), t); }, 34662: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ODR_BUILD_ORIGIN = t.IS_ODR_BUILD = t.GAME_SCRIPT_ORIGIN = t.CANVAS_ID = t.CommonEvents = void 0), (function (e) { (e.UPDATED = "updated"), (e.PAUSE = "pause"); })(t.CommonEvents || (t.CommonEvents = {})), (t.CANVAS_ID = "game-canvas"), (t.GAME_SCRIPT_ORIGIN = (function () { var e = Array.from(window.document.getElementsByTagName("script")) .filter(function (e) { return -1 !== e.src.indexOf("firebaseapp.com"); }) .filter(function (e) { return e.src.indexOf("main.js"); }) .map(function (e) { return e.src; })[0]; if (e) return e.substr(0, e.lastIndexOf("/") + 1); })() || ""), (t.IS_ODR_BUILD = !1), (t.ODR_BUILD_ORIGIN = (t.IS_ODR_BUILD, "")); }, 10561: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.lazyRun = t.lazyGet = t.lazyInject = t.di = void 0); var r = n(22970), i = n(22674), o = r.__importDefault(n(83758)), a = new i.Container(); t.di = a; var s = (0, o.default)(a).lazyInject; t.lazyInject = s; var u = function (e) { return e && a.isBound(e) ? a.get(e) : void 0; }; t.lazyGet = u; t.lazyRun = function (e, t) { var n; return null === (n = u(e)) || void 0 === n ? void 0 : n.run(t); }; }, 21674: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.EventDispatcher = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return r.__extends(t, e), (t = r.__decorate([(0, i.injectable)()], t)); })(n(99143).EventEmitter); t.EventDispatcher = o; }, 72567: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlobalEventProvider = void 0); var r = n(22970), i = n(37394), o = n(22674), a = n(21674), s = (function () { function e() { this.listenersMap = {}; } var t; return ( (e.prototype.destroy = function () { this.removeAllListeners(); }), (e.prototype.dispatch = function (e, t) { this._dispatcher.emit(e, t); }), (e.prototype.addListener = function (e, t) { this.mapListenerToEvent(e, t, this.listenersMap) ? this._dispatcher.on(e, t, this) : console.warn("Listener " + t + " for event " + e + " is already exists"); }), (e.prototype.addListenerOnce = function (e, t) { var n = this, r = function (i) { t.call(n, i), n.removeListener(e, r); }; this.addListener(e, r); }), (e.prototype.removeListener = function (e, t) { this.unMapListenerToEvent(e, t, this.listenersMap) ? this._dispatcher.off(e, t, this) : console.warn(t + " is not a listener for event " + e); }), (e.prototype.removeListeners = function (e) { var t, n, i = this.listenersMap[e]; if (i) { try { for (var o = r.__values(i), a = o.next(); !a.done; a = o.next()) { var s = a.value; this._dispatcher.off(e, s, this); } } catch (e) { t = { error: e }; } finally { try { a && !a.done && (n = o.return) && n.call(o); } finally { if (t) throw t.error; } } delete this.listenersMap[e]; } else console.warn("There are no any listeners for event " + e); }), (e.prototype.removeAllListeners = function () { var e, t; try { for (var n = r.__values(Object.keys(this.listenersMap)), i = n.next(); !i.done; i = n.next()) { var o = i.value; this.removeListeners(o); } } catch (t) { e = { error: t }; } finally { try { i && !i.done && (t = n.return) && t.call(n); } finally { if (e) throw e.error; } } this.listenersMap = {}; }), (e.prototype.hasListeners = function () { return 0 !== Object.keys(this.listenersMap).length; }), (e.prototype.mapListenerToEvent = function (e, t, n) { var r = n[e]; if (r) { if (r.indexOf(t) > -1) return !1; r.push(t); } else (r = [t]), (n[e] = r); return !0; }), (e.prototype.unMapListenerToEvent = function (e, t, n) { var r = n[e]; if (r) { var i = r.indexOf(t); if (i > -1) return r.splice(i, 1), 0 === r.length && delete n[e], !0; } return !1; }), r.__decorate([(0, o.inject)(i.TypesCore.dispatcher), r.__metadata("design:type", "function" == typeof (t = void 0 !== a.EventDispatcher && a.EventDispatcher) ? t : Object)], e.prototype, "_dispatcher", void 0), (e = r.__decorate([(0, o.injectable)()], e)) ); })(); t.GlobalEventProvider = s; }, 3687: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970), i = r.__importDefault(n(99143)), o = n(22674); r.__exportStar(n(21674), t), r.__exportStar(n(72567), t), (0, o.decorate)((0, o.injectable)(), i.default); }, 46595: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); n(1738), r.__exportStar(n(44754), t), r.__exportStar(n(34662), t), r.__exportStar(n(98163), t), r.__exportStar(n(10561), t), r.__exportStar(n(3687), t); }, 42747: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameFlowModule = void 0); var r = n(37394), i = n(22674), o = n(20926); t.GameFlowModule = new i.ContainerModule(function (e) { e(r.TypesFlow.boot).to(o.BootAction), e(r.TypesFlow.LevelStart).to(o.LevelStartAction), e(r.TypesFlow.LevelEnd).to(o.LevelEndAction), e(r.TypesFlow.LevelNext).to(o.LevelNextAction), e(r.TypesFlow.LevelRestart).to(o.LevelRestartAction), e(r.TypesFlow.PlayWith).to(o.PlayWithOpponentAction); }); }, 65113: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BootAction = void 0); var r = n(22970), i = n(43328), o = n(37394), a = n(17905), s = n(51159), u = n(46595), l = n(57228), c = r.__importStar(n(75899)), d = n(22674), h = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, h; return ( r.__extends(t, e), (t.prototype.execute = function () { var e, t, n; return r.__awaiter(this, void 0, Promise, function () { var d, h, p, f, _ = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return ( null == (d = (0, u.lazyGet)(o.TypesAnalytics.tracker)) || d.addProvider(new i.GTAGAnalyticsProvider()), (h = u.di.get(o.TypesCore.gameConfig)), (0, u.lazyRun)("template.action"), (p = h.i18n) && s.Localize.addTemplates(p), [ 4, Promise.all([ this.page.isBusReadyAsync().then(function () { f = (0, u.lazyRun)(o.TypesApp.loginAction); }), (0, u.lazyRun)(o.TypesFlow.assetsPreload), ]), ] ); case 1: return r.sent(), (this.page.assetsProgress = 1), a.log.trace("all done"), [4, this.social.startGameAsync()]; case 2: return r.sent(), (0, u.lazyRun)(o.TypesAudio.initAction), [4, (0, u.lazyRun)(o.TypesFlow.UI.setupAction)]; case 3: return r.sent(), Promise.all([o.TypesFlow.assetsProcess, o.TypesAds.initAction].map(u.lazyRun)).then(), [4, this.social.init(null === (e = this.page.bus) || void 0 === e ? void 0 : e.params)]; case 4: return ( r.sent(), (function () { var e = _.social.me, t = e.id, n = e.name, r = e.photo; c.setUser({ id: t, name: n, photo: r, locale: s.Localize.defaultLocale }); })(), null === (t = (0, u.lazyGet)(o.TypesSocial.refRewardsModel)) || void 0 === t || t.init(), [4, f] ); case 5: return r.sent(), (l.AdManagerBase.config.throttling.interstitial.systemStart = Date.now()), [4, (0, u.lazyRun)(o.TypesFlow.mainAction)]; case 6: return r.sent(), [4, null === (n = (0, u.lazyGet)(o.TypesAudio.model)) || void 0 === n ? void 0 : n.activateBackgroundMusic()]; case 7: return r.sent(), [2]; } }); }); }), r.__decorate([(0, d.inject)(o.TypesApp.pageModel), r.__metadata("design:type", "function" == typeof (n = void 0 !== l.PageModel && l.PageModel) ? n : Object)], t.prototype, "page", void 0), r.__decorate([(0, d.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (h = void 0 !== l.ISocial && l.ISocial) ? h : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, d.injectable)()], t)) ); })(u.Action); t.BootAction = h; }, 76427: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CheatsAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n, o, a, s; return r.__generator(this, function (u) { return ( (t = document.getElementById(i.CANVAS_ID)), (n = r.__read(e, 3)), (o = n[0]), (a = n[1]), (s = n[2]), a || (a = o), s || (s = a || o), t && (document.addEventListener("touchstart", function (e) { var t; switch (null === (t = null == e ? void 0 : e.touches) || void 0 === t ? void 0 : t.length) { case 2: o(); break; case 3: a(); break; case 4: s(); } }), t.addEventListener("pointerdown", function (e) { return e.shiftKey && e.altKey ? s() : e.altKey ? a() : e.shiftKey ? o() : void 0; })), [2] ); }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.CheatsAction = a; }, 54256: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelEndAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(22674), s = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.TRACK_EVENT = "level_end"), t; } return ( r.__extends(t, e), (t.prototype.beforeLaunch = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return (this._won = this.isWon()), this.tryToShowBanner(), [4, Promise.all([this.submitScore(), this.showAdIfNeeded()])]; case 1: return e.sent(), [2]; } }); }); }), (t.prototype.launch = function () { var e; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return this.sendPush(o.TypesNotification.finish, { isWon: this._won }), [4, null === (e = (0, i.lazyGet)(o.TypesFlow.UI.endScreenAction)) || void 0 === e ? void 0 : e.run(this._won)]; case 1: return t.sent(), [2]; } }); }); }), (t.prototype.submitScore = function () { var e, t, n; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (r) { switch (r.label) { case 0: return this.social.postSessionScore(), null === (e = this.leaderboardGlobal) || void 0 === e || e.submit(this.social.me.scoreSession).then(), this.social.me.scoreSession > this.social.me.scoreGlobal && (null === (t = (0, i.lazyGet)(o.TypesFlow.share)) || void 0 === t || t.run()), this.social.inSolo ? [3, 2] : [4, null === (n = this.leaderboardContext) || void 0 === n ? void 0 : n.submit(this.social.me.scoreSession)]; case 1: r.sent(), (r.label = 2); case 2: return [2]; } }); }); }), (t.prototype.needToShowAD = function () { return !1; }), (t.prototype.isWon = function () { if ("boolean" == typeof this.data) return this.data; if (this.social.inSolo) return this.social.me.scoreSession > this.social.me.scoreGlobal; if (this.social.inBlindContext) return !0; if (this.social.inGroup) { var e = r.__read( this.social.contextPlayers.sort(function (e, t) { return t.scoreContext - e.scoreContext; }), 1 )[0]; if (e) return Math.max(this.social.me.scoreContext, this.social.me.scoreSession) >= e.scoreContext; } return !!(this.social.opponent && this.social.me.scoreSession > this.social.opponent.scoreContext); }), Object.defineProperty(t.prototype, "leaderboardContext", { get: function () { return (0, i.lazyGet)(o.TypesSocial.leaderboardContext); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "leaderboardGlobal", { get: function () { return (0, i.lazyGet)(o.TypesSocial.leaderboardGlobal); }, enumerable: !1, configurable: !0, }), (t.prototype.track = function () { var e; null === (e = (0, i.lazyGet)(o.TypesAnalytics.tracker)) || void 0 === e || e.track(this.TRACK_EVENT, 1, { status: this.isWon() ? "won" : "loose" }); }), (t = r.__decorate([(0, a.injectable)()], t)) ); })(n(1391).SocialFlowAction); t.LevelEndAction = s; }, 81719: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelNextAction = void 0); var r = n(22970), i = n(57228), o = n(37394), a = n(22674), s = n(1391), u = n(75354), l = (function (e) { function t() { var t = e.call(this) || this; return ( (t.TRACK_EVENT = "level_next"), (t.onFailed = function () { throw new Error("Something went wrong"); }), t ); } var n, s; return ( r.__extends(t, e), (n = t), (t.prototype.launch = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return e ? (e !== this.social.opponent ? [3, 1] : [2, this.gotoNextLevel()]) : (n.FREE_SOLO_ATTEMPTS--, [2, this.playNextSolo()]); case 1: return [4, this.social.playWith(e, !0)]; case 2: switch (t.sent()) { case i.SOCIAL_POPUP.ACCEPTED: return [2, this.gotoNextLevel(!0)]; case i.SOCIAL_POPUP.CANCELLED: if (n.FREE_SOLO_ATTEMPTS > 0) return n.FREE_SOLO_ATTEMPTS--, [2, this.playNextSolo()]; } t.label = 3; case 3: return [2]; } }); }); }), (t.prototype.playNextSolo = function () { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, Promise.all([this.social.playSolo(), this.gotoNextLevel()])]; case 1: return e.sent(), [2]; } }); }); }), (t.prototype.gotoNextLevel = function (e) { return ( void 0 === e && (e = !1), r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return (this.levelStart.waitForContextChange = e), [4, this.levelStart.run()]; case 1: return t.sent(), [2]; } }); }) ); }), (t.prototype.needToShowAD = function () { return !1; }), (t.FREE_SOLO_ATTEMPTS = Number.MAX_SAFE_INTEGER), r.__decorate([(0, a.inject)(o.TypesFlow.LevelStart), r.__metadata("design:type", "function" == typeof (s = void 0 !== u.LevelStartAction && u.LevelStartAction) ? s : Object)], t.prototype, "levelStart", void 0), (t = n = r.__decorate([(0, a.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(s.SocialFlowAction); t.LevelNextAction = l; }, 43915: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelRestartAction = void 0); var r = n(22970), i = n(37394), o = n(22674), a = n(46595), s = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.TRACK_EVENT = "level_restart"), (t.SHOW_AD_INTERVAL = 10), t; } var n; return ( r.__extends(t, e), (n = t), (t.prototype.needToShowAD = function () { return Date.now() - n.LAST_RESTART < 1e3 * this.SHOW_AD_INTERVAL; }), (t.prototype.launch = function (e) { var t; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return (this.social.me.scoreSession = 0), [4, null === (t = (0, a.lazyGet)(i.TypesFlow.UI.startScreenAction)) || void 0 === t ? void 0 : t.run()]; case 1: return e.sent(), (n.LAST_RESTART = Date.now()), [2]; } }); }); }), (t.LAST_RESTART = Date.now()), (t = n = r.__decorate([(0, o.injectable)()], t)) ); })(n(1391).SocialFlowAction); t.LevelRestartAction = s; }, 75354: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LevelStartAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(22674), u = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.TRACK_EVENT = "level_start"), (t.waitForContextChange = !1), t; } return ( r.__extends(t, e), (t.prototype.launch = function (e) { var t; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return (this.social.me.scoreSession = 0), this.tryToShowBanner(), [4, null === (t = (0, i.lazyGet)(o.TypesFlow.UI.startScreenAction)) || void 0 === t ? void 0 : t.run()]; case 1: return e.sent(), [2]; } }); }); }), (t.prototype.beforeLaunch = function () { return r.__awaiter(this, void 0, Promise, function () { var t = this; return r.__generator(this, function (n) { switch (n.label) { case 0: return ( (this._contextChangePromise = this.waitForContextChange ? new Promise(function (e) { return t.social.once(a.SocialEvents.CONTEXT_CHANGE, e); }) : Promise.resolve()), [ 4, Promise.all([ r.__awaiter(t, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, this._contextChangePromise]; case 1: return e.sent(), this.sendPush(o.TypesNotification.start), [2]; } }); }), e.prototype.beforeLaunch.call(this), ]), ] ); case 1: return n.sent(), [2]; } }); }); }), (t = r.__decorate([(0, s.injectable)()], t)) ); })(n(1391).SocialFlowAction); t.LevelStartAction = u; }, 73393: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlayWithOpponentAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(22674), u = n(6585), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, i; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, this.social.playWith(e, !0)]; case 1: return t.sent() !== a.SOCIAL_POPUP.ACCEPTED ? [3, 3] : [4, this.levelStart.run()]; case 2: t.sent(), (t.label = 3); case 3: return [2]; } }); }); }), r.__decorate([(0, s.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], t.prototype, "social", void 0), r.__decorate([(0, s.inject)(o.TypesFlow.LevelStart), r.__metadata("design:type", "function" == typeof (i = void 0 !== u.LevelStartAction && u.LevelStartAction) ? i : Object)], t.prototype, "levelStart", void 0), t ); })(i.Action); t.PlayWithOpponentAction = l; }, 1391: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialFlowAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(17905), u = n(22674), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, l, c, d; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return s.log.debug("#gameflow", this), [4, this.beforeLaunch()]; case 1: return t.sent(), [4, this.launch(e)]; case 2: return t.sent(), [4, this.afterLaunch()]; case 3: return t.sent(), [2]; } }); }); }), (t.prototype.beforeLaunch = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, this.showAdIfNeeded()]; case 1: return e.sent(), [2]; } }); }); }), (t.prototype.afterLaunch = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return this.TRACK_EVENT && this.track(), [2]; }); }); }), (t.prototype.showAdIfNeeded = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return this.needToShowAD() ? [4, this.showAd()] : [3, 2]; case 1: e.sent(), (e.label = 2); case 2: return [2]; } }); }); }), (t.prototype.sendPush = function (e, t) { this.sendPushAsync(e, t).then(); }), (t.prototype.sendPushAsync = function (e, t) { var n; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (r) { switch (r.label) { case 0: return [4, null === (n = (0, i.lazyGet)(e)) || void 0 === n ? void 0 : n.run(t)]; case 1: return r.sent(), [2]; } }); }); }), (t.prototype.showAd = function () { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [4, this.adAction.run()]; case 1: return e.sent(), [2]; } }); }); }), (t.prototype.needToShowAD = function () { return !0; }), (t.prototype.tryToShowBanner = function () { var e, t; this.gameConfig.useBannerAd && (null === (t = (e = this.adManager).showBanner) || void 0 === t || t.call(e)); }), (t.prototype.track = function () { var e; null === (e = (0, i.lazyGet)(o.TypesAnalytics.tracker)) || void 0 === e || e.track("".concat(this.social.session.ftue ? "ftue_" : "").concat(this.TRACK_EVENT)); }), r.__decorate([(0, u.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], t.prototype, "social", void 0), r.__decorate([(0, u.inject)(o.TypesAds.adAction), r.__metadata("design:type", "function" == typeof (l = void 0 !== a.AdAction && a.AdAction) ? l : Object)], t.prototype, "adAction", void 0), r.__decorate([(0, i.lazyInject)(o.TypesCore.gameConfig), r.__metadata("design:type", "function" == typeof (c = void 0 !== o.GameConfig && o.GameConfig) ? c : Object)], t.prototype, "gameConfig", void 0), r.__decorate([(0, i.lazyInject)(o.TypesAds.manager), r.__metadata("design:type", "function" == typeof (d = void 0 !== a.IAdManager && a.IAdManager) ? d : Object)], t.prototype, "adManager", void 0), (t = r.__decorate([(0, u.injectable)()], t)) ); })(i.Action); t.SocialFlowAction = l; }, 20926: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(1391), t), r.__exportStar(n(76427), t), r.__exportStar(n(65113), t), r.__exportStar(n(75354), t), r.__exportStar(n(43915), t), r.__exportStar(n(54256), t), r.__exportStar(n(81719), t), r.__exportStar(n(73393), t); }, 6585: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(20926), t), r.__exportStar(n(42747), t); }, 50629: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Localize = void 0); var r = n(22970), i = (function () { function e() {} return ( (e.addTemplates = function (t) { Object.keys(t).forEach(function (n) { return e.templates.set(n, t[n]); }); }), (e.get = function (t, n, i) { void 0 === i && (i = e.defaultLocale); var o = this.templates.get(t); if (null == o ? void 0 : o.localizations) { var a = (function (e, t) { var n = r.__read(e.split("_"), 2), i = n[0], o = n[1]; if (t && "en" !== i) { var a = Object.keys(t), s = a.filter(function (e) { return i === e.split("_")[0]; }); if (1 == s.length) return s[0]; if (s.length > 1) { var u = a.filter(function (e) { return o === e.split("_")[1]; }); if (1 == u.length) return u[0]; console.warn('Unable to determine locale for "'.concat(e, '"')); } } })(i, o.localizations); if (a) { var s = o.localizations[a]; if (s) return s; } } return (null == o ? void 0 : o.default) || n || t; }), Object.defineProperty(e, "defaultLocale", { get: function () { return ( e._defaultLocale || (e._defaultLocale = (function (e) { if (e) { var t = r.__read(e.split("-"), 2), n = t[0], i = t[1]; return i ? "".concat(n, "_").concat(i.toLocaleUpperCase()) : "".concat(n, "_").concat(n.toUpperCase()); } return "en_US"; })(null === window || void 0 === window ? void 0 : window.navigator.language)), e._defaultLocale ); }, set: function (t) { e._defaultLocale = t; }, enumerable: !1, configurable: !0, }), (e.templates = new Map()), e ); })(); t.Localize = i; }, 51159: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(52892), t), r.__exportStar(n(50629), t); }, 93095: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 87171: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 52892: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(93095), t), r.__exportStar(n(87171), t); }, 39622: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 47199: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 70623: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 8682: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 78632: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AdEvents = void 0), (function (e) { (e.STARTED = "AdEvents.Started"), (e.ENDED = "AdEvents.Ended"), (e.BANNER_SHOWN = "AdEvents.BannerShown"), (e.BANNER_HIDDEN = "AdEvents.BannerHidden"); })(t.AdEvents || (t.AdEvents = {})); }, 80108: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AdResponse = void 0), (function (e) { (e[(e.UNKNOWN = 0)] = "UNKNOWN"), (e[(e.NOT_SUPPORTED = 1)] = "NOT_SUPPORTED"), (e[(e.PLAYED = 2)] = "PLAYED"), (e[(e.THROTTLED = 3)] = "THROTTLED"), (e[(e.NO_FILL = 4)] = "NO_FILL"), (e[(e.CANCELLED = 5)] = "CANCELLED"), (e[(e.FAILED = 6)] = "FAILED"); })(t.AdResponse || (t.AdResponse = {})); }, 52972: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(8682), t), r.__exportStar(n(78632), t), r.__exportStar(n(80108), t); }, 23130: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 14911: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 2861: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(23130), t), r.__exportStar(n(14911), t); }, 37394: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(70623), t), r.__exportStar(n(47199), t), r.__exportStar(n(39622), t), r.__exportStar(n(52972), t), r.__exportStar(n(2861), t), r.__exportStar(n(38616), t), r.__exportStar(n(81997), t); }, 363: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 81997: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), n(22970).__exportStar(n(363), t); }, 42700: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Types2D = void 0), (t.Types2D = { screenContainer: "2d.screencontainer", overlay: "2d.overlay", finger: "2d.finger", preloadAssetsAction: "2d.preload", screenShotAction: "2d.screenshot", spriteRenderer: "2d.spriteRenderer", rootView: "2d.rootView", spinner: "2d.spinner", blackSquareGraphics: "2d.blackSquareGraphics", whiteSquareGraphics: "2d.whiteSquareGraphics", userPic: "2d.userPic", circleAvatar: "2d.circleAvatar" }); }, 15608: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesAds = void 0), (function (e) { (e.initAction = "ads.initAction"), (e.manager = "ads.manager"), (e.i18n = "ads.i18n"), (e.adAction = "ads.adAction"); })(t.TypesAds || (t.TypesAds = {})); }, 87515: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesAnalytics = void 0), (t.TypesAnalytics = { tracker: "analytics.tracker" }); }, 15318: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesApp = void 0), (function (e) { (e.model = "app.model"), (e.pageModel = "page.model"), (e.loginAction = "app.loginAction"), (e.authAction = "app.authAction"); })(t.TypesApp || (t.TypesApp = {})); }, 94296: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesAudio = void 0), (function (e) { (e.model = "audio.model"), (e.initAction = "audio.initAction"), (e.soundAction = "audio.soundAction"), (e.musicAction = "audio.musicAction"); })(t.TypesAudio || (t.TypesAudio = {})); }, 7807: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesCore = void 0), (t.TypesCore = { gameConfig: "app.data", dispatcher: "core.dispatcher", eventProvider: "core.eventProvider", runtimeData: "core.runtimeData" }); }, 55061: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesDevice = void 0), (t.TypesDevice = { initAction: "device.initAction", model: "device.model" }); }, 64211: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesFlow = void 0), (t.TypesFlow = { boot: "flow.boot", mainAction: "flow.gameAction", assetsPreload: "assets.preload", assetsProcess: "assets.process", LoadRemoteConfigAction: "flow.remoteConfigAction", LevelStart: "flow.levelStart", LevelRestart: "flow.levelRestart", LevelNext: "flow.LevelNext", LevelEnd: "flow.levelEnd", PlayWith: "flow.PlayWith", share: "flow.share", UI: { setupAction: "ui.setupAction", startScreenAction: "ui.startScreenAction", endScreenAction: "ui.endScreenAction" } }); }, 6119: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesNotification = void 0), (function (e) { (e.start = "ntf.start"), (e.finish = "ntf.finish"), (e.leave = "ntf.leave"), (e.i18n = "ntf.localizations"); })(t.TypesNotification || (t.TypesNotification = {})); }, 5903: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesPromo = void 0), (t.TypesPromo = { config: "cross.config", component: "cross.component", random: "cross.randomized", randomComponent: "cross.randomGameConf" }); }, 19669: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesSocial = void 0), (function (e) { (e.model = "social.model"), (e.vibrationManager = "social.vibrationManager"), (e.auth = "social.auth"), (e.cookie = "social.cookie"), (e.user = "social.user"), (e.payments = "social.payments"), (e.refRewardsModel = "social.irewards"), (e.notifications = "social.notifications"), (e.dummyUser = "social.dummyUser"), (e.userScore = "social.user.score"), (e.leaderboardGlobal = "social.leaderboard.global"), (e.leaderboardContext = "social.leaderboard.context"), (e.pauseAction = "social.pauseAction"); })(t.TypesSocial || (t.TypesSocial = {})); }, 9043: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypesUI = void 0), (t.TypesUI = { root: "ui.root", uiRootClass: "ui.root.class", setupAction: "ui.setupAction", startScreenAction: "ui.startScreenAction", endScreenAction: "ui.endScreenAction", events: { SCREEN_CHANGED: "UIEvents.SCREEN_CHANGED", POPUP: "UIEvents.POPUP", SHOW_CUSTOM_ALERT: "UIEvents.SHOW_CUSTOM_ALERT" }, screen: { GAME_OVER: "ui.screen.GAME_OVER", HOME: "ui.screen.HOME", WIN: "ui.screen.WIN", SHOP: "ui.screen.SHOP", LEADERBOARD: "ui.screen.LEADERBOARD", GAMEPLAY: "ui.screen.GAMEPLAY" }, customComponent: { SOCIAL_BANNERS: "ui.customComponent.SOCIAL_BANNERS" } }); }, 38616: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(42700), t), r.__exportStar(n(87515), t), r.__exportStar(n(94296), t), r.__exportStar(n(7807), t), r.__exportStar(n(64211), t), r.__exportStar(n(5903), t), r.__exportStar(n(19669), t), r.__exportStar(n(6119), t), r.__exportStar(n(15608), t), r.__exportStar(n(15318), t), r.__exportStar(n(9043), t), r.__exportStar(n(55061), t); }, 94200: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AnalyticsTrackerYoutube = void 0); var r = n(22970), i = n(22674), o = (function () { function e() {} return (e.prototype.init = function () {}), (e.prototype.track = function () {}), (e.prototype.addProvider = function () {}), (e.prototype.removeProvider = function () {}), (e = r.__decorate([(0, i.injectable)()], e)); })(); t.AnalyticsTrackerYoutube = o; }, 60521: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameModuleYoutube = void 0); var r = n(46595), i = n(37394), o = n(57228), a = n(22674), s = n(43810), u = n(23827), l = n(48347), c = n(94200), d = n(57238); t.GameModuleYoutube = new a.ContainerModule(function () { r.di.load(o.AdsModule), r.di.load(s.SocialModuleYoutube), r.di.rebind(i.TypesApp.pageModel).to(l.PageModelYoutube).inSingletonScope(), r.di.rebind("sentryAction").to(u.SetupSentryActionYoutube), r.di.rebind(i.TypesAnalytics.tracker).to(c.AnalyticsTrackerYoutube).inSingletonScope(), r.di.rebind(i.TypesAudio.model).to(d.AudioModelYoutube).inSingletonScope(), r.di.rebind(i.TypesApp.pageModel).to(l.PageModelYoutube).inSingletonScope(); }); }, 43810: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialModuleYoutube = void 0); var r = n(37394), i = n(57228), o = n(22674), a = n(9649), s = n(22e3), u = n(55375), l = n(23656), c = n(51826); t.SocialModuleYoutube = new o.ContainerModule(function (e) { var t; e(r.TypesSocial.model).to(s.SocialModelYoutube).inSingletonScope(), e(r.TypesSocial.cookie).to(a.UserGameYoutube).inSingletonScope(), e(r.TypesSocial.payments).to(i.PaymentsModelBase), e(r.TypesSocial.user).to(u.UserYoutube), e(r.TypesSocial.userScore).to(i.UserScore), e(r.TypesSocial.leaderboardGlobal).to(c.LeaderboardGlobalYoutube).inSingletonScope(), e(r.TypesSocial.leaderboardContext).to(l.LeaderboardContextYoutube).inSingletonScope(), e(r.TypesSocial.dummyUser).toDynamicValue(function (e) { if (!t) { t = e.container.get(r.TypesSocial.user); var n = URL.createObjectURL(new Blob(['\n \n \n \n '], { type: "image/svg+xml" })); t.init({ id: "unknown", photo: n }); } return t; }); }); }, 23827: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SetupSentryActionYoutube = void 0); var r = n(22970), i = n(46595), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return console.log("Sentry is not supported"), [2]; }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.SetupSentryActionYoutube = a; }, 48347: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PageModelYoutube = void 0); var r = n(22970), i = n(57228), o = n(22674), a = (function (e) { function t() { var t = e.call(this) || this; return (t._onPause = t.onPause.bind(t)), (t._onResume = t.onResume.bind(t)), (t._unsetPauseCallback = ytgame.system.onPause(t._onPause)), (t._unsetResumeCallback = ytgame.system.onResume(t._onResume)), t; } return ( r.__extends(t, e), (t.prototype.onPause = function () { this.ytSystemPaused = !0; }), Object.defineProperty(t.prototype, "ytSystemPaused", { set: function (e) { e !== this._ytSystemPaused && ((this._ytSystemPaused = e), this.callPagePauseAction(this._ytSystemPaused)); }, enumerable: !1, configurable: !0, }), (t.prototype.onResume = function () { this.ytSystemPaused = !1; }), Object.defineProperty(t.prototype, "windowBlured", { get: function () { return this._ytSystemPaused; }, set: function (e) {}, enumerable: !1, configurable: !0, }), (t.prototype.destroy = function () { this._unsetPauseCallback(), this._unsetResumeCallback(), e.prototype.destroy.call(this); }), (t = r.__decorate([(0, o.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(i.PageModel); t.PageModelYoutube = a; }, 57238: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AudioModelYoutube = void 0); var r = n(22970), i = n(56572), o = n(22674), a = n(17905), s = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._ytSoundsMuted = !1), (t._ytMusicMuted = !1), (t._ytReady = !1), (t._ytStarted = !1), t; } return ( r.__extends(t, e), (t.prototype.init = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var e, t; return r.__generator(this, function (n) { return ( this.initBackgroundSounds(), (e = ytgame.system.isAudioEnabled()), (this._ytMusicMuted = !e), (this._ytSoundsMuted = !e), this.setApiCallback(), (null == (t = this.backgroundSounds.find(function (e) { return e.default; })) ? void 0 : t.howl) && (this.activeBackgroundHowl = t.howl), (this._ytReady = !0), [2, this] ); }); }); }), (t.prototype.activateBackgroundMusic = function () { (this._ytStarted = !0), this.tapMusic(); }), (t.prototype.soundsMuted = function () { return this._ytMusicMuted; }), (t.prototype.musicMuted = function () { return this._ytMusicMuted; }), (t.prototype.muteSounds = function (e) { return a.log.info("sounds listen yt api"), this._ytSoundsMuted; }), (t.prototype.muteMusic = function (e) { return a.log.info("music listen yt api"), this._ytMusicMuted; }), (t.prototype.onAudioEnabled = function () { console.log("audio enabled"); this.setYtMute(false), this.dispatchMuteEvents(false); }), (t.prototype.tapMusic = function () { this._ytReady && this._ytStarted && this.runMusicAction(!this._ytMusicMuted); }), (t.prototype.setYtMute = function (e) { (this._ytMusicMuted = e), (this._ytSoundsMuted = e); }), (t.prototype.dispatchMuteEvents = function (e) { this.dispatch(i.AudioModel.MUTE_MUSIC, e), this.dispatch(i.AudioModel.MUTE_SOUNDS, e); }), (t.prototype.onAudioDisabled = function () { this.setYtMute(!0), this.dispatchMuteEvents(!0); }), (t.prototype.setApiCallback = function () { var e = this; ytgame.system.onAudioEnabledChange(function (t) { t ? e.onAudioEnabled() : e.onAudioDisabled(); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.AudioModel); t.AudioModelYoutube = s; }, 9649: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserGameYoutube = void 0); var r = n(22970), i = n(57228), o = n(22674), a = n(17905), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.write = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { (t = {}), this.cache.forEach(function (n, r) { (e && !e.includes(r)) || (t[r] = n); }), a.log.trace(this, "upload", t); try { return [2, ytgame.game.saveData(JSON.stringify(t))]; } catch (e) { a.log.error(this, "upload", e); } return [2]; }); }); }), (t.prototype.read = function (e) { return r.__awaiter(this, void 0, void 0, function () { var e, t, n, i = this; return r.__generator(this, function (r) { switch (r.label) { case 0: (e = ""), (r.label = 1); case 1: return r.trys.push([1, 3, , 4]), [4, ytgame.game.loadData()]; case 2: return (e = r.sent()), [3, 4]; case 3: return (t = r.sent()), a.log.error(this, "download", t), [3, 4]; case 4: if ((a.log.trace(this, "download", e), e)) try { (n = JSON.parse(e)), Object.keys(n).forEach(function (e) { i.cache.set(e, n[e]); }); } catch (e) { a.log.error(e); } return (this.lastSync = Date.now()), [2]; } }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.UserDataBase); t.UserGameYoutube = s; }, 57768: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), n(22970).__exportStar(n(60521), t); }, 23656: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderboardContextYoutube = void 0); var r = n(22970), i = n(57228), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return r.__extends(t, e), (t = r.__decorate([(0, o.injectable)()], t)); })(i.LeaderboardContextExternal); t.LeaderboardContextYoutube = a; }, 51826: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderboardGlobalYoutube = void 0); var r = n(22970), i = n(57228), o = n(22674), a = n(17905), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.sync = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return !1, console.log("LeaderboardGlobalYoutube sync"), [2, false]; }); }); }), (t.prototype.submit = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var t, n; return r.__generator(this, function (r) { switch (r.label) { case 0: console.log("LeaderboardGlobalYoutube submit", e), (t = !1), (r.label = 1); case 1: return r.trys.push([1, 3, , 4]), [4, ytgame.engagement.sendScore({ value: e })]; case 2: return r.sent(), (t = !0), [3, 4]; case 3: return (n = r.sent()), a.log.error(n), [3, 4]; case 4: return [2, t]; } }); }); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.LeaderboardGlobalExternal); t.LeaderboardGlobalYoutube = s; }, 22e3: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialModelYoutube = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(22674), u = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.leaderboards = []), t; } var n, u, l; return ( r.__extends(t, e), (t.prototype.init = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t; return r.__generator(this, function (n) { switch (n.label) { case 0: return this.leaderboards.push(this._leaderboardContext, this._leaderboardGlobal), (e = this._meGameId || "anonymous"), (t = i.di.get(o.TypesSocial.dummyUser)), this._me || (this._me = i.di.get(o.TypesSocial.user).init({ id: e, photo: t.photo }) || t), this.cookie.save("usr", e), [4, this.syncLeaderboards()]; case 1: return n.sent(), [2]; } }); }); }), Object.defineProperty(t.prototype, "me", { get: function () { return this._me; }, enumerable: !1, configurable: !0, }), (t.prototype.startGameAsync = function () { var e, t; return r.__awaiter(this, void 0, Promise, function () { var n, i; return r.__generator(this, function (r) { return (n = (null === (e = this.pageModel.bus) || void 0 === e ? void 0 : e.params).ytgame), (i = (null === (t = this.pageModel.bus) || void 0 === t ? void 0 : t.params).guid), (this._meGameId = i || "anonime"), n.game.gameReady(), [2]; }); }); }), Object.defineProperty(t.prototype, "socialPlatform", { get: function () { return "yt"; }, enumerable: !1, configurable: !0, }), (t.prototype.syncLeaderboards = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return [ 4, Promise.all( this.leaderboards.map(function (e) { return e.sync(); }) ), ]; case 1: return e.sent(), [2]; } }); }); }), r.__decorate([(0, s.inject)(o.TypesSocial.leaderboardContext), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ILeaderboard && a.ILeaderboard) ? n : Object)], t.prototype, "_leaderboardContext", void 0), r.__decorate([(0, s.inject)(o.TypesSocial.leaderboardGlobal), r.__metadata("design:type", "function" == typeof (u = void 0 !== a.ILeaderboard && a.ILeaderboard) ? u : Object)], t.prototype, "_leaderboardGlobal", void 0), r.__decorate([(0, s.inject)(o.TypesApp.pageModel), r.__metadata("design:type", "function" == typeof (l = void 0 !== a.PageModel && a.PageModel) ? l : Object)], t.prototype, "pageModel", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(a.SocialModelBase); t.SocialModelYoutube = u; }, 55375: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserYoutube = void 0); var r = n(22970), i = n(22674), o = n(37394), a = n(57228), s = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._isNew = !1), (t.rawData = { id: "yt_user" }), t; } var n; return ( r.__extends(t, e), (t.prototype.init = function (e, t) { return void 0 === t && (t = !1), (this._isNew = t), this; }), Object.defineProperty(t.prototype, "id", { get: function () { return "null"; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "name", { get: function () { return "Player"; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "photo", { get: function () { return "null"; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "scoreSession", { get: function () { return this._scores.getScore(a.ScoreType.SESSION) || 0; }, set: function (e) { this._scores.setScoreSession(e); }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "scoreGlobal", { get: function () { return this._scores.getScore(a.ScoreType.GLOBAL) || 0; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "scoreContext", { get: function () { return this._scores.getScore(a.ScoreType.CONTEXT) || 0; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "scores", { get: function () { return this._scores; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "isNew", { get: function () { return this._isNew; }, enumerable: !1, configurable: !0, }), r.__decorate([(0, i.inject)(o.TypesSocial.userScore), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.IScore && a.IScore) ? n : Object)], t.prototype, "_scores", void 0), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(46595).EventDispatcher); t.UserYoutube = s; }, 31909: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AdAction = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(22674), s = n(69386), u = n(89448), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i; return r.__generator(this, function (r) { switch (r.label) { case 0: return (t = void 0), (n = !1), (i = !0), "boolean" == typeof e ? (n = e) : void 0 !== e && ((t = e.placement), (n = e.reward), (i = e.preloadNext)), [4, this.showAd(t, n, i)]; case 1: return r.sent(), [2]; } }); }); }), (t.prototype.showAd = function (e, t, n) { return ( void 0 === t && (t = !1), void 0 === n && (n = !0), r.__awaiter(this, void 0, Promise, function () { var o; return r.__generator(this, function (r) { switch (r.label) { case 0: return (o = i.AdResponse.UNKNOWN), t ? [4, this.ads.showRewardAd(e || s.AdManagerBase.config.ids.REWARD, n)] : [3, 2]; case 1: return (o = r.sent()), [3, 4]; case 2: return [4, this.ads.showAd(e || s.AdManagerBase.config.ids.INTER, !1, n)]; case 3: (o = r.sent()), (r.label = 4); case 4: return [2, o]; } }); }) ); }), (t.prototype.showRewardAd = function (e, t) { return ( void 0 === e && (e = s.AdManagerBase.config.ids.REWARD), void 0 === t && (t = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (n) { return [2, this.showAd(e, !0, t)]; }); }) ); }), r.__decorate([(0, a.inject)(i.TypesAds.manager), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.IAdManager && u.IAdManager) ? n : Object)], t.prototype, "ads", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.AdAction = l; }, 1349: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AdManagerBase = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(17905), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.needToThrottleAd = function (e) { var t = e.systemStart, n = e.lastShow, r = t + e.showFirstDelay, i = Date.now(); if (i < r) return a.log.trace("needToThrottleAdd until " + (r - i)), !0; if (n) { var o = n + e.showNextDelay; if (i < o) return a.log.trace("needToThrottleAdd until " + (o - i)), !0; } return !1; }), (t.prototype.showAd = function (e, t, n) { return ( void 0 === t && (t = !1), void 0 === n && (n = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, o.AdResponse.NOT_SUPPORTED]; }); }) ); }), (t.prototype.showRewardAd = function (e, t) { return ( void 0 === t && (t = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, o.AdResponse.NOT_SUPPORTED]; }); }) ); }), (t.prototype.preloadNextInter = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.preloadNextReward = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.onAdStarted = function (e) { this.dispatch(o.AdEvents.STARTED, e); }), (t.prototype.onAdEnded = function (e) { this.dispatch(o.AdEvents.ENDED, e); }), (t.config = { ids: { INTER: "", BANNER: "", REWARD: "" }, throttling: { interstitial: { systemStart: Date.now(), showFirstDelay: 2e4, showNextDelay: 6e4, lastShow: 0 } }, interstitialsDisabled: !1 }), t ); })(i.GlobalEventProvider); t.AdManagerBase = s; }, 89803: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AdsModule = void 0); var r = n(22674), i = n(37394), o = n(1349), a = n(85522), s = n(31909); t.AdsModule = new r.ContainerModule(function (e) { e(i.TypesAds.adAction).to(s.AdAction), e(i.TypesAds.manager).to(o.AdManagerBase).inSingletonScope(), e(i.TypesAds.initAction).to(a.InitAdManagerAction); }); }, 85522: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InitAdManagerAction = void 0); var r = n(22970), i = n(51159), o = n(46595), a = n(37394), s = n(1349), u = n(22674), l = n(64653), c = n(44308), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, o, d; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return i.Localize.addTemplates({ video_ad_failed: { default: "Video AD Failed", localizations: { ru_RU: "Ошибка видеорекламы", es_ES: "Error en el anuncio", es_LA: "Fallo en el anuncio", pt_PT: "Erro no anúncio", pt_BR: "Erro no vídeo de anúncio", fr_FR: "Échec de la pub vidéo", de_DE: "Videowerbung nicht verf.", zh_CN: "视频广告错误", zh_TW: "影片廣告錯誤", ja_JP: "動画広告の再生に失敗しました", ko_KR: "비디오 광고 시청 실패", it_IT: "Spot video non disponibile", pl_PL: "Reklama wideo błędna", tr_TR: "Reklam videosu gösterilemedi", th_TH: "แสดงวิดีโอโฆษณาไม่สำเร็จ", hi_IN: "वीडियो विज्ञापन विफल रहा", vi_VN: "Quảng cáo video không thành công", id_ID: "Iklan Video gagal", ms_MY: "Video AD gagal" } }, no_video_ad: { default: "No Video ADs at the moment, sorry...", localizations: { ru_RU: "Видоереклама недоступна", es_ES: "¡Vaya! No hay anuncios ahora.", es_LA: "Qué pena, no hay anuncios disponibles.", pt_PT: "Infelizmente não há anúncios neste momento.", pt_BR: "Nenhum vídeo de anúncio no momento. Foi mal!", fr_FR: "Aucune pub vidéo pour l'instant...", de_DE: "Leider gibt es keine Videowerbungen im Moment …", zh_CN: "目前没有视频广告,抱歉……", zh_TW: "目前沒有影片廣告,抱歉……", ja_JP: "現在、動画広告はありません、ご理解ください", ko_KR: "죄송합니다, 지금 시청 가능한 비디오 광고가 없습니다", it_IT: "Non ci sono spot video disponibili al momento.", pl_PL: "W tej chwili brak reklam wideo, przykro nam…", tr_TR: "Üzgünüz, şu anda reklam videosu yok.", th_TH: "ขณะนี้ไม่มีวิดีโอโฆษณาพร้อมให้บริการ ขออภัยด้วย...", hi_IN: "क्षमा करें, इस समय कोई वीडियो विज्ञापन नहीं है", vi_VN: "Rất tiếc, hiện tại không có quảng cáo video…", id_ID: "Tidak ada iklan Video saat ini, maaf…", ms_MY: "Tiada Video AD buat masa ini, maaf..." } }, video_ad_cancelled: { default: "Video AD Cancelled", localizations: { ru_RU: "Вы отменили просмотр видеорекламы", es_ES: "Anuncio cancelado", es_LA: "Anuncio cancelado", pt_PT: "Anúncio cancelado", pt_BR: "Vídeo de anúncio cancelado", fr_FR: "Pub vidéo annulée", de_DE: "Videowerbung abgebr.", zh_CN: "视频广告已取消", zh_TW: "影片廣告已取消", ja_JP: "動画広告がキャンセルされました", ko_KR: "비디오 광고 시청 취소", it_IT: "Spot video annullato", pl_PL: "Reklama wideo anulowana", tr_TR: "Reklam videosu iptal edildi", th_TH: "วิดีโอโฆษณาถูกยกเลิก", hi_IN: "वीडियो विज्ञापन रद्द कर दिया", vi_VN: "Đã hủy quảng cáo video", id_ID: "Iklan Video dibatalkan", ms_MY: "Video AD dibatalkan" } } }), [4, Promise.all([this.ads.preloadNextInter(s.AdManagerBase.config.ids.INTER), this.ads.preloadNextReward(s.AdManagerBase.config.ids.REWARD)])]; case 1: return e.sent(), [2]; } }); }); }), r.__decorate([(0, u.inject)(a.TypesAds.manager), r.__metadata("design:type", "function" == typeof (n = void 0 !== l.IAdManager && l.IAdManager) ? n : Object)], t.prototype, "ads", void 0), r.__decorate([(0, u.inject)(a.TypesSocial.model), r.__metadata("design:type", "function" == typeof (o = void 0 !== l.ISocial && l.ISocial) ? o : Object)], t.prototype, "social", void 0), r.__decorate([(0, u.inject)(a.TypesApp.pageModel), r.__metadata("design:type", "function" == typeof (d = void 0 !== c.PageModel && c.PageModel) ? d : Object)], t.prototype, "page", void 0), (t = r.__decorate([(0, u.injectable)()], t)) ); })(o.Action); t.InitAdManagerAction = d; }, 5222: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.showReward = t.showAd = void 0); var r = n(22970), i = n(46595), o = n(37394); t.showAd = function (e) { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, i.di.get(o.TypesAds.adAction).showAd(e)]; case 1: return [2, t.sent()]; } }); }); }; t.showReward = function (e) { return r.__awaiter(void 0, void 0, void 0, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return [4, i.di.get(o.TypesAds.adAction).showAd(e, !0)]; case 1: return [2, t.sent()]; } }); }); }; }, 69386: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(85522), t), r.__exportStar(n(1349), t), r.__exportStar(n(31909), t), r.__exportStar(n(89803), t), r.__exportStar(n(5222), t); }, 47465: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AppModule = void 0); var r = n(22674), i = n(51059), o = n(37394), a = n(67428), s = n(88189); t.AppModule = new r.ContainerModule(function (e) { e(o.TypesApp.pageModel).to(a.PageModel).inSingletonScope(), e(o.TypesApp.model).to(i.AppModel).inSingletonScope(), e(o.TypesApp.loginAction).to(s.LoginAction); }); }, 67428: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PageModel = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(22674), s = (function (e) { function t() { var t = e.call(this) || this; return ( (t._assetsProgress = 0), (t._gameStartedAtProgress = NaN), (t._windowFocusHandler = function (e) { return t.windowFocusHandler(e); }), (t._documentVisibilityHandler = t.documentVisibilityHandler.bind(t)), (t._windowBlured = document.hidden || !document.hasFocus()), ["blur", "focus"].forEach(function (e) { return window.addEventListener(e, t._windowFocusHandler); }), document.addEventListener("visibilitychange", t._documentVisibilityHandler), t ); } return ( r.__extends(t, e), Object.defineProperty(t.prototype, "assetsProgress", { get: function () { return this._assetsProgress; }, set: function (e) { this.bus && (isNaN(this._gameStartedAtProgress) && ((this._gameStartedAtProgress = this.bus.loaded || 0), "undefined" != typeof gsap && gsap.killTweensOf(this.bus)), (this._assetsProgress = e), (this.bus.loaded = this._gameStartedAtProgress + (100 - this._gameStartedAtProgress) * this._assetsProgress)); }, enumerable: !1, configurable: !0, }), (t.prototype.isBusReadyAsync = function () { var e; return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { switch (t.label) { case 0: return (null === (e = this.bus) || void 0 === e ? void 0 : e.ready) ? [3, 2] : [4, i.WaitAction.ms(10)]; case 1: return t.sent(), [3, 0]; case 2: return [2]; } }); }); }), Object.defineProperty(t.prototype, "bus", { get: function () { return window.__diffbus; }, enumerable: !1, configurable: !0, }), (t.prototype.windowFocusHandler = function (e) { switch (e.type) { case "focus": this.windowBlured = !1; break; case "blur": this.windowBlured = !0; } }), (t.prototype.documentVisibilityHandler = function () { document.hidden ? (this.windowBlured = !0) : (this.windowBlured = !1); }), Object.defineProperty(t.prototype, "windowBlured", { get: function () { return this._windowBlured; }, set: function (e) { this._windowBlured !== e && ((this._windowBlured = e), this.callPagePauseAction(this._windowBlured)); }, enumerable: !1, configurable: !0, }), (t.prototype.callPagePauseAction = function (e) { var t; null === (t = (0, i.lazyGet)(o.TypesSocial.pauseAction)) || void 0 === t || t.run(e); }), (t.prototype.destroy = function () { var t = this; ["blur", "focus"].forEach(function (e) { return window.removeEventListener(e, t._windowFocusHandler); }), document.removeEventListener("visibilitychange", this._documentVisibilityHandler), e.prototype.destroy.call(this); }), (t = r.__decorate([(0, a.injectable)(), r.__metadata("design:paramtypes", [])], t)) ); })(i.GlobalEventProvider); t.PageModel = s; }, 93426: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AuthActionBase = void 0); var r = n(22970), i = n(37394), o = n(46595), a = n(17905), s = n(22674), u = n(51059), l = n(84882), c = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n, i, o, a; return r.__generator(this, function (r) { switch (r.label) { case 0: return [4, this.getPlayerInfo()]; case 1: return (e = r.sent()), (t = e.id), (n = e.name), (i = e.photo), (o = e.signature), (this.model.signature = o), [4, this.model.post("auth", { user_id: t, signature: o }, !1)]; case 2: return (a = r.sent()) ? (a.token ? [3, 4] : [4, this.model.post("auth", { user_id: t, user_photo: i, user_name: n, signature: o }, !1)]) : [3, 4]; case 3: (a = r.sent()), (r.label = 4); case 4: return [4, this.proceedToken(null == a ? void 0 : a.token)]; case 5: return r.sent(), [2]; } }); }); }), (t.prototype.proceedToken = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n, i; return r.__generator(this, function (r) { switch (r.label) { case 0: if (!e) return [3, 5]; (t = void 0), (n = void 0); try { n = (0, l.getAuth)(this.model.firebaseApp); } catch (e) { return [2, a.log.warn("getAuth failed with error", e)]; } r.label = 1; case 1: return r.trys.push([1, 3, , 4]), [4, (0, l.signInWithCustomToken)(n, e)]; case 2: return (t = r.sent()), [3, 4]; case 3: return (i = r.sent()), [2, a.log.warn("signInWithCustomToken failed with error", i)]; case 4: return a.log.info("#auth success", t), [3, 6]; case 5: a.log.warn("#auth missed token"), (r.label = 6); case 6: return [2]; } }); }); }), (t.prototype.loadProfileImage = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n; return r.__generator(this, function (r) { switch (r.label) { case 0: if (!e) return [3, 6]; r.label = 1; case 1: return r.trys.push([1, 5, , 6]), [4, fetch(e)]; case 2: return [4, r.sent().blob()]; case 3: return ( (n = r.sent()), [ 4, new Promise(function (e, t) { var r = new FileReader(); (r.onloadend = function () { return e(r.result); }), (r.onerror = t), r.readAsDataURL(n); }), ] ); case 4: return (t = r.sent()), [3, 6]; case 5: return r.sent(), a.log.warn("Failed to load profile image"), [3, 6]; case 6: return [2, t]; } }); }); }), (t.prototype.auth = function (e, t) { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { return [2]; }); }); }), r.__decorate([(0, s.inject)(i.TypesApp.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.AppModel && u.AppModel) ? n : Object)], t.prototype, "model", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(o.Action); t.AuthActionBase = c; }, 31748: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LoginAction = void 0); var r = n(22970), i = n(43328), o = n(46595), a = n(37394), s = n(17905), u = n(22674), l = n(64653), c = n(51059), d = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, d, h, p; return ( r.__extends(t, e), (t.prototype.execute = function () { var e; return r.__awaiter(this, void 0, void 0, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return (t = this.gameConfig.firebase) ? [4, this.model.init({ appId: this.gameConfig.id, firebase: t, host: null === (e = this.gameConfig.backend) || void 0 === e ? void 0 : e.host, provider: this.social.socialPlatform })] : [3, 2]; case 1: return n.sent(), [3, 3]; case 2: return s.log.warn("Firebase analytics is not configured"), [2]; case 3: return this.trackEntryPoint(), (0, o.lazyRun)(a.TypesApp.authAction), [2]; } }); }); }), (t.prototype.trackEntryPoint = function (e) { var t = (0, o.lazyGet)(a.TypesAnalytics.tracker); if (e && e.ref) { var n = "game_entry_" + e.ref.source; this.social.session.ftue ? t.track("ftue_".concat(n), e.ref) : t.track(n, e.ref); } else this.social.session.ftue ? t.track("ftue_game_entry") : t.track("game_entry"); }), r.__decorate([(0, u.inject)(a.TypesApp.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== c.AppModel && c.AppModel) ? n : Object)], t.prototype, "model", void 0), r.__decorate([(0, u.inject)(a.TypesSocial.model), r.__metadata("design:type", "function" == typeof (d = void 0 !== l.ISocial && l.ISocial) ? d : Object)], t.prototype, "social", void 0), r.__decorate([(0, u.inject)(a.TypesCore.gameConfig), r.__metadata("design:type", "function" == typeof (h = void 0 !== a.GameConfig && a.GameConfig) ? h : Object)], t.prototype, "gameConfig", void 0), r.__decorate([(0, u.inject)(a.TypesAnalytics.tracker), r.__metadata("design:type", "function" == typeof (p = void 0 !== i.IATracker && i.IATracker) ? p : Object)], t.prototype, "analytics", void 0), (t = r.__decorate([(0, u.injectable)()], t)) ); })(o.Action); t.LoginAction = d; }, 88189: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(31748), t), r.__exportStar(n(93426), t); }, 44308: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(67428), t), r.__exportStar(n(88189), t), r.__exportStar(n(51059), t), r.__exportStar(n(47465), t); }, 51059: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AppModel = void 0); var r = n(22970), i = n(22674), o = n(37166), a = n(10475), s = n(17003), u = n(17905), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.init = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n; return r.__generator(this, function (r) { switch (r.label) { case 0: 0, (t = e.firebase), (this._firebaseApp = (0, a.initializeApp)(t)), (this._remoteConfig = (0, s.getRemoteConfig)()), (this._remoteConfig.defaultConfig = this.getDefaultRemoteConfig(e.host)), (r.label = 1); case 1: return r.trys.push([1, 4, , 5]), [4, (0, s.ensureInitialized)(this._remoteConfig).catch(u.log.warn)]; case 2: return r.sent(), [4, (0, s.fetchAndActivate)(this._remoteConfig).catch(u.log.warn)]; case 3: return r.sent(), [3, 5]; case 4: return (n = r.sent()), u.log.warn("Failed to activate remote config", n), [3, 5]; case 5: return this._defaultPayload || (this._defaultPayload = {}), (this._defaultPayload.app_id = e.appId), (this._defaultPayload.sn = e.provider), (this._defaultHost = "".concat((0, s.getString)(this._remoteConfig, "backend"))), "undefined" != typeof __BACKEND_HOST__ && __BACKEND_HOST__ && (this._defaultHost = __BACKEND_HOST__), (this._defaultHost = this._defaultHost.replace(/\/+$/, "")), u.log.info("defaultHost", this._defaultHost), [2]; } }); }); }), (t.prototype.getAuthorizationHeader = function () { return this.signature ? "Bearer ".concat(this.signature) : e.prototype.getAuthorizationHeader.call(this); }), Object.defineProperty(t.prototype, "firebaseApp", { get: function () { return this._firebaseApp; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "defaultEndpoint", { get: function () { return ""; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "remoteConfig", { get: function () { return this._remoteConfig; }, enumerable: !1, configurable: !0, }), (t.prototype.getDefaultRemoteConfig = function (e) { return void 0 === e && (e = "http://localhost"), { backend: e, payments_backend_url: "".concat(e, "/purchase") }; }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(o.BackendModel); t.AppModel = l; }, 37166: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.BackendModel = void 0); var r = n(22970), i = n(22674), o = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t._defaultPayload = {}), t; } return ( r.__extends(t, e), (t.prototype.performHTTPRequest = function (e, t, n, i) { return ( void 0 === e && (e = "/"), void 0 === n && (n = "GET"), void 0 === i && (i = !0), r.__awaiter(this, void 0, Promise, function () { var o, a, s, u; return r.__generator(this, function (l) { return (o = this._defaultHost + (e.startsWith("/") ? e : "/" + e)), (a = r.__assign(r.__assign({}, this.getDefaultPayload()), t)), (s = {}), i && (u = this.getAuthorizationHeader()) && (s.Authorization = u), [2, this.json(o, a, n, s)]; }); }) ); }), (t.prototype.post = function (e, t, n) { return ( void 0 === n && (n = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (r) { return [2, this.performHTTPRequest(e, t, "POST", n)]; }); }) ); }), (t.prototype.put = function (e, t, n) { return ( void 0 === n && (n = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (r) { return [2, this.performHTTPRequest(e, t, "PUT", n)]; }); }) ); }), (t.prototype.delete = function (e, t, n) { return ( void 0 === n && (n = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (r) { return [2, this.performHTTPRequest(e, t, "DELETE", n)]; }); }) ); }), (t.prototype.get = function (e, t) { return ( void 0 === t && (t = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (n) { return [2, this.performHTTPRequest(e, void 0, "GET", t)]; }); }) ); }), (t.prototype.getDefaultPayload = function () { return this._defaultPayload || {}; }), Object.defineProperty(t.prototype, "defaultHost", { get: function () { return this._defaultHost; }, enumerable: !1, configurable: !0, }), (t.prototype.getAuthorizationHeader = function () { return null; }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(28385).HTTPRequest); t.BackendModel = o; }, 28385: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.HTTPRequest = void 0); var r = n(22970), i = n(17905), o = n(22674), a = (function () { function e() {} return ( (e.prototype.json = function (e, t, n, o) { return ( void 0 === n && (n = "GET"), void 0 === o && (o = {}), r.__awaiter(this, void 0, Promise, function () { var a, s, u; return r.__generator(this, function (r) { switch (r.label) { case 0: return r.trys.push([0, 2, , 3]), (s = { method: n }), t && ((o.Accept = "application/json"), (o["Content-Type"] = "application/json"), (s.body = JSON.stringify(t))), (s.headers = o), [4, fetch(e, s)]; case 1: return (a = r.sent()), [3, 3]; case 2: return (u = r.sent()), i.log.warn(u), [3, 3]; case 3: if (a) try { return [2, a.json()]; } catch (e) { i.log.warn(e); } return [2]; } }); }) ); }), (e = r.__decorate([(0, o.injectable)()], e)) ); })(); t.HTTPRequest = a; }, 26113: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SessionData = void 0); var n = (function () { function e() { this.data = { gameSession: NaN, friends: [] }; } return ( (e.prototype.init = function (e) { return (this.data.gameSession = (parseInt(null == e ? void 0 : e.gameSession, 10) || 0) + 1), (this.data.friends = (null == e ? void 0 : e.friends) || []), this.getRawData(); }), (e.prototype.getRawData = function () { return this.data; }), Object.defineProperty(e.prototype, "ftue", { get: function () { return this.data.gameSession <= 1; }, enumerable: !1, configurable: !0, }), e ); })(); t.SessionData = n; }, 15478: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserDataBase = void 0); var r = n(22970), i = n(22674), o = n(17905), a = (function () { function e() { (this.lastSaveCall = NaN), (this.cache = new Map()); } var t; return ( (t = e), (e.prototype.get = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n, i, o = this; return r.__generator(this, function (r) { switch (r.label) { case 0: return ( (t = (Array.isArray(e) ? e : [e]) || []), (n = t.filter(function (e) { return !o.cache.has(e); })).forEach(function (e) { return o.cache.set(e, void 0); }), [4, this.read(n)] ); case 1: return ( r.sent(), (i = {}), t.forEach(function (e) { return (i[e] = o.cache.get(e)); }), [2, i] ); } }); }); }), (e.prototype.save = function (e, n, r) { var i = this; return ( void 0 === r && (r = t.DEFAULT_UPLOAD_DELAY), this.cache.set(e, n), this.canWrite() ? this.internalWrite() : (clearTimeout(this._uploadTimeout), (this._uploadTimeout = setTimeout(function () { i.internalWrite(); }, r))), n ); }), (e.prototype.internalWrite = function () { this.write(), (this.lastSaveCall = Date.now()); }), (e.prototype.canWrite = function () { var e = Date.now(); return isNaN(this.lastSaveCall) ? ((this.lastSaveCall = e), !1) : e - this.lastSaveCall > t.FORCED_WRITE_INTERVAL; }), (e.prototype.erase = function (e) { return r.__awaiter(this, void 0, Promise, function () { var n = this; return r.__generator(this, function (r) { return ( this.cache.set(e, void 0), this.canWrite() ? this.internalWrite() : (clearTimeout(this._uploadTimeout), (this._uploadTimeout = setTimeout(function () { return n.write(); }, t.DEFAULT_UPLOAD_DELAY))), [2, !0] ); }); }); }), (e.prototype.write = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { return ( (t = {}), this.cache.forEach(function (n, r) { (e && !e.includes(r)) || (t[r] = n); }), o.log.trace(this, "write", t), o.log.warn("UserDataBase::write. Not supported"), [2] ); }); }); }), (e.prototype.read = function (e) { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (t) { return o.log.trace(this, "read", e), o.log.warn("UserDataBase::read. Not supported"), [2]; }); }); }), (e.DEFAULT_UPLOAD_DELAY = 1e3), (e.FORCED_WRITE_INTERVAL = 3e4), (e = t = r.__decorate([(0, i.injectable)()], e)) ); })(); t.UserDataBase = a; }, 27608: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserDataLocalStorage = void 0); var r = n(22970), i = n(17905), o = n(22674), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.ls = window.localStorage), (t.keyPrefix = ""), t; } return ( r.__extends(t, e), (t.prototype.getCookie = function (e) { return this.ls.getItem("".concat(this.keyPrefix).concat(e)) || ""; }), (t.prototype.getCookieValue = function (e) { var t = this.getCookie(e); if (t) { var n = void 0; try { n = JSON.parse(t); } catch (e) { i.log.warn(e, "raw dataString returned"), (n = t); } return n; } }), (t.prototype.setCookie = function (e, t) { try { this.ls.setItem("".concat(this.keyPrefix).concat(e), t); } catch (e) { i.log.error(e); } }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(n(30023).UserDataWeb); t.UserDataLocalStorage = a; }, 30023: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserDataWeb = void 0); var r = n(22970), i = n(22674), o = n(17905), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.read = function (e) { return r.__awaiter(this, void 0, void 0, function () { var t, n, i = this; return r.__generator(this, function (r) { return ( (t = Array.from(this.cache.keys())), (n = {}), (e || t).forEach(function (e) { var t = i.getCookieValue(e); (n[e] = t), i.cache.set(e, t); }), o.log.trace(this, "read", n), (this.lastSync = Date.now()), [2] ); }); }); }), (t.prototype.write = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t, n = this; return r.__generator(this, function (r) { return ( (t = {}), this.cache.forEach(function (r, i) { (e && !e.includes(i)) || ((t[i] = r), n.setCookieValue(i, r)); }), o.log.trace(this, "write", t), [2] ); }); }); }), (t.prototype.getCookieValue = function (e) { var t = this.getCookie(e); if (t) return JSON.parse(t); }), (t.prototype.setCookieValue = function (e, t) { this.setCookie(e, "object" == typeof t ? JSON.stringify(t) : "" + t); }), (t.prototype.setCookie = function (e, t, n) { void 0 === n && (n = 10080); var r = new Date(); r.setMinutes(r.getMinutes() + n), (document.cookie = e + "=" + escape(t) + (null == n ? "" : ";expires=" + r.toUTCString())); }), (t.prototype.getCookie = function (e) { for (var t = e + "=", n = decodeURIComponent(document.cookie).split(";"), r = 0; r < n.length; r++) { for (var i = n[r]; " " == i.charAt(0); ) i = i.substring(1); if (0 == i.indexOf(t)) return i.substring(t.length, i.length); } return ""; }), (t.COOKIE_NAME = "dp-instant"), (t = r.__decorate([(0, i.injectable)()], t)) ); })(n(15478).UserDataBase); t.UserDataWeb = a; }, 9970: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CookieDataLocalStorage = t.CookieDataWeb = t.CookieDataBase = void 0); var r = n(22970), i = n(15478), o = n(30023), a = n(27608); (t.CookieDataBase = i.UserDataBase), (t.CookieDataWeb = o.UserDataWeb), (t.CookieDataLocalStorage = a.UserDataLocalStorage), r.__exportStar(n(15478), t), r.__exportStar(n(30023), t), r.__exportStar(n(27608), t), r.__exportStar(n(26113), t); }, 57228: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(64653), t), r.__exportStar(n(44308), t), r.__exportStar(n(69386), t), r.__exportStar(n(9970), t), r.__exportStar(n(85475), t), r.__exportStar(n(76336), t), r.__exportStar(n(59834), t), r.__exportStar(n(89958), t), r.__exportStar(n(81457), t), r.__exportStar(n(41154), t), r.__exportStar(n(46280), t); }, 89448: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 94302: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 76189: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 47956: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 79110: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ScoreEvent = t.ScoreType = void 0), (function (e) { (e[(e.SESSION = 1)] = "SESSION"), (e[(e.CONTEXT = 2)] = "CONTEXT"), (e[(e.GLOBAL = 4)] = "GLOBAL"); })(t.ScoreType || (t.ScoreType = {})), (function (e) { (e.UPDATED = "UserScore.UPDATED"), (e.INCREASED = "UserScore.INCREASED"); })(t.ScoreEvent || (t.ScoreEvent = {})); }, 48519: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialEvents = t.SOCIAL_POPUP = void 0), (function (e) { (e[(e.ACCEPTED = 0)] = "ACCEPTED"), (e[(e.CANCELLED = 1)] = "CANCELLED"), (e[(e.REJECTED = 2)] = "REJECTED"), (e[(e.FAILED = 3)] = "FAILED"); })(t.SOCIAL_POPUP || (t.SOCIAL_POPUP = {})), (function (e) { (e.CONTEXT_CHANGE = "context_change"), (e.SHOW_OVERLAY = "show_social_overlay"), (e.HIDE_OVERLAY = "hide_social_overlay"); })(t.SocialEvents || (t.SocialEvents = {})); }, 37474: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 65503: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 7628: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 64653: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(7628), t), r.__exportStar(n(89448), t), r.__exportStar(n(94302), t), r.__exportStar(n(76189), t), r.__exportStar(n(47956), t), r.__exportStar(n(79110), t), r.__exportStar(n(48519), t), r.__exportStar(n(37474), t), r.__exportStar(n(65503), t); }, 89958: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderboardContextExternal = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(17905), s = n(22674), u = n(44308), l = n(64653), c = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, c; return ( r.__extends(t, e), (t.prototype.sync = function () { return r.__awaiter(this, void 0, Promise, function () { var e, t, n, i, o, s; return r.__generator(this, function (r) { switch (r.label) { case 0: if (this.social.inSolo) return [2, !1]; r.label = 1; case 1: return r.trys.push([1, 3, , 4]), (t = this.social.context_id), [4, this.appModel.post("scores-context/get", { ctx_id: t })]; case 2: return (e = r.sent()), [3, 4]; case 3: return (n = r.sent()), a.log.debug("failed to fetch", n), [2, !1]; case 4: for (o in ((i = this.social.friends.concat(this.social.me)), e)) (s = this.social.getFriendById(o, i)) && s.scores.update(this.castLeaderboardEntry(e[o], s)); return [2, !0]; } }); }); }), (t.prototype.submit = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n, i, o, s, u; return r.__generator(this, function (r) { switch (r.label) { case 0: if (this.social.inSolo) return [2, !1]; r.label = 1; case 1: return r.trys.push([1, 3, , 4]), (i = this.social.context_id), (o = this.social.me.id), (s = "string" == typeof t ? t : JSON.stringify(t)), [4, this.appModel.post("scores-context/post", { ctx_id: i, user_id: o, score: e, extData: s })]; case 2: return (n = r.sent()), [3, 4]; case 3: return (u = r.sent()), a.log.debug("failed to fetch", u), [2, !1]; case 4: return this.social.me.scores.update(this.castLeaderboardEntry(n, this.social.me)), [2, !0]; } }); }); }), (t.prototype.castLeaderboardEntry = function (e, t) { if (e) return { getScore: function () { return e.score; }, getFormattedScore: function () { return "".concat(e.score); }, getTimestamp: function () { return -1; }, getRank: function () {}, getExtraData: function () { return e.extData; }, getPlayer: function () { return t.rawData; }, }; }), r.__decorate([(0, s.inject)(o.TypesApp.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.AppModel && u.AppModel) ? n : Object)], t.prototype, "appModel", void 0), r.__decorate([(0, i.lazyInject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (c = void 0 !== l.ISocial && l.ISocial) ? c : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.EventDispatcher); t.LeaderboardContextExternal = c; }, 59834: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.LeaderboardGlobalExternal = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(17905), s = n(22674), u = n(64653), l = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.__SYNCED = !1), t; } var n; return ( r.__extends(t, e), (t.prototype.sync = function (e) { return ( void 0 === e && (e = 100), r.__awaiter(this, void 0, Promise, function () { var e, t, n, o, a, s; return r.__generator(this, function (r) { switch (r.label) { case 0: if (this.__SYNCED) return [2, !0]; (e = this.social.me.id), (t = this.social.friends.map(function (e) { return e.id; })), (n = void 0), (r.label = 1); case 1: return r.trys.push([1, 3, , 4]), [4, this.appSend("scores/get", { user_id: e, friends: t })]; case 2: return (n = r.sent()), [3, 4]; case 3: return r.sent(), [2, !1]; case 4: for (a in ((o = this.social.friends.concat(this.social.me)), n)) null == (s = this.social.getFriendById(a, o)) || s.scores.update(void 0, this.castLeaderboardEntry(n[a], s)); return (this.__SYNCED = !0), this.emit(i.CommonEvents.UPDATED), [2, !0]; } }); }) ); }), (t.prototype.submit = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n; return r.__generator(this, function (r) { switch (r.label) { case 0: return (n = { user_id: this.social.me.id, score: e, extData: t }), e < this.social.me.scoreGlobal ? [2, !1] : (this.social.me.scores.update(void 0, this.castLeaderboardEntry(n, this.social.me)), [4, this.appSend("scores/post", n)]); case 1: return r.sent(), [2, !0]; } }); }); }), (t.prototype.appSend = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n; return r.__generator(this, function (r) { return (n = (0, i.lazyGet)(o.TypesApp.model)) ? [2, n.post(e, t)] : (a.log.warn("Failed to send request"), [2]); }); }); }), (t.prototype.castLeaderboardEntry = function (e, t) { if (e) return { getScore: function () { return e.score; }, getFormattedScore: function () { return ""; }, getTimestamp: function () { return -1; }, getRank: function () { return 0; }, getExtraData: function () { return e.extData; }, getPlayer: function () { return null == t ? void 0 : t.rawData; }, }; }), r.__decorate([(0, i.lazyInject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== u.ISocial && u.ISocial) ? n : Object)], t.prototype, "social", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.EventDispatcher); t.LeaderboardGlobalExternal = l; }, 46280: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PaymentsModelBase = void 0); var r = n(22970), i = r.__importStar(n(75899)), o = n(22674), a = n(17905), s = n(46595), u = n(37394), l = function (e, t) { return r.__awaiter(void 0, void 0, void 0, function () { var n; return r.__generator(this, function (r) { switch (r.label) { case 0: return r.trys.push([0, 3, , 4]), [4, fetch(e, { method: "POST", headers: { Accept: "application/json", "Content-Type": "application/json" }, body: JSON.stringify(t) })]; case 1: return [4, r.sent().json()]; case 2: return [2, r.sent()]; case 3: return (n = r.sent()), a.log.warn(n), [3, 4]; case 4: return [2, {}]; } }); }); }, c = (function () { function e() {} return ( (e.prototype.init = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (e.prototype.getById = function (e) {}), (e.prototype.getAll = function () { return []; }), (e.prototype.isPaid = function (e) { return !1; }), (e.prototype.consume = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, !1]; }); }); }), (e.prototype.purchase = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, !1]; }); }); }), (e.prototype.buy = function (e, t) { return ( void 0 === t && (t = !1), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { throw new Error("Method not implemented."); }); }) ); }), Object.defineProperty(e.prototype, "supported", { get: function () { return !1; }, enumerable: !1, configurable: !0, }), (e.prototype.validateRemotely = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { var n, o, a; return r.__generator(this, function (r) { switch (r.label) { case 0: (n = !0), (r.label = 1); case 1: return r.trys.push([1, 3, , 4]), [4, l(e, t)]; case 2: return (o = r.sent()), this.trackPurchase("validate", o.success), (n = !!o.success), [3, 4]; case 3: return (a = r.sent()), i.captureException(a), [3, 4]; case 4: return [2, n]; } }); }); }), (e.prototype.viewItems = function (e) { a.log.warn("viewItems not implemented"); }), (e.prototype.trackEcommerce = function (e, t) { this.trackEvent(e, { currency: t.currency, value: t.value, items: [{ item_id: t.item_id, item_name: t.item_id, price: t.value }] }); }), (e.prototype.trackPurchase = function (e, t) { this.trackEvent(e, t, 1, "purchase_"); }), (e.prototype.trackEvent = function (e, t, n, r) { var i; void 0 === n && (n = 1), void 0 === r && (r = ""), null === (i = (0, s.lazyGet)(u.TypesAnalytics.tracker)) || void 0 === i || i.track("".concat(r).concat(e), n, t); }), (e = r.__decorate([(0, o.injectable)()], e)) ); })(); t.PaymentsModelBase = c; }, 76336: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialModelBase = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(22674), s = n(9970), u = n(64653), l = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.session = new s.SessionData()), (t.showPauseOverlay = !1), t; } var n, l, c; return ( r.__extends(t, e), (t.prototype.startGameAsync = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.getFriendById = function (e, t) {}), (t.prototype.init = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.playSolo = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.playOffline = function (e) { return ( void 0 === e && (e = "default"), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, u.SOCIAL_POPUP.FAILED]; }); }) ); }), (t.prototype.playWith = function (e, t) { return ( void 0 === t && (t = !1), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, u.SOCIAL_POPUP.FAILED]; }); }) ); }), (t.prototype.notify = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, !1]; }); }); }), (t.prototype.showShortcutPopup = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, !1]; }); }); }), (t.prototype.showBotPopup = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, !1]; }); }); }), (t.prototype.share = function (e) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, !1]; }); }); }), (t.prototype.switchGame = function (e, t) { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.invite = function (e, t) { return ( void 0 === t && (t = !1), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, u.SOCIAL_POPUP.FAILED]; }); }) ); }), (t.prototype.getRandomChallenger = function (e) { void 0 === e && (e = []); }), (t.prototype.getRandomOpponent = function () {}), (t.prototype.syncLeaderboards = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2]; }); }); }), (t.prototype.postSessionScore = function (e) {}), Object.defineProperty(t.prototype, "me", { get: function () { return this.nobody; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "opponent", { get: function () {}, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "contextPlayers", { get: function () { return []; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "inSolo", { get: function () { return !0; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "inGroup", { get: function () { return !1; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "friends", { get: function () { return []; }, enumerable: !1, configurable: !0, }), Object.defineProperty(t.prototype, "socialPlatform", { get: function () { return "web"; }, enumerable: !1, configurable: !0, }), r.__decorate([(0, a.inject)(o.TypesSocial.cookie), r.__metadata("design:type", "function" == typeof (n = void 0 !== o.IUserData && o.IUserData) ? n : Object)], t.prototype, "cookie", void 0), r.__decorate([(0, a.inject)(o.TypesSocial.payments), r.__metadata("design:type", "function" == typeof (l = void 0 !== u.IPaymentsModel && u.IPaymentsModel) ? l : Object)], t.prototype, "payments", void 0), r.__decorate([(0, i.lazyInject)(o.TypesSocial.dummyUser), r.__metadata("design:type", "function" == typeof (c = void 0 !== u.IUser && u.IUser) ? c : Object)], t.prototype, "nobody", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.EventDispatcher); t.SocialModelBase = l; }, 41154: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ReferralRewardsModel = void 0); var r = n(22970), i = n(22674), o = n(37394), a = n(64653), s = n(46595), u = "pending", l = function (e, t, n) { var r; return void 0 === t && (t = 1), null === (r = (0, s.lazyGet)(o.TypesAnalytics.tracker)) || void 0 === r ? void 0 : r.track("social_rf_" + e, t, n); }, c = (function () { function e() { this._items = []; } var t, n; return ( (t = e), (e.prototype.init = function (e) { return ( void 0 === e && (e = 3), r.__awaiter(this, void 0, Promise, function () { var n, i, o, a, s, l, c, d = this; return r.__generator(this, function (h) { switch (h.label) { case 0: return [4, this.social.cookie.get(t.COOKIE_KEY)]; case 1: for ( n = h.sent().irewards, i = this.social.friends .filter(function (e) { return e.isNew; }) .map(function (e) { return e.id; }), this._items = n || [], this.generateNext && (o = e - this._items.length) > 0 && (c = this._items).push.apply( c, r.__spreadArray( [], r.__read( new Array(o).fill(0).map(function () { return { value: d.generateNext() }; }) ), !1 ) ), a = this._items.filter(function (e) { return e.rf === u; }); i.length; ) (s = i.pop()), (l = a.pop()) && (l.rf = s); return this.postData(), [2, this]; } }); }) ); }), (e.prototype.request = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return [4, this.social.invite({ filters: ["NEW_PLAYERS_ONLY"], maxSize: 2 }, !0)]; case 1: return (t = n.sent()), l("request_attempt"), t === a.SOCIAL_POPUP.ACCEPTED ? (l("request"), this._request(e, u), this.postData(!0), [2, !0]) : [2, !1]; } }); }); }), (e.prototype.claim = function (e) { if (e) for (var t = 0; t < this._items.length; t++) if (this._items[t].rf === e) return this._items.splice(t, 1), this.postData(), l("claim"), !0; return !1; }), Object.defineProperty(e.prototype, "items", { get: function () { return this._items; }, enumerable: !1, configurable: !0, }), (e.prototype.getPendingItems = function () { return this._items .filter(function (e) { return !e.rf || e.rf === u; }) .sort(function (e, t) { return e.rf === u ? 1 : -1; }); }), (e.prototype.getAvailableItems = function () { return this._items.filter(function (e) { return !!e.rf && e.rf !== u; }); }), (e.prototype._request = function (e, t) { if (t && t !== u) for (var n = 0; n < this._items.length; n++) if (this._items[n].rf === t) return this._items[n]; var r = this._items.filter(function (t) { return t.value === e; })[0]; return r ? (r.rf = t) : ((r = { value: e, rf: t }), this._items.push(r)), this.postData(), r; }), (e.prototype.postData = function (e) { void 0 === e && (e = !1), this.social.cookie.save(t.COOKIE_KEY, this._items, e ? 0 : void 0); }), (e.COOKIE_KEY = "irewards"), r.__decorate([(0, i.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], e.prototype, "social", void 0), (e = t = r.__decorate([(0, i.injectable)()], e)) ); })(); t.ReferralRewardsModel = c; }, 81457: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UserScore = void 0); var r = n(22970), i = n(46595), o = n(64653), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.setScoreSession = function (e) { if (isNaN(e)) this._sessionScore = NaN; else { var t = this._sessionScore || 0; (this._sessionScore = e), e >= t && this.emit(o.ScoreEvent.INCREASED), this.emit(o.ScoreEvent.UPDATED); } }), (t.prototype.update = function (e, t) { (this._contextScore = e || this._contextScore), (this._globalScore = t || this._globalScore), (t || e) && this.emit(o.ScoreEvent.UPDATED); }), (t.prototype.getScore = function (e) { void 0 === e && (e = o.ScoreType.SESSION | o.ScoreType.CONTEXT | o.ScoreType.GLOBAL); var t = function (e, t) { return !!(t & e); }, n = []; if ( (t(o.ScoreType.SESSION, e) && n.push(this._sessionScore), t(o.ScoreType.CONTEXT, e) && n.push(this._contextScore && this._contextScore.getScore()), t(o.ScoreType.GLOBAL, e) && n.push(this._globalScore && this._globalScore.getScore()), (n = n.filter(function (e) { return !isNaN(e); })).length) ) return Math.max.apply(null, n); }), (t.prototype.getEntry = function (e) { switch (e) { case o.ScoreType.GLOBAL: return this._globalScore; case o.ScoreType.CONTEXT: return this._contextScore; } }), (t.prototype.flush = function () { delete this._contextScore, delete this._sessionScore; }), t ); })(i.EventDispatcher); t.UserScore = a; }, 43014: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NAFinish = void 0); var r = n(22970), i = n(85475), o = n(22674), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.strategy = "IMMEDIATE"), (t.template = "play_won"), t; } return ( r.__extends(t, e), (t.prototype.getI18NKey = function () { var e, t = this.social.me.scoreSession; return (null === (e = this.data) || void 0 === e ? void 0 : e.isWon) ? (t > 0 ? "play_won_0" : "play_won_1") : t > 0 ? "play_won_2" : "play_won_3"; }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.NotificationAction); t.NAFinish = a; }, 7965: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NALeave = void 0); var r = n(22970), i = n(85475), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return r.__extends(t, e), (t = r.__decorate([(0, o.injectable)()], t)); })(i.NotificationAction); t.NALeave = a; }, 46068: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NAStart = void 0); var r = n(22970), i = n(85475), o = n(22674), a = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.strategy = "LAST"), t; } return r.__extends(t, e), (t = r.__decorate([(0, o.injectable)()], t)); })(i.NotificationAction); t.NAStart = a; }, 55227: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NotificationAction = void 0); var r = n(22970), i = n(17905), o = n(46595), a = n(22674), s = n(37394), u = n(64653), l = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.action = "CUSTOM"), (t.template = "play_turn"), (t.notification = "PUSH"), t; } var n, o, l; return ( r.__extends(t, e), (n = t), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t; return r.__generator(this, function (n) { switch (n.label) { case 0: return (this.data = e), [4, this.getPayload()]; case 1: return (t = n.sent()), [4, this.social.notify(t)]; case 2: return n.sent() ? i.log.trace("notification", t.text, t.strategy) : i.log.warn("notification", t.text, t.strategy), [2]; } }); }); }), (t.prototype.getPayload = function () { return r.__awaiter(this, void 0, Promise, function () { var e; return r.__generator(this, function (t) { switch (t.label) { case 0: return (e = { action: this.action, template: this.template, strategy: this.strategy, notification: this.notification, cta: this.cta, text: this.getText() }), [4, this.getImage()]; case 1: return [2, ((e.image = t.sent()), e)]; } }); }); }), (t.prototype.getEmoji = function () { return n.EMOJI ? n.EMOJI + " " : ""; }), (t.prototype.getI18NKey = function () { return "play_turn"; }), (t.prototype.getText = function () { var e = this, t = this.getEmoji(); return (function (e, t) { var n = { default: t(e.default), localizations: {} }; for (var r in e.localizations) n.localizations[r] = t(e.localizations[r]); return n; })(this.i18n[this.getI18NKey()], function (n) { return ( t + n.replace(/{username}|{score}/g, function (t) { switch (t) { case "{username}": return e.social.me.name; case "{score}": return "" + e.social.me.scoreSession; } return t; }) ); }); }), (t.prototype.getImage = function () { return r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (e) { return [2, this.loadImage("./assets/Notification.png")]; }); }); }), (t.prototype.loadImage = function (e, t) { return ( void 0 === t && (t = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (r) { return t && n.IMAGES_CACHE[e] ? [2, n.IMAGES_CACHE[e]] : [ 2, new Promise(function (r) { var i = new Image(); (i.crossOrigin = "Anonymous"), (i.src = e), (i.style.visibility = "hidden"), document.body.appendChild(i), i.addEventListener("load", function () { document.body.removeChild(i); var o = document.createElement("canvas"), a = o.getContext("2d"); (o.width = i.width), (o.height = i.height), a.drawImage(i, 0, 0); var s = o.toDataURL("image/jpeg"); t && (n.IMAGES_CACHE[e] = s), r(s); }); }), ]; }); }) ); }), (t.IMAGES_CACHE = {}), (t.EMOJI = ""), (t.WIDTH_FULL = 1200), (t.HEIGHT_FULL = 627), r.__decorate([(0, a.inject)(s.TypesSocial.model), r.__metadata("design:type", "function" == typeof (o = void 0 !== u.ISocial && u.ISocial) ? o : Object)], t.prototype, "social", void 0), r.__decorate([(0, a.inject)(s.TypesNotification.i18n), r.__metadata("design:type", "function" == typeof (l = void 0 !== u.NotificationLocalizations && u.NotificationLocalizations) ? l : Object)], t.prototype, "i18n", void 0), (t = n = r.__decorate([(0, a.injectable)()], t)) ); })(o.Action); t.NotificationAction = l; }, 99922: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.NotificationsModule = void 0); var r = n(22674), i = n(37394), o = n(85475); t.NotificationsModule = new r.ContainerModule(function (e) { e(i.TypesNotification.i18n).toConstantValue({ play_turn: { default: "{username} is playing with you.", localizations: { zh_TW: "{username}正在與你一同遊玩。", zh_CN: "{username} 正在和你玩。", fr_FR: "{username} joue avec vous.", de_DE: "{username} spielt mit dir.", id_ID: "{username} bermain bersamamu.", it_IT: "{username} sta giocando con te.", ja_JP: "{username} があなたとプレイしています。", ko_KR: "{username}이 여러분과 함께 플레이하고 있습니다.", ms_MY: "{username} sedang bermain dengan anda.", pl_PL: "{username} gra z Tobą.", pt_BR: "{username} está jogando com você.", pt_PT: "{username} está a jogar contigo.", es_ES: "{username} está jugando contigo.", es_LA: "{username} está jugando contigo.", th_TH: "{username} กำลังเล่นกับคุณ", tr_TR: "{username} seninle oynuyor.", vi_VN: "{username} đang chơi với bạn.", ru_RU: "{username} играет с вами." } }, play_won_0: { default: "{username} won with score {score}.", localizations: { zh_TW: "{username}獲得了{score}分。", zh_CN: "{username} 获胜,得分 {score}。", fr_FR: "{username} a gagné avec un score de {score}.", de_DE: "{username} hat gewonnen mit dem Ergebnis {score}.", id_ID: "{username} menang dengan skor {score}.", it_IT: "{username} ha vinto con {score} punti.", ja_JP: "{username} はスコア {score} で勝ちました。", ko_KR: "{username}이 {score}을 득점하여 승리했습니다.", ms_MY: "{username} menang dengan skor {score}.", pl_PL: "{username} zdobył {score} i wygrał.`", pt_BR: "{username} venceu, com uma pontuação de {score}.", pt_PT: "{username} venceu, com uma pontuação de {score}.", es_ES: "{username} ha ganado con una puntuación de {score}.", es_LA: "{username} ganó con un puntaje de {score}.", th_TH: "{username} ชนะด้วยคะแนน {score}", tr_TR: "{username}, {score} puan alarak oyunu kazandı.", vi_VN: "{username} đã chiến thắng với số điểm {score}.", ru_RU: "{username} побеждает со счетом {score}." } }, play_won_1: { default: "{username} wins!", localizations: { zh_TW: "{username}獲勝了!", zh_CN: "{username} 获胜!", fr_FR: "Victoire de {username} !", de_DE: "{username} gewinnt!", id_ID: "{username} menang!", it_IT: "{username} ha vinto!", ja_JP: "{username} の勝ち!", ko_KR: "{username} 승리!", ms_MY: "{username} menang! ", pl_PL: "Wygrywa {username}!", pt_BR: "Vitória de {username}!", pt_PT: "Vitória do {username}!", es_ES: "¡Victoria para {username}!", es_LA: "¡Gana {username}!", th_TH: "{username} ชนะ!", tr_TR: "{username} kazandı!", vi_VN: "{username} chiến thắng!", ru_RU: "{username} побеждает!" } }, play_won_2: { default: "{username} scored {score}. Try to beat!", localizations: { zh_TW: "{username}獲得了{score}分。試著打敗他吧!", zh_CN: "{username} 得分 {score}。努力打败!", fr_FR: "Le score de {username} est {score}. Essayez de le battre !", de_DE: "{username} hat {score}. Schlage ihn!", id_ID: "{username} meraih skor {score}. Coba kalahkan!", it_IT: "{username} ha realizzato {score}. Prova a superare il suo punteggio!", ja_JP: "{username} のスコアは {score}でした。打倒だ!", ko_KR: "{username} 득점 {score}. 겨루어 보세요!", ms_MY: "{username} mendapat skor {score}. Cuba tewaskan!", pl_PL: "{username} zdobył {score}. Spróbuj pobić ten wynik!", pt_BR: "{username} marcou {score}. Tente superar essa marca!", pt_PT: "{username} marcou {score}. Tenta superar essa marca!", es_ES: "{username} ha obtenido una puntuación de {score}. ¡Intenta superarla!", es_LA: "{username} tiene un puntaje de {score}. ¡Intenta vencerlo!", th_TH: "{username} ทำคะแนนได้ {score} พยายามเอาชนะเขาให้ได้!", tr_TR: "{username}, {score} puan aldı. Geçmeyi dene!", vi_VN: "{username} đã ghi điểm {score}. Cố gắng đánh bại!", ru_RU: "{username} набрал {score}. Попробуй набрать больше!" } }, play_won_3: { default: "Try to beat {username}!", localizations: { zh_TW: "挑戰{username}吧!", zh_CN: "努力打败 {username}!", fr_FR: "Essayez de battre {username} !", de_DE: "Versuche {username}, zu schlagen!", id_ID: "Coba kalahkan {username}!", it_IT: "Prova a superare il punteggio di {username}!", ja_JP: "{username}に勝とう!", ko_KR: "{username}과 겨루어 보세요!", ms_MY: "Cuba tewaskan {username}!", pl_PL: "Spróbuj pokonać gracza {username}!", pt_BR: "Tente superar {username}!", pt_PT: "Tenta superar {username}!", es_ES: "¡Intenta vencer a {username}!", es_LA: "¡Intenta vencer a {username}!", th_TH: "พยายามเอาชนะ{username}ให้ได้!", tr_TR: "{username} adlı oyuncuyu geçmeyi dene!", vi_VN: "Cố gắng đánh bại {username}!", ru_RU: "Попробуй набрать больше, чем {username}!" } } }), e(i.TypesNotification.start).to(o.NAStart), e(i.TypesNotification.leave).to(o.NALeave), e(i.TypesNotification.finish).to(o.NAFinish); }); }, 85475: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(55227), t), r.__exportStar(n(46068), t), r.__exportStar(n(43014), t), r.__exportStar(n(7965), t), r.__exportStar(n(99922), t); }, 97749: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.HTMLUIModule = void 0); var r = n(37394), i = n(22674), o = n(92689), a = n(92423); t.HTMLUIModule = new i.ContainerModule(function (e, t, n, i) { e(r.TypesUI.uiRootClass).toConstantValue(a.UIRoot), e(r.TypesUI.setupAction).to(o.SetupUIAction), e(r.TypesUI.startScreenAction).to(o.StartScreenAction), e(r.TypesUI.endScreenAction).to(o.EndScreenAction); }); }, 71931: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.EndScreenAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(22674), u = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n, u; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return ( void 0 === e && (e = !1), r.__awaiter(this, void 0, void 0, function () { var t = this; return r.__generator(this, function (n) { return ( this.social.inGroup ? this.dispatch(o.TypesUI.events.SCREEN_CHANGED, { id: o.TypesUI.screen.LEADERBOARD, props: { users: this.social.contextPlayers, scoreType: a.ScoreType.CONTEXT, overlay: !1, onClose: function () { return t.levelStart.run(); }, }, }) : e ? this.dispatch(o.TypesUI.events.SCREEN_CHANGED, { id: o.TypesUI.screen.WIN, props: { opponent: this.social.opponent, nextMatch: this.social.getRandomOpponent() } }) : this.dispatch(o.TypesUI.events.SCREEN_CHANGED, { id: o.TypesUI.screen.GAME_OVER, props: { opponent: this.social.opponent, nextMatch: this.social.inSolo ? this.social.getRandomOpponent() : void 0 } }), [2] ); }); }) ); }), r.__decorate([(0, s.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], t.prototype, "social", void 0), r.__decorate([(0, s.inject)(o.TypesFlow.LevelStart), r.__metadata("design:type", "function" == typeof (u = void 0 !== i.Action && i.Action) ? u : Object)], t.prototype, "levelStart", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.Action); t.EndScreenAction = u; }, 4960: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PauseAction = void 0); var r = n(22970), i = n(46595), o = n(22674), a = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return ( void 0 === e && (e = !0), r.__awaiter(this, void 0, Promise, function () { return r.__generator(this, function (t) { return this.dispatch(i.CommonEvents.PAUSE, e), [2]; }); }) ); }), (t = r.__decorate([(0, o.injectable)()], t)) ); })(i.Action); t.PauseAction = a; }, 36410: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SetupUIAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(57228), s = n(22674), u = n(33847), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } var n; return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, Promise, function () { var t = this; return r.__generator(this, function (n) { return ( (0, u.render)( (0, u.h)(this.UIRootClass, { ref: function (e) { return t.onRefCreated(e); }, }), e || document.getElementById(i.CANVAS_ID).parentElement ), [2] ); }); }); }), (t.prototype.onRefCreated = function (e) { var t, n; i.di.bind(o.TypesUI.root).toConstantValue(e), null === (t = e.base) || void 0 === t || t.classList.add("sn-".concat(this.social.socialPlatform)), "vk" === this.social.socialPlatform && i.IS_ODR_BUILD && (null === (n = e.base) || void 0 === n || n.classList.add("odr-build")); }), r.__decorate([(0, s.inject)(o.TypesSocial.model), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.ISocial && a.ISocial) ? n : Object)], t.prototype, "social", void 0), r.__decorate([(0, i.lazyInject)(o.TypesUI.uiRootClass), r.__metadata("design:type", Object)], t.prototype, "UIRootClass", void 0), (t = r.__decorate([(0, s.injectable)()], t)) ); })(i.Action); t.SetupUIAction = l; }, 82334: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StartScreenAction = void 0); var r = n(22970), i = n(22674), o = n(37394), a = n(46595), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { return a.di.isBound(o.TypesUI.screen.HOME) ? this.dispatch(o.TypesUI.events.SCREEN_CHANGED, { id: o.TypesUI.screen.HOME }) : this.dispatch(o.TypesUI.events.SCREEN_CHANGED, { id: o.TypesUI.screen.GAMEPLAY }), [2]; }); }); }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(a.Action); t.StartScreenAction = s; }, 92689: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(71931), t), r.__exportStar(n(4960), t), r.__exportStar(n(36410), t), r.__exportStar(n(82334), t); }, 9252: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Avatar = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(7849), s = n(99823), u = n(93161), l = function (e) { var t = e.content, n = e.icon, a = e.className, u = e.visible, l = e.onClick, c = (0, o.default)("avatar-play-with-btn", a, { "avatar-play-with-btn-visible": u }); return (0, i.jsx)("div", r.__assign({ className: c }, { children: (0, i.jsx)(s.Button, r.__assign({ icon: n, type: "primary", shape: "oval", bordered: !0, onClick: l }, { children: t })) })); }; t.Avatar = function (e) { var t = e.className, n = e.imgPath, s = e.score, c = e.scoreIconType, d = e.imgAlt, h = void 0 === d ? "Avatar" : d, p = e.playWithBtn, f = (0, o.default)("avatar", { "avatar-play-with": p }, t); return (0, i.jsxs)("span", r.__assign({ className: f }, { children: [(0, i.jsx)("span", r.__assign({ className: "avatar-inner" }, { children: n ? (0, i.jsx)("img", { src: n, alt: h }) : (0, i.jsx)(a.Icon, { type: "placeholder-avatar", className: "avatar-bg" }) })), p && (0, i.jsx)(l, r.__assign({}, p)), (s || 0 === s) && (0, i.jsx)(u.Score, r.__assign({ className: "avatar-score", icon: c }, { children: s }))] })); }; }, 31052: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AvatarGroup = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(9252), s = n(7457); (t.AvatarGroup = function (e) { var t = e.className, n = r.__rest(e, ["className"]), a = (0, o.default)("avatar-group", t); return (0, i.jsx)("div", r.__assign({ className: a }, n)); }), (t.AvatarGroup.Item = function (e) { var t = e.className, n = r.__rest(e, ["className"]), a = (0, o.default)("avatar-group-item", t); return (0, i.jsx)("div", r.__assign({ className: a }, n)); }), (t.AvatarGroup.Separator = function (e) { var t = e.className, n = r.__rest(e, ["className"]), a = (0, o.default)("avatar-group-item", "avatar-group-separator", t); return (0, i.jsx)(s.Icon, r.__assign({ className: a }, n)); }), (t.AvatarGroup.Avatar = function (e) { return (0, i.jsx)(a.Avatar, r.__assign({}, e)); }); }, 40590: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AvatarPlayInGroup = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(9252), s = n(93161); (t.AvatarPlayInGroup = function (e) { var t = e.className, n = e.score, a = e.children, u = (0, o.default)("avatar-play-in-group", t); return (0, i.jsxs)("span", r.__assign({ className: u }, { children: [(0, i.jsx)("ul", r.__assign({ className: "avatar-play-in-group-inner" }, { children: a })), n && (0, i.jsx)(s.Score, r.__assign({ className: "avatar-score" }, { children: n }))] })); }), (t.AvatarPlayInGroup.Avatar = function (e) { var t = e.className, n = r.__rest(e, ["className"]), s = (0, o.default)("avatar-play-in-group-item", t); return (0, i.jsx)("li", r.__assign({ className: s }, { children: (0, i.jsx)(a.Avatar, r.__assign({}, n)) })); }); }, 99823: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Button = t.buttonShapeConst = t.buttonTypeConst = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(7457); (t.buttonTypeConst = { primary: "primary", glassy: "glassy" }), (t.buttonShapeConst = { circle: "circle", oval: "oval" }); Object.values(t.buttonTypeConst), Object.values(t.buttonShapeConst); var s = function (e) { var n = r.__assign(r.__assign({}, t.buttonTypeConst), t.buttonShapeConst); return "btn-".concat(n[e]); }; t.Button = function (e) { var t = e.className, n = e.icon, u = e.shape, l = e.children, c = e.type, d = e.htmlType, h = void 0 === d ? "button" : d, p = e.block, f = e.bordered, _ = e.revertDir, g = r.__rest(e, ["className", "icon", "shape", "children", "type", "htmlType", "block", "bordered", "revertDir"]), m = c && s(c), v = u && s(u), y = (0, o.default)("btn", t, v, m, { "btn-block": p }, { "btn-revert": _ }, { "btn-border": f }), C = n && (function (e) { return "string" == typeof e ? (0, i.jsx)(a.Icon, { type: e }) : e; })(n); return (0, i.jsxs)("button", r.__assign({ className: y, type: h }, g, { children: [C, l && (0, i.jsx)("span", r.__assign({ className: "btn-content" }, { children: l }))] })); }; }, 46833: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Claim = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(7849); t.Claim = function (e) { var t = e.className, n = e.buttonType, s = void 0 === n ? "primary" : n, u = e.type, l = e.count, c = e.ads, d = e.children, h = e.shape, p = void 0 === h ? "oval" : h, f = r.__rest(e, ["className", "buttonType", "type", "count", "ads", "children", "shape"]), _ = (0, o.default)("claim", t); return (0, i.jsxs)(a.Button, r.__assign({ className: _, shape: p, type: s }, f, { children: [d, u && (0, i.jsxs)("span", r.__assign({ className: "count-wrap" }, { children: [(0, i.jsx)(a.Icon, { type: u }), (0, i.jsx)(a.Count, { count: l })] })), c && (0, i.jsx)(a.Icon, { type: "ads" })] })); }; }, 4968: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Count = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)); t.Count = function (e) { var t = e.className, n = e.count, a = void 0 === n ? 0 : n, s = r.__rest(e, ["className", "count"]), u = (0, o.default)("count", t); return (0, i.jsx)("span", r.__assign({ className: u }, s, { children: a })); }; }, 64339: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CrossPromo = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(37394), s = n(18651), u = n(40105); t.CrossPromo = function (e) { var t = e.className, n = e.delay, l = void 0 === n ? 3e3 : n, c = (0, s.useInjection)(a.TypesSocial.model); if ( !(function () { switch (c.socialPlatform) { case "fb": return "undefined" != typeof FBInstant && -1 !== FBInstant.getSupportedAPIs().indexOf("switchGameAsync") && o.di.isBound(a.TypesPromo.config); case "vk": case "ok": case "ya": return !0; } })() ) return null; var d = (0, s.useInjection)(a.TypesPromo.random), h = d.appId, p = (d.data, r.__read((0, s.visibilityEffect)(l, !0, [h]), 1)[0]); return (0, i.jsx)( u.CrossPromoComponent, r.__assign( { invisible: p, className: t, onClick: function () { return c.switchGame(d.appId, d.data); }, }, d ) ); }; }, 40105: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CrossPromoComponent = void 0); var r = n(22970), i = n(10348), o = n(46595), a = r.__importDefault(n(72779)); n(11936); var s = o.IS_ODR_BUILD ? o.ODR_BUILD_ORIGIN : o.GAME_SCRIPT_ORIGIN; t.CrossPromoComponent = function (e) { var t = e.title, n = e.subtitle, o = e.icon, u = e.className, l = e.invisible, c = e.onClick; return (0, i.jsxs)("div", r.__assign({ className: (0, a.default)("crosspromo", u, { invisible: l }), onClick: c }, { children: [(0, i.jsx)("img", { className: "crosspromo__icon", src: "".concat(s, "crosspromo/").concat(o) }), (0, i.jsxs)("div", r.__assign({ className: "crosspromo__description" }, { children: [(0, i.jsx)("div", r.__assign({ className: "title" }, { children: t })), (0, i.jsx)("div", r.__assign({ className: "subtitle" }, { children: n }))] }))] })); }; }, 92135: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Graphics = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)); t.Graphics = function (e) { return e.inline || void 0 === e.inline ? (0, i.jsx)("span", { className: (0, o.default)(e.className, "icon"), dangerouslySetInnerHTML: { __html: e.svg.default } }) : (0, i.jsx)("span", r.__assign({ className: (0, o.default)(e.className, "icon") }, { children: (0, i.jsx)("svg", { dangerouslySetInnerHTML: { __html: '') } }) })); }; }, 7457: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Icon = void 0); var r = n(22970), i = n(10348), o = n(55027); t.Icon = function (e) { var t = e.type, n = r.__rest(e, ["type"]), a = o.iconsMap.get(t); return (0, i.jsx)(a, r.__assign({}, n)); }; }, 55027: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.iconsMap = void 0); var r, i, o = n(22970), a = n(10348), s = n(92135), u = o.__importStar(n(55883)), l = o.__importStar(n(76533)), c = o.__importStar(n(89352)), d = o.__importStar(n(19423)), h = o.__importStar(n(37543)), p = o.__importStar(n(38006)), f = o.__importStar(n(19666)), _ = o.__importStar(n(91112)), g = o.__importStar(n(8541)), m = o.__importStar(n(1569)), v = o.__importStar(n(58986)), y = o.__importStar(n(5480)), C = o.__importStar(n(11575)), b = o.__importStar(n(29177)); t.iconsMap = ((r = new Map([ ["ads", u], ["friends", l], ["globe", c], ["play", d], ["replay", h], ["leaderboard", p], ["share", _], ["x", f], ["trophy", g], ["bomb", v], ["vs", C], ["heart", y], ["placeholder-avatar", m], ["gear", b], ])), (i = new Map()), r.forEach(function (e, t) { return i.set(t, function (t) { return (0, a.jsx)(s.Graphics, o.__assign({ svg: e }, t)); }); }), i); }, 10734: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.AlertsOverlay = void 0); var r = n(22970), i = n(10348), o = n(51159), a = n(37394), s = r.__importDefault(n(72779)), u = n(34619), l = n(18651); n(48150); var c = r.__importStar(n(50890)); n(95239); t.AlertsOverlay = function () { var e = r.__read((0, u.useState)({ active: !1, alertId: "" }), 2), t = e[0], n = e[1]; return ( (0, l.useEventListener)(a.TypesUI.events.SHOW_CUSTOM_ALERT, function (e) { var t = e.message, r = void 0 === t ? "" : t, i = e.type, o = void 0 === i ? "info" : i, a = e.options, s = ""; if (r) switch (o) { case "error": s = c.StatusAlertService.showError(r, a); break; case "info": s = c.StatusAlertService.showInfo(r, a); break; case "success": s = c.StatusAlertService.showSuccess(r, a); break; case "warning": s = c.StatusAlertService.showWarning(r, a); } n({ active: !1, alertId: s }); }), (0, l.useEventListener)(a.AdEvents.STARTED, function (e) { c.StatusAlertService.removeAlert(t.alertId), n(r.__assign(r.__assign({}, t), { active: !0 })); }), (0, l.useEventListener)(a.AdEvents.ENDED, function (e) { var t = e.status, r = ""; if (e.reward) switch (t) { case a.AdResponse.UNKNOWN: case a.AdResponse.FAILED: r = c.StatusAlertService.showError(o.Localize.get("video_ad_failed")); break; case a.AdResponse.NO_FILL: r = c.StatusAlertService.showWarning(o.Localize.get("no_video_ad")); break; case a.AdResponse.CANCELLED: r = c.StatusAlertService.showWarning(o.Localize.get("video_ad_cancelled")); } n({ active: !1, alertId: r }); }), (0, i.jsxs)("div", r.__assign({ className: (0, s.default)("alerts__overlay") }, { children: [(0, i.jsx)(c.default, {}), (0, i.jsx)("div", { className: (0, s.default)("bg", { active: t.active }) })] })) ); }; }, 50890: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StatusAlertService = void 0); var r = n(56727); Object.defineProperty(t, "StatusAlertService", { enumerable: !0, get: function () { return r.StatusAlertService; }, }); var i = n(85547).StatusAlertView; t.default = i; }, 77691: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StatusAlertContainer = void 0); var r = n(22970), i = n(10348), o = n(33847), a = n(69809), s = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.render = function () { return (0, i.jsx)( "div", r.__assign( { className: "status-alerts-wrapper" }, { children: this.props.alerts.map(function (e) { return (0, i.jsx)(a.StatusAlertItem, { alert: e }, e.id); }), } ) ); }), t ); })(o.Component); t.StatusAlertContainer = s; }, 79313: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.boxClassName = t.alertIcon = void 0); t.alertIcon = function (e) { switch (e) { case "success": return "is-check"; case "error": case "warning": return "is-error"; case "info": return "is-info-icon"; default: return ""; } }; t.boxClassName = function (e) { switch (e) { case "success": return "is-green-success"; case "error": return "is-red-error"; case "warning": return "is-orange-warning"; default: return ""; } }; }, 69809: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StatusAlertItem = t.defaultAlertOptions = void 0); var r = n(22970), i = n(10348), o = n(33847), a = n(79313), s = n(56727); t.defaultAlertOptions = { autoHide: !0, autoHideTime: 3500, withIcon: !0, withCloseIcon: !0, removeAllBeforeShow: !0 }; var u = (function (e) { function n(t) { var n = e.call(this, t) || this; return ( (n.showAlert = function () { return r.__awaiter(n, void 0, Promise, function () { var e = this; return r.__generator(this, function (t) { switch (t.label) { case 0: return ( this.statusAlert && this.statusAlert.classList.add("is-transparent"), [ 4, setTimeout(function () { e.statusAlert && e.statusAlert.classList.remove("is-transparent"); }), ] ); case 1: return t.sent(), [2]; } }); }); }), (n.removeAlert = function () { return r.__awaiter(n, void 0, Promise, function () { return r.__generator(this, function (e) { switch (e.label) { case 0: return this.statusAlert ? (this.statusAlert.classList.add("is-transparent"), [4, setTimeout(this.removeAlertCallbackSubmit, 800)]) : [3, 2]; case 1: e.sent(), (e.label = 2); case 2: return [2]; } }); }); }), (n.removeAlertCallbackSubmit = function () { return s.StatusAlertService.removeAlert(n.props.alert.id); }), n ); } return ( r.__extends(n, e), (n.prototype.componentDidMount = function () { this.showAlert(), this.alertOptions.autoHide && setTimeout(this.removeAlert, this.alertOptions.autoHideTime); }), (n.prototype.render = function () { var e = this; return (0, i.jsx)( "div", r.__assign( { className: "status-alert is-transparent", ref: function (t) { return (e.statusAlert = t); }, }, { children: (0, i.jsx)("div", r.__assign({ className: "status-alert__padding-wrapper" }, { children: (0, i.jsxs)("div", r.__assign({ className: "status-alert__box ".concat(this.boxClassName) }, { children: [this.alertOptions.withCloseIcon && (0, i.jsx)("div", r.__assign({ className: "status-alert__icon-on-right-holder" }, { children: (0, i.jsx)("div", { className: "status-alert__icon is-close-icon", onClick: this.removeAlert }) })), this.alertOptions.withIcon && (0, i.jsx)("div", r.__assign({ className: "status-alert__icon-holder" }, { children: (0, i.jsx)("div", { className: "status-alert__icon ".concat(this.alertIcon) }) })), (0, i.jsx)("div", r.__assign({ className: "status-alert__text" }, { children: this.alertText }))] })) })) } ) ); }), Object.defineProperty(n.prototype, "boxClassName", { get: function () { return (0, a.boxClassName)(this.props.alert.type); }, enumerable: !1, configurable: !0, }), Object.defineProperty(n.prototype, "alertOptions", { get: function () { return r.__assign(r.__assign({}, t.defaultAlertOptions), this.props.alert.options); }, enumerable: !1, configurable: !0, }), Object.defineProperty(n.prototype, "alertIcon", { get: function () { return (0, a.alertIcon)(this.props.alert.type); }, enumerable: !1, configurable: !0, }), Object.defineProperty(n.prototype, "alertText", { get: function () { return "object" != typeof this.props.alert.message || this.props.alert.message.nodeName ? this.props.alert.message : JSON.stringify(this.props.alert.message); }, enumerable: !1, configurable: !0, }), n ); })(o.Component); t.StatusAlertItem = u; }, 56727: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StatusAlertService = t.StatusAlertServiceClass = void 0); var r = n(22970), i = n(69809), o = r.__importStar(n(79527)), a = (function () { function e() {} return ( (e.prototype.showAlert = function (e, t, n) { n && n.removeAllBeforeShow && this.removeAllAlerts(); var r = (function () { var e = new Date().getTime(); "undefined" != typeof performance && "function" == typeof performance.now && (e += performance.now()); return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) { var n = (e + 16 * Math.random()) % 16 | 0; return (e = Math.floor(e / 16)), ("x" === t ? n : (3 & n) | 8).toString(16); }); })(); return o.default.dispatch({ type: o.StoreActionTypes.AddAlert, payload: { id: r, message: e, type: t, options: n || {} } }), r; }), (e.prototype.showSuccess = function (e, t) { return this.showAlert(e, "success", r.__assign(r.__assign({}, i.defaultAlertOptions), t)); }), (e.prototype.showError = function (e, t) { return this.showAlert(e, "error", r.__assign(r.__assign({}, i.defaultAlertOptions), t)); }), (e.prototype.showInfo = function (e, t) { return this.showAlert(e, "info", r.__assign(r.__assign({}, i.defaultAlertOptions), t)); }), (e.prototype.showWarning = function (e, t) { return this.showAlert(e, "warning", r.__assign(r.__assign({}, i.defaultAlertOptions), t)); }), (e.prototype.removeAlert = function (e) { o.default.dispatch({ type: o.StoreActionTypes.RemoveAlert, payload: e }); }), (e.prototype.removeAllAlerts = function () { o.default.dispatch({ type: o.StoreActionTypes.RemoveAllAlerts }); }), e ); })(); (t.StatusAlertServiceClass = a), (t.StatusAlertService = new a()); }, 79527: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StoreActionTypes = void 0); var r, i = n(22970); !(function (e) { (e.AddAlert = "ADD_ALERT"), (e.RemoveAlert = "REMOVE_ALERT"), (e.RemoveAllAlerts = "REMOVE_ALL_ALERTS"); })((r = t.StoreActionTypes || (t.StoreActionTypes = {}))); var o, a, s, u = ((o = function (e, t) { switch ((void 0 === e && (e = []), t.type)) { case r.AddAlert: return i.__spreadArray(i.__spreadArray([], i.__read(e), !1), [t.payload], !1); case r.RemoveAlert: var n = e.filter(function (e) { return e.id !== t.payload; }); return i.__spreadArray([], i.__read(n), !1); case r.RemoveAllAlerts: return []; default: return e; } }), (a = []), (s = []), { getState: function () { return a; }, dispatch: function (e) { (a = o(a, e)), s.forEach(function (e) { return e(); }); }, subscribe: function (e) { return ( s.push(e), function () { s = s.filter(function (t) { return t !== e; }); } ); }, }); t.default = u; }, 85547: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.StatusAlertView = void 0); var r = n(22970), i = n(10348), o = n(33847), a = n(77691), s = r.__importDefault(n(79527)), u = (function (e) { function t(t) { var n = e.call(this, t) || this; return ( (n.updateState = function () { n.frameId = requestAnimationFrame(function () { n.frameId2 = requestAnimationFrame(function () { var e = s.default.getState(); n.setState({ alerts: e }); }); }); }), (n.state = { alerts: [] }), (n.unsubscribeStore = s.default.subscribe(n.updateState)), n ); } return ( r.__extends(t, e), (t.prototype.componentWillUnmount = function () { this.unsubscribeStore && this.unsubscribeStore(), window.cancelAnimationFrame(this.frameId), window.cancelAnimationFrame(this.frameId2); }), (t.prototype.render = function () { return (0, i.jsx)(a.StatusAlertContainer, { alerts: this.state.alerts }); }), t ); })(o.Component); t.StatusAlertView = u; }, 29678: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.PauseOverlay = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(51159), s = n(37394), u = r.__importDefault(n(72779)), l = n(34619), c = n(18651); n(38232); t.PauseOverlay = function () { var e = r.__read((0, l.useState)(!1), 2), t = e[0], n = e[1], d = (0, c.useInjection)(s.TypesSocial.model); (void 0 === d.showPauseOverlay || d.showPauseOverlay) && (0, c.useEventListener)( o.CommonEvents.PAUSE, function (e) { return n(e); }, [] ); return (0, i.jsx)( "div", r.__assign( { className: (0, u.default)("pause__overlay", { hidden: !t }), onClick: function () { var e; return null === (e = (0, o.lazyGet)(s.TypesSocial.pauseAction)) || void 0 === e ? void 0 : e.run(!1); }, }, { children: (0, i.jsx)("div", r.__assign({ className: "title" }, { children: a.Localize.get("ui_tap_to_continue", "Tap to continue") })) } ) ); }; }, 97183: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialOverlay = void 0); var r = n(22970), i = n(10348); n(2634); var o = n(37394), a = n(57228), s = n(46595), u = n(34619), l = r.__importDefault(n(72779)); t.SocialOverlay = function () { var e = r.__read((0, u.useState)(!1), 2), t = e[0], n = e[1], c = (0, s.lazyGet)(o.TypesSocial.model); if (c) { var d = function () { return n(!0); }, h = function () { return n(!1); }; (0, u.useEffect)( function () { return ( c.on(a.SocialEvents.SHOW_OVERLAY, d), c.on(a.SocialEvents.HIDE_OVERLAY, h), function () { c.off(a.SocialEvents.SHOW_OVERLAY, d), c.off(a.SocialEvents.HIDE_OVERLAY, h); } ); }, [c] ); } return (0, i.jsx)("div", { className: (0, l.default)("social__overlay", { active: t }) }); }; }, 91634: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(10734), t), r.__exportStar(n(29678), t), r.__exportStar(n(97183), t); }, 56725: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Popups = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(33847), s = n(34619), u = n(18651); t.Popups = function () { var e = r.__read( (0, s.useState)(function () { return { Current: null, CurrentProps: null }; }), 2 ), t = e[0], n = e[1]; (0, u.useEventListener)( o.TypesUI.events.POPUP, function (e) { n(r.__assign(r.__assign({}, t), { Current: (0, i.lazyGet)(e.id), CurrentProps: e.props })); }, [] ); var l = t.Current; return l && (0, a.h)(l, t.CurrentProps); }; }, 93161: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Score = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(7457); t.Score = function (e) { var t = e.className, n = e.icon, s = e.children, u = r.__rest(e, ["className", "icon", "children"]), l = (0, o.default)("score", t), c = n && (function (e) { return "string" == typeof e ? (0, i.jsx)(a.Icon, { type: e, width: 35, height: 35 }) : e; })(n); return (0, i.jsxs)("span", r.__assign({ className: l }, u, { children: [c, (0, i.jsx)("span", r.__assign({ className: "score-content" }, { children: s }))] })); }; }, 58266: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ScoreGroup = void 0); var r = n(22970), i = n(10348), o = r.__importDefault(n(72779)), a = n(93161), s = n(7457); (t.ScoreGroup = function (e) { var t = e.className, n = r.__rest(e, ["className"]), a = (0, o.default)("score-group", t); return (0, i.jsx)("div", r.__assign({ className: a }, n)); }), (t.ScoreGroup.Icon = s.Icon), (t.ScoreGroup.Score = a.Score); }, 9526: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Screens = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(33847), s = n(34619), u = n(18651); t.Screens = function () { var e = r.__read( (0, s.useState)(function () { return { Current: null, CurrentProps: null }; }), 2 ), t = e[0], n = e[1]; (0, u.useEventListener)( o.TypesUI.events.SCREEN_CHANGED, function (e) { n(r.__assign(r.__assign({}, t), { Current: (0, i.lazyGet)(e.id), CurrentProps: e.props })); }, [] ); var l = t.Current; return l && (0, a.h)(l, t.CurrentProps); }; }, 96414: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShareComponent = void 0); var r = n(22970), i = n(10348); n(67946); var o = n(46595), a = n(51159), s = n(37394), u = r.__importDefault(n(72779)), l = n(7457); t.ShareComponent = function (e) { var t = e.invisible, n = e.screenshot, c = e.onShare; return (0, i.jsxs)( "div", r.__assign( { class: (0, u.default)("share-cont", { invisible: t }), onClick: function () { return r.__awaiter(void 0, void 0, void 0, function () { var e, t; return r.__generator(this, function (r) { switch (r.label) { case 0: return [4, null === (t = (0, o.lazyGet)(s.TypesFlow.share)) || void 0 === t ? void 0 : t.run(n)]; case 1: return (e = r.sent()), c && c(e), [2]; } }); }); }, }, { children: [(0, i.jsxs)("div", r.__assign({ className: "share_ico" }, { children: [(0, i.jsx)(l.Icon, { type: "share" }), (0, i.jsx)("div", { children: a.Localize.get("share", "Share") })] })), (0, i.jsx)("img", { className: "screenshot", src: n, alt: "" })] } ) ); }; }, 46762: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SocialBanners = void 0); var r = n(46595), i = n(37394), o = n(33847); t.SocialBanners = function () { var e = (0, r.lazyGet)(i.TypesUI.customComponent.SOCIAL_BANNERS); return e && (0, o.h)(e, {}); }; }, 92423: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UIRoot = void 0); var r = n(22970), i = n(10348), o = n(46595), a = n(47166), s = n(56725), u = n(46762); t.UIRoot = function () { return (0, i.jsx)(a.InversifyContext.Provider, r.__assign({ value: o.di }, { children: (0, i.jsxs)("div", r.__assign({ id: "game-ui" }, { children: [(0, i.jsx)(a.AlertsOverlay, {}), (0, i.jsx)(a.SocialOverlay, {}), (0, i.jsx)(a.PauseOverlay, {}), (0, i.jsx)(s.Popups, {}), (0, i.jsx)(a.Screens, {}), (0, i.jsx)(u.SocialBanners, {})] })) })); }; }, 50886: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.VersionLabel = void 0); var r = n(22970), i = n(10348); n(5881); var o = n(18651), a = n(37394); t.VersionLabel = function () { var e = (0, o.useInjection)(a.TypesCore.gameConfig), t = (0, o.useInjection)(a.TypesSocial.model), n = "fb" === t.socialPlatform ? FBInstant.getSDKVersion() : null; return (0, i.jsx)( "a", r.__assign( { class: "version__label" }, { children: "" .concat(t.socialPlatform) .concat(n ? "-" + n : "", "/") .concat(e.version || "localhost"), } ) ); }; }, 74537: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlobalEventProviderComponent = void 0); var r = n(22970), i = n(33847), o = n(37394), a = n(46595), s = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.listenersMap = {}), t; } var n; return ( r.__extends(t, e), (t.prototype.componentWillUnmount = function () { this.removeAllListeners(); }), (t.prototype.dispatch = function (e, t) { this._dispatcher.emit(e, t); }), (t.prototype.addListener = function (e, t) { this.mapListenerToEvent(e, t, this.listenersMap) ? this._dispatcher.on(e, t, this) : console.warn("Listener " + t + " for event " + e + " is already exists"); }), (t.prototype.addListenerOnce = function (e, t) { var n = this, r = function (i) { t.call(n, i), n.removeListener(e, r); }; this.addListener(e, r); }), (t.prototype.removeListener = function (e, t) { this.unMapListenerToEvent(e, t, this.listenersMap) ? this._dispatcher.off(e, t, this) : console.warn(t + " is not a listener for event " + e); }), (t.prototype.removeListeners = function (e) { var t, n, i = this.listenersMap[e]; if (i) { try { for (var o = r.__values(i), a = o.next(); !a.done; a = o.next()) { var s = a.value; this._dispatcher.off(e, s, this); } } catch (e) { t = { error: e }; } finally { try { a && !a.done && (n = o.return) && n.call(o); } finally { if (t) throw t.error; } } delete this.listenersMap[e]; } else console.warn("There are no any listeners for event " + e); }), (t.prototype.removeAllListeners = function () { var e, t; try { for (var n = r.__values(Object.keys(this.listenersMap)), i = n.next(); !i.done; i = n.next()) { var o = i.value; this.removeListeners(o); } } catch (t) { e = { error: t }; } finally { try { i && !i.done && (t = n.return) && t.call(n); } finally { if (e) throw e.error; } } this.listenersMap = {}; }), (t.prototype.hasListeners = function () { return 0 !== Object.keys(this.listenersMap).length; }), (t.prototype.mapListenerToEvent = function (e, t, n) { var r = n[e]; if (r) { if (r.indexOf(t) > -1) return !1; r.push(t); } else (r = [t]), (n[e] = r); return !0; }), (t.prototype.unMapListenerToEvent = function (e, t, n) { var r = n[e]; if (r) { var i = r.indexOf(t); if (i > -1) return r.splice(i, 1), 0 === r.length && delete n[e], !0; } return !1; }), r.__decorate([(0, a.lazyInject)(o.TypesCore.dispatcher), r.__metadata("design:type", "function" == typeof (n = void 0 !== a.EventDispatcher && a.EventDispatcher) ? n : Object)], t.prototype, "_dispatcher", void 0), t ); })(i.Component); t.GlobalEventProviderComponent = s; }, 51390: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.ToggleControl = void 0); var r = n(22970), i = n(10348), o = n(34619), a = r.__importDefault(n(72779)), s = n(99823); t.ToggleControl = function (e) { var t = r.__read((0, o.useState)(e.value), 2), n = t[0], u = t[1], l = (0, a.default)({ "btn--muted": n }, "btn-icon", "btn-icon__".concat(e.className)); return (0, i.jsx)(s.Button, { className: l, shape: "circle", onClick: function () { u(!n), e.onChange(!n); }, }); }; }, 7849: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(74537), t), r.__exportStar(n(51390), t), r.__exportStar(n(9252), t), r.__exportStar(n(31052), t), r.__exportStar(n(40590), t), r.__exportStar(n(50886), t), r.__exportStar(n(99823), t), r.__exportStar(n(93161), t), r.__exportStar(n(92135), t), r.__exportStar(n(91634), t), r.__exportStar(n(64339), t), r.__exportStar(n(58266), t), r.__exportStar(n(7457), t), r.__exportStar(n(96414), t), r.__exportStar(n(4968), t), r.__exportStar(n(46833), t), r.__exportStar(n(9526), t), r.__exportStar(n(56725), t); }, 13832: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UIEvents = void 0); var r = n(37394); t.UIEvents = { SCREEN_CHANGED: r.TypesUI.events.SCREEN_CHANGED, POPUP: r.TypesUI.events.POPUP, SHOW_CUSTOM_ALERT: r.TypesUI.events.SHOW_CUSTOM_ALERT }; }, 18651: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(90339), t), r.__exportStar(n(64648), t), r.__exportStar(n(12237), t); }, 64648: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.useEventListener = void 0); var r = n(37394), i = n(34619), o = n(90339); t.useEventListener = function (e, t, n) { var a = (0, o.useInjection)(r.TypesCore.dispatcher); (0, i.useLayoutEffect)(function () { return ( a.addListener(e, t), function () { return a.removeListener(e, t); } ); }, n); }; }, 90339: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.useInjection = void 0); var r = n(34619), i = n(47166); t.useInjection = function (e, t) { return void 0 === t && (t = !1), (0, r.useContext)(i.InversifyContext).get(e); }; }, 12237: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.visibilityEffect = void 0); var r = n(22970), i = n(34619); t.visibilityEffect = function (e, t, n) { void 0 === e && (e = 1), void 0 === t && (t = !0), void 0 === n && (n = []); var o = r.__read((0, i.useState)(t), 2), a = o[0], s = o[1]; return ( t && (0, i.useLayoutEffect)(function () { var t = setTimeout(function () { return s(!1); }, e); return function () { return clearTimeout(t); }; }, n), [a, s] ); }; }, 47166: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InversifyContext = void 0); var r = n(22970), i = n(33847); (t.InversifyContext = (0, i.createContext)({})), r.__exportStar(n(22285), t), r.__exportStar(n(18651), t), r.__exportStar(n(13832), t), r.__exportStar(n(7849), t), r.__exportStar(n(92689), t), r.__exportStar(n(7849), t), r.__exportStar(n(97749), t); }, 21391: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 89209: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 92184: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 22285: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(92184), t), r.__exportStar(n(21391), t), r.__exportStar(n(89209), t); }, 12738: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Cookie = void 0); var n = (function () { function e() {} return ( (e.get = function (e) { for (var t = e + "=", n = decodeURIComponent(document.cookie).split(";"), r = 0; r < n.length; r++) { for (var i = n[r]; " " == i.charAt(0); ) i = i.substring(1); if (0 == i.indexOf(t)) return i.substring(t.length, i.length); } return ""; }), (e.set = function (e, t, n) { void 0 === n && (n = 10080); var r = new Date(); r.setMinutes(r.getMinutes() + n), (document.cookie = e + "=" + escape(t) + (null == n ? "" : ";expires=" + r.toUTCString())); }), (e.clear = function (t) { e.set(t, "", -1); }), e ); })(); t.Cookie = n; }, 82033: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Random = void 0); var n = (function () { function e() {} return ( (e.rangeFloat = function (e, t) { return void 0 === t && (t = 0), e + Math.random() * (t - e); }), (e.range = function (t, n) { return Math.floor(e.rangeFloat(t, n)); }), (e.bool = function (e) { return void 0 === e && (e = 0.5), Math.random() <= e; }), (e.sign = function (t) { return void 0 === t && (t = 0.5), e.bool(t) ? 1 : -1; }), (e.UUID = function (e) { return ( void 0 === e && (e = Date.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) { var n = (e + 16 * Math.random()) % 16 | 0; return (e = Math.floor(e / 16)), ("x" === t ? n : (3 & n) | 8).toString(16); }) ); }), (e.from = function () { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; if (e.length > 1) return e[Math.floor(e.length * Math.random())]; var n = e[0]; return Array.isArray(n) ? n[Math.floor(n.length * Math.random())] : n; }), e ); })(); t.Random = n; }, 71786: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.UrlParser = void 0); var r = n(22970), i = (function () { function e() { this.params = {}; } return ( (e.prototype.parseUri = function () { var e = this, t = window.location.search.substr(1).split("&"); t.length && t.forEach(function (t) { var n = r.__read(t.split("="), 2), i = n[0], o = n[1]; e.params[i] = o; }); }), (e.prototype.getParam = function (e) { return void 0 !== this.params[e] ? this.params[e] : null; }), e ); })(); t.UrlParser = i; }, 17905: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(76727), t), r.__exportStar(n(82033), t), r.__exportStar(n(71786), t), r.__exportStar(n(12738), t); }, 76727: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.log = void 0); var r = n(5214); r.log.setLevel(3); var i = r.log.scope("#dp"); t.log = i; }, 59639: function (e, t, n) { var r; (e = n.nmd(e)), (function (i) { t && t.nodeType, e && e.nodeType; var o = "object" == typeof n.g && n.g; o.global !== o && o.window !== o && o.self; var a, s = 2147483647, u = 36, l = 1, c = 26, d = 38, h = 700, p = 72, f = 128, _ = "-", g = /^xn--/, m = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, y = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, C = u - l, b = Math.floor, w = String.fromCharCode; function S(e) { throw new RangeError(y[e]); } function T(e, t) { for (var n = e.length, r = []; n--; ) r[n] = t(e[n]); return r; } function x(e, t) { var n = e.split("@"), r = ""; return n.length > 1 && ((r = n[0] + "@"), (e = n[1])), r + T((e = e.replace(v, ".")).split("."), t).join("."); } function E(e) { for (var t, n, r = [], i = 0, o = e.length; i < o; ) (t = e.charCodeAt(i++)) >= 55296 && t <= 56319 && i < o ? (56320 == (64512 & (n = e.charCodeAt(i++))) ? r.push(((1023 & t) << 10) + (1023 & n) + 65536) : (r.push(t), i--)) : r.push(t); return r; } function L(e) { return T(e, function (e) { var t = ""; return e > 65535 && ((t += w((((e -= 65536) >>> 10) & 1023) | 55296)), (e = 56320 | (1023 & e))), (t += w(e)); }).join(""); } function A(e, t) { return e + 22 + 75 * (e < 26) - ((0 != t) << 5); } function I(e, t, n) { var r = 0; for (e = n ? b(e / h) : e >> 1, e += b(e / t); e > (C * c) >> 1; r += u) e = b(e / C); return b(r + ((C + 1) * e) / (e + d)); } function M(e) { var t, n, r, i, o, a, d, h, g, m, v, y = [], C = e.length, w = 0, T = f, x = p; for ((n = e.lastIndexOf(_)) < 0 && (n = 0), r = 0; r < n; ++r) e.charCodeAt(r) >= 128 && S("not-basic"), y.push(e.charCodeAt(r)); for (i = n > 0 ? n + 1 : 0; i < C; ) { for (o = w, a = 1, d = u; i >= C && S("invalid-input"), ((h = (v = e.charCodeAt(i++)) - 48 < 10 ? v - 22 : v - 65 < 26 ? v - 65 : v - 97 < 26 ? v - 97 : u) >= u || h > b((s - w) / a)) && S("overflow"), (w += h * a), !(h < (g = d <= x ? l : d >= x + c ? c : d - x)); d += u) a > b(s / (m = u - g)) && S("overflow"), (a *= m); (x = I(w - o, (t = y.length + 1), 0 == o)), b(w / t) > s - T && S("overflow"), (T += b(w / t)), (w %= t), y.splice(w++, 0, T); } return L(y); } function P(e) { var t, n, r, i, o, a, d, h, g, m, v, y, C, T, x, L = []; for (y = (e = E(e)).length, t = f, n = 0, o = p, a = 0; a < y; ++a) (v = e[a]) < 128 && L.push(w(v)); for (r = i = L.length, i && L.push(_); r < y; ) { for (d = s, a = 0; a < y; ++a) (v = e[a]) >= t && v < d && (d = v); for (d - t > b((s - n) / (C = r + 1)) && S("overflow"), n += (d - t) * C, t = d, a = 0; a < y; ++a) if (((v = e[a]) < t && ++n > s && S("overflow"), v == t)) { for (h = n, g = u; !(h < (m = g <= o ? l : g >= o + c ? c : g - o)); g += u) (x = h - m), (T = u - m), L.push(w(A(m + (x % T), 0))), (h = b(x / T)); L.push(w(A(h, 0))), (o = I(n, C, r == i)), (n = 0), ++r; } ++n, ++t; } return L.join(""); } (a = { version: "1.4.1", ucs2: { decode: E, encode: L }, decode: M, encode: P, toASCII: function (e) { return x(e, function (e) { return m.test(e) ? "xn--" + P(e) : e; }); }, toUnicode: function (e) { return x(e, function (e) { return g.test(e) ? M(e.slice(4).toLowerCase()) : e; }); }, }), void 0 === (r = function () { return a; }.call(t, n, t, e)) || (e.exports = r); })(); }, 2573: (e) => { "use strict"; var t = String.prototype.replace, n = /%20/g, r = "RFC1738", i = "RFC3986"; e.exports = { default: i, formatters: { RFC1738: function (e) { return t.call(e, n, "+"); }, RFC3986: function (e) { return String(e); }, }, RFC1738: r, RFC3986: i, }; }, 62420: (e, t, n) => { "use strict"; var r = n(73079), i = n(13177), o = n(2573); e.exports = { formats: o, parse: i, stringify: r }; }, 13177: (e, t, n) => { "use strict"; var r = n(43435), i = Object.prototype.hasOwnProperty, o = Array.isArray, a = { allowDots: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decoder: r.decode, delimiter: "&", depth: 5, ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictNullHandling: !1 }, s = function (e) { return e.replace(/&#(\d+);/g, function (e, t) { return String.fromCharCode(parseInt(t, 10)); }); }, u = function (e, t) { return e && "string" == typeof e && t.comma && e.indexOf(",") > -1 ? e.split(",") : e; }, l = function (e, t, n, r) { if (e) { var o = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, a = /(\[[^[\]]*])/g, s = n.depth > 0 && /(\[[^[\]]*])/.exec(o), l = s ? o.slice(0, s.index) : o, c = []; if (l) { if (!n.plainObjects && i.call(Object.prototype, l) && !n.allowPrototypes) return; c.push(l); } for (var d = 0; n.depth > 0 && null !== (s = a.exec(o)) && d < n.depth; ) { if (((d += 1), !n.plainObjects && i.call(Object.prototype, s[1].slice(1, -1)) && !n.allowPrototypes)) return; c.push(s[1]); } return ( s && c.push("[" + o.slice(s.index) + "]"), (function (e, t, n, r) { for (var i = r ? t : u(t, n), o = e.length - 1; o >= 0; --o) { var a, s = e[o]; if ("[]" === s && n.parseArrays) a = [].concat(i); else { a = n.plainObjects ? Object.create(null) : {}; var l = "[" === s.charAt(0) && "]" === s.charAt(s.length - 1) ? s.slice(1, -1) : s, c = parseInt(l, 10); n.parseArrays || "" !== l ? (!isNaN(c) && s !== l && String(c) === l && c >= 0 && n.parseArrays && c <= n.arrayLimit ? ((a = [])[c] = i) : "__proto__" !== l && (a[l] = i)) : (a = { 0: i }); } i = a; } return i; })(c, t, n, r) ); } }; e.exports = function (e, t) { var n = (function (e) { if (!e) return a; if (null !== e.decoder && void 0 !== e.decoder && "function" != typeof e.decoder) throw new TypeError("Decoder has to be a function."); if (void 0 !== e.charset && "utf-8" !== e.charset && "iso-8859-1" !== e.charset) throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); var t = void 0 === e.charset ? a.charset : e.charset; return { allowDots: void 0 === e.allowDots ? a.allowDots : !!e.allowDots, allowPrototypes: "boolean" == typeof e.allowPrototypes ? e.allowPrototypes : a.allowPrototypes, allowSparse: "boolean" == typeof e.allowSparse ? e.allowSparse : a.allowSparse, arrayLimit: "number" == typeof e.arrayLimit ? e.arrayLimit : a.arrayLimit, charset: t, charsetSentinel: "boolean" == typeof e.charsetSentinel ? e.charsetSentinel : a.charsetSentinel, comma: "boolean" == typeof e.comma ? e.comma : a.comma, decoder: "function" == typeof e.decoder ? e.decoder : a.decoder, delimiter: "string" == typeof e.delimiter || r.isRegExp(e.delimiter) ? e.delimiter : a.delimiter, depth: "number" == typeof e.depth || !1 === e.depth ? +e.depth : a.depth, ignoreQueryPrefix: !0 === e.ignoreQueryPrefix, interpretNumericEntities: "boolean" == typeof e.interpretNumericEntities ? e.interpretNumericEntities : a.interpretNumericEntities, parameterLimit: "number" == typeof e.parameterLimit ? e.parameterLimit : a.parameterLimit, parseArrays: !1 !== e.parseArrays, plainObjects: "boolean" == typeof e.plainObjects ? e.plainObjects : a.plainObjects, strictNullHandling: "boolean" == typeof e.strictNullHandling ? e.strictNullHandling : a.strictNullHandling }; })(t); if ("" === e || null == e) return n.plainObjects ? Object.create(null) : {}; for ( var c = "string" == typeof e ? (function (e, t) { var n, l = { __proto__: null }, c = t.ignoreQueryPrefix ? e.replace(/^\?/, "") : e, d = t.parameterLimit === 1 / 0 ? void 0 : t.parameterLimit, h = c.split(t.delimiter, d), p = -1, f = t.charset; if (t.charsetSentinel) for (n = 0; n < h.length; ++n) 0 === h[n].indexOf("utf8=") && ("utf8=%E2%9C%93" === h[n] ? (f = "utf-8") : "utf8=%26%2310003%3B" === h[n] && (f = "iso-8859-1"), (p = n), (n = h.length)); for (n = 0; n < h.length; ++n) if (n !== p) { var _, g, m = h[n], v = m.indexOf("]="), y = -1 === v ? m.indexOf("=") : v + 1; -1 === y ? ((_ = t.decoder(m, a.decoder, f, "key")), (g = t.strictNullHandling ? null : "")) : ((_ = t.decoder(m.slice(0, y), a.decoder, f, "key")), (g = r.maybeMap(u(m.slice(y + 1), t), function (e) { return t.decoder(e, a.decoder, f, "value"); }))), g && t.interpretNumericEntities && "iso-8859-1" === f && (g = s(g)), m.indexOf("[]=") > -1 && (g = o(g) ? [g] : g), i.call(l, _) ? (l[_] = r.combine(l[_], g)) : (l[_] = g); } return l; })(e, n) : e, d = n.plainObjects ? Object.create(null) : {}, h = Object.keys(c), p = 0; p < h.length; ++p ) { var f = h[p], _ = l(f, c[f], n, "string" == typeof e); d = r.merge(d, _, n); } return !0 === n.allowSparse ? d : r.compact(d); }; }, 73079: (e, t, n) => { "use strict"; var r = n(74294), i = n(43435), o = n(2573), a = Object.prototype.hasOwnProperty, s = { brackets: function (e) { return e + "[]"; }, comma: "comma", indices: function (e, t) { return e + "[" + t + "]"; }, repeat: function (e) { return e; }, }, u = Array.isArray, l = Array.prototype.push, c = function (e, t) { l.apply(e, u(t) ? t : [t]); }, d = Date.prototype.toISOString, h = o.default, p = { addQueryPrefix: !1, allowDots: !1, charset: "utf-8", charsetSentinel: !1, delimiter: "&", encode: !0, encoder: i.encode, encodeValuesOnly: !1, format: h, formatter: o.formatters[h], indices: !1, serializeDate: function (e) { return d.call(e); }, skipNulls: !1, strictNullHandling: !1, }, f = {}, _ = function e(t, n, o, a, s, l, d, h, _, g, m, v, y, C, b, w) { for (var S, T = t, x = w, E = 0, L = !1; void 0 !== (x = x.get(f)) && !L; ) { var A = x.get(t); if (((E += 1), void 0 !== A)) { if (A === E) throw new RangeError("Cyclic object value"); L = !0; } void 0 === x.get(f) && (E = 0); } if ( ("function" == typeof h ? (T = h(n, T)) : T instanceof Date ? (T = m(T)) : "comma" === o && u(T) && (T = i.maybeMap(T, function (e) { return e instanceof Date ? m(e) : e; })), null === T) ) { if (s) return d && !C ? d(n, p.encoder, b, "key", v) : n; T = ""; } if ("string" == typeof (S = T) || "number" == typeof S || "boolean" == typeof S || "symbol" == typeof S || "bigint" == typeof S || i.isBuffer(T)) return d ? [y(C ? n : d(n, p.encoder, b, "key", v)) + "=" + y(d(T, p.encoder, b, "value", v))] : [y(n) + "=" + y(String(T))]; var I, M = []; if (void 0 === T) return M; if ("comma" === o && u(T)) C && d && (T = i.maybeMap(T, d)), (I = [{ value: T.length > 0 ? T.join(",") || null : void 0 }]); else if (u(h)) I = h; else { var P = Object.keys(T); I = _ ? P.sort(_) : P; } for (var O = a && u(T) && 1 === T.length ? n + "[]" : n, k = 0; k < I.length; ++k) { var R = I[k], D = "object" == typeof R && void 0 !== R.value ? R.value : T[R]; if (!l || null !== D) { var N = u(T) ? ("function" == typeof o ? o(O, R) : O) : O + (g ? "." + R : "[" + R + "]"); w.set(t, E); var B = r(); B.set(f, w), c(M, e(D, N, o, a, s, l, "comma" === o && C && u(T) ? null : d, h, _, g, m, v, y, C, b, B)); } } return M; }; e.exports = function (e, t) { var n, i = e, l = (function (e) { if (!e) return p; if (null !== e.encoder && void 0 !== e.encoder && "function" != typeof e.encoder) throw new TypeError("Encoder has to be a function."); var t = e.charset || p.charset; if (void 0 !== e.charset && "utf-8" !== e.charset && "iso-8859-1" !== e.charset) throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); var n = o.default; if (void 0 !== e.format) { if (!a.call(o.formatters, e.format)) throw new TypeError("Unknown format option provided."); n = e.format; } var r = o.formatters[n], i = p.filter; return ("function" == typeof e.filter || u(e.filter)) && (i = e.filter), { addQueryPrefix: "boolean" == typeof e.addQueryPrefix ? e.addQueryPrefix : p.addQueryPrefix, allowDots: void 0 === e.allowDots ? p.allowDots : !!e.allowDots, charset: t, charsetSentinel: "boolean" == typeof e.charsetSentinel ? e.charsetSentinel : p.charsetSentinel, delimiter: void 0 === e.delimiter ? p.delimiter : e.delimiter, encode: "boolean" == typeof e.encode ? e.encode : p.encode, encoder: "function" == typeof e.encoder ? e.encoder : p.encoder, encodeValuesOnly: "boolean" == typeof e.encodeValuesOnly ? e.encodeValuesOnly : p.encodeValuesOnly, filter: i, format: n, formatter: r, serializeDate: "function" == typeof e.serializeDate ? e.serializeDate : p.serializeDate, skipNulls: "boolean" == typeof e.skipNulls ? e.skipNulls : p.skipNulls, sort: "function" == typeof e.sort ? e.sort : null, strictNullHandling: "boolean" == typeof e.strictNullHandling ? e.strictNullHandling : p.strictNullHandling }; })(t); "function" == typeof l.filter ? (i = (0, l.filter)("", i)) : u(l.filter) && (n = l.filter); var d, h = []; if ("object" != typeof i || null === i) return ""; d = t && t.arrayFormat in s ? t.arrayFormat : t && "indices" in t ? (t.indices ? "indices" : "repeat") : "indices"; var f = s[d]; if (t && "commaRoundTrip" in t && "boolean" != typeof t.commaRoundTrip) throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); var g = "comma" === f && t && t.commaRoundTrip; n || (n = Object.keys(i)), l.sort && n.sort(l.sort); for (var m = r(), v = 0; v < n.length; ++v) { var y = n[v]; (l.skipNulls && null === i[y]) || c(h, _(i[y], y, f, g, l.strictNullHandling, l.skipNulls, l.encode ? l.encoder : null, l.filter, l.sort, l.allowDots, l.serializeDate, l.format, l.formatter, l.encodeValuesOnly, l.charset, m)); } var C = h.join(l.delimiter), b = !0 === l.addQueryPrefix ? "?" : ""; return l.charsetSentinel && ("iso-8859-1" === l.charset ? (b += "utf8=%26%2310003%3B&") : (b += "utf8=%E2%9C%93&")), C.length > 0 ? b + C : ""; }; }, 43435: (e, t, n) => { "use strict"; var r = n(2573), i = Object.prototype.hasOwnProperty, o = Array.isArray, a = (function () { for (var e = [], t = 0; t < 256; ++t) e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase()); return e; })(), s = function (e, t) { for (var n = t && t.plainObjects ? Object.create(null) : {}, r = 0; r < e.length; ++r) void 0 !== e[r] && (n[r] = e[r]); return n; }; e.exports = { arrayToObject: s, assign: function (e, t) { return Object.keys(t).reduce(function (e, n) { return (e[n] = t[n]), e; }, e); }, combine: function (e, t) { return [].concat(e, t); }, compact: function (e) { for (var t = [{ obj: { o: e }, prop: "o" }], n = [], r = 0; r < t.length; ++r) for (var i = t[r], a = i.obj[i.prop], s = Object.keys(a), u = 0; u < s.length; ++u) { var l = s[u], c = a[l]; "object" == typeof c && null !== c && -1 === n.indexOf(c) && (t.push({ obj: a, prop: l }), n.push(c)); } return ( (function (e) { for (; e.length > 1; ) { var t = e.pop(), n = t.obj[t.prop]; if (o(n)) { for (var r = [], i = 0; i < n.length; ++i) void 0 !== n[i] && r.push(n[i]); t.obj[t.prop] = r; } } })(t), e ); }, decode: function (e, t, n) { var r = e.replace(/\+/g, " "); if ("iso-8859-1" === n) return r.replace(/%[0-9a-f]{2}/gi, unescape); try { return decodeURIComponent(r); } catch (e) { return r; } }, encode: function (e, t, n, i, o) { if (0 === e.length) return e; var s = e; if (("symbol" == typeof e ? (s = Symbol.prototype.toString.call(e)) : "string" != typeof e && (s = String(e)), "iso-8859-1" === n)) return escape(s).replace(/%u[0-9a-f]{4}/gi, function (e) { return "%26%23" + parseInt(e.slice(2), 16) + "%3B"; }); for (var u = "", l = 0; l < s.length; ++l) { var c = s.charCodeAt(l); 45 === c || 46 === c || 95 === c || 126 === c || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (o === r.RFC1738 && (40 === c || 41 === c)) ? (u += s.charAt(l)) : c < 128 ? (u += a[c]) : c < 2048 ? (u += a[192 | (c >> 6)] + a[128 | (63 & c)]) : c < 55296 || c >= 57344 ? (u += a[224 | (c >> 12)] + a[128 | ((c >> 6) & 63)] + a[128 | (63 & c)]) : ((l += 1), (c = 65536 + (((1023 & c) << 10) | (1023 & s.charCodeAt(l)))), (u += a[240 | (c >> 18)] + a[128 | ((c >> 12) & 63)] + a[128 | ((c >> 6) & 63)] + a[128 | (63 & c)])); } return u; }, isBuffer: function (e) { return !(!e || "object" != typeof e) && !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e)); }, isRegExp: function (e) { return "[object RegExp]" === Object.prototype.toString.call(e); }, maybeMap: function (e, t) { if (o(e)) { for (var n = [], r = 0; r < e.length; r += 1) n.push(t(e[r])); return n; } return t(e); }, merge: function e(t, n, r) { if (!n) return t; if ("object" != typeof n) { if (o(t)) t.push(n); else { if (!t || "object" != typeof t) return [t, n]; ((r && (r.plainObjects || r.allowPrototypes)) || !i.call(Object.prototype, n)) && (t[n] = !0); } return t; } if (!t || "object" != typeof t) return [t].concat(n); var a = t; return ( o(t) && !o(n) && (a = s(t, r)), o(t) && o(n) ? (n.forEach(function (n, o) { if (i.call(t, o)) { var a = t[o]; a && "object" == typeof a && n && "object" == typeof n ? (t[o] = e(a, n, r)) : t.push(n); } else t[o] = n; }), t) : Object.keys(n).reduce(function (t, o) { var a = n[o]; return i.call(t, o) ? (t[o] = e(t[o], a, r)) : (t[o] = a), t; }, a) ); }, }; }, 883: (e, t, n) => { "use strict"; var r = n(59639); function i() { (this.protocol = null), (this.slashes = null), (this.auth = null), (this.host = null), (this.port = null), (this.hostname = null), (this.hash = null), (this.search = null), (this.query = null), (this.pathname = null), (this.path = null), (this.href = null); } var o = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, u = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]), l = ["'"].concat(u), c = ["%", "/", "?", ";", "#"].concat(l), d = ["/", "?", "#"], h = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, f = { javascript: !0, "javascript:": !0 }, _ = { javascript: !0, "javascript:": !0 }, g = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, m = n(62420); function v(e, t, n) { if (e && "object" == typeof e && e instanceof i) return e; var r = new i(); return r.parse(e, t, n), r; } (i.prototype.parse = function (e, t, n) { if ("string" != typeof e) throw new TypeError("Parameter 'url' must be a string, not " + typeof e); var i = e.indexOf("?"), a = -1 !== i && i < e.indexOf("#") ? "?" : "#", u = e.split(a); u[0] = u[0].replace(/\\/g, "/"); var v = (e = u.join(a)); if (((v = v.trim()), !n && 1 === e.split("#").length)) { var y = s.exec(v); if (y) return (this.path = v), (this.href = v), (this.pathname = y[1]), y[2] ? ((this.search = y[2]), (this.query = t ? m.parse(this.search.substr(1)) : this.search.substr(1))) : t && ((this.search = ""), (this.query = {})), this; } var C = o.exec(v); if (C) { var b = (C = C[0]).toLowerCase(); (this.protocol = b), (v = v.substr(C.length)); } if (n || C || v.match(/^\/\/[^@/]+@[^@/]+/)) { var w = "//" === v.substr(0, 2); !w || (C && _[C]) || ((v = v.substr(2)), (this.slashes = !0)); } if (!_[C] && (w || (C && !g[C]))) { for (var S, T, x = -1, E = 0; E < d.length; E++) { -1 !== (L = v.indexOf(d[E])) && (-1 === x || L < x) && (x = L); } -1 !== (T = -1 === x ? v.lastIndexOf("@") : v.lastIndexOf("@", x)) && ((S = v.slice(0, T)), (v = v.slice(T + 1)), (this.auth = decodeURIComponent(S))), (x = -1); for (E = 0; E < c.length; E++) { var L; -1 !== (L = v.indexOf(c[E])) && (-1 === x || L < x) && (x = L); } -1 === x && (x = v.length), (this.host = v.slice(0, x)), (v = v.slice(x)), this.parseHost(), (this.hostname = this.hostname || ""); var A = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1]; if (!A) for (var I = this.hostname.split(/\./), M = ((E = 0), I.length); E < M; E++) { var P = I[E]; if (P && !P.match(h)) { for (var O = "", k = 0, R = P.length; k < R; k++) P.charCodeAt(k) > 127 ? (O += "x") : (O += P[k]); if (!O.match(h)) { var D = I.slice(0, E), N = I.slice(E + 1), B = P.match(p); B && (D.push(B[1]), N.unshift(B[2])), N.length && (v = "/" + N.join(".") + v), (this.hostname = D.join(".")); break; } } } this.hostname.length > 255 ? (this.hostname = "") : (this.hostname = this.hostname.toLowerCase()), A || (this.hostname = r.toASCII(this.hostname)); var F = this.port ? ":" + this.port : "", U = this.hostname || ""; (this.host = U + F), (this.href += this.host), A && ((this.hostname = this.hostname.substr(1, this.hostname.length - 2)), "/" !== v[0] && (v = "/" + v)); } if (!f[b]) for (E = 0, M = l.length; E < M; E++) { var j = l[E]; if (-1 !== v.indexOf(j)) { var G = encodeURIComponent(j); G === j && (G = escape(j)), (v = v.split(j).join(G)); } } var H = v.indexOf("#"); -1 !== H && ((this.hash = v.substr(H)), (v = v.slice(0, H))); var V = v.indexOf("?"); if ((-1 !== V ? ((this.search = v.substr(V)), (this.query = v.substr(V + 1)), t && (this.query = m.parse(this.query)), (v = v.slice(0, V))) : t && ((this.search = ""), (this.query = {})), v && (this.pathname = v), g[b] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search)) { F = this.pathname || ""; var Z = this.search || ""; this.path = F + Z; } return (this.href = this.format()), this; }), (i.prototype.format = function () { var e = this.auth || ""; e && ((e = (e = encodeURIComponent(e)).replace(/%3A/i, ":")), (e += "@")); var t = this.protocol || "", n = this.pathname || "", r = this.hash || "", i = !1, o = ""; this.host ? (i = e + this.host) : this.hostname && ((i = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]")), this.port && (i += ":" + this.port)), this.query && "object" == typeof this.query && Object.keys(this.query).length && (o = m.stringify(this.query)); var a = this.search || (o && "?" + o) || ""; return ( t && ":" !== t.substr(-1) && (t += ":"), this.slashes || ((!t || g[t]) && !1 !== i) ? ((i = "//" + (i || "")), n && "/" !== n.charAt(0) && (n = "/" + n)) : i || (i = ""), r && "#" !== r.charAt(0) && (r = "#" + r), a && "?" !== a.charAt(0) && (a = "?" + a), t + i + (n = n.replace(/[?#]/g, function (e) { return encodeURIComponent(e); })) + (a = a.replace("#", "%23")) + r ); }), (i.prototype.resolve = function (e) { return this.resolveObject(v(e, !1, !0)).format(); }), (i.prototype.resolveObject = function (e) { if ("string" == typeof e) { var t = new i(); t.parse(e, !1, !0), (e = t); } for (var n = new i(), r = Object.keys(this), o = 0; o < r.length; o++) { var a = r[o]; n[a] = this[a]; } if (((n.hash = e.hash), "" === e.href)) return (n.href = n.format()), n; if (e.slashes && !e.protocol) { for (var s = Object.keys(e), u = 0; u < s.length; u++) { var l = s[u]; "protocol" !== l && (n[l] = e[l]); } return g[n.protocol] && n.hostname && !n.pathname && ((n.pathname = "/"), (n.path = n.pathname)), (n.href = n.format()), n; } if (e.protocol && e.protocol !== n.protocol) { if (!g[e.protocol]) { for (var c = Object.keys(e), d = 0; d < c.length; d++) { var h = c[d]; n[h] = e[h]; } return (n.href = n.format()), n; } if (((n.protocol = e.protocol), e.host || _[e.protocol])) n.pathname = e.pathname; else { for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift()); ); e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] && p.unshift(""), p.length < 2 && p.unshift(""), (n.pathname = p.join("/")); } if (((n.search = e.search), (n.query = e.query), (n.host = e.host || ""), (n.auth = e.auth), (n.hostname = e.hostname || e.host), (n.port = e.port), n.pathname || n.search)) { var f = n.pathname || "", m = n.search || ""; n.path = f + m; } return (n.slashes = n.slashes || e.slashes), (n.href = n.format()), n; } var v = n.pathname && "/" === n.pathname.charAt(0), y = e.host || (e.pathname && "/" === e.pathname.charAt(0)), C = y || v || (n.host && e.pathname), b = C, w = (n.pathname && n.pathname.split("/")) || [], S = ((p = (e.pathname && e.pathname.split("/")) || []), n.protocol && !g[n.protocol]); if ((S && ((n.hostname = ""), (n.port = null), n.host && ("" === w[0] ? (w[0] = n.host) : w.unshift(n.host)), (n.host = ""), e.protocol && ((e.hostname = null), (e.port = null), e.host && ("" === p[0] ? (p[0] = e.host) : p.unshift(e.host)), (e.host = null)), (C = C && ("" === p[0] || "" === w[0]))), y)) (n.host = e.host || "" === e.host ? e.host : n.host), (n.hostname = e.hostname || "" === e.hostname ? e.hostname : n.hostname), (n.search = e.search), (n.query = e.query), (w = p); else if (p.length) w || (w = []), w.pop(), (w = w.concat(p)), (n.search = e.search), (n.query = e.query); else if (null != e.search) { if (S) (n.host = w.shift()), (n.hostname = n.host), (A = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && ((n.auth = A.shift()), (n.hostname = A.shift()), (n.host = n.hostname)); return (n.search = e.search), (n.query = e.query), (null === n.pathname && null === n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), (n.href = n.format()), n; } if (!w.length) return (n.pathname = null), n.search ? (n.path = "/" + n.search) : (n.path = null), (n.href = n.format()), n; for (var T = w.slice(-1)[0], x = ((n.host || e.host || w.length > 1) && ("." === T || ".." === T)) || "" === T, E = 0, L = w.length; L >= 0; L--) "." === (T = w[L]) ? w.splice(L, 1) : ".." === T ? (w.splice(L, 1), E++) : E && (w.splice(L, 1), E--); if (!C && !b) for (; E--; E) w.unshift(".."); !C || "" === w[0] || (w[0] && "/" === w[0].charAt(0)) || w.unshift(""), x && "/" !== w.join("/").substr(-1) && w.push(""); var A, I = "" === w[0] || (w[0] && "/" === w[0].charAt(0)); S && ((n.hostname = I ? "" : w.length ? w.shift() : ""), (n.host = n.hostname), (A = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && ((n.auth = A.shift()), (n.hostname = A.shift()), (n.host = n.hostname))); return (C = C || (n.host && w.length)) && !I && w.unshift(""), w.length > 0 ? (n.pathname = w.join("/")) : ((n.pathname = null), (n.path = null)), (null === n.pathname && null === n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), (n.auth = e.auth || n.auth), (n.slashes = n.slashes || e.slashes), (n.href = n.format()), n; }), (i.prototype.parseHost = function () { var e = this.host, t = a.exec(e); t && (":" !== (t = t[0]) && (this.port = t.substr(1)), (e = e.substr(0, e.length - t.length))), e && (this.hostname = e); }), (t.parse = v), (t.resolve = function (e, t) { return v(e, !1, !0).resolve(t); }), (t.resolveObject = function (e, t) { return e ? v(e, !1, !0).resolveObject(t) : t; }), (t.format = function (e) { return "string" == typeof e && (e = v(e)), e instanceof i ? e.format() : i.prototype.format.call(e); }), (t.Url = i); }, 99143: (e) => { "use strict"; var t = Object.prototype.hasOwnProperty, n = "~"; function r() {} function i(e, t, n) { (this.fn = e), (this.context = t), (this.once = n || !1); } function o(e, t, r, o, a) { if ("function" != typeof r) throw new TypeError("The listener must be a function"); var s = new i(r, o || e, a), u = n ? n + t : t; return e._events[u] ? (e._events[u].fn ? (e._events[u] = [e._events[u], s]) : e._events[u].push(s)) : ((e._events[u] = s), e._eventsCount++), e; } function a(e, t) { 0 == --e._eventsCount ? (e._events = new r()) : delete e._events[t]; } function s() { (this._events = new r()), (this._eventsCount = 0); } Object.create && ((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)), (s.prototype.eventNames = function () { var e, r, i = []; if (0 === this._eventsCount) return i; for (r in (e = this._events)) t.call(e, r) && i.push(n ? r.slice(1) : r); return Object.getOwnPropertySymbols ? i.concat(Object.getOwnPropertySymbols(e)) : i; }), (s.prototype.listeners = function (e) { var t = n ? n + e : e, r = this._events[t]; if (!r) return []; if (r.fn) return [r.fn]; for (var i = 0, o = r.length, a = new Array(o); i < o; i++) a[i] = r[i].fn; return a; }), (s.prototype.listenerCount = function (e) { var t = n ? n + e : e, r = this._events[t]; return r ? (r.fn ? 1 : r.length) : 0; }), (s.prototype.emit = function (e, t, r, i, o, a) { var s = n ? n + e : e; if (!this._events[s]) return !1; var u, l, c = this._events[s], d = arguments.length; if (c.fn) { switch ((c.once && this.removeListener(e, c.fn, void 0, !0), d)) { case 1: return c.fn.call(c.context), !0; case 2: return c.fn.call(c.context, t), !0; case 3: return c.fn.call(c.context, t, r), !0; case 4: return c.fn.call(c.context, t, r, i), !0; case 5: return c.fn.call(c.context, t, r, i, o), !0; case 6: return c.fn.call(c.context, t, r, i, o, a), !0; } for (l = 1, u = new Array(d - 1); l < d; l++) u[l - 1] = arguments[l]; c.fn.apply(c.context, u); } else { var h, p = c.length; for (l = 0; l < p; l++) switch ((c[l].once && this.removeListener(e, c[l].fn, void 0, !0), d)) { case 1: c[l].fn.call(c[l].context); break; case 2: c[l].fn.call(c[l].context, t); break; case 3: c[l].fn.call(c[l].context, t, r); break; case 4: c[l].fn.call(c[l].context, t, r, i); break; default: if (!u) for (h = 1, u = new Array(d - 1); h < d; h++) u[h - 1] = arguments[h]; c[l].fn.apply(c[l].context, u); } } return !0; }), (s.prototype.on = function (e, t, n) { return o(this, e, t, n, !1); }), (s.prototype.once = function (e, t, n) { return o(this, e, t, n, !0); }), (s.prototype.removeListener = function (e, t, r, i) { var o = n ? n + e : e; if (!this._events[o]) return this; if (!t) return a(this, o), this; var s = this._events[o]; if (s.fn) s.fn !== t || (i && !s.once) || (r && s.context !== r) || a(this, o); else { for (var u = 0, l = [], c = s.length; u < c; u++) (s[u].fn !== t || (i && !s[u].once) || (r && s[u].context !== r)) && l.push(s[u]); l.length ? (this._events[o] = 1 === l.length ? l[0] : l) : a(this, o); } return this; }), (s.prototype.removeAllListeners = function (e) { var t; return e ? ((t = n ? n + e : e), this._events[t] && a(this, t)) : ((this._events = new r()), (this._eventsCount = 0)), this; }), (s.prototype.off = s.prototype.removeListener), (s.prototype.addListener = s.prototype.on), (s.prefixed = n), (s.EventEmitter = s), (e.exports = s); }, 77191: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameModuleBase = void 0); var r = n(43328), i = n(56572), o = n(46595), a = n(6585), s = n(37394), u = n(57228), l = n(22674), c = n(29374), d = n(3510), h = (n(23618), n(88602)); t.GameModuleBase = new l.ContainerModule(function () { o.di.load(o.CoreModule, u.AppModule, i.AudioModule, r.AnalyticsModule, a.GameFlowModule); var e = { id: "159047249520140", sentry: { project: "state-io", dsn: "https://92ce172250c24cfb9b5a38a6e7865ff7@o1362967.ingest.sentry.io/6660018", org: "diesel-g6", authToken: "fedd38ffec1248c0868dc1ea11dda9ab65be6bdd21bb4ecc8faae92d7c1837a8", release: "5270e5e-5e8a611" }, audio: { sounds: { src: ["assets/sounds/track.mp3", "assets/sounds/track.m4a", "assets/sounds/track.ac3", "assets/sounds/track.ogg"], sprite: { click_ui: [0, 500] } } }, i18n: { "ui-store-building": { default: "BUILDING", localizations: { ru_RU: "ЗДАНИЯ", es_ES: "EDIFICIO", es_LA: "EDIFICIO", pt_PT: "EDIFÍCIO", pt_BR: "EDIFÍCIO", zh_CN: "建筑", fr_FR: "BÂTIMENT", de_DE: "GEBÄUDE", zh_TW: "建築", ja_JP: "ビル", ko_KR: "몸체", it_IT: "EDIFICIO", pl_PL: "BUDYNEK", tr_TR: "ÜS", th_TH: "ตึก", hi_IN: "बिल्डिंग", vi_VN: "TÒA NHÀ", id_ID: "BANGUNAN", ms_MY: "BANGUNAN" } }, "ui-store-fighter": { default: "FIGHTER", localizations: { ru_RU: "БОЙЦЫ", es_ES: "LUCHADOR", es_LA: "LUCHADOR", pt_PT: "SOLDADO", pt_BR: "LUTADOR", zh_CN: "斗士", fr_FR: "GUERRIER", de_DE: "KÄMPFER", zh_TW: "戰士", ja_JP: "ファイター", ko_KR: "공격수", it_IT: "SOLDATO", pl_PL: "WOJAK", tr_TR: "SAVAŞÇI", th_TH: "นักสู้", hi_IN: "फाइटर", vi_VN: "CHIẾN SỸ", id_ID: "TENTARA", ms_MY: "PEJUANG" } }, share: { default: "Share", localizations: { ru_RU: "Поделиться", es_ES: "Compartir", es_LA: "Compartir", pt_PT: "Partilhar", pt_BR: "Compartilhar", fr_FR: "Partager", de_DE: "Teilen", zh_CN: "分享", zh_TW: "分享", ja_JP: "シェア", ko_KR: "공유", it_IT: "Condividi", pl_PL: "Udostępnij", tr_TR: "Paylaş", th_TH: "แชร์", hi_IN: "शेयर करें", vi_VN: "Chia sẻ", id_ID: "Bagikan", ms_MY: "Kongsi" } }, "ui-store-color": { default: "COLOR", localizations: { ru_RU: "ЦВЕТ", es_ES: "COLOR", es_LA: "COLOR", pt_PT: "COR", pt_BR: "COR", zh_CN: "颜色", fr_FR: "COULEUR", de_DE: "FARBE", zh_TW: "顏色", ja_JP: "色", ko_KR: "스킨", it_IT: "COLORE", pl_PL: "KOLOR", tr_TR: "RENK", th_TH: "สี", hi_IN: "रंग", vi_VN: "MÀU SẮC", id_ID: "WARNA", ms_MY: "WARNA" } }, "ui-menu-tap_to_play": { default: "TAP TO PLAY", localizations: { ru_RU: "ИГРАТЬ", es_ES: "TOCA PARA JUGAR", es_LA: "TOCA PARA JUGAR", pt_PT: "TOQUE PARA JOGAR", pt_BR: "TOCA PARA JOGAR", zh_CN: "点击开始", fr_FR: "TAPER POUR JOUER", de_DE: "ZUM SPIELEN TIPPEN", zh_TW: "點擊遊玩", ja_JP: "タップしてプレイ", ko_KR: "탭해서 플레이하세요", it_IT: "TOCCA PER GIOCARE", pl_PL: "DOTKNIJ, ABY ZAGRAĆ", tr_TR: "OYNAMAK İÇİN DOKUN", th_TH: "แตะเพื่อเล่น", hi_IN: "खेलने के लिए टैप करें", vi_VN: "CHẠM ĐỂ CHƠI", id_ID: "KETUK UNTUK BERMAIN", ms_MY: "KETIK UNTUK BERMAIN" } }, "ui-settings-settings": { default: "SETTINGS", localizations: { ru_RU: "НАСТРОЙКИ", es_ES: "CONFIGURACIÓN", es_LA: "AJUSTES", pt_PT: "CONFIGURAÇÕES", pt_BR: "DEFINIÇÕES", zh_CN: "设置", fr_FR: "PARAMÈTRES", de_DE: "EINSTELLUNGEN", zh_TW: "設置", ja_JP: "設定", ko_KR: "설정", it_IT: "IMPOSTAZIONI", pl_PL: "USTAWIENIA", tr_TR: "AYARLAR", th_TH: "การตั้งค่า", hi_IN: "सेटिंग्स", vi_VN: "CÀI ĐẶT", id_ID: "PENGATURAN", ms_MY: "TETAPAN" } }, "ui-settings-rate_us": { default: "RATE US", localizations: { ru_RU: "ОЦЕНИТЕ НАС", es_ES: "PUNTÚANOS", es_LA: "CALIFÍCANOS", pt_PT: "AVALIE-NOS", pt_BR: "AVALIA-NOS", zh_CN: "给我们打分", fr_FR: "ÉVALUATION", de_DE: "BEWERTEN", zh_TW: "評價我們", ja_JP: "ゲームを評価する", ko_KR: "평가해주세요", it_IT: "VALUTACI", pl_PL: "OCEŃ NAS", tr_TR: "PUANLA", th_TH: "ให้คะแนน", hi_IN: "रेटिंग करें", vi_VN: "Đ.GIÁ", id_ID: "BERI NILAI", ms_MY: "NILAIKAN" } }, "ui-win-win_label": { default: "YOU WON", localizations: { ru_RU: "ПОБЕДА", es_ES: "HAS GANADO", es_LA: "GANASTE", pt_PT: "VOCÊ VENCEU", pt_BR: "GANHASTE", zh_CN: "你赢了", fr_FR: "VOUS AVEZ GAGNÉ", de_DE: "GEWONNEN", zh_TW: "您獲勝了", ja_JP: "勝ち", ko_KR: "승리했습니다", it_IT: "HAI VINTO", pl_PL: "WYGRYWASZ", tr_TR: "KAZANDIN", th_TH: "คุณชนะ", hi_IN: "आप जीत गए", vi_VN: "BẠN ĐÃ THẮNG", id_ID: "KAMU MENANG", ms_MY: "ANDA MENANG" } }, "ui-win-reward_label": { default: "YOUR REWARD", localizations: { ru_RU: "НАГРАДА", es_ES: "TU RECOMPENSA", es_LA: "TU RECOMPENSA", pt_PT: "SUA RECOMPENSA", pt_BR: "A TUA RECOMPENSA", zh_CN: "你的奖励", fr_FR: "VOTRE RÉCOMPENSE", de_DE: "DEINE BELOHNUNG", zh_TW: "您的獎勵", ja_JP: "報酬", ko_KR: "보상", it_IT: "IL TUO PREMIO", pl_PL: "TWOJA NAGRODA", tr_TR: "ÖDÜLÜN", th_TH: "รางวัลของคุณ", hi_IN: "आपका इनाम", vi_VN: "PHẦN THƯỞNG CỦA BẠN", id_ID: "HADIAHMU", ms_MY: "GANJARAN ANDA" } }, "ui-lose-lose_label": { default: "YOU LOSE", localizations: { ru_RU: "ПОРАЖЕНИЕ", es_ES: "HAS PERDIDO", es_LA: "PERDISTE", pt_PT: "VOCÊ PERDEU", pt_BR: "PERDES", zh_CN: "你输了", fr_FR: "VOUS PERDEZ", de_DE: "VERLOREN", zh_TW: "您落敗了", ja_JP: "失う", ko_KR: "패배했습니다", it_IT: "HAI PERSO", pl_PL: "PRZEGRYWASZ", tr_TR: "KAYBETTİN", th_TH: "คุณแพ้", hi_IN: "आप हार रहे हैं", vi_VN: "BẠN THUA", id_ID: "KAMU KALAH", ms_MY: "ANDA KALAH" } }, "ui-lose-lost_label": { default: "YOU LOST", localizations: { ru_RU: "ВЫ ПОТЕРЯЕТЕ", es_ES: "HAS PERDIDO", es_LA: "HAS PERDIDO", pt_PT: "VOCÊ PERDEU", pt_BR: "PERDESTE", zh_CN: "你输了", fr_FR: "VOUS AVEZ PERDU", de_DE: "DU HAST VERLOREN", zh_TW: "您落敗了", ja_JP: "負け", ko_KR: "패배했습니다", it_IT: "PERDI", pl_PL: "STRATA", tr_TR: "KAYBETTİN", th_TH: "คุณแพ้", hi_IN: "आप हार गए", vi_VN: "BẠN ĐÃ THUA", id_ID: "KAMU KEHILANGAN", ms_MY: "ANDA HILANG" } }, "ui-common-no_thanks_button": { default: "NO, THANKS", localizations: { ru_RU: "НЕТ, СПАСИБО", es_ES: "NO, GRACIAS", es_LA: "NO, GRACIAS", pt_PT: "NÃO, OBRIGADO(A)", pt_BR: "NÃO, OBRIGADO", zh_CN: "不,谢谢", fr_FR: "NON MERCI", de_DE: "NEIN DANKE", zh_TW: "不用了", ja_JP: "いいえ", ko_KR: "괜찮아요", it_IT: "NO, GRAZIE", pl_PL: "NIE, DZIĘKI", tr_TR: "HAYIR, TEŞEKKÜRLER", th_TH: "ไม่เป็นไร ขอบคุณ", hi_IN: "नहीं धन्यवाद", vi_VN: "KHÔNG, CẢM ƠN", id_ID: "TIDAK TERIMA KASIH", ms_MY: "TIDAK, TERIMA KASIH" } }, "ui-exit-exit_label": { default: "EXIT", localizations: { ru_RU: "ВЫХОД", es_ES: "SALIR", es_LA: "SALIR", pt_PT: "SAIR", pt_BR: "SAIR", zh_CN: "退出", fr_FR: "QUITTER", de_DE: "VERLASSEN", zh_TW: "退出遊戲嗎?", ja_JP: "退出する", ko_KR: "나가기", it_IT: "ESCI", pl_PL: "WYJŚCIE", tr_TR: "ÇIKIŞ", th_TH: "ออก", hi_IN: "एग्जिट", vi_VN: "THOÁT", id_ID: "KELUAR", ms_MY: "KELUAR" } }, "ui-exit-description": { default: "Leave the game?", localizations: { ru_RU: "Вы точно хотите выйти?", es_ES: "¿Salir del juego?", es_LA: "¿Salir del juego?", pt_PT: "Sair do jogo?", pt_BR: "Deixar o jogo?", zh_CN: "离开游戏?", fr_FR: "Quitter le jeu ?", de_DE: "Spiel verlassen?", zh_TW: "圓點大亂鬥", ja_JP: "ゲームから退出しますか?", ko_KR: "게임을 나가시겠습니까?", it_IT: "Vuoi uscire dal gioco?", pl_PL: "Opuścić grę?", tr_TR: "Oyundan çıkılsın mı?", th_TH: "ออกจากเกมหรือไม่?", hi_IN: "क्या गेम छोड़ें?", vi_VN: "Thoát khỏi trò chơi?", id_ID: "Keluar dari game?", ms_MY: "Tinggalkan permainan?" } }, "ui-rate-description": { default: "Enjoy our game?", localizations: { ru_RU: "Нравится наша игра?", es_ES: "¿Te gusta el juego?", es_LA: "¿Te gusta el juego?", pt_PT: "Curtiu o jogo?", pt_BR: "Gostou do jogo?", zh_CN: "你觉得游戏怎么样?", fr_FR: "Appréciez-vous le jeu ?", de_DE: "Gefällt dir das Spiel?", zh_TW: "你喜歡本遊戲嗎?", ja_JP: "ゲームはどの程度気に入っていただけましたか?", ko_KR: "게임을 얼마나 좋아하세요?", it_IT: "Ti piace il gioco?", pl_PL: "Podoba ci się nasza gra?", tr_TR: "Oyunu beğendin mi?", th_TH: "ชอบเกมนี้แค่ไหน", hi_IN: "क्या क्लैश ऑफ़ डॉट्स अच्छा लगा?", vi_VN: "Bạn có thích trò chơi không?", id_ID: "Kamu suka game ini?", ms_MY: "Bagaimana anda suka permainan?" } }, "ui-rate-rate": { default: "RATE", localizations: { ru_RU: "ОЦЕНИТЬ", es_ES: "PUNTÚA", es_LA: "CALIFÍCANOS", pt_PT: "AVALIE", pt_BR: "AVALIA", zh_CN: "打分", fr_FR: "NOTER", de_DE: "BEWERT", zh_TW: "評分", ja_JP: "評価する", ko_KR: "평가하기", it_IT: "VALUTA", pl_PL: "OCEŃ", tr_TR: "PUANLA", th_TH: "จัดอันดับ", hi_IN: "रेटिंग", vi_VN: "Đ.GIÁ", id_ID: "NILAI", ms_MY: "RATING" } }, "ui-noads-description": { default: "Disable ads\nand play non-stop!", localizations: { ru_RU: "Отключите рекламу\nи играйте без остановки!", es_ES: "¡Deshabilita los anuncios\ny juega sin interrupciones!", es_LA: "¡Desactiva los anuncios para jugar sin parar!", pt_PT: "Desative anúncios\ne jogue sem interrupções!", pt_BR: "Desativa os anúncios\ne joga sem parar!", zh_CN: "禁用广告\n玩不停!", fr_FR: "Désactiver les annonces\net jouer non-stop", de_DE: "Keine Werbung\nund nonstop spielen!", zh_TW: "去除廣告\n然後暢玩!", ja_JP: "広告を無効にして\nノンストップでプレイ!", ko_KR: "광고를 비활성화하고\n방해 없이 플레이하세요!", it_IT: "Elimina pubblicità\ne interruzioni!", pl_PL: "Wyłącz reklamy\ni graj bez przerwy!", tr_TR: "Reklamları kapat\nve durmaksızın oyna!", th_TH: "ปิดการใช้งานโฆษณา\nและเล่นได้อย่างต่อเนื่อง!", hi_IN: "विज्ञापन अक्षम करें\nऔर बिना रुके खेलें!", vi_VN: "Tắt q.cáo\nvà chơi liên tục!", id_ID: "Matikan iklan\ndan bermain tanpa henti!", ms_MY: "Lumpuhkan iklan\ndan main tanpa henti!" } }, "ui-menu-level_num": { default: "LEVEL", localizations: { ru_RU: "УРОВЕНЬ", es_ES: "NIVEL", es_LA: "NIVEL", pt_PT: "NÍVEL", pt_BR: "NÍVEL", zh_CN: "关卡", fr_FR: "NIVEAU", de_DE: "LEVEL", zh_TW: "關卡", ja_JP: "レベル", ko_KR: "레벨", it_IT: "LIVELLO", pl_PL: "POZIOM", tr_TR: "BÖLÜM", th_TH: "ระดับ", hi_IN: "लेवल", vi_VN: "CẤP ĐỘ", id_ID: "LEVEL", ms_MY: "TAHAP" } }, "ui-win-claim": { default: "CLAIM", localizations: { ru_RU: "ПОЛУЧИТЬ", es_ES: "SOLICITAR", es_LA: "RECLAMAR", pt_PT: "RESGATAR", pt_BR: "RESGATAR", zh_CN: "领取", fr_FR: "RECEVOIR", de_DE: "ERHALTEN", zh_TW: "領取", ja_JP: "請求する", ko_KR: "획득", it_IT: "RICHIEDI", pl_PL: "ODBIERZ", tr_TR: "AL", th_TH: "รับ", hi_IN: "दावा करें", vi_VN: "NHẬN THƯỞNG", id_ID: "KLAIM", ms_MY: "TUNTUT" } }, "ui-try-again-button": { default: "TRY AGAIN", localizations: { ru_RU: "TRY AGAIN", es_ES: "TRY AGAIN", es_LA: "TRY AGAIN", pt_PT: "TRY AGAIN", pt_BR: "TRY AGAIN", zh_CN: "TRY AGAIN", fr_FR: "TRY AGAIN", de_DE: "TRY AGAIN", zh_TW: "TRY AGAIN", ja_JP: "TRY AGAIN", ko_KR: "TRY AGAIN", it_IT: "TRY AGAIN", pl_PL: "TRY AGAIN", tr_TR: "TRY AGAIN", th_TH: "TRY AGAIN", hi_IN: "TRY AGAIN", vi_VN: "TRY AGAIN", id_ID: "TRY AGAIN", ms_MY: "TRY AGAIN" } }, "ui-settings-restore_purchase": { default: "RESTORE\nPURCHASES", localizations: { ru_RU: "ВОССТАНОВИТЬ\nПОКУПКИ", es_ES: "RESTAURAR\nCOMPRAS", es_LA: "RESTAURAR\nCOMPRAS", pt_PT: "RESTAURAR\nCOMPRAS", pt_BR: "REPOR\nCOMPRAS", zh_CN: "恢复\n购买", fr_FR: "RESTAURER\nACHATS", de_DE: "EINKÄUFE\nWIEDERHERSTELLEN", zh_TW: "重置\n購買", ja_JP: "購入を\n復元する", ko_KR: "구매\n복구", it_IT: "RIPRIST.\nACQUISTI", pl_PL: "PRZYWRÓĆ\nZAKUPY", tr_TR: "ALIMLARI\nGERİ YÜKLE", th_TH: "กู้คืน\nการซื้อ", hi_IN: "खरीद\nबहाल करें", vi_VN: "KHÔI PHỤC\nMUA HÀNG", id_ID: "PULIHKAN\nPEMBELIAN", ms_MY: "PULIHKAN\nPEMBELIAN" } }, "ui-win-continue": { default: "CONTINUE", localizations: { ru_RU: "ПРОДОЛЖИТЬ", es_ES: "CONTINUAR", es_LA: "CONTINUAR", pt_PT: "CONTINUAR", pt_BR: "CONTINUAR", zh_CN: "继续", fr_FR: "CONTINUER", de_DE: "FORTFAHREN", zh_TW: "繼續", ja_JP: "続行", ko_KR: "계속", it_IT: "CONTINUA", pl_PL: "KONTYNUUJ", tr_TR: "DEVAM", th_TH: "ต่อไป", hi_IN: "जारी रखें", vi_VN: "TIẾP TỤC", id_ID: "LANJUTKAN", ms_MY: "TERUSKAN" } }, "ui-gdpr-title": { default: "We've updated our Terms", localizations: { ru_RU: "Мы обновили наши условия использования", es_ES: "Hemos actualizado nuestras condiciones de uso.", es_LA: "Actualizamos nuestros términos de servicio.", pt_PT: "Atualizamos nossos termos e condições.", pt_BR: "Atualizámos os nossos termos e condições. Para continuar a jogar, aceita os novos Termos de Utilização.", zh_CN: "当社の利用規約が更新されました。", fr_FR: "Nous avons mis à jour nos conditions générales.", de_DE: "Unsere Nutzungsbedingungen haben sich geändert.", zh_TW: "약관을 업데이트했습니다.", ja_JP: "条款和条件已更新。", ko_KR: "我們更新了我們的合約條款.", it_IT: "Abbiamo aggiornato i nostri termini e condizioni.", pl_PL: "Zaktualizowaliśmy nasze warunki", tr_TR: "Koşullarımız güncellendi.", th_TH: "เราได้อัปเดตข้อกำหนดในการให้บริการเกมแล้ว", hi_IN: "हमने अपनी शर्तों को अपडेट कर दिया है।", vi_VN: "Chúng tôi đã cập nhật các Điều khoản", id_ID: "Kami sudah memperbarui Ketentuan kami", ms_MY: "Kami telah mengemas kini Syarat kami" } }, "ui-gdpr-description": { default: 'By tapping "Accept" you agree to them', localizations: { ru_RU: 'Нажимая "Принять", вы соглашаетесь с ними.', es_ES: "Al tocar Aceptar,\nlas aceptas", es_LA: "Al tocar Aceptar,\nlas aceptas", pt_PT: "Ao tocar Aceito,\nvocê os aceita", pt_BR: "Ao tocar em Aceitar,\nconcordas com eles", zh_CN: "要继续玩\n请接受我们的新使用条款。", fr_FR: "En touchant Accepter, vous\nconvenez de les respecter", de_DE: "Wenn du auf Akzeptieren tippst,\nstimmst du ihnen zu", zh_TW: "想繼續遊玩,\n請先接受我們的合約條款。", ja_JP: "承諾をタップすると、利用規約および\nプライバシーポリシーに同意したことになります", ko_KR: "동의를 탭하여\n약관에 동의해 주십시오.", it_IT: "Per continuare a giocare,\naccetta le nostre nuove Condizioni per l'uso.", pl_PL: "Aby dlaej grać,\nmusisz zaakceptować nasz nowy Warunki świadczenia usług.", tr_TR: "Kabul et butonuna basmakla\nbunları kabul etmiş sayılırsınız", th_TH: "เมื่อแตะที่ยอมรับ คุณได้\nยอมรับเงื่อนไขและนโยบายทั้งหมด", hi_IN: '"स्वीकार करें" पर टैप करके आप इन से सहमत हैं', vi_VN: "Để tiếp tục chơi,\nvui lòng chấp nhận Điều khoản sử dụng mới của chúng tôi.", id_ID: "Untuk melanjutkan permainan,\nsetujui Ketentuan Penggunaan baru kami.", ms_MY: 'Dengan mengetik "Terima"\nanda bersetuju dengan mereka' } }, "ui-gdpr-accept_button": { default: "ACCEPT", localizations: { ru_RU: "ПРИНЯТЬ", es_ES: "Acceptar", es_LA: "ACEPTAR", pt_PT: "Aceitar", pt_BR: "Aceitar", zh_CN: "接受", fr_FR: "Accepter", de_DE: "Akzeptieren", zh_TW: "同意", ja_JP: "承諾する", ko_KR: "수락", it_IT: "Accetta", pl_PL: "Akceptuj", tr_TR: "Kabul et", th_TH: "ยอมรับ", hi_IN: "स्वीकार करें", vi_VN: "Chấp nhận", id_ID: "Terima", ms_MY: "Terima" } }, "ui-gdpr-terms_button": { default: "Terms Of Service", localizations: { ru_RU: "Условия использования", es_ES: "Condiciones de uso", es_LA: "Términos de servicio", pt_PT: "Termos de Uso", pt_BR: "Termos de Utilização", zh_CN: "利用規約", fr_FR: "Conditions d'utilisation", de_DE: "Nutzungsbedingungen", zh_TW: "使用條款", ja_JP: "使用条款", ko_KR: "사용 약관", it_IT: "Condizioni di utilizzo", pl_PL: "Warunki świadczenia usług", tr_TR: "Hizmet Koşulları", th_TH: "ข้อกำหนดในการให้บริการ", hi_IN: "सेवा की शर्तें", vi_VN: "Điều khoản dịch vụ", id_ID: "Ketentuan Penggunaan", ms_MY: "Syarat Perkhidmatan" } }, "ui-gdpr-privacy_button": { default: "Privacy Policy", localizations: { ru_RU: "Политика конфиденциальности", es_ES: "Política de privacidad", es_LA: "Política de privacidad", pt_PT: "Política de Privacidade", pt_BR: "Política de Privacidade", zh_CN: "隐私政策", fr_FR: "Charte de confidentialité", de_DE: "Datenschutzerklärung", zh_TW: "隱私政策", ja_JP: "プライバシーポリシー", ko_KR: "개인정보 보호정책", it_IT: "Informativa sulla privacy", pl_PL: "Polityka prywatności", tr_TR: "Gizlilik politikası", th_TH: "นโยบายความเป็นส่วนตัว", hi_IN: "गोपनीयता नीति", vi_VN: "Chính sách bảo mật", id_ID: "Kebijakan Privasi", ms_MY: "Dasar Privasi" } }, "ui-offline-title": { default: "OFFLINE EARNINGS", localizations: { ru_RU: "ОФФЛАЙН ДОХОД", es_ES: "GANANCIAS AUSENTE", es_LA: "GANANCIAS AUSENTE", pt_PT: "GANHOS OFFLINE", pt_BR: "GANHOS OFFLINE", zh_CN: "离线收益", fr_FR: "GAINS HORS LIGNE", de_DE: "OFFLINE-ERLÖSE", zh_TW: "離線收入", ja_JP: "オフラインでの得点", ko_KR: "오프라인 수익", it_IT: "GUADAGNI OFFLINE", pl_PL: "ZAROBKI OFFLINE", tr_TR: "ÇEVRİMDIŞI KAZANÇ", th_TH: "รายได้แบบออฟไลน์", hi_IN: "ऑफलाइन कमाई", vi_VN: "THU NHẬP NG.TUYẾN", id_ID: "PENDAPATAN OFFLINE", ms_MY: "HASIL LUAR TALIAN" } }, "ui-offline-description": { default: "YOU WERE AWAY FOR:", localizations: { ru_RU: "ВАС НЕ БЫЛО:", es_ES: "HAS ESTADO SIN JUGAR:", es_LA: "ESTUVISTE AUSENTE POR:", pt_PT: "ESTIVESTE AUSENTE DURANTE:", pt_BR: "ESTIVESTE AUSENTE DURANTE:", zh_CN: "你离开了:", fr_FR: "VOUS ÊTES PARTI PENDANT :", de_DE: "DU WARST WEG FÜR:", zh_TW: "你共離開了:", ja_JP: "離れていた時間:", ko_KR: "你共離開了:", it_IT: "NON GIOCHI DA:", pl_PL: "NIE BYŁO CIĘ PRZEZ:", tr_TR: "SEN YOKKEN GEÇEN ZAMAN:", th_TH: "คุณหายไปเป็นเวลา:", hi_IN: "आप इतने समय से दूर थे", vi_VN: "BẠN ĐÃ VẮNG MẶT TRONG:", id_ID: "KAMU PERGI SELAMA:", ms_MY: "ANDA JAUH DARI PERMAINAN SELAMA:" } }, "ui-offline-mult_button": { default: "MULTIPLY", localizations: { ru_RU: "УМНОЖИТЬ", es_ES: "MULTIPLICAR", es_LA: "MULTIPLICAR", pt_PT: "MULTIPLICAR", pt_BR: "MULTIPLICAR", zh_CN: "翻倍", fr_FR: "MULTIPLIER", de_DE: "MULTIPLIZIEREN", zh_TW: "翻倍", ja_JP: "マルチプレイ", ko_KR: "멀티플레이", it_IT: "MOLTIPLICA", pl_PL: "POMNÓŻ", tr_TR: "KATLA", th_TH: "คูณ", hi_IN: "मल्टीप्लाई", vi_VN: "NHÂN", id_ID: "LIPAT GANDA", ms_MY: "PELBAGAI" } }, "ui-menu-capturing": { default: "CAPTURING", localizations: { ru_RU: "ЗАХВАТ", es_ES: "CAPTURAR", es_LA: "CAPTURAR", pt_PT: "CAPTURA", pt_BR: "A CAPTURAR", zh_CN: "抓住", fr_FR: "CAPTURE", de_DE: "WIRD GEFANGEN", zh_TW: "抓住", ja_JP: "征服中", ko_KR: "캡처", it_IT: "IN CATTURA", pl_PL: "PRZEJMOWANIE", tr_TR: "YAKALAMA", th_TH: "กำลังยึด", hi_IN: "कब्जा करना", vi_VN: "CHIẾM", id_ID: "MENANGKAP", ms_MY: "MENGHASILKAN" } }, "ui-fillbox-get": { default: "GET", localizations: { ru_RU: "ПОЛУЧИТЬ", es_ES: "OBTENER", es_LA: "OBTENER", pt_PT: "GAHNE", pt_BR: "OBTER", zh_CN: "获取", fr_FR: "OBTENIR", de_DE: "NIMM", zh_TW: "獲取", ja_JP: "ゲット", ko_KR: "ゲット", it_IT: "OTTIENI", pl_PL: "WEŹ", tr_TR: "AL", th_TH: "รับ", hi_IN: "प्राप्त करें", vi_VN: "LẤY", id_ID: "DAPATKAN", ms_MY: "DAPATKAN" } }, "ui-upgrade-units": { default: "units", localizations: { ru_RU: "юниты", es_ES: "tropas", es_LA: "tropas", pt_PT: "uni.", pt_BR: "uni.", zh_CN: "单位", fr_FR: "unités", de_DE: "Einh.", zh_TW: "單位", ja_JP: "部隊", ko_KR: "유닛", it_IT: "unità", pl_PL: "jedn.", tr_TR: "Birim", th_TH: "หน่วย", hi_IN: "यूनिट", vi_VN: "đơn vị", id_ID: "unit", ms_MY: "unit" } }, "ui-upgrate-rate": { default: "units per second", localizations: { ru_RU: "юниты в секунду", es_ES: "tropas por segundo", es_LA: "tropas por segundo", pt_PT: "unidades por segundo", pt_BR: "uni. por segundo", zh_CN: "每秒单位", fr_FR: "unités par seconde", de_DE: "Einheiten/s", zh_TW: "每秒單位", ja_JP: "1秒毎の部隊", ko_KR: "1초당 유닛", it_IT: "unità al secondo", pl_PL: "jednostek na sek.", tr_TR: "Birim/sn", th_TH: "หน่วยต่อวินาที", hi_IN: "यूनिट प्रति सेकंड", vi_VN: "đơn vị mỗi giây", id_ID: "unit per detik", ms_MY: "unit sesaat" } }, "ui-upgrade-offline": { default: "coins per hour", localizations: { ru_RU: "монет в час", es_ES: "dinero por hora", es_LA: "monedas por hora", pt_PT: "moedas por hora", pt_BR: "moedas por hora", zh_CN: "每小时金币", fr_FR: "pièces par heure", de_DE: "Münzen/h", zh_TW: "每小時硬幣", ja_JP: "1時間毎のコイン", ko_KR: "1시간당 코인", it_IT: "monete all'ora", pl_PL: "monet na godz.", tr_TR: "Jeton/sa", th_TH: "เหรียญต่อชั่วโมง", hi_IN: "सिक्के प्रति घंटा", vi_VN: "xu mỗi giờ", id_ID: "koin per jam", ms_MY: "syiling sejam" } }, "ui-common-free": { default: "FREE", localizations: { ru_RU: "БЕСПЛАТНО", es_ES: "GRATIS", es_LA: "GRATIS", pt_PT: "GRÁTIS", pt_BR: "GRÁTIS", zh_CN: "免费", fr_FR: "GRATUIT", de_DE: "KOSTENLOS", zh_TW: "免費", ja_JP: "無料", ko_KR: "무료", it_IT: "GRATIS", pl_PL: "DARMOWE", tr_TR: "BEDAVA", th_TH: "ฟรี", hi_IN: "मुफ्त", vi_VN: "MIỄN PHÍ", id_ID: "GRATIS", ms_MY: "PERCUMA" } }, "ui-fillbox-new_skin": { default: "NEW SKIN", localizations: { ru_RU: "НОВЫЙ СКИН", es_ES: "NUEVO ASPECTO", es_LA: "NUEVA SKIN", pt_PT: "NOVO VISUAL", pt_BR: "NOVO VISUAL", zh_CN: "新皮肤", fr_FR: "NOUVELLE APPARENCE", de_DE: "NEUER SKIN", zh_TW: "新造型", ja_JP: "新スキン", ko_KR: "신규 스킨", it_IT: "NUOVA SKIN", pl_PL: "NOWA SKÓRKA", tr_TR: "YENI GÖRÜNÜM", th_TH: "สกินใหม่", hi_IN: "नई स्किन", vi_VN: "DIỆN MẠO MỚI", id_ID: "SKIN BARU", ms_MY: "KULIT BAHARU" } }, "ui-fillbox-use": { default: "USE", localizations: { ru_RU: "ИСПОЛЬЗОВАТЬ", es_ES: "USAR", es_LA: "USAR", pt_PT: "USAR", pt_BR: "USAR", zh_CN: "使用", fr_FR: "UTILISER", de_DE: "VERWENDEN", zh_TW: "使用", ja_JP: "使用", ko_KR: "사용", it_IT: "USA", pl_PL: "UŻYJ", tr_TR: "KULLAN", th_TH: "ใช้", hi_IN: "उपयोग करें", vi_VN: "DÙNG", id_ID: "GUNAKAN", ms_MY: "GUNAKAN" } }, "ui-fillbox-no_content": { default: "New content coming soon...", localizations: { ru_RU: "Новый контент уже на подходе...", es_ES: "Nuevo contenido próximamente...", es_LA: "Nuevo contenido pronto", pt_PT: "Novo conteúdo em breve...", pt_BR: "Mais conteúdo em breve...", zh_CN: "新内容即将发布……", fr_FR: "Nouveaux contenus prochainement...", de_DE: "Neuer Inhalt in Kürze …", zh_TW: "新內容即將發布……", ja_JP: "新コンテンツが間もなく登場…", ko_KR: "신규 콘텐츠가 곧 출시됩니다…", it_IT: "Nuovi contenuti presto in arrivo…", pl_PL: "Nowa zawartość pojawi się wkrótce…", tr_TR: "Yeni içerik yakında geliyor…", th_TH: "คอนเทนต์ใหม่จะมาถึงเร็วๆ นี้...", hi_IN: "नई सामग्री जल्द आ रही है...", vi_VN: "Sắp có nội dung mới…", id_ID: "Konten baru segera hadir…", ms_MY: "Kandungan baharu tidak lama lagi..." } }, "ui-fillbox-title": { default: "GIFT", localizations: { ru_RU: "ПОДАРОК", es_ES: "REGALO", es_LA: "REGALO", pt_PT: "PRENDA", pt_BR: "PRENDA", zh_CN: "礼物", fr_FR: "CADEAU", de_DE: "GESCHENK", zh_TW: "禮物", ja_JP: "プレゼント", ko_KR: "선물", it_IT: "REGALO", pl_PL: "PREZENT", tr_TR: "HEDİYE", th_TH: "ของขวัญ", hi_IN: "GIFT", vi_VN: "MÓN QUÀ", id_ID: "HADIAH", ms_MY: "{0} KIRI MUSUH" } }, "ui-gameplay-players_left": { default: "{0} ENEMY LEFT", localizations: { ru_RU: "{0} ВРАГОВ ОСТАЛОСЬ", es_ES: "QUEDA(N) {0} ENEMIGO(S)", es_LA: "QUEDA(N) {0} ENEMIGO(S)", pt_PT: "{0} INIMIGO(S) RESTANTE(S)", pt_BR: "{0} INIMIGO(S) RESTANTE(S)", zh_CN: "剩余{0}个敌人", fr_FR: "{0} ENNEMI RESTANT", de_DE: "NOCH {0} GEGNER", zh_TW: "剩餘 {0} 個敵人", ja_JP: "敵残り{0}", ko_KR: "적 {0}명 남음", it_IT: "NEMICI RIMASTI: {0}", pl_PL: "POZOSTAŁYCH WROGÓW: {0}", tr_TR: "{0} DÜŞMAN KALDI", th_TH: "เหลือศัตรูอีก {0}", hi_IN: "{0} दुश्मन शेष", vi_VN: "{0} KẺ THÙ CÒN LẠI", id_ID: "{0} MUSUH TERSISA", ms_MY: "{0} MUSUH TINGGAL" } }, "ui-menu-hint": { default: "HINT: YOU CAN ALSO CHANGE IT LATER", localizations: { ru_RU: "ПОДСКАЗКА: ВЫ МОЖЕТЕ ИЗМЕНИТЬ ЦВЕТ ПОЗЖЕ", es_ES: "PISTA: PUEDES CAMBIAR EL COLOR MÁS TARDE", es_LA: "PISTA: LUEGO PODRÁS CAMBIAR DE COLOR", pt_PT: "DICA: É POSSÍVEL ALTERAR A COR DEPOIS", pt_BR: "DICA: PODES MUDAR A COR MAIS TARDE", zh_CN: "提示:你也可以在稍后更换颜色", fr_FR: "ASTUCE : VOUS POUVEZ AUSSI CHANGER DE COULEUR PLUS TARD", de_DE: "TIPP: FARBEN KANNST DU AUCH SPÄTER ÄNDERN", zh_TW: "提示:你也可以在稍後更換顏色", ja_JP: "ヒント: 色は後から変更することができる", ko_KR: "힌트: 추후 색상을 변경할 수 있습니다", it_IT: "SUGGERIMENTO: PUOI ANCHE CAMBIARE COLORE PIÙ TARDI", pl_PL: "WSKAZÓWKA: MOŻESZ TEŻ ZMIENIĆ KOLOR PÓŹNIEJ", tr_TR: "İPUCU: RENGİ SONRA DA DEĞİŞTİREBİLİRSİN", th_TH: "คำแนะนำ: คุณสามารถเปลี่ยนสีได้ภายหลัง", hi_IN: "संकेत: आप बाद में भी रंग बदल सकते हैं", vi_VN: "GỢI Ý: BẠN CŨNG CÓ THỂ THAY ĐỔI MÀU SẮC SAU NÀY", id_ID: "PETUNJUK: KAMU JUGA BISA MENGUBAH WARNA NANTI", ms_MY: "PETUA: ANDA JUGA BOLEH MENUKAR WARNA KEMUDIAN" } }, "ui-upgrade-start_units": { default: "START UNITS", localizations: { ru_RU: "СТАРТОВЫЕ ЮНИТЫ", es_ES: "TROPAS INICIO", es_LA: "TROPAS INICIO", pt_PT: "UN. INICIAIS", pt_BR: "UNI. INICIAIS", zh_CN: "开始单位", fr_FR: "UNITÉS INIT.", de_DE: "STARTEINH.", zh_TW: "開始單位", ja_JP: "開始ユニット", ko_KR: "시작 유닛", it_IT: "UNITÀ INIZ.", pl_PL: "JDN. STARTOWE", tr_TR: "BAŞLANGIÇ BİRİMİ", th_TH: "หน่วยเริ่มต้น", hi_IN: "यूनिट शुरू करें", vi_VN: "Đ.VỊ KHỞI ĐẦU", id_ID: "MULAI UNIT", ms_MY: "MULA UNIT" } }, "ui-upgrade-produce_speed": { default: "PRODUCE SPEED", localizations: { ru_RU: "СКОРОСТЬ ПРОИЗВОДСТВА", es_ES: "VELOC. PRODUCC.", es_LA: "VELOC. PRODUCC.", pt_PT: "VEL. DE PROD.", pt_BR: "VEL. PRODUÇÃO", zh_CN: "生产速度", fr_FR: "VIT. PRODUCTION", de_DE: "ERTRAGSTEMPO", zh_TW: "生產速度", ja_JP: "生産速度", ko_KR: "생산 속도", it_IT: "VELOCITÀ PRODUZ", pl_PL: "SZYBKOŚĆ PROD.", tr_TR: "ÜRETİM HIZI", th_TH: "ความเร็วการผลิต", hi_IN: "गति उत्पन्न करें", vi_VN: "TỐC ĐỘ SẢN XUẤT", id_ID: "MEMBUAT KEC.", ms_MY: "HASIL LAJU" } }, "ui-loading-label": { default: "LOADING", localizations: { ru_RU: "ЗАГРУЗКА", es_ES: "CARGANDO", es_LA: "CARGANDO", pt_PT: "CARREGANDO", pt_BR: "A CARREGAR", zh_CN: "正在加载", fr_FR: "CHARGEMENT", de_DE: "LADEN", zh_TW: "讀取中", ja_JP: "読み込み中", ko_KR: "로딩중", it_IT: "CARICAMENTO", pl_PL: "ŁADOWANIE", tr_TR: "YÜKLENIYOR", th_TH: "กำลังโหลด", hi_IN: "लोड हो रहा है", vi_VN: "ĐANG TẢI", id_ID: "MEMUAT", ms_MY: "MENGHASILKAN KELAJUAN" } }, "ui-menu-lvl": { default: "LVL", localizations: { ru_RU: "УР.", es_ES: "NIVEL", es_LA: "NIVEL", pt_PT: "NV", pt_BR: "NVL", zh_CN: "等级", fr_FR: "NV", de_DE: "LVL", zh_TW: "等級", ja_JP: "位", ko_KR: "등급", it_IT: "LIV.", pl_PL: "POZ", tr_TR: "SV", th_TH: "เลเวล", hi_IN: "स्तर", vi_VN: "CẤP", id_ID: "LVL", ms_MY: "THP" } }, game_invite: { default: "Invite", localizations: { ru_RU: "Пригласить", es_ES: "Invitar", es_LA: "Invitar", pt_PT: "Convidar", pt_BR: "Convidar", fr_FR: "Inviter", de_DE: "Einladen", zh_CN: "邀请", zh_TW: "邀請", ja_JP: "招待", ko_KR: "초대", it_IT: "Invita", pl_PL: "Zaproś", tr_TR: "Davet et", th_TH: "ชวนเพื่อน", hi_IN: "आमंत्रित करें", vi_VN: "Mời", id_ID: "Undang", ms_MY: "Jemput" } }, game_pending_description: { default: "The reward is given when your friend launch the game", localizations: { ru_RU: "Награда выдается, когда ваш друг запускает игру" } }, game_pending: { default: "Pending...", localizations: { ru_RU: "Ожидание...", es_ES: "Cargando…", es_LA: "Cargando...", pt_PT: "Carregando...", pt_BR: "A carregar...", fr_FR: "Chargement...", de_DE: "Laden...", zh_CN: "加载...", zh_TW: "載入中……", ja_JP: "読み込み中...", ko_KR: "로딩...", it_IT: "Caricamento...", pl_PL: "Ładowanie...", tr_TR: "Yükleniyor...", th_TH: "กำลังโหลด...", hi_IN: "लोड हो रहा है..", vi_VN: "Đang tải...", id_ID: "Memuat...", ms_MY: "Memuatkan…" } }, tap_to_play_go: { default: "GO!", localizations: {} }, level_completed_message: { default: "ALL STAGES COMPLETED!", localizations: { ru_RU: "Уровни пройдены!", es_ES: "ALL STAGES COMPLETED!", es_LA: "ALL STAGES COMPLETED!", pt_PT: "ALL STAGES COMPLETED!", pt_BR: "ALL STAGES COMPLETED!", fr_FR: "ALL STAGES COMPLETED!", de_DE: "ALL STAGES COMPLETED!", zh_CN: "ALL STAGES COMPLETED!", zh_TW: "ALL STAGES COMPLETED!", ja_JP: "ALL STAGES COMPLETED!", ko_KR: "ALL STAGES COMPLETED!", it_IT: "ALL STAGES COMPLETED!", pl_PL: "ALL STAGES COMPLETED!", tr_TR: "ALL STAGES COMPLETED!", th_TH: "ALL STAGES COMPLETED!", hi_IN: "ALL STAGES COMPLETED!", vi_VN: "ALL STAGES COMPLETED!", id_ID: "ALL STAGES COMPLETED!", ms_MY: "ALL STAGES COMPLETED!" } }, game_login_btn: { default: "Login", localizations: { ru_RU: "Авторизация" } }, game_login_text: { default: "Log in to compete with others and guaranteed to save progress.", localizations: { ru_RU: "Авторизуйтесь для соревнования с другими и гарантированного сохранение прогресса." } } }, version: "5270e5e-5e8a611" }; e && o.di.rebind(s.TypesCore.gameConfig).toConstantValue(e), o.di.bind("sentryAction").to(d.SetupSentryAction), o.di.bind("template.action").toConstantValue( new o.LazyAction(function () { var e, t; null === (e = (0, o.lazyGet)("sentryAction")) || void 0 === e || e.run(), null === (t = (0, o.lazyGet)("fspMeterAction")) || void 0 === t || t.run(); }) ), o.di.bind(s.TypesDevice.model).to(h.DeviceConfig).inSingletonScope(), o.di.bind(s.TypesDevice.initAction).to(c.InitDeviceConfigAction); }); }, 23083: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.CreateFPSMeterAction = void 0); var r = n(22970); n(20627); var i = n(22674), o = n(17905), a = n(46595), s = n(93727), u = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return ( void 0 === e && (e = s.Settings.debug.fpsMeter), r.__awaiter(this, void 0, void 0, function () { var t, n, i, s; return r.__generator(this, function (r) { return ( o.log.debug("createFPSMeter"), "undefined" != typeof FPSMeter && ((t = document.getElementById(a.CANVAS_ID)), (n = document.createElement("div")), document.body.insertBefore(n, t.parentElement), (i = new FPSMeter(n, e)).show(), (s = function () { i.tick(), requestAnimationFrame(s); })()), [2] ); }); }) ); }), (t = r.__decorate([(0, i.injectable)()], t)) ); })(a.Action); t.CreateFPSMeterAction = u; }, 50759: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.InitDeviceConfigAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = n(22674), s = n(16937), u = (function (e) { function t() { var t = (null !== e && e.apply(this, arguments)) || this; return (t.cssPrefix = "detect-"), (t.cssPostfix = ""), t; } return ( r.__extends(t, e), (t.prototype.execute = function () { return r.__awaiter(this, void 0, void 0, function () { return r.__generator(this, function (e) { return this.addCssClassesByDeviceAndEnv(), this.addCssClassesByGameConfig(), [2]; }); }); }), (t.prototype.getRoot = function () { return document.getElementById("game-root"); }), (t.prototype.addCssClassesByDeviceAndEnv = function () { var e = this, t = this.getRoot(), n = [], r = "social-".concat("yt"), i = this.deviceConfigModel, o = i.isAndroid, a = i.isWebView, s = i.isDesktop, u = i.isMobile, l = i.isIphone; o && n.push("android"), s && n.push("desktop"), u && n.push("mobile"), a && n.push("webview"), l && n.push("iphone"), n.push(r), t && n.forEach(function (n) { t.classList.add("".concat(e.cssPrefix).concat(n).concat(e.cssPostfix)); }); }), (t.prototype.addCssClassesByGameConfig = function () { var e, t = this.getRoot(), n = !!(null === (e = (0, i.lazyGet)(o.TypesCore.gameConfig)) || void 0 === e ? void 0 : e.useBannerAd); t && n && t.classList.add("use-banner-ad"); }), r.__decorate([(0, a.inject)(o.TypesDevice.model), r.__metadata("design:type", s.DeviceConfig)], t.prototype, "deviceConfigModel", void 0), (t = r.__decorate([(0, a.injectable)()], t)) ); })(i.Action); t.InitDeviceConfigAction = u; }, 3510: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.SetupSentryAction = void 0); var r = n(22970), i = n(46595), o = n(37394), a = r.__importStar(n(75899)), s = n(37082), u = n(22674), l = (function (e) { function t() { return (null !== e && e.apply(this, arguments)) || this; } return ( r.__extends(t, e), (t.prototype.execute = function (e) { return r.__awaiter(this, void 0, void 0, function () { var e, t = this; return r.__generator(this, function (n) { return ( (e = this.getConfig()) && (a.init(r.__assign(r.__assign({}, e), { integrations: [new s.Integrations.BrowserTracing()], tracesSampleRate: 1 })), a.configureScope(function (n) { var i = function (t) { return t.replace(/^(.*:)\/\/([A-z0-9\-.]+)(:[0-9]+)?\/(.*)\//, "~/".concat(e.project, "-").concat("yt", "/").concat(e.release, "/")); }; n.addEventProcessor(function (e) { return r.__awaiter(t, void 0, void 0, function () { var t, n, o; return r.__generator(this, function (r) { return ( e.culprit && (e.culprit = i(e.culprit)), (null === (o = null === (n = null === (t = e.exception) || void 0 === t ? void 0 : t.values[0]) || void 0 === n ? void 0 : n.stacktrace) || void 0 === o ? void 0 : o.frames) && (e.exception.values[0].stacktrace.frames = e.exception.values[0].stacktrace.frames.map(function (e) { return (e.filename = i(e.filename)), e; })), [2, e] ); }); }); }); })), [2] ); }); }); }), (t.prototype.getConfig = function () { var e = this.gameConfig.sentry; return ( e && (e.environment = ["yt", "production"] .filter(function (e) { return !!e; }) .join("-")), e ); }), r.__decorate([(0, u.inject)(o.TypesCore.gameConfig), r.__metadata("design:type", Object)], t.prototype, "gameConfig", void 0), (t = r.__decorate([(0, u.injectable)()], t)) ); })(i.Action); t.SetupSentryAction = l; }, 29374: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(23083), t), r.__exportStar(n(3510), t), r.__exportStar(n(50759), t); }, 23618: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DebugModule = void 0); var r = n(46595), i = n(23083), o = n(22674); t.DebugModule = new o.ContainerModule(function () { r.di.bind("fspMeterAction").to(i.CreateFPSMeterAction); }); }, 34106: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.startGame = void 0); var r = n(46595), i = n(37394); t.startGame = function () { return r.di.get(i.TypesFlow.boot).run(); }; }, 98354: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(93727), t), r.__exportStar(n(29374), t), r.__exportStar(n(88602), t), r.__exportStar(n(77191), t), r.__exportStar(n(34106), t); }, 93935: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); }, 16937: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.DeviceConfig = void 0); var r = n(22970), i = n(22674), o = ["WebView", "(iPhone|iPod|iPad)(?!.*Safari)", "Android.*(;\\s+wv|Version/\\d.\\d\\s+Chrome/\\d+(\\.0){3})", "Linux; U; Android"], a = (function () { function e() { var e, t, n; (this._isIphone = !1), (this._isAndroid = !1), (this._isMobile = !1), (this._isDesktop = !1), (this._isWebView = !1), (this._isMobile = ((t = !1), (e = navigator.userAgent || navigator.vendor || window.opera), (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4))) && (t = !0), t)), (this._isDesktop = !this._isMobile), (this._isIphone = "undefined" != typeof window && "undefined" != typeof navigator && /iPhone/i.test(navigator.userAgent || navigator.vendor || (window.opera && "[object Opera]" === opera.toString()))), (this._isAndroid = ((n = n || window.navigator.userAgent), /Android/i.test(n))), (this._isWebView = (function (e) { e = e || window.navigator.userAgent; var t = new RegExp("(" + o.join("|") + ")", "ig"); return !!e.match(t); })()); } return ( Object.defineProperty(e.prototype, "isDesktop", { get: function () { return this._isDesktop; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isMobile", { get: function () { return this._isMobile; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isAndroid", { get: function () { return this._isAndroid; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isIphone", { get: function () { return this._isIphone; }, enumerable: !1, configurable: !0, }), Object.defineProperty(e.prototype, "isWebView", { get: function () { return this._isWebView; }, enumerable: !1, configurable: !0, }), (e = r.__decorate([(0, i.injectable)(), r.__metadata("design:paramtypes", [])], e)) ); })(); t.DeviceConfig = a; }, 88602: (e, t, n) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = n(22970); r.__exportStar(n(16937), t), r.__exportStar(n(93935), t); }, 93727: (e, t) => { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }), (t.Settings = void 0), (t.Settings = { debug: { fpsMeter: { theme: "transparent", heat: 20, graph: 1, history: 20, zIndex: 1e4, top: "80%" } } }); }, 53260: () => {}, 10562: (e, t, n) => { "use strict"; var r = n(13758), i = 1e-8; function o(e) { var t = Math.min(e[0], e[2]), n = Math.max(e[0], e[2]); if (e[1] > e[0] ? e[2] >= e[1] : e[2] <= e[1]) return [t, n]; var r = (e[0] * e[2] - e[1] * e[1]) / (e[0] - 2 * e[1] + e[2]); return r < t ? [r, n] : [t, r]; } function a(e) { var t = e[0] - 3 * e[1] + 3 * e[2] - e[3]; if (Math.abs(t) < i) return e[0] === e[3] && e[0] === e[1] ? [e[0], e[3]] : o([e[0], -0.5 * e[0] + 1.5 * e[1], e[0] - 3 * e[1] + 3 * e[2]]); var n = -e[0] * e[2] + e[0] * e[3] - e[1] * e[2] - e[1] * e[3] + e[1] * e[1] + e[2] * e[2]; if (n <= 0) return [Math.min(e[0], e[3]), Math.max(e[0], e[3])]; for (var r = Math.sqrt(n), a = Math.min(e[0], e[3]), s = Math.max(e[0], e[3]), u = e[0] - 2 * e[1] + e[2], l = (u + r) / t, c = 1; c <= 2; l = (u - r) / t, c++) if (l > 0 && l < 1) { var d = e[0] * (1 - l) * (1 - l) * (1 - l) + 3 * e[1] * (1 - l) * (1 - l) * l + 3 * e[2] * (1 - l) * l * l + e[3] * l * l * l; d < a && (a = d), d > s && (s = d); } return [a, s]; } t.default = function (e) { var t = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0]; return ( r(e) .abs() .unarc() .unshort() .iterate(function (e, r, i, s) { switch (e[0]) { case "M": case "L": t[0] > e[1] && (t[0] = e[1]), t[1] > e[2] && (t[1] = e[2]), n[0] < e[1] && (n[0] = e[1]), n[1] < e[2] && (n[1] = e[2]); break; case "H": t[0] > e[1] && (t[0] = e[1]), n[0] < e[1] && (n[0] = e[1]); break; case "V": t[1] > e[1] && (t[1] = e[1]), n[1] < e[1] && (n[1] = e[1]); break; case "C": var u = a([i, e[1], e[3], e[5]]); t[0] > u[0] && (t[0] = u[0]), n[0] < u[1] && (n[0] = u[1]); var l = a([s, e[2], e[4], e[6]]); t[1] > l[0] && (t[1] = l[0]), n[1] < l[1] && (n[1] = l[1]); break; case "Q": var c = o([i, e[1], e[3]]); t[0] > c[0] && (t[0] = c[0]), n[0] < c[1] && (n[0] = c[1]); var d = o([s, e[2], e[4]]); t[1] > d[0] && (t[1] = d[0]), n[1] < d[1] && (n[1] = d[1]); } }, !0), [t[0], t[1], n[0], n[1]] ); }; }, 15063: (e, t, n) => { e.exports = n(10562).default; }, 32065: (e, t, n) => { "use strict"; n.r(t), n.d(t, { deleteDB: () => m, openDB: () => g, unwrap: () => _, wrap: () => f }); const r = (e, t) => t.some((t) => e instanceof t); let i, o; const a = new WeakMap(), s = new WeakMap(), u = new WeakMap(), l = new WeakMap(), c = new WeakMap(); let d = { get(e, t, n) { if (e instanceof IDBTransaction) { if ("done" === t) return s.get(e); if ("objectStoreNames" === t) return e.objectStoreNames || u.get(e); if ("store" === t) return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]); } return f(e[t]); }, set: (e, t, n) => ((e[t] = n), !0), has: (e, t) => (e instanceof IDBTransaction && ("done" === t || "store" === t)) || t in e, }; function h(e) { return e !== IDBDatabase.prototype.transaction || "objectStoreNames" in IDBTransaction.prototype ? (o || (o = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey])).includes(e) ? function (...t) { return e.apply(_(this), t), f(a.get(this)); } : function (...t) { return f(e.apply(_(this), t)); } : function (t, ...n) { const r = e.call(_(this), t, ...n); return u.set(r, t.sort ? t.sort() : [t]), f(r); }; } function p(e) { return "function" == typeof e ? h(e) : (e instanceof IDBTransaction && (function (e) { if (s.has(e)) return; const t = new Promise((t, n) => { const r = () => { e.removeEventListener("complete", i), e.removeEventListener("error", o), e.removeEventListener("abort", o); }, i = () => { t(), r(); }, o = () => { n(e.error || new DOMException("AbortError", "AbortError")), r(); }; e.addEventListener("complete", i), e.addEventListener("error", o), e.addEventListener("abort", o); }); s.set(e, t); })(e), r(e, i || (i = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])) ? new Proxy(e, d) : e); } function f(e) { if (e instanceof IDBRequest) return (function (e) { const t = new Promise((t, n) => { const r = () => { e.removeEventListener("success", i), e.removeEventListener("error", o); }, i = () => { t(f(e.result)), r(); }, o = () => { n(e.error), r(); }; e.addEventListener("success", i), e.addEventListener("error", o); }); return ( t .then((t) => { t instanceof IDBCursor && a.set(t, e); }) .catch(() => {}), c.set(t, e), t ); })(e); if (l.has(e)) return l.get(e); const t = p(e); return t !== e && (l.set(e, t), c.set(t, e)), t; } const _ = (e) => c.get(e); function g(e, t, { blocked: n, upgrade: r, blocking: i, terminated: o } = {}) { const a = indexedDB.open(e, t), s = f(a); return ( r && a.addEventListener("upgradeneeded", (e) => { r(f(a.result), e.oldVersion, e.newVersion, f(a.transaction), e); }), n && a.addEventListener("blocked", (e) => n(e.oldVersion, e.newVersion, e)), s .then((e) => { o && e.addEventListener("close", () => o()), i && e.addEventListener("versionchange", (e) => i(e.oldVersion, e.newVersion, e)); }) .catch(() => {}), s ); } function m(e, { blocked: t } = {}) { const n = indexedDB.deleteDatabase(e); return t && n.addEventListener("blocked", (e) => t(e.oldVersion, e)), f(n).then(() => {}); } const v = ["get", "getKey", "getAll", "getAllKeys", "count"], y = ["put", "add", "delete", "clear"], C = new Map(); function b(e, t) { if (!(e instanceof IDBDatabase) || t in e || "string" != typeof t) return; if (C.get(t)) return C.get(t); const n = t.replace(/FromIndex$/, ""), r = t !== n, i = y.includes(n); if (!(n in (r ? IDBIndex : IDBObjectStore).prototype) || (!i && !v.includes(n))) return; const o = async function (e, ...t) { const o = this.transaction(e, i ? "readwrite" : "readonly"); let a = o.store; return r && (a = a.index(t.shift())), (await Promise.all([a[n](...t), i && o.done]))[0]; }; return C.set(t, o), o; } d = ((e) => ({ ...e, get: (t, n, r) => b(t, n) || e.get(t, n, r), has: (t, n) => !!b(t, n) || e.has(t, n) }))(d); }, 5214: (e, t, n) => { "use strict"; var r; n.r(t), n.d(t, { log: () => l }); var i = 2, o = (((r = {})[1] = ["fatal", ["#7c002a"], console.error]), (r[2] = ["info", ["#4454FF", "#7e86de"], console.info]), (r[3] = ["error", ["#f31"], console.error]), (r[4] = ["warn", ["#ffcd84"], console.warn]), (r[5] = ["debug", ["#168d21", "#168d21"], console.log]), (r[6] = ["trace", ["#aaa"], console.log]), r), a = function (e) { switch (typeof e) { case "string": return "%s"; case "boolean": return "%o"; case "number": return (0 ^ e) === e ? "%i" : "%f"; default: return "%O"; } }, s = function (e, t) { return ( void 0 === t && (t = ""), function (n) { if (i >= e && o[e]) { var r = o[e], s = r[0], u = r[1]; r[2].apply(null, [t + " %c #%s %c " + n.map(a).join(" "), "background-color:" + (u[0] || "") + ";color:white;", s, u[1] ? "color:" + u[1] + ";" : ""].concat(n)); } } ); }, u = function (e) { return { trace: function () { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return s(6, e)(t); }, debug: function () { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return s(5, e)(t); }, warn: function () { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return s(4, e)(t); }, error: function () { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return s(3, e)(t); }, info: function () { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return s(2, e)(t); }, fatal: function () { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return s(1, e)(t); }, }; }, l = Object.assign(u(), { scope: u, setLevel: function (e) { return (i = e); }, }); }, 55389: (e, t, n) => { "use strict"; n.r(t), n.d(t, { deleteDB: () => m, openDB: () => g, unwrap: () => _, wrap: () => f }); const r = (e, t) => t.some((t) => e instanceof t); let i, o; const a = new WeakMap(), s = new WeakMap(), u = new WeakMap(), l = new WeakMap(), c = new WeakMap(); let d = { get(e, t, n) { if (e instanceof IDBTransaction) { if ("done" === t) return s.get(e); if ("objectStoreNames" === t) return e.objectStoreNames || u.get(e); if ("store" === t) return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]); } return f(e[t]); }, set: (e, t, n) => ((e[t] = n), !0), has: (e, t) => (e instanceof IDBTransaction && ("done" === t || "store" === t)) || t in e, }; function h(e) { return e !== IDBDatabase.prototype.transaction || "objectStoreNames" in IDBTransaction.prototype ? (o || (o = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey])).includes(e) ? function (...t) { return e.apply(_(this), t), f(a.get(this)); } : function (...t) { return f(e.apply(_(this), t)); } : function (t, ...n) { const r = e.call(_(this), t, ...n); return u.set(r, t.sort ? t.sort() : [t]), f(r); }; } function p(e) { return "function" == typeof e ? h(e) : (e instanceof IDBTransaction && (function (e) { if (s.has(e)) return; const t = new Promise((t, n) => { const r = () => { e.removeEventListener("complete", i), e.removeEventListener("error", o), e.removeEventListener("abort", o); }, i = () => { t(), r(); }, o = () => { n(e.error || new DOMException("AbortError", "AbortError")), r(); }; e.addEventListener("complete", i), e.addEventListener("error", o), e.addEventListener("abort", o); }); s.set(e, t); })(e), r(e, i || (i = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])) ? new Proxy(e, d) : e); } function f(e) { if (e instanceof IDBRequest) return (function (e) { const t = new Promise((t, n) => { const r = () => { e.removeEventListener("success", i), e.removeEventListener("error", o); }, i = () => { t(f(e.result)), r(); }, o = () => { n(e.error), r(); }; e.addEventListener("success", i), e.addEventListener("error", o); }); return ( t .then((t) => { t instanceof IDBCursor && a.set(t, e); }) .catch(() => {}), c.set(t, e), t ); })(e); if (l.has(e)) return l.get(e); const t = p(e); return t !== e && (l.set(e, t), c.set(t, e)), t; } const _ = (e) => c.get(e); function g(e, t, { blocked: n, upgrade: r, blocking: i, terminated: o } = {}) { const a = indexedDB.open(e, t), s = f(a); return ( r && a.addEventListener("upgradeneeded", (e) => { r(f(a.result), e.oldVersion, e.newVersion, f(a.transaction)); }), n && a.addEventListener("blocked", () => n()), s .then((e) => { o && e.addEventListener("close", () => o()), i && e.addEventListener("versionchange", () => i()); }) .catch(() => {}), s ); } function m(e, { blocked: t } = {}) { const n = indexedDB.deleteDatabase(e); return t && n.addEventListener("blocked", () => t()), f(n).then(() => {}); } const v = ["get", "getKey", "getAll", "getAllKeys", "count"], y = ["put", "add", "delete", "clear"], C = new Map(); function b(e, t) { if (!(e instanceof IDBDatabase) || t in e || "string" != typeof t) return; if (C.get(t)) return C.get(t); const n = t.replace(/FromIndex$/, ""), r = t !== n, i = y.includes(n); if (!(n in (r ? IDBIndex : IDBObjectStore).prototype) || (!i && !v.includes(n))) return; const o = async function (e, ...t) { const o = this.transaction(e, i ? "readwrite" : "readonly"); let a = o.store; return r && (a = a.index(t.shift())), (await Promise.all([a[n](...t), i && o.done]))[0]; }; return C.set(t, o), o; } d = ((e) => ({ ...e, get: (t, n, r) => b(t, n) || e.get(t, n, r), has: (t, n) => !!b(t, n) || e.has(t, n) }))(d); }, 22970: (e, t, n) => { "use strict"; n.r(t), n.d(t, { __addDisposableResource: () => R, __assign: () => o, __asyncDelegator: () => x, __asyncGenerator: () => T, __asyncValues: () => E, __await: () => S, __awaiter: () => f, __classPrivateFieldGet: () => P, __classPrivateFieldIn: () => k, __classPrivateFieldSet: () => O, __createBinding: () => g, __decorate: () => s, __disposeResources: () => N, __esDecorate: () => l, __exportStar: () => m, __extends: () => i, __generator: () => _, __importDefault: () => M, __importStar: () => I, __makeTemplateObject: () => L, __metadata: () => p, __param: () => u, __propKey: () => d, __read: () => y, __rest: () => a, __runInitializers: () => c, __setFunctionName: () => h, __spread: () => C, __spreadArray: () => w, __spreadArrays: () => b, __values: () => v, default: () => B }); var r = function (e, t) { return ( (r = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t; }) || function (e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); }), r(e, t) ); }; function i(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); function n() { this.constructor = e; } r(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); } var o = function () { return ( (o = Object.assign || function (e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in (t = arguments[n])) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e; }), o.apply(this, arguments) ); }; function a(e, t) { var n = {}; for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (null != e && "function" == typeof Object.getOwnPropertySymbols) { var i = 0; for (r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]); } return n; } function s(e, t, n, r) { var i, o = arguments.length, a = o < 3 ? t : null === r ? (r = Object.getOwnPropertyDescriptor(t, n)) : r; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, r); else for (var s = e.length - 1; s >= 0; s--) (i = e[s]) && (a = (o < 3 ? i(a) : o > 3 ? i(t, n, a) : i(t, n)) || a); return o > 3 && a && Object.defineProperty(t, n, a), a; } function u(e, t) { return function (n, r) { t(n, r, e); }; } function l(e, t, n, r, i, o) { function a(e) { if (void 0 !== e && "function" != typeof e) throw new TypeError("Function expected"); return e; } for (var s, u = r.kind, l = "getter" === u ? "get" : "setter" === u ? "set" : "value", c = !t && e ? (r.static ? e : e.prototype) : null, d = t || (c ? Object.getOwnPropertyDescriptor(c, r.name) : {}), h = !1, p = n.length - 1; p >= 0; p--) { var f = {}; for (var _ in r) f[_] = "access" === _ ? {} : r[_]; for (var _ in r.access) f.access[_] = r.access[_]; f.addInitializer = function (e) { if (h) throw new TypeError("Cannot add initializers after decoration has completed"); o.push(a(e || null)); }; var g = (0, n[p])("accessor" === u ? { get: d.get, set: d.set } : d[l], f); if ("accessor" === u) { if (void 0 === g) continue; if (null === g || "object" != typeof g) throw new TypeError("Object expected"); (s = a(g.get)) && (d.get = s), (s = a(g.set)) && (d.set = s), (s = a(g.init)) && i.unshift(s); } else (s = a(g)) && ("field" === u ? i.unshift(s) : (d[l] = s)); } c && Object.defineProperty(c, r.name, d), (h = !0); } function c(e, t, n) { for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e); return r ? n : void 0; } function d(e) { return "symbol" == typeof e ? e : "".concat(e); } function h(e, t, n) { return "symbol" == typeof t && (t = t.description ? "[".concat(t.description, "]") : ""), Object.defineProperty(e, "name", { configurable: !0, value: n ? "".concat(n, " ", t) : t }); } function p(e, t) { if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t); } function f(e, t, n, r) { return new (n || (n = Promise))(function (i, o) { function a(e) { try { u(r.next(e)); } catch (e) { o(e); } } function s(e) { try { u(r.throw(e)); } catch (e) { o(e); } } function u(e) { var t; e.done ? i(e.value) : ((t = e.value), t instanceof n ? t : new n(function (e) { e(t); })).then(a, s); } u((r = r.apply(e, t || [])).next()); }); } function _(e, t) { var n, r, i, o, a = { label: 0, sent: function () { if (1 & i[0]) throw i[1]; return i[1]; }, trys: [], ops: [], }; return ( (o = { next: s(0), throw: s(1), return: s(2) }), "function" == typeof Symbol && (o[Symbol.iterator] = function () { return this; }), o ); function s(s) { return function (u) { return (function (s) { if (n) throw new TypeError("Generator is already executing."); for (; o && ((o = 0), s[0] && (a = 0)), a; ) try { if (((n = 1), r && (i = 2 & s[0] ? r.return : s[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, s[1])).done)) return i; switch (((r = 0), i && (s = [2 & s[0], i.value]), s[0])) { case 0: case 1: i = s; break; case 4: return a.label++, { value: s[1], done: !1 }; case 5: a.label++, (r = s[1]), (s = [0]); continue; case 7: (s = a.ops.pop()), a.trys.pop(); continue; default: if (!((i = a.trys), (i = i.length > 0 && i[i.length - 1]) || (6 !== s[0] && 2 !== s[0]))) { a = 0; continue; } if (3 === s[0] && (!i || (s[1] > i[0] && s[1] < i[3]))) { a.label = s[1]; break; } if (6 === s[0] && a.label < i[1]) { (a.label = i[1]), (i = s); break; } if (i && a.label < i[2]) { (a.label = i[2]), a.ops.push(s); break; } i[2] && a.ops.pop(), a.trys.pop(); continue; } s = t.call(e, a); } catch (e) { (s = [6, e]), (r = 0); } finally { n = i = 0; } if (5 & s[0]) throw s[1]; return { value: s[0] ? s[1] : void 0, done: !0 }; })([s, u]); }; } } var g = Object.create ? function (e, t, n, r) { void 0 === r && (r = n); var i = Object.getOwnPropertyDescriptor(t, n); (i && !("get" in i ? !t.__esModule : i.writable || i.configurable)) || (i = { enumerable: !0, get: function () { return t[n]; }, }), Object.defineProperty(e, r, i); } : function (e, t, n, r) { void 0 === r && (r = n), (e[r] = t[n]); }; function m(e, t) { for (var n in e) "default" === n || Object.prototype.hasOwnProperty.call(t, n) || g(t, e, n); } function v(e) { var t = "function" == typeof Symbol && Symbol.iterator, n = t && e[t], r = 0; if (n) return n.call(e); if (e && "number" == typeof e.length) return { next: function () { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; }, }; throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined."); } function y(e, t) { var n = "function" == typeof Symbol && e[Symbol.iterator]; if (!n) return e; var r, i, o = n.call(e), a = []; try { for (; (void 0 === t || t-- > 0) && !(r = o.next()).done; ) a.push(r.value); } catch (e) { i = { error: e }; } finally { try { r && !r.done && (n = o.return) && n.call(o); } finally { if (i) throw i.error; } } return a; } function C() { for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(y(arguments[t])); return e; } function b() { for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length; var r = Array(e), i = 0; for (t = 0; t < n; t++) for (var o = arguments[t], a = 0, s = o.length; a < s; a++, i++) r[i] = o[a]; return r; } function w(e, t, n) { if (n || 2 === arguments.length) for (var r, i = 0, o = t.length; i < o; i++) (!r && i in t) || (r || (r = Array.prototype.slice.call(t, 0, i)), (r[i] = t[i])); return e.concat(r || Array.prototype.slice.call(t)); } function S(e) { return this instanceof S ? ((this.v = e), this) : new S(e); } function T(e, t, n) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var r, i = n.apply(e, t || []), o = []; return ( (r = {}), a("next"), a("throw"), a("return"), (r[Symbol.asyncIterator] = function () { return this; }), r ); function a(e) { i[e] && (r[e] = function (t) { return new Promise(function (n, r) { o.push([e, t, n, r]) > 1 || s(e, t); }); }); } function s(e, t) { try { (n = i[e](t)).value instanceof S ? Promise.resolve(n.value.v).then(u, l) : c(o[0][2], n); } catch (e) { c(o[0][3], e); } var n; } function u(e) { s("next", e); } function l(e) { s("throw", e); } function c(e, t) { e(t), o.shift(), o.length && s(o[0][0], o[0][1]); } } function x(e) { var t, n; return ( (t = {}), r("next"), r("throw", function (e) { throw e; }), r("return"), (t[Symbol.iterator] = function () { return this; }), t ); function r(r, i) { t[r] = e[r] ? function (t) { return (n = !n) ? { value: S(e[r](t)), done: !1 } : i ? i(t) : t; } : i; } } function E(e) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var t, n = e[Symbol.asyncIterator]; return n ? n.call(e) : ((e = v(e)), (t = {}), r("next"), r("throw"), r("return"), (t[Symbol.asyncIterator] = function () { return this; }), t); function r(n) { t[n] = e[n] && function (t) { return new Promise(function (r, i) { (function (e, t, n, r) { Promise.resolve(r).then(function (t) { e({ value: t, done: n }); }, t); })(r, i, (t = e[n](t)).done, t.value); }); }; } } function L(e, t) { return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : (e.raw = t), e; } var A = Object.create ? function (e, t) { Object.defineProperty(e, "default", { enumerable: !0, value: t }); } : function (e, t) { e.default = t; }; function I(e) { if (e && e.__esModule) return e; var t = {}; if (null != e) for (var n in e) "default" !== n && Object.prototype.hasOwnProperty.call(e, n) && g(t, e, n); return A(t, e), t; } function M(e) { return e && e.__esModule ? e : { default: e }; } function P(e, t, n, r) { if ("a" === n && !r) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return "m" === n ? r : "a" === n ? r.call(e) : r ? r.value : t.get(e); } function O(e, t, n, r, i) { if ("m" === r) throw new TypeError("Private method is not writable"); if ("a" === r && !i) throw new TypeError("Private accessor was defined without a setter"); if ("function" == typeof t ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return "a" === r ? i.call(e, n) : i ? (i.value = n) : t.set(e, n), n; } function k(e, t) { if (null === t || ("object" != typeof t && "function" != typeof t)) throw new TypeError("Cannot use 'in' operator on non-object"); return "function" == typeof e ? t === e : e.has(t); } function R(e, t, n) { if (null != t) { if ("object" != typeof t) throw new TypeError("Object expected."); var r; if (n) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); r = t[Symbol.asyncDispose]; } if (void 0 === r) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); r = t[Symbol.dispose]; } if ("function" != typeof r) throw new TypeError("Object not disposable."); e.stack.push({ value: t, dispose: r, async: n }); } else n && e.stack.push({ async: !0 }); return t; } var D = "function" == typeof SuppressedError ? SuppressedError : function (e, t, n) { var r = new Error(n); return (r.name = "SuppressedError"), (r.error = e), (r.suppressed = t), r; }; function N(e) { function t(t) { (e.error = e.hasError ? new D(t, e.error, "An error was suppressed during disposal.") : t), (e.hasError = !0); } return (function n() { for (; e.stack.length; ) { var r = e.stack.pop(); try { var i = r.dispose && r.dispose.call(r.value); if (r.async) return Promise.resolve(i).then(n, function (e) { return t(e), n(); }); } catch (e) { t(e); } } if (e.hasError) throw e.error; })(); } const B = { __extends: i, __assign: o, __rest: a, __decorate: s, __param: u, __metadata: p, __awaiter: f, __generator: _, __createBinding: g, __exportStar: m, __values: v, __read: y, __spread: C, __spreadArrays: b, __spreadArray: w, __await: S, __asyncGenerator: T, __asyncDelegator: x, __asyncValues: E, __makeTemplateObject: L, __importStar: I, __importDefault: M, __classPrivateFieldGet: P, __classPrivateFieldSet: O, __classPrivateFieldIn: k, __addDisposableResource: R, __disposeResources: N }; }, }, t = {}; function n(r) { var i = t[r]; if (void 0 !== i) return i.exports; var o = (t[r] = { id: r, loaded: !1, exports: {} }); return e[r].call(o.exports, o, o.exports, n), (o.loaded = !0), o.exports; } (n.n = (e) => { var t = e && e.__esModule ? () => e.default : () => e; return n.d(t, { a: t }), t; }), (n.d = (e, t) => { for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, { enumerable: !0, get: t[r] }); }), (n.g = (function () { if ("object" == typeof globalThis) return globalThis; try { return this || new Function("return this")(); } catch (e) { if ("object" == typeof window) return window; } })()), (n.hmd = (e) => ( (e = Object.create(e)).children || (e.children = []), Object.defineProperty(e, "exports", { enumerable: !0, set: () => { throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: " + e.id); }, }), e )), (n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)), (n.r = (e) => { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }); }), (n.nmd = (e) => ((e.paths = []), e.children || (e.children = []), e)); var r; ((r = "undefined" != typeof window ? window : void 0 !== n.g ? n.g : "undefined" != typeof self ? self : {}).SENTRY_RELEASE = { id: "5270e5e-5e8a611" }), (r.SENTRY_RELEASES = r.SENTRY_RELEASES || {}), (r.SENTRY_RELEASES["state-io@diesel-g6"] = { id: "5270e5e-5e8a611" }), (() => { "use strict"; n(1738), n(21001), n(46095); var e = n(46595), t = n(98354), r = n(57228), i = n(70789), o = n(55904), a = n(57768), s = n(78620), u = n(36373); (r.AdManagerBase.config.ids.INTER = i.SIOConstants.INTER), (r.AdManagerBase.config.ids.REWARD = i.SIOConstants.REWARD), (r.AdManagerBase.config.ids.BANNER = i.SIOConstants.BANNER_PLACEMENT), (i.SIOConstants.IN_GAME_AUDIO_CONTROL_ALLOWED = !1), (i.SIOConstants.INTER_AD_ALLOWED = !1), (i.SIOConstants.REWARDED_AD_ALLOWED = !1), e.di.load(t.GameModuleBase), e.di.load(a.GameModuleYoutube), e.di.load(o.GameModule), e.di.rebind(s.TypesGame.actions.levelCompletePopup).to(u.LevelCompletedPopupActionYoutube), console.log("Before start game"), (0, t.startGame)(); })(); })(); //# sourceMappingURL=main.js.map